From 8cf736e7e8d9904ffb9336da1d14e6062a70a518 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 17 Oct 2019 14:06:23 -0700 Subject: [PATCH 01/64] Address Identity API review (10/16) (#5903) * Move credentials to root package and rename device code parameters * Return expiresOn in DeviceCodeInfo * Rename TokenRequest to TokenRequestContext * Move tests to root package * Fix references to identity in other sdks * Checkstyle --- .../core/amqp/implementation/CBSChannel.java | 4 +-- .../BasicAuthenticationCredential.java | 2 +- .../core/credential/TokenCredential.java | 2 +- ...nRequest.java => TokenRequestContext.java} | 14 ++++----- .../BearerTokenAuthenticationPolicy.java | 4 +-- .../core/credential/CredentialsTests.java | 2 +- .../EventHubSharedAccessKeyCredential.java | 4 +-- .../implementation/ManagementChannel.java | 4 +-- ...EventHubSharedAccessKeyCredentialTest.java | 4 +-- sdk/identity/azure-identity/README.md | 18 +++++------ .../AadCredentialBuilderBase.java | 2 +- .../AppServiceMSICredential.java | 19 ++---------- .../AuthorizationCodeCredential.java | 6 ++-- .../AuthorizationCodeCredentialBuilder.java | 2 +- .../ChainedTokenCredential.java | 6 ++-- .../ChainedTokenCredentialBuilder.java | 2 +- .../ClientCertificateCredential.java | 6 ++-- .../ClientCertificateCredentialBuilder.java | 2 +- .../ClientSecretCredential.java | 6 ++-- .../ClientSecretCredentialBuilder.java | 2 +- .../CredentialBuilderBase.java | 2 +- .../DefaultAzureCredential.java | 2 +- .../DefaultAzureCredentialBuilder.java | 2 +- .../DeviceCodeCredential.java | 17 +++++----- .../DeviceCodeCredentialBuilder.java | 17 +++++----- ...CodeChallenge.java => DeviceCodeInfo.java} | 20 ++++++------ .../EnvironmentCredential.java | 6 ++-- .../EnvironmentCredentialBuilder.java | 2 +- .../InteractiveBrowserCredential.java | 6 ++-- .../InteractiveBrowserCredentialBuilder.java | 2 +- .../ManagedIdentityCredential.java | 19 ++---------- .../ManagedIdentityCredentialBuilder.java | 2 +- .../SharedTokenCacheCredential.java | 6 ++-- .../SharedTokenCacheCredentialBuilder.java | 2 +- .../UsernamePasswordCredential.java | 6 ++-- .../UsernamePasswordCredentialBuilder.java | 2 +- .../VirtualMachineMSICredential.java | 6 ++-- .../implementation/IdentityClient.java | 31 ++++++++++--------- .../java/com/azure/identity/package-info.java | 3 +- .../src/main/java/module-info.java | 1 - .../credential/JavaDocCodeSnippets.java | 10 ++++++ .../AuthorizationCodeCredentialTest.java | 10 +++--- .../ClientCertificateCredentialTest.java | 14 ++++----- .../ClientSecretCredentialTest.java | 12 +++---- .../DefaultAzureCredentialTest.java | 10 +++--- .../DeviceCodeCredentialTest.java | 15 +++++---- .../EnvironmentCredentialTests.java | 6 ++-- .../InteractiveBrowserCredentialTest.java | 10 +++--- .../ManagedIdentityCredentialTest.java | 25 +++------------ .../UsernamePasswordCredentialTest.java | 14 ++++----- .../IdentityClientIntegrationTests.java | 14 ++++----- .../implementation/IdentityClientTests.java | 18 +++++------ .../README.md | 6 ++-- .../KeyVaultCredentialPolicy.java | 4 +-- .../certificates/ScopeTokenCache.java | 10 +++--- .../BackupAndRestoreOperations.java | 2 +- .../BackupAndRestoreOperationsAsync.java | 2 +- ...ificateAsyncClientJavaDocCodeSnippets.java | 2 +- .../CertificateClientJavaDocCodeSnippets.java | 2 +- .../keyvault/certificates/HelloWorld.java | 2 +- .../certificates/HelloWorldAsync.java | 2 +- .../keyvault/certificates/ListOperations.java | 2 +- .../certificates/ListOperationsAsync.java | 2 +- .../ManagingDeletedCertificates.java | 2 +- .../ManagingDeletedCertificatesAsync.java | 2 +- .../azure-security-keyvault-keys/README.md | 8 ++--- .../keys/KeyVaultCredentialPolicy.java | 4 +-- .../keyvault/keys/ScopeTokenCache.java | 10 +++--- .../keys/BackupAndRestoreOperations.java | 2 +- .../keys/BackupAndRestoreOperationsAsync.java | 2 +- .../security/keyvault/keys/HelloWorld.java | 2 +- .../keyvault/keys/HelloWorldAsync.java | 2 +- .../KeyAsyncClientJavaDocCodeSnippets.java | 2 +- .../keys/KeyClientJavaDocCodeSnippets.java | 2 +- .../keyvault/keys/ListOperations.java | 2 +- .../keyvault/keys/ListOperationsAsync.java | 2 +- .../keyvault/keys/ManagingDeletedKeys.java | 2 +- .../keys/ManagingDeletedKeysAsync.java | 2 +- ...ographyAsyncClientJavaDocCodeSnippets.java | 2 +- ...CryptographyClientJavaDocCodeSnippets.java | 2 +- .../EncryptDecryptOperations.java | 2 +- .../EncryptDecryptOperationsAsync.java | 2 +- .../cryptography/KeyWrapUnwrapOperations.java | 2 +- .../KeyWrapUnwrapOperationsAsync.java | 2 +- .../cryptography/SignVerifyOperations.java | 2 +- .../SignVerifyOperationsAsync.java | 2 +- .../keyvault/keys/KeyClientTestBase.java | 2 +- .../CryptographyClientTestBase.java | 2 +- .../azure-security-keyvault-secrets/README.md | 6 ++-- .../secrets/KeyVaultCredentialPolicy.java | 4 +-- .../keyvault/secrets/ScopeTokenCache.java | 10 +++--- .../secrets/BackupAndRestoreOperations.java | 2 +- .../BackupAndRestoreOperationsAsync.java | 2 +- .../security/keyvault/secrets/HelloWorld.java | 2 +- .../keyvault/secrets/HelloWorldAsync.java | 2 +- .../keyvault/secrets/IdentitySamples.java | 22 ++++++------- .../keyvault/secrets/ListOperations.java | 2 +- .../keyvault/secrets/ListOperationsAsync.java | 2 +- .../secrets/ManagingDeletedSecrets.java | 2 +- .../secrets/ManagingDeletedSecretsAsync.java | 2 +- .../secrets/PersistentTokenCacheDemo.java | 4 +-- .../SecretAsyncClientJavaDocCodeSnippets.java | 2 +- .../SecretClientJavaDocCodeSnippets.java | 2 +- .../secrets/SecretClientTestBase.java | 2 +- .../azure/storage/blob/batch/APISpec.groovy | 2 +- .../storage/blob/AzureIdentityExample.java | 2 +- .../com/azure/storage/blob/APISpec.groovy | 2 +- 107 files changed, 282 insertions(+), 317 deletions(-) rename sdk/core/azure-core/src/main/java/com/azure/core/credential/{TokenRequest.java => TokenRequestContext.java} (75%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/AadCredentialBuilderBase.java (97%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/AppServiceMSICredential.java (78%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/AuthorizationCodeCredential.java (94%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/AuthorizationCodeCredentialBuilder.java (98%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/ChainedTokenCredential.java (93%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/ChainedTokenCredentialBuilder.java (97%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/ClientCertificateCredential.java (94%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/ClientCertificateCredentialBuilder.java (98%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/ClientSecretCredential.java (93%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/ClientSecretCredentialBuilder.java (97%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/CredentialBuilderBase.java (97%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/DefaultAzureCredential.java (96%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/DefaultAzureCredentialBuilder.java (93%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/DeviceCodeCredential.java (79%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/DeviceCodeCredentialBuilder.java (60%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{DeviceCodeChallenge.java => DeviceCodeInfo.java} (77%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/EnvironmentCredential.java (93%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/EnvironmentCredentialBuilder.java (95%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/InteractiveBrowserCredential.java (94%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/InteractiveBrowserCredentialBuilder.java (97%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/ManagedIdentityCredential.java (79%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/ManagedIdentityCredentialBuilder.java (95%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/SharedTokenCacheCredential.java (96%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/SharedTokenCacheCredentialBuilder.java (96%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/UsernamePasswordCredential.java (95%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/UsernamePasswordCredentialBuilder.java (97%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{credential => }/VirtualMachineMSICredential.java (89%) rename sdk/identity/azure-identity/src/test/java/com/azure/identity/{credential => }/AuthorizationCodeCredentialTest.java (89%) rename sdk/identity/azure-identity/src/test/java/com/azure/identity/{credential => }/ClientCertificateCredentialTest.java (90%) rename sdk/identity/azure-identity/src/test/java/com/azure/identity/{credential => }/ClientSecretCredentialTest.java (91%) rename sdk/identity/azure-identity/src/test/java/com/azure/identity/{credential => }/DefaultAzureCredentialTest.java (92%) rename sdk/identity/azure-identity/src/test/java/com/azure/identity/{credential => }/DeviceCodeCredentialTest.java (83%) rename sdk/identity/azure-identity/src/test/java/com/azure/identity/{credential => }/EnvironmentCredentialTests.java (92%) rename sdk/identity/azure-identity/src/test/java/com/azure/identity/{credential => }/InteractiveBrowserCredentialTest.java (89%) rename sdk/identity/azure-identity/src/test/java/com/azure/identity/{credential => }/ManagedIdentityCredentialTest.java (77%) rename sdk/identity/azure-identity/src/test/java/com/azure/identity/{credential => }/UsernamePasswordCredentialTest.java (91%) diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/CBSChannel.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/CBSChannel.java index 5d17e4325303..5a39f8ceb9e2 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/CBSChannel.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/CBSChannel.java @@ -6,7 +6,7 @@ import com.azure.core.amqp.CBSNode; import com.azure.core.amqp.RetryOptions; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.util.logging.ClientLogger; import org.apache.qpid.proton.Proton; import org.apache.qpid.proton.amqp.messaging.AmqpValue; @@ -54,7 +54,7 @@ public Mono authorize(final String tokenAudience) { final ApplicationProperties applicationProperties = new ApplicationProperties(properties); request.setApplicationProperties(applicationProperties); - return credential.getToken(new TokenRequest().addScopes(tokenAudience)).flatMap(accessToken -> { + return credential.getToken(new TokenRequestContext().addScopes(tokenAudience)).flatMap(accessToken -> { request.setBody(new AmqpValue(accessToken.getToken())); return cbsChannelMono.flatMap(x -> x.sendWithAck(request)) diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/credential/BasicAuthenticationCredential.java b/sdk/core/azure-core/src/main/java/com/azure/core/credential/BasicAuthenticationCredential.java index db670d5b022c..91348a0615fa 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/credential/BasicAuthenticationCredential.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/credential/BasicAuthenticationCredential.java @@ -40,7 +40,7 @@ public BasicAuthenticationCredential(String username, String password) { * @throws RuntimeException If the UTF-8 encoding isn't supported. */ @Override - public Mono getToken(TokenRequest request) { + public Mono getToken(TokenRequestContext request) { String credential = username + ":" + password; String encodedCredential; try { diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenCredential.java b/sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenCredential.java index 9eb84d653221..79c29d6e0416 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenCredential.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenCredential.java @@ -15,5 +15,5 @@ public interface TokenCredential { * @param request the details of the token request * @return a Publisher that emits a single access token */ - Mono getToken(TokenRequest request); + Mono getToken(TokenRequestContext request); } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenRequest.java b/sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenRequestContext.java similarity index 75% rename from sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenRequest.java rename to sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenRequestContext.java index ec57a8c61541..622b0c1ae701 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenRequest.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenRequestContext.java @@ -9,15 +9,15 @@ import java.util.Objects; /** - * Contains details of a request to Azure Active Directory to get a token. + * Contains details of a request to get a token. */ -public class TokenRequest { +public class TokenRequestContext { private final List scopes; /** * Creates a token request instance. */ - public TokenRequest() { + public TokenRequestContext() { this.scopes = new ArrayList<>(); } @@ -32,9 +32,9 @@ public List getScopes() { /** * Sets the scopes required for the token. * @param scopes the scopes required for the token - * @return the TokenRequest itself + * @return the TokenRequestContext itself */ - public TokenRequest setScopes(List scopes) { + public TokenRequestContext setScopes(List scopes) { Objects.requireNonNull(scopes, "'scopes' cannot be null."); this.scopes.clear(); this.scopes.addAll(scopes); @@ -44,9 +44,9 @@ public TokenRequest setScopes(List scopes) { /** * Adds one or more scopes to the request scopes. * @param scopes one or more scopes to add - * @return the TokenRequest itself + * @return the TokenRequestContext itself */ - public TokenRequest addScopes(String... scopes) { + public TokenRequestContext addScopes(String... scopes) { this.scopes.addAll(Arrays.asList(scopes)); return this; } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/BearerTokenAuthenticationPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/BearerTokenAuthenticationPolicy.java index 8e5bccedfa32..c0b3bf1eda68 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/BearerTokenAuthenticationPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/BearerTokenAuthenticationPolicy.java @@ -5,7 +5,7 @@ import com.azure.core.credential.SimpleTokenCache; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.http.HttpPipelineCallContext; import com.azure.core.http.HttpPipelineNextPolicy; import com.azure.core.http.HttpResponse; @@ -37,7 +37,7 @@ public BearerTokenAuthenticationPolicy(TokenCredential credential, String... sco assert scopes.length > 0; this.credential = credential; this.scopes = scopes; - this.cache = new SimpleTokenCache(() -> credential.getToken(new TokenRequest().addScopes(scopes))); + this.cache = new SimpleTokenCache(() -> credential.getToken(new TokenRequestContext().addScopes(scopes))); } @Override diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/credential/CredentialsTests.java b/sdk/core/azure-core/src/test/java/com/azure/core/credential/CredentialsTests.java index 940d53112f52..27f489265eed 100644 --- a/sdk/core/azure-core/src/test/java/com/azure/core/credential/CredentialsTests.java +++ b/sdk/core/azure-core/src/test/java/com/azure/core/credential/CredentialsTests.java @@ -31,7 +31,7 @@ public void basicCredentialsTest() throws Exception { // final HttpPipeline pipeline = new HttpPipelineBuilder() .httpClient(new NoOpHttpClient()) - .policies((context, next) -> credentials.getToken(new TokenRequest().addScopes("scope./default")) + .policies((context, next) -> credentials.getToken(new TokenRequestContext().addScopes("scope./default")) .flatMap(token -> { context.getHttpRequest().getHeaders().put("Authorization", "Basic " + token.getToken()); return next.process(); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubSharedAccessKeyCredential.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubSharedAccessKeyCredential.java index 508f9b4f8fdc..47e1acd1cf45 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubSharedAccessKeyCredential.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubSharedAccessKeyCredential.java @@ -6,7 +6,7 @@ import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; import com.azure.core.annotation.Immutable; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.logging.ClientLogger; import reactor.core.publisher.Mono; @@ -99,7 +99,7 @@ public EventHubSharedAccessKeyCredential(String policyName, String sharedAccessK * audience. */ @Override - public Mono getToken(TokenRequest request) { + public Mono getToken(TokenRequestContext request) { if (request.getScopes().size() != 1) { throw logger.logExceptionAsError(new IllegalArgumentException( "'scopes' should only contain a single argument that is the token audience or resource name.")); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java index 1224b1275fc3..299679ab30ec 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java @@ -9,7 +9,7 @@ import com.azure.core.amqp.implementation.RequestResponseChannel; import com.azure.core.amqp.implementation.TokenManagerProvider; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.util.logging.ClientLogger; import com.azure.messaging.eventhubs.EventHubProperties; import com.azure.messaging.eventhubs.PartitionProperties; @@ -110,7 +110,7 @@ public Mono getPartitionProperties(String partitionId) { private Mono getProperties(Map properties, Class responseType) { final String tokenAudience = tokenManagerProvider.getResourceString(eventHubName); - return tokenProvider.getToken(new TokenRequest().addScopes(tokenAudience)).flatMap(accessToken -> { + return tokenProvider.getToken(new TokenRequestContext().addScopes(tokenAudience)).flatMap(accessToken -> { properties.put(MANAGEMENT_SECURITY_TOKEN_KEY, accessToken.getToken()); final Message request = Proton.message(); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubSharedAccessKeyCredentialTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubSharedAccessKeyCredentialTest.java index 5c345e3780d9..d152783d9643 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubSharedAccessKeyCredentialTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubSharedAccessKeyCredentialTest.java @@ -3,7 +3,7 @@ package com.azure.messaging.eventhubs; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import org.junit.Assert; import org.junit.Test; import reactor.test.StepVerifier; @@ -65,7 +65,7 @@ public void constructsToken() throws InvalidKeyException, NoSuchAlgorithmExcepti expected.put("skn", KEY_NAME); // Act & Assert - StepVerifier.create(credential.getToken(new TokenRequest().addScopes(resource))) + StepVerifier.create(credential.getToken(new TokenRequestContext().addScopes(resource))) .assertNext(accessToken -> { Assert.assertNotNull(accessToken); diff --git a/sdk/identity/azure-identity/README.md b/sdk/identity/azure-identity/README.md index d0911a5ecccf..d8addc35b04c 100644 --- a/sdk/identity/azure-identity/README.md +++ b/sdk/identity/azure-identity/README.md @@ -146,8 +146,8 @@ This example demonstrates authenticating the `SecretClient` from the [azure-secu ```java // The default credential first checks environment variables for configuration as described above. // If environment configuration is incomplete, it will try managed identity. -import com.azure.identity.credential.DefaultAzureCredential; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredential; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.SecretClient; DefaultAzureCredential defaultCredential = new DefaultAzureCredentialBuilder().build(); @@ -165,8 +165,8 @@ When executing this in a development machine you need to first [configure the en This example demonstrates authenticating the `KeyClient` from the [azure-security-keyvault-keys][keys_client_library] client library using the `ClientSecretCredential`. There's also [a compilable sample](../../keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java) to create a Key Vault secret client you can copy-paste. ```java // using a client secret -import com.azure.identity.credential.ClientSecretCredential; -import com.azure.identity.credential.ClientSecretCredentialBuilder; +import com.azure.identity.ClientSecretCredential; +import com.azure.identity.ClientSecretCredentialBuilder; import com.azure.security.keyvault.keys.KeyClient; // authenticate with client secret, @@ -187,13 +187,13 @@ This example demonstrates authenticating the `KeyClient` from the [azure-securit ```java // using a client secret -import com.azure.identity.credential.DeviceCodeCredential; -import com.azure.identity.credential.DeviceCodeCredentialBuilder; +import com.azure.identity.DeviceCodeCredential; +import com.azure.identity.DeviceCodeCredentialBuilder; import com.azure.security.keyvault.keys.KeyClient; // authenticate with client secret, DeviceCodeCredential deviceCodeCredential = new DeviceCodeCredentialBuilder() - .deviceCodeChallengeConsumer(challenge -> { + .challengeConsumer(challenge -> { // lets user know of the challenge, e.g., display the message on an IoT device displayMessage(challenge.message()); }) @@ -213,8 +213,8 @@ First, prompt the user to login at the URL documented at [Microsoft identity pla Then create an API at the redirect URL with the following code to access the Key Vault service. ```java -import com.azure.identity.credential.AuthorizationCodeCredential; -import com.azure.identity.credential.AuthorizationCodeCredentialBuilder; +import com.azure.identity.AuthorizationCodeCredential; +import com.azure.identity.AuthorizationCodeCredentialBuilder; import com.azure.security.keyvault.keys.KeyClient; AuthorizationCodeCredential authCodeCredential = new AuthorizationCodeCredentialBuilder() diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/AadCredentialBuilderBase.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AadCredentialBuilderBase.java similarity index 97% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/AadCredentialBuilderBase.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/AadCredentialBuilderBase.java index ca2ce15783db..5d003fce0442 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/AadCredentialBuilderBase.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AadCredentialBuilderBase.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; /** * The base class for credential builders that allow specifying a client id and tenant ID for an Azure Active Directory. diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/AppServiceMSICredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AppServiceMSICredential.java similarity index 78% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/AppServiceMSICredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/AppServiceMSICredential.java index 0566ca6bf150..cfbe7388610f 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/AppServiceMSICredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AppServiceMSICredential.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.credential.AccessToken; import com.azure.core.annotation.Immutable; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.util.Configuration; import com.azure.identity.implementation.IdentityClient; import reactor.core.publisher.Mono; @@ -33,19 +33,6 @@ class AppServiceMSICredential { this.clientId = clientId; } - /** - * @return the endpoint from which token needs to be retrieved. - */ - public String getMsiEndpoint() { - return this.msiEndpoint; - } - /** - * @return the secret to use to retrieve the token. - */ - public String getMsiSecret() { - return this.msiSecret; - } - /** * @return the client id of user assigned or system assigned identity. */ @@ -58,7 +45,7 @@ public String getClientId() { * @param request the details of the token request * @return a Publisher that emits an AccessToken */ - public Mono authenticate(TokenRequest request) { + public Mono authenticate(TokenRequestContext request) { return identityClient.authenticateToManagedIdentityEndpoint(msiEndpoint, msiSecret, request); } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/AuthorizationCodeCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredential.java similarity index 94% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/AuthorizationCodeCredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredential.java index 55e85df25ab7..65b1fcf7ec09 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/AuthorizationCodeCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredential.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.annotation.Immutable; import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.implementation.IdentityClientBuilder; import com.azure.identity.implementation.IdentityClientOptions; @@ -52,7 +52,7 @@ public class AuthorizationCodeCredential implements TokenCredential { } @Override - public Mono getToken(TokenRequest request) { + public Mono getToken(TokenRequestContext request) { return Mono.defer(() -> { if (cachedToken.get() != null) { return identityClient.authenticateWithUserRefreshToken(request, cachedToken.get()) diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/AuthorizationCodeCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java similarity index 98% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/AuthorizationCodeCredentialBuilder.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java index f4c36539665e..6bff7aa7b363 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/AuthorizationCodeCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.util.logging.ClientLogger; import com.azure.identity.implementation.util.ValidationUtil; diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ChainedTokenCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredential.java similarity index 93% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ChainedTokenCredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredential.java index 11c6b0b53e07..c3e7884975e2 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ChainedTokenCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredential.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.annotation.Immutable; import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.exception.ClientAuthenticationException; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -35,7 +35,7 @@ public class ChainedTokenCredential implements TokenCredential { } @Override - public Mono getToken(TokenRequest request) { + public Mono getToken(TokenRequestContext request) { AtomicReference cause = new AtomicReference<>(); return Flux.fromIterable(credentials) .flatMap(p -> p.getToken(request).onErrorResume(t -> { diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ChainedTokenCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredentialBuilder.java similarity index 97% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ChainedTokenCredentialBuilder.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredentialBuilder.java index a4315eced86c..261a8aeb0d97 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ChainedTokenCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredentialBuilder.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.credential.TokenCredential; diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ClientCertificateCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredential.java similarity index 94% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ClientCertificateCredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredential.java index 3849a77ae369..0a916ea46859 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ClientCertificateCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredential.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.annotation.Immutable; import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.implementation.IdentityClientBuilder; import com.azure.identity.implementation.IdentityClientOptions; @@ -51,7 +51,7 @@ public class ClientCertificateCredential implements TokenCredential { } @Override - public Mono getToken(TokenRequest request) { + public Mono getToken(TokenRequestContext request) { if (clientCertificatePassword != null) { return identityClient.authenticateWithPfxCertificate(clientCertificate, clientCertificatePassword, request); } else { diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ClientCertificateCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java similarity index 98% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ClientCertificateCredentialBuilder.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java index aed6ad1a6285..920fdb5af7c5 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ClientCertificateCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.identity.implementation.util.ValidationUtil; diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ClientSecretCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredential.java similarity index 93% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ClientSecretCredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredential.java index 31c7044da6f3..28efcb6a0749 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ClientSecretCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredential.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.annotation.Immutable; import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.implementation.IdentityClientBuilder; import com.azure.identity.implementation.IdentityClientOptions; @@ -50,7 +50,7 @@ public class ClientSecretCredential implements TokenCredential { } @Override - public Mono getToken(TokenRequest request) { + public Mono getToken(TokenRequestContext request) { return identityClient.authenticateWithClientSecret(clientSecret, request); } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ClientSecretCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java similarity index 97% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ClientSecretCredentialBuilder.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java index 5a63ce35c3cb..6475ffcb5552 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ClientSecretCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.identity.implementation.util.ValidationUtil; diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/CredentialBuilderBase.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/CredentialBuilderBase.java similarity index 97% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/CredentialBuilderBase.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/CredentialBuilderBase.java index a6a2f9353d17..1438a461e779 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/CredentialBuilderBase.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/CredentialBuilderBase.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.http.ProxyOptions; import com.azure.identity.implementation.IdentityClientOptions; diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/DefaultAzureCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java similarity index 96% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/DefaultAzureCredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java index 3b25a6c3b09b..4a80331a7654 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/DefaultAzureCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.annotation.Immutable; import com.azure.identity.implementation.IdentityClientOptions; diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/DefaultAzureCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java similarity index 93% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/DefaultAzureCredentialBuilder.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java index b06c00289ca0..91f3f90597b8 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/DefaultAzureCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; /** * Fluent credential builder for instantiating a {@link DefaultAzureCredential}. diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/DeviceCodeCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredential.java similarity index 79% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/DeviceCodeCredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredential.java index c28f350bf1ec..638a8ce9bed9 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/DeviceCodeCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredential.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.annotation.Immutable; import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; -import com.azure.identity.DeviceCodeChallenge; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.implementation.IdentityClientBuilder; import com.azure.identity.implementation.IdentityClientOptions; @@ -22,7 +21,7 @@ */ @Immutable public class DeviceCodeCredential implements TokenCredential { - private final Consumer deviceCodeChallengeConsumer; + private final Consumer challengeConsumer; private final IdentityClient identityClient; private final AtomicReference cachedToken; @@ -31,12 +30,12 @@ public class DeviceCodeCredential implements TokenCredential { * * @param clientId the client ID of the application * @param tenantId the tenant ID of the application - * @param deviceCodeChallengeConsumer a method allowing the user to meet the device code challenge + * @param challengeConsumer a method allowing the user to meet the device code challenge * @param identityClientOptions the options for configuring the identity client */ - DeviceCodeCredential(String clientId, String tenantId, Consumer deviceCodeChallengeConsumer, + DeviceCodeCredential(String clientId, String tenantId, Consumer challengeConsumer, IdentityClientOptions identityClientOptions) { - this.deviceCodeChallengeConsumer = deviceCodeChallengeConsumer; + this.challengeConsumer = challengeConsumer; if (tenantId == null) { tenantId = "common"; } @@ -49,7 +48,7 @@ public class DeviceCodeCredential implements TokenCredential { } @Override - public Mono getToken(TokenRequest request) { + public Mono getToken(TokenRequestContext request) { return Mono.defer(() -> { if (cachedToken.get() != null) { return identityClient.authenticateWithUserRefreshToken(request, cachedToken.get()) @@ -58,7 +57,7 @@ public Mono getToken(TokenRequest request) { return Mono.empty(); } }).switchIfEmpty( - Mono.defer(() -> identityClient.authenticateWithDeviceCode(request, deviceCodeChallengeConsumer))) + Mono.defer(() -> identityClient.authenticateWithDeviceCode(request, challengeConsumer))) .map(msalToken -> { cachedToken.set(msalToken); return msalToken; diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/DeviceCodeCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java similarity index 60% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/DeviceCodeCredentialBuilder.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java index d4676aaa2970..1fd197572a4c 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/DeviceCodeCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; -import com.azure.identity.DeviceCodeChallenge; import com.azure.identity.implementation.util.ValidationUtil; import java.util.HashMap; @@ -15,18 +14,18 @@ * @see DeviceCodeCredential */ public class DeviceCodeCredentialBuilder extends AadCredentialBuilderBase { - private Consumer deviceCodeChallengeConsumer; + private Consumer challengeConsumer; /** * Sets the port for the local HTTP server, for which {@code http://localhost:{port}} must be * registered as a valid reply URL on the application. * - * @param deviceCodeChallengeConsumer a method allowing the user to meet the device code challenge + * @param challengeConsumer a method allowing the user to meet the device code challenge * @return the InteractiveBrowserCredentialBuilder itself */ - public DeviceCodeCredentialBuilder deviceCodeChallengeConsumer( - Consumer deviceCodeChallengeConsumer) { - this.deviceCodeChallengeConsumer = deviceCodeChallengeConsumer; + public DeviceCodeCredentialBuilder challengeConsumer( + Consumer challengeConsumer) { + this.challengeConsumer = challengeConsumer; return this; } @@ -36,8 +35,8 @@ public DeviceCodeCredentialBuilder deviceCodeChallengeConsumer( public DeviceCodeCredential build() { ValidationUtil.validate(getClass().getSimpleName(), new HashMap() {{ put("clientId", clientId); - put("deviceCodeChallengeConsumer", deviceCodeChallengeConsumer); + put("challengeConsumer", challengeConsumer); }}); - return new DeviceCodeCredential(clientId, tenantId, deviceCodeChallengeConsumer, identityClientOptions); + return new DeviceCodeCredential(clientId, tenantId, challengeConsumer, identityClientOptions); } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeChallenge.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeInfo.java similarity index 77% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeChallenge.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeInfo.java index 5e6a528c67db..b56c64adae50 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeChallenge.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeInfo.java @@ -5,29 +5,29 @@ import com.azure.core.annotation.Immutable; -import java.time.Duration; +import java.time.OffsetDateTime; /** * Response returned from the STS device code endpoint containing information necessary for * device code flow. */ @Immutable -public class DeviceCodeChallenge { +public class DeviceCodeInfo { /** - * Creates an instance of a device code challenge. + * Creates an instance of a device code info. * * @param userCode code which user needs to provide when authenticating at the verification URL * @param deviceCode code which should be included in the request for the access token * @param verificationUrl URL where user can authenticate - * @param expiresIn expiration time of device code in seconds + * @param expiresOn expiration time of device code in seconds * @param message message which should be displayed to the user */ - public DeviceCodeChallenge(String userCode, String deviceCode, String verificationUrl, Duration expiresIn, - String message) { + public DeviceCodeInfo(String userCode, String deviceCode, String verificationUrl, OffsetDateTime expiresOn, + String message) { this.userCode = userCode; this.deviceCode = deviceCode; this.verificationUrl = verificationUrl; - this.expiresIn = expiresIn; + this.expiresOn = expiresOn; this.message = message; } @@ -37,7 +37,7 @@ public DeviceCodeChallenge(String userCode, String deviceCode, String verificati private final String verificationUrl; - private final Duration expiresIn; + private final OffsetDateTime expiresOn; private final String message; @@ -66,8 +66,8 @@ public String getVerificationUrl() { /** * @return expiration time of device code. */ - public Duration getExpiresIn() { - return expiresIn; + public OffsetDateTime getExpiresOn() { + return expiresOn; } /** diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/EnvironmentCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/EnvironmentCredential.java similarity index 93% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/EnvironmentCredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/EnvironmentCredential.java index f38e81ec045e..21c155abcd35 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/EnvironmentCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/EnvironmentCredential.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.annotation.Immutable; import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.exception.ClientAuthenticationException; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -33,7 +33,7 @@ public class EnvironmentCredential implements TokenCredential { } @Override - public Mono getToken(TokenRequest request) { + public Mono getToken(TokenRequestContext request) { return Mono.fromSupplier(() -> { if (configuration.contains(Configuration.PROPERTY_AZURE_CLIENT_ID) && configuration.contains(Configuration.PROPERTY_AZURE_CLIENT_SECRET) diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/EnvironmentCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/EnvironmentCredentialBuilder.java similarity index 95% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/EnvironmentCredentialBuilder.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/EnvironmentCredentialBuilder.java index 7207ae771151..52df6b0b2c9e 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/EnvironmentCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/EnvironmentCredentialBuilder.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; /** * Fluent credential builder for instantiating a {@link EnvironmentCredential}. diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/InteractiveBrowserCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredential.java similarity index 94% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/InteractiveBrowserCredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredential.java index 3620922a9860..a0bce6a715e7 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/InteractiveBrowserCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredential.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.annotation.Immutable; import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.implementation.IdentityClientBuilder; import com.azure.identity.implementation.IdentityClientOptions; @@ -54,7 +54,7 @@ public class InteractiveBrowserCredential implements TokenCredential { } @Override - public Mono getToken(TokenRequest request) { + public Mono getToken(TokenRequestContext request) { return Mono.defer(() -> { if (cachedToken.get() != null) { return identityClient.authenticateWithUserRefreshToken(request, cachedToken.get()) diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/InteractiveBrowserCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java similarity index 97% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/InteractiveBrowserCredentialBuilder.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java index b25e30a90e0a..19e054181fc0 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/InteractiveBrowserCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.identity.implementation.util.ValidationUtil; diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ManagedIdentityCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredential.java similarity index 79% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ManagedIdentityCredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredential.java index 8b75578a7a66..aa28841227e2 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ManagedIdentityCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredential.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.annotation.Immutable; import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.util.Configuration; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.implementation.IdentityClientBuilder; @@ -50,21 +50,8 @@ public String getClientId() { : this.virtualMachineMSICredential.getClientId(); } - /** - * @return the endpoint from which token needs to be retrieved. - */ - public String getMsiEndpoint() { - return this.appServiceMSICredential == null ? null : this.appServiceMSICredential.getMsiEndpoint(); - } - /** - * @return the secret to use to retrieve the token. - */ - public String getMsiSecret() { - return this.appServiceMSICredential == null ? null : this.appServiceMSICredential.getMsiSecret(); - } - @Override - public Mono getToken(TokenRequest request) { + public Mono getToken(TokenRequestContext request) { return (appServiceMSICredential != null ? appServiceMSICredential.authenticate(request) : virtualMachineMSICredential.authenticate(request)); diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ManagedIdentityCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredentialBuilder.java similarity index 95% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ManagedIdentityCredentialBuilder.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredentialBuilder.java index 165588d2bc95..6102cdeff4e4 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ManagedIdentityCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredentialBuilder.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; /** * Fluent credential builder for instantiating a {@link ManagedIdentityCredential}. diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/SharedTokenCacheCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredential.java similarity index 96% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/SharedTokenCacheCredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredential.java index ac9267d40250..c0795d7526a6 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/SharedTokenCacheCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredential.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.util.Configuration; import com.azure.identity.implementation.IdentityClientOptions; import com.azure.identity.implementation.msalextensions.PersistentTokenCacheAccessAspect; @@ -57,7 +57,7 @@ public class SharedTokenCacheCredential implements TokenCredential { * Gets token from shared token cache * */ @Override - public Mono getToken(TokenRequest request) { + public Mono getToken(TokenRequestContext request) { // Initialize here so that the constructor doesn't throw if (pubClient == null) { try { diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/SharedTokenCacheCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredentialBuilder.java similarity index 96% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/SharedTokenCacheCredentialBuilder.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredentialBuilder.java index f99a1075e71d..42ea2a2faefc 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/SharedTokenCacheCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredentialBuilder.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; /** * Fluent credential builder for instantiating a {@link SharedTokenCacheCredential}. diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/UsernamePasswordCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredential.java similarity index 95% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/UsernamePasswordCredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredential.java index d8cf4f2b6271..5c2f5d4e14cb 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/UsernamePasswordCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredential.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.annotation.Immutable; import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.implementation.IdentityClientBuilder; import com.azure.identity.implementation.IdentityClientOptions; @@ -56,7 +56,7 @@ public class UsernamePasswordCredential implements TokenCredential { } @Override - public Mono getToken(TokenRequest request) { + public Mono getToken(TokenRequestContext request) { return Mono.defer(() -> { if (cachedToken.get() != null) { return identityClient.authenticateWithUserRefreshToken(request, cachedToken.get()) diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/UsernamePasswordCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredentialBuilder.java similarity index 97% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/UsernamePasswordCredentialBuilder.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredentialBuilder.java index 58680eb5511d..908fa58a0327 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/UsernamePasswordCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredentialBuilder.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.identity.implementation.util.ValidationUtil; diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/VirtualMachineMSICredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/VirtualMachineMSICredential.java similarity index 89% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/VirtualMachineMSICredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/VirtualMachineMSICredential.java index 3d3dfcef8c61..7a5d6082887f 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/VirtualMachineMSICredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/VirtualMachineMSICredential.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.credential.AccessToken; import com.azure.core.annotation.Immutable; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.implementation.IdentityClient; import reactor.core.publisher.Mono; @@ -40,7 +40,7 @@ public String getClientId() { * @param request the details of the token request * @return a Publisher that emits an AccessToken */ - public Mono authenticate(TokenRequest request) { + public Mono authenticate(TokenRequestContext request) { return identityClient.authenticateToIMDSEndpoint(request); } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java index 17d0aa2e2c95..a59879793141 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java @@ -4,14 +4,14 @@ package com.azure.identity.implementation; import com.azure.core.credential.AccessToken; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.http.ProxyOptions; import com.azure.core.implementation.serializer.SerializerAdapter; import com.azure.core.implementation.serializer.SerializerEncoding; import com.azure.core.implementation.serializer.jackson.JacksonAdapter; import com.azure.core.implementation.util.ScopeUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.identity.DeviceCodeChallenge; +import com.azure.identity.DeviceCodeInfo; import com.azure.identity.implementation.util.CertificateUtil; import com.microsoft.aad.msal4j.AuthorizationCodeParameters; import com.microsoft.aad.msal4j.ClientCredentialFactory; @@ -107,7 +107,7 @@ public class IdentityClient { * @param request the details of the token request * @return a Publisher that emits an AccessToken */ - public Mono authenticateWithClientSecret(String clientSecret, TokenRequest request) { + public Mono authenticateWithClientSecret(String clientSecret, TokenRequestContext request) { String authorityUrl = options.getAuthorityHost().replaceAll("/+$", "") + "/" + tenantId; try { ConfidentialClientApplication.Builder applicationBuilder = @@ -136,7 +136,7 @@ public Mono authenticateWithClientSecret(String clientSecret, Token * @return a Publisher that emits an AccessToken */ public Mono authenticateWithPfxCertificate(String pfxCertificatePath, String pfxCertificatePassword, - TokenRequest request) { + TokenRequestContext request) { String authorityUrl = options.getAuthorityHost().replaceAll("/+$", "") + "/" + tenantId; try { ConfidentialClientApplication.Builder applicationBuilder = @@ -169,7 +169,7 @@ public Mono authenticateWithPfxCertificate(String pfxCertificatePat * @param request the details of the token request * @return a Publisher that emits an AccessToken */ - public Mono authenticateWithPemCertificate(String pemCertificatePath, TokenRequest request) { + public Mono authenticateWithPemCertificate(String pemCertificatePath, TokenRequestContext request) { String authorityUrl = options.getAuthorityHost().replaceAll("/+$", "") + "/" + tenantId; try { byte[] pemCertificateBytes = Files.readAllBytes(Paths.get(pemCertificatePath)); @@ -199,7 +199,8 @@ public Mono authenticateWithPemCertificate(String pemCertificatePat * @param password the password of the user * @return a Publisher that emits an AccessToken */ - public Mono authenticateWithUsernamePassword(TokenRequest request, String username, String password) { + public Mono authenticateWithUsernamePassword(TokenRequestContext request, + String username, String password) { return Mono.fromFuture(publicClientApplication.acquireToken( UserNamePasswordParameters.builder(new HashSet<>(request.getScopes()), username, password.toCharArray()) .build())) @@ -212,7 +213,7 @@ public Mono authenticateWithUsernamePassword(TokenRequest request, St * @param request the details of the token request * @return a Publisher that emits an AccessToken */ - public Mono authenticateWithUserRefreshToken(TokenRequest request, MsalToken msalToken) { + public Mono authenticateWithUserRefreshToken(TokenRequestContext request, MsalToken msalToken) { SilentParameters parameters; if (msalToken.getAccount() != null) { parameters = SilentParameters.builder(new HashSet<>(request.getScopes()), msalToken.getAccount()).build(); @@ -238,12 +239,12 @@ public Mono authenticateWithUserRefreshToken(TokenRequest request, Ms * @return a Publisher that emits an AccessToken when the device challenge is met, or an exception if the device * code expires */ - public Mono authenticateWithDeviceCode(TokenRequest request, - Consumer deviceCodeConsumer) { + public Mono authenticateWithDeviceCode(TokenRequestContext request, + Consumer deviceCodeConsumer) { return Mono.fromFuture(() -> { DeviceCodeFlowParameters parameters = DeviceCodeFlowParameters.builder(new HashSet<>(request.getScopes()), - dc -> deviceCodeConsumer.accept(new DeviceCodeChallenge(dc.userCode(), dc.deviceCode(), - dc.verificationUri(), Duration.ofSeconds(dc.expiresIn()), dc.message()))).build(); + dc -> deviceCodeConsumer.accept(new DeviceCodeInfo(dc.userCode(), dc.deviceCode(), + dc.verificationUri(), OffsetDateTime.now().plusSeconds(dc.expiresIn()), dc.message()))).build(); return publicClientApplication.acquireToken(parameters); }).map(MsalToken::new); } @@ -256,7 +257,7 @@ public Mono authenticateWithDeviceCode(TokenRequest request, * @param redirectUrl the redirectUrl where the authorization code is sent to * @return a Publisher that emits an AccessToken */ - public Mono authenticateWithAuthorizationCode(TokenRequest request, String authorizationCode, + public Mono authenticateWithAuthorizationCode(TokenRequestContext request, String authorizationCode, URI redirectUrl) { return Mono.fromFuture(() -> publicClientApplication.acquireToken( AuthorizationCodeParameters.builder(authorizationCode, redirectUrl) @@ -274,7 +275,7 @@ public Mono authenticateWithAuthorizationCode(TokenRequest request, S * @param port the port on which the HTTP server is listening * @return a Publisher that emits an AccessToken */ - public Mono authenticateWithBrowserInteraction(TokenRequest request, int port) { + public Mono authenticateWithBrowserInteraction(TokenRequestContext request, int port) { String authorityUrl = options.getAuthorityHost().replaceAll("/+$", "") + "/" + tenantId; return AuthorizationCodeListener.create(port) .flatMap(server -> { @@ -315,7 +316,7 @@ public Mono authenticateWithBrowserInteraction(TokenRequest request, * @return a Publisher that emits an AccessToken */ public Mono authenticateToManagedIdentityEndpoint(String msiEndpoint, String msiSecret, - TokenRequest request) { + TokenRequestContext request) { String resource = ScopeUtil.scopesToResource(request.getScopes()); HttpURLConnection connection = null; StringBuilder payload = new StringBuilder(); @@ -363,7 +364,7 @@ public Mono authenticateToManagedIdentityEndpoint(String msiEndpoin * @param request the details of the token request * @return a Publisher that emits an AccessToken */ - public Mono authenticateToIMDSEndpoint(TokenRequest request) { + public Mono authenticateToIMDSEndpoint(TokenRequestContext request) { String resource = ScopeUtil.scopesToResource(request.getScopes()); StringBuilder payload = new StringBuilder(); final int imdsUpgradeTimeInMs = 70 * 1000; diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/package-info.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/package-info.java index c2eb4440ede1..092b702f0fcf 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/package-info.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/package-info.java @@ -2,6 +2,7 @@ // Licensed under the MIT License. /** - * Package containing classes for retrieving access tokens from various configurations + * Package containing various types of credentials and classes + * for retrieving access tokens from various configurations. */ package com.azure.identity; diff --git a/sdk/identity/azure-identity/src/main/java/module-info.java b/sdk/identity/azure-identity/src/main/java/module-info.java index 80344f03a365..7ad34c6e4e29 100644 --- a/sdk/identity/azure-identity/src/main/java/module-info.java +++ b/sdk/identity/azure-identity/src/main/java/module-info.java @@ -14,5 +14,4 @@ requires org.reactivestreams; exports com.azure.identity; - exports com.azure.identity.credential; } diff --git a/sdk/identity/azure-identity/src/samples/java/com/azure/identity/credential/JavaDocCodeSnippets.java b/sdk/identity/azure-identity/src/samples/java/com/azure/identity/credential/JavaDocCodeSnippets.java index 0089b9330f70..41bbb552e751 100644 --- a/sdk/identity/azure-identity/src/samples/java/com/azure/identity/credential/JavaDocCodeSnippets.java +++ b/sdk/identity/azure-identity/src/samples/java/com/azure/identity/credential/JavaDocCodeSnippets.java @@ -5,6 +5,16 @@ import com.azure.core.http.ProxyOptions; import com.azure.core.http.ProxyOptions.Type; +import com.azure.identity.ChainedTokenCredential; +import com.azure.identity.ChainedTokenCredentialBuilder; +import com.azure.identity.ClientCertificateCredential; +import com.azure.identity.ClientCertificateCredentialBuilder; +import com.azure.identity.ClientSecretCredential; +import com.azure.identity.ClientSecretCredentialBuilder; +import com.azure.identity.InteractiveBrowserCredential; +import com.azure.identity.InteractiveBrowserCredentialBuilder; +import com.azure.identity.UsernamePasswordCredential; +import com.azure.identity.UsernamePasswordCredentialBuilder; import java.net.InetSocketAddress; diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/AuthorizationCodeCredentialTest.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/AuthorizationCodeCredentialTest.java similarity index 89% rename from sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/AuthorizationCodeCredentialTest.java rename to sdk/identity/azure-identity/src/test/java/com/azure/identity/AuthorizationCodeCredentialTest.java index c46462843417..0b9305627739 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/AuthorizationCodeCredentialTest.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/AuthorizationCodeCredentialTest.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.util.TestUtils; import org.junit.Test; @@ -37,8 +37,8 @@ public void testValidAuthorizationCode() throws Exception { // setup String token1 = "token1"; String token2 = "token2"; - TokenRequest request1 = new TokenRequest().addScopes("https://management.azure.com"); - TokenRequest request2 = new TokenRequest().addScopes("https://vault.azure.net"); + TokenRequestContext request1 = new TokenRequestContext().addScopes("https://management.azure.com"); + TokenRequestContext request2 = new TokenRequestContext().addScopes("https://vault.azure.net"); String authCode1 = "authCode1"; URI redirectUri = new URI("http://foo.com/bar"); OffsetDateTime expiresAt = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); @@ -49,7 +49,7 @@ public void testValidAuthorizationCode() throws Exception { .thenReturn(TestUtils.getMockMsalToken(token1, expiresAt)); when(identityClient.authenticateWithUserRefreshToken(any(), any())) .thenAnswer(invocation -> { - TokenRequest argument = (TokenRequest) invocation.getArguments()[0]; + TokenRequestContext argument = (TokenRequestContext) invocation.getArguments()[0]; if (argument.getScopes().size() == 1 && argument.getScopes().get(0).equals(request2.getScopes().get(0))) { return TestUtils.getMockMsalToken(token2, expiresAt); } else if (argument.getScopes().size() == 1 && argument.getScopes().get(0).equals(request1.getScopes().get(0))) { diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/ClientCertificateCredentialTest.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/ClientCertificateCredentialTest.java similarity index 90% rename from sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/ClientCertificateCredentialTest.java rename to sdk/identity/azure-identity/src/test/java/com/azure/identity/ClientCertificateCredentialTest.java index e5d6f2c9273e..9ab7dcfe867d 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/ClientCertificateCredentialTest.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/ClientCertificateCredentialTest.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.util.TestUtils; import com.microsoft.aad.msal4j.MsalServiceException; @@ -40,8 +40,8 @@ public void testValidCertificates() throws Exception { String pfxPassword = "password"; String token1 = "token1"; String token2 = "token2"; - TokenRequest request1 = new TokenRequest().addScopes("https://management.azure.com"); - TokenRequest request2 = new TokenRequest().addScopes("https://vault.azure.net"); + TokenRequestContext request1 = new TokenRequestContext().addScopes("https://management.azure.com"); + TokenRequestContext request2 = new TokenRequestContext().addScopes("https://vault.azure.net"); OffsetDateTime expiresAt = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock @@ -71,8 +71,8 @@ public void testInvalidCertificates() throws Exception { String pemPath = "C:\\fakepath\\cert1.pem"; String pfxPath = "C:\\fakepath\\cert2.pfx"; String pfxPassword = "password"; - TokenRequest request1 = new TokenRequest().addScopes("https://management.azure.com"); - TokenRequest request2 = new TokenRequest().addScopes("https://vault.azure.net"); + TokenRequestContext request1 = new TokenRequestContext().addScopes("https://management.azure.com"); + TokenRequestContext request2 = new TokenRequestContext().addScopes("https://vault.azure.net"); OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock @@ -100,7 +100,7 @@ public void testInvalidParameters() throws Exception { // setup String pemPath = "C:\\fakepath\\cert1.pem"; String token1 = "token1"; - TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com"); OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/ClientSecretCredentialTest.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/ClientSecretCredentialTest.java similarity index 91% rename from sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/ClientSecretCredentialTest.java rename to sdk/identity/azure-identity/src/test/java/com/azure/identity/ClientSecretCredentialTest.java index 1b51c0c44965..b43feadb7027 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/ClientSecretCredentialTest.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/ClientSecretCredentialTest.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.util.TestUtils; import com.microsoft.aad.msal4j.MsalServiceException; @@ -38,8 +38,8 @@ public void testValidSecrets() throws Exception { String secret = "secret"; String token1 = "token1"; String token2 = "token2"; - TokenRequest request1 = new TokenRequest().addScopes("https://management.azure.com"); - TokenRequest request2 = new TokenRequest().addScopes("https://vault.azure.net"); + TokenRequestContext request1 = new TokenRequestContext().addScopes("https://management.azure.com"); + TokenRequestContext request2 = new TokenRequestContext().addScopes("https://vault.azure.net"); OffsetDateTime expiresAt = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock @@ -67,7 +67,7 @@ public void testInvalidSecrets() throws Exception { String secret = "secret"; String badSecret = "badsecret"; String token1 = "token1"; - TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com"); OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock @@ -95,7 +95,7 @@ public void testInvalidParameters() throws Exception { // setup String secret = "secret"; String token1 = "token1"; - TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com"); OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/DefaultAzureCredentialTest.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/DefaultAzureCredentialTest.java similarity index 92% rename from sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/DefaultAzureCredentialTest.java rename to sdk/identity/azure-identity/src/test/java/com/azure/identity/DefaultAzureCredentialTest.java index 35b0556f0997..1dc648b6db2f 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/DefaultAzureCredentialTest.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/DefaultAzureCredentialTest.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.exception.ClientAuthenticationException; import com.azure.core.util.Configuration; import com.azure.identity.implementation.IdentityClient; @@ -39,7 +39,7 @@ public void testUseEnvironmentCredential() throws Exception { // setup String secret = "secret"; String token1 = "token1"; - TokenRequest request1 = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request1 = new TokenRequestContext().addScopes("https://management.azure.com"); OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); configuration.put("AZURE_CLIENT_ID", clientId); configuration.put("AZURE_CLIENT_SECRET", secret); @@ -68,7 +68,7 @@ public void testUseEnvironmentCredential() throws Exception { public void testUseManagedIdentityCredential() throws Exception { // setup String token1 = "token1"; - TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com"); OffsetDateTime expiresAt = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock @@ -87,7 +87,7 @@ public void testUseManagedIdentityCredential() throws Exception { @Test public void testNoCredentialWorks() throws Exception { // setup - TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com"); // mock IdentityClient identityClient = PowerMockito.mock(IdentityClient.class); diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/DeviceCodeCredentialTest.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/DeviceCodeCredentialTest.java similarity index 83% rename from sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/DeviceCodeCredentialTest.java rename to sdk/identity/azure-identity/src/test/java/com/azure/identity/DeviceCodeCredentialTest.java index 1acf4df9f8cc..126e3f5f1e66 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/DeviceCodeCredentialTest.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/DeviceCodeCredentialTest.java @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; -import com.azure.core.credential.TokenRequest; -import com.azure.identity.DeviceCodeChallenge; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.util.TestUtils; import org.junit.Test; @@ -37,11 +36,11 @@ public class DeviceCodeCredentialTest { @Test public void testValidDeviceCode() throws Exception { // setup - Consumer consumer = deviceCodeChallenge -> { /* do nothing */ }; + Consumer consumer = deviceCodeInfo -> { /* do nothing */ }; String token1 = "token1"; String token2 = "token2"; - TokenRequest request1 = new TokenRequest().addScopes("https://management.azure.com"); - TokenRequest request2 = new TokenRequest().addScopes("https://vault.azure.net"); + TokenRequestContext request1 = new TokenRequestContext().addScopes("https://management.azure.com"); + TokenRequestContext request2 = new TokenRequestContext().addScopes("https://vault.azure.net"); OffsetDateTime expiresAt = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock @@ -49,7 +48,7 @@ public void testValidDeviceCode() throws Exception { when(identityClient.authenticateWithDeviceCode(eq(request1), eq(consumer))).thenReturn(TestUtils.getMockMsalToken(token1, expiresAt)); when(identityClient.authenticateWithUserRefreshToken(any(), any())) .thenAnswer(invocation -> { - TokenRequest argument = (TokenRequest) invocation.getArguments()[0]; + TokenRequestContext argument = (TokenRequestContext) invocation.getArguments()[0]; if (argument.getScopes().size() == 1 && argument.getScopes().get(0).equals(request2.getScopes().get(0))) { return TestUtils.getMockMsalToken(token2, expiresAt); } else if (argument.getScopes().size() == 1 && argument.getScopes().get(0).equals(request1.getScopes().get(0))) { @@ -62,7 +61,7 @@ public void testValidDeviceCode() throws Exception { // test DeviceCodeCredential credential = - new DeviceCodeCredentialBuilder().deviceCodeChallengeConsumer(consumer).clientId(clientId).build(); + new DeviceCodeCredentialBuilder().challengeConsumer(consumer).clientId(clientId).build(); StepVerifier.create(credential.getToken(request1)) .expectNextMatches(accessToken -> token1.equals(accessToken.getToken()) && expiresAt.getSecond() == accessToken.getExpiresAt().getSecond()) diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/EnvironmentCredentialTests.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/EnvironmentCredentialTests.java similarity index 92% rename from sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/EnvironmentCredentialTests.java rename to sdk/identity/azure-identity/src/test/java/com/azure/identity/EnvironmentCredentialTests.java index 4cb1cfacfe68..7c3e54c1a7ea 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/EnvironmentCredentialTests.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/EnvironmentCredentialTests.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; import com.azure.core.credential.AccessToken; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.util.Configuration; import org.junit.Assert; import org.junit.Test; @@ -26,7 +26,7 @@ public void testCreateEnvironmentCredential() { EnvironmentCredential credential = new EnvironmentCredentialBuilder().build(); // authentication will fail client-id=foo, but should be able to create ClientSecretCredential - StepVerifier.create(credential.getToken(new TokenRequest().addScopes("qux/.default")) + StepVerifier.create(credential.getToken(new TokenRequestContext().addScopes("qux/.default")) .doOnSuccess(s -> fail()) .onErrorResume(t -> { String message = t.getMessage(); diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/InteractiveBrowserCredentialTest.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/InteractiveBrowserCredentialTest.java similarity index 89% rename from sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/InteractiveBrowserCredentialTest.java rename to sdk/identity/azure-identity/src/test/java/com/azure/identity/InteractiveBrowserCredentialTest.java index a1b4796409ec..5f89055c0861 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/InteractiveBrowserCredentialTest.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/InteractiveBrowserCredentialTest.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.util.TestUtils; import org.junit.Test; @@ -40,8 +40,8 @@ public void testValidInteractive() throws Exception { // setup String token1 = "token1"; String token2 = "token2"; - TokenRequest request1 = new TokenRequest().addScopes("https://management.azure.com"); - TokenRequest request2 = new TokenRequest().addScopes("https://vault.azure.net"); + TokenRequestContext request1 = new TokenRequestContext().addScopes("https://management.azure.com"); + TokenRequestContext request2 = new TokenRequestContext().addScopes("https://vault.azure.net"); OffsetDateTime expiresAt = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); int port = random.nextInt(10000) + 10000; @@ -50,7 +50,7 @@ public void testValidInteractive() throws Exception { when(identityClient.authenticateWithBrowserInteraction(eq(request1), eq(port))).thenReturn(TestUtils.getMockMsalToken(token1, expiresAt)); when(identityClient.authenticateWithUserRefreshToken(any(), any())) .thenAnswer(invocation -> { - TokenRequest argument = (TokenRequest) invocation.getArguments()[0]; + TokenRequestContext argument = (TokenRequestContext) invocation.getArguments()[0]; if (argument.getScopes().size() == 1 && argument.getScopes().get(0).equals(request2.getScopes().get(0))) { return TestUtils.getMockMsalToken(token2, expiresAt); } else if (argument.getScopes().size() == 1 && argument.getScopes().get(0).equals(request1.getScopes().get(0))) { diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/ManagedIdentityCredentialTest.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/ManagedIdentityCredentialTest.java similarity index 77% rename from sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/ManagedIdentityCredentialTest.java rename to sdk/identity/azure-identity/src/test/java/com/azure/identity/ManagedIdentityCredentialTest.java index 7dd28e991c0b..54c9c8b9c37b 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/ManagedIdentityCredentialTest.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/ManagedIdentityCredentialTest.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.util.Configuration; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.util.TestUtils; @@ -30,23 +30,6 @@ public class ManagedIdentityCredentialTest { private final String tenantId = "contoso.com"; private final String clientId = UUID.randomUUID().toString(); - @Test - public void testAppServiceMSICredentialConfigurations() { - Configuration configuration = Configuration.getGlobalConfiguration(); - - try { - configuration - .put(Configuration.PROPERTY_MSI_ENDPOINT, "http://foo") - .put(Configuration.PROPERTY_MSI_SECRET, "bar"); - ManagedIdentityCredential credential = new ManagedIdentityCredentialBuilder().build(); - Assert.assertEquals("http://foo", credential.getMsiEndpoint()); - Assert.assertEquals("bar", credential.getMsiSecret()); - } finally { - configuration.remove(Configuration.PROPERTY_MSI_ENDPOINT); - configuration.remove(Configuration.PROPERTY_MSI_SECRET); - } - } - @Test public void testVirtualMachineMSICredentialConfigurations() { ManagedIdentityCredential credential = new ManagedIdentityCredentialBuilder().clientId("foo").build(); @@ -62,7 +45,7 @@ public void testMSIEndpoint() throws Exception { String endpoint = "http://localhost"; String secret = "secret"; String token1 = "token1"; - TokenRequest request1 = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request1 = new TokenRequestContext().addScopes("https://management.azure.com"); OffsetDateTime expiresAt = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); configuration.put("MSI_ENDPOINT", endpoint); configuration.put("MSI_SECRET", secret); @@ -89,7 +72,7 @@ public void testMSIEndpoint() throws Exception { public void testIMDS() throws Exception { // setup String token1 = "token1"; - TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com"); OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/UsernamePasswordCredentialTest.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/UsernamePasswordCredentialTest.java similarity index 91% rename from sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/UsernamePasswordCredentialTest.java rename to sdk/identity/azure-identity/src/test/java/com/azure/identity/UsernamePasswordCredentialTest.java index 14e28466d4e8..b78ef63b8412 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/UsernamePasswordCredentialTest.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/UsernamePasswordCredentialTest.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.identity.credential; +package com.azure.identity; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.util.TestUtils; import com.microsoft.aad.msal4j.MsalServiceException; @@ -40,8 +40,8 @@ public void testValidUserCredential() throws Exception { String password = "P@ssw0rd"; String token1 = "token1"; String token2 = "token2"; - TokenRequest request1 = new TokenRequest().addScopes("https://management.azure.com"); - TokenRequest request2 = new TokenRequest().addScopes("https://vault.azure.net"); + TokenRequestContext request1 = new TokenRequestContext().addScopes("https://management.azure.com"); + TokenRequestContext request2 = new TokenRequestContext().addScopes("https://vault.azure.net"); OffsetDateTime expiresAt = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock @@ -49,7 +49,7 @@ public void testValidUserCredential() throws Exception { when(identityClient.authenticateWithUsernamePassword(request1, username, password)).thenReturn(TestUtils.getMockMsalToken(token1, expiresAt)); when(identityClient.authenticateWithUserRefreshToken(any(), any())) .thenAnswer(invocation -> { - TokenRequest argument = (TokenRequest) invocation.getArguments()[0]; + TokenRequestContext argument = (TokenRequestContext) invocation.getArguments()[0]; if (argument.getScopes().size() == 1 && argument.getScopes().get(0).equals(request2.getScopes().get(0))) { return TestUtils.getMockMsalToken(token2, expiresAt); } else if (argument.getScopes().size() == 1 && argument.getScopes().get(0).equals(request1.getScopes().get(0))) { @@ -78,7 +78,7 @@ public void testInvalidUserCredential() throws Exception { // setup String username = "testuser"; String badPassword = "Password"; - TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com"); // mock IdentityClient identityClient = PowerMockito.mock(IdentityClient.class); @@ -101,7 +101,7 @@ public void testInvalidParameters() throws Exception { String username = "testuser"; String password = "P@ssw0rd"; String token1 = "token1"; - TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com"); OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientIntegrationTests.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientIntegrationTests.java index d3ab7916a03d..47d208bd6d23 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientIntegrationTests.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientIntegrationTests.java @@ -3,7 +3,7 @@ package com.azure.identity.implementation; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.http.ProxyOptions; import com.azure.core.http.ProxyOptions.Type; import org.junit.Assert; @@ -19,7 +19,7 @@ public class IdentityClientIntegrationTests { private static final String AZURE_CLI_CLIENT_ID = "AZURE_CLI_CLIENT_ID"; private static final String AZURE_CLIENT_SECRET = "AZURE_CLIENT_SECRET"; private static final String AZURE_CLIENT_CERTIFICATE = "AZURE_CLIENT_CERTIFICATE"; - private final TokenRequest request = new TokenRequest().addScopes("https://management.azure.com/.default"); + private final TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com/.default"); @Ignore("Integration test") public void clientSecretCanGetToken() { @@ -29,7 +29,7 @@ public void clientSecretCanGetToken() { && token.getExpiresAt() != null && !token.isExpired()) .verifyComplete(); - StepVerifier.create(client.authenticateWithClientSecret(System.getenv(AZURE_CLIENT_SECRET), new TokenRequest().addScopes("https://vault.azure.net/.default"))) + StepVerifier.create(client.authenticateWithClientSecret(System.getenv(AZURE_CLIENT_SECRET), new TokenRequestContext().addScopes("https://vault.azure.net/.default"))) .expectNextMatches(token -> token.getToken() != null && token.getExpiresAt() != null && !token.isExpired()) @@ -51,7 +51,7 @@ public void deviceCodeCanGetToken() { Assert.assertNotNull(token.getToken()); Assert.assertNotNull(token.getExpiresAt()); Assert.assertFalse(token.isExpired()); - token = client.authenticateWithUserRefreshToken(new TokenRequest().addScopes("https://vault.azure.net/.default"), token).block(); + token = client.authenticateWithUserRefreshToken(new TokenRequestContext().addScopes("https://vault.azure.net/.default"), token).block(); Assert.assertNotNull(token); Assert.assertNotNull(token.getToken()); Assert.assertNotNull(token.getExpiresAt()); @@ -66,7 +66,7 @@ public void browserCanGetToken() { Assert.assertNotNull(token.getToken()); Assert.assertNotNull(token.getExpiresAt()); Assert.assertFalse(token.isExpired()); - token = client.authenticateWithUserRefreshToken(new TokenRequest().addScopes("https://vault.azure.net/.default"), token).block(); + token = client.authenticateWithUserRefreshToken(new TokenRequestContext().addScopes("https://vault.azure.net/.default"), token).block(); Assert.assertNotNull(token); Assert.assertNotNull(token.getToken()); Assert.assertNotNull(token.getExpiresAt()); @@ -81,7 +81,7 @@ public void usernamePasswordCanGetToken() { Assert.assertNotNull(token.getToken()); Assert.assertNotNull(token.getExpiresAt()); Assert.assertFalse(token.isExpired()); - token = client.authenticateWithUserRefreshToken(new TokenRequest().addScopes("https://vault.azure.net/.default"), token).block(); + token = client.authenticateWithUserRefreshToken(new TokenRequestContext().addScopes("https://vault.azure.net/.default"), token).block(); Assert.assertNotNull(token); Assert.assertNotNull(token.getToken()); Assert.assertNotNull(token.getExpiresAt()); @@ -96,7 +96,7 @@ public void authCodeCanGetToken() throws Exception { Assert.assertNotNull(token.getToken()); Assert.assertNotNull(token.getExpiresAt()); Assert.assertFalse(token.isExpired()); - token = client.authenticateWithUserRefreshToken(new TokenRequest().addScopes("https://vault.azure.net/.default"), token).block(); + token = client.authenticateWithUserRefreshToken(new TokenRequestContext().addScopes("https://vault.azure.net/.default"), token).block(); Assert.assertNotNull(token); Assert.assertNotNull(token.getToken()); Assert.assertNotNull(token.getExpiresAt()); diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientTests.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientTests.java index 6ce42e171606..9544bef34c8c 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientTests.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientTests.java @@ -4,7 +4,7 @@ package com.azure.identity.implementation; import com.azure.core.credential.AccessToken; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.identity.util.TestUtils; import com.microsoft.aad.msal4j.AsymmetricKeyCredential; import com.microsoft.aad.msal4j.ClientCredentialParameters; @@ -47,7 +47,7 @@ public void testValidSecret() throws Exception { // setup String secret = "secret"; String accessToken = "token"; - TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com"); OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock @@ -65,7 +65,7 @@ public void testInvalidSecret() throws Exception { // setup String secret = "secret"; String accessToken = "token"; - TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com"); OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock @@ -86,7 +86,7 @@ public void testValidCertificate() throws Exception { // setup String pfxPath = getClass().getResource("/keyStore.pfx").getPath(); String accessToken = "token"; - TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com"); OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock @@ -104,7 +104,7 @@ public void testInvalidCertificatePassword() throws Exception { // setup String pfxPath = getClass().getResource("/keyStore.pfx").getPath(); String accessToken = "token"; - TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com"); OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock @@ -124,7 +124,7 @@ public void testInvalidCertificatePassword() throws Exception { public void testValidDeviceCodeFlow() throws Exception { // setup String accessToken = "token"; - TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); + TokenRequestContext request = new TokenRequestContext().addScopes("https://management.azure.com"); OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock @@ -139,7 +139,7 @@ public void testValidDeviceCodeFlow() throws Exception { /****** mocks ******/ - private void mockForClientSecret(String secret, TokenRequest request, String accessToken, OffsetDateTime expiresOn) throws Exception { + private void mockForClientSecret(String secret, TokenRequestContext request, String accessToken, OffsetDateTime expiresOn) throws Exception { ConfidentialClientApplication application = PowerMockito.mock(ConfidentialClientApplication.class); when(application.acquireToken(any(ClientCredentialParameters.class))).thenAnswer(invocation -> { ClientCredentialParameters argument = (ClientCredentialParameters) invocation.getArguments()[0]; @@ -167,7 +167,7 @@ private void mockForClientSecret(String secret, TokenRequest request, String acc }); } - private void mockForClientCertificate(TokenRequest request, String accessToken, OffsetDateTime expiresOn) throws Exception { + private void mockForClientCertificate(TokenRequestContext request, String accessToken, OffsetDateTime expiresOn) throws Exception { ConfidentialClientApplication application = PowerMockito.mock(ConfidentialClientApplication.class); when(application.acquireToken(any(ClientCredentialParameters.class))).thenAnswer(invocation -> { ClientCredentialParameters argument = (ClientCredentialParameters) invocation.getArguments()[0]; @@ -195,7 +195,7 @@ private void mockForClientCertificate(TokenRequest request, String accessToken, }); } - private void mockForDeviceCodeFlow(TokenRequest request, String accessToken, OffsetDateTime expiresOn) throws Exception { + private void mockForDeviceCodeFlow(TokenRequestContext request, String accessToken, OffsetDateTime expiresOn) throws Exception { PublicClientApplication application = PowerMockito.mock(PublicClientApplication.class); AtomicBoolean cached = new AtomicBoolean(false); when(application.acquireToken(any(DeviceCodeFlowParameters.class))).thenAnswer(invocation -> { diff --git a/sdk/keyvault/azure-security-keyvault-certificates/README.md b/sdk/keyvault/azure-security-keyvault-certificates/README.md index a00d460b0e30..22d64cc989dd 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/README.md +++ b/sdk/keyvault/azure-security-keyvault-certificates/README.md @@ -123,7 +123,7 @@ Here is [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to Once you've populated the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET** and **AZURE_TENANT_ID** environment variables and replaced **your-vault-url** with the above returned URI, you can create the CertificateClient: ```Java -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.CertificateClient; CertificateClient client = new CertificateClientBuilder() @@ -157,7 +157,7 @@ The following sections provide several code snippets covering some of the most c Create a Certificate to be stored in the Azure Key Vault. - `createCertificate` creates a new certificate in the key vault. if the certificate with name already exists then a new version of the certificate is created. ```Java -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.models.Certificate; import com.azure.security.keyvault.certificates.models.CertificatePolicy; import com.azure.security.keyvault.certificates.models.CertificateOperation; @@ -235,7 +235,7 @@ The following sections provide several code snippets covering some of the most c Create a Certificate to be stored in the Azure Key Vault. - `createCertificate` creates a new key in the key vault. if the certificate with name already exists then a new version of the certificate is created. ```Java -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.models.Certificate; import com.azure.security.keyvault.certificates.models.CertificatePolicy; import com.azure.security.keyvault.certificates.models.CertificateOperation; diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/KeyVaultCredentialPolicy.java b/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/KeyVaultCredentialPolicy.java index f40bef9a561d..9fdd23eb94c6 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/KeyVaultCredentialPolicy.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/KeyVaultCredentialPolicy.java @@ -4,7 +4,7 @@ package com.azure.security.keyvault.certificates; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.http.HttpPipelineCallContext; import com.azure.core.http.HttpPipelineNextPolicy; import com.azure.core.http.HttpResponse; @@ -54,7 +54,7 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN .map(res -> res.getHeaderValue(WWW_AUTHENTICATE)) .map(header -> extractChallenge(header, BEARER_TOKEN_PREFIX)) .flatMap(map -> { - cache.setRequest(new TokenRequest().addScopes(map.get("resource") + "/.default")); + cache.setRequest(new TokenRequestContext().addScopes(map.get("resource") + "/.default")); return cache.getToken(); }) .flatMap(token -> { diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/ScopeTokenCache.java b/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/ScopeTokenCache.java index 8b4e347ba809..fe04fc7900b6 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/ScopeTokenCache.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/ScopeTokenCache.java @@ -4,7 +4,7 @@ package com.azure.security.keyvault.certificates; import com.azure.core.credential.AccessToken; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import reactor.core.publisher.FluxSink; import reactor.core.publisher.Mono; import reactor.core.publisher.ReplayProcessor; @@ -22,20 +22,20 @@ class ScopeTokenCache { private AccessToken cache; private final ReplayProcessor emitterProcessor = ReplayProcessor.create(1); private final FluxSink sink = emitterProcessor.sink(FluxSink.OverflowStrategy.BUFFER); - private final Function> getNew; - private TokenRequest request; + private final Function> getNew; + private TokenRequestContext request; /** * Creates an instance of RefreshableTokenCredential with default scheme "Bearer". * * @param getNew a method to get a new token */ - ScopeTokenCache(Function> getNew) { + ScopeTokenCache(Function> getNew) { this.wip = new AtomicBoolean(false); this.getNew = getNew; } - void setRequest(TokenRequest request) { + void setRequest(TokenRequestContext request) { this.request = request; } diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/BackupAndRestoreOperations.java b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/BackupAndRestoreOperations.java index 3ac9ea920a1d..b39cb089be73 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/BackupAndRestoreOperations.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/BackupAndRestoreOperations.java @@ -6,7 +6,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.Poller; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.models.Certificate; import com.azure.security.keyvault.certificates.models.CertificateOperation; import com.azure.security.keyvault.certificates.models.CertificatePolicy; diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/BackupAndRestoreOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/BackupAndRestoreOperationsAsync.java index f44652475e0b..01585e6a0b73 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/BackupAndRestoreOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/BackupAndRestoreOperationsAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.certificates; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.models.CertificatePolicy; import com.azure.security.keyvault.certificates.models.SubjectAlternativeNames; import com.azure.security.keyvault.certificates.models.webkey.CertificateKeyCurveName; diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateAsyncClientJavaDocCodeSnippets.java index 5b49215c85c1..e6cecad9a9b3 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateAsyncClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateAsyncClientJavaDocCodeSnippets.java @@ -12,7 +12,7 @@ import com.azure.core.http.policy.RetryPolicy; import com.azure.core.test.models.RecordedData; import com.azure.core.test.policy.RecordNetworkCallPolicy; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.models.Certificate; import com.azure.security.keyvault.certificates.models.CertificatePolicy; import com.azure.security.keyvault.certificates.models.Contact; diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateClientJavaDocCodeSnippets.java index 5dd5e1ee89bc..01752e3ffff0 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateClientJavaDocCodeSnippets.java @@ -10,7 +10,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.Poller; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.models.Certificate; import com.azure.security.keyvault.certificates.models.CertificateOperation; import com.azure.security.keyvault.certificates.models.CertificatePolicy; diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/HelloWorld.java b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/HelloWorld.java index cd3be3acfa1e..90fc9fa9fedb 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/HelloWorld.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/HelloWorld.java @@ -5,7 +5,7 @@ import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.Poller; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.models.CertificatePolicy; import com.azure.security.keyvault.certificates.models.SubjectAlternativeNames; import com.azure.security.keyvault.certificates.models.Certificate; diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/HelloWorldAsync.java b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/HelloWorldAsync.java index d02cd6c4f476..4ba1352f774c 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/HelloWorldAsync.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/HelloWorldAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.certificates; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.models.CertificatePolicy; import com.azure.security.keyvault.certificates.models.SubjectAlternativeNames; import com.azure.security.keyvault.certificates.models.Certificate; diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ListOperations.java b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ListOperations.java index 80069834db6c..1524ed68f49b 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ListOperations.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ListOperations.java @@ -5,7 +5,7 @@ import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.Poller; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.models.CertificatePolicy; import com.azure.security.keyvault.certificates.models.CertificateOperation; import com.azure.security.keyvault.certificates.models.Certificate; diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ListOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ListOperationsAsync.java index 88e1542e4ce7..305cfc85b561 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ListOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ListOperationsAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.certificates; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.models.CertificatePolicy; import com.azure.security.keyvault.certificates.models.SubjectAlternativeNames; import com.azure.security.keyvault.certificates.models.webkey.CertificateKeyCurveName; diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ManagingDeletedCertificates.java b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ManagingDeletedCertificates.java index 8867f3cb0d9f..bf6aa9986007 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ManagingDeletedCertificates.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ManagingDeletedCertificates.java @@ -5,7 +5,7 @@ import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.Poller; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.models.CertificatePolicy; import com.azure.security.keyvault.certificates.models.SubjectAlternativeNames; import com.azure.security.keyvault.certificates.models.CertificateOperation; diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ManagingDeletedCertificatesAsync.java b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ManagingDeletedCertificatesAsync.java index 29a660fe6c36..e163fcf4cf22 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ManagingDeletedCertificatesAsync.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/ManagingDeletedCertificatesAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.certificates; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.models.CertificatePolicy; import com.azure.security.keyvault.certificates.models.SubjectAlternativeNames; import com.azure.security.keyvault.certificates.models.webkey.CertificateKeyCurveName; diff --git a/sdk/keyvault/azure-security-keyvault-keys/README.md b/sdk/keyvault/azure-security-keyvault-keys/README.md index 23098bcd21a9..03c26e0c3dea 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/README.md +++ b/sdk/keyvault/azure-security-keyvault-keys/README.md @@ -124,7 +124,7 @@ Here is [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to Once you've populated the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET** and **AZURE_TENANT_ID** environment variables and replaced **your-vault-url** with the above returned URI, you can create the KeyClient: ```Java -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.KeyClient; KeyClient client = new KeyClientBuilder() @@ -139,7 +139,7 @@ KeyClient client = new KeyClientBuilder() Once you've populated the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET** and **AZURE_TENANT_ID** environment variables and replaced **your-vault-url** with the above returned URI, you can create the CryptographyClient: ```Java -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.cryptography.CryptographyClient; // 1. Create client with json web key. @@ -188,7 +188,7 @@ The following sections provide several code snippets covering some of the most c Create a Key to be stored in the Azure Key Vault. - `setKey` creates a new key in the key vault. if the key with name already exists then a new version of the key is created. ```Java -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.Key; import com.azure.security.keyvault.keys.KeyClient; @@ -295,7 +295,7 @@ The following sections provide several code snippets covering some of the most c Create a Key to be stored in the Azure Key Vault. - `setKey` creates a new key in the key vault. if the key with name already exists then a new version of the key is created. ```Java -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.Key; import com.azure.security.keyvault.keys.KeyAsyncClient; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyVaultCredentialPolicy.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyVaultCredentialPolicy.java index d6b197a19fae..9d2b489e3d80 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyVaultCredentialPolicy.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyVaultCredentialPolicy.java @@ -4,7 +4,7 @@ package com.azure.security.keyvault.keys; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.http.HttpPipelineCallContext; import com.azure.core.http.HttpPipelineNextPolicy; import com.azure.core.http.HttpResponse; @@ -55,7 +55,7 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN .map(res -> res.getHeaderValue(WWW_AUTHENTICATE)) .map(header -> extractChallenge(header, BEARER_TOKEN_PREFIX)) .flatMap(map -> { - cache.setTokenRequest(new TokenRequest().addScopes(map.get("resource") + "/.default")); + cache.setTokenRequest(new TokenRequestContext().addScopes(map.get("resource") + "/.default")); return cache.getToken(); }) .flatMap(token -> { diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/ScopeTokenCache.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/ScopeTokenCache.java index 647bb7430fce..0f4050cd6ee0 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/ScopeTokenCache.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/ScopeTokenCache.java @@ -4,7 +4,7 @@ package com.azure.security.keyvault.keys; import com.azure.core.credential.AccessToken; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import reactor.core.publisher.FluxSink; import reactor.core.publisher.Mono; import reactor.core.publisher.ReplayProcessor; @@ -22,20 +22,20 @@ class ScopeTokenCache { private AccessToken cache; private final ReplayProcessor emitterProcessor = ReplayProcessor.create(1); private final FluxSink sink = emitterProcessor.sink(FluxSink.OverflowStrategy.BUFFER); - private final Function> getNew; - private TokenRequest request; + private final Function> getNew; + private TokenRequestContext request; /** * Creates an instance of RefreshableTokenCredential with default scheme "Bearer". * * @param getNew a method to get a new token */ - ScopeTokenCache(Function> getNew) { + ScopeTokenCache(Function> getNew) { this.wip = new AtomicBoolean(false); this.getNew = getNew; } - public void setTokenRequest(TokenRequest request) { + public void setTokenRequest(TokenRequestContext request) { this.request = request; } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperations.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperations.java index c47029a8a7df..4fd7190fc49a 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperations.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperations.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.keys; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.Key; import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperationsAsync.java index ba2eb0db60a4..c5afb752eed4 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperationsAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.keys; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; import java.io.File; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorld.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorld.java index 7675e8b369bb..81559e77de57 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorld.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorld.java @@ -5,7 +5,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.Key; import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorldAsync.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorldAsync.java index b04a7772e1c3..8b14e5ad3992 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorldAsync.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorldAsync.java @@ -4,7 +4,7 @@ package com.azure.security.keyvault.keys; import com.azure.core.http.rest.Response; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.Key; import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java index 650c08436413..6af4458c4ebd 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java @@ -11,7 +11,7 @@ import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.test.models.RecordedData; import com.azure.core.test.policy.RecordNetworkCallPolicy; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; import com.azure.security.keyvault.keys.models.KeyProperties; import com.azure.security.keyvault.keys.models.KeyCreateOptions; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyClientJavaDocCodeSnippets.java index 28ef96fd6c53..a362703af2fa 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyClientJavaDocCodeSnippets.java @@ -6,7 +6,7 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.DeletedKey; import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; import com.azure.security.keyvault.keys.models.Key; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperations.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperations.java index 405564bd11e3..5431248a824c 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperations.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperations.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.keys; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; import com.azure.security.keyvault.keys.models.Key; import com.azure.security.keyvault.keys.models.KeyProperties; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperationsAsync.java index 5440fc5ed91f..8b4aa1fe80ab 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperationsAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.keys; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeys.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeys.java index 069f532a5128..24869db89421 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeys.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeys.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.keys; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.DeletedKey; import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeysAsync.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeysAsync.java index c4328417e820..2252459f404b 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeysAsync.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeysAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.keys; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java index 6a038e0d53d8..1bb9703ba3d0 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java @@ -11,7 +11,7 @@ import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.test.models.RecordedData; import com.azure.core.test.policy.RecordNetworkCallPolicy; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.KeyAsyncClient; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientJavaDocCodeSnippets.java index bac992f431bf..e07fb3c9b083 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientJavaDocCodeSnippets.java @@ -5,7 +5,7 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.util.Context; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.KeyClient; import com.azure.security.keyvault.keys.cryptography.models.EncryptResult; import com.azure.security.keyvault.keys.cryptography.models.DecryptResult; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperations.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperations.java index 02c376a4fc4c..1acc9c758c82 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperations.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperations.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.keys.cryptography; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.EncryptResult; import com.azure.security.keyvault.keys.cryptography.models.DecryptResult; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperationsAsync.java index 767931f68456..b540456837be 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperationsAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.keys.cryptography; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; import com.azure.security.keyvault.keys.models.webkey.KeyOperation; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperations.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperations.java index 3c9740ac1d34..133dcec99c45 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperations.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperations.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.keys.cryptography; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.cryptography.models.KeyUnwrapResult; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapResult; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperationsAsync.java index 277d2b5c3ca1..897b5722ca5f 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperationsAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.keys.cryptography; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; import com.azure.security.keyvault.keys.models.webkey.KeyOperation; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/SignVerifyOperations.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/SignVerifyOperations.java index 6e59f8504e91..6cc6956368e6 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/SignVerifyOperations.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/SignVerifyOperations.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.keys.cryptography; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.cryptography.models.SignResult; import com.azure.security.keyvault.keys.cryptography.models.VerifyResult; import com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/SignVerifyOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/SignVerifyOperationsAsync.java index 222a6e5dcb1a..1fd775e99129 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/SignVerifyOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/SignVerifyOperationsAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.keys.cryptography; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm; import java.security.MessageDigest; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java index da815d079ed1..6b763ed6c5ab 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java @@ -16,7 +16,7 @@ import com.azure.core.test.TestBase; import com.azure.core.util.Configuration; import com.azure.security.keyvault.keys.implementation.AzureKeyVaultConfiguration; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.Key; import com.azure.security.keyvault.keys.models.KeyCreateOptions; import com.azure.security.keyvault.keys.models.webkey.KeyType; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTestBase.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTestBase.java index 55b05a74f33a..8f9a0e20f083 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTestBase.java @@ -14,7 +14,7 @@ import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.test.TestBase; import com.azure.core.util.Configuration; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.implementation.AzureKeyVaultConfiguration; import org.junit.Rule; import org.junit.Test; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/README.md b/sdk/keyvault/azure-security-keyvault-secrets/README.md index 2ac49ccec27d..d75e13adc4cb 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/README.md +++ b/sdk/keyvault/azure-security-keyvault-secrets/README.md @@ -125,7 +125,7 @@ Here is [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to Once you've populated the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET** and **AZURE_TENANT_ID** environment variables and replaced **your-vault-url** with the above returned URI, you can create the SecretClient: ```Java -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.SecretClient; SecretClient client = new SecretClientBuilder() @@ -162,7 +162,7 @@ The following sections provide several code snippets covering some of the most c Create a Secret to be stored in the Azure Key Vault. - `setSecret` creates a new secret in the key vault. if the secret with name already exists then a new version of the secret is created. ```Java -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.SecretClient; import com.azure.security.keyvault.secrets.models.Secret; @@ -229,7 +229,7 @@ The following sections provide several code snippets covering some of the most c Create a Secret to be stored in the Azure Key Vault. - `setSecret` creates a new secret in the key vault. if the secret with name already exists then a new version of the secret is created. ```Java -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.SecretAsyncClient; import com.azure.security.keyvault.secrets.models.Secret; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/KeyVaultCredentialPolicy.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/KeyVaultCredentialPolicy.java index ceca55b4de7e..2a33f5fe1b4b 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/KeyVaultCredentialPolicy.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/KeyVaultCredentialPolicy.java @@ -4,7 +4,7 @@ package com.azure.security.keyvault.secrets; import com.azure.core.credential.TokenCredential; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.http.HttpPipelineCallContext; import com.azure.core.http.HttpPipelineNextPolicy; import com.azure.core.http.HttpResponse; @@ -54,7 +54,7 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN .map(res -> res.getHeaderValue(WWW_AUTHENTICATE)) .map(header -> extractChallenge(header, BEARER_TOKEN_PREFIX)) .flatMap(map -> { - cache.setTokenRequest(new TokenRequest().addScopes(map.get("resource") + "/.default")); + cache.setTokenRequest(new TokenRequestContext().addScopes(map.get("resource") + "/.default")); return cache.getToken(); }) .flatMap(token -> { diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/ScopeTokenCache.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/ScopeTokenCache.java index 1937a23649d4..8a96e49e7366 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/ScopeTokenCache.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/ScopeTokenCache.java @@ -4,7 +4,7 @@ package com.azure.security.keyvault.secrets; import com.azure.core.credential.AccessToken; -import com.azure.core.credential.TokenRequest; +import com.azure.core.credential.TokenRequestContext; import reactor.core.publisher.FluxSink; import reactor.core.publisher.Mono; import reactor.core.publisher.ReplayProcessor; @@ -20,8 +20,8 @@ class ScopeTokenCache { private AccessToken cache; private final ReplayProcessor emitterProcessor = ReplayProcessor.create(1); private final FluxSink sink = emitterProcessor.sink(FluxSink.OverflowStrategy.BUFFER); - private final Function> getNew; - private TokenRequest request; + private final Function> getNew; + private TokenRequestContext request; /** @@ -29,12 +29,12 @@ class ScopeTokenCache { * * @param getNew a method to get a new token */ - ScopeTokenCache(Function> getNew) { + ScopeTokenCache(Function> getNew) { this.wip = new AtomicBoolean(false); this.getNew = getNew; } - public void setTokenRequest(TokenRequest request) { + public void setTokenRequest(TokenRequestContext request) { this.request = request; } diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperations.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperations.java index 3c4812a2b9f9..f4a0b85d2f8c 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperations.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperations.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.secrets; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperationsAsync.java index 6e13ffc5261d..9049a85d7f84 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperationsAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.secrets; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorld.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorld.java index c84b7f8491cb..5f227dfa53f1 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorld.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorld.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.secrets; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorldAsync.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorldAsync.java index 6f1e2f2b6346..28a877f551cc 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorldAsync.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorldAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.secrets; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java index 20c191cf6697..02f290454e66 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java @@ -3,16 +3,16 @@ package com.azure.security.keyvault.secrets; -import com.azure.identity.credential.ChainedTokenCredential; -import com.azure.identity.credential.ChainedTokenCredentialBuilder; -import com.azure.identity.credential.ClientSecretCredential; -import com.azure.identity.credential.ClientSecretCredentialBuilder; -import com.azure.identity.credential.DefaultAzureCredential; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; -import com.azure.identity.credential.DeviceCodeCredential; -import com.azure.identity.credential.DeviceCodeCredentialBuilder; -import com.azure.identity.credential.ManagedIdentityCredential; -import com.azure.identity.credential.ManagedIdentityCredentialBuilder; +import com.azure.identity.ChainedTokenCredential; +import com.azure.identity.ChainedTokenCredentialBuilder; +import com.azure.identity.ClientSecretCredential; +import com.azure.identity.ClientSecretCredentialBuilder; +import com.azure.identity.DefaultAzureCredential; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.identity.DeviceCodeCredential; +import com.azure.identity.DeviceCodeCredentialBuilder; +import com.azure.identity.ManagedIdentityCredential; +import com.azure.identity.ManagedIdentityCredentialBuilder; import com.azure.security.keyvault.secrets.models.Secret; /** @@ -62,7 +62,7 @@ public void authenticateWithClientSecretCredential() { public void authenticateWithDeviceCodeCredential() { // authenticate with client secret, DeviceCodeCredential deviceCodeCredential = new DeviceCodeCredentialBuilder() - .deviceCodeChallengeConsumer(challenge -> { + .challengeConsumer(challenge -> { // lets user know of the challenge, e.g., display the message on an IoT device displayMessage(challenge.getMessage()); }) diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperations.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperations.java index 86df616fafc6..b37622b78429 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperations.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperations.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.secrets; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperationsAsync.java index ee9c126466f0..615aa2851395 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperationsAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.secrets; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecrets.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecrets.java index 97feee51ee59..1163113b9575 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecrets.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecrets.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.secrets; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.models.DeletedSecret; import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecretsAsync.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecretsAsync.java index 8b5d776c721d..75213ab4c469 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecretsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecretsAsync.java @@ -3,7 +3,7 @@ package com.azure.security.keyvault.secrets; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/PersistentTokenCacheDemo.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/PersistentTokenCacheDemo.java index d8a2725a7cc1..55492f4a4709 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/PersistentTokenCacheDemo.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/PersistentTokenCacheDemo.java @@ -3,8 +3,8 @@ package com.azure.security.keyvault.secrets; -import com.azure.identity.credential.SharedTokenCacheCredential; -import com.azure.identity.credential.SharedTokenCacheCredentialBuilder; +import com.azure.identity.SharedTokenCacheCredential; +import com.azure.identity.SharedTokenCacheCredentialBuilder; import com.azure.security.keyvault.secrets.models.Secret; /** diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretAsyncClientJavaDocCodeSnippets.java index 43ace12022e1..688406257bdc 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretAsyncClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretAsyncClientJavaDocCodeSnippets.java @@ -10,7 +10,7 @@ import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.test.models.RecordedData; import com.azure.core.test.policy.RecordNetworkCallPolicy; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; import reactor.util.context.Context; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java index 1de472920cc8..911c25b1d6a2 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java @@ -7,7 +7,7 @@ import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.models.DeletedSecret; import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTestBase.java b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTestBase.java index 978e1a5f754f..f55eef91688c 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTestBase.java @@ -15,7 +15,7 @@ import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.test.TestBase; import com.azure.core.util.Configuration; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; import org.junit.Rule; diff --git a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy index 9774c7672640..b11774841d4e 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy +++ b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy @@ -14,7 +14,7 @@ import com.azure.core.test.TestMode import com.azure.core.test.utils.TestResourceNamer import com.azure.core.util.Configuration import com.azure.core.util.logging.ClientLogger -import com.azure.identity.credential.EnvironmentCredentialBuilder +import com.azure.identity.EnvironmentCredentialBuilder import com.azure.storage.blob.BlobContainerAsyncClient import com.azure.storage.blob.BlobContainerClient import com.azure.storage.blob.BlobServiceAsyncClient diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AzureIdentityExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AzureIdentityExample.java index 3168c4612034..d5c581dc9610 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AzureIdentityExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AzureIdentityExample.java @@ -3,7 +3,7 @@ package com.azure.storage.blob; -import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; import java.util.Locale; diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index 1de9221aad7c..afcd7e0d5caf 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -23,7 +23,7 @@ import com.azure.core.test.TestMode import com.azure.core.test.utils.TestResourceNamer import com.azure.core.util.Configuration import com.azure.core.util.logging.ClientLogger -import com.azure.identity.credential.EnvironmentCredentialBuilder +import com.azure.identity.EnvironmentCredentialBuilder import com.azure.storage.blob.models.BlobContainerItem import com.azure.storage.blob.models.BlobRetentionPolicy import com.azure.storage.blob.models.BlobServiceProperties From 01eaea96b074b2477e45bc87c564f0cc0e499bce Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 17 Oct 2019 15:52:24 -0700 Subject: [PATCH 02/64] Fixes for ManagedIdentityCredential (#5897) * Avoid waiting 60 seconds for VirtualMachine MSI timeout * Checkstyle * Fix app service client id query parameter https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity#using-the-rest-protocol * Fix DefaultAzureCredential test --- .../identity/ChainedTokenCredential.java | 5 +- .../identity/credential/package-info.java | 7 - .../implementation/IdentityClient.java | 126 +++++++++++------- .../identity/DefaultAzureCredentialTest.java | 3 +- 4 files changed, 80 insertions(+), 61 deletions(-) delete mode 100644 sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/package-info.java diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredential.java index c3e7884975e2..90606699dbc4 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredential.java @@ -7,7 +7,6 @@ import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; import com.azure.core.credential.TokenRequestContext; -import com.azure.core.exception.ClientAuthenticationException; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -46,9 +45,9 @@ public Mono getToken(TokenRequestContext request) { return Mono.empty(); })) .next() - .switchIfEmpty(Mono.defer(() -> Mono.error(new ClientAuthenticationException("Tried " + .switchIfEmpty(Mono.defer(() -> Mono.error(new RuntimeException("Tried " + credentials.stream().map(c -> c.getClass().getSimpleName()).collect(Collectors.joining(", ")) + " but failed to acquire a token for any of them. Please verify the environment for either of them" - + " and see more details in the causes below.", null, cause.get())))); + + " and see more details in the causes below.", cause.get())))); } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/package-info.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/package-info.java deleted file mode 100644 index 4a8d5f0c0063..000000000000 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -/** - * Package containing various types of credentials - */ -package com.azure.identity.credential; diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java index a59879793141..54deeaf0eb29 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java @@ -327,7 +327,7 @@ public Mono authenticateToManagedIdentityEndpoint(String msiEndpoin payload.append("&api-version="); payload.append(URLEncoder.encode("2017-09-01", "UTF-8")); if (clientId != null) { - payload.append("&client_id="); + payload.append("&clientid="); payload.append(URLEncoder.encode(clientId, "UTF-8")); } } catch (IOException exception) { @@ -382,65 +382,93 @@ public Mono authenticateToIMDSEndpoint(TokenRequestContext request) return Mono.error(exception); } - int retry = 1; - while (retry <= options.getMaxRetry()) { - URL url = null; - HttpURLConnection connection = null; - try { - url = - new URL(String.format("http://169.254.169.254/metadata/identity/oauth2/token?%s", - payload.toString())); + return checkIMDSAvailable().flatMap(available -> Mono.fromCallable(() -> { + int retry = 1; + while (retry <= options.getMaxRetry()) { + URL url = null; + HttpURLConnection connection = null; + try { + url = + new URL(String.format("http://169.254.169.254/metadata/identity/oauth2/token?%s", + payload.toString())); - connection = (HttpURLConnection) url.openConnection(); - connection.setRequestMethod("GET"); - connection.setRequestProperty("Metadata", "true"); - connection.connect(); + connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("GET"); + connection.setRequestProperty("Metadata", "true"); + connection.connect(); - Scanner s = new Scanner(connection.getInputStream(), StandardCharsets.UTF_8.name()).useDelimiter("\\A"); - String result = s.hasNext() ? s.next() : ""; + Scanner s = new Scanner(connection.getInputStream(), StandardCharsets.UTF_8.name()) + .useDelimiter("\\A"); + String result = s.hasNext() ? s.next() : ""; - return Mono.just(SERIALIZER_ADAPTER.deserialize(result, MSIToken.class, SerializerEncoding.JSON)); - } catch (IOException exception) { - if (connection == null) { - return Mono.error(new RuntimeException(String.format("Could not connect to the url: %s.", url), - exception)); - } - int responseCode = 0; - try { - responseCode = connection.getResponseCode(); - } catch (IOException e) { - return Mono.error(e); - } - if (responseCode == 410 - || responseCode == 429 - || responseCode == 404 - || (responseCode >= 500 && responseCode <= 599)) { - int retryTimeoutInMs = options.getRetryTimeout().apply(Duration.ofSeconds(RANDOM.nextInt(retry))). - getNano() / 1000; - // Error code 410 indicates IMDS upgrade is in progress, which can take up to 70s - // - retryTimeoutInMs = - (responseCode == 410 && retryTimeoutInMs < imdsUpgradeTimeInMs) ? imdsUpgradeTimeInMs - : retryTimeoutInMs; - retry++; - if (retry > options.getMaxRetry()) { - break; + return SERIALIZER_ADAPTER.deserialize(result, MSIToken.class, SerializerEncoding.JSON); + } catch (IOException exception) { + if (connection == null) { + throw logger.logExceptionAsError(new RuntimeException( + String.format("Could not connect to the url: %s.", url), exception)); + } + int responseCode = connection.getResponseCode(); + if (responseCode == 410 + || responseCode == 429 + || responseCode == 404 + || (responseCode >= 500 && responseCode <= 599)) { + int retryTimeoutInMs = options.getRetryTimeout() + .apply(Duration.ofSeconds(RANDOM.nextInt(retry))).getNano() / 1000; + // Error code 410 indicates IMDS upgrade is in progress, which can take up to 70s + // + retryTimeoutInMs = + (responseCode == 410 && retryTimeoutInMs < imdsUpgradeTimeInMs) ? imdsUpgradeTimeInMs + : retryTimeoutInMs; + retry++; + if (retry > options.getMaxRetry()) { + break; + } else { + sleep(retryTimeoutInMs); + } } else { - sleep(retryTimeoutInMs); + throw logger.logExceptionAsError(new RuntimeException( + "Couldn't acquire access token from IMDS, verify your objectId, " + + "clientId or msiResourceId", exception)); + } + } finally { + if (connection != null) { + connection.disconnect(); } - } else { - return Mono.error(new RuntimeException( - "Couldn't acquire access token from IMDS, verify your objectId, clientId or msiResourceId", - exception)); } + } + throw logger.logExceptionAsError(new RuntimeException( + String.format("MSI: Failed to acquire tokens after retrying %s times", + options.getMaxRetry()))); + })); + } + + private Mono checkIMDSAvailable() { + StringBuilder payload = new StringBuilder(); + + try { + payload.append("api-version="); + payload.append(URLEncoder.encode("2018-02-01", "UTF-8")); + } catch (IOException exception) { + return Mono.error(exception); + } + return Mono.fromCallable(() -> { + HttpURLConnection connection = null; + URL url = new URL(String.format("http://169.254.169.254/metadata/identity/oauth2/token?%s", + payload.toString())); + + try { + connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("GET"); + connection.setConnectTimeout(500); + connection.connect(); } finally { if (connection != null) { connection.disconnect(); } } - } - return Mono.error(new RuntimeException(String.format("MSI: Failed to acquire tokens after retrying %s times", - options.getMaxRetry()))); + + return true; + }); } private static void sleep(int millis) { diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/DefaultAzureCredentialTest.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/DefaultAzureCredentialTest.java index 1dc648b6db2f..d43378c6139c 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/DefaultAzureCredentialTest.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/DefaultAzureCredentialTest.java @@ -4,7 +4,6 @@ package com.azure.identity; import com.azure.core.credential.TokenRequestContext; -import com.azure.core.exception.ClientAuthenticationException; import com.azure.core.util.Configuration; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.util.TestUtils; @@ -101,7 +100,7 @@ public void testNoCredentialWorks() throws Exception { // test DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build(); StepVerifier.create(credential.getToken(request)) - .expectErrorMatches(t -> t instanceof ClientAuthenticationException && t.getMessage().contains("Tried EnvironmentCredential, ManagedIdentityCredential, SharedTokenCacheCredential")) + .expectErrorMatches(t -> t instanceof RuntimeException && t.getMessage().contains("Tried EnvironmentCredential, ManagedIdentityCredential, SharedTokenCacheCredential")) .verify(); } } From 82232d6198b1d7ffebe18fde6a260382707c1be7 Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Thu, 17 Oct 2019 16:24:59 -0700 Subject: [PATCH 03/64] Specialized async clients with async errors (#5907) * Specialized async clients with async errors * Fix checkstyle --- .../specialized/AppendBlobAsyncClient.java | 39 +++- .../blob/specialized/BlobAsyncClientBase.java | 192 ++++++++++++++---- .../blob/specialized/BlobClientBase.java | 12 +- .../specialized/BlockBlobAsyncClient.java | 72 +++++-- .../blob/specialized/LeaseAsyncClient.java | 62 +++++- .../blob/specialized/PageBlobAsyncClient.java | 121 ++++++++--- .../BlobAsyncClientJavaDocCodeSnippets.java | 12 +- .../blob/BlobClientJavaDocCodeSnippets.java | 8 +- ...lobAsyncClientBaseJavaDocCodeSnippets.java | 16 +- .../BlobClientBaseJavaDocCodeSnippets.java | 16 +- .../com/azure/storage/blob/BlobAPITest.groovy | 12 +- 11 files changed, 429 insertions(+), 133 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java index 5eba84297f26..f28ac35b504f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java @@ -30,6 +30,7 @@ import java.nio.ByteBuffer; import java.util.Map; +import static com.azure.core.implementation.util.FluxUtil.monoError; import static com.azure.core.implementation.util.FluxUtil.withContext; /** @@ -85,7 +86,11 @@ public final class AppendBlobAsyncClient extends BlobAsyncClientBase { * @return A {@link Mono} containing the information of the created appended blob. */ public Mono create() { - return createWithResponse(null, null, null).flatMap(FluxUtil::toMono); + try { + return createWithResponse(null, null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -103,7 +108,11 @@ public Mono create() { */ public Mono> createWithResponse(BlobHttpHeaders headers, Map metadata, BlobAccessConditions accessConditions) { - return withContext(context -> createWithResponse(headers, metadata, accessConditions, context)); + try { + return withContext(context -> createWithResponse(headers, metadata, accessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> createWithResponse(BlobHttpHeaders headers, Map metadata, @@ -133,7 +142,11 @@ Mono> createWithResponse(BlobHttpHeaders headers, Map appendBlock(Flux data, long length) { - return appendBlockWithResponse(data, length, null).flatMap(FluxUtil::toMono); + try { + return appendBlockWithResponse(data, length, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -156,7 +169,11 @@ public Mono appendBlock(Flux data, long length) { */ public Mono> appendBlockWithResponse(Flux data, long length, AppendBlobAccessConditions appendBlobAccessConditions) { - return withContext(context -> appendBlockWithResponse(data, length, appendBlobAccessConditions, context)); + try { + return withContext(context -> appendBlockWithResponse(data, length, appendBlobAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> appendBlockWithResponse(Flux data, long length, @@ -187,7 +204,11 @@ Mono> appendBlockWithResponse(Flux data, lo * @return {@link Mono} containing the information of the append blob operation. */ public Mono appendBlockFromUrl(String sourceUrl, BlobRange sourceRange) { - return appendBlockFromUrlWithResponse(sourceUrl, sourceRange, null, null, null).flatMap(FluxUtil::toMono); + try { + return appendBlockFromUrlWithResponse(sourceUrl, sourceRange, null, null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -212,8 +233,12 @@ public Mono appendBlockFromUrl(String sourceUrl, BlobRange sourc public Mono> appendBlockFromUrlWithResponse(String sourceUrl, BlobRange sourceRange, byte[] sourceContentMD5, AppendBlobAccessConditions destAccessConditions, SourceModifiedAccessConditions sourceAccessConditions) { - return withContext(context -> appendBlockFromUrlWithResponse(sourceUrl, sourceRange, sourceContentMD5, - destAccessConditions, sourceAccessConditions, context)); + try { + return withContext(context -> appendBlockFromUrlWithResponse(sourceUrl, sourceRange, sourceContentMD5, + destAccessConditions, sourceAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> appendBlockFromUrlWithResponse(String sourceUrl, BlobRange sourceRange, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index 8eca760a0c81..47ae338611a8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -54,6 +54,8 @@ import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; +import static com.azure.core.implementation.util.FluxUtil.fluxError; +import static com.azure.core.implementation.util.FluxUtil.monoError; import static com.azure.core.implementation.util.FluxUtil.withContext; /** @@ -213,7 +215,11 @@ public boolean isSnapshot() { * @return true if the blob exists, false if it doesn't */ public Mono exists() { - return existsWithResponse().flatMap(FluxUtil::toMono); + try { + return existsWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -226,7 +232,11 @@ public Mono exists() { * @return true if the blob exists, false if it doesn't */ public Mono> existsWithResponse() { - return withContext(this::existsWithResponse); + try { + return withContext(this::existsWithResponse); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> existsWithResponse(Context context) { @@ -254,7 +264,11 @@ Mono> existsWithResponse(Context context) { * @return A reactive response containing the copy ID for the long running operation. */ public Mono startCopyFromURL(String sourceUrl) { - return startCopyFromURLWithResponse(sourceUrl, null, null, null, null, null).flatMap(FluxUtil::toMono); + try { + return startCopyFromURLWithResponse(sourceUrl, null, null, null, null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -281,8 +295,12 @@ public Mono startCopyFromURL(String sourceUrl) { public Mono> startCopyFromURLWithResponse(String sourceUrl, Map metadata, AccessTier tier, RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, BlobAccessConditions destAccessConditions) { - return withContext(context -> startCopyFromURLWithResponse(sourceUrl, metadata, tier, priority, - sourceModifiedAccessConditions, destAccessConditions, context)); + try { + return withContext(context -> startCopyFromURLWithResponse(sourceUrl, metadata, tier, priority, + sourceModifiedAccessConditions, destAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> startCopyFromURLWithResponse(String sourceUrl, Map metadata, AccessTier tier, @@ -326,7 +344,11 @@ Mono> startCopyFromURLWithResponse(String sourceUrl, Map abortCopyFromURL(String copyId) { - return abortCopyFromURLWithResponse(copyId, null).flatMap(FluxUtil::toMono); + try { + return abortCopyFromURLWithResponse(copyId, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -346,7 +368,11 @@ public Mono abortCopyFromURL(String copyId) { */ public Mono> abortCopyFromURLWithResponse(String copyId, LeaseAccessConditions leaseAccessConditions) { - return withContext(context -> abortCopyFromURLWithResponse(copyId, leaseAccessConditions, context)); + try { + return withContext(context -> abortCopyFromURLWithResponse(copyId, leaseAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> abortCopyFromURLWithResponse(String copyId, LeaseAccessConditions leaseAccessConditions, @@ -370,7 +396,11 @@ Mono> abortCopyFromURLWithResponse(String copyId, LeaseAccessCond * @return A reactive response containing the copy ID for the long running operation. */ public Mono copyFromURL(String copySource) { - return copyFromURLWithResponse(copySource, null, null, null, null).flatMap(FluxUtil::toMono); + try { + return copyFromURLWithResponse(copySource, null, null, null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -396,8 +426,12 @@ public Mono copyFromURL(String copySource) { public Mono> copyFromURLWithResponse(String copySource, Map metadata, AccessTier tier, ModifiedAccessConditions sourceModifiedAccessConditions, BlobAccessConditions destAccessConditions) { - return withContext(context -> copyFromURLWithResponse(copySource, metadata, tier, - sourceModifiedAccessConditions, destAccessConditions, context)); + try { + return withContext(context -> copyFromURLWithResponse(copySource, metadata, tier, + sourceModifiedAccessConditions, destAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> copyFromURLWithResponse(String copySource, Map metadata, AccessTier tier, @@ -441,8 +475,12 @@ Mono> copyFromURLWithResponse(String copySource, Map download() { - return downloadWithResponse(null, null, null, false) - .flatMapMany(Response::getValue); + try { + return downloadWithResponse(null, null, null, false) + .flatMapMany(Response::getValue); + } catch (RuntimeException ex) { + return fluxError(logger, ex); + } } /** @@ -464,8 +502,12 @@ public Flux download() { */ public Mono>> downloadWithResponse(BlobRange range, ReliableDownloadOptions options, BlobAccessConditions accessConditions, boolean rangeGetContentMD5) { - return withContext(context -> downloadWithResponse(range, options, accessConditions, rangeGetContentMD5, - context)); + try { + return withContext(context -> downloadWithResponse(range, options, accessConditions, rangeGetContentMD5, + context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono>> downloadWithResponse(BlobRange range, ReliableDownloadOptions options, @@ -543,8 +585,12 @@ Mono download(BlobRange range, BlobAccessConditions acces * @return An empty response */ public Mono downloadToFile(String filePath) { - return downloadToFileWithResponse(filePath, null, null, - null, null, false).flatMap(FluxUtil::toMono); + try { + return downloadToFileWithResponse(filePath, null, null, + null, null, false).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -580,8 +626,12 @@ public Mono downloadToFile(String filePath) { public Mono> downloadToFileWithResponse(String filePath, BlobRange range, ParallelTransferOptions parallelTransferOptions, ReliableDownloadOptions options, BlobAccessConditions accessConditions, boolean rangeGetContentMD5) { - return withContext(context -> downloadToFileWithResponse(filePath, range, parallelTransferOptions, options, - accessConditions, rangeGetContentMD5, context)); + try { + return withContext(context -> downloadToFileWithResponse(filePath, range, parallelTransferOptions, options, + accessConditions, rangeGetContentMD5, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } // TODO (gapra) : Investigate if this is can be parallelized, and include the parallelTransfers parameter. @@ -670,7 +720,11 @@ private List sliceBlobRange(BlobRange blobRange, Integer blockSize) { * @return A reactive response signalling completion. */ public Mono delete() { - return deleteWithResponse(null, null).flatMap(FluxUtil::toMono); + try { + return deleteWithResponse(null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -691,7 +745,11 @@ public Mono delete() { */ public Mono> deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, BlobAccessConditions accessConditions) { - return withContext(context -> deleteWithResponse(deleteBlobSnapshotOptions, accessConditions, context)); + try { + return withContext(context -> deleteWithResponse(deleteBlobSnapshotOptions, accessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, @@ -717,7 +775,11 @@ Mono> deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnap * @return A reactive response containing the blob properties and metadata. */ public Mono getProperties() { - return getPropertiesWithResponse(null).flatMap(FluxUtil::toMono); + try { + return getPropertiesWithResponse(null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -734,7 +796,11 @@ public Mono getProperties() { * @return A reactive response containing the blob properties and metadata. */ public Mono> getPropertiesWithResponse(BlobAccessConditions accessConditions) { - return withContext(context -> getPropertiesWithResponse(accessConditions, context)); + try { + return withContext(context -> getPropertiesWithResponse(accessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> getPropertiesWithResponse(BlobAccessConditions accessConditions, Context context) { @@ -752,7 +818,7 @@ Mono> getPropertiesWithResponse(BlobAccessConditions ac * *

Code Samples

* - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setHTTPHeaders#BlobHttpHeaders} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeaders#BlobHttpHeaders} * *

For more information, see the * Azure Docs

@@ -760,8 +826,12 @@ Mono> getPropertiesWithResponse(BlobAccessConditions ac * @param headers {@link BlobHttpHeaders} * @return A reactive response signalling completion. */ - public Mono setHTTPHeaders(BlobHttpHeaders headers) { - return setHTTPHeadersWithResponse(headers, null).flatMap(FluxUtil::toMono); + public Mono setHttpHeaders(BlobHttpHeaders headers) { + try { + return setHttpHeadersWithResponse(headers, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -770,7 +840,7 @@ public Mono setHTTPHeaders(BlobHttpHeaders headers) { * *

Code Samples

* - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setHTTPHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions} * *

For more information, see the * Azure Docs

@@ -779,12 +849,16 @@ public Mono setHTTPHeaders(BlobHttpHeaders headers) { * @param accessConditions {@link BlobAccessConditions} * @return A reactive response signalling completion. */ - public Mono> setHTTPHeadersWithResponse(BlobHttpHeaders headers, + public Mono> setHttpHeadersWithResponse(BlobHttpHeaders headers, BlobAccessConditions accessConditions) { - return withContext(context -> setHTTPHeadersWithResponse(headers, accessConditions, context)); + try { + return withContext(context -> setHttpHeadersWithResponse(headers, accessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } - Mono> setHTTPHeadersWithResponse(BlobHttpHeaders headers, BlobAccessConditions accessConditions, + Mono> setHttpHeadersWithResponse(BlobHttpHeaders headers, BlobAccessConditions accessConditions, Context context) { accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; @@ -809,7 +883,11 @@ Mono> setHTTPHeadersWithResponse(BlobHttpHeaders headers, BlobAcc * @return A reactive response signalling completion. */ public Mono setMetadata(Map metadata) { - return setMetadataWithResponse(metadata, null).flatMap(FluxUtil::toMono); + try { + return setMetadataWithResponse(metadata, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -829,7 +907,11 @@ public Mono setMetadata(Map metadata) { */ public Mono> setMetadataWithResponse(Map metadata, BlobAccessConditions accessConditions) { - return withContext(context -> setMetadataWithResponse(metadata, accessConditions, context)); + try { + return withContext(context -> setMetadataWithResponse(metadata, accessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> setMetadataWithResponse(Map metadata, BlobAccessConditions accessConditions, @@ -856,7 +938,11 @@ Mono> setMetadataWithResponse(Map metadata, BlobA * use {@link #getSnapshotId()} to get the identifier for the snapshot. */ public Mono createSnapshot() { - return createSnapshotWithResponse(null, null).flatMap(FluxUtil::toMono); + try { + return createSnapshotWithResponse(null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -876,7 +962,11 @@ public Mono createSnapshot() { */ public Mono> createSnapshotWithResponse(Map metadata, BlobAccessConditions accessConditions) { - return withContext(context -> createSnapshotWithResponse(metadata, accessConditions, context)); + try { + return withContext(context -> createSnapshotWithResponse(metadata, accessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> createSnapshotWithResponse(Map metadata, @@ -907,7 +997,11 @@ Mono> createSnapshotWithResponse(Map setAccessTier(AccessTier tier) { - return setAccessTierWithResponse(tier, null, null).flatMap(FluxUtil::toMono); + try { + return setAccessTierWithResponse(tier, null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -932,7 +1026,11 @@ public Mono setAccessTier(AccessTier tier) { */ public Mono> setAccessTierWithResponse(AccessTier tier, RehydratePriority priority, LeaseAccessConditions leaseAccessConditions) { - return withContext(context -> setTierWithResponse(tier, priority, leaseAccessConditions, context)); + try { + return withContext(context -> setTierWithResponse(tier, priority, leaseAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> setTierWithResponse(AccessTier tier, RehydratePriority priority, @@ -957,7 +1055,11 @@ Mono> setTierWithResponse(AccessTier tier, RehydratePriority prio * @return A reactive response signalling completion. */ public Mono undelete() { - return undeleteWithResponse().flatMap(FluxUtil::toMono); + try { + return undeleteWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -973,7 +1075,11 @@ public Mono undelete() { * @return A reactive response signalling completion. */ public Mono> undeleteWithResponse() { - return withContext(this::undeleteWithResponse); + try { + return withContext(this::undeleteWithResponse); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> undeleteWithResponse(Context context) { @@ -994,7 +1100,11 @@ Mono> undeleteWithResponse(Context context) { * @return a reactor response containing the sku name and account kind. */ public Mono getAccountInfo() { - return getAccountInfoWithResponse().flatMap(FluxUtil::toMono); + try { + return getAccountInfoWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1010,7 +1120,11 @@ public Mono getAccountInfo() { * @return a reactor response containing the sku name and account kind. */ public Mono> getAccountInfoWithResponse() { - return withContext(this::getAccountInfoWithResponse); + try { + return withContext(this::getAccountInfoWithResponse); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> getAccountInfoWithResponse(Context context) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 9ffef8e2cd4c..c7e0e98fde2f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -561,15 +561,15 @@ public Response getPropertiesWithResponse(BlobAccessConditions a * *

Code Samples

* - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setHTTPHeaders#BlobHttpHeaders} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setHttpHeaders#BlobHttpHeaders} * *

For more information, see the * Azure Docs

* * @param headers {@link BlobHttpHeaders} */ - public void setHTTPHeaders(BlobHttpHeaders headers) { - setHTTPHeadersWithResponse(headers, null, null, Context.NONE); + public void setHttpHeaders(BlobHttpHeaders headers) { + setHttpHeadersWithResponse(headers, null, null, Context.NONE); } /** @@ -578,7 +578,7 @@ public void setHTTPHeaders(BlobHttpHeaders headers) { * *

Code Samples

* - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setHTTPHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions-Duration-Context} * *

For more information, see the * Azure Docs

@@ -589,10 +589,10 @@ public void setHTTPHeaders(BlobHttpHeaders headers) { * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers. */ - public Response setHTTPHeadersWithResponse(BlobHttpHeaders headers, BlobAccessConditions accessConditions, + public Response setHttpHeadersWithResponse(BlobHttpHeaders headers, BlobAccessConditions accessConditions, Duration timeout, Context context) { Mono> response = client - .setHTTPHeadersWithResponse(headers, accessConditions, context); + .setHttpHeadersWithResponse(headers, accessConditions, context); return Utility.blockWithOptionalTimeout(response, timeout); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java index da909cc42bdc..038fab521589 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java @@ -32,6 +32,7 @@ import java.util.List; import java.util.Map; +import static com.azure.core.implementation.util.FluxUtil.monoError; import static com.azure.core.implementation.util.FluxUtil.withContext; /** @@ -99,7 +100,11 @@ public final class BlockBlobAsyncClient extends BlobAsyncClientBase { * @return A reactive response containing the information of the uploaded block blob. */ public Mono upload(Flux data, long length) { - return uploadWithResponse(data, length, null, null, null, null).flatMap(FluxUtil::toMono); + try { + return uploadWithResponse(data, length, null, null, null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -130,8 +135,12 @@ public Mono upload(Flux data, long length) { */ public Mono> uploadWithResponse(Flux data, long length, BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions) { - return withContext(context -> uploadWithResponse(data, length, headers, metadata, tier, accessConditions, - context)); + try { + return withContext(context -> uploadWithResponse(data, length, headers, metadata, tier, accessConditions, + context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> uploadWithResponse(Flux data, long length, BlobHttpHeaders headers, @@ -165,7 +174,11 @@ Mono> uploadWithResponse(Flux data, long len * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlock#String-Flux-long} */ public Mono stageBlock(String base64BlockID, Flux data, long length) { - return stageBlockWithResponse(base64BlockID, data, length, null).flatMap(FluxUtil::toMono); + try { + return stageBlockWithResponse(base64BlockID, data, length, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -192,8 +205,12 @@ public Mono stageBlock(String base64BlockID, Flux data, long l */ public Mono> stageBlockWithResponse(String base64BlockID, Flux data, long length, LeaseAccessConditions leaseAccessConditions) { - return withContext(context -> stageBlockWithResponse(base64BlockID, data, length, leaseAccessConditions, - context)); + try { + return withContext(context -> stageBlockWithResponse(base64BlockID, data, length, leaseAccessConditions, + context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> stageBlockWithResponse(String base64BlockID, Flux data, long length, @@ -222,8 +239,12 @@ base64BlockID, length, data, null, null, null, null, leaseAccessConditions, getC * @return A reactive response signalling completion. */ public Mono stageBlockFromURL(String base64BlockID, String sourceUrl, BlobRange sourceRange) { - return this.stageBlockFromURLWithResponse(base64BlockID, sourceUrl, sourceRange, null, null, null) - .flatMap(FluxUtil::toMono); + try { + return this.stageBlockFromURLWithResponse(base64BlockID, sourceUrl, sourceRange, null, null, null) + .flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -252,8 +273,12 @@ public Mono stageBlockFromURL(String base64BlockID, String sourceUrl, Blob public Mono> stageBlockFromURLWithResponse(String base64BlockID, String sourceUrl, BlobRange sourceRange, byte[] sourceContentMD5, LeaseAccessConditions leaseAccessConditions, SourceModifiedAccessConditions sourceModifiedAccessConditions) { - return withContext(context -> stageBlockFromURLWithResponse(base64BlockID, sourceUrl, sourceRange, - sourceContentMD5, leaseAccessConditions, sourceModifiedAccessConditions)); + try { + return withContext(context -> stageBlockFromURLWithResponse(base64BlockID, sourceUrl, sourceRange, + sourceContentMD5, leaseAccessConditions, sourceModifiedAccessConditions)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> stageBlockFromURLWithResponse(String base64BlockID, String sourceUrl, @@ -287,7 +312,11 @@ null, getCustomerProvidedKey(), leaseAccessConditions, sourceModifiedAccessCondi * @return A reactive response containing the list of blocks. */ public Mono listBlocks(BlockListType listType) { - return this.listBlocksWithResponse(listType, null).map(Response::getValue); + try { + return this.listBlocksWithResponse(listType, null).map(Response::getValue); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -306,8 +335,11 @@ public Mono listBlocks(BlockListType listType) { */ public Mono> listBlocksWithResponse(BlockListType listType, LeaseAccessConditions leaseAccessConditions) { - - return withContext(context -> listBlocksWithResponse(listType, leaseAccessConditions, context)); + try { + return withContext(context -> listBlocksWithResponse(listType, leaseAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> listBlocksWithResponse(BlockListType listType, @@ -334,7 +366,11 @@ null, listType, getSnapshotId(), null, null, leaseAccessConditions, context) * @return A reactive response containing the information of the block blob. */ public Mono commitBlockList(List base64BlockIDs) { - return commitBlockListWithResponse(base64BlockIDs, null, null, null, null).flatMap(FluxUtil::toMono); + try { + return commitBlockListWithResponse(base64BlockIDs, null, null, null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -358,8 +394,12 @@ public Mono commitBlockList(List base64BlockIDs) { */ public Mono> commitBlockListWithResponse(List base64BlockIDs, BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions) { - return withContext(context -> commitBlockListWithResponse(base64BlockIDs, headers, metadata, tier, - accessConditions, context)); + try { + return withContext(context -> commitBlockListWithResponse(base64BlockIDs, headers, metadata, tier, + accessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> commitBlockListWithResponse(List base64BlockIDs, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java index d9c33fe5316a..f6803c6bf9af 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java @@ -21,6 +21,7 @@ import java.net.URL; +import static com.azure.core.implementation.util.FluxUtil.monoError; import static com.azure.core.implementation.util.FluxUtil.withContext; /** @@ -96,7 +97,11 @@ public String getLeaseId() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono acquireLease(int duration) { - return acquireLeaseWithResponse(duration, null).flatMap(FluxUtil::toMono); + try { + return acquireLeaseWithResponse(duration, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -116,7 +121,11 @@ public Mono acquireLease(int duration) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> acquireLeaseWithResponse(int duration, ModifiedAccessConditions modifiedAccessConditions) { - return withContext(context -> acquireLeaseWithResponse(duration, modifiedAccessConditions, context)); + try { + return withContext(context -> acquireLeaseWithResponse(duration, modifiedAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> acquireLeaseWithResponse(int duration, ModifiedAccessConditions modifiedAccessConditions, @@ -143,7 +152,11 @@ Mono> acquireLeaseWithResponse(int duration, ModifiedAccessCond */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono renewLease() { - return renewLeaseWithResponse(null).flatMap(FluxUtil::toMono); + try { + return renewLeaseWithResponse(null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -160,7 +173,11 @@ public Mono renewLease() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> renewLeaseWithResponse(ModifiedAccessConditions modifiedAccessConditions) { - return withContext(context -> renewLeaseWithResponse(modifiedAccessConditions, context)); + try { + return withContext(context -> renewLeaseWithResponse(modifiedAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> renewLeaseWithResponse(ModifiedAccessConditions modifiedAccessConditions, Context context) { @@ -186,7 +203,11 @@ Mono> renewLeaseWithResponse(ModifiedAccessConditions modifiedA */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono releaseLease() { - return releaseLeaseWithResponse(null).flatMap(FluxUtil::toMono); + try { + return releaseLeaseWithResponse(null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -203,7 +224,11 @@ public Mono releaseLease() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> releaseLeaseWithResponse(ModifiedAccessConditions modifiedAccessConditions) { - return withContext(context -> releaseLeaseWithResponse(modifiedAccessConditions, context)); + try { + return withContext(context -> releaseLeaseWithResponse(modifiedAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> releaseLeaseWithResponse(ModifiedAccessConditions modifiedAccessConditions, Context context) { @@ -229,7 +254,11 @@ Mono> releaseLeaseWithResponse(ModifiedAccessConditions modifiedA */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono breakLease() { - return breakLeaseWithResponse(null, null).flatMap(FluxUtil::toMono); + try { + return breakLeaseWithResponse(null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -254,7 +283,12 @@ public Mono breakLease() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> breakLeaseWithResponse(Integer breakPeriodInSeconds, ModifiedAccessConditions modifiedAccessConditions) { - return withContext(context -> breakLeaseWithResponse(breakPeriodInSeconds, modifiedAccessConditions, context)); + try { + return withContext( + context -> breakLeaseWithResponse(breakPeriodInSeconds, modifiedAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> breakLeaseWithResponse(Integer breakPeriodInSeconds, @@ -282,7 +316,11 @@ Mono> breakLeaseWithResponse(Integer breakPeriodInSeconds, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono changeLease(String proposedId) { - return changeLeaseWithResponse(proposedId, null).flatMap(FluxUtil::toMono); + try { + return changeLeaseWithResponse(proposedId, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -301,7 +339,11 @@ public Mono changeLease(String proposedId) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> changeLeaseWithResponse(String proposedId, ModifiedAccessConditions modifiedAccessConditions) { - return withContext(context -> changeLeaseWithResponse(proposedId, modifiedAccessConditions, context)); + try { + return withContext(context -> changeLeaseWithResponse(proposedId, modifiedAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> changeLeaseWithResponse(String proposedId, ModifiedAccessConditions modifiedAccessConditions, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java index d6d694431f24..0115de678cdc 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java @@ -33,6 +33,7 @@ import java.nio.ByteBuffer; import java.util.Map; +import static com.azure.core.implementation.util.FluxUtil.monoError; import static com.azure.core.implementation.util.FluxUtil.withContext; /** @@ -87,7 +88,11 @@ public final class PageBlobAsyncClient extends BlobAsyncClientBase { * @return A reactive response containing the information of the created page blob. */ public Mono create(long size) { - return createWithResponse(size, null, null, null, null).flatMap(FluxUtil::toMono); + try { + return createWithResponse(size, null, null, null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -112,8 +117,12 @@ public Mono create(long size) { */ public Mono> createWithResponse(long size, Long sequenceNumber, BlobHttpHeaders headers, Map metadata, BlobAccessConditions accessConditions) { - return withContext(context -> - createWithResponse(size, sequenceNumber, headers, metadata, accessConditions, context)); + try { + return withContext(context -> + createWithResponse(size, sequenceNumber, headers, metadata, accessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> createWithResponse(long size, Long sequenceNumber, BlobHttpHeaders headers, @@ -159,7 +168,11 @@ Mono> createWithResponse(long size, Long sequenceNumber, * @return A reactive response containing the information of the uploaded pages. */ public Mono uploadPages(PageRange pageRange, Flux body) { - return uploadPagesWithResponse(pageRange, body, null).flatMap(FluxUtil::toMono); + try { + return uploadPagesWithResponse(pageRange, body, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -185,7 +198,11 @@ public Mono uploadPages(PageRange pageRange, Flux body */ public Mono> uploadPagesWithResponse(PageRange pageRange, Flux body, PageBlobAccessConditions pageBlobAccessConditions) { - return withContext(context -> uploadPagesWithResponse(pageRange, body, pageBlobAccessConditions, context)); + try { + return withContext(context -> uploadPagesWithResponse(pageRange, body, pageBlobAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> uploadPagesWithResponse(PageRange pageRange, Flux body, @@ -230,8 +247,12 @@ Mono> uploadPagesWithResponse(PageRange pageRange, Flux uploadPagesFromURL(PageRange range, String sourceUrl, Long sourceOffset) { - return uploadPagesFromURLWithResponse(range, sourceUrl, sourceOffset, null, null, null) - .flatMap(FluxUtil::toMono); + try { + return uploadPagesFromURLWithResponse(range, sourceUrl, sourceOffset, null, null, null) + .flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -261,8 +282,13 @@ public Mono uploadPagesFromURL(PageRange range, String sourceUrl, public Mono> uploadPagesFromURLWithResponse(PageRange range, String sourceUrl, Long sourceOffset, byte[] sourceContentMD5, PageBlobAccessConditions destAccessConditions, SourceModifiedAccessConditions sourceAccessConditions) { - return withContext(context -> uploadPagesFromURLWithResponse(range, sourceUrl, sourceOffset, sourceContentMD5, - destAccessConditions, sourceAccessConditions, context)); + try { + return withContext( + context -> uploadPagesFromURLWithResponse(range, sourceUrl, sourceOffset, sourceContentMD5, + destAccessConditions, sourceAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> uploadPagesFromURLWithResponse(PageRange range, String sourceUrl, Long sourceOffset, @@ -314,7 +340,11 @@ Mono> uploadPagesFromURLWithResponse(PageRange range, Str * @return A reactive response containing the information of the cleared pages. */ public Mono clearPages(PageRange pageRange) { - return clearPagesWithResponse(pageRange, null).flatMap(FluxUtil::toMono); + try { + return clearPagesWithResponse(pageRange, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -334,7 +364,11 @@ public Mono clearPages(PageRange pageRange) { */ public Mono> clearPagesWithResponse(PageRange pageRange, PageBlobAccessConditions pageBlobAccessConditions) { - return withContext(context -> clearPagesWithResponse(pageRange, pageBlobAccessConditions, context)); + try { + return withContext(context -> clearPagesWithResponse(pageRange, pageBlobAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> clearPagesWithResponse(PageRange pageRange, @@ -369,7 +403,11 @@ Mono> clearPagesWithResponse(PageRange pageRange, * @return A reactive response containing the information of the cleared pages. */ public Mono getPageRanges(BlobRange blobRange) { - return getPageRangesWithResponse(blobRange, null).flatMap(FluxUtil::toMono); + try { + return getPageRangesWithResponse(blobRange, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -386,7 +424,11 @@ public Mono getPageRanges(BlobRange blobRange) { */ public Mono> getPageRangesWithResponse(BlobRange blobRange, BlobAccessConditions accessConditions) { - return withContext(context -> getPageRangesWithResponse(blobRange, accessConditions, context)); + try { + return withContext(context -> getPageRangesWithResponse(blobRange, accessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> getPageRangesWithResponse(BlobRange blobRange, BlobAccessConditions accessConditions, @@ -416,7 +458,11 @@ null, null, getSnapshotId(), null, blobRange.toHeaderValue(), * @return A reactive response emitting all the different page ranges. */ public Mono getPageRangesDiff(BlobRange blobRange, String prevSnapshot) { - return getPageRangesDiffWithResponse(blobRange, prevSnapshot, null).flatMap(FluxUtil::toMono); + try { + return getPageRangesDiffWithResponse(blobRange, prevSnapshot, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -438,8 +484,12 @@ public Mono getPageRangesDiff(BlobRange blobRange, String prevSnapshot */ public Mono> getPageRangesDiffWithResponse(BlobRange blobRange, String prevSnapshot, BlobAccessConditions accessConditions) { - return withContext(context -> - getPageRangesDiffWithResponse(blobRange, prevSnapshot, accessConditions, context)); + try { + return withContext(context -> + getPageRangesDiffWithResponse(blobRange, prevSnapshot, accessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> getPageRangesDiffWithResponse(BlobRange blobRange, String prevSnapshot, @@ -471,7 +521,11 @@ null, null, getSnapshotId(), null, prevSnapshot, * @return A reactive response emitting the resized page blob. */ public Mono resize(long size) { - return resizeWithResponse(size, null).flatMap(FluxUtil::toMono); + try { + return resizeWithResponse(size, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -489,7 +543,11 @@ public Mono resize(long size) { * @throws IllegalArgumentException If {@code size} isn't a multiple of {@link PageBlobAsyncClient#PAGE_BYTES} */ public Mono> resizeWithResponse(long size, BlobAccessConditions accessConditions) { - return withContext(context -> resizeWithResponse(size, accessConditions, context)); + try { + return withContext(context -> resizeWithResponse(size, accessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> resizeWithResponse(long size, BlobAccessConditions accessConditions, Context context) { @@ -521,7 +579,11 @@ Mono> resizeWithResponse(long size, BlobAccessConditions * @return A reactive response emitting the updated page blob. */ public Mono updateSequenceNumber(SequenceNumberActionType action, Long sequenceNumber) { - return updateSequenceNumberWithResponse(action, sequenceNumber, null).flatMap(FluxUtil::toMono); + try { + return updateSequenceNumberWithResponse(action, sequenceNumber, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -541,8 +603,12 @@ public Mono updateSequenceNumber(SequenceNumberActionType action, */ public Mono> updateSequenceNumberWithResponse(SequenceNumberActionType action, Long sequenceNumber, BlobAccessConditions accessConditions) { - return withContext(context -> - updateSequenceNumberWithResponse(action, sequenceNumber, accessConditions, context)); + try { + return withContext(context -> + updateSequenceNumberWithResponse(action, sequenceNumber, accessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> updateSequenceNumberWithResponse(SequenceNumberActionType action, Long sequenceNumber, @@ -579,7 +645,11 @@ Mono> updateSequenceNumberWithResponse(SequenceNumberActi * @return A reactive response emitting the copy status. */ public Mono copyIncremental(String source, String snapshot) { - return copyIncrementalWithResponse(source, snapshot, null).flatMap(FluxUtil::toMono); + try { + return copyIncrementalWithResponse(source, snapshot, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -604,7 +674,12 @@ public Mono copyIncremental(String source, String snapshot) { */ public Mono> copyIncrementalWithResponse(String source, String snapshot, ModifiedAccessConditions modifiedAccessConditions) { - return withContext(context -> copyIncrementalWithResponse(source, snapshot, modifiedAccessConditions, context)); + try { + return withContext( + context -> copyIncrementalWithResponse(source, snapshot, modifiedAccessConditions, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } Mono> copyIncrementalWithResponse(String source, String snapshot, diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java index b6213e48386d..a259bae63bff 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java @@ -159,11 +159,11 @@ public void getPropertiesCodeSnippet() { } /** - * Code snippets for {@link BlobAsyncClient#setHTTPHeaders(BlobHttpHeaders)} + * Code snippets for {@link BlobAsyncClient#setHttpHeaders(BlobHttpHeaders)} */ public void setHTTPHeadersCodeSnippet() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.setHTTPHeaders#BlobHttpHeaders - client.setHTTPHeaders(new BlobHttpHeaders() + client.setHttpHeaders(new BlobHttpHeaders() .setBlobContentLanguage("en-US") .setBlobContentType("binary")); // END: com.azure.storage.blob.BlobAsyncClient.setHTTPHeaders#BlobHttpHeaders @@ -327,21 +327,21 @@ public void getPropertiesWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClient#setHTTPHeadersWithResponse(BlobHttpHeaders, BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClient#setHttpHeadersWithResponse(BlobHttpHeaders, BlobAccessConditions)} */ public void setHTTPHeadersWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobAsyncClient.setHTTPHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions + // BEGIN: com.azure.storage.blob.BlobAsyncClient.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions BlobAccessConditions accessConditions = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); - client.setHTTPHeadersWithResponse(new BlobHttpHeaders() + client.setHttpHeadersWithResponse(new BlobHttpHeaders() .setBlobContentLanguage("en-US") .setBlobContentType("binary"), accessConditions).subscribe( response -> System.out.printf("Set HTTP headers completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.BlobAsyncClient.setHTTPHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions + // END: com.azure.storage.blob.BlobAsyncClient.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java index c046e24a87cc..9244e128a849 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java @@ -133,11 +133,11 @@ public void getProperties() { } /** - * Code snippets for {@link BlobClient#setHTTPHeaders(BlobHttpHeaders)} + * Code snippets for {@link BlobClient#setHttpHeaders(BlobHttpHeaders)} */ public void setHTTPHeaders() { // BEGIN: com.azure.storage.blob.BlobClient.setHTTPHeaders#BlobHttpHeaders - client.setHTTPHeaders(new BlobHttpHeaders() + client.setHttpHeaders(new BlobHttpHeaders() .setBlobContentLanguage("en-US") .setBlobContentType("binary")); System.out.println("Set HTTP headers completed"); @@ -304,7 +304,7 @@ public void getPropertiesWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClient#setHTTPHeadersWithResponse(BlobHttpHeaders, BlobAccessConditions, Duration, + * Code snippets for {@link BlobClient#setHttpHeadersWithResponse(BlobHttpHeaders, BlobAccessConditions, Duration, * Context)} */ public void setHTTPHeadersWithResponseCodeSnippets() { @@ -313,7 +313,7 @@ public void setHTTPHeadersWithResponseCodeSnippets() { .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); System.out.printf("Set HTTP headers completed with status %d%n", - client.setHTTPHeadersWithResponse(new BlobHttpHeaders() + client.setHttpHeadersWithResponse(new BlobHttpHeaders() .setBlobContentLanguage("en-US") .setBlobContentType("binary"), accessConditions, timeout, new Context(key1, value1)) .getStatusCode()); diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java index 9ba5cc1fb041..c49f1c4d1ff1 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java @@ -150,14 +150,14 @@ public void getPropertiesCodeSnippet() { } /** - * Code snippets for {@link BlobAsyncClientBase#setHTTPHeaders(BlobHttpHeaders)} + * Code snippets for {@link BlobAsyncClientBase#setHttpHeaders(BlobHttpHeaders)} */ public void setHTTPHeadersCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHTTPHeaders#BlobHttpHeaders - client.setHTTPHeaders(new BlobHttpHeaders() + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeaders#BlobHttpHeaders + client.setHttpHeaders(new BlobHttpHeaders() .setBlobContentLanguage("en-US") .setBlobContentType("binary")); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHTTPHeaders#BlobHttpHeaders + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeaders#BlobHttpHeaders } /** @@ -317,21 +317,21 @@ public void getPropertiesWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClientBase#setHTTPHeadersWithResponse(BlobHttpHeaders, BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClientBase#setHttpHeadersWithResponse(BlobHttpHeaders, BlobAccessConditions)} */ public void setHTTPHeadersWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHTTPHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions BlobAccessConditions accessConditions = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); - client.setHTTPHeadersWithResponse(new BlobHttpHeaders() + client.setHttpHeadersWithResponse(new BlobHttpHeaders() .setBlobContentLanguage("en-US") .setBlobContentType("binary"), accessConditions).subscribe( response -> System.out.printf("Set HTTP headers completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHTTPHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java index cb605041df97..3b6475f532d7 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java @@ -131,15 +131,15 @@ public void getProperties() { } /** - * Code snippets for {@link BlobClientBase#setHTTPHeaders(BlobHttpHeaders)} + * Code snippets for {@link BlobClientBase#setHttpHeaders(BlobHttpHeaders)} */ public void setHTTPHeaders() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setHTTPHeaders#BlobHttpHeaders - client.setHTTPHeaders(new BlobHttpHeaders() + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setHttpHeaders#BlobHttpHeaders + client.setHttpHeaders(new BlobHttpHeaders() .setBlobContentLanguage("en-US") .setBlobContentType("binary")); System.out.println("Set HTTP headers completed"); - // END: com.azure.storage.blob.specialized.BlobClientBase.setHTTPHeaders#BlobHttpHeaders + // END: com.azure.storage.blob.specialized.BlobClientBase.setHttpHeaders#BlobHttpHeaders } /** @@ -302,20 +302,20 @@ public void getPropertiesWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClientBase#setHTTPHeadersWithResponse(BlobHttpHeaders, BlobAccessConditions, Duration, + * Code snippets for {@link BlobClientBase#setHttpHeadersWithResponse(BlobHttpHeaders, BlobAccessConditions, Duration, * Context)} */ public void setHTTPHeadersWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setHTTPHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions-Duration-Context BlobAccessConditions accessConditions = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); System.out.printf("Set HTTP headers completed with status %d%n", - client.setHTTPHeadersWithResponse(new BlobHttpHeaders() + client.setHttpHeadersWithResponse(new BlobHttpHeaders() .setBlobContentLanguage("en-US") .setBlobContentType("binary"), accessConditions, timeout, new Context(key1, value1)) .getStatusCode()); - // END: com.azure.storage.blob.specialized.BlobClientBase.setHTTPHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions-Duration-Context } /** diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy index 1a03bfc511cd..efb5abc3054d 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy @@ -386,7 +386,7 @@ class BlobAPITest extends APISpec { def "Set HTTP headers null"() { setup: - def response = bc.setHTTPHeadersWithResponse(null, null, null, null) + def response = bc.setHttpHeadersWithResponse(null, null, null, null) expect: response.getStatusCode() == 200 @@ -404,7 +404,7 @@ class BlobAPITest extends APISpec { .setBlobContentLanguage(properties.getContentLanguage()) .setBlobContentMD5(Base64.getEncoder().encode(MessageDigest.getInstance("MD5").digest(defaultData.array()))) - bc.setHTTPHeaders(headers) + bc.setHttpHeaders(headers) expect: bc.getProperties().getContentType() == "type" @@ -420,7 +420,7 @@ class BlobAPITest extends APISpec { .setBlobContentMD5(contentMD5) .setBlobContentType(contentType) - bc.setHTTPHeaders(putHeaders) + bc.setHttpHeaders(putHeaders) expect: validateBlobProperties( @@ -448,7 +448,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch)) expect: - bc.setHTTPHeadersWithResponse(null, bac, null, null).getStatusCode() == 200 + bc.setHttpHeadersWithResponse(null, bac, null, null).getStatusCode() == 200 where: modified | unmodified | match | noneMatch | leaseID @@ -474,7 +474,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch)) when: - bc.setHTTPHeadersWithResponse(null, bac, null, null) + bc.setHttpHeadersWithResponse(null, bac, null, null) then: thrown(BlobStorageException) @@ -493,7 +493,7 @@ class BlobAPITest extends APISpec { bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - bc.setHTTPHeaders(null) + bc.setHttpHeaders(null) then: thrown(BlobStorageException) From e7097d6ab7caa27cdbc03f2d8a67a9675b02ecae Mon Sep 17 00:00:00 2001 From: Hemant Tanwar Date: Thu, 17 Oct 2019 16:57:33 -0700 Subject: [PATCH 04/64] preview 4 API review comments (#5859) * preview 4 API review comments --- .../azure/storage/blob/batch/BlobBatch.java | 4 +- .../azure/storage/blob/batch/APISpec.groovy | 23 ++++----- .../EncryptedBlobClientBuilder.java | 30 ++++++------ .../specialized/cryptography/APISpec.groovy | 18 +++---- .../azure/storage/blob/BlobClientBuilder.java | 34 ++++++------- .../blob/BlobContainerClientBuilder.java | 30 ++++++------ .../blob/BlobServiceClientBuilder.java | 24 ++++----- .../implementation/util/BuilderHelper.java | 9 ++-- .../BlobServiceSasQueryParameters.java | 4 +- .../BlobServiceSasSignatureValues.java | 15 +++--- .../SpecializedBlobClientBuilder.java | 26 +++++----- .../blob/AsyncBufferedUploadExample.java | 8 +-- .../com/azure/storage/blob/BasicExample.java | 4 +- .../BlobClientBuilderJavaDocCodeSnippets.java | 10 ++-- ...ainerClientBuilderJavaDocCodeSnippets.java | 10 ++-- .../storage/blob/FileTransferExample.java | 4 +- .../storage/blob/ListContainersExample.java | 4 +- .../SetMetadataAndHTTPHeadersExample.java | 4 +- .../com/azure/storage/blob/APISpec.groovy | 32 ++++++------ .../com/azure/storage/blob/SASTest.groovy | 21 ++++---- .../azure/storage/blob/ServiceAPITest.groovy | 7 ++- .../blob/specialized/HelperTest.groovy | 17 ++++--- ...l.java => StorageSharedKeyCredential.java} | 15 +++--- .../com/azure/storage/common/Utility.java | 22 +++++---- .../common/credentials/package-info.java | 7 --- .../common/implementation/Constants.java | 2 +- .../common/policy/RequestRetryOptions.java | 5 +- .../common/policy/RequestRetryPolicy.java | 2 +- ... => StorageSharedKeyCredentialPolicy.java} | 12 ++--- .../{ => sas}/AccountSasPermission.java | 14 +++--- .../{ => sas}/AccountSasQueryParameters.java | 14 +++--- .../{ => sas}/AccountSasResourceType.java | 2 +- .../common/{ => sas}/AccountSasService.java | 2 +- .../{ => sas}/AccountSasSignatureValues.java | 31 ++++++------ .../{ => sas}/BaseSasQueryParameters.java | 9 ++-- .../storage/common/{ => sas}/SasProtocol.java | 2 +- .../src/main/java/module-info.java | 3 +- ...haredKeyCredentialJavaDocCodeSnippets.java | 20 ++++++++ ...haredKeyCredentialJavaDocCodeSnippets.java | 20 -------- .../com/azure/storage/file/BuilderHelper.java | 8 +-- .../storage/file/DirectoryAsyncClient.java | 4 +- .../azure/storage/file/DirectoryClient.java | 4 +- .../azure/storage/file/FileAsyncClient.java | 4 +- .../com/azure/storage/file/FileClient.java | 4 +- .../azure/storage/file/FileClientBuilder.java | 49 ++++++++++--------- .../storage/file/FileServiceAsyncClient.java | 4 +- .../azure/storage/file/FileServiceClient.java | 4 +- .../file/FileServiceClientBuilder.java | 41 ++++++++-------- .../file/FileServiceSasQueryParameters.java | 4 +- .../file/FileServiceSasSignatureValues.java | 15 +++--- .../azure/storage/file/ShareAsyncClient.java | 4 +- .../com/azure/storage/file/ShareClient.java | 4 +- .../storage/file/ShareClientBuilder.java | 41 ++++++++-------- .../DirectoryAsyncJavaDocCodeSamples.java | 4 +- .../file/DirectoryJavaDocCodeSamples.java | 4 +- .../file/FileAsyncJavaDocCodeSamples.java | 4 +- .../storage/file/FileJavaDocCodeSamples.java | 4 +- .../FileServiceAsyncJavaDocCodeSamples.java | 4 +- .../file/FileServiceJavaDocCodeSamples.java | 4 +- .../file/ShareAsyncJavaDocCodeSamples.java | 4 +- .../storage/file/ShareJavaDocCodeSamples.java | 4 +- .../storage/file/DirectoryAPITests.groovy | 6 +-- .../file/DirectoryAsyncAPITests.groovy | 4 +- .../azure/storage/file/FileAPITests.groovy | 8 +-- .../storage/file/FileAsyncAPITests.groovy | 6 +-- .../azure/storage/file/FileSASTests.groovy | 20 ++++---- .../storage/file/FileServiceAPITests.groovy | 4 +- .../file/FileServiceAsyncAPITests.groovy | 4 +- .../azure/storage/file/ShareAPITests.groovy | 6 +-- .../storage/file/ShareAsyncAPITests.groovy | 4 +- .../azure/storage/queue/BuilderHelper.java | 9 ++-- .../azure/storage/queue/QueueAsyncClient.java | 24 +++++---- .../com/azure/storage/queue/QueueClient.java | 4 +- .../storage/queue/QueueClientBuilder.java | 43 ++++++++-------- .../storage/queue/QueueSasPermission.java | 6 +-- .../queue/QueueServiceAsyncClient.java | 4 +- .../storage/queue/QueueServiceClient.java | 4 +- .../queue/QueueServiceClientBuilder.java | 43 ++++++++-------- .../queue/QueueServiceSasQueryParameters.java | 19 +++---- .../queue/QueueServiceSasSignatureValues.java | 13 ++--- .../queue/QueueAsyncJavaDocCodeSamples.java | 22 ++++----- .../queue/QueueJavaDocCodeSamples.java | 4 +- .../QueueServiceAsyncJavaDocCodeSamples.java | 4 +- .../queue/QueueServiceJavaDocCodeSamples.java | 4 +- .../azure/storage/queue/QueueAPITests.groovy | 4 +- .../storage/queue/QueueAysncAPITests.groovy | 4 +- .../azure/storage/queue/QueueSASTests.groovy | 22 ++++----- 87 files changed, 529 insertions(+), 508 deletions(-) rename sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/{credentials/SharedKeyCredential.java => StorageSharedKeyCredential.java} (93%) delete mode 100644 sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/credentials/package-info.java rename sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/{SharedKeyCredentialPolicy.java => StorageSharedKeyCredentialPolicy.java} (74%) rename sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/{ => sas}/AccountSasPermission.java (95%) rename sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/{ => sas}/AccountSasQueryParameters.java (91%) rename sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/{ => sas}/AccountSasResourceType.java (99%) rename sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/{ => sas}/AccountSasService.java (99%) rename sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/{ => sas}/AccountSasSignatureValues.java (89%) rename sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/{ => sas}/BaseSasQueryParameters.java (98%) rename sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/{ => sas}/SasProtocol.java (97%) create mode 100644 sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/StorageSharedKeyCredentialJavaDocCodeSnippets.java delete mode 100644 sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/credentials/SharedKeyCredentialJavaDocCodeSnippets.java diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java index 8ad8ae49532c..b695220f7eae 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java @@ -21,7 +21,7 @@ import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.common.policy.SharedKeyCredentialPolicy; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import reactor.core.Disposable; import reactor.core.Exceptions; import reactor.core.publisher.Flux; @@ -98,7 +98,7 @@ public final class BlobBatch { for (int i = 0; i < pipeline.getPolicyCount(); i++) { HttpPipelinePolicy policy = pipeline.getPolicy(i); - if (policy instanceof SharedKeyCredentialPolicy) { + if (policy instanceof StorageSharedKeyCredentialPolicy) { batchHeadersPolicySet = true; // The batch policy needs to be added before the SharedKey policy to run preparation cleanup. batchPipelineBuilder.policies(this::cleanseHeaders, this::setRequestUrl); diff --git a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy index b11774841d4e..f558052c194c 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy +++ b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy @@ -25,7 +25,7 @@ import com.azure.storage.blob.models.LeaseStateType import com.azure.storage.blob.models.ListBlobContainersOptions import com.azure.storage.blob.specialized.LeaseClient import com.azure.storage.blob.specialized.LeaseClientBuilder -import com.azure.storage.common.credentials.SharedKeyCredential +import com.azure.storage.common.StorageSharedKeyCredential import reactor.core.publisher.Flux import spock.lang.Requires import spock.lang.Shared @@ -75,7 +75,7 @@ class APISpec extends Specification { static def AZURE_TEST_MODE = "AZURE_TEST_MODE" static def PRIMARY_STORAGE = "PRIMARY_STORAGE_" - protected static SharedKeyCredential primaryCredential + protected static StorageSharedKeyCredential primaryCredential static TestMode testMode BlobServiceClient primaryBlobServiceClient @@ -146,7 +146,7 @@ class APISpec extends Specification { return setupTestMode() == TestMode.RECORD } - private SharedKeyCredential getCredential(String accountType) { + private StorageSharedKeyCredential getCredential(String accountType) { String accountName String accountKey @@ -163,10 +163,10 @@ class APISpec extends Specification { return null } - return new SharedKeyCredential(accountName, accountKey) + return new StorageSharedKeyCredential(accountName, accountKey) } - BlobServiceClient setClient(SharedKeyCredential credential) { + BlobServiceClient setClient(StorageSharedKeyCredential credential) { try { return getServiceClient(credential) } catch (Exception ignore) { @@ -197,15 +197,16 @@ class APISpec extends Specification { return getServiceClient(null, endpoint, null) } - BlobServiceClient getServiceClient(SharedKeyCredential credential) { - return getServiceClient(credential, String.format(defaultEndpointTemplate, credential.getAccountName()), null) + BlobServiceClient getServiceClient(StorageSharedKeyCredential credential) { + return getServiceClient(credential, String.format(defaultEndpointTemplate, credential.getAccountName()), + null) } - BlobServiceClient getServiceClient(SharedKeyCredential credential, String endpoint) { + BlobServiceClient getServiceClient(StorageSharedKeyCredential credential, String endpoint) { return getServiceClient(credential, endpoint, null) } - BlobServiceClient getServiceClient(SharedKeyCredential credential, String endpoint, + BlobServiceClient getServiceClient(StorageSharedKeyCredential credential, String endpoint, HttpPipelinePolicy... policies) { return getServiceClientBuilder(credential, endpoint, policies).buildClient() } @@ -214,12 +215,12 @@ class APISpec extends Specification { return getServiceClientBuilder(null, endpoint, null).sasToken(sasToken).buildClient() } - BlobServiceAsyncClient getServiceAsyncClient(SharedKeyCredential credential) { + BlobServiceAsyncClient getServiceAsyncClient(StorageSharedKeyCredential credential) { return getServiceClientBuilder(credential, String.format(defaultEndpointTemplate, credential.getAccountName())) .buildAsyncClient() } - BlobServiceClientBuilder getServiceClientBuilder(SharedKeyCredential credential, String endpoint, + BlobServiceClientBuilder getServiceClientBuilder(StorageSharedKeyCredential credential, String endpoint, HttpPipelinePolicy... policies) { BlobServiceClientBuilder builder = new BlobServiceClientBuilder() .endpoint(endpoint) diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java index 814fcd482d20..4297056aea57 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java @@ -28,14 +28,14 @@ import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; import com.azure.storage.common.policy.RequestRetryPolicy; import com.azure.storage.common.policy.ResponseValidationPolicyBuilder; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import com.azure.storage.common.policy.ScrubEtagPolicy; -import com.azure.storage.common.policy.SharedKeyCredentialPolicy; import java.net.MalformedURLException; import java.net.URL; @@ -55,7 +55,7 @@ * {@code https://{accountName}.blob.core.windows.net/{containerName}/{blobName}}. *
  • Container and blob name if not specified in the {@link #endpoint(String)}, set through * {@link #containerName(String)} and {@link #blobName(String)} respectively. - *
  • Credential set through {@link #credential(SharedKeyCredential)} , {@link #sasToken(String)}, or + *
  • Credential set through {@link #credential(StorageSharedKeyCredential)} , {@link #sasToken(String)}, or * {@link #connectionString(String)} if the container is not publicly accessible. *
  • Key and key wrapping algorithm (for encryption) and/or key resolver (for decryption) must be specified * through {@link #key(AsyncKeyEncryptionKey, String)} and {@link #keyResolver(AsyncKeyEncryptionKeyResolver)} @@ -79,7 +79,7 @@ public final class EncryptedBlobClientBuilder { private String blobName; private String snapshot; - private SharedKeyCredential sharedKeyCredential; + private StorageSharedKeyCredential storageSharedKeyCredential; private TokenCredential tokenCredential; private SasTokenCredential sasTokenCredential; @@ -135,8 +135,8 @@ private AzureBlobStorageImpl constructImpl() { policies.add(new RequestIdPolicy()); policies.add(new AddDatePolicy()); - if (sharedKeyCredential != null) { - policies.add(new SharedKeyCredentialPolicy(sharedKeyCredential)); + if (storageSharedKeyCredential != null) { + policies.add(new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential)); } else if (tokenCredential != null) { policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, String.format("%s/.default", endpoint))); } else if (sasTokenCredential != null) { @@ -243,14 +243,14 @@ private void checkValidEncryptionParameters() { } /** - * Sets the {@link SharedKeyCredential} used to authorize requests sent to the service. + * Sets the {@link StorageSharedKeyCredential} used to authorize requests sent to the service. * * @param credential The credential to use for authenticating request. * @return the updated EncryptedBlobClientBuilder * @throws NullPointerException If {@code credential} is {@code null}. */ - public EncryptedBlobClientBuilder credential(SharedKeyCredential credential) { - this.sharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); + public EncryptedBlobClientBuilder credential(StorageSharedKeyCredential credential) { + this.storageSharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); this.tokenCredential = null; this.sasTokenCredential = null; return this; @@ -265,7 +265,7 @@ public EncryptedBlobClientBuilder credential(SharedKeyCredential credential) { */ public EncryptedBlobClientBuilder credential(TokenCredential credential) { this.tokenCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.sasTokenCredential = null; return this; } @@ -280,7 +280,7 @@ public EncryptedBlobClientBuilder credential(TokenCredential credential) { public EncryptedBlobClientBuilder sasToken(String sasToken) { this.sasTokenCredential = new SasTokenCredential(Objects.requireNonNull(sasToken, "'sasToken' cannot be null.")); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.tokenCredential = null; return this; } @@ -293,15 +293,15 @@ public EncryptedBlobClientBuilder sasToken(String sasToken) { * @return the updated EncryptedBlobClientBuilder */ public EncryptedBlobClientBuilder setAnonymousAccess() { - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.tokenCredential = null; this.sasTokenCredential = null; return this; } /** - * Constructs a {@link SharedKeyCredential} used to authorize requests sent to the service. Additionally, if the - * connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link + * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, + * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link * #endpoint(String) endpoint}. * * @param connectionString Connection string of the storage account. @@ -331,7 +331,7 @@ public EncryptedBlobClientBuilder connectionString(String connectionString) { } this.accountName = accountName; - return credential(new SharedKeyCredential(accountName, accountKey)); + return credential(new StorageSharedKeyCredential(accountName, accountKey)); } /** diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy index 814671c184ae..8354d14f5386 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy @@ -21,7 +21,7 @@ import com.azure.storage.blob.BlobProperties import com.azure.storage.blob.BlobServiceClientBuilder import com.azure.storage.blob.specialized.LeaseClient import com.azure.storage.blob.specialized.LeaseClientBuilder -import com.azure.storage.common.credentials.SharedKeyCredential +import com.azure.storage.common.StorageSharedKeyCredential import reactor.core.publisher.Flux import reactor.core.publisher.Mono import spock.lang.Requires @@ -66,10 +66,10 @@ class APISpec extends Specification { @Shared ClientLogger logger = new ClientLogger(APISpec.class) - static SharedKeyCredential primaryCredential - static SharedKeyCredential alternateCredential - static SharedKeyCredential blobCredential - static SharedKeyCredential premiumCredential + static StorageSharedKeyCredential primaryCredential + static StorageSharedKeyCredential alternateCredential + static StorageSharedKeyCredential blobCredential + static StorageSharedKeyCredential premiumCredential static String connectionString static TestMode testMode private boolean recordLiveMode @@ -141,7 +141,7 @@ class APISpec extends Specification { return setupTestMode() == TestMode.RECORD } - private SharedKeyCredential getCredential(String accountType) { + private StorageSharedKeyCredential getCredential(String accountType) { String accountName String accountKey @@ -158,7 +158,7 @@ class APISpec extends Specification { return null } - return new SharedKeyCredential(accountName, accountKey) + return new StorageSharedKeyCredential(accountName, accountKey) } /* @@ -209,7 +209,7 @@ class APISpec extends Specification { EncryptedBlobClientBuilder getEncryptedClientBuilder(AsyncKeyEncryptionKey key, AsyncKeyEncryptionKeyResolver keyResolver, - SharedKeyCredential credential, String endpoint, + StorageSharedKeyCredential credential, String endpoint, HttpPipelinePolicy... policies) { EncryptedBlobClientBuilder builder = new EncryptedBlobClientBuilder() .key(key, "keyWrapAlgorithm") @@ -233,7 +233,7 @@ class APISpec extends Specification { return builder } - BlobServiceClientBuilder getServiceClientBuilder(SharedKeyCredential credential, String endpoint, + BlobServiceClientBuilder getServiceClientBuilder(StorageSharedKeyCredential credential, String endpoint, HttpPipelinePolicy... policies) { BlobServiceClientBuilder builder = new BlobServiceClientBuilder() .endpoint(endpoint) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java index daf367e7bc62..b335e6242904 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java @@ -17,11 +17,11 @@ import com.azure.storage.blob.implementation.util.BuilderHelper; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; -import com.azure.storage.common.policy.SharedKeyCredentialPolicy; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import java.io.OutputStream; import java.net.MalformedURLException; @@ -56,7 +56,7 @@ public final class BlobClientBuilder { private String snapshot; private CpkInfo customerProvidedKey; - private SharedKeyCredential sharedKeyCredential; + private StorageSharedKeyCredential storageSharedKeyCredential; private TokenCredential tokenCredential; private SasTokenCredential sasTokenCredential; @@ -119,8 +119,8 @@ public BlobAsyncClient buildAsyncClient() { BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { - if (sharedKeyCredential != null) { - return new SharedKeyCredentialPolicy(sharedKeyCredential); + if (storageSharedKeyCredential != null) { + return new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential); } else if (tokenCredential != null) { return new BearerTokenAuthenticationPolicy(tokenCredential, String.format("%s/.default", endpoint)); } else if (sasTokenCredential != null) { @@ -157,14 +157,14 @@ public BlobClientBuilder customerProvidedKey(CustomerProvidedKey customerProvide } /** - * Sets the {@link SharedKeyCredential} used to authorize requests sent to the service. + * Sets the {@link StorageSharedKeyCredential} used to authorize requests sent to the service. * * @param credential The credential to use for authenticating request. * @return the updated BlobClientBuilder * @throws NullPointerException If {@code credential} is {@code null}. */ - public BlobClientBuilder credential(SharedKeyCredential credential) { - this.sharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); + public BlobClientBuilder credential(StorageSharedKeyCredential credential) { + this.storageSharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); this.tokenCredential = null; this.sasTokenCredential = null; return this; @@ -179,7 +179,7 @@ public BlobClientBuilder credential(SharedKeyCredential credential) { */ public BlobClientBuilder credential(TokenCredential credential) { this.tokenCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.sasTokenCredential = null; return this; } @@ -194,7 +194,7 @@ public BlobClientBuilder credential(TokenCredential credential) { public BlobClientBuilder sasToken(String sasToken) { this.sasTokenCredential = new SasTokenCredential(Objects.requireNonNull(sasToken, "'sasToken' cannot be null.")); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.tokenCredential = null; return this; } @@ -207,15 +207,15 @@ public BlobClientBuilder sasToken(String sasToken) { * @return the updated BlobClientBuilder */ public BlobClientBuilder setAnonymousAccess() { - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.tokenCredential = null; this.sasTokenCredential = null; return this; } /** - * Constructs a {@link SharedKeyCredential} used to authorize requests sent to the service. Additionally, if the - * connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link + * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, + * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link * #endpoint(String) endpoint}. * * @param connectionString Connection string of the storage account. @@ -234,8 +234,8 @@ public BlobClientBuilder connectionString(String connectionString) { * Sets the service endpoint, additionally parses it for information (SAS token, container name, blob name) * *

    If the endpoint is to a blob in the root container, this method will fail as it will interpret the blob name - * as the container name. With only one path element, it is impossible to distinguish between a container name and a - * blob in the root container, so it is assumed to be the container name as this is much more common. When working + * as the container name. With only one path element, it is impossible to distinguish between a container name and + * a blob in the root container, so it is assumed to be the container name as this is much more common. When working * with blobs in the root container, it is best to set the endpoint to the account url and specify the blob name * separately using the {@link BlobClientBuilder#blobName(String) blobName} method.

    * @@ -268,8 +268,8 @@ public BlobClientBuilder endpoint(String endpoint) { /** * Sets the name of the container that contains the blob. * - * @param containerName Name of the container. If the value {@code null} or empty the root container, {@code $root}, - * will be used. + * @param containerName Name of the container. If the value {@code null} or empty the root container, {@code $root} + * , will be used. * @return the updated BlobClientBuilder object */ public BlobClientBuilder containerName(String containerName) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java index 9dc59b528e98..31d502a104ca 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java @@ -17,11 +17,11 @@ import com.azure.storage.blob.implementation.util.BuilderHelper; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; -import com.azure.storage.common.policy.SharedKeyCredentialPolicy; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import java.net.MalformedURLException; import java.net.URL; @@ -54,7 +54,7 @@ public final class BlobContainerClientBuilder { private String containerName; private CpkInfo customerProvidedKey; - private SharedKeyCredential sharedKeyCredential; + private StorageSharedKeyCredential storageSharedKeyCredential; private TokenCredential tokenCredential; private SasTokenCredential sasTokenCredential; @@ -103,8 +103,8 @@ public BlobContainerAsyncClient buildAsyncClient() { BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { - if (sharedKeyCredential != null) { - return new SharedKeyCredentialPolicy(sharedKeyCredential); + if (storageSharedKeyCredential != null) { + return new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential); } else if (tokenCredential != null) { return new BearerTokenAuthenticationPolicy(tokenCredential, String.format("%s/.default", endpoint)); } else if (sasTokenCredential != null) { @@ -168,14 +168,14 @@ public BlobContainerClientBuilder customerProvidedKey(CustomerProvidedKey custom } /** - * Sets the {@link SharedKeyCredential} used to authorize requests sent to the service. + * Sets the {@link StorageSharedKeyCredential} used to authorize requests sent to the service. * * @param credential The credential to use for authenticating request. * @return the updated BlobContainerClientBuilder * @throws NullPointerException If {@code credential} is {@code null}. */ - public BlobContainerClientBuilder credential(SharedKeyCredential credential) { - this.sharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); + public BlobContainerClientBuilder credential(StorageSharedKeyCredential credential) { + this.storageSharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); this.tokenCredential = null; this.sasTokenCredential = null; return this; @@ -190,7 +190,7 @@ public BlobContainerClientBuilder credential(SharedKeyCredential credential) { */ public BlobContainerClientBuilder credential(TokenCredential credential) { this.tokenCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.sasTokenCredential = null; return this; } @@ -205,7 +205,7 @@ public BlobContainerClientBuilder credential(TokenCredential credential) { public BlobContainerClientBuilder sasToken(String sasToken) { this.sasTokenCredential = new SasTokenCredential(Objects.requireNonNull(sasToken, "'sasToken' cannot be null.")); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.tokenCredential = null; return this; } @@ -218,15 +218,15 @@ public BlobContainerClientBuilder sasToken(String sasToken) { * @return the updated BlobContainerClientBuilder */ public BlobContainerClientBuilder setAnonymousAccess() { - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.tokenCredential = null; this.sasTokenCredential = null; return this; } /** - * Constructs a {@link SharedKeyCredential} used to authorize requests sent to the service. Additionally, if the - * connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link + * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, + * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link * #endpoint(String) endpoint}. * * @param connectionString Connection string of the storage account. @@ -244,8 +244,8 @@ public BlobContainerClientBuilder connectionString(String connectionString) { /** * Sets the name of the container. * - * @param containerName Name of the container. If the value {@code null} or empty the root container, {@code $root}, - * will be used. + * @param containerName Name of the container. If the value {@code null} or empty the root container, {@code $root} + * , will be used. * @return the updated BlobContainerClientBuilder object */ public BlobContainerClientBuilder containerName(String containerName) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java index 785e7c0a6ed7..e97cd7f0e37e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java @@ -17,11 +17,11 @@ import com.azure.storage.blob.implementation.util.BuilderHelper; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; -import com.azure.storage.common.policy.SharedKeyCredentialPolicy; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import java.net.MalformedURLException; import java.net.URL; @@ -52,7 +52,7 @@ public final class BlobServiceClientBuilder { private String accountName; private CpkInfo customerProvidedKey; - private SharedKeyCredential sharedKeyCredential; + private StorageSharedKeyCredential storageSharedKeyCredential; private TokenCredential tokenCredential; private SasTokenCredential sasTokenCredential; @@ -85,8 +85,8 @@ public BlobServiceClient buildClient() { public BlobServiceAsyncClient buildAsyncClient() { BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { - if (sharedKeyCredential != null) { - return new SharedKeyCredentialPolicy(sharedKeyCredential); + if (storageSharedKeyCredential != null) { + return new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential); } else if (tokenCredential != null) { return new BearerTokenAuthenticationPolicy(tokenCredential, String.format("%s/.default", endpoint)); } else if (sasTokenCredential != null) { @@ -148,14 +148,14 @@ public BlobServiceClientBuilder customerProvidedKey(CustomerProvidedKey customer } /** - * Sets the {@link SharedKeyCredential} used to authorize requests sent to the service. + * Sets the {@link StorageSharedKeyCredential} used to authorize requests sent to the service. * * @param credential The credential to use for authenticating request. * @return the updated BlobServiceClientBuilder * @throws NullPointerException If {@code credential} is {@code null}. */ - public BlobServiceClientBuilder credential(SharedKeyCredential credential) { - this.sharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); + public BlobServiceClientBuilder credential(StorageSharedKeyCredential credential) { + this.storageSharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); this.tokenCredential = null; this.sasTokenCredential = null; return this; @@ -170,7 +170,7 @@ public BlobServiceClientBuilder credential(SharedKeyCredential credential) { */ public BlobServiceClientBuilder credential(TokenCredential credential) { this.tokenCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.sasTokenCredential = null; return this; } @@ -185,14 +185,14 @@ public BlobServiceClientBuilder credential(TokenCredential credential) { public BlobServiceClientBuilder sasToken(String sasToken) { this.sasTokenCredential = new SasTokenCredential(Objects.requireNonNull(sasToken, "'sasToken' cannot be null.")); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.tokenCredential = null; return this; } /** - * Constructs a {@link SharedKeyCredential} used to authorize requests sent to the service. Additionally, if the - * connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link + * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, + * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link * #endpoint(String) endpoint}. * * @param connectionString Connection string of the storage account. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java index cc41a8118887..19abc2aabb00 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java @@ -19,7 +19,7 @@ import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.policy.RequestRetryOptions; import com.azure.storage.common.policy.RequestRetryPolicy; import com.azure.storage.common.policy.ResponseValidationPolicyBuilder; @@ -46,14 +46,15 @@ public final class BuilderHelper { * * @param connectionString Connection string from the service account. * @param accountNameSetter Callback to set the account name on the builder. - * @param credentialSetter Callback to set the {@link SharedKeyCredential} of the builder. + * @param credentialSetter Callback to set the {@link StorageSharedKeyCredential} of the builder. * @param endpointSetter Callback to set the endpoint of the builder. * @param logger {@link ClientLogger} used to log any exceptions. * @throws NullPointerException If {@code connectionString} is {@code null}. * @throws IllegalArgumentException If {@code connectionString} doesn't contain 'AccountName' or 'AccountKey'. */ public static void configureConnectionString(String connectionString, Consumer accountNameSetter, - Consumer credentialSetter, Consumer endpointSetter, ClientLogger logger) { + Consumer credentialSetter, + Consumer endpointSetter, ClientLogger logger) { Objects.requireNonNull(connectionString, "'connectionString' cannot be null."); Map connectionStringPieces = Utility.parseConnectionString(connectionString); @@ -75,7 +76,7 @@ public static void configureConnectionString(String connectionString, Consumer { - if (sharedKeyCredential != null) { - return new SharedKeyCredentialPolicy(sharedKeyCredential); + if (storageSharedKeyCredential != null) { + return new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential); } else if (tokenCredential != null) { return new BearerTokenAuthenticationPolicy(tokenCredential, String.format("%s/.default", endpoint)); } else if (sasTokenCredential != null) { @@ -302,14 +302,14 @@ public SpecializedBlobClientBuilder customerProvidedKey(CustomerProvidedKey cust } /** - * Sets the {@link SharedKeyCredential} used to authorize requests sent to the service. + * Sets the {@link StorageSharedKeyCredential} used to authorize requests sent to the service. * * @param credential The credential to use for authenticating request. * @return the updated SpecializedBlobClientBuilder * @throws NullPointerException If {@code credential} is {@code null}. */ - public SpecializedBlobClientBuilder credential(SharedKeyCredential credential) { - this.sharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); + public SpecializedBlobClientBuilder credential(StorageSharedKeyCredential credential) { + this.storageSharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); this.tokenCredential = null; this.sasTokenCredential = null; return this; @@ -324,7 +324,7 @@ public SpecializedBlobClientBuilder credential(SharedKeyCredential credential) { */ public SpecializedBlobClientBuilder credential(TokenCredential credential) { this.tokenCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.sasTokenCredential = null; return this; } @@ -339,7 +339,7 @@ public SpecializedBlobClientBuilder credential(TokenCredential credential) { public SpecializedBlobClientBuilder sasToken(String sasToken) { this.sasTokenCredential = new SasTokenCredential(Objects.requireNonNull(sasToken, "'sasToken' cannot be null.")); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.tokenCredential = null; return this; } @@ -352,15 +352,15 @@ public SpecializedBlobClientBuilder sasToken(String sasToken) { * @return the updated SpecializedBlobClientBuilder */ public SpecializedBlobClientBuilder setAnonymousAccess() { - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.tokenCredential = null; this.sasTokenCredential = null; return this; } /** - * Constructs a {@link SharedKeyCredential} used to authorize requests sent to the service. Additionally, if the - * connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link + * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, + * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link * #endpoint(String) endpoint}. * * @param connectionString Connection string of the storage account. diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AsyncBufferedUploadExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AsyncBufferedUploadExample.java index 6b73c553ef78..61498b8d54d4 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AsyncBufferedUploadExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AsyncBufferedUploadExample.java @@ -5,7 +5,7 @@ import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.specialized.BlockBlobAsyncClient; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import reactor.core.publisher.Flux; import java.io.IOException; @@ -34,7 +34,7 @@ public static void main(String[] args) throws IOException { */ String accountName = SampleHelper.getAccountName(); String accountKey = SampleHelper.getAccountKey(); - SharedKeyCredential credential = new SharedKeyCredential(accountName, accountKey); + StorageSharedKeyCredential credential = new StorageSharedKeyCredential(accountName, accountKey); String endpoint = String.format(Locale.ROOT, "https://%s.blob.core.windows.net", accountName); String containerName = "myjavacontainerbufferedupload" + System.currentTimeMillis(); BlobServiceAsyncClient storageClient = new BlobServiceClientBuilder().endpoint(endpoint).credential(credential) @@ -82,12 +82,12 @@ private static ByteBuffer randomTransformation(ByteBuffer buffer) { return (ByteBuffer) buffer.limit(new Random().nextInt(buffer.limit())); } - private static void uploadSourceBlob(String endpoint, SharedKeyCredential credential, String containerName) { + private static void uploadSourceBlob(String endpoint, StorageSharedKeyCredential credential, String containerName) { getSourceBlobClient(endpoint, credential, containerName) .upload(Flux.just(ByteBuffer.wrap("Hello world".getBytes(Charset.defaultCharset()))), "Hello world".length()).block(); } - private static BlockBlobAsyncClient getSourceBlobClient(String endpoint, SharedKeyCredential credential, + private static BlockBlobAsyncClient getSourceBlobClient(String endpoint, StorageSharedKeyCredential credential, String containerName) { return new BlobServiceClientBuilder().endpoint(endpoint).credential(credential).buildAsyncClient() .getBlobContainerAsyncClient(containerName).getBlobAsyncClient("sourceBlob").getBlockBlobAsyncClient(); diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java index 0a6c76349186..c3f34c4100ca 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java @@ -4,7 +4,7 @@ package com.azure.storage.blob; import com.azure.storage.blob.specialized.BlockBlobClient; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -37,7 +37,7 @@ public static void main(String[] args) throws IOException { /* * Use your Storage account's name and key to create a credential object; this is used to access your account. */ - SharedKeyCredential credential = new SharedKeyCredential(accountName, accountKey); + StorageSharedKeyCredential credential = new StorageSharedKeyCredential(accountName, accountKey); /* * From the Azure portal, get your Storage account blob service URL endpoint. diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientBuilderJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientBuilderJavaDocCodeSnippets.java index c2f415934cb5..1b6cb0419729 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientBuilderJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientBuilderJavaDocCodeSnippets.java @@ -8,10 +8,10 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.policy.RequestRetryOptions; import com.azure.storage.common.policy.RequestRetryPolicy; -import com.azure.storage.common.policy.SharedKeyCredentialPolicy; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; /** * Code snippets for {@link BlobClientBuilder} @@ -21,12 +21,12 @@ public class BlobClientBuilderJavaDocCodeSnippets { private String connectionString = "AccountName=name;AccountKey=key;DefaultEndpointProtocol=protocol;EndpointSuffix=suffix"; private String endpoint = "endpointURL"; private String containerName = "container Name"; - private SharedKeyCredential sharedKeyCredential = new SharedKeyCredential("accountName", "accountKey"); + private StorageSharedKeyCredential storageSharedKeyCredential = new StorageSharedKeyCredential("accountName", "accountKey"); private HttpPipeline httpPipeline = new HttpPipelineBuilder() .httpClient(HttpClient.createDefault()) .policies(new AddDatePolicy()) .policies(new RequestIdPolicy()) - .policies(new SharedKeyCredentialPolicy(sharedKeyCredential)) + .policies(new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential)) .policies(new RequestRetryPolicy(new RequestRetryOptions())) .build(); @@ -59,7 +59,7 @@ public void blobClientCredentialAndEndpoint() { // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.Builder.endpoint#String BlobClient client = new BlobClientBuilder() .endpoint(endpoint) - .credential(sharedKeyCredential) + .credential(storageSharedKeyCredential) .buildClient(); // END: com.azure.storage.blob.specialized.BlobClientBase.Builder.endpoint#String } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientBuilderJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientBuilderJavaDocCodeSnippets.java index ea2d2721becc..f7460d418272 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientBuilderJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientBuilderJavaDocCodeSnippets.java @@ -8,10 +8,10 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.policy.RequestRetryOptions; import com.azure.storage.common.policy.RequestRetryPolicy; -import com.azure.storage.common.policy.SharedKeyCredentialPolicy; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; /** * Code snippets for {@link BlobContainerClientBuilder} @@ -21,12 +21,12 @@ public class BlobContainerClientBuilderJavaDocCodeSnippets { private String connectionString = "AccountName=name;AccountKey=key;DefaultEndpointProtocol=protocol;EndpointSuffix=suffix"; private String endpoint = "endpointURL"; private String containerName = "container Name"; - private SharedKeyCredential sharedKeyCredential = new SharedKeyCredential("accountName", "accountKey"); + private StorageSharedKeyCredential storageSharedKeyCredential = new StorageSharedKeyCredential("accountName", "accountKey"); private HttpPipeline httpPipeline = new HttpPipelineBuilder() .httpClient(HttpClient.createDefault()) .policies(new AddDatePolicy()) .policies(new RequestIdPolicy()) - .policies(new SharedKeyCredentialPolicy(sharedKeyCredential)) + .policies(new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential)) .policies(new RequestRetryPolicy(new RequestRetryOptions())) .build(); @@ -59,7 +59,7 @@ public void containerClientCredentialAndEndpoint() { // BEGIN: com.azure.storage.blob.BlobContainerClientBuilder.endpoint#String BlobContainerClient client = new BlobContainerClientBuilder() .endpoint(endpoint) - .credential(sharedKeyCredential) + .credential(storageSharedKeyCredential) .buildClient(); // END: com.azure.storage.blob.BlobContainerClientBuilder.endpoint#String } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/FileTransferExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/FileTransferExample.java index eda08f390ddf..27562a357bca 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/FileTransferExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/FileTransferExample.java @@ -3,7 +3,7 @@ package com.azure.storage.blob; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import java.io.File; import java.io.FileInputStream; @@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException, NoSuchAlgorithmExcept /* * Use your Storage account's name and key to create a credential object; this is used to access your account. */ - SharedKeyCredential credential = new SharedKeyCredential(accountName, accountKey); + StorageSharedKeyCredential credential = new StorageSharedKeyCredential(accountName, accountKey); /* * From the Azure portal, get your Storage account blob service URL endpoint. diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ListContainersExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ListContainersExample.java index ef338167bd4a..97d07f8adef3 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ListContainersExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ListContainersExample.java @@ -3,7 +3,7 @@ package com.azure.storage.blob; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import java.util.Locale; @@ -23,7 +23,7 @@ public static void main(String[] args) { /* * Use your Storage account's name and key to create a credential object; this is used to access your account. */ - SharedKeyCredential credential = new SharedKeyCredential(accountName, accountKey); + StorageSharedKeyCredential credential = new StorageSharedKeyCredential(accountName, accountKey); /* * From the Azure portal, get your Storage account blob service URL endpoint. diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java index 43b530d786c0..17b9e2530ac2 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java @@ -6,7 +6,7 @@ import com.azure.core.util.Context; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.specialized.BlockBlobClient; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -35,7 +35,7 @@ public static void main(String[] args) throws IOException { /* * Use your Storage account's name and key to create a credential object; this is used to access your account. */ - SharedKeyCredential credential = new SharedKeyCredential(accountName, accountKey); + StorageSharedKeyCredential credential = new StorageSharedKeyCredential(accountName, accountKey); /* * From the Azure portal, get your Storage account blob service URL endpoint. diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index afcd7e0d5caf..a5f01c9326d1 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -34,8 +34,8 @@ import com.azure.storage.blob.specialized.BlobAsyncClientBase import com.azure.storage.blob.specialized.BlobClientBase import com.azure.storage.blob.specialized.LeaseClient import com.azure.storage.blob.specialized.LeaseClientBuilder +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.common.implementation.Constants -import com.azure.storage.common.credentials.SharedKeyCredential import reactor.core.publisher.Flux import reactor.core.publisher.Mono import spock.lang.Requires @@ -117,10 +117,10 @@ class APISpec extends Specification { static def BLOB_STORAGE = "BLOB_STORAGE_" static def PREMIUM_STORAGE = "PREMIUM_STORAGE_" - protected static SharedKeyCredential primaryCredential - static SharedKeyCredential alternateCredential - static SharedKeyCredential blobCredential - static SharedKeyCredential premiumCredential + protected static StorageSharedKeyCredential primaryCredential + static StorageSharedKeyCredential alternateCredential + static StorageSharedKeyCredential blobCredential + static StorageSharedKeyCredential premiumCredential static TestMode testMode BlobServiceClient primaryBlobServiceClient @@ -205,7 +205,7 @@ class APISpec extends Specification { return setupTestMode() == TestMode.RECORD } - private SharedKeyCredential getCredential(String accountType) { + private StorageSharedKeyCredential getCredential(String accountType) { String accountName String accountKey @@ -222,10 +222,10 @@ class APISpec extends Specification { return null } - return new SharedKeyCredential(accountName, accountKey) + return new StorageSharedKeyCredential(accountName, accountKey) } - BlobServiceClient setClient(SharedKeyCredential credential) { + BlobServiceClient setClient(StorageSharedKeyCredential credential) { try { return getServiceClient(credential) } catch (Exception ignore) { @@ -255,15 +255,15 @@ class APISpec extends Specification { return getServiceClient(null, endpoint, null) } - BlobServiceClient getServiceClient(SharedKeyCredential credential) { + BlobServiceClient getServiceClient(StorageSharedKeyCredential credential) { return getServiceClient(credential, String.format(defaultEndpointTemplate, credential.getAccountName()), null) } - BlobServiceClient getServiceClient(SharedKeyCredential credential, String endpoint) { + BlobServiceClient getServiceClient(StorageSharedKeyCredential credential, String endpoint) { return getServiceClient(credential, endpoint, null) } - BlobServiceClient getServiceClient(SharedKeyCredential credential, String endpoint, + BlobServiceClient getServiceClient(StorageSharedKeyCredential credential, String endpoint, HttpPipelinePolicy... policies) { return getServiceClientBuilder(credential, endpoint, policies).buildClient() } @@ -272,12 +272,12 @@ class APISpec extends Specification { return getServiceClientBuilder(null, endpoint, null).sasToken(sasToken).buildClient() } - BlobServiceAsyncClient getServiceAsyncClient(SharedKeyCredential credential) { + BlobServiceAsyncClient getServiceAsyncClient(StorageSharedKeyCredential credential) { return getServiceClientBuilder(credential, String.format(defaultEndpointTemplate, credential.getAccountName())) .buildAsyncClient() } - BlobServiceClientBuilder getServiceClientBuilder(SharedKeyCredential credential, String endpoint, + BlobServiceClientBuilder getServiceClientBuilder(StorageSharedKeyCredential credential, String endpoint, HttpPipelinePolicy... policies) { BlobServiceClientBuilder builder = new BlobServiceClientBuilder() .endpoint(endpoint) @@ -312,7 +312,7 @@ class APISpec extends Specification { builder.sasToken(sasToken).buildClient() } - BlobAsyncClient getBlobAsyncClient(SharedKeyCredential credential, String endpoint, String blobName) { + BlobAsyncClient getBlobAsyncClient(StorageSharedKeyCredential credential, String endpoint, String blobName) { BlobClientBuilder builder = new BlobClientBuilder() .endpoint(endpoint) .blobName(blobName) @@ -345,7 +345,7 @@ class APISpec extends Specification { return builder.sasToken(sasToken).buildClient() } - BlobClient getBlobClient(SharedKeyCredential credential, String endpoint, HttpPipelinePolicy... policies) { + BlobClient getBlobClient(StorageSharedKeyCredential credential, String endpoint, HttpPipelinePolicy... policies) { BlobClientBuilder builder = new BlobClientBuilder() .endpoint(endpoint) .httpClient(getHttpClient()) @@ -362,7 +362,7 @@ class APISpec extends Specification { return builder.credential(credential).buildClient() } - BlobClient getBlobClient(SharedKeyCredential credential, String endpoint, String blobName) { + BlobClient getBlobClient(StorageSharedKeyCredential credential, String endpoint, String blobName) { BlobClientBuilder builder = new BlobClientBuilder() .endpoint(endpoint) .blobName(blobName) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy index 0843f8e0bbee..1e072d4ce41f 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy @@ -11,14 +11,15 @@ import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.blob.models.UserDelegationKey import com.azure.storage.blob.specialized.BlobServiceSasSignatureValues import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder -import com.azure.storage.common.AccountSasPermission -import com.azure.storage.common.AccountSasResourceType -import com.azure.storage.common.AccountSasService -import com.azure.storage.common.AccountSasSignatureValues +import com.azure.storage.common.sas.AccountSasResourceType +import com.azure.storage.common.sas.AccountSasService +import com.azure.storage.common.sas.AccountSasPermission +import com.azure.storage.common.sas.AccountSasSignatureValues +import com.azure.storage.common.sas.SasProtocol +import com.azure.storage.common.StorageSharedKeyCredential + import com.azure.storage.common.implementation.Constants -import com.azure.storage.common.SasProtocol import com.azure.storage.common.Utility -import com.azure.storage.common.credentials.SharedKeyCredential import com.azure.storage.common.sas.SasIpRange import spock.lang.Ignore import spock.lang.Unroll @@ -737,7 +738,7 @@ class SASTest extends APISpec { .setVersion(version) when: - v.generateSasQueryParameters((SharedKeyCredential) creds) + v.generateSasQueryParameters((StorageSharedKeyCredential) creds) then: def e = thrown(NullPointerException) @@ -746,7 +747,7 @@ class SASTest extends APISpec { where: version | creds || parameter null | primaryCredential || "version" - "v" | null || "sharedKeyCredentials" + "v" | null || "storageSharedKeyCredential" } @Unroll @@ -923,7 +924,7 @@ class SASTest extends APISpec { if (usingUserDelegation) { serviceSASSignatureValues.generateSasQueryParameters(new UserDelegationKey()) } else { - serviceSASSignatureValues.generateSasQueryParameters(new SharedKeyCredential("", "")) + serviceSASSignatureValues.generateSasQueryParameters(new StorageSharedKeyCredential("", "")) } then: @@ -1000,7 +1001,7 @@ class SASTest extends APISpec { "c" | "b" | null | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | "v" | primaryCredential || "resourceTypes" "c" | "b" | "c" | null | "v" | primaryCredential || "expiryTime" "c" | "b" | "c" | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | primaryCredential || "version" - "c" | "b" | "c" | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | "v" | null || "sharedKeyCredentials" + "c" | "b" | "c" | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | "v" | null || "storageSharedKeyCredentials" } @Unroll diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy index 235cc1e4d287..6cef47de45ad 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy @@ -13,8 +13,10 @@ import com.azure.storage.blob.models.BlobRetentionPolicy import com.azure.storage.blob.models.BlobServiceProperties import com.azure.storage.blob.models.ListBlobContainersOptions import com.azure.storage.blob.models.StaticWebsite + +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.blob.models.BlobStorageException -import com.azure.storage.common.credentials.SharedKeyCredential + import com.azure.storage.common.policy.RequestRetryOptions import com.azure.storage.common.policy.RequestRetryPolicy @@ -382,7 +384,8 @@ class ServiceAPITest extends APISpec { def "Get account info error"() { when: - def serviceURL = getServiceClient((SharedKeyCredential) null, primaryBlobServiceClient.getAccountUrl()) + BlobServiceClient serviceURL = getServiceClient((StorageSharedKeyCredential) null, primaryBlobServiceClient.getAccountUrl()) + serviceURL.getAccountInfo() then: diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy index 0fdcf97a3a83..dd90e49560bf 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy @@ -10,13 +10,13 @@ import com.azure.storage.blob.BlobSasPermission import com.azure.storage.blob.BlobUrlParts import com.azure.storage.blob.models.BlobRange import com.azure.storage.blob.models.UserDelegationKey -import com.azure.storage.common.AccountSasPermission -import com.azure.storage.common.AccountSasResourceType -import com.azure.storage.common.AccountSasSignatureValues +import com.azure.storage.common.sas.AccountSasPermission +import com.azure.storage.common.sas.AccountSasResourceType +import com.azure.storage.common.sas.AccountSasSignatureValues +import com.azure.storage.common.sas.SasProtocol +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.common.implementation.Constants -import com.azure.storage.common.SasProtocol import com.azure.storage.common.Utility -import com.azure.storage.common.credentials.SharedKeyCredential import com.azure.storage.common.sas.SasIpRange import spock.lang.Unroll @@ -282,7 +282,8 @@ class HelperTest extends APISpec { .setVersion(version) when: - v.generateSasQueryParameters((SharedKeyCredential) creds) + v.generateSasQueryParameters((StorageSharedKeyCredential)creds) + then: def e = thrown(NullPointerException) @@ -291,7 +292,7 @@ class HelperTest extends APISpec { where: containerName | version | creds | blobName || parameter "c" | null | primaryCredential | "b" | "version" - "c" | "v" | null | "b" | "sharedKeyCredentials" + "c" | "v" | null | "b" | "storageSharedKeyCredentials" "c" | "v" | primaryCredential | null | "canonicalName" } @@ -510,7 +511,7 @@ class HelperTest extends APISpec { "c" | "b" | null | OffsetDateTime.now() | "v" | primaryCredential || "resourceTypes" "c" | "b" | "c" | null | "v" | primaryCredential || "expiryTime" "c" | "b" | "c" | OffsetDateTime.now() | null | primaryCredential || "version" - "c" | "b" | "c" | OffsetDateTime.now() | "v" | null || "sharedKeyCredentials" + "c" | "b" | "c" | OffsetDateTime.now() | "v" | null || "storageSharedKeyCredentials" } @Unroll diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/credentials/SharedKeyCredential.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/StorageSharedKeyCredential.java similarity index 93% rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/credentials/SharedKeyCredential.java rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/StorageSharedKeyCredential.java index af36ba59b3d9..948551f4744a 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/credentials/SharedKeyCredential.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/StorageSharedKeyCredential.java @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.common.credentials; +package com.azure.storage.common; import com.azure.core.implementation.util.ImplUtils; -import com.azure.storage.common.Utility; import java.net.URL; import java.util.ArrayList; @@ -20,7 +19,7 @@ /** * SharedKey credential policy that is put into a header to authorize requests. */ -public final class SharedKeyCredential { +public final class StorageSharedKeyCredential { private static final String AUTHORIZATION_HEADER_FORMAT = "SharedKey %s:%s"; // Pieces of the connection string that are needed. @@ -31,13 +30,13 @@ public final class SharedKeyCredential { private final String accountKey; /** - * Initializes a new instance of SharedKeyCredential contains an account's name and its primary or secondary + * Initializes a new instance of StorageSharedKeyCredential contains an account's name and its primary or secondary * accountKey. * * @param accountName The account name associated with the request. * @param accountKey The account access key used to authenticate the request. */ - public SharedKeyCredential(String accountName, String accountKey) { + public StorageSharedKeyCredential(String accountName, String accountKey) { Objects.requireNonNull(accountName, "'accountName' cannot be null."); Objects.requireNonNull(accountKey, "'accountKey' cannot be null."); this.accountName = accountName; @@ -49,13 +48,13 @@ public SharedKeyCredential(String accountName, String accountKey) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.common.credentials.SharedKeyCredential.fromConnectionString#String} + * {@codesnippet com.azure.storage.common.StorageSharedKeyCredential.fromConnectionString#String} * * @param connectionString Connection string used to build the SharedKey credential. * @return a SharedKey credential if the connection string contains AccountName and AccountKey * @throws IllegalArgumentException If {@code connectionString} doesn't have AccountName or AccountKey. */ - public static SharedKeyCredential fromConnectionString(String connectionString) { + public static StorageSharedKeyCredential fromConnectionString(String connectionString) { HashMap connectionStringPieces = new HashMap<>(); for (String connectionStringPiece : connectionString.split(";")) { String[] kvp = connectionStringPiece.split("=", 2); @@ -69,7 +68,7 @@ public static SharedKeyCredential fromConnectionString(String connectionString) throw new IllegalArgumentException("Connection string must contain 'AccountName' and 'AccountKey'."); } - return new SharedKeyCredential(accountName, accountKey); + return new StorageSharedKeyCredential(accountName, accountKey); } /** diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java index 19491881b5d6..7cfcda054fed 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java @@ -11,8 +11,7 @@ import com.azure.core.implementation.http.UrlBuilder; import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.credentials.SharedKeyCredential; -import com.azure.storage.common.policy.SharedKeyCredentialPolicy; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -72,7 +71,8 @@ public final class Utility { /** * The length of a datestring that matches the MAX_PRECISION_PATTERN. */ - private static final int MAX_PRECISION_DATESTRING_LENGTH = MAX_PRECISION_PATTERN.replaceAll("'", "").length(); + private static final int MAX_PRECISION_DATESTRING_LENGTH = MAX_PRECISION_PATTERN.replaceAll("'", "") + .length(); /** * Parses the query string into a key-value pair map that maintains key, query parameter key, order. The value is @@ -389,7 +389,8 @@ private static Mono scrubETagHeader(Mono unprocessedResponse) { } try { - HttpHeaders rawHeaders = (HttpHeaders) response.getClass().getMethod("getHeaders").invoke(response); + HttpHeaders rawHeaders = (HttpHeaders) response.getClass().getMethod("getHeaders") + .invoke(response); // if (eTag != null) { rawHeaders.put(ETAG, eTag); @@ -506,17 +507,18 @@ public static URL stripLastPathSegment(URL baseUrl) { } /** - * Searches for a {@link SharedKeyCredential} in the passed {@link HttpPipeline}. + * Searches for a {@link StorageSharedKeyCredential} in the passed {@link HttpPipeline}. * * @param httpPipeline Pipeline being searched - * @return a SharedKeyCredential if the pipeline contains one, otherwise null. + * @return a StorageSharedKeyCredential if the pipeline contains one, otherwise null. */ - public static SharedKeyCredential getSharedKeyCredential(HttpPipeline httpPipeline) { + public static StorageSharedKeyCredential getSharedKeyCredential(HttpPipeline httpPipeline) { for (int i = 0; i < httpPipeline.getPolicyCount(); i++) { HttpPipelinePolicy httpPipelinePolicy = httpPipeline.getPolicy(i); - if (httpPipelinePolicy instanceof SharedKeyCredentialPolicy) { - SharedKeyCredentialPolicy sharedKeyCredentialPolicy = (SharedKeyCredentialPolicy) httpPipelinePolicy; - return sharedKeyCredentialPolicy.sharedKeyCredential(); + if (httpPipelinePolicy instanceof StorageSharedKeyCredentialPolicy) { + StorageSharedKeyCredentialPolicy storageSharedKeyCredentialPolicy = + (StorageSharedKeyCredentialPolicy) httpPipelinePolicy; + return storageSharedKeyCredentialPolicy.sharedKeyCredential(); } } return null; diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/credentials/package-info.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/credentials/package-info.java deleted file mode 100644 index b7e3c73a85a8..000000000000 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/credentials/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -/** - * Package containing credentials used by Azure Storage services. - */ -package com.azure.storage.common.credentials; diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java index a62d7ab1681a..9b4f0734d340 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java @@ -3,7 +3,7 @@ package com.azure.storage.common.implementation; -import com.azure.storage.common.SasProtocol; +import com.azure.storage.common.sas.SasProtocol; /** * Defines general constants. diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java index a79fa5aed77e..ecb6bb900460 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java @@ -51,8 +51,9 @@ public RequestRetryOptions() { *

    Before setting this understand the issues around reading stale and potentially-inconsistent data, view these * Azure Docs * for more information.

    - * @throws IllegalArgumentException If {@code retryDelayInMs} and {@code maxRetryDelayInMs} are not both null or - * non-null or {@code retryPolicyType} isn't {@link RetryPolicyType#EXPONENTIAL} or {@link RetryPolicyType#FIXED}. + * @throws IllegalArgumentException If {@code getRetryDelayInMs} and {@code getMaxRetryDelayInMs} are not both null + * or non-null or {@code retryPolicyType} isn't {@link RetryPolicyType#EXPONENTIAL} + * or {@link RetryPolicyType#FIXED}. */ public RequestRetryOptions(RetryPolicyType retryPolicyType, Integer maxTries, Integer tryTimeout, Long retryDelayInMs, Long maxRetryDelayInMs, String secondaryHost) { diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryPolicy.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryPolicy.java index 5cee7181125c..b3bca3ef113b 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryPolicy.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryPolicy.java @@ -65,7 +65,7 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN * @param primaryTry Number of attempts against the primary DC. * @param attempt This indicates the total number of attempts to send the request. * @return A single containing either the successful response or an error that was not retryable because either the - * maxTries was exceeded or retries will not mitigate the issue. + * {@code maxTries} was exceeded or retries will not mitigate the issue. */ private Mono attemptAsync(final HttpPipelineCallContext context, HttpPipelineNextPolicy next, final HttpRequest originalRequest, final boolean considerSecondary, diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/SharedKeyCredentialPolicy.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/StorageSharedKeyCredentialPolicy.java similarity index 74% rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/SharedKeyCredentialPolicy.java rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/StorageSharedKeyCredentialPolicy.java index d3f2669981d3..68ef39cb9166 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/SharedKeyCredentialPolicy.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/StorageSharedKeyCredentialPolicy.java @@ -7,28 +7,28 @@ import com.azure.core.http.HttpPipelineNextPolicy; import com.azure.core.http.HttpResponse; import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import reactor.core.publisher.Mono; /** * Policy that adds the SharedKey into the request's Authorization header. */ -public final class SharedKeyCredentialPolicy implements HttpPipelinePolicy { - private final SharedKeyCredential credential; +public final class StorageSharedKeyCredentialPolicy implements HttpPipelinePolicy { + private final StorageSharedKeyCredential credential; /** * Creates a SharedKey pipeline policy that adds the SharedKey into the request's authorization header. * * @param credential the SharedKey credential used to create the policy. */ - public SharedKeyCredentialPolicy(SharedKeyCredential credential) { + public StorageSharedKeyCredentialPolicy(StorageSharedKeyCredential credential) { this.credential = credential; } /** - * @return the {@link SharedKeyCredential} linked to the policy. + * @return the {@link StorageSharedKeyCredential} linked to the policy. */ - public SharedKeyCredential sharedKeyCredential() { + public StorageSharedKeyCredential sharedKeyCredential() { return this.credential; } diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasPermission.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java similarity index 95% rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasPermission.java rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java index 69765d6a52ba..f278d6cfd5aa 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasPermission.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.common; +package com.azure.storage.common.sas; import com.azure.storage.common.implementation.Constants; @@ -114,11 +114,11 @@ public boolean getAddPermission() { /** * Sets the add permission status. * - * @param hadAddPermission Permission status to set + * @param hasAddPermission Permission status to set * @return the updated AccountSasPermission object */ - public AccountSasPermission setAddPermission(boolean hadAddPermission) { - this.addPermission = hadAddPermission; + public AccountSasPermission setAddPermission(boolean hasAddPermission) { + this.addPermission = hasAddPermission; return this; } @@ -187,11 +187,11 @@ public boolean getListPermission() { * Sets the list permission status. This permission grants the ability to list blob containers, blobs, shares, * directories, and files. * - * @param hadListPermission Permission status to set + * @param hasListPermission Permission status to set * @return the updated AccountSasPermission object */ - public AccountSasPermission setListPermission(boolean hadListPermission) { - this.listPermission = hadListPermission; + public AccountSasPermission setListPermission(boolean hasListPermission) { + this.listPermission = hasListPermission; return this; } diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasQueryParameters.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasQueryParameters.java similarity index 91% rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasQueryParameters.java rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasQueryParameters.java index dd2d50e8ab8a..085cb3449acb 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasQueryParameters.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasQueryParameters.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.common; +package com.azure.storage.common.sas; + import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.sas.SasIpRange; import java.time.OffsetDateTime; import java.util.Map; @@ -26,15 +26,15 @@ public final class AccountSasQueryParameters extends BaseSasQueryParameters { * Creates a new {@link AccountSasQueryParameters} object. * * @param queryParamsMap All query parameters for the request as key-value pairs - * @param removeSASParametersFromMap When {@code true}, the SAS query parameters will be removed from + * @param removeSasParameters When {@code true}, the SAS query parameters will be removed from * queryParamsMap */ - public AccountSasQueryParameters(Map queryParamsMap, boolean removeSASParametersFromMap) { - super(queryParamsMap, removeSASParametersFromMap); + AccountSasQueryParameters(Map queryParamsMap, boolean removeSasParameters) { + super(queryParamsMap, removeSasParameters); this.resourceTypes = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_RESOURCES_TYPES, - removeSASParametersFromMap); + removeSasParameters); this.services = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SERVICES, - removeSASParametersFromMap); + removeSasParameters); } /** diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasResourceType.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasResourceType.java similarity index 99% rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasResourceType.java rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasResourceType.java index 57884ef4b581..4518127d127c 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasResourceType.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasResourceType.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.common; +package com.azure.storage.common.sas; import com.azure.storage.common.implementation.Constants; diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasService.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasService.java similarity index 99% rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasService.java rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasService.java index 1f453c23081a..99d77f02eead 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasService.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasService.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.common; +package com.azure.storage.common.sas; import com.azure.storage.common.implementation.Constants; diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasSignatureValues.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java similarity index 89% rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasSignatureValues.java rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java index 5de2501df808..1b5c31636c80 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasSignatureValues.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.common; +package com.azure.storage.common.sas; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.sas.SasIpRange; import java.time.OffsetDateTime; /** @@ -57,7 +57,7 @@ public AccountSasSignatureValues() { /** * Shared method between service clients to generate an account SAS. * - * @param sharedKeyCredential The {@code SharedKeyCredential} shared key credential for the account SAS + * @param storageSharedKeyCredential The {@code SharedKeyCredential} shared key credential for the account SAS * @param accountSasService The {@code AccountSasService} services for the account SAS * @param accountSasResourceType An optional {@code AccountSasResourceType} resources for the account SAS * @param accountSasPermission The {@code AccountSasPermission} permission for the account SAS @@ -70,7 +70,7 @@ public AccountSasSignatureValues() { * @throws NullPointerException If any of {@code sharedKeyCredentials}, {@code services}, {@code resourceTypes}, * {@code expiryTime}, {@code permissions} or {@code versions} is null */ - public static String generateAccountSas(SharedKeyCredential sharedKeyCredential, + public static String generateAccountSas(StorageSharedKeyCredential storageSharedKeyCredential, AccountSasService accountSasService, AccountSasResourceType accountSasResourceType, AccountSasPermission accountSasPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, SasIpRange sasIpRange, SasProtocol sasProtocol) { @@ -90,7 +90,7 @@ public static String generateAccountSas(SharedKeyCredential sharedKeyCredential, values.setSasIpRange(sasIpRange); values.setProtocol(sasProtocol); - AccountSasQueryParameters sasQueryParameters = values.generateSasQueryParameters(sharedKeyCredential); + AccountSasQueryParameters sasQueryParameters = values.generateSasQueryParameters(storageSharedKeyCredential); return sasQueryParameters.encode(); } @@ -250,14 +250,17 @@ public AccountSasSignatureValues setResourceTypes(String resourceTypes) { * Generates a {@link AccountSasQueryParameters} object which contains all SAS query parameters needed to make an * actual REST request. * - * @param sharedKeyCredentials Credentials for the storage account and corresponding primary or secondary key. + * @param storageSharedKeyCredentials Credentials for the storage account and corresponding + * primary or secondary key. * @return {@link AccountSasQueryParameters} - * @throws RuntimeException If the HMAC-SHA256 signature for {@code sharedKeyCredentials} fails to generate. - * @throws NullPointerException If any of {@code sharedKeyCredentials}, {@code services}, {@code resourceTypes}, + * @throws RuntimeException If the HMAC-SHA256 signature for {@code storageSharedKeyCredentials} fails to generate. + * @throws NullPointerException If any of {@code storageSharedKeyCredentials}, {@code services}, + * {@code resourceTypes}, * {@code expiryTime}, {@code permissions} or {@code versions} is null */ - public AccountSasQueryParameters generateSasQueryParameters(SharedKeyCredential sharedKeyCredentials) { - Utility.assertNotNull("sharedKeyCredentials", sharedKeyCredentials); + public AccountSasQueryParameters generateSasQueryParameters( + StorageSharedKeyCredential storageSharedKeyCredentials) { + Utility.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); Utility.assertNotNull("services", this.services); Utility.assertNotNull("resourceTypes", this.resourceTypes); Utility.assertNotNull("expiryTime", this.expiryTime); @@ -265,15 +268,15 @@ public AccountSasQueryParameters generateSasQueryParameters(SharedKeyCredential Utility.assertNotNull("version", this.version); // Signature is generated on the un-url-encoded values. - String signature = sharedKeyCredentials.computeHmac256(stringToSign(sharedKeyCredentials)); + String signature = storageSharedKeyCredentials.computeHmac256(stringToSign(storageSharedKeyCredentials)); return new AccountSasQueryParameters(this.version, this.services, resourceTypes, this.protocol, this.startTime, this.expiryTime, this.sasIpRange, this.permissions, signature); } - private String stringToSign(final SharedKeyCredential sharedKeyCredentials) { + private String stringToSign(final StorageSharedKeyCredential storageSharedKeyCredentials) { return String.join("\n", - sharedKeyCredentials.getAccountName(), + storageSharedKeyCredentials.getAccountName(), AccountSasPermission.parse(this.permissions).toString(), // guarantees ordering this.services, resourceTypes, diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/BaseSasQueryParameters.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/BaseSasQueryParameters.java similarity index 98% rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/BaseSasQueryParameters.java rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/BaseSasQueryParameters.java index 20c8f48d726a..5055f37fe532 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/BaseSasQueryParameters.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/BaseSasQueryParameters.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.common; +package com.azure.storage.common.sas; + +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.sas.SasIpRange; import java.time.OffsetDateTime; import java.util.Map; import java.util.function.Function; @@ -71,14 +72,14 @@ protected String getQueryParameter(Map parameters, String name /** * Helper method to get a query parameter * + * @param The object type. * @param parameters A {@code Map} of parameters to values to search. * @param name The name of parameter to find. * @param remove Whether or not to remove the parameter from the map. * @param converter Function that transforms the value to a String. - * @param The object type. * @return The object */ - protected T getQueryParameter(Map parameters, String name, Boolean remove, Function T getQueryParameter(Map parameters, String name, boolean remove, Function converter) { String[] parameterValue = parameters.get(name); if (parameterValue == null) { diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/SasProtocol.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/SasProtocol.java similarity index 97% rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/SasProtocol.java rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/SasProtocol.java index e04e5ee23951..8412a86a4e53 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/SasProtocol.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/SasProtocol.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.common; +package com.azure.storage.common.sas; import com.azure.storage.common.implementation.Constants; diff --git a/sdk/storage/azure-storage-common/src/main/java/module-info.java b/sdk/storage/azure-storage-common/src/main/java/module-info.java index a499a9a7f105..cf366acd00d6 100644 --- a/sdk/storage/azure-storage-common/src/main/java/module-info.java +++ b/sdk/storage/azure-storage-common/src/main/java/module-info.java @@ -5,9 +5,8 @@ requires transitive com.azure.core; exports com.azure.storage.common; - exports com.azure.storage.common.credentials; - exports com.azure.storage.common.policy; exports com.azure.storage.common.sas; + exports com.azure.storage.common.policy; exports com.azure.storage.common.implementation to // FIXME this should not be a long-term solution com.azure.storage.blob, diff --git a/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/StorageSharedKeyCredentialJavaDocCodeSnippets.java b/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/StorageSharedKeyCredentialJavaDocCodeSnippets.java new file mode 100644 index 000000000000..42cbea70228e --- /dev/null +++ b/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/StorageSharedKeyCredentialJavaDocCodeSnippets.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common; + +/** + * Code snippets for {@link StorageSharedKeyCredential}. + */ +public final class StorageSharedKeyCredentialJavaDocCodeSnippets { + + /** + * Code snippets for {@link StorageSharedKeyCredential#fromConnectionString(String)}. + */ + public void fromConnectionString() { + String connectionString = "AccountName=accountname;AccountKey=accountkey;additionalproperties"; + // BEGIN: com.azure.storage.common.StorageSharedKeyCredential.fromConnectionString#String + StorageSharedKeyCredential credential = StorageSharedKeyCredential.fromConnectionString(connectionString); + // END: com.azure.storage.common.StorageSharedKeyCredential.fromConnectionString#String + } +} diff --git a/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/credentials/SharedKeyCredentialJavaDocCodeSnippets.java b/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/credentials/SharedKeyCredentialJavaDocCodeSnippets.java deleted file mode 100644 index 655b231e8fcf..000000000000 --- a/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/credentials/SharedKeyCredentialJavaDocCodeSnippets.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.common.credentials; - -/** - * Code snippets for {@link SharedKeyCredential}. - */ -public final class SharedKeyCredentialJavaDocCodeSnippets { - - /** - * Code snippets for {@link SharedKeyCredential#fromConnectionString(String)}. - */ - public void fromConnectionString() { - String connectionString = "AccountName=accountname;AccountKey=accountkey;additionalproperties"; - // BEGIN: com.azure.storage.common.credentials.SharedKeyCredential.fromConnectionString#String - SharedKeyCredential credential = SharedKeyCredential.fromConnectionString(connectionString); - // END: com.azure.storage.common.credentials.SharedKeyCredential.fromConnectionString#String - } -} diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java index f5d00ae45978..4cf9e5666065 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java @@ -18,7 +18,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.policy.RequestRetryOptions; import com.azure.storage.common.policy.RequestRetryPolicy; import com.azure.storage.common.policy.ResponseValidationPolicyBuilder; @@ -43,14 +43,14 @@ final class BuilderHelper { * * @param connectionString Connection string from the service account. * @param accountNameSetter Callback to set the account name on the builder. - * @param credentialSetter Callback to set the {@link SharedKeyCredential} of the builder. + * @param credentialSetter Callback to set the {@link StorageSharedKeyCredential} of the builder. * @param endpointSetter Callback to set the endpoint of the builder. * @param logger {@link ClientLogger} used to log any exceptions. * @throws NullPointerException If {@code connectionString} is {@code null}. * @throws IllegalArgumentException If {@code connectionString} doesn't contain 'AccountName' or 'AccountKey'. */ static void configureConnectionString(String connectionString, Consumer accountNameSetter, - Consumer credentialSetter, Consumer endpointSetter, ClientLogger logger) { + Consumer credentialSetter, Consumer endpointSetter, ClientLogger logger) { Objects.requireNonNull(connectionString, "'connectionString' cannot be null."); Map connectionStringPieces = Utility.parseConnectionString(connectionString); @@ -72,7 +72,7 @@ static void configureConnectionString(String connectionString, Consumer } accountNameSetter.accept(accountName); - credentialSetter.accept(new SharedKeyCredential(accountName, accountKey)); + credentialSetter.accept(new StorageSharedKeyCredential(accountName, accountKey)); } /** diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java index 16d63932846f..a33655f92b74 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java @@ -15,7 +15,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.implementation.AzureFileStorageImpl; import com.azure.storage.file.implementation.models.DirectorysCreateResponse; import com.azure.storage.file.implementation.models.DirectorysGetPropertiesResponse; @@ -61,7 +61,7 @@ * * @see FileClientBuilder * @see DirectoryClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClient(builder = FileClientBuilder.class, isAsync = true) public class DirectoryAsyncClient { diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java index 476db732d26c..929356124066 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java @@ -9,7 +9,7 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.DirectoryInfo; import com.azure.storage.file.models.DirectoryProperties; import com.azure.storage.file.models.DirectorySetMetadataInfo; @@ -36,7 +36,7 @@ * * @see FileClientBuilder * @see DirectoryClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClient(builder = FileClientBuilder.class) public class DirectoryClient { diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java index 2c19843f7800..ffd6d6f70536 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java @@ -14,7 +14,7 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.Constants; import com.azure.storage.file.implementation.AzureFileStorageImpl; import com.azure.storage.file.implementation.models.FileGetPropertiesHeaders; @@ -83,7 +83,7 @@ * * @see FileClientBuilder * @see FileClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClient(builder = FileClientBuilder.class, isAsync = true) public class FileAsyncClient { diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java index a04617b3a462..88dadde8e2a8 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java @@ -11,7 +11,7 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.FileCopyInfo; import com.azure.storage.file.models.FileHttpHeaders; import com.azure.storage.file.models.FileInfo; @@ -46,7 +46,7 @@ * * @see FileClientBuilder * @see FileAsyncClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClient(builder = FileClientBuilder.class) public class FileClient { diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java index 375b758a0898..330c0bf260cb 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java @@ -12,11 +12,11 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; -import com.azure.storage.common.policy.SharedKeyCredentialPolicy; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import com.azure.storage.file.implementation.AzureFileStorageBuilder; import com.azure.storage.file.implementation.AzureFileStorageImpl; @@ -55,10 +55,11 @@ * * {@codesnippet com.azure.storage.file.fileAsyncClient.instantiation.credential} * - *

    Another way to authenticate the client is using a {@link SharedKeyCredential}. To create a SharedKeyCredential - * a connection string from the Storage File service must be used. Set the SharedKeyCredential with {@link - * FileClientBuilder#connectionString(String) connectionString}. If the builder has both a SAS token and - * SharedKeyCredential the SharedKeyCredential will be preferred when authorizing requests sent to the service.

    + *

    Another way to authenticate the client is using a {@link StorageSharedKeyCredential}. To create a + * StorageSharedKeyCredential a connection string from the Storage File service must be used. + * Set the StorageSharedKeyCredential with {@link FileClientBuilder#connectionString(String) connectionString}. + * If the builder has both a SAS token and StorageSharedKeyCredential the StorageSharedKeyCredential will be preferred + * when authorizing requests sent to the service.

    * *

    Instantiating a synchronous File Client with connection string.

    * {@codesnippet com.azure.storage.file.directoryClient.instantiation.connectionstring} @@ -68,7 +69,7 @@ * * @see FileClient * @see FileAsyncClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClientBuilder(serviceClients = { FileClient.class, FileAsyncClient.class, @@ -83,7 +84,7 @@ public class FileClientBuilder { private String shareSnapshot; private String resourcePath; - private SharedKeyCredential sharedKeyCredential; + private StorageSharedKeyCredential storageSharedKeyCredential; private SasTokenCredential sasTokenCredential; private HttpClient httpClient; @@ -108,8 +109,8 @@ private AzureFileStorageImpl constructImpl() { FileServiceVersion serviceVersion = version != null ? version : FileServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { - if (sharedKeyCredential != null) { - return new SharedKeyCredentialPolicy(sharedKeyCredential); + if (storageSharedKeyCredential != null) { + return new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential); } else if (sasTokenCredential != null) { return new SasTokenCredentialPolicy(sasTokenCredential); } else { @@ -137,8 +138,8 @@ private AzureFileStorageImpl constructImpl() { * * @return A ShareAsyncClient with the options set from the builder. * @throws NullPointerException If {@code shareName} is {@code null} or {@code shareName} is {@code null}. - * @throws IllegalArgumentException If neither a {@link SharedKeyCredential} or {@link #sasToken(String) SAS token} - * has been set. + * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} + * or {@link #sasToken(String) SAS token} has been set. */ public DirectoryAsyncClient buildDirectoryAsyncClient() { return new DirectoryAsyncClient(constructImpl(), shareName, resourcePath, shareSnapshot, accountName); @@ -156,8 +157,8 @@ public DirectoryAsyncClient buildDirectoryAsyncClient() { * * @return A DirectoryClient with the options set from the builder. * @throws NullPointerException If {@code endpoint}, {@code shareName} or {@code directoryPath} is {@code null}. - * @throws IllegalArgumentException If neither a {@link SharedKeyCredential} or {@link #sasToken(String) SAS token} - * has been set. + * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} + * or {@link #sasToken(String) SAS token} has been set. */ public DirectoryClient buildDirectoryClient() { return new DirectoryClient(this.buildDirectoryAsyncClient()); @@ -175,8 +176,8 @@ public DirectoryClient buildDirectoryClient() { * * @return A ShareAsyncClient with the options set from the builder. * @throws NullPointerException If {@code shareName} is {@code null} or the (@code resourcePath) is {@code null}. - * @throws IllegalArgumentException If neither a {@link SharedKeyCredential} or {@link #sasToken(String) SAS token} - * has been set. + * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} + * or {@link #sasToken(String) SAS token} has been set. */ public FileAsyncClient buildFileAsyncClient() { @@ -195,8 +196,8 @@ public FileAsyncClient buildFileAsyncClient() { * * @return A FileClient with the options set from the builder. * @throws NullPointerException If {@code endpoint}, {@code shareName} or {@code resourcePath} is {@code null}. - * @throws IllegalStateException If neither a {@link SharedKeyCredential} or {@link #sasToken(String) SAS token} - * has been set. + * @throws IllegalStateException If neither a {@link StorageSharedKeyCredential} + * or {@link #sasToken(String) SAS token} has been set. */ public FileClient buildFileClient() { return new FileClient(this.buildFileAsyncClient()); @@ -283,14 +284,14 @@ public FileClientBuilder resourcePath(String resourcePath) { } /** - * Sets the {@link SharedKeyCredential} used to authorize requests sent to the service. + * Sets the {@link StorageSharedKeyCredential} used to authorize requests sent to the service. * * @param credential The credential to use for authenticating request. * @return the updated FileClientBuilder * @throws NullPointerException If {@code credential} is {@code null}. */ - public FileClientBuilder credential(SharedKeyCredential credential) { - this.sharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); + public FileClientBuilder credential(StorageSharedKeyCredential credential) { + this.storageSharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); this.sasTokenCredential = null; return this; } @@ -305,13 +306,13 @@ public FileClientBuilder credential(SharedKeyCredential credential) { public FileClientBuilder sasToken(String sasToken) { this.sasTokenCredential = new SasTokenCredential(Objects.requireNonNull(sasToken, "'sasToken' cannot be null.")); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; return this; } /** - * Constructs a {@link SharedKeyCredential} used to authorize requests sent to the service. Additionally, if the - * connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link + * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, + * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link * #endpoint(String) endpoint}. * * @param connectionString Connection string of the storage account. diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java index 0f0e9e416b85..de3f9ce32788 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java @@ -14,7 +14,7 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.implementation.AzureFileStorageImpl; import com.azure.storage.file.implementation.models.DeleteSnapshotsOptionType; import com.azure.storage.file.implementation.models.ListSharesIncludeType; @@ -48,7 +48,7 @@ * * @see FileServiceClientBuilder * @see FileServiceClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClient(builder = FileServiceClientBuilder.class, isAsync = true) public final class FileServiceAsyncClient { diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java index e2831a698093..81eae4e7fec7 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java @@ -9,7 +9,7 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.FileCorsRule; import com.azure.storage.file.models.FileServiceProperties; import com.azure.storage.file.models.ListSharesOptions; @@ -33,7 +33,7 @@ * * @see FileServiceClientBuilder * @see FileServiceAsyncClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClient(builder = FileServiceClientBuilder.class) public final class FileServiceClient { diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java index 68ca17a5e256..bbfac1ea3cde 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java @@ -12,11 +12,11 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; -import com.azure.storage.common.policy.SharedKeyCredentialPolicy; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import com.azure.storage.file.implementation.AzureFileStorageBuilder; import com.azure.storage.file.implementation.AzureFileStorageImpl; import java.net.MalformedURLException; @@ -48,10 +48,11 @@ * * {@codesnippet com.azure.storage.file.fileServiceAsyncClient.instantiation.credential} * - *

    Another way to authenticate the client is using a {@link SharedKeyCredential}. To create a SharedKeyCredential - * a connection string from the Storage File service must be used. Set the SharedKeyCredential with {@link - * FileServiceClientBuilder#connectionString(String) connectionString}. If the builder has both a SAS token and - * SharedKeyCredential the SharedKeyCredential will be preferred when authorizing requests sent to the service.

    + *

    Another way to authenticate the client is using a {@link StorageSharedKeyCredential}. To create a + * StorageSharedKeyCredential a connection string from the Storage File service must be used. Set the + * StorageSharedKeyCredential with {@link FileServiceClientBuilder#connectionString(String) connectionString}. + * If the builder has both a SAS token and StorageSharedKeyCredential the StorageSharedKeyCredential will be preferred + * when authorizing requests sent to the service.

    * *

    Instantiating a synchronous FileService Client with connection string.

    * {@codesnippet com.azure.storage.file.fileServiceClient.instantiation.connectionstring} @@ -61,7 +62,7 @@ * * @see FileServiceClient * @see FileServiceAsyncClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClientBuilder(serviceClients = {FileServiceClient.class, FileServiceAsyncClient.class}) public final class FileServiceClientBuilder { @@ -70,7 +71,7 @@ public final class FileServiceClientBuilder { private String endpoint; private String accountName; - private SharedKeyCredential sharedKeyCredential; + private StorageSharedKeyCredential storageSharedKeyCredential; private SasTokenCredential sasTokenCredential; private HttpClient httpClient; @@ -92,8 +93,8 @@ public FileServiceClientBuilder() { private AzureFileStorageImpl constructImpl() { FileServiceVersion serviceVersion = version != null ? version : FileServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { - if (sharedKeyCredential != null) { - return new SharedKeyCredentialPolicy(sharedKeyCredential); + if (storageSharedKeyCredential != null) { + return new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential); } else if (sasTokenCredential != null) { return new SasTokenCredentialPolicy(sasTokenCredential); } else { @@ -120,8 +121,8 @@ private AzureFileStorageImpl constructImpl() { *

    * * @return A FileServiceAsyncClient with the options set from the builder. - * @throws IllegalArgumentException If neither a {@link SharedKeyCredential} or {@link #sasToken(String) SAS token} - * has been set. + * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} + * or {@link #sasToken(String) SAS token} has been set. */ public FileServiceAsyncClient buildAsyncClient() { return new FileServiceAsyncClient(constructImpl(), accountName); @@ -139,8 +140,8 @@ public FileServiceAsyncClient buildAsyncClient() { * * @return A FileServiceClient with the options set from the builder. * @throws NullPointerException If {@code endpoint} is {@code null}. - * @throws IllegalArgumentException If neither a {@link SharedKeyCredential} or {@link #sasToken(String) SAS token} - * has been set. + * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} + * or {@link #sasToken(String) SAS token} has been set. */ public FileServiceClient buildClient() { return new FileServiceClient(buildAsyncClient()); @@ -179,14 +180,14 @@ public FileServiceClientBuilder endpoint(String endpoint) { } /** - * Sets the {@link SharedKeyCredential} used to authorize requests sent to the service. + * Sets the {@link StorageSharedKeyCredential} used to authorize requests sent to the service. * * @param credential The credential to use for authenticating request. * @return the updated FileServiceClientBuilder * @throws NullPointerException If {@code credential} is {@code null}. */ - public FileServiceClientBuilder credential(SharedKeyCredential credential) { - this.sharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); + public FileServiceClientBuilder credential(StorageSharedKeyCredential credential) { + this.storageSharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); this.sasTokenCredential = null; return this; } @@ -201,13 +202,13 @@ public FileServiceClientBuilder credential(SharedKeyCredential credential) { public FileServiceClientBuilder sasToken(String sasToken) { this.sasTokenCredential = new SasTokenCredential(Objects.requireNonNull(sasToken, "'sasToken' cannot be null.")); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; return this; } /** - * Constructs a {@link SharedKeyCredential} used to authorize requests sent to the service. Additionally, if the - * connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link + * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, + * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link * #endpoint(String) endpoint}. * * @param connectionString Connection string of the storage account. diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasQueryParameters.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasQueryParameters.java index 3f9ef5472c5c..3ab94a0ee275 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasQueryParameters.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasQueryParameters.java @@ -3,10 +3,10 @@ package com.azure.storage.file; -import com.azure.storage.common.BaseSasQueryParameters; +import com.azure.storage.common.sas.BaseSasQueryParameters; +import com.azure.storage.common.sas.SasProtocol; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.sas.SasIpRange; -import com.azure.storage.common.SasProtocol; import java.time.OffsetDateTime; import java.util.Map; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java index e18bd517760c..0492d768c7cd 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java @@ -3,11 +3,11 @@ package com.azure.storage.file; +import com.azure.storage.common.sas.SasProtocol; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.sas.SasIpRange; -import com.azure.storage.common.SasProtocol; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import java.time.OffsetDateTime; @@ -394,21 +394,22 @@ public FileServiceSasSignatureValues setContentType(String contentType) { * Uses an account's shared key credential to sign these signature values to produce the proper SAS query * parameters. * - * @param sharedKeyCredentials A {@link SharedKeyCredential} object used to sign the SAS values. + * @param storageSharedKeyCredentials A {@link StorageSharedKeyCredential} object used to sign the SAS values. * @return {@link FileServiceSasQueryParameters} * @throws IllegalStateException If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64 * encoded string, or the UTF-8 charset isn't supported. - * @throws NullPointerException If {@code sharedKeyCredentials} is null. Or when any of {@code version}, + * @throws NullPointerException If {@code storageSharedKeyCredentials} is null. Or when any of {@code version}, * {@code canonicalName} or {@code resource} is null. Or if {@code identifier} is not set and any of * {@code expiryTime} or {@code permissions} is null. Or if {@code expiryTime} and {@code permissions} are not set * and {@code identifier} is null */ - public FileServiceSasQueryParameters generateSASQueryParameters(SharedKeyCredential sharedKeyCredentials) { - Utility.assertNotNull("sharedKeyCredentials", sharedKeyCredentials); + public FileServiceSasQueryParameters generateSASQueryParameters( + StorageSharedKeyCredential storageSharedKeyCredentials) { + Utility.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); assertGenerateOK(); // Signature is generated on the un-url-encoded values. - String signature = sharedKeyCredentials.computeHmac256(stringToSign()); + String signature = storageSharedKeyCredentials.computeHmac256(stringToSign()); return new FileServiceSasQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, this.sasIpRange, this.identifier, this.resource, this.permissions, signature, this.cacheControl, diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java index 59142935e7dd..e1808feb40ce 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java @@ -14,7 +14,7 @@ import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.implementation.AzureFileStorageImpl; import com.azure.storage.file.implementation.models.ShareCreateSnapshotHeaders; import com.azure.storage.file.implementation.models.ShareGetPropertiesHeaders; @@ -56,7 +56,7 @@ * * @see ShareClientBuilder * @see ShareClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClient(builder = ShareClientBuilder.class, isAsync = true) public class ShareAsyncClient { diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java index cdf2680df5ac..f071d5e2b975 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java @@ -9,7 +9,7 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.FileHttpHeaders; import com.azure.storage.file.models.FileSignedIdentifier; import com.azure.storage.file.models.ShareInfo; @@ -36,7 +36,7 @@ * * @see ShareClientBuilder * @see ShareAsyncClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClient(builder = ShareClientBuilder.class) public class ShareClient { diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java index 91d287dfb926..153365af573a 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java @@ -12,11 +12,11 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; -import com.azure.storage.common.policy.SharedKeyCredentialPolicy; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import com.azure.storage.file.implementation.AzureFileStorageBuilder; import com.azure.storage.file.implementation.AzureFileStorageImpl; @@ -50,10 +50,11 @@ * * {@codesnippet com.azure.storage.file.shareAsyncClient.instantiation.credential} * - *

    Another way to authenticate the client is using a {@link SharedKeyCredential}. To create a SharedKeyCredential - * a connection string from the Storage File service must be used. Set the SharedKeyCredential with {@link - * ShareClientBuilder#connectionString(String) connectionString}. If the builder has both a SAS token and - * SharedKeyCredential the SharedKeyCredential will be preferred when authorizing requests sent to the service.

    + *

    Another way to authenticate the client is using a {@link StorageSharedKeyCredential}. To create a + * StorageSharedKeyCredential a connection string from the Storage File service must be used. Set the + * StorageSharedKeyCredential with {@link ShareClientBuilder#connectionString(String) connectionString}. + * If the builder has both a SAS token and StorageSharedKeyCredential the StorageSharedKeyCredential will be + * preferred when authorizing requests sent to the service.

    * *

    Instantiating a synchronous Share Client with connection string.

    * {@codesnippet com.azure.storage.file.shareClient.instantiation.connectionstring} @@ -63,7 +64,7 @@ * * @see ShareClient * @see ShareAsyncClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClientBuilder(serviceClients = {ShareClient.class, ShareAsyncClient.class}) public class ShareClientBuilder { @@ -74,7 +75,7 @@ public class ShareClientBuilder { private String shareName; private String snapshot; - private SharedKeyCredential sharedKeyCredential; + private StorageSharedKeyCredential storageSharedKeyCredential; private SasTokenCredential sasTokenCredential; private HttpClient httpClient; @@ -98,8 +99,8 @@ private AzureFileStorageImpl constructImpl() { FileServiceVersion serviceVersion = version != null ? version : FileServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { - if (sharedKeyCredential != null) { - return new SharedKeyCredentialPolicy(sharedKeyCredential); + if (storageSharedKeyCredential != null) { + return new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential); } else if (sasTokenCredential != null) { return new SasTokenCredentialPolicy(sasTokenCredential); } else { @@ -127,8 +128,8 @@ private AzureFileStorageImpl constructImpl() { * * @return A ShareAsyncClient with the options set from the builder. * @throws NullPointerException If {@code shareName} is {@code null}. - * @throws IllegalArgumentException If neither a {@link SharedKeyCredential} or {@link #sasToken(String) SAS token} - * has been set. + * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} + * or {@link #sasToken(String) SAS token} has been set. */ public ShareAsyncClient buildAsyncClient() { return new ShareAsyncClient(constructImpl(), shareName, snapshot, accountName); @@ -146,8 +147,8 @@ public ShareAsyncClient buildAsyncClient() { * * @return A ShareClient with the options set from the builder. * @throws NullPointerException If {@code endpoint} or {@code shareName} is {@code null}. - * @throws IllegalStateException If neither a {@link SharedKeyCredential} or {@link #sasToken(String) SAS token} - * has been set. + * @throws IllegalStateException If neither a {@link StorageSharedKeyCredential} + * or {@link #sasToken(String) SAS token} has been set. */ public ShareClient buildClient() { return new ShareClient(buildAsyncClient()); @@ -222,14 +223,14 @@ public ShareClientBuilder snapshot(String snapshot) { } /** - * Sets the {@link SharedKeyCredential} used to authorize requests sent to the service. + * Sets the {@link StorageSharedKeyCredential} used to authorize requests sent to the service. * * @param credential The credential to use for authenticating request. * @return the updated ShareClientBuilder * @throws NullPointerException If {@code credential} is {@code null}. */ - public ShareClientBuilder credential(SharedKeyCredential credential) { - this.sharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); + public ShareClientBuilder credential(StorageSharedKeyCredential credential) { + this.storageSharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); this.sasTokenCredential = null; return this; } @@ -244,13 +245,13 @@ public ShareClientBuilder credential(SharedKeyCredential credential) { public ShareClientBuilder sasToken(String sasToken) { this.sasTokenCredential = new SasTokenCredential(Objects.requireNonNull(sasToken, "'sasToken' cannot be null.")); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; return this; } /** - * Constructs a {@link SharedKeyCredential} used to authorize requests sent to the service. Additionally, if the - * connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link + * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, + * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link * #endpoint(String) endpoint}. * * @param connectionString Connection string of the storage account. diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryAsyncJavaDocCodeSamples.java index 75fc64df21a7..29f1d2ef0c00 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryAsyncJavaDocCodeSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.storage.file; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.FileHttpHeaders; import com.azure.storage.file.models.NtfsFileAttributes; @@ -62,7 +62,7 @@ public DirectoryAsyncClient createAsyncClientWithCredential() { } /** - * Generates code sample for creating a {@link DirectoryAsyncClient} with {@code connectionString} which turns into {@link SharedKeyCredential} + * Generates code sample for creating a {@link DirectoryAsyncClient} with {@code connectionString} which turns into {@link StorageSharedKeyCredential} * @return An instance of {@link DirectoryAsyncClient} */ public DirectoryAsyncClient createAsyncClientWithConnectionString() { diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryJavaDocCodeSamples.java index a5e42d817188..306e33ccddf9 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryJavaDocCodeSamples.java @@ -4,7 +4,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.DirectoryInfo; import com.azure.storage.file.models.DirectoryProperties; import com.azure.storage.file.models.DirectorySetMetadataInfo; @@ -76,7 +76,7 @@ public DirectoryClient createClientWithCredential() { /** * Generates code sample for creating a {@link DirectoryClient} with {@code connectionString} which turns into - * {@link SharedKeyCredential} + * {@link StorageSharedKeyCredential} * * @return An instance of {@link DirectoryClient} */ diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java index c19e533ccac0..27fa1b0f74ee 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.storage.file; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.FileHttpHeaders; import com.azure.storage.file.models.FileProperties; import com.azure.storage.file.models.FileRange; @@ -71,7 +71,7 @@ public FileAsyncClient createAsyncClientWithCredential() { /** * Generates code sample for creating a {@link FileAsyncClient} with {@code connectionString} - * which turns into {@link SharedKeyCredential} + * which turns into {@link StorageSharedKeyCredential} * @return An instance of {@link FileAsyncClient} */ public FileAsyncClient createAsyncClientWithConnectionString() { diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java index 25e402fbae25..361e6529a06d 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java @@ -4,7 +4,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.FileCopyInfo; import com.azure.storage.file.models.FileHttpHeaders; import com.azure.storage.file.models.FileInfo; @@ -88,7 +88,7 @@ public FileClient createClientWithCredential() { /** * Generates code sample for creating a {@link FileClient} with {@code connectionString} which turns into {@link - * SharedKeyCredential} + * StorageSharedKeyCredential} * * @return An instance of {@link FileClient} */ diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceAsyncJavaDocCodeSamples.java index 3ccfb020b787..0baca9151029 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceAsyncJavaDocCodeSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.storage.file; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.FileServiceProperties; import com.azure.storage.file.models.ListSharesOptions; import java.time.LocalDateTime; @@ -56,7 +56,7 @@ public FileServiceAsyncClient createAsyncClientWithCredential() { } /** - * Generates code sample for creating a {@link FileServiceAsyncClient} with {@code connectionString} which turns into {@link SharedKeyCredential} + * Generates code sample for creating a {@link FileServiceAsyncClient} with {@code connectionString} which turns into {@link StorageSharedKeyCredential} * @return An instance of {@link FileServiceAsyncClient} */ public FileServiceAsyncClient createAsyncClientWithConnectionString() { diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceJavaDocCodeSamples.java index 00f5a9418c42..93e411cf3205 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceJavaDocCodeSamples.java @@ -4,7 +4,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.FileServiceProperties; import com.azure.storage.file.models.ListSharesOptions; import java.time.Duration; @@ -74,7 +74,7 @@ public FileServiceClient createClientWithCredential() { } /** - * Generates code sample for creating a {@link FileServiceClient} with {@code connectionString} which turns into {@link SharedKeyCredential} + * Generates code sample for creating a {@link FileServiceClient} with {@code connectionString} which turns into {@link StorageSharedKeyCredential} * @return An instance of {@link FileServiceClient} */ public FileServiceClient createClientWithConnectionString() { diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java index 037836d161dd..1abea575ce9a 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.storage.file; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.FileAccessPolicy; import com.azure.storage.file.models.FileHttpHeaders; import com.azure.storage.file.models.FileSignedIdentifier; @@ -67,7 +67,7 @@ public ShareAsyncClient createAsyncClientWithCredential() { /** * Generates code sample for creating a {@link ShareAsyncClient} with {@code connectionString} which turns into - * {@link SharedKeyCredential} + * {@link StorageSharedKeyCredential} * * @return An instance of {@link ShareAsyncClient} */ diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java index 95133cf3720b..0800957eb4a6 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java @@ -4,7 +4,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.FileAccessPolicy; import com.azure.storage.file.models.FileHttpHeaders; import com.azure.storage.file.models.FileSignedIdentifier; @@ -76,7 +76,7 @@ public ShareClient createClientWithCredential() { } /** - * Generates code sample for creating a {@link ShareClient} with {@code connectionString} which turns into {@link SharedKeyCredential} + * Generates code sample for creating a {@link ShareClient} with {@code connectionString} which turns into {@link StorageSharedKeyCredential} * @return An instance of {@link ShareClient} */ public ShareClient createClientWithConnectionString() { diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy index d6894f07a6d0..e977b5dbeced 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy @@ -3,8 +3,8 @@ package com.azure.storage.file +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.common.implementation.Constants -import com.azure.storage.common.credentials.SharedKeyCredential import com.azure.storage.file.models.FileErrorCode import com.azure.storage.file.models.FileHttpHeaders import com.azure.storage.file.models.FileStorageException @@ -37,7 +37,7 @@ class DirectoryAPITests extends APISpec { def "Get directory URL"() { given: - def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def accountName = StorageSharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.file.core.windows.net/%s/%s", accountName, shareName, directoryPath) when: @@ -49,7 +49,7 @@ class DirectoryAPITests extends APISpec { def "Get share snapshot URL"() { given: - def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def accountName = StorageSharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.file.core.windows.net/%s/%s", accountName, shareName, directoryPath) when: diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy index 4bb285c39f66..149faedf9cfb 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy @@ -4,7 +4,7 @@ package com.azure.storage.file import com.azure.storage.common.implementation.Constants -import com.azure.storage.common.credentials.SharedKeyCredential +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.file.models.FileErrorCode import com.azure.storage.file.models.FileHttpHeaders import com.azure.storage.file.models.FileStorageException @@ -37,7 +37,7 @@ class DirectoryAsyncAPITests extends APISpec { def "Get directory URL"() { given: - def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def accountName = StorageSharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.file.core.windows.net/%s/%s", accountName, shareName, directoryPath) when: def directoryURL = primaryDirectoryAsyncClient.getDirectoryUrl() diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy index d7c2dfedb0aa..7a926a8fb0b6 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy @@ -8,7 +8,7 @@ import com.azure.core.exception.UnexpectedLengthException import com.azure.core.http.rest.Response import com.azure.core.util.Context import com.azure.storage.common.implementation.Constants -import com.azure.storage.common.credentials.SharedKeyCredential +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.file.models.FileCopyInfo import com.azure.storage.file.models.FileErrorCode import com.azure.storage.file.models.FileHttpHeaders @@ -53,7 +53,7 @@ class FileAPITests extends APISpec { def "Get file URL"() { given: - def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def accountName = StorageSharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.file.core.windows.net/%s/%s", accountName, shareName, filePath) when: @@ -65,7 +65,7 @@ class FileAPITests extends APISpec { def "Get share snapshot URL"() { given: - def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def accountName = StorageSharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.file.core.windows.net/%s/%s", accountName, shareName, filePath) when: @@ -377,7 +377,7 @@ class FileAPITests extends APISpec { def destinationOffset = 0 primaryFileClient.upload(getInputStream(data.getBytes()), data.length()) - def credential = SharedKeyCredential.fromConnectionString(connectionString) + def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sasToken = new FileServiceSasSignatureValues() .setExpiryTime(getUTCNow().plusDays(1)) .setPermissions(new FileSasPermission().setReadPermission(true).toString()) diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy index 6acba918f2b6..74638655dba0 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy @@ -7,7 +7,7 @@ import com.azure.core.exception.HttpResponseException import com.azure.core.exception.UnexpectedLengthException import com.azure.core.implementation.util.FluxUtil import com.azure.storage.common.implementation.Constants -import com.azure.storage.common.credentials.SharedKeyCredential +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.file.models.FileErrorCode import com.azure.storage.file.models.FileHttpHeaders import com.azure.storage.file.models.FileRange @@ -52,7 +52,7 @@ class FileAsyncAPITests extends APISpec { def "Get file URL"() { given: - def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def accountName = StorageSharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.file.core.windows.net/%s/%s", accountName, shareName, filePath) when: @@ -405,7 +405,7 @@ class FileAsyncAPITests extends APISpec { def destinationOffset = 0 primaryFileAsyncClient.upload(Flux.just(ByteBuffer.wrap(data.getBytes())), data.length()).block() - def credential = SharedKeyCredential.fromConnectionString(connectionString) + def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sasToken = new FileServiceSasSignatureValues() .setExpiryTime(getUTCNow().plusDays(1)) .setPermissions(new FileSasPermission().setReadPermission(true).toString()) diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy index 62f811c2cfa6..ba40272a6542 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy @@ -1,14 +1,14 @@ package com.azure.storage.file -import com.azure.storage.common.AccountSasPermission -import com.azure.storage.common.AccountSasResourceType -import com.azure.storage.common.AccountSasService -import com.azure.storage.common.AccountSasSignatureValues +import com.azure.storage.common.sas.AccountSasPermission +import com.azure.storage.common.sas.AccountSasResourceType +import com.azure.storage.common.sas.AccountSasService +import com.azure.storage.common.sas.AccountSasSignatureValues import com.azure.storage.common.implementation.Constants import com.azure.storage.common.sas.SasIpRange -import com.azure.storage.common.SasProtocol -import com.azure.storage.common.credentials.SharedKeyCredential +import com.azure.storage.common.sas.SasProtocol +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.file.models.FileAccessPolicy import com.azure.storage.file.models.FileSignedIdentifier import com.azure.storage.file.models.FileStorageException @@ -175,7 +175,7 @@ class FileSASTests extends APISpec { def contentType = "type" when: - def credential = SharedKeyCredential.fromConnectionString(connectionString) + def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sas = new FileServiceSasSignatureValues() .setPermissions(permissions.toString()) .setExpiryTime(expiryTime) @@ -234,7 +234,7 @@ class FileSASTests extends APISpec { def contentType = "type" when: - def credential = SharedKeyCredential.fromConnectionString(connectionString) + def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sas = new FileServiceSasSignatureValues() .setPermissions(permissions.toString()) .setExpiryTime(expiryTime) @@ -288,7 +288,7 @@ class FileSASTests extends APISpec { OffsetDateTime expiryTime = getUTCNow().plusDays(1) when: - def credential = SharedKeyCredential.fromConnectionString(connectionString) + def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sasWithId = new FileServiceSasSignatureValues() .setIdentifier(identifier.getId()) .setCanonicalName(primaryShareClient.getShareName(), credential.getAccountName()) @@ -339,7 +339,7 @@ class FileSASTests extends APISpec { def expiryTime = getUTCNow().plusDays(1) when: - def credential = SharedKeyCredential.fromConnectionString(connectionString) + def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sas = AccountSasSignatureValues.generateAccountSas(credential, service, resourceType, permissions, expiryTime, null, null, null, null) then: diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAPITests.groovy index deac5f59602a..289eb564d388 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAPITests.groovy @@ -3,7 +3,7 @@ package com.azure.storage.file -import com.azure.storage.common.credentials.SharedKeyCredential +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.file.models.FileCorsRule import com.azure.storage.file.models.FileErrorCode import com.azure.storage.file.models.FileMetrics @@ -36,7 +36,7 @@ class FileServiceAPITests extends APISpec { def "Get file service URL"() { given: - def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def accountName = StorageSharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.file.core.windows.net", accountName) when: def fileServiceURL = primaryFileServiceClient.getFileServiceUrl() diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAsyncAPITests.groovy index d15400de643a..dd85d1242834 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAsyncAPITests.groovy @@ -3,7 +3,7 @@ package com.azure.storage.file -import com.azure.storage.common.credentials.SharedKeyCredential +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.file.models.FileCorsRule import com.azure.storage.file.models.FileErrorCode import com.azure.storage.file.models.FileMetrics @@ -36,7 +36,7 @@ class FileServiceAsyncAPITests extends APISpec { def "Get file service URL"() { given: - def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def accountName = StorageSharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.file.core.windows.net", accountName) when: diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy index 8e249e41b4a2..3c5476119d4d 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy @@ -4,7 +4,7 @@ package com.azure.storage.file import com.azure.core.http.netty.NettyAsyncHttpClientBuilder -import com.azure.storage.common.credentials.SharedKeyCredential +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.file.models.FileErrorCode import com.azure.storage.file.models.FileHttpHeaders import com.azure.storage.file.models.NtfsFileAttributes @@ -34,7 +34,7 @@ class ShareAPITests extends APISpec { def "Get share URL"() { given: - def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def accountName = StorageSharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.file.core.windows.net/%s", accountName, shareName) when: @@ -46,7 +46,7 @@ class ShareAPITests extends APISpec { def "Get share snapshot URL"() { given: - def accoutName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def accoutName = StorageSharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.file.core.windows.net/%s", accoutName, shareName) primaryShareClient.create() when: diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy index 20e95dbb0be9..ba4acf06d577 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy @@ -4,7 +4,7 @@ package com.azure.storage.file import com.azure.core.http.netty.NettyAsyncHttpClientBuilder -import com.azure.storage.common.credentials.SharedKeyCredential +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.file.models.FileErrorCode import com.azure.storage.file.models.FileHttpHeaders import com.azure.storage.file.models.NtfsFileAttributes @@ -33,7 +33,7 @@ class ShareAsyncAPITests extends APISpec { def "Get share URL"() { given: - def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def accountName = StorageSharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.file.core.windows.net/%s", accountName, shareName) when: def shareURL = primaryShareAsyncClient.getShareUrl() diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java index ded3f64b0778..55cf39fd4d71 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java @@ -18,7 +18,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.policy.RequestRetryOptions; import com.azure.storage.common.policy.RequestRetryPolicy; import com.azure.storage.common.policy.ResponseValidationPolicyBuilder; @@ -43,14 +43,15 @@ final class BuilderHelper { * * @param connectionString Connection string from the service account. * @param accountNameSetter Callback to set the account name on the builder. - * @param credentialSetter Callback to set the {@link SharedKeyCredential} of the builder. + * @param credentialSetter Callback to set the {@link StorageSharedKeyCredential} of the builder. * @param endpointSetter Callback to set the endpoint of the builder. * @param logger {@link ClientLogger} used to log any exceptions. * @throws NullPointerException If {@code connectionString} is {@code null}. * @throws IllegalArgumentException If {@code connectionString} doesn't contain 'AccountName' or 'AccountKey'. */ static void configureConnectionString(String connectionString, Consumer accountNameSetter, - Consumer credentialSetter, Consumer endpointSetter, ClientLogger logger) { + Consumer credentialSetter, + Consumer endpointSetter, ClientLogger logger) { Objects.requireNonNull(connectionString, "'connectionString' cannot be null."); Map connectionStringPieces = Utility.parseConnectionString(connectionString); @@ -72,7 +73,7 @@ static void configureConnectionString(String connectionString, Consumer } accountNameSetter.accept(accountName); - credentialSetter.accept(new SharedKeyCredential(accountName, accountKey)); + credentialSetter.accept(new StorageSharedKeyCredential(accountName, accountKey)); } /** diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java index 3a50d7758105..546712b7b11a 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java @@ -13,7 +13,7 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; import com.azure.storage.queue.implementation.models.MessageIdUpdateHeaders; import com.azure.storage.queue.implementation.models.MessageIdsUpdateResponse; @@ -34,7 +34,10 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.Spliterators; import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; import static com.azure.core.implementation.util.FluxUtil.monoError; import static com.azure.core.implementation.util.FluxUtil.pagedFluxError; @@ -53,7 +56,7 @@ * * @see QueueClientBuilder * @see QueueClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClient(builder = QueueClientBuilder.class, isAsync = true) public final class QueueAsyncClient { @@ -356,7 +359,7 @@ public PagedFlux getAccessPolicy() { * *

    Set a read only stored access policy

    * - * {@codesnippet com.azure.storage.queue.QueueAsyncClient.setAccessPolicy#List} + * {@codesnippet com.azure.storage.queue.QueueAsyncClient.setAccessPolicy#Iterable} * *

    For more information, see the * Azure Docs.

    @@ -366,7 +369,7 @@ public PagedFlux getAccessPolicy() { * @throws QueueStorageException If the queue doesn't exist, a stored access policy doesn't have all fields filled * out, or the queue will have more than five policies. */ - public Mono setAccessPolicy(List permissions) { + public Mono setAccessPolicy(Iterable permissions) { try { return setAccessPolicyWithResponse(permissions).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { @@ -381,7 +384,7 @@ public Mono setAccessPolicy(List permissions) { * *

    Set a read only stored access policy

    * - * {@codesnippet com.azure.storage.queue.QueueAsyncClient.setAccessPolicyWithResponse#List} + * {@codesnippet com.azure.storage.queue.QueueAsyncClient.setAccessPolicyWithResponse#Iterable} * *

    For more information, see the * Azure Docs.

    @@ -391,7 +394,7 @@ public Mono setAccessPolicy(List permissions) { * @throws QueueStorageException If the queue doesn't exist, a stored access policy doesn't have all fields filled * out, or the queue will have more than five policies. */ - public Mono> setAccessPolicyWithResponse(List permissions) { + public Mono> setAccessPolicyWithResponse(Iterable permissions) { try { return withContext(context -> setAccessPolicyWithResponse(permissions, context)); } catch (RuntimeException ex) { @@ -399,7 +402,7 @@ public Mono> setAccessPolicyWithResponse(List> setAccessPolicyWithResponse(List permissions, Context context) { + Mono> setAccessPolicyWithResponse(Iterable permissions, Context context) { /* We truncate to seconds because the service only supports nanoseconds or seconds, but doing an OffsetDateTime.now will only give back milliseconds (more precise fields are zeroed and not serialized). This @@ -418,9 +421,12 @@ OffsetDateTime.now will only give back milliseconds (more precise fields are zer } } } + List permissionsList = StreamSupport.stream( + permissions != null ? permissions.spliterator() : Spliterators.emptySpliterator(), false) + .collect(Collectors.toList()); return client.queues() - .setAccessPolicyWithRestResponseAsync(queueName, permissions, null, null, context) + .setAccessPolicyWithRestResponseAsync(queueName, permissionsList, null, null, context) .map(response -> new SimpleResponse<>(response, null)); } @@ -784,7 +790,7 @@ public Mono updateMessage(String messageId, String popRecei * or the {@code visibilityTimeout} is outside the allowed bounds */ public Mono> updateMessageWithResponse(String messageId, String popReceipt, - String messageText, Duration visibilityTimeout) { + String messageText, Duration visibilityTimeout) { try { return withContext(context -> updateMessageWithResponse(messageId, popReceipt, messageText, visibilityTimeout, context)); diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java index 236e3d94cd99..60e39f8e3de3 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java @@ -7,7 +7,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.queue.models.PeekedMessageItem; import com.azure.storage.queue.models.QueueMessageItem; import com.azure.storage.queue.models.QueueProperties; @@ -34,7 +34,7 @@ * * @see QueueClientBuilder * @see QueueAsyncClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClient(builder = QueueClientBuilder.class) public final class QueueClient { diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java index 314b31ab892a..47354a293511 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java @@ -13,11 +13,11 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; -import com.azure.storage.common.policy.SharedKeyCredentialPolicy; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import com.azure.storage.queue.implementation.AzureQueueStorageBuilder; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; @@ -54,10 +54,11 @@ *

    Instantiating an Asynchronous Queue Client with credential

    * {@codesnippet com.azure.storage.queue.queueAsyncClient.instantiation.credential} * - *

    Another way to authenticate the client is using a {@link SharedKeyCredential}. To create a SharedKeyCredential - * a connection string from the Storage Queue service must be used. Set the SharedKeyCredential with {@link - * QueueClientBuilder#connectionString(String) connectionString}. If the builder has both a SAS token and - * SharedKeyCredential the SharedKeyCredential will be preferred when authorizing requests sent to the service.

    + *

    Another way to authenticate the client is using a {@link StorageSharedKeyCredential}. To create a + * StorageSharedKeyCredential a connection string from the Storage Queue service must be used. + * Set the StorageSharedKeyCredential with {@link QueueClientBuilder#connectionString(String) connectionString}. + * If the builder has both a SAS token and StorageSharedKeyCredential the StorageSharedKeyCredential will be preferred + * when authorizing requests sent to the service.

    * *

    Instantiating a synchronous Queue Client with connection string.

    * {@codesnippet com.azure.storage.queue.queueClient.instantiation.connectionstring} @@ -67,7 +68,7 @@ * * @see QueueClient * @see QueueAsyncClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClientBuilder(serviceClients = {QueueClient.class, QueueAsyncClient.class}) public final class QueueClientBuilder { @@ -77,7 +78,7 @@ public final class QueueClientBuilder { private String accountName; private String queueName; - private SharedKeyCredential sharedKeyCredential; + private StorageSharedKeyCredential storageSharedKeyCredential; private TokenCredential tokenCredential; private SasTokenCredential sasTokenCredential; @@ -102,8 +103,8 @@ private AzureQueueStorageImpl constructImpl() { QueueServiceVersion serviceVersion = version != null ? version : QueueServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { - if (sharedKeyCredential != null) { - return new SharedKeyCredentialPolicy(sharedKeyCredential); + if (storageSharedKeyCredential != null) { + return new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential); } else if (tokenCredential != null) { return new BearerTokenAuthenticationPolicy(tokenCredential, String.format("%s/.default", endpoint)); } else if (sasTokenCredential != null) { @@ -132,8 +133,8 @@ private AzureQueueStorageImpl constructImpl() { * * @return A QueueClient with the options set from the builder. * @throws NullPointerException If {@code endpoint} or {@code queueName} have not been set. - * @throws IllegalStateException If neither a {@link SharedKeyCredential} or {@link #sasToken(String) SAS token} - * has been set. + * @throws IllegalStateException If neither a {@link StorageSharedKeyCredential} + * or {@link #sasToken(String) SAS token} has been set. */ public QueueClient buildClient() { return new QueueClient(buildAsyncClient()); @@ -151,8 +152,8 @@ public QueueClient buildClient() { * * @return A QueueAsyncClient with the options set from the builder. * @throws NullPointerException If {@code endpoint} or {@code queueName} have not been set. - * @throws IllegalArgumentException If neither a {@link SharedKeyCredential} or {@link #sasToken(String) SAS token} - * has been set. + * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} + * or {@link #sasToken(String) SAS token} has been set. */ public QueueAsyncClient buildAsyncClient() { return new QueueAsyncClient(constructImpl(), queueName, accountName); @@ -214,14 +215,14 @@ public QueueClientBuilder queueName(String queueName) { } /** - * Sets the {@link SharedKeyCredential} used to authorize requests sent to the service. + * Sets the {@link StorageSharedKeyCredential} used to authorize requests sent to the service. * * @param credential The credential to use for authenticating request. * @return the updated QueueClientBuilder * @throws NullPointerException If {@code credential} is {@code null}. */ - public QueueClientBuilder credential(SharedKeyCredential credential) { - this.sharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); + public QueueClientBuilder credential(StorageSharedKeyCredential credential) { + this.storageSharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); this.tokenCredential = null; this.sasTokenCredential = null; return this; @@ -236,7 +237,7 @@ public QueueClientBuilder credential(SharedKeyCredential credential) { */ public QueueClientBuilder credential(TokenCredential credential) { this.tokenCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.sasTokenCredential = null; return this; } @@ -251,14 +252,14 @@ public QueueClientBuilder credential(TokenCredential credential) { public QueueClientBuilder sasToken(String sasToken) { this.sasTokenCredential = new SasTokenCredential(Objects.requireNonNull(sasToken, "'sasToken' cannot be null.")); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.tokenCredential = null; return this; } /** - * Constructs a {@link SharedKeyCredential} used to authorize requests sent to the service. Additionally, if the - * connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link + * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, + * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link * #endpoint(String) endpoint}. * * @param connectionString Connection string of the storage account. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSasPermission.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSasPermission.java index 49e0c9ea11b6..345055d2f443 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSasPermission.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSasPermission.java @@ -75,11 +75,11 @@ public boolean getReadPermission() { /** * Sets the read permission status. * - * @param hadReadPermission Permission status to set + * @param hasReadPermission Permission status to set * @return the updated QueueSasPermission object. */ - public QueueSasPermission setReadPermission(boolean hadReadPermission) { - this.readPermission = hadReadPermission; + public QueueSasPermission setReadPermission(boolean hasReadPermission) { + this.readPermission = hasReadPermission; return this; } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java index 1828f397b8ef..d0c9efc6837d 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java @@ -12,7 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; import com.azure.storage.queue.implementation.models.ListQueuesIncludeType; import com.azure.storage.queue.models.QueueCorsRule; @@ -47,7 +47,7 @@ * * @see QueueServiceClientBuilder * @see QueueServiceClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClient(builder = QueueServiceClientBuilder.class, isAsync = true) public final class QueueServiceAsyncClient { diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java index 9bdc4fed7737..5327b49ac79d 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java @@ -8,7 +8,7 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.queue.models.QueueCorsRule; import com.azure.storage.queue.models.QueueItem; import com.azure.storage.queue.models.QueueServiceProperties; @@ -33,7 +33,7 @@ * * @see QueueServiceClientBuilder * @see QueueServiceAsyncClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClient(builder = QueueServiceClientBuilder.class) public final class QueueServiceClient { diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java index 93c57bb78f25..ab1bd596ca0f 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java @@ -13,11 +13,11 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; -import com.azure.storage.common.policy.SharedKeyCredentialPolicy; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import com.azure.storage.queue.implementation.AzureQueueStorageBuilder; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; @@ -52,10 +52,11 @@ *

    Instantiating an Asynchronous Queue Service Client with SAS token

    * {@codesnippet com.azure.storage.queue.queueServiceAsyncClient.instantiation.credential} * - *

    Another way to authenticate the client is using a {@link SharedKeyCredential}. To create a SharedKeyCredential - * a connection string from the Storage Queue service must be used. Set the SharedKeyCredential with {@link - * QueueServiceClientBuilder#connectionString(String) connectionString}. If the builder has both a SAS token and - * SharedKeyCredential the SharedKeyCredential will be preferred when authorizing requests sent to the service.

    + *

    Another way to authenticate the client is using a {@link StorageSharedKeyCredential}. To create a + * StorageSharedKeyCredential a connection string from the Storage Queue service must be used. + * Set the StorageSharedKeyCredential with {@link QueueServiceClientBuilder#connectionString(String) connectionString}. + * If the builder has both a SAS token and StorageSharedKeyCredential the StorageSharedKeyCredential will be preferred + * when authorizing requests sent to the service.

    * *

    Instantiating a synchronous Queue Service Client with connection string.

    * {@codesnippet com.azure.storage.queue.queueServiceClient.instantiation.connectionstring} @@ -65,7 +66,7 @@ * * @see QueueServiceClient * @see QueueServiceAsyncClient - * @see SharedKeyCredential + * @see StorageSharedKeyCredential */ @ServiceClientBuilder(serviceClients = {QueueServiceClient.class, QueueServiceAsyncClient.class}) public final class QueueServiceClientBuilder { @@ -74,7 +75,7 @@ public final class QueueServiceClientBuilder { private String endpoint; private String accountName; - private SharedKeyCredential sharedKeyCredential; + private StorageSharedKeyCredential storageSharedKeyCredential; private TokenCredential tokenCredential; private SasTokenCredential sasTokenCredential; @@ -97,8 +98,8 @@ public QueueServiceClientBuilder() { private AzureQueueStorageImpl constructImpl() { QueueServiceVersion serviceVersion = version != null ? version : QueueServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { - if (sharedKeyCredential != null) { - return new SharedKeyCredentialPolicy(sharedKeyCredential); + if (storageSharedKeyCredential != null) { + return new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential); } else if (tokenCredential != null) { return new BearerTokenAuthenticationPolicy(tokenCredential, String.format("%s/.default", endpoint)); } else if (sasTokenCredential != null) { @@ -127,8 +128,8 @@ private AzureQueueStorageImpl constructImpl() { * * @return A QueueServiceAsyncClient with the options set from the builder. * @throws NullPointerException If {@code endpoint} or {@code queueName} have not been set. - * @throws IllegalArgumentException If neither a {@link SharedKeyCredential} or {@link #sasToken(String) SAS token} - * has been set. + * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} + * or {@link #sasToken(String) SAS token} has been set. */ public QueueServiceAsyncClient buildAsyncClient() { return new QueueServiceAsyncClient(constructImpl(), accountName); @@ -146,8 +147,8 @@ public QueueServiceAsyncClient buildAsyncClient() { * * @return A QueueServiceClient with the options set from the builder. * @throws NullPointerException If {@code endpoint} or {@code queueName} have not been set. - * @throws IllegalArgumentException If neither a {@link SharedKeyCredential} or {@link #sasToken(String) SAS token} - * has been set. + * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} + * or {@link #sasToken(String) SAS token} has been set. */ public QueueServiceClient buildClient() { return new QueueServiceClient(buildAsyncClient()); @@ -189,14 +190,14 @@ public QueueServiceClientBuilder endpoint(String endpoint) { } /** - * Sets the {@link SharedKeyCredential} used to authorize requests sent to the service. + * Sets the {@link StorageSharedKeyCredential} used to authorize requests sent to the service. * * @param credential The credential to use for authenticating request. * @return the updated QueueServiceClientBuilder * @throws NullPointerException If {@code credential} is {@code null}. */ - public QueueServiceClientBuilder credential(SharedKeyCredential credential) { - this.sharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); + public QueueServiceClientBuilder credential(StorageSharedKeyCredential credential) { + this.storageSharedKeyCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); this.tokenCredential = null; this.sasTokenCredential = null; return this; @@ -211,7 +212,7 @@ public QueueServiceClientBuilder credential(SharedKeyCredential credential) { */ public QueueServiceClientBuilder credential(TokenCredential credential) { this.tokenCredential = Objects.requireNonNull(credential, "'credential' cannot be null."); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.sasTokenCredential = null; return this; } @@ -226,14 +227,14 @@ public QueueServiceClientBuilder credential(TokenCredential credential) { public QueueServiceClientBuilder sasToken(String sasToken) { this.sasTokenCredential = new SasTokenCredential(Objects.requireNonNull(sasToken, "'sasToken' cannot be null.")); - this.sharedKeyCredential = null; + this.storageSharedKeyCredential = null; this.tokenCredential = null; return this; } /** - * Constructs a {@link SharedKeyCredential} used to authorize requests sent to the service. Additionally, if the - * connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link + * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, + * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link * #endpoint(String) endpoint}. * * @param connectionString Connection string of the storage account. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasQueryParameters.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasQueryParameters.java index a22e6d843885..4bb700c0d8ea 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasQueryParameters.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasQueryParameters.java @@ -3,10 +3,10 @@ package com.azure.storage.queue; -import com.azure.storage.common.BaseSasQueryParameters; +import com.azure.storage.common.sas.BaseSasQueryParameters; +import com.azure.storage.common.sas.SasProtocol; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.sas.SasIpRange; -import com.azure.storage.common.SasProtocol; import java.time.OffsetDateTime; import java.util.Map; @@ -26,15 +26,16 @@ public final class QueueServiceSasQueryParameters extends BaseSasQueryParameters /** * Creates a new {@link QueueServiceSasQueryParameters} object. * - * @param queryParamsMap All query parameters for the request as key-value pairs - * @param removeSASParametersFromMap When {@code true}, the SAS query parameters will be removed from - * queryParamsMap + * @param queryParametersMap All query parameters for the request as key-value pairs + * @param removeSasParametersFromMap When {@code true}, the SAS query parameters will be removed from + * {@code queryParametersMap} */ - public QueueServiceSasQueryParameters(Map queryParamsMap, boolean removeSASParametersFromMap) { - super(queryParamsMap, removeSASParametersFromMap); + public QueueServiceSasQueryParameters(Map queryParametersMap, + boolean removeSasParametersFromMap) { + super(queryParametersMap, removeSasParametersFromMap); - this.identifier = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, - removeSASParametersFromMap); + this.identifier = getQueryParameter(queryParametersMap, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, + removeSasParametersFromMap); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java index 9d5dc7d4d841..dc0a46c50a8e 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java @@ -3,11 +3,11 @@ package com.azure.storage.queue; +import com.azure.storage.common.sas.SasProtocol; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.sas.SasIpRange; -import com.azure.storage.common.SasProtocol; import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import java.time.OffsetDateTime; @@ -254,7 +254,7 @@ public QueueServiceSasSignatureValues setIdentifier(String identifier) { * Uses an account's shared key credential to sign these signature values to produce the proper SAS query * parameters. * - * @param sharedKeyCredentials A {@link SharedKeyCredential} object used to sign the SAS values. + * @param storageSharedKeyCredentials A {@link StorageSharedKeyCredential} object used to sign the SAS values. * @return {@link QueueServiceSasQueryParameters} * @throws IllegalStateException If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64 * encoded string, or the UTF-8 charset isn't supported. @@ -262,13 +262,14 @@ public QueueServiceSasSignatureValues setIdentifier(String identifier) { * {@code canonicalName} is null. Or if {@code identifier} is null and any or {@code expiryTime} or * {@code permissions} is null. Or if {@code expiryTime} and {@code permissions} and {@code identifier} is null */ - public QueueServiceSasQueryParameters generateSASQueryParameters(SharedKeyCredential sharedKeyCredentials) { - Utility.assertNotNull("sharedKeyCredentials", sharedKeyCredentials); + public QueueServiceSasQueryParameters generateSASQueryParameters( + StorageSharedKeyCredential storageSharedKeyCredentials) { + Utility.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); assertGenerateOK(); // Signature is generated on the un-url-encoded values. String stringToSign = stringToSign(); - String signature = sharedKeyCredentials.computeHmac256(stringToSign); + String signature = storageSharedKeyCredentials.computeHmac256(stringToSign); return new QueueServiceSasQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, this.sasIpRange, this.identifier, this.permissions, signature); diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java index 6bd44d69740f..c51b049bec7c 100644 --- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java @@ -3,7 +3,7 @@ package com.azure.storage.queue; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.queue.models.QueueAccessPolicy; import com.azure.storage.queue.models.QueueProperties; import com.azure.storage.queue.models.QueueSignedIdentifier; @@ -12,7 +12,6 @@ import java.time.OffsetDateTime; import java.time.ZoneOffset; import java.util.Collections; -import java.util.List; import java.util.Map; /** @@ -67,7 +66,7 @@ public QueueAsyncClient createAsyncClientWithCredential() { /** * Generates code sample for creating a {@link QueueAsyncClient} with {@code connectionString} which turns into - * {@link SharedKeyCredential} + * {@link StorageSharedKeyCredential} * * @return An instance of {@link QueueAsyncClient} */ @@ -267,10 +266,11 @@ public void updateMessageAsync() { */ public void updateMessageWithResponse() { // BEGIN: com.azure.storage.queue.QueueAsyncClient.updateMessageWithResponse#String-String-String-Duration + client.receiveMessage().subscribe( message -> { - client.updateMessageWithResponse("newText", message.getMessageId(), - message.getPopReceipt(), null).subscribe( + client.updateMessageWithResponse(message.getMessageId(), message.getPopReceipt(), "newText", + null).subscribe( response -> System.out.println("Complete updating the message with status code:" + response.getStatusCode()), updateError -> System.err.print(updateError.toString()), @@ -428,11 +428,11 @@ public void getAccessPolicyAsync() { } /** - * Generates a code sample for using {@link QueueAsyncClient#setAccessPolicyWithResponse(List)} + * Generates a code sample for using {@link QueueAsyncClient#setAccessPolicyWithResponse(Iterable)} */ public void setAccessPolicyWithResponse() { QueueAsyncClient queueAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.queue.QueueAsyncClient.setAccessPolicyWithResponse#List + // BEGIN: com.azure.storage.queue.QueueAsyncClient.setAccessPolicyWithResponse#Iterable QueueAccessPolicy accessPolicy = new QueueAccessPolicy().setPermissions("r") .setStartsOn(OffsetDateTime.now(ZoneOffset.UTC)) .setExpiresOn(OffsetDateTime.now(ZoneOffset.UTC).plusDays(10)); @@ -441,15 +441,15 @@ public void setAccessPolicyWithResponse() { client.setAccessPolicyWithResponse(Collections.singletonList(permission)) .subscribe(response -> System.out.printf("Setting access policies completed with status code %d", response.getStatusCode())); - // END: com.azure.storage.queue.QueueAsyncClient.setAccessPolicyWithResponse#List + // END: com.azure.storage.queue.QueueAsyncClient.setAccessPolicyWithResponse#Iterable } /** - * Generates a code sample for using {@link QueueAsyncClient#setAccessPolicy(List)} + * Generates a code sample for using {@link QueueAsyncClient#setAccessPolicy(Iterable)} */ public void setAccessPolicyAsync() { QueueAsyncClient queueAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.queue.QueueAsyncClient.setAccessPolicy#List + // BEGIN: com.azure.storage.queue.QueueAsyncClient.setAccessPolicy#Iterable QueueAccessPolicy accessPolicy = new QueueAccessPolicy().setPermissions("r") .setStartsOn(OffsetDateTime.now(ZoneOffset.UTC)) .setExpiresOn(OffsetDateTime.now(ZoneOffset.UTC).plusDays(10)); @@ -457,7 +457,7 @@ public void setAccessPolicyAsync() { QueueSignedIdentifier permission = new QueueSignedIdentifier().setId("mypolicy").setAccessPolicy(accessPolicy); client.setAccessPolicy(Collections.singletonList(permission)) .subscribe(response -> System.out.println("Setting access policies completed.")); - // END: com.azure.storage.queue.QueueAsyncClient.setAccessPolicy#List + // END: com.azure.storage.queue.QueueAsyncClient.setAccessPolicy#Iterable } /** diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java index c91783a1142d..cbf1c64e253a 100644 --- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java @@ -5,7 +5,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.queue.models.PeekedMessageItem; import com.azure.storage.queue.models.QueueAccessPolicy; import com.azure.storage.queue.models.QueueMessageItem; @@ -75,7 +75,7 @@ public QueueClient createClientWithCredential() { /** * Generates code sample for creating a {@link QueueClient} with {@code connectionString} which turns into {@link - * SharedKeyCredential} + * StorageSharedKeyCredential} * * @return An instance of {@link QueueClient} */ diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceAsyncJavaDocCodeSamples.java index 66b0fde0a334..f19a52c62f60 100644 --- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceAsyncJavaDocCodeSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.storage.queue; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.queue.models.QueueServiceProperties; import com.azure.storage.queue.models.QueueServiceStatistics; import com.azure.storage.queue.models.QueuesSegmentOptions; @@ -61,7 +61,7 @@ public QueueServiceAsyncClient createAsyncClientWithCredential() { /** * Generates code sample for creating a {@link QueueServiceAsyncClient} with {@code connectionString} which turns - * into {@link SharedKeyCredential} + * into {@link StorageSharedKeyCredential} * * @return An instance of {@link QueueServiceAsyncClient} */ diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceJavaDocCodeSamples.java index 7eb11c935060..5a147eaec2c2 100644 --- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceJavaDocCodeSamples.java @@ -4,7 +4,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.storage.common.credentials.SharedKeyCredential; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.queue.models.QueueServiceProperties; import com.azure.storage.queue.models.QueueServiceStatistics; import com.azure.storage.queue.models.QueuesSegmentOptions; @@ -66,7 +66,7 @@ public QueueServiceClient createClientWithCredential() { /** * Generates code sample for creating a {@link QueueServiceClient} with {@code connectionString} which turns into - * {@link SharedKeyCredential} + * {@link StorageSharedKeyCredential} * * @return An instance of {@link QueueServiceClient} */ diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAPITests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAPITests.groovy index 6e537c12867b..d8a1c79aed5f 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAPITests.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAPITests.groovy @@ -5,7 +5,7 @@ package com.azure.storage.queue import com.azure.core.util.Context -import com.azure.storage.common.credentials.SharedKeyCredential +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.queue.models.QueueAccessPolicy import com.azure.storage.queue.models.QueueErrorCode import com.azure.storage.queue.models.QueueMessageItem @@ -33,7 +33,7 @@ class QueueAPITests extends APISpec { def "Get queue URL"() { given: - def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def accountName = StorageSharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.queue.core.windows.net/%s", accountName, queueName) when: diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAysncAPITests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAysncAPITests.groovy index 62de6bbe8984..c4809d052509 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAysncAPITests.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAysncAPITests.groovy @@ -3,7 +3,7 @@ package com.azure.storage.queue -import com.azure.storage.common.credentials.SharedKeyCredential +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.queue.models.QueueAccessPolicy import com.azure.storage.queue.models.QueueErrorCode import com.azure.storage.queue.models.QueueMessageItem @@ -32,7 +32,7 @@ class QueueAysncAPITests extends APISpec { def "Get queue URL"() { given: - def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def accountName = StorageSharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.queue.core.windows.net/%s", accountName, queueName) when: diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy index 7245c3e0b5ff..de714a5ec98b 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy @@ -3,12 +3,12 @@ package com.azure.storage.queue -import com.azure.storage.common.AccountSasPermission -import com.azure.storage.common.AccountSasResourceType -import com.azure.storage.common.AccountSasService -import com.azure.storage.common.AccountSasSignatureValues -import com.azure.storage.common.SasProtocol -import com.azure.storage.common.credentials.SharedKeyCredential +import com.azure.storage.common.sas.AccountSasPermission +import com.azure.storage.common.sas.AccountSasResourceType +import com.azure.storage.common.sas.AccountSasService +import com.azure.storage.common.sas.AccountSasSignatureValues +import com.azure.storage.common.sas.SasProtocol +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.common.sas.SasIpRange import com.azure.storage.queue.models.QueueAccessPolicy @@ -113,7 +113,7 @@ class QueueSASTests extends APISpec { def sasProtocol = SasProtocol.HTTPS_HTTP when: - def credential = SharedKeyCredential.fromConnectionString(connectionString) + def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sasPermissions = new QueueServiceSasSignatureValues() .setPermissions(permissions.toString()) .setExpiryTime(expiryTime) @@ -163,7 +163,7 @@ class QueueSASTests extends APISpec { def sasProtocol = SasProtocol.HTTPS_HTTP when: - def credential = SharedKeyCredential.fromConnectionString(connectionString) + def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sasPermissions = new QueueServiceSasSignatureValues() .setPermissions(permissions.toString()) .setExpiryTime(expiryTime) @@ -215,7 +215,7 @@ class QueueSASTests extends APISpec { queueClient.setAccessPolicy(Arrays.asList(identifier)) when: - def credential = SharedKeyCredential.fromConnectionString(connectionString) + def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sasIdentifier = new QueueServiceSasSignatureValues() .setIdentifier(identifier.getId()) .setCanonicalName(queueClient.getQueueName(), credential.getAccountName()) @@ -252,7 +252,7 @@ class QueueSASTests extends APISpec { def expiryTime = getUTCNow().plusDays(1) when: - def credential = SharedKeyCredential.fromConnectionString(connectionString) + def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sas = AccountSasSignatureValues.generateAccountSas(credential, service, resourceType, permissions, expiryTime, null, null, null, null) def scBuilder = queueServiceBuilderHelper(interceptorManager) @@ -284,7 +284,7 @@ class QueueSASTests extends APISpec { def expiryTime = getUTCNow().plusDays(1) when: - def credential = SharedKeyCredential.fromConnectionString(connectionString) + def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sas = AccountSasSignatureValues.generateAccountSas(credential, service, resourceType, permissions, expiryTime, null, null, null, null) def scBuilder = queueServiceBuilderHelper(interceptorManager) From 44657b9dd642e20e7149dfed9d24619368acc277 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Thu, 17 Oct 2019 17:10:35 -0700 Subject: [PATCH 05/64] Proofreading and cleaning up the Azure Storage Blob README (#5846) * Proofread the Azure Storage Blob README and made slight modifications in favor of clarity and consistency to both text and code samples. * Corrected some code samples --- sdk/storage/azure-storage-blob/README.md | 261 ++++++++++++----------- 1 file changed, 137 insertions(+), 124 deletions(-) diff --git a/sdk/storage/azure-storage-blob/README.md b/sdk/storage/azure-storage-blob/README.md index c3fad2d9b2e3..499958423871 100644 --- a/sdk/storage/azure-storage-blob/README.md +++ b/sdk/storage/azure-storage-blob/README.md @@ -1,7 +1,7 @@ -# Azure Storage Blobs client library for Java +# Azure Storage Blob client library for Java -Azure Blob storage is Microsoft's object storage solution for the cloud. Blob -storage is optimized for storing massive amounts of unstructured data. +Azure Blob Storage is Microsoft's object storage solution for the cloud. Blob +Storage is optimized for storing massive amounts of unstructured data. Unstructured data is data that does not adhere to a particular data model or definition, such as text or binary data. @@ -11,7 +11,7 @@ definition, such as text or binary data. ### Prerequisites -- Java Development Kit (JDK) with version 8 or above +- [Java Development Kit (JDK)][jdk] with version 8 or above - [Azure Subscription][azure_subscription] - [Create Storage Account][storage_account] @@ -20,64 +20,64 @@ definition, such as text or binary data. [//]: # ({x-version-update-start;com.azure:azure-storage-blob;current}) ```xml - com.azure - azure-storage-blob - 12.0.0-preview.5 + com.azure + azure-storage-blob + 12.0.0-preview.5 ``` [//]: # ({x-version-update-end}) ### Default HTTP Client -All client libraries, by default, use Netty HTTP client. Adding the above dependency will automatically configure -Storage Blob to use Netty HTTP client. +All client libraries, by default, use the Netty HTTP client. Adding the above dependency will automatically configure +Storage Blob to use the Netty HTTP client. ### Alternate HTTP client -If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Exclude the default -Netty and include OkHTTP client in your pom.xml. +If, instead of Netty it is preferable to use OkHTTP, there is an HTTP client available for that too. Exclude the default +Netty and include the OkHTTP client in your pom.xml. [//]: # ({x-version-update-start;com.azure:azure-storage-blob;current}) ```xml - + com.azure azure-storage-blob 12.0.0-preview.5 - - com.azure - azure-core-http-netty - + + com.azure + azure-core-http-netty + ``` [//]: # ({x-version-update-end}) [//]: # ({x-version-update-start;com.azure:azure-core-http-okhttp;current}) ```xml - + - com.azure - azure-core-http-okhttp - 1.0.0-preview.7 + com.azure + azure-core-http-okhttp + 1.0.0-preview.7 ``` [//]: # ({x-version-update-end}) ### Configuring HTTP Clients -When an HTTP client is included on the classpath, as shown above, it is not necessary to specify it in the client library [builders](#create-blobserviceclient), unless you want to customize the HTTP client in some fashion. If this is desired, the `httpClient` builder method is often available to achieve just this, by allowing users to provide a custom (or customized) `com.azure.core.http.HttpClient` instances. +When an HTTP client is included on the classpath, as shown above, it is not necessary to specify it in the client library [builders](#create-blobserviceclient) unless you want to customize the HTTP client in some fashion. If this is desired, the `httpClient` builder method is often available to achieve just this by allowing users to provide custom (or customized) `com.azure.core.http.HttpClient` instances. For starters, by having the Netty or OkHTTP dependencies on your classpath, as shown above, you can create new instances of these `HttpClient` types using their builder APIs. For example, here is how you would create a Netty HttpClient instance: ```java HttpClient client = new NettyAsyncHttpClientBuilder() - .port(8080) - .wiretap(true) - .build(); + .port(8080) + .wiretap(true) + .build(); ``` ### Create a Storage Account -To create a Storage Account you can use the Azure Portal or [Azure CLI][storage_account_create_cli]. +To create a Storage Account you can use the [Azure Portal][storage_account_create_portal] or [Azure CLI][storage_account_create_cli]. -```Powershell +```bash az stoage account create \ --resource-group \ --name \ @@ -86,81 +86,91 @@ az stoage account create \ ### Authenticate the client -In order to interact with the Storage service (Blob, Queue, Message, MessageId, File) you'll need to create an instance of the Service Client class. -To make this possible you'll need the Account SAS (shared access signature) string of Storage account. Learn more at [SAS Token][sas_token] +In order to interact with the Storage Service (Blob, Queue, Message, MessageId, File) you'll need to create an instance of the Service Client class. +To make this possible you'll need the Account SAS (shared access signature) string of the Storage Account. Learn more at [SAS Token][sas_token] #### Get credentials -- **SAS Token** +##### **SAS Token** -a. Use the [Azure CLI][azure_cli] snippet below to get the SAS token from the Storage account. +a. Use the Azure CLI snippet below to get the SAS token from the Storage Account. -```Powershell -az storage blob generate-sas - --name {queue name} - --expiry {date/time to expire SAS token} - --permission {permission to grant} - --connection-string {connection string of the storage account} - --services {storage services the SAS allows} +```bash +az storage blob generate-sas \ + --account-name {Storage Account name} \ + --container-name {container name} \ + --name {blob name} \ + --permissions {permissions to grant} \ + --expiry {datetime to expire the SAS token} \ + --services {storage services the SAS allows} \ --resource-types {resource types the SAS allows} ``` -```Powershell +Example: + +```bash CONNECTION_STRING= -az storage blob generate-sas - --name javasdksas - --expiry 2019-06-05 - --permission rpau - --connection-string $CONNECTION_STRING +az storage blob generate-sas \ + --account-name MyStorageAccount \ + --container-name MyContainer \ + --name MyBlob \ + --permissions racdw \ + --expiry 2020-06-15 ``` + b. Alternatively, get the Account SAS Token from the Azure Portal. -``` -Go to your storage account -> Shared access signature -> Click on Generate SAS and connection string (after setup) -``` -- **Shared Key Credential** +1. Go to your Storage Account +2. Select `Shared access signature` from the menu on the left +3. Click on `Generate SAS and connection string` (after setup) -a. Use account name and account key. Account name is your storage account name. -``` -// Here is where we get the key -Go to your storage account -> Access keys -> Key 1/ Key 2 -> Key -``` -b. Use the connection string -``` -// Here is where we get the key -Go to your storage account -> Access Keys -> Keys 1/ Key 2 -> Connection string -``` +##### **Shared Key Credential** + +a. Use Account name and Account key. Account name is your Storage Account name. + +1. Go to your Storage Account +2. Select `Access keys` from the menu on the left +3. Under `key1`/`key2` copy the contents of the `Key` field + +or + +b. Use the connection string. + +1. Go to your Storage Account +2. Select `Access keys` from the menu on the left +3. Under `key1`/`key2` copy the contents of the `Connection string` field ## Key concepts -Blob storage is designed for: +Blob Storage is designed for: -- Serving images or documents directly to a browser. -- Storing files for distributed access. -- Streaming video and audio. -- Writing to log files. -- Storing data for backup and restore, disaster recovery, and archiving. -- Storing data for analysis by an on-premises or Azure-hosted service. +- Serving images or documents directly to a browser +- Storing files for distributed access +- Streaming video and audio +- Writing to log files +- Storing data for backup and restore, disaster recovery, and archiving +- Storing data for analysis by an on-premises or Azure-hosted service ## Examples The following sections provide several code snippets covering some of the most common Azure Storage Blob tasks, including: -- [Create BlobServiceClient](#create-blobserviceclient) -- [Create ContainerClient](#create-containerclient) -- [Create BlobClient](#create-blobclient) +- [Create a `BlobServiceClient`](#create-a-blobserviceclient) +- [Create a `BlobContainerClient`](#create-a-blobcontainerclient) +- [Create a `BlobClient`](#create-a-blobclient) - [Create a container](#create-a-container) -- [Upload a blob from InputStream](#uploading-a-blob-from-a-stream) -- [Upload a blob from File](#uploading-a-blob-from-file) -- [Download a blob to OutputStream](#downloading-a-blob-to-output-stream) -- [Download a blob to File](#downloading-a-blob-to-local-path) -- [Enumerating blobs](#enumerating-blobs) -- [Authenticate with Azure.Identity](#authenticate-with-azureidentity) +- [Upload a blob from a stream](#upload-a-blob-from-a-stream) +- [Upload a blob from local path](#upload-a-blob-from-local-path) +- [Download a blob to a stream](#download-a-blob-to-a-stream) +- [Download a blob to local path](#download-a-blob-to-local-path) +- [Enumerate blobs](#enumerate-blobs) +- [Authenticate with Azure Identity](#authenticate-with-azure-identity) + +### Create a `BlobServiceClient` -### Create BlobServiceClient +Create a `BlobServiceClient` using the [`sasToken`](#get-credentials) generated above. -Create a BlobServiceClient using the [`sasToken`](#get-credentials) generated above. ```java BlobServiceClient blobServiceClient = new BlobServiceClientBuilder() .endpoint("") @@ -168,82 +178,87 @@ BlobServiceClient blobServiceClient = new BlobServiceClientBuilder() .buildClient(); ``` -### Create BlobContainerClient +### Create a `BlobContainerClient` + +Create a `BlobContainerClient` using a `BlobServiceClient`. -Create a BlobContainerClient if a BlobServiceClient exists. ```java -BlobContainerClient blobContainerClient = blobServiceClient.getContainerClient("mycontainer"); +BlobContainerClient blobContainerClient = blobServiceClient.getBlobContainerClient("mycontainer"); ``` or -Create the BlobContainerClient from the builder [`sasToken`](#get-credentials) generated above. +Create a `BlobContainerClient` from the builder [`sasToken`](#get-credentials) generated above. + ```java BlobContainerClient blobContainerClient = new BlobContainerClientBuilder() - .endpoint("") - .sasToken("") - .containerName("mycontainer") - .buildClient(); + .endpoint("") + .sasToken("") + .containerName("mycontainer") + .buildClient(); ``` -### Create BlobClient +### Create a `BlobClient` + +Create a `BlobClient` using a `BlobContainerClient`. -Create a BlobClient if container client exists. ```java -BlobClient blobClient = blobContainerClient.getBlobClient("myblob").getBlockBlobClient(); +BlobClient blobClient = blobContainerClient.getBlobClient("myblob"); ``` or -Create the BlobClient from the builder [`sasToken`](#get-credentials) generated above. +Create a `BlobClient` from the builder [`sasToken`](#get-credentials) generated above. + ```java BlobClient blobClient = new BlobClientBuilder() - .endpoint("") - .sasToken("") - .containerName("mycontainer") - .blobName("myblob") - .buildBlobClient(); + .endpoint("") + .sasToken("") + .containerName("mycontainer") + .blobName("myblob") + .buildClient(); ``` ### Create a container -Create a container from a BlobServiceClient. +Create a container using a `BlobServiceClient`. + ```java -blobServiceClient.createContainer("mycontainer"); +blobServiceClient.createBlobContainer("mycontainer"); ``` or -Create a container using BlobContainerClient. +Create a container using a `BlobContainerClient`. + ```java blobContainerClient.create(); ``` -### Uploading a blob from a stream +### Upload a blob from a stream -Upload data stream to a blob using BlockBlobClient generated from a BlobContainerClient. +Upload from an `InputStream` to a blob using a `BlockBlobClient` generated from a `BlobContainerClient`. ```java -BlockBlobClient blockBlobClient = containerClient.getBlobClient("myblockblob").getBlockBlobClient(); +BlockBlobClient blockBlobClient = blobContainerClient.getBlobClient("myblockblob").getBlockBlobClient(); String dataSample = "samples"; try (ByteArrayInputStream dataStream = new ByteArrayInputStream(dataSample.getBytes())) { blockBlobClient.upload(dataStream, dataSample.length()); } ``` -### Uploading a blob from `File` +### Upload a blob from local path -Upload a file to a blob using BlockBlobClient generated from BlobContainerClient. +Upload a file to a blob using a `BlobClient` generated from a `BlobContainerClient`. ```java - -BlockBlobClient blockBlobClient = containerClient.getBlobClient("myblockblob").getBlockBlobClient(); -blockBlobClient.uploadFromFile("local-file.jpg"); +BlobClient blobClient = blobContainerClient.getBlobClient("myblockblob"); +blobClient.uploadFromFile("local-file.jpg"); ``` -### Downloading a blob to output stream +### Download a blob to a stream -Download blob to output stream using BlobClient. +Download a blob to an `OutputStream` using a `BlobClient`. ```java try(ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { @@ -251,16 +266,18 @@ try(ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { } ``` -### Downloading a blob to local path +### Download a blob to local path + +Download blob to a local file using a `BlobClient`. -Download blob to local file using BlobClient. ```java blobClient.downloadToFile("downloaded-file.jpg"); ``` -### Enumerating blobs +### Enumerate blobs + +Enumerating all blobs using a `BlobContainerClient`. -Enumerating all blobs using BlobContainerClient ```java blobContainerClient.listBlobsFlat() .forEach( @@ -268,12 +285,12 @@ blobContainerClient.listBlobsFlat() ); ``` -### Authenticate with Azure.Identity +### Authenticate with Azure Identity The [Azure Identity library][identity] provides Azure Active Directory support for authenticating with Azure Storage. ```java -BlobServiceClient storageClient = new BlobServiceClientBuilder() +BlobServiceClient blobStorageClient = new BlobServiceClientBuilder() .endpoint(endpoint) .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); @@ -289,20 +306,20 @@ doesn't exist in your Storage Account, a `404` error is returned, indicating `No Get started with our [Blob samples][samples]: -1. [Basic Examples][samples_basic]: Create storage, container, blob clients, Upload, download, and list blobs. -1. [File Transfer Examples][samples_file_transfer]: Upload and download a large file through blobs. -1. [Storage Error Examples][samples_storage_error]: Handle the exceptions from storage blob service side. -1. [List Container Examples][samples_list_containers]: Create, list and delete containers. -1. [Set metadata and HTTPHeaders Examples][samples_metadata]: Set metadata for container and blob, and set HTTPHeaders for blob. -1. [Azure Identity Examples][samples_identity]: Use DefaultAzureCredential to do the authentication. +1. [Basic Examples][samples_basic]: Create storage, container and blob clients. Upload, download and list blobs. +2. [File Transfer Examples][samples_file_transfer]: Upload and download a large file through blobs. +3. [Storage Error Examples][samples_storage_error]: Handle the exceptions thrown from the Storage Blob service side. +4. [List Container Examples][samples_list_containers]: Create, list and delete containers. +5. [Set Metadata and HTTPHeaders Examples][samples_metadata]: Set metadata for containers and blobs, and set HTTPHeaders for blobs. +6. [Azure Identity Examples][samples_identity]: Use `DefaultAzureCredential` to do the authentication. ## Contributing -This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. +This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution. When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fstorage%2FAzure.Storage.Blobs%2FREADME.png) @@ -312,15 +329,11 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope [rest_docs]: https://docs.microsoft.com/rest/api/storageservices/blob-service-rest-api [product_docs]: https://docs.microsoft.com/azure/storage/blobs/storage-blobs-overview [sas_token]: https://docs.microsoft.com/azure/storage/common/storage-dotnet-shared-access-signature-part-1 -[jdk]: https://docs.microsoft.com/java/azure/java-supported-jdk-runtime?view=azure-java-stable -[maven]: https://maven.apache.org/ +[jdk]: https://docs.microsoft.com/java/azure/jdk/ [azure_subscription]: https://azure.microsoft.com/free/ [storage_account]: https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal -[storage_account_create_ps]: https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell [storage_account_create_cli]: https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli [storage_account_create_portal]: https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal -[azure_cli]: https://docs.microsoft.com/cli/azure -[azure_sub]: https://azure.microsoft.com/free/ [identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity/README.md [error_codes]: https://docs.microsoft.com/rest/api/storageservices/blob-service-error-codes [samples]: src/samples From c940c613ec6d460b86a251f9c4c5115ced45483d Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Fri, 18 Oct 2019 10:15:28 +0800 Subject: [PATCH 06/64] Advisor: regenerate package-2017-04 (#5896) --- advisor/resource-manager/v2017_04_19/pom.xml | 4 +++- .../azure/management/advisor/v2017_04_19/Category.java | 3 +++ .../ResourceRecommendationBaseInner.java | 7 ++++--- .../v2017_04_19/implementation/SuppressionsImpl.java | 10 +++++++--- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/advisor/resource-manager/v2017_04_19/pom.xml b/advisor/resource-manager/v2017_04_19/pom.xml index 51c0b68530d5..48c769bbbb8a 100644 --- a/advisor/resource-manager/v2017_04_19/pom.xml +++ b/advisor/resource-manager/v2017_04_19/pom.xml @@ -15,7 +15,7 @@ ../../../pom.management.xml azure-mgmt-advisor - 1.0.0-beta-1 + 1.0.0-beta-2 jar Microsoft Azure SDK for Advisor Management This package contains Microsoft Advisor Management SDK. @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/advisor/resource-manager/v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/Category.java b/advisor/resource-manager/v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/Category.java index 2e5563117328..b61d626a3d38 100644 --- a/advisor/resource-manager/v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/Category.java +++ b/advisor/resource-manager/v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/Category.java @@ -28,6 +28,9 @@ public final class Category extends ExpandableStringEnum { /** Static value Cost for Category. */ public static final Category COST = fromString("Cost"); + /** Static value OperationalExcellence for Category. */ + public static final Category OPERATIONAL_EXCELLENCE = fromString("OperationalExcellence"); + /** * Creates or finds a Category from its string representation. * @param name a name to look for diff --git a/advisor/resource-manager/v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/implementation/ResourceRecommendationBaseInner.java b/advisor/resource-manager/v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/implementation/ResourceRecommendationBaseInner.java index a54a04104514..c01bc6fbcfaa 100644 --- a/advisor/resource-manager/v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/implementation/ResourceRecommendationBaseInner.java +++ b/advisor/resource-manager/v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/implementation/ResourceRecommendationBaseInner.java @@ -27,7 +27,8 @@ public class ResourceRecommendationBaseInner extends ProxyResource { /** * The category of the recommendation. Possible values include: - * 'HighAvailability', 'Security', 'Performance', 'Cost'. + * 'HighAvailability', 'Security', 'Performance', 'Cost', + * 'OperationalExcellence'. */ @JsonProperty(value = "properties.category") private Category category; @@ -96,7 +97,7 @@ public class ResourceRecommendationBaseInner extends ProxyResource { private Map extendedProperties; /** - * Get the category of the recommendation. Possible values include: 'HighAvailability', 'Security', 'Performance', 'Cost'. + * Get the category of the recommendation. Possible values include: 'HighAvailability', 'Security', 'Performance', 'Cost', 'OperationalExcellence'. * * @return the category value */ @@ -105,7 +106,7 @@ public Category category() { } /** - * Set the category of the recommendation. Possible values include: 'HighAvailability', 'Security', 'Performance', 'Cost'. + * Set the category of the recommendation. Possible values include: 'HighAvailability', 'Security', 'Performance', 'Cost', 'OperationalExcellence'. * * @param category the category value to set * @return the ResourceRecommendationBaseInner object itself. diff --git a/advisor/resource-manager/v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/implementation/SuppressionsImpl.java b/advisor/resource-manager/v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/implementation/SuppressionsImpl.java index c071181c6ea6..fb90bbc9d44d 100644 --- a/advisor/resource-manager/v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/implementation/SuppressionsImpl.java +++ b/advisor/resource-manager/v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/implementation/SuppressionsImpl.java @@ -64,10 +64,14 @@ public SuppressionContract call(SuppressionContractInner inner) { public Observable getAsync(String resourceUri, String recommendationId, String name) { SuppressionsInner client = this.inner(); return client.getAsync(resourceUri, recommendationId, name) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public SuppressionContract call(SuppressionContractInner inner) { - return wrapModel(inner); + public Observable call(SuppressionContractInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((SuppressionContract)wrapModel(inner)); + } } }); } From 347a4a90d39b70b5711f3ddec4f656ca832a51dc Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Fri, 18 Oct 2019 10:16:43 +0800 Subject: [PATCH 07/64] AppPlatform: generate package-2019-05-01-preview (#5849) --- api-specs.json | 4 + .../v2019_05_01_preview/pom.xml | 135 + .../v2019_05_01_preview/AppResource.java | 128 + .../AppResourceProperties.java | 168 ++ .../AppResourceProvisioningState.java | 41 + .../appplatform/v2019_05_01_preview/Apps.java | 64 + .../v2019_05_01_preview/BindingResource.java | 119 + .../BindingResourceProperties.java | 194 ++ .../v2019_05_01_preview/Bindings.java | 56 + .../ClusterResourceProperties.java | 116 + .../ConfigServerGitProperty.java | 278 ++ .../ConfigServerProperties.java | 85 + .../ConfigServerSettings.java | 43 + .../ConfigServerState.java | 50 + .../DeploymentInstance.java | 77 + .../DeploymentResource.java | 120 + .../DeploymentResourceProperties.java | 163 ++ .../DeploymentResourceProvisioningState.java | 47 + .../DeploymentResourceStatus.java | 50 + .../DeploymentSettings.java | 174 ++ .../v2019_05_01_preview/Deployments.java | 114 + .../v2019_05_01_preview/Error.java | 69 + .../GitPatternRepository.java | 304 +++ .../LogFileUrlResponse.java | 25 + .../v2019_05_01_preview/LogSpecification.java | 95 + .../v2019_05_01_preview/MetricDimension.java | 69 + .../MetricSpecification.java | 281 ++ .../v2019_05_01_preview/NameAvailability.java | 35 + .../NameAvailabilityParameters.java | 69 + .../v2019_05_01_preview/OperationDetail.java | 45 + .../v2019_05_01_preview/OperationDisplay.java | 121 + .../OperationProperties.java | 43 + .../v2019_05_01_preview/Operations.java | 27 + .../v2019_05_01_preview/PersistentDisk.java | 84 + .../ProvisioningState.java | 62 + .../RegenerateTestKeyRequestPayload.java | 43 + .../ResourceUploadDefinition.java | 30 + .../v2019_05_01_preview/RuntimeVersion.java | 41 + .../v2019_05_01_preview/ServiceResource.java | 51 + .../ServiceSpecification.java | 70 + .../v2019_05_01_preview/Services.java | 124 + .../v2019_05_01_preview/TemporaryDisk.java | 69 + .../v2019_05_01_preview/TestKeyType.java | 41 + .../v2019_05_01_preview/TestKeys.java | 45 + .../v2019_05_01_preview/TraceProperties.java | 111 + .../v2019_05_01_preview/TraceProxyState.java | 47 + .../v2019_05_01_preview/UserSourceInfo.java | 125 + .../v2019_05_01_preview/UserSourceType.java | 41 + .../AppPlatformManagementClientImpl.java | 252 ++ .../implementation/AppPlatformManager.java | 147 + .../implementation/AppResourceImpl.java | 142 + .../implementation/AppResourceInner.java | 45 + .../implementation/AppsImpl.java | 94 + .../implementation/AppsInner.java | 1058 +++++++ .../implementation/BindingResourceImpl.java | 139 + .../implementation/BindingResourceInner.java | 45 + .../implementation/BindingsImpl.java | 85 + .../implementation/BindingsInner.java | 925 +++++++ .../DeploymentResourceImpl.java | 140 + .../DeploymentResourceInner.java | 45 + .../implementation/DeploymentsImpl.java | 134 + .../implementation/DeploymentsInner.java | 2430 +++++++++++++++++ .../implementation/IdParsingUtils.java | 57 + .../LogFileUrlResponseImpl.java | 31 + .../LogFileUrlResponseInner.java | 43 + .../implementation/NameAvailabilityImpl.java | 41 + .../implementation/NameAvailabilityInner.java | 95 + .../implementation/OperationDetailImpl.java | 53 + .../implementation/OperationDetailInner.java | 149 + .../implementation/OperationsImpl.java | 49 + .../implementation/OperationsInner.java | 280 ++ .../implementation/PageImpl.java | 75 + .../ResourceUploadDefinitionImpl.java | 36 + .../ResourceUploadDefinitionInner.java | 69 + .../implementation/ServiceResourceImpl.java | 58 + .../implementation/ServiceResourceInner.java | 47 + .../implementation/ServicesImpl.java | 168 ++ .../implementation/ServicesInner.java | 1829 +++++++++++++ .../implementation/TestKeysImpl.java | 51 + .../implementation/TestKeysInner.java | 147 + .../implementation/package-info.java | 11 + .../v2019_05_01_preview/package-info.java | 11 + 82 files changed, 13374 insertions(+) create mode 100644 appplatform/resource-manager/v2019_05_01_preview/pom.xml create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResource.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProperties.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProvisioningState.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Apps.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/BindingResource.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/BindingResourceProperties.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Bindings.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ClusterResourceProperties.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerGitProperty.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerProperties.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerSettings.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerState.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentInstance.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResource.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceProperties.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceProvisioningState.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceStatus.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentSettings.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Deployments.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Error.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/GitPatternRepository.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/LogFileUrlResponse.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/LogSpecification.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/MetricDimension.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/MetricSpecification.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/NameAvailability.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/NameAvailabilityParameters.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/OperationDetail.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/OperationDisplay.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/OperationProperties.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Operations.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/PersistentDisk.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ProvisioningState.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/RegenerateTestKeyRequestPayload.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ResourceUploadDefinition.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/RuntimeVersion.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ServiceResource.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ServiceSpecification.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Services.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TemporaryDisk.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TestKeyType.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TestKeys.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TraceProperties.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TraceProxyState.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/UserSourceInfo.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/UserSourceType.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppPlatformManagementClientImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppPlatformManager.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppResourceImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppResourceInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppsImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppsInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingResourceImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingResourceInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingsImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingsInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentResourceImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentResourceInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentsImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentsInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/IdParsingUtils.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/LogFileUrlResponseImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/LogFileUrlResponseInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/NameAvailabilityImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/NameAvailabilityInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationDetailImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationDetailInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationsImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationsInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/PageImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ResourceUploadDefinitionImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ResourceUploadDefinitionInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServiceResourceImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServiceResourceInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/TestKeysImpl.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/TestKeysInner.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/package-info.java create mode 100644 appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/package-info.java diff --git a/api-specs.json b/api-specs.json index 58362b05dce4..edc09c15e1f7 100644 --- a/api-specs.json +++ b/api-specs.json @@ -19,6 +19,10 @@ "source": "specification/applicationinsights/data-plane/readme.md", "args": "--payload-flattening-threshold=1" }, + "appplatform/resource-manager": { + "source": "specification/appplatform/resource-manager/readme.md", + "args": "--multiapi --fluent" + }, "appservice/resource-manager": { "source": "specification/web/resource-manager/readme.md", "args": "--multiapi --fluent", diff --git a/appplatform/resource-manager/v2019_05_01_preview/pom.xml b/appplatform/resource-manager/v2019_05_01_preview/pom.xml new file mode 100644 index 000000000000..6d091c6304ef --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.appplatform.v2019_05_01_preview + + com.microsoft.azure + azure-arm-parent + 1.1.0 + ../../../pom.management.xml + + azure-mgmt-appplatform + 1.0.0-beta + jar + Microsoft Azure SDK for AppPlatform Management + This package contains Microsoft AppPlatform 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 + + 1.6.5 + + + + + + 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/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResource.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResource.java new file mode 100644 index 000000000000..e76e0a7f25e0 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResource.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.appplatform.v2019_05_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.AppResourceInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.AppPlatformManager; +import org.joda.time.DateTime; + +/** + * Type representing AppResource. + */ +public interface AppResource extends HasInner, Indexable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + AppResourceProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the AppResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithResourceGroupName, DefinitionStages.WithServiceName, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * Grouping of AppResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a AppResource definition. + */ + interface Blank extends WithResourceGroupName { + } + + /** + * The stage of the appresource definition allowing to specify ResourceGroupName. + */ + interface WithResourceGroupName { + /** + * Specifies resourceGroupName. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal + * @return the next definition stage + */ + WithServiceName withResourceGroupName(String resourceGroupName); + } + + /** + * The stage of the appresource definition allowing to specify ServiceName. + */ + interface WithServiceName { + /** + * Specifies serviceName. + * @param serviceName The name of the Service resource + * @return the next definition stage + */ + WithProperties withServiceName(String serviceName); + } + + /** + * The stage of the appresource definition allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Properties of the App resource + * @return the next definition stage + */ + WithCreate withProperties(AppResourceProperties 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 { + } + } + /** + * The template for a AppResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithProperties { + } + + /** + * Grouping of AppResource update stages. + */ + interface UpdateStages { + /** + * The stage of the appresource update allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Properties of the App resource + * @return the next update stage + */ + Update withProperties(AppResourceProperties properties); + } + + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProperties.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProperties.java new file mode 100644 index 000000000000..272ff8751b6c --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProperties.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * App resource properties payload. + */ +public class AppResourceProperties { + /** + * Indicates whether the App exposes public endpoint. + */ + @JsonProperty(value = "public") + private Boolean publicProperty; + + /** + * URL of the App. + */ + @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) + private String url; + + /** + * Provisioning state of the App. Possible values include: 'Succeeded', + * 'Failed'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AppResourceProvisioningState provisioningState; + + /** + * Name of the active deployment of the App. + */ + @JsonProperty(value = "activeDeploymentName") + private String activeDeploymentName; + + /** + * Date time when the resource is created. + */ + @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime createdTime; + + /** + * Temporary disk settings. + */ + @JsonProperty(value = "temporaryDisk") + private TemporaryDisk temporaryDisk; + + /** + * Persistent disk settings. + */ + @JsonProperty(value = "persistentDisk") + private PersistentDisk persistentDisk; + + /** + * Get indicates whether the App exposes public endpoint. + * + * @return the publicProperty value + */ + public Boolean publicProperty() { + return this.publicProperty; + } + + /** + * Set indicates whether the App exposes public endpoint. + * + * @param publicProperty the publicProperty value to set + * @return the AppResourceProperties object itself. + */ + public AppResourceProperties withPublicProperty(Boolean publicProperty) { + this.publicProperty = publicProperty; + return this; + } + + /** + * Get uRL of the App. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Get provisioning state of the App. Possible values include: 'Succeeded', 'Failed'. + * + * @return the provisioningState value + */ + public AppResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the active deployment of the App. + * + * @return the activeDeploymentName value + */ + public String activeDeploymentName() { + return this.activeDeploymentName; + } + + /** + * Set name of the active deployment of the App. + * + * @param activeDeploymentName the activeDeploymentName value to set + * @return the AppResourceProperties object itself. + */ + public AppResourceProperties withActiveDeploymentName(String activeDeploymentName) { + this.activeDeploymentName = activeDeploymentName; + return this; + } + + /** + * Get date time when the resource is created. + * + * @return the createdTime value + */ + public DateTime createdTime() { + return this.createdTime; + } + + /** + * Get temporary disk settings. + * + * @return the temporaryDisk value + */ + public TemporaryDisk temporaryDisk() { + return this.temporaryDisk; + } + + /** + * Set temporary disk settings. + * + * @param temporaryDisk the temporaryDisk value to set + * @return the AppResourceProperties object itself. + */ + public AppResourceProperties withTemporaryDisk(TemporaryDisk temporaryDisk) { + this.temporaryDisk = temporaryDisk; + return this; + } + + /** + * Get persistent disk settings. + * + * @return the persistentDisk value + */ + public PersistentDisk persistentDisk() { + return this.persistentDisk; + } + + /** + * Set persistent disk settings. + * + * @param persistentDisk the persistentDisk value to set + * @return the AppResourceProperties object itself. + */ + public AppResourceProperties withPersistentDisk(PersistentDisk persistentDisk) { + this.persistentDisk = persistentDisk; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProvisioningState.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProvisioningState.java new file mode 100644 index 000000000000..75583dfa840c --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProvisioningState.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.appplatform.v2019_05_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AppResourceProvisioningState. + */ +public final class AppResourceProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for AppResourceProvisioningState. */ + public static final AppResourceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for AppResourceProvisioningState. */ + public static final AppResourceProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a AppResourceProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding AppResourceProvisioningState + */ + @JsonCreator + public static AppResourceProvisioningState fromString(String name) { + return fromString(name, AppResourceProvisioningState.class); + } + + /** + * @return known AppResourceProvisioningState values + */ + public static Collection values() { + return values(AppResourceProvisioningState.class); + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Apps.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Apps.java new file mode 100644 index 000000000000..9d2fdfe4611e --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Apps.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appplatform.v2019_05_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.AppsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Apps. + */ +public interface Apps extends SupportsCreating, HasInner { + /** + * Get an App and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String serviceName, String appName); + + /** + * Operation to delete an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String serviceName, String appName); + + /** + * Handles requests to list all resources in a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String serviceName); + + /** + * Get an resource upload URL for an App, which may be artifacts or source archive. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getResourceUploadUrlAsync(String resourceGroupName, String serviceName, String appName); + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/BindingResource.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/BindingResource.java new file mode 100644 index 000000000000..e2fa9b328ffa --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/BindingResource.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.BindingResourceInner; +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.appplatform.v2019_05_01_preview.implementation.AppPlatformManager; +import java.util.Map; + +/** + * Type representing BindingResource. + */ +public interface BindingResource extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + BindingResourceProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the BindingResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithApp, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * Grouping of BindingResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a BindingResource definition. + */ + interface Blank extends WithApp { + } + + /** + * The stage of the bindingresource definition allowing to specify App. + */ + interface WithApp { + /** + * Specifies resourceGroupName, serviceName, appName. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal + * @param serviceName The name of the Service resource + * @param appName The name of the App resource + * @return the next definition stage + */ + WithProperties withExistingApp(String resourceGroupName, String serviceName, String appName); + } + + /** + * The stage of the bindingresource definition allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Properties of the Binding resource + * @return the next definition stage + */ + WithCreate withProperties(BindingResourceProperties 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 { + } + } + /** + * The template for a BindingResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithProperties { + } + + /** + * Grouping of BindingResource update stages. + */ + interface UpdateStages { + /** + * The stage of the bindingresource update allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Properties of the Binding resource + * @return the next update stage + */ + Update withProperties(BindingResourceProperties properties); + } + + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/BindingResourceProperties.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/BindingResourceProperties.java new file mode 100644 index 000000000000..b0444be0fc4a --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/BindingResourceProperties.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.appplatform.v2019_05_01_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Binding resource properties payload. + */ +public class BindingResourceProperties { + /** + * The name of the bound resource. + */ + @JsonProperty(value = "resourceName") + private String resourceName; + + /** + * The standard Azure resource type of the bound resource. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /** + * The Azure resource id of the bound resource. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * The key of the bound resource. + */ + @JsonProperty(value = "key") + private String key; + + /** + * Binding parameters of the Binding resource. + */ + @JsonProperty(value = "bindingParameters") + private Map bindingParameters; + + /** + * The generated Spring Boot property file for this binding. The secret + * will be deducted. + */ + @JsonProperty(value = "generatedProperties", access = JsonProperty.Access.WRITE_ONLY) + private String generatedProperties; + + /** + * Creation time of the Binding resource. + */ + @JsonProperty(value = "createdAt", access = JsonProperty.Access.WRITE_ONLY) + private String createdAt; + + /** + * Update time of the Binding resource. + */ + @JsonProperty(value = "updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private String updatedAt; + + /** + * Get the name of the bound resource. + * + * @return the resourceName value + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set the name of the bound resource. + * + * @param resourceName the resourceName value to set + * @return the BindingResourceProperties object itself. + */ + public BindingResourceProperties withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Get the standard Azure resource type of the bound resource. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the standard Azure resource type of the bound resource. + * + * @param resourceType the resourceType value to set + * @return the BindingResourceProperties object itself. + */ + public BindingResourceProperties withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the Azure resource id of the bound resource. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the Azure resource id of the bound resource. + * + * @param resourceId the resourceId value to set + * @return the BindingResourceProperties object itself. + */ + public BindingResourceProperties withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the key of the bound resource. + * + * @return the key value + */ + public String key() { + return this.key; + } + + /** + * Set the key of the bound resource. + * + * @param key the key value to set + * @return the BindingResourceProperties object itself. + */ + public BindingResourceProperties withKey(String key) { + this.key = key; + return this; + } + + /** + * Get binding parameters of the Binding resource. + * + * @return the bindingParameters value + */ + public Map bindingParameters() { + return this.bindingParameters; + } + + /** + * Set binding parameters of the Binding resource. + * + * @param bindingParameters the bindingParameters value to set + * @return the BindingResourceProperties object itself. + */ + public BindingResourceProperties withBindingParameters(Map bindingParameters) { + this.bindingParameters = bindingParameters; + return this; + } + + /** + * Get the generated Spring Boot property file for this binding. The secret will be deducted. + * + * @return the generatedProperties value + */ + public String generatedProperties() { + return this.generatedProperties; + } + + /** + * Get creation time of the Binding resource. + * + * @return the createdAt value + */ + public String createdAt() { + return this.createdAt; + } + + /** + * Get update time of the Binding resource. + * + * @return the updatedAt value + */ + public String updatedAt() { + return this.updatedAt; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Bindings.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Bindings.java new file mode 100644 index 000000000000..9b39c6982f49 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Bindings.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.appplatform.v2019_05_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.BindingsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Bindings. + */ +public interface Bindings extends SupportsCreating, HasInner { + /** + * Get a Binding and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String serviceName, String appName, String bindingName); + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String serviceName, final String appName); + + /** + * Operation to delete a Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String serviceName, String appName, String bindingName); + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ClusterResourceProperties.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ClusterResourceProperties.java new file mode 100644 index 000000000000..c8651a77a9f4 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ClusterResourceProperties.java @@ -0,0 +1,116 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Service properties payload. + */ +public class ClusterResourceProperties { + /** + * Provisioning state of the Service. Possible values include: 'Creating', + * 'Updating', 'Deleting', 'Deleted', 'Succeeded', 'Failed', 'Moving', + * 'Moved', 'MoveFailed'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Config server git properties of the Service. + */ + @JsonProperty(value = "configServerProperties") + private ConfigServerProperties configServerProperties; + + /** + * Trace properties of the Service. + */ + @JsonProperty(value = "trace") + private TraceProperties trace; + + /** + * Version of the Service. + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private Integer version; + + /** + * ServiceInstanceEntity GUID which uniquely identifies a created resource. + */ + @JsonProperty(value = "serviceId", access = JsonProperty.Access.WRITE_ONLY) + private String serviceId; + + /** + * Get provisioning state of the Service. Possible values include: 'Creating', 'Updating', 'Deleting', 'Deleted', 'Succeeded', 'Failed', 'Moving', 'Moved', 'MoveFailed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get config server git properties of the Service. + * + * @return the configServerProperties value + */ + public ConfigServerProperties configServerProperties() { + return this.configServerProperties; + } + + /** + * Set config server git properties of the Service. + * + * @param configServerProperties the configServerProperties value to set + * @return the ClusterResourceProperties object itself. + */ + public ClusterResourceProperties withConfigServerProperties(ConfigServerProperties configServerProperties) { + this.configServerProperties = configServerProperties; + return this; + } + + /** + * Get trace properties of the Service. + * + * @return the trace value + */ + public TraceProperties trace() { + return this.trace; + } + + /** + * Set trace properties of the Service. + * + * @param trace the trace value to set + * @return the ClusterResourceProperties object itself. + */ + public ClusterResourceProperties withTrace(TraceProperties trace) { + this.trace = trace; + return this; + } + + /** + * Get version of the Service. + * + * @return the version value + */ + public Integer version() { + return this.version; + } + + /** + * Get serviceInstanceEntity GUID which uniquely identifies a created resource. + * + * @return the serviceId value + */ + public String serviceId() { + return this.serviceId; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerGitProperty.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerGitProperty.java new file mode 100644 index 000000000000..e21191ee3da4 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerGitProperty.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Property of git. + */ +public class ConfigServerGitProperty { + /** + * Repositories of git. + */ + @JsonProperty(value = "repositories") + private List repositories; + + /** + * URI of the repository. + */ + @JsonProperty(value = "uri", required = true) + private String uri; + + /** + * Label of the repository. + */ + @JsonProperty(value = "label") + private String label; + + /** + * Searching path of the repository. + */ + @JsonProperty(value = "searchPaths") + private List searchPaths; + + /** + * Username of git repository basic auth. + */ + @JsonProperty(value = "username") + private String username; + + /** + * Password of git repository basic auth. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Public sshKey of git repository. + */ + @JsonProperty(value = "hostKey") + private String hostKey; + + /** + * SshKey algorithm of git repository. + */ + @JsonProperty(value = "hostKeyAlgorithm") + private String hostKeyAlgorithm; + + /** + * Private sshKey algorithm of git repository. + */ + @JsonProperty(value = "privateKey") + private String privateKey; + + /** + * Strict host key checking or not. + */ + @JsonProperty(value = "strictHostKeyChecking") + private Boolean strictHostKeyChecking; + + /** + * Get repositories of git. + * + * @return the repositories value + */ + public List repositories() { + return this.repositories; + } + + /** + * Set repositories of git. + * + * @param repositories the repositories value to set + * @return the ConfigServerGitProperty object itself. + */ + public ConfigServerGitProperty withRepositories(List repositories) { + this.repositories = repositories; + return this; + } + + /** + * Get uRI of the repository. + * + * @return the uri value + */ + public String uri() { + return this.uri; + } + + /** + * Set uRI of the repository. + * + * @param uri the uri value to set + * @return the ConfigServerGitProperty object itself. + */ + public ConfigServerGitProperty withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Get label of the repository. + * + * @return the label value + */ + public String label() { + return this.label; + } + + /** + * Set label of the repository. + * + * @param label the label value to set + * @return the ConfigServerGitProperty object itself. + */ + public ConfigServerGitProperty withLabel(String label) { + this.label = label; + return this; + } + + /** + * Get searching path of the repository. + * + * @return the searchPaths value + */ + public List searchPaths() { + return this.searchPaths; + } + + /** + * Set searching path of the repository. + * + * @param searchPaths the searchPaths value to set + * @return the ConfigServerGitProperty object itself. + */ + public ConfigServerGitProperty withSearchPaths(List searchPaths) { + this.searchPaths = searchPaths; + return this; + } + + /** + * Get username of git repository basic auth. + * + * @return the username value + */ + public String username() { + return this.username; + } + + /** + * Set username of git repository basic auth. + * + * @param username the username value to set + * @return the ConfigServerGitProperty object itself. + */ + public ConfigServerGitProperty withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get password of git repository basic auth. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set password of git repository basic auth. + * + * @param password the password value to set + * @return the ConfigServerGitProperty object itself. + */ + public ConfigServerGitProperty withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get public sshKey of git repository. + * + * @return the hostKey value + */ + public String hostKey() { + return this.hostKey; + } + + /** + * Set public sshKey of git repository. + * + * @param hostKey the hostKey value to set + * @return the ConfigServerGitProperty object itself. + */ + public ConfigServerGitProperty withHostKey(String hostKey) { + this.hostKey = hostKey; + return this; + } + + /** + * Get sshKey algorithm of git repository. + * + * @return the hostKeyAlgorithm value + */ + public String hostKeyAlgorithm() { + return this.hostKeyAlgorithm; + } + + /** + * Set sshKey algorithm of git repository. + * + * @param hostKeyAlgorithm the hostKeyAlgorithm value to set + * @return the ConfigServerGitProperty object itself. + */ + public ConfigServerGitProperty withHostKeyAlgorithm(String hostKeyAlgorithm) { + this.hostKeyAlgorithm = hostKeyAlgorithm; + return this; + } + + /** + * Get private sshKey algorithm of git repository. + * + * @return the privateKey value + */ + public String privateKey() { + return this.privateKey; + } + + /** + * Set private sshKey algorithm of git repository. + * + * @param privateKey the privateKey value to set + * @return the ConfigServerGitProperty object itself. + */ + public ConfigServerGitProperty withPrivateKey(String privateKey) { + this.privateKey = privateKey; + return this; + } + + /** + * Get strict host key checking or not. + * + * @return the strictHostKeyChecking value + */ + public Boolean strictHostKeyChecking() { + return this.strictHostKeyChecking; + } + + /** + * Set strict host key checking or not. + * + * @param strictHostKeyChecking the strictHostKeyChecking value to set + * @return the ConfigServerGitProperty object itself. + */ + public ConfigServerGitProperty withStrictHostKeyChecking(Boolean strictHostKeyChecking) { + this.strictHostKeyChecking = strictHostKeyChecking; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerProperties.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerProperties.java new file mode 100644 index 000000000000..aee39da3b12a --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerProperties.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Config server git properties payload. + */ +public class ConfigServerProperties { + /** + * State of the config server. Possible values include: 'NotAvailable', + * 'Deleted', 'Failed', 'Succeeded', 'Updating'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private ConfigServerState state; + + /** + * Error when apply config server settings. + */ + @JsonProperty(value = "error") + private Error error; + + /** + * Settings of config server. + */ + @JsonProperty(value = "configServer") + private ConfigServerSettings configServer; + + /** + * Get state of the config server. Possible values include: 'NotAvailable', 'Deleted', 'Failed', 'Succeeded', 'Updating'. + * + * @return the state value + */ + public ConfigServerState state() { + return this.state; + } + + /** + * Get error when apply config server settings. + * + * @return the error value + */ + public Error error() { + return this.error; + } + + /** + * Set error when apply config server settings. + * + * @param error the error value to set + * @return the ConfigServerProperties object itself. + */ + public ConfigServerProperties withError(Error error) { + this.error = error; + return this; + } + + /** + * Get settings of config server. + * + * @return the configServer value + */ + public ConfigServerSettings configServer() { + return this.configServer; + } + + /** + * Set settings of config server. + * + * @param configServer the configServer value to set + * @return the ConfigServerProperties object itself. + */ + public ConfigServerProperties withConfigServer(ConfigServerSettings configServer) { + this.configServer = configServer; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerSettings.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerSettings.java new file mode 100644 index 000000000000..e3b0a64a2289 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerSettings.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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The settings of config server. + */ +public class ConfigServerSettings { + /** + * Property of git environment. + */ + @JsonProperty(value = "gitProperty") + private ConfigServerGitProperty gitProperty; + + /** + * Get property of git environment. + * + * @return the gitProperty value + */ + public ConfigServerGitProperty gitProperty() { + return this.gitProperty; + } + + /** + * Set property of git environment. + * + * @param gitProperty the gitProperty value to set + * @return the ConfigServerSettings object itself. + */ + public ConfigServerSettings withGitProperty(ConfigServerGitProperty gitProperty) { + this.gitProperty = gitProperty; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerState.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerState.java new file mode 100644 index 000000000000..007231077499 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ConfigServerState.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.appplatform.v2019_05_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ConfigServerState. + */ +public final class ConfigServerState extends ExpandableStringEnum { + /** Static value NotAvailable for ConfigServerState. */ + public static final ConfigServerState NOT_AVAILABLE = fromString("NotAvailable"); + + /** Static value Deleted for ConfigServerState. */ + public static final ConfigServerState DELETED = fromString("Deleted"); + + /** Static value Failed for ConfigServerState. */ + public static final ConfigServerState FAILED = fromString("Failed"); + + /** Static value Succeeded for ConfigServerState. */ + public static final ConfigServerState SUCCEEDED = fromString("Succeeded"); + + /** Static value Updating for ConfigServerState. */ + public static final ConfigServerState UPDATING = fromString("Updating"); + + /** + * Creates or finds a ConfigServerState from its string representation. + * @param name a name to look for + * @return the corresponding ConfigServerState + */ + @JsonCreator + public static ConfigServerState fromString(String name) { + return fromString(name, ConfigServerState.class); + } + + /** + * @return known ConfigServerState values + */ + public static Collection values() { + return values(ConfigServerState.class); + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentInstance.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentInstance.java new file mode 100644 index 000000000000..8939e95ee995 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentInstance.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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Deployment instance payload. + */ +public class DeploymentInstance { + /** + * Name of the deployment instance. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Status of the deployment instance. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private String status; + + /** + * Failed reason of the deployment instance. + */ + @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) + private String reason; + + /** + * Discovery status of the deployment instance. + */ + @JsonProperty(value = "discoveryStatus", access = JsonProperty.Access.WRITE_ONLY) + private String discoveryStatus; + + /** + * Get name of the deployment instance. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get status of the deployment instance. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Get failed reason of the deployment instance. + * + * @return the reason value + */ + public String reason() { + return this.reason; + } + + /** + * Get discovery status of the deployment instance. + * + * @return the discoveryStatus value + */ + public String discoveryStatus() { + return this.discoveryStatus; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResource.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResource.java new file mode 100644 index 000000000000..b9d0bb39cb63 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResource.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.appplatform.v2019_05_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.DeploymentResourceInner; +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.appplatform.v2019_05_01_preview.implementation.AppPlatformManager; +import org.joda.time.DateTime; +import java.util.List; + +/** + * Type representing DeploymentResource. + */ +public interface DeploymentResource extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + DeploymentResourceProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the DeploymentResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithApp, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * Grouping of DeploymentResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DeploymentResource definition. + */ + interface Blank extends WithApp { + } + + /** + * The stage of the deploymentresource definition allowing to specify App. + */ + interface WithApp { + /** + * Specifies resourceGroupName, serviceName, appName. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal + * @param serviceName The name of the Service resource + * @param appName The name of the App resource + * @return the next definition stage + */ + WithProperties withExistingApp(String resourceGroupName, String serviceName, String appName); + } + + /** + * The stage of the deploymentresource definition allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Properties of the Deployment resource + * @return the next definition stage + */ + WithCreate withProperties(DeploymentResourceProperties 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 { + } + } + /** + * The template for a DeploymentResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithProperties { + } + + /** + * Grouping of DeploymentResource update stages. + */ + interface UpdateStages { + /** + * The stage of the deploymentresource update allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Properties of the Deployment resource + * @return the next update stage + */ + Update withProperties(DeploymentResourceProperties properties); + } + + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceProperties.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceProperties.java new file mode 100644 index 000000000000..1b8a41f69695 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceProperties.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Deployment resource properties payload. + */ +public class DeploymentResourceProperties { + /** + * Uploaded source information of the deployment. + */ + @JsonProperty(value = "source") + private UserSourceInfo source; + + /** + * App name of the deployment. + */ + @JsonProperty(value = "appName", access = JsonProperty.Access.WRITE_ONLY) + private String appName; + + /** + * Deployment settings of the Deployment. + */ + @JsonProperty(value = "deploymentSettings") + private DeploymentSettings deploymentSettings; + + /** + * Provisioning state of the Deployment. Possible values include: + * 'Creating', 'Processing', 'Succeeded', 'Failed'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private DeploymentResourceProvisioningState provisioningState; + + /** + * Status of the Deployment. Possible values include: 'Unknown', 'Stopped', + * 'Running', 'Failed', 'Processing'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private DeploymentResourceStatus status; + + /** + * Indicates whether the Deployment is active. + */ + @JsonProperty(value = "active", access = JsonProperty.Access.WRITE_ONLY) + private Boolean active; + + /** + * Date time when the resource is created. + */ + @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime createdTime; + + /** + * Collection of instances belong to the Deployment. + */ + @JsonProperty(value = "instances", access = JsonProperty.Access.WRITE_ONLY) + private List instances; + + /** + * Get uploaded source information of the deployment. + * + * @return the source value + */ + public UserSourceInfo source() { + return this.source; + } + + /** + * Set uploaded source information of the deployment. + * + * @param source the source value to set + * @return the DeploymentResourceProperties object itself. + */ + public DeploymentResourceProperties withSource(UserSourceInfo source) { + this.source = source; + return this; + } + + /** + * Get app name of the deployment. + * + * @return the appName value + */ + public String appName() { + return this.appName; + } + + /** + * Get deployment settings of the Deployment. + * + * @return the deploymentSettings value + */ + public DeploymentSettings deploymentSettings() { + return this.deploymentSettings; + } + + /** + * Set deployment settings of the Deployment. + * + * @param deploymentSettings the deploymentSettings value to set + * @return the DeploymentResourceProperties object itself. + */ + public DeploymentResourceProperties withDeploymentSettings(DeploymentSettings deploymentSettings) { + this.deploymentSettings = deploymentSettings; + return this; + } + + /** + * Get provisioning state of the Deployment. Possible values include: 'Creating', 'Processing', 'Succeeded', 'Failed'. + * + * @return the provisioningState value + */ + public DeploymentResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get status of the Deployment. Possible values include: 'Unknown', 'Stopped', 'Running', 'Failed', 'Processing'. + * + * @return the status value + */ + public DeploymentResourceStatus status() { + return this.status; + } + + /** + * Get indicates whether the Deployment is active. + * + * @return the active value + */ + public Boolean active() { + return this.active; + } + + /** + * Get date time when the resource is created. + * + * @return the createdTime value + */ + public DateTime createdTime() { + return this.createdTime; + } + + /** + * Get collection of instances belong to the Deployment. + * + * @return the instances value + */ + public List instances() { + return this.instances; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceProvisioningState.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceProvisioningState.java new file mode 100644 index 000000000000..f4e3ef7942be --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceProvisioningState.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.appplatform.v2019_05_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DeploymentResourceProvisioningState. + */ +public final class DeploymentResourceProvisioningState extends ExpandableStringEnum { + /** Static value Creating for DeploymentResourceProvisioningState. */ + public static final DeploymentResourceProvisioningState CREATING = fromString("Creating"); + + /** Static value Processing for DeploymentResourceProvisioningState. */ + public static final DeploymentResourceProvisioningState PROCESSING = fromString("Processing"); + + /** Static value Succeeded for DeploymentResourceProvisioningState. */ + public static final DeploymentResourceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for DeploymentResourceProvisioningState. */ + public static final DeploymentResourceProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a DeploymentResourceProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding DeploymentResourceProvisioningState + */ + @JsonCreator + public static DeploymentResourceProvisioningState fromString(String name) { + return fromString(name, DeploymentResourceProvisioningState.class); + } + + /** + * @return known DeploymentResourceProvisioningState values + */ + public static Collection values() { + return values(DeploymentResourceProvisioningState.class); + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceStatus.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceStatus.java new file mode 100644 index 000000000000..08bf57917183 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceStatus.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.appplatform.v2019_05_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DeploymentResourceStatus. + */ +public final class DeploymentResourceStatus extends ExpandableStringEnum { + /** Static value Unknown for DeploymentResourceStatus. */ + public static final DeploymentResourceStatus UNKNOWN = fromString("Unknown"); + + /** Static value Stopped for DeploymentResourceStatus. */ + public static final DeploymentResourceStatus STOPPED = fromString("Stopped"); + + /** Static value Running for DeploymentResourceStatus. */ + public static final DeploymentResourceStatus RUNNING = fromString("Running"); + + /** Static value Failed for DeploymentResourceStatus. */ + public static final DeploymentResourceStatus FAILED = fromString("Failed"); + + /** Static value Processing for DeploymentResourceStatus. */ + public static final DeploymentResourceStatus PROCESSING = fromString("Processing"); + + /** + * Creates or finds a DeploymentResourceStatus from its string representation. + * @param name a name to look for + * @return the corresponding DeploymentResourceStatus + */ + @JsonCreator + public static DeploymentResourceStatus fromString(String name) { + return fromString(name, DeploymentResourceStatus.class); + } + + /** + * @return known DeploymentResourceStatus values + */ + public static Collection values() { + return values(DeploymentResourceStatus.class); + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentSettings.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentSettings.java new file mode 100644 index 000000000000..33f4cbe17f9e --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentSettings.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Deployment settings payload. + */ +public class DeploymentSettings { + /** + * Required CPU. + */ + @JsonProperty(value = "cpu") + private Integer cpu; + + /** + * Required Memory size in GB. + */ + @JsonProperty(value = "memoryInGB") + private Integer memoryInGB; + + /** + * JVM parameter. + */ + @JsonProperty(value = "jvmOptions") + private String jvmOptions; + + /** + * Instance count. + */ + @JsonProperty(value = "instanceCount") + private Integer instanceCount; + + /** + * Collection of environment variables. + */ + @JsonProperty(value = "environmentVariables") + private Map environmentVariables; + + /** + * Runtime version. Possible values include: 'Java_8', 'Java_11'. + */ + @JsonProperty(value = "runtimeVersion") + private RuntimeVersion runtimeVersion; + + /** + * Get required CPU. + * + * @return the cpu value + */ + public Integer cpu() { + return this.cpu; + } + + /** + * Set required CPU. + * + * @param cpu the cpu value to set + * @return the DeploymentSettings object itself. + */ + public DeploymentSettings withCpu(Integer cpu) { + this.cpu = cpu; + return this; + } + + /** + * Get required Memory size in GB. + * + * @return the memoryInGB value + */ + public Integer memoryInGB() { + return this.memoryInGB; + } + + /** + * Set required Memory size in GB. + * + * @param memoryInGB the memoryInGB value to set + * @return the DeploymentSettings object itself. + */ + public DeploymentSettings withMemoryInGB(Integer memoryInGB) { + this.memoryInGB = memoryInGB; + return this; + } + + /** + * Get jVM parameter. + * + * @return the jvmOptions value + */ + public String jvmOptions() { + return this.jvmOptions; + } + + /** + * Set jVM parameter. + * + * @param jvmOptions the jvmOptions value to set + * @return the DeploymentSettings object itself. + */ + public DeploymentSettings withJvmOptions(String jvmOptions) { + this.jvmOptions = jvmOptions; + return this; + } + + /** + * Get instance count. + * + * @return the instanceCount value + */ + public Integer instanceCount() { + return this.instanceCount; + } + + /** + * Set instance count. + * + * @param instanceCount the instanceCount value to set + * @return the DeploymentSettings object itself. + */ + public DeploymentSettings withInstanceCount(Integer instanceCount) { + this.instanceCount = instanceCount; + return this; + } + + /** + * Get collection of environment variables. + * + * @return the environmentVariables value + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set collection of environment variables. + * + * @param environmentVariables the environmentVariables value to set + * @return the DeploymentSettings object itself. + */ + public DeploymentSettings withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get runtime version. Possible values include: 'Java_8', 'Java_11'. + * + * @return the runtimeVersion value + */ + public RuntimeVersion runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set runtime version. Possible values include: 'Java_8', 'Java_11'. + * + * @param runtimeVersion the runtimeVersion value to set + * @return the DeploymentSettings object itself. + */ + public DeploymentSettings withRuntimeVersion(RuntimeVersion runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Deployments.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Deployments.java new file mode 100644 index 000000000000..4021edaea234 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Deployments.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.appplatform.v2019_05_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.DeploymentsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Deployments. + */ +public interface Deployments extends SupportsCreating, HasInner { + /** + * List deployments for a certain service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listClusterAllDeploymentsAsync(final String resourceGroupName, final String serviceName); + + /** + * Start the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable startAsync(String resourceGroupName, String serviceName, String appName, String deploymentName); + + /** + * Stop the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable stopAsync(String resourceGroupName, String serviceName, String appName, String deploymentName); + + /** + * Restart the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable restartAsync(String resourceGroupName, String serviceName, String appName, String deploymentName); + + /** + * Get deployment log file URL. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getLogFileUrlAsync(String resourceGroupName, String serviceName, String appName, String deploymentName); + + /** + * Get a Deployment and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String serviceName, String appName, String deploymentName); + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String serviceName, final String appName); + + /** + * Operation to delete a Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String serviceName, String appName, String deploymentName); + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Error.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Error.java new file mode 100644 index 000000000000..48d4f91d41f8 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Error.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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The error code compose of code and message. + */ +public class Error { + /** + * The code of error. + */ + @JsonProperty(value = "code") + private String code; + + /** + * The message of error. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the code of error. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the code of error. + * + * @param code the code value to set + * @return the Error object itself. + */ + public Error withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message of error. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message of error. + * + * @param message the message value to set + * @return the Error object itself. + */ + public Error withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/GitPatternRepository.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/GitPatternRepository.java new file mode 100644 index 000000000000..10863b9b2d9b --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/GitPatternRepository.java @@ -0,0 +1,304 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Git repository property payload. + */ +public class GitPatternRepository { + /** + * Name of the repository. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Collection of pattern of the repository. + */ + @JsonProperty(value = "pattern") + private List pattern; + + /** + * URI of the repository. + */ + @JsonProperty(value = "uri", required = true) + private String uri; + + /** + * Label of the repository. + */ + @JsonProperty(value = "label") + private String label; + + /** + * Searching path of the repository. + */ + @JsonProperty(value = "searchPaths") + private List searchPaths; + + /** + * Username of git repository basic auth. + */ + @JsonProperty(value = "username") + private String username; + + /** + * Password of git repository basic auth. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Public sshKey of git repository. + */ + @JsonProperty(value = "hostKey") + private String hostKey; + + /** + * SshKey algorithm of git repository. + */ + @JsonProperty(value = "hostKeyAlgorithm") + private String hostKeyAlgorithm; + + /** + * Private sshKey algorithm of git repository. + */ + @JsonProperty(value = "privateKey") + private String privateKey; + + /** + * Strict host key checking or not. + */ + @JsonProperty(value = "strictHostKeyChecking") + private Boolean strictHostKeyChecking; + + /** + * Get name of the repository. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the repository. + * + * @param name the name value to set + * @return the GitPatternRepository object itself. + */ + public GitPatternRepository withName(String name) { + this.name = name; + return this; + } + + /** + * Get collection of pattern of the repository. + * + * @return the pattern value + */ + public List pattern() { + return this.pattern; + } + + /** + * Set collection of pattern of the repository. + * + * @param pattern the pattern value to set + * @return the GitPatternRepository object itself. + */ + public GitPatternRepository withPattern(List pattern) { + this.pattern = pattern; + return this; + } + + /** + * Get uRI of the repository. + * + * @return the uri value + */ + public String uri() { + return this.uri; + } + + /** + * Set uRI of the repository. + * + * @param uri the uri value to set + * @return the GitPatternRepository object itself. + */ + public GitPatternRepository withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Get label of the repository. + * + * @return the label value + */ + public String label() { + return this.label; + } + + /** + * Set label of the repository. + * + * @param label the label value to set + * @return the GitPatternRepository object itself. + */ + public GitPatternRepository withLabel(String label) { + this.label = label; + return this; + } + + /** + * Get searching path of the repository. + * + * @return the searchPaths value + */ + public List searchPaths() { + return this.searchPaths; + } + + /** + * Set searching path of the repository. + * + * @param searchPaths the searchPaths value to set + * @return the GitPatternRepository object itself. + */ + public GitPatternRepository withSearchPaths(List searchPaths) { + this.searchPaths = searchPaths; + return this; + } + + /** + * Get username of git repository basic auth. + * + * @return the username value + */ + public String username() { + return this.username; + } + + /** + * Set username of git repository basic auth. + * + * @param username the username value to set + * @return the GitPatternRepository object itself. + */ + public GitPatternRepository withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get password of git repository basic auth. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set password of git repository basic auth. + * + * @param password the password value to set + * @return the GitPatternRepository object itself. + */ + public GitPatternRepository withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get public sshKey of git repository. + * + * @return the hostKey value + */ + public String hostKey() { + return this.hostKey; + } + + /** + * Set public sshKey of git repository. + * + * @param hostKey the hostKey value to set + * @return the GitPatternRepository object itself. + */ + public GitPatternRepository withHostKey(String hostKey) { + this.hostKey = hostKey; + return this; + } + + /** + * Get sshKey algorithm of git repository. + * + * @return the hostKeyAlgorithm value + */ + public String hostKeyAlgorithm() { + return this.hostKeyAlgorithm; + } + + /** + * Set sshKey algorithm of git repository. + * + * @param hostKeyAlgorithm the hostKeyAlgorithm value to set + * @return the GitPatternRepository object itself. + */ + public GitPatternRepository withHostKeyAlgorithm(String hostKeyAlgorithm) { + this.hostKeyAlgorithm = hostKeyAlgorithm; + return this; + } + + /** + * Get private sshKey algorithm of git repository. + * + * @return the privateKey value + */ + public String privateKey() { + return this.privateKey; + } + + /** + * Set private sshKey algorithm of git repository. + * + * @param privateKey the privateKey value to set + * @return the GitPatternRepository object itself. + */ + public GitPatternRepository withPrivateKey(String privateKey) { + this.privateKey = privateKey; + return this; + } + + /** + * Get strict host key checking or not. + * + * @return the strictHostKeyChecking value + */ + public Boolean strictHostKeyChecking() { + return this.strictHostKeyChecking; + } + + /** + * Set strict host key checking or not. + * + * @param strictHostKeyChecking the strictHostKeyChecking value to set + * @return the GitPatternRepository object itself. + */ + public GitPatternRepository withStrictHostKeyChecking(Boolean strictHostKeyChecking) { + this.strictHostKeyChecking = strictHostKeyChecking; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/LogFileUrlResponse.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/LogFileUrlResponse.java new file mode 100644 index 000000000000..f8c664acb3a7 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/LogFileUrlResponse.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.appplatform.v2019_05_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.AppPlatformManager; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.LogFileUrlResponseInner; + +/** + * Type representing LogFileUrlResponse. + */ +public interface LogFileUrlResponse extends HasInner, HasManager { + /** + * @return the url value. + */ + String url(); + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/LogSpecification.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/LogSpecification.java new file mode 100644 index 000000000000..27f4d5289eb5 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/LogSpecification.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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Log for Azure Monitoring. + */ +public class LogSpecification { + /** + * Name of the log. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the log. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Blob duration of the log. + */ + @JsonProperty(value = "blobDuration") + private String blobDuration; + + /** + * Get name of the log. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the log. + * + * @param name the name value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the log. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the log. + * + * @param displayName the displayName value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get blob duration of the log. + * + * @return the blobDuration value + */ + public String blobDuration() { + return this.blobDuration; + } + + /** + * Set blob duration of the log. + * + * @param blobDuration the blobDuration value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withBlobDuration(String blobDuration) { + this.blobDuration = blobDuration; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/MetricDimension.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/MetricDimension.java new file mode 100644 index 000000000000..caeaf9abbe5d --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/MetricDimension.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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Dimension of metrics. + */ +public class MetricDimension { + /** + * Name of the dimension. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the dimension. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Get name of the dimension. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the dimension. + * + * @param name the name value to set + * @return the MetricDimension object itself. + */ + public MetricDimension withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the dimension. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the dimension. + * + * @param displayName the displayName value to set + * @return the MetricDimension object itself. + */ + public MetricDimension withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/MetricSpecification.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/MetricSpecification.java new file mode 100644 index 000000000000..8134ae2f015e --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/MetricSpecification.java @@ -0,0 +1,281 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Metrics for Azure Monitoring. + */ +public class MetricSpecification { + /** + * Name of the metric. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the metric. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Localized friendly description of the metric. + */ + @JsonProperty(value = "displayDescription") + private String displayDescription; + + /** + * Unit that makes sense for the metric. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Name of the metric category that the metric belongs to. A metric can + * only belong to a single category. + */ + @JsonProperty(value = "category") + private String category; + + /** + * Only provide one value for this field. Valid values: Average, Minimum, + * Maximum, Total, Count. + */ + @JsonProperty(value = "aggregationType") + private String aggregationType; + + /** + * Supported aggregation types. + */ + @JsonProperty(value = "supportedAggregationTypes") + private List supportedAggregationTypes; + + /** + * Supported time grain types. + */ + @JsonProperty(value = "supportedTimeGrainTypes") + private List supportedTimeGrainTypes; + + /** + * Optional. If set to true, then zero will be returned for time duration + * where no metric is emitted/published. + */ + @JsonProperty(value = "fillGapWithZero") + private Boolean fillGapWithZero; + + /** + * Dimensions of the metric. + */ + @JsonProperty(value = "dimensions") + private List dimensions; + + /** + * Get name of the metric. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the metric. + * + * @param name the name value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the metric. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the metric. + * + * @param displayName the displayName value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get localized friendly description of the metric. + * + * @return the displayDescription value + */ + public String displayDescription() { + return this.displayDescription; + } + + /** + * Set localized friendly description of the metric. + * + * @param displayDescription the displayDescription value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayDescription(String displayDescription) { + this.displayDescription = displayDescription; + return this; + } + + /** + * Get unit that makes sense for the metric. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set unit that makes sense for the metric. + * + * @param unit the unit value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get name of the metric category that the metric belongs to. A metric can only belong to a single category. + * + * @return the category value + */ + public String category() { + return this.category; + } + + /** + * Set name of the metric category that the metric belongs to. A metric can only belong to a single category. + * + * @param category the category value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + * + * @return the aggregationType value + */ + public String aggregationType() { + return this.aggregationType; + } + + /** + * Set only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + * + * @param aggregationType the aggregationType value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withAggregationType(String aggregationType) { + this.aggregationType = aggregationType; + return this; + } + + /** + * Get supported aggregation types. + * + * @return the supportedAggregationTypes value + */ + public List supportedAggregationTypes() { + return this.supportedAggregationTypes; + } + + /** + * Set supported aggregation types. + * + * @param supportedAggregationTypes the supportedAggregationTypes value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSupportedAggregationTypes(List supportedAggregationTypes) { + this.supportedAggregationTypes = supportedAggregationTypes; + return this; + } + + /** + * Get supported time grain types. + * + * @return the supportedTimeGrainTypes value + */ + public List supportedTimeGrainTypes() { + return this.supportedTimeGrainTypes; + } + + /** + * Set supported time grain types. + * + * @param supportedTimeGrainTypes the supportedTimeGrainTypes value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSupportedTimeGrainTypes(List supportedTimeGrainTypes) { + this.supportedTimeGrainTypes = supportedTimeGrainTypes; + return this; + } + + /** + * Get optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. + * + * @return the fillGapWithZero value + */ + public Boolean fillGapWithZero() { + return this.fillGapWithZero; + } + + /** + * Set optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. + * + * @param fillGapWithZero the fillGapWithZero value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { + this.fillGapWithZero = fillGapWithZero; + return this; + } + + /** + * Get dimensions of the metric. + * + * @return the dimensions value + */ + public List dimensions() { + return this.dimensions; + } + + /** + * Set dimensions of the metric. + * + * @param dimensions the dimensions value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDimensions(List dimensions) { + this.dimensions = dimensions; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/NameAvailability.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/NameAvailability.java new file mode 100644 index 000000000000..858734ca6c00 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/NameAvailability.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.appplatform.v2019_05_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.AppPlatformManager; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.NameAvailabilityInner; + +/** + * Type representing NameAvailability. + */ +public interface NameAvailability extends HasInner, HasManager { + /** + * @return the message value. + */ + String message(); + + /** + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * @return the reason value. + */ + String reason(); + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/NameAvailabilityParameters.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/NameAvailabilityParameters.java new file mode 100644 index 000000000000..e922ca29c9ec --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/NameAvailabilityParameters.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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Name availability parameters payload. + */ +public class NameAvailabilityParameters { + /** + * Type of the resource to check name availability. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * Name to be checked. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Get type of the resource to check name availability. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set type of the resource to check name availability. + * + * @param type the type value to set + * @return the NameAvailabilityParameters object itself. + */ + public NameAvailabilityParameters withType(String type) { + this.type = type; + return this; + } + + /** + * Get name to be checked. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name to be checked. + * + * @param name the name value to set + * @return the NameAvailabilityParameters object itself. + */ + public NameAvailabilityParameters withName(String name) { + this.name = name; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/OperationDetail.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/OperationDetail.java new file mode 100644 index 000000000000..15519bb4431b --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/OperationDetail.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.appplatform.v2019_05_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.AppPlatformManager; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.OperationDetailInner; + +/** + * Type representing OperationDetail. + */ +public interface OperationDetail extends HasInner, HasManager { + /** + * @return the dataAction value. + */ + Boolean dataAction(); + + /** + * @return the display value. + */ + OperationDisplay display(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the origin value. + */ + String origin(); + + /** + * @return the properties value. + */ + OperationProperties properties(); + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/OperationDisplay.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/OperationDisplay.java new file mode 100644 index 000000000000..b2741995d8c2 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/OperationDisplay.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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Operation display payload. + */ +public class OperationDisplay { + /** + * Resource provider of the operation. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * Resource of the operation. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * Localized friendly name for the operation. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * Localized friendly description for the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get resource provider of the operation. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set resource provider of the operation. + * + * @param provider the provider value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get resource of the operation. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set resource of the operation. + * + * @param resource the resource value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get localized friendly name for the operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set localized friendly name for the operation. + * + * @param operation the operation value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get localized friendly description for the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set localized friendly description for the operation. + * + * @param description the description value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/OperationProperties.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/OperationProperties.java new file mode 100644 index 000000000000..eae11d06215f --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/OperationProperties.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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Extra Operation properties. + */ +public class OperationProperties { + /** + * Service specifications of the operation. + */ + @JsonProperty(value = "serviceSpecification") + private ServiceSpecification serviceSpecification; + + /** + * Get service specifications of the operation. + * + * @return the serviceSpecification value + */ + public ServiceSpecification serviceSpecification() { + return this.serviceSpecification; + } + + /** + * Set service specifications of the operation. + * + * @param serviceSpecification the serviceSpecification value to set + * @return the OperationProperties object itself. + */ + public OperationProperties withServiceSpecification(ServiceSpecification serviceSpecification) { + this.serviceSpecification = serviceSpecification; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Operations.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Operations.java new file mode 100644 index 000000000000..087a37cb159e --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/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.appplatform.v2019_05_01_preview; + +import rx.Observable; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Lists all of the available REST API operations of the Microsoft.AppPlatform provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/PersistentDisk.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/PersistentDisk.java new file mode 100644 index 000000000000..3ad884534651 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/PersistentDisk.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Persistent disk payload. + */ +public class PersistentDisk { + /** + * Size of the persistent disk in GB. + */ + @JsonProperty(value = "sizeInGB") + private Integer sizeInGB; + + /** + * Size of the used persistent disk in GB. + */ + @JsonProperty(value = "usedInGB", access = JsonProperty.Access.WRITE_ONLY) + private Integer usedInGB; + + /** + * Mount path of the persistent disk. + */ + @JsonProperty(value = "mountPath") + private String mountPath; + + /** + * Get size of the persistent disk in GB. + * + * @return the sizeInGB value + */ + public Integer sizeInGB() { + return this.sizeInGB; + } + + /** + * Set size of the persistent disk in GB. + * + * @param sizeInGB the sizeInGB value to set + * @return the PersistentDisk object itself. + */ + public PersistentDisk withSizeInGB(Integer sizeInGB) { + this.sizeInGB = sizeInGB; + return this; + } + + /** + * Get size of the used persistent disk in GB. + * + * @return the usedInGB value + */ + public Integer usedInGB() { + return this.usedInGB; + } + + /** + * Get mount path of the persistent disk. + * + * @return the mountPath value + */ + public String mountPath() { + return this.mountPath; + } + + /** + * Set mount path of the persistent disk. + * + * @param mountPath the mountPath value to set + * @return the PersistentDisk object itself. + */ + public PersistentDisk withMountPath(String mountPath) { + this.mountPath = mountPath; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ProvisioningState.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ProvisioningState.java new file mode 100644 index 000000000000..f7794b611e6a --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ProvisioningState.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appplatform.v2019_05_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProvisioningState. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Creating for ProvisioningState. */ + public static final ProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for ProvisioningState. */ + public static final ProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for ProvisioningState. */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** Static value Deleted for ProvisioningState. */ + public static final ProvisioningState DELETED = fromString("Deleted"); + + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** Static value Moving for ProvisioningState. */ + public static final ProvisioningState MOVING = fromString("Moving"); + + /** Static value Moved for ProvisioningState. */ + public static final ProvisioningState MOVED = fromString("Moved"); + + /** Static value MoveFailed for ProvisioningState. */ + public static final ProvisioningState MOVE_FAILED = fromString("MoveFailed"); + + /** + * Creates or finds a ProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ProvisioningState + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * @return known ProvisioningState values + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/RegenerateTestKeyRequestPayload.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/RegenerateTestKeyRequestPayload.java new file mode 100644 index 000000000000..5506491c97ff --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/RegenerateTestKeyRequestPayload.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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Regenerate test key request payload. + */ +public class RegenerateTestKeyRequestPayload { + /** + * Type of the test key. Possible values include: 'Primary', 'Secondary'. + */ + @JsonProperty(value = "keyType", required = true) + private TestKeyType keyType; + + /** + * Get type of the test key. Possible values include: 'Primary', 'Secondary'. + * + * @return the keyType value + */ + public TestKeyType keyType() { + return this.keyType; + } + + /** + * Set type of the test key. Possible values include: 'Primary', 'Secondary'. + * + * @param keyType the keyType value to set + * @return the RegenerateTestKeyRequestPayload object itself. + */ + public RegenerateTestKeyRequestPayload withKeyType(TestKeyType keyType) { + this.keyType = keyType; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ResourceUploadDefinition.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ResourceUploadDefinition.java new file mode 100644 index 000000000000..d8d3e256fa21 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ResourceUploadDefinition.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.appplatform.v2019_05_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.AppPlatformManager; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.ResourceUploadDefinitionInner; + +/** + * Type representing ResourceUploadDefinition. + */ +public interface ResourceUploadDefinition extends HasInner, HasManager { + /** + * @return the relativePath value. + */ + String relativePath(); + + /** + * @return the uploadUrl value. + */ + String uploadUrl(); + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/RuntimeVersion.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/RuntimeVersion.java new file mode 100644 index 000000000000..1e61bb636345 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/RuntimeVersion.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.appplatform.v2019_05_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for RuntimeVersion. + */ +public final class RuntimeVersion extends ExpandableStringEnum { + /** Static value Java_8 for RuntimeVersion. */ + public static final RuntimeVersion JAVA_8 = fromString("Java_8"); + + /** Static value Java_11 for RuntimeVersion. */ + public static final RuntimeVersion JAVA_11 = fromString("Java_11"); + + /** + * Creates or finds a RuntimeVersion from its string representation. + * @param name a name to look for + * @return the corresponding RuntimeVersion + */ + @JsonCreator + public static RuntimeVersion fromString(String name) { + return fromString(name, RuntimeVersion.class); + } + + /** + * @return known RuntimeVersion values + */ + public static Collection values() { + return values(RuntimeVersion.class); + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ServiceResource.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ServiceResource.java new file mode 100644 index 000000000000..1b876c03a47a --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ServiceResource.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.AppPlatformManager; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.ServiceResourceInner; +import java.util.Map; + +/** + * Type representing ServiceResource. + */ +public interface ServiceResource extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + ClusterResourceProperties properties(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ServiceSpecification.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ServiceSpecification.java new file mode 100644 index 000000000000..39214353a9e5 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/ServiceSpecification.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.appplatform.v2019_05_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Service specification payload. + */ +public class ServiceSpecification { + /** + * Specifications of the Log for Azure Monitoring. + */ + @JsonProperty(value = "logSpecifications") + private List logSpecifications; + + /** + * Specifications of the Metrics for Azure Monitoring. + */ + @JsonProperty(value = "metricSpecifications") + private List metricSpecifications; + + /** + * Get specifications of the Log for Azure Monitoring. + * + * @return the logSpecifications value + */ + public List logSpecifications() { + return this.logSpecifications; + } + + /** + * Set specifications of the Log for Azure Monitoring. + * + * @param logSpecifications the logSpecifications value to set + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withLogSpecifications(List logSpecifications) { + this.logSpecifications = logSpecifications; + return this; + } + + /** + * Get specifications of the Metrics for Azure Monitoring. + * + * @return the metricSpecifications value + */ + public List metricSpecifications() { + return this.metricSpecifications; + } + + /** + * Set specifications of the Metrics for Azure Monitoring. + * + * @param metricSpecifications the metricSpecifications value to set + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withMetricSpecifications(List metricSpecifications) { + this.metricSpecifications = metricSpecifications; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Services.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Services.java new file mode 100644 index 000000000000..9ca007c9f363 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/Services.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview; + +import rx.Completable; +import rx.Observable; + +/** + * Type representing Services. + */ +public interface Services { + /** + * Get a Service and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getByResourceGroupAsync(String resourceGroupName, String serviceName); + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createOrUpdateAsync(String resourceGroupName, String serviceName); + + /** + * Operation to delete a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String serviceName); + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateAsync(String resourceGroupName, String serviceName); + + /** + * Regenerate a test key for a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param keyType Type of the test key. Possible values include: 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable regenerateTestKeyAsync(String resourceGroupName, String serviceName, TestKeyType keyType); + + /** + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable disableTestEndpointAsync(String resourceGroupName, String serviceName); + + /** + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable enableTestEndpointAsync(String resourceGroupName, String serviceName); + + /** + * Handles requests to list all resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Handles requests to list all resources in a resource group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(final String resourceGroupName); + + /** + * List test keys for a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listTestKeysAsync(String resourceGroupName, String serviceName); + + /** + * Checks that the resource name is valid and is not already in use. + * + * @param location the region + * @param availabilityParameters Parameters supplied to the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String location, NameAvailabilityParameters availabilityParameters); + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TemporaryDisk.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TemporaryDisk.java new file mode 100644 index 000000000000..10d6a334729b --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TemporaryDisk.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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Temporary disk payload. + */ +public class TemporaryDisk { + /** + * Size of the temporary disk in GB. + */ + @JsonProperty(value = "sizeInGB") + private Integer sizeInGB; + + /** + * Mount path of the temporary disk. + */ + @JsonProperty(value = "mountPath") + private String mountPath; + + /** + * Get size of the temporary disk in GB. + * + * @return the sizeInGB value + */ + public Integer sizeInGB() { + return this.sizeInGB; + } + + /** + * Set size of the temporary disk in GB. + * + * @param sizeInGB the sizeInGB value to set + * @return the TemporaryDisk object itself. + */ + public TemporaryDisk withSizeInGB(Integer sizeInGB) { + this.sizeInGB = sizeInGB; + return this; + } + + /** + * Get mount path of the temporary disk. + * + * @return the mountPath value + */ + public String mountPath() { + return this.mountPath; + } + + /** + * Set mount path of the temporary disk. + * + * @param mountPath the mountPath value to set + * @return the TemporaryDisk object itself. + */ + public TemporaryDisk withMountPath(String mountPath) { + this.mountPath = mountPath; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TestKeyType.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TestKeyType.java new file mode 100644 index 000000000000..31d71d62caae --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TestKeyType.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.appplatform.v2019_05_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for TestKeyType. + */ +public final class TestKeyType extends ExpandableStringEnum { + /** Static value Primary for TestKeyType. */ + public static final TestKeyType PRIMARY = fromString("Primary"); + + /** Static value Secondary for TestKeyType. */ + public static final TestKeyType SECONDARY = fromString("Secondary"); + + /** + * Creates or finds a TestKeyType from its string representation. + * @param name a name to look for + * @return the corresponding TestKeyType + */ + @JsonCreator + public static TestKeyType fromString(String name) { + return fromString(name, TestKeyType.class); + } + + /** + * @return known TestKeyType values + */ + public static Collection values() { + return values(TestKeyType.class); + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TestKeys.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TestKeys.java new file mode 100644 index 000000000000..c716a229be22 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TestKeys.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.appplatform.v2019_05_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.AppPlatformManager; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation.TestKeysInner; + +/** + * Type representing TestKeys. + */ +public interface TestKeys extends HasInner, HasManager { + /** + * @return the enabled value. + */ + Boolean enabled(); + + /** + * @return the primaryKey value. + */ + String primaryKey(); + + /** + * @return the primaryTestEndpoint value. + */ + String primaryTestEndpoint(); + + /** + * @return the secondaryKey value. + */ + String secondaryKey(); + + /** + * @return the secondaryTestEndpoint value. + */ + String secondaryTestEndpoint(); + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TraceProperties.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TraceProperties.java new file mode 100644 index 000000000000..f58c39e15743 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TraceProperties.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.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Trace properties payload. + */ +public class TraceProperties { + /** + * State of the trace proxy. Possible values include: 'NotAvailable', + * 'Failed', 'Succeeded', 'Updating'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private TraceProxyState state; + + /** + * Error when apply trace proxy changes. + */ + @JsonProperty(value = "error") + private Error error; + + /** + * Indicates whether enable the tracing functionality. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Target application insight instrumentation key. + */ + @JsonProperty(value = "appInsightInstrumentationKey") + private String appInsightInstrumentationKey; + + /** + * Get state of the trace proxy. Possible values include: 'NotAvailable', 'Failed', 'Succeeded', 'Updating'. + * + * @return the state value + */ + public TraceProxyState state() { + return this.state; + } + + /** + * Get error when apply trace proxy changes. + * + * @return the error value + */ + public Error error() { + return this.error; + } + + /** + * Set error when apply trace proxy changes. + * + * @param error the error value to set + * @return the TraceProperties object itself. + */ + public TraceProperties withError(Error error) { + this.error = error; + return this; + } + + /** + * Get indicates whether enable the tracing functionality. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set indicates whether enable the tracing functionality. + * + * @param enabled the enabled value to set + * @return the TraceProperties object itself. + */ + public TraceProperties withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get target application insight instrumentation key. + * + * @return the appInsightInstrumentationKey value + */ + public String appInsightInstrumentationKey() { + return this.appInsightInstrumentationKey; + } + + /** + * Set target application insight instrumentation key. + * + * @param appInsightInstrumentationKey the appInsightInstrumentationKey value to set + * @return the TraceProperties object itself. + */ + public TraceProperties withAppInsightInstrumentationKey(String appInsightInstrumentationKey) { + this.appInsightInstrumentationKey = appInsightInstrumentationKey; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TraceProxyState.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TraceProxyState.java new file mode 100644 index 000000000000..2e1fc8048a8a --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/TraceProxyState.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.appplatform.v2019_05_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for TraceProxyState. + */ +public final class TraceProxyState extends ExpandableStringEnum { + /** Static value NotAvailable for TraceProxyState. */ + public static final TraceProxyState NOT_AVAILABLE = fromString("NotAvailable"); + + /** Static value Failed for TraceProxyState. */ + public static final TraceProxyState FAILED = fromString("Failed"); + + /** Static value Succeeded for TraceProxyState. */ + public static final TraceProxyState SUCCEEDED = fromString("Succeeded"); + + /** Static value Updating for TraceProxyState. */ + public static final TraceProxyState UPDATING = fromString("Updating"); + + /** + * Creates or finds a TraceProxyState from its string representation. + * @param name a name to look for + * @return the corresponding TraceProxyState + */ + @JsonCreator + public static TraceProxyState fromString(String name) { + return fromString(name, TraceProxyState.class); + } + + /** + * @return known TraceProxyState values + */ + public static Collection values() { + return values(TraceProxyState.class); + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/UserSourceInfo.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/UserSourceInfo.java new file mode 100644 index 000000000000..d8fc3cef0202 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/UserSourceInfo.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appplatform.v2019_05_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Source information for a deployment. + */ +public class UserSourceInfo { + /** + * Type of the source uploaded. Possible values include: 'Jar', 'Source'. + */ + @JsonProperty(value = "type") + private UserSourceType type; + + /** + * Relative path of the storage which stores the source. + */ + @JsonProperty(value = "relativePath") + private String relativePath; + + /** + * Version of the source. + */ + @JsonProperty(value = "version") + private String version; + + /** + * Selector for the artifact to be used for the deployment for multi-module + * projects. This should be + * the relative path to the target module/project. + */ + @JsonProperty(value = "artifactSelector") + private String artifactSelector; + + /** + * Get type of the source uploaded. Possible values include: 'Jar', 'Source'. + * + * @return the type value + */ + public UserSourceType type() { + return this.type; + } + + /** + * Set type of the source uploaded. Possible values include: 'Jar', 'Source'. + * + * @param type the type value to set + * @return the UserSourceInfo object itself. + */ + public UserSourceInfo withType(UserSourceType type) { + this.type = type; + return this; + } + + /** + * Get relative path of the storage which stores the source. + * + * @return the relativePath value + */ + public String relativePath() { + return this.relativePath; + } + + /** + * Set relative path of the storage which stores the source. + * + * @param relativePath the relativePath value to set + * @return the UserSourceInfo object itself. + */ + public UserSourceInfo withRelativePath(String relativePath) { + this.relativePath = relativePath; + return this; + } + + /** + * Get version of the source. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set version of the source. + * + * @param version the version value to set + * @return the UserSourceInfo object itself. + */ + public UserSourceInfo withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get selector for the artifact to be used for the deployment for multi-module projects. This should be + the relative path to the target module/project. + * + * @return the artifactSelector value + */ + public String artifactSelector() { + return this.artifactSelector; + } + + /** + * Set selector for the artifact to be used for the deployment for multi-module projects. This should be + the relative path to the target module/project. + * + * @param artifactSelector the artifactSelector value to set + * @return the UserSourceInfo object itself. + */ + public UserSourceInfo withArtifactSelector(String artifactSelector) { + this.artifactSelector = artifactSelector; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/UserSourceType.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/UserSourceType.java new file mode 100644 index 000000000000..4008744d7ce0 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/UserSourceType.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.appplatform.v2019_05_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for UserSourceType. + */ +public final class UserSourceType extends ExpandableStringEnum { + /** Static value Jar for UserSourceType. */ + public static final UserSourceType JAR = fromString("Jar"); + + /** Static value Source for UserSourceType. */ + public static final UserSourceType SOURCE = fromString("Source"); + + /** + * Creates or finds a UserSourceType from its string representation. + * @param name a name to look for + * @return the corresponding UserSourceType + */ + @JsonCreator + public static UserSourceType fromString(String name) { + return fromString(name, UserSourceType.class); + } + + /** + * @return known UserSourceType values + */ + public static Collection values() { + return values(UserSourceType.class); + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppPlatformManagementClientImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppPlatformManagementClientImpl.java new file mode 100644 index 000000000000..6e5eb0418d75 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppPlatformManagementClientImpl.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_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 AppPlatformManagementClientImpl class. + */ +public class AppPlatformManagementClientImpl 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; + } + + /** Client Api Version. */ + private String apiVersion; + + /** + * Gets Client Api Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ + private String subscriptionId; + + /** + * Gets Gets subscription ID which uniquely identify the 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 ID which uniquely identify the 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 AppPlatformManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** 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 AppPlatformManagementClientImpl 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 AppPlatformManagementClientImpl 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 AppPlatformManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The ServicesInner object to access its operations. + */ + private ServicesInner services; + + /** + * Gets the ServicesInner object to access its operations. + * @return the ServicesInner object. + */ + public ServicesInner services() { + return this.services; + } + + /** + * The AppsInner object to access its operations. + */ + private AppsInner apps; + + /** + * Gets the AppsInner object to access its operations. + * @return the AppsInner object. + */ + public AppsInner apps() { + return this.apps; + } + + /** + * The BindingsInner object to access its operations. + */ + private BindingsInner bindings; + + /** + * Gets the BindingsInner object to access its operations. + * @return the BindingsInner object. + */ + public BindingsInner bindings() { + return this.bindings; + } + + /** + * The DeploymentsInner object to access its operations. + */ + private DeploymentsInner deployments; + + /** + * Gets the DeploymentsInner object to access its operations. + * @return the DeploymentsInner object. + */ + public DeploymentsInner deployments() { + return this.deployments; + } + + /** + * 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; + } + + /** + * Initializes an instance of AppPlatformManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public AppPlatformManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of AppPlatformManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public AppPlatformManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of AppPlatformManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public AppPlatformManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2019-05-01-preview"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.services = new ServicesInner(restClient().retrofit(), this); + this.apps = new AppsInner(restClient().retrofit(), this); + this.bindings = new BindingsInner(restClient().retrofit(), this); + this.deployments = new DeploymentsInner(restClient().retrofit(), this); + this.operations = new OperationsInner(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(), "AppPlatformManagementClient", "2019-05-01-preview"); + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppPlatformManager.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppPlatformManager.java new file mode 100644 index 000000000000..1f61fedfc108 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppPlatformManager.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_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.appplatform.v2019_05_01_preview.Services; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.Apps; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.Bindings; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.Deployments; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.Operations; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure AppPlatform resource management. + */ +public final class AppPlatformManager extends ManagerCore { + private Services services; + private Apps apps; + private Bindings bindings; + private Deployments deployments; + private Operations operations; + /** + * Get a Configurable instance that can be used to create AppPlatformManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new AppPlatformManager.ConfigurableImpl(); + } + /** + * Creates an instance of AppPlatformManager that exposes AppPlatform resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the AppPlatformManager + */ + public static AppPlatformManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new AppPlatformManager(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 AppPlatformManager that exposes AppPlatform resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the AppPlatformManager + */ + public static AppPlatformManager authenticate(RestClient restClient, String subscriptionId) { + return new AppPlatformManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of AppPlatformManager that exposes AppPlatform management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing AppPlatform management API entry points that work across subscriptions + */ + AppPlatformManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage Services. + */ + public Services services() { + if (this.services == null) { + this.services = new ServicesImpl(this); + } + return this.services; + } + + /** + * @return Entry point to manage Apps. + */ + public Apps apps() { + if (this.apps == null) { + this.apps = new AppsImpl(this); + } + return this.apps; + } + + /** + * @return Entry point to manage Bindings. + */ + public Bindings bindings() { + if (this.bindings == null) { + this.bindings = new BindingsImpl(this); + } + return this.bindings; + } + + /** + * @return Entry point to manage Deployments. + */ + public Deployments deployments() { + if (this.deployments == null) { + this.deployments = new DeploymentsImpl(this); + } + return this.deployments; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public AppPlatformManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return AppPlatformManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private AppPlatformManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new AppPlatformManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppResourceImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppResourceImpl.java new file mode 100644 index 000000000000..ad69132cf992 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppResourceImpl.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.AppResource; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.AppResourceProperties; +import org.joda.time.DateTime; +import rx.functions.Func1; + +class AppResourceImpl extends CreatableUpdatableImpl implements AppResource, AppResource.Definition, AppResource.Update { + private String resourceGroupName; + private String serviceName; + private String appName; + private AppResourceProperties cproperties; + private AppResourceProperties uproperties; + private final AppPlatformManager manager; + + AppResourceImpl(String name, AppPlatformManager manager) { + super(name, new AppResourceInner()); + this.manager = manager; + // Set resource name + this.appName = name; + // + this.cproperties = new AppResourceProperties(); + this.uproperties = new AppResourceProperties(); + } + + AppResourceImpl(AppResourceInner inner, AppPlatformManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.appName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.serviceName = IdParsingUtils.getValueFromIdByName(inner.id(), "Spring"); + this.appName = IdParsingUtils.getValueFromIdByName(inner.id(), "apps"); + // set other parameters for create and update + this.cproperties = new AppResourceProperties(); + this.uproperties = new AppResourceProperties(); + } + + @Override + public AppPlatformManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + AppsInner client = this.manager().inner().apps(); + return client.createOrUpdateAsync(this.resourceGroupName, this.serviceName, this.appName, this.cproperties) + .map(new Func1() { + @Override + public AppResourceInner call(AppResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AppsInner client = this.manager().inner().apps(); + return client.updateAsync(this.resourceGroupName, this.serviceName, this.appName, this.uproperties) + .map(new Func1() { + @Override + public AppResourceInner call(AppResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AppsInner client = this.manager().inner().apps(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.cproperties = new AppResourceProperties(); + this.uproperties = new AppResourceProperties(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public AppResourceProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public AppResourceImpl withResourceGroupName(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + @Override + public AppResourceImpl withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + @Override + public AppResourceImpl withProperties(AppResourceProperties properties) { + if (isInCreateMode()) { + this.cproperties = properties; + } else { + this.uproperties = properties; + } + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppResourceInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppResourceInner.java new file mode 100644 index 000000000000..ff55fc32e1d9 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppResourceInner.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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.AppResourceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * App resource payload. + */ +public class AppResourceInner extends ProxyResource { + /** + * Properties of the App resource. + */ + @JsonProperty(value = "properties") + private AppResourceProperties properties; + + /** + * Get properties of the App resource. + * + * @return the properties value + */ + public AppResourceProperties properties() { + return this.properties; + } + + /** + * Set properties of the App resource. + * + * @param properties the properties value to set + * @return the AppResourceInner object itself. + */ + public AppResourceInner withProperties(AppResourceProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppsImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppsImpl.java new file mode 100644 index 000000000000..82cbb431c092 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppsImpl.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * jkl + */ + +package com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.Apps; +import rx.Completable; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.AppResource; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.ResourceUploadDefinition; + +class AppsImpl extends WrapperImpl implements Apps { + private final AppPlatformManager manager; + + AppsImpl(AppPlatformManager manager) { + super(manager.inner().apps()); + this.manager = manager; + } + + public AppPlatformManager manager() { + return this.manager; + } + + @Override + public AppResourceImpl define(String name) { + return wrapModel(name); + } + + private AppResourceImpl wrapModel(AppResourceInner inner) { + return new AppResourceImpl(inner, manager()); + } + + private AppResourceImpl wrapModel(String name) { + return new AppResourceImpl(name, this.manager()); + } + + @Override + public Observable getAsync(String resourceGroupName, String serviceName, String appName) { + AppsInner client = this.inner(); + return client.getAsync(resourceGroupName, serviceName, appName) + .map(new Func1() { + @Override + public AppResource call(AppResourceInner inner) { + return new AppResourceImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String serviceName, String appName) { + AppsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, serviceName, appName).toCompletable(); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String serviceName) { + AppsInner client = this.inner(); + return client.listAsync(resourceGroupName, serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AppResource call(AppResourceInner inner) { + return new AppResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable getResourceUploadUrlAsync(String resourceGroupName, String serviceName, String appName) { + AppsInner client = this.inner(); + return client.getResourceUploadUrlAsync(resourceGroupName, serviceName, appName) + .map(new Func1() { + @Override + public ResourceUploadDefinition call(ResourceUploadDefinitionInner inner) { + return new ResourceUploadDefinitionImpl(inner, manager()); + } + }); + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppsInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppsInner.java new file mode 100644 index 000000000000..70e18cc35be9 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppsInner.java @@ -0,0 +1,1058 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview.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.appplatform.v2019_05_01_preview.AppResourceProperties; +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 Apps. + */ +public class AppsInner { + /** The Retrofit service to perform REST calls. */ + private AppsService service; + /** The service client containing this operation class. */ + private AppPlatformManagementClientImpl client; + + /** + * Initializes an instance of AppsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AppsInner(Retrofit retrofit, AppPlatformManagementClientImpl client) { + this.service = retrofit.create(AppsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Apps to be + * used by Retrofit to perform actually REST calls. + */ + interface AppsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Apps get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Query("syncStatus") String syncStatus, @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.appplatform.v2019_05_01_preview.Apps createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AppResourceInner appResource, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Apps delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @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.appplatform.v2019_05_01_preview.Apps update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AppResourceInner appResource, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Apps list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @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.appplatform.v2019_05_01_preview.Apps getResourceUploadUrl" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/getResourceUploadUrl") + Observable> getResourceUploadUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @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.appplatform.v2019_05_01_preview.Apps listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get an App and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 AppResourceInner object if successful. + */ + public AppResourceInner get(String resourceGroupName, String serviceName, String appName) { + return getWithServiceResponseAsync(resourceGroupName, serviceName, appName).toBlocking().single().body(); + } + + /** + * Get an App and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @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 serviceName, String appName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, appName), serviceCallback); + } + + /** + * Get an App and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppResourceInner object + */ + public Observable getAsync(String resourceGroupName, String serviceName, String appName) { + return getWithServiceResponseAsync(resourceGroupName, serviceName, appName).map(new Func1, AppResourceInner>() { + @Override + public AppResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get an App and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppResourceInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + final String syncStatus = null; + return service.get(this.client.subscriptionId(), resourceGroupName, serviceName, appName, syncStatus, 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); + } + } + }); + } + + /** + * Get an App and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param syncStatus Indicates whether sync status + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 AppResourceInner object if successful. + */ + public AppResourceInner get(String resourceGroupName, String serviceName, String appName, String syncStatus) { + return getWithServiceResponseAsync(resourceGroupName, serviceName, appName, syncStatus).toBlocking().single().body(); + } + + /** + * Get an App and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param syncStatus Indicates whether sync status + * @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 serviceName, String appName, String syncStatus, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, appName, syncStatus), serviceCallback); + } + + /** + * Get an App and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param syncStatus Indicates whether sync status + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppResourceInner object + */ + public Observable getAsync(String resourceGroupName, String serviceName, String appName, String syncStatus) { + return getWithServiceResponseAsync(resourceGroupName, serviceName, appName, syncStatus).map(new Func1, AppResourceInner>() { + @Override + public AppResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get an App and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param syncStatus Indicates whether sync status + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppResourceInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String syncStatus) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, serviceName, appName, syncStatus, 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); + } + + /** + * Create a new App or update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 AppResourceInner object if successful. + */ + public AppResourceInner createOrUpdate(String resourceGroupName, String serviceName, String appName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName).toBlocking().single().body(); + } + + /** + * Create a new App or update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @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 serviceName, String appName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName), serviceCallback); + } + + /** + * Create a new App or update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppResourceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String appName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName).map(new Func1, AppResourceInner>() { + @Override + public AppResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new App or update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppResourceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + final AppResourceProperties properties = null; + AppResourceInner appResource = new AppResourceInner(); + appResource.withProperties(null); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, 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); + } + } + }); + } + + /** + * Create a new App or update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param properties Properties of the App resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 AppResourceInner object if successful. + */ + public AppResourceInner createOrUpdate(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).toBlocking().single().body(); + } + + /** + * Create a new App or update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param properties Properties of the App resource + * @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 serviceName, String appName, AppResourceProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties), serviceCallback); + } + + /** + * Create a new App or update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param properties Properties of the App resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppResourceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).map(new Func1, AppResourceInner>() { + @Override + public AppResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new App or update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param properties Properties of the App resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppResourceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + Validator.validate(properties); + AppResourceInner appResource = null; + if (properties != null) { + appResource = new AppResourceInner(); + appResource.withProperties(properties); + } + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, 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); + } + + /** + * Operation to delete an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 serviceName, String appName) { + deleteWithServiceResponseAsync(resourceGroupName, serviceName, appName).toBlocking().single().body(); + } + + /** + * Operation to delete an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @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 serviceName, String appName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, appName), serviceCallback); + } + + /** + * Operation to delete an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String serviceName, String appName) { + return deleteWithServiceResponseAsync(resourceGroupName, serviceName, appName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to delete an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, serviceName, appName, 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); + } + + /** + * Operation to update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 AppResourceInner object if successful. + */ + public AppResourceInner update(String resourceGroupName, String serviceName, String appName) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName).toBlocking().single().body(); + } + + /** + * Operation to update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @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 serviceName, String appName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, appName), serviceCallback); + } + + /** + * Operation to update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppResourceInner object + */ + public Observable updateAsync(String resourceGroupName, String serviceName, String appName) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName).map(new Func1, AppResourceInner>() { + @Override + public AppResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppResourceInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + final AppResourceProperties properties = null; + AppResourceInner appResource = new AppResourceInner(); + appResource.withProperties(null); + return service.update(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, 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); + } + } + }); + } + + /** + * Operation to update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param properties Properties of the App resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 AppResourceInner object if successful. + */ + public AppResourceInner update(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).toBlocking().single().body(); + } + + /** + * Operation to update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param properties Properties of the App resource + * @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 serviceName, String appName, AppResourceProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties), serviceCallback); + } + + /** + * Operation to update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param properties Properties of the App resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppResourceInner object + */ + public Observable updateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).map(new Func1, AppResourceInner>() { + @Override + public AppResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param properties Properties of the App resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppResourceInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + Validator.validate(properties); + AppResourceInner appResource = null; + if (properties != null) { + appResource = new AppResourceInner(); + appResource.withProperties(properties); + } + return service.update(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, 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); + } + + /** + * Handles requests to list all resources in a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<AppResourceInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String serviceName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Handles requests to list all resources in a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @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 resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Handles requests to list all resources in a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppResourceInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String serviceName) { + return listWithServiceResponseAsync(resourceGroupName, serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppResourceInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { + return listSinglePageAsync(resourceGroupName, serviceName) + .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)); + } + }); + } + + /** + * Handles requests to list all resources in a Service. + * + ServiceResponse> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + ServiceResponse> * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AppResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), resourceGroupName, serviceName, 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); + } + + /** + * Get an resource upload URL for an App, which may be artifacts or source archive. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ResourceUploadDefinitionInner object if successful. + */ + public ResourceUploadDefinitionInner getResourceUploadUrl(String resourceGroupName, String serviceName, String appName) { + return getResourceUploadUrlWithServiceResponseAsync(resourceGroupName, serviceName, appName).toBlocking().single().body(); + } + + /** + * Get an resource upload URL for an App, which may be artifacts or source archive. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @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 getResourceUploadUrlAsync(String resourceGroupName, String serviceName, String appName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getResourceUploadUrlWithServiceResponseAsync(resourceGroupName, serviceName, appName), serviceCallback); + } + + /** + * Get an resource upload URL for an App, which may be artifacts or source archive. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResourceUploadDefinitionInner object + */ + public Observable getResourceUploadUrlAsync(String resourceGroupName, String serviceName, String appName) { + return getResourceUploadUrlWithServiceResponseAsync(resourceGroupName, serviceName, appName).map(new Func1, ResourceUploadDefinitionInner>() { + @Override + public ResourceUploadDefinitionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get an resource upload URL for an App, which may be artifacts or source archive. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResourceUploadDefinitionInner object + */ + public Observable> getResourceUploadUrlWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + return service.getResourceUploadUrl(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getResourceUploadUrlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getResourceUploadUrlDelegate(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); + } + + /** + * Handles requests to list all resources in a Service. + * + * @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<AppResourceInner> 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(); + } + }; + } + + /** + * Handles requests to list all resources in a Service. + * + * @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); + } + + /** + * Handles requests to list all resources in a Service. + * + * @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<AppResourceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in a Service. + * + * @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<AppResourceInner> 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)); + } + }); + } + + /** + * Handles requests to list all resources in a Service. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AppResourceInner> 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/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingResourceImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingResourceImpl.java new file mode 100644 index 000000000000..7ac579edab4a --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingResourceImpl.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.BindingResource; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.BindingResourceProperties; +import java.util.Map; +import rx.functions.Func1; + +class BindingResourceImpl extends CreatableUpdatableImpl implements BindingResource, BindingResource.Definition, BindingResource.Update { + private final AppPlatformManager manager; + private String resourceGroupName; + private String serviceName; + private String appName; + private String bindingName; + private BindingResourceProperties cproperties; + private BindingResourceProperties uproperties; + + BindingResourceImpl(String name, AppPlatformManager manager) { + super(name, new BindingResourceInner()); + this.manager = manager; + // Set resource name + this.bindingName = name; + // + this.cproperties = new BindingResourceProperties(); + this.uproperties = new BindingResourceProperties(); + } + + BindingResourceImpl(BindingResourceInner inner, AppPlatformManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.bindingName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.serviceName = IdParsingUtils.getValueFromIdByName(inner.id(), "Spring"); + this.appName = IdParsingUtils.getValueFromIdByName(inner.id(), "apps"); + this.bindingName = IdParsingUtils.getValueFromIdByName(inner.id(), "bindings"); + // + this.cproperties = new BindingResourceProperties(); + this.uproperties = new BindingResourceProperties(); + } + + @Override + public AppPlatformManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + BindingsInner client = this.manager().inner().bindings(); + return client.createOrUpdateAsync(this.resourceGroupName, this.serviceName, this.appName, this.bindingName, this.cproperties) + .map(new Func1() { + @Override + public BindingResourceInner call(BindingResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + BindingsInner client = this.manager().inner().bindings(); + return client.updateAsync(this.resourceGroupName, this.serviceName, this.appName, this.bindingName, this.uproperties) + .map(new Func1() { + @Override + public BindingResourceInner call(BindingResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + BindingsInner client = this.manager().inner().bindings(); + return client.getAsync(this.resourceGroupName, this.serviceName, this.appName, this.bindingName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.cproperties = new BindingResourceProperties(); + this.uproperties = new BindingResourceProperties(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public BindingResourceProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public BindingResourceImpl withExistingApp(String resourceGroupName, String serviceName, String appName) { + this.resourceGroupName = resourceGroupName; + this.serviceName = serviceName; + this.appName = appName; + return this; + } + + @Override + public BindingResourceImpl withProperties(BindingResourceProperties properties) { + if (isInCreateMode()) { + this.cproperties = properties; + } else { + this.uproperties = properties; + } + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingResourceInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingResourceInner.java new file mode 100644 index 000000000000..312e425f997b --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingResourceInner.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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.BindingResourceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Binding resource payload. + */ +public class BindingResourceInner extends ProxyResource { + /** + * Properties of the Binding resource. + */ + @JsonProperty(value = "properties") + private BindingResourceProperties properties; + + /** + * Get properties of the Binding resource. + * + * @return the properties value + */ + public BindingResourceProperties properties() { + return this.properties; + } + + /** + * Set properties of the Binding resource. + * + * @param properties the properties value to set + * @return the BindingResourceInner object itself. + */ + public BindingResourceInner withProperties(BindingResourceProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingsImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingsImpl.java new file mode 100644 index 000000000000..4b7f8823357f --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.Bindings; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.BindingResource; + +class BindingsImpl extends WrapperImpl implements Bindings { + private final AppPlatformManager manager; + + BindingsImpl(AppPlatformManager manager) { + super(manager.inner().bindings()); + this.manager = manager; + } + + public AppPlatformManager manager() { + return this.manager; + } + + @Override + public BindingResourceImpl define(String name) { + return wrapModel(name); + } + + private BindingResourceImpl wrapModel(BindingResourceInner inner) { + return new BindingResourceImpl(inner, manager()); + } + + private BindingResourceImpl wrapModel(String name) { + return new BindingResourceImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String serviceName, final String appName) { + BindingsInner client = this.inner(); + return client.listAsync(resourceGroupName, serviceName, appName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public BindingResource call(BindingResourceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String serviceName, String appName, String bindingName) { + BindingsInner client = this.inner(); + return client.getAsync(resourceGroupName, serviceName, appName, bindingName) + .flatMap(new Func1>() { + @Override + public Observable call(BindingResourceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((BindingResource)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String serviceName, String appName, String bindingName) { + BindingsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, serviceName, appName, bindingName).toCompletable(); + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingsInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingsInner.java new file mode 100644 index 000000000000..eb4453ff46de --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingsInner.java @@ -0,0 +1,925 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview.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.appplatform.v2019_05_01_preview.BindingResourceProperties; +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 Bindings. + */ +public class BindingsInner { + /** The Retrofit service to perform REST calls. */ + private BindingsService service; + /** The service client containing this operation class. */ + private AppPlatformManagementClientImpl client; + + /** + * Initializes an instance of BindingsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public BindingsInner(Retrofit retrofit, AppPlatformManagementClientImpl client) { + this.service = retrofit.create(BindingsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Bindings to be + * used by Retrofit to perform actually REST calls. + */ + interface BindingsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Bindings get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("bindingName") String bindingName, @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.appplatform.v2019_05_01_preview.Bindings createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("bindingName") String bindingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BindingResourceInner bindingResource, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Bindings delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("bindingName") String bindingName, @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.appplatform.v2019_05_01_preview.Bindings update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("bindingName") String bindingName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BindingResourceInner bindingResource, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Bindings list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @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.appplatform.v2019_05_01_preview.Bindings listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get a Binding and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 BindingResourceInner object if successful. + */ + public BindingResourceInner get(String resourceGroupName, String serviceName, String appName, String bindingName) { + return getWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName).toBlocking().single().body(); + } + + /** + * Get a Binding and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @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 serviceName, String appName, String bindingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName), serviceCallback); + } + + /** + * Get a Binding and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BindingResourceInner object + */ + public Observable getAsync(String resourceGroupName, String serviceName, String appName, String bindingName) { + return getWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName).map(new Func1, BindingResourceInner>() { + @Override + public BindingResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a Binding and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BindingResourceInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String bindingName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (bindingName == null) { + throw new IllegalArgumentException("Parameter bindingName is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, serviceName, appName, bindingName, 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); + } + + /** + * Create a new Binding or update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 BindingResourceInner object if successful. + */ + public BindingResourceInner createOrUpdate(String resourceGroupName, String serviceName, String appName, String bindingName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName).toBlocking().single().body(); + } + + /** + * Create a new Binding or update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @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 serviceName, String appName, String bindingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName), serviceCallback); + } + + /** + * Create a new Binding or update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BindingResourceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String appName, String bindingName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName).map(new Func1, BindingResourceInner>() { + @Override + public BindingResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new Binding or update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BindingResourceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String bindingName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (bindingName == null) { + throw new IllegalArgumentException("Parameter bindingName is required and cannot be null."); + } + final BindingResourceProperties properties = null; + BindingResourceInner bindingResource = new BindingResourceInner(); + bindingResource.withProperties(null); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, bindingName, this.client.apiVersion(), this.client.acceptLanguage(), bindingResource, 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); + } + } + }); + } + + /** + * Create a new Binding or update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @param properties Properties of the Binding resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 BindingResourceInner object if successful. + */ + public BindingResourceInner createOrUpdate(String resourceGroupName, String serviceName, String appName, String bindingName, BindingResourceProperties properties) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName, properties).toBlocking().single().body(); + } + + /** + * Create a new Binding or update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @param properties Properties of the Binding resource + * @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 serviceName, String appName, String bindingName, BindingResourceProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName, properties), serviceCallback); + } + + /** + * Create a new Binding or update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @param properties Properties of the Binding resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BindingResourceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String appName, String bindingName, BindingResourceProperties properties) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName, properties).map(new Func1, BindingResourceInner>() { + @Override + public BindingResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new Binding or update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @param properties Properties of the Binding resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BindingResourceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String bindingName, BindingResourceProperties properties) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (bindingName == null) { + throw new IllegalArgumentException("Parameter bindingName is required and cannot be null."); + } + Validator.validate(properties); + BindingResourceInner bindingResource = null; + if (properties != null) { + bindingResource = new BindingResourceInner(); + bindingResource.withProperties(properties); + } + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, bindingName, this.client.apiVersion(), this.client.acceptLanguage(), bindingResource, 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); + } + + /** + * Operation to delete a Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 serviceName, String appName, String bindingName) { + deleteWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName).toBlocking().single().body(); + } + + /** + * Operation to delete a Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @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 serviceName, String appName, String bindingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName), serviceCallback); + } + + /** + * Operation to delete a Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String serviceName, String appName, String bindingName) { + return deleteWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to delete a Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String bindingName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (bindingName == null) { + throw new IllegalArgumentException("Parameter bindingName is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, serviceName, appName, bindingName, 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); + } + + /** + * Operation to update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 BindingResourceInner object if successful. + */ + public BindingResourceInner update(String resourceGroupName, String serviceName, String appName, String bindingName) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName).toBlocking().single().body(); + } + + /** + * Operation to update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @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 serviceName, String appName, String bindingName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName), serviceCallback); + } + + /** + * Operation to update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BindingResourceInner object + */ + public Observable updateAsync(String resourceGroupName, String serviceName, String appName, String bindingName) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName).map(new Func1, BindingResourceInner>() { + @Override + public BindingResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BindingResourceInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String bindingName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (bindingName == null) { + throw new IllegalArgumentException("Parameter bindingName is required and cannot be null."); + } + final BindingResourceProperties properties = null; + BindingResourceInner bindingResource = new BindingResourceInner(); + bindingResource.withProperties(null); + return service.update(this.client.subscriptionId(), resourceGroupName, serviceName, appName, bindingName, this.client.apiVersion(), this.client.acceptLanguage(), bindingResource, 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); + } + } + }); + } + + /** + * Operation to update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @param properties Properties of the Binding resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 BindingResourceInner object if successful. + */ + public BindingResourceInner update(String resourceGroupName, String serviceName, String appName, String bindingName, BindingResourceProperties properties) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName, properties).toBlocking().single().body(); + } + + /** + * Operation to update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @param properties Properties of the Binding resource + * @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 serviceName, String appName, String bindingName, BindingResourceProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName, properties), serviceCallback); + } + + /** + * Operation to update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @param properties Properties of the Binding resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BindingResourceInner object + */ + public Observable updateAsync(String resourceGroupName, String serviceName, String appName, String bindingName, BindingResourceProperties properties) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, bindingName, properties).map(new Func1, BindingResourceInner>() { + @Override + public BindingResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting Binding. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param bindingName The name of the Binding resource. + * @param properties Properties of the Binding resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BindingResourceInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String bindingName, BindingResourceProperties properties) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (bindingName == null) { + throw new IllegalArgumentException("Parameter bindingName is required and cannot be null."); + } + Validator.validate(properties); + BindingResourceInner bindingResource = null; + if (properties != null) { + bindingResource = new BindingResourceInner(); + bindingResource.withProperties(properties); + } + return service.update(this.client.subscriptionId(), resourceGroupName, serviceName, appName, bindingName, this.client.apiVersion(), this.client.acceptLanguage(), bindingResource, 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); + } + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<BindingResourceInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String serviceName, final String appName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, appName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @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 resourceGroupName, final String serviceName, final String appName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, serviceName, appName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BindingResourceInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String serviceName, final String appName) { + return listWithServiceResponseAsync(resourceGroupName, serviceName, appName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BindingResourceInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String appName) { + return listSinglePageAsync(resourceGroupName, serviceName, appName) + .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)); + } + }); + } + + /** + * Handles requests to list all resources in an App. + * + ServiceResponse> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + ServiceResponse> * @param serviceName The name of the Service resource. + ServiceResponse> * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BindingResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String appName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), resourceGroupName, serviceName, appName, 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); + } + + /** + * Handles requests to list all resources in an App. + * + * @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<BindingResourceInner> 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(); + } + }; + } + + /** + * Handles requests to list all resources in an App. + * + * @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); + } + + /** + * Handles requests to list all resources in an App. + * + * @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<BindingResourceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in an App. + * + * @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<BindingResourceInner> 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)); + } + }); + } + + /** + * Handles requests to list all resources in an App. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BindingResourceInner> 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/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentResourceImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentResourceImpl.java new file mode 100644 index 000000000000..4f8678cd3520 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentResourceImpl.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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.DeploymentResource; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.DeploymentResourceProperties; +import org.joda.time.DateTime; +import java.util.List; +import rx.functions.Func1; + +class DeploymentResourceImpl extends CreatableUpdatableImpl implements DeploymentResource, DeploymentResource.Definition, DeploymentResource.Update { + private final AppPlatformManager manager; + private String resourceGroupName; + private String serviceName; + private String appName; + private String deploymentName; + private DeploymentResourceProperties cproperties; + private DeploymentResourceProperties uproperties; + + DeploymentResourceImpl(String name, AppPlatformManager manager) { + super(name, new DeploymentResourceInner()); + this.manager = manager; + // Set resource name + this.deploymentName = name; + // + this.cproperties = new DeploymentResourceProperties(); + this.uproperties = new DeploymentResourceProperties(); + } + + DeploymentResourceImpl(DeploymentResourceInner inner, AppPlatformManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.deploymentName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.serviceName = IdParsingUtils.getValueFromIdByName(inner.id(), "Spring"); + this.appName = IdParsingUtils.getValueFromIdByName(inner.id(), "apps"); + this.deploymentName = IdParsingUtils.getValueFromIdByName(inner.id(), "deployments"); + // + this.cproperties = new DeploymentResourceProperties(); + this.uproperties = new DeploymentResourceProperties(); + } + + @Override + public AppPlatformManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + DeploymentsInner client = this.manager().inner().deployments(); + return client.createOrUpdateAsync(this.resourceGroupName, this.serviceName, this.appName, this.deploymentName, this.cproperties) + .map(new Func1() { + @Override + public DeploymentResourceInner call(DeploymentResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DeploymentsInner client = this.manager().inner().deployments(); + return client.updateAsync(this.resourceGroupName, this.serviceName, this.appName, this.deploymentName, this.uproperties) + .map(new Func1() { + @Override + public DeploymentResourceInner call(DeploymentResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DeploymentsInner client = this.manager().inner().deployments(); + return client.getAsync(this.resourceGroupName, this.serviceName, this.appName, this.deploymentName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.cproperties = new DeploymentResourceProperties(); + this.uproperties = new DeploymentResourceProperties(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public DeploymentResourceProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DeploymentResourceImpl withExistingApp(String resourceGroupName, String serviceName, String appName) { + this.resourceGroupName = resourceGroupName; + this.serviceName = serviceName; + this.appName = appName; + return this; + } + + @Override + public DeploymentResourceImpl withProperties(DeploymentResourceProperties properties) { + if (isInCreateMode()) { + this.cproperties = properties; + } else { + this.uproperties = properties; + } + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentResourceInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentResourceInner.java new file mode 100644 index 000000000000..0fde853cc011 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentResourceInner.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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.DeploymentResourceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Deployment resource payload. + */ +public class DeploymentResourceInner extends ProxyResource { + /** + * Properties of the Deployment resource. + */ + @JsonProperty(value = "properties") + private DeploymentResourceProperties properties; + + /** + * Get properties of the Deployment resource. + * + * @return the properties value + */ + public DeploymentResourceProperties properties() { + return this.properties; + } + + /** + * Set properties of the Deployment resource. + * + * @param properties the properties value to set + * @return the DeploymentResourceInner object itself. + */ + public DeploymentResourceInner withProperties(DeploymentResourceProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentsImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentsImpl.java new file mode 100644 index 000000000000..d6eafdc247dc --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentsImpl.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.Deployments; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.DeploymentResource; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.LogFileUrlResponse; + +class DeploymentsImpl extends WrapperImpl implements Deployments { + private final AppPlatformManager manager; + + DeploymentsImpl(AppPlatformManager manager) { + super(manager.inner().deployments()); + this.manager = manager; + } + + public AppPlatformManager manager() { + return this.manager; + } + + @Override + public DeploymentResourceImpl define(String name) { + return wrapModel(name); + } + + private DeploymentResourceImpl wrapModel(DeploymentResourceInner inner) { + return new DeploymentResourceImpl(inner, manager()); + } + + private DeploymentResourceImpl wrapModel(String name) { + return new DeploymentResourceImpl(name, this.manager()); + } + + @Override + public Observable listClusterAllDeploymentsAsync(final String resourceGroupName, final String serviceName) { + DeploymentsInner client = this.inner(); + return client.listClusterAllDeploymentsAsync(resourceGroupName, serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DeploymentResource call(DeploymentResourceInner inner) { + return new DeploymentResourceImpl(inner, manager()); + } + }); + } + + @Override + public Completable startAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + DeploymentsInner client = this.inner(); + return client.startAsync(resourceGroupName, serviceName, appName, deploymentName).toCompletable(); + } + + @Override + public Completable stopAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + DeploymentsInner client = this.inner(); + return client.stopAsync(resourceGroupName, serviceName, appName, deploymentName).toCompletable(); + } + + @Override + public Completable restartAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + DeploymentsInner client = this.inner(); + return client.restartAsync(resourceGroupName, serviceName, appName, deploymentName).toCompletable(); + } + + @Override + public Observable getLogFileUrlAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + DeploymentsInner client = this.inner(); + return client.getLogFileUrlAsync(resourceGroupName, serviceName, appName, deploymentName) + .map(new Func1() { + @Override + public LogFileUrlResponse call(LogFileUrlResponseInner inner) { + return new LogFileUrlResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String serviceName, final String appName) { + DeploymentsInner client = this.inner(); + return client.listAsync(resourceGroupName, serviceName, appName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DeploymentResource call(DeploymentResourceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + DeploymentsInner client = this.inner(); + return client.getAsync(resourceGroupName, serviceName, appName, deploymentName) + .flatMap(new Func1>() { + @Override + public Observable call(DeploymentResourceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DeploymentResource)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + DeploymentsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, serviceName, appName, deploymentName).toCompletable(); + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentsInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentsInner.java new file mode 100644 index 000000000000..cc60083c5c06 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentsInner.java @@ -0,0 +1,2430 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview.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.appplatform.v2019_05_01_preview.DeploymentResourceProperties; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.CollectionFormat; +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; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in Deployments. + */ +public class DeploymentsInner { + /** The Retrofit service to perform REST calls. */ + private DeploymentsService service; + /** The service client containing this operation class. */ + private AppPlatformManagementClientImpl client; + + /** + * Initializes an instance of DeploymentsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DeploymentsInner(Retrofit retrofit, AppPlatformManagementClientImpl client) { + this.service = retrofit.create(DeploymentsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Deployments to be + * used by Retrofit to perform actually REST calls. + */ + interface DeploymentsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Deployments get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("deploymentName") String deploymentName, @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.appplatform.v2019_05_01_preview.Deployments createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("deploymentName") String deploymentName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DeploymentResourceInner deploymentResource, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Deployments beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("deploymentName") String deploymentName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DeploymentResourceInner deploymentResource, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Deployments delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("deploymentName") String deploymentName, @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.appplatform.v2019_05_01_preview.Deployments update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("deploymentName") String deploymentName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DeploymentResourceInner deploymentResource, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Deployments beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}") + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("deploymentName") String deploymentName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DeploymentResourceInner deploymentResource, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Deployments list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Query("version") String version, @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.appplatform.v2019_05_01_preview.Deployments listClusterAllDeployments" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/deployments") + Observable> listClusterAllDeployments(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Query("version") String version, @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.appplatform.v2019_05_01_preview.Deployments start" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start") + Observable> start(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("deploymentName") String deploymentName, @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.appplatform.v2019_05_01_preview.Deployments beginStart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start") + Observable> beginStart(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("deploymentName") String deploymentName, @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.appplatform.v2019_05_01_preview.Deployments stop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/stop") + Observable> stop(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("deploymentName") String deploymentName, @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.appplatform.v2019_05_01_preview.Deployments beginStop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/stop") + Observable> beginStop(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("deploymentName") String deploymentName, @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.appplatform.v2019_05_01_preview.Deployments restart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/restart") + Observable> restart(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("deploymentName") String deploymentName, @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.appplatform.v2019_05_01_preview.Deployments beginRestart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/restart") + Observable> beginRestart(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("deploymentName") String deploymentName, @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.appplatform.v2019_05_01_preview.Deployments getLogFileUrl" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/getLogFileUrl") + Observable> getLogFileUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Path("deploymentName") String deploymentName, @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.appplatform.v2019_05_01_preview.Deployments 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.appplatform.v2019_05_01_preview.Deployments listClusterAllDeploymentsNext" }) + @GET + Observable> listClusterAllDeploymentsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get a Deployment and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DeploymentResourceInner object if successful. + */ + public DeploymentResourceInner get(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return getWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).toBlocking().single().body(); + } + + /** + * Get a Deployment and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @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 serviceName, String appName, String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName), serviceCallback); + } + + /** + * Get a Deployment and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentResourceInner object + */ + public Observable getAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return getWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).map(new Func1, DeploymentResourceInner>() { + @Override + public DeploymentResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a Deployment and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentResourceInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, 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); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DeploymentResourceInner object if successful. + */ + public DeploymentResourceInner createOrUpdate(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).toBlocking().last().body(); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @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 serviceName, String appName, String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName), serviceCallback); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).map(new Func1, DeploymentResourceInner>() { + @Override + public DeploymentResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + final DeploymentResourceProperties properties = null; + DeploymentResourceInner deploymentResource = new DeploymentResourceInner(); + deploymentResource.withProperties(null); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), deploymentResource, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DeploymentResourceInner object if successful. + */ + public DeploymentResourceInner createOrUpdate(String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceProperties properties) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName, properties).toBlocking().last().body(); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @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 serviceName, String appName, String deploymentName, DeploymentResourceProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName, properties), serviceCallback); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceProperties properties) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName, properties).map(new Func1, DeploymentResourceInner>() { + @Override + public DeploymentResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceProperties properties) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + Validator.validate(properties); + DeploymentResourceInner deploymentResource = null; + if (properties != null) { + deploymentResource = new DeploymentResourceInner(); + deploymentResource.withProperties(properties); + } + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), deploymentResource, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DeploymentResourceInner object if successful. + */ + public DeploymentResourceInner beginCreateOrUpdate(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).toBlocking().single().body(); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName), serviceCallback); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentResourceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).map(new Func1, DeploymentResourceInner>() { + @Override + public DeploymentResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentResourceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + final DeploymentResourceProperties properties = null; + DeploymentResourceInner deploymentResource = new DeploymentResourceInner(); + deploymentResource.withProperties(null); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), deploymentResource, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DeploymentResourceInner object if successful. + */ + public DeploymentResourceInner beginCreateOrUpdate(String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceProperties properties) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName, properties).toBlocking().single().body(); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName, properties), serviceCallback); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentResourceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceProperties properties) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName, properties).map(new Func1, DeploymentResourceInner>() { + @Override + public DeploymentResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new Deployment or update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentResourceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceProperties properties) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + Validator.validate(properties); + DeploymentResourceInner deploymentResource = null; + if (properties != null) { + deploymentResource = new DeploymentResourceInner(); + deploymentResource.withProperties(properties); + } + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), deploymentResource, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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); + } + + /** + * Operation to delete a Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 serviceName, String appName, String deploymentName) { + deleteWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).toBlocking().single().body(); + } + + /** + * Operation to delete a Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @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 serviceName, String appName, String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName), serviceCallback); + } + + /** + * Operation to delete a Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return deleteWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to delete a Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, 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); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DeploymentResourceInner object if successful. + */ + public DeploymentResourceInner update(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).toBlocking().last().body(); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @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 serviceName, String appName, String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName), serviceCallback); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).map(new Func1, DeploymentResourceInner>() { + @Override + public DeploymentResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + final DeploymentResourceProperties properties = null; + DeploymentResourceInner deploymentResource = new DeploymentResourceInner(); + deploymentResource.withProperties(null); + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), deploymentResource, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DeploymentResourceInner object if successful. + */ + public DeploymentResourceInner update(String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceProperties properties) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName, properties).toBlocking().last().body(); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @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 serviceName, String appName, String deploymentName, DeploymentResourceProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName, properties), serviceCallback); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceProperties properties) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName, properties).map(new Func1, DeploymentResourceInner>() { + @Override + public DeploymentResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceProperties properties) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + Validator.validate(properties); + DeploymentResourceInner deploymentResource = null; + if (properties != null) { + deploymentResource = new DeploymentResourceInner(); + deploymentResource.withProperties(properties); + } + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), deploymentResource, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DeploymentResourceInner object if successful. + */ + public DeploymentResourceInner beginUpdate(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).toBlocking().single().body(); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @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 serviceName, String appName, String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName), serviceCallback); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentResourceInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).map(new Func1, DeploymentResourceInner>() { + @Override + public DeploymentResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentResourceInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + final DeploymentResourceProperties properties = null; + DeploymentResourceInner deploymentResource = new DeploymentResourceInner(); + deploymentResource.withProperties(null); + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), deploymentResource, 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); + } + } + }); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DeploymentResourceInner object if successful. + */ + public DeploymentResourceInner beginUpdate(String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceProperties properties) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName, properties).toBlocking().single().body(); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @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 serviceName, String appName, String deploymentName, DeploymentResourceProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName, properties), serviceCallback); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentResourceInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceProperties properties) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName, properties).map(new Func1, DeploymentResourceInner>() { + @Override + public DeploymentResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting Deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param properties Properties of the Deployment resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentResourceInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceProperties properties) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + Validator.validate(properties); + DeploymentResourceInner deploymentResource = null; + if (properties != null) { + deploymentResource = new DeploymentResourceInner(); + deploymentResource.withProperties(properties); + } + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), deploymentResource, 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(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<DeploymentResourceInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String serviceName, final String appName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, appName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @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 resourceGroupName, final String serviceName, final String appName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, serviceName, appName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentResourceInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String serviceName, final String appName) { + return listWithServiceResponseAsync(resourceGroupName, serviceName, appName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentResourceInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String appName) { + return listSinglePageAsync(resourceGroupName, serviceName, appName) + .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)); + } + }); + } + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeploymentResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String appName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + final List version = null; + String versionConverted = this.client.serializerAdapter().serializeList(version, CollectionFormat.MULTI); + return service.list(this.client.subscriptionId(), resourceGroupName, serviceName, appName, versionConverted, 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); + } + } + }); + } + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param version Version of the deployments to be listed + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<DeploymentResourceInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String serviceName, final String appName, final List version) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, appName, version).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param version Version of the deployments to be listed + * @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 resourceGroupName, final String serviceName, final String appName, final List version, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, serviceName, appName, version), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param version Version of the deployments to be listed + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentResourceInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String serviceName, final String appName, final List version) { + return listWithServiceResponseAsync(resourceGroupName, serviceName, appName, version) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in an App. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param version Version of the deployments to be listed + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentResourceInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String appName, final List version) { + return listSinglePageAsync(resourceGroupName, serviceName, appName, version) + .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)); + } + }); + } + + /** + * Handles requests to list all resources in an App. + * + ServiceResponse> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + ServiceResponse> * @param serviceName The name of the Service resource. + ServiceResponse> * @param appName The name of the App resource. + ServiceResponse> * @param version Version of the deployments to be listed + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeploymentResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String appName, final List version) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + Validator.validate(version); + String versionConverted = this.client.serializerAdapter().serializeList(version, CollectionFormat.MULTI); + return service.list(this.client.subscriptionId(), resourceGroupName, serviceName, appName, versionConverted, 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); + } + + /** + * List deployments for a certain service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<DeploymentResourceInner> object if successful. + */ + public PagedList listClusterAllDeployments(final String resourceGroupName, final String serviceName) { + ServiceResponse> response = listClusterAllDeploymentsSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listClusterAllDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List deployments for a certain service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @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> listClusterAllDeploymentsAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listClusterAllDeploymentsSinglePageAsync(resourceGroupName, serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listClusterAllDeploymentsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List deployments for a certain service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentResourceInner> object + */ + public Observable> listClusterAllDeploymentsAsync(final String resourceGroupName, final String serviceName) { + return listClusterAllDeploymentsWithServiceResponseAsync(resourceGroupName, serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List deployments for a certain service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentResourceInner> object + */ + public Observable>> listClusterAllDeploymentsWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { + return listClusterAllDeploymentsSinglePageAsync(resourceGroupName, serviceName) + .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(listClusterAllDeploymentsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List deployments for a certain service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeploymentResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listClusterAllDeploymentsSinglePageAsync(final String resourceGroupName, final String serviceName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + final List version = null; + String versionConverted = this.client.serializerAdapter().serializeList(version, CollectionFormat.MULTI); + return service.listClusterAllDeployments(this.client.subscriptionId(), resourceGroupName, serviceName, versionConverted, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listClusterAllDeploymentsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List deployments for a certain service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param version Version of the deployments to be listed + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<DeploymentResourceInner> object if successful. + */ + public PagedList listClusterAllDeployments(final String resourceGroupName, final String serviceName, final List version) { + ServiceResponse> response = listClusterAllDeploymentsSinglePageAsync(resourceGroupName, serviceName, version).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listClusterAllDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List deployments for a certain service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param version Version of the deployments to be listed + * @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> listClusterAllDeploymentsAsync(final String resourceGroupName, final String serviceName, final List version, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listClusterAllDeploymentsSinglePageAsync(resourceGroupName, serviceName, version), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listClusterAllDeploymentsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List deployments for a certain service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param version Version of the deployments to be listed + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentResourceInner> object + */ + public Observable> listClusterAllDeploymentsAsync(final String resourceGroupName, final String serviceName, final List version) { + return listClusterAllDeploymentsWithServiceResponseAsync(resourceGroupName, serviceName, version) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List deployments for a certain service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param version Version of the deployments to be listed + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentResourceInner> object + */ + public Observable>> listClusterAllDeploymentsWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final List version) { + return listClusterAllDeploymentsSinglePageAsync(resourceGroupName, serviceName, version) + .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(listClusterAllDeploymentsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List deployments for a certain service. + * + ServiceResponse> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + ServiceResponse> * @param serviceName The name of the Service resource. + ServiceResponse> * @param version Version of the deployments to be listed + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeploymentResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listClusterAllDeploymentsSinglePageAsync(final String resourceGroupName, final String serviceName, final List version) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + Validator.validate(version); + String versionConverted = this.client.serializerAdapter().serializeList(version, CollectionFormat.MULTI); + return service.listClusterAllDeployments(this.client.subscriptionId(), resourceGroupName, serviceName, versionConverted, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listClusterAllDeploymentsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listClusterAllDeploymentsDelegate(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); + } + + /** + * Start the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 start(String resourceGroupName, String serviceName, String appName, String deploymentName) { + startWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).toBlocking().last().body(); + } + + /** + * Start the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @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 startAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName), serviceCallback); + } + + /** + * Start the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable startAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return startWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> startWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + Observable> observable = service.start(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.AZURE_ASYNC_OPERATION), new TypeToken() { }.getType()); + } + + /** + * Start the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginStart(String resourceGroupName, String serviceName, String appName, String deploymentName) { + beginStartWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).toBlocking().single().body(); + } + + /** + * Start the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @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 beginStartAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName), serviceCallback); + } + + /** + * Start the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStartAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return beginStartWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + return service.beginStart(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStartDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Stop the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 stop(String resourceGroupName, String serviceName, String appName, String deploymentName) { + stopWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).toBlocking().last().body(); + } + + /** + * Stop the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @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 stopAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName), serviceCallback); + } + + /** + * Stop the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable stopAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return stopWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> stopWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + Observable> observable = service.stop(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.AZURE_ASYNC_OPERATION), new TypeToken() { }.getType()); + } + + /** + * Stop the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginStop(String resourceGroupName, String serviceName, String appName, String deploymentName) { + beginStopWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).toBlocking().single().body(); + } + + /** + * Stop the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @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 beginStopAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName), serviceCallback); + } + + /** + * Stop the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStopAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return beginStopWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStopWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + return service.beginStop(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStopDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Restart the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 restart(String resourceGroupName, String serviceName, String appName, String deploymentName) { + restartWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).toBlocking().last().body(); + } + + /** + * Restart the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @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 restartAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName), serviceCallback); + } + + /** + * Restart the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable restartAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return restartWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restart the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + Observable> observable = service.restart(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.AZURE_ASYNC_OPERATION), new TypeToken() { }.getType()); + } + + /** + * Restart the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginRestart(String resourceGroupName, String serviceName, String appName, String deploymentName) { + beginRestartWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).toBlocking().single().body(); + } + + /** + * Restart the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @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 beginRestartAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName), serviceCallback); + } + + /** + * Restart the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRestartAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return beginRestartWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restart the deployment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + return service.beginRestart(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRestartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestartDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get deployment log file URL. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 LogFileUrlResponseInner object if successful. + */ + public LogFileUrlResponseInner getLogFileUrl(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return getLogFileUrlWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).toBlocking().single().body(); + } + + /** + * Get deployment log file URL. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @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 getLogFileUrlAsync(String resourceGroupName, String serviceName, String appName, String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getLogFileUrlWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName), serviceCallback); + } + + /** + * Get deployment log file URL. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LogFileUrlResponseInner object + */ + public Observable getLogFileUrlAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + return getLogFileUrlWithServiceResponseAsync(resourceGroupName, serviceName, appName, deploymentName).map(new Func1, LogFileUrlResponseInner>() { + @Override + public LogFileUrlResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get deployment log file URL. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LogFileUrlResponseInner object + */ + public Observable> getLogFileUrlWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, String deploymentName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (appName == null) { + throw new IllegalArgumentException("Parameter appName is required and cannot be null."); + } + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + return service.getLogFileUrl(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getLogFileUrlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getLogFileUrlDelegate(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); + } + + /** + * Handles requests to list all resources in an App. + * + * @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<DeploymentResourceInner> 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(); + } + }; + } + + /** + * Handles requests to list all resources in an App. + * + * @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); + } + + /** + * Handles requests to list all resources in an App. + * + * @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<DeploymentResourceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in an App. + * + * @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<DeploymentResourceInner> 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)); + } + }); + } + + /** + * Handles requests to list all resources in an App. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeploymentResourceInner> 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); + } + + /** + * List deployments for a certain service. + * + * @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<DeploymentResourceInner> object if successful. + */ + public PagedList listClusterAllDeploymentsNext(final String nextPageLink) { + ServiceResponse> response = listClusterAllDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listClusterAllDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List deployments for a certain service. + * + * @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> listClusterAllDeploymentsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listClusterAllDeploymentsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listClusterAllDeploymentsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List deployments for a certain service. + * + * @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<DeploymentResourceInner> object + */ + public Observable> listClusterAllDeploymentsNextAsync(final String nextPageLink) { + return listClusterAllDeploymentsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List deployments for a certain service. + * + * @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<DeploymentResourceInner> object + */ + public Observable>> listClusterAllDeploymentsNextWithServiceResponseAsync(final String nextPageLink) { + return listClusterAllDeploymentsNextSinglePageAsync(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(listClusterAllDeploymentsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List deployments for a certain service. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeploymentResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listClusterAllDeploymentsNextSinglePageAsync(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.listClusterAllDeploymentsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listClusterAllDeploymentsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listClusterAllDeploymentsNextDelegate(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/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/IdParsingUtils.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/IdParsingUtils.java new file mode 100644 index 000000000000..abdef5e93d22 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_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.appplatform.v2019_05_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/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/LogFileUrlResponseImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/LogFileUrlResponseImpl.java new file mode 100644 index 000000000000..3ea213e445ef --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/LogFileUrlResponseImpl.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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.LogFileUrlResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class LogFileUrlResponseImpl extends WrapperImpl implements LogFileUrlResponse { + private final AppPlatformManager manager; + LogFileUrlResponseImpl(LogFileUrlResponseInner inner, AppPlatformManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public AppPlatformManager manager() { + return this.manager; + } + + @Override + public String url() { + return this.inner().url(); + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/LogFileUrlResponseInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/LogFileUrlResponseInner.java new file mode 100644 index 000000000000..8c1691b8074c --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/LogFileUrlResponseInner.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.appplatform.v2019_05_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Log file URL payload. + */ +public class LogFileUrlResponseInner { + /** + * URL of the log file. + */ + @JsonProperty(value = "url", required = true) + private String url; + + /** + * Get uRL of the log file. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set uRL of the log file. + * + * @param url the url value to set + * @return the LogFileUrlResponseInner object itself. + */ + public LogFileUrlResponseInner withUrl(String url) { + this.url = url; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/NameAvailabilityImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/NameAvailabilityImpl.java new file mode 100644 index 000000000000..9117de5f01d6 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/NameAvailabilityImpl.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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.NameAvailability; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class NameAvailabilityImpl extends WrapperImpl implements NameAvailability { + private final AppPlatformManager manager; + NameAvailabilityImpl(NameAvailabilityInner inner, AppPlatformManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public AppPlatformManager 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/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/NameAvailabilityInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/NameAvailabilityInner.java new file mode 100644 index 000000000000..89e0dd57e4c8 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/NameAvailabilityInner.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.appplatform.v2019_05_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Name availability result payload. + */ +public class NameAvailabilityInner { + /** + * Indicates whether the name is available. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /** + * Reason why the name is not available. + */ + @JsonProperty(value = "reason") + private String reason; + + /** + * Message why the name is not available. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get indicates whether the name is available. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set indicates whether the name is available. + * + * @param nameAvailable the nameAvailable value to set + * @return the NameAvailabilityInner object itself. + */ + public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get reason why the name is not available. + * + * @return the reason value + */ + public String reason() { + return this.reason; + } + + /** + * Set reason why the name is not available. + * + * @param reason the reason value to set + * @return the NameAvailabilityInner object itself. + */ + public NameAvailabilityInner withReason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get message why the name is not available. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set message why the name is not available. + * + * @param message the message value to set + * @return the NameAvailabilityInner object itself. + */ + public NameAvailabilityInner withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationDetailImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationDetailImpl.java new file mode 100644 index 000000000000..3990250985bb --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationDetailImpl.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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.OperationDetail; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.OperationDisplay; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.OperationProperties; + +class OperationDetailImpl extends WrapperImpl implements OperationDetail { + private final AppPlatformManager manager; + OperationDetailImpl(OperationDetailInner inner, AppPlatformManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public AppPlatformManager manager() { + return this.manager; + } + + @Override + public Boolean dataAction() { + return this.inner().dataAction(); + } + + @Override + public OperationDisplay display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String origin() { + return this.inner().origin(); + } + + @Override + public OperationProperties properties() { + return this.inner().properties(); + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationDetailInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationDetailInner.java new file mode 100644 index 000000000000..5ec2826dab08 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationDetailInner.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.OperationDisplay; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.OperationProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Operation detail payload. + */ +public class OperationDetailInner { + /** + * Name of the operation. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Indicates whether the operation is a data action. + */ + @JsonProperty(value = "dataAction") + private Boolean dataAction; + + /** + * Display of the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * Origin of the operation. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * Properties of the operation. + */ + @JsonProperty(value = "properties") + private OperationProperties properties; + + /** + * Get name of the operation. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the operation. + * + * @param name the name value to set + * @return the OperationDetailInner object itself. + */ + public OperationDetailInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get indicates whether the operation is a data action. + * + * @return the dataAction value + */ + public Boolean dataAction() { + return this.dataAction; + } + + /** + * Set indicates whether the operation is a data action. + * + * @param dataAction the dataAction value to set + * @return the OperationDetailInner object itself. + */ + public OperationDetailInner withDataAction(Boolean dataAction) { + this.dataAction = dataAction; + return this; + } + + /** + * Get display of the operation. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set display of the operation. + * + * @param display the display value to set + * @return the OperationDetailInner object itself. + */ + public OperationDetailInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get origin of the operation. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set origin of the operation. + * + * @param origin the origin value to set + * @return the OperationDetailInner object itself. + */ + public OperationDetailInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get properties of the operation. + * + * @return the properties value + */ + public OperationProperties properties() { + return this.properties; + } + + /** + * Set properties of the operation. + * + * @param properties the properties value to set + * @return the OperationDetailInner object itself. + */ + public OperationDetailInner withProperties(OperationProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationsImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationsImpl.java new file mode 100644 index 000000000000..4b84cef79149 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationsImpl.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. + * abc + */ + +package com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.OperationDetail; + +class OperationsImpl extends WrapperImpl implements Operations { + private final AppPlatformManager manager; + + OperationsImpl(AppPlatformManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public AppPlatformManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public OperationDetail call(OperationDetailInner inner) { + return new OperationDetailImpl(inner, manager()); + } + }); + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationsInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationsInner.java new file mode 100644 index 000000000000..84cf29c4c33c --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/OperationsInner.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.appplatform.v2019_05_01_preview.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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +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 Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private AppPlatformManagementClientImpl 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, AppPlatformManagementClientImpl 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.appplatform.v2019_05_01_preview.Operations list" }) + @GET("providers/Microsoft.AppPlatform/operations") + Observable> list(@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.appplatform.v2019_05_01_preview.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available REST API operations of the Microsoft.AppPlatform 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 PagedList<OperationDetailInner> 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 all of the available REST API operations of the Microsoft.AppPlatform 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> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available REST API operations of the Microsoft.AppPlatform provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationDetailInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available REST API operations of the Microsoft.AppPlatform provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationDetailInner> 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 all of the available REST API operations of the Microsoft.AppPlatform provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationDetailInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + return service.list(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 { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all of the available REST API operations of the Microsoft.AppPlatform provider. + * + * @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<OperationDetailInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available REST API operations of the Microsoft.AppPlatform provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available REST API operations of the Microsoft.AppPlatform provider. + * + * @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<OperationDetailInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available REST API operations of the Microsoft.AppPlatform provider. + * + * @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<OperationDetailInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available REST API operations of the Microsoft.AppPlatform provider. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationDetailInner> 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/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/PageImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/PageImpl.java new file mode 100644 index 000000000000..98f95c8dd068 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_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.appplatform.v2019_05_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/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ResourceUploadDefinitionImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ResourceUploadDefinitionImpl.java new file mode 100644 index 000000000000..b48501a5774d --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ResourceUploadDefinitionImpl.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.ResourceUploadDefinition; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class ResourceUploadDefinitionImpl extends WrapperImpl implements ResourceUploadDefinition { + private final AppPlatformManager manager; + ResourceUploadDefinitionImpl(ResourceUploadDefinitionInner inner, AppPlatformManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public AppPlatformManager manager() { + return this.manager; + } + + @Override + public String relativePath() { + return this.inner().relativePath(); + } + + @Override + public String uploadUrl() { + return this.inner().uploadUrl(); + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ResourceUploadDefinitionInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ResourceUploadDefinitionInner.java new file mode 100644 index 000000000000..b97a1a3b3f15 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ResourceUploadDefinitionInner.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.appplatform.v2019_05_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Resource upload definition payload. + */ +public class ResourceUploadDefinitionInner { + /** + * Source relative path. + */ + @JsonProperty(value = "relativePath") + private String relativePath; + + /** + * Upload URL. + */ + @JsonProperty(value = "uploadUrl") + private String uploadUrl; + + /** + * Get source relative path. + * + * @return the relativePath value + */ + public String relativePath() { + return this.relativePath; + } + + /** + * Set source relative path. + * + * @param relativePath the relativePath value to set + * @return the ResourceUploadDefinitionInner object itself. + */ + public ResourceUploadDefinitionInner withRelativePath(String relativePath) { + this.relativePath = relativePath; + return this; + } + + /** + * Get upload URL. + * + * @return the uploadUrl value + */ + public String uploadUrl() { + return this.uploadUrl; + } + + /** + * Set upload URL. + * + * @param uploadUrl the uploadUrl value to set + * @return the ResourceUploadDefinitionInner object itself. + */ + public ResourceUploadDefinitionInner withUploadUrl(String uploadUrl) { + this.uploadUrl = uploadUrl; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServiceResourceImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServiceResourceImpl.java new file mode 100644 index 000000000000..2d0e50cfdc44 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServiceResourceImpl.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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.ServiceResource; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.ClusterResourceProperties; +import java.util.Map; + +class ServiceResourceImpl extends WrapperImpl implements ServiceResource { + private final AppPlatformManager manager; + ServiceResourceImpl(ServiceResourceInner inner, AppPlatformManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public AppPlatformManager manager() { + return this.manager; + } + + @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 ClusterResourceProperties properties() { + return this.inner().properties(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServiceResourceInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServiceResourceInner.java new file mode 100644 index 000000000000..3a08888e6533 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServiceResourceInner.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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.ClusterResourceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Service resource. + */ +@SkipParentValidation +public class ServiceResourceInner extends Resource { + /** + * Properties of the Service resource. + */ + @JsonProperty(value = "properties") + private ClusterResourceProperties properties; + + /** + * Get properties of the Service resource. + * + * @return the properties value + */ + public ClusterResourceProperties properties() { + return this.properties; + } + + /** + * Set properties of the Service resource. + * + * @param properties the properties value to set + * @return the ServiceResourceInner object itself. + */ + public ServiceResourceInner withProperties(ClusterResourceProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesImpl.java new file mode 100644 index 000000000000..377b9a7f7fdd --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesImpl.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.Services; +import rx.Completable; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.ServiceResource; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.TestKeys; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.TestKeyType; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.NameAvailability; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.NameAvailabilityParameters; + +class ServicesImpl extends WrapperImpl implements Services { + private final AppPlatformManager manager; + + ServicesImpl(AppPlatformManager manager) { + super(manager.inner().services()); + this.manager = manager; + } + + public AppPlatformManager manager() { + return this.manager; + } + + @Override + public Observable getByResourceGroupAsync(String resourceGroupName, String serviceName) { + ServicesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, serviceName) + .map(new Func1() { + @Override + public ServiceResource call(ServiceResourceInner inner) { + return new ServiceResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateAsync(String resourceGroupName, String serviceName) { + ServicesInner client = this.inner(); + return client.createOrUpdateAsync(resourceGroupName, serviceName) + .map(new Func1() { + @Override + public ServiceResource call(ServiceResourceInner inner) { + return new ServiceResourceImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String serviceName) { + ServicesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, serviceName).toCompletable(); + } + + @Override + public Observable updateAsync(String resourceGroupName, String serviceName) { + ServicesInner client = this.inner(); + return client.updateAsync(resourceGroupName, serviceName) + .map(new Func1() { + @Override + public ServiceResource call(ServiceResourceInner inner) { + return new ServiceResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable regenerateTestKeyAsync(String resourceGroupName, String serviceName, TestKeyType keyType) { + ServicesInner client = this.inner(); + return client.regenerateTestKeyAsync(resourceGroupName, serviceName, keyType) + .map(new Func1() { + @Override + public TestKeys call(TestKeysInner inner) { + return new TestKeysImpl(inner, manager()); + } + }); + } + + @Override + public Completable disableTestEndpointAsync(String resourceGroupName, String serviceName) { + ServicesInner client = this.inner(); + return client.disableTestEndpointAsync(resourceGroupName, serviceName).toCompletable(); + } + + @Override + public Observable enableTestEndpointAsync(String resourceGroupName, String serviceName) { + ServicesInner client = this.inner(); + return client.enableTestEndpointAsync(resourceGroupName, serviceName) + .map(new Func1() { + @Override + public TestKeys call(TestKeysInner inner) { + return new TestKeysImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync() { + ServicesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceResource call(ServiceResourceInner inner) { + return new ServiceResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByResourceGroupAsync(final String resourceGroupName) { + ServicesInner 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 ServiceResource call(ServiceResourceInner inner) { + return new ServiceResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable listTestKeysAsync(String resourceGroupName, String serviceName) { + ServicesInner client = this.inner(); + return client.listTestKeysAsync(resourceGroupName, serviceName) + .map(new Func1() { + @Override + public TestKeys call(TestKeysInner inner) { + return new TestKeysImpl(inner, manager()); + } + }); + } + + @Override + public Observable checkNameAvailabilityAsync(String location, NameAvailabilityParameters availabilityParameters) { + ServicesInner client = this.inner(); + return client.checkNameAvailabilityAsync(location, availabilityParameters) + .map(new Func1() { + @Override + public NameAvailability call(NameAvailabilityInner inner) { + return new NameAvailabilityImpl(inner, manager()); + } + }); + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesInner.java new file mode 100644 index 000000000000..bb1d14453825 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesInner.java @@ -0,0 +1,1829 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_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.appplatform.v2019_05_01_preview.NameAvailabilityParameters; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.RegenerateTestKeyRequestPayload; +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.TestKeyType; +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 Services. + */ +public class ServicesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ServicesService service; + /** The service client containing this operation class. */ + private AppPlatformManagementClientImpl client; + + /** + * Initializes an instance of ServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServicesInner(Retrofit retrofit, AppPlatformManagementClientImpl client) { + this.service = retrofit.create(ServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Services to be + * used by Retrofit to perform actually REST calls. + */ + interface ServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Services getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @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.appplatform.v2019_05_01_preview.Services createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Body ServiceResourceInner resource, @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.appplatform.v2019_05_01_preview.Services beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Body ServiceResourceInner resource, @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.appplatform.v2019_05_01_preview.Services delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @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.appplatform.v2019_05_01_preview.Services beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @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.appplatform.v2019_05_01_preview.Services update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Body ServiceResourceInner resource, @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.appplatform.v2019_05_01_preview.Services beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}") + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Body ServiceResourceInner resource, @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.appplatform.v2019_05_01_preview.Services listTestKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/listTestKeys") + Observable> listTestKeys(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @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.appplatform.v2019_05_01_preview.Services regenerateTestKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/regenerateTestKey") + Observable> regenerateTestKey(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegenerateTestKeyRequestPayload regenerateTestKeyRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Services disableTestEndpoint" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/disableTestEndpoint") + Observable> disableTestEndpoint(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @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.appplatform.v2019_05_01_preview.Services enableTestEndpoint" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/enableTestEndpoint") + Observable> enableTestEndpoint(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @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.appplatform.v2019_05_01_preview.Services checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/locations/{location}/checkNameAvailability") + Observable> checkNameAvailability(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body NameAvailabilityParameters availabilityParameters, @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.appplatform.v2019_05_01_preview.Services list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/Spring") + Observable> list(@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.appplatform.v2019_05_01_preview.Services listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.appplatform.v2019_05_01_preview.Services 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.appplatform.v2019_05_01_preview.Services listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get a Service and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ServiceResourceInner object if successful. + */ + public ServiceResourceInner getByResourceGroup(String resourceGroupName, String serviceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); + } + + /** + * Get a Service and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); + } + + /** + * Get a Service and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String serviceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, ServiceResourceInner>() { + @Override + public ServiceResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a Service and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String serviceName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, serviceName, 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); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ServiceResourceInner object if successful. + */ + public ServiceResourceInner createOrUpdate(String resourceGroupName, String serviceName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().last().body(); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, ServiceResourceInner>() { + @Override + public ServiceResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + final ServiceResourceInner resource = null; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, resource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the create or update 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 ServiceResourceInner object if successful. + */ + public ServiceResourceInner createOrUpdate(String resourceGroupName, String serviceName, ServiceResourceInner resource) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, resource).toBlocking().last().body(); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the create or update 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 createOrUpdateAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, resource), serviceCallback); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the create or update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, resource).map(new Func1, ServiceResourceInner>() { + @Override + public ServiceResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the create or update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + Validator.validate(resource); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, resource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ServiceResourceInner object if successful. + */ + public ServiceResourceInner beginCreateOrUpdate(String resourceGroupName, String serviceName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String serviceName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, ServiceResourceInner>() { + @Override + public ServiceResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + final ServiceResourceInner resource = null; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, resource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the create or update 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 ServiceResourceInner object if successful. + */ + public ServiceResourceInner beginCreateOrUpdate(String resourceGroupName, String serviceName, ServiceResourceInner resource) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, resource).toBlocking().single().body(); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the create or update 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 beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, resource), serviceCallback); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the create or update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, resource).map(new Func1, ServiceResourceInner>() { + @Override + public ServiceResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new Service or update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the create or update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + Validator.validate(resource); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, resource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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); + } + + /** + * Operation to delete a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 serviceName) { + deleteWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().last().body(); + } + + /** + * Operation to delete a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); + } + + /** + * Operation to delete a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String serviceName) { + return deleteWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to delete a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Operation to delete a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 serviceName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); + } + + /** + * Operation to delete a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); + } + + /** + * Operation to delete a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String serviceName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to delete a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String serviceName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, serviceName, 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(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ServiceResourceInner object if successful. + */ + public ServiceResourceInner update(String resourceGroupName, String serviceName) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().last().body(); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String serviceName) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, ServiceResourceInner>() { + @Override + public ServiceResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + final ServiceResourceInner resource = null; + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, serviceName, resource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the update 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 ServiceResourceInner object if successful. + */ + public ServiceResourceInner update(String resourceGroupName, String serviceName, ServiceResourceInner resource) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, resource).toBlocking().last().body(); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the update 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 serviceName, ServiceResourceInner resource, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, resource), serviceCallback); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource) { + return updateWithServiceResponseAsync(resourceGroupName, serviceName, resource).map(new Func1, ServiceResourceInner>() { + @Override + public ServiceResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + Validator.validate(resource); + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, serviceName, resource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ServiceResourceInner object if successful. + */ + public ServiceResourceInner beginUpdate(String resourceGroupName, String serviceName) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String serviceName) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, ServiceResourceInner>() { + @Override + public ServiceResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + final ServiceResourceInner resource = null; + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, resource, 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); + } + } + }); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the update 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 ServiceResourceInner object if successful. + */ + public ServiceResourceInner beginUpdate(String resourceGroupName, String serviceName, ServiceResourceInner resource) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, resource).toBlocking().single().body(); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the update 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 serviceName, ServiceResourceInner resource, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, resource), serviceCallback); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, resource).map(new Func1, ServiceResourceInner>() { + @Override + public ServiceResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param resource Parameters for the update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + Validator.validate(resource); + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, resource, 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(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List test keys for a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TestKeysInner object if successful. + */ + public TestKeysInner listTestKeys(String resourceGroupName, String serviceName) { + return listTestKeysWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); + } + + /** + * List test keys for a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @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 listTestKeysAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listTestKeysWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); + } + + /** + * List test keys for a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TestKeysInner object + */ + public Observable listTestKeysAsync(String resourceGroupName, String serviceName) { + return listTestKeysWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, TestKeysInner>() { + @Override + public TestKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List test keys for a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TestKeysInner object + */ + public Observable> listTestKeysWithServiceResponseAsync(String resourceGroupName, String serviceName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + return service.listTestKeys(this.client.subscriptionId(), resourceGroupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listTestKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listTestKeysDelegate(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); + } + + /** + * Regenerate a test key for a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param keyType Type of the test key. Possible values include: 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TestKeysInner object if successful. + */ + public TestKeysInner regenerateTestKey(String resourceGroupName, String serviceName, TestKeyType keyType) { + return regenerateTestKeyWithServiceResponseAsync(resourceGroupName, serviceName, keyType).toBlocking().single().body(); + } + + /** + * Regenerate a test key for a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param keyType Type of the test key. Possible values include: 'Primary', 'Secondary' + * @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 regenerateTestKeyAsync(String resourceGroupName, String serviceName, TestKeyType keyType, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regenerateTestKeyWithServiceResponseAsync(resourceGroupName, serviceName, keyType), serviceCallback); + } + + /** + * Regenerate a test key for a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param keyType Type of the test key. Possible values include: 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TestKeysInner object + */ + public Observable regenerateTestKeyAsync(String resourceGroupName, String serviceName, TestKeyType keyType) { + return regenerateTestKeyWithServiceResponseAsync(resourceGroupName, serviceName, keyType).map(new Func1, TestKeysInner>() { + @Override + public TestKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerate a test key for a Service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @param keyType Type of the test key. Possible values include: 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TestKeysInner object + */ + public Observable> regenerateTestKeyWithServiceResponseAsync(String resourceGroupName, String serviceName, TestKeyType keyType) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (keyType == null) { + throw new IllegalArgumentException("Parameter keyType is required and cannot be null."); + } + RegenerateTestKeyRequestPayload regenerateTestKeyRequest = new RegenerateTestKeyRequestPayload(); + regenerateTestKeyRequest.withKeyType(keyType); + return service.regenerateTestKey(this.client.subscriptionId(), resourceGroupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), regenerateTestKeyRequest, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = regenerateTestKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse regenerateTestKeyDelegate(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); + } + + /** + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 disableTestEndpoint(String resourceGroupName, String serviceName) { + disableTestEndpointWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); + } + + /** + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @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 disableTestEndpointAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(disableTestEndpointWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); + } + + /** + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable disableTestEndpointAsync(String resourceGroupName, String serviceName) { + return disableTestEndpointWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> disableTestEndpointWithServiceResponseAsync(String resourceGroupName, String serviceName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + return service.disableTestEndpoint(this.client.subscriptionId(), resourceGroupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = disableTestEndpointDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse disableTestEndpointDelegate(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); + } + + /** + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TestKeysInner object if successful. + */ + public TestKeysInner enableTestEndpoint(String resourceGroupName, String serviceName) { + return enableTestEndpointWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); + } + + /** + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @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 enableTestEndpointAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(enableTestEndpointWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); + } + + /** + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TestKeysInner object + */ + public Observable enableTestEndpointAsync(String resourceGroupName, String serviceName) { + return enableTestEndpointWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, TestKeysInner>() { + @Override + public TestKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param serviceName The name of the Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TestKeysInner object + */ + public Observable> enableTestEndpointWithServiceResponseAsync(String resourceGroupName, String serviceName) { + 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 (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + return service.enableTestEndpoint(this.client.subscriptionId(), resourceGroupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = enableTestEndpointDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse enableTestEndpointDelegate(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 that the resource name is valid and is not already in use. + * + * @param location the region + * @param availabilityParameters Parameters supplied to the 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 NameAvailabilityInner object if successful. + */ + public NameAvailabilityInner checkNameAvailability(String location, NameAvailabilityParameters availabilityParameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, availabilityParameters).toBlocking().single().body(); + } + + /** + * Checks that the resource name is valid and is not already in use. + * + * @param location the region + * @param availabilityParameters Parameters supplied to the 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 checkNameAvailabilityAsync(String location, NameAvailabilityParameters availabilityParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location, availabilityParameters), serviceCallback); + } + + /** + * Checks that the resource name is valid and is not already in use. + * + * @param location the region + * @param availabilityParameters Parameters supplied to the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityInner object + */ + public Observable checkNameAvailabilityAsync(String location, NameAvailabilityParameters availabilityParameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, availabilityParameters).map(new Func1, NameAvailabilityInner>() { + @Override + public NameAvailabilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks that the resource name is valid and is not already in use. + * + * @param location the region + * @param availabilityParameters Parameters supplied to the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String location, NameAvailabilityParameters availabilityParameters) { + if (location == null) { + throw new IllegalArgumentException("Parameter location 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 (availabilityParameters == null) { + throw new IllegalArgumentException("Parameter availabilityParameters is required and cannot be null."); + } + Validator.validate(availabilityParameters); + return service.checkNameAvailability(location, this.client.subscriptionId(), availabilityParameters, 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); + } + + /** + * Handles requests to list all resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ServiceResourceInner> 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(); + } + }; + } + + /** + * Handles requests to list all resources in a subscription. + * + * @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); + } + + /** + * Handles requests to list all resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceResourceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceResourceInner> 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)); + } + }); + } + + /** + * Handles requests to list all resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceResourceInner> 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."); + } + return service.list(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 = 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); + } + + /** + * Handles requests to list all resources in a resource group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ServiceResourceInner> 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(); + } + }; + } + + /** + * Handles requests to list all resources in a resource group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @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); + } + + /** + * Handles requests to list all resources in a resource group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceResourceInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in a resource group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceResourceInner> 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)); + } + }); + } + + /** + * Handles requests to list all resources in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceResourceInner> 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."); + } + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, 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); + } + + /** + * Handles requests to list all resources in a subscription. + * + * @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<ServiceResourceInner> 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(); + } + }; + } + + /** + * Handles requests to list all resources in a subscription. + * + * @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); + } + + /** + * Handles requests to list all resources in a subscription. + * + * @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<ServiceResourceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in a subscription. + * + * @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<ServiceResourceInner> 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)); + } + }); + } + + /** + * Handles requests to list all resources in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceResourceInner> 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); + } + + /** + * Handles requests to list all resources in a resource group. + * + * @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<ServiceResourceInner> 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(); + } + }; + } + + /** + * Handles requests to list all resources in a resource group. + * + * @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); + } + + /** + * Handles requests to list all resources in a resource group. + * + * @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<ServiceResourceInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in a resource group. + * + * @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<ServiceResourceInner> 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)); + } + }); + } + + /** + * Handles requests to list all resources in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceResourceInner> 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/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/TestKeysImpl.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/TestKeysImpl.java new file mode 100644 index 000000000000..aac5b7bc68ca --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/TestKeysImpl.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview.implementation; + +import com.microsoft.azure.management.appplatform.v2019_05_01_preview.TestKeys; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class TestKeysImpl extends WrapperImpl implements TestKeys { + private final AppPlatformManager manager; + TestKeysImpl(TestKeysInner inner, AppPlatformManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public AppPlatformManager manager() { + return this.manager; + } + + @Override + public Boolean enabled() { + return this.inner().enabled(); + } + + @Override + public String primaryKey() { + return this.inner().primaryKey(); + } + + @Override + public String primaryTestEndpoint() { + return this.inner().primaryTestEndpoint(); + } + + @Override + public String secondaryKey() { + return this.inner().secondaryKey(); + } + + @Override + public String secondaryTestEndpoint() { + return this.inner().secondaryTestEndpoint(); + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/TestKeysInner.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/TestKeysInner.java new file mode 100644 index 000000000000..d38836061a9f --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/TestKeysInner.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.appplatform.v2019_05_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Test keys payload. + */ +public class TestKeysInner { + /** + * Primary key. + */ + @JsonProperty(value = "primaryKey") + private String primaryKey; + + /** + * Secondary key. + */ + @JsonProperty(value = "secondaryKey") + private String secondaryKey; + + /** + * Primary test endpoint. + */ + @JsonProperty(value = "primaryTestEndpoint") + private String primaryTestEndpoint; + + /** + * Secondary test endpoint. + */ + @JsonProperty(value = "secondaryTestEndpoint") + private String secondaryTestEndpoint; + + /** + * Indicates whether the test endpoint feature enabled or not. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Get primary key. + * + * @return the primaryKey value + */ + public String primaryKey() { + return this.primaryKey; + } + + /** + * Set primary key. + * + * @param primaryKey the primaryKey value to set + * @return the TestKeysInner object itself. + */ + public TestKeysInner withPrimaryKey(String primaryKey) { + this.primaryKey = primaryKey; + return this; + } + + /** + * Get secondary key. + * + * @return the secondaryKey value + */ + public String secondaryKey() { + return this.secondaryKey; + } + + /** + * Set secondary key. + * + * @param secondaryKey the secondaryKey value to set + * @return the TestKeysInner object itself. + */ + public TestKeysInner withSecondaryKey(String secondaryKey) { + this.secondaryKey = secondaryKey; + return this; + } + + /** + * Get primary test endpoint. + * + * @return the primaryTestEndpoint value + */ + public String primaryTestEndpoint() { + return this.primaryTestEndpoint; + } + + /** + * Set primary test endpoint. + * + * @param primaryTestEndpoint the primaryTestEndpoint value to set + * @return the TestKeysInner object itself. + */ + public TestKeysInner withPrimaryTestEndpoint(String primaryTestEndpoint) { + this.primaryTestEndpoint = primaryTestEndpoint; + return this; + } + + /** + * Get secondary test endpoint. + * + * @return the secondaryTestEndpoint value + */ + public String secondaryTestEndpoint() { + return this.secondaryTestEndpoint; + } + + /** + * Set secondary test endpoint. + * + * @param secondaryTestEndpoint the secondaryTestEndpoint value to set + * @return the TestKeysInner object itself. + */ + public TestKeysInner withSecondaryTestEndpoint(String secondaryTestEndpoint) { + this.secondaryTestEndpoint = secondaryTestEndpoint; + return this; + } + + /** + * Get indicates whether the test endpoint feature enabled or not. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set indicates whether the test endpoint feature enabled or not. + * + * @param enabled the enabled value to set + * @return the TestKeysInner object itself. + */ + public TestKeysInner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + +} diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/package-info.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/package-info.java new file mode 100644 index 000000000000..9501157593b0 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_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 AppPlatformManagementClient. + * REST API for Azure Spring Cloud. + */ +package com.microsoft.azure.management.appplatform.v2019_05_01_preview.implementation; diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/package-info.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/package-info.java new file mode 100644 index 000000000000..48fbdbc45f74 --- /dev/null +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_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 AppPlatformManagementClient. + * REST API for Azure Spring Cloud. + */ +package com.microsoft.azure.management.appplatform.v2019_05_01_preview; From 46174253a3ff90e2752d86f9e22be6afd38fdd68 Mon Sep 17 00:00:00 2001 From: iscai-msft <43154838+iscai-msft@users.noreply.github.com> Date: Fri, 18 Oct 2019 00:29:59 -0700 Subject: [PATCH 08/64] adding 2019-03-01-hybrid to modules (#4270) --- pom.management.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.management.xml b/pom.management.xml index d38caa3210ad..980ef887162c 100644 --- a/pom.management.xml +++ b/pom.management.xml @@ -215,5 +215,6 @@ ./profiles/2018-03-01-hybrid + ./profiles/2019-03-01-hybrid From 530bf6e17b673583689e5c9069553b96a1c7def0 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Fri, 18 Oct 2019 10:59:40 -0700 Subject: [PATCH 09/64] Fix default cached account for SharedTokenCacheCredential (#5917) Approved by adpship. --- .../identity/SharedTokenCacheCredential.java | 75 +++++++++++-------- 1 file changed, 42 insertions(+), 33 deletions(-) diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredential.java index c0795d7526a6..b9f75ebaf735 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredential.java @@ -17,9 +17,7 @@ import java.net.MalformedURLException; import java.time.ZoneOffset; -import java.util.Collection; import java.util.HashSet; -import java.util.Iterator; import java.util.concurrent.CompletableFuture; /** @@ -70,42 +68,53 @@ public Mono getToken(TokenRequestContext request) { } } - IAccount requestedAccount = null; - // find if the Public Client app with the requested username exists - Collection accounts = pubClient.getAccounts().join(); - Iterator iter = accounts.iterator(); - - - if (username == null && iter.hasNext()) { - requestedAccount = iter.next(); - } else { - while (iter.hasNext()) { - IAccount account = iter.next(); - if (account.username().equals(username)) { - requestedAccount = account; - break; + return Mono.fromFuture(pubClient.getAccounts()) + .flatMap(set -> { + IAccount requestedAccount = null; + + if (username != null) { + for (IAccount cached : set) { + if (username.equals(cached.username())) { + requestedAccount = cached; + break; + } + } + } else { + for (IAccount cached : set) { + if (requestedAccount != null) { + if (!cached.username().equals(requestedAccount.username()) + || !cached.environment().equals(requestedAccount.environment()) + || !cached.homeAccountId().equals(requestedAccount.homeAccountId())) { + return Mono.error(new RuntimeException("Multiple accounts found in the token cache. " + + "Please specify the username of the account in the AZURE_USERNAME environment " + + "variable")); + } + } else { + requestedAccount = cached; + } + } } - } - } - if (requestedAccount == null) { - return Mono.error(new RuntimeException("Requested account was not found")); - } + if (requestedAccount == null) { + return Mono.error(new RuntimeException("Requested account was not found")); + } - // if it does, then request the token - SilentParameters params = SilentParameters.builder( - new HashSet<>(request.getScopes()), requestedAccount).build(); + // if it does, then request the token + SilentParameters params = SilentParameters.builder( + new HashSet<>(request.getScopes()), requestedAccount).build(); - CompletableFuture future; - try { - future = pubClient.acquireTokenSilently(params); - return Mono.fromFuture(() -> future).map(result -> - new AccessToken(result.accessToken(), result.expiresOnDate().toInstant().atOffset(ZoneOffset.UTC))); + CompletableFuture future; + try { + future = pubClient.acquireTokenSilently(params); + return Mono.fromFuture(() -> future).map(result -> + new AccessToken(result.accessToken(), + result.expiresOnDate().toInstant().atOffset(ZoneOffset.UTC))); - } catch (MalformedURLException e) { - e.printStackTrace(); - return Mono.error(new RuntimeException("Token was not found")); - } + } catch (MalformedURLException e) { + e.printStackTrace(); + return Mono.error(new RuntimeException("Token was not found")); + } + }); } } From 509efbe0f25cb45f40d1e5c77d73bedc5386963a Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Fri, 18 Oct 2019 16:03:47 -0700 Subject: [PATCH 10/64] Cleanup Batching Implementation (#5892) * Addressing most points on the issue * Using aggregate exception for batch operation failures * Renamed exception * Fix linting issue --- .../azure/storage/blob/batch/BlobBatch.java | 78 +- .../blob/batch/BlobBatchAsyncClient.java | 67 +- .../storage/blob/batch/BlobBatchClient.java | 24 +- .../storage/blob/batch/BlobBatchHelper.java | 168 +- .../batch/BlobBatchOperationResponse.java | 46 +- .../blob/batch/BlobBatchStorageException.java | 31 + .../azure/storage/blob/batch/APISpec.groovy | 3 - .../storage/blob/batch/BatchAPITest.groovy | 32 +- ...ingbatchrequestbeforesubmissionthrows.json | 36 +- .../BatchAPITestbulkdeleteblobs.json | 190 +- .../BatchAPITestbulksetaccesstier.json | 190 +- .../BatchAPITestdeletebloballsucceed.json | 102 +- ...teblobnonesucceeddonotthrowonanyerror.json | 74 +- ...tdeleteblobnonesucceedthrowonanyerror.json | 74 +- ...teblobsomesucceeddonotthrowonanyerror.json | 88 +- ...tdeleteblobsomesucceedthrowonanyerror.json | 88 +- .../BatchAPITestemptybatch.json | 36 +- .../BatchAPITestmixedbatch.json | 36 +- .../BatchAPITestsettierallsucceed.json | 102 +- ...ettiernonesucceeddonotthrowonanyerror.json | 74 +- ...Testsettiernonesucceedthrowonanyerror.json | 74 +- ...ettiersomesucceeddonotthrowonanyerror.json | 88 +- ...Testsettiersomesucceedthrowonanyerror.json | 88 +- .../BatchAPITesttoomanyoperationsfails.json | 5741 +++++++++++++++++ 24 files changed, 6679 insertions(+), 851 deletions(-) create mode 100644 sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchStorageException.java create mode 100644 sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITesttoomanyoperationsfails.json diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java index b695220f7eae..6363e94f5be4 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java @@ -50,7 +50,7 @@ * * {@codesnippet com.azure.storage.blob.batch.BlobBatch.illegalBatchOperation} * - *

    Please refer to the Azure Docs + *

    Please refer to the Azure Docs * for more information.

    */ public final class BlobBatch { @@ -66,6 +66,7 @@ public final class BlobBatch { private static final String HTTP_VERSION = "HTTP/1.1"; private static final String OPERATION_TEMPLATE = "%s %s %s"; private static final String HEADER_TEMPLATE = "%s: %s"; + private static final String PATH_TEMPLATE = "%s/%s"; /* * Track the status codes expected for the batching operations here as the batch body does not get parsed in @@ -89,7 +90,7 @@ public final class BlobBatch { private BlobBatchType batchType; BlobBatch(String accountUrl, HttpPipeline pipeline) { - this.contentId = new AtomicInteger(0); + this.contentId = new AtomicInteger(); this.batchBoundary = String.format(BATCH_BOUNDARY_TEMPLATE, UUID.randomUUID()); this.contentType = String.format(REQUEST_CONTENT_TYPE_TEMPLATE, batchBoundary); @@ -104,7 +105,7 @@ public final class BlobBatch { batchPipelineBuilder.policies(this::cleanseHeaders, this::setRequestUrl); } - batchPipelineBuilder.policies(pipeline.getPolicy(i)); + batchPipelineBuilder.policies(policy); } if (!batchHeadersPolicySet) { @@ -136,7 +137,7 @@ public final class BlobBatch { * @throws UnsupportedOperationException If this batch has already added an operation of another type. */ public Response deleteBlob(String containerName, String blobName) { - return deleteBlobHelper(String.format("%s/%s", containerName, blobName), null, null); + return deleteBlobHelper(String.format(PATH_TEMPLATE, containerName, blobName), null, null); } /** @@ -156,7 +157,8 @@ public Response deleteBlob(String containerName, String blobName) { */ public Response deleteBlob(String containerName, String blobName, DeleteSnapshotsOptionType deleteOptions, BlobAccessConditions blobAccessConditions) { - return deleteBlobHelper(String.format("%s/%s", containerName, blobName), deleteOptions, blobAccessConditions); + return deleteBlobHelper(String.format(PATH_TEMPLATE, containerName, blobName), + deleteOptions, blobAccessConditions); } /** @@ -166,7 +168,7 @@ public Response deleteBlob(String containerName, String blobName, * * {@codesnippet com.azure.storage.blob.batch.BlobBatch.deleteBlob#String} * - * @param blobUrl URI of the blob. + * @param blobUrl URL of the blob. * @return a {@link Response} that will be used to associate this operation to the response when the batch is * submitted. * @throws UnsupportedOperationException If this batch has already added an operation of another type. @@ -182,7 +184,7 @@ public Response deleteBlob(String blobUrl) { * * {@codesnippet com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-DeleteSnapshotsOptionType-BlobAccessConditions} * - * @param blobUrl URI of the blob. + * @param blobUrl URL of the blob. * @param deleteOptions Delete options for the blob and its snapshots. * @param blobAccessConditions Additional access conditions that must be met to allow this operation. * @return a {@link Response} that will be used to associate this operation to the response when the batch is @@ -216,7 +218,7 @@ private Response deleteBlobHelper(String urlPath, DeleteSnapshotsOptionTyp * @throws UnsupportedOperationException If this batch has already added an operation of another type. */ public Response setBlobAccessTier(String containerName, String blobName, AccessTier accessTier) { - return setBlobAccessTierHelper(String.format("%s/%s", containerName, blobName), accessTier, null); + return setBlobAccessTierHelper(String.format(PATH_TEMPLATE, containerName, blobName), accessTier, null); } /** @@ -236,7 +238,7 @@ public Response setBlobAccessTier(String containerName, String blobName, A */ public Response setBlobAccessTier(String containerName, String blobName, AccessTier accessTier, LeaseAccessConditions leaseAccessConditions) { - return setBlobAccessTierHelper(String.format("%s/%s", containerName, blobName), accessTier, + return setBlobAccessTierHelper(String.format(PATH_TEMPLATE, containerName, blobName), accessTier, leaseAccessConditions); } @@ -247,7 +249,7 @@ public Response setBlobAccessTier(String containerName, String blobName, A * * {@codesnippet com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-AccessTier} * - * @param blobUrl URI of the blob. + * @param blobUrl URL of the blob. * @param accessTier The tier to set on the blob. * @return a {@link Response} that will be used to associate this operation to the response when the batch is * submitted. @@ -264,7 +266,7 @@ public Response setBlobAccessTier(String blobUrl, AccessTier accessTier) { * * {@codesnippet com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-AccessTier-LeaseAccessConditions} * - * @param blobUrl URI of the blob. + * @param blobUrl URL of the blob. * @param accessTier The tier to set on the blob. * @param leaseAccessConditions Lease access conditions that must be met to allow this operation. * @return a {@link Response} that will be used to associate this operation to the response when the batch is @@ -348,6 +350,10 @@ BlobBatchOperationResponse getBatchRequest(int contentId) { return batchMapping.get(contentId); } + int getOperationCount() { + return batchMapping.size(); + } + /* * This performs a cleanup operation that would be handled when the request is sent through Netty or OkHttp. * Additionally, it removes the "x-ms-version" header from the request as batch operation requests cannot have this @@ -391,34 +397,34 @@ private Mono setRequestUrl(HttpPipelineCallContext context, HttpPi * batch operation into the overall request and then returns nothing as the response. */ private Mono setupBatchOperation(HttpRequest request) { - int contentId = Integer.parseInt(request.getHeaders().remove(CONTENT_ID).getValue()); - - StringBuilder batchRequestBuilder = new StringBuilder(); - appendWithNewline(batchRequestBuilder, "--" + batchBoundary); - appendWithNewline(batchRequestBuilder, BATCH_OPERATION_CONTENT_TYPE); - appendWithNewline(batchRequestBuilder, BATCH_OPERATION_CONTENT_TRANSFER_ENCODING); - appendWithNewline(batchRequestBuilder, String.format(BATCH_OPERATION_CONTENT_ID_TEMPLATE, contentId)); - batchRequestBuilder.append(BlobBatchHelper.HTTP_NEWLINE); - - String method = request.getHttpMethod().toString(); - String urlPath = request.getUrl().getPath(); - String urlQuery = request.getUrl().getQuery(); - if (!ImplUtils.isNullOrEmpty(urlQuery)) { - urlPath = urlPath + "?" + urlQuery; - } - appendWithNewline(batchRequestBuilder, String.format(OPERATION_TEMPLATE, method, urlPath, HTTP_VERSION)); - - request.getHeaders().stream() - .filter(header -> !X_MS_VERSION.equalsIgnoreCase(header.getName())) - .forEach(header -> appendWithNewline(batchRequestBuilder, - String.format(HEADER_TEMPLATE, header.getName(), header.getValue()))); + return Mono.fromRunnable(() -> { + int contentId = Integer.parseInt(request.getHeaders().remove(CONTENT_ID).getValue()); + + StringBuilder batchRequestBuilder = new StringBuilder(); + appendWithNewline(batchRequestBuilder, "--" + batchBoundary); + appendWithNewline(batchRequestBuilder, BATCH_OPERATION_CONTENT_TYPE); + appendWithNewline(batchRequestBuilder, BATCH_OPERATION_CONTENT_TRANSFER_ENCODING); + appendWithNewline(batchRequestBuilder, String.format(BATCH_OPERATION_CONTENT_ID_TEMPLATE, contentId)); + batchRequestBuilder.append(BlobBatchHelper.HTTP_NEWLINE); + + String method = request.getHttpMethod().toString(); + String urlPath = request.getUrl().getPath(); + String urlQuery = request.getUrl().getQuery(); + if (!ImplUtils.isNullOrEmpty(urlQuery)) { + urlPath = urlPath + "?" + urlQuery; + } + appendWithNewline(batchRequestBuilder, String.format(OPERATION_TEMPLATE, method, urlPath, HTTP_VERSION)); - batchRequestBuilder.append(BlobBatchHelper.HTTP_NEWLINE); + request.getHeaders().stream() + .filter(header -> !X_MS_VERSION.equalsIgnoreCase(header.getName())) + .forEach(header -> appendWithNewline(batchRequestBuilder, + String.format(HEADER_TEMPLATE, header.getName(), header.getValue()))); - batchRequest.add(ByteBuffer.wrap(batchRequestBuilder.toString().getBytes(StandardCharsets.UTF_8))); - batchMapping.get(contentId).setRequest(request); + batchRequestBuilder.append(BlobBatchHelper.HTTP_NEWLINE); - return Mono.empty(); + batchRequest.add(ByteBuffer.wrap(batchRequestBuilder.toString().getBytes(StandardCharsets.UTF_8))); + batchMapping.get(contentId).setRequest(request); + }); } private void appendWithNewline(StringBuilder stringBuilder, String value) { diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java index be6db98b57c2..74664035d3a0 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java @@ -75,7 +75,8 @@ public BlobBatch getBlobBatch() { * * @param batch Batch to submit. * @return An empty response indicating that the batch operation has completed. - * @throws BlobStorageException If any request in the {@link BlobBatch} failed or the batch request is malformed. + * @throws BlobStorageException If the batch request is malformed. + * @throws BlobBatchStorageException If any request in the {@link BlobBatch} failed. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono submitBatch(BlobBatch batch) { @@ -100,8 +101,9 @@ public Mono submitBatch(BlobBatch batch) { * @param throwOnAnyFailure Flag to indicate if an exception should be thrown if any request in the batch fails. * @return A response only containing header and status code information, used to indicate that the batch operation * has completed. - * @throws BlobStorageException If {@code throwOnAnyFailure} is {@code true} and any request in the - * {@link BlobBatch} failed or the batch request is malformed. + * @throws BlobStorageException If the batch request is malformed. + * @throws BlobBatchStorageException If {@code throwOnAnyFailure} is {@code true} and any request in the + * {@link BlobBatch} failed. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> submitBatchWithResponse(BlobBatch batch, boolean throwOnAnyFailure) { @@ -128,7 +130,8 @@ Mono> submitBatchWithResponse(BlobBatch batch, boolean throwOnAny * @param blobUrls Urls of the blobs to delete. * @param deleteOptions The deletion option for all blobs. * @return The status of each delete operation. - * @throws BlobStorageException If any of the delete operations fail or the request is malformed. + * @throws BlobStorageException If the batch request is malformed. + * @throws BlobBatchStorageException If any of the delete operations fail. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux> deleteBlobs(List blobUrls, DeleteSnapshotsOptionType deleteOptions) { @@ -146,7 +149,7 @@ PagedFlux> deleteBlobsWithTimeout(List blobUrls, DeleteSn Utility.applyOptionalTimeout(submitDeleteBlobsBatch(blobUrls, deleteOptions, context), timeout)); } - Mono>> submitDeleteBlobsBatch(List blobUrls, + private Mono>> submitDeleteBlobsBatch(List blobUrls, DeleteSnapshotsOptionType deleteOptions, Context context) { return submitBatchHelper(blobUrls, (batch, blobUrl) -> batch.deleteBlob(blobUrl, deleteOptions, null), context); } @@ -161,7 +164,8 @@ Mono>> submitDeleteBlobsBatch(List blobUrls * @param blobUrls Urls of the blobs to set their access tier. * @param accessTier {@link AccessTier} to set on each blob. * @return The status of each set tier operation. - * @throws BlobStorageException If any of the set tier operations fail or the request is malformed. + * @throws BlobStorageException If the batch request is malformed. + * @throws BlobBatchStorageException If any of the set tier operations fail. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux> setBlobsAccessTier(List blobUrls, AccessTier accessTier) { @@ -179,7 +183,7 @@ PagedFlux> setBlobsAccessTierWithTimeout(List blobUrls, A Utility.applyOptionalTimeout(submitSetTierBatch(blobUrls, accessTier, context), timeout)); } - Mono>> submitSetTierBatch(List blobUrls, AccessTier accessTier, + private Mono>> submitSetTierBatch(List blobUrls, AccessTier accessTier, Context context) { return submitBatchHelper(blobUrls, (batch, blobUrl) -> batch.setBlobAccessTier(blobUrl, accessTier), context); } @@ -233,53 +237,4 @@ public void close() { } }; } - - -// private PagedFlux> batchingHelper(List blobUrls, -// BiFunction> generator) { -// BlobBatch batch = new BlobBatch(client.getUrl(), client.getHttpPipeline()); -// -// List> responses = new ArrayList<>(); -// for (String blobUrl : blobUrls) { -// responses.add(generator.apply(batch, blobUrl)); -// } -// -// return new PagedFlux>(() -> withContext(context -> submitBatchWithResponse(batch, true, context) -// .map(response -> new PagedResponse>() { -// -// @Override -// public void close() { -// } -// -// @Override -// public List> getItems() { -// return responses; -// } -// -// @Override -// public String getNextLink() { -// return null; -// } -// -// @Override -// public int getStatusCode() { -// return response.getStatusCode(); -// } -// -// @Override -// public HttpHeaders getHeaders() { -// return response.getHeaders(); -// } -// -// @Override -// public HttpRequest getRequest() { -// return response.getRequest(); -// } -// -// @Override -// public List> getValue() { -// return responses; -// } -// }))); -// } } diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClient.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClient.java index 754322f5b7d7..27fc75877dae 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClient.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClient.java @@ -10,8 +10,8 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.DeleteSnapshotsOptionType; import com.azure.storage.blob.models.BlobStorageException; +import com.azure.storage.blob.models.DeleteSnapshotsOptionType; import com.azure.storage.common.Utility; import java.time.Duration; @@ -53,7 +53,8 @@ public BlobBatch getBlobBatch() { * {@codesnippet com.azure.storage.blob.batch.BlobBatchClient.submitBatch#BlobBatch} * * @param batch Batch to submit. - * @throws BlobStorageException If any request in the {@link BlobBatch} failed or the batch request is malformed. + * @throws BlobStorageException If the batch request is malformed. + * @throws BlobBatchStorageException If any request in the {@link BlobBatch} failed. */ @ServiceMethod(returns = ReturnType.SINGLE) public void submitBatch(BlobBatch batch) { @@ -77,8 +78,9 @@ public void submitBatch(BlobBatch batch) { * @return A response only containing header and status code information, used to indicate that the batch operation * has completed. * @throws RuntimeException If the {@code timeout} duration completes before a response is returned. - * @throws BlobStorageException If {@code throwOnAnyFailure} is {@code true} and any request in the - * {@link BlobBatch} failed or the batch request is malformed. + * @throws BlobStorageException If the batch request is malformed. + * @throws BlobBatchStorageException If {@code throwOnAnyFailure} is {@code true} and any request in the + * {@link BlobBatch} failed. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response submitBatchWithResponse(BlobBatch batch, boolean throwOnAnyFailure, Duration timeout, @@ -97,7 +99,8 @@ public Response submitBatchWithResponse(BlobBatch batch, boolean throwOnAn * @param blobUrls Urls of the blobs to delete. * @param deleteOptions The deletion option for all blobs. * @return The status of each delete operation. - * @throws BlobStorageException If any of the delete operations fail or the request is malformed. + * @throws BlobStorageException If the batch request is malformed. + * @throws BlobBatchStorageException If any of the delete operations fail. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable> deleteBlobs(List blobUrls, DeleteSnapshotsOptionType deleteOptions) { @@ -116,7 +119,9 @@ public PagedIterable> deleteBlobs(List blobUrls, DeleteSn * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The status of each delete operation. - * @throws BlobStorageException If any of the delete operations fail or the request is malformed. + * @throws RuntimeException If the {@code timeout} duration completes before a response is returned. + * @throws BlobStorageException If the batch request is malformed. + * @throws BlobBatchStorageException If any of the delete operations fail. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable> deleteBlobs(List blobUrls, DeleteSnapshotsOptionType deleteOptions, @@ -134,7 +139,8 @@ public PagedIterable> deleteBlobs(List blobUrls, DeleteSn * @param blobUrls Urls of the blobs to set their access tier. * @param accessTier {@link AccessTier} to set on each blob. * @return The status of each set tier operation. - * @throws BlobStorageException If any of the set tier operations fail or the request is malformed. + * @throws BlobStorageException If the batch request is malformed. + * @throws BlobBatchStorageException If any of the set tier operations fail. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable> setBlobsAccessTier(List blobUrls, AccessTier accessTier) { @@ -153,7 +159,9 @@ public PagedIterable> setBlobsAccessTier(List blobUrls, A * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The status of each set tier operation. - * @throws BlobStorageException If any of the set tier operations fail or the request is malformed. + * @throws RuntimeException If the {@code timeout} duration completes before a response is returned. + * @throws BlobStorageException If the batch request is malformed. + * @throws BlobBatchStorageException If any of the set tier operations fail. */ public PagedIterable> setBlobsAccessTier(List blobUrls, AccessTier accessTier, Duration timeout, Context context) { diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchHelper.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchHelper.java index 6d5934aa1df3..95c4af1e98cb 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchHelper.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchHelper.java @@ -4,15 +4,22 @@ package com.azure.storage.blob.batch; import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.implementation.models.ServicesSubmitBatchResponse; import com.azure.storage.blob.models.BlobStorageException; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -37,6 +44,12 @@ class BlobBatchHelper { private static final Pattern STATUS_CODE_PATTERN = Pattern .compile("HTTP\\/\\d\\.\\d\\s?(\\d+)\\s?\\w+", Pattern.CASE_INSENSITIVE); + /* + * This pattern matches finding the 'application/http' portion of the body. + */ + private static final Pattern APPLICATION_HTTP_PATTERN = Pattern + .compile("application\\/http", Pattern.CASE_INSENSITIVE); + // This method connects the batch response values to the individual batch operations based on their Content-Id static Mono> mapBatchResponse(BlobBatch batch, ServicesSubmitBatchResponse batchResponse, boolean throwOnAnyFailure, ClientLogger logger) { @@ -47,16 +60,33 @@ static Mono> mapBatchResponse(BlobBatch batch, ServicesSubm String contentType = batchResponse.getDeserializedHeaders().getContentType(); // Split on the boundary [ "multipart/mixed; boundary", "batchresponse_66925647-d0cb-4109-b6d3-28efe3e1e5ed"] - String boundary = contentType.split("=", 2)[1]; + String[] boundaryPieces = contentType.split("=", 2); + if (boundaryPieces.length == 1) { + return Mono.error(logger + .logExceptionAsError(new IllegalStateException("Response doesn't contain a boundary."))); + } + + String boundary = boundaryPieces[1]; return FluxUtil.collectBytesInByteBufferStream(batchResponse.getValue()) - .flatMap(byteArrayBody -> { + .flatMap(byteArrayBody -> Mono.fromRunnable(() -> { String body = new String(byteArrayBody, StandardCharsets.UTF_8); + List exceptions = new ArrayList<>(); + + String[] subResponses = body.split("--" + boundary); + if (subResponses.length == 3 && batch.getOperationCount() != 1) { + String[] exceptionSections = subResponses[1].split(HTTP_NEWLINE + HTTP_NEWLINE); + int statusCode = getStatusCode(exceptionSections[1], logger); + HttpHeaders headers = getHttpHeaders(exceptionSections[1]); + + throw logger.logExceptionAsError(new BlobStorageException(headers.getValue("x-ms-error-code"), + createHttpResponse(batchResponse.getRequest(), statusCode, headers, body), body)); + } // Split the batch response body into batch operation responses. - for (String subResponse : body.split("--" + boundary)) { + for (String subResponse : subResponses) { // This is a split value that isn't a response. - if (!subResponse.contains("application/http")) { + if (!APPLICATION_HTTP_PATTERN.matcher(subResponse).find()) { continue; } @@ -68,18 +98,23 @@ static Mono> mapBatchResponse(BlobBatch batch, ServicesSubm getBatchOperation(batch, subResponseSections[0], logger); // The second section will contain status code and header information. - setStatusCodeAndHeaders(batchOperationResponse, subResponseSections[1]); + batchOperationResponse.setStatusCode(getStatusCode(subResponseSections[1], logger)); + batchOperationResponse.setHeaders(getHttpHeaders(subResponseSections[1])); // The third section will contain the body. if (subResponseSections.length > 2) { // The body is optional and may not exist. - setBodyOrPotentiallyThrow(batchOperationResponse, subResponseSections[2], throwOnAnyFailure, - logger); + setBodyOrAddException(batchOperationResponse, subResponseSections[2], exceptions); } } - return Mono.just(new SimpleResponse<>(batchResponse, null)); - }); + if (throwOnAnyFailure && exceptions.size() != 0) { + throw logger.logExceptionAsError(new BlobBatchStorageException("Batch had operation failures.", + createHttpResponse(batchResponse), exceptions)); + } + + new SimpleResponse<>(batchResponse, null); + })); } private static BlobBatchOperationResponse getBatchOperation(BlobBatch batch, String responseBatchInfo, @@ -87,7 +122,7 @@ private static BlobBatchOperationResponse getBatchOperation(BlobBatch batch, Matcher contentIdMatcher = CONTENT_ID_PATTERN.matcher(responseBatchInfo); int contentId; - if (contentIdMatcher.find()) { + if (contentIdMatcher.find() && contentIdMatcher.groupCount() >= 1) { contentId = Integer.parseInt(contentIdMatcher.group(1)); } else { throw logger.logExceptionAsError( @@ -97,30 +132,36 @@ private static BlobBatchOperationResponse getBatchOperation(BlobBatch batch, return batch.getBatchRequest(contentId).setResponseReceived(); } - private static void setStatusCodeAndHeaders(BlobBatchOperationResponse batchOperationResponse, - String responseHeaders) { + private static int getStatusCode(String responseMetadata, ClientLogger logger) { + Matcher statusCodeMatcher = STATUS_CODE_PATTERN.matcher(responseMetadata); + if (statusCodeMatcher.find()) { + return Integer.parseInt(statusCodeMatcher.group(1)); + } else { + throw logger.logExceptionAsError(new IllegalStateException("Unable to parse response status code.")); + } + } + + private static HttpHeaders getHttpHeaders(String responseMetadata) { HttpHeaders headers = new HttpHeaders(); - for (String line : responseHeaders.split(HTTP_NEWLINE)) { - if (ImplUtils.isNullOrEmpty(line)) { + + for (String line : responseMetadata.split(HTTP_NEWLINE)) { + if (ImplUtils.isNullOrEmpty(line) || (line.startsWith("HTTP") && !line.contains(":"))) { continue; } - if (line.startsWith("HTTP")) { - Matcher statusCodeMatcher = STATUS_CODE_PATTERN.matcher(line); - if (statusCodeMatcher.find()) { - batchOperationResponse.setStatusCode(Integer.parseInt(statusCodeMatcher.group(1))); - } + String[] headerPieces = line.split(":\\s*", 2); + if (headerPieces.length == 1) { + headers.put(headerPieces[0], null); } else { - String[] headerPieces = line.split(":\\s*", 2); headers.put(headerPieces[0], headerPieces[1]); } } - batchOperationResponse.setHeaders(headers); + return headers; } - private static void setBodyOrPotentiallyThrow(BlobBatchOperationResponse batchOperationResponse, - String responseBody, boolean throwOnError, ClientLogger logger) { + private static void setBodyOrAddException(BlobBatchOperationResponse batchOperationResponse, + String responseBody, List exceptions) { /* * Currently no batching operations will return a success body, they will only return a body on an exception. * For now this will only construct the exception and throw if it should throw on an error. @@ -128,9 +169,84 @@ private static void setBodyOrPotentiallyThrow(BlobBatchOperationResponse batc BlobStorageException exception = new BlobStorageException(responseBody, batchOperationResponse.asHttpResponse(responseBody), responseBody); batchOperationResponse.setException(exception); + exceptions.add(exception); + } - if (throwOnError) { - throw logger.logExceptionAsError(exception); - } + static HttpResponse createHttpResponse(HttpRequest request, int statusCode, HttpHeaders headers, String body) { + return new HttpResponse(request) { + @Override + public int getStatusCode() { + return statusCode; + } + + @Override + public String getHeaderValue(String name) { + return headers.getValue(name); + } + + @Override + public HttpHeaders getHeaders() { + return headers; + } + + @Override + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(body.getBytes(StandardCharsets.UTF_8))); + } + + @Override + public Mono getBodyAsByteArray() { + return Mono.just(body.getBytes(StandardCharsets.UTF_8)); + } + + @Override + public Mono getBodyAsString() { + return Mono.just(body); + } + + @Override + public Mono getBodyAsString(Charset charset) { + return getBodyAsByteArray().map(body -> new String(body, charset)); + } + }; + } + + private static HttpResponse createHttpResponse(ServicesSubmitBatchResponse response) { + return new HttpResponse(response.getRequest()) { + @Override + public int getStatusCode() { + return response.getStatusCode(); + } + + @Override + public String getHeaderValue(String name) { + return response.getHeaders().getValue(name); + } + + @Override + public HttpHeaders getHeaders() { + return response.getHeaders(); + } + + @Override + public Flux getBody() { + return response.getValue(); + } + + @Override + public Mono getBodyAsByteArray() { + return FluxUtil.collectBytesInByteBufferStream(getBody()); + } + + @Override + public Mono getBodyAsString() { + return getBodyAsByteArray().map(body -> new String(body, StandardCharsets.UTF_8)); + } + + @Override + public Mono getBodyAsString(Charset charset) { + return getBodyAsByteArray().map(body -> new String(body, charset)); + } + }; } } diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchOperationResponse.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchOperationResponse.java index 1bda828df268..d225f35831e3 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchOperationResponse.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchOperationResponse.java @@ -9,12 +9,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.models.BlobStorageException; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; import java.util.HashSet; import java.util.Set; @@ -102,7 +97,7 @@ boolean wasExpectedResponse() { } HttpResponse asHttpResponse(String body) { - return initResponse(request, statusCode, headers, body); + return BlobBatchHelper.createHttpResponse(request, statusCode, headers, body); } private void assertResponseReceived() { @@ -115,43 +110,4 @@ private void assertResponseReceived() { throw logger.logExceptionAsError(exception); } } - - private HttpResponse initResponse(HttpRequest request, int statusCode, HttpHeaders headers, String body) { - return new HttpResponse(request) { - @Override - public int getStatusCode() { - return statusCode; - } - - @Override - public String getHeaderValue(String name) { - return headers.getValue(name); - } - - @Override - public HttpHeaders getHeaders() { - return headers; - } - - @Override - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(body.getBytes(StandardCharsets.UTF_8))); - } - - @Override - public Mono getBodyAsByteArray() { - return Mono.just(body.getBytes(StandardCharsets.UTF_8)); - } - - @Override - public Mono getBodyAsString() { - return Mono.just(body); - } - - @Override - public Mono getBodyAsString(Charset charset) { - return getBodyAsByteArray().map(body -> new String(body, charset)); - } - }; - } } diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchStorageException.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchStorageException.java new file mode 100644 index 000000000000..bb8325fba3a6 --- /dev/null +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchStorageException.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.batch; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpResponse; +import com.azure.storage.blob.models.BlobStorageException; + +/** + * This exception class is an aggregate for {@link BlobStorageException BlobStorageExceptions}. This will contain all + * exceptions from a single batch operation. + */ +public final class BlobBatchStorageException extends HttpResponseException { + private final Iterable exceptions; + + BlobBatchStorageException(String message, HttpResponse response, Iterable exceptions) { + super(message, response); + + this.exceptions = exceptions; + } + + /** + * Gets all the exceptions thrown in a single batch request. + * + * @return All the exceptions thrown in a single batch request. + */ + public Iterable getBatchExceptions() { + return exceptions; + } +} diff --git a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy index f558052c194c..ee0ff8fdd304 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy +++ b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy @@ -26,7 +26,6 @@ import com.azure.storage.blob.models.ListBlobContainersOptions import com.azure.storage.blob.specialized.LeaseClient import com.azure.storage.blob.specialized.LeaseClientBuilder import com.azure.storage.common.StorageSharedKeyCredential -import reactor.core.publisher.Flux import spock.lang.Requires import spock.lang.Shared import spock.lang.Specification @@ -63,8 +62,6 @@ class APISpec extends Specification { static int defaultDataSize = defaultData.remaining() - static final Flux defaultFlux = Flux.just(defaultData).map { buffer -> buffer.duplicate() } - // Prefixes for blobs and containers String containerPrefix = "jtc" // java test container diff --git a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BatchAPITest.groovy b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BatchAPITest.groovy index 846cd008fe94..7a545cfa0ec9 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BatchAPITest.groovy +++ b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BatchAPITest.groovy @@ -5,8 +5,8 @@ import com.azure.core.http.policy.HttpPipelinePolicy import com.azure.core.util.Context import com.azure.storage.blob.BlobServiceAsyncClient import com.azure.storage.blob.models.AccessTier -import com.azure.storage.blob.models.DeleteSnapshotsOptionType import com.azure.storage.blob.models.BlobStorageException +import com.azure.storage.blob.models.DeleteSnapshotsOptionType class BatchAPITest extends APISpec { static def setupCustomPolicyBatch(BlobServiceAsyncClient blobServiceAsyncClient, HttpPipelinePolicy customPolicy) { @@ -96,7 +96,7 @@ class BatchAPITest extends APISpec { batchClient.submitBatch(batch) then: - thrown(BlobStorageException) + thrown(BlobBatchStorageException) response1.getStatusCode() == 200 when: @@ -147,7 +147,8 @@ class BatchAPITest extends APISpec { batchClient.submitBatch(batch) then: - thrown(BlobStorageException) + def ex = thrown(BlobBatchStorageException) + ex.getBatchExceptions().size() == 2 when: response1.getStatusCode() @@ -159,7 +160,7 @@ class BatchAPITest extends APISpec { response2.getStatusCode() then: - thrown(UnsupportedOperationException) + thrown(BlobStorageException) } def "Set tier none succeed do not throw on any error"() { @@ -230,7 +231,7 @@ class BatchAPITest extends APISpec { batchClient.submitBatch(batch) then: - thrown(BlobStorageException) + thrown(BlobBatchStorageException) response1.getStatusCode() == 202 when: @@ -281,7 +282,8 @@ class BatchAPITest extends APISpec { batchClient.submitBatch(batch) then: - thrown(BlobStorageException) + def ex = thrown(BlobBatchStorageException) + ex.getBatchExceptions().size() == 2 when: response1.getStatusCode() @@ -293,7 +295,7 @@ class BatchAPITest extends APISpec { response2.getStatusCode() then: - thrown(UnsupportedOperationException) + thrown(BlobStorageException) } def "Delete blob none succeed do not throw on any error"() { @@ -373,4 +375,20 @@ class BatchAPITest extends APISpec { assert response.getStatusCode() == 200 } } + + def "Too many operations fails"() { + setup: + def blobUrls = new ArrayList() + for (def i = 0; i < 257; i++) { + def pageBlobClient = cc.getBlobClient(generateBlobName()).getPageBlobClient() + pageBlobClient.create(512) + blobUrls.add(pageBlobClient.getBlobUrl()) + } + + when: + batchClient.deleteBlobs(blobUrls, DeleteSnapshotsOptionType.INCLUDE).iterator().next() + + then: + thrown(BlobStorageException) + } } diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestaccessingbatchrequestbeforesubmissionthrows.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestaccessingbatchrequestbeforesubmissionthrows.json index 94651fb476f6..92a882d4d0d5 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestaccessingbatchrequestbeforesubmissionthrows.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestaccessingbatchrequestbeforesubmissionthrows.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccessingbatchrequestbeforesubmissionthrows0919008bff2?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccessingbatchrequestbeforesubmissionthrows0598179640b?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4586ca4f-6dbf-4721-ab00-07e0d0c41f98" + "x-ms-client-request-id" : "9913daa0-ca81-45b8-9504-48e20c291a96" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B088FDB590", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "ETag" : "0x8D75291E6D81C92", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480c3d-d01e-00d1-1199-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "4586ca4f-6dbf-4721-ab00-07e0d0c41f98" + "x-ms-request-id" : "92e35846-201e-006e-767a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "9913daa0-ca81-45b8-9504-48e20c291a96" }, "Exception" : null }, { @@ -26,7 +26,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d44218ac-e13a-479b-8c81-d9782b6e84f5" + "x-ms-client-request-id" : "64f6535b-e5bf-43a6-ba79-6ba987e761a1" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "50480c5f-d01e-00d1-2999-838d29000000", - "Body" : "jtcaccessingbatchrequestbeforesubmissionthrowsjtcaccessingbatchrequestbeforesubmissionthrows0919008bff2Tue, 15 Oct 2019 20:44:55 GMT\"0x8D751B088FDB590\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "d44218ac-e13a-479b-8c81-d9782b6e84f5", + "x-ms-request-id" : "a0ed4af3-d01e-007b-677a-845bc6000000", + "Body" : "jtcaccessingbatchrequestbeforesubmissionthrowsjtcaccessingbatchrequestbeforesubmissionthrows0598179640bWed, 16 Oct 2019 23:38:09 GMT\"0x8D75291E6D81C92\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "64f6535b-e5bf-43a6-ba79-6ba987e761a1", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccessingbatchrequestbeforesubmissionthrows0919008bff2?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccessingbatchrequestbeforesubmissionthrows0598179640b?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1e847063-4ef9-4703-bbfc-eb01b16568a7" + "x-ms-client-request-id" : "c81c16d7-c1dd-436f-baaa-fd22db928c6a" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480c75-d01e-00d1-3799-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "1e847063-4ef9-4703-bbfc-eb01b16568a7" + "x-ms-request-id" : "92e35863-201e-006e-097a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "c81c16d7-c1dd-436f-baaa-fd22db928c6a" }, "Exception" : null } ], - "variables" : [ "jtcaccessingbatchrequestbeforesubmissionthrows0919008bff2" ] + "variables" : [ "jtcaccessingbatchrequestbeforesubmissionthrows0598179640b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestbulkdeleteblobs.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestbulkdeleteblobs.json index 362e9f7e6808..0934af9f9e01 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestbulkdeleteblobs.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestbulkdeleteblobs.json @@ -1,243 +1,243 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56c?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959da?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "974e0938-1150-4390-9aaf-683a92d5b345" + "x-ms-client-request-id" : "1bf8a949-7019-4703-bff1-2fa273af35fc" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B08910A5E4", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "ETag" : "0x8D75291E6EADE95", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480c92-d01e-00d1-4b99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "974e0938-1150-4390-9aaf-683a92d5b345" + "x-ms-request-id" : "a0ed4b17-d01e-007b-807a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "1bf8a949-7019-4703-bff1-2fa273af35fc" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56c/javablobbulkdeleteblobs1batchapitestbulkdeleteblobs9124716178", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959da/javablobbulkdeleteblobs1batchapitestbulkdeleteblobs9fd48471dc", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "14ea9c21-11c3-44e8-b274-68bbb1c58610" + "x-ms-client-request-id" : "a37a151a-2751-4eb4-b523-6b67b480ed18" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B08918DC3D", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "ETag" : "0x8D75291E6F2B468", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480cb1-d01e-00d1-6699-838d29000000", + "x-ms-request-id" : "92e35885-201e-006e-257a-84995f000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "14ea9c21-11c3-44e8-b274-68bbb1c58610" + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "a37a151a-2751-4eb4-b523-6b67b480ed18" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56c/javablobbulkdeleteblobs2batchapitestbulkdeleteblobs91229930ee", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959da/javablobbulkdeleteblobs2batchapitestbulkdeleteblobs9fd9280665", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "aeadbb50-eaee-4926-bda0-330a59cbbb94" + "x-ms-client-request-id" : "c1ab4d10-38c0-49b1-9269-85eadaf5975f" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B0891F94AB", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "ETag" : "0x8D75291E6F9E217", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480cc0-d01e-00d1-7599-838d29000000", + "x-ms-request-id" : "a0ed4b44-d01e-007b-207a-845bc6000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "aeadbb50-eaee-4926-bda0-330a59cbbb94" + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "c1ab4d10-38c0-49b1-9269-85eadaf5975f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56c/javablobbulkdeleteblobs3batchapitestbulkdeleteblobs912443210f", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959da/javablobbulkdeleteblobs3batchapitestbulkdeleteblobs9fd3395172", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "697d81b3-dff5-457b-ad44-39a8d3d75e0c" + "x-ms-client-request-id" : "c749d66b-77c7-4408-a69f-13809dbff1c1" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B089264D14", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "ETag" : "0x8D75291E701AC32", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480cdc-d01e-00d1-0c99-838d29000000", + "x-ms-request-id" : "92e358a7-201e-006e-407a-84995f000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "697d81b3-dff5-457b-ad44-39a8d3d75e0c" + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "c749d66b-77c7-4408-a69f-13809dbff1c1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56c/javablobbulkdeleteblobs4batchapitestbulkdeleteblobs912808271d", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959da/javablobbulkdeleteblobs4batchapitestbulkdeleteblobs9fd7051837", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "544b9545-eaef-40a4-9643-07947be769e7" + "x-ms-client-request-id" : "7bbe107f-d640-45fd-b1a2-5f6e88b6ed5f" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B0892C6920", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "ETag" : "0x8D75291E708165C", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480ced-d01e-00d1-1a99-838d29000000", + "x-ms-request-id" : "a0ed4b64-d01e-007b-397a-845bc6000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "544b9545-eaef-40a4-9643-07947be769e7" + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "7bbe107f-d640-45fd-b1a2-5f6e88b6ed5f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56c/javablobbulkdeleteblobs5batchapitestbulkdeleteblobs91252455d3", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959da/javablobbulkdeleteblobs5batchapitestbulkdeleteblobs9fd79821de", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "af6482c9-fcbb-4f8d-a599-0aea7daf6eae" + "x-ms-client-request-id" : "08d035a1-304e-4108-aad1-eb2cf391d8de" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B089336FB3", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "ETag" : "0x8D75291E70E325B", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480d01-d01e-00d1-2d99-838d29000000", + "x-ms-request-id" : "92e358b9-201e-006e-517a-84995f000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "af6482c9-fcbb-4f8d-a599-0aea7daf6eae" + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "08d035a1-304e-4108-aad1-eb2cf391d8de" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56c/javablobbulkdeleteblobs6batchapitestbulkdeleteblobs912936940f", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959da/javablobbulkdeleteblobs6batchapitestbulkdeleteblobs9fd20411a5", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "621de2f7-c21e-4aa0-af5c-97e7c7d2ea8a" + "x-ms-client-request-id" : "0b74031f-febe-41ec-9608-ce9dae8108dd" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B08939B2CD", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "ETag" : "0x8D75291E7144E52", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480d20-d01e-00d1-4b99-838d29000000", + "x-ms-request-id" : "a0ed4b88-d01e-007b-527a-845bc6000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "621de2f7-c21e-4aa0-af5c-97e7c7d2ea8a" + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "0b74031f-febe-41ec-9608-ce9dae8108dd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56c/javablobbulkdeleteblobs7batchapitestbulkdeleteblobs9125607697", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959da/javablobbulkdeleteblobs7batchapitestbulkdeleteblobs9fd399391c", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1f8e78ce-ba04-4f20-bd46-bc56c4002891" + "x-ms-client-request-id" : "2107fc85-ff3a-4586-9a70-442ac3049a88" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B0893FA7B8", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "ETag" : "0x8D75291E71A6A49", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480d2e-d01e-00d1-5699-838d29000000", + "x-ms-request-id" : "92e358de-201e-006e-6e7a-84995f000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "1f8e78ce-ba04-4f20-bd46-bc56c4002891" + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", + "x-ms-client-request-id" : "2107fc85-ff3a-4586-9a70-442ac3049a88" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56c/javablobbulkdeleteblobs8batchapitestbulkdeleteblobs912628084f", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959da/javablobbulkdeleteblobs8batchapitestbulkdeleteblobs9fd9842712", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ee9399fa-4c2a-4665-828d-e9409c4c498a" + "x-ms-client-request-id" : "1f579739-51ea-4778-85c2-d0a82e3103c9" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B0894611E9", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "ETag" : "0x8D75291E7205F2D", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480d41-d01e-00d1-6999-838d29000000", + "x-ms-request-id" : "a0ed4ba7-d01e-007b-677a-845bc6000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "ee9399fa-4c2a-4665-828d-e9409c4c498a" + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "1f579739-51ea-4778-85c2-d0a82e3103c9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56c/javablobbulkdeleteblobs9batchapitestbulkdeleteblobs9123780541", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959da/javablobbulkdeleteblobs9batchapitestbulkdeleteblobs9fd16219c9", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b5575c76-db6b-4cc0-a794-7a3d9adba492" + "x-ms-client-request-id" : "3f99972b-8074-48fe-b274-d7d9234c2313" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B0894C7C1F", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "ETag" : "0x8D75291E7262CF5", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480d54-d01e-00d1-7999-838d29000000", + "x-ms-request-id" : "92e358f9-201e-006e-047a-84995f000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "b5575c76-db6b-4cc0-a794-7a3d9adba492" + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", + "x-ms-client-request-id" : "3f99972b-8074-48fe-b274-d7d9234c2313" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56c/javablobbulkdeleteblobs10batchapitestbulkdeleteblobs912591721", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959da/javablobbulkdeleteblobs10batchapitestbulkdeleteblobs9fd13870e", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "825b8a44-9a75-416a-afae-651aa2a89418" + "x-ms-client-request-id" : "2391f2be-9d93-4788-b17e-224f6954805c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B08953349F", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "ETag" : "0x8D75291E72C48FA", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480d6b-d01e-00d1-0f99-838d29000000", + "x-ms-request-id" : "a0ed4bc7-d01e-007b-807a-845bc6000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "825b8a44-9a75-416a-afae-651aa2a89418" + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", + "x-ms-client-request-id" : "2391f2be-9d93-4788-b17e-224f6954805c" }, "Exception" : null }, { @@ -246,8 +246,8 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4a78a4ee-eab3-48e1-b997-dbbb4fe2c43b", - "Content-Type" : "multipart/mixed; boundary=batch_2d66683b-7837-4e2c-baea-d2e370429e58" + "x-ms-client-request-id" : "2c050cbd-332b-4557-95bc-2c26a081a5ef", + "Content-Type" : "multipart/mixed; boundary=batch_f746c873-37cc-48a7-91cb-013489791109" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -255,11 +255,11 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480d8b-d01e-00d1-2899-838d29000000", - "Body" : "--batchresponse_d0528f3e-1aab-4813-b16e-a38a17427f83\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 50480d8b-d01e-00d1-2899-838d291e2043\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 789c2eb2-509b-4500-92fe-e63d54f95e0a\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_d0528f3e-1aab-4813-b16e-a38a17427f83\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 50480d8b-d01e-00d1-2899-838d291e2045\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 9b2b374e-93af-4ff8-951d-1a74e1c088a2\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_d0528f3e-1aab-4813-b16e-a38a17427f83\r\nContent-Type: application/http\r\nContent-ID: 2\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 50480d8b-d01e-00d1-2899-838d291e2046\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 4dd5e307-981e-453e-9ae1-cd52ea689b0e\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_d0528f3e-1aab-4813-b16e-a38a17427f83\r\nContent-Type: application/http\r\nContent-ID: 3\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 50480d8b-d01e-00d1-2899-838d291e2047\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: e247caee-caee-4bd2-93e3-35c8cf77115a\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_d0528f3e-1aab-4813-b16e-a38a17427f83\r\nContent-Type: application/http\r\nContent-ID: 4\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 50480d8b-d01e-00d1-2899-838d291e2048\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 49d9d702-d5e6-4bd1-8b6a-e8cd00761167\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_d0528f3e-1aab-4813-b16e-a38a17427f83\r\nContent-Type: application/http\r\nContent-ID: 5\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 50480d8b-d01e-00d1-2899-838d291e2049\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 505846cb-e6b8-409d-9376-a0dd4fe098ae\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_d0528f3e-1aab-4813-b16e-a38a17427f83\r\nContent-Type: application/http\r\nContent-ID: 6\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 50480d8b-d01e-00d1-2899-838d291e204a\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 5c8bf580-a19f-448d-a7c3-9c4fc8897dd7\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_d0528f3e-1aab-4813-b16e-a38a17427f83\r\nContent-Type: application/http\r\nContent-ID: 7\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 50480d8b-d01e-00d1-2899-838d291e204b\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: f058e597-b124-4bef-a72c-7dfebfd9f7f2\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_d0528f3e-1aab-4813-b16e-a38a17427f83\r\nContent-Type: application/http\r\nContent-ID: 8\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 50480d8b-d01e-00d1-2899-838d291e204c\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 75bd0895-d553-4bfe-b9ff-4a571b19d957\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_d0528f3e-1aab-4813-b16e-a38a17427f83\r\nContent-Type: application/http\r\nContent-ID: 9\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 50480d8b-d01e-00d1-2899-838d291e204d\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: daf8093c-e3bd-4de9-982f-d04c95290935\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_d0528f3e-1aab-4813-b16e-a38a17427f83--", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "4a78a4ee-eab3-48e1-b997-dbbb4fe2c43b", - "Content-Type" : "multipart/mixed; boundary=batchresponse_d0528f3e-1aab-4813-b16e-a38a17427f83" + "x-ms-request-id" : "92e35911-201e-006e-177a-84995f000000", + "Body" : "--batchresponse_f45d7245-6278-48db-a6c2-6de0a68bb3c0\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 92e35911-201e-006e-177a-84995f1e4c29\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 4494e438-bd2f-45ff-b6a7-3604dd5999a2\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_f45d7245-6278-48db-a6c2-6de0a68bb3c0\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 92e35911-201e-006e-177a-84995f1e4c2b\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 966e118a-7daf-4ac7-bd5f-4631eb6e2119\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_f45d7245-6278-48db-a6c2-6de0a68bb3c0\r\nContent-Type: application/http\r\nContent-ID: 2\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 92e35911-201e-006e-177a-84995f1e4c2c\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: c81c8895-b188-4599-8b0c-d6d06ba2d953\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_f45d7245-6278-48db-a6c2-6de0a68bb3c0\r\nContent-Type: application/http\r\nContent-ID: 3\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 92e35911-201e-006e-177a-84995f1e4c2d\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: e90f75c2-109d-45e9-9817-cba688ff0244\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_f45d7245-6278-48db-a6c2-6de0a68bb3c0\r\nContent-Type: application/http\r\nContent-ID: 4\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 92e35911-201e-006e-177a-84995f1e4c2e\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: c6931c0b-7957-42ac-8bd5-83b2cd9bf931\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_f45d7245-6278-48db-a6c2-6de0a68bb3c0\r\nContent-Type: application/http\r\nContent-ID: 5\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 92e35911-201e-006e-177a-84995f1e4c2f\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: cfb667a7-1059-48f5-8b37-548ddf895f65\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_f45d7245-6278-48db-a6c2-6de0a68bb3c0\r\nContent-Type: application/http\r\nContent-ID: 6\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 92e35911-201e-006e-177a-84995f1e4c30\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: ea9d07e8-00f7-4da4-99d9-c4b47de03f99\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_f45d7245-6278-48db-a6c2-6de0a68bb3c0\r\nContent-Type: application/http\r\nContent-ID: 7\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 92e35911-201e-006e-177a-84995f1e4c31\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 449beab8-5d20-45d3-b035-33725c2d2d57\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_f45d7245-6278-48db-a6c2-6de0a68bb3c0\r\nContent-Type: application/http\r\nContent-ID: 8\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 92e35911-201e-006e-177a-84995f1e4c32\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: d2c0f2f5-5d4f-4cdb-9535-989b8fb88506\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_f45d7245-6278-48db-a6c2-6de0a68bb3c0\r\nContent-Type: application/http\r\nContent-ID: 9\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 92e35911-201e-006e-177a-84995f1e4c33\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 5f1d0689-f573-4ffe-9157-0076cda2e07d\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_f45d7245-6278-48db-a6c2-6de0a68bb3c0--", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", + "x-ms-client-request-id" : "2c050cbd-332b-4557-95bc-2c26a081a5ef", + "Content-Type" : "multipart/mixed; boundary=batchresponse_f45d7245-6278-48db-a6c2-6de0a68bb3c0" }, "Exception" : null }, { @@ -268,7 +268,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "44192232-36ff-40e2-8686-83eab91322f1" + "x-ms-client-request-id" : "043bd7f3-3cd9-4fbe-88e1-4582d31e142f" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -276,20 +276,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "50480d9e-d01e-00d1-3999-838d29000000", - "Body" : "jtcbulkdeleteblobsjtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56cTue, 15 Oct 2019 20:44:55 GMT\"0x8D751B08910A5E4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "44192232-36ff-40e2-8686-83eab91322f1", + "x-ms-request-id" : "a0ed4bdf-d01e-007b-107a-845bc6000000", + "Body" : "jtcbulkdeleteblobsjtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959daWed, 16 Oct 2019 23:38:09 GMT\"0x8D75291E6EADE95\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", + "x-ms-client-request-id" : "043bd7f3-3cd9-4fbe-88e1-4582d31e142f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56c?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959da?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7aef2f57-3ceb-4098-a4b8-060bdb4fe30c" + "x-ms-client-request-id" : "59fc3998-ae83-4ca1-8224-a7237ab7d125" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -297,11 +297,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480da8-d01e-00d1-4299-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "7aef2f57-3ceb-4098-a4b8-060bdb4fe30c" + "x-ms-request-id" : "92e35938-201e-006e-387a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", + "x-ms-client-request-id" : "59fc3998-ae83-4ca1-8224-a7237ab7d125" }, "Exception" : null } ], - "variables" : [ "jtcbulkdeleteblobs0batchapitestbulkdeleteblobs91219174e56c", "javablobbulkdeleteblobs1batchapitestbulkdeleteblobs9124716178", "javablobbulkdeleteblobs2batchapitestbulkdeleteblobs91229930ee", "javablobbulkdeleteblobs3batchapitestbulkdeleteblobs912443210f", "javablobbulkdeleteblobs4batchapitestbulkdeleteblobs912808271d", "javablobbulkdeleteblobs5batchapitestbulkdeleteblobs91252455d3", "javablobbulkdeleteblobs6batchapitestbulkdeleteblobs912936940f", "javablobbulkdeleteblobs7batchapitestbulkdeleteblobs9125607697", "javablobbulkdeleteblobs8batchapitestbulkdeleteblobs912628084f", "javablobbulkdeleteblobs9batchapitestbulkdeleteblobs9123780541", "javablobbulkdeleteblobs10batchapitestbulkdeleteblobs912591721" ] + "variables" : [ "jtcbulkdeleteblobs0batchapitestbulkdeleteblobs9fd8824959da", "javablobbulkdeleteblobs1batchapitestbulkdeleteblobs9fd48471dc", "javablobbulkdeleteblobs2batchapitestbulkdeleteblobs9fd9280665", "javablobbulkdeleteblobs3batchapitestbulkdeleteblobs9fd3395172", "javablobbulkdeleteblobs4batchapitestbulkdeleteblobs9fd7051837", "javablobbulkdeleteblobs5batchapitestbulkdeleteblobs9fd79821de", "javablobbulkdeleteblobs6batchapitestbulkdeleteblobs9fd20411a5", "javablobbulkdeleteblobs7batchapitestbulkdeleteblobs9fd399391c", "javablobbulkdeleteblobs8batchapitestbulkdeleteblobs9fd9842712", "javablobbulkdeleteblobs9batchapitestbulkdeleteblobs9fd16219c9", "javablobbulkdeleteblobs10batchapitestbulkdeleteblobs9fd13870e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestbulksetaccesstier.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestbulksetaccesstier.json index 4d19fae1886a..1a8ab9ba2b29 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestbulksetaccesstier.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestbulksetaccesstier.json @@ -1,273 +1,273 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aa?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ec?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "06433a61-299b-420e-87ad-eadb1058d536" + "x-ms-client-request-id" : "5af0f666-56f6-4638-8774-f31d4cdf7aaf" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B0896F0969", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "ETag" : "0x8D75291E74C024C", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:10 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480dbb-d01e-00d1-4e99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "06433a61-299b-420e-87ad-eadb1058d536" + "x-ms-request-id" : "a0ed4bfb-d01e-007b-277a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", + "x-ms-client-request-id" : "5af0f666-56f6-4638-8774-f31d4cdf7aaf" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aa/javablobbulksetaccesstier195316017c365481a44f36", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ec/javablobbulksetaccesstier149311fc70da810cd245bd", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4be2a0c6-8162-45bf-84f9-3de29dcda8f2", + "x-ms-client-request-id" : "ea52ef27-d989-4d25-ad69-5f7a4014839f", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:10 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B089762E7F", + "ETag" : "0x8D75291E75277D7", "Content-Length" : "0", - "x-ms-request-id" : "50480dc9-d01e-00d1-5899-838d29000000", - "x-ms-client-request-id" : "4be2a0c6-8162-45bf-84f9-3de29dcda8f2" + "x-ms-request-id" : "92e3596d-201e-006e-5e7a-84995f000000", + "x-ms-client-request-id" : "ea52ef27-d989-4d25-ad69-5f7a4014839f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aa/javablobbulksetaccesstier21671465cd3350207f4b52", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ec/javablobbulksetaccesstier234524257b6eb284884372", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "be9526ad-d7a6-4cce-a074-4b29d5e6e223", + "x-ms-client-request-id" : "5cab7a3b-a57f-4a44-af1c-2eb1e4c236f1", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:10 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:55 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B0897BFC58", + "ETag" : "0x8D75291E75893CE", "Content-Length" : "0", - "x-ms-request-id" : "50480ddb-d01e-00d1-6a99-838d29000000", - "x-ms-client-request-id" : "be9526ad-d7a6-4cce-a074-4b29d5e6e223" + "x-ms-request-id" : "a0ed4c22-d01e-007b-427a-845bc6000000", + "x-ms-client-request-id" : "5cab7a3b-a57f-4a44-af1c-2eb1e4c236f1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aa/javablobbulksetaccesstier333270871bd2af08b34041", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ec/javablobbulksetaccesstier389174b4df6ff179264223", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "63bd7e72-8d03-4b13-9100-3e8431c1d32e", + "x-ms-client-request-id" : "b656f87f-10e3-4679-b742-026250f9b661", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:10 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:55 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B08982DBD8", + "ETag" : "0x8D75291E75EAFCD", "Content-Length" : "0", - "x-ms-request-id" : "50480df2-d01e-00d1-7b99-838d29000000", - "x-ms-client-request-id" : "63bd7e72-8d03-4b13-9100-3e8431c1d32e" + "x-ms-request-id" : "92e35984-201e-006e-707a-84995f000000", + "x-ms-client-request-id" : "b656f87f-10e3-4679-b742-026250f9b661" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aa/javablobbulksetaccesstier4192309fd79c22f23e463d", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ec/javablobbulksetaccesstier4890431f387b8e0b5e46c4", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ad3320eb-88b9-47d8-af76-d355d68c9f99", + "x-ms-client-request-id" : "b202bc1d-197b-48a8-8259-fd30cffe454a", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:55 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:10 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:55 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B08989943D", + "ETag" : "0x8D75291E764CBCA", "Content-Length" : "0", - "x-ms-request-id" : "50480e04-d01e-00d1-0c99-838d29000000", - "x-ms-client-request-id" : "ad3320eb-88b9-47d8-af76-d355d68c9f99" + "x-ms-request-id" : "a0ed4c35-d01e-007b-547a-845bc6000000", + "x-ms-client-request-id" : "b202bc1d-197b-48a8-8259-fd30cffe454a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aa/javablobbulksetaccesstier532260bc9679f385db4c02", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ec/javablobbulksetaccesstier587408fb08802d0e884b22", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d7121e86-6f7d-4e51-aa5a-39ed1ea44b4c", + "x-ms-client-request-id" : "2acffaa1-d43e-427f-8adb-714993372219", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:56 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:10 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:55 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B08990258A", + "ETag" : "0x8D75291E76BF96D", "Content-Length" : "0", - "x-ms-request-id" : "50480e15-d01e-00d1-1799-838d29000000", - "x-ms-client-request-id" : "d7121e86-6f7d-4e51-aa5a-39ed1ea44b4c" + "x-ms-request-id" : "92e359a9-201e-006e-097a-84995f000000", + "x-ms-client-request-id" : "2acffaa1-d43e-427f-8adb-714993372219" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aa/javablobbulksetaccesstier6657305420686bd40c4242", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ec/javablobbulksetaccesstier629720aaf48d9346fb489a", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ec35f078-1979-4432-9fac-a845a26af730", + "x-ms-client-request-id" : "5422b491-4637-4d30-9d24-3c413bfc1d08", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:56 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:10 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:55 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B089970514", + "ETag" : "0x8D75291E7728AB5", "Content-Length" : "0", - "x-ms-request-id" : "50480e29-d01e-00d1-2a99-838d29000000", - "x-ms-client-request-id" : "ec35f078-1979-4432-9fac-a845a26af730" + "x-ms-request-id" : "a0ed4c4c-d01e-007b-697a-845bc6000000", + "x-ms-client-request-id" : "5422b491-4637-4d30-9d24-3c413bfc1d08" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aa/javablobbulksetaccesstier751174cd61272a796f47c3", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ec/javablobbulksetaccesstier71525325022103268a4f1a", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e8578bc8-01af-4101-bd48-c46478ffa6f8", + "x-ms-client-request-id" : "2de91ce2-2979-4898-b89a-7051430e7daa", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:56 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:10 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:55 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B0899D210D", + "ETag" : "0x8D75291E77C02D8", "Content-Length" : "0", - "x-ms-request-id" : "50480e46-d01e-00d1-4199-838d29000000", - "x-ms-client-request-id" : "e8578bc8-01af-4101-bd48-c46478ffa6f8" + "x-ms-request-id" : "92e359ce-201e-006e-237a-84995f000000", + "x-ms-client-request-id" : "2de91ce2-2979-4898-b89a-7051430e7daa" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aa/javablobbulksetaccesstier8836850e598cfb1a2a49f6", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ec/javablobbulksetaccesstier841267407556b84245414a", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "00a5c5db-ab4b-4015-bbd1-6f5269164441", + "x-ms-client-request-id" : "11d29277-c4c1-4629-8c7a-84dd31d17b98", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:56 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:10 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:55 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B089A3B25F", + "ETag" : "0x8D75291E781F7B9", "Content-Length" : "0", - "x-ms-request-id" : "50480e53-d01e-00d1-4c99-838d29000000", - "x-ms-client-request-id" : "00a5c5db-ab4b-4015-bbd1-6f5269164441" + "x-ms-request-id" : "a0ed4c71-d01e-007b-077a-845bc6000000", + "x-ms-client-request-id" : "11d29277-c4c1-4629-8c7a-84dd31d17b98" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aa/javablobbulksetaccesstier969118d4f9ab3f84414c48", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ec/javablobbulksetaccesstier965560bf6a9e53982c4d46", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ffcc7c06-652d-4053-ac82-24c2353e5f89", + "x-ms-client-request-id" : "94a19daa-030f-41a1-9fd8-af62ffd4ba81", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:56 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:10 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:55 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B089A9F582", + "ETag" : "0x8D75291E78D9340", "Content-Length" : "0", - "x-ms-request-id" : "50480e6f-d01e-00d1-6399-838d29000000", - "x-ms-client-request-id" : "ffcc7c06-652d-4053-ac82-24c2353e5f89" + "x-ms-request-id" : "92e359e3-201e-006e-337a-84995f000000", + "x-ms-client-request-id" : "94a19daa-030f-41a1-9fd8-af62ffd4ba81" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aa/javablobbulksetaccesstier1032521c8483f07f86c49f", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ec/javablobbulksetaccesstier108585669a990e18d4c4f5", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "70091e7c-a785-49cf-af00-f3b758267593", + "x-ms-client-request-id" : "8fc9e97b-28af-48df-81de-c1dba946e46f", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:56 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:10 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:55 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B089B05FB8", + "ETag" : "0x8D75291E7938822", "Content-Length" : "0", - "x-ms-request-id" : "50480e85-d01e-00d1-7799-838d29000000", - "x-ms-client-request-id" : "70091e7c-a785-49cf-af00-f3b758267593" + "x-ms-request-id" : "a0ed4c92-d01e-007b-227a-845bc6000000", + "x-ms-client-request-id" : "8fc9e97b-28af-48df-81de-c1dba946e46f" }, "Exception" : null }, { @@ -276,8 +276,8 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f6e57e87-246e-439c-9f5e-aff8c7c2a948", - "Content-Type" : "multipart/mixed; boundary=batch_af6a8ec2-f93f-40b8-a41c-3c3e8dec4035" + "x-ms-client-request-id" : "d3484fee-601c-4556-aca4-5d0981fcdb1a", + "Content-Type" : "multipart/mixed; boundary=batch_bfb13207-09f8-47d1-9ee4-7e83528ed81d" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -285,11 +285,11 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480e98-d01e-00d1-0999-838d29000000", - "Body" : "--batchresponse_00311dd8-7ebb-4d0d-9ed2-f6358ae094d6\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 50480e98-d01e-00d1-0999-838d291e2063\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 30537944-cffc-43fc-9fc1-52d1bc78ceef\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_00311dd8-7ebb-4d0d-9ed2-f6358ae094d6\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 50480e98-d01e-00d1-0999-838d291e2065\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 5372c9af-ac1f-4242-a9f4-a1741b6820e6\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_00311dd8-7ebb-4d0d-9ed2-f6358ae094d6\r\nContent-Type: application/http\r\nContent-ID: 2\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 50480e98-d01e-00d1-0999-838d291e2066\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 04af4fc3-fd37-43bd-8c01-46146f7283d2\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_00311dd8-7ebb-4d0d-9ed2-f6358ae094d6\r\nContent-Type: application/http\r\nContent-ID: 3\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 50480e98-d01e-00d1-0999-838d291e2067\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 4c4f68a0-fd63-432a-beee-5dc21c6db87e\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_00311dd8-7ebb-4d0d-9ed2-f6358ae094d6\r\nContent-Type: application/http\r\nContent-ID: 4\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 50480e98-d01e-00d1-0999-838d291e2068\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: a5fbb807-3508-473d-80ff-5ba25dd9a7a3\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_00311dd8-7ebb-4d0d-9ed2-f6358ae094d6\r\nContent-Type: application/http\r\nContent-ID: 5\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 50480e98-d01e-00d1-0999-838d291e2069\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: d2a63c5d-3e75-4882-b7a3-cc8126c5755f\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_00311dd8-7ebb-4d0d-9ed2-f6358ae094d6\r\nContent-Type: application/http\r\nContent-ID: 6\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 50480e98-d01e-00d1-0999-838d291e206a\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 0e6b1423-bc8d-427f-a788-a1a2ede114ee\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_00311dd8-7ebb-4d0d-9ed2-f6358ae094d6\r\nContent-Type: application/http\r\nContent-ID: 7\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 50480e98-d01e-00d1-0999-838d291e206b\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 3c03d5b5-ec08-422f-b391-a49ee082b872\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_00311dd8-7ebb-4d0d-9ed2-f6358ae094d6\r\nContent-Type: application/http\r\nContent-ID: 8\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 50480e98-d01e-00d1-0999-838d291e206c\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 8c8d798c-f933-4fbc-b69f-3ce2f42bdd09\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_00311dd8-7ebb-4d0d-9ed2-f6358ae094d6\r\nContent-Type: application/http\r\nContent-ID: 9\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 50480e98-d01e-00d1-0999-838d291e206d\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 703861b2-741a-4239-b80b-bae50d3861ce\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_00311dd8-7ebb-4d0d-9ed2-f6358ae094d6--", - "Date" : "Tue, 15 Oct 2019 20:44:55 GMT", - "x-ms-client-request-id" : "f6e57e87-246e-439c-9f5e-aff8c7c2a948", - "Content-Type" : "multipart/mixed; boundary=batchresponse_00311dd8-7ebb-4d0d-9ed2-f6358ae094d6" + "x-ms-request-id" : "92e35a0b-201e-006e-517a-84995f000000", + "Body" : "--batchresponse_7095c348-6e48-4145-8b0c-e1c0e6369887\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 92e35a0b-201e-006e-517a-84995f1e4c4b\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 3a6a4852-deb2-4d32-b301-4c51fa29844c\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_7095c348-6e48-4145-8b0c-e1c0e6369887\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 92e35a0b-201e-006e-517a-84995f1e4c4d\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 8cd337cd-3a94-4e34-9c02-cd8b760faf78\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_7095c348-6e48-4145-8b0c-e1c0e6369887\r\nContent-Type: application/http\r\nContent-ID: 2\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 92e35a0b-201e-006e-517a-84995f1e4c4e\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 38d34d10-1628-4a71-b673-37f375654600\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_7095c348-6e48-4145-8b0c-e1c0e6369887\r\nContent-Type: application/http\r\nContent-ID: 3\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 92e35a0b-201e-006e-517a-84995f1e4c4f\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 851749d3-dac4-4633-afaa-89f66f353eef\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_7095c348-6e48-4145-8b0c-e1c0e6369887\r\nContent-Type: application/http\r\nContent-ID: 4\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 92e35a0b-201e-006e-517a-84995f1e4c50\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 857b6df2-1833-40f4-9ed4-97d0cff2a26a\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_7095c348-6e48-4145-8b0c-e1c0e6369887\r\nContent-Type: application/http\r\nContent-ID: 5\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 92e35a0b-201e-006e-517a-84995f1e4c51\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: d3a545fe-7e28-419f-b97a-048e9df99061\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_7095c348-6e48-4145-8b0c-e1c0e6369887\r\nContent-Type: application/http\r\nContent-ID: 6\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 92e35a0b-201e-006e-517a-84995f1e4c52\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 6af4b974-a60c-4dbd-8450-905af63147c6\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_7095c348-6e48-4145-8b0c-e1c0e6369887\r\nContent-Type: application/http\r\nContent-ID: 7\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 92e35a0b-201e-006e-517a-84995f1e4c53\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 2d396ed3-6b35-4fd1-a4f5-070e8013bd94\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_7095c348-6e48-4145-8b0c-e1c0e6369887\r\nContent-Type: application/http\r\nContent-ID: 8\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 92e35a0b-201e-006e-517a-84995f1e4c54\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 2ee8de27-136b-4500-b85a-a9ca363d8c1e\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_7095c348-6e48-4145-8b0c-e1c0e6369887\r\nContent-Type: application/http\r\nContent-ID: 9\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 92e35a0b-201e-006e-517a-84995f1e4c55\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 0d4ac8f2-953f-478d-96de-c80fe0296f8f\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_7095c348-6e48-4145-8b0c-e1c0e6369887--", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", + "x-ms-client-request-id" : "d3484fee-601c-4556-aca4-5d0981fcdb1a", + "Content-Type" : "multipart/mixed; boundary=batchresponse_7095c348-6e48-4145-8b0c-e1c0e6369887" }, "Exception" : null }, { @@ -298,7 +298,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f09c3c26-a20d-48bb-be04-0a196ed5cac2" + "x-ms-client-request-id" : "3d52d1cd-6c15-4f0a-90bc-8edf7d6c5dc0" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -306,20 +306,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "50480ea4-d01e-00d1-1499-838d29000000", - "Body" : "jtcbulksetaccesstierjtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aaTue, 15 Oct 2019 20:44:55 GMT\"0x8D751B0896F0969\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:55 GMT", - "x-ms-client-request-id" : "f09c3c26-a20d-48bb-be04-0a196ed5cac2", + "x-ms-request-id" : "a0ed4cb9-d01e-007b-3c7a-845bc6000000", + "Body" : "jtcbulksetaccesstierjtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ecWed, 16 Oct 2019 23:38:10 GMT\"0x8D75291E74C024C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", + "x-ms-client-request-id" : "3d52d1cd-6c15-4f0a-90bc-8edf7d6c5dc0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aa?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ec?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3c73923d-8b1d-4b9d-bd1e-d76a00861c12" + "x-ms-client-request-id" : "a1137ed5-e37f-41f0-bf78-d98e76fc58e2" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -327,11 +327,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480eb8-d01e-00d1-2599-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:55 GMT", - "x-ms-client-request-id" : "3c73923d-8b1d-4b9d-bd1e-d76a00861c12" + "x-ms-request-id" : "92e35a2d-201e-006e-687a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:09 GMT", + "x-ms-client-request-id" : "a1137ed5-e37f-41f0-bf78-d98e76fc58e2" }, "Exception" : null } ], - "variables" : [ "jtcbulksetaccesstier0batchapitestbulksetaccesstier63f63488aa", "javablobbulksetaccesstier195316017c365481a44f36", "javablobbulksetaccesstier21671465cd3350207f4b52", "javablobbulksetaccesstier333270871bd2af08b34041", "javablobbulksetaccesstier4192309fd79c22f23e463d", "javablobbulksetaccesstier532260bc9679f385db4c02", "javablobbulksetaccesstier6657305420686bd40c4242", "javablobbulksetaccesstier751174cd61272a796f47c3", "javablobbulksetaccesstier8836850e598cfb1a2a49f6", "javablobbulksetaccesstier969118d4f9ab3f84414c48", "javablobbulksetaccesstier1032521c8483f07f86c49f" ] + "variables" : [ "jtcbulksetaccesstier0batchapitestbulksetaccesstiere1670439ec", "javablobbulksetaccesstier149311fc70da810cd245bd", "javablobbulksetaccesstier234524257b6eb284884372", "javablobbulksetaccesstier389174b4df6ff179264223", "javablobbulksetaccesstier4890431f387b8e0b5e46c4", "javablobbulksetaccesstier587408fb08802d0e884b22", "javablobbulksetaccesstier629720aaf48d9346fb489a", "javablobbulksetaccesstier71525325022103268a4f1a", "javablobbulksetaccesstier841267407556b84245414a", "javablobbulksetaccesstier965560bf6a9e53982c4d46", "javablobbulksetaccesstier108585669a990e18d4c4f5" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeletebloballsucceed.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeletebloballsucceed.json index 7a5370d31449..9a7e19f97bb5 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeletebloballsucceed.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeletebloballsucceed.json @@ -1,88 +1,88 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeletebloballsucceed025231cbe3e87edadb4bc48?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeletebloballsucceed013823abf2e360c66847199?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "38e6604f-0333-4578-98dd-71c0585148b7" + "x-ms-client-request-id" : "e6fdc742-0c98-4d54-9454-ade434670330" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B088007A75", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:53 GMT", + "ETag" : "0x8D75291E5DD2C6F", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:07 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480963-d01e-00d1-2199-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "38e6604f-0333-4578-98dd-71c0585148b7" + "x-ms-request-id" : "92e354e6-201e-006e-797a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "e6fdc742-0c98-4d54-9454-ade434670330" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeletebloballsucceed198436fb34be5ae4074ba6b?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeletebloballsucceed150736010152f08782415aa?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "96b7001a-63da-4300-a2f2-14bcb4ba341c" + "x-ms-client-request-id" : "bf5e9d86-a6b9-4b42-9060-05ca73f81eea" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B088095639", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:53 GMT", + "ETag" : "0x8D75291E5E53BE6", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:07 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480979-d01e-00d1-3199-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "96b7001a-63da-4300-a2f2-14bcb4ba341c" + "x-ms-request-id" : "a0ed4859-d01e-007b-047a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "bf5e9d86-a6b9-4b42-9060-05ca73f81eea" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeletebloballsucceed198436fb34be5ae4074ba6b/javablobdeletebloballsucceed235178f1601100a4a14a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeletebloballsucceed150736010152f08782415aa/javablobdeletebloballsucceed23783925d2c1416f174a", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "bed20a9b-4075-4abc-a2a5-efc080433cc2" + "x-ms-client-request-id" : "d5ca4be4-9c9b-41aa-aa14-5f0ab8ec1a8a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B088129D25", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:53 GMT", + "ETag" : "0x8D75291E5ECC511", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:07 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480998-d01e-00d1-4499-838d29000000", + "x-ms-request-id" : "92e35514-201e-006e-207a-84995f000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "bed20a9b-4075-4abc-a2a5-efc080433cc2" + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "d5ca4be4-9c9b-41aa-aa14-5f0ab8ec1a8a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeletebloballsucceed198436fb34be5ae4074ba6b/javablobdeletebloballsucceed35450525c73db7820846", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeletebloballsucceed150736010152f08782415aa/javablobdeletebloballsucceed35999600327abff2434d", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cacc1424-ed69-4357-b6d7-757d4e2ff30c" + "x-ms-client-request-id" : "42374d19-d354-4a8c-9b22-007718d9522b" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B088192E72", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:53 GMT", + "ETag" : "0x8D75291E5F30821", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:07 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "504809a1-d01e-00d1-4c99-838d29000000", + "x-ms-request-id" : "a0ed4874-d01e-007b-1d7a-845bc6000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "cacc1424-ed69-4357-b6d7-757d4e2ff30c" + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "42374d19-d354-4a8c-9b22-007718d9522b" }, "Exception" : null }, { @@ -91,8 +91,8 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "019afc55-f8f2-450c-b7b2-df1964b0ff12", - "Content-Type" : "multipart/mixed; boundary=batch_e1dc5052-41ec-4804-9350-160067ccef6a" + "x-ms-client-request-id" : "c577a0a9-d987-4ff6-90e7-c818d235755c", + "Content-Type" : "multipart/mixed; boundary=batch_8bc661ce-24a5-4f3f-9a18-5b0b8d4fad27" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -100,11 +100,11 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "202", - "x-ms-request-id" : "504809ae-d01e-00d1-5499-838d29000000", - "Body" : "--batchresponse_d7868d2e-c713-4848-980f-9efceca83a0e\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 504809ae-d01e-00d1-5499-838d291e1ff3\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 70825596-706f-497e-83b5-fd9b1ab7420c\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_d7868d2e-c713-4848-980f-9efceca83a0e\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 504809ae-d01e-00d1-5499-838d291e1ff6\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: b6682f17-4f27-43f0-9b20-4b67a93eb911\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_d7868d2e-c713-4848-980f-9efceca83a0e--", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "019afc55-f8f2-450c-b7b2-df1964b0ff12", - "Content-Type" : "multipart/mixed; boundary=batchresponse_d7868d2e-c713-4848-980f-9efceca83a0e" + "x-ms-request-id" : "92e35546-201e-006e-497a-84995f000000", + "Body" : "--batchresponse_8d279bf5-b324-4c67-ab71-2f5a5d67d3aa\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 92e35546-201e-006e-497a-84995f1e4bce\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: df36235d-7fde-4c00-83f8-eb4b457d367a\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_8d279bf5-b324-4c67-ab71-2f5a5d67d3aa\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 92e35546-201e-006e-497a-84995f1e4bd0\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 735fe533-2f56-4f0b-a376-d0a8fcace549\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_8d279bf5-b324-4c67-ab71-2f5a5d67d3aa--", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "c577a0a9-d987-4ff6-90e7-c818d235755c", + "Content-Type" : "multipart/mixed; boundary=batchresponse_8d279bf5-b324-4c67-ab71-2f5a5d67d3aa" }, "Exception" : null }, { @@ -113,7 +113,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e0502afb-a7c6-4573-9c33-6435dd09840e" + "x-ms-client-request-id" : "2d22b9a2-0830-46e5-9bfb-d5371419e6fb" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -121,20 +121,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "504809c3-d01e-00d1-6499-838d29000000", - "Body" : "jtcdeletebloballsucceedjtcdeletebloballsucceed025231cbe3e87edadb4bc48Tue, 15 Oct 2019 20:44:53 GMT\"0x8D751B088007A75\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcdeletebloballsucceed198436fb34be5ae4074ba6bTue, 15 Oct 2019 20:44:53 GMT\"0x8D751B088095639\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "e0502afb-a7c6-4573-9c33-6435dd09840e", + "x-ms-request-id" : "a0ed489a-d01e-007b-3d7a-845bc6000000", + "Body" : "jtcdeletebloballsucceedjtcdeletebloballsucceed013823abf2e360c66847199Wed, 16 Oct 2019 23:38:07 GMT\"0x8D75291E5DD2C6F\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcdeletebloballsucceed150736010152f08782415aaWed, 16 Oct 2019 23:38:07 GMT\"0x8D75291E5E53BE6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "2d22b9a2-0830-46e5-9bfb-d5371419e6fb", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeletebloballsucceed025231cbe3e87edadb4bc48?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeletebloballsucceed013823abf2e360c66847199?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "73edec1c-0e65-4e71-b570-8b48ac708536" + "x-ms-client-request-id" : "3eebbf37-03ca-4bb2-8bae-aef4b81d1da1" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -142,18 +142,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "504809cd-d01e-00d1-6a99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "73edec1c-0e65-4e71-b570-8b48ac708536" + "x-ms-request-id" : "92e3557f-201e-006e-7f7a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "3eebbf37-03ca-4bb2-8bae-aef4b81d1da1" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeletebloballsucceed198436fb34be5ae4074ba6b?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeletebloballsucceed150736010152f08782415aa?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1bb0b2c7-7340-402a-be84-4638783b6c8e" + "x-ms-client-request-id" : "3cf34b43-b312-4945-a76d-1ed838b3d4ee" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -161,11 +161,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "504809dc-d01e-00d1-7599-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "1bb0b2c7-7340-402a-be84-4638783b6c8e" + "x-ms-request-id" : "a0ed48be-d01e-007b-5d7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "3cf34b43-b312-4945-a76d-1ed838b3d4ee" }, "Exception" : null } ], - "variables" : [ "jtcdeletebloballsucceed025231cbe3e87edadb4bc48", "jtcdeletebloballsucceed198436fb34be5ae4074ba6b", "javablobdeletebloballsucceed235178f1601100a4a14a", "javablobdeletebloballsucceed35450525c73db7820846" ] + "variables" : [ "jtcdeletebloballsucceed013823abf2e360c66847199", "jtcdeletebloballsucceed150736010152f08782415aa", "javablobdeletebloballsucceed23783925d2c1416f174a", "javablobdeletebloballsucceed35999600327abff2434d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobnonesucceeddonotthrowonanyerror.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobnonesucceeddonotthrowonanyerror.json index 90175e77897d..11272230479c 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobnonesucceeddonotthrowonanyerror.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobnonesucceeddonotthrowonanyerror.json @@ -1,44 +1,44 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceeddonotthrowonanyerror071060c02a40?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceeddonotthrowonanyerror0782744daa5b?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d9ef02c5-8264-4fa4-85f2-0e8753e77eeb" + "x-ms-client-request-id" : "c3b4ffce-08b1-476f-8639-824d4f44896e" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B088D031EF", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:54 GMT", + "ETag" : "0x8D75291E6B34DA2", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480bc9-d01e-00d1-3999-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "d9ef02c5-8264-4fa4-85f2-0e8753e77eeb" + "x-ms-request-id" : "92e357d6-201e-006e-2c7a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "c3b4ffce-08b1-476f-8639-824d4f44896e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceeddonotthrowonanyerror168546b1f06d?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceeddonotthrowonanyerror148915027b5f?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8c2f61b4-36e8-4799-8de8-4f1079672915" + "x-ms-client-request-id" : "8a9952ba-e857-4969-a1a9-911fa59fb594" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B088D626D0", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:54 GMT", + "ETag" : "0x8D75291E6B96227", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480be1-d01e-00d1-4a99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "8c2f61b4-36e8-4799-8de8-4f1079672915" + "x-ms-request-id" : "a0ed4a86-d01e-007b-1b7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "8a9952ba-e857-4969-a1a9-911fa59fb594" }, "Exception" : null }, { @@ -47,8 +47,8 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b87ade30-291a-4af2-85fb-91a2f21f13a8", - "Content-Type" : "multipart/mixed; boundary=batch_b456f72d-c7c7-4e78-8b5d-87b9cbbfc4fc" + "x-ms-client-request-id" : "9d82298a-7b24-431f-b904-75344d7f4058", + "Content-Type" : "multipart/mixed; boundary=batch_c8117c20-c104-4fc3-9c79-7a263b9647e2" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -56,11 +56,11 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480bed-d01e-00d1-5499-838d29000000", - "Body" : "--batchresponse_8a35f512-2d0c-4f68-88a4-f384f8d097ff\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 50480bed-d01e-00d1-5499-838d291e2024\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 29b8af2c-cb65-485a-b357-6969bdfd8777\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:50480bed-d01e-00d1-5499-838d291e2024\nTime:2019-10-15T20:44:54.8484914Z\r\n--batchresponse_8a35f512-2d0c-4f68-88a4-f384f8d097ff\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 50480bed-d01e-00d1-5499-838d291e2027\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: d4012eb0-2088-4726-b1a1-44760e717174\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:50480bed-d01e-00d1-5499-838d291e2027\nTime:2019-10-15T20:44:54.8484914Z\r\n--batchresponse_8a35f512-2d0c-4f68-88a4-f384f8d097ff--", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "b87ade30-291a-4af2-85fb-91a2f21f13a8", - "Content-Type" : "multipart/mixed; boundary=batchresponse_8a35f512-2d0c-4f68-88a4-f384f8d097ff" + "x-ms-request-id" : "92e35801-201e-006e-497a-84995f000000", + "Body" : "--batchresponse_57ffa18e-34df-4faf-bf9a-a5583aeadac3\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 92e35801-201e-006e-497a-84995f1e4c0c\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 618072f7-ac71-489f-a60a-9a85ca7ea24f\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:92e35801-201e-006e-497a-84995f1e4c0c\nTime:2019-10-16T23:38:09.1321388Z\r\n--batchresponse_57ffa18e-34df-4faf-bf9a-a5583aeadac3\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 92e35801-201e-006e-497a-84995f1e4c0e\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 9b0d4113-ec72-4f68-9eb5-4800485e73ab\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:92e35801-201e-006e-497a-84995f1e4c0e\nTime:2019-10-16T23:38:09.1311376Z\r\n--batchresponse_57ffa18e-34df-4faf-bf9a-a5583aeadac3--", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "9d82298a-7b24-431f-b904-75344d7f4058", + "Content-Type" : "multipart/mixed; boundary=batchresponse_57ffa18e-34df-4faf-bf9a-a5583aeadac3" }, "Exception" : null }, { @@ -69,7 +69,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "30707777-05ee-490b-a3d1-8067a0ee3098" + "x-ms-client-request-id" : "b1aeb44d-08e4-416b-aa64-7819ee6086cb" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -77,20 +77,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "50480c03-d01e-00d1-6199-838d29000000", - "Body" : "jtcdeleteblobnonesucceeddonotthrowonanyerrorjtcdeleteblobnonesucceeddonotthrowonanyerror071060c02a40Tue, 15 Oct 2019 20:44:54 GMT\"0x8D751B088D031EF\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcdeleteblobnonesucceeddonotthrowonanyerror168546b1f06dTue, 15 Oct 2019 20:44:54 GMT\"0x8D751B088D626D0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "30707777-05ee-490b-a3d1-8067a0ee3098", + "x-ms-request-id" : "a0ed4aba-d01e-007b-3b7a-845bc6000000", + "Body" : "jtcdeleteblobnonesucceeddonotthrowonanyerrorjtcdeleteblobnonesucceeddonotthrowonanyerror0782744daa5bWed, 16 Oct 2019 23:38:09 GMT\"0x8D75291E6B34DA2\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcdeleteblobnonesucceeddonotthrowonanyerror148915027b5fWed, 16 Oct 2019 23:38:09 GMT\"0x8D75291E6B96227\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "b1aeb44d-08e4-416b-aa64-7819ee6086cb", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceeddonotthrowonanyerror071060c02a40?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceeddonotthrowonanyerror0782744daa5b?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ea7a302c-45c0-44ff-822a-07212cb31ea3" + "x-ms-client-request-id" : "b991a3ee-d485-4c0d-8d9c-5823266a8f88" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -98,18 +98,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480c0f-d01e-00d1-6a99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "ea7a302c-45c0-44ff-822a-07212cb31ea3" + "x-ms-request-id" : "92e35825-201e-006e-607a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "b991a3ee-d485-4c0d-8d9c-5823266a8f88" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceeddonotthrowonanyerror168546b1f06d?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceeddonotthrowonanyerror148915027b5f?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "68a23e48-cfca-4b36-9986-ccab8b4a467e" + "x-ms-client-request-id" : "21e610c9-a73c-4a4a-bc62-8e5b3fb76518" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -117,11 +117,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480c28-d01e-00d1-7f99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:54 GMT", - "x-ms-client-request-id" : "68a23e48-cfca-4b36-9986-ccab8b4a467e" + "x-ms-request-id" : "a0ed4ad9-d01e-007b-527a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "21e610c9-a73c-4a4a-bc62-8e5b3fb76518" }, "Exception" : null } ], - "variables" : [ "jtcdeleteblobnonesucceeddonotthrowonanyerror071060c02a40", "jtcdeleteblobnonesucceeddonotthrowonanyerror168546b1f06d", "javablobdeleteblobnonesucceeddonotthrowonanyerror246125a777", "javablobdeleteblobnonesucceeddonotthrowonanyerror3890428702" ] + "variables" : [ "jtcdeleteblobnonesucceeddonotthrowonanyerror0782744daa5b", "jtcdeleteblobnonesucceeddonotthrowonanyerror148915027b5f", "javablobdeleteblobnonesucceeddonotthrowonanyerror2555174c2e", "javablobdeleteblobnonesucceeddonotthrowonanyerror3906681aa9" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobnonesucceedthrowonanyerror.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobnonesucceedthrowonanyerror.json index f3dec9132168..aa09f449a375 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobnonesucceedthrowonanyerror.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobnonesucceedthrowonanyerror.json @@ -1,44 +1,44 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceedthrowonanyerror033539bd4c4fec8?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceedthrowonanyerror001530fd1fe8ebd?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "91d17ba7-2626-4b43-b02d-f5c6b5f7b8c9" + "x-ms-client-request-id" : "2e189481-89a8-4bf2-a139-a0dcbe8bb0de" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B08899F98A", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:54 GMT", + "ETag" : "0x8D75291E68F422E", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480b17-d01e-00d1-3a99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "91d17ba7-2626-4b43-b02d-f5c6b5f7b8c9" + "x-ms-request-id" : "92e35769-201e-006e-5f7a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "2e189481-89a8-4bf2-a139-a0dcbe8bb0de" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceedthrowonanyerror1639158d5b3428e?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceedthrowonanyerror12480995ae82de8?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "63ba7004-4b1c-404a-a283-ef680ae04e3d" + "x-ms-client-request-id" : "0b220c49-8080-4c12-8376-0011d40ef9d8" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B088A87C04", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:54 GMT", + "ETag" : "0x8D75291E695CBBD", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480b3f-d01e-00d1-5599-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "63ba7004-4b1c-404a-a283-ef680ae04e3d" + "x-ms-request-id" : "a0ed4a29-d01e-007b-547a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "0b220c49-8080-4c12-8376-0011d40ef9d8" }, "Exception" : null }, { @@ -47,8 +47,8 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a5f37ebf-184f-4a0e-bb7e-a81acd9b99a8", - "Content-Type" : "multipart/mixed; boundary=batch_6631072a-f68d-4e9b-b793-7560d9aa024f" + "x-ms-client-request-id" : "1da19afa-b7ad-4bb6-8063-1fcf8199c5aa", + "Content-Type" : "multipart/mixed; boundary=batch_d382ba35-8ef1-402a-97b6-81e34bb9ba3e" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -56,11 +56,11 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480b76-d01e-00d1-7f99-838d29000000", - "Body" : "--batchresponse_ef01bbe9-1ace-4bec-a4a0-3166c2ab7628\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 50480b76-d01e-00d1-7f99-838d291e201a\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 31ef45c4-f265-4789-971d-b1c5ccb1f5ac\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:50480b76-d01e-00d1-7f99-838d291e201a\nTime:2019-10-15T20:44:54.6192733Z\r\n--batchresponse_ef01bbe9-1ace-4bec-a4a0-3166c2ab7628\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 50480b76-d01e-00d1-7f99-838d291e201c\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: e9aa387c-fa5e-4226-bc0a-7cdf1708108d\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:50480b76-d01e-00d1-7f99-838d291e201c\nTime:2019-10-15T20:44:54.6192733Z\r\n--batchresponse_ef01bbe9-1ace-4bec-a4a0-3166c2ab7628--", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "a5f37ebf-184f-4a0e-bb7e-a81acd9b99a8", - "Content-Type" : "multipart/mixed; boundary=batchresponse_ef01bbe9-1ace-4bec-a4a0-3166c2ab7628" + "x-ms-request-id" : "92e35795-201e-006e-807a-84995f000000", + "Body" : "--batchresponse_d03f0d04-579e-4bbb-a26d-801f938c5d82\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 92e35795-201e-006e-807a-84995f1e4bff\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 689fb401-abc1-4975-9e50-2939f5eb2243\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:92e35795-201e-006e-807a-84995f1e4bff\nTime:2019-10-16T23:38:08.8999202Z\r\n--batchresponse_d03f0d04-579e-4bbb-a26d-801f938c5d82\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 92e35795-201e-006e-807a-84995f1e4c01\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 7236122b-a277-48f8-828d-9f3262f43b40\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:92e35795-201e-006e-807a-84995f1e4c01\nTime:2019-10-16T23:38:08.8999202Z\r\n--batchresponse_d03f0d04-579e-4bbb-a26d-801f938c5d82--", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "1da19afa-b7ad-4bb6-8063-1fcf8199c5aa", + "Content-Type" : "multipart/mixed; boundary=batchresponse_d03f0d04-579e-4bbb-a26d-801f938c5d82" }, "Exception" : null }, { @@ -69,7 +69,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3cf0b980-f70c-41a7-9fc0-0ff26c0ec857" + "x-ms-client-request-id" : "bc9536f6-ccad-4d03-985b-6102418a15d2" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -77,20 +77,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "50480b8a-d01e-00d1-0d99-838d29000000", - "Body" : "jtcdeleteblobnonesucceedthrowonanyerrorjtcdeleteblobnonesucceedthrowonanyerror033539bd4c4fec8Tue, 15 Oct 2019 20:44:54 GMT\"0x8D751B08899F98A\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcdeleteblobnonesucceedthrowonanyerror1639158d5b3428eTue, 15 Oct 2019 20:44:54 GMT\"0x8D751B088A87C04\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "3cf0b980-f70c-41a7-9fc0-0ff26c0ec857", + "x-ms-request-id" : "a0ed4a47-d01e-007b-687a-845bc6000000", + "Body" : "jtcdeleteblobnonesucceedthrowonanyerrorjtcdeleteblobnonesucceedthrowonanyerror001530fd1fe8ebdWed, 16 Oct 2019 23:38:08 GMT\"0x8D75291E68F422E\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcdeleteblobnonesucceedthrowonanyerror12480995ae82de8Wed, 16 Oct 2019 23:38:08 GMT\"0x8D75291E695CBBD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "bc9536f6-ccad-4d03-985b-6102418a15d2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceedthrowonanyerror033539bd4c4fec8?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceedthrowonanyerror001530fd1fe8ebd?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9ff68c8b-20a9-4d76-8887-48939a6bce6a" + "x-ms-client-request-id" : "45a5c66a-cc7a-4bb5-8476-95a81f909c96" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -98,18 +98,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480b9e-d01e-00d1-1b99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "9ff68c8b-20a9-4d76-8887-48939a6bce6a" + "x-ms-request-id" : "92e357b5-201e-006e-167a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "45a5c66a-cc7a-4bb5-8476-95a81f909c96" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceedthrowonanyerror1639158d5b3428e?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobnonesucceedthrowonanyerror12480995ae82de8?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "94ba3b59-a006-4073-95bc-03cd0d7be0f3" + "x-ms-client-request-id" : "fc54889b-b214-4cf2-a53d-212c8b0ef410" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -117,11 +117,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480bb5-d01e-00d1-2899-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "94ba3b59-a006-4073-95bc-03cd0d7be0f3" + "x-ms-request-id" : "a0ed4a5f-d01e-007b-7e7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "fc54889b-b214-4cf2-a53d-212c8b0ef410" }, "Exception" : null } ], - "variables" : [ "jtcdeleteblobnonesucceedthrowonanyerror033539bd4c4fec8", "jtcdeleteblobnonesucceedthrowonanyerror1639158d5b3428e", "javablobdeleteblobnonesucceedthrowonanyerror203548c8f7d6", "javablobdeleteblobnonesucceedthrowonanyerror337225765ae4" ] + "variables" : [ "jtcdeleteblobnonesucceedthrowonanyerror001530fd1fe8ebd", "jtcdeleteblobnonesucceedthrowonanyerror12480995ae82de8", "javablobdeleteblobnonesucceedthrowonanyerror22538078e239", "javablobdeleteblobnonesucceedthrowonanyerror337110794fd3" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobsomesucceeddonotthrowonanyerror.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobsomesucceeddonotthrowonanyerror.json index a7ee0cbc3364..9b7897b78802 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobsomesucceeddonotthrowonanyerror.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobsomesucceeddonotthrowonanyerror.json @@ -1,66 +1,66 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceeddonotthrowonanyerror066218d50e45?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceeddonotthrowonanyerror0564618f0738?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3f3b3700-8c4a-471c-8fc0-663bac127f59" + "x-ms-client-request-id" : "45e70ee9-ac90-4cc8-bed9-bb52dc49f2be" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B08871801D", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:54 GMT", + "ETag" : "0x8D75291E66512C8", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480a96-d01e-00d1-6a99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "3f3b3700-8c4a-471c-8fc0-663bac127f59" + "x-ms-request-id" : "a0ed4999-d01e-007b-717a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "45e70ee9-ac90-4cc8-bed9-bb52dc49f2be" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceeddonotthrowonanyerror194593fc8351?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceeddonotthrowonanyerror1386245a1187?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2ade61e5-b31c-41d2-ac86-47eb33f124ac" + "x-ms-client-request-id" : "81238ac8-a010-495a-beb9-5badb9f4cfd1" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B088774DEB", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:54 GMT", + "ETag" : "0x8D75291E66B0FA3", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480a9f-d01e-00d1-6e99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "2ade61e5-b31c-41d2-ac86-47eb33f124ac" + "x-ms-request-id" : "92e356ee-201e-006e-077a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "81238ac8-a010-495a-beb9-5badb9f4cfd1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceeddonotthrowonanyerror194593fc8351/javablobdeleteblobsomesucceeddonotthrowonanyerror214183dd36", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceeddonotthrowonanyerror1386245a1187/javablobdeleteblobsomesucceeddonotthrowonanyerror2516593903", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "883e686f-7da1-4134-a097-b80219f674ad" + "x-ms-client-request-id" : "82cb94ea-65c2-4ba1-b59b-a76288e9791e" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B0887DAE76", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:54 GMT", + "ETag" : "0x8D75291E671CC92", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480aba-d01e-00d1-7c99-838d29000000", + "x-ms-request-id" : "a0ed49c1-d01e-007b-0c7a-845bc6000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "883e686f-7da1-4134-a097-b80219f674ad" + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "82cb94ea-65c2-4ba1-b59b-a76288e9791e" }, "Exception" : null }, { @@ -69,8 +69,8 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5ee52e6d-544c-4bfe-bd54-588676578e19", - "Content-Type" : "multipart/mixed; boundary=batch_8bd050a9-731d-4425-9369-11917cb42ce4" + "x-ms-client-request-id" : "29af7814-7cd8-495e-9c7b-1bf151461e2d", + "Content-Type" : "multipart/mixed; boundary=batch_1527798d-a929-4314-8558-26b8e4d538ee" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -78,11 +78,11 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480ad4-d01e-00d1-0c99-838d29000000", - "Body" : "--batchresponse_6e83fe91-64ad-4353-a872-e5b5de4e7017\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 50480ad4-d01e-00d1-0c99-838d291e2010\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: d5ac7a22-2c13-4cfc-820b-9adf4dfedd23\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_6e83fe91-64ad-4353-a872-e5b5de4e7017\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 50480ad4-d01e-00d1-0c99-838d291e2012\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 59ab01c5-0b7d-4995-bf2d-e44ad4a6ab3d\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:50480ad4-d01e-00d1-0c99-838d291e2012\nTime:2019-10-15T20:44:54.2639356Z\r\n--batchresponse_6e83fe91-64ad-4353-a872-e5b5de4e7017--", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "5ee52e6d-544c-4bfe-bd54-588676578e19", - "Content-Type" : "multipart/mixed; boundary=batchresponse_6e83fe91-64ad-4353-a872-e5b5de4e7017" + "x-ms-request-id" : "92e35719-201e-006e-267a-84995f000000", + "Body" : "--batchresponse_804e3309-68ba-420e-a38c-52547eab95c3\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 92e35719-201e-006e-267a-84995f1e4bf5\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: fb09a745-3b47-4326-82db-32c48927c9d2\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_804e3309-68ba-420e-a38c-52547eab95c3\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 92e35719-201e-006e-267a-84995f1e4bf7\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: ef24c3cb-abc8-4ed2-aa9a-e5d88e1e0df0\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:92e35719-201e-006e-267a-84995f1e4bf7\nTime:2019-10-16T23:38:08.6566911Z\r\n--batchresponse_804e3309-68ba-420e-a38c-52547eab95c3--", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "29af7814-7cd8-495e-9c7b-1bf151461e2d", + "Content-Type" : "multipart/mixed; boundary=batchresponse_804e3309-68ba-420e-a38c-52547eab95c3" }, "Exception" : null }, { @@ -91,7 +91,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1a741b3c-578b-493d-af82-ef3a8cca0e64" + "x-ms-client-request-id" : "96811b41-9797-4ab2-a84b-40098db37de3" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -99,20 +99,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "50480ae0-d01e-00d1-1599-838d29000000", - "Body" : "jtcdeleteblobsomesucceeddonotthrowonanyerrorjtcdeleteblobsomesucceeddonotthrowonanyerror066218d50e45Tue, 15 Oct 2019 20:44:54 GMT\"0x8D751B08871801D\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcdeleteblobsomesucceeddonotthrowonanyerror194593fc8351Tue, 15 Oct 2019 20:44:54 GMT\"0x8D751B088774DEB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "1a741b3c-578b-493d-af82-ef3a8cca0e64", + "x-ms-request-id" : "a0ed49e6-d01e-007b-237a-845bc6000000", + "Body" : "jtcdeleteblobsomesucceeddonotthrowonanyerrorjtcdeleteblobsomesucceeddonotthrowonanyerror0564618f0738Wed, 16 Oct 2019 23:38:08 GMT\"0x8D75291E66512C8\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcdeleteblobsomesucceeddonotthrowonanyerror1386245a1187Wed, 16 Oct 2019 23:38:08 GMT\"0x8D75291E66B0FA3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "96811b41-9797-4ab2-a84b-40098db37de3", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceeddonotthrowonanyerror066218d50e45?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceeddonotthrowonanyerror0564618f0738?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "211299ba-cb41-477f-8a33-50bed638f5f0" + "x-ms-client-request-id" : "58ae0c91-b93e-42ed-bd54-bee6fb727dcd" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -120,18 +120,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480aee-d01e-00d1-1e99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "211299ba-cb41-477f-8a33-50bed638f5f0" + "x-ms-request-id" : "92e35738-201e-006e-3e7a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:08 GMT", + "x-ms-client-request-id" : "58ae0c91-b93e-42ed-bd54-bee6fb727dcd" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceeddonotthrowonanyerror194593fc8351?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceeddonotthrowonanyerror1386245a1187?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2add28c6-77bf-4f96-82d5-6b9f0776a671" + "x-ms-client-request-id" : "ffaa868c-8474-4eae-941f-fb48df053857" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -139,11 +139,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480b00-d01e-00d1-2b99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "2add28c6-77bf-4f96-82d5-6b9f0776a671" + "x-ms-request-id" : "a0ed4a0d-d01e-007b-3d7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "ffaa868c-8474-4eae-941f-fb48df053857" }, "Exception" : null } ], - "variables" : [ "jtcdeleteblobsomesucceeddonotthrowonanyerror066218d50e45", "jtcdeleteblobsomesucceeddonotthrowonanyerror194593fc8351", "javablobdeleteblobsomesucceeddonotthrowonanyerror214183dd36", "javablobdeleteblobsomesucceeddonotthrowonanyerror342508e720" ] + "variables" : [ "jtcdeleteblobsomesucceeddonotthrowonanyerror0564618f0738", "jtcdeleteblobsomesucceeddonotthrowonanyerror1386245a1187", "javablobdeleteblobsomesucceeddonotthrowonanyerror2516593903", "javablobdeleteblobsomesucceeddonotthrowonanyerror336407a148" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobsomesucceedthrowonanyerror.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobsomesucceedthrowonanyerror.json index abebdebfdde8..7efc7601ddb9 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobsomesucceedthrowonanyerror.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestdeleteblobsomesucceedthrowonanyerror.json @@ -1,66 +1,66 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceedthrowonanyerror0338070d4c0b719?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceedthrowonanyerror022410d2736d482?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b9795582-85ac-4afb-bce2-8846c0278c51" + "x-ms-client-request-id" : "b2192c5a-a3dc-401d-a9d3-ecbc9b5b8c5a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B0883C808A", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:53 GMT", + "ETag" : "0x8D75291E6144F3C", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "504809ee-d01e-00d1-0199-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "b9795582-85ac-4afb-bce2-8846c0278c51" + "x-ms-request-id" : "92e3559d-201e-006e-1b7a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "b2192c5a-a3dc-401d-a9d3-ecbc9b5b8c5a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceedthrowonanyerror181464f679c9fb5?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceedthrowonanyerror137277889a7a363?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cde31b6c-4d43-49e2-9070-d68b48368b49" + "x-ms-client-request-id" : "e4a875a6-4bfc-4d0d-881f-339ad99c33b2" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B08842756E", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:53 GMT", + "ETag" : "0x8D75291E6211B32", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480a01-d01e-00d1-0d99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "cde31b6c-4d43-49e2-9070-d68b48368b49" + "x-ms-request-id" : "a0ed48d7-d01e-007b-767a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "e4a875a6-4bfc-4d0d-881f-339ad99c33b2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceedthrowonanyerror181464f679c9fb5/javablobdeleteblobsomesucceedthrowonanyerror234602944b5a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceedthrowonanyerror137277889a7a363/javablobdeleteblobsomesucceedthrowonanyerror21427740a0de", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d589e5e6-c1cc-4dd0-b8df-1bdf7476ef6e" + "x-ms-client-request-id" : "c3a062e2-76a1-43a2-b2f9-a4488526ffea" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B08849C053", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:53 GMT", + "ETag" : "0x8D75291E6287CE1", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480a17-d01e-00d1-1999-838d29000000", + "x-ms-request-id" : "92e3560a-201e-006e-6a7a-84995f000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "d589e5e6-c1cc-4dd0-b8df-1bdf7476ef6e" + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "c3a062e2-76a1-43a2-b2f9-a4488526ffea" }, "Exception" : null }, { @@ -69,8 +69,8 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6fdacd4a-912d-4c88-b996-ff239a7b9885", - "Content-Type" : "multipart/mixed; boundary=batch_817129f1-7559-4d2c-8091-75865664cbfe" + "x-ms-client-request-id" : "054d316e-2ca7-40dd-b6f8-3b34f692e991", + "Content-Type" : "multipart/mixed; boundary=batch_fca8569a-f798-4e79-bbc9-08da23157fff" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -78,11 +78,11 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480a2a-d01e-00d1-2499-838d29000000", - "Body" : "--batchresponse_471fa051-85dd-451d-95df-297c8a9b5174\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: 50480a2a-d01e-00d1-2499-838d291e2000\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: e8b270b2-f939-49cd-a462-6b6ecb0b621f\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_471fa051-85dd-451d-95df-297c8a9b5174\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 50480a2a-d01e-00d1-2499-838d291e2002\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: d49881cd-2425-4c7c-b3d8-be0c4adac9a7\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:50480a2a-d01e-00d1-2499-838d291e2002\nTime:2019-10-15T20:44:53.9226108Z\r\n--batchresponse_471fa051-85dd-451d-95df-297c8a9b5174--", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "6fdacd4a-912d-4c88-b996-ff239a7b9885", - "Content-Type" : "multipart/mixed; boundary=batchresponse_471fa051-85dd-451d-95df-297c8a9b5174" + "x-ms-request-id" : "a0ed4912-d01e-007b-177a-845bc6000000", + "Body" : "--batchresponse_c951ab3a-9c96-41fe-b982-1dabc17d6185\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: true\r\nx-ms-request-id: a0ed4912-d01e-007b-177a-845bc61e10a2\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 4684deef-ad90-4d15-a579-eef756fe4328\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_c951ab3a-9c96-41fe-b982-1dabc17d6185\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: a0ed4912-d01e-007b-177a-845bc61e10a8\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 8717374e-b4ad-4fab-9e2b-333e932403ed\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:a0ed4912-d01e-007b-177a-845bc61e10a8\nTime:2019-10-16T23:38:08.3842268Z\r\n--batchresponse_c951ab3a-9c96-41fe-b982-1dabc17d6185--", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "054d316e-2ca7-40dd-b6f8-3b34f692e991", + "Content-Type" : "multipart/mixed; boundary=batchresponse_c951ab3a-9c96-41fe-b982-1dabc17d6185" }, "Exception" : null }, { @@ -91,7 +91,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cd419fa0-b98d-4ed1-a094-da405dfb05fd" + "x-ms-client-request-id" : "b151bd32-785b-491c-b8a5-531a87da339d" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -99,20 +99,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "50480a3e-d01e-00d1-3299-838d29000000", - "Body" : "jtcdeleteblobsomesucceedthrowonanyerrorjtcdeleteblobsomesucceedthrowonanyerror0338070d4c0b719Tue, 15 Oct 2019 20:44:53 GMT\"0x8D751B0883C808A\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcdeleteblobsomesucceedthrowonanyerror181464f679c9fb5Tue, 15 Oct 2019 20:44:53 GMT\"0x8D751B08842756E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "cd419fa0-b98d-4ed1-a094-da405dfb05fd", + "x-ms-request-id" : "92e356b3-201e-006e-617a-84995f000000", + "Body" : "jtcdeleteblobsomesucceedthrowonanyerrorjtcdeleteblobsomesucceedthrowonanyerror022410d2736d482Wed, 16 Oct 2019 23:38:08 GMT\"0x8D75291E6144F3C\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcdeleteblobsomesucceedthrowonanyerror137277889a7a363Wed, 16 Oct 2019 23:38:08 GMT\"0x8D75291E6211B32\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "b151bd32-785b-491c-b8a5-531a87da339d", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceedthrowonanyerror0338070d4c0b719?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceedthrowonanyerror022410d2736d482?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d6721c94-8221-46bf-a020-ce90d136f034" + "x-ms-client-request-id" : "1e9bbcba-631a-4106-b103-38b6b0c122a4" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -120,18 +120,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480a4a-d01e-00d1-3c99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "d6721c94-8221-46bf-a020-ce90d136f034" + "x-ms-request-id" : "a0ed4974-d01e-007b-577a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "1e9bbcba-631a-4106-b103-38b6b0c122a4" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceedthrowonanyerror181464f679c9fb5?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdeleteblobsomesucceedthrowonanyerror137277889a7a363?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "665c59df-fa57-40f6-a593-3fa1f52c8e18" + "x-ms-client-request-id" : "02bcea0a-6134-401e-8f13-aad9b9ee895d" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -139,11 +139,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480a7b-d01e-00d1-5b99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:53 GMT", - "x-ms-client-request-id" : "665c59df-fa57-40f6-a593-3fa1f52c8e18" + "x-ms-request-id" : "92e356d4-201e-006e-767a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:07 GMT", + "x-ms-client-request-id" : "02bcea0a-6134-401e-8f13-aad9b9ee895d" }, "Exception" : null } ], - "variables" : [ "jtcdeleteblobsomesucceedthrowonanyerror0338070d4c0b719", "jtcdeleteblobsomesucceedthrowonanyerror181464f679c9fb5", "javablobdeleteblobsomesucceedthrowonanyerror234602944b5a", "javablobdeleteblobsomesucceedthrowonanyerror354446bfd00e" ] + "variables" : [ "jtcdeleteblobsomesucceedthrowonanyerror022410d2736d482", "jtcdeleteblobsomesucceedthrowonanyerror137277889a7a363", "javablobdeleteblobsomesucceedthrowonanyerror21427740a0de", "javablobdeleteblobsomesucceedthrowonanyerror380207e3b5f7" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestemptybatch.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestemptybatch.json index 913f1d38f20d..b6e8a695fac8 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestemptybatch.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestemptybatch.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcemptybatch0batchapitestemptybatch585189410a9ea361f?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcemptybatch0batchapitestemptybatche0b11844e22165d3a?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "fe80fb29-5127-409f-80fe-cbab9e4badc1" + "x-ms-client-request-id" : "76d44622-bcfc-4df4-a7a9-07786b242475" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B085E1358E", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:49 GMT", + "ETag" : "0x8D75291E4111982", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:04 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5048048f-d01e-00d1-2e99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:48 GMT", - "x-ms-client-request-id" : "fe80fb29-5127-409f-80fe-cbab9e4badc1" + "x-ms-request-id" : "a0ed4446-d01e-007b-0b7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:03 GMT", + "x-ms-client-request-id" : "76d44622-bcfc-4df4-a7a9-07786b242475" }, "Exception" : null }, { @@ -26,7 +26,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "19e7c9b3-2788-4935-b38c-9568d09b71f8" + "x-ms-client-request-id" : "b90a1a35-dce9-4478-a641-018e3031cb25" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "50480502-d01e-00d1-1299-838d29000000", - "Body" : "jtcemptybatchjtcemptybatch0batchapitestemptybatch585189410a9ea361fTue, 15 Oct 2019 20:44:49 GMT\"0x8D751B085E1358E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:49 GMT", - "x-ms-client-request-id" : "19e7c9b3-2788-4935-b38c-9568d09b71f8", + "x-ms-request-id" : "a0ed4483-d01e-007b-407a-845bc6000000", + "Body" : "jtcemptybatchjtcemptybatch0batchapitestemptybatche0b11844e22165d3aWed, 16 Oct 2019 23:38:04 GMT\"0x8D75291E4111982\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:04 GMT", + "x-ms-client-request-id" : "b90a1a35-dce9-4478-a641-018e3031cb25", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcemptybatch0batchapitestemptybatch585189410a9ea361f?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcemptybatch0batchapitestemptybatche0b11844e22165d3a?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7b49ebb4-6ac8-41b3-abc9-acbc67640037" + "x-ms-client-request-id" : "f7f6de59-57d0-4482-acf4-164ba6a17f6d" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5048053b-d01e-00d1-3f99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:49 GMT", - "x-ms-client-request-id" : "7b49ebb4-6ac8-41b3-abc9-acbc67640037" + "x-ms-request-id" : "a0ed44bc-d01e-007b-737a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:04 GMT", + "x-ms-client-request-id" : "f7f6de59-57d0-4482-acf4-164ba6a17f6d" }, "Exception" : null } ], - "variables" : [ "jtcemptybatch0batchapitestemptybatch585189410a9ea361f" ] + "variables" : [ "jtcemptybatch0batchapitestemptybatche0b11844e22165d3a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestmixedbatch.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestmixedbatch.json index ae946b060af1..1ab19dd847a9 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestmixedbatch.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestmixedbatch.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcmixedbatch0batchapitestmixedbatch5bf892452d54fc754?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcmixedbatch0batchapitestmixedbatch97922492ff2ef7d82?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7cd1f931-370f-4706-a863-e45bd77d8e87" + "x-ms-client-request-id" : "7866be74-071f-4dbe-9fbc-b3778633a59c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B08638445B", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:50 GMT", + "ETag" : "0x8D75291E4542683", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:05 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5048054f-d01e-00d1-5099-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:49 GMT", - "x-ms-client-request-id" : "7cd1f931-370f-4706-a863-e45bd77d8e87" + "x-ms-request-id" : "a0ed44da-d01e-007b-0b7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:04 GMT", + "x-ms-client-request-id" : "7866be74-071f-4dbe-9fbc-b3778633a59c" }, "Exception" : null }, { @@ -26,7 +26,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d5efeb32-427c-4202-80ad-a1f6b750780f" + "x-ms-client-request-id" : "7482378e-962f-49ec-8582-f0229773e89a" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5048056d-d01e-00d1-6899-838d29000000", - "Body" : "jtcmixedbatchjtcmixedbatch0batchapitestmixedbatch5bf892452d54fc754Tue, 15 Oct 2019 20:44:50 GMT\"0x8D751B08638445B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:49 GMT", - "x-ms-client-request-id" : "d5efeb32-427c-4202-80ad-a1f6b750780f", + "x-ms-request-id" : "a0ed44fd-d01e-007b-257a-845bc6000000", + "Body" : "jtcmixedbatchjtcmixedbatch0batchapitestmixedbatch97922492ff2ef7d82Wed, 16 Oct 2019 23:38:05 GMT\"0x8D75291E4542683\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:04 GMT", + "x-ms-client-request-id" : "7482378e-962f-49ec-8582-f0229773e89a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcmixedbatch0batchapitestmixedbatch5bf892452d54fc754?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcmixedbatch0batchapitestmixedbatch97922492ff2ef7d82?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d2d00510-6736-415a-8614-f88e4556d6a4" + "x-ms-client-request-id" : "215c5ddc-ddc8-4f19-9111-84c5428fe2d0" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480581-d01e-00d1-7699-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:49 GMT", - "x-ms-client-request-id" : "d2d00510-6736-415a-8614-f88e4556d6a4" + "x-ms-request-id" : "a0ed450c-d01e-007b-317a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:04 GMT", + "x-ms-client-request-id" : "215c5ddc-ddc8-4f19-9111-84c5428fe2d0" }, "Exception" : null } ], - "variables" : [ "jtcmixedbatch0batchapitestmixedbatch5bf892452d54fc754" ] + "variables" : [ "jtcmixedbatch0batchapitestmixedbatch97922492ff2ef7d82" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettierallsucceed.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettierallsucceed.json index a661a16c7373..c2f5fe9fa821 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettierallsucceed.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettierallsucceed.json @@ -1,94 +1,94 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettierallsucceed0batchapitestsettierallsucceed64436339cc?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettierallsucceed0batchapitestsettierallsucceed8b763830eb?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "341444fb-158a-4542-abeb-04d7b3d6e747" + "x-ms-client-request-id" : "e5e2180c-d9f0-4175-af6f-0f523bfc0c79" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B0865177D0", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:50 GMT", + "ETag" : "0x8D75291E46B36A2", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:05 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480593-d01e-00d1-0799-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:49 GMT", - "x-ms-client-request-id" : "341444fb-158a-4542-abeb-04d7b3d6e747" + "x-ms-request-id" : "a0ed451a-d01e-007b-3d7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:04 GMT", + "x-ms-client-request-id" : "e5e2180c-d9f0-4175-af6f-0f523bfc0c79" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettierallsucceed1batchapitestsettierallsucceed6440252316?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettierallsucceed1batchapitestsettierallsucceed8b7618999d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "00147bab-b505-4c04-9849-46bb8c17835c" + "x-ms-client-request-id" : "70595794-33af-4daf-8d44-738d23272abe" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B08659B73B", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:50 GMT", + "ETag" : "0x8D75291E472D9A6", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:05 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "504805ab-d01e-00d1-1b99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:49 GMT", - "x-ms-client-request-id" : "00147bab-b505-4c04-9849-46bb8c17835c" + "x-ms-request-id" : "a0ed4528-d01e-007b-497a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:04 GMT", + "x-ms-client-request-id" : "70595794-33af-4daf-8d44-738d23272abe" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettierallsucceed1batchapitestsettierallsucceed6440252316/javablobsettierallsucceed231958a5fef2d854b94541", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettierallsucceed1batchapitestsettierallsucceed8b7618999d/javablobsettierallsucceed2564926008cd3da159431e", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2d652750-29cb-4e42-aa46-d2c8b2fc9a01", + "x-ms-client-request-id" : "a8f8b33d-2ada-4ffa-8872-4f9a4a3433c6", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:50 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:05 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:49 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:04 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B0866AC630", + "ETag" : "0x8D75291E4858B49", "Content-Length" : "0", - "x-ms-request-id" : "504805cb-d01e-00d1-3499-838d29000000", - "x-ms-client-request-id" : "2d652750-29cb-4e42-aa46-d2c8b2fc9a01" + "x-ms-request-id" : "a0ed454b-d01e-007b-687a-845bc6000000", + "x-ms-client-request-id" : "a8f8b33d-2ada-4ffa-8872-4f9a4a3433c6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettierallsucceed1batchapitestsettierallsucceed6440252316/javablobsettierallsucceed320531879c3dfd92364c01", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettierallsucceed1batchapitestsettierallsucceed8b7618999d/javablobsettierallsucceed37420473b4987f1297402f", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c9cde2a1-726b-4bf7-9b39-d86bb275e2a7", + "x-ms-client-request-id" : "54fc71a7-a1b5-4a46-9d6e-f49a06898d84", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:50 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:05 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:49 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:04 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B08675501D", + "ETag" : "0x8D75291E495468A", "Content-Length" : "0", - "x-ms-request-id" : "504805e1-d01e-00d1-4599-838d29000000", - "x-ms-client-request-id" : "c9cde2a1-726b-4bf7-9b39-d86bb275e2a7" + "x-ms-request-id" : "a0ed4561-d01e-007b-7a7a-845bc6000000", + "x-ms-client-request-id" : "54fc71a7-a1b5-4a46-9d6e-f49a06898d84" }, "Exception" : null }, { @@ -97,8 +97,8 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "74ed4daa-179b-4c8d-b517-b928d0a443cd", - "Content-Type" : "multipart/mixed; boundary=batch_c3073ea6-7dcc-46e9-bbd5-c00d7bc8d719" + "x-ms-client-request-id" : "157a08f2-0632-4d1d-a531-cf80167b0074", + "Content-Type" : "multipart/mixed; boundary=batch_72d381cd-5fe9-479b-9b37-f46eb0808276" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -106,11 +106,11 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "202", - "x-ms-request-id" : "504805f2-d01e-00d1-5499-838d29000000", - "Body" : "--batchresponse_275fe2be-fe4b-4043-92ed-1cee49569c3c\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 504805f2-d01e-00d1-5499-838d291e1fa6\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: d6cee10d-8468-4d46-b466-0bc061b55211\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_275fe2be-fe4b-4043-92ed-1cee49569c3c\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 504805f2-d01e-00d1-5499-838d291e1fa9\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: bf86b9ec-10b9-482b-a1b7-10b24910fecb\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_275fe2be-fe4b-4043-92ed-1cee49569c3c--", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "74ed4daa-179b-4c8d-b517-b928d0a443cd", - "Content-Type" : "multipart/mixed; boundary=batchresponse_275fe2be-fe4b-4043-92ed-1cee49569c3c" + "x-ms-request-id" : "a0ed457a-d01e-007b-127a-845bc6000000", + "Body" : "--batchresponse_2e3abb2d-c84d-4a63-a4bd-bf05179b94d5\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: a0ed457a-d01e-007b-127a-845bc61e1042\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: b9067874-3342-4351-9547-a26e5324e6fd\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_2e3abb2d-c84d-4a63-a4bd-bf05179b94d5\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: a0ed457a-d01e-007b-127a-845bc61e1045\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 69117cd3-bd24-4667-b5b2-68eafa7e5069\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_2e3abb2d-c84d-4a63-a4bd-bf05179b94d5--", + "Date" : "Wed, 16 Oct 2019 23:38:05 GMT", + "x-ms-client-request-id" : "157a08f2-0632-4d1d-a531-cf80167b0074", + "Content-Type" : "multipart/mixed; boundary=batchresponse_2e3abb2d-c84d-4a63-a4bd-bf05179b94d5" }, "Exception" : null }, { @@ -119,7 +119,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e970d629-3de8-4114-aa2f-c776e8c89b45" + "x-ms-client-request-id" : "abf01920-e12a-441c-8e5a-6f30bcce3d13" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -127,20 +127,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "50480718-d01e-00d1-5499-838d29000000", - "Body" : "jtcsettierallsucceedjtcsettierallsucceed0batchapitestsettierallsucceed64436339ccTue, 15 Oct 2019 20:44:50 GMT\"0x8D751B0865177D0\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcsettierallsucceed1batchapitestsettierallsucceed6440252316Tue, 15 Oct 2019 20:44:50 GMT\"0x8D751B08659B73B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "e970d629-3de8-4114-aa2f-c776e8c89b45", + "x-ms-request-id" : "a0ed45c4-d01e-007b-507a-845bc6000000", + "Body" : "jtcsettierallsucceedjtcsettierallsucceed0batchapitestsettierallsucceed8b763830ebWed, 16 Oct 2019 23:38:05 GMT\"0x8D75291E46B36A2\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcsettierallsucceed1batchapitestsettierallsucceed8b7618999dWed, 16 Oct 2019 23:38:05 GMT\"0x8D75291E472D9A6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:05 GMT", + "x-ms-client-request-id" : "abf01920-e12a-441c-8e5a-6f30bcce3d13", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettierallsucceed0batchapitestsettierallsucceed64436339cc?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettierallsucceed0batchapitestsettierallsucceed8b763830eb?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "de38b486-c46b-4462-8fd8-c3b7c48c3553" + "x-ms-client-request-id" : "ed762cc5-c53b-4a1c-9a61-655ed1e808dc" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -148,18 +148,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480729-d01e-00d1-6499-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "de38b486-c46b-4462-8fd8-c3b7c48c3553" + "x-ms-request-id" : "92e35173-201e-006e-7c7a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:05 GMT", + "x-ms-client-request-id" : "ed762cc5-c53b-4a1c-9a61-655ed1e808dc" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettierallsucceed1batchapitestsettierallsucceed6440252316?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettierallsucceed1batchapitestsettierallsucceed8b7618999d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9b7c6636-9afc-49cd-8400-f4a4a27eb2b5" + "x-ms-client-request-id" : "fb1b5ee1-35f1-48ac-a5f8-94b9cfedb8c4" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -167,11 +167,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5048073f-d01e-00d1-7899-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "9b7c6636-9afc-49cd-8400-f4a4a27eb2b5" + "x-ms-request-id" : "a0ed464e-d01e-007b-467a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:05 GMT", + "x-ms-client-request-id" : "fb1b5ee1-35f1-48ac-a5f8-94b9cfedb8c4" }, "Exception" : null } ], - "variables" : [ "jtcsettierallsucceed0batchapitestsettierallsucceed64436339cc", "jtcsettierallsucceed1batchapitestsettierallsucceed6440252316", "javablobsettierallsucceed231958a5fef2d854b94541", "javablobsettierallsucceed320531879c3dfd92364c01" ] + "variables" : [ "jtcsettierallsucceed0batchapitestsettierallsucceed8b763830eb", "jtcsettierallsucceed1batchapitestsettierallsucceed8b7618999d", "javablobsettierallsucceed2564926008cd3da159431e", "javablobsettierallsucceed37420473b4987f1297402f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiernonesucceeddonotthrowonanyerror.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiernonesucceeddonotthrowonanyerror.json index 2dd2468cc6a3..e9b1067b7793 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiernonesucceeddonotthrowonanyerror.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiernonesucceeddonotthrowonanyerror.json @@ -1,44 +1,44 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceeddonotthrowonanyerror016397c73a0f3b?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceeddonotthrowonanyerror0468828c018e8b?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c8b2e863-e8e3-4150-a30d-214dd73a47cf" + "x-ms-client-request-id" : "291597d9-ed88-4d27-b226-e1523561dbb0" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B087DA2483", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:53 GMT", + "ETag" : "0x8D75291E5BACF07", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:07 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "504808f1-d01e-00d1-5799-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "c8b2e863-e8e3-4150-a30d-214dd73a47cf" + "x-ms-request-id" : "92e3546d-201e-006e-167a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "291597d9-ed88-4d27-b226-e1523561dbb0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceeddonotthrowonanyerror13341977724863?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceeddonotthrowonanyerror1309717e7f87b0?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "dd10abcb-57ec-48f7-a700-7995e2d944d0" + "x-ms-client-request-id" : "b8d40fbf-d823-40c5-9edd-4ee9e0f41f39" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B087E10403", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:53 GMT", + "ETag" : "0x8D75291E5C093EB", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:07 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480904-d01e-00d1-6699-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "dd10abcb-57ec-48f7-a700-7995e2d944d0" + "x-ms-request-id" : "a0ed4801-d01e-007b-3d7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "b8d40fbf-d823-40c5-9edd-4ee9e0f41f39" }, "Exception" : null }, { @@ -47,8 +47,8 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d3285c11-2120-4331-b5fb-538fe8cac772", - "Content-Type" : "multipart/mixed; boundary=batch_9a7ec830-2baa-4438-a976-12c75e458779" + "x-ms-client-request-id" : "6179023d-35b2-4587-b3fd-b6182433b606", + "Content-Type" : "multipart/mixed; boundary=batch_d0357343-9cb1-47f5-8e5f-45ff904e2260" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -56,11 +56,11 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5048091e-d01e-00d1-7999-838d29000000", - "Body" : "--batchresponse_194275f8-5892-4711-b17a-529be99b3ea1\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 5048091e-d01e-00d1-7999-838d291e1fe7\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 2e4a3c1f-9281-48b2-903f-950aba2d7fb6\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:5048091e-d01e-00d1-7999-838d291e1fe7\nTime:2019-10-15T20:44:53.2469723Z\r\n--batchresponse_194275f8-5892-4711-b17a-529be99b3ea1\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 5048091e-d01e-00d1-7999-838d291e1fe9\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 435f12b6-1f92-4edf-89f9-e9c918574984\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:5048091e-d01e-00d1-7999-838d291e1fe9\nTime:2019-10-15T20:44:53.2479730Z\r\n--batchresponse_194275f8-5892-4711-b17a-529be99b3ea1--", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "d3285c11-2120-4331-b5fb-538fe8cac772", - "Content-Type" : "multipart/mixed; boundary=batchresponse_194275f8-5892-4711-b17a-529be99b3ea1" + "x-ms-request-id" : "92e35491-201e-006e-367a-84995f000000", + "Body" : "--batchresponse_4eabb6cb-42bc-4076-85e6-90a0c7d5dd48\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 92e35491-201e-006e-367a-84995f1e4bb3\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 07c3368c-4427-4580-a829-0d3a86af0cc8\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:92e35491-201e-006e-367a-84995f1e4bb3\nTime:2019-10-16T23:38:07.4976002Z\r\n--batchresponse_4eabb6cb-42bc-4076-85e6-90a0c7d5dd48\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 92e35491-201e-006e-367a-84995f1e4bb5\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 5a4e0bcd-159b-4749-a34c-6826d4aac081\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:92e35491-201e-006e-367a-84995f1e4bb5\nTime:2019-10-16T23:38:07.4976002Z\r\n--batchresponse_4eabb6cb-42bc-4076-85e6-90a0c7d5dd48--", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "6179023d-35b2-4587-b3fd-b6182433b606", + "Content-Type" : "multipart/mixed; boundary=batchresponse_4eabb6cb-42bc-4076-85e6-90a0c7d5dd48" }, "Exception" : null }, { @@ -69,7 +69,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "59d8f0b4-9347-4974-a5a7-ac9b74b1532e" + "x-ms-client-request-id" : "7eba04eb-6658-4252-a3f3-7ea5a5c010ab" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -77,20 +77,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "50480934-d01e-00d1-0699-838d29000000", - "Body" : "jtcsettiernonesucceeddonotthrowonanyerrorjtcsettiernonesucceeddonotthrowonanyerror016397c73a0f3bTue, 15 Oct 2019 20:44:53 GMT\"0x8D751B087DA2483\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcsettiernonesucceeddonotthrowonanyerror13341977724863Tue, 15 Oct 2019 20:44:53 GMT\"0x8D751B087E10403\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "59d8f0b4-9347-4974-a5a7-ac9b74b1532e", + "x-ms-request-id" : "a0ed4813-d01e-007b-4b7a-845bc6000000", + "Body" : "jtcsettiernonesucceeddonotthrowonanyerrorjtcsettiernonesucceeddonotthrowonanyerror0468828c018e8bWed, 16 Oct 2019 23:38:07 GMT\"0x8D75291E5BACF07\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcsettiernonesucceeddonotthrowonanyerror1309717e7f87b0Wed, 16 Oct 2019 23:38:07 GMT\"0x8D75291E5C093EB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "7eba04eb-6658-4252-a3f3-7ea5a5c010ab", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceeddonotthrowonanyerror016397c73a0f3b?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceeddonotthrowonanyerror0468828c018e8b?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "05d34ebc-7209-4832-9d95-32fd80af3489" + "x-ms-client-request-id" : "140a4739-e116-40aa-a7dd-6296f173b31b" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -98,18 +98,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480943-d01e-00d1-0e99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "05d34ebc-7209-4832-9d95-32fd80af3489" + "x-ms-request-id" : "92e354b3-201e-006e-507a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "140a4739-e116-40aa-a7dd-6296f173b31b" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceeddonotthrowonanyerror13341977724863?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceeddonotthrowonanyerror1309717e7f87b0?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f2e5fc76-9050-4f8f-b176-b08cec4b1f27" + "x-ms-client-request-id" : "ad77d6b6-345f-4079-ac2a-989acba47ff8" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -117,11 +117,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480954-d01e-00d1-1899-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "f2e5fc76-9050-4f8f-b176-b08cec4b1f27" + "x-ms-request-id" : "a0ed4833-d01e-007b-667a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "ad77d6b6-345f-4079-ac2a-989acba47ff8" }, "Exception" : null } ], - "variables" : [ "jtcsettiernonesucceeddonotthrowonanyerror016397c73a0f3b", "jtcsettiernonesucceeddonotthrowonanyerror13341977724863", "javablobsettiernonesucceeddonotthrowonanyerror244581b1b4b", "javablobsettiernonesucceeddonotthrowonanyerror30260502978" ] + "variables" : [ "jtcsettiernonesucceeddonotthrowonanyerror0468828c018e8b", "jtcsettiernonesucceeddonotthrowonanyerror1309717e7f87b0", "javablobsettiernonesucceeddonotthrowonanyerror260916b46d4", "javablobsettiernonesucceeddonotthrowonanyerror3346329fcb1" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiernonesucceedthrowonanyerror.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiernonesucceedthrowonanyerror.json index 118a677d2e58..fcf2f44443a6 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiernonesucceedthrowonanyerror.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiernonesucceedthrowonanyerror.json @@ -1,44 +1,44 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceedthrowonanyerror0122354c27ad3020?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceedthrowonanyerror0284624a0d37d5ba?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cbe37a34-3a88-4448-8a34-eaa2028d1f7b" + "x-ms-client-request-id" : "4b660799-60e2-461d-b291-af85c68c4bc4" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B087B135D8", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:52 GMT", + "ETag" : "0x8D75291E5908091", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:07 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480832-d01e-00d1-4f99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "cbe37a34-3a88-4448-8a34-eaa2028d1f7b" + "x-ms-request-id" : "92e353da-201e-006e-1e7a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "4b660799-60e2-461d-b291-af85c68c4bc4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceedthrowonanyerror109566a3a6cbf421?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceedthrowonanyerror1611235d53065363?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "041df245-4c9e-485e-8399-e64241719880" + "x-ms-client-request-id" : "e95ba399-aa67-45e8-846b-30f40fbb981c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B087B99C53", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:52 GMT", + "ETag" : "0x8D75291E598DDD4", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:07 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480845-d01e-00d1-5e99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "041df245-4c9e-485e-8399-e64241719880" + "x-ms-request-id" : "a0ed47b3-d01e-007b-7c7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "e95ba399-aa67-45e8-846b-30f40fbb981c" }, "Exception" : null }, { @@ -47,8 +47,8 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ec9decad-d512-41c9-85fc-0438b0c6de1c", - "Content-Type" : "multipart/mixed; boundary=batch_c15fbcf3-30ed-4e43-9ffb-52cfd398d23a" + "x-ms-client-request-id" : "a2532709-b46b-426c-bb32-ef1f97a0a582", + "Content-Type" : "multipart/mixed; boundary=batch_075eaa0c-56c2-4bbe-b6b6-e6a512ad864e" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -56,11 +56,11 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5048085f-d01e-00d1-7599-838d29000000", - "Body" : "--batchresponse_5a10e1aa-9489-4cf9-bb5b-25b7c7b3ec3d\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 5048085f-d01e-00d1-7599-838d291e1fda\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 91008f02-712f-45a8-abe9-e5c9ca9125eb\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:5048085f-d01e-00d1-7599-838d291e1fda\nTime:2019-10-15T20:44:52.9847246Z\r\n--batchresponse_5a10e1aa-9489-4cf9-bb5b-25b7c7b3ec3d\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 5048085f-d01e-00d1-7599-838d291e1fdc\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 4119db68-ffcc-4227-b00d-147c050006d2\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:5048085f-d01e-00d1-7599-838d291e1fdc\nTime:2019-10-15T20:44:52.9847246Z\r\n--batchresponse_5a10e1aa-9489-4cf9-bb5b-25b7c7b3ec3d--", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "ec9decad-d512-41c9-85fc-0438b0c6de1c", - "Content-Type" : "multipart/mixed; boundary=batchresponse_5a10e1aa-9489-4cf9-bb5b-25b7c7b3ec3d" + "x-ms-request-id" : "92e3541a-201e-006e-507a-84995f000000", + "Body" : "--batchresponse_923ebe8c-e839-410d-b30a-4aea6e9d2805\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 92e3541a-201e-006e-507a-84995f1e4ba7\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 80e09ee6-e7a8-4477-89fe-5d0e17d6dac2\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:92e3541a-201e-006e-507a-84995f1e4ba7\nTime:2019-10-16T23:38:07.2543710Z\r\n--batchresponse_923ebe8c-e839-410d-b30a-4aea6e9d2805\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 92e3541a-201e-006e-507a-84995f1e4ba9\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 41b78b17-390d-4f9b-ad0f-516fab9fc207\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:92e3541a-201e-006e-507a-84995f1e4ba9\nTime:2019-10-16T23:38:07.2543710Z\r\n--batchresponse_923ebe8c-e839-410d-b30a-4aea6e9d2805--", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "a2532709-b46b-426c-bb32-ef1f97a0a582", + "Content-Type" : "multipart/mixed; boundary=batchresponse_923ebe8c-e839-410d-b30a-4aea6e9d2805" }, "Exception" : null }, { @@ -69,7 +69,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "de72b7dc-dc0a-4ba8-92e5-dc822bf1f708" + "x-ms-client-request-id" : "601752f8-1034-4b38-aab6-1c0d4f09d3a7" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -77,20 +77,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5048088b-d01e-00d1-0e99-838d29000000", - "Body" : "jtcsettiernonesucceedthrowonanyerrorjtcsettiernonesucceedthrowonanyerror0122354c27ad3020Tue, 15 Oct 2019 20:44:52 GMT\"0x8D751B087B135D8\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcsettiernonesucceedthrowonanyerror109566a3a6cbf421Tue, 15 Oct 2019 20:44:52 GMT\"0x8D751B087B99C53\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "de72b7dc-dc0a-4ba8-92e5-dc822bf1f708", + "x-ms-request-id" : "a0ed47d4-d01e-007b-147a-845bc6000000", + "Body" : "jtcsettiernonesucceedthrowonanyerrorjtcsettiernonesucceedthrowonanyerror0284624a0d37d5baWed, 16 Oct 2019 23:38:07 GMT\"0x8D75291E5908091\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcsettiernonesucceedthrowonanyerror1611235d53065363Wed, 16 Oct 2019 23:38:07 GMT\"0x8D75291E598DDD4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "601752f8-1034-4b38-aab6-1c0d4f09d3a7", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceedthrowonanyerror0122354c27ad3020?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceedthrowonanyerror0284624a0d37d5ba?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8e12ba26-7298-4d44-b9f1-03b497b34788" + "x-ms-client-request-id" : "3fe41a4d-a4fe-4c21-acf6-d208932c8d99" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -98,18 +98,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "504808a1-d01e-00d1-1e99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "8e12ba26-7298-4d44-b9f1-03b497b34788" + "x-ms-request-id" : "92e35445-201e-006e-757a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "3fe41a4d-a4fe-4c21-acf6-d208932c8d99" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceedthrowonanyerror109566a3a6cbf421?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiernonesucceedthrowonanyerror1611235d53065363?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "beac6616-bf7a-4658-8f5a-613d34ec5348" + "x-ms-client-request-id" : "138c013f-5948-489b-83bd-bbcf82e53e3c" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -117,11 +117,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "504808d3-d01e-00d1-3f99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:52 GMT", - "x-ms-client-request-id" : "beac6616-bf7a-4658-8f5a-613d34ec5348" + "x-ms-request-id" : "a0ed47ec-d01e-007b-2a7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "138c013f-5948-489b-83bd-bbcf82e53e3c" }, "Exception" : null } ], - "variables" : [ "jtcsettiernonesucceedthrowonanyerror0122354c27ad3020", "jtcsettiernonesucceedthrowonanyerror109566a3a6cbf421", "javablobsettiernonesucceedthrowonanyerror293461e26d515c", "javablobsettiernonesucceedthrowonanyerror39431104f8110a" ] + "variables" : [ "jtcsettiernonesucceedthrowonanyerror0284624a0d37d5ba", "jtcsettiernonesucceedthrowonanyerror1611235d53065363", "javablobsettiernonesucceedthrowonanyerror25913826aeb703", "javablobsettiernonesucceedthrowonanyerror3049334df40b1c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiersomesucceeddonotthrowonanyerror.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiersomesucceeddonotthrowonanyerror.json index 6228120467ec..ad7654635f36 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiersomesucceeddonotthrowonanyerror.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiersomesucceeddonotthrowonanyerror.json @@ -1,69 +1,69 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceeddonotthrowonanyerror089360596a12f0?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceeddonotthrowonanyerror0467166f40024b?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ba06cde4-7a90-4f09-91cd-82a128b834d3" + "x-ms-client-request-id" : "791842d0-2ebd-41da-baad-8a8b88ed20b5" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B08784006F", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:52 GMT", + "ETag" : "0x8D75291E53DAEFF", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "504807dc-d01e-00d1-0199-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "ba06cde4-7a90-4f09-91cd-82a128b834d3" + "x-ms-request-id" : "a0ed46f6-d01e-007b-5b7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:05 GMT", + "x-ms-client-request-id" : "791842d0-2ebd-41da-baad-8a8b88ed20b5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceeddonotthrowonanyerror114329deec9c28?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceeddonotthrowonanyerror1658554daeac55?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "80ebf7ec-9a6c-4200-91a4-6fee19f17f2f" + "x-ms-client-request-id" : "fae4686e-6b16-46a8-a2b9-dc93346c22cc" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B0878B5535", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:52 GMT", + "ETag" : "0x8D75291E543D4B3", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "504807ee-d01e-00d1-1099-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "80ebf7ec-9a6c-4200-91a4-6fee19f17f2f" + "x-ms-request-id" : "92e3528e-201e-006e-787a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "fae4686e-6b16-46a8-a2b9-dc93346c22cc" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceeddonotthrowonanyerror114329deec9c28/javablobsettiersomesucceeddonotthrowonanyerror215478eab9d", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceeddonotthrowonanyerror1658554daeac55/javablobsettiersomesucceeddonotthrowonanyerror2456863a585", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "acf61ddf-1922-4d4b-817b-f11e68198f5f", + "x-ms-client-request-id" : "7a4798e8-bfcc-46a9-ad0b-f99bc2738798", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:52 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:06 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:05 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B08792ED56", + "ETag" : "0x8D75291E554CD31", "Content-Length" : "0", - "x-ms-request-id" : "50480805-d01e-00d1-2599-838d29000000", - "x-ms-client-request-id" : "acf61ddf-1922-4d4b-817b-f11e68198f5f" + "x-ms-request-id" : "a0ed4717-d01e-007b-777a-845bc6000000", + "x-ms-client-request-id" : "7a4798e8-bfcc-46a9-ad0b-f99bc2738798" }, "Exception" : null }, { @@ -72,8 +72,8 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "26b6096d-e536-4d6d-aada-009009756b3e", - "Content-Type" : "multipart/mixed; boundary=batch_742955bd-a906-4cd6-b52d-eb25418b855a" + "x-ms-client-request-id" : "88b75356-821a-4626-8309-f8837151f4fe", + "Content-Type" : "multipart/mixed; boundary=batch_6289616b-30d3-4163-a54e-8e434ad7fcdd" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -81,11 +81,11 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480810-d01e-00d1-2f99-838d29000000", - "Body" : "--batchresponse_d2993a5d-1457-4c59-87e2-30a648941ede\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 50480810-d01e-00d1-2f99-838d291e1fcf\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: d8f77c68-892c-470e-bd89-651a723a2605\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_d2993a5d-1457-4c59-87e2-30a648941ede\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 50480810-d01e-00d1-2f99-838d291e1fd1\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: fb87b83f-7005-4d36-89e6-727fbd36f5d7\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:50480810-d01e-00d1-2f99-838d291e1fd1\nTime:2019-10-15T20:44:52.7354890Z\r\n--batchresponse_d2993a5d-1457-4c59-87e2-30a648941ede--", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "26b6096d-e536-4d6d-aada-009009756b3e", - "Content-Type" : "multipart/mixed; boundary=batchresponse_d2993a5d-1457-4c59-87e2-30a648941ede" + "x-ms-request-id" : "92e352f2-201e-006e-517a-84995f000000", + "Body" : "--batchresponse_dfa35da8-006a-48d5-afdc-fc542d16f4a2\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 92e352f2-201e-006e-517a-84995f1e4b9b\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 30ff0717-19b2-4374-a4d4-f46b67fd804c\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_dfa35da8-006a-48d5-afdc-fc542d16f4a2\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 92e352f2-201e-006e-517a-84995f1e4b9e\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 2c07e9de-37f2-4443-89b5-0b6818f7c7ab\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:92e352f2-201e-006e-517a-84995f1e4b9e\nTime:2019-10-16T23:38:06.9701049Z\r\n--batchresponse_dfa35da8-006a-48d5-afdc-fc542d16f4a2--", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "88b75356-821a-4626-8309-f8837151f4fe", + "Content-Type" : "multipart/mixed; boundary=batchresponse_dfa35da8-006a-48d5-afdc-fc542d16f4a2" }, "Exception" : null }, { @@ -94,7 +94,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "775893fb-8e22-48c5-8af0-a6049f7b0ec1" + "x-ms-client-request-id" : "34555320-20cc-4f18-ae6e-0aa2ddf892c4" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -102,20 +102,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5048081b-d01e-00d1-3999-838d29000000", - "Body" : "jtcsettiersomesucceeddonotthrowonanyerrorjtcsettiersomesucceeddonotthrowonanyerror089360596a12f0Tue, 15 Oct 2019 20:44:52 GMT\"0x8D751B08784006F\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcsettiersomesucceeddonotthrowonanyerror114329deec9c28Tue, 15 Oct 2019 20:44:52 GMT\"0x8D751B0878B5535\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "775893fb-8e22-48c5-8af0-a6049f7b0ec1", + "x-ms-request-id" : "a0ed476b-d01e-007b-3d7a-845bc6000000", + "Body" : "jtcsettiersomesucceeddonotthrowonanyerrorjtcsettiersomesucceeddonotthrowonanyerror0467166f40024bWed, 16 Oct 2019 23:38:06 GMT\"0x8D75291E53DAEFF\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcsettiersomesucceeddonotthrowonanyerror1658554daeac55Wed, 16 Oct 2019 23:38:06 GMT\"0x8D75291E543D4B3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "34555320-20cc-4f18-ae6e-0aa2ddf892c4", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceeddonotthrowonanyerror089360596a12f0?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceeddonotthrowonanyerror0467166f40024b?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d830c408-c1d8-42d1-8128-08134317b06f" + "x-ms-client-request-id" : "19b24f9a-312a-4df0-838d-701a46551efc" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -123,18 +123,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480824-d01e-00d1-4299-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "d830c408-c1d8-42d1-8128-08134317b06f" + "x-ms-request-id" : "92e35397-201e-006e-697a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "19b24f9a-312a-4df0-838d-701a46551efc" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceeddonotthrowonanyerror114329deec9c28?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceeddonotthrowonanyerror1658554daeac55?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "89ab8334-870c-4bf8-903f-f2634b9e6c66" + "x-ms-client-request-id" : "e4e3585d-d3ee-4da4-a333-8a27ab1db51e" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -142,11 +142,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5048082a-d01e-00d1-4799-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "89ab8334-870c-4bf8-903f-f2634b9e6c66" + "x-ms-request-id" : "a0ed4790-d01e-007b-5e7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:06 GMT", + "x-ms-client-request-id" : "e4e3585d-d3ee-4da4-a333-8a27ab1db51e" }, "Exception" : null } ], - "variables" : [ "jtcsettiersomesucceeddonotthrowonanyerror089360596a12f0", "jtcsettiersomesucceeddonotthrowonanyerror114329deec9c28", "javablobsettiersomesucceeddonotthrowonanyerror215478eab9d", "javablobsettiersomesucceeddonotthrowonanyerror354764c650b" ] + "variables" : [ "jtcsettiersomesucceeddonotthrowonanyerror0467166f40024b", "jtcsettiersomesucceeddonotthrowonanyerror1658554daeac55", "javablobsettiersomesucceeddonotthrowonanyerror2456863a585", "javablobsettiersomesucceeddonotthrowonanyerror3937793747c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiersomesucceedthrowonanyerror.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiersomesucceedthrowonanyerror.json index a4c143564adf..70a2ca36fe87 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiersomesucceedthrowonanyerror.json +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITestsettiersomesucceedthrowonanyerror.json @@ -1,69 +1,69 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceedthrowonanyerror075003062d3533b8?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceedthrowonanyerror011069b305f66540?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6420f873-9f46-48f4-a3e6-87de46acbcab" + "x-ms-client-request-id" : "71b827f4-6851-494c-a189-d33a49ac4687" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B087470FC1", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:52 GMT", + "ETag" : "0x8D75291E501647F", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480755-d01e-00d1-0b99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "6420f873-9f46-48f4-a3e6-87de46acbcab" + "x-ms-request-id" : "92e351af-201e-006e-327a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:05 GMT", + "x-ms-client-request-id" : "71b827f4-6851-494c-a189-d33a49ac4687" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceedthrowonanyerror187152967cbcf75a?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceedthrowonanyerror1672046b8cf6cbc5?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a3e97017-3848-4d1e-b0e4-5a803ca0e0cf" + "x-ms-client-request-id" : "c2338ef9-6de8-48ee-9eb2-a316192f1eb3" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751B0874D04B6", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:52 GMT", + "ETag" : "0x8D75291E507EBB4", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "50480760-d01e-00d1-1399-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "a3e97017-3848-4d1e-b0e4-5a803ca0e0cf" + "x-ms-request-id" : "a0ed4679-d01e-007b-6b7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:05 GMT", + "x-ms-client-request-id" : "c2338ef9-6de8-48ee-9eb2-a316192f1eb3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceedthrowonanyerror187152967cbcf75a/javablobsettiersomesucceedthrowonanyerror28698206d7459b", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceedthrowonanyerror1672046b8cf6cbc5/javablobsettiersomesucceedthrowonanyerror247425f8b98527", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "083a3639-8417-4853-90b4-83e4b18de02c", + "x-ms-client-request-id" : "c4019ab6-6397-409f-966b-f66991e5ac40", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:44:52 GMT", + "Last-Modified" : "Wed, 16 Oct 2019 23:38:06 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", + "Date" : "Wed, 16 Oct 2019 23:38:05 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751B08753B1DB", + "ETag" : "0x8D75291E51395B2", "Content-Length" : "0", - "x-ms-request-id" : "5048076d-d01e-00d1-1c99-838d29000000", - "x-ms-client-request-id" : "083a3639-8417-4853-90b4-83e4b18de02c" + "x-ms-request-id" : "92e351de-201e-006e-5e7a-84995f000000", + "x-ms-client-request-id" : "c4019ab6-6397-409f-966b-f66991e5ac40" }, "Exception" : null }, { @@ -72,8 +72,8 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "63d65606-7e87-4e00-aef8-0f9fbbd8cfb8", - "Content-Type" : "multipart/mixed; boundary=batch_a0aeb0d3-9edc-44b0-a3f0-eec2350ad975" + "x-ms-client-request-id" : "deab4e2e-e8e9-4a75-ac30-8ca33c296688", + "Content-Type" : "multipart/mixed; boundary=batch_482df4d5-b4a2-48c7-b180-12fb14621d06" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -81,11 +81,11 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "202", - "x-ms-request-id" : "50480784-d01e-00d1-3099-838d29000000", - "Body" : "--batchresponse_5d0e9060-2e7f-45f6-92af-59903aa06a4f\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: 50480784-d01e-00d1-3099-838d291e1fbe\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 08e9fdc7-bf7e-4fac-9d63-9954fc58b367\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_5d0e9060-2e7f-45f6-92af-59903aa06a4f\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 50480784-d01e-00d1-3099-838d291e1fc0\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 7da29ea7-dddb-48d6-9a28-f6ab1f69d4f6\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:50480784-d01e-00d1-3099-838d291e1fc0\nTime:2019-10-15T20:44:52.3351104Z\r\n--batchresponse_5d0e9060-2e7f-45f6-92af-59903aa06a4f--", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "63d65606-7e87-4e00-aef8-0f9fbbd8cfb8", - "Content-Type" : "multipart/mixed; boundary=batchresponse_5d0e9060-2e7f-45f6-92af-59903aa06a4f" + "x-ms-request-id" : "a0ed46b2-d01e-007b-207a-845bc6000000", + "Body" : "--batchresponse_08436707-754a-4d27-8f36-101382ffb135\r\nContent-Type: application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 200 OK\r\nx-ms-request-id: a0ed46b2-d01e-007b-207a-845bc61e105b\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: c255c7a0-d71c-4aa1-ad54-03dfa96ed743\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_08436707-754a-4d27-8f36-101382ffb135\r\nContent-Type: application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 404 The specified blob does not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: a0ed46b2-d01e-007b-207a-845bc61e105d\r\nx-ms-version: 2019-02-02\r\nx-ms-client-request-id: 2df1ad9e-bff8-460b-81e8-7191c39f45ba\r\nContent-Length: 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nBlobNotFoundThe specified blob does not exist.\nRequestId:a0ed46b2-d01e-007b-207a-845bc61e105d\nTime:2019-10-16T23:38:06.3692838Z\r\n--batchresponse_08436707-754a-4d27-8f36-101382ffb135--", + "Date" : "Wed, 16 Oct 2019 23:38:05 GMT", + "x-ms-client-request-id" : "deab4e2e-e8e9-4a75-ac30-8ca33c296688", + "Content-Type" : "multipart/mixed; boundary=batchresponse_08436707-754a-4d27-8f36-101382ffb135" }, "Exception" : null }, { @@ -94,7 +94,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1cc5c516-1f29-4260-a92d-447c0871e2fe" + "x-ms-client-request-id" : "e391abc5-d757-480c-bd72-21f704357342" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -102,20 +102,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "504807b1-d01e-00d1-5999-838d29000000", - "Body" : "jtcsettiersomesucceedthrowonanyerrorjtcsettiersomesucceedthrowonanyerror075003062d3533b8Tue, 15 Oct 2019 20:44:52 GMT\"0x8D751B087470FC1\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcsettiersomesucceedthrowonanyerror187152967cbcf75aTue, 15 Oct 2019 20:44:52 GMT\"0x8D751B0874D04B6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "1cc5c516-1f29-4260-a92d-447c0871e2fe", + "x-ms-request-id" : "92e35205-201e-006e-7e7a-84995f000000", + "Body" : "jtcsettiersomesucceedthrowonanyerrorjtcsettiersomesucceedthrowonanyerror011069b305f66540Wed, 16 Oct 2019 23:38:06 GMT\"0x8D75291E501647F\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcsettiersomesucceedthrowonanyerror1672046b8cf6cbc5Wed, 16 Oct 2019 23:38:06 GMT\"0x8D75291E507EBB4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 16 Oct 2019 23:38:05 GMT", + "x-ms-client-request-id" : "e391abc5-d757-480c-bd72-21f704357342", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceedthrowonanyerror075003062d3533b8?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceedthrowonanyerror011069b305f66540?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cd3d8979-fdd8-4d0c-a930-d762c835a56c" + "x-ms-client-request-id" : "5bd9ce07-1a1e-4449-a262-a6b29787cf7d" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -123,18 +123,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "504807c4-d01e-00d1-6b99-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "cd3d8979-fdd8-4d0c-a930-d762c835a56c" + "x-ms-request-id" : "a0ed46d7-d01e-007b-3f7a-845bc6000000", + "Date" : "Wed, 16 Oct 2019 23:38:05 GMT", + "x-ms-client-request-id" : "5bd9ce07-1a1e-4449-a262-a6b29787cf7d" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceedthrowonanyerror187152967cbcf75a?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcsettiersomesucceedthrowonanyerror1672046b8cf6cbc5?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6666501f-47f3-40e8-b03d-1bb969862e25" + "x-ms-client-request-id" : "c2240bb3-aed6-448b-bfc7-130f48bf5851" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -142,11 +142,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "504807d2-d01e-00d1-7799-838d29000000", - "Date" : "Tue, 15 Oct 2019 20:44:51 GMT", - "x-ms-client-request-id" : "6666501f-47f3-40e8-b03d-1bb969862e25" + "x-ms-request-id" : "92e35235-201e-006e-2a7a-84995f000000", + "Date" : "Wed, 16 Oct 2019 23:38:05 GMT", + "x-ms-client-request-id" : "c2240bb3-aed6-448b-bfc7-130f48bf5851" }, "Exception" : null } ], - "variables" : [ "jtcsettiersomesucceedthrowonanyerror075003062d3533b8", "jtcsettiersomesucceedthrowonanyerror187152967cbcf75a", "javablobsettiersomesucceedthrowonanyerror28698206d7459b", "javablobsettiersomesucceedthrowonanyerror3339891e84c1a1" ] + "variables" : [ "jtcsettiersomesucceedthrowonanyerror011069b305f66540", "jtcsettiersomesucceedthrowonanyerror1672046b8cf6cbc5", "javablobsettiersomesucceedthrowonanyerror247425f8b98527", "javablobsettiersomesucceedthrowonanyerror32300068a9ed2e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITesttoomanyoperationsfails.json b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITesttoomanyoperationsfails.json new file mode 100644 index 000000000000..b18c696315bc --- /dev/null +++ b/sdk/storage/azure-storage-blob-batch/src/test/resources/session-records/BatchAPITesttoomanyoperationsfails.json @@ -0,0 +1,5741 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "50eea213-a931-4dcc-870c-67f4ffb9dd37" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B06CEFDD", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f151-f01e-00cd-205c-85553e000000", + "Date" : "Fri, 18 Oct 2019 02:34:24 GMT", + "x-ms-client-request-id" : "50eea213-a931-4dcc-870c-67f4ffb9dd37" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails14923830ee05c0d5884", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "77bf9249-f273-4e92-969f-f0771fb0463b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B09A3180", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f1de-f01e-00cd-145c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:24 GMT", + "x-ms-client-request-id" : "77bf9249-f273-4e92-969f-f0771fb0463b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails283850ff8aec4c48ad4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5a4a09eb-fdd5-41cc-abbd-f13f2adbd06f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B0A3F7DF", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f1ef-f01e-00cd-255c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:24 GMT", + "x-ms-client-request-id" : "5a4a09eb-fdd5-41cc-abbd-f13f2adbd06f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails318401be4b6aa20fc74", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "697076b3-8f84-4439-afbf-8498b210886e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B0AC856F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f20a-f01e-00cd-3c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:24 GMT", + "x-ms-client-request-id" : "697076b3-8f84-4439-afbf-8498b210886e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails43480851128833797c4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "28d176e9-03d5-4a0f-9607-e3f1c1f5f1c1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B0B7366B", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f21a-f01e-00cd-4a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:24 GMT", + "x-ms-client-request-id" : "28d176e9-03d5-4a0f-9607-e3f1c1f5f1c1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails558387d4ba1670ec2c4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a4741c7a-7552-4401-9914-197579bfc863" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B0D30279", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f256-f01e-00cd-7b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:24 GMT", + "x-ms-client-request-id" : "a4741c7a-7552-4401-9914-197579bfc863" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails635723dbcde0fb53304", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6e1527eb-9d78-4140-9fd0-2ccc57c9733e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B0DC2C72", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f268-f01e-00cd-0b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:24 GMT", + "x-ms-client-request-id" : "6e1527eb-9d78-4140-9fd0-2ccc57c9733e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails793086b446fd3e81524", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ce1e071c-68bf-4ca2-a68e-825dc5553be4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B10149A4", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f2af-f01e-00cd-4f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:25 GMT", + "x-ms-client-request-id" : "ce1e071c-68bf-4ca2-a68e-825dc5553be4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails8307489a877bc28e2a4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "019fc4f3-a472-4bd2-9a55-4d0469aeef8e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1085034", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f2c5-f01e-00cd-615c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:25 GMT", + "x-ms-client-request-id" : "019fc4f3-a472-4bd2-9a55-4d0469aeef8e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails9251396caf139c633c4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fd1469c3-d8a8-4270-89e0-fcef1bcee2fc" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1104165", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f2d9-f01e-00cd-715c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:25 GMT", + "x-ms-client-request-id" : "fd1469c3-d8a8-4270-89e0-fcef1bcee2fc" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails10121667bbd5bcfe0b54", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e3b7766b-60e5-46ef-afc4-3888b5fcb364" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B118328E", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f2e8-f01e-00cd-7d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:25 GMT", + "x-ms-client-request-id" : "e3b7766b-60e5-46ef-afc4-3888b5fcb364" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1175703e0b59273ca194", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8e250d8a-1b51-41d9-868f-9f4bafd91b23" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B130F0C5", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f327-f01e-00cd-375c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:25 GMT", + "x-ms-client-request-id" : "8e250d8a-1b51-41d9-868f-9f4bafd91b23" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1286737d3f72b8c09064", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3e1470d7-7367-46fd-bf2a-4cb891336c76" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1397E4A", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f33c-f01e-00cd-4c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:25 GMT", + "x-ms-client-request-id" : "3e1470d7-7367-46fd-bf2a-4cb891336c76" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1385738a12ee4a68d674", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5eff5b75-86c2-42c3-bfd0-6f8c68809710" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B15E2629", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f3a3-f01e-00cd-255c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:25 GMT", + "x-ms-client-request-id" : "5eff5b75-86c2-42c3-bfd0-6f8c68809710" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails14421231ba0f768d5c54", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3c6f26d7-c1a6-47b1-8b51-b25fa5ef2f7e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1657AEB", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f3c5-f01e-00cd-445c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:25 GMT", + "x-ms-client-request-id" : "3c6f26d7-c1a6-47b1-8b51-b25fa5ef2f7e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1553002be0b17d5cf094", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "62931ac2-7f92-462c-9dd5-d24ec9c16511" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B16DBA4B", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f3e1-f01e-00cd-5e5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:25 GMT", + "x-ms-client-request-id" : "62931ac2-7f92-462c-9dd5-d24ec9c16511" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails165961586fa26ad79c14", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9ccbb982-6433-4892-831f-829bd3333cb0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B18D7F09", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f42d-f01e-00cd-225c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "9ccbb982-6433-4892-831f-829bd3333cb0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1777822f95c0d3427a94", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "847e0bb4-a8ad-4a52-875b-f6be63e22d4c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1957031", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f443-f01e-00cd-385c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "847e0bb4-a8ad-4a52-875b-f6be63e22d4c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails18221241512f60797e54", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "27fb3541-6481-4957-83ee-93b4a103051e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B19CEC0F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f453-f01e-00cd-475c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "27fb3541-6481-4957-83ee-93b4a103051e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1932338c4429acc57c84", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "603362f5-b63c-4b3d-9030-410dfd02bc49" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1A48F13", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f462-f01e-00cd-565c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "603362f5-b63c-4b3d-9030-410dfd02bc49" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2003247ebe7e852fc554", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0f8b1189-adbe-43f0-9945-0126a2c2d277" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1AC591F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f476-f01e-00cd-685c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "0f8b1189-adbe-43f0-9945-0126a2c2d277" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails219360479580f2081404", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3381020c-ea58-4ed4-b943-1e43895ca345" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1B3ADE2", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f48b-f01e-00cd-7c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "3381020c-ea58-4ed4-b943-1e43895ca345" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails22663882a15ed36ea794", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "84d4fb2d-aa52-42fe-89a8-499f2c9050c1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1BB77F3", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f4a3-f01e-00cd-125c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "84d4fb2d-aa52-42fe-89a8-499f2c9050c1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails23617491e9ea2942f374", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "69ed21a8-8967-4591-9ebc-4962a3ccdf4c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1C3903C", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f4af-f01e-00cd-1d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "69ed21a8-8967-4591-9ebc-4962a3ccdf4c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2410923e9686c0c1f784", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a39c8564-87ce-4257-8197-705423d8251e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1CD2F88", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f4c9-f01e-00cd-305c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "a39c8564-87ce-4257-8197-705423d8251e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2577227e77406e896e14", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "41af00af-5f89-413d-b48f-1de93fbc8e11" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1D5BD16", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f4e4-f01e-00cd-495c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "41af00af-5f89-413d-b48f-1de93fbc8e11" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails26440299687eb2c71194", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5b05f119-3d24-4fc5-8e0c-70bf4def86f5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1DD600C", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f4f7-f01e-00cd-595c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "5b05f119-3d24-4fc5-8e0c-70bf4def86f5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails27273283bceddeebe454", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "eb6f8e78-1fd6-457f-b62f-8c111ccb9152" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1E57854", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f50a-f01e-00cd-6b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "eb6f8e78-1fd6-457f-b62f-8c111ccb9152" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2894068789dfa4b32814", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fd21190a-0f33-4af1-8c2b-4c9d2c399ab4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1F0C5B2", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f51b-f01e-00cd-7a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "fd21190a-0f33-4af1-8c2b-4c9d2c399ab4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2948965a5d4841070de4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1aabff51-5c62-4d82-9739-b24790531662" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B1F92C33", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f52c-f01e-00cd-0b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "1aabff51-5c62-4d82-9739-b24790531662" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails3021182b674fc6133064", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "73d35819-8cc8-4468-877d-7ef7affd6d33" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B2016B89", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f53c-f01e-00cd-195c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "73d35819-8cc8-4468-877d-7ef7affd6d33" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails317497535194c5081fa4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a029b67e-43ca-4c53-bfa4-0c2c94281802" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B2090E83", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f546-f01e-00cd-235c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "a029b67e-43ca-4c53-bfa4-0c2c94281802" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails32821195d730af1bab04", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e9067cf2-a016-4661-b212-5d3a9663addb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B21126CC", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f558-f01e-00cd-325c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:26 GMT", + "x-ms-client-request-id" : "e9067cf2-a016-4661-b212-5d3a9663addb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails339853221c8674ee8d44", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "91fec760-1331-4de3-87d0-f3b248d26f5d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B21A29A9", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f56f-f01e-00cd-465c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "91fec760-1331-4de3-87d0-f3b248d26f5d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails3482752d916bfcabe8f4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7f135c56-f54d-461d-b564-aa4be8cccbf7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B221F3C8", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f584-f01e-00cd-585c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "7f135c56-f54d-461d-b564-aa4be8cccbf7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails35100027c916ea410484", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5ce90fb5-4f4a-4f23-be29-9839d0338e49" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B229488B", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f591-f01e-00cd-645c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "5ce90fb5-4f4a-4f23-be29-9839d0338e49" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails3695940a810eceb438b4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e34d4df7-b38a-4cea-8f32-2692809c4cad" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B230C464", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f5a4-f01e-00cd-745c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "e34d4df7-b38a-4cea-8f32-2692809c4cad" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails3707382899ada1413ac4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fc169731-c6fc-451a-ae5f-058bc8d78971" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B2386768", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f5b2-f01e-00cd-015c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "fc169731-c6fc-451a-ae5f-058bc8d78971" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails3874392523292362cad4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f4a530c5-bd71-4850-b3d0-e44911fe1681" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B2403174", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f5c2-f01e-00cd-0e5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "f4a530c5-bd71-4850-b3d0-e44911fe1681" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails3965906d0f46f7583814", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e4522ec0-41d7-4abf-b61d-f6382346beaa" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B24849BD", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f5d2-f01e-00cd-1e5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "e4522ec0-41d7-4abf-b61d-f6382346beaa" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails4025015bdf9457e3aba4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f5377dd7-29b3-401d-a101-e1c79204814b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B25013CE", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f5e2-f01e-00cd-2e5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "f5377dd7-29b3-401d-a101-e1c79204814b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails41067905942b065d6274", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bb35f618-4c47-4f5d-9ecc-86c872d19c49" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B2598BFA", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f600-f01e-00cd-495c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "bb35f618-4c47-4f5d-9ecc-86c872d19c49" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails4209981dc6c71c0790d4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "64a2c731-efe7-46f2-ba50-27ee266932f2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B2612EF9", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f616-f01e-00cd-5f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "64a2c731-efe7-46f2-ba50-27ee266932f2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails4364357671ddc3f0dc84", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "39ecd094-e3cf-4e84-9202-02d9f7ff07a7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B26883C0", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f627-f01e-00cd-6f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "39ecd094-e3cf-4e84-9202-02d9f7ff07a7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails441639251b8cad768044", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "eaece87b-30b2-4f45-8fdb-4fd5e514af2c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B27026BA", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f63d-f01e-00cd-055c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "eaece87b-30b2-4f45-8fdb-4fd5e514af2c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails458914732dd35b035074", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5721cfe9-b8dd-400d-8552-353e3e5a7373" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B27817E7", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f652-f01e-00cd-185c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "5721cfe9-b8dd-400d-8552-353e3e5a7373" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails46601638b5c062e91824", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d7058181-d4a4-44f8-80b3-9c4b1bfce04c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B2805747", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f666-f01e-00cd-295c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "d7058181-d4a4-44f8-80b3-9c4b1bfce04c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails472717587dc6790213c4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0c3e4d3d-a336-4221-84ab-a2dbb8ff89bc" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B29BD532", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f6b8-f01e-00cd-725c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "0c3e4d3d-a336-4221-84ab-a2dbb8ff89bc" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails48109546f5cbcb6de6a4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "72aeb861-c92e-4b45-9c23-b45eda650a16" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B2A57475", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f6c6-f01e-00cd-7e5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:27 GMT", + "x-ms-client-request-id" : "72aeb861-c92e-4b45-9c23-b45eda650a16" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails496971274ac34b617fa4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bf7f9833-0210-4517-9615-e4e2acf19b16" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B2D45801", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f74f-f01e-00cd-7c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:28 GMT", + "x-ms-client-request-id" : "bf7f9833-0210-4517-9615-e4e2acf19b16" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails5055847a0c69d50a9e44", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fe28d3b1-c6eb-4591-a6ae-57913e369a47" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B2DFF392", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f76f-f01e-00cd-1c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:28 GMT", + "x-ms-client-request-id" : "fe28d3b1-c6eb-4591-a6ae-57913e369a47" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails51676060ad7dc2b74484", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a0d9d853-f4b3-4ce1-91f1-9fa988ee4773" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B2EA7D77", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f79f-f01e-00cd-3b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:28 GMT", + "x-ms-client-request-id" : "a0d9d853-f4b3-4ce1-91f1-9fa988ee4773" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails52096619f0389b18c314", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1b28d412-e01a-4439-8ba5-b3fcb7aa2011" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3047459", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f7fc-f01e-00cd-0a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:28 GMT", + "x-ms-client-request-id" : "1b28d412-e01a-4439-8ba5-b3fcb7aa2011" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails5313299b8ca8f878bef4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6e0a166b-0f80-4b22-a675-7b092305ecd3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B30BC925", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f815-f01e-00cd-205c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:28 GMT", + "x-ms-client-request-id" : "6e0a166b-0f80-4b22-a675-7b092305ecd3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails5452060be52fcb3af424", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1300078a-3435-4677-a381-a47e8fcd88f0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3151A35", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f83a-f01e-00cd-3e5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:28 GMT", + "x-ms-client-request-id" : "1300078a-3435-4677-a381-a47e8fcd88f0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails5511533d1c6f4052ec84", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6b78f687-7780-4d6d-aba6-ee6ccf95fd2c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B31D5995", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f846-f01e-00cd-4a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:28 GMT", + "x-ms-client-request-id" : "6b78f687-7780-4d6d-aba6-ee6ccf95fd2c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails56083462793b59f2e434", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d6596b55-593c-44a4-bf24-f8246e9d15e2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B32571DE", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f85f-f01e-00cd-5f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:28 GMT", + "x-ms-client-request-id" : "d6596b55-593c-44a4-bf24-f8246e9d15e2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails57469485d4adc49ca7c4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8723f23d-eca3-417c-b22b-f6c69fda46eb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B32CEDBC", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f874-f01e-00cd-705c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:28 GMT", + "x-ms-client-request-id" : "8723f23d-eca3-417c-b22b-f6c69fda46eb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails5813593a8ace033b9634", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c7b54a27-2ba9-44b2-9afb-200dc33c2c0c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B337779D", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f88e-f01e-00cd-045c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:28 GMT", + "x-ms-client-request-id" : "c7b54a27-2ba9-44b2-9afb-200dc33c2c0c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails59430395d12ef5f00ea4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9b807ed9-e48a-45f9-93ca-919d87691782" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B340A196", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f8a2-f01e-00cd-175c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:28 GMT", + "x-ms-client-request-id" : "9b807ed9-e48a-45f9-93ca-919d87691782" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails6096590e65d995a9f864", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ef305bde-1e4a-432d-add6-86e4f81fa2e9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3639B68", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f91c-f01e-00cd-775c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "ef305bde-1e4a-432d-add6-86e4f81fa2e9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails61835476fbfaea714964", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "55388f78-8576-40fd-8775-291e3502ef30" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B36B6570", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f92f-f01e-00cd-075c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "55388f78-8576-40fd-8775-291e3502ef30" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails6263286de0a42ae0d334", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "43e8168d-40cc-4ebf-9048-124eb1e3ef07" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B374413A", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f942-f01e-00cd-185c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "43e8168d-40cc-4ebf-9048-124eb1e3ef07" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails6395434dd149e67faee4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0ab9c760-0ab1-42f9-8631-848364b50147" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B37B20B3", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f96a-f01e-00cd-3b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "0ab9c760-0ab1-42f9-8631-848364b50147" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails648402412b55fb168974", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "69d1ab1f-74ee-457a-8661-3e64414b0d17" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3829C95", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f977-f01e-00cd-485c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "69d1ab1f-74ee-457a-8661-3e64414b0d17" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails6579016a471aae098564", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2a84d927-13f5-4893-8976-d887132cae56" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B38A3F90", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f989-f01e-00cd-5a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "2a84d927-13f5-4893-8976-d887132cae56" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails6665270e628a01b92c24", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5c06e9fd-58b5-4867-abf5-4ded972583df" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B391E285", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f99d-f01e-00cd-6d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "5c06e9fd-58b5-4867-abf5-4ded972583df" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails675286217acec67ee494", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0b8541dc-0d93-4021-800f-136c6e55bcaa" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B399858D", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f9b5-f01e-00cd-7f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "0b8541dc-0d93-4021-800f-136c6e55bcaa" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails68093951b1745b0ffb74", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e3aebe02-5c7c-42d5-ab54-b5cebc21bc00" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3A0B32F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f9ce-f01e-00cd-125c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "e3aebe02-5c7c-42d5-ab54-b5cebc21bc00" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails6985974e8fcb1aa18b94", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "91e6c461-f73a-4fd9-ad4e-d702fcc56d41" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3A82F12", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f9e0-f01e-00cd-225c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "91e6c461-f73a-4fd9-ad4e-d702fcc56d41" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails7096314a67c6db090884", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7ca5b184-09a2-45be-bac2-28bf7839fa03" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3B06E72", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4f9f0-f01e-00cd-315c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "7ca5b184-09a2-45be-bac2-28bf7839fa03" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails71553818de5ade319f94", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cb2b179b-9272-46e9-a117-5b2541930495" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3B886B6", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fa06-f01e-00cd-425c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "cb2b179b-9272-46e9-a117-5b2541930495" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails7244387e9973c62cc4c4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "68ce6157-1151-4630-9fcf-8409f3ea1df4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3CBEC58", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fa3b-f01e-00cd-6c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "68ce6157-1151-4630-9fcf-8409f3ea1df4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails73252419c623ff5508a4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3de804f9-304e-4301-ab81-5f1a3c54df54" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3D3DD89", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fa4a-f01e-00cd-7a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "3de804f9-304e-4301-ab81-5f1a3c54df54" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails74870159eed2173452f4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7289d500-6258-4aee-8938-6f97eddcc763" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3DCB954", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fa68-f01e-00cd-125c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:29 GMT", + "x-ms-client-request-id" : "7289d500-6258-4aee-8938-6f97eddcc763" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails7592861c25df05990364", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "de6ffe6b-ae99-41f4-bc29-26b795ad13cc" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3E43532", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fa7b-f01e-00cd-225c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:30 GMT", + "x-ms-client-request-id" : "de6ffe6b-ae99-41f4-bc29-26b795ad13cc" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails7602057e64e3771d02f4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "39397af7-fd1a-4e86-8409-b60fcca3c100" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3EC265F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fa97-f01e-00cd-385c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:30 GMT", + "x-ms-client-request-id" : "39397af7-fd1a-4e86-8409-b60fcca3c100" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails77573013e692dac45764", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8cf2d084-20ef-4710-bcf5-87fe5f07ba3d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B3F41788", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4faaf-f01e-00cd-4d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:30 GMT", + "x-ms-client-request-id" : "8cf2d084-20ef-4710-bcf5-87fe5f07ba3d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails7848395ef85129cfda44", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0be140da-462b-47b6-94cb-3cb02f0be9ca" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B4072F00", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fad0-f01e-00cd-6b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:30 GMT", + "x-ms-client-request-id" : "0be140da-462b-47b6-94cb-3cb02f0be9ca" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails79249877f11989a895f4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dcac95eb-b614-4354-b8be-6291fa5d0445" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B41E3F0A", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fb26-f01e-00cd-395c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:30 GMT", + "x-ms-client-request-id" : "dcac95eb-b614-4354-b8be-6291fa5d0445" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails80236568a13a58f50154", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8e8c7717-845c-450f-9b39-fcbcba179c5b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B4260916", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fb3e-f01e-00cd-505c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:30 GMT", + "x-ms-client-request-id" : "8e8c7717-845c-450f-9b39-fcbcba179c5b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails8139058e4f107309a094", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "491e6743-5b33-49ae-a941-6c5330756606" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B42E215F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fb52-f01e-00cd-645c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:30 GMT", + "x-ms-client-request-id" : "491e6743-5b33-49ae-a941-6c5330756606" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails8200453ed30803f58474", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3867b80e-dc79-462e-aeec-2f4c5cbadcc2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B436FD25", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fb6d-f01e-00cd-7d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:30 GMT", + "x-ms-client-request-id" : "3867b80e-dc79-462e-aeec-2f4c5cbadcc2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails8320799a762a70375d94", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "894085ce-532a-4830-b71f-6778dcc3992d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B43F639C", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fb81-f01e-00cd-115c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:30 GMT", + "x-ms-client-request-id" : "894085ce-532a-4830-b71f-6778dcc3992d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails84336753d012cbcbfd14", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fe16674a-59eb-41fd-90ed-0ef804f06cb1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B447F12F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fb99-f01e-00cd-255c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:30 GMT", + "x-ms-client-request-id" : "fe16674a-59eb-41fd-90ed-0ef804f06cb1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails85002989b1cdf9e806d4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "32b69599-7be1-4d37-9e15-23d4d7e76501" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B4685243", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fbe3-f01e-00cd-665c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:30 GMT", + "x-ms-client-request-id" : "32b69599-7be1-4d37-9e15-23d4d7e76501" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails86792947a43b775431a4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1d27ac99-0eab-4c5d-bc34-ac512b8673fe" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B46FCE23", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fbfd-f01e-00cd-805c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:30 GMT", + "x-ms-client-request-id" : "1d27ac99-0eab-4c5d-bc34-ac512b8673fe" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails8721053e1d7a09db30c4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bfd45a8e-006a-49fd-a9d3-c33580f03c00" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B477BF43", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fc13-f01e-00cd-145c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:30 GMT", + "x-ms-client-request-id" : "bfd45a8e-006a-49fd-a9d3-c33580f03c00" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails884067203eebb61759b4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fd423f7e-c394-4704-8bba-a5afeae77ac8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B47F3B2C", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fc30-f01e-00cd-2d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "fd423f7e-c394-4704-8bba-a5afeae77ac8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails894289558a6b94304194", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "095e1b1c-6e73-46be-9667-538f2143d5e9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B4877A84", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fc56-f01e-00cd-4f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "095e1b1c-6e73-46be-9667-538f2143d5e9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails90931423b9db1c5f7604", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "523d3096-5e88-4639-889e-fa8e4398883d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B48F1D7B", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fc77-f01e-00cd-6d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "523d3096-5e88-4639-889e-fa8e4398883d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails918631333ee1770b4d34", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f30e227c-357d-4db3-a8df-011e18c69cd7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B4970EA9", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fca3-f01e-00cd-175c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "f30e227c-357d-4db3-a8df-011e18c69cd7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails9271035fa220a07a6ec4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1e7c11c0-1ef4-47bd-9997-0545d318c884" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B49E8A80", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fcc0-f01e-00cd-335c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "1e7c11c0-1ef4-47bd-9997-0545d318c884" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails9382582caa176e8668a4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "061eaad7-7f57-4b00-8ffd-3c4c287f921d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B4A67BAE", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fcd8-f01e-00cd-4a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "061eaad7-7f57-4b00-8ffd-3c4c287f921d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails94201632ab27909dee94", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e565e323-630a-436b-a7c5-6959eebe88c7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B4AFF3D1", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fcf8-f01e-00cd-6a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "e565e323-630a-436b-a7c5-6959eebe88c7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails9527599c603e559419e4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d1bc5e27-6cc0-4e17-8d16-8977502c1b22" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B4D97ED7", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fd87-f01e-00cd-6e5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "d1bc5e27-6cc0-4e17-8d16-8977502c1b22" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails962028911a1d8f2c0234", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6766d883-b174-4add-8901-c28cc1193633" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B4E31E16", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fdb6-f01e-00cd-185c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "6766d883-b174-4add-8901-c28cc1193633" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails9776287bd3290b0ed5c4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c6a25d5a-f272-446b-81c8-de8316f06055" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B4EB0F3B", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fdd3-f01e-00cd-2f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "c6a25d5a-f272-446b-81c8-de8316f06055" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails9898239c2f98a10ca464", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d68860a1-1062-485a-93fe-2f38c657652d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B4F2D94D", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fdef-f01e-00cd-475c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "d68860a1-1062-485a-93fe-2f38c657652d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails995040948d054344e8a4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "84f9360e-960f-4129-980a-630cf211ab39" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B4FACA7A", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fdff-f01e-00cd-575c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "84f9360e-960f-4129-980a-630cf211ab39" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails100312115b9091966ed0", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "256eae38-8a50-4734-90e4-15e42e366479" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B502465D", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fe13-f01e-00cd-6b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "256eae38-8a50-4734-90e4-15e42e366479" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails10140322aeb44f154c76", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d815d521-3a08-49c9-be96-133da3673acf" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B50A106E", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fe2b-f01e-00cd-015c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "d815d521-3a08-49c9-be96-133da3673acf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1025019537dd0502b5b9", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7a154dc3-1e58-4436-baaa-e0c5852921d9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B511B368", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fe43-f01e-00cd-175c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:31 GMT", + "x-ms-client-request-id" : "7a154dc3-1e58-4436-baaa-e0c5852921d9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails103314728998040c0ac4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "868a0cfb-00c3-4412-bd9d-f05322530391" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B519A495", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fe5d-f01e-00cd-2b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "868a0cfb-00c3-4412-bd9d-f05322530391" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails10458420321b66b78caa", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b2640d58-2424-4af5-9dd9-3e0c5e0c9aeb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5228060", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fe80-f01e-00cd-4c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "b2640d58-2424-4af5-9dd9-3e0c5e0c9aeb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails10513181a80b45514f2d", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9000f74c-4878-4f28-9af1-5dc229a35de6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B52AE6D2", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fea3-f01e-00cd-6d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "9000f74c-4878-4f28-9af1-5dc229a35de6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails106199387bed4ed2593f", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "62c43712-6b06-4afc-861a-f8bcc8964d26" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B53262BA", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fec5-f01e-00cd-0c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "62c43712-6b06-4afc-861a-f8bcc8964d26" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails10724873de514c74b3fc", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f7d3aca7-7159-471d-8914-6e9eb571a74e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B539DE98", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fecf-f01e-00cd-155c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "f7d3aca7-7159-471d-8914-6e9eb571a74e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails10880980bd3398b4402b", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "439912c4-51f1-4852-8a2d-77c4aad83ebd" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5429342", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fee6-f01e-00cd-2a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "439912c4-51f1-4852-8a2d-77c4aad83ebd" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails10911184ab6e0065c68c", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ea281d82-f37a-4dbb-a794-21f847820d62" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B54B9624", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fef5-f01e-00cd-395c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "ea281d82-f37a-4dbb-a794-21f847820d62" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails110357238fe2d15f456d", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "75ff1409-18fb-4155-9dba-4b846b11f6b5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B553391E", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4ff09-f01e-00cd-4a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "75ff1409-18fb-4155-9dba-4b846b11f6b5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails111093253eedd19f037d", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2da0e665-6d7b-4d79-8ad0-3084c74813ae" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B55AB501", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4ff1a-f01e-00cd-585c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "2da0e665-6d7b-4d79-8ad0-3084c74813ae" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails11243518269fe6bb8035", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "aaf03920-6e35-46d9-867a-f1c7405adf66" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B56369AB", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4ff32-f01e-00cd-6d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "aaf03920-6e35-46d9-867a-f1c7405adf66" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails11382851a2d42b8ef218", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1c32db97-5b49-4291-b4cc-00d005fc695f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B56B81EF", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4ff48-f01e-00cd-015c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "1c32db97-5b49-4291-b4cc-00d005fc695f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1145327030e17841e057", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cc11a9c9-4dc2-4569-8fc0-4226763fd760" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B572D6B6", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4ff5b-f01e-00cd-145c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "cc11a9c9-4dc2-4569-8fc0-4226763fd760" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1159688398bb7467fa53", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "82621ca5-a499-4066-90f5-840bfa9f40ad" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B57AA0D5", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4ff74-f01e-00cd-2c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "82621ca5-a499-4066-90f5-840bfa9f40ad" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1163474918ab886806bb", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f21b871d-61a4-4bc0-912c-650546aaa5e8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B58243C6", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4ff8b-f01e-00cd-425c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "f21b871d-61a4-4bc0-912c-650546aaa5e8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1177782498762199aab7", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3cc77c52-5771-45bd-bb4c-6cdada4ab6d2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B58A34FD", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4ffa0-f01e-00cd-565c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "3cc77c52-5771-45bd-bb4c-6cdada4ab6d2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails118106193b872aa52691", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "238f697c-8588-489b-b1f7-91b938eade5e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5927453", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4ffb3-f01e-00cd-665c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "238f697c-8588-489b-b1f7-91b938eade5e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails11958796b62e9b41b697", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3e87955b-25df-4453-b6fe-5f4b4b090c61" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B59A1749", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4ffbc-f01e-00cd-6f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "3e87955b-25df-4453-b6fe-5f4b4b090c61" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails12068449bae73cf8f631", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5d5ee76f-bc50-4e75-a78e-88256ce15887" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5A256AD", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4ffc9-f01e-00cd-7c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "5d5ee76f-bc50-4e75-a78e-88256ce15887" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails12154061c071cbee91ca", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c3223335-56f4-4db1-a3b4-caceddc0d930" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5A9AB74", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4ffe1-f01e-00cd-125c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:32 GMT", + "x-ms-client-request-id" : "c3223335-56f4-4db1-a3b4-caceddc0d930" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails12238928b8d9edfa329a", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a40575f2-b7ed-455e-9206-34d53b97ff19" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5B14E6E", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d4fff4-f01e-00cd-205c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "a40575f2-b7ed-455e-9206-34d53b97ff19" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails12317032cb507c035681", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8e47894e-4575-4300-8d47-e63abc687494" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5C35429", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50021-f01e-00cd-475c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "8e47894e-4575-4300-8d47-e63abc687494" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails12474711bb8e3844cb47", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "95a4ff49-b810-47a9-874b-e0bde3244192" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5CAA8F4", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50032-f01e-00cd-555c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "95a4ff49-b810-47a9-874b-e0bde3244192" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails125278230858cb7e7d1e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4dd16c74-b1d9-471a-9c1f-096a1daa282e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5D44837", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5004c-f01e-00cd-6b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "4dd16c74-b1d9-471a-9c1f-096a1daa282e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails12670460507908981746", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "03475bb2-a412-4073-b3c7-1f33575a58e7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5DC396E", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50063-f01e-00cd-805c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "03475bb2-a412-4073-b3c7-1f33575a58e7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails12759350adae7ca17dd1", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "00298363-fa17-4fca-9cde-804997a3c724" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5E42A91", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50072-f01e-00cd-0f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "00298363-fa17-4fca-9cde-804997a3c724" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails12893718ebaa61058381", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a576c0e2-2613-4f48-a9de-4bcf3b4470ec" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5EC910D", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50088-f01e-00cd-235c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "a576c0e2-2613-4f48-a9de-4bcf3b4470ec" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails12993909c38307565224", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "08990acb-c6f7-42c9-99ce-e7cb9b5ee4eb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5F43407", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d500a6-f01e-00cd-3c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "08990acb-c6f7-42c9-99ce-e7cb9b5ee4eb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails130799761920be3950e9", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0a59b6b6-22a7-4e29-a13c-b0f14256dfe9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B5FD5E00", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d500be-f01e-00cd-515c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "0a59b6b6-22a7-4e29-a13c-b0f14256dfe9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails13157403cbd4d8d7a439", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "941b8442-a2b5-4df2-993a-1f59315bc4f2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B60687F9", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d500ce-f01e-00cd-615c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "941b8442-a2b5-4df2-993a-1f59315bc4f2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails13266406d770cb32bbce", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8aaecfad-ce7d-4515-ad0f-cf0b4d96185a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B60EEE70", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d500dc-f01e-00cd-6d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "8aaecfad-ce7d-4515-ad0f-cf0b4d96185a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails13343829474878bed7b0", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6debd9b4-77e5-4094-b87b-76443206a830" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B617A31F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d500e9-f01e-00cd-7a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "6debd9b4-77e5-4094-b87b-76443206a830" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails13414074c001d9a56a7a", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c4ba837d-9aa8-41dc-9266-9949f4cf8c82" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B6214266", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50100-f01e-00cd-0d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "c4ba837d-9aa8-41dc-9266-9949f4cf8c82" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails135285358c3cd0f9a5b5", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0ad820af-7b99-4658-92de-471d97ad79db" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B628E557", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5010e-f01e-00cd-1b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "0ad820af-7b99-4658-92de-471d97ad79db" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails136931154775e0522ca8", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fb62db3a-abdb-4c48-bba5-cba3d5929b3e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B630AF72", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5011f-f01e-00cd-295c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "fb62db3a-abdb-4c48-bba5-cba3d5929b3e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails137490385f10ab56dcb5", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "082983f9-08f2-426f-b6da-6e1e83c5c036" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B639B253", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5012e-f01e-00cd-375c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "082983f9-08f2-426f-b6da-6e1e83c5c036" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1387006741f86b81c782", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3c7538f2-9d52-4ccf-9708-42d0ad706eb8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B641F1B3", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50139-f01e-00cd-425c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:33 GMT", + "x-ms-client-request-id" : "3c7538f2-9d52-4ccf-9708-42d0ad706eb8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1395253091fb524649e3", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "09f42989-8dcb-4390-847d-b3655c1daaf9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B64A7F42", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50154-f01e-00cd-595c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:34 GMT", + "x-ms-client-request-id" : "09f42989-8dcb-4390-847d-b3655c1daaf9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails140481524cf0594293e4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "144e400b-69a5-44d1-aba8-0086357457b5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B6785119", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d501f5-f01e-00cd-655c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:34 GMT", + "x-ms-client-request-id" : "144e400b-69a5-44d1-aba8-0086357457b5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails14135108330677ce92e6", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1fa71c2e-de24-4f45-847f-01319215801d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B681C94A", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5020f-f01e-00cd-7f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:34 GMT", + "x-ms-client-request-id" : "1fa71c2e-de24-4f45-847f-01319215801d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1427761258cdd1085356", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9261e080-29c3-43aa-b6d0-a53cd39dad61" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B689452D", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5022c-f01e-00cd-195c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:34 GMT", + "x-ms-client-request-id" : "9261e080-29c3-43aa-b6d0-a53cd39dad61" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails14380805e8acde3f2417", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "85c6b2f7-d2fd-4681-8dc5-98edec33510c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B6922101", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50247-f01e-00cd-345c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:34 GMT", + "x-ms-client-request-id" : "85c6b2f7-d2fd-4681-8dc5-98edec33510c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails14436448d1dcd85db59b", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cc57f109-f34f-4bca-a68b-31dae3592e8d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B69A876F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50266-f01e-00cd-515c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:34 GMT", + "x-ms-client-request-id" : "cc57f109-f34f-4bca-a68b-31dae3592e8d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails145435127e7e694fe28a", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "60ab0c96-7166-4ead-90a1-7e83b58c8558" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B6A1DC36", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50279-f01e-00cd-615c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:34 GMT", + "x-ms-client-request-id" : "60ab0c96-7166-4ead-90a1-7e83b58c8558" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1464051026aa6ed70301", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d1af444d-06e7-48b9-8cf2-a726185ffe66" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B6AA69C9", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50292-f01e-00cd-795c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:34 GMT", + "x-ms-client-request-id" : "d1af444d-06e7-48b9-8cf2-a726185ffe66" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails14777432b65b84d5cf3a", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "10f28f2a-e6a3-4bf0-8fc0-be878b2dc38a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B6B19774", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d502a5-f01e-00cd-0c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:34 GMT", + "x-ms-client-request-id" : "10f28f2a-e6a3-4bf0-8fc0-be878b2dc38a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1489003794c6eb8837a8", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c1f9e2b2-be99-4033-abf8-8d3ead8cb4f8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B6B9D6D4", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d502b6-f01e-00cd-1d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:34 GMT", + "x-ms-client-request-id" : "c1f9e2b2-be99-4033-abf8-8d3ead8cb4f8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails149643020bc22ea1d3bb", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9f1c9468-dcdb-4937-996d-2b31ad3562fb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B6DDE24D", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50306-f01e-00cd-675c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "9f1c9468-dcdb-4937-996d-2b31ad3562fb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails150824451dd29e6a8771", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3450f017-0995-4e32-9011-ea7a60b54d13" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B6E66FE4", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50318-f01e-00cd-775c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "3450f017-0995-4e32-9011-ea7a60b54d13" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1514477611e212eb6190", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c49bc5bd-18d0-4d26-8725-b3d98c5f7653" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B6EE6116", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50330-f01e-00cd-0b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "c49bc5bd-18d0-4d26-8725-b3d98c5f7653" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails15230484d1700cf1d6c1", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c71a23a9-387b-493b-a4e1-9123f684050b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B6F6523A", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50349-f01e-00cd-215c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "c71a23a9-387b-493b-a4e1-9123f684050b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails153968713862c084b5cd", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "027cd2a1-5471-4ec8-8809-1954bedbc7fe" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B6FE6A83", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5035f-f01e-00cd-365c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "027cd2a1-5471-4ec8-8809-1954bedbc7fe" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails154890896fc921077596", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4e2b323b-7124-4c04-b198-cba9abd756b5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7059833", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50369-f01e-00cd-405c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "4e2b323b-7124-4c04-b198-cba9abd756b5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails15532291e42219817d47", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "796f7d4b-819b-4d9b-b505-401f2eec2bc4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B70D1411", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5037d-f01e-00cd-525c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "796f7d4b-819b-4d9b-b505-401f2eec2bc4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1565412598e054704655", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7d9e4acd-3f0d-4347-b78f-6fe72530e71e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7150542", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5038d-f01e-00cd-615c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "7d9e4acd-3f0d-4347-b78f-6fe72530e71e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails157065261fa91774c153", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "29f8296c-45f6-4187-843d-92bd1a75a0c7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B73BF7A2", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50403-f01e-00cd-4c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "29f8296c-45f6-4187-843d-92bd1a75a0c7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails15875962b1d7d8e70c2f", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0b991225-8c80-422a-b60a-f2d1348abb73" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7445E22", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5041f-f01e-00cd-665c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "0b991225-8c80-422a-b60a-f2d1348abb73" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails159607822d7d8572986d", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "427308c7-155e-4ef3-8a24-9ccd86319aad" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B74C011C", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5042e-f01e-00cd-745c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "427308c7-155e-4ef3-8a24-9ccd86319aad" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails160123484035d9b7994f", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9ee2f287-0921-40e8-a917-991fb09018af" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7544073", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5043d-f01e-00cd-025c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "9ee2f287-0921-40e8-a917-991fb09018af" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails16155628732e0ee3e1cb", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b4817e7f-c75d-4527-af02-ee823fd0fc03" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B75D4355", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50455-f01e-00cd-195c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "b4817e7f-c75d-4527-af02-ee823fd0fc03" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails162871179544f2090ced", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "384cdcad-8303-4304-9b0d-59d6b3730f7d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7653482", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50475-f01e-00cd-335c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "384cdcad-8303-4304-9b0d-59d6b3730f7d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails16392332ccd657ad3c0a", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d6ec44ca-b2f4-409c-ad5d-5c08388fc641" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B76CD777", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50491-f01e-00cd-4d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "d6ec44ca-b2f4-409c-ad5d-5c08388fc641" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1644022926c0069bf7c2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "27b39730-9026-4d55-bc00-59ce07d23ead" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B774C8B2", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d504a8-f01e-00cd-645c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:35 GMT", + "x-ms-client-request-id" : "27b39730-9026-4d55-bc00-59ce07d23ead" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails16540037d802960c8b97", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2aa05768-ac60-41d3-9411-3ed1f9340404" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B77C448C", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d504c3-f01e-00cd-7e5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "2aa05768-ac60-41d3-9411-3ed1f9340404" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails16671064d277edf4a06e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6b842f83-51b7-4a16-ae66-167524613db1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7985EDC", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5050c-f01e-00cd-465c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "6b842f83-51b7-4a16-ae66-167524613db1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails16742199a91c7ee3180e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9b1d8c1d-f664-4d51-ab3e-38090143c85b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7A001D2", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50520-f01e-00cd-5a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "9b1d8c1d-f664-4d51-ab3e-38090143c85b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails16820728c9d359a0da1e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "aea471c9-07b6-44b7-8f64-1202d7a1ef9b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7A77DB5", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5052e-f01e-00cd-685c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "aea471c9-07b6-44b7-8f64-1202d7a1ef9b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1692157900d08b5e00e4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0d7494d6-2f4b-4bf9-9b1b-0fa890705a9d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7B080A0", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50554-f01e-00cd-0b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "0d7494d6-2f4b-4bf9-9b1b-0fa890705a9d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails170830151947e8e76475", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "38762a20-0ea1-4f7f-9da2-9390b832ce96" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7B9F8BE", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5056e-f01e-00cd-245c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "38762a20-0ea1-4f7f-9da2-9390b832ce96" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails17161236bdec863b24d2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fdb75a2a-3832-44c7-9656-088bfdc72fd2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7C1E9EF", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5058a-f01e-00cd-3f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "fdb75a2a-3832-44c7-9656-088bfdc72fd2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1726314731551a19df78", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "62f07983-10a4-48bc-980f-5237756c3844" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7CA5066", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d505a2-f01e-00cd-575c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "62f07983-10a4-48bc-980f-5237756c3844" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1730769015e6c33b5855", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a207c489-ce4d-477d-8272-88c1ef2e4a3a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7D35348", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d505bc-f01e-00cd-6f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "a207c489-ce4d-477d-8272-88c1ef2e4a3a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails17403009a8384adf4d8c", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "aedce155-d972-40da-8455-c769c8de73d4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7DCA458", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d505d4-f01e-00cd-065c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "aedce155-d972-40da-8455-c769c8de73d4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1756772153bb51c29faf", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c345f460-d77b-4cfa-9f0b-80546e60d3b3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7E44752", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d505ea-f01e-00cd-1c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "c345f460-d77b-4cfa-9f0b-80546e60d3b3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails176503273b0393fd7ad3", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f24251b1-c481-4b34-af7f-efae0d5b4c3c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7EBEA4C", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d505ff-f01e-00cd-2f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "f24251b1-c481-4b34-af7f-efae0d5b4c3c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1777118053a518d079d3", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b2c52d28-a8fc-40f1-8ba7-9655faf9b2a8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7F429AC", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5060f-f01e-00cd-3f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "b2c52d28-a8fc-40f1-8ba7-9655faf9b2a8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails17814055cd4afcf80253", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fc94a2b5-b1de-4906-a4f9-564142f3f2db" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B7FF01BB", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50623-f01e-00cd-535c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:36 GMT", + "x-ms-client-request-id" : "fc94a2b5-b1de-4906-a4f9-564142f3f2db" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails17906040c889f6a5f805", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8305a829-e3f1-4dba-8273-37d7761a2dd5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B824BB53", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5068a-f01e-00cd-2c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "8305a829-e3f1-4dba-8273-37d7761a2dd5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails18006900314760906762", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d223a4ce-9552-4bd7-9981-b2b9a31708e8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B82C3731", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50696-f01e-00cd-385c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "d223a4ce-9552-4bd7-9981-b2b9a31708e8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails181324371555b0a2a75f", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c0a12054-602d-48e3-acb2-7b8938ac294b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B8353A13", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d506a8-f01e-00cd-4a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "c0a12054-602d-48e3-acb2-7b8938ac294b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails18205443ac71fa941753", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2c8bab16-4bcc-4fff-9bfd-d7ed6be8ddab" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B83E640C", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d506c8-f01e-00cd-685c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "2c8bab16-4bcc-4fff-9bfd-d7ed6be8ddab" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails18355751d42c45e60603", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4645de45-15fd-4a8e-92f9-73cdde5fbba6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B8473FD7", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d506e7-f01e-00cd-7c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "4645de45-15fd-4a8e-92f9-73cdde5fbba6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails18450673e218e70a9e62", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c214895e-8fc3-43bf-a217-0d31b54112b1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B84F09E3", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d506fe-f01e-00cd-105c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "c214895e-8fc3-43bf-a217-0d31b54112b1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails18556937b50cccaee6d9", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ab2895d0-33e0-4484-99a8-534bd5e554e3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B856378E", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50714-f01e-00cd-255c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "ab2895d0-33e0-4484-99a8-534bd5e554e3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails186571816ee8a8548b9c", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "94fc102e-a70f-40e4-a340-a0e103285960" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B85D8C5A", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50731-f01e-00cd-3e5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "94fc102e-a70f-40e4-a340-a0e103285960" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails18701121604883388706", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c120aa48-1abd-439b-b30f-12b2ba185186" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B865CBB4", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50749-f01e-00cd-545c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "c120aa48-1abd-439b-b30f-12b2ba185186" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1888215192429e393454", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c90b7caa-5de7-43e3-be16-c24da602e27a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B86D95C7", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5075c-f01e-00cd-645c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "c90b7caa-5de7-43e3-be16-c24da602e27a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails18932486fdd2e382fbf9", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "339afa1e-2762-4d07-8f72-dd5fc6ced9ae" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B875AE0C", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50768-f01e-00cd-705c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "339afa1e-2762-4d07-8f72-dd5fc6ced9ae" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails19039873b0aee0817a59", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "054cffec-7391-48fc-97a1-32c6be8ca2e2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B87E89D3", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50777-f01e-00cd-7f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "054cffec-7391-48fc-97a1-32c6be8ca2e2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1912122740de69f8f36c", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ff0526a0-04c3-4283-b95e-f8005c297ee9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B885DE8E", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50786-f01e-00cd-0d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "ff0526a0-04c3-4283-b95e-f8005c297ee9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails19241741e88537d0a2ab", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6383fabf-4d39-4701-8cdc-bdfe0a4ebf7d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B88D8184", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5079b-f01e-00cd-215c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "6383fabf-4d39-4701-8cdc-bdfe0a4ebf7d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails19314223ddd28b7225dc", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cb35672c-389a-47e2-b226-8623b03fcbd5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B89572AE", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d507a9-f01e-00cd-2e5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "cb35672c-389a-47e2-b226-8623b03fcbd5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1941677813d9f89d65e9", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f895786d-66ca-4c51-ace0-8dc4685b6f82" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B89D15AA", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d507b7-f01e-00cd-3c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "f895786d-66ca-4c51-ace0-8dc4685b6f82" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails195923327f8910bdc4e6", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0b949082-5e05-40e5-8380-883eee200d84" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B8A63F9E", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d507cc-f01e-00cd-4f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:37 GMT", + "x-ms-client-request-id" : "0b949082-5e05-40e5-8380-883eee200d84" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails19666350e90445e9dc47", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9fded23d-8236-44bd-9a1b-993a197a7eeb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B8AF90AB", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d507e4-f01e-00cd-655c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:38 GMT", + "x-ms-client-request-id" : "9fded23d-8236-44bd-9a1b-993a197a7eeb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails19775795d3a4a20d0904", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9f38983b-f5cb-4014-8a6d-92e21bc78312" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B8B733A6", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d507f7-f01e-00cd-755c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:38 GMT", + "x-ms-client-request-id" : "9f38983b-f5cb-4014-8a6d-92e21bc78312" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails19898741e05e1c2544da", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3fb336e0-3d13-4a26-b5e0-1f0dd52cba29" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B8BF72FE", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5080a-f01e-00cd-065c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:38 GMT", + "x-ms-client-request-id" : "3fb336e0-3d13-4a26-b5e0-1f0dd52cba29" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails1997031143d87651d3ee", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9f83eb59-a915-4f41-8880-17c2e1584526" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B8DFD40F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d5085f-f01e-00cd-4f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:38 GMT", + "x-ms-client-request-id" : "9f83eb59-a915-4f41-8880-17c2e1584526" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails20037013b17b8756a627", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "09c5deb2-145d-44a6-b757-d770c75f888f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B90E9075", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d508da-f01e-00cd-425c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:38 GMT", + "x-ms-client-request-id" : "09c5deb2-145d-44a6-b757-d770c75f888f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails201597583aa3a8fb5c67", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "23f1cf83-4530-4369-8ca6-76139018e31c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B9165A87", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d508f1-f01e-00cd-595c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:38 GMT", + "x-ms-client-request-id" : "23f1cf83-4530-4369-8ca6-76139018e31c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails202819321d4e6fa3267f", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0e33f59c-52b6-41f5-beb1-baf955e59886" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B91E4BAC", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50900-f01e-00cd-675c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:38 GMT", + "x-ms-client-request-id" : "0e33f59c-52b6-41f5-beb1-baf955e59886" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails20305415c3dd409bdd0e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c7732c2f-ecb8-44da-85e0-65d731ec10bc" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B927759C", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50917-f01e-00cd-7b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:38 GMT", + "x-ms-client-request-id" : "c7732c2f-ecb8-44da-85e0-65d731ec10bc" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails20447179f0b4909d5f12", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c0009f92-7657-4325-810a-b91a4b2a6c42" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B930032C", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50937-f01e-00cd-145c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:38 GMT", + "x-ms-client-request-id" : "c0009f92-7657-4325-810a-b91a4b2a6c42" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails20582246d6fbe25b4f84", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "96f0a8a2-752c-4f49-a776-a662a91f179f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B937A61E", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50949-f01e-00cd-255c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:38 GMT", + "x-ms-client-request-id" : "96f0a8a2-752c-4f49-a776-a662a91f179f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails20602159b06839792479", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "aad2abff-8267-489b-822d-c89b776de1e3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B93EFAE2", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50960-f01e-00cd-3a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:38 GMT", + "x-ms-client-request-id" : "aad2abff-8267-489b-822d-c89b776de1e3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails20767255eefe00495708", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2418517e-a8bd-4d4a-aceb-ad275708a084" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B947AF91", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50975-f01e-00cd-4d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "2418517e-a8bd-4d4a-aceb-ad275708a084" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails208885197fd43c93260e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9f827f4d-fc23-4ac9-bc47-3044385d10eb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B94FC7D2", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50998-f01e-00cd-6e5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "9f827f4d-fc23-4ac9-bc47-3044385d10eb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2095315209f838863cc7", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4f2df93d-fb1d-4234-a4e6-a0db0088e5af" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B958F1C7", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d509b5-f01e-00cd-075c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "4f2df93d-fb1d-4234-a4e6-a0db0088e5af" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails210838930afebddc9c46", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "297c1f9a-a04e-456a-9a16-a9adb458407d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B960BBD5", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d509cd-f01e-00cd-1b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "297c1f9a-a04e-456a-9a16-a9adb458407d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails211844748ad0476fa2d4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "eb63b069-100e-484e-b46b-82e588360a4b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B968ACFF", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d509da-f01e-00cd-265c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "eb63b069-100e-484e-b46b-82e588360a4b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails212277893ee5260451bc", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8be23fcf-943b-471f-afe1-b27ced6b07f6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B972735E", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d509f3-f01e-00cd-3d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "8be23fcf-943b-471f-afe1-b27ced6b07f6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2133396871c4a39897c5", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0e3ccac9-aedf-47b2-a4c6-c513c4e27845" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B979EF39", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50a04-f01e-00cd-4c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "0e3ccac9-aedf-47b2-a4c6-c513c4e27845" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails21466802ca32cd57d68b", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bf21375b-d4c5-4ac5-ac21-e02fda820c0c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B9814406", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50a17-f01e-00cd-5f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "bf21375b-d4c5-4ac5-ac21-e02fda820c0c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails215227775993958b8295", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5d9bfea4-1773-488d-8f2d-1965c87b5dd7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B98A6DF2", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50a2f-f01e-00cd-765c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "5d9bfea4-1773-488d-8f2d-1965c87b5dd7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2164001509f6f45c7aca", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "72c83af6-e17d-4bdc-b9ce-ed5b3779b685" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B99349B4", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50a4c-f01e-00cd-0e5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "72c83af6-e17d-4bdc-b9ce-ed5b3779b685" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails217839263f8a60d0de4a", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a6b017cf-a2c9-4286-8f7e-f286d31c7995" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B99BFE5F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50a63-f01e-00cd-255c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "a6b017cf-a2c9-4286-8f7e-f286d31c7995" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2181443286e24823e032", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "59e487e2-a236-4837-a377-c2332734059d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B9A32C11", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50a73-f01e-00cd-335c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "59e487e2-a236-4837-a377-c2332734059d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails21997164ed5c605b78e1", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ace62d38-e3f6-4806-8d94-261285d256cd" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B9AA59B0", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50a80-f01e-00cd-405c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "ace62d38-e3f6-4806-8d94-261285d256cd" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails220836690af350f84eee", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b674866d-6219-4a8a-99be-d22534240d8e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B9B1AE81", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50a8f-f01e-00cd-4f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "b674866d-6219-4a8a-99be-d22534240d8e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails22129787afc5cbcfb561", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "87557987-0ec6-43d2-bb4b-de09d7a0c3e3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B9CAE1D7", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50aca-f01e-00cd-045c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "87557987-0ec6-43d2-bb4b-de09d7a0c3e3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails222397885abbd69deb84", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4708aeff-fdd2-4a12-8187-a432f29dfc4d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B9D2ABF3", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50ad8-f01e-00cd-125c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:39 GMT", + "x-ms-client-request-id" : "4708aeff-fdd2-4a12-8187-a432f29dfc4d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails223311913cb6775e2f0a", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9a74ee55-0b32-4b74-a312-8ea01cd13567" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B9DBD5DF", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50aeb-f01e-00cd-235c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:40 GMT", + "x-ms-client-request-id" : "9a74ee55-0b32-4b74-a312-8ea01cd13567" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails22499383e87faef7c9d2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2869964c-9458-49e1-816a-9a28d661fa82" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B9E43C4E", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50b07-f01e-00cd-3a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:40 GMT", + "x-ms-client-request-id" : "2869964c-9458-49e1-816a-9a28d661fa82" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails225479946e1972f25175", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9f9dd0c3-4641-4f9f-ac12-166e65176d06" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B9EC7BAF", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50b17-f01e-00cd-495c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:40 GMT", + "x-ms-client-request-id" : "9f9dd0c3-4641-4f9f-ac12-166e65176d06" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails22637578ecca8a46870b", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0986d4a9-f466-49c2-9dd9-3a83060eaf0c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B9F3F78A", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50b29-f01e-00cd-565c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:40 GMT", + "x-ms-client-request-id" : "0986d4a9-f466-49c2-9dd9-3a83060eaf0c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails227325982b206aafecaf", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b0aab67d-d246-4c23-8a17-243bb8e026db" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373B9FB736E", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50b39-f01e-00cd-655c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:40 GMT", + "x-ms-client-request-id" : "b0aab67d-d246-4c23-8a17-243bb8e026db" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails228245257fbe569c3e5c", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e3b10ddf-dc16-4612-b5c8-9acc90536e12" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA0279FB", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50b4c-f01e-00cd-765c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:40 GMT", + "x-ms-client-request-id" : "e3b10ddf-dc16-4612-b5c8-9acc90536e12" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails22998909a52bd67fc840", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "740409d8-f364-4aa0-bbce-c111f69c1844" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA0DC74F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50b60-f01e-00cd-075c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:40 GMT", + "x-ms-client-request-id" : "740409d8-f364-4aa0-bbce-c111f69c1844" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2300765634a132bc558e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "de08f1a0-8014-48d2-937b-935b943203c1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA285A9F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50bb1-f01e-00cd-525c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:40 GMT", + "x-ms-client-request-id" : "de08f1a0-8014-48d2-937b-935b943203c1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails23153728fc30581b98cc", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "20f95d23-e3cb-471e-9e17-854804232fe5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA31ABAF", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50bc4-f01e-00cd-645c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:40 GMT", + "x-ms-client-request-id" : "20f95d23-e3cb-471e-9e17-854804232fe5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails23219075c69deb698874", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "00985031-8d4b-4024-a636-e66d498b456a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA571721", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50c18-f01e-00cd-345c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:40 GMT", + "x-ms-client-request-id" : "00985031-8d4b-4024-a636-e66d498b456a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails23368207538fd0234fbd", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cb721e4f-e6d6-4528-9ab6-7feecc1a3bf9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA5EE10E", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50c2a-f01e-00cd-455c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:40 GMT", + "x-ms-client-request-id" : "cb721e4f-e6d6-4528-9ab6-7feecc1a3bf9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails23441517247ca78d924c", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f758fe88-8320-41b7-9477-13b4f486096a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA66F94F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50c37-f01e-00cd-515c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:40 GMT", + "x-ms-client-request-id" : "f758fe88-8320-41b7-9477-13b4f486096a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2351608140567d318693", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f88bc213-e685-4d26-8e32-beeafa7c781c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA6EC35C", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50c46-f01e-00cd-5f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:40 GMT", + "x-ms-client-request-id" : "f88bc213-e685-4d26-8e32-beeafa7c781c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails236498224b56e5d9635e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1627b9ba-0002-4c4d-8a08-5e97b2b033c1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA76B48B", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50c64-f01e-00cd-7b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "1627b9ba-0002-4c4d-8a08-5e97b2b033c1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails237455256523aea12d3c", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "11e4a410-e520-4b7c-82a9-66e334e085b0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA7DE233", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50c75-f01e-00cd-0a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "11e4a410-e520-4b7c-82a9-66e334e085b0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails23868476016e48c67d23", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "988ed10b-0425-4418-acc6-edabd6734e00" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA855E13", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50c8e-f01e-00cd-205c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "988ed10b-0425-4418-acc6-edabd6734e00" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails239905234004077e9571", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "051ea511-cf5e-4b6c-94bb-ae52d169e9a7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA8D4F41", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50ca3-f01e-00cd-325c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "051ea511-cf5e-4b6c-94bb-ae52d169e9a7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails24045408fbdbfaaf3885", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f944d718-68b7-4f65-9c36-4405b370740e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA94A3FC", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50cb5-f01e-00cd-435c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "f944d718-68b7-4f65-9c36-4405b370740e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails241143017a35b854b768", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5ec4fd03-7c73-4f66-8b0f-1919b9955833" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BA9DA6DA", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50cd1-f01e-00cd-5c5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "5ec4fd03-7c73-4f66-8b0f-1919b9955833" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails242155605405b06f0d8f", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "091e8f8f-8558-4d5b-ad6d-76da79db886f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BAA5E63B", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50ce0-f01e-00cd-6b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "091e8f8f-8558-4d5b-ad6d-76da79db886f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2439199577ab08a0373b", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "573f7e77-d41e-450f-88e1-c57c2e975673" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BAAE4CAA", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50cfa-f01e-00cd-025c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "573f7e77-d41e-450f-88e1-c57c2e975673" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2444592805909e29c697", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "aac192dd-827e-4541-87fb-1f0b528e0194" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BAB664EF", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50d18-f01e-00cd-205c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "aac192dd-827e-4541-87fb-1f0b528e0194" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2455109226fa38a5aa6d", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "38099407-3dc0-405d-96e4-becd4eebc247" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BAC05261", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50d31-f01e-00cd-385c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "38099407-3dc0-405d-96e4-becd4eebc247" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails246994781761859deec9", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "47a9c194-8044-4fe5-8288-4dc1de6793db" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BAC9070C", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50d4a-f01e-00cd-4e5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "47a9c194-8044-4fe5-8288-4dc1de6793db" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails24776262358cdc46b3e0", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f16195ce-605f-45cf-bba2-5856df501677" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BAD11F51", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50d59-f01e-00cd-5d5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "f16195ce-605f-45cf-bba2-5856df501677" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails24897718ed25f242d2e9", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1328d71c-8b9b-439f-8587-bb24bfcb268d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BAD91076", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50d67-f01e-00cd-6b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "1328d71c-8b9b-439f-8587-bb24bfcb268d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails24909380c9a2ff882b5d", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cffb97bf-b064-4061-8751-783c464474a7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BAE19E0A", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50d78-f01e-00cd-7b5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "cffb97bf-b064-4061-8751-783c464474a7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails2509955136a79896ad08", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1a0fed07-b5c7-431d-8b1c-508b2a5d3026" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BAE96818", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50d87-f01e-00cd-085c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:41 GMT", + "x-ms-client-request-id" : "1a0fed07-b5c7-431d-8b1c-508b2a5d3026" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails25137882ee8b7ed27d0e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8c1779eb-45cc-4744-a29e-07bfa57ae41a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BB151681", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50de5-f01e-00cd-615c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:42 GMT", + "x-ms-client-request-id" : "8c1779eb-45cc-4744-a29e-07bfa57ae41a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails252469464f82a4a1a8bc", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a01dec99-03ef-41db-8ada-34954bf0fccf" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BB1D07A6", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50dfa-f01e-00cd-755c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:42 GMT", + "x-ms-client-request-id" : "a01dec99-03ef-41db-8ada-34954bf0fccf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails253531901f9da510f47c", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5c3e1634-bbfe-4574-a9a3-c2210771b14a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BB248386", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50e13-f01e-00cd-0a5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:42 GMT", + "x-ms-client-request-id" : "5c3e1634-bbfe-4574-a9a3-c2210771b14a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails254410252529fe5d5586", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e0a4ee0e-3c23-4702-8bde-d19c6a14961c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BB2BD845", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50e2c-f01e-00cd-235c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:42 GMT", + "x-ms-client-request-id" : "e0a4ee0e-3c23-4702-8bde-d19c6a14961c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails25500788d49ef768e2d1", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5a7880c8-3aed-4b87-a162-7dd603f8ee61" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BB335425", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50e49-f01e-00cd-3f5c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:42 GMT", + "x-ms-client-request-id" : "5a7880c8-3aed-4b87-a162-7dd603f8ee61" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails256692641ce9163349e3", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fe33b830-aa5a-45b9-adb9-ef7225d549a9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BB3B6C6F", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50e6b-f01e-00cd-615c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:42 GMT", + "x-ms-client-request-id" : "fe33b830-aa5a-45b9-adb9-ef7225d549a9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2/javablobtoomanyoperationsfails25778248f1968b18518b", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "508a7ce4-e182-4d4e-9a86-745629da5ba9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75373BB446F44", + "Last-Modified" : "Fri, 18 Oct 2019 02:34:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "69d50e7e-f01e-00cd-745c-85553e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 18 Oct 2019 02:34:42 GMT", + "x-ms-client-request-id" : "508a7ce4-e182-4d4e-9a86-745629da5ba9" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?comp=batch", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0b408ca9-da42-4546-90d6-11bf783b9b59", + "Content-Type" : "multipart/mixed; boundary=batch_74de758b-25b8-493f-b79e-f04ae9c464ec" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "69d50f46-f01e-00cd-335c-85553e000000", + "Body" : "--batchresponse_52acf5f5-3936-4b6c-b2c3-0784fd650648\r\nContent-Type: application/http\r\n\r\nHTTP/1.1 400 The batch operation exceeds maximum number of allowed subrequests.\r\nx-ms-error-code: ExceedsMaxBatchRequestCount\r\nx-ms-request-id: 69d50f46-f01e-00cd-335c-85553e000000\r\nx-ms-version: 2019-02-02\r\nContent-Length: 263\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\nExceedsMaxBatchRequestCountThe batch operation exceeds maximum number of allowed subrequests.\nRequestId:69d50f46-f01e-00cd-335c-85553e000000\nTime:2019-10-18T02:34:43.0818658Z\r\n--batchresponse_52acf5f5-3936-4b6c-b2c3-0784fd650648--", + "Date" : "Fri, 18 Oct 2019 02:34:43 GMT", + "x-ms-client-request-id" : "0b408ca9-da42-4546-90d6-11bf783b9b59", + "Content-Type" : "multipart/mixed; boundary=batchresponse_52acf5f5-3936-4b6c-b2c3-0784fd650648" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtctoomanyoperationsfails&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f5a4c1ec-c563-466e-b0af-b18b8f1a6644" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "69d52e0f-f01e-00cd-545c-85553e000000", + "Body" : "jtctoomanyoperationsfailsjtctoomanyoperationsfails0010959474564dd0584bd2Fri, 18 Oct 2019 02:34:24 GMT\"0x8D75373B06CEFDD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 18 Oct 2019 02:35:02 GMT", + "x-ms-client-request-id" : "f5a4c1ec-c563-466e-b0af-b18b8f1a6644", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtctoomanyoperationsfails0010959474564dd0584bd2?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cd51cbeb-b60c-4798-b70b-d92e063da512" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "69d52e33-f01e-00cd-6f5c-85553e000000", + "Date" : "Fri, 18 Oct 2019 02:35:02 GMT", + "x-ms-client-request-id" : "cd51cbeb-b60c-4798-b70b-d92e063da512" + }, + "Exception" : null + } ], + "variables" : [ "jtctoomanyoperationsfails0010959474564dd0584bd2", "javablobtoomanyoperationsfails14923830ee05c0d5884", "javablobtoomanyoperationsfails283850ff8aec4c48ad4", "javablobtoomanyoperationsfails318401be4b6aa20fc74", "javablobtoomanyoperationsfails43480851128833797c4", "javablobtoomanyoperationsfails558387d4ba1670ec2c4", "javablobtoomanyoperationsfails635723dbcde0fb53304", "javablobtoomanyoperationsfails793086b446fd3e81524", "javablobtoomanyoperationsfails8307489a877bc28e2a4", "javablobtoomanyoperationsfails9251396caf139c633c4", "javablobtoomanyoperationsfails10121667bbd5bcfe0b54", "javablobtoomanyoperationsfails1175703e0b59273ca194", "javablobtoomanyoperationsfails1286737d3f72b8c09064", "javablobtoomanyoperationsfails1385738a12ee4a68d674", "javablobtoomanyoperationsfails14421231ba0f768d5c54", "javablobtoomanyoperationsfails1553002be0b17d5cf094", "javablobtoomanyoperationsfails165961586fa26ad79c14", "javablobtoomanyoperationsfails1777822f95c0d3427a94", "javablobtoomanyoperationsfails18221241512f60797e54", "javablobtoomanyoperationsfails1932338c4429acc57c84", "javablobtoomanyoperationsfails2003247ebe7e852fc554", "javablobtoomanyoperationsfails219360479580f2081404", "javablobtoomanyoperationsfails22663882a15ed36ea794", "javablobtoomanyoperationsfails23617491e9ea2942f374", "javablobtoomanyoperationsfails2410923e9686c0c1f784", "javablobtoomanyoperationsfails2577227e77406e896e14", "javablobtoomanyoperationsfails26440299687eb2c71194", "javablobtoomanyoperationsfails27273283bceddeebe454", "javablobtoomanyoperationsfails2894068789dfa4b32814", "javablobtoomanyoperationsfails2948965a5d4841070de4", "javablobtoomanyoperationsfails3021182b674fc6133064", "javablobtoomanyoperationsfails317497535194c5081fa4", "javablobtoomanyoperationsfails32821195d730af1bab04", "javablobtoomanyoperationsfails339853221c8674ee8d44", "javablobtoomanyoperationsfails3482752d916bfcabe8f4", "javablobtoomanyoperationsfails35100027c916ea410484", "javablobtoomanyoperationsfails3695940a810eceb438b4", "javablobtoomanyoperationsfails3707382899ada1413ac4", "javablobtoomanyoperationsfails3874392523292362cad4", "javablobtoomanyoperationsfails3965906d0f46f7583814", "javablobtoomanyoperationsfails4025015bdf9457e3aba4", "javablobtoomanyoperationsfails41067905942b065d6274", "javablobtoomanyoperationsfails4209981dc6c71c0790d4", "javablobtoomanyoperationsfails4364357671ddc3f0dc84", "javablobtoomanyoperationsfails441639251b8cad768044", "javablobtoomanyoperationsfails458914732dd35b035074", "javablobtoomanyoperationsfails46601638b5c062e91824", "javablobtoomanyoperationsfails472717587dc6790213c4", "javablobtoomanyoperationsfails48109546f5cbcb6de6a4", "javablobtoomanyoperationsfails496971274ac34b617fa4", "javablobtoomanyoperationsfails5055847a0c69d50a9e44", "javablobtoomanyoperationsfails51676060ad7dc2b74484", "javablobtoomanyoperationsfails52096619f0389b18c314", "javablobtoomanyoperationsfails5313299b8ca8f878bef4", "javablobtoomanyoperationsfails5452060be52fcb3af424", "javablobtoomanyoperationsfails5511533d1c6f4052ec84", "javablobtoomanyoperationsfails56083462793b59f2e434", "javablobtoomanyoperationsfails57469485d4adc49ca7c4", "javablobtoomanyoperationsfails5813593a8ace033b9634", "javablobtoomanyoperationsfails59430395d12ef5f00ea4", "javablobtoomanyoperationsfails6096590e65d995a9f864", "javablobtoomanyoperationsfails61835476fbfaea714964", "javablobtoomanyoperationsfails6263286de0a42ae0d334", "javablobtoomanyoperationsfails6395434dd149e67faee4", "javablobtoomanyoperationsfails648402412b55fb168974", "javablobtoomanyoperationsfails6579016a471aae098564", "javablobtoomanyoperationsfails6665270e628a01b92c24", "javablobtoomanyoperationsfails675286217acec67ee494", "javablobtoomanyoperationsfails68093951b1745b0ffb74", "javablobtoomanyoperationsfails6985974e8fcb1aa18b94", "javablobtoomanyoperationsfails7096314a67c6db090884", "javablobtoomanyoperationsfails71553818de5ade319f94", "javablobtoomanyoperationsfails7244387e9973c62cc4c4", "javablobtoomanyoperationsfails73252419c623ff5508a4", "javablobtoomanyoperationsfails74870159eed2173452f4", "javablobtoomanyoperationsfails7592861c25df05990364", "javablobtoomanyoperationsfails7602057e64e3771d02f4", "javablobtoomanyoperationsfails77573013e692dac45764", "javablobtoomanyoperationsfails7848395ef85129cfda44", "javablobtoomanyoperationsfails79249877f11989a895f4", "javablobtoomanyoperationsfails80236568a13a58f50154", "javablobtoomanyoperationsfails8139058e4f107309a094", "javablobtoomanyoperationsfails8200453ed30803f58474", "javablobtoomanyoperationsfails8320799a762a70375d94", "javablobtoomanyoperationsfails84336753d012cbcbfd14", "javablobtoomanyoperationsfails85002989b1cdf9e806d4", "javablobtoomanyoperationsfails86792947a43b775431a4", "javablobtoomanyoperationsfails8721053e1d7a09db30c4", "javablobtoomanyoperationsfails884067203eebb61759b4", "javablobtoomanyoperationsfails894289558a6b94304194", "javablobtoomanyoperationsfails90931423b9db1c5f7604", "javablobtoomanyoperationsfails918631333ee1770b4d34", "javablobtoomanyoperationsfails9271035fa220a07a6ec4", "javablobtoomanyoperationsfails9382582caa176e8668a4", "javablobtoomanyoperationsfails94201632ab27909dee94", "javablobtoomanyoperationsfails9527599c603e559419e4", "javablobtoomanyoperationsfails962028911a1d8f2c0234", "javablobtoomanyoperationsfails9776287bd3290b0ed5c4", "javablobtoomanyoperationsfails9898239c2f98a10ca464", "javablobtoomanyoperationsfails995040948d054344e8a4", "javablobtoomanyoperationsfails100312115b9091966ed0", "javablobtoomanyoperationsfails10140322aeb44f154c76", "javablobtoomanyoperationsfails1025019537dd0502b5b9", "javablobtoomanyoperationsfails103314728998040c0ac4", "javablobtoomanyoperationsfails10458420321b66b78caa", "javablobtoomanyoperationsfails10513181a80b45514f2d", "javablobtoomanyoperationsfails106199387bed4ed2593f", "javablobtoomanyoperationsfails10724873de514c74b3fc", "javablobtoomanyoperationsfails10880980bd3398b4402b", "javablobtoomanyoperationsfails10911184ab6e0065c68c", "javablobtoomanyoperationsfails110357238fe2d15f456d", "javablobtoomanyoperationsfails111093253eedd19f037d", "javablobtoomanyoperationsfails11243518269fe6bb8035", "javablobtoomanyoperationsfails11382851a2d42b8ef218", "javablobtoomanyoperationsfails1145327030e17841e057", "javablobtoomanyoperationsfails1159688398bb7467fa53", "javablobtoomanyoperationsfails1163474918ab886806bb", "javablobtoomanyoperationsfails1177782498762199aab7", "javablobtoomanyoperationsfails118106193b872aa52691", "javablobtoomanyoperationsfails11958796b62e9b41b697", "javablobtoomanyoperationsfails12068449bae73cf8f631", "javablobtoomanyoperationsfails12154061c071cbee91ca", "javablobtoomanyoperationsfails12238928b8d9edfa329a", "javablobtoomanyoperationsfails12317032cb507c035681", "javablobtoomanyoperationsfails12474711bb8e3844cb47", "javablobtoomanyoperationsfails125278230858cb7e7d1e", "javablobtoomanyoperationsfails12670460507908981746", "javablobtoomanyoperationsfails12759350adae7ca17dd1", "javablobtoomanyoperationsfails12893718ebaa61058381", "javablobtoomanyoperationsfails12993909c38307565224", "javablobtoomanyoperationsfails130799761920be3950e9", "javablobtoomanyoperationsfails13157403cbd4d8d7a439", "javablobtoomanyoperationsfails13266406d770cb32bbce", "javablobtoomanyoperationsfails13343829474878bed7b0", "javablobtoomanyoperationsfails13414074c001d9a56a7a", "javablobtoomanyoperationsfails135285358c3cd0f9a5b5", "javablobtoomanyoperationsfails136931154775e0522ca8", "javablobtoomanyoperationsfails137490385f10ab56dcb5", "javablobtoomanyoperationsfails1387006741f86b81c782", "javablobtoomanyoperationsfails1395253091fb524649e3", "javablobtoomanyoperationsfails140481524cf0594293e4", "javablobtoomanyoperationsfails14135108330677ce92e6", "javablobtoomanyoperationsfails1427761258cdd1085356", "javablobtoomanyoperationsfails14380805e8acde3f2417", "javablobtoomanyoperationsfails14436448d1dcd85db59b", "javablobtoomanyoperationsfails145435127e7e694fe28a", "javablobtoomanyoperationsfails1464051026aa6ed70301", "javablobtoomanyoperationsfails14777432b65b84d5cf3a", "javablobtoomanyoperationsfails1489003794c6eb8837a8", "javablobtoomanyoperationsfails149643020bc22ea1d3bb", "javablobtoomanyoperationsfails150824451dd29e6a8771", "javablobtoomanyoperationsfails1514477611e212eb6190", "javablobtoomanyoperationsfails15230484d1700cf1d6c1", "javablobtoomanyoperationsfails153968713862c084b5cd", "javablobtoomanyoperationsfails154890896fc921077596", "javablobtoomanyoperationsfails15532291e42219817d47", "javablobtoomanyoperationsfails1565412598e054704655", "javablobtoomanyoperationsfails157065261fa91774c153", "javablobtoomanyoperationsfails15875962b1d7d8e70c2f", "javablobtoomanyoperationsfails159607822d7d8572986d", "javablobtoomanyoperationsfails160123484035d9b7994f", "javablobtoomanyoperationsfails16155628732e0ee3e1cb", "javablobtoomanyoperationsfails162871179544f2090ced", "javablobtoomanyoperationsfails16392332ccd657ad3c0a", "javablobtoomanyoperationsfails1644022926c0069bf7c2", "javablobtoomanyoperationsfails16540037d802960c8b97", "javablobtoomanyoperationsfails16671064d277edf4a06e", "javablobtoomanyoperationsfails16742199a91c7ee3180e", "javablobtoomanyoperationsfails16820728c9d359a0da1e", "javablobtoomanyoperationsfails1692157900d08b5e00e4", "javablobtoomanyoperationsfails170830151947e8e76475", "javablobtoomanyoperationsfails17161236bdec863b24d2", "javablobtoomanyoperationsfails1726314731551a19df78", "javablobtoomanyoperationsfails1730769015e6c33b5855", "javablobtoomanyoperationsfails17403009a8384adf4d8c", "javablobtoomanyoperationsfails1756772153bb51c29faf", "javablobtoomanyoperationsfails176503273b0393fd7ad3", "javablobtoomanyoperationsfails1777118053a518d079d3", "javablobtoomanyoperationsfails17814055cd4afcf80253", "javablobtoomanyoperationsfails17906040c889f6a5f805", "javablobtoomanyoperationsfails18006900314760906762", "javablobtoomanyoperationsfails181324371555b0a2a75f", "javablobtoomanyoperationsfails18205443ac71fa941753", "javablobtoomanyoperationsfails18355751d42c45e60603", "javablobtoomanyoperationsfails18450673e218e70a9e62", "javablobtoomanyoperationsfails18556937b50cccaee6d9", "javablobtoomanyoperationsfails186571816ee8a8548b9c", "javablobtoomanyoperationsfails18701121604883388706", "javablobtoomanyoperationsfails1888215192429e393454", "javablobtoomanyoperationsfails18932486fdd2e382fbf9", "javablobtoomanyoperationsfails19039873b0aee0817a59", "javablobtoomanyoperationsfails1912122740de69f8f36c", "javablobtoomanyoperationsfails19241741e88537d0a2ab", "javablobtoomanyoperationsfails19314223ddd28b7225dc", "javablobtoomanyoperationsfails1941677813d9f89d65e9", "javablobtoomanyoperationsfails195923327f8910bdc4e6", "javablobtoomanyoperationsfails19666350e90445e9dc47", "javablobtoomanyoperationsfails19775795d3a4a20d0904", "javablobtoomanyoperationsfails19898741e05e1c2544da", "javablobtoomanyoperationsfails1997031143d87651d3ee", "javablobtoomanyoperationsfails20037013b17b8756a627", "javablobtoomanyoperationsfails201597583aa3a8fb5c67", "javablobtoomanyoperationsfails202819321d4e6fa3267f", "javablobtoomanyoperationsfails20305415c3dd409bdd0e", "javablobtoomanyoperationsfails20447179f0b4909d5f12", "javablobtoomanyoperationsfails20582246d6fbe25b4f84", "javablobtoomanyoperationsfails20602159b06839792479", "javablobtoomanyoperationsfails20767255eefe00495708", "javablobtoomanyoperationsfails208885197fd43c93260e", "javablobtoomanyoperationsfails2095315209f838863cc7", "javablobtoomanyoperationsfails210838930afebddc9c46", "javablobtoomanyoperationsfails211844748ad0476fa2d4", "javablobtoomanyoperationsfails212277893ee5260451bc", "javablobtoomanyoperationsfails2133396871c4a39897c5", "javablobtoomanyoperationsfails21466802ca32cd57d68b", "javablobtoomanyoperationsfails215227775993958b8295", "javablobtoomanyoperationsfails2164001509f6f45c7aca", "javablobtoomanyoperationsfails217839263f8a60d0de4a", "javablobtoomanyoperationsfails2181443286e24823e032", "javablobtoomanyoperationsfails21997164ed5c605b78e1", "javablobtoomanyoperationsfails220836690af350f84eee", "javablobtoomanyoperationsfails22129787afc5cbcfb561", "javablobtoomanyoperationsfails222397885abbd69deb84", "javablobtoomanyoperationsfails223311913cb6775e2f0a", "javablobtoomanyoperationsfails22499383e87faef7c9d2", "javablobtoomanyoperationsfails225479946e1972f25175", "javablobtoomanyoperationsfails22637578ecca8a46870b", "javablobtoomanyoperationsfails227325982b206aafecaf", "javablobtoomanyoperationsfails228245257fbe569c3e5c", "javablobtoomanyoperationsfails22998909a52bd67fc840", "javablobtoomanyoperationsfails2300765634a132bc558e", "javablobtoomanyoperationsfails23153728fc30581b98cc", "javablobtoomanyoperationsfails23219075c69deb698874", "javablobtoomanyoperationsfails23368207538fd0234fbd", "javablobtoomanyoperationsfails23441517247ca78d924c", "javablobtoomanyoperationsfails2351608140567d318693", "javablobtoomanyoperationsfails236498224b56e5d9635e", "javablobtoomanyoperationsfails237455256523aea12d3c", "javablobtoomanyoperationsfails23868476016e48c67d23", "javablobtoomanyoperationsfails239905234004077e9571", "javablobtoomanyoperationsfails24045408fbdbfaaf3885", "javablobtoomanyoperationsfails241143017a35b854b768", "javablobtoomanyoperationsfails242155605405b06f0d8f", "javablobtoomanyoperationsfails2439199577ab08a0373b", "javablobtoomanyoperationsfails2444592805909e29c697", "javablobtoomanyoperationsfails2455109226fa38a5aa6d", "javablobtoomanyoperationsfails246994781761859deec9", "javablobtoomanyoperationsfails24776262358cdc46b3e0", "javablobtoomanyoperationsfails24897718ed25f242d2e9", "javablobtoomanyoperationsfails24909380c9a2ff882b5d", "javablobtoomanyoperationsfails2509955136a79896ad08", "javablobtoomanyoperationsfails25137882ee8b7ed27d0e", "javablobtoomanyoperationsfails252469464f82a4a1a8bc", "javablobtoomanyoperationsfails253531901f9da510f47c", "javablobtoomanyoperationsfails254410252529fe5d5586", "javablobtoomanyoperationsfails25500788d49ef768e2d1", "javablobtoomanyoperationsfails256692641ce9163349e3", "javablobtoomanyoperationsfails25778248f1968b18518b" ] +} \ No newline at end of file From 3297e88f4ceaf4e9c0e76e132ed90a3303826602 Mon Sep 17 00:00:00 2001 From: Sameeksha Vaity Date: Fri, 18 Oct 2019 16:34:10 -0700 Subject: [PATCH 11/64] Fix logging to redact headers when empty allowedHeaderNames (#5905) --- .../core/http/policy/HttpLogOptions.java | 8 ++--- .../core/http/policy/HttpLoggingPolicy.java | 32 +++++++++++-------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogOptions.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogOptions.java index bfac6a05a7ce..c715f925b2da 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogOptions.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogOptions.java @@ -43,8 +43,8 @@ public class HttpLogOptions { public HttpLogOptions() { logLevel = HttpLogDetailLevel.NONE; - allowedHeaderNames = new HashSet<>(); - allowedQueryParamNames = new HashSet<>(DEFAULT_HEADERS_WHITELIST); + allowedHeaderNames = new HashSet<>(DEFAULT_HEADERS_WHITELIST); + allowedQueryParamNames = new HashSet<>(); } /** @@ -91,7 +91,7 @@ public Set getAllowedHeaderNames() { * @return The updated HttpLogOptions object. */ public HttpLogOptions setAllowedHeaderNames(final Set allowedHeaderNames) { - this.allowedHeaderNames = allowedHeaderNames == null ? new HashSet<>() : allowedHeaderNames; + this.allowedHeaderNames = allowedHeaderNames == null ? new HashSet<>() : allowedHeaderNames; return this; } @@ -124,7 +124,7 @@ public Set getAllowedQueryParamNames() { * @return The updated HttpLogOptions object. */ public HttpLogOptions setAllowedQueryParamNames(final Set allowedQueryParamNames) { - this.allowedQueryParamNames = allowedQueryParamNames; + this.allowedQueryParamNames = allowedQueryParamNames == null ? new HashSet<>() : allowedQueryParamNames; return this; } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java index 06a065a5eaf6..eacb98b20086 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java @@ -17,10 +17,12 @@ import java.net.URL; import java.nio.charset.StandardCharsets; +import java.util.Locale; import java.util.Optional; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.function.Function; +import java.util.stream.Collectors; /** * The Pipeline policy that handles logging of HTTP requests and responses. @@ -122,30 +124,34 @@ private Mono logRequest(final ClientLogger logger, final HttpRequest reque private void formatAllowableHeaders(Set allowedHeaderNames, HttpHeaders requestResponseHeaders, ClientLogger logger) { - if (!allowedHeaderNames.isEmpty()) { - StringBuilder sb = new StringBuilder(); - for (HttpHeader header : requestResponseHeaders) { - sb.append(header.getName()).append(":"); - if (allowedHeaderNames.stream().anyMatch(header.getName()::equalsIgnoreCase)) { - sb.append(header.getValue()); - } else { - sb.append(REDACTED_PLACEHOLDER); - } - sb.append(System.getProperty("line.separator")); + Set lowerCasedAllowedHeaderNames = allowedHeaderNames.stream().map(String::toLowerCase) + .collect(Collectors.toSet()); + StringBuilder sb = new StringBuilder(); + for (HttpHeader header : requestResponseHeaders) { + String headerName = header.getName(); + sb.append(headerName).append(":"); + if (lowerCasedAllowedHeaderNames.contains(headerName.toLowerCase(Locale.ROOT))) { + sb.append(header.getValue()); + } else { + sb.append(REDACTED_PLACEHOLDER); } - logger.info(sb.toString()); + sb.append(System.getProperty("line.separator")); } + logger.info(sb.toString()); } private void formatAllowableQueryParams(Set allowedQueryParamNames, String queryString, ClientLogger logger) { - if (allowedQueryParamNames != null && !allowedQueryParamNames.isEmpty() && queryString != null) { + Set lowerCasedAllowedQueryParams = allowedQueryParamNames.stream().map(String::toLowerCase) + .collect(Collectors.toSet()); + if (queryString != null) { StringBuilder sb = new StringBuilder(); String[] queryParams = queryString.split("&"); for (String queryParam : queryParams) { String[] queryPair = queryParam.split("=", 2); if (queryPair.length == 2) { - if (allowedQueryParamNames.stream().anyMatch(queryPair[0]::equalsIgnoreCase)) { + String queryName = queryPair[0]; + if (lowerCasedAllowedQueryParams.contains(queryName.toLowerCase(Locale.ROOT))) { sb.append(queryParam); } else { sb.append(queryPair[0]).append("=").append(REDACTED_PLACEHOLDER); From f391fcb5dca95cae7816f19071458d635ae463a3 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Fri, 18 Oct 2019 16:49:06 -0700 Subject: [PATCH 12/64] Add access condition models to Azure Core (#5941) * Add access condition models to Azure Core * Override superclass setters to return subtype * Updated documentation and added Fluent annotation --- .../com/azure/core/http/MatchConditions.java | 55 ++++++++++++ .../azure/core/http/RequestConditions.java | 83 +++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 sdk/core/azure-core/src/main/java/com/azure/core/http/MatchConditions.java create mode 100644 sdk/core/azure-core/src/main/java/com/azure/core/http/RequestConditions.java diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/MatchConditions.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/MatchConditions.java new file mode 100644 index 000000000000..442cb2a53cca --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/MatchConditions.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http; + +import com.azure.core.annotation.Fluent; + +/** + * Specifies HTTP options for conditional requests. + */ +@Fluent +public class MatchConditions { + private String ifMatch; + private String ifNoneMatch; + + /** + * Gets the ETag that resources must match. + * + * @return The ETag that resources must match. + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Optionally limit requests to resources that match the passed ETag. + * + * @param ifMatch ETag that resources must match. + * @return The updated MatchConditions object. + */ + public MatchConditions setIfMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Gets the ETag that resources must not match. + * + * @return The ETag that resources must not match. + */ + public String getIfNoneMatch() { + return ifNoneMatch; + } + + /** + * Optionally limit requests to resources that do not match the passed ETag. + * + * @param ifNoneMatch ETag that resources must not match. + * @return The updated MatchConditions object. + */ + public MatchConditions setIfNoneMatch(String ifNoneMatch) { + this.ifNoneMatch = ifNoneMatch; + return this; + } +} diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/RequestConditions.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/RequestConditions.java new file mode 100644 index 000000000000..392813a8d3b5 --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/RequestConditions.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http; + +import com.azure.core.annotation.Fluent; + +import java.time.OffsetDateTime; + +/** + * Specifies HTTP options for conditional requests based on modification time. + */ +@Fluent +public class RequestConditions extends MatchConditions { + private OffsetDateTime ifModifiedSince; + private OffsetDateTime ifUnmodifiedSince; + + /** + * Optionally limit requests to resources that match the passed ETag. + * + * @param ifMatch ETag that resources must match. + * @return The updated ResourceConditions object. + */ + @Override + public RequestConditions setIfMatch(String ifMatch) { + super.setIfMatch(ifMatch); + return this; + } + + /** + * Optionally limit requests to resources that do not match the passed ETag. + * + * @param ifNoneMatch ETag that resources must not match. + * @return The updated ResourceConditions object. + */ + @Override + public RequestConditions setIfNoneMatch(String ifNoneMatch) { + super.setIfNoneMatch(ifNoneMatch); + return this; + } + + /** + * Gets the {@link OffsetDateTime datetime} that resources must have been modified since. + * + * @return The datetime that resources must have been modified since. + */ + public OffsetDateTime getIfModifiedSince() { + return ifModifiedSince; + } + + /** + * Optionally limit requests to resources that have only been modified since the passed + * {@link OffsetDateTime datetime}. + * + * @param ifModifiedSince The datetime that resources must have been modified since. + * @return The updated ResourceConditions object. + */ + public RequestConditions setIfModifiedSince(OffsetDateTime ifModifiedSince) { + this.ifModifiedSince = ifModifiedSince; + return this; + } + + /** + * Gets the {@link OffsetDateTime datetime} that resources must have remained unmodified since. + * + * @return The datetime that resources must have remained unmodified since. + */ + public OffsetDateTime getIfUnmodifiedSince() { + return ifUnmodifiedSince; + } + + /** + * Optionally limit requests to resources that have remained unmodified since the passed + * {@link OffsetDateTime datetime}. + * + * @param ifUnmodifiedSince The datetime that resources must have remained unmodified since. + * @return The updated ResourceConditions object. + */ + public RequestConditions setIfUnmodifiedSince(OffsetDateTime ifUnmodifiedSince) { + this.ifUnmodifiedSince = ifUnmodifiedSince; + return this; + } +} From 063e398dc95b3485bb08d04aa40a37cfb61dbcc9 Mon Sep 17 00:00:00 2001 From: Connie Yau Date: Fri, 18 Oct 2019 16:51:06 -0700 Subject: [PATCH 13/64] Update File SAS token generation to match languages. (#5919) * Updating File Service SAS with algorithm. * Adding javadoc and samples. --- .../common/implementation/Constants.java | 10 - .../file/FileServiceSasSignatureValues.java | 277 +++++++++--------- ...SasSignatureValuesJavaDocCodeSnippets.java | 50 ++++ .../azure/storage/file/FileAPITests.groovy | 12 +- .../storage/file/FileAsyncAPITests.groovy | 9 +- .../azure/storage/file/FileSASTests.groovy | 48 +-- 6 files changed, 217 insertions(+), 189 deletions(-) create mode 100644 sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceSasSignatureValuesJavaDocCodeSnippets.java diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java index 9b4f0734d340..7fe0a211042e 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java @@ -234,16 +234,6 @@ public static final class UrlConstants { */ public static final String SAS_SIGNED_KEY_VERSION = "skv"; - /** - * The SAS file constant. - */ - public static final String SAS_FILE_CONSTANT = "f"; - - /** - * The SAS share constant. - */ - public static final String SAS_SHARE_CONSTANT = "s"; - /** * The SAS queue constant. */ diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java index 0492d768c7cd..cbc80f24c896 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java @@ -3,34 +3,49 @@ package com.azure.storage.file; -import com.azure.storage.common.sas.SasProtocol; -import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.sas.SasIpRange; -import com.azure.storage.common.Utility; +import com.azure.core.implementation.util.ImplUtils; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.Utility; +import com.azure.storage.common.sas.SasIpRange; +import com.azure.storage.common.sas.SasProtocol; import java.time.OffsetDateTime; /** - * FileServiceSasSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage service. Once - * all the values here are set appropriately, call generateSASQueryParameters to obtain a representation of the SAS - * which can actually be applied to file urls. Note: that both this class and {@link FileServiceSasQueryParameters} - * exist because the former is mutable and a logical representation while the latter is immutable and used to generate - * actual REST requests. - *

    - * Please see here - * for more conceptual information on SAS. - *

    - * Please see here for - * more details on each value, including which are required. + * Used to generate a Shared Access Signature (SAS) for Azure Files service. Once all the values here are set + * appropriately, call {@link + * #generateSasQueryParameters(StorageSharedKeyCredential) generateSasQueryParameters(StorageSharedKeyCredential)} to + * obtain a representation of the SAS which can be applied to file urls. + * + *

    Generating a file share SAS

    + *

    The snippet below generates a file share SAS that lasts for three days, and gives the user read, create, and list + * permissions to the share. + * + * {@codesnippet com.azure.storage.file.fileServiceSasQueryParameters.generateSasQueryParameters.shareSas#StorageSharedKeyCredential} + * + *

    Generating a file SAS

    + *

    The snippet below generates a file SAS that has the same duration and permissions specified by the + * {@link #setIdentifier(String) stored access policy}. * - *

    Please see - * here - * for additional samples.

    + * {@codesnippet com.azure.storage.file.fileServiceSasQueryParameters.generateSasQueryParameters#StorageSharedKeyCredential} + * + * @see FileServiceSasQueryParameters + * @see Storage SAS overview + * @see Constructing a Service + * SAS */ public final class FileServiceSasSignatureValues { + /** + * The SAS file constant. + */ + private static final String SAS_FILE_CONSTANT = "f"; + + /** + * The SAS share constant. + */ + private static final String SAS_SHARE_CONSTANT = "s"; - private String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; + private String version; private SasProtocol protocol; @@ -42,9 +57,9 @@ public final class FileServiceSasSignatureValues { private SasIpRange sasIpRange; - private String canonicalName; + private String shareName; - private String resource; + private String filePath; private String identifier; @@ -61,46 +76,7 @@ public final class FileServiceSasSignatureValues { /** * Creates an object with empty values for all fields. */ - FileServiceSasSignatureValues() { - } - - /** - * Creates an object with the specified expiry time and permissions - * - * @param expiryTime Time the SAS becomes valid - * @param permissions Permissions granted by the SAS - */ - FileServiceSasSignatureValues(OffsetDateTime expiryTime, String permissions) { - this.expiryTime = expiryTime; - this.permissions = permissions; - } - - /** - * Creates an object with the specified identifier - * - * @param identifier Identifier for the SAS - */ - FileServiceSasSignatureValues(String identifier) { - this.identifier = identifier; - } - - FileServiceSasSignatureValues(String version, SasProtocol sasProtocol, OffsetDateTime startTime, - OffsetDateTime expiryTime, String permission, SasIpRange sasIpRange, String identifier, String cacheControl, - String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { - if (version != null) { - this.version = version; - } - this.protocol = sasProtocol; - this.startTime = startTime; - this.expiryTime = expiryTime; - this.permissions = permission; - this.sasIpRange = sasIpRange; - this.identifier = identifier; - this.cacheControl = cacheControl; - this.contentDisposition = contentDisposition; - this.contentEncoding = contentEncoding; - this.contentLanguage = contentLanguage; - this.contentType = contentType; + public FileServiceSasSignatureValues() { } /** @@ -186,14 +162,28 @@ public String getPermissions() { } /** - * Sets the permissions string allowed by the SAS. Please refer to either {@link ShareSasPermission} or {@link - * FileSasPermission} depending on the resource being accessed for help constructing the permissions string. + * Sets the permissions allowed by the SAS. Share SASs are created when only + * {@link #setShareName(String) share name} is set on the builder. * - * @param permissions Permissions string for the SAS + * @param permissions Permissions for the share SAS. + * @return the updated FileServiceSasSignatureValues object. + */ + public FileServiceSasSignatureValues setPermissions(ShareSasPermission permissions) { + Utility.assertNotNull("permissions", permissions); + this.permissions = permissions.toString(); + return this; + } + + /** + * Sets the permissions allowed by the SAS. File SASs are created when both a + * {@link #setShareName(String) share name} and {@link #setFilePath(String) file path} are set on the builder. + * + * @param permissions Permissions for the SAS. * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSasSignatureValues setPermissions(String permissions) { - this.permissions = permissions; + public FileServiceSasSignatureValues setPermissions(FileSasPermission permissions) { + Utility.assertNotNull("permissions", permissions); + this.permissions = permissions.toString(); return this; } @@ -216,72 +206,50 @@ public FileServiceSasSignatureValues setSasIpRange(SasIpRange sasIpRange) { } /** - * @return the resource the SAS user may access. - */ - public String getResource() { - return resource; - } - - /** - * Sets the resource the SAS user may access. + * Gets the name of the share being made accessible. * - * @param resource Allowed resources string to set - * @return the updated FileServiceSasSignatureValues object - */ - public FileServiceSasSignatureValues setResource(String resource) { - this.resource = resource; - return this; - } - - /** - * @return the canonical name of the object the SAS user may access. + * @return The name of the share being made accessible. */ - public String getCanonicalName() { - return canonicalName; + public String getShareName() { + return shareName; } /** - * Sets the canonical name of the object the SAS user may access. + * Sets the name of the share being made accessible. * - * @param canonicalName Canonical name of the object the SAS grants access + * @param shareName The name of the share being made accessible. * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSasSignatureValues setCanonicalName(String canonicalName) { - this.canonicalName = canonicalName; + public FileServiceSasSignatureValues setShareName(String shareName) { + this.shareName = shareName; return this; } /** - * Sets the canonical name of the object the SAS user may access. Constructs a canonical name of - * "/file/{accountName}/{shareName}/{filePath}". + * Gets the path of the file or directory being made accessible. {@code null} or an empty string for a share SAS. * - * @param shareName Name of the share - * @param filePath Name of the file - * @param accountName Name of the account that contains the object - * @return the updated FileServiceSasSignatureValues object + * @return The path of the file or directory being made accessible. {@code null} or an empty string for a share SAS. */ - public FileServiceSasSignatureValues setCanonicalName(String shareName, String filePath, String accountName) { - this.canonicalName = String.format("/file/%s/%s/%s", accountName, shareName, filePath); - return this; + public String getFilePath() { + return filePath; } /** - * Sets the canonical name of the object the SAS user may access. Constructs a canonical name of - * "/file/{accountName}/{shareName}". + * Sets the path of the file or directory being made accessible. Pass in {@code null} or an empty string for a share + * SAS. * - * @param shareName Name of the share - * @param accountName Name of the account that contains the object + * @param filePath The name of the share being made accessible. * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSasSignatureValues setCanonicalName(String shareName, String accountName) { - this.canonicalName = String.format("/file/%s/%s", accountName, shareName); + public FileServiceSasSignatureValues setFilePath(String filePath) { + this.filePath = filePath; return this; } /** * @return the name of the access policy on the share this SAS references if any. Please see - * here - * for more information. + * + * Establishing a stored access policy for more information. */ public String getIdentifier() { return identifier; @@ -289,10 +257,10 @@ public String getIdentifier() { /** * Sets the name of the access policy on the share this SAS references if any. Please see - * here - * for more information. + * + * Establishing a stored access policy for more information. * - * @param identifier Name of the access policy + * @param identifier Name of the stored access policy * @return the updated FileServiceSasSignatureValues object */ public FileServiceSasSignatureValues setIdentifier(String identifier) { @@ -394,53 +362,92 @@ public FileServiceSasSignatureValues setContentType(String contentType) { * Uses an account's shared key credential to sign these signature values to produce the proper SAS query * parameters. * + *

    Notes on SAS generation

    + *

    + *

      + *
    • If {@link #setVersion(String) version} is not set, the {@link FileServiceVersion#getLatest() latest service + * version} is used.
    • + *
    • If {@link #setIdentifier(String) identifier} is set, {@link #setExpiryTime(OffsetDateTime) expiryTime} and + * permissions should not be set. These values are inherited from the stored access policy.
    • + *
    • Otherwise, {@link #setExpiryTime(OffsetDateTime) expiryTime} and {@link #getPermissions() permissions} must + * be set.
    • + *
    + * + *

    + * The type of SAS query parameters returned depends on the following: + *

      + *
    1. If {@link #getFilePath()} is not set, query parameters for a share SAS are returned.
    2. + *
    3. Otherwise, {@link #getShareName()} and {@link #getFilePath()} are used to create query parameters for a + * file SAS.
    4. + *
    + * + *

    See class level JavaDocs for code snippets.

    + * * @param storageSharedKeyCredentials A {@link StorageSharedKeyCredential} object used to sign the SAS values. * @return {@link FileServiceSasQueryParameters} * @throws IllegalStateException If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64 * encoded string, or the UTF-8 charset isn't supported. - * @throws NullPointerException If {@code storageSharedKeyCredentials} is null. Or when any of {@code version}, - * {@code canonicalName} or {@code resource} is null. Or if {@code identifier} is not set and any of - * {@code expiryTime} or {@code permissions} is null. Or if {@code expiryTime} and {@code permissions} are not set - * and {@code identifier} is null + * @throws IllegalArgumentException if {@link #getPermissions()} contains an invalid character for the SAS resource. + * @throws NullPointerException If {@code storageSharedKeyCredentials} is null. */ - public FileServiceSasQueryParameters generateSASQueryParameters( + public FileServiceSasQueryParameters generateSasQueryParameters( StorageSharedKeyCredential storageSharedKeyCredentials) { Utility.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); - assertGenerateOK(); + + final String resource; + if (ImplUtils.isNullOrEmpty(filePath)) { + resource = SAS_SHARE_CONSTANT; + + // Make sure the permission characters are in the correct order + if (permissions != null) { + permissions = ShareSasPermission.parse(permissions).toString(); + } + } else { + resource = SAS_FILE_CONSTANT; + + // Make sure the permission characters are in the correct order + if (permissions != null) { + permissions = FileSasPermission.parse(permissions).toString(); + } + } + + if (ImplUtils.isNullOrEmpty(version)) { + version = FileServiceVersion.getLatest().getVersion(); + } // Signature is generated on the un-url-encoded values. - String signature = storageSharedKeyCredentials.computeHmac256(stringToSign()); + String canonicalName = getCanonicalName(storageSharedKeyCredentials.getAccountName(), shareName, filePath); + String stringToSign = stringToSign(canonicalName); + String signature = storageSharedKeyCredentials.computeHmac256(stringToSign); return new FileServiceSasQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, - this.sasIpRange, this.identifier, this.resource, this.permissions, signature, this.cacheControl, + this.sasIpRange, this.identifier, resource, this.permissions, signature, this.cacheControl, this.contentDisposition, this.contentEncoding, this.contentLanguage, this.contentType); } /** - * Common assertions for generateSASQueryParameters overloads. + * Computes the canonical name for a share or file resource for SAS signing. + * Share: "/file/account/sharename" + * File: "/file/account/sharename/filename" + * File: "/file/account/sharename/directoryname/filename" + * + * @param account The name of the storage account. + * @param shareName The name of the share. + * @param filePath The path of the file. + * @return The canonical resource name. */ - private void assertGenerateOK() { - Utility.assertNotNull("version", this.version); - Utility.assertNotNull("canonicalName", this.canonicalName); - Utility.assertNotNull("resource", this.resource); - - // If a SignedIdentifier is not being used both expiryDate and permissions must be set. - if (identifier == null) { - Utility.assertNotNull("expiryTime", this.expiryTime); - Utility.assertNotNull("permissions", this.permissions); - } - // Still need to check identifier if expiry time and permissions are not both set - if (expiryTime == null || permissions == null) { - Utility.assertNotNull("identifier", identifier); - } + private static String getCanonicalName(String account, String shareName, String filePath) { + return !ImplUtils.isNullOrEmpty(filePath) + ? String.format("/file/%s/%s/%s", account, shareName, filePath.replace("\\", "/")) + : String.format("/file/%s/%s", account, shareName); } - private String stringToSign() { + private String stringToSign(String canonicalName) { return String.join("\n", this.permissions == null ? "" : this.permissions, this.startTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), this.expiryTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), - this.canonicalName == null ? "" : this.canonicalName, + canonicalName, this.identifier == null ? "" : this.identifier, this.sasIpRange == null ? "" : this.sasIpRange.toString(), this.protocol == null ? "" : protocol.toString(), diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceSasSignatureValuesJavaDocCodeSnippets.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceSasSignatureValuesJavaDocCodeSnippets.java new file mode 100644 index 000000000000..e9093cc127a0 --- /dev/null +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceSasSignatureValuesJavaDocCodeSnippets.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.storage.file; + +import com.azure.storage.common.StorageSharedKeyCredential; + +import java.time.Duration; +import java.time.OffsetDateTime; + +/** + * Code snippets for {@link FileServiceSasSignatureValues}. + */ +public class FileServiceSasSignatureValuesJavaDocCodeSnippets { + /** + * Creates a file share SAS. + */ + public void shareSas() { + // BEGIN: com.azure.storage.file.fileServiceSasQueryParameters.generateSasQueryParameters.shareSas#StorageSharedKeyCredential + StorageSharedKeyCredential credential = new StorageSharedKeyCredential("my-account", "key"); + ShareSasPermission permission = new ShareSasPermission() + .setCreatePermission(true) + .setReadPermission(true); + + // The expiry time and permissions are required to create a valid SAS + // if a stored access policy identifier is not set. + FileServiceSasQueryParameters sasQueryParameters = new FileServiceSasSignatureValues() + .setExpiryTime(OffsetDateTime.now().plus(Duration.ofDays(3))) + .setPermissions(permission) + .setShareName("file-share-name") + .generateSasQueryParameters(credential); + // END: com.azure.storage.file.fileServiceSasQueryParameters.generateSasQueryParameters.shareSas#StorageSharedKeyCredential + } + + /** + * Creates a file share SAS. + */ + public void fileSas() { + // BEGIN: com.azure.storage.file.fileServiceSasQueryParameters.generateSasQueryParameters#StorageSharedKeyCredential + StorageSharedKeyCredential credential = new StorageSharedKeyCredential("my-account", "key"); + + // The shared access policy, "read-write-user" exists in the storage account. The file SAS generated from this + // has the same duration and permissions as the policy. + // The expiry and permissions should not be set explicitly. + FileServiceSasQueryParameters sasQueryParameters = new FileServiceSasSignatureValues() + .setIdentifier("read-write-user") + .setShareName("file-share-name") + .generateSasQueryParameters(credential); + // END: com.azure.storage.file.fileServiceSasQueryParameters.generateSasQueryParameters#StorageSharedKeyCredential + } +} diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy index 7a926a8fb0b6..ffb3539c6158 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy @@ -7,15 +7,15 @@ import com.azure.core.exception.HttpResponseException import com.azure.core.exception.UnexpectedLengthException import com.azure.core.http.rest.Response import com.azure.core.util.Context -import com.azure.storage.common.implementation.Constants import com.azure.storage.common.StorageSharedKeyCredential +import com.azure.storage.common.implementation.Constants import com.azure.storage.file.models.FileCopyInfo import com.azure.storage.file.models.FileErrorCode import com.azure.storage.file.models.FileHttpHeaders import com.azure.storage.file.models.FileRange +import com.azure.storage.file.models.FileStorageException import com.azure.storage.file.models.NtfsFileAttributes import com.azure.storage.file.models.ShareSnapshotInfo -import com.azure.storage.file.models.FileStorageException import spock.lang.Ignore import spock.lang.Unroll @@ -380,10 +380,10 @@ class FileAPITests extends APISpec { def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sasToken = new FileServiceSasSignatureValues() .setExpiryTime(getUTCNow().plusDays(1)) - .setPermissions(new FileSasPermission().setReadPermission(true).toString()) - .setCanonicalName(primaryFileClient.getShareName(), primaryFileClient.getFilePath(), credential.getAccountName()) - .setResource(Constants.UrlConstants.SAS_FILE_CONSTANT) - .generateSASQueryParameters(credential) + .setPermissions(new FileSasPermission().setReadPermission(true)) + .setShareName(primaryFileClient.getShareName()) + .setFilePath(primaryFileClient.getFilePath()) + .generateSasQueryParameters(credential) .encode() when: diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy index 74638655dba0..0a7df09c480b 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy @@ -6,7 +6,6 @@ package com.azure.storage.file import com.azure.core.exception.HttpResponseException import com.azure.core.exception.UnexpectedLengthException import com.azure.core.implementation.util.FluxUtil -import com.azure.storage.common.implementation.Constants import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.file.models.FileErrorCode import com.azure.storage.file.models.FileHttpHeaders @@ -408,10 +407,10 @@ class FileAsyncAPITests extends APISpec { def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sasToken = new FileServiceSasSignatureValues() .setExpiryTime(getUTCNow().plusDays(1)) - .setPermissions(new FileSasPermission().setReadPermission(true).toString()) - .setCanonicalName(primaryFileAsyncClient.getShareName(), primaryFileAsyncClient.getFilePath(), credential.getAccountName()) - .setResource(Constants.UrlConstants.SAS_FILE_CONSTANT) - .generateSASQueryParameters(credential) + .setPermissions(new FileSasPermission().setReadPermission(true)) + .setShareName(primaryFileAsyncClient.getShareName()) + .setFilePath(primaryFileAsyncClient.getFilePath()) + .generateSasQueryParameters(credential) .encode() when: diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy index ba40272a6542..8cf15c8ecbf0 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy @@ -1,14 +1,13 @@ package com.azure.storage.file - +import com.azure.storage.common.StorageSharedKeyCredential +import com.azure.storage.common.implementation.Constants import com.azure.storage.common.sas.AccountSasPermission import com.azure.storage.common.sas.AccountSasResourceType import com.azure.storage.common.sas.AccountSasService import com.azure.storage.common.sas.AccountSasSignatureValues -import com.azure.storage.common.implementation.Constants import com.azure.storage.common.sas.SasIpRange import com.azure.storage.common.sas.SasProtocol -import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.file.models.FileAccessPolicy import com.azure.storage.file.models.FileSignedIdentifier import com.azure.storage.file.models.FileStorageException @@ -136,21 +135,6 @@ class FileSASTests extends APISpec { thrown(IllegalArgumentException) } - def "serviceSASSignatureValues canonicalizedResource"() { - setup: - def filePath = primaryFileClient.getFilePath() - def shareName = primaryFileClient.getShareName() - def accountName = "account" - - when: - def serviceSASSignatureValues = new FileServiceSasSignatureValues() - .setCanonicalName(shareName, filePath, accountName) - .setResource(Constants.UrlConstants.SAS_FILE_CONSTANT) - - then: - serviceSASSignatureValues.getCanonicalName() == "/file/" + accountName + "/" + shareName + "/" + filePath - } - def "FileSAS network test download upload"() { setup: String data = "test" @@ -177,7 +161,7 @@ class FileSASTests extends APISpec { when: def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sas = new FileServiceSasSignatureValues() - .setPermissions(permissions.toString()) + .setPermissions(permissions) .setExpiryTime(expiryTime) .setStartTime(startTime) .setProtocol(sasProtocol) @@ -187,9 +171,9 @@ class FileSASTests extends APISpec { .setContentEncoding(contentEncoding) .setContentLanguage(contentLanguage) .setContentType(contentType) - .setCanonicalName(primaryFileClient.getShareName(), primaryFileClient.getFilePath(), credential.getAccountName()) - .setResource(Constants.UrlConstants.SAS_FILE_CONSTANT) - .generateSASQueryParameters(credential) + .setShareName(primaryFileClient.getShareName()) + .setFilePath(primaryFileClient.getFilePath()) + .generateSasQueryParameters(credential) .encode() then: @@ -236,7 +220,7 @@ class FileSASTests extends APISpec { when: def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sas = new FileServiceSasSignatureValues() - .setPermissions(permissions.toString()) + .setPermissions(permissions) .setExpiryTime(expiryTime) .setStartTime(startTime) .setProtocol(sasProtocol) @@ -246,9 +230,9 @@ class FileSASTests extends APISpec { .setContentEncoding(contentEncoding) .setContentLanguage(contentLanguage) .setContentType(contentType) - .setCanonicalName(primaryFileClient.getShareName(), primaryFileClient.getFilePath(), credential.getAccountName()) - .setResource(Constants.UrlConstants.SAS_FILE_CONSTANT) - .generateSASQueryParameters(credential) + .setShareName(primaryFileClient.getShareName()) + .setFilePath(primaryFileClient.getFilePath()) + .generateSasQueryParameters(credential) .encode() def client = fileBuilderHelper(interceptorManager, shareName, filePath) @@ -291,9 +275,8 @@ class FileSASTests extends APISpec { def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sasWithId = new FileServiceSasSignatureValues() .setIdentifier(identifier.getId()) - .setCanonicalName(primaryShareClient.getShareName(), credential.getAccountName()) - .setResource(Constants.UrlConstants.SAS_SHARE_CONSTANT) - .generateSASQueryParameters(credential) + .setShareName(primaryShareClient.getShareName()) + .generateSasQueryParameters(credential) .encode() ShareClient client1 = shareBuilderHelper(interceptorManager, primaryShareClient.getShareName()) @@ -305,11 +288,10 @@ class FileSASTests extends APISpec { client1.deleteDirectory("dir") def sasWithPermissions = new FileServiceSasSignatureValues() - .setPermissions(permissions.toString()) + .setPermissions(permissions) .setExpiryTime(expiryTime) - .setCanonicalName(primaryShareClient.getShareName(), credential.getAccountName()) - .setResource(Constants.UrlConstants.SAS_SHARE_CONSTANT) - .generateSASQueryParameters(credential) + .setShareName(primaryFileClient.getShareName()) + .generateSasQueryParameters(credential) .encode() def client2 = shareBuilderHelper(interceptorManager, primaryShareClient.getShareName()) From 9eb8c1250b2efe19afb29c05920321bea3c6b42a Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Fri, 18 Oct 2019 16:59:21 -0700 Subject: [PATCH 14/64] Update retry policy to retry when http status is 429 (#5944) --- .../src/main/java/com/azure/core/http/policy/RetryPolicy.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java index c66e479d4402..8bf2418344fe 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java @@ -19,6 +19,7 @@ public class RetryPolicy implements HttpPipelinePolicy { private static final int DEFAULT_MAX_RETRIES = 3; private static final int DEFAULT_DELAY = 0; + private static final int HTTP_STATUS_TOO_MANY_REQUESTS = 429; private static final ChronoUnit DEFAULT_TIME_UNIT = ChronoUnit.MILLIS; private static final String RETRY_AFTER_MS_HEADER = "retry-after-ms"; private final int maxRetries; @@ -74,6 +75,7 @@ private boolean shouldRetry(HttpResponse response, int tryCount) { int code = response.getStatusCode(); return tryCount < maxRetries && (code == HttpURLConnection.HTTP_CLIENT_TIMEOUT + || code == HTTP_STATUS_TOO_MANY_REQUESTS // HttpUrlConnection does not define HTTP status 429 || (code >= HttpURLConnection.HTTP_INTERNAL_ERROR && code != HttpURLConnection.HTTP_NOT_IMPLEMENTED && code != HttpURLConnection.HTTP_VERSION)); From 0e0a36ec8755a61bff248629fe0d4449fbdef665 Mon Sep 17 00:00:00 2001 From: Connie Yau Date: Fri, 18 Oct 2019 17:49:27 -0700 Subject: [PATCH 15/64] Update Queue SAS token generation to match languages. (#5915) * Update Queue SAS token generation to match languages. * Adding codesnippets. * Update QueueService with better docs and samples. --- .../queue/QueueServiceSasSignatureValues.java | 171 ++++++++---------- ...SasSignatureValuesJavaDocCodeSnippets.java | 43 +++++ .../azure/storage/queue/QueueSASTests.groovy | 21 +-- 3 files changed, 124 insertions(+), 111 deletions(-) create mode 100644 sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceSasSignatureValuesJavaDocCodeSnippets.java diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java index dc0a46c50a8e..70713c71b0f7 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java @@ -3,34 +3,39 @@ package com.azure.storage.queue; -import com.azure.storage.common.sas.SasProtocol; -import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.sas.SasIpRange; -import com.azure.storage.common.Utility; +import com.azure.core.implementation.util.ImplUtils; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.Utility; +import com.azure.storage.common.sas.SasIpRange; +import com.azure.storage.common.sas.SasProtocol; import java.time.OffsetDateTime; /** - * QueueServiceSasSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage service. Once - * all the values here are set appropriately, call generateSASQueryParameters to obtain a representation of the SAS - * which can actually be applied to queue urls. Note: that both this class and {@link QueueServiceSasQueryParameters} - * exist because the former is mutable and a logical representation while the latter is immutable and used to generate - * actual REST requests. - *

    - * Please see here - * for more conceptual information on SAS. - *

    - * Please see here for - * more details on each value, including which are required. + * Used to generate a Shared Access Signature (SAS) for Azure Storage Queues service. Once all the values here are set, + * call {@link + * #generateSasQueryParameters(StorageSharedKeyCredential) generateSasQueryParameters(StorageSharedKeyCredential)} + * to obtain a representation of the SAS which can be applied to queue urls. * - *

    Please see - * here - * for additional samples.

    + *

    Generating a queue SAS with expiryTime and permissions

    + *

    The snippet below generates a queue SAS that lasts for two days and gives the user read, add, and update + * permissions to the queue. + * + * {@codesnippet com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential} + * + *

    Generating a queue SAS with stored access policy identifier

    + *

    The snippet below generates a queue SAS that has the same duration and permissions specified by the + * {@link #setIdentifier(String) stored access policy}. + * + * {@codesnippet com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters.identifier#StorageSharedKeyCredential} + * + * @see QueueServiceSasQueryParameters + * @see Storage SAS overview + * @see Constructing a Service + * SAS */ public final class QueueServiceSasSignatureValues { - - private String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; + private String version; private SasProtocol protocol; @@ -42,47 +47,14 @@ public final class QueueServiceSasSignatureValues { private SasIpRange sasIpRange; - private String canonicalName; + private String queueName; private String identifier; /** * Creates an object with empty values for all fields. */ - QueueServiceSasSignatureValues() { - } - - /** - * Creates an object with the specified expiry time and permissions - * - * @param expiryTime Time the SAS becomes valid - * @param permissions Permissions granted by the SAS - */ - QueueServiceSasSignatureValues(OffsetDateTime expiryTime, String permissions) { - this.expiryTime = expiryTime; - this.permissions = permissions; - } - - /** - * Creates an object with the specified identifier - * - * @param identifier Identifier for the SAS - */ - QueueServiceSasSignatureValues(String identifier) { - this.identifier = identifier; - } - - QueueServiceSasSignatureValues(String version, SasProtocol sasProtocol, OffsetDateTime startTime, - OffsetDateTime expiryTime, String permission, SasIpRange sasIpRange, String identifier) { - if (version != null) { - this.version = version; - } - this.protocol = sasProtocol; - this.startTime = startTime; - this.expiryTime = expiryTime; - this.permissions = permission; - this.sasIpRange = sasIpRange; - this.identifier = identifier; + public QueueServiceSasSignatureValues() { } /** @@ -171,11 +143,13 @@ public String getPermissions() { * Sets the permissions string allowed by the SAS. Please refer to {@link QueueSasPermission} for help constructing * the permissions string. * - * @param permissions Permissions string for the SAS + * @param permissions Permissions for the SAS * @return the updated QueueServiceSasSignatureValues object + * @throws NullPointerException if {@code permissions} is null. */ - public QueueServiceSasSignatureValues setPermissions(String permissions) { - this.permissions = permissions; + public QueueServiceSasSignatureValues setPermissions(QueueSasPermission permissions) { + Utility.assertNotNull("permissions", permissions); + this.permissions = permissions.toString(); return this; } @@ -198,33 +172,22 @@ public QueueServiceSasSignatureValues setSasIpRange(SasIpRange sasIpRange) { } /** - * @return the canonical name of the object the SAS user may access. - */ - public String getCanonicalName() { - return canonicalName; - } - - /** - * Sets the canonical name of the object the SAS user may access. + * Gets the name of the queue this SAS may access. * - * @param canonicalName Canonical name of the object the SAS grants access - * @return the updated QueueServiceSasSignatureValues object + * @return The name of the queue the SAS user may access. */ - public QueueServiceSasSignatureValues setCanonicalName(String canonicalName) { - this.canonicalName = canonicalName; - return this; + public String getQueueName() { + return queueName; } /** - * Sets the canonical name of the object the SAS user may access. Constructs a canonical name of - * "/queue/{accountName}{queueName}". + * Sets the name of the queue this SAS may access. * - * @param queueName Name of the queue object - * @param accountName Name of the account that contains the object + * @param queueName Canonical name of the object the SAS grants access * @return the updated QueueServiceSasSignatureValues object */ - public QueueServiceSasSignatureValues setCanonicalName(String queueName, String accountName) { - this.canonicalName = String.format("/queue/%s/%s", accountName, queueName); + public QueueServiceSasSignatureValues setQueueName(String queueName) { + this.queueName = queueName; return this; } @@ -254,21 +217,36 @@ public QueueServiceSasSignatureValues setIdentifier(String identifier) { * Uses an account's shared key credential to sign these signature values to produce the proper SAS query * parameters. * + *

    Notes on SAS generation

    + *

    + *

      + *
    • If {@link #setVersion(String) version} is not set, the {@link QueueServiceVersion#getLatest() latest service + * version} is used.
    • + *
    • If {@link #setIdentifier(String) identifier} is set, {@link #setExpiryTime(OffsetDateTime) expiryTime} and + * permissions should not be set. These values are inherited from the stored access policy.
    • + *
    • Otherwise, {@link #setExpiryTime(OffsetDateTime) expiryTime} and {@link #getPermissions() permissions} must + * be set.
    • + *
    + * + *

    For samples, see class level JavaDocs.

    + * * @param storageSharedKeyCredentials A {@link StorageSharedKeyCredential} object used to sign the SAS values. - * @return {@link QueueServiceSasQueryParameters} + * @return A new {@link QueueServiceSasQueryParameters} represented by the current builder. * @throws IllegalStateException If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64 * encoded string, or the UTF-8 charset isn't supported. - * @throws NullPointerException If {@code sharedKeyCredential} is null. Or if any of {@code version} or - * {@code canonicalName} is null. Or if {@code identifier} is null and any or {@code expiryTime} or - * {@code permissions} is null. Or if {@code expiryTime} and {@code permissions} and {@code identifier} is null + * @throws NullPointerException If {@code storageSharedKeyCredentials} is null. */ - public QueueServiceSasQueryParameters generateSASQueryParameters( + public QueueServiceSasQueryParameters generateSasQueryParameters( StorageSharedKeyCredential storageSharedKeyCredentials) { Utility.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); - assertGenerateOK(); + + if (ImplUtils.isNullOrEmpty(version)) { + version = QueueServiceVersion.getLatest().getVersion(); + } // Signature is generated on the un-url-encoded values. - String stringToSign = stringToSign(); + String canonicalName = getCanonicalName(storageSharedKeyCredentials.getAccountName(), queueName); + String stringToSign = stringToSign(canonicalName); String signature = storageSharedKeyCredentials.computeHmac256(stringToSign); return new QueueServiceSasQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, @@ -276,29 +254,22 @@ public QueueServiceSasQueryParameters generateSASQueryParameters( } /** - * Common assertions for generateSASQueryParameters overloads. + * Computes the canonical name for a queue resource for SAS signing. + * @param account Account of the storage account. + * @param queueName Name of the queue. + * @return Canonical name as a string. */ - private void assertGenerateOK() { - Utility.assertNotNull("version", this.version); - Utility.assertNotNull("canonicalName", this.canonicalName); - - // If a SignedIdentifier is not being used both expiryDate and permissions must be set. - if (identifier == null) { - Utility.assertNotNull("expiryTime", this.expiryTime); - Utility.assertNotNull("permissions", this.permissions); - } - // Still need to check identifier if expiry time and permissions are not both set - if (expiryTime == null || permissions == null) { - Utility.assertNotNull("identifier", identifier); - } + private static String getCanonicalName(String account, String queueName) { + // Queue: "/queue/account/queuename" + return String.join("", new String[] { "/queue/", account, "/", queueName }); } - private String stringToSign() { + private String stringToSign(String canonicalName) { return String.join("\n", this.permissions == null ? "" : this.permissions, this.startTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), this.expiryTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), - this.canonicalName == null ? "" : this.canonicalName, + canonicalName, this.identifier == null ? "" : this.identifier, this.sasIpRange == null ? "" : this.sasIpRange.toString(), this.protocol == null ? "" : protocol.toString(), diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceSasSignatureValuesJavaDocCodeSnippets.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceSasSignatureValuesJavaDocCodeSnippets.java new file mode 100644 index 000000000000..259185376c9e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceSasSignatureValuesJavaDocCodeSnippets.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue; + +import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.sas.SasProtocol; + +import java.time.Duration; +import java.time.OffsetDateTime; + +/** + * Code snippets for {@link QueueServiceSasSignatureValues}. + */ +public class QueueServiceSasSignatureValuesJavaDocCodeSnippets { + public void generateSasExpiryTime() { + // BEGIN: com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential + StorageSharedKeyCredential credential = new StorageSharedKeyCredential("my-account", "my-key"); + + // The expiry time and permissions are required to create a valid SAS + // if a stored access policy identifier is not set. + QueueServiceSasQueryParameters sasQueryParameters = new QueueServiceSasSignatureValues() + .setPermissions(QueueSasPermission.parse("rau")) + .setProtocol(SasProtocol.HTTPS_ONLY) + .setExpiryTime(OffsetDateTime.now().plus(Duration.ofDays(2))) + .generateSasQueryParameters(credential); + // END: com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential + } + + public void generateWithStoredAccessPolicy() { + // BEGIN: com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters.identifier#StorageSharedKeyCredential + StorageSharedKeyCredential credential = new StorageSharedKeyCredential("my-account", "my-key"); + + // The shared access policy, "read-write-user" exists in the storage account. The SAS generated from this has + // the same duration and permissions as the policy. + // The expiry and permissions should not be set explicitly. + QueueServiceSasQueryParameters sasQueryParameters = new QueueServiceSasSignatureValues() + .setIdentifier("read-write-user") + .setProtocol(SasProtocol.HTTPS_ONLY) + .generateSasQueryParameters(credential); + // END: com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters.identifier#StorageSharedKeyCredential + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy index de714a5ec98b..ec624b6aa7c6 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy @@ -86,13 +86,12 @@ class QueueSASTests extends APISpec { def "queueServiceSASSignatureValues canonicalizedResource"() { setup: def queueName = queueClient.getQueueName() - def accountName = "account" when: - def serviceSASSignatureValues = new QueueServiceSasSignatureValues().setCanonicalName(queueName, accountName) + def serviceSASSignatureValues = new QueueServiceSasSignatureValues().setQueueName(queueName) then: - serviceSASSignatureValues.getCanonicalName() == "/queue/" + accountName + "/" + queueName + serviceSASSignatureValues.getQueueName() == queueName } @Test @@ -115,13 +114,13 @@ class QueueSASTests extends APISpec { when: def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sasPermissions = new QueueServiceSasSignatureValues() - .setPermissions(permissions.toString()) + .setPermissions(permissions) .setExpiryTime(expiryTime) .setStartTime(startTime) .setProtocol(sasProtocol) .setSasIpRange(ipRange) - .setCanonicalName(queueClient.getQueueName(), credential.getAccountName()) - .generateSASQueryParameters(credential) + .setQueueName(queueClient.getQueueName()) + .generateSasQueryParameters(credential) .encode() def clientPermissions = queueBuilderHelper(interceptorManager) @@ -165,13 +164,13 @@ class QueueSASTests extends APISpec { when: def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sasPermissions = new QueueServiceSasSignatureValues() - .setPermissions(permissions.toString()) + .setPermissions(permissions) .setExpiryTime(expiryTime) .setStartTime(startTime) .setProtocol(sasProtocol) .setSasIpRange(ipRange) - .setCanonicalName(queueClient.getQueueName(), credential.getAccountName()) - .generateSASQueryParameters(credential) + .setQueueName(queueClient.getQueueName()) + .generateSasQueryParameters(credential) .encode() def clientPermissions = queueBuilderHelper(interceptorManager) @@ -218,8 +217,8 @@ class QueueSASTests extends APISpec { def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) def sasIdentifier = new QueueServiceSasSignatureValues() .setIdentifier(identifier.getId()) - .setCanonicalName(queueClient.getQueueName(), credential.getAccountName()) - .generateSASQueryParameters(credential) + .setQueueName(queueClient.getQueueName()) + .generateSasQueryParameters(credential) .encode() def clientBuilder = queueBuilderHelper(interceptorManager) From baabf02944545611be2acd5d204bbe72c3e60d36 Mon Sep 17 00:00:00 2001 From: Anu Thomas Chandy Date: Fri, 18 Oct 2019 17:54:29 -0700 Subject: [PATCH 16/64] Adding support for all connection string formats (#5924) * Adding support for all connection string formats * Adding unit tests for storage connection string parsing * Exporting connection string to other modules (java9), Removing Utility::parseConnectionString() --- .../EncryptedBlobClientBuilder.java | 50 ++- .../azure/storage/blob/BlobClientBuilder.java | 32 +- .../blob/BlobContainerClientBuilder.java | 32 +- .../blob/BlobServiceClientBuilder.java | 31 +- .../implementation/util/BuilderHelper.java | 45 --- .../SpecializedBlobClientBuilder.java | 32 +- .../com/azure/storage/common/Utility.java | 18 - .../common/implementation/Constants.java | 97 ++++- .../connectionstring/ConnectionSettings.java | 102 ++++++ .../ConnectionSettingsFilter.java | 129 +++++++ .../StorageAuthenticationSettings.java | 152 ++++++++ .../StorageConnectionString.java | 141 +++++++ .../StorageEmulatorConnectionString.java | 114 ++++++ .../connectionstring/StorageEndpoint.java | 151 ++++++++ .../StorageServiceConnectionString.java | 203 ++++++++++ .../src/main/java/module-info.java | 6 + .../StorageConnectionStringTest.java | 346 ++++++++++++++++++ .../com/azure/storage/file/BuilderHelper.java | 44 --- .../azure/storage/file/FileClientBuilder.java | 32 +- .../file/FileServiceClientBuilder.java | 32 +- .../storage/file/ShareClientBuilder.java | 31 +- .../azure/storage/queue/BuilderHelper.java | 45 --- .../storage/queue/QueueClientBuilder.java | 32 +- .../queue/QueueServiceClientBuilder.java | 32 +- 24 files changed, 1672 insertions(+), 257 deletions(-) create mode 100644 sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/ConnectionSettings.java create mode 100644 sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/ConnectionSettingsFilter.java create mode 100644 sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageAuthenticationSettings.java create mode 100644 sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageConnectionString.java create mode 100644 sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageEmulatorConnectionString.java create mode 100644 sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageEndpoint.java create mode 100644 sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageServiceConnectionString.java create mode 100644 sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/connectionstring/StorageConnectionStringTest.java diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java index 4297056aea57..955884662a34 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java @@ -27,8 +27,10 @@ import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; +import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; +import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; @@ -41,7 +43,6 @@ import java.net.URL; import java.util.ArrayList; import java.util.List; -import java.util.Map; import java.util.Objects; /** @@ -300,38 +301,33 @@ public EncryptedBlobClientBuilder setAnonymousAccess() { } /** - * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, - * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link - * #endpoint(String) endpoint}. + * Sets the connection string to connect to the service. * * @param connectionString Connection string of the storage account. * @return the updated EncryptedBlobClientBuilder - * @throws IllegalArgumentException If {@code connectionString} doesn't contain `AccountName` or `AccountKey`. - * @throws NullPointerException If {@code connectionString} is {@code null}. + * @throws IllegalArgumentException If {@code connectionString} is invalid. */ public EncryptedBlobClientBuilder connectionString(String connectionString) { - Objects.requireNonNull(connectionString, "'connectionString' cannot be null."); - - Map connectionStringPieces = Utility.parseConnectionString(connectionString); - - String accountName = connectionStringPieces.get(Constants.ConnectionStringConstants.ACCOUNT_NAME); - String accountKey = connectionStringPieces.get(Constants.ConnectionStringConstants.ACCOUNT_KEY); - - if (ImplUtils.isNullOrEmpty(accountName) || ImplUtils.isNullOrEmpty(accountKey)) { - throw logger.logExceptionAsError( - new IllegalArgumentException("'connectionString' must contain 'AccountName' and 'AccountKey'.")); + StorageConnectionString storageConnectionString + = StorageConnectionString.create(connectionString, logger); + StorageEndpoint endpoint = storageConnectionString.getBlobEndpoint(); + if (endpoint == null || endpoint.getPrimaryUri() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException( + "connectionString missing required settings to derive blob service endpoint.")); } - - String endpointProtocol = connectionStringPieces.get(Constants.ConnectionStringConstants.ENDPOINT_PROTOCOL); - String endpointSuffix = connectionStringPieces.get(Constants.ConnectionStringConstants.ENDPOINT_SUFFIX); - - if (!ImplUtils.isNullOrEmpty(endpointProtocol) && !ImplUtils.isNullOrEmpty(endpointSuffix)) { - endpoint(String.format("%s://%s.blob.%s", endpointProtocol, accountName, - endpointSuffix.replaceFirst("^\\.", ""))); + this.endpoint(endpoint.getPrimaryUri()); + if (storageConnectionString.getAccountName() != null) { + this.accountName = storageConnectionString.getAccountName(); } - - this.accountName = accountName; - return credential(new StorageSharedKeyCredential(accountName, accountKey)); + StorageAuthenticationSettings authSettings = storageConnectionString.getStorageAuthSettings(); + if (authSettings.getType() == StorageAuthenticationSettings.Type.ACCOUNT_NAME_KEY) { + this.credential(new StorageSharedKeyCredential(authSettings.getAccount().getName(), + authSettings.getAccount().getAccessKey())); + } else if (authSettings.getType() == StorageAuthenticationSettings.Type.SAS_TOKEN) { + this.sasToken(authSettings.getSasToken()); + } + return this; } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java index b335e6242904..61bb73c6c445 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java @@ -18,6 +18,9 @@ import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; +import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; +import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; @@ -214,19 +217,32 @@ public BlobClientBuilder setAnonymousAccess() { } /** - * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, - * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link - * #endpoint(String) endpoint}. + * Sets the connection string to connect to the service. * * @param connectionString Connection string of the storage account. * @return the updated BlobClientBuilder - * @throws IllegalArgumentException If {@code connectionString} doesn't contain `AccountName` or `AccountKey`. - * @throws NullPointerException If {@code connectionString} is {@code null}. + * @throws IllegalArgumentException If {@code connectionString} in invalid. */ public BlobClientBuilder connectionString(String connectionString) { - BuilderHelper.configureConnectionString(connectionString, (accountName) -> this.accountName = accountName, - this::credential, this::endpoint, logger); - + StorageConnectionString storageConnectionString + = StorageConnectionString.create(connectionString, logger); + StorageEndpoint endpoint = storageConnectionString.getBlobEndpoint(); + if (endpoint == null || endpoint.getPrimaryUri() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException( + "connectionString missing required settings to derive blob service endpoint.")); + } + this.endpoint(endpoint.getPrimaryUri()); + if (storageConnectionString.getAccountName() != null) { + this.accountName = storageConnectionString.getAccountName(); + } + StorageAuthenticationSettings authSettings = storageConnectionString.getStorageAuthSettings(); + if (authSettings.getType() == StorageAuthenticationSettings.Type.ACCOUNT_NAME_KEY) { + this.credential(new StorageSharedKeyCredential(authSettings.getAccount().getName(), + authSettings.getAccount().getAccessKey())); + } else if (authSettings.getType() == StorageAuthenticationSettings.Type.SAS_TOKEN) { + this.sasToken(authSettings.getSasToken()); + } return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java index 31d502a104ca..f168af8f57d3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java @@ -18,6 +18,9 @@ import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; +import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; +import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; @@ -225,19 +228,32 @@ public BlobContainerClientBuilder setAnonymousAccess() { } /** - * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, - * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link - * #endpoint(String) endpoint}. + * Sets the connection string to connect to the service. * * @param connectionString Connection string of the storage account. * @return the updated BlobContainerClientBuilder - * @throws IllegalArgumentException If {@code connectionString} doesn't contain `AccountName` or `AccountKey`. - * @throws NullPointerException If {@code connectionString} is {@code null}. + * @throws IllegalArgumentException If {@code connectionString} in invalid. */ public BlobContainerClientBuilder connectionString(String connectionString) { - BuilderHelper.configureConnectionString(connectionString, (accountName) -> this.accountName = accountName, - this::credential, this::endpoint, logger); - + StorageConnectionString storageConnectionString + = StorageConnectionString.create(connectionString, logger); + StorageEndpoint endpoint = storageConnectionString.getBlobEndpoint(); + if (endpoint == null || endpoint.getPrimaryUri() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException( + "connectionString missing required settings to derive blob service endpoint.")); + } + this.endpoint(endpoint.getPrimaryUri()); + if (storageConnectionString.getAccountName() != null) { + this.accountName = storageConnectionString.getAccountName(); + } + StorageAuthenticationSettings authSettings = storageConnectionString.getStorageAuthSettings(); + if (authSettings.getType() == StorageAuthenticationSettings.Type.ACCOUNT_NAME_KEY) { + this.credential(new StorageSharedKeyCredential(authSettings.getAccount().getName(), + authSettings.getAccount().getAccessKey())); + } else if (authSettings.getType() == StorageAuthenticationSettings.Type.SAS_TOKEN) { + this.sasToken(authSettings.getSasToken()); + } return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java index e97cd7f0e37e..019941dcb319 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java @@ -18,6 +18,9 @@ import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; +import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; +import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; @@ -191,19 +194,33 @@ public BlobServiceClientBuilder sasToken(String sasToken) { } /** - * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, - * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link - * #endpoint(String) endpoint}. + * Sets the connection string to connect to the service. * * @param connectionString Connection string of the storage account. * @return the updated BlobServiceClientBuilder - * @throws IllegalArgumentException If {@code connectionString} doesn't contain `AccountName` or `AccountKey`. + * @throws IllegalArgumentException If {@code connectionString} in invalid. * @throws NullPointerException If {@code connectionString} is {@code null}. */ public BlobServiceClientBuilder connectionString(String connectionString) { - BuilderHelper.configureConnectionString(connectionString, (accountName) -> this.accountName = accountName, - this::credential, this::endpoint, logger); - + StorageConnectionString storageConnectionString + = StorageConnectionString.create(connectionString, logger); + StorageEndpoint endpoint = storageConnectionString.getBlobEndpoint(); + if (endpoint == null || endpoint.getPrimaryUri() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException( + "connectionString missing required settings to derive blob service endpoint.")); + } + this.endpoint(endpoint.getPrimaryUri()); + if (storageConnectionString.getAccountName() != null) { + this.accountName = storageConnectionString.getAccountName(); + } + StorageAuthenticationSettings authSettings = storageConnectionString.getStorageAuthSettings(); + if (authSettings.getType() == StorageAuthenticationSettings.Type.ACCOUNT_NAME_KEY) { + this.credential(new StorageSharedKeyCredential(authSettings.getAccount().getName(), + authSettings.getAccount().getAccessKey())); + } else if (authSettings.getType() == StorageAuthenticationSettings.Type.SAS_TOKEN) { + this.sasToken(authSettings.getSasToken()); + } return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java index 19abc2aabb00..d2ef02b5b2ae 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java @@ -13,13 +13,9 @@ import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.Utility; -import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.policy.RequestRetryOptions; import com.azure.storage.common.policy.RequestRetryPolicy; import com.azure.storage.common.policy.ResponseValidationPolicyBuilder; @@ -27,9 +23,6 @@ import com.azure.storage.common.policy.ScrubEtagPolicy; import java.util.ArrayList; import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.function.Consumer; import java.util.function.Supplier; /** @@ -41,44 +34,6 @@ public final class BuilderHelper { private static final String DEFAULT_USER_AGENT_NAME = "azure-storage-blob"; private static final String DEFAULT_USER_AGENT_VERSION = "12.0.0-preview.5"; - /** - * Parses the passed {@code connectionString} for values to configure on the builder. - * - * @param connectionString Connection string from the service account. - * @param accountNameSetter Callback to set the account name on the builder. - * @param credentialSetter Callback to set the {@link StorageSharedKeyCredential} of the builder. - * @param endpointSetter Callback to set the endpoint of the builder. - * @param logger {@link ClientLogger} used to log any exceptions. - * @throws NullPointerException If {@code connectionString} is {@code null}. - * @throws IllegalArgumentException If {@code connectionString} doesn't contain 'AccountName' or 'AccountKey'. - */ - public static void configureConnectionString(String connectionString, Consumer accountNameSetter, - Consumer credentialSetter, - Consumer endpointSetter, ClientLogger logger) { - Objects.requireNonNull(connectionString, "'connectionString' cannot be null."); - - Map connectionStringPieces = Utility.parseConnectionString(connectionString); - - String accountName = connectionStringPieces.get(Constants.ConnectionStringConstants.ACCOUNT_NAME); - String accountKey = connectionStringPieces.get(Constants.ConnectionStringConstants.ACCOUNT_KEY); - - if (ImplUtils.isNullOrEmpty(accountName) || ImplUtils.isNullOrEmpty(accountKey)) { - throw logger.logExceptionAsError( - new IllegalArgumentException("'connectionString' must contain 'AccountName' and 'AccountKey'.")); - } - - String endpointProtocol = connectionStringPieces.get(Constants.ConnectionStringConstants.ENDPOINT_PROTOCOL); - String endpointSuffix = connectionStringPieces.get(Constants.ConnectionStringConstants.ENDPOINT_SUFFIX); - - if (!ImplUtils.isNullOrEmpty(endpointProtocol) && !ImplUtils.isNullOrEmpty(endpointSuffix)) { - endpointSetter.accept(String.format("%s://%s.blob.%s", endpointProtocol, accountName, - endpointSuffix.replaceFirst("^\\.", ""))); - } - - accountNameSetter.accept(accountName); - credentialSetter.accept(new StorageSharedKeyCredential(accountName, accountKey)); - } - /** * Constructs a {@link HttpPipeline} from values passed from a builder. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java index 9f07169d4e66..7bcdba2019f3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java @@ -25,6 +25,9 @@ import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.PageRange; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; +import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; +import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; @@ -359,19 +362,32 @@ public SpecializedBlobClientBuilder setAnonymousAccess() { } /** - * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, - * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link - * #endpoint(String) endpoint}. + * Sets the connection string to connect to the service. * * @param connectionString Connection string of the storage account. * @return the updated SpecializedBlobClientBuilder - * @throws IllegalArgumentException If {@code connectionString} doesn't contain `AccountName` or `AccountKey`. - * @throws NullPointerException If {@code connectionString} is {@code null}. + * @throws IllegalArgumentException If {@code connectionString} in invalid. */ public SpecializedBlobClientBuilder connectionString(String connectionString) { - BuilderHelper.configureConnectionString(connectionString, (accountName) -> this.accountName = accountName, - this::credential, this::endpoint, logger); - + StorageConnectionString storageConnectionString + = StorageConnectionString.create(connectionString, logger); + StorageEndpoint endpoint = storageConnectionString.getBlobEndpoint(); + if (endpoint == null || endpoint.getPrimaryUri() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException( + "connectionString missing required settings to derive blob service endpoint.")); + } + this.endpoint(endpoint.getPrimaryUri()); + if (storageConnectionString.getAccountName() != null) { + this.accountName = storageConnectionString.getAccountName(); + } + StorageAuthenticationSettings authSettings = storageConnectionString.getStorageAuthSettings(); + if (authSettings.getType() == StorageAuthenticationSettings.Type.ACCOUNT_NAME_KEY) { + this.credential(new StorageSharedKeyCredential(authSettings.getAccount().getName(), + authSettings.getAccount().getAccessKey())); + } else if (authSettings.getType() == StorageAuthenticationSettings.Type.SAS_TOKEN) { + this.sasToken(authSettings.getSasToken()); + } return this; } diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java index 7cfcda054fed..58c01f0ebbb1 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java @@ -37,7 +37,6 @@ import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; import java.util.Base64; -import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.TreeMap; @@ -217,23 +216,6 @@ private static String encode(final String stringToEncode) { } } - /** - * Parses the connection string into key-value pair map. - * - * @param connectionString Connection string to parse - * @return a mapping of connection string pieces as key-value pairs. - */ - public static Map parseConnectionString(final String connectionString) { - Map parts = new HashMap<>(); - - for (String part : connectionString.split(";")) { - String[] kvp = part.split("=", 2); - parts.put(kvp[0].toLowerCase(Locale.ROOT), kvp[1]); - } - - return parts; - } - /** * Blocks an asynchronous response with an optional timeout. * diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java index 7fe0a211042e..505f1bf87bf9 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java @@ -52,24 +52,105 @@ private Constants() { */ public static final class ConnectionStringConstants { /** - * The AccountName key. + * The setting name for the storage account name. */ - public static final String ACCOUNT_NAME = "accountname"; + public static final String ACCOUNT_NAME = "AccountName"; /** - * The AccountKey key. + * The setting name for the storage account key. */ - public static final String ACCOUNT_KEY = "accountkey"; + public static final String ACCOUNT_KEY_NAME = "AccountKey"; /** - * The DefaultEndpointsProtocol key. + * The setting name for using the default storage endpoints with the specified protocol. */ - public static final String ENDPOINT_PROTOCOL = "defaultendpointsprotocol"; + public static final String DEFAULT_ENDPOINTS_PROTOCOL_NAME = "DefaultEndpointsProtocol"; /** - * The EndpointSuffix key. + * The setting name for a custom blob storage endpoint. */ - public static final String ENDPOINT_SUFFIX = "endpointsuffix"; + public static final String BLOB_ENDPOINT_NAME = "BlobEndpoint"; + + /** + * The setting name for a custom blob storage secondary endpoint. + */ + public static final String BLOB_SECONDARY_ENDPOINT_NAME = "BlobSecondaryEndpoint"; + + /** + * The setting name for a custom queue endpoint. + */ + public static final String QUEUE_ENDPOINT_NAME = "QueueEndpoint"; + + /** + * The setting name for a custom queue secondary endpoint. + */ + public static final String QUEUE_SECONDARY_ENDPOINT_NAME = "QueueSecondaryEndpoint"; + + /** + * The setting name for a custom file endpoint. + */ + public static final String FILE_ENDPOINT_NAME = "FileEndpoint"; + + /** + * The setting name for a custom file secondary endpoint. + */ + public static final String FILE_SECONDARY_ENDPOINT_NAME = "FileSecondaryEndpoint"; + + /** + * The setting name for a custom table storage endpoint. + */ + public static final String TABLE_ENDPOINT_NAME = "TableEndpoint"; + + /** + * The setting name for a custom table storage secondary endpoint. + */ + public static final String TABLE_SECONDARY_ENDPOINT_NAME = "TableSecondaryEndpoint"; + + /** + * The setting name for a custom storage endpoint suffix. + */ + public static final String ENDPOINT_SUFFIX_NAME = "EndpointSuffix"; + + /** + * The setting name for a shared access key. + */ + public static final String SHARED_ACCESS_SIGNATURE_NAME = "SharedAccessSignature"; + + /** + * The setting name for using the emulator storage. + */ + public static final String USE_EMULATOR_STORAGE_NAME = "UseDevelopmentStorage"; + + /** + * The setting name for specifying a development storage proxy Uri. + */ + public static final String EMULATOR_STORAGE_PROXY_URI_NAME = "DevelopmentStorageProxyUri"; + + /** + * The root storage DNS name. + */ + public static final String DEFAULT_DNS = "core.windows.net"; + + /** + * The format string for the primary endpoint in emulator. + */ + public static final String EMULATOR_PRIMARY_ENDPOINT_FORMAT = "%s://%s:%s/devstoreaccount1"; + + /** + * The format string for the secondary endpoint in emulator. + */ + public static final String EMULATOR_SECONDARY_ENDPOINT_FORMAT = "%s://%s:%s/devstoreaccount1-secondary"; + + /** + * The default account key for the development storage. + */ + public static final String EMULATOR_ACCOUNT_KEY + = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="; + + /** + * The default account name for the development storage. + */ + public static final String EMULATOR_ACCOUNT_NAME = "devstoreaccount1"; private ConnectionStringConstants() { } diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/ConnectionSettings.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/ConnectionSettings.java new file mode 100644 index 000000000000..5daf64673e46 --- /dev/null +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/ConnectionSettings.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.implementation.connectionstring; + +import com.azure.core.util.logging.ClientLogger; +import java.util.HashMap; +import java.util.Map; + +/** + * A dictionary representation of all settings in a connection string. + */ +final class ConnectionSettings implements Cloneable { + private final Map settings; + + /** + * Checks a given settings exists. + * + * @param name the setting name + * @return true if setting exists, false otherwise + */ + public boolean hasSetting(String name) { + return this.settings.containsKey(name); + } + + /** + * Remove a setting with given name if exists. + * + * @param name the setting name + */ + public void removeSetting(String name) { + this.settings.remove(name); + } + + /** + * Get value of the setting with given name. + * + * @param name the setting name + * @return the setting value if exists + */ + public String getSettingValue(String name) { + return this.settings.get(name); + } + + /** + * @return true if there no settings exists, false otherwise. + */ + public boolean isEmpty() { + return this.settings.isEmpty(); + } + + /** + * Set a setting. + * + * @param name the setting name + * @param value the setting value + */ + public void setSetting(String name, String value) { + this.settings.put(name, value); + } + + /** + * Creates {@link ConnectionSettings} from the given connection string. + * + * @param connString the connection string + * @param logger the logger + * @return the ConnectionSettings + */ + public static ConnectionSettings fromConnectionString(final String connString, + final ClientLogger logger) { + HashMap map = new HashMap<>(); + final String[] settings = connString.split(";"); + for (int i = 0; i < settings.length; i++) { + String setting = settings[i].trim(); + if (setting.length() > 0) { + final int idx = setting.indexOf("="); + if (idx == -1 + || idx == 0 + || idx == settings[i].length() - 1) { + // handle no_equal_symbol, "=Bar", "Foo=" + throw logger.logExceptionAsError(new IllegalArgumentException("Invalid connection string.")); + } + map.put(setting.substring(0, idx), setting.substring(idx + 1)); + } + } + return new ConnectionSettings(map); + } + + @Override + public ConnectionSettings clone() { + return new ConnectionSettings(new HashMap<>(this.settings)); + } + + /** + * Creates ConnectionSettings. + * + * @param settings the settings as a map + */ + private ConnectionSettings(Map settings) { + this.settings = settings; + } +} diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/ConnectionSettingsFilter.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/ConnectionSettingsFilter.java new file mode 100644 index 000000000000..55be1a14bd49 --- /dev/null +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/ConnectionSettingsFilter.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.implementation.connectionstring; + + +/** + * Type represents contract for applying filtering on {@link ConnectionSettings}. + */ +@FunctionalInterface +interface ConnectionSettingsFilter { + /** + * Applies the filter function to the given connection settings. + * + * @param inputSettings the input settings + * @return the result of filtering + */ + ConnectionSettings apply(ConnectionSettings inputSettings); + + static ConnectionSettingsFilter allRequired(final String... settingNames) { + return (ConnectionSettings inputSettings) -> { + ConnectionSettings outputSettings = inputSettings.clone(); + for (final String settingName : settingNames) { + if (outputSettings.hasSetting(settingName)) { + outputSettings.removeSetting(settingName); + } else { + return null; + } + } + return outputSettings; + }; + } + + static ConnectionSettingsFilter optional(final String... settingNames) { + return (ConnectionSettings inputSettings) -> { + ConnectionSettings outputSettings = inputSettings.clone(); + for (final String settingName : settingNames) { + outputSettings.removeSetting(settingName); + } + return outputSettings; + }; + } + + static ConnectionSettingsFilter atLeastOne(final String... settingNames) { + return (ConnectionSettings inputSettings) -> { + ConnectionSettings outputSettings = inputSettings.clone(); + boolean foundOne = false; + for (final String settingName : settingNames) { + if (outputSettings.hasSetting(settingName)) { + outputSettings.removeSetting(settingName); + foundOne = true; + } + } + return foundOne ? outputSettings : null; + }; + } + + static ConnectionSettingsFilter none(final String... settingNames) { + return (ConnectionSettings inputSettings) -> { + ConnectionSettings outputSettings = inputSettings.clone(); + boolean foundOne = false; + for (final String settingName : settingNames) { + if (outputSettings.hasSetting(settingName)) { + outputSettings.removeSetting(settingName); + foundOne = true; + } + } + return foundOne ? null : outputSettings; + }; + } + + static ConnectionSettingsFilter matchesAll(final ConnectionSettingsFilter... filters) { + return (ConnectionSettings inputSettings) -> { + ConnectionSettings outputSettings = inputSettings.clone(); + for (final ConnectionSettingsFilter filter : filters) { + if (outputSettings == null) { + break; + } + outputSettings = filter.apply(outputSettings); + } + return outputSettings; + }; + } + + static ConnectionSettingsFilter matchesOne(final ConnectionSettingsFilter... filters) { + return (ConnectionSettings settings) -> { + ConnectionSettings matchResult = null; + for (final ConnectionSettingsFilter filter : filters) { + ConnectionSettings result = filter.apply(settings.clone()); + if (result != null) { + if (matchResult == null) { + matchResult = result; + } else { + return null; + } + } + } + return matchResult; + }; + } + + static ConnectionSettingsFilter matchesExactly(final ConnectionSettingsFilter filter) { + return (ConnectionSettings settings) -> { + ConnectionSettings result = settings.clone(); + result = filter.apply(result); + if (result == null || !result.isEmpty()) { + return null; + } else { + return result; + } + }; + } + + static boolean matchesSpecification(ConnectionSettings settings, + ConnectionSettingsFilter... constraints) { + for (ConnectionSettingsFilter constraint : constraints) { + ConnectionSettings remainingSettings = constraint.apply(settings); + if (remainingSettings == null) { + return false; + } else { + settings = remainingSettings; + } + } + if (settings.isEmpty()) { + return true; + } + return false; + } +} diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageAuthenticationSettings.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageAuthenticationSettings.java new file mode 100644 index 000000000000..bd7587eb3868 --- /dev/null +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageAuthenticationSettings.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.implementation.connectionstring; + +import com.azure.storage.common.implementation.Constants; +import java.util.Objects; + +/** + * Type represents settings for accessing a storage account. + */ +public final class StorageAuthenticationSettings { + private final Type type; + private final String sasToken; + private final Account account; + + /** + * @return the settings type (None, Account Name and Key, Sas token) + */ + public Type getType() { + return this.type; + } + + /** + * @return the sas token + */ + public String getSasToken() { + return this.sasToken; + } + + /** + * @return the account instance containing account name and key + */ + public Account getAccount() { + return this.account; + } + + /** + * Creates {@link StorageAuthenticationSettings} from the given connection settings. + * + * @param settings the connection settings. + * @return the StorageAuthenticationSettings. + */ + public static StorageAuthenticationSettings fromConnectionSettings(final ConnectionSettings settings) { + final String accountName = settings.getSettingValue(Constants.ConnectionStringConstants.ACCOUNT_NAME); + final String accountKey = settings.getSettingValue(Constants.ConnectionStringConstants.ACCOUNT_KEY_NAME); + final String sasSignature = + settings.getSettingValue(Constants.ConnectionStringConstants.SHARED_ACCESS_SIGNATURE_NAME); + + if (accountName != null && accountKey != null && sasSignature == null) { + return new StorageAuthenticationSettings(new Account(accountName, accountKey)); + } + if (accountKey == null && sasSignature != null) { + return new StorageAuthenticationSettings(sasSignature); + } + return new StorageAuthenticationSettings(); + } + + /** + * @return get a {@link StorageAuthenticationSettings} for emulator + */ + public static StorageAuthenticationSettings forEmulator() { + return new StorageAuthenticationSettings(new Account(Constants.ConnectionStringConstants.EMULATOR_ACCOUNT_NAME, + Constants.ConnectionStringConstants.EMULATOR_ACCOUNT_KEY)); + } + + /** + * Creates default {@link StorageAuthenticationSettings} indicating absence of authentication + * setting. + */ + private StorageAuthenticationSettings() { + this.type = Type.NONE; + this.account = null; + this.sasToken = null; + } + + /** + * Creates {@link StorageAuthenticationSettings} indicating Sas token based authentication + * settings. + * + * @param sasToken the sas token + */ + private StorageAuthenticationSettings(String sasToken) { + this.type = Type.SAS_TOKEN; + this.sasToken = Objects.requireNonNull(sasToken); + this.account = null; + } + + /** + * Creates {@link StorageAuthenticationSettings} indicating account name and key based + * authentication settings. + * + * @param account the account instance holding account name and key + */ + private StorageAuthenticationSettings(Account account) { + this.type = Type.ACCOUNT_NAME_KEY; + this.account = Objects.requireNonNull(account); + this.sasToken = null; + } + + /** + * Authentication settings type. + */ + public enum Type { + /** + * No auth. + */ + NONE(), + /** + * Auth based on storage account name and key. + */ + ACCOUNT_NAME_KEY(), + /** + * Auth based on SAS token. + */ + SAS_TOKEN(), + } + + /** + * Type to hold storage account name and access key. + */ + public static final class Account { + private String name; + private String accessKey; + + /** + * Creates Account. + * + * @param name the storage account name + * @param accessKey the storage access key + */ + private Account(String name, String accessKey) { + this.name = Objects.requireNonNull(name); + this.accessKey = Objects.requireNonNull(accessKey); + } + + /** + * @return the storage account name + */ + public String getName() { + return this.name; + } + + /** + * @return the storage account access key + */ + public String getAccessKey() { + return this.accessKey; + } + } +} + diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageConnectionString.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageConnectionString.java new file mode 100644 index 000000000000..322d300b141f --- /dev/null +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageConnectionString.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.implementation.connectionstring; + +import com.azure.core.util.logging.ClientLogger; + +/** + * Type representing storage connection string. + * + * RESERVED FOR INTERNAL USE. + */ +public final class StorageConnectionString { + /** + * The storage account name. + */ + private final String accountName; + + /** + * The settings for storage authentication. + */ + private StorageAuthenticationSettings storageAuthSettings; + + /** + * The blob endpoint. + */ + private final StorageEndpoint blobEndpoint; + + /** + * The file endpoint. + */ + private final StorageEndpoint fileEndpoint; + + /** + * The queue endpoint. + */ + private final StorageEndpoint queueEndpoint; + + /** + * The table endpoint. + */ + private final StorageEndpoint tableEndpoint; + + /** + * @return the storage account name. + */ + public String getAccountName() { + return this.accountName; + } + + /** + * @return The storage authentication settings associated with this connection string. + */ + public StorageAuthenticationSettings getStorageAuthSettings() { + return this.storageAuthSettings; + } + + /** + * Get the endpoint for the storage blob service. + * + * @return the blob endpoint associated with this connection string. + */ + public StorageEndpoint getBlobEndpoint() { + return this.blobEndpoint; + } + + /** + * Get the endpoint for the storage file service. + * + * @return the file endpoint associated with this connection string. + */ + public StorageEndpoint getFileEndpoint() { + return this.fileEndpoint; + } + + /** + * Get the endpoint for the storage queue service. + * + * @return the queue endpoint associated with this connection string. + */ + public StorageEndpoint getQueueEndpoint() { + return this.queueEndpoint; + } + + /** + * Get the endpoint for the storage table service. + * + * @return the table endpoint associated with this connection string. + */ + public StorageEndpoint getTableEndpoint() { + return this.tableEndpoint; + } + + /** + * Create a {@link StorageConnectionString} from the given connection string. + * + * @param connectionString the connection string + * @param logger the logger + * @return StorageConnectionString based on the provided connection string. + */ + public static StorageConnectionString create(final String connectionString, final ClientLogger logger) { + if (connectionString == null || connectionString.length() == 0) { + throw logger.logExceptionAsError(new IllegalArgumentException("Invalid connection string.")); + } + ConnectionSettings settings = ConnectionSettings.fromConnectionString(connectionString, logger); + StorageConnectionString emulatorConnString = StorageEmulatorConnectionString.tryCreate(settings, logger); + if (emulatorConnString != null) { + return emulatorConnString; + } + + StorageConnectionString serviceConnString = StorageServiceConnectionString.tryCreate(settings, logger); + if (serviceConnString != null) { + return serviceConnString; + } + throw logger.logExceptionAsError(new IllegalArgumentException("Invalid connection string.")); + } + + /** + * Creates a StorageConnectionString. + * + * @param storageAuthSettings the storage authentication settings + * @param blobEndpoint the blob service endpoint + * @param queueEndpoint the queue service endpoint + * @param tableEndpoint the table service endpoint + * @param fileEndpoint the file service endpoint + * @param accountName the storage account name + */ + StorageConnectionString(final StorageAuthenticationSettings storageAuthSettings, + final StorageEndpoint blobEndpoint, + final StorageEndpoint queueEndpoint, + final StorageEndpoint tableEndpoint, + final StorageEndpoint fileEndpoint, + final String accountName) { + this.storageAuthSettings = storageAuthSettings; + this.blobEndpoint = blobEndpoint; + this.fileEndpoint = fileEndpoint; + this.queueEndpoint = queueEndpoint; + this.tableEndpoint = tableEndpoint; + this.accountName = accountName; + } +} diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageEmulatorConnectionString.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageEmulatorConnectionString.java new file mode 100644 index 000000000000..59b504b3344f --- /dev/null +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageEmulatorConnectionString.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.implementation.connectionstring; + +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.common.implementation.Constants; +import java.net.URI; +import java.net.URISyntaxException; + +/** + * Type to parse a connection string and creates {@link StorageConnectionString} for emulator. + */ +final class StorageEmulatorConnectionString { + /** + * Try parsing the connection string and create {@link StorageConnectionString} + * from it. + * + * @param settings the connection settings + * @param logger the logger + * @return the StorageConnectionString for emulator + * @throws IllegalArgumentException If settings is invalid for emulator. + */ + static StorageConnectionString tryCreate(final ConnectionSettings settings, + final ClientLogger logger) { + if (ConnectionSettingsFilter.matchesSpecification(settings, + requireUseEmulatorFlag(), + optionalProxyUri())) { + if (!parseUseEmulatorFlag(settings)) { + throw logger.logExceptionAsError(new IllegalArgumentException("Invalid connection string, " + + "the 'UseDevelopmentStorage' key must always have the value 'true'. " + + "Remove the flag entirely otherwise.")); + } + String scheme; + String host; + if (settings.hasSetting(Constants.ConnectionStringConstants.EMULATOR_STORAGE_PROXY_URI_NAME)) { + try { + URI devStoreProxyUri + = new URI(settings.getSettingValue(Constants + .ConnectionStringConstants + .EMULATOR_STORAGE_PROXY_URI_NAME)); + scheme = devStoreProxyUri.getScheme(); + host = devStoreProxyUri.getHost(); + } catch (URISyntaxException use) { + throw logger.logExceptionAsError(new RuntimeException(use)); + } + } else { + scheme = "http"; + host = "127.0.0.1"; + } + + StorageConnectionString storageConnectionString; + try { + URI blobPrimaryEndpoint = + new URI(String.format(Constants.ConnectionStringConstants.EMULATOR_PRIMARY_ENDPOINT_FORMAT, + scheme, + host, + "10000")); + URI queuePrimaryEndpoint = + new URI(String.format(Constants.ConnectionStringConstants.EMULATOR_PRIMARY_ENDPOINT_FORMAT, + scheme, + host, + "10001")); + URI tablePrimaryEndpoint = + new URI(String.format(Constants.ConnectionStringConstants.EMULATOR_PRIMARY_ENDPOINT_FORMAT, + scheme, + host, + "10002")); + + URI blobSecondaryEndpoint = + new URI(String.format(Constants.ConnectionStringConstants.EMULATOR_SECONDARY_ENDPOINT_FORMAT, + scheme, + host, + "10000")); + URI queueSecondaryEndpoint = + new URI(String.format(Constants.ConnectionStringConstants.EMULATOR_SECONDARY_ENDPOINT_FORMAT, + scheme, + host, + "10001")); + URI tableSecondaryEndpoint = + new URI(String.format(Constants.ConnectionStringConstants.EMULATOR_SECONDARY_ENDPOINT_FORMAT, + scheme, + host, + "10002")); + + storageConnectionString = new StorageConnectionString(StorageAuthenticationSettings.forEmulator(), + new StorageEndpoint(blobPrimaryEndpoint, blobSecondaryEndpoint), + new StorageEndpoint(queuePrimaryEndpoint, queueSecondaryEndpoint), + new StorageEndpoint(tablePrimaryEndpoint, tableSecondaryEndpoint), + null, + null); + } catch (URISyntaxException use) { + throw logger.logExceptionAsError(new RuntimeException(use)); + } + return storageConnectionString; + } else { + return null; + } + } + + private static ConnectionSettingsFilter requireUseEmulatorFlag() { + return ConnectionSettingsFilter.allRequired(Constants.ConnectionStringConstants.USE_EMULATOR_STORAGE_NAME); + } + + private static ConnectionSettingsFilter optionalProxyUri() { + return ConnectionSettingsFilter.optional(Constants.ConnectionStringConstants.EMULATOR_STORAGE_PROXY_URI_NAME); + } + + private static Boolean parseUseEmulatorFlag(final ConnectionSettings settings) { + return Boolean.parseBoolean(settings.getSettingValue(Constants + .ConnectionStringConstants + .USE_EMULATOR_STORAGE_NAME)); + } +} diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageEndpoint.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageEndpoint.java new file mode 100644 index 000000000000..5f73b4a2b7a7 --- /dev/null +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageEndpoint.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.implementation.connectionstring; + +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.common.implementation.Constants; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Objects; + +/** + * Type representing storage service (blob, queue, table, file) endpoint. + */ +public final class StorageEndpoint { + private final String primaryUri; + private final String secondaryUri; + + /** + * Creates {@link StorageEndpoint} with primary endpoint. + * + * @param primaryUri the primary endpoint URI + */ + public StorageEndpoint(URI primaryUri) { + Objects.requireNonNull(primaryUri); + this.primaryUri = primaryUri.toString(); + this.secondaryUri = null; + } + + /** + * Creates {@link StorageEndpoint} with primary and secondary endpoint. + * @param primaryUri the primary endpoint URI + * @param secondaryUri the secondary endpoint URI + */ + public StorageEndpoint(URI primaryUri, URI secondaryUri) { + Objects.requireNonNull(primaryUri); + Objects.requireNonNull(secondaryUri); + this.primaryUri = primaryUri.toString(); + this.secondaryUri = secondaryUri.toString(); + } + + /** + * @return the primary endpoint URI + */ + public String getPrimaryUri() { + return this.primaryUri; + } + + /** + * @return the secondary endpoint URI + */ + public String getSecondaryUri() { + return this.secondaryUri; + } + + /** + * Creates a StorageEndpoint from the given connection settings. + * + * @param settings the settings derived from storage connection string. + * @param service the storage service. Possible values are blob, queue, table and file. + * @param serviceEndpointName the name of the entry in the settings representing + * a well formed primary URI to the service. Possible values are + * BlobEndpoint, QueueEndpoint, FileEndpoint and TableEndpoint. + * + * @param serviceSecondaryEndpointName the name of the entry in the settings representing + * a well formed secondary URI to the service. Possible + * values are BlobSecondaryEndpoint, QueueSecondaryEndpoint + * FileSecondaryEndpoint and TableSecondaryEndpoint. + * @param matchesAutomaticEndpointsSpec true indicate that the settings has entries from which + * endpoint to the service can be build. Possible values + * are DefaultEndpointsProtocol, AccountName, AccountKey + * and EndpointSuffix. + * @param logger the logger to log any exception while processing the settings. + * @return a StorageEndpoint if required settings exists, null otherwise. + */ + public static StorageEndpoint fromStorageSettings(final ConnectionSettings settings, + final String service, + final String serviceEndpointName, + final String serviceSecondaryEndpointName, + final Boolean matchesAutomaticEndpointsSpec, + final ClientLogger logger) { + String serviceEndpoint = settings.getSettingValue(serviceEndpointName); + String serviceSecondaryEndpoint = settings.getSettingValue(serviceSecondaryEndpointName); + + if (serviceEndpoint != null && serviceSecondaryEndpoint != null) { + try { + return new StorageEndpoint(new URI(serviceEndpoint), new URI(serviceSecondaryEndpoint)); + } catch (URISyntaxException use) { + throw logger.logExceptionAsError(new RuntimeException(use)); + } + } + + if (serviceEndpoint != null) { + try { + return new StorageEndpoint(new URI(serviceEndpoint)); + } catch (URISyntaxException use) { + throw logger.logExceptionAsError(new RuntimeException(use)); + } + } + + if (matchesAutomaticEndpointsSpec) { + // Derive URI from relevant settings + // + final String protocol = + settings.getSettingValue(Constants.ConnectionStringConstants.DEFAULT_ENDPOINTS_PROTOCOL_NAME); + if (isNullOrEmpty(protocol)) { + throw logger.logExceptionAsError(new IllegalArgumentException("'DefaultEndpointsProtocol' is " + + "required, specify whether to use http or https.")); + } + final String accountName = + settings.getSettingValue(Constants.ConnectionStringConstants.ACCOUNT_NAME); + if (isNullOrEmpty(accountName)) { + throw logger.logExceptionAsError(new IllegalArgumentException("'AccountName' is required.")); + } + // + String endpointSuffix = + settings.getSettingValue(Constants.ConnectionStringConstants.ENDPOINT_SUFFIX_NAME); + if (endpointSuffix == null) { + // default: core.windows.net + endpointSuffix = Constants.ConnectionStringConstants.DEFAULT_DNS; + } + final URI primaryUri; + final URI secondaryUri; + try { + primaryUri = new URI(String.format("%s://%s.%s.%s", + protocol, + accountName, + service, + endpointSuffix)); + } catch (URISyntaxException use) { + throw logger.logExceptionAsError(new RuntimeException(use)); + } + + try { + secondaryUri = new URI(String.format("%s://%s-secondary.%s.%s", + protocol, + accountName, + service, + endpointSuffix)); + } catch (URISyntaxException use) { + throw logger.logExceptionAsError(new RuntimeException(use)); + } + return new StorageEndpoint(primaryUri, secondaryUri); + } + return null; + } + + private static boolean isNullOrEmpty(final String value) { + return value == null || value.length() == 0; + } +} diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageServiceConnectionString.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageServiceConnectionString.java new file mode 100644 index 000000000000..c00912cae483 --- /dev/null +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/connectionstring/StorageServiceConnectionString.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.implementation.connectionstring; + +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.common.implementation.Constants; + +/** + * Type to parse a connection string and creates {@link StorageConnectionString} for storage service. + */ +final class StorageServiceConnectionString { + /** + * Try parsing the connection string and create {@link StorageConnectionString} + * from it. + * + * @param settings the connection settings + * @param logger the logger + * @return the StorageConnectionString for emulator + * @throws IllegalArgumentException If settings is invalid for storage service. + */ + static StorageConnectionString tryCreate(final ConnectionSettings settings, + final ClientLogger logger) { + ConnectionSettingsFilter automaticEndpointsMatchSpec = automaticEndpointsMatchSpec(); + ConnectionSettingsFilter explicitEndpointsMatchSpec = explicitEndpointsMatchSpec(); + + boolean matchesAutomaticEndpointsSpec = ConnectionSettingsFilter.matchesSpecification(settings, + automaticEndpointsMatchSpec); + boolean matchesExplicitEndpointsSpec = ConnectionSettingsFilter.matchesSpecification(settings, + explicitEndpointsMatchSpec); + + if (matchesAutomaticEndpointsSpec || matchesExplicitEndpointsSpec) { + if (matchesAutomaticEndpointsSpec + && !settings.hasSetting(Constants.ConnectionStringConstants.DEFAULT_ENDPOINTS_PROTOCOL_NAME)) { + settings.setSetting(Constants.ConnectionStringConstants.DEFAULT_ENDPOINTS_PROTOCOL_NAME, "https"); + } + // If the settings BlobEndpoint, FileEndpoint, QueueEndpoint, TableEndpoint presents + // it will be a well formed Uri, including 'http' or 'https' prefix. + String blobEndpoint = + settings.getSettingValue(Constants.ConnectionStringConstants.BLOB_ENDPOINT_NAME); + String queueEndpoint = + settings.getSettingValue(Constants.ConnectionStringConstants.QUEUE_ENDPOINT_NAME); + String tableEndpoint = + settings.getSettingValue(Constants.ConnectionStringConstants.TABLE_ENDPOINT_NAME); + String fileEndpoint = + settings.getSettingValue(Constants.ConnectionStringConstants.FILE_ENDPOINT_NAME); + String blobSecondaryEndpoint = + settings.getSettingValue(Constants.ConnectionStringConstants.BLOB_SECONDARY_ENDPOINT_NAME); + String queueSecondaryEndpoint = + settings.getSettingValue(Constants.ConnectionStringConstants.QUEUE_SECONDARY_ENDPOINT_NAME); + String tableSecondaryEndpoint = + settings.getSettingValue(Constants.ConnectionStringConstants.TABLE_SECONDARY_ENDPOINT_NAME); + String fileSecondaryEndpoint = + settings.getSettingValue(Constants.ConnectionStringConstants.FILE_SECONDARY_ENDPOINT_NAME); + + if (isValidPrimarySecondaryPair(blobEndpoint, blobSecondaryEndpoint) + && isValidPrimarySecondaryPair(queueEndpoint, queueSecondaryEndpoint) + && isValidPrimarySecondaryPair(tableEndpoint, tableSecondaryEndpoint) + && isValidPrimarySecondaryPair(fileEndpoint, fileSecondaryEndpoint)) { + return new StorageConnectionString( + StorageAuthenticationSettings.fromConnectionSettings(settings), + StorageEndpoint.fromStorageSettings(settings, + "blob", + Constants.ConnectionStringConstants.BLOB_ENDPOINT_NAME, + Constants.ConnectionStringConstants.BLOB_SECONDARY_ENDPOINT_NAME, + matchesAutomaticEndpointsSpec, + logger), + StorageEndpoint.fromStorageSettings(settings, + "queue", + Constants.ConnectionStringConstants.QUEUE_ENDPOINT_NAME, + Constants.ConnectionStringConstants.QUEUE_SECONDARY_ENDPOINT_NAME, + matchesAutomaticEndpointsSpec, + logger), + StorageEndpoint.fromStorageSettings(settings, + "table", + Constants.ConnectionStringConstants.TABLE_ENDPOINT_NAME, + Constants.ConnectionStringConstants.TABLE_SECONDARY_ENDPOINT_NAME, + matchesAutomaticEndpointsSpec, + logger), + StorageEndpoint.fromStorageSettings(settings, + "file", + Constants.ConnectionStringConstants.FILE_ENDPOINT_NAME, + Constants.ConnectionStringConstants.FILE_SECONDARY_ENDPOINT_NAME, + matchesAutomaticEndpointsSpec, + logger), + settings.getSettingValue(Constants.ConnectionStringConstants.ACCOUNT_NAME)); + } + } + return null; + } + + private static ConnectionSettingsFilter automaticEndpointsMatchSpec() { + return ConnectionSettingsFilter.matchesExactly( + ConnectionSettingsFilter.matchesAll( + ConnectionSettingsFilter.matchesOne( + ConnectionSettingsFilter.matchesAll(requireAccountKey()), + requireSas()), + requireAccountName(), + optionalEndpoints(), + optionalEndpointProtocolAndSuffix()) + ); + } + + private static ConnectionSettingsFilter explicitEndpointsMatchSpec() { + ConnectionSettingsFilter validCredentials = ConnectionSettingsFilter.matchesOne( + requireAccountNameAndKeyNoSas(), + requireSasOptionalAccountNameNoAccountKey(), + noAccountNameNoAccountKeyNoSas()); + + return ConnectionSettingsFilter.matchesExactly(ConnectionSettingsFilter.matchesAll(validCredentials, + requireAtLeastOnePrimaryEndpoint(), + optionalSecondaryEndpoints())); + } + + private static ConnectionSettingsFilter requireAccountName() { + return ConnectionSettingsFilter.allRequired(Constants.ConnectionStringConstants.ACCOUNT_NAME); + } + + private static ConnectionSettingsFilter requireAccountKey() { + return ConnectionSettingsFilter.allRequired(Constants.ConnectionStringConstants.ACCOUNT_KEY_NAME); + } + + private static ConnectionSettingsFilter requireSas() { + return ConnectionSettingsFilter.allRequired(Constants.ConnectionStringConstants.SHARED_ACCESS_SIGNATURE_NAME); + } + + private static ConnectionSettingsFilter requireAccountNameAndKey() { + return ConnectionSettingsFilter.allRequired(Constants.ConnectionStringConstants.ACCOUNT_NAME, + Constants.ConnectionStringConstants.ACCOUNT_KEY_NAME); + } + + private static ConnectionSettingsFilter optionalAccountName() { + return ConnectionSettingsFilter.optional(Constants.ConnectionStringConstants.ACCOUNT_NAME); + } + + private static ConnectionSettingsFilter noAccountKey() { + return ConnectionSettingsFilter.none(Constants.ConnectionStringConstants.ACCOUNT_KEY_NAME); + } + + private static ConnectionSettingsFilter noSas() { + return ConnectionSettingsFilter.none(Constants.ConnectionStringConstants.SHARED_ACCESS_SIGNATURE_NAME); + } + + private static ConnectionSettingsFilter requireAccountNameAndKeyNoSas() { + return ConnectionSettingsFilter.matchesAll( + requireAccountNameAndKey(), + noSas()); + } + + private static ConnectionSettingsFilter requireSasOptionalAccountNameNoAccountKey() { + return ConnectionSettingsFilter.matchesAll( + requireSas(), + optionalAccountName(), + noAccountKey()); + } + + private static ConnectionSettingsFilter noAccountNameNoAccountKeyNoSas() { + return ConnectionSettingsFilter.none(Constants.ConnectionStringConstants.ACCOUNT_NAME, + Constants.ConnectionStringConstants.ACCOUNT_KEY_NAME, + Constants.ConnectionStringConstants.SHARED_ACCESS_SIGNATURE_NAME); + } + + private static ConnectionSettingsFilter optionalEndpointProtocolAndSuffix() { + return ConnectionSettingsFilter.optional(Constants.ConnectionStringConstants.DEFAULT_ENDPOINTS_PROTOCOL_NAME, + Constants.ConnectionStringConstants.ENDPOINT_SUFFIX_NAME); + } + + private static ConnectionSettingsFilter optionalEndpoints() { + return ConnectionSettingsFilter.optional( + Constants.ConnectionStringConstants.BLOB_ENDPOINT_NAME, + Constants.ConnectionStringConstants.BLOB_SECONDARY_ENDPOINT_NAME, + Constants.ConnectionStringConstants.QUEUE_ENDPOINT_NAME, + Constants.ConnectionStringConstants.QUEUE_SECONDARY_ENDPOINT_NAME, + Constants.ConnectionStringConstants.TABLE_ENDPOINT_NAME, + Constants.ConnectionStringConstants.TABLE_SECONDARY_ENDPOINT_NAME, + Constants.ConnectionStringConstants.FILE_ENDPOINT_NAME, + Constants.ConnectionStringConstants.FILE_SECONDARY_ENDPOINT_NAME); + } + + private static ConnectionSettingsFilter requireAtLeastOnePrimaryEndpoint() { + return ConnectionSettingsFilter.atLeastOne(Constants.ConnectionStringConstants.BLOB_ENDPOINT_NAME, + Constants.ConnectionStringConstants.QUEUE_ENDPOINT_NAME, + Constants.ConnectionStringConstants.TABLE_ENDPOINT_NAME, + Constants.ConnectionStringConstants.FILE_ENDPOINT_NAME); + } + + private static ConnectionSettingsFilter optionalSecondaryEndpoints() { + return ConnectionSettingsFilter.optional(Constants.ConnectionStringConstants.BLOB_SECONDARY_ENDPOINT_NAME, + Constants.ConnectionStringConstants.QUEUE_SECONDARY_ENDPOINT_NAME, + Constants.ConnectionStringConstants.TABLE_SECONDARY_ENDPOINT_NAME, + Constants.ConnectionStringConstants.FILE_SECONDARY_ENDPOINT_NAME); + } + + private static Boolean isValidPrimarySecondaryPair(String primary, String secondary) { + if (primary != null) { + return true; + } + if (secondary == null) { + return true; + } + return false; + } +} diff --git a/sdk/storage/azure-storage-common/src/main/java/module-info.java b/sdk/storage/azure-storage-common/src/main/java/module-info.java index cf366acd00d6..24e9cd2d34ec 100644 --- a/sdk/storage/azure-storage-common/src/main/java/module-info.java +++ b/sdk/storage/azure-storage-common/src/main/java/module-info.java @@ -25,4 +25,10 @@ com.azure.storage.blob.cryptography, com.azure.storage.file, com.azure.storage.queue; + + exports com.azure.storage.common.implementation.connectionstring to // FIXME this should not be a long-term solution + com.azure.storage.blob, + com.azure.storage.blob.cryptography, + com.azure.storage.file, + com.azure.storage.queue; } diff --git a/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/connectionstring/StorageConnectionStringTest.java b/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/connectionstring/StorageConnectionStringTest.java new file mode 100644 index 000000000000..74636b073166 --- /dev/null +++ b/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/connectionstring/StorageConnectionStringTest.java @@ -0,0 +1,346 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.implementation.connectionstring; + +import com.azure.core.util.logging.ClientLogger; +import org.junit.Assert; +import org.junit.Test; + +public class StorageConnectionStringTest { + private final ClientLogger logger = new ClientLogger(StorageConnectionStringTest.class); + private static final String ACCOUNT_NAME_VALUE = "contoso"; + private static final String ACCOUNT_KEY_VALUE = + "95o6TL9jkIjNr6HurD6Xa+zLQ+PX9/VWR8fI2ofHatbrUb8kRJ75B6enwRU3q1OP8fmjghaoxdqnwhN7m3pZow=="; + private static final String SAS_TOKEN = + "sv=2015-07-08&sig=iCvQmdZngZNW%2F4vw43j6%2BVz6fndHF5LI639QJba4r8o%3D&spr=https" + + "&st=2016-04-12T03%3A24%3A31Z" + + "&se=2016-04-13T03%3A29%3A31Z&srt=s&ss=bf&sp=rwl"; + private static final String CHINA_CLOUD_ENDPOINT_SUFFIX = "core.chinacloudapi.cn"; + + @Test + public void sasToken() { + final String blobEndpointStr = "https://storagesample.blob.core.windows.net"; + final String fileEndpointStr = "https://storagesample.file.core.windows.net"; + + final String connectionString = String.format("BlobEndpoint=%s;FileEndpoint=%s;SharedAccessSignature=%s;", + blobEndpointStr, + fileEndpointStr, + SAS_TOKEN); + + StorageConnectionString storageConnectionString = StorageConnectionString.create(connectionString, logger); + Assert.assertNotNull(storageConnectionString); + StorageEndpoint blobEndpoint = storageConnectionString.getBlobEndpoint(); + Assert.assertNotNull(blobEndpoint); + Assert.assertNotNull(blobEndpoint.getPrimaryUri()); + Assert.assertTrue(blobEndpoint.getPrimaryUri().equalsIgnoreCase(blobEndpointStr)); + + StorageEndpoint fileEndpoint = storageConnectionString.getFileEndpoint(); + Assert.assertNotNull(fileEndpoint); + Assert.assertNotNull(fileEndpoint.getPrimaryUri()); + Assert.assertTrue(fileEndpoint.getPrimaryUri().equalsIgnoreCase(fileEndpointStr)); + + Assert.assertNull(storageConnectionString.getQueueEndpoint()); + Assert.assertNull(storageConnectionString.getTableEndpoint()); + + StorageAuthenticationSettings authSettings + = storageConnectionString.getStorageAuthSettings(); + Assert.assertNotNull(authSettings); + Assert.assertEquals(StorageAuthenticationSettings.Type.SAS_TOKEN, + authSettings.getType()); + Assert.assertNotNull(authSettings.getSasToken()); + Assert.assertTrue(authSettings.getSasToken().equalsIgnoreCase(SAS_TOKEN)); + Assert.assertNull(storageConnectionString.getAccountName()); + } + + @Test + public void accountNameKey() { + final String connectionString = String.format("DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s;", + ACCOUNT_NAME_VALUE, + ACCOUNT_KEY_VALUE); + + StorageConnectionString storageConnectionString = StorageConnectionString.create(connectionString, logger); + Assert.assertNotNull(storageConnectionString); + + StorageEndpoint blobEndpoint = storageConnectionString.getBlobEndpoint(); + Assert.assertNotNull(blobEndpoint); + Assert.assertNotNull(blobEndpoint.getPrimaryUri()); + Assert.assertTrue(blobEndpoint.getPrimaryUri() + .equalsIgnoreCase(String.format("https://%s.blob.core.windows.net", ACCOUNT_NAME_VALUE))); + + StorageEndpoint fileEndpoint = storageConnectionString.getFileEndpoint(); + Assert.assertNotNull(fileEndpoint); + Assert.assertNotNull(fileEndpoint.getPrimaryUri()); + Assert.assertTrue(fileEndpoint.getPrimaryUri() + .equalsIgnoreCase(String.format("https://%s.file.core.windows.net", ACCOUNT_NAME_VALUE))); + + StorageEndpoint queueEndpoint = storageConnectionString.getQueueEndpoint(); + Assert.assertNotNull(queueEndpoint); + Assert.assertNotNull(queueEndpoint.getPrimaryUri()); + Assert.assertTrue(queueEndpoint.getPrimaryUri() + .equalsIgnoreCase(String.format("https://%s.queue.core.windows.net", ACCOUNT_NAME_VALUE))); + + StorageEndpoint tableEndpoint = storageConnectionString.getTableEndpoint(); + Assert.assertNotNull(tableEndpoint); + Assert.assertNotNull(tableEndpoint.getPrimaryUri()); + Assert.assertTrue(tableEndpoint.getPrimaryUri() + .equalsIgnoreCase(String.format("https://%s.table.core.windows.net", ACCOUNT_NAME_VALUE))); + + StorageAuthenticationSettings authSettings = storageConnectionString.getStorageAuthSettings(); + Assert.assertNotNull(authSettings); + Assert.assertEquals(StorageAuthenticationSettings.Type.ACCOUNT_NAME_KEY, + authSettings.getType()); + Assert.assertNotNull(authSettings.getAccount()); + Assert.assertNotNull(authSettings.getAccount().getName()); + Assert.assertNotNull(authSettings.getAccount().getAccessKey()); + Assert.assertTrue(authSettings.getAccount().getName().equals(ACCOUNT_NAME_VALUE)); + Assert.assertTrue(authSettings.getAccount().getAccessKey().equals(ACCOUNT_KEY_VALUE)); + } + + @Test + public void customEndpointSuffix() { + final String connectionString = + String.format("DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s;EndpointSuffix=%s", + ACCOUNT_NAME_VALUE, + ACCOUNT_KEY_VALUE, + CHINA_CLOUD_ENDPOINT_SUFFIX); + + StorageConnectionString storageConnectionString = StorageConnectionString.create(connectionString, logger); + Assert.assertNotNull(storageConnectionString); + + StorageEndpoint blobEndpoint = storageConnectionString.getBlobEndpoint(); + Assert.assertNotNull(blobEndpoint); + Assert.assertNotNull(blobEndpoint.getPrimaryUri()); + Assert.assertTrue(blobEndpoint.getPrimaryUri() + .equalsIgnoreCase(String.format("https://%s.blob.%s", + ACCOUNT_NAME_VALUE, + CHINA_CLOUD_ENDPOINT_SUFFIX))); + + StorageEndpoint fileEndpoint = storageConnectionString.getFileEndpoint(); + Assert.assertNotNull(fileEndpoint); + Assert.assertNotNull(fileEndpoint.getPrimaryUri()); + Assert.assertTrue(fileEndpoint.getPrimaryUri() + .equalsIgnoreCase(String.format("https://%s.file.%s", + ACCOUNT_NAME_VALUE, + CHINA_CLOUD_ENDPOINT_SUFFIX))); + + StorageEndpoint queueEndpoint = storageConnectionString.getQueueEndpoint(); + Assert.assertNotNull(queueEndpoint); + Assert.assertNotNull(queueEndpoint.getPrimaryUri()); + Assert.assertTrue(queueEndpoint.getPrimaryUri() + .equalsIgnoreCase(String.format("https://%s.queue.%s", + ACCOUNT_NAME_VALUE, + CHINA_CLOUD_ENDPOINT_SUFFIX))); + + StorageEndpoint tableEndpoint = storageConnectionString.getTableEndpoint(); + Assert.assertNotNull(tableEndpoint); + Assert.assertNotNull(tableEndpoint.getPrimaryUri()); + Assert.assertTrue(tableEndpoint.getPrimaryUri() + .equalsIgnoreCase(String.format("https://%s.table.%s", + ACCOUNT_NAME_VALUE, + CHINA_CLOUD_ENDPOINT_SUFFIX))); + + StorageAuthenticationSettings authSettings = + storageConnectionString.getStorageAuthSettings(); + Assert.assertNotNull(authSettings); + Assert.assertEquals(StorageAuthenticationSettings.Type.ACCOUNT_NAME_KEY, + authSettings.getType()); + Assert.assertNotNull(authSettings.getAccount()); + Assert.assertNotNull(authSettings.getAccount().getName()); + Assert.assertNotNull(authSettings.getAccount().getAccessKey()); + Assert.assertTrue(authSettings.getAccount().getName().equals(ACCOUNT_NAME_VALUE)); + Assert.assertTrue(authSettings.getAccount().getAccessKey().equals(ACCOUNT_KEY_VALUE)); + } + + @Test + public void explicitEndpointsAndAccountName() { + final String blobEndpointStr = "https://storagesample.blob.core.windows.net"; + final String fileEndpointStr = "https://storagesample.file.core.windows.net"; + final String connectionString = String.format("BlobEndpoint=%s;FileEndpoint=%s;AccountName=%s;AccountKey=%s", + blobEndpointStr, + fileEndpointStr, + ACCOUNT_NAME_VALUE, + ACCOUNT_KEY_VALUE); + + StorageConnectionString storageConnectionString = StorageConnectionString.create(connectionString, logger); + Assert.assertNotNull(storageConnectionString); + StorageEndpoint blobEndpoint = storageConnectionString.getBlobEndpoint(); + Assert.assertNotNull(blobEndpoint); + Assert.assertNotNull(blobEndpoint.getPrimaryUri()); + Assert.assertTrue(blobEndpoint.getPrimaryUri().equalsIgnoreCase(blobEndpointStr)); + + StorageEndpoint fileEndpoint = storageConnectionString.getFileEndpoint(); + Assert.assertNotNull(fileEndpoint); + Assert.assertNotNull(fileEndpoint.getPrimaryUri()); + Assert.assertTrue(fileEndpoint.getPrimaryUri().equalsIgnoreCase(fileEndpointStr)); + + StorageEndpoint queueEndpoint = storageConnectionString.getQueueEndpoint(); + Assert.assertNotNull(queueEndpoint); + Assert.assertNotNull(queueEndpoint.getPrimaryUri()); + Assert.assertTrue(queueEndpoint.getPrimaryUri() + .equalsIgnoreCase(String.format("https://%s.queue.core.windows.net", ACCOUNT_NAME_VALUE))); + + StorageEndpoint tableEndpoint = storageConnectionString.getTableEndpoint(); + Assert.assertNotNull(tableEndpoint); + Assert.assertNotNull(tableEndpoint.getPrimaryUri()); + Assert.assertTrue(tableEndpoint.getPrimaryUri() + .equalsIgnoreCase(String.format("https://%s.table.core.windows.net", ACCOUNT_NAME_VALUE))); + + StorageAuthenticationSettings authSettings = + storageConnectionString.getStorageAuthSettings(); + Assert.assertNotNull(authSettings); + Assert.assertEquals(StorageAuthenticationSettings.Type.ACCOUNT_NAME_KEY, + authSettings.getType()); + Assert.assertNotNull(authSettings.getAccount()); + Assert.assertNotNull(authSettings.getAccount().getName()); + Assert.assertNotNull(authSettings.getAccount().getAccessKey()); + Assert.assertTrue(authSettings.getAccount().getName().equals(ACCOUNT_NAME_VALUE)); + Assert.assertTrue(authSettings.getAccount().getAccessKey().equals(ACCOUNT_KEY_VALUE)); + } + + @Test + public void explicitEndpointsAndAnonymousAccess() { + final String blobEndpointStr = "https://storagesample.blob.core.windows.net"; + final String fileEndpointStr = "https://storagesample.file.core.windows.net"; + + final String connectionString = String.format("BlobEndpoint=%s;FileEndpoint=%s;", + blobEndpointStr, + fileEndpointStr); + + StorageConnectionString storageConnectionString = StorageConnectionString.create(connectionString, logger); + Assert.assertNotNull(storageConnectionString); + StorageEndpoint blobEndpoint = storageConnectionString.getBlobEndpoint(); + Assert.assertNotNull(blobEndpoint); + Assert.assertNotNull(blobEndpoint.getPrimaryUri()); + Assert.assertTrue(blobEndpoint.getPrimaryUri().equalsIgnoreCase(blobEndpointStr)); + + StorageEndpoint fileEndpoint = storageConnectionString.getFileEndpoint(); + Assert.assertNotNull(fileEndpoint); + Assert.assertNotNull(fileEndpoint.getPrimaryUri()); + Assert.assertTrue(fileEndpoint.getPrimaryUri().equalsIgnoreCase(fileEndpointStr)); + + StorageEndpoint queueEndpoint = storageConnectionString.getQueueEndpoint(); + Assert.assertNull(queueEndpoint); + + StorageEndpoint tableEndpoint = storageConnectionString.getTableEndpoint(); + Assert.assertNull(tableEndpoint); + + StorageAuthenticationSettings authSettings + = storageConnectionString.getStorageAuthSettings(); + Assert.assertNotNull(authSettings); + Assert.assertEquals(StorageAuthenticationSettings.Type.NONE, + authSettings.getType()); + Assert.assertNull(authSettings.getAccount()); + Assert.assertNull(authSettings.getSasToken()); + } + + @Test + public void skipEmptyEntries() { + // connection string with empty entries (;; after protocol) + final String connectionString = + String.format("DefaultEndpointsProtocol=https;;;AccountName=%s;AccountKey=%s; EndpointSuffix=%s", + ACCOUNT_NAME_VALUE, ACCOUNT_KEY_VALUE, CHINA_CLOUD_ENDPOINT_SUFFIX); + + StorageConnectionString.create(connectionString, logger); + } + + @Test(expected = IllegalArgumentException.class) + public void nullOrEmpty() { + StorageConnectionString.create(null, logger); + StorageConnectionString.create("", logger); + } + + @Test(expected = IllegalArgumentException.class) + public void missingEqualDelimiter() { + // A connection string with missing equal symbol between AccountKey and it's value + final String connectionString = + String.format("DefaultEndpointsProtocol=https;AccountName=%s;AccountKey%s;EndpointSuffix=%s", + ACCOUNT_NAME_VALUE, ACCOUNT_KEY_VALUE, CHINA_CLOUD_ENDPOINT_SUFFIX); + StorageConnectionString.create(connectionString, logger); + } + + @Test(expected = IllegalArgumentException.class) + public void missingKey() { + // A connection string with missing 'AccountName' key for it's value + final String connectionString = + String.format("DefaultEndpointsProtocol=https;=%s;AccountKey=%s;EndpointSuffix=%s", + ACCOUNT_NAME_VALUE, ACCOUNT_KEY_VALUE, CHINA_CLOUD_ENDPOINT_SUFFIX); + StorageConnectionString.create(connectionString, logger); + } + + @Test(expected = IllegalArgumentException.class) + public void missingValue() { + // A connection string with missing value for 'AccountName' key + final String connectionString = + String.format("DefaultEndpointsProtocol=https;AccountName=;AccountKey%s;EndpointSuffix=%s", + ACCOUNT_KEY_VALUE, CHINA_CLOUD_ENDPOINT_SUFFIX); + StorageConnectionString.create(connectionString, logger); + } + + @Test(expected = IllegalArgumentException.class) + public void missingKeyValue() { + // a connection string with key and value missing for equal (=) delimiter + final String connectionString = + String.format("DefaultEndpointsProtocol=https;=;AccountName=%s;AccountKey%s;EndpointSuffix=%s", + ACCOUNT_NAME_VALUE, ACCOUNT_KEY_VALUE, CHINA_CLOUD_ENDPOINT_SUFFIX); + StorageConnectionString.create(connectionString, logger); + } + + @Test(expected = IllegalArgumentException.class) + public void missingAccountKey() { + final String connectionString = + String.format("DefaultEndpointsProtocol=https;AccountName=%s;%s;EndpointSuffix=%s", + ACCOUNT_NAME_VALUE, ACCOUNT_KEY_VALUE, CHINA_CLOUD_ENDPOINT_SUFFIX); + StorageConnectionString.create(connectionString, logger); + } + + @Test(expected = IllegalArgumentException.class) + public void sasTokenAccountKeyMutuallyExclusive() { + final String blobEndpointStr = "https://storagesample.blob.core.windows.net"; + final String fileEndpointStr = "https://storagesample.file.core.windows.net"; + + final String connectionString = + String.format("BlobEndpoint=%s;FileEndpoint=%s;SharedAccessSignature=%s;AccountName=%s;AccountKey=%s;", + blobEndpointStr, + fileEndpointStr, + SAS_TOKEN, + ACCOUNT_NAME_VALUE, + ACCOUNT_KEY_VALUE); + StorageConnectionString.create(connectionString, logger); + } + + @Test + public void sasTokenAllowedWithAccountName() { + final String blobEndpointStr = "https://storagesample.blob.core.windows.net"; + final String fileEndpointStr = "https://storagesample.file.core.windows.net"; + + final String connectionString = + String.format("BlobEndpoint=%s;FileEndpoint=%s;SharedAccessSignature=%s;AccountName=%s;", + blobEndpointStr, + fileEndpointStr, + SAS_TOKEN, + ACCOUNT_NAME_VALUE, + ACCOUNT_KEY_VALUE); + StorageConnectionString.create(connectionString, logger); + } + + @Test + public void overrideDefaultProtocolToHttp() { + final String connectionString = + String.format("DefaultEndpointsProtocol=http;AccountName=%s;AccountKey=%s;EndpointSuffix=%s", + ACCOUNT_NAME_VALUE, + ACCOUNT_KEY_VALUE, + CHINA_CLOUD_ENDPOINT_SUFFIX); + + StorageConnectionString storageConnectionString = StorageConnectionString.create(connectionString, logger); + Assert.assertNotNull(storageConnectionString); + + StorageEndpoint blobEndpoint = storageConnectionString.getBlobEndpoint(); + Assert.assertNotNull(blobEndpoint); + Assert.assertNotNull(blobEndpoint.getPrimaryUri()); + Assert.assertTrue(blobEndpoint.getPrimaryUri() + .equalsIgnoreCase(String.format("http://%s.blob.%s", // http protocol + ACCOUNT_NAME_VALUE, + CHINA_CLOUD_ENDPOINT_SUFFIX))); + } +} diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java index 4cf9e5666065..dcbbe8abe8c2 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java @@ -13,12 +13,8 @@ import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.Utility; -import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.policy.RequestRetryOptions; import com.azure.storage.common.policy.RequestRetryPolicy; import com.azure.storage.common.policy.ResponseValidationPolicyBuilder; @@ -26,9 +22,6 @@ import com.azure.storage.common.policy.ScrubEtagPolicy; import java.util.ArrayList; import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.function.Consumer; import java.util.function.Supplier; /** @@ -38,43 +31,6 @@ final class BuilderHelper { private static final String DEFAULT_USER_AGENT_NAME = "azure-storage-file"; private static final String DEFAULT_USER_AGENT_VERSION = "12.0.0-preview.5"; - /** - * Parses the passed {@code connectionString} for values to configure on the builder. - * - * @param connectionString Connection string from the service account. - * @param accountNameSetter Callback to set the account name on the builder. - * @param credentialSetter Callback to set the {@link StorageSharedKeyCredential} of the builder. - * @param endpointSetter Callback to set the endpoint of the builder. - * @param logger {@link ClientLogger} used to log any exceptions. - * @throws NullPointerException If {@code connectionString} is {@code null}. - * @throws IllegalArgumentException If {@code connectionString} doesn't contain 'AccountName' or 'AccountKey'. - */ - static void configureConnectionString(String connectionString, Consumer accountNameSetter, - Consumer credentialSetter, Consumer endpointSetter, ClientLogger logger) { - Objects.requireNonNull(connectionString, "'connectionString' cannot be null."); - - Map connectionStringPieces = Utility.parseConnectionString(connectionString); - - String accountName = connectionStringPieces.get(Constants.ConnectionStringConstants.ACCOUNT_NAME); - String accountKey = connectionStringPieces.get(Constants.ConnectionStringConstants.ACCOUNT_KEY); - - if (ImplUtils.isNullOrEmpty(accountName) || ImplUtils.isNullOrEmpty(accountKey)) { - throw logger.logExceptionAsError( - new IllegalArgumentException("'connectionString' must contain 'AccountName' and 'AccountKey'.")); - } - - String endpointProtocol = connectionStringPieces.get(Constants.ConnectionStringConstants.ENDPOINT_PROTOCOL); - String endpointSuffix = connectionStringPieces.get(Constants.ConnectionStringConstants.ENDPOINT_SUFFIX); - - if (!ImplUtils.isNullOrEmpty(endpointProtocol) && !ImplUtils.isNullOrEmpty(endpointSuffix)) { - endpointSetter.accept(String.format("%s://%s.file.%s", endpointProtocol, accountName, - endpointSuffix.replaceFirst("^\\.", ""))); - } - - accountNameSetter.accept(accountName); - credentialSetter.accept(new StorageSharedKeyCredential(accountName, accountKey)); - } - /** * Constructs a {@link HttpPipeline} from values passed from a builder. * diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java index 330c0bf260cb..b3bfc3e13a5f 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java @@ -13,6 +13,9 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; +import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; +import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; @@ -311,19 +314,32 @@ public FileClientBuilder sasToken(String sasToken) { } /** - * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, - * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link - * #endpoint(String) endpoint}. + * Sets the connection string to connect to the service. * * @param connectionString Connection string of the storage account. * @return the updated FileClientBuilder - * @throws IllegalArgumentException If {@code connectionString} doesn't contain `AccountName` or `AccountKey`. - * @throws NullPointerException If {@code connectionString} is {@code null}. + * @throws IllegalArgumentException If {@code connectionString} in invalid. */ public FileClientBuilder connectionString(String connectionString) { - BuilderHelper.configureConnectionString(connectionString, (accountName) -> this.accountName = accountName, - this::credential, this::endpoint, logger); - + StorageConnectionString storageConnectionString + = StorageConnectionString.create(connectionString, logger); + StorageEndpoint endpoint = storageConnectionString.getFileEndpoint(); + if (endpoint == null || endpoint.getPrimaryUri() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException( + "connectionString missing required settings to derive file service endpoint.")); + } + this.endpoint(endpoint.getPrimaryUri()); + if (storageConnectionString.getAccountName() != null) { + this.accountName = storageConnectionString.getAccountName(); + } + StorageAuthenticationSettings authSettings = storageConnectionString.getStorageAuthSettings(); + if (authSettings.getType() == StorageAuthenticationSettings.Type.ACCOUNT_NAME_KEY) { + this.credential(new StorageSharedKeyCredential(authSettings.getAccount().getName(), + authSettings.getAccount().getAccessKey())); + } else if (authSettings.getType() == StorageAuthenticationSettings.Type.SAS_TOKEN) { + this.sasToken(authSettings.getSasToken()); + } return this; } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java index bbfac1ea3cde..0f7f8bb5d2b6 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java @@ -13,6 +13,9 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; +import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; +import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; @@ -207,19 +210,32 @@ public FileServiceClientBuilder sasToken(String sasToken) { } /** - * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, - * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link - * #endpoint(String) endpoint}. + * Sets the connection string to connect to the service. * * @param connectionString Connection string of the storage account. * @return the updated FileServiceClientBuilder - * @throws IllegalArgumentException If {@code connectionString} doesn't contain `AccountName` or `AccountKey`. - * @throws NullPointerException If {@code connectionString} is {@code null}. + * @throws IllegalArgumentException If {@code connectionString} is invalid. */ public FileServiceClientBuilder connectionString(String connectionString) { - BuilderHelper.configureConnectionString(connectionString, (accountName) -> this.accountName = accountName, - this::credential, this::endpoint, logger); - + StorageConnectionString storageConnectionString + = StorageConnectionString.create(connectionString, logger); + StorageEndpoint endpoint = storageConnectionString.getFileEndpoint(); + if (endpoint == null || endpoint.getPrimaryUri() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException( + "connectionString missing required settings to derive file service endpoint.")); + } + this.endpoint(endpoint.getPrimaryUri()); + if (storageConnectionString.getAccountName() != null) { + this.accountName = storageConnectionString.getAccountName(); + } + StorageAuthenticationSettings authSettings = storageConnectionString.getStorageAuthSettings(); + if (authSettings.getType() == StorageAuthenticationSettings.Type.ACCOUNT_NAME_KEY) { + this.credential(new StorageSharedKeyCredential(authSettings.getAccount().getName(), + authSettings.getAccount().getAccessKey())); + } else if (authSettings.getType() == StorageAuthenticationSettings.Type.SAS_TOKEN) { + this.sasToken(authSettings.getSasToken()); + } return this; } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java index 153365af573a..3b397cf6f9f1 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java @@ -13,6 +13,9 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; +import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; +import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; @@ -250,19 +253,33 @@ public ShareClientBuilder sasToken(String sasToken) { } /** - * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, - * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link - * #endpoint(String) endpoint}. + * Sets the connection string to connect to the service. * * @param connectionString Connection string of the storage account. * @return the updated ShareClientBuilder - * @throws IllegalArgumentException If {@code connectionString} doesn't contain `AccountName` or `AccountKey`. + * @throws IllegalArgumentException If {@code connectionString} in invalid. * @throws NullPointerException If {@code connectionString} is {@code null}. */ public ShareClientBuilder connectionString(String connectionString) { - BuilderHelper.configureConnectionString(connectionString, (accountName) -> this.accountName = accountName, - this::credential, this::endpoint, logger); - + StorageConnectionString storageConnectionString + = StorageConnectionString.create(connectionString, logger); + StorageEndpoint endpoint = storageConnectionString.getFileEndpoint(); + if (endpoint == null || endpoint.getPrimaryUri() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException( + "connectionString missing required settings to derive file service endpoint.")); + } + this.endpoint(endpoint.getPrimaryUri()); + if (storageConnectionString.getAccountName() != null) { + this.accountName = storageConnectionString.getAccountName(); + } + StorageAuthenticationSettings authSettings = storageConnectionString.getStorageAuthSettings(); + if (authSettings.getType() == StorageAuthenticationSettings.Type.ACCOUNT_NAME_KEY) { + this.credential(new StorageSharedKeyCredential(authSettings.getAccount().getName(), + authSettings.getAccount().getAccessKey())); + } else if (authSettings.getType() == StorageAuthenticationSettings.Type.SAS_TOKEN) { + this.sasToken(authSettings.getSasToken()); + } return this; } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java index 55cf39fd4d71..0dd8faed255f 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java @@ -13,12 +13,8 @@ import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.Utility; -import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.policy.RequestRetryOptions; import com.azure.storage.common.policy.RequestRetryPolicy; import com.azure.storage.common.policy.ResponseValidationPolicyBuilder; @@ -26,9 +22,6 @@ import com.azure.storage.common.policy.ScrubEtagPolicy; import java.util.ArrayList; import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.function.Consumer; import java.util.function.Supplier; /** @@ -38,44 +31,6 @@ final class BuilderHelper { private static final String DEFAULT_USER_AGENT_NAME = "azure-storage-queue"; private static final String DEFAULT_USER_AGENT_VERSION = "12.0.0-preview.5"; - /** - * Parses the passed {@code connectionString} for values to configure on the builder. - * - * @param connectionString Connection string from the service account. - * @param accountNameSetter Callback to set the account name on the builder. - * @param credentialSetter Callback to set the {@link StorageSharedKeyCredential} of the builder. - * @param endpointSetter Callback to set the endpoint of the builder. - * @param logger {@link ClientLogger} used to log any exceptions. - * @throws NullPointerException If {@code connectionString} is {@code null}. - * @throws IllegalArgumentException If {@code connectionString} doesn't contain 'AccountName' or 'AccountKey'. - */ - static void configureConnectionString(String connectionString, Consumer accountNameSetter, - Consumer credentialSetter, - Consumer endpointSetter, ClientLogger logger) { - Objects.requireNonNull(connectionString, "'connectionString' cannot be null."); - - Map connectionStringPieces = Utility.parseConnectionString(connectionString); - - String accountName = connectionStringPieces.get(Constants.ConnectionStringConstants.ACCOUNT_NAME); - String accountKey = connectionStringPieces.get(Constants.ConnectionStringConstants.ACCOUNT_KEY); - - if (ImplUtils.isNullOrEmpty(accountName) || ImplUtils.isNullOrEmpty(accountKey)) { - throw logger.logExceptionAsError( - new IllegalArgumentException("'connectionString' must contain 'AccountName' and 'AccountKey'.")); - } - - String endpointProtocol = connectionStringPieces.get(Constants.ConnectionStringConstants.ENDPOINT_PROTOCOL); - String endpointSuffix = connectionStringPieces.get(Constants.ConnectionStringConstants.ENDPOINT_SUFFIX); - - if (!ImplUtils.isNullOrEmpty(endpointProtocol) && !ImplUtils.isNullOrEmpty(endpointSuffix)) { - endpointSetter.accept(String.format("%s://%s.queue.%s", endpointProtocol, accountName, - endpointSuffix.replaceFirst("^\\.", ""))); - } - - accountNameSetter.accept(accountName); - credentialSetter.accept(new StorageSharedKeyCredential(accountName, accountKey)); - } - /** * Constructs a {@link HttpPipeline} from values passed from a builder. * diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java index 47354a293511..8abdd18f0f15 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java @@ -14,6 +14,9 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; +import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; +import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; @@ -258,19 +261,32 @@ public QueueClientBuilder sasToken(String sasToken) { } /** - * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, - * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link - * #endpoint(String) endpoint}. + * Sets the connection string to connect to the service. * * @param connectionString Connection string of the storage account. * @return the updated QueueClientBuilder - * @throws IllegalArgumentException If {@code connectionString} doesn't contain `AccountName` or `AccountKey`. - * @throws NullPointerException If {@code connectionString} is {@code null}. + * @throws IllegalArgumentException If {@code connectionString} is invalid. */ public QueueClientBuilder connectionString(String connectionString) { - BuilderHelper.configureConnectionString(connectionString, (accountName) -> this.accountName = accountName, - this::credential, this::endpoint, logger); - + StorageConnectionString storageConnectionString + = StorageConnectionString.create(connectionString, logger); + StorageEndpoint endpoint = storageConnectionString.getQueueEndpoint(); + if (endpoint == null || endpoint.getPrimaryUri() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException( + "connectionString missing required settings to derive queue service endpoint.")); + } + this.endpoint(endpoint.getPrimaryUri()); + if (storageConnectionString.getAccountName() != null) { + this.accountName = storageConnectionString.getAccountName(); + } + StorageAuthenticationSettings authSettings = storageConnectionString.getStorageAuthSettings(); + if (authSettings.getType() == StorageAuthenticationSettings.Type.ACCOUNT_NAME_KEY) { + this.credential(new StorageSharedKeyCredential(authSettings.getAccount().getName(), + authSettings.getAccount().getAccessKey())); + } else if (authSettings.getType() == StorageAuthenticationSettings.Type.SAS_TOKEN) { + this.sasToken(authSettings.getSasToken()); + } return this; } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java index ab1bd596ca0f..68abbf4b20ae 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java @@ -14,6 +14,9 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; +import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; +import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; import com.azure.storage.common.implementation.credentials.SasTokenCredential; import com.azure.storage.common.implementation.policy.SasTokenCredentialPolicy; import com.azure.storage.common.policy.RequestRetryOptions; @@ -233,19 +236,32 @@ public QueueServiceClientBuilder sasToken(String sasToken) { } /** - * Constructs a {@link StorageSharedKeyCredential} used to authorize requests sent to the service. Additionally, - * if the connection string contains `DefaultEndpointsProtocol` and `EndpointSuffix` it will set the {@link - * #endpoint(String) endpoint}. + * Sets the connection string to connect to the service. * * @param connectionString Connection string of the storage account. * @return the updated QueueServiceClientBuilder - * @throws IllegalArgumentException If {@code connectionString} doesn't contain `AccountName` or `AccountKey`. - * @throws NullPointerException If {@code connectionString} is {@code null}. + * @throws IllegalArgumentException If {@code connectionString} is invalid. */ public QueueServiceClientBuilder connectionString(String connectionString) { - BuilderHelper.configureConnectionString(connectionString, (accountName) -> this.accountName = accountName, - this::credential, this::endpoint, logger); - + StorageConnectionString storageConnectionString + = StorageConnectionString.create(connectionString, logger); + StorageEndpoint endpoint = storageConnectionString.getQueueEndpoint(); + if (endpoint == null || endpoint.getPrimaryUri() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException( + "connectionString missing required settings to derive queue service endpoint.")); + } + this.endpoint(endpoint.getPrimaryUri()); + if (storageConnectionString.getAccountName() != null) { + this.accountName = storageConnectionString.getAccountName(); + } + StorageAuthenticationSettings authSettings = storageConnectionString.getStorageAuthSettings(); + if (authSettings.getType() == StorageAuthenticationSettings.Type.ACCOUNT_NAME_KEY) { + this.credential(new StorageSharedKeyCredential(authSettings.getAccount().getName(), + authSettings.getAccount().getAccessKey())); + } else if (authSettings.getType() == StorageAuthenticationSettings.Type.SAS_TOKEN) { + this.sasToken(authSettings.getSasToken()); + } return this; } From 1f87e471d41753f17e47fd15f357d1ccc03c0796 Mon Sep 17 00:00:00 2001 From: Connie Yau Date: Fri, 18 Oct 2019 18:08:16 -0700 Subject: [PATCH 17/64] Sas generation (#5908) * Update sas generation to be consistent with Go and .NET. * Updating documentation and adding snippets. --- .../BlobServiceSasSignatureValues.java | 277 +++++++++++------- ...SasSignatureValuesJavaDocCodeSnippets.java | 59 ++++ .../com/azure/storage/blob/BlobAPITest.groovy | 8 +- .../com/azure/storage/blob/CPKTest.groovy | 18 +- .../com/azure/storage/blob/SASTest.groovy | 141 ++++----- .../blob/specialized/HelperTest.groovy | 55 ++-- ...elperTestservicesassignaturevaluesia.json} | 0 ...perTestservicesassignaturevaluesia[1].json | 65 ---- ...perTestservicesassignaturevaluesia[2].json | 65 ---- ...sassignaturevaluesassertgenerateok[2].json | 65 ---- ...sassignaturevaluesassertgenerateok[3].json | 65 ---- ...sassignaturevaluesassertgenerateok[4].json | 65 ---- ...sassignaturevaluesassertgenerateok[5].json | 65 ---- ...> SASTestservicesassignaturevaluesia.json} | 0 ...SASTestservicesassignaturevaluesia[1].json | 65 ---- 15 files changed, 332 insertions(+), 681 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValuesJavaDocCodeSnippets.java rename sdk/storage/azure-storage-blob/src/test/resources/session-records/{HelperTestservicesassignaturevaluesia[0].json => HelperTestservicesassignaturevaluesia.json} (100%) delete mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia[1].json delete mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia[2].json delete mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[2].json delete mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[3].json delete mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[4].json delete mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[5].json rename sdk/storage/azure-storage-blob/src/test/resources/session-records/{SASTestservicesassignaturevaluesia[0].json => SASTestservicesassignaturevaluesia.json} (100%) delete mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesia[1].json diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java index 79e90a2df015..41164b76854e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java @@ -3,56 +3,60 @@ package com.azure.storage.blob.specialized; +import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobContainerSasPermission; import com.azure.storage.blob.BlobSasPermission; +import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.UserDelegationKey; -import com.azure.storage.common.sas.SasProtocol; -import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.sas.SasIpRange; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.Utility; +import com.azure.storage.common.sas.SasIpRange; +import com.azure.storage.common.sas.SasProtocol; -import java.net.MalformedURLException; -import java.net.URL; import java.time.OffsetDateTime; /** - * BlobServiceSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage service. Once - * all the values here are set appropriately, call generateSASQueryParameters to obtain a representation of the SAS - * which can actually be applied to blob urls. Note: that both this class and {@link BlobServiceSasQueryParameters} - * exist because the former is mutable and a logical representation while the latter is immutable and used to generate - * actual REST requests. + * Used to generate a Shared Access Signature (SAS) for an Azure Blob Storage service. Once all the values here are set, + * call {@link + * #generateSasQueryParameters(StorageSharedKeyCredential) generateSasQueryParameters(StorageSharedKeyCredential)} or + * {@link #generateSasQueryParameters(UserDelegationKey, String) generateSasQueryParameters(UserDelegationKey, String)} + * to obtain a representation of the SAS which can be applied to blob urls. + * + *

    Generating SAS query parameters with {@link StorageSharedKeyCredential}

    + * The following code generates SAS query parameters for an Azure storage blob. *

    - * Please see here - * for more conceptual information on SAS. + * {@codesnippet com.azure.storage.blob.specialized.BlobServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential} + * + *

    Generating SAS query parameters with {@link UserDelegationKey}

    + * The following sample generates SAS query parameters for an Azure storage container. *

    - * Please see here for - * more details on each value, including which are required. + * {@codesnippet com.azure.storage.blob.specialized.BlobServiceSasSignatureValues.generateSasQueryParameters#UserDelegationKey-String} * - *

    Please see - * here - * for additional samples.

    + * @see BlobServiceSasQueryParameters + * @see Storage SAS overview + * @see Constructing a Service + * SAS */ public final class BlobServiceSasSignatureValues { /** * The SAS blob constant. */ - public static final String SAS_BLOB_CONSTANT = "b"; + private static final String SAS_BLOB_CONSTANT = "b"; /** * The SAS blob snapshot constant. */ - public static final String SAS_BLOB_SNAPSHOT_CONSTANT = "bs"; + private static final String SAS_BLOB_SNAPSHOT_CONSTANT = "bs"; /** * The SAS blob container constant. */ - public static final String SAS_CONTAINER_CONSTANT = "c"; + private static final String SAS_CONTAINER_CONSTANT = "c"; private final ClientLogger logger = new ClientLogger(BlobServiceSasSignatureValues.class); - private String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; + private String version; private SasProtocol protocol; @@ -64,7 +68,9 @@ public final class BlobServiceSasSignatureValues { private SasIpRange sasIpRange; - private String canonicalName; + private String containerName; + + private String blobName; private String resource; @@ -212,29 +218,26 @@ public String getPermissions() { /** * Sets the Blob permissions allowed by the SAS. * - *

    this will set the {@link #resource} to {@link #SAS_BLOB_CONSTANT} or {@link #SAS_BLOB_SNAPSHOT_CONSTANT} based - * on the value of {@link #getSnapshotId()}.

    - * * @param permissions {@link BlobSasPermission} * @return the updated BlobServiceSASSignatureValues object + * @throws NullPointerException if {@code permissions} is null. */ public BlobServiceSasSignatureValues setPermissions(BlobSasPermission permissions) { + Utility.assertNotNull("permissions", permissions); this.permissions = permissions.toString(); - this.resource = SAS_BLOB_CONSTANT; return this; } /** * Sets the Container permissions allowed by the SAS. * - *

    this will set the {@link #resource} to {@link #SAS_CONTAINER_CONSTANT}.

    - * * @param permissions {@link BlobContainerSasPermission} * @return the updated BlobServiceSASSignatureValues object + * @throws NullPointerException if {@code permissions} is null. */ public BlobServiceSasSignatureValues setPermissions(BlobContainerSasPermission permissions) { + Utility.assertNotNull("permissions", permissions); this.permissions = permissions.toString(); - this.resource = SAS_CONTAINER_CONSTANT; return this; } @@ -257,59 +260,44 @@ public BlobServiceSasSignatureValues setSasIpRange(SasIpRange sasIpRange) { } /** - * @return the resource the SAS user may access. + * Gets the name of the container the SAS user may access. + * + * @return The name of the container the SAS user may access. */ - public String getResource() { - return resource; + public String getContainerName() { + return containerName; } /** - * Sets the resource the SAS user may access. + * Sets the container the SAS user may access. * - * @param resource Allowed resources string to set - * @return the updated BlobServiceSASSignatureValues object + * @param containerName The name of the container. + * @return The updated BlobServiceSASSignatureValues object. */ - public BlobServiceSasSignatureValues setResource(String resource) { - this.resource = resource; + public BlobServiceSasSignatureValues setContainerName(String containerName) { + this.containerName = containerName; return this; } /** - * @return the canonical name of the object the SAS user may access. - */ - public String getCanonicalName() { - return canonicalName; - } - - /** - * Sets the canonical name of the object the SAS user may access. + * Gets the name of the blob the SAS user may access. {@code null} or an empty string is returned when a + * creating a container SAS. * - * @param canonicalName Canonical name of the object the SAS grants access - * @return the updated BlobServiceSASSignatureValues object + * @return The name of the blob the SAS user may access. {@code null} or an empty string is returned when a + * creating a container SAS. */ - public BlobServiceSasSignatureValues setCanonicalName(String canonicalName) { - this.canonicalName = canonicalName; - return this; + public String getBlobName() { + return blobName; } /** - * Sets the canonical name of the object the SAS user may access. Constructs a canonical name of - * "/blob/{accountName}{Path of urlString}". + * Sets the blob the SAS user may access. Use {@code null} or an empty string to create a container SAS. * - * @param urlString URL string that contains the path to the object - * @param accountName Name of the account that contains the object - * @return the updated BlobServiceSASSignatureValues object - * @throws RuntimeException If {@code urlString} is a malformed URL. - */ - public BlobServiceSasSignatureValues setCanonicalName(String urlString, String accountName) { - URL url; - try { - url = new URL(urlString); - } catch (MalformedURLException e) { - throw logger.logExceptionAsError(new RuntimeException(e)); - } - - this.canonicalName = String.format("/blob/%s%s", accountName, url.getPath()); + * @param blobName The name of the blob. Use {@code null} or an empty string to create a container SAS. + * @return The updated BlobServiceSASSignatureValues object. + */ + public BlobServiceSasSignatureValues setBlobName(String blobName) { + this.blobName = blobName; return this; } @@ -453,20 +441,44 @@ public BlobServiceSasSignatureValues setContentType(String contentType) { * Uses an account's shared key credential to sign these signature values to produce the proper SAS query * parameters. * + *

    Notes on SAS generation

    + *

    + *

      + *
    • If {@link #setVersion(String) version} is not set, the {@link BlobServiceVersion#getLatest() latest service + * version} is used.
    • + *
    • If {@link #setIdentifier(String) identifier} is set, {@link #setExpiryTime(OffsetDateTime) expiryTime} and + * permissions should not be set. These values are inherited from the stored access policy.
    • + *
    • Otherwise, {@link #setExpiryTime(OffsetDateTime) expiryTime} and {@link #getPermissions() permissions} must + * be set.
    • + *
    + * + *

    + * The type of SAS query parameters returned depends on the following: + *

      + *
    1. If {@link #getBlobName()} is not set, container SAS query parameters are returned.
    2. + *
    3. If {@link #getBlobName()} and {@link #getSnapshotId()} are set, blob snapshot SAS query parameters + * are returned.
    4. + *
    5. If only {@link #getBlobName()} is set, blob SAS query parameters are returned.
    6. + *
    + * + * See class level JavaDocs for code snippets. + * * @param storageSharedKeyCredentials A {@link StorageSharedKeyCredential} object used to sign the SAS values. * @return {@link BlobServiceSasQueryParameters} * @throws IllegalStateException If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64 * encoded string, or the UTF-8 charset isn't supported. - * @throws NullPointerException if {@code storageSharedKeyCredentials} is null. Or if any of {@code version}, - * {@code canonicalName}, {@code resource} or {@code identifier} are null. + * @throws IllegalArgumentException if {@link #getPermissions()} contains an invalid character for the SAS resource. + * @throws NullPointerException if {@code storageSharedKeyCredentials} is null. */ - public BlobServiceSasQueryParameters generateSasQueryParameters(StorageSharedKeyCredential - storageSharedKeyCredentials) { + public BlobServiceSasQueryParameters generateSasQueryParameters( + StorageSharedKeyCredential storageSharedKeyCredentials) { Utility.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); - assertGenerateOK(false); + + ensureState(); // Signature is generated on the un-url-encoded values. - String signature = storageSharedKeyCredentials.computeHmac256(stringToSign()); + final String canonicalName = getCanonicalName(storageSharedKeyCredentials.getAccountName()); + final String signature = storageSharedKeyCredentials.computeHmac256(stringToSign(canonicalName)); return new BlobServiceSasQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, this.sasIpRange, this.identifier, this.resource, this.permissions, signature, this.cacheControl, @@ -476,19 +488,48 @@ public BlobServiceSasQueryParameters generateSasQueryParameters(StorageSharedKey /** * Uses a user delegation key to sign these signature values to produce the proper SAS query parameters. * + *

    Notes on SAS generation

    + *

    + *

      + *
    • If {@link #setVersion(String) version} is not set, the {@link BlobServiceVersion#getLatest() latest service + * version} is used.
    • + *
    • If {@link #setIdentifier(String) identifier} is set, {@link #setExpiryTime(OffsetDateTime) expiryTime} and + * permissions should not be set. These values are inherited from the stored access policy.
    • + *
    • Otherwise, {@link #setExpiryTime(OffsetDateTime) expiryTime} and {@link #getPermissions() permissions} must + * be set.
    • + *
    + * + *

    + * The type of SAS query parameters returned depends on the following: + *

      + *
    1. If {@link #getBlobName()} is not set, container SAS query parameters are returned.
    2. + *
    3. If {@link #getBlobName()} and {@link #getSnapshotId()} are set, blob snapshot SAS query parameters + * are returned.
    4. + *
    5. If only {@link #getBlobName()} is set, blob SAS query parameters are returned.
    6. + *
    + * + * See class level JavaDocs for code snippets. + * * @param delegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @param accountName Azure Storage account name to generate SAS for. * @return {@link BlobServiceSasQueryParameters} * @throws IllegalStateException If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64 * encoded string, or the UTF-8 charset isn't supported. - * @throws NullPointerException if {@code delegationKey} is null. Or if any of {@code version}, - * {@code canonicalName}, {@code resource}, {@code expiryTime} or {@code permissions} are null. + * @throws IllegalArgumentException if {@link #getPermissions()} contains an invalid character for the SAS resource. + * @throws NullPointerException if {@code delegationKey} or {@code account} is null. + * @see + * Create a user delegation SAS */ - public BlobServiceSasQueryParameters generateSasQueryParameters(UserDelegationKey delegationKey) { + public BlobServiceSasQueryParameters generateSasQueryParameters(UserDelegationKey delegationKey, + String accountName) { Utility.assertNotNull("delegationKey", delegationKey); - assertGenerateOK(true); + Utility.assertNotNull("accountName", accountName); + + ensureState(); // Signature is generated on the un-url-encoded values. - String signature = Utility.computeHMac256(delegationKey.getValue(), stringToSign(delegationKey)); + final String canonicalName = getCanonicalName(accountName); + String signature = Utility.computeHMac256(delegationKey.getValue(), stringToSign(delegationKey, canonicalName)); return new BlobServiceSasQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, this.sasIpRange, null /* identifier */, this.resource, this.permissions, signature, this.cacheControl, @@ -496,39 +537,71 @@ public BlobServiceSasQueryParameters generateSasQueryParameters(UserDelegationKe } /** - * Common assertions for generateSASQueryParameters overloads. + * Ensures that the builder's properties are in a consistent state. + + * 1. If there is no version, use latest. + * 2. Resource name is chosen by: + * a. If "BlobName" is _not_ set, it is a container resource. + * b. Otherwise, if "SnapshotId" is set, it is a blob snapshot resource. + * c. Otherwise, it is a blob resource. + * 3. Reparse permissions depending on what the resource is. If it is an unrecognised resource, do nothing. + * + * Taken from: + * https://github.com/Azure/azure-storage-blob-go/blob/master/azblob/sas_service.go#L33 + * https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasBuilder.cs */ - private void assertGenerateOK(boolean usingUserDelegation) { - Utility.assertNotNull("version", this.version); - Utility.assertNotNull("canonicalName", this.canonicalName); - Utility.assertNotNull("resource", this.resource); + private void ensureState() { + if (version == null) { + version = BlobServiceVersion.getLatest().getVersion(); + } - // If a UserDelegation key or a SignedIdentifier is not being used both expiryDate and permissions must be set. - if (usingUserDelegation || identifier == null) { - Utility.assertNotNull("expiryTime", this.expiryTime); - Utility.assertNotNull("permissions", this.permissions); + if (ImplUtils.isNullOrEmpty(blobName)) { + resource = SAS_CONTAINER_CONSTANT; + } else if (snapshotId != null) { + resource = SAS_BLOB_SNAPSHOT_CONSTANT; } else { - // Otherwise a SignedIdentifier must be used. - Utility.assertNotNull("identifier", this.identifier); + resource = SAS_BLOB_CONSTANT; } - if (BlobServiceSasSignatureValues.SAS_CONTAINER_CONSTANT.equals(this.resource) && this.snapshotId != null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Cannot set a snapshotId without resource being a blob.")); + if (permissions != null) { + switch (resource) { + case SAS_BLOB_CONSTANT: + case SAS_BLOB_SNAPSHOT_CONSTANT: + permissions = BlobSasPermission.parse(permissions).toString(); + break; + case SAS_CONTAINER_CONSTANT: + permissions = BlobContainerSasPermission.parse(permissions).toString(); + break; + default: + // We won't reparse the permissions if we don't know the type. + logger.info("Not re-parsing permissions. Resource type '{}' is unknown.", resource); + break; + } } } - private String stringToSign() { + /** + * Computes the canonical name for a container or blob resource for SAS signing. + */ + private String getCanonicalName(String account) { + // Container: "/blob/account/containername" + // Blob: "/blob/account/containername/blobname" + return ImplUtils.isNullOrEmpty(blobName) + ? String.format("/blob/%s/%s", account, containerName) + : String.format("/blob/%s/%s/%s", account, containerName, blobName.replace("\\", "/")); + } + + private String stringToSign(String canonicalName) { return String.join("\n", - this.permissions == null ? "" : this.permissions, + this.permissions == null ? "" : permissions, this.startTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), this.expiryTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), - this.canonicalName == null ? "" : this.canonicalName, + canonicalName, this.identifier == null ? "" : this.identifier, this.sasIpRange == null ? "" : this.sasIpRange.toString(), - this.protocol == null ? "" : protocol.toString(), - this.version == null ? "" : this.version, - this.resource == null ? "" : this.resource, + this.protocol == null ? "" : this.protocol.toString(), + version, + resource, this.snapshotId == null ? "" : this.snapshotId, this.cacheControl == null ? "" : this.cacheControl, this.contentDisposition == null ? "" : this.contentDisposition, @@ -538,12 +611,12 @@ private String stringToSign() { ); } - private String stringToSign(final UserDelegationKey key) { + private String stringToSign(final UserDelegationKey key, String canonicalName) { return String.join("\n", this.permissions == null ? "" : this.permissions, this.startTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), this.expiryTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), - this.canonicalName == null ? "" : this.canonicalName, + canonicalName, key.getSignedOid() == null ? "" : key.getSignedOid(), key.getSignedTid() == null ? "" : key.getSignedTid(), key.getSignedStart() == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedStart()), @@ -552,8 +625,8 @@ private String stringToSign(final UserDelegationKey key) { key.getSignedVersion() == null ? "" : key.getSignedVersion(), this.sasIpRange == null ? "" : this.sasIpRange.toString(), this.protocol == null ? "" : this.protocol.toString(), - this.version == null ? "" : this.version, - this.resource == null ? "" : this.resource, + version, + resource, this.snapshotId == null ? "" : this.snapshotId, this.cacheControl == null ? "" : this.cacheControl, this.contentDisposition == null ? "" : this.contentDisposition, diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValuesJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValuesJavaDocCodeSnippets.java new file mode 100644 index 000000000000..3dc81e3511f7 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValuesJavaDocCodeSnippets.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.specialized; + +import com.azure.storage.blob.BlobSasPermission; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.sas.SasProtocol; + +import java.time.OffsetDateTime; + +/** + * Code snippets for {@link BlobServiceSasSignatureValues}. + */ +public class BlobServiceSasSignatureValuesJavaDocCodeSnippets { + /** + * Generates a blob SAS with {@link StorageSharedKeyCredential} + */ + public void blobSas() { + // BEGIN: com.azure.storage.blob.specialized.BlobServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential + BlobSasPermission blobPermission = new BlobSasPermission().setReadPermission(true); + + // We are creating a SAS to a blob because we set both the container name and blob name. + BlobServiceSasSignatureValues builder = new BlobServiceSasSignatureValues() + .setProtocol(SasProtocol.HTTPS_ONLY) // Users MUST use HTTPS (not HTTP). + .setExpiryTime(OffsetDateTime.now().plusDays(2)) + .setContainerName("my-container") + .setBlobName("HelloWorld.txt") + .setPermissions(blobPermission); + + StorageSharedKeyCredential credential = new StorageSharedKeyCredential("account-name", "key"); + BlobServiceSasQueryParameters sasQueryParameters = builder.generateSasQueryParameters(credential); + // END: com.azure.storage.blob.specialized.BlobServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential + } + + /** + * Generates a container SAS using {@link UserDelegationKey}. + */ + public void userDelegationKey() { + // BEGIN: com.azure.storage.blob.specialized.BlobServiceSasSignatureValues.generateSasQueryParameters#UserDelegationKey-String + BlobSasPermission blobPermission = new BlobSasPermission() + .setReadPermission(true) + .setWritePermission(true); + + // We are creating a SAS to a container because only container name is set. + BlobServiceSasSignatureValues builder = new BlobServiceSasSignatureValues() + .setProtocol(SasProtocol.HTTPS_ONLY) // Users MUST use HTTPS (not HTTP). + .setExpiryTime(OffsetDateTime.now().plusDays(2)) + .setContainerName("my-container") + .setPermissions(blobPermission); + + // Get a user delegation key after signing in with Azure AD + UserDelegationKey credential = new UserDelegationKey(); + String account = "my-blob-storage-account"; + BlobServiceSasQueryParameters sasQueryParameters = builder.generateSasQueryParameters(credential, account); + // END: com.azure.storage.blob.specialized.BlobServiceSasSignatureValues.generateSasQueryParameters#UserDelegationKey-String + } +} diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy index efb5abc3054d..81fca117d2ed 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy @@ -10,6 +10,7 @@ import com.azure.storage.blob.models.BlobAccessConditions import com.azure.storage.blob.models.BlobErrorCode import com.azure.storage.blob.models.BlobHttpHeaders import com.azure.storage.blob.models.BlobRange +import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.blob.models.BlobType import com.azure.storage.blob.models.CopyStatusType import com.azure.storage.blob.models.DeleteSnapshotsOptionType @@ -20,7 +21,6 @@ import com.azure.storage.blob.models.ModifiedAccessConditions import com.azure.storage.blob.models.PublicAccessType import com.azure.storage.blob.models.RehydratePriority import com.azure.storage.blob.models.ReliableDownloadOptions -import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.blob.models.SyncCopyStatusType import com.azure.storage.blob.specialized.BlobClientBase import com.azure.storage.blob.specialized.BlobServiceSasSignatureValues @@ -1451,7 +1451,8 @@ class BlobAPITest extends APISpec { @Unroll def "Copy with tier"() { setup: - def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() + def blobName = generateBlobName() + def bc = cc.getBlobClient(blobName).getBlockBlobClient() bc.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, tier1, null, null, null) def bcCopy = cc.getBlobClient(generateBlobName()).getBlockBlobClient() @@ -1459,7 +1460,8 @@ class BlobAPITest extends APISpec { def sas = new BlobServiceSasSignatureValues() .setExpiryTime(OffsetDateTime.now().plusHours(1)) .setPermissions(new BlobSasPermission().setReadPermission(true)) - .setCanonicalName(bc.getBlobUrl().toString(), primaryCredential.getAccountName()) + .setContainerName(cc.getBlobContainerName()) + .setBlobName(blobName) .generateSasQueryParameters(primaryCredential) .encode() bcCopy.copyFromURLWithResponse(bc.getBlobUrl().toString() + "?" + sas, null, tier2, null, null, null, null) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy index d7d0bcb97826..84213c074cc1 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy @@ -92,14 +92,16 @@ class CPKTest extends APISpec { def "Put block from URL with CPK"() { setup: - def sourceBlob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() + def blobName = generateBlobName() + def sourceBlob = cc.getBlobClient(blobName).getBlockBlobClient() sourceBlob.upload(defaultInputStream.get(), defaultDataSize) when: def sas = new BlobServiceSasSignatureValues() .setExpiryTime(OffsetDateTime.now().plusHours(1)) .setPermissions(new BlobSasPermission().setReadPermission(true)) - .setCanonicalName(sourceBlob.getBlobUrl().toString(), primaryCredential.getAccountName()) + .setContainerName(cc.getBlobContainerName()) + .setBlobName(blobName) .generateSasQueryParameters(primaryCredential) .encode() @@ -143,7 +145,8 @@ class CPKTest extends APISpec { def "Put page from URL wih CPK"() { setup: - def sourceBlob = cc.getBlobClient(generateBlobName()).getPageBlobClient() + def blobName = generateBlobName() + def sourceBlob = cc.getBlobClient(blobName).getPageBlobClient() sourceBlob.create(PageBlobClient.PAGE_BYTES) sourceBlob.uploadPagesWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES)), null, null, null) @@ -154,7 +157,8 @@ class CPKTest extends APISpec { def sas = new BlobServiceSasSignatureValues() .setExpiryTime(OffsetDateTime.now().plusHours(1)) .setPermissions(new BlobSasPermission().setReadPermission(true)) - .setCanonicalName(sourceBlob.getBlobUrl().toString(), primaryCredential.getAccountName()) + .setContainerName(cc.getBlobContainerName()) + .setBlobName(blobName) .generateSasQueryParameters(primaryCredential) .encode() @@ -198,14 +202,16 @@ class CPKTest extends APISpec { def "Append block from URL with CPK"() { setup: cpkAppendBlob.create() - def sourceBlob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() + def blobName = generateBlobName() + def sourceBlob = cc.getBlobClient(blobName).getBlockBlobClient() sourceBlob.upload(defaultInputStream.get(), defaultDataSize) when: def sas = new BlobServiceSasSignatureValues() .setExpiryTime(OffsetDateTime.now().plusHours(1)) .setPermissions(new BlobSasPermission().setReadPermission(true)) - .setCanonicalName(sourceBlob.getBlobUrl().toString(), primaryCredential.getAccountName()) + .setContainerName(cc.getBlobContainerName()) + .setBlobName(blobName) .generateSasQueryParameters(primaryCredential) .encode() def response = cpkAppendBlob.appendBlockFromUrlWithResponse(sourceBlob.getBlobUrl().toString() + "?" + sas, diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy index 1e072d4ce41f..4a7689a21aa2 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy @@ -131,7 +131,8 @@ class SASTest extends APISpec { .setContentEncoding(contentEncoding) .setContentLanguage(contentLanguage) .setContentType(contentType) - .setCanonicalName(bu.getBlobUrl(), primaryCredential.getAccountName()) + .setBlobName(bu.getBlobName()) + .setContainerName(bu.getContainerName()) .setSnapshotId(bu.getSnapshotId()) .generateSasQueryParameters(primaryCredential) .encode() @@ -192,7 +193,8 @@ class SASTest extends APISpec { .setContentEncoding(contentEncoding) .setContentLanguage(contentLanguage) .setContentType(contentType) - .setCanonicalName(snapshotBlob.getBlobUrl(), primaryCredential.getAccountName()) + .setBlobName(snapshotBlob.getBlobName()) + .setContainerName(snapshotBlob.getContainerName()) .setSnapshotId(snapshotBlob.getSnapshotId()) .generateSasQueryParameters(primaryCredential) .encode() @@ -234,8 +236,7 @@ class SASTest extends APISpec { when: def sasWithId = new BlobServiceSasSignatureValues() .setIdentifier(identifier.getId()) - .setCanonicalName(cc.getBlobContainerUrl(), primaryCredential.getAccountName()) - .setResource(BlobServiceSasSignatureValues.SAS_CONTAINER_CONSTANT) + .setContainerName(cc.getBlobContainerName()) .generateSasQueryParameters(primaryCredential) .encode() @@ -246,7 +247,7 @@ class SASTest extends APISpec { def sasWithPermissions = new BlobServiceSasSignatureValues() .setPermissions(permissions) .setExpiryTime(expiryTime) - .setCanonicalName(cc.getBlobContainerUrl().toString(), primaryCredential.getAccountName()) + .setContainerName(cc.getBlobContainerName()) .generateSasQueryParameters(primaryCredential) .encode() def client2 = getContainerClient(sasWithPermissions, cc.getBlobContainerUrl()) @@ -302,10 +303,11 @@ class SASTest extends APISpec { .setContentEncoding(contentEncoding) .setContentLanguage(contentLanguage) .setContentType(contentType) - .setCanonicalName(bu.getBlobUrl().toString(), primaryCredential.getAccountName()) + .setContainerName(bu.getContainerName()) + .setBlobName(bu.getBlobName()) .setSnapshotId(bu.getSnapshotId()) .setVersion(key.getSignedVersion()) - .generateSasQueryParameters(key) + .generateSasQueryParameters(key, primaryCredential.getAccountName()) .encode() then: @@ -367,7 +369,8 @@ class SASTest extends APISpec { .setContentEncoding(contentEncoding) .setContentLanguage(contentLanguage) .setContentType(contentType) - .setCanonicalName(snapshotBlob.getBlobUrl(), primaryCredential.getAccountName()) + .setContainerName(snapshotBlob.getContainerName()) + .setBlobName(snapshotBlob.getBlobName()) .setSnapshotId(snapshotBlob.getSnapshotId()) .generateSasQueryParameters(primaryCredential) .encode() @@ -446,10 +449,11 @@ class SASTest extends APISpec { .setContentEncoding(contentEncoding) .setContentLanguage(contentLanguage) .setContentType(contentType) - .setCanonicalName(snapshotBlob.getBlobUrl().toString(), primaryCredential.getAccountName()) + .setContainerName(snapshotBlob.getContainerName()) + .setBlobName(snapshotBlob.getBlobName()) .setSnapshotId(snapshotBlob.getSnapshotId()) .setVersion(key.getSignedVersion()) - .generateSasQueryParameters(key) + .generateSasQueryParameters(key, primaryCredential.getAccountName()) .encode() // base blob with snapshot SAS @@ -499,8 +503,8 @@ class SASTest extends APISpec { def sasWithPermissions = new BlobServiceSasSignatureValues() .setPermissions(permissions) .setExpiryTime(expiryTime) - .setCanonicalName(cc.getBlobContainerUrl().toString(), primaryCredential.getAccountName()) - .generateSasQueryParameters(key) + .setContainerName(cc.getBlobContainerName()) + .generateSasQueryParameters(key, primaryCredential.getAccountName()) .encode() def client = getContainerClient(sasWithPermissions, cc.getBlobContainerUrl()) @@ -621,6 +625,8 @@ class SASTest extends APISpec { when: def v = new BlobServiceSasSignatureValues() def p = new BlobSasPermission() + def expected = String.format(expectedStringToSign, primaryCredential.getAccountName()) + p.setReadPermission(true) v.setPermissions(p) @@ -628,7 +634,8 @@ class SASTest extends APISpec { def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) v.setExpiryTime(e) - v.setCanonicalName("containerName/blobName") + v.setContainerName("containerName") + .setBlobName("blobName") .setSnapshotId(snapId) if (ipRange != null) { def ipR = new SasIpRange() @@ -642,11 +649,10 @@ class SASTest extends APISpec { .setContentEncoding(encoding) .setContentLanguage(language) .setContentType(type) - v.setResource("bs") def token = v.generateSasQueryParameters(primaryCredential) then: - token.getSignature() == primaryCredential.computeHmac256(expectedStringToSign) + token.getSignature() == primaryCredential.computeHmac256(expected) /* We don't test the blob or containerName properties because canonicalized resource is always added as at least @@ -656,22 +662,23 @@ class SASTest extends APISpec { */ where: startTime | identifier | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign - OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | null | null | null || "r\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | "id" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\nid\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | new SasIpRange() | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" - null | null | null | null | null | "control" | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\ncontrol\n\n\n\n" - null | null | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\ndisposition\n\n\n" - null | null | null | null | null | null | null | "encoding" | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\nencoding\n\n" - null | null | null | null | null | null | null | null | "language" | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\nlanguage\n" - null | null | null | null | null | null | null | null | null | "type" || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\ntype" + OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | null | null | null || "r\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | "id" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\nid\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | new SasIpRange() | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" + null | null | null | null | null | "control" | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\ncontrol\n\n\n\n" + null | null | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\ndisposition\n\n\n" + null | null | null | null | null | null | null | "encoding" | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\nencoding\n\n" + null | null | null | null | null | null | null | null | "language" | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\nlanguage\n" + null | null | null | null | null | null | null | null | null | "type" || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\ntype" } @Unroll def "serviceSasSignatures string to sign user delegation key"() { when: def v = new BlobServiceSasSignatureValues() + def expected = String.format(expectedStringToSign, primaryCredential.getAccountName()) def p = new BlobSasPermission() p.setReadPermission(true) @@ -681,7 +688,8 @@ class SASTest extends APISpec { def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) v.setExpiryTime(e) - v.setCanonicalName("containerName/blobName") + v.setContainerName("containerName") + .setBlobName("blobName") .setSnapshotId(snapId) if (ipRange != null) { def ipR = new SasIpRange() @@ -694,7 +702,6 @@ class SASTest extends APISpec { .setContentEncoding(encoding) .setContentLanguage(language) .setContentType(type) - v.setResource("bs") def key = new UserDelegationKey() .setSignedOid(keyOid) .setSignedTid(keyTid) @@ -703,51 +710,44 @@ class SASTest extends APISpec { .setSignedService(keyService) .setSignedVersion(keyVersion) .setValue(keyValue) - def token = v.generateSasQueryParameters(key) + def token = v.generateSasQueryParameters(key, primaryCredential.getAccountName()) then: - token.getSignature() == Utility.computeHMac256(key.getValue(), expectedStringToSign) + token.getSignature() == Utility.computeHMac256(key.getValue(), expected) /* We test string to sign functionality directly related to user delegation sas specific parameters */ where: startTime | keyOid | keyTid | keyStart | keyExpiry | keyService | keyVersion | keyValue | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign - OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | "11111111-1111-1111-1111-111111111111" | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n11111111-1111-1111-1111-111111111111\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | "22222222-2222-2222-2222-222222222222" | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n22222222-2222-2222-2222-222222222222\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | null | null | null | "b" | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\nb\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | null | null | null | null | "2018-06-17" | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n2018-06-17\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | new SasIpRange() | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | "control" | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\ncontrol\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\ndisposition\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | "encoding" | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\nencoding\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | "language" | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\nlanguage\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | "type" || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\ntype" + OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | "11111111-1111-1111-1111-111111111111" | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n11111111-1111-1111-1111-111111111111\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | "22222222-2222-2222-2222-222222222222" | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n22222222-2222-2222-2222-222222222222\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | "b" | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\nb\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | "2018-06-17" | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n2018-06-17\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | new SasIpRange() | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | "control" | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\ncontrol\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\ndisposition\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | "encoding" | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\nencoding\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | "language" | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\nlanguage\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | "type" || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\ntype" } - @Unroll def "serviceSasSignatureValues IA"() { setup: def v = new BlobServiceSasSignatureValues() .setSnapshotId("2018-01-01T00:00:00.0000000Z") - .setVersion(version) when: - v.generateSasQueryParameters((StorageSharedKeyCredential) creds) + v.generateSasQueryParameters(null) then: def e = thrown(NullPointerException) - e.getMessage().contains(parameter) - - where: - version | creds || parameter - null | primaryCredential || "version" - "v" | null || "storageSharedKeyCredential" + e.getMessage().contains("storageSharedKeyCredential") } @Unroll @@ -910,35 +910,22 @@ class SASTest extends APISpec { def "ServiceSASSignatureValues assertGenerateOk"() { when: def serviceSASSignatureValues = new BlobServiceSasSignatureValues() - .setVersion(version) - .setCanonicalName(canonicalName) - .setExpiryTime(expiryTime) - .setIdentifier(identifier) - .setResource(resource) + .setVersion(BlobServiceVersion.getLatest().getVersion()) + .setContainerName("containerName") + .setBlobName("blobName") .setSnapshotId(snapshotId) + .setPermissions(BlobContainerSasPermission.parse("rl")) - if (permissions != null) { - serviceSASSignatureValues.setPermissions(permissions) - } - - if (usingUserDelegation) { - serviceSASSignatureValues.generateSasQueryParameters(new UserDelegationKey()) - } else { - serviceSASSignatureValues.generateSasQueryParameters(new StorageSharedKeyCredential("", "")) - } + serviceSASSignatureValues.generateSasQueryParameters(new StorageSharedKeyCredential("n", "key")) then: - thrown(NullPointerException) + thrown(IllegalArgumentException) where: - usingUserDelegation | version | canonicalName | expiryTime | permissions | identifier | resource | snapshotId - false | null | null | null | null | null | null | null - false | Constants.HeaderConstants.TARGET_STORAGE_VERSION | null | null | null | null | null | null - false | Constants.HeaderConstants.TARGET_STORAGE_VERSION | "containerName/blobName" | null | null | null | null | null - false | Constants.HeaderConstants.TARGET_STORAGE_VERSION | "containerName/blobName" | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null - false | Constants.HeaderConstants.TARGET_STORAGE_VERSION | "containerName/blobName" | null | new BlobSasPermission().setReadPermission(true) | null | null | null - false | null | null | null | null | "0000" | "c" | "id" + snapshotId | _ + null | _ + "id" | _ } /* @@ -1126,9 +1113,9 @@ class SASTest extends APISpec { .setSnapshot("snapshot") def sasValues = new BlobServiceSasSignatureValues() .setPermissions(new BlobSasPermission().setReadPermission(true)) - .setCanonicalName("/containerName/blobName") + .setContainerName("containerName") + .setBlobName("blobName") .setExpiryTime(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) - .setResource("bs") parts.setSasQueryParameters(sasValues.generateSasQueryParameters(primaryCredential)) when: diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy index dd90e49560bf..149ae1255eb4 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy @@ -7,6 +7,7 @@ import com.azure.storage.blob.APISpec import com.azure.storage.blob.BlobContainerAsyncClient import com.azure.storage.blob.BlobContainerSasPermission import com.azure.storage.blob.BlobSasPermission +import com.azure.storage.blob.BlobServiceVersion import com.azure.storage.blob.BlobUrlParts import com.azure.storage.blob.models.BlobRange import com.azure.storage.blob.models.UserDelegationKey @@ -94,14 +95,9 @@ class HelperTest extends APISpec { v.setPermissions(new BlobSasPermission()) } - if (snapId != null) { - v.setResource(BlobServiceSasSignatureValues.SAS_BLOB_SNAPSHOT_CONSTANT) - } else { - v.setResource(BlobServiceSasSignatureValues.SAS_BLOB_CONSTANT) - } - v.setStartTime(startTime) - .setCanonicalName(String.format("/blob/%s/containerName/blobName", primaryCredential.getAccountName())) + .setContainerName("containerName") + .setBlobName("blobName") .setSnapshotId(snapId) if (expiryTime == null) { @@ -171,7 +167,8 @@ class HelperTest extends APISpec { } v.setStartTime(startTime) - .setCanonicalName(String.format("/blob/%s/containerName/blobName", primaryCredential.getAccountName())) + .setContainerName("containerName") + .setBlobName("blobName") .setSnapshotId(snapId) if (expiryTime == null) { @@ -180,12 +177,6 @@ class HelperTest extends APISpec { v.setExpiryTime(expiryTime) } - if (snapId != null) { - v.setResource(BlobServiceSasSignatureValues.SAS_BLOB_SNAPSHOT_CONSTANT) - } else { - v.setResource(BlobServiceSasSignatureValues.SAS_BLOB_CONSTANT) - } - if (ipRange != null) { v.setSasIpRange(new SasIpRange().setIpMin("ip")) } @@ -206,7 +197,7 @@ class HelperTest extends APISpec { .setSignedVersion(keyVersion) .setValue(keyValue) - BlobServiceSasQueryParameters token = v.generateSasQueryParameters(key) + BlobServiceSasQueryParameters token = v.generateSasQueryParameters(key, primaryCredential.getAccountName()) expectedStringToSign = String.format(expectedStringToSign, Utility.ISO_8601_UTC_DATE_FORMATTER.format(v.getExpiryTime()), primaryCredential.getAccountName()) @@ -243,12 +234,11 @@ class HelperTest extends APISpec { BlobServiceSasSignatureValues v = new BlobServiceSasSignatureValues() .setExpiryTime(expiryTime) .setPermissions(new BlobSasPermission()) - .setResource(expectedResource) - .setCanonicalName(String.format("/blob/%s/%s", primaryCredential.getAccountName(), containerName)) + .setContainerName(containerName) .setSnapshotId(snapId) if (blobName != null) { - v.setCanonicalName(v.getCanonicalName() + "/" + blobName) + v.setBlobName(blobName) } expectedStringToSign = String.format(expectedStringToSign, @@ -264,36 +254,25 @@ class HelperTest extends APISpec { where: containerName | blobName | snapId | expiryTime || expectedResource | expectedStringToSign - "c" | "b" | "id" | OffsetDateTime.now() || "bs" | "\n\n%s\n" + "/blob/%s/c/b\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nid\n\n\n\n\n" - "c" | "b" | null | OffsetDateTime.now() || "b" | "\n\n%s\n" + "/blob/%s/c/b\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - "c" | null | null | OffsetDateTime.now() || "c" | "\n\n%s\n" + "/blob/%s/c\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nc\n\n\n\n\n\n" - + "c" | "b" | "id" | OffsetDateTime.now() || "bs" | "\n\n%s\n" + "/blob/%s/c/b\n\n\n\n" + BlobServiceVersion.getLatest().getVersion() + "\nbs\nid\n\n\n\n\n" + "c" | "b" | null | OffsetDateTime.now() || "b" | "\n\n%s\n" + "/blob/%s/c/b\n\n\n\n" + BlobServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" + "c" | null | null | OffsetDateTime.now() || "c" | "\n\n%s\n" + "/blob/%s/c\n\n\n\n" + BlobServiceVersion.getLatest().getVersion() + "\nc\n\n\n\n\n\n" } - @Unroll def "serviceSasSignatureValues IA"() { setup: def v = new BlobServiceSasSignatureValues() .setPermissions(new BlobSasPermission()) .setExpiryTime(OffsetDateTime.now()) - .setResource(containerName) - .setCanonicalName(blobName) + .setBlobName("b") .setSnapshotId("2018-01-01T00:00:00.0000000Z") - .setVersion(version) when: - v.generateSasQueryParameters((StorageSharedKeyCredential)creds) - + v.generateSasQueryParameters(null) then: def e = thrown(NullPointerException) - e.getMessage().contains(parameter) - - where: - containerName | version | creds | blobName || parameter - "c" | null | primaryCredential | "b" | "version" - "c" | "v" | null | "b" | "storageSharedKeyCredentials" - "c" | "v" | primaryCredential | null | "canonicalName" + e.getMessage().contains("storageSharedKeyCredentials") } @Unroll @@ -633,13 +612,13 @@ class HelperTest extends APISpec { .setHost("host") .setContainerName("container") .setBlobName("blob") - .setSnapshot "snapshot" + .setSnapshot("snapshot") BlobServiceSasSignatureValues sasValues = new BlobServiceSasSignatureValues() .setExpiryTime(OffsetDateTime.now(ZoneOffset.UTC).plusDays(1)) .setPermissions(new BlobSasPermission().setReadPermission(true)) - .setCanonicalName(String.format("/blob/%s/container/blob", primaryCredential.getAccountName())) - .setResource(BlobServiceSasSignatureValues.SAS_BLOB_SNAPSHOT_CONSTANT) + .setBlobName("blob") + .setContainerName("container") parts.setSasQueryParameters(sasValues.generateSasQueryParameters(primaryCredential)) diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia.json similarity index 100% rename from sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia[0].json rename to sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia.json diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia[1].json deleted file mode 100644 index 59c0d469c7e8..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesia0532735466e2920f0f4?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b1075f45-9068-4153-8b8d-13742e07c3a5" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AEAF16E216", - "Last-Modified" : "Tue, 15 Oct 2019 20:31:39 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "10940a07-301e-00db-1197-8394a0000000", - "Date" : "Tue, 15 Oct 2019 20:31:39 GMT", - "x-ms-client-request-id" : "b1075f45-9068-4153-8b8d-13742e07c3a5" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcservicesassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "15a650ae-81cf-4cce-a0ad-4a56c9881b1d" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "d3504d2a-901e-00ff-5497-830dee000000", - "Body" : "jtcservicesassignaturevaluesiajtcservicesassignaturevaluesia0532735466e2920f0f4Tue, 15 Oct 2019 20:31:39 GMT\"0x8D751AEAF16E216\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:31:39 GMT", - "x-ms-client-request-id" : "15a650ae-81cf-4cce-a0ad-4a56c9881b1d", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesia0532735466e2920f0f4?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1a7efb18-423e-48a5-afc0-1e08f6a8ef7f" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "2e7652ee-601e-00c3-1197-83b935000000", - "Date" : "Tue, 15 Oct 2019 20:31:39 GMT", - "x-ms-client-request-id" : "1a7efb18-423e-48a5-afc0-1e08f6a8ef7f" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesia0532735466e2920f0f4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia[2].json deleted file mode 100644 index bd79b25ff08a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesia092103acc03ceb84524?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6b6c674d-4539-4828-a1bb-58c3874f4e29" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AEAF2B5F17", - "Last-Modified" : "Tue, 15 Oct 2019 20:31:40 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "cc6eb9d9-e01e-0133-5497-832f0e000000", - "Date" : "Tue, 15 Oct 2019 20:31:40 GMT", - "x-ms-client-request-id" : "6b6c674d-4539-4828-a1bb-58c3874f4e29" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcservicesassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f9152c3d-bfa0-4c67-88c0-e61090c778f0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "df921c29-a01e-00b8-2c97-83d285000000", - "Body" : "jtcservicesassignaturevaluesiajtcservicesassignaturevaluesia092103acc03ceb84524Tue, 15 Oct 2019 20:31:40 GMT\"0x8D751AEAF2B5F17\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:31:39 GMT", - "x-ms-client-request-id" : "f9152c3d-bfa0-4c67-88c0-e61090c778f0", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesia092103acc03ceb84524?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ad999e78-af93-4844-828a-7cf7ddf3d547" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a602075f-501e-0025-2397-83a8c5000000", - "Date" : "Tue, 15 Oct 2019 20:31:40 GMT", - "x-ms-client-request-id" : "ad999e78-af93-4844-828a-7cf7ddf3d547" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesia092103acc03ceb84524" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[2].json deleted file mode 100644 index b30afd3bc306..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesassertgenerateok029648c64ef6?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e000188d-ced8-4e21-97a0-67a7f834d43f" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AE2652B1B8", - "Last-Modified" : "Tue, 15 Oct 2019 20:27:50 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "8074b5d5-501e-002e-6997-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:27:49 GMT", - "x-ms-client-request-id" : "e000188d-ced8-4e21-97a0-67a7f834d43f" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcservicesassignaturevaluesassertgenerateok&comp=list", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "85a9e049-b26d-4549-8d19-b685658619d2" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "69fa58a1-c01e-012f-2497-83f719000000", - "Body" : "jtcservicesassignaturevaluesassertgenerateokjtcservicesassignaturevaluesassertgenerateok029648c64ef6Tue, 15 Oct 2019 20:27:50 GMT\"0x8D751AE2652B1B8\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:27:50 GMT", - "x-ms-client-request-id" : "85a9e049-b26d-4549-8d19-b685658619d2", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesassertgenerateok029648c64ef6?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "883fe00d-3861-4f8e-bf39-5b14698a4d0b" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "8074b5e4-501e-002e-7597-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:27:49 GMT", - "x-ms-client-request-id" : "883fe00d-3861-4f8e-bf39-5b14698a4d0b" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesassertgenerateok029648c64ef6" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[3].json deleted file mode 100644 index 4b984059c185..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[3].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesassertgenerateok0252563a0275?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "59ab6e35-dd62-4f5e-bf48-2683bd189d56" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AE26643A1B", - "Last-Modified" : "Tue, 15 Oct 2019 20:27:50 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "69fa58df-c01e-012f-6197-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:27:50 GMT", - "x-ms-client-request-id" : "59ab6e35-dd62-4f5e-bf48-2683bd189d56" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcservicesassignaturevaluesassertgenerateok&comp=list", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d0e8e151-92d1-4123-90d7-15d729f6ca26" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "8074b5fe-501e-002e-0c97-83b0b1000000", - "Body" : "jtcservicesassignaturevaluesassertgenerateokjtcservicesassignaturevaluesassertgenerateok0252563a0275Tue, 15 Oct 2019 20:27:50 GMT\"0x8D751AE26643A1B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:27:50 GMT", - "x-ms-client-request-id" : "d0e8e151-92d1-4123-90d7-15d729f6ca26", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesassertgenerateok0252563a0275?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "06a88aec-e415-4728-ae6a-5d763f0f4335" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "69fa593b-c01e-012f-3a97-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:27:50 GMT", - "x-ms-client-request-id" : "06a88aec-e415-4728-ae6a-5d763f0f4335" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesassertgenerateok0252563a0275" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[4].json deleted file mode 100644 index df4939315309..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[4].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesassertgenerateok07962680f727?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f38a0f43-873d-4b26-bfb7-7b620bff24e7" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AE267AB605", - "Last-Modified" : "Tue, 15 Oct 2019 20:27:50 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "8074b616-501e-002e-2497-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:27:50 GMT", - "x-ms-client-request-id" : "f38a0f43-873d-4b26-bfb7-7b620bff24e7" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcservicesassignaturevaluesassertgenerateok&comp=list", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1eb77393-ebdf-4885-9f9c-8f3a664ab7ba" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "69fa59a2-c01e-012f-1a97-83f719000000", - "Body" : "jtcservicesassignaturevaluesassertgenerateokjtcservicesassignaturevaluesassertgenerateok07962680f727Tue, 15 Oct 2019 20:27:50 GMT\"0x8D751AE267AB605\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:27:50 GMT", - "x-ms-client-request-id" : "1eb77393-ebdf-4885-9f9c-8f3a664ab7ba", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesassertgenerateok07962680f727?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5105e27a-a72d-4412-a03c-74ab9502fba0" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "8074b629-501e-002e-3497-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:27:50 GMT", - "x-ms-client-request-id" : "5105e27a-a72d-4412-a03c-74ab9502fba0" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesassertgenerateok07962680f727" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[5].json deleted file mode 100644 index a181e5633127..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[5].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesassertgenerateok053508633bf1?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c7952c8b-d79e-4fa3-a34e-ed177d0bcc96" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AE268B53DB", - "Last-Modified" : "Tue, 15 Oct 2019 20:27:50 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "69fa59e4-c01e-012f-5897-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:27:50 GMT", - "x-ms-client-request-id" : "c7952c8b-d79e-4fa3-a34e-ed177d0bcc96" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcservicesassignaturevaluesassertgenerateok&comp=list", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "21d69906-b347-45c8-af35-da8ac2f106c4" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "8074b64e-501e-002e-5197-83b0b1000000", - "Body" : "jtcservicesassignaturevaluesassertgenerateokjtcservicesassignaturevaluesassertgenerateok053508633bf1Tue, 15 Oct 2019 20:27:50 GMT\"0x8D751AE268B53DB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:27:50 GMT", - "x-ms-client-request-id" : "21d69906-b347-45c8-af35-da8ac2f106c4", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesassertgenerateok053508633bf1?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "62b81b20-c74e-48cb-8a8b-b05dc01a22bf" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "69fa5a71-c01e-012f-4997-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:27:50 GMT", - "x-ms-client-request-id" : "62b81b20-c74e-48cb-8a8b-b05dc01a22bf" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesassertgenerateok053508633bf1" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesia[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesia.json similarity index 100% rename from sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesia[0].json rename to sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesia.json diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesia[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesia[1].json deleted file mode 100644 index 0ca19376de59..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesia[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesia0841886f4515cfc9274?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b5585b04-3664-4650-9bf2-b4f4cf81668d" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AE2363F6A0", - "Last-Modified" : "Tue, 15 Oct 2019 20:27:45 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "69fa44ad-c01e-012f-1697-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:27:45 GMT", - "x-ms-client-request-id" : "b5585b04-3664-4650-9bf2-b4f4cf81668d" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcservicesassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3c5af822-5243-4883-abb6-263acf511821" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "8074afb8-501e-002e-2797-83b0b1000000", - "Body" : "jtcservicesassignaturevaluesiajtcservicesassignaturevaluesia0841886f4515cfc9274Tue, 15 Oct 2019 20:27:45 GMT\"0x8D751AE2363F6A0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:27:45 GMT", - "x-ms-client-request-id" : "3c5af822-5243-4883-abb6-263acf511821", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcservicesassignaturevaluesia0841886f4515cfc9274?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7bc54c31-de9b-4a50-8e4e-e519babe3c85" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "69fa44ee-c01e-012f-5397-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:27:45 GMT", - "x-ms-client-request-id" : "7bc54c31-de9b-4a50-8e4e-e519babe3c85" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesia0841886f4515cfc9274" ] -} \ No newline at end of file From 2d0bb04618015374aaf62155bd16e8911a28558f Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Fri, 18 Oct 2019 18:24:39 -0700 Subject: [PATCH 18/64] Fix javadoc package groups (#5949) --- pom.client.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.client.xml b/pom.client.xml index 50abd1ab8eb5..f17348254b22 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -348,13 +348,14 @@ *.impl*: *.implementation*: com.azure.tools.checkstyle*: - com.azure.core.test + com.azure.core.test: + com.azure.core.test.* Azure Core - com.azure.core:com.azure.core.annotation:com.azure.core.credentials:com.azure.core.exception:com.azure.core.http*:com.azure.core.configuration:com.azure.core.util* + com.azure.core:com.azure.core.annotation:com.azure.core.credentials:com.azure.core.exception:com.azure.core.http*:com.azure.core.configuration:com.azure.core.util*:com.azure.core.credential:com.azure.core.cryptography From c9eab89b1c8efdcdcf47d575acb4d337672dbb8f Mon Sep 17 00:00:00 2001 From: Anu Thomas Chandy Date: Fri, 18 Oct 2019 18:28:47 -0700 Subject: [PATCH 19/64] Renaming Queue StorageServiceProperties::logging to StorageServiceProperties::analyticsLogging, removing word 'file' from FileHttpHeaders proeprties (#5868) * Renaming Queue StorageServiceProperties::logging to StorageServiceProperties::analyticsLogging, removing word 'file' from FileHttpHeaders proeprties. * adding property name transformation for QueueServiceProperties::Logging --- .../file/implementation/FilesImpl.java | 24 ++-- .../storage/file/models/FileHttpHeaders.java | 108 +++++++++--------- .../DirectoryAsyncJavaDocCodeSamples.java | 10 +- .../file/DirectoryJavaDocCodeSamples.java | 10 +- .../file/FileAsyncJavaDocCodeSamples.java | 30 ++--- .../storage/file/FileJavaDocCodeSamples.java | 30 ++--- .../file/ShareAsyncJavaDocCodeSamples.java | 10 +- .../storage/file/ShareJavaDocCodeSamples.java | 10 +- .../storage/file/DirectoryAPITests.groovy | 12 +- .../file/DirectoryAsyncAPITests.groovy | 12 +- .../azure/storage/file/FileAPITests.groovy | 4 +- .../storage/file/FileAsyncAPITests.groovy | 4 +- .../azure/storage/file/ShareAPITests.groovy | 10 +- .../storage/file/ShareAsyncAPITests.groovy | 12 +- .../azure-storage-file/swagger/README.md | 8 +- .../queue/models/QueueServiceProperties.java | 10 +- .../storage/queue/QueueServiceAPITests.groovy | 2 +- .../queue/QueueServiceAsyncAPITests.groovy | 2 +- .../storage/queue/QueueTestHelper.groovy | 2 +- .../azure-storage-queue/swagger/README.md | 1 + 20 files changed, 159 insertions(+), 152 deletions(-) diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java index e1007aca74ba..dd2bd6916e84 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java @@ -193,27 +193,27 @@ public Mono createWithRestResponseAsync(String shareName, S final String fileTypeConstant = "file"; String fileContentType = null; if (fileHttpHeaders != null) { - fileContentType = fileHttpHeaders.getFileContentType(); + fileContentType = fileHttpHeaders.getContentType(); } String fileContentEncoding = null; if (fileHttpHeaders != null) { - fileContentEncoding = fileHttpHeaders.getFileContentEncoding(); + fileContentEncoding = fileHttpHeaders.getContentEncoding(); } String fileContentLanguage = null; if (fileHttpHeaders != null) { - fileContentLanguage = fileHttpHeaders.getFileContentLanguage(); + fileContentLanguage = fileHttpHeaders.getContentLanguage(); } String fileCacheControl = null; if (fileHttpHeaders != null) { - fileCacheControl = fileHttpHeaders.getFileCacheControl(); + fileCacheControl = fileHttpHeaders.getCacheControl(); } byte[] fileContentMD5 = null; if (fileHttpHeaders != null) { - fileContentMD5 = fileHttpHeaders.getFileContentMD5(); + fileContentMD5 = fileHttpHeaders.getContentMD5(); } String fileContentDisposition = null; if (fileHttpHeaders != null) { - fileContentDisposition = fileHttpHeaders.getFileContentDisposition(); + fileContentDisposition = fileHttpHeaders.getContentDisposition(); } String fileContentMD5Converted = Base64Util.encodeToString(fileContentMD5); return service.create(shareName, filePath, this.client.getUrl(), timeout, this.client.getVersion(), fileContentLength, fileTypeConstant, metadata, filePermission, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, fileContentType, fileContentEncoding, fileContentLanguage, fileCacheControl, fileContentMD5Converted, fileContentDisposition, context); @@ -365,27 +365,27 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str final String comp = "properties"; String fileContentType = null; if (fileHttpHeaders != null) { - fileContentType = fileHttpHeaders.getFileContentType(); + fileContentType = fileHttpHeaders.getContentType(); } String fileContentEncoding = null; if (fileHttpHeaders != null) { - fileContentEncoding = fileHttpHeaders.getFileContentEncoding(); + fileContentEncoding = fileHttpHeaders.getContentEncoding(); } String fileContentLanguage = null; if (fileHttpHeaders != null) { - fileContentLanguage = fileHttpHeaders.getFileContentLanguage(); + fileContentLanguage = fileHttpHeaders.getContentLanguage(); } String fileCacheControl = null; if (fileHttpHeaders != null) { - fileCacheControl = fileHttpHeaders.getFileCacheControl(); + fileCacheControl = fileHttpHeaders.getCacheControl(); } byte[] fileContentMD5 = null; if (fileHttpHeaders != null) { - fileContentMD5 = fileHttpHeaders.getFileContentMD5(); + fileContentMD5 = fileHttpHeaders.getContentMD5(); } String fileContentDisposition = null; if (fileHttpHeaders != null) { - fileContentDisposition = fileHttpHeaders.getFileContentDisposition(); + fileContentDisposition = fileHttpHeaders.getContentDisposition(); } String fileContentMD5Converted = Base64Util.encodeToString(fileContentMD5); return service.setHTTPHeaders(shareName, filePath, this.client.getUrl(), timeout, this.client.getVersion(), fileContentLength, filePermission, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, comp, fileContentType, fileContentEncoding, fileContentLanguage, fileCacheControl, fileContentMD5Converted, fileContentDisposition, context); diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileHttpHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileHttpHeaders.java index 54e9b2741d32..2de7bd29da27 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileHttpHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileHttpHeaders.java @@ -21,166 +21,166 @@ public final class FileHttpHeaders { * 'application/octet-stream'. */ @JsonProperty(value = "fileContentType") - private String fileContentType; + private String contentType; /* * Specifies which content encodings have been applied to the file. */ @JsonProperty(value = "fileContentEncoding") - private String fileContentEncoding; + private String contentEncoding; /* * Specifies the natural languages used by this resource. */ @JsonProperty(value = "fileContentLanguage") - private String fileContentLanguage; + private String contentLanguage; /* * Sets the file's cache control. The File service stores this value but * does not use or modify it. */ @JsonProperty(value = "fileCacheControl") - private String fileCacheControl; + private String cacheControl; /* * Sets the file's MD5 hash. */ @JsonProperty(value = "fileContentMD5") - private byte[] fileContentMD5; + private byte[] contentMD5; /* * Sets the file's Content-Disposition header. */ @JsonProperty(value = "fileContentDisposition") - private String fileContentDisposition; + private String contentDisposition; /** - * Get the fileContentType property: Sets the MIME content type of the + * Get the contentType property: Sets the MIME content type of the * file. The default type is 'application/octet-stream'. * - * @return the fileContentType value. + * @return the contentType value. */ - public String getFileContentType() { - return this.fileContentType; + public String getContentType() { + return this.contentType; } /** - * Set the fileContentType property: Sets the MIME content type of the + * Set the contentType property: Sets the MIME content type of the * file. The default type is 'application/octet-stream'. * - * @param fileContentType the fileContentType value to set. + * @param contentType the contentType value to set. * @return the FileHttpHeaders object itself. */ - public FileHttpHeaders setFileContentType(String fileContentType) { - this.fileContentType = fileContentType; + public FileHttpHeaders setContentType(String contentType) { + this.contentType = contentType; return this; } /** - * Get the fileContentEncoding property: Specifies which content encodings + * Get the contentEncoding property: Specifies which content encodings * have been applied to the file. * - * @return the fileContentEncoding value. + * @return the contentEncoding value. */ - public String getFileContentEncoding() { - return this.fileContentEncoding; + public String getContentEncoding() { + return this.contentEncoding; } /** - * Set the fileContentEncoding property: Specifies which content encodings + * Set the contentEncoding property: Specifies which content encodings * have been applied to the file. * - * @param fileContentEncoding the fileContentEncoding value to set. + * @param contentEncoding the contentEncoding value to set. * @return the FileHttpHeaders object itself. */ - public FileHttpHeaders setFileContentEncoding(String fileContentEncoding) { - this.fileContentEncoding = fileContentEncoding; + public FileHttpHeaders setContentEncoding(String contentEncoding) { + this.contentEncoding = contentEncoding; return this; } /** - * Get the fileContentLanguage property: Specifies the natural languages + * Get the contentLanguage property: Specifies the natural languages * used by this resource. * - * @return the fileContentLanguage value. + * @return the contentLanguage value. */ - public String getFileContentLanguage() { - return this.fileContentLanguage; + public String getContentLanguage() { + return this.contentLanguage; } /** - * Set the fileContentLanguage property: Specifies the natural languages + * Set the contentLanguage property: Specifies the natural languages * used by this resource. * - * @param fileContentLanguage the fileContentLanguage value to set. + * @param contentLanguage the contentLanguage value to set. * @return the FileHttpHeaders object itself. */ - public FileHttpHeaders setFileContentLanguage(String fileContentLanguage) { - this.fileContentLanguage = fileContentLanguage; + public FileHttpHeaders setContentLanguage(String contentLanguage) { + this.contentLanguage = contentLanguage; return this; } /** - * Get the fileCacheControl property: Sets the file's cache control. The + * Get the cacheControl property: Sets the file's cache control. The * File service stores this value but does not use or modify it. * - * @return the fileCacheControl value. + * @return the cacheControl value. */ - public String getFileCacheControl() { - return this.fileCacheControl; + public String getCacheControl() { + return this.cacheControl; } /** - * Set the fileCacheControl property: Sets the file's cache control. The + * Set the cacheControl property: Sets the file's cache control. The * File service stores this value but does not use or modify it. * - * @param fileCacheControl the fileCacheControl value to set. + * @param cacheControl the cacheControl value to set. * @return the FileHttpHeaders object itself. */ - public FileHttpHeaders setFileCacheControl(String fileCacheControl) { - this.fileCacheControl = fileCacheControl; + public FileHttpHeaders setCacheControl(String cacheControl) { + this.cacheControl = cacheControl; return this; } /** - * Get the fileContentMD5 property: Sets the file's MD5 hash. + * Get the contentMD5 property: Sets the file's MD5 hash. * - * @return the fileContentMD5 value. + * @return the contentMD5 value. */ - public byte[] getFileContentMD5() { - return ImplUtils.clone(this.fileContentMD5); + public byte[] getContentMD5() { + return ImplUtils.clone(this.contentMD5); } /** - * Set the fileContentMD5 property: Sets the file's MD5 hash. + * Set the contentMD5 property: Sets the file's MD5 hash. * - * @param fileContentMD5 the fileContentMD5 value to set. + * @param contentMD5 the contentMD5 value to set. * @return the FileHttpHeaders object itself. */ - public FileHttpHeaders setFileContentMD5(byte[] fileContentMD5) { - this.fileContentMD5 = ImplUtils.clone(fileContentMD5); + public FileHttpHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = ImplUtils.clone(contentMD5); return this; } /** - * Get the fileContentDisposition property: Sets the file's + * Get the contentDisposition property: Sets the file's * Content-Disposition header. * - * @return the fileContentDisposition value. + * @return the contentDisposition value. */ - public String getFileContentDisposition() { - return this.fileContentDisposition; + public String getContentDisposition() { + return this.contentDisposition; } /** - * Set the fileContentDisposition property: Sets the file's + * Set the contentDisposition property: Sets the file's * Content-Disposition header. * - * @param fileContentDisposition the fileContentDisposition value to set. + * @param contentDisposition the contentDisposition value to set. * @return the FileHttpHeaders object itself. */ - public FileHttpHeaders setFileContentDisposition(String fileContentDisposition) { - this.fileContentDisposition = fileContentDisposition; + public FileHttpHeaders setContentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; return this; } } diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryAsyncJavaDocCodeSamples.java index 29f1d2ef0c00..8b852fc53b2d 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryAsyncJavaDocCodeSamples.java @@ -158,11 +158,11 @@ public void createFileWithResponse() { DirectoryAsyncClient directoryAsyncClient = createAsyncClientWithSASToken(); // BEGIN: com.azure.storage.file.directoryAsyncClient.createFileWithResponse#string-long-filehttpheaders-filesmbproperties-string-map FileHttpHeaders httpHeaders = new FileHttpHeaders() - .setFileContentType("text/html") - .setFileContentEncoding("gzip") - .setFileContentLanguage("en") - .setFileCacheControl("no-transform") - .setFileContentDisposition("attachment"); + .setContentType("text/html") + .setContentEncoding("gzip") + .setContentLanguage("en") + .setCacheControl("no-transform") + .setContentDisposition("attachment"); FileSmbProperties smbProperties = new FileSmbProperties() .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY)) .setFileCreationTime(OffsetDateTime.now()) diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryJavaDocCodeSamples.java index 306e33ccddf9..893323f95cdf 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryJavaDocCodeSamples.java @@ -165,11 +165,11 @@ public void createFileMaxOverload() { DirectoryClient directoryClient = createClientWithSASToken(); // BEGIN: com.azure.storage.file.directoryClient.createFile#string-long-filehttpheaders-filesmbproperties-string-map-duration-context FileHttpHeaders httpHeaders = new FileHttpHeaders() - .setFileContentType("text/html") - .setFileContentEncoding("gzip") - .setFileContentLanguage("en") - .setFileCacheControl("no-transform") - .setFileContentDisposition("attachment"); + .setContentType("text/html") + .setContentEncoding("gzip") + .setContentLanguage("en") + .setCacheControl("no-transform") + .setContentDisposition("attachment"); FileSmbProperties smbProperties = new FileSmbProperties() .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY)) .setFileCreationTime(OffsetDateTime.now()) diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java index 27fa1b0f74ee..2173ce689be2 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java @@ -107,11 +107,11 @@ public void createWithResponse() { FileAsyncClient fileAsyncClient = createAsyncClientWithSASToken(); // BEGIN: com.azure.storage.file.fileAsyncClient.createWithResponse#long-filehttpheaders-filesmbproperties-string-map FileHttpHeaders httpHeaders = new FileHttpHeaders() - .setFileContentType("text/html") - .setFileContentEncoding("gzip") - .setFileContentLanguage("en") - .setFileCacheControl("no-transform") - .setFileContentDisposition("attachment"); + .setContentType("text/html") + .setContentEncoding("gzip") + .setContentLanguage("en") + .setCacheControl("no-transform") + .setContentDisposition("attachment"); FileSmbProperties smbProperties = new FileSmbProperties() .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY)) .setFileCreationTime(OffsetDateTime.now()) @@ -453,11 +453,11 @@ public void setFilePropertiesAsync() { FileAsyncClient fileAsyncClient = createAsyncClientWithSASToken(); // BEGIN: com.azure.storage.file.fileAsyncClient.setProperties#long-filehttpheaders-filesmbproperties-string FileHttpHeaders httpHeaders = new FileHttpHeaders() - .setFileContentType("text/html") - .setFileContentEncoding("gzip") - .setFileContentLanguage("en") - .setFileCacheControl("no-transform") - .setFileContentDisposition("attachment"); + .setContentType("text/html") + .setContentEncoding("gzip") + .setContentLanguage("en") + .setCacheControl("no-transform") + .setContentDisposition("attachment"); FileSmbProperties smbProperties = new FileSmbProperties() .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY)) .setFileCreationTime(OffsetDateTime.now()) @@ -477,11 +477,11 @@ public void setHttpHeadersWithResponse() { FileAsyncClient fileAsyncClient = createAsyncClientWithSASToken(); // BEGIN: com.azure.storage.file.fileAsyncClient.setPropertiesWithResponse#long-filehttpheaders-filesmbproperties-string FileHttpHeaders httpHeaders = new FileHttpHeaders() - .setFileContentType("text/html") - .setFileContentEncoding("gzip") - .setFileContentLanguage("en") - .setFileCacheControl("no-transform") - .setFileContentDisposition("attachment"); + .setContentType("text/html") + .setContentEncoding("gzip") + .setContentLanguage("en") + .setCacheControl("no-transform") + .setContentDisposition("attachment"); FileSmbProperties smbProperties = new FileSmbProperties() .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY)) .setFileCreationTime(OffsetDateTime.now()) diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java index 361e6529a06d..85b938a0937b 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java @@ -122,11 +122,11 @@ public void createWithResponse() { FileClient fileClient = createClientWithSASToken(); // BEGIN: com.azure.storage.file.fileClient.createWithResponse#long-filehttpheaders-filesmbproperties-string-map-duration-context FileHttpHeaders httpHeaders = new FileHttpHeaders() - .setFileContentType("text/html") - .setFileContentEncoding("gzip") - .setFileContentLanguage("en") - .setFileCacheControl("no-transform") - .setFileContentDisposition("attachment"); + .setContentType("text/html") + .setContentEncoding("gzip") + .setContentLanguage("en") + .setCacheControl("no-transform") + .setContentDisposition("attachment"); FileSmbProperties smbProperties = new FileSmbProperties() .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY)) .setFileCreationTime(OffsetDateTime.now()) @@ -457,11 +457,11 @@ public void setHTTPHeaders() { FileClient fileClient = createClientWithSASToken(); // BEGIN: com.azure.storage.file.fileClient.setProperties#long-filehttpheaders-filesmbproperties-string FileHttpHeaders httpHeaders = new FileHttpHeaders() - .setFileContentType("text/html") - .setFileContentEncoding("gzip") - .setFileContentLanguage("en") - .setFileCacheControl("no-transform") - .setFileContentDisposition("attachment"); + .setContentType("text/html") + .setContentEncoding("gzip") + .setContentLanguage("en") + .setCacheControl("no-transform") + .setContentDisposition("attachment"); FileSmbProperties smbProperties = new FileSmbProperties() .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY)) .setFileCreationTime(OffsetDateTime.now()) @@ -494,11 +494,11 @@ public void setHttpHeadersWithResponse() { FileClient fileClient = createClientWithSASToken(); // BEGIN: com.azure.storage.file.fileClient.setPropertiesWithResponse#long-filehttpheaders-filesmbproperties-string-duration-Context FileHttpHeaders httpHeaders = new FileHttpHeaders() - .setFileContentType("text/html") - .setFileContentEncoding("gzip") - .setFileContentLanguage("en") - .setFileCacheControl("no-transform") - .setFileContentDisposition("attachment"); + .setContentType("text/html") + .setContentEncoding("gzip") + .setContentLanguage("en") + .setCacheControl("no-transform") + .setContentDisposition("attachment"); FileSmbProperties smbProperties = new FileSmbProperties() .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY)) .setFileCreationTime(OffsetDateTime.now()) diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java index 1abea575ce9a..887149b6d387 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java @@ -220,11 +220,11 @@ public void createFileWithResponse() { ShareAsyncClient shareAsyncClient = createAsyncClientWithSASToken(); // BEGIN: com.azure.storage.file.shareAsyncClient.createFileWithResponse#string-long-filehttpheaders-filesmbproperties-string-map FileHttpHeaders httpHeaders = new FileHttpHeaders() - .setFileContentType("text/html") - .setFileContentEncoding("gzip") - .setFileContentLanguage("en") - .setFileCacheControl("no-transform") - .setFileContentDisposition("attachment"); + .setContentType("text/html") + .setContentEncoding("gzip") + .setContentLanguage("en") + .setCacheControl("no-transform") + .setContentDisposition("attachment"); FileSmbProperties smbProperties = new FileSmbProperties() .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY)) .setFileCreationTime(OffsetDateTime.now()) diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java index 0800957eb4a6..871baa9c8916 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java @@ -206,11 +206,11 @@ public void createFileWithResponse() { ShareClient shareClient = createClientWithSASToken(); // BEGIN: com.azure.storage.file.shareClient.createFileWithResponse#string-long-filehttpheaders-filesmbproperties-string-map-duration-context FileHttpHeaders httpHeaders = new FileHttpHeaders() - .setFileContentType("text/html") - .setFileContentEncoding("gzip") - .setFileContentLanguage("en") - .setFileCacheControl("no-transform") - .setFileContentDisposition("attachment"); + .setContentType("text/html") + .setContentEncoding("gzip") + .setContentLanguage("en") + .setCacheControl("no-transform") + .setContentDisposition("attachment"); FileSmbProperties smbProperties = new FileSmbProperties() .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY)) .setFileCreationTime(OffsetDateTime.now()) diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy index e977b5dbeced..fc09ddee2894 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy @@ -527,7 +527,7 @@ class DirectoryAPITests extends APISpec { given: primaryDirectoryClient.create() FileHttpHeaders httpHeaders = new FileHttpHeaders() - .setFileContentType("txt") + .setContentType("txt") smbProperties.setFileCreationTime(getUTCNow()) .setFileLastWriteTime(getUTCNow()) @@ -549,11 +549,11 @@ class DirectoryAPITests extends APISpec { FileTestHelper.assertExceptionStatusCodeAndMessage(e, 400, errMsg) where: - fileName | maxSize | httpHeaders | metadata | errMsg - "testfile:" | 1024 | null | testMetadata | FileErrorCode.INVALID_RESOURCE_NAME - "fileName" | -1 | null | testMetadata | FileErrorCode.OUT_OF_RANGE_INPUT - "fileName" | 1024 | new FileHttpHeaders().setFileContentMD5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE - "fileName" | 1024 | null | Collections.singletonMap("", "value") | FileErrorCode.EMPTY_METADATA_KEY + fileName | maxSize | httpHeaders | metadata | errMsg + "testfile:" | 1024 | null | testMetadata | FileErrorCode.INVALID_RESOURCE_NAME + "fileName" | -1 | null | testMetadata | FileErrorCode.OUT_OF_RANGE_INPUT + "fileName" | 1024 | new FileHttpHeaders().setContentMD5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE + "fileName" | 1024 | null | Collections.singletonMap("", "value") | FileErrorCode.EMPTY_METADATA_KEY } diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy index 149faedf9cfb..f2f629c48c75 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy @@ -508,7 +508,7 @@ class DirectoryAsyncAPITests extends APISpec { given: primaryDirectoryAsyncClient.create().block() FileHttpHeaders httpHeaders = new FileHttpHeaders() - .setFileContentType("txt") + .setContentType("txt") smbProperties.setFileCreationTime(getUTCNow()) .setFileLastWriteTime(getUTCNow()) @@ -534,11 +534,11 @@ class DirectoryAsyncAPITests extends APISpec { }) where: - fileName | maxSize | httpHeaders | metadata | errMsg - "testfile:" | 1024 | null | testMetadata | FileErrorCode.INVALID_RESOURCE_NAME - "fileName" | -1 | null | testMetadata | FileErrorCode.OUT_OF_RANGE_INPUT - "fileName" | 1024 | new FileHttpHeaders().setFileContentMD5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE - "fileName" | 1024 | null | Collections.singletonMap("", "value") | FileErrorCode.EMPTY_METADATA_KEY + fileName | maxSize | httpHeaders | metadata | errMsg + "testfile:" | 1024 | null | testMetadata | FileErrorCode.INVALID_RESOURCE_NAME + "fileName" | -1 | null | testMetadata | FileErrorCode.OUT_OF_RANGE_INPUT + "fileName" | 1024 | new FileHttpHeaders().setContentMD5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE + "fileName" | 1024 | null | Collections.singletonMap("", "value") | FileErrorCode.EMPTY_METADATA_KEY } diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy index ffb3539c6158..2ea17095fa93 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy @@ -46,8 +46,8 @@ class FileAPITests extends APISpec { shareClient.create() primaryFileClient = fileBuilderHelper(interceptorManager, shareName, filePath).buildFileClient() testMetadata = Collections.singletonMap("testmetadata", "value") - httpHeaders = new FileHttpHeaders().setFileContentLanguage("en") - .setFileContentType("application/octet-stream") + httpHeaders = new FileHttpHeaders().setContentLanguage("en") + .setContentType("application/octet-stream") smbProperties = new FileSmbProperties().setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.NORMAL)) } diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy index 0a7df09c480b..1b6e02e36662 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy @@ -44,8 +44,8 @@ class FileAsyncAPITests extends APISpec { shareClient.create() primaryFileAsyncClient = fileBuilderHelper(interceptorManager, shareName, filePath).buildFileAsyncClient() testMetadata = Collections.singletonMap("testmetadata", "value") - httpHeaders = new FileHttpHeaders().setFileContentLanguage("en") - .setFileContentType("application/octet-stream") + httpHeaders = new FileHttpHeaders().setContentLanguage("en") + .setContentType("application/octet-stream") smbProperties = new FileSmbProperties().setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.NORMAL)) } diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy index 3c5476119d4d..bc9f54db8ad0 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy @@ -377,11 +377,11 @@ class ShareAPITests extends APISpec { FileTestHelper.assertExceptionStatusCodeAndMessage(e, 400, errMsg) where: - fileName | maxSize | httpHeaders | metadata | errMsg - "testfile:" | 1024 | null | testMetadata | FileErrorCode.INVALID_RESOURCE_NAME - "fileName" | -1 | null | testMetadata | FileErrorCode.OUT_OF_RANGE_INPUT - "fileName" | 1024 | new FileHttpHeaders().setFileContentMD5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE - "fileName" | 1024 | null | Collections.singletonMap("", "value") | FileErrorCode.EMPTY_METADATA_KEY + fileName | maxSize | httpHeaders | metadata | errMsg + "testfile:" | 1024 | null | testMetadata | FileErrorCode.INVALID_RESOURCE_NAME + "fileName" | -1 | null | testMetadata | FileErrorCode.OUT_OF_RANGE_INPUT + "fileName" | 1024 | new FileHttpHeaders().setContentMD5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE + "fileName" | 1024 | null | Collections.singletonMap("", "value") | FileErrorCode.EMPTY_METADATA_KEY } def "Delete directory"() { diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy index ba4acf06d577..90e987c814d6 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy @@ -362,7 +362,7 @@ class ShareAsyncAPITests extends APISpec { def "Create file maxOverload"() { given: primaryShareAsyncClient.create().block() - FileHttpHeaders httpHeaders = new FileHttpHeaders().setFileContentType("txt") + FileHttpHeaders httpHeaders = new FileHttpHeaders().setContentType("txt") smbProperties.setFileCreationTime(getUTCNow()) .setFileLastWriteTime(getUTCNow()) expect: @@ -387,11 +387,11 @@ class ShareAsyncAPITests extends APISpec { } where: - fileName | maxSize | httpHeaders | metadata | errMsg - "testfile:" | 1024 | null | testMetadata | FileErrorCode.INVALID_RESOURCE_NAME - "fileName" | -1 | null | testMetadata | FileErrorCode.OUT_OF_RANGE_INPUT - "fileName" | 1024 | new FileHttpHeaders().setFileContentMD5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE - "fileName" | 1024 | null | Collections.singletonMap("", "value") | FileErrorCode.EMPTY_METADATA_KEY + fileName | maxSize | httpHeaders | metadata | errMsg + "testfile:" | 1024 | null | testMetadata | FileErrorCode.INVALID_RESOURCE_NAME + "fileName" | -1 | null | testMetadata | FileErrorCode.OUT_OF_RANGE_INPUT + "fileName" | 1024 | new FileHttpHeaders().setContentMD5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE + "fileName" | 1024 | null | Collections.singletonMap("", "value") | FileErrorCode.EMPTY_METADATA_KEY } diff --git a/sdk/storage/azure-storage-file/swagger/README.md b/sdk/storage/azure-storage-file/swagger/README.md index 19d9e54c4a15..a958a7151479 100644 --- a/sdk/storage/azure-storage-file/swagger/README.md +++ b/sdk/storage/azure-storage-file/swagger/README.md @@ -629,18 +629,24 @@ directive: replace('@JsonProperty(value = "Metrics")\n private FileMetrics minuteMetrics;', '@JsonProperty(value = "MinuteMetrics")\n private FileMetrics minuteMetrics;'); ``` -### Rename FileHTTPHeaders to FileHttpHeader +### Rename FileHTTPHeaders to FileHttpHeader and remove file prefix from properties ``` yaml directive: - from: swagger-document where: $.parameters transform: > $.FileCacheControl["x-ms-parameter-grouping"].name = "file-http-headers"; + $.FileCacheControl["x-ms-client-name"] = "cacheControl"; $.FileContentDisposition["x-ms-parameter-grouping"].name = "file-http-headers"; + $.FileContentDisposition["x-ms-client-name"] = "contentDisposition"; $.FileContentEncoding["x-ms-parameter-grouping"].name = "file-http-headers"; + $.FileContentEncoding["x-ms-client-name"] = "contentEncoding"; $.FileContentLanguage["x-ms-parameter-grouping"].name = "file-http-headers"; + $.FileContentLanguage["x-ms-client-name"] = "contentLanguage"; $.FileContentMD5["x-ms-parameter-grouping"].name = "file-http-headers"; + $.FileContentMD5["x-ms-client-name"] = "contentMD5"; $.FileContentType["x-ms-parameter-grouping"].name = "file-http-headers"; + $.FileContentType["x-ms-client-name"] = "contentType"; ``` ### Change StorageErrorException to StorageException diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceProperties.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceProperties.java index ba12a7f958b7..8a22ff5def48 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceProperties.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceProperties.java @@ -22,7 +22,7 @@ public final class QueueServiceProperties { * Azure Analytics Logging settings */ @JsonProperty(value = "Logging") - private QueueAnalyticsLogging logging; + private QueueAnalyticsLogging analyticsLogging; /* * A summary of request statistics grouped by API in hourly aggregates for @@ -59,8 +59,8 @@ private CorsWrapper(@JacksonXmlProperty(localName = "CorsRule") List()) diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncAPITests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncAPITests.groovy index ed62c5c0bd5f..eca05735db8e 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncAPITests.groovy @@ -176,7 +176,7 @@ class QueueServiceAsyncAPITests extends APISpec { .setIncludeAPIs(false) .setRetentionPolicy(retentionPolicy) .setVersion("1.0") - def updatedProperties = new QueueServiceProperties().setLogging(logging) + def updatedProperties = new QueueServiceProperties().setAnalyticsLogging(logging) .setHourMetrics(metrics) .setMinuteMetrics(metrics) .setCors(new ArrayList<>()) diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestHelper.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestHelper.groovy index 4a64c889367f..cb7f809060a5 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestHelper.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestHelper.groovy @@ -49,7 +49,7 @@ class QueueTestHelper { } else { return assertMetricsAreEqual(expected.getHourMetrics(), actual.getHourMetrics()) && assertMetricsAreEqual(expected.getMinuteMetrics(), actual.getMinuteMetrics()) && - assertLoggingAreEqual(expected.getLogging(), actual.getLogging()) && + assertLoggingAreEqual(expected.getAnalyticsLogging(), actual.getAnalyticsLogging()) && assertCorsAreEqual(expected.getCors(), actual.getCors()) } } diff --git a/sdk/storage/azure-storage-queue/swagger/README.md b/sdk/storage/azure-storage-queue/swagger/README.md index 6c101993e840..11f255ba78eb 100644 --- a/sdk/storage/azure-storage-queue/swagger/README.md +++ b/sdk/storage/azure-storage-queue/swagger/README.md @@ -211,6 +211,7 @@ directive: delete $.Logging; $.QueueAnalyticsLogging.xml = {"name": "Logging"}; $.QueueServiceProperties.properties.Logging["$ref"] = "#/definitions/QueueAnalyticsLogging"; + $.QueueServiceProperties.properties.Logging["x-ms-client-name"] = "analyticsLogging"; } if (!$.QueueMetrics) { $.QueueMetrics = $.Metrics; From 2511a1bac6fc1337d22222d3ab8c8092933483ec Mon Sep 17 00:00:00 2001 From: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Date: Fri, 18 Oct 2019 18:29:47 -0700 Subject: [PATCH 20/64] Fixed user delegate key sas tests (#5946) --- .../core/test/utils/TestResourceNamer.java | 15 ++ .../com/azure/storage/blob/APISpec.groovy | 4 + .../com/azure/storage/blob/SASTest.groovy | 22 ++- ...networktestblobsnapshotuserdelegation.json | 129 +++++++++--------- ...revaluesnetworktestblobuserdelegation.json | 99 +++++++------- ...uesnetworktestcontaineruserdelegation.json | 63 +++++---- 6 files changed, 189 insertions(+), 143 deletions(-) diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/utils/TestResourceNamer.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/utils/TestResourceNamer.java index 7257ddf4cffd..481d6be0607b 100644 --- a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/utils/TestResourceNamer.java +++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/utils/TestResourceNamer.java @@ -81,4 +81,19 @@ public OffsetDateTime now() { return now; } } + + /** + * Record the value into recordedData, and pop it up when playback. + * + * @param value the value needs to record. + * @return the recorded value. + */ + public String recordValueFromConfig(String value) { + if (testMode == TestMode.PLAYBACK) { + return recordedData.removeVariable(); + } else { + recordedData.addVariable(value); + return value; + } + } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index a5f01c9326d1..902137d015e4 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -442,6 +442,10 @@ class APISpec extends Specification { return resourceNamer.randomName(prefix + testName + entityNo, 63) } + String getConfigValue(String value) { + return resourceNamer.recordValueFromConfig(value) + } + String getRandomUUID() { return resourceNamer.randomUuid() } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy index 4a7689a21aa2..6343231f7a7e 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy @@ -3,7 +3,6 @@ package com.azure.storage.blob - import com.azure.storage.blob.models.BlobAccessPolicy import com.azure.storage.blob.models.BlobRange import com.azure.storage.blob.models.BlobSignedIdentifier @@ -21,7 +20,6 @@ import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.common.implementation.Constants import com.azure.storage.common.Utility import com.azure.storage.common.sas.SasIpRange -import spock.lang.Ignore import spock.lang.Unroll import java.time.LocalDateTime @@ -258,9 +256,6 @@ class SASTest extends APISpec { notThrown(BlobStorageException) } - /* TODO: Fix user delegation tests to run in CI */ - - @Ignore def "serviceSASSignatureValues network test blob user delegation"() { setup: def data = "test".getBytes() @@ -291,6 +286,11 @@ class SASTest extends APISpec { def key = getOAuthServiceClient().getUserDelegationKey(null, expiryTime) + def keyOid = getConfigValue(key.getSignedOid()) + key.setSignedOid(keyOid) + + def keyTid = getConfigValue(key.getSignedTid()) + key.setSignedTid(keyTid) when: def sas = new BlobServiceSasSignatureValues() .setPermissions(permissions) @@ -404,7 +404,6 @@ class SASTest extends APISpec { } - @Ignore def "serviceSASSignatureValues network test blob snapshot user delegation"() { setup: def data = "test".getBytes() @@ -437,6 +436,11 @@ class SASTest extends APISpec { def key = getOAuthServiceClient().getUserDelegationKey(startTime, expiryTime) + def keyOid = getConfigValue(key.getSignedOid()) + key.setSignedOid(keyOid) + + def keyTid = getConfigValue(key.getSignedTid()) + key.setSignedTid(keyTid) when: def sas = new BlobServiceSasSignatureValues() .setPermissions(permissions) @@ -484,7 +488,6 @@ class SASTest extends APISpec { properties.getContentLanguage() == "language" } - @Ignore def "serviceSASSignatureValues network test container user delegation"() { setup: def permissions = new BlobContainerSasPermission() @@ -499,6 +502,11 @@ class SASTest extends APISpec { def key = getOAuthServiceClient().getUserDelegationKey(null, expiryTime) + def keyOid = getConfigValue(key.getSignedOid()) + key.setSignedOid(keyOid) + + def keyTid = getConfigValue(key.getSignedTid()) + key.setSignedTid(keyTid) when: def sasWithPermissions = new BlobServiceSasSignatureValues() .setPermissions(permissions) diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobsnapshotuserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobsnapshotuserdelegation.json index d96e0c2380df..8db9c9e6937e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobsnapshotuserdelegation.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobsnapshotuserdelegation.json @@ -1,68 +1,71 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus008324aa?restype=container", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus031072d9?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "da5814c3-7b30-46f1-8982-2eddcbeef53c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D72C0D55339ED6\"", - "Last-Modified" : "Wed, 28 Aug 2019 23:13:27 GMT", + "ETag" : "0x8D754295A0C950B", + "Last-Modified" : "Sat, 19 Oct 2019 00:14:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "70a674e5-001e-0039-3af6-5d6927000000", - "Date" : "Wed, 28 Aug 2019 23:13:26 GMT", - "x-ms-client-request-id" : "2a3456f7-af35-418a-b194-8f921822ec26" + "x-ms-request-id" : "834d7824-f01e-003d-2112-86e420000000", + "Date" : "Sat, 19 Oct 2019 00:14:47 GMT", + "x-ms-client-request-id" : "da5814c3-7b30-46f1-8982-2eddcbeef53c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus008324aa/78618ca78ff2473b9ab788a20f87870a968e47a82cfa4ba19ef8187d2878cff4", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus031072d9/35c4336a64864644893ae5a1842c68d9dc33435be73240be9c4b92cf1395c9eb", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c58b4a4a-3772-4ce8-a617-4c0b7b2eddad", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "Q7G6/s6+u/k=", - "Last-Modified" : "Wed, 28 Aug 2019 23:13:27 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:14:47 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 28 Aug 2019 23:13:26 GMT", + "Date" : "Sat, 19 Oct 2019 00:14:47 GMT", "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "ETag" : "\"0x8D72C0D5542F04F\"", + "ETag" : "0x8D754295A1A3FC1", "Content-Length" : "0", - "x-ms-request-id" : "70a674e8-001e-0039-3cf6-5d6927000000", - "x-ms-client-request-id" : "5d8509a9-cb71-427c-b75a-31d86e3c2e69" + "x-ms-request-id" : "834d7826-f01e-003d-2212-86e420000000", + "x-ms-client-request-id" : "c58b4a4a-3772-4ce8-a617-4c0b7b2eddad" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus008324aa/78618ca78ff2473b9ab788a20f87870a968e47a82cfa4ba19ef8187d2878cff4?comp=snapshot", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus031072d9/35c4336a64864644893ae5a1842c68d9dc33435be73240be9c4b92cf1395c9eb?comp=snapshot", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f72ff319-02f5-4a82-a77d-ac2aeac77cd7" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-snapshot" : "2019-08-28T23:13:27.3771774Z", + "x-ms-snapshot" : "2019-10-19T00:14:47.9166493Z", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D72C0D5542F04F\"", - "Last-Modified" : "Wed, 28 Aug 2019 23:13:27 GMT", + "ETag" : "0x8D754295A1A3FC1", + "Last-Modified" : "Sat, 19 Oct 2019 00:14:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "70a674ea-001e-0039-3ef6-5d6927000000", + "x-ms-request-id" : "834d7827-f01e-003d-2312-86e420000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 28 Aug 2019 23:13:26 GMT", - "x-ms-client-request-id" : "0283c5f7-d694-4796-991e-d71a15fb41e1" + "Date" : "Sat, 19 Oct 2019 00:14:47 GMT", + "x-ms-client-request-id" : "f72ff319-02f5-4a82-a77d-ac2aeac77cd7" }, "Exception" : null }, { @@ -70,7 +73,8 @@ "Uri" : "https://gapradev.blob.core.windows.net?restype=service&comp=userdelegationkey", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "deaa956e-c3a8-48a7-8964-57465886bc37", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { @@ -79,19 +83,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "70a674f2-001e-0039-46f6-5d6927000000", - "Body" : "c3304b04-1047-4362-a718-c41b697ab96834a50b52-83c7-4aea-b81c-f6ef34b620f92019-08-27T23:13:27Z2019-08-29T23:13:27Zb2019-02-02UkVEQUNURUQ=", - "Date" : "Wed, 28 Aug 2019 23:13:27 GMT", - "x-ms-client-request-id" : "6bed151e-940d-4778-aab7-16163f80169c", + "x-ms-request-id" : "834d782c-f01e-003d-2812-86e420000000", + "Body" : "b32b5d89-9500-4f9e-b15c-ded1273f4cb25d6a190d-43d4-4117-8f0a-8476a366777d2019-10-18T00:14:47Z2019-10-20T00:14:47Zb2019-02-02UkVEQUNURUQ=", + "Date" : "Sat, 19 Oct 2019 00:14:48 GMT", + "x-ms-client-request-id" : "deaa956e-c3a8-48a7-8964-57465886bc37", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus008324aa/78618ca78ff2473b9ab788a20f87870a968e47a82cfa4ba19ef8187d2878cff4?sv=2019-02-02&spr=https%2Chttp&st=2019-08-27T23%3A13%3A27Z&se=2019-08-29T23%3A13%3A27Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-08-27T23%3A13%3A27Z&ske=2019-08-29T23%3A13%3A27Z&sks=b&skv=2019-02-02&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus031072d9/35c4336a64864644893ae5a1842c68d9dc33435be73240be9c4b92cf1395c9eb?sv=2019-02-02&spr=https%2Chttp&st=2019-10-18T00%3A14%3A47Z&se=2019-10-20T00%3A14%3A47Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-10-18T00%3A14%3A47Z&ske=2019-10-20T00%3A14%3A47Z&sks=b&skv=2019-02-02&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "6ad74149-3e51-4c80-a20c-ec2acbb39ce3" }, "Response" : { "Server" : "Microsoft-HTTPAPI/2.0", @@ -99,72 +104,72 @@ "retry-after" : "0", "Content-Length" : "447", "StatusCode" : "403", - "x-ms-request-id" : "70a674f4-001e-0039-48f6-5d6927000000", - "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:70a674f4-001e-0039-48f6-5d6927000000\nTime:2019-08-28T23:13:27.8527976ZThe specified signed resource is not allowed for the this resource level", - "Date" : "Wed, 28 Aug 2019 23:13:27 GMT", + "x-ms-request-id" : "834d782f-f01e-003d-2b12-86e420000000", + "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:834d782f-f01e-003d-2b12-86e420000000\nTime:2019-10-19T00:14:48.3350826ZThe specified signed resource is not allowed for the this resource level", + "Date" : "Sat, 19 Oct 2019 00:14:48 GMT", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus008324aa/78618ca78ff2473b9ab788a20f87870a968e47a82cfa4ba19ef8187d2878cff4?snapshot=2019-08-28T23%3a13%3a27.3771774Z&sv=2019-02-02&spr=https%2Chttp&st=2019-08-27T23%3A13%3A27Z&se=2019-08-29T23%3A13%3A27Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-08-27T23%3A13%3A27Z&ske=2019-08-29T23%3A13%3A27Z&sks=b&skv=2019-02-02&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus031072d9/35c4336a64864644893ae5a1842c68d9dc33435be73240be9c4b92cf1395c9eb?snapshot=2019-10-19T00%3a14%3a47.9166493Z&sv=2019-02-02&spr=https%2Chttp&st=2019-10-18T00%3A14%3A47Z&se=2019-10-20T00%3A14%3A47Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-10-18T00%3A14%3A47Z&ske=2019-10-20T00%3A14%3A47Z&sks=b&skv=2019-02-02&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "4273e4fa-4180-499d-a2d2-27a2c54d84ba" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 28 Aug 2019 23:13:27 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:14:47 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 28 Aug 2019 23:13:27 GMT", + "Date" : "Sat, 19 Oct 2019 00:14:48 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "x-ms-snapshot" : "2019-08-28T23:13:27.3771774Z", "Cache-Control" : "cache", - "ETag" : "\"0x8D72C0D5542F04F\"", + "ETag" : "0x8D754295A1A3FC1", "Content-Disposition" : "disposition", - "x-ms-creation-time" : "Wed, 28 Aug 2019 23:13:27 GMT", + "x-ms-creation-time" : "Sat, 19 Oct 2019 00:14:47 GMT", "Content-Length" : "4", - "x-ms-request-id" : "70a674f8-001e-0039-4af6-5d6927000000", + "x-ms-request-id" : "834d7830-f01e-003d-2c12-86e420000000", "Body" : "test", - "x-ms-client-request-id" : "eef79f15-fe00-42c3-b78e-4e576c1273f8", + "x-ms-client-request-id" : "4273e4fa-4180-499d-a2d2-27a2c54d84ba", "Content-Language" : "language", "Content-Type" : "type" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus008324aa/78618ca78ff2473b9ab788a20f87870a968e47a82cfa4ba19ef8187d2878cff4?snapshot=2019-08-28T23%3a13%3a27.3771774Z&sv=2019-02-02&spr=https%2Chttp&st=2019-08-27T23%3A13%3A27Z&se=2019-08-29T23%3A13%3A27Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-08-27T23%3A13%3A27Z&ske=2019-08-29T23%3A13%3A27Z&sks=b&skv=2019-02-02&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus031072d9/35c4336a64864644893ae5a1842c68d9dc33435be73240be9c4b92cf1395c9eb?snapshot=2019-10-19T00%3a14%3a47.9166493Z&sv=2019-02-02&spr=https%2Chttp&st=2019-10-18T00%3A14%3A47Z&se=2019-10-20T00%3A14%3A47Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-10-18T00%3A14%3A47Z&ske=2019-10-20T00%3A14%3A47Z&sks=b&skv=2019-02-02&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "fc897f83-e799-4029-b9a9-91a1d0693ee7" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 28 Aug 2019 23:13:27 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:14:47 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 28 Aug 2019 23:13:27 GMT", + "Date" : "Sat, 19 Oct 2019 00:14:48 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", - "x-ms-snapshot" : "2019-08-28T23:13:27.3771774Z", "x-ms-access-tier" : "Hot", "Cache-Control" : "cache", - "ETag" : "\"0x8D72C0D5542F04F\"", + "ETag" : "0x8D754295A1A3FC1", "Content-Disposition" : "disposition", "Content-Encoding" : "encoding", - "x-ms-creation-time" : "Wed, 28 Aug 2019 23:13:27 GMT", + "x-ms-creation-time" : "Sat, 19 Oct 2019 00:14:47 GMT", "Content-Length" : "4", - "x-ms-request-id" : "70a674fa-001e-0039-4cf6-5d6927000000", - "x-ms-client-request-id" : "cb831f15-404e-4c86-8aeb-1a238292083a", + "x-ms-request-id" : "834d7833-f01e-003d-2f12-86e420000000", + "x-ms-client-request-id" : "fc897f83-e799-4029-b9a9-91a1d0693ee7", "Content-Language" : "language", "Content-Type" : "type" }, @@ -174,7 +179,8 @@ "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcservicesassignaturevaluesnetworktestblobsnapshotus&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "25e94bd1-e572-433d-9307-3e2294f0e9f8" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -182,19 +188,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "70a674fc-001e-0039-4df6-5d6927000000", - "Body" : "jtcservicesassignaturevaluesnetworktestblobsnapshotusjtcservicesassignaturevaluesnetworktestblobsnapshotus008324aaWed, 28 Aug 2019 23:13:27 GMT\"0x8D72C0D55339ED6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 28 Aug 2019 23:13:27 GMT", - "x-ms-client-request-id" : "5cd5cc9c-78cb-4c79-87a8-32a48ccc5f55", + "x-ms-request-id" : "834d7834-f01e-003d-3012-86e420000000", + "Body" : "jtcservicesassignaturevaluesnetworktestblobsnapshotusjtcservicesassignaturevaluesnetworktestblobsnapshotus031072d9Sat, 19 Oct 2019 00:14:47 GMT\"0x8D754295A0C950B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Sat, 19 Oct 2019 00:14:48 GMT", + "x-ms-client-request-id" : "25e94bd1-e572-433d-9307-3e2294f0e9f8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus008324aa?restype=container", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus031072d9?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "d9eb61d0-8bd4-4fce-8b52-7b68ee5be80b" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -202,11 +209,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "70a674fd-001e-0039-4ef6-5d6927000000", - "Date" : "Wed, 28 Aug 2019 23:13:27 GMT", - "x-ms-client-request-id" : "40b70ad4-bfac-4593-a6b3-708595c8f7ca" + "x-ms-request-id" : "834d7835-f01e-003d-3112-86e420000000", + "Date" : "Sat, 19 Oct 2019 00:14:48 GMT", + "x-ms-client-request-id" : "d9eb61d0-8bd4-4fce-8b52-7b68ee5be80b" }, "Exception" : null } ], - "variables" : [ "jtcservicesassignaturevaluesnetworktestblobsnapshotus008324aa", "78618ca78ff2473b9ab788a20f87870a968e47a82cfa4ba19ef8187d2878cff4", "2019-08-28T23:13:27.436Z", "2019-08-28T23:13:27.436Z" ] + "variables" : [ "jtcservicesassignaturevaluesnetworktestblobsnapshotus031072d9", "35c4336a64864644893ae5a1842c68d9dc33435be73240be9c4b92cf1395c9eb", "2019-10-19T00:14:47.957Z", "2019-10-19T00:14:47.957Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobuserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobuserdelegation.json index 2e572dd618cf..7fbfa83cd85e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobuserdelegation.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobuserdelegation.json @@ -1,46 +1,48 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega067779a7?restype=container", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega031953c7?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "82e560bb-f7b4-4626-92d2-b97400f8a647" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D72C0D53915ECD\"", - "Last-Modified" : "Wed, 28 Aug 2019 23:13:24 GMT", + "ETag" : "0x8D75429582B529E", + "Last-Modified" : "Sat, 19 Oct 2019 00:14:44 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "70a67494-001e-0039-70f6-5d6927000000", - "Date" : "Wed, 28 Aug 2019 23:13:24 GMT", - "x-ms-client-request-id" : "59af2e01-21f6-454c-a7f7-33eb861b2a27" + "x-ms-request-id" : "834d77db-f01e-003d-6112-86e420000000", + "Date" : "Sat, 19 Oct 2019 00:14:44 GMT", + "x-ms-client-request-id" : "82e560bb-f7b4-4626-92d2-b97400f8a647" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega067779a7/fe1b6c9eb0e14eca87f9c2cfdd8cd88332feb10d14de45dda462cdad721827a4", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega031953c7/79eddf9b1495424eb59996ce6a5270e7d684cba65d6248019c3521bff07b3e82", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1372b822-6fbb-4bf5-98f1-4abeb55199d8", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "Q7G6/s6+u/k=", - "Last-Modified" : "Wed, 28 Aug 2019 23:13:24 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:14:44 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 28 Aug 2019 23:13:24 GMT", + "Date" : "Sat, 19 Oct 2019 00:14:44 GMT", "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "ETag" : "\"0x8D72C0D53A0FF97\"", + "ETag" : "0x8D754295839E57D", "Content-Length" : "0", - "x-ms-request-id" : "70a67498-001e-0039-73f6-5d6927000000", - "x-ms-client-request-id" : "e5d7946d-d053-4b23-8314-71645d69a12d" + "x-ms-request-id" : "834d77dd-f01e-003d-6212-86e420000000", + "x-ms-client-request-id" : "1372b822-6fbb-4bf5-98f1-4abeb55199d8" }, "Exception" : null }, { @@ -48,7 +50,8 @@ "Uri" : "https://gapradev.blob.core.windows.net?restype=service&comp=userdelegationkey", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "fdda6493-7280-4485-a83a-c59536afa983", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { @@ -57,61 +60,63 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "70a674a9-001e-0039-03f6-5d6927000000", - "Body" : "6c221728-da7e-467c-81db-12ed6e15859fd59355f0-44c1-46d7-a3c0-fb9c4269f9a22019-08-28T23:13:25Z2019-08-29T23:13:24Zb2019-02-02UkVEQUNURUQ=", - "Date" : "Wed, 28 Aug 2019 23:13:24 GMT", - "x-ms-client-request-id" : "b0883456-e0c2-4227-9234-2e9ad0349e5b", + "x-ms-request-id" : "834d77f4-f01e-003d-7912-86e420000000", + "Body" : "a5957b65-c972-4fc0-a6aa-afa2a83bee2678f00f00-993c-4fe5-9f8a-9423f46f747e2019-10-19T00:14:45Z2019-10-20T00:14:44Zb2019-02-02UkVEQUNURUQ=", + "Date" : "Sat, 19 Oct 2019 00:14:45 GMT", + "x-ms-client-request-id" : "fdda6493-7280-4485-a83a-c59536afa983", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega067779a7/fe1b6c9eb0e14eca87f9c2cfdd8cd88332feb10d14de45dda462cdad721827a4?sv=2019-02-02&spr=https%2Chttp&st=2019-08-27T23%3A13%3A24Z&se=2019-08-29T23%3A13%3A24Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-08-28T23%3A13%3A25Z&ske=2019-08-29T23%3A13%3A24Z&sks=b&skv=2019-02-02&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega031953c7/79eddf9b1495424eb59996ce6a5270e7d684cba65d6248019c3521bff07b3e82?sv=2019-02-02&spr=https%2Chttp&st=2019-10-18T00%3A14%3A44Z&se=2019-10-20T00%3A14%3A44Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-10-19T00%3A14%3A45Z&ske=2019-10-20T00%3A14%3A44Z&sks=b&skv=2019-02-02&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "06cfa7b4-9350-4018-aa3d-f3cf1c016151" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 28 Aug 2019 23:13:24 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:14:44 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 28 Aug 2019 23:13:25 GMT", + "Date" : "Sat, 19 Oct 2019 00:14:46 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "Cache-Control" : "cache", - "ETag" : "\"0x8D72C0D53A0FF97\"", + "ETag" : "0x8D754295839E57D", "Content-Disposition" : "disposition", - "x-ms-creation-time" : "Wed, 28 Aug 2019 23:13:24 GMT", + "x-ms-creation-time" : "Sat, 19 Oct 2019 00:14:44 GMT", "Content-Length" : "4", - "x-ms-request-id" : "70a674af-001e-0039-09f6-5d6927000000", + "x-ms-request-id" : "834d77fd-f01e-003d-8012-86e420000000", "Body" : "test", - "x-ms-client-request-id" : "a559a773-1796-4252-9563-97102ac267a7", + "x-ms-client-request-id" : "06cfa7b4-9350-4018-aa3d-f3cf1c016151", "Content-Language" : "language", "Content-Type" : "type" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega067779a7/fe1b6c9eb0e14eca87f9c2cfdd8cd88332feb10d14de45dda462cdad721827a4?sv=2019-02-02&spr=https%2Chttp&st=2019-08-27T23%3A13%3A24Z&se=2019-08-29T23%3A13%3A24Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-08-28T23%3A13%3A25Z&ske=2019-08-29T23%3A13%3A24Z&sks=b&skv=2019-02-02&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega031953c7/79eddf9b1495424eb59996ce6a5270e7d684cba65d6248019c3521bff07b3e82?sv=2019-02-02&spr=https%2Chttp&st=2019-10-18T00%3A14%3A44Z&se=2019-10-20T00%3A14%3A44Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-10-19T00%3A14%3A45Z&ske=2019-10-20T00%3A14%3A44Z&sks=b&skv=2019-02-02&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "754f1dda-2b0b-4cf0-a093-88612e2c8471" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 28 Aug 2019 23:13:24 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:14:44 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 28 Aug 2019 23:13:25 GMT", + "Date" : "Sat, 19 Oct 2019 00:14:46 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", "Accept-Ranges" : "bytes", @@ -119,13 +124,13 @@ "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", "Cache-Control" : "cache", - "ETag" : "\"0x8D72C0D53A0FF97\"", + "ETag" : "0x8D754295839E57D", "Content-Disposition" : "disposition", "Content-Encoding" : "encoding", - "x-ms-creation-time" : "Wed, 28 Aug 2019 23:13:24 GMT", + "x-ms-creation-time" : "Sat, 19 Oct 2019 00:14:44 GMT", "Content-Length" : "4", - "x-ms-request-id" : "70a674bb-001e-0039-13f6-5d6927000000", - "x-ms-client-request-id" : "2add82b1-6fb0-4f63-8584-cf5ed914756e", + "x-ms-request-id" : "834d7807-f01e-003d-0912-86e420000000", + "x-ms-client-request-id" : "754f1dda-2b0b-4cf0-a093-88612e2c8471", "Content-Language" : "language", "Content-Type" : "type" }, @@ -135,7 +140,8 @@ "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcservicesassignaturevaluesnetworktestblobuserdelega&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "d80db6ca-d924-4324-8a90-908798d16c87" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -143,19 +149,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "70a674bd-001e-0039-15f6-5d6927000000", - "Body" : "jtcservicesassignaturevaluesnetworktestblobuserdelegajtcservicesassignaturevaluesnetworktestblobuserdelega067779a7Wed, 28 Aug 2019 23:13:24 GMT\"0x8D72C0D53915ECD\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 28 Aug 2019 23:13:25 GMT", - "x-ms-client-request-id" : "815914e0-5c37-4f67-b9f1-4c72bb6a124a", + "x-ms-request-id" : "834d7809-f01e-003d-0b12-86e420000000", + "Body" : "jtcservicesassignaturevaluesnetworktestblobuserdelegajtcservicesassignaturevaluesnetworktestblobuserdelega031953c7Sat, 19 Oct 2019 00:14:44 GMT\"0x8D75429582B529E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Sat, 19 Oct 2019 00:14:46 GMT", + "x-ms-client-request-id" : "d80db6ca-d924-4324-8a90-908798d16c87", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega067779a7?restype=container", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega031953c7?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c6a22824-9275-4de6-ba24-91741f5356b2" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -163,11 +170,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "70a674c2-001e-0039-19f6-5d6927000000", - "Date" : "Wed, 28 Aug 2019 23:13:25 GMT", - "x-ms-client-request-id" : "fa9b507a-cf80-4c67-b795-e37be2290166" + "x-ms-request-id" : "834d780c-f01e-003d-0e12-86e420000000", + "Date" : "Sat, 19 Oct 2019 00:14:46 GMT", + "x-ms-client-request-id" : "c6a22824-9275-4de6-ba24-91741f5356b2" }, "Exception" : null } ], - "variables" : [ "jtcservicesassignaturevaluesnetworktestblobuserdelega067779a7", "fe1b6c9eb0e14eca87f9c2cfdd8cd88332feb10d14de45dda462cdad721827a4", "2019-08-28T23:13:24.600Z", "2019-08-28T23:13:24.600Z" ] + "variables" : [ "jtcservicesassignaturevaluesnetworktestblobuserdelega031953c7", "79eddf9b1495424eb59996ce6a5270e7d684cba65d6248019c3521bff07b3e82", "2019-10-19T00:14:44.720Z", "2019-10-19T00:14:44.720Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestcontaineruserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestcontaineruserdelegation.json index a9668ba1b562..72a4da156e50 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestcontaineruserdelegation.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestcontaineruserdelegation.json @@ -1,22 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontaineruserd03638682?restype=container", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontaineruserd0509739d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "3a805969-f94a-4cd8-871f-b8e15c2f2a42" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D72C11162BA766\"", - "Last-Modified" : "Wed, 28 Aug 2019 23:40:19 GMT", + "ETag" : "0x8D754295AA6D8F8", + "Last-Modified" : "Sat, 19 Oct 2019 00:14:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "71dbf1d9-901e-002b-6df9-5d12f7000000", - "Date" : "Wed, 28 Aug 2019 23:40:19 GMT", - "x-ms-client-request-id" : "16374451-2ba9-4a0b-ac28-95da60a0c375" + "x-ms-request-id" : "834d7837-f01e-003d-3212-86e420000000", + "Date" : "Sat, 19 Oct 2019 00:14:48 GMT", + "x-ms-client-request-id" : "3a805969-f94a-4cd8-871f-b8e15c2f2a42" }, "Exception" : null }, { @@ -24,7 +25,8 @@ "Uri" : "https://gapradev.blob.core.windows.net?restype=service&comp=userdelegationkey", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "55b3f8c3-fadc-40bf-b03f-d75024c832c7", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { @@ -33,19 +35,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8922247f-201e-002e-49f9-5dc02c000000", - "Body" : "5dc520dc-0792-4eb1-82aa-d5575d481f905c8aebab-e79d-4002-874b-564af8c1dfaa2019-08-28T23:40:20Z2019-08-29T23:40:19Zb2019-02-02UkVEQUNURUQ=", - "Date" : "Wed, 28 Aug 2019 23:40:20 GMT", - "x-ms-client-request-id" : "b65ae140-d191-4975-986b-b56c9c788a82", + "x-ms-request-id" : "834d7842-f01e-003d-3b12-86e420000000", + "Body" : "1844e392-6691-4842-8cfa-7814be71711643f0ccd0-c5ee-4c2d-ba87-58d5199d65242019-10-19T00:14:49Z2019-10-20T00:14:48Zb2019-02-02UkVEQUNURUQ=", + "Date" : "Sat, 19 Oct 2019 00:14:48 GMT", + "x-ms-client-request-id" : "55b3f8c3-fadc-40bf-b03f-d75024c832c7", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontaineruserd03638682?include=&restype=container&comp=list&sv=2019-02-02&se=2019-08-29T23%3A40%3A19Z&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-08-28T23%3A40%3A20Z&ske=2019-08-29T23%3A40%3A19Z&sks=b&skv=2019-02-02&sr=c&sp=racwdl&sig=REDACTED", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontaineruserd0509739d?include=&restype=container&comp=list&sv=2019-02-02&se=2019-10-20T00%3A14%3A48Z&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-10-19T00%3A14%3A49Z&ske=2019-10-20T00%3A14%3A48Z&sks=b&skv=2019-02-02&sr=c&sp=racwdl&sig=REDACTED", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "7992224b-3ad4-43d1-bf16-4b49ecac1cd2" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -53,10 +56,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "a4bfcea1-301e-0032-68f9-5d924c000000", - "Body" : "", - "Date" : "Wed, 28 Aug 2019 23:40:21 GMT", - "x-ms-client-request-id" : "e3a8a952-5248-49ec-abea-a6b3827b58e4", + "x-ms-request-id" : "834d7843-f01e-003d-3c12-86e420000000", + "Body" : "", + "Date" : "Sat, 19 Oct 2019 00:14:48 GMT", + "x-ms-client-request-id" : "7992224b-3ad4-43d1-bf16-4b49ecac1cd2", "Content-Type" : "application/xml" }, "Exception" : null @@ -65,7 +68,8 @@ "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcservicesassignaturevaluesnetworktestcontaineruserd&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "ec608b9a-94ec-497e-a825-4100141ec412" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -73,19 +77,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "415cd7dd-401e-0028-3bf9-5df393000000", - "Body" : "jtcservicesassignaturevaluesnetworktestcontaineruserdjtcservicesassignaturevaluesnetworktestcontaineruserd03638682Wed, 28 Aug 2019 23:40:19 GMT\"0x8D72C11162BA766\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 28 Aug 2019 23:40:21 GMT", - "x-ms-client-request-id" : "7ec7c8ba-239d-432d-ae07-2f553b0b041e", + "x-ms-request-id" : "834d7844-f01e-003d-3d12-86e420000000", + "Body" : "jtcservicesassignaturevaluesnetworktestcontaineruserdjtcservicesassignaturevaluesnetworktestcontaineruserd0509739dSat, 19 Oct 2019 00:14:48 GMT\"0x8D754295AA6D8F8\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Sat, 19 Oct 2019 00:14:49 GMT", + "x-ms-client-request-id" : "ec608b9a-94ec-497e-a825-4100141ec412", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontaineruserd03638682?restype=container", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontaineruserd0509739d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "050bbe39-d363-4ba7-af64-5f52b1778129" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -93,11 +98,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "7f1b4391-701e-0041-43f9-5dcadf000000", - "Date" : "Wed, 28 Aug 2019 23:40:21 GMT", - "x-ms-client-request-id" : "04cdae0b-bf61-471d-99ed-b40e5d558f44" + "x-ms-request-id" : "834d7845-f01e-003d-3e12-86e420000000", + "Date" : "Sat, 19 Oct 2019 00:14:49 GMT", + "x-ms-client-request-id" : "050bbe39-d363-4ba7-af64-5f52b1778129" }, "Exception" : null } ], - "variables" : [ "jtcservicesassignaturevaluesnetworktestcontaineruserd03638682", "2019-08-28T23:40:19.566Z" ] + "variables" : [ "jtcservicesassignaturevaluesnetworktestcontaineruserd0509739d", "2019-10-19T00:14:48.794Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] } \ No newline at end of file From 3ab5ac02b75dc1fd3b2b16c13ba113396555aa75 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Fri, 18 Oct 2019 19:10:41 -0700 Subject: [PATCH 21/64] Update Append, Block, and Page BlobItem Constructors (#5934) * Updated the Append, Block, and Page BlobItem classes to use constructors that didn't expose implementation * Fix linting issues and incorrect parameter passing * Clone byte array --- .../storage/blob/models/AppendBlobItem.java | 52 +++++------- .../storage/blob/models/BlockBlobItem.java | 35 ++++---- .../storage/blob/models/PageBlobItem.java | 79 +++++-------------- .../specialized/AppendBlobAsyncClient.java | 26 +++++- .../specialized/BlockBlobAsyncClient.java | 16 +++- .../blob/specialized/PageBlobAsyncClient.java | 48 +++++++++-- 6 files changed, 140 insertions(+), 116 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java index 118f8307eb39..0a5b1330ae6a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java @@ -4,9 +4,6 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.util.ImplUtils; -import com.azure.storage.blob.implementation.models.AppendBlobAppendBlockFromUrlHeaders; -import com.azure.storage.blob.implementation.models.AppendBlobAppendBlockHeaders; -import com.azure.storage.blob.implementation.models.AppendBlobCreateHeaders; import java.time.OffsetDateTime; @@ -22,34 +19,27 @@ public class AppendBlobItem { private final String blobAppendOffset; private final Integer blobCommittedBlockCount; - public AppendBlobItem(AppendBlobCreateHeaders generatedHeaders) { - this.eTag = generatedHeaders.getETag(); - this.lastModified = generatedHeaders.getLastModified(); - this.contentMD5 = generatedHeaders.getContentMD5(); - this.isServerEncrypted = generatedHeaders.isServerEncrypted(); - this.encryptionKeySha256 = generatedHeaders.getEncryptionKeySha256(); - this.blobAppendOffset = null; - this.blobCommittedBlockCount = null; - } - - public AppendBlobItem(AppendBlobAppendBlockHeaders generatedHeaders) { - this.eTag = generatedHeaders.getETag(); - this.lastModified = generatedHeaders.getLastModified(); - this.contentMD5 = generatedHeaders.getContentMD5(); - this.isServerEncrypted = generatedHeaders.isServerEncrypted(); - this.encryptionKeySha256 = generatedHeaders.getEncryptionKeySha256(); - this.blobAppendOffset = generatedHeaders.getBlobAppendOffset(); - this.blobCommittedBlockCount = generatedHeaders.getBlobCommittedBlockCount(); - } - - public AppendBlobItem(AppendBlobAppendBlockFromUrlHeaders generatedHeaders) { - this.eTag = generatedHeaders.getETag(); - this.lastModified = generatedHeaders.getLastModified(); - this.contentMD5 = generatedHeaders.getContentMD5(); - this.isServerEncrypted = generatedHeaders.isServerEncrypted(); - this.encryptionKeySha256 = generatedHeaders.getEncryptionKeySha256(); - this.blobAppendOffset = generatedHeaders.getBlobAppendOffset(); - this.blobCommittedBlockCount = generatedHeaders.getBlobCommittedBlockCount(); + /** + * Constructs a {@link AppendBlobItem}. + * + * @param eTag ETag of the append blob. + * @param lastModified Last modified time of the append blob. + * @param contentMD5 Content MD5 of the append blob. + * @param isServerEncrypted Flag indicating if the page blob is encrypted on the server. + * @param encryptionKeySha256 The encryption key used to encrypt the page blob. + * @param blobAppendOffset The offset at which the block was committed to the block blob. + * @param blobCommittedBlockCount The number of committed blocks in the block blob. + */ + public AppendBlobItem(final String eTag, final OffsetDateTime lastModified, final byte[] contentMD5, + final boolean isServerEncrypted, final String encryptionKeySha256, final String blobAppendOffset, + final Integer blobCommittedBlockCount) { + this.eTag = eTag; + this.lastModified = lastModified; + this.contentMD5 = ImplUtils.clone(contentMD5); + this.isServerEncrypted = isServerEncrypted; + this.encryptionKeySha256 = encryptionKeySha256; + this.blobAppendOffset = blobAppendOffset; + this.blobCommittedBlockCount = blobCommittedBlockCount; } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java index eaf54e710dbc..ffcb3f841802 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java @@ -4,11 +4,12 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.util.ImplUtils; -import com.azure.storage.blob.implementation.models.BlockBlobCommitBlockListHeaders; -import com.azure.storage.blob.implementation.models.BlockBlobUploadHeaders; import java.time.OffsetDateTime; +/** + * This class contains the properties about a block blob. + */ public class BlockBlobItem { private final String eTag; private final OffsetDateTime lastModified; @@ -16,20 +17,22 @@ public class BlockBlobItem { private final Boolean isServerEncrypted; private final String encryptionKeySha256; - public BlockBlobItem(BlockBlobUploadHeaders generatedHeaders) { - this.eTag = generatedHeaders.getETag(); - this.lastModified = generatedHeaders.getLastModified(); - this.contentMD5 = generatedHeaders.getContentMD5(); - this.isServerEncrypted = generatedHeaders.isServerEncrypted(); - this.encryptionKeySha256 = generatedHeaders.getEncryptionKeySha256(); - } - - public BlockBlobItem(BlockBlobCommitBlockListHeaders generatedHeaders) { - this.eTag = generatedHeaders.getETag(); - this.lastModified = generatedHeaders.getLastModified(); - this.contentMD5 = generatedHeaders.getContentMD5(); - this.isServerEncrypted = generatedHeaders.isServerEncrypted(); - this.encryptionKeySha256 = generatedHeaders.getEncryptionKeySha256(); + /** + * Constructs a {@link BlockBlobItem}. + * + * @param eTag ETag of the block blob. + * @param lastModified Last modified time of the block blob. + * @param contentMD5 Content MD5 of the block blob. + * @param isServerEncrypted Flag indicating if the page blob is encrypted on the server. + * @param encryptionKeySha256 The encryption key used to encrypt the page blob. + */ + public BlockBlobItem(final String eTag, final OffsetDateTime lastModified, final byte[] contentMD5, + final boolean isServerEncrypted, final String encryptionKeySha256) { + this.eTag = eTag; + this.lastModified = lastModified; + this.contentMD5 = ImplUtils.clone(contentMD5); + this.isServerEncrypted = isServerEncrypted; + this.encryptionKeySha256 = encryptionKeySha256; } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java index eaf1e5d50496..ffc09dc241d4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java @@ -4,15 +4,12 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.util.ImplUtils; -import com.azure.storage.blob.implementation.models.PageBlobClearPagesHeaders; -import com.azure.storage.blob.implementation.models.PageBlobCreateHeaders; -import com.azure.storage.blob.implementation.models.PageBlobResizeHeaders; -import com.azure.storage.blob.implementation.models.PageBlobUpdateSequenceNumberHeaders; -import com.azure.storage.blob.implementation.models.PageBlobUploadPagesFromURLHeaders; -import com.azure.storage.blob.implementation.models.PageBlobUploadPagesHeaders; import java.time.OffsetDateTime; +/** + * This class contains the properties about a page blob. + */ public class PageBlobItem { private final String eTag; private final OffsetDateTime lastModified; @@ -21,58 +18,24 @@ public class PageBlobItem { private final String encryptionKeySha256; private final Long blobSequenceNumber; - public PageBlobItem(PageBlobCreateHeaders generatedHeaders) { - this.eTag = generatedHeaders.getETag(); - this.lastModified = generatedHeaders.getLastModified(); - this.contentMD5 = generatedHeaders.getContentMD5(); - this.isServerEncrypted = generatedHeaders.isServerEncrypted(); - this.encryptionKeySha256 = generatedHeaders.getEncryptionKeySha256(); - this.blobSequenceNumber = null; - } - - public PageBlobItem(PageBlobUploadPagesHeaders generatedHeaders) { - this.eTag = generatedHeaders.getETag(); - this.lastModified = generatedHeaders.getLastModified(); - this.contentMD5 = generatedHeaders.getContentMD5(); - this.isServerEncrypted = generatedHeaders.isServerEncrypted(); - this.encryptionKeySha256 = generatedHeaders.getEncryptionKeySha256(); - this.blobSequenceNumber = generatedHeaders.getBlobSequenceNumber(); - } - - public PageBlobItem(PageBlobUploadPagesFromURLHeaders generatedHeaders) { - this.eTag = generatedHeaders.getETag(); - this.lastModified = generatedHeaders.getLastModified(); - this.contentMD5 = generatedHeaders.getContentMD5(); - this.isServerEncrypted = generatedHeaders.isServerEncrypted(); - this.encryptionKeySha256 = generatedHeaders.getEncryptionKeySha256(); - this.blobSequenceNumber = generatedHeaders.getBlobSequenceNumber(); - } - - public PageBlobItem(PageBlobClearPagesHeaders generatedHeaders) { - this.eTag = generatedHeaders.getETag(); - this.lastModified = generatedHeaders.getLastModified(); - this.contentMD5 = generatedHeaders.getContentMD5(); - this.isServerEncrypted = generatedHeaders.isServerEncrypted(); - this.encryptionKeySha256 = generatedHeaders.getEncryptionKeySha256(); - this.blobSequenceNumber = generatedHeaders.getBlobSequenceNumber(); - } - - public PageBlobItem(PageBlobResizeHeaders generatedHeaders) { - this.eTag = generatedHeaders.getETag(); - this.lastModified = generatedHeaders.getLastModified(); - this.blobSequenceNumber = generatedHeaders.getBlobSequenceNumber(); - this.isServerEncrypted = null; - this.encryptionKeySha256 = null; - this.contentMD5 = null; - } - - public PageBlobItem(PageBlobUpdateSequenceNumberHeaders generatedHeaders) { - this.eTag = generatedHeaders.getETag(); - this.lastModified = generatedHeaders.getLastModified(); - this.blobSequenceNumber = generatedHeaders.getBlobSequenceNumber(); - this.isServerEncrypted = null; - this.encryptionKeySha256 = null; - this.contentMD5 = null; + /** + * Constructs a {@link PageBlobItem}. + * + * @param eTag ETag of the page blob. + * @param lastModified Last modified time of the page blob. + * @param contentMD5 Content MD5 of the page blob. + * @param isServerEncrypted Flag indicating if the page blob is encrypted on the server. + * @param encryptionKeySha256 The encryption key used to encrypt the page blob. + * @param blobSequenceNumber The current sequence number for the page blob. + */ + public PageBlobItem(final String eTag, final OffsetDateTime lastModified, final byte[] contentMD5, + final Boolean isServerEncrypted, final String encryptionKeySha256, final Long blobSequenceNumber) { + this.eTag = eTag; + this.lastModified = lastModified; + this.contentMD5 = ImplUtils.clone(contentMD5); + this.isServerEncrypted = isServerEncrypted; + this.encryptionKeySha256 = encryptionKeySha256; + this.blobSequenceNumber = blobSequenceNumber; } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java index f28ac35b504f..74dbd7c1d255 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java @@ -14,6 +14,9 @@ import com.azure.storage.blob.BlobContainerAsyncClient; import com.azure.storage.blob.BlobServiceAsyncClient; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.models.AppendBlobAppendBlockFromUrlHeaders; +import com.azure.storage.blob.implementation.models.AppendBlobAppendBlockHeaders; +import com.azure.storage.blob.implementation.models.AppendBlobCreateHeaders; import com.azure.storage.blob.models.AppendBlobAccessConditions; import com.azure.storage.blob.models.AppendBlobItem; import com.azure.storage.blob.models.BlobAccessConditions; @@ -122,7 +125,12 @@ Mono> createWithResponse(BlobHttpHeaders headers, Map new SimpleResponse<>(rb, new AppendBlobItem(rb.getDeserializedHeaders()))); + .map(rb -> { + AppendBlobCreateHeaders hd = rb.getDeserializedHeaders(); + AppendBlobItem item = new AppendBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), + hd.isServerEncrypted(), hd.getEncryptionKeySha256(), null, null); + return new SimpleResponse<>(rb, item); + }); } /** @@ -186,7 +194,13 @@ Mono> appendBlockWithResponse(Flux data, lo appendBlobAccessConditions.getLeaseAccessConditions(), appendBlobAccessConditions.getAppendPositionAccessConditions(), getCustomerProvidedKey(), appendBlobAccessConditions.getModifiedAccessConditions(), context) - .map(rb -> new SimpleResponse<>(rb, new AppendBlobItem(rb.getDeserializedHeaders()))); + .map(rb -> { + AppendBlobAppendBlockHeaders hd = rb.getDeserializedHeaders(); + AppendBlobItem item = new AppendBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), + hd.isServerEncrypted(), hd.getEncryptionKeySha256(), hd.getBlobAppendOffset(), + hd.getBlobCommittedBlockCount()); + return new SimpleResponse<>(rb, item); + }); } /** @@ -260,6 +274,12 @@ Mono> appendBlockFromUrlWithResponse(String sourceUrl, destAccessConditions.getLeaseAccessConditions(), destAccessConditions.getAppendPositionAccessConditions(), destAccessConditions.getModifiedAccessConditions(), sourceAccessConditions, context) - .map(rb -> new SimpleResponse<>(rb, new AppendBlobItem(rb.getDeserializedHeaders()))); + .map(rb -> { + AppendBlobAppendBlockFromUrlHeaders hd = rb.getDeserializedHeaders(); + AppendBlobItem item = new AppendBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), + hd.isServerEncrypted(), hd.getEncryptionKeySha256(), hd.getBlobAppendOffset(), + hd.getBlobCommittedBlockCount()); + return new SimpleResponse<>(rb, item); + }); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java index 038fab521589..b372f542ff87 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java @@ -11,6 +11,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.models.BlockBlobCommitBlockListHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobUploadHeaders; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; @@ -150,7 +152,12 @@ Mono> uploadWithResponse(Flux data, long len return this.azureBlobStorage.blockBlobs().uploadWithRestResponseAsync(null, null, data, length, null, metadata, tier, null, headers, accessConditions.getLeaseAccessConditions(), getCustomerProvidedKey(), accessConditions.getModifiedAccessConditions(), context) - .map(rb -> new SimpleResponse<>(rb, new BlockBlobItem(rb.getDeserializedHeaders()))); + .map(rb -> { + BlockBlobUploadHeaders hd = rb.getDeserializedHeaders(); + BlockBlobItem item = new BlockBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), + hd.isServerEncrypted(), hd.getEncryptionKeySha256()); + return new SimpleResponse<>(rb, item); + }); } /** @@ -411,6 +418,11 @@ Mono> commitBlockListWithResponse(List base64Blo null, null, new BlockLookupList().setLatest(base64BlockIDs), null, null, null, metadata, tier, null, headers, accessConditions.getLeaseAccessConditions(), getCustomerProvidedKey(), accessConditions.getModifiedAccessConditions(), context) - .map(rb -> new SimpleResponse<>(rb, new BlockBlobItem(rb.getDeserializedHeaders()))); + .map(rb -> { + BlockBlobCommitBlockListHeaders hd = rb.getDeserializedHeaders(); + BlockBlobItem item = new BlockBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), + hd.isServerEncrypted(), hd.getEncryptionKeySha256()); + return new SimpleResponse<>(rb, item); + }); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java index 0115de678cdc..efdf679c0b20 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java @@ -12,6 +12,12 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.models.PageBlobClearPagesHeaders; +import com.azure.storage.blob.implementation.models.PageBlobCreateHeaders; +import com.azure.storage.blob.implementation.models.PageBlobResizeHeaders; +import com.azure.storage.blob.implementation.models.PageBlobUpdateSequenceNumberHeaders; +import com.azure.storage.blob.implementation.models.PageBlobUploadPagesFromURLHeaders; +import com.azure.storage.blob.implementation.models.PageBlobUploadPagesHeaders; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; @@ -145,7 +151,12 @@ Mono> createWithResponse(long size, Long sequenceNumber, return this.azureBlobStorage.pageBlobs().createWithRestResponseAsync(null, null, 0, size, null, null, metadata, sequenceNumber, null, headers, accessConditions.getLeaseAccessConditions(), getCustomerProvidedKey(), accessConditions.getModifiedAccessConditions(), context) - .map(rb -> new SimpleResponse<>(rb, new PageBlobItem(rb.getDeserializedHeaders()))); + .map(rb -> { + PageBlobCreateHeaders hd = rb.getDeserializedHeaders(); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), + hd.isServerEncrypted(), hd.getEncryptionKeySha256(), null); + return new SimpleResponse<>(rb, item); + }); } /** @@ -223,7 +234,12 @@ Mono> uploadPagesWithResponse(PageRange pageRange, Flux new SimpleResponse<>(rb, new PageBlobItem(rb.getDeserializedHeaders()))); + .map(rb -> { + PageBlobUploadPagesHeaders hd = rb.getDeserializedHeaders(); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), + hd.isServerEncrypted(), hd.getEncryptionKeySha256(), hd.getBlobSequenceNumber()); + return new SimpleResponse<>(rb, item); + }); } /** @@ -323,7 +339,12 @@ Mono> uploadPagesFromURLWithResponse(PageRange range, Str url, sourceRangeString, 0, rangeString, sourceContentMD5, null, null, null, getCustomerProvidedKey(), destAccessConditions.getLeaseAccessConditions(), destAccessConditions.getSequenceNumberAccessConditions(), destAccessConditions.getModifiedAccessConditions(), sourceAccessConditions, context) - .map(rb -> new SimpleResponse<>(rb, new PageBlobItem(rb.getDeserializedHeaders()))); + .map(rb -> { + PageBlobUploadPagesFromURLHeaders hd = rb.getDeserializedHeaders(); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), + hd.isServerEncrypted(), hd.getEncryptionKeySha256(), null); + return new SimpleResponse<>(rb, item); + }); } /** @@ -388,7 +409,12 @@ Mono> clearPagesWithResponse(PageRange pageRange, pageBlobAccessConditions.getLeaseAccessConditions(), getCustomerProvidedKey(), pageBlobAccessConditions.getSequenceNumberAccessConditions(), pageBlobAccessConditions.getModifiedAccessConditions(), context) - .map(rb -> new SimpleResponse<>(rb, new PageBlobItem(rb.getDeserializedHeaders()))); + .map(rb -> { + PageBlobClearPagesHeaders hd = rb.getDeserializedHeaders(); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), + hd.isServerEncrypted(), hd.getEncryptionKeySha256(), hd.getBlobSequenceNumber()); + return new SimpleResponse<>(rb, item); + }); } /** @@ -562,7 +588,12 @@ Mono> resizeWithResponse(long size, BlobAccessConditions return this.azureBlobStorage.pageBlobs().resizeWithRestResponseAsync(null, null, size, null, null, accessConditions.getLeaseAccessConditions(), getCustomerProvidedKey(), accessConditions.getModifiedAccessConditions(), context) - .map(rb -> new SimpleResponse<>(rb, new PageBlobItem(rb.getDeserializedHeaders()))); + .map(rb -> { + PageBlobResizeHeaders hd = rb.getDeserializedHeaders(); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), null, null, null, + hd.getBlobSequenceNumber()); + return new SimpleResponse<>(rb, item); + }); } /** @@ -625,7 +656,12 @@ Mono> updateSequenceNumberWithResponse(SequenceNumberActi return this.azureBlobStorage.pageBlobs().updateSequenceNumberWithRestResponseAsync(null, null, action, null, sequenceNumber, null, accessConditions.getLeaseAccessConditions(), accessConditions.getModifiedAccessConditions(), context) - .map(rb -> new SimpleResponse<>(rb, new PageBlobItem(rb.getDeserializedHeaders()))); + .map(rb -> { + PageBlobUpdateSequenceNumberHeaders hd = rb.getDeserializedHeaders(); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), null, null, null, + hd.getBlobSequenceNumber()); + return new SimpleResponse<>(rb, item); + }); } /** From 94221c372ae0cbb4d6c510f05ef007462bbc3618 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Fri, 18 Oct 2019 20:03:27 -0700 Subject: [PATCH 22/64] Support IP Based Endpoints and Changes serviceVersion Methods (#5914) * Added test for IP endpoint * Add support for IP based URLs and fix the service version passing and retrieving * Cleaned up some public API and added IP based URL support to Queues * Fixed unresolved merge conflicts and added playback records * Fixing linting issues and passing snapshots * Changes based on PR feedback * Fix SpotBugs issue * Suppress SpotBugs issue --- .../resources/spotbugs/spotbugs-exclude.xml | 5 + .../blob/BlobPartitionManager.java | 2 +- .../blob/BlobPartitionManagerTest.java | 4 +- .../blob/batch/BlobBatchAsyncClient.java | 5 +- .../blob/batch/BlobBatchClientBuilder.java | 19 +-- .../EncryptedBlobAsyncClient.java | 20 ++- .../EncryptedBlobClientBuilder.java | 81 +++++------- .../cryptography/EncryptedFlux.java | 18 ++- .../azure/storage/blob/BlobAsyncClient.java | 40 +++--- .../azure/storage/blob/BlobClientBuilder.java | 14 +- .../blob/BlobContainerAsyncClient.java | 63 +++++---- .../storage/blob/BlobContainerClient.java | 22 ++-- .../blob/BlobContainerClientBuilder.java | 16 +-- .../storage/blob/BlobServiceAsyncClient.java | 39 ++++-- .../azure/storage/blob/BlobServiceClient.java | 2 +- .../blob/BlobServiceClientBuilder.java | 15 +-- .../com/azure/storage/blob/BlobUrlParts.java | 124 ++++++++++++------ .../specialized/AppendBlobAsyncClient.java | 21 ++- .../blob/specialized/BlobAsyncClientBase.java | 52 +++++--- .../blob/specialized/BlobClientBase.java | 11 +- .../specialized/BlockBlobAsyncClient.java | 18 ++- .../blob/specialized/LeaseClientBuilder.java | 6 +- .../blob/specialized/PageBlobAsyncClient.java | 18 ++- .../SpecializedBlobClientBuilder.java | 78 ++++++----- .../com/azure/storage/blob/BasicExample.java | 2 +- ...ntainerAsyncClientJavaDocCodeSnippets.java | 32 ++--- ...lobContainerClientJavaDocCodeSnippets.java | 32 ++--- ...lobAsyncClientBaseJavaDocCodeSnippets.java | 4 +- .../com/azure/storage/blob/BlobAPITest.groovy | 12 +- .../storage/blob/ContainerAPITest.groovy | 60 ++++----- .../com/azure/storage/blob/SASTest.groovy | 8 +- .../blob/specialized/HelperTest.groovy | 34 ++++- ...nerAPITestlistblobshieroptionsdeleted.json | 88 ++++++------- .../HelperTestipurlparser[0].json | 65 +++++++++ .../HelperTestipurlparser[1].json | 65 +++++++++ .../HelperTestipurlparser[2].json | 65 +++++++++ .../HelperTestipurlparser[3].json | 65 +++++++++ .../HelperTestipurlparser[4].json | 65 +++++++++ .../HelperTestipurlparser[5].json | 65 +++++++++ .../com/azure/storage/common/Utility.java | 25 ---- .../com/azure/storage/file/BuilderHelper.java | 41 +++++- .../storage/file/DirectoryAsyncClient.java | 13 +- .../azure/storage/file/DirectoryClient.java | 2 +- .../azure/storage/file/FileAsyncClient.java | 8 +- .../com/azure/storage/file/FileClient.java | 2 +- .../azure/storage/file/FileClientBuilder.java | 18 ++- .../storage/file/FileServiceAsyncClient.java | 14 +- .../azure/storage/file/FileServiceClient.java | 2 +- .../file/FileServiceClientBuilder.java | 38 +++--- .../azure/storage/file/ShareAsyncClient.java | 15 ++- .../com/azure/storage/file/ShareClient.java | 4 +- .../storage/file/ShareClientBuilder.java | 40 +++--- .../azure/storage/queue/BuilderHelper.java | 120 ++++++++++++++++- .../azure/storage/queue/QueueAsyncClient.java | 9 +- .../com/azure/storage/queue/QueueClient.java | 2 +- .../storage/queue/QueueClientBuilder.java | 78 ++++------- .../queue/QueueServiceAsyncClient.java | 15 ++- .../storage/queue/QueueServiceClient.java | 2 +- .../queue/QueueServiceClientBuilder.java | 61 ++++----- .../azure/storage/queue/QueueAPITests.groovy | 12 ++ .../storage/queue/QueueAysncAPITests.groovy | 12 ++ .../QueueAPITestsIPBasedEndpoint.json | 4 + .../QueueAysncAPITestsIPBasedEndpoint.json | 4 + 63 files changed, 1279 insertions(+), 617 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[0].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[1].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[2].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[3].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[4].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[5].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsIPBasedEndpoint.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsIPBasedEndpoint.json diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml index ced5e8f3cced..b3975fd095c8 100755 --- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml +++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml @@ -648,4 +648,9 @@ + + + + + diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManager.java b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManager.java index 4464845bc27e..0b21ab147259 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManager.java +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManager.java @@ -75,7 +75,7 @@ public Flux listOwnership(String eventHubName, String consum String prefix = getBlobPrefix(eventHubName, consumerGroupName); BlobListDetails details = new BlobListDetails().setRetrieveMetadata(true); ListBlobsOptions options = new ListBlobsOptions().setPrefix(prefix).setDetails(details); - return blobContainerAsyncClient.listBlobsFlat(options) + return blobContainerAsyncClient.listBlobs(options) // Blob names should be of the pattern eventhub/consumergroup/ // While we can further check if the partition id is numeric, it may not necessarily be the case in future. .filter(blobItem -> blobItem.getName().split(BLOB_PATH_SEPARATOR).length == 3) diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerTest.java b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerTest.java index a16fb02ae7e1..0f67c9d973a9 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerTest.java @@ -68,7 +68,7 @@ public void testListOwnerShip() { BlobItem>(null, 200, null, Arrays.asList(blobItem), null, null))); - when(blobContainerAsyncClient.listBlobsFlat(any(ListBlobsOptions.class))).thenReturn(response); + when(blobContainerAsyncClient.listBlobs(any(ListBlobsOptions.class))).thenReturn(response); StepVerifier.create(blobPartitionManager.listOwnership("eh", "cg")) .assertNext(partitionOwnership -> { @@ -137,7 +137,7 @@ public void testClaimOwnership() { public void testListOwnershipError() { BlobPartitionManager blobPartitionManager = new BlobPartitionManager(blobContainerAsyncClient); PagedFlux response = new PagedFlux<>(() -> Mono.error(new SocketTimeoutException())); - when(blobContainerAsyncClient.listBlobsFlat(any(ListBlobsOptions.class))).thenReturn(response); + when(blobContainerAsyncClient.listBlobs(any(ListBlobsOptions.class))).thenReturn(response); StepVerifier.create(blobPartitionManager.listOwnership("eh", "cg")) .expectError(SocketTimeoutException.class).verify(); diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java index 74664035d3a0..089f5de97167 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java @@ -15,6 +15,7 @@ import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.models.AccessTier; @@ -47,11 +48,11 @@ public final class BlobBatchAsyncClient { private final AzureBlobStorageImpl client; - BlobBatchAsyncClient(String accountUrl, HttpPipeline pipeline, String version) { + BlobBatchAsyncClient(String accountUrl, HttpPipeline pipeline, BlobServiceVersion version) { this.client = new AzureBlobStorageBuilder() .url(accountUrl) .pipeline(pipeline) - .version(version) + .version(version.getVersion()) .build(); } diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClientBuilder.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClientBuilder.java index 8e629f061dcb..1ce0577eaa63 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClientBuilder.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClientBuilder.java @@ -18,7 +18,7 @@ public final class BlobBatchClientBuilder { private final String accountUrl; private final HttpPipeline pipeline; - private String version; + private final BlobServiceVersion version; /** * Constructs the {@link BlobBatchClientBuilder} using the {@link BlobServiceClient#getAccountUrl() account URL} and @@ -68,22 +68,7 @@ public BlobBatchClient buildClient() { * @return a {@link BlobBatchAsyncClient} created from the configurations in this builder. */ public BlobBatchAsyncClient buildAsyncClient() { - String serviceVersion = version != null ? version : BlobServiceVersion.getLatest().getVersion(); + BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); return new BlobBatchAsyncClient(accountUrl, pipeline, serviceVersion); } - - /** - * Sets the {@link BlobServiceVersion} that is used when making API requests. - *

    - * If a service version is not provided, the service version that will be used will be the latest known service - * version based on the version of the client library being used. If no service version is specified, updating to a - * newer version the client library will have the result of potentially moving to a newer service version. - * - * @param version {@link BlobServiceVersion} of the service to be used when making requests. - * @return the updated BlobClientBuilder object - */ - public BlobBatchClientBuilder serviceVersion(BlobServiceVersion version) { - this.version = version.getVersion(); - return this; - } } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java index bc86217900ba..0dd72082f2c4 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java @@ -5,11 +5,12 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.cryptography.AsyncKeyEncryptionKey; +import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.Response; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobAsyncClient; -import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; @@ -84,10 +85,21 @@ public class EncryptedBlobAsyncClient extends BlobAsyncClient { /** * Package-private constructor for use by {@link EncryptedBlobClientBuilder}. + * + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param blobName The blob name. + * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. + * @param key The key used to encrypt and decrypt data. + * @param keyWrapAlgorithm The algorithm used to wrap/unwrap the key during encryption. */ - EncryptedBlobAsyncClient(AzureBlobStorageImpl constructImpl, String snapshot, String accountName, - AsyncKeyEncryptionKey key, String keyWrapAlgorithm) { - super(constructImpl, snapshot, null, accountName); + EncryptedBlobAsyncClient(HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, String accountName, + String containerName, String blobName, String snapshot, AsyncKeyEncryptionKey key, String keyWrapAlgorithm) { + super(pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, null); + this.keyWrapper = key; this.keyWrapAlgorithm = keyWrapAlgorithm; } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java index 955884662a34..01e9e9222897 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java @@ -24,8 +24,6 @@ import com.azure.storage.blob.BlobContainerAsyncClient; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.BlobUrlParts; -import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; -import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; @@ -103,7 +101,31 @@ public final class EncryptedBlobClientBuilder { public EncryptedBlobClientBuilder() { } - private AzureBlobStorageImpl constructImpl() { + /** + * Creates a {@link EncryptedBlobClient} based on options set in the Builder. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.cryptography.EncryptedBlobClientBuilder.buildEncryptedBlobAsyncClient} + * + * @return a {@link EncryptedBlobClient} created from the configurations in this builder. + * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. + */ + public EncryptedBlobClient buildEncryptedBlobClient() { + return new EncryptedBlobClient(buildEncryptedBlobAsyncClient()); + } + + /** + * Creates a {@link EncryptedBlobAsyncClient} based on options set in the Builder. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.cryptography.EncryptedBlobClientBuilder.buildEncryptedBlobClient} + * + * @return a {@link EncryptedBlobAsyncClient} created from the configurations in this builder. + * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. + */ + public EncryptedBlobAsyncClient buildEncryptedBlobAsyncClient() { Objects.requireNonNull(blobName, "'blobName' cannot be null."); checkValidEncryptionParameters(); @@ -116,12 +138,14 @@ private AzureBlobStorageImpl constructImpl() { } BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); + return new EncryptedBlobAsyncClient(getHttpPipeline(serviceVersion), + String.format("%s/%s/%s", endpoint, containerName, blobName), serviceVersion, accountName, containerName, + blobName, snapshot, keyWrapper, keyWrapAlgorithm); + } + + private HttpPipeline getHttpPipeline(BlobServiceVersion serviceVersion) { if (httpPipeline != null) { - return new AzureBlobStorageBuilder() - .url(String.format("%s/%s/%s", endpoint, containerName, blobName)) - .pipeline(httpPipeline) - .version(serviceVersion.getVersion()) - .build(); + return httpPipeline; } String userAgentName = BlobCryptographyConfiguration.NAME; @@ -160,49 +184,10 @@ private AzureBlobStorageImpl constructImpl() { policies.add(new ScrubEtagPolicy()); - HttpPipeline pipeline = new HttpPipelineBuilder() + return new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); - - return new AzureBlobStorageBuilder() - .url(String.format("%s/%s/%s", endpoint, containerName, blobName)) - .pipeline(pipeline) - .version(serviceVersion.getVersion()) - .build(); - } - - /** - * Creates a {@link EncryptedBlobClient} based on options set in the Builder. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.specialized.cryptography.EncryptedBlobClientBuilder.buildEncryptedBlobAsyncClient} - * - * @return a {@link EncryptedBlobClient} created from the configurations in this builder. - * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. - */ - public EncryptedBlobClient buildEncryptedBlobClient() { - return new EncryptedBlobClient(buildEncryptedBlobAsyncClient()); - } - - /** - * Creates a {@link EncryptedBlobAsyncClient} based on options set in the Builder. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.specialized.cryptography.EncryptedBlobClientBuilder.buildEncryptedBlobClient} - * - * @return a {@link EncryptedBlobAsyncClient} created from the configurations in this builder. - * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. - */ - public EncryptedBlobAsyncClient buildEncryptedBlobAsyncClient() { - return new EncryptedBlobAsyncClient(constructImpl(), snapshot, accountName, keyWrapper, keyWrapAlgorithm); - } - - protected void addOptionalEncryptionPolicy(List policies) { - BlobDecryptionPolicy decryptionPolicy = new BlobDecryptionPolicy(keyWrapper, keyResolver); - policies.add(decryptionPolicy); } /** diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedFlux.java b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedFlux.java index c8801e5035d0..5fee5c2f11d2 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedFlux.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedFlux.java @@ -11,6 +11,7 @@ import java.nio.ByteBuffer; import java.security.InvalidKeyException; import java.util.Arrays; +import java.util.Collections; import java.util.List; /** @@ -47,7 +48,7 @@ public class EncryptedFlux extends Flux { public static final int DATA_COUNT = 40; - public static final int DOWNLOAD_SIZE = 64; // The total size of the "download" after expanding the requested range. + private static final int DOWNLOAD_SIZE = 64; // The total size of the "download" after expanding the requested range. /* These constants correspond to the positions above. @@ -139,7 +140,7 @@ public EncryptedFlux(int testCase, AsyncKeyEncryptionKey key, APISpec spec) thro this.testCase = testCase; this.plainText = spec.getRandomData(DOWNLOAD_SIZE - 2); // This will yield two bytes of padding... for fun. - EncryptedBlob encryptedBlob = new EncryptedBlobAsyncClient(null, null, null, key, + EncryptedBlob encryptedBlob = new EncryptedBlobAsyncClient(null, null, null, null, null, null, null, key, "keyWrapAlgorithm") .encryptBlob(Flux.just(this.plainText)).block(); this.cipherText = APISpec.collectBytesInBuffer(encryptedBlob.getCiphertextFlux()).block(); @@ -156,8 +157,8 @@ private void sendBuffs(List positionArr, List limitArr, Subscr @Override public void subscribe(CoreSubscriber s) { - List positionArr = null; - List limitArr = null; + List positionArr; + List limitArr; switch (this.testCase) { case CASE_ZERO: positionArr = Arrays.asList(POSITION_ONE, POSITION_TWO, POSITION_FOUR_POSITION, POSITION_FIVE, @@ -196,10 +197,11 @@ public void subscribe(CoreSubscriber s) { limitArr = Arrays.asList(POSITION_EIGHT, POSITION_NINE_LIMIT); break; case CASE_SEVEN: - positionArr = Arrays.asList(POSITION_ONE); - limitArr = Arrays.asList(POSITION_NINE_LIMIT); + positionArr = Collections.singletonList(POSITION_ONE); + limitArr = Collections.singletonList(POSITION_NINE_LIMIT); break; case CASE_EIGHT: + case CASE_THIRTEEN: positionArr = Arrays.asList(POSITION_ONE, POSITION_TWO); limitArr = Arrays.asList(POSITION_TWO, POSITION_NINE_LIMIT); break; @@ -219,10 +221,6 @@ public void subscribe(CoreSubscriber s) { positionArr = Arrays.asList(POSITION_ONE, POSITION_TWO, POSITION_EIGHT); limitArr = Arrays.asList(POSITION_TWO, POSITION_EIGHT, POSITION_NINE_LIMIT); break; - case CASE_THIRTEEN: - positionArr = Arrays.asList(POSITION_ONE, POSITION_TWO); - limitArr = Arrays.asList(POSITION_TWO, POSITION_NINE_LIMIT); - break; case CASE_FOURTEEN: positionArr = Arrays.asList(POSITION_ONE, POSITION_THREE_POSITION, POSITION_FOUR_LIMIT); limitArr = Arrays.asList(POSITION_THREE_POSITION, POSITION_FOUR_LIMIT, POSITION_NINE_LIMIT); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java index c002cf5dc30a..876912c56beb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java @@ -3,11 +3,10 @@ package com.azure.storage.blob; +import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.Response; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; -import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; @@ -34,12 +33,10 @@ import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import java.util.ArrayList; -import java.util.Arrays; import java.util.Base64; import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.Optional; import java.util.SortedMap; import java.util.TreeMap; import java.util.UUID; @@ -77,15 +74,21 @@ public class BlobAsyncClient extends BlobAsyncClientBase { private final ClientLogger logger = new ClientLogger(BlobAsyncClient.class); /** - * Constructor for use by {@link BlobClientBuilder}. + * Package-private constructor for use by {@link BlobClientBuilder}. * - * @param azureBlobStorage the API client for blob storage - * @param snapshot The optional snapshot id of the snapshot blob - * @param cpk The optional client provided key - * @param accountName The account name + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param blobName The blob name. + * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. */ - protected BlobAsyncClient(AzureBlobStorageImpl azureBlobStorage, String snapshot, CpkInfo cpk, String accountName) { - super(azureBlobStorage, snapshot, cpk, accountName); + protected BlobAsyncClient(HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, String accountName, + String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey) { + super(pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey); } /** @@ -96,11 +99,8 @@ protected BlobAsyncClient(AzureBlobStorageImpl azureBlobStorage, String snapshot */ @Override public BlobAsyncClient getSnapshotClient(String snapshot) { - return new BlobAsyncClient(new AzureBlobStorageBuilder() - .url(getBlobUrl()) - .pipeline(getHttpPipeline()) - .version(getServiceVersion()) - .build(), getSnapshotId(), getCustomerProvidedKey(), accountName); + return new BlobAsyncClient(getHttpPipeline(), getBlobUrl(), getServiceVersion(), getAccountName(), + getContainerName(), getBlobName(), snapshot, getCustomerProvidedKey()); } /** @@ -134,12 +134,8 @@ private SpecializedBlobClientBuilder prepareBuilder() { SpecializedBlobClientBuilder builder = new SpecializedBlobClientBuilder() .pipeline(getHttpPipeline()) .endpoint(getBlobUrl()) - .snapshot(getSnapshotId()); - - Optional version = Arrays.stream(BlobServiceVersion.values()) - .filter(en -> Objects.equals(en.getVersion(), azureBlobStorage.getVersion())) - .findFirst(); - builder.serviceVersion(version.orElseGet(BlobServiceVersion::getLatest)); + .snapshot(getSnapshotId()) + .serviceVersion(getServiceVersion()); CpkInfo cpk = getCustomerProvidedKey(); if (cpk != null) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java index 61bb73c6c445..01dc6c840831 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java @@ -13,7 +13,6 @@ import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.util.BuilderHelper; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; @@ -115,9 +114,9 @@ public BlobAsyncClient buildAsyncClient() { Implicit and explicit root container access are functionally equivalent, but explicit references are easier to read and debug. */ - if (Objects.isNull(containerName) || containerName.isEmpty()) { - containerName = BlobContainerAsyncClient.ROOT_CONTAINER_NAME; - } + String blobContainerName = ImplUtils.isNullOrEmpty(containerName) + ? BlobContainerAsyncClient.ROOT_CONTAINER_NAME + : containerName; BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); @@ -133,11 +132,8 @@ public BlobAsyncClient buildAsyncClient() { } }, retryOptions, logOptions, httpClient, additionalPolicies, configuration, serviceVersion); - return new BlobAsyncClient(new AzureBlobStorageBuilder() - .url(String.format("%s/%s/%s", endpoint, containerName, blobName)) - .pipeline(pipeline) - .version(serviceVersion.getVersion()) - .build(), snapshot, customerProvidedKey, accountName); + return new BlobAsyncClient(pipeline, String.format("%s/%s/%s", endpoint, blobContainerName, blobName), + serviceVersion, accountName, blobContainerName, blobName, snapshot, customerProvidedKey); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index bc38268a638e..8ca108b7e7a1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -75,18 +75,35 @@ public final class BlobContainerAsyncClient { private final ClientLogger logger = new ClientLogger(BlobContainerAsyncClient.class); private final AzureBlobStorageImpl azureBlobStorage; - private final CpkInfo customerProvidedKey; // only used to pass down to blob clients + private final String accountName; + private final String containerName; + private final BlobServiceVersion serviceVersion; + private final CpkInfo customerProvidedKey; // only used to pass down to blob clients /** * Package-private constructor for use by {@link BlobContainerClientBuilder}. * - * @param azureBlobStorage the API client for blob storage - */ - BlobContainerAsyncClient(AzureBlobStorageImpl azureBlobStorage, CpkInfo cpk, String accountName) { - this.azureBlobStorage = azureBlobStorage; - this.customerProvidedKey = cpk; + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + */ + BlobContainerAsyncClient(HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, + String accountName, String containerName, CpkInfo customerProvidedKey) { + this.azureBlobStorage = new AzureBlobStorageBuilder() + .pipeline(pipeline) + .url(url) + .version(serviceVersion.getVersion()) + .build(); + this.serviceVersion = serviceVersion; + this.accountName = accountName; + this.containerName = containerName; + this.customerProvidedKey = customerProvidedKey; } /** @@ -121,11 +138,9 @@ public BlobAsyncClient getBlobAsyncClient(String blobName) { * @return A new {@link BlobAsyncClient} object which references the blob with the specified name in this container. */ public BlobAsyncClient getBlobAsyncClient(String blobName, String snapshot) { - return new BlobAsyncClient(new AzureBlobStorageBuilder() - .url(Utility.appendToUrlPath(getBlobContainerUrl(), blobName).toString()) - .pipeline(getHttpPipeline()) - .version(getServiceVersion()) - .build(), snapshot, customerProvidedKey, accountName); + return new BlobAsyncClient(getHttpPipeline(), + Utility.appendToUrlPath(getBlobContainerUrl(), blobName).toString(), getServiceVersion(), getAccountName(), + getBlobContainerName(), blobName, snapshot, getCustomerProvidedKey()); } /** @@ -147,7 +162,7 @@ public String getBlobContainerUrl() { * @return The name of container. */ public String getBlobContainerName() { - return BlobUrlParts.parse(this.azureBlobStorage.getUrl(), logger).getBlobContainerName(); + return containerName; } /** @@ -164,8 +179,8 @@ public String getAccountName() { * * @return the service version the client is using. */ - public String getServiceVersion() { - return this.azureBlobStorage.getVersion(); + public BlobServiceVersion getServiceVersion() { + return serviceVersion; } /** @@ -609,13 +624,13 @@ OffsetDateTime.now will only give back milliseconds (more precise fields are zer * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.listBlobsFlat} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.listBlobs} * * @return A reactive response emitting the flattened blobs. */ - public PagedFlux listBlobsFlat() { + public PagedFlux listBlobs() { try { - return this.listBlobsFlat(new ListBlobsOptions()); + return this.listBlobs(new ListBlobsOptions()); } catch (RuntimeException ex) { return pagedFluxError(logger, ex); } @@ -641,12 +656,12 @@ public PagedFlux listBlobsFlat() { * * * - * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.listBlobsFlat#ListBlobsOptions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.listBlobs#ListBlobsOptions} * * @param options {@link ListBlobsOptions} * @return A reactive response emitting the listed blobs, flattened. */ - public PagedFlux listBlobsFlat(ListBlobsOptions options) { + public PagedFlux listBlobs(ListBlobsOptions options) { try { return listBlobsFlatWithOptionalTimeout(options, null); } catch (RuntimeException ex) { @@ -735,14 +750,14 @@ private Mono listBlobsFlatSegment(String * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.listBlobsHierarchy#String} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.listBlobsByHierarchy#String} * * @param directory The directory to list blobs underneath * @return A reactive response emitting the prefixes and blobs. */ - public PagedFlux listBlobsHierarchy(String directory) { + public PagedFlux listBlobsByHierarchy(String directory) { try { - return this.listBlobsHierarchy("/", new ListBlobsOptions().setPrefix(directory)); + return this.listBlobsByHierarchy("/", new ListBlobsOptions().setPrefix(directory)); } catch (RuntimeException ex) { return pagedFluxError(logger, ex); } @@ -774,13 +789,13 @@ public PagedFlux listBlobsHierarchy(String directory) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.listBlobsHierarchy#String-ListBlobsOptions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.listBlobsByHierarchy#String-ListBlobsOptions} * * @param delimiter The delimiter for blob hierarchy, "/" for hierarchy based on directories * @param options {@link ListBlobsOptions} * @return A reactive response emitting the prefixes and blobs. */ - public PagedFlux listBlobsHierarchy(String delimiter, ListBlobsOptions options) { + public PagedFlux listBlobsByHierarchy(String delimiter, ListBlobsOptions options) { try { return listBlobsHierarchyWithOptionalTimeout(delimiter, options, null); } catch (RuntimeException ex) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 1126b6664e3e..103d3fabe9df 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -129,7 +129,7 @@ public String getAccountName() { * * @return the service version the client is using. */ - public String getServiceVersion() { + public BlobServiceVersion getServiceVersion() { return this.blobContainerAsyncClient.getServiceVersion(); } @@ -424,12 +424,12 @@ public Response setAccessPolicyWithResponse(PublicAccessType accessType, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerClient.listBlobsFlat} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.listBlobs} * * @return The listed blobs, flattened. */ - public PagedIterable listBlobsFlat() { - return this.listBlobsFlat(new ListBlobsOptions(), null); + public PagedIterable listBlobs() { + return this.listBlobs(new ListBlobsOptions(), null); } /** @@ -445,13 +445,13 @@ public PagedIterable listBlobsFlat() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerClient.listBlobsFlat#ListBlobsOptions-Duration} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.listBlobs#ListBlobsOptions-Duration} * * @param options {@link ListBlobsOptions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return The listed blobs, flattened. */ - public PagedIterable listBlobsFlat(ListBlobsOptions options, Duration timeout) { + public PagedIterable listBlobs(ListBlobsOptions options, Duration timeout) { return new PagedIterable<>(blobContainerAsyncClient.listBlobsFlatWithOptionalTimeout(options, timeout)); } @@ -481,13 +481,13 @@ public PagedIterable listBlobsFlat(ListBlobsOptions options, Duration * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerClient.listBlobsHierarchy#String} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.listBlobsByHierarchy#String} * * @param directory The directory to list blobs underneath * @return A reactive response emitting the prefixes and blobs. */ - public PagedIterable listBlobsHierarchy(String directory) { - return this.listBlobsHierarchy("/", new ListBlobsOptions().setPrefix(directory), null); + public PagedIterable listBlobsByHierarchy(String directory) { + return this.listBlobsByHierarchy("/", new ListBlobsOptions().setPrefix(directory), null); } /** @@ -516,14 +516,14 @@ public PagedIterable listBlobsHierarchy(String directory) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerClient.listBlobsHierarchy#String-ListBlobsOptions-Duration} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.listBlobsByHierarchy#String-ListBlobsOptions-Duration} * * @param delimiter The delimiter for blob hierarchy, "/" for hierarchy based on directories * @param options {@link ListBlobsOptions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return A reactive response emitting the prefixes and blobs. */ - public PagedIterable listBlobsHierarchy(String delimiter, ListBlobsOptions options, Duration timeout) { + public PagedIterable listBlobsByHierarchy(String delimiter, ListBlobsOptions options, Duration timeout) { return new PagedIterable<>(blobContainerAsyncClient .listBlobsHierarchyWithOptionalTimeout(delimiter, options, timeout)); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java index f168af8f57d3..cba87f231fb1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java @@ -13,7 +13,6 @@ import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.util.BuilderHelper; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; @@ -100,9 +99,10 @@ public BlobContainerAsyncClient buildAsyncClient() { Implicit and explicit root container access are functionally equivalent, but explicit references are easier to read and debug. */ - if (Objects.isNull(containerName) || containerName.isEmpty()) { - containerName = BlobContainerAsyncClient.ROOT_CONTAINER_NAME; - } + String blobContainerName = ImplUtils.isNullOrEmpty(containerName) + ? BlobContainerAsyncClient.ROOT_CONTAINER_NAME + : containerName; + BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { @@ -117,11 +117,8 @@ public BlobContainerAsyncClient buildAsyncClient() { } }, retryOptions, logOptions, httpClient, additionalPolicies, configuration, serviceVersion); - return new BlobContainerAsyncClient(new AzureBlobStorageBuilder() - .url(String.format("%s/%s", endpoint, containerName)) - .pipeline(pipeline) - .version(serviceVersion.getVersion()) - .build(), customerProvidedKey, accountName); + return new BlobContainerAsyncClient(pipeline, String.format("%s/%s", endpoint, blobContainerName), + serviceVersion, accountName, blobContainerName, customerProvidedKey); } /** @@ -137,6 +134,7 @@ public BlobContainerClientBuilder endpoint(String endpoint) { BlobUrlParts parts = BlobUrlParts.parse(url); this.endpoint = parts.getScheme() + "://" + parts.getHost(); + this.accountName = parts.getAccountName(); this.containerName = parts.getBlobContainerName(); String sasToken = parts.getSasQueryParameters().encode(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java index 34f24ff792ab..8c5fad2f961d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java @@ -12,6 +12,7 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.http.PagedResponseBase; import com.azure.core.implementation.util.FluxUtil; +import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; @@ -63,18 +64,32 @@ public final class BlobServiceAsyncClient { private final ClientLogger logger = new ClientLogger(BlobServiceAsyncClient.class); private final AzureBlobStorageImpl azureBlobStorage; - private final CpkInfo customerProvidedKey; + private final String accountName; + private final BlobServiceVersion serviceVersion; + private final CpkInfo customerProvidedKey; /** * Package-private constructor for use by {@link BlobServiceClientBuilder}. * - * @param azureBlobStorage the API client for blob storage + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. */ - BlobServiceAsyncClient(AzureBlobStorageImpl azureBlobStorage, CpkInfo customerProvidedKey, String accountName) { - this.azureBlobStorage = azureBlobStorage; - this.customerProvidedKey = customerProvidedKey; + BlobServiceAsyncClient(HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, String accountName, + CpkInfo customerProvidedKey) { + this.azureBlobStorage = new AzureBlobStorageBuilder() + .pipeline(pipeline) + .url(url) + .version(serviceVersion.getVersion()) + .build(); + this.serviceVersion = serviceVersion; + this.accountName = accountName; + this.customerProvidedKey = customerProvidedKey; } /** @@ -91,15 +106,13 @@ public final class BlobServiceAsyncClient { * @return A {@link BlobContainerAsyncClient} object pointing to the specified container */ public BlobContainerAsyncClient getBlobContainerAsyncClient(String containerName) { - if (containerName == null || containerName.isEmpty()) { + if (ImplUtils.isNullOrEmpty(containerName)) { containerName = BlobContainerAsyncClient.ROOT_CONTAINER_NAME; } - return new BlobContainerAsyncClient(new AzureBlobStorageBuilder() - .url(Utility.appendToUrlPath(getAccountUrl(), containerName).toString()) - .pipeline(getHttpPipeline()) - .version(getServiceVersion()) - .build(), customerProvidedKey, accountName); + return new BlobContainerAsyncClient(getHttpPipeline(), + Utility.appendToUrlPath(getAccountUrl(), containerName).toString(), getServiceVersion(), getAccountName(), + containerName, customerProvidedKey); } /** @@ -116,8 +129,8 @@ public HttpPipeline getHttpPipeline() { * * @return the service version the client is using. */ - public String getServiceVersion() { - return this.azureBlobStorage.getVersion(); + public BlobServiceVersion getServiceVersion() { + return serviceVersion; } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index 59b4ac8134d2..a403aa378254 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -79,7 +79,7 @@ public HttpPipeline getHttpPipeline() { * * @return the service version the client is using. */ - public String getServiceVersion() { + public BlobServiceVersion getServiceVersion() { return this.blobServiceAsyncClient.getServiceVersion(); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java index 019941dcb319..b8d16c1f4087 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java @@ -13,7 +13,6 @@ import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.util.BuilderHelper; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; @@ -100,11 +99,7 @@ public BlobServiceAsyncClient buildAsyncClient() { } }, retryOptions, logOptions, httpClient, additionalPolicies, configuration, serviceVersion); - return new BlobServiceAsyncClient(new AzureBlobStorageBuilder() - .url(endpoint) - .pipeline(pipeline) - .version(serviceVersion.getVersion()) - .build(), customerProvidedKey, accountName); + return new BlobServiceAsyncClient(pipeline, endpoint, serviceVersion, accountName, customerProvidedKey); } /** @@ -116,10 +111,12 @@ public BlobServiceAsyncClient buildAsyncClient() { */ public BlobServiceClientBuilder endpoint(String endpoint) { try { - URL url = new URL(endpoint); - this.endpoint = url.getProtocol() + "://" + url.getAuthority(); + BlobUrlParts parts = BlobUrlParts.parse(new URL(endpoint)); - String sasToken = BlobUrlParts.parse(url).getSasQueryParameters().encode(); + this.accountName = parts.getAccountName(); + this.endpoint = parts.getScheme() + "://" + parts.getHost(); + + String sasToken = parts.getSasQueryParameters().encode(); if (!ImplUtils.isNullOrEmpty(sasToken)) { this.sasToken(sasToken); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java index ee646dc3f11e..acbb8d8dc325 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java @@ -7,8 +7,8 @@ import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.specialized.BlobServiceSasQueryParameters; -import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.Constants; import java.net.MalformedURLException; import java.net.URL; @@ -17,13 +17,19 @@ import java.util.Locale; import java.util.Map; import java.util.TreeMap; +import java.util.regex.Pattern; /** * This class represents the components that make up an Azure Storage Container/Blob URL. You may parse an * existing URL into its parts with the {@link #parse(URL)} class. You may construct a URL from parts by calling {@link - * #toURL()}. + * #toUrl()}. */ public final class BlobUrlParts { + private static final Pattern IP_V4_URL_PATTERN = Pattern + .compile("(?:\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|(?:localhost)"); + + private final ClientLogger logger = new ClientLogger(BlobUrlParts.class); + private String scheme; private String host; private String containerName; @@ -206,10 +212,10 @@ public BlobUrlParts setUnparsedParameters(Map unparsedParamete * Converts the blob URL parts to a {@link URL}. * * @return A {@code URL} to the blob resource composed of all the elements in this object. - * @throws MalformedURLException The fields present on the BlobUrlParts object were insufficient to construct a + * @throws IllegalStateException The fields present on the BlobUrlParts object were insufficient to construct a * valid URL or were ill-formatted. */ - public URL toURL() throws MalformedURLException { + public URL toUrl() { UrlBuilder url = new UrlBuilder().setScheme(this.scheme).setHost(this.host); StringBuilder path = new StringBuilder(); @@ -243,25 +249,33 @@ public URL toURL() throws MalformedURLException { Utility.urlEncode(String.join(",", entry.getValue()))); } - return url.toURL(); + try { + return url.toURL(); + } catch (MalformedURLException ex) { + throw logger.logExceptionAsError(new IllegalStateException("The URL parts created a malformed URL.")); + } } /** - * URLParser parses a string URL initializing BlobUrlParts' fields including any SAS-related and snapshot query - * parameters. Any other query parameters remain in the UnparsedParams field. This method overwrites all fields - * in the BlobUrlParts object. + * Parses a string into a BlobUrlParts. + * + *

    Query parameters will be parsed into two properties, {@link BlobServiceSasQueryParameters} which contains + * all SAS token related values and {@link #getUnparsedParameters() unparsedParameters} which is all other query + * parameters.

    + * + *

    If a URL points to a blob in the root container, and the root container is referenced implicitly, i.e. there + * is no path element for the container, the name of this blob in the root container will be set as the + * containerName field in the resulting {@code BlobURLParts}.

    * - * @param url The string URL to be parsed. - * @param logger Logger associated to the calling class to log a {@link MalformedURLException}. + * @param url The {@code URL} to be parsed. * @return A {@link BlobUrlParts} object containing all the components of a BlobURL. - * @throws IllegalArgumentException If the {@code url} is malformed. + * @throws IllegalArgumentException If {@code url} is a malformed {@link URL}. */ - public static BlobUrlParts parse(String url, ClientLogger logger) { + public static BlobUrlParts parse(String url) { try { return parse(new URL(url)); } catch (MalformedURLException e) { - throw logger.logExceptionAsError(new IllegalArgumentException("Please double check the URL format. URL: " - + url)); + throw new IllegalArgumentException("Invalid URL format. URL: " + url); } } @@ -280,13 +294,56 @@ public static BlobUrlParts parse(String url, ClientLogger logger) { * @return A {@link BlobUrlParts} object containing all the components of a BlobURL. */ public static BlobUrlParts parse(URL url) { + BlobUrlParts parts = new BlobUrlParts().setScheme(url.getProtocol()); + + if (IP_V4_URL_PATTERN.matcher(url.getHost()).find()) { + parseIpUrl(url, parts); + } else { + parseNonIpUrl(url, parts); + } + + Map queryParamsMap = parseQueryString(url.getQuery()); + + String[] snapshotArray = queryParamsMap.remove("snapshot"); + if (snapshotArray != null) { + parts.setSnapshot(snapshotArray[0]); + } - final String scheme = url.getProtocol(); - final String host = url.getHost(); + BlobServiceSasQueryParameters blobServiceSasQueryParameters = + new BlobServiceSasQueryParameters(queryParamsMap, true); + + return parts.setSasQueryParameters(blobServiceSasQueryParameters) + .setUnparsedParameters(queryParamsMap); + } + + /* + * Parse the IP url into its host, account name, container name, and blob name. + */ + private static void parseIpUrl(URL url, BlobUrlParts parts) { + parts.setHost(url.getAuthority()); + + String path = url.getPath(); + if (path.charAt(0) == '/') { + path = path.substring(1); + } + + String[] pathPieces = path.split("/", 3); + parts.setAccountName(pathPieces[0]); - String containerName = null; - String blobName = null; - String accountName = null; + if (pathPieces.length >= 3) { + parts.setContainerName(pathPieces[1]); + parts.setBlobName(pathPieces[2]); + } else if (pathPieces.length == 2) { + parts.setContainerName(pathPieces[1]); + } + } + + /* + * Parse the non-IP url into its host, account name, container name, and blob name. + */ + private static void parseNonIpUrl(URL url, BlobUrlParts parts) { + String host = url.getHost(); + parts.setHost(host); //Parse host to get account name // host will look like this : .blob.core.windows.net @@ -294,10 +351,10 @@ public static BlobUrlParts parse(URL url) { int accountNameIndex = host.indexOf('.'); if (accountNameIndex == -1) { // host only contains account name - accountName = host; + parts.setAccountName(host); } else { // if host is separated by . - accountName = host.substring(0, accountNameIndex); + parts.setAccountName(host.substring(0, accountNameIndex)); } } @@ -312,34 +369,15 @@ public static BlobUrlParts parse(URL url) { int containerEndIndex = path.indexOf('/'); if (containerEndIndex == -1) { // path contains only a container name and no blob name - containerName = path; + parts.setContainerName(path); } else { // path contains the container name up until the slash and blob name is everything after the slash - containerName = path.substring(0, containerEndIndex); - blobName = path.substring(containerEndIndex + 1); + parts.setContainerName(path.substring(0, containerEndIndex)); + parts.setBlobName(path.substring(containerEndIndex + 1)); } } - Map queryParamsMap = parseQueryString(url.getQuery()); - String snapshot = null; - String[] snapshotArray = queryParamsMap.get("snapshot"); - if (snapshotArray != null) { - snapshot = snapshotArray[0]; - queryParamsMap.remove("snapshot"); - } - BlobServiceSasQueryParameters blobServiceSasQueryParameters = - new BlobServiceSasQueryParameters(queryParamsMap, true); - - return new BlobUrlParts() - .setScheme(scheme) - .setHost(host) - .setContainerName(containerName) - .setBlobName(blobName) - .setSnapshot(snapshot) - .setAccountName(accountName) - .setSasQueryParameters(blobServiceSasQueryParameters) - .setUnparsedParameters(queryParamsMap); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java index 74dbd7c1d255..176d0235244f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java @@ -4,16 +4,16 @@ package com.azure.storage.blob.specialized; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobAsyncClient; -import com.azure.storage.blob.BlobClientBuilder; import com.azure.storage.blob.BlobContainerAsyncClient; import com.azure.storage.blob.BlobServiceAsyncClient; -import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.implementation.models.AppendBlobAppendBlockFromUrlHeaders; import com.azure.storage.blob.implementation.models.AppendBlobAppendBlockHeaders; import com.azure.storage.blob.implementation.models.AppendBlobCreateHeaders; @@ -71,12 +71,21 @@ public final class AppendBlobAsyncClient extends BlobAsyncClientBase { public static final int MAX_BLOCKS = 50000; /** - * Package-private constructor for use by {@link BlobClientBuilder}. + * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. * - * @param azureBlobStorage the API client for blob storage + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param blobName The blob name. + * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. */ - AppendBlobAsyncClient(AzureBlobStorageImpl azureBlobStorage, String snapshot, CpkInfo cpk, String accountName) { - super(azureBlobStorage, snapshot, cpk, accountName); + AppendBlobAsyncClient(HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, + String accountName, String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey) { + super(pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index 47ae338611a8..b940c83b38f3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -11,7 +11,7 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobProperties; -import com.azure.storage.blob.BlobUrlParts; +import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.HttpGetterInfo; import com.azure.storage.blob.ProgressReceiver; import com.azure.storage.blob.ProgressReporter; @@ -76,22 +76,37 @@ public class BlobAsyncClientBase { private final String snapshot; private final CpkInfo customerProvidedKey; protected final String accountName; + protected final String containerName; + protected final String blobName; + protected final BlobServiceVersion serviceVersion; /** * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. * - * @param azureBlobStorage the API client for blob storage - * @param snapshot Optional. The snapshot identifier for the snapshot blob. - * @param customerProvidedKey Optional. Customer provided key used during encryption of the blob's data on the - * server. - * @param accountName The account name for storage account. + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param blobName The blob name. + * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. */ - protected BlobAsyncClientBase(AzureBlobStorageImpl azureBlobStorage, String snapshot, - CpkInfo customerProvidedKey, String accountName) { - this.azureBlobStorage = azureBlobStorage; + protected BlobAsyncClientBase(HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, + String accountName, String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey) { + this.azureBlobStorage = new AzureBlobStorageBuilder() + .pipeline(pipeline) + .url(url) + .version(serviceVersion.getVersion()) + .build(); + this.serviceVersion = serviceVersion; + + this.accountName = accountName; + this.containerName = containerName; + this.blobName = blobName; this.snapshot = snapshot; this.customerProvidedKey = customerProvidedKey; - this.accountName = accountName; } /** @@ -101,11 +116,8 @@ protected BlobAsyncClientBase(AzureBlobStorageImpl azureBlobStorage, String snap * @return a {@link BlobAsyncClientBase} used to interact with the specific snapshot. */ public BlobAsyncClientBase getSnapshotClient(String snapshot) { - return new BlobAsyncClientBase(new AzureBlobStorageBuilder() - .url(getBlobUrl()) - .pipeline(azureBlobStorage.getHttpPipeline()) - .version(getServiceVersion()) - .build(), snapshot, customerProvidedKey, accountName); + return new BlobAsyncClientBase(getHttpPipeline(), getBlobUrl(), getServiceVersion(), getAccountName(), + getContainerName(), getBlobName(), snapshot, getCustomerProvidedKey()); } /** @@ -135,7 +147,7 @@ public String getBlobUrl() { * @return The name of the container. */ public final String getContainerName() { - return BlobUrlParts.parse(this.azureBlobStorage.getUrl(), logger).getBlobContainerName(); + return containerName; } /** @@ -148,7 +160,7 @@ public final String getContainerName() { * @return The name of the blob. */ public final String getBlobName() { - return BlobUrlParts.parse(this.azureBlobStorage.getUrl(), logger).getBlobName(); + return blobName; } /** @@ -175,7 +187,7 @@ public CpkInfo getCustomerProvidedKey() { * @return account name associated with this storage resource. */ public String getAccountName() { - return this.accountName; + return accountName; } /** @@ -183,8 +195,8 @@ public String getAccountName() { * * @return the service version the client is using. */ - public String getServiceVersion() { - return this.azureBlobStorage.getVersion(); + public BlobServiceVersion getServiceVersion() { + return serviceVersion; } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index c7e0e98fde2f..83bbedbdda63 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -11,6 +11,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.BlobProperties; +import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; @@ -82,7 +83,7 @@ public String getBlobUrl() { * @return account name associated with this storage resource. */ public String getAccountName() { - return this.client.getAccountName(); + return client.getAccountName(); } /** @@ -134,8 +135,8 @@ public CpkInfo getCustomerProvidedKey() { * * @return the service version the client is using. */ - public String getServiceVersion() { - return this.client.getServiceVersion(); + public BlobServiceVersion getServiceVersion() { + return client.getServiceVersion(); } /** @@ -144,7 +145,7 @@ public String getServiceVersion() { * @return A string that represents the snapshotId of the snapshot blob */ public String getSnapshotId() { - return this.client.getSnapshotId(); + return client.getSnapshotId(); } /** @@ -153,7 +154,7 @@ public String getSnapshotId() { * @return A boolean that indicates if a blob is a snapshot */ public boolean isSnapshot() { - return this.client.isSnapshot(); + return client.isSnapshot(); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java index b372f542ff87..23de1d1e4bbb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java @@ -4,13 +4,14 @@ package com.azure.storage.blob.specialized; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobAsyncClient; -import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.implementation.models.BlockBlobCommitBlockListHeaders; import com.azure.storage.blob.implementation.models.BlockBlobUploadHeaders; import com.azure.storage.blob.models.AccessTier; @@ -74,10 +75,19 @@ public final class BlockBlobAsyncClient extends BlobAsyncClientBase { /** * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. * - * @param azureBlobStorage the API client for blob storage + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param blobName The blob name. + * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. */ - BlockBlobAsyncClient(AzureBlobStorageImpl azureBlobStorage, String snapshot, CpkInfo cpk, String accountName) { - super(azureBlobStorage, snapshot, cpk, accountName); + BlockBlobAsyncClient(HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, + String accountName, String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey) { + super(pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClientBuilder.java index 43c02dbed822..ac13ce940a00 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClientBuilder.java @@ -9,6 +9,7 @@ import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.BlobContainerAsyncClient; import com.azure.storage.blob.BlobContainerClient; +import com.azure.storage.blob.BlobServiceVersion; import java.net.URL; import java.util.Objects; @@ -46,7 +47,7 @@ public final class LeaseClientBuilder { private String leaseId; private boolean isBlob; private String accountName; - private String serviceVersion; + private BlobServiceVersion serviceVersion; /** * Creates a {@link LeaseClient} based on the configurations set in the builder. @@ -63,7 +64,8 @@ public LeaseClient buildClient() { * @return a {@link LeaseAsyncClient} based on the configurations in this builder. */ public LeaseAsyncClient buildAsyncClient() { - return new LeaseAsyncClient(pipeline, url, getLeaseId(), isBlob, accountName, serviceVersion); + BlobServiceVersion version = (serviceVersion == null) ? BlobServiceVersion.getLatest() : serviceVersion; + return new LeaseAsyncClient(pipeline, url, getLeaseId(), isBlob, accountName, version.getVersion()); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java index efdf679c0b20..fc8d95cdeb67 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.specialized; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.http.UrlBuilder; @@ -11,7 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobAsyncClient; -import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.implementation.models.PageBlobClearPagesHeaders; import com.azure.storage.blob.implementation.models.PageBlobCreateHeaders; import com.azure.storage.blob.implementation.models.PageBlobResizeHeaders; @@ -74,10 +75,19 @@ public final class PageBlobAsyncClient extends BlobAsyncClientBase { /** * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. * - * @param azureBlobStorage the API client for blob storage + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param blobName The blob name. + * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. */ - PageBlobAsyncClient(AzureBlobStorageImpl azureBlobStorage, String snapshot, CpkInfo cpk, String accountName) { - super(azureBlobStorage, snapshot, cpk, accountName); + PageBlobAsyncClient(HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, + String accountName, String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey) { + super(pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java index 7bcdba2019f3..6ec701ae74cb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java @@ -17,8 +17,6 @@ import com.azure.storage.blob.BlobContainerClient; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.BlobUrlParts; -import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; -import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.implementation.util.BuilderHelper; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; @@ -38,7 +36,6 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Objects; @@ -104,7 +101,12 @@ public AppendBlobClient buildAppendBlobClient() { * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. */ public AppendBlobAsyncClient buildAppendBlobAsyncClient() { - return new AppendBlobAsyncClient(constructImpl(), snapshot, customerProvidedKey, accountName); + validateConstruction(); + String containerName = getContainerName(); + BlobServiceVersion serviceVersion = getServiceVersion(); + + return new AppendBlobAsyncClient(getHttpPipeline(serviceVersion), getUrl(containerName), serviceVersion, + accountName, containerName, blobName, snapshot, customerProvidedKey); } /** @@ -131,7 +133,12 @@ public BlockBlobClient buildBlockBlobClient() { * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. */ public BlockBlobAsyncClient buildBlockBlobAsyncClient() { - return new BlockBlobAsyncClient(constructImpl(), snapshot, customerProvidedKey, accountName); + validateConstruction(); + String containerName = getContainerName(); + BlobServiceVersion serviceVersion = getServiceVersion(); + + return new BlockBlobAsyncClient(getHttpPipeline(serviceVersion), getUrl(containerName), serviceVersion, + accountName, containerName, blobName, snapshot, customerProvidedKey); } /** @@ -157,23 +164,35 @@ public PageBlobClient buildPageBlobClient() { * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. */ public PageBlobAsyncClient buildPageBlobAsyncClient() { - return new PageBlobAsyncClient(constructImpl(), snapshot, customerProvidedKey, accountName); + validateConstruction(); + String containerName = getContainerName(); + BlobServiceVersion serviceVersion = getServiceVersion(); + + return new PageBlobAsyncClient(getHttpPipeline(serviceVersion), getUrl(containerName), serviceVersion, + accountName, containerName, blobName, snapshot, customerProvidedKey); } - private AzureBlobStorageImpl constructImpl() { + /* + * Validate that the builder is able to construct a client. + */ + private void validateConstruction() { Objects.requireNonNull(blobName, "'blobName' cannot be null."); Objects.requireNonNull(endpoint, "'endpoint' cannot be null"); + } - /* - Implicit and explicit root container access are functionally equivalent, but explicit references are easier - to read and debug. - */ - if (Objects.isNull(containerName) || containerName.isEmpty()) { - containerName = BlobContainerAsyncClient.ROOT_CONTAINER_NAME; - } - BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); + /* + * Gets the container name to use in this client, if no container name has been passed the root container will be + * used. + * + * Implicit and explicit root container access are functionally equivalent, but explicit references are easier to + * read and debug. + */ + private String getContainerName() { + return ImplUtils.isNullOrEmpty(containerName) ? BlobContainerAsyncClient.ROOT_CONTAINER_NAME : containerName; + } - HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { + private HttpPipeline getHttpPipeline(BlobServiceVersion serviceVersion) { + return (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { if (storageSharedKeyCredential != null) { return new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential); } else if (tokenCredential != null) { @@ -184,12 +203,14 @@ private AzureBlobStorageImpl constructImpl() { return null; } }, retryOptions, logOptions, httpClient, additionalPolicies, configuration, serviceVersion); + } - return new AzureBlobStorageBuilder() - .pipeline(pipeline) - .url(String.format("%s/%s/%s", endpoint, containerName, blobName)) - .version(serviceVersion.getVersion()) - .build(); + private BlobServiceVersion getServiceVersion() { + return (version != null) ? version : BlobServiceVersion.getLatest(); + } + + private String getUrl(String containerName) { + return String.format("%s/%s/%s", endpoint, containerName, blobName); } /** @@ -201,7 +222,7 @@ private AzureBlobStorageImpl constructImpl() { public SpecializedBlobClientBuilder blobClient(BlobClientBase blobClient) { pipeline(blobClient.getHttpPipeline()); endpoint(blobClient.getBlobUrl()); - serviceVersion(fromClientVersion(blobClient.getServiceVersion())); + serviceVersion(blobClient.getServiceVersion()); this.snapshot = blobClient.getSnapshotId(); this.customerProvidedKey = blobClient.getCustomerProvidedKey(); return this; @@ -216,7 +237,7 @@ public SpecializedBlobClientBuilder blobClient(BlobClientBase blobClient) { public SpecializedBlobClientBuilder blobAsyncClient(BlobAsyncClientBase blobAsyncClient) { pipeline(blobAsyncClient.getHttpPipeline()); endpoint(blobAsyncClient.getBlobUrl()); - serviceVersion(fromClientVersion(blobAsyncClient.getServiceVersion())); + serviceVersion(blobAsyncClient.getServiceVersion()); this.snapshot = blobAsyncClient.getSnapshotId(); this.customerProvidedKey = blobAsyncClient.getCustomerProvidedKey(); return this; @@ -232,7 +253,7 @@ public SpecializedBlobClientBuilder blobAsyncClient(BlobAsyncClientBase blobAsyn public SpecializedBlobClientBuilder containerClient(BlobContainerClient blobContainerClient, String blobName) { pipeline(blobContainerClient.getHttpPipeline()); endpoint(blobContainerClient.getBlobContainerUrl()); - serviceVersion(fromClientVersion(blobContainerClient.getServiceVersion())); + serviceVersion(blobContainerClient.getServiceVersion()); blobName(blobName); this.customerProvidedKey = blobContainerClient.getCustomerProvidedKey(); return this; @@ -250,7 +271,7 @@ public SpecializedBlobClientBuilder containerAsyncClient(BlobContainerAsyncClien String blobName) { pipeline(blobContainerAsyncClient.getHttpPipeline()); endpoint(blobContainerAsyncClient.getBlobContainerUrl()); - serviceVersion(fromClientVersion(blobContainerAsyncClient.getServiceVersion())); + serviceVersion(blobContainerAsyncClient.getServiceVersion()); blobName(blobName); this.customerProvidedKey = blobContainerAsyncClient.getCustomerProvidedKey(); return this; @@ -523,11 +544,4 @@ public SpecializedBlobClientBuilder serviceVersion(BlobServiceVersion version) { this.version = version; return this; } - - private static BlobServiceVersion fromClientVersion(String version) { - return Arrays.stream(BlobServiceVersion.values()) - .filter(en -> Objects.equals(en.getVersion(), version)) - .findFirst() - .orElseGet(BlobServiceVersion::getLatest); - } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java index c3f34c4100ca..db71b55ef187 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java @@ -112,7 +112,7 @@ public static void main(String[] args) throws IOException { /* * List the blob(s) in our container. */ - blobContainerClient.listBlobsFlat() + blobContainerClient.listBlobs() .forEach(blobItem -> System.out.println("Blob name: " + blobItem.getName() + ", Snapshot: " + blobItem.getSnapshot())); /* diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java index 3fe0c78617ca..25f3a2e68d75 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java @@ -260,63 +260,63 @@ public void setAccessPolicy2() { } /** - * Code snippet for {@link BlobContainerAsyncClient#listBlobsFlat()} + * Code snippet for {@link BlobContainerAsyncClient#listBlobs()} */ public void listBlobsFlat() { - // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsFlat - client.listBlobsFlat().subscribe(blob -> + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.listBlobs + client.listBlobs().subscribe(blob -> System.out.printf("Name: %s, Directory? %b%n", blob.getName(), blob.isPrefix())); - // END: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsFlat + // END: com.azure.storage.blob.BlobContainerAsyncClient.listBlobs } /** - * Code snippet for {@link BlobContainerAsyncClient#listBlobsFlat(ListBlobsOptions)} + * Code snippet for {@link BlobContainerAsyncClient#listBlobs(ListBlobsOptions)} */ public void listBlobsFlat2() { - // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsFlat#ListBlobsOptions + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.listBlobs#ListBlobsOptions ListBlobsOptions options = new ListBlobsOptions() .setPrefix("prefixToMatch") .setDetails(new BlobListDetails() .setRetrieveDeletedBlobs(true) .setRetrieveSnapshots(true)); - client.listBlobsFlat(options).subscribe(blob -> + client.listBlobs(options).subscribe(blob -> System.out.printf("Name: %s, Directory? %b, Deleted? %b, Snapshot ID: %s%n", blob.getName(), blob.isPrefix(), blob.isDeleted(), blob.getSnapshot())); - // END: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsFlat#ListBlobsOptions + // END: com.azure.storage.blob.BlobContainerAsyncClient.listBlobs#ListBlobsOptions } /** - * Code snippet for {@link BlobContainerAsyncClient#listBlobsHierarchy(String)} + * Code snippet for {@link BlobContainerAsyncClient#listBlobsByHierarchy(String)} */ public void listBlobsHierarchy() { - // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsHierarchy#String - client.listBlobsHierarchy("directoryName").subscribe(blob -> + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsByHierarchy#String + client.listBlobsByHierarchy("directoryName").subscribe(blob -> System.out.printf("Name: %s, Directory? %b%n", blob.getName(), blob.isDeleted())); - // END: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsHierarchy#String + // END: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsByHierarchy#String } /** - * Code snippet for {@link BlobContainerAsyncClient#listBlobsHierarchy(String, ListBlobsOptions)} + * Code snippet for {@link BlobContainerAsyncClient#listBlobsByHierarchy(String, ListBlobsOptions)} */ public void listBlobsHierarchy2() { - // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsHierarchy#String-ListBlobsOptions + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsByHierarchy#String-ListBlobsOptions ListBlobsOptions options = new ListBlobsOptions() .setPrefix("directoryName") .setDetails(new BlobListDetails() .setRetrieveDeletedBlobs(true) .setRetrieveSnapshots(true)); - client.listBlobsHierarchy("/", options).subscribe(blob -> + client.listBlobsByHierarchy("/", options).subscribe(blob -> System.out.printf("Name: %s, Directory? %b, Deleted? %b, Snapshot ID: %s%n", blob.getName(), blob.isPrefix(), blob.isDeleted(), blob.getSnapshot())); - // END: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsHierarchy#String-ListBlobsOptions + // END: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsByHierarchy#String-ListBlobsOptions } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java index 4b121914a705..6e72cf732a66 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java @@ -277,63 +277,63 @@ public void setAccessPolicy2() { } /** - * Code snippet for {@link BlobContainerClient#listBlobsFlat()} + * Code snippet for {@link BlobContainerClient#listBlobs()} */ public void listBlobsFlat() { - // BEGIN: com.azure.storage.blob.BlobContainerClient.listBlobsFlat - client.listBlobsFlat().forEach(blob -> + // BEGIN: com.azure.storage.blob.BlobContainerClient.listBlobs + client.listBlobs().forEach(blob -> System.out.printf("Name: %s, Directory? %b%n", blob.getName(), blob.isPrefix())); - // END: com.azure.storage.blob.BlobContainerClient.listBlobsFlat + // END: com.azure.storage.blob.BlobContainerClient.listBlobs } /** - * Code snippet for {@link BlobContainerClient#listBlobsFlat(ListBlobsOptions, Duration)} + * Code snippet for {@link BlobContainerClient#listBlobs(ListBlobsOptions, Duration)} */ public void listBlobsFlat2() { - // BEGIN: com.azure.storage.blob.BlobContainerClient.listBlobsFlat#ListBlobsOptions-Duration + // BEGIN: com.azure.storage.blob.BlobContainerClient.listBlobs#ListBlobsOptions-Duration ListBlobsOptions options = new ListBlobsOptions() .setPrefix("prefixToMatch") .setDetails(new BlobListDetails() .setRetrieveDeletedBlobs(true) .setRetrieveSnapshots(true)); - client.listBlobsFlat(options, timeout).forEach(blob -> + client.listBlobs(options, timeout).forEach(blob -> System.out.printf("Name: %s, Directory? %b, Deleted? %b, Snapshot ID: %s%n", blob.getName(), blob.isPrefix(), blob.isDeleted(), blob.getSnapshot())); - // END: com.azure.storage.blob.BlobContainerClient.listBlobsFlat#ListBlobsOptions-Duration + // END: com.azure.storage.blob.BlobContainerClient.listBlobs#ListBlobsOptions-Duration } /** - * Code snippet for {@link BlobContainerClient#listBlobsHierarchy(String)} + * Code snippet for {@link BlobContainerClient#listBlobsByHierarchy(String)} */ public void listBlobsHierarchy() { - // BEGIN: com.azure.storage.blob.BlobContainerClient.listBlobsHierarchy#String - client.listBlobsHierarchy("directoryName").forEach(blob -> + // BEGIN: com.azure.storage.blob.BlobContainerClient.listBlobsByHierarchy#String + client.listBlobsByHierarchy("directoryName").forEach(blob -> System.out.printf("Name: %s, Directory? %b%n", blob.getName(), blob.isPrefix())); - // END: com.azure.storage.blob.BlobContainerClient.listBlobsHierarchy#String + // END: com.azure.storage.blob.BlobContainerClient.listBlobsByHierarchy#String } /** - * Code snippet for {@link BlobContainerClient#listBlobsHierarchy(String, ListBlobsOptions, Duration)} + * Code snippet for {@link BlobContainerClient#listBlobsByHierarchy(String, ListBlobsOptions, Duration)} */ public void listBlobsHierarchy2() { - // BEGIN: com.azure.storage.blob.BlobContainerClient.listBlobsHierarchy#String-ListBlobsOptions-Duration + // BEGIN: com.azure.storage.blob.BlobContainerClient.listBlobsByHierarchy#String-ListBlobsOptions-Duration ListBlobsOptions options = new ListBlobsOptions() .setPrefix("directoryName") .setDetails(new BlobListDetails() .setRetrieveDeletedBlobs(true) .setRetrieveSnapshots(true)); - client.listBlobsHierarchy("/", options, timeout).forEach(blob -> + client.listBlobsByHierarchy("/", options, timeout).forEach(blob -> System.out.printf("Name: %s, Directory? %b, Deleted? %b, Snapshot ID: %s%n", blob.getName(), blob.isPrefix(), blob.isDeleted(), blob.getSnapshot())); - // END: com.azure.storage.blob.BlobContainerClient.listBlobsHierarchy#String-ListBlobsOptions-Duration + // END: com.azure.storage.blob.BlobContainerClient.listBlobsByHierarchy#String-ListBlobsOptions-Duration } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java index c49f1c4d1ff1..e11d9da1debc 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java @@ -3,6 +3,7 @@ package com.azure.storage.blob.specialized; +import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; @@ -26,7 +27,8 @@ */ @SuppressWarnings("unused") public class BlobAsyncClientBaseJavaDocCodeSnippets { - private BlobAsyncClientBase client = new BlobAsyncClientBase(null, null, null, null); + private BlobAsyncClientBase client = new BlobAsyncClientBase(null, null, BlobServiceVersion.getLatest(), + null, null, null, null, null); private String leaseId = "leaseId"; private String copyId = "copyId"; private String url = "https://sample.com"; diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy index 81fca117d2ed..b1d3cf0a8444 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy @@ -1202,7 +1202,7 @@ class BlobAPITest extends APISpec { bc.deleteWithResponse(option, null, null, null) then: - cc.listBlobsFlat().stream().count() == blobsRemaining + cc.listBlobs().stream().count() == blobsRemaining where: option | blobsRemaining @@ -1291,7 +1291,7 @@ class BlobAPITest extends APISpec { headers.getValue("x-ms-version") != null headers.getValue("x-ms-request-id") != null bc.getProperties().getAccessTier() == tier - cc.listBlobsFlat().iterator().next().getProperties().getAccessTier() == tier + cc.listBlobs().iterator().next().getProperties().getAccessTier() == tier cleanup: cc.delete() @@ -1316,7 +1316,7 @@ class BlobAPITest extends APISpec { then: bc.getProperties().getAccessTier() == tier - cc.listBlobsFlat().iterator().next().getProperties().getAccessTier() == tier + cc.listBlobs().iterator().next().getProperties().getAccessTier() == tier cleanup: cc.delete() @@ -1356,12 +1356,12 @@ class BlobAPITest extends APISpec { when: def inferred1 = bc.getProperties().isAccessTierInferred() - def inferredList1 = cc.listBlobsFlat().iterator().next().getProperties().isAccessTierInferred() + def inferredList1 = cc.listBlobs().iterator().next().getProperties().isAccessTierInferred() bc.setAccessTier(AccessTier.HOT) def inferred2 = bc.getProperties().isAccessTierInferred() - def inferredList2 = cc.listBlobsFlat().iterator().next().getProperties().isAccessTierInferred() + def inferredList2 = cc.listBlobs().iterator().next().getProperties().isAccessTierInferred() then: inferred1 @@ -1383,7 +1383,7 @@ class BlobAPITest extends APISpec { then: bc.getProperties().getArchiveStatus() == status - cc.listBlobsFlat().iterator().next().getProperties().getArchiveStatus() == status + cc.listBlobs().iterator().next().getProperties().getArchiveStatus() == status where: sourceTier | destTier | priority | status diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy index bedc47ecd117..8c6ab5810c53 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy @@ -565,7 +565,7 @@ class ContainerAPITest extends APISpec { bu.upload(defaultInputStream.get(), 7) when: - def blobs = cc.listBlobsFlat(new ListBlobsOptions().setPrefix(blobPrefix), null).iterator() + def blobs = cc.listBlobs(new ListBlobsOptions().setPrefix(blobPrefix), null).iterator() //ContainerListBlobFlatSegmentHeaders headers = response.headers() //List blobs = responseiterator()() @@ -615,7 +615,7 @@ class ContainerAPITest extends APISpec { bu.create(512) when: - def blobs = ccPremium.listBlobsFlat(new ListBlobsOptions().setPrefix(blobPrefix), null).iterator() + def blobs = ccPremium.listBlobs(new ListBlobsOptions().setPrefix(blobPrefix), null).iterator() //ContainerListBlobFlatSegmentHeaders headers = response.headers() //List blobs = responseiterator()() @@ -661,7 +661,7 @@ class ContainerAPITest extends APISpec { def "List blobs flat min"() { when: - cc.listBlobsFlat().iterator().hasNext() + cc.listBlobs().iterator().hasNext() then: notThrown(BlobStorageException) @@ -709,7 +709,7 @@ class ContainerAPITest extends APISpec { setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - def blobs = cc.listBlobsFlat(options, null).stream().collect(Collectors.toList()) + def blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -733,7 +733,7 @@ class ContainerAPITest extends APISpec { setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - def blobs = cc.listBlobsFlat(options, null).stream().collect(Collectors.toList()) + def blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -754,7 +754,7 @@ class ContainerAPITest extends APISpec { def snapshotTime = setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - def blobs = cc.listBlobsFlat(options, null).stream().collect(Collectors.toList()) + def blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -773,7 +773,7 @@ class ContainerAPITest extends APISpec { setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - def blobs = cc.listBlobsFlat(options, null).stream().collect(Collectors.toList()) + def blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -791,7 +791,7 @@ class ContainerAPITest extends APISpec { when: def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveDeletedBlobs(true)) - def blobs = cc.listBlobsFlat(options, null).iterator() + def blobs = cc.listBlobs(options, null).iterator() then: blobs.next().getName() == name @@ -810,7 +810,7 @@ class ContainerAPITest extends APISpec { setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - def blobs = cc.listBlobsFlat(options, null).iterator() + def blobs = cc.listBlobs(options, null).iterator() then: blobs.next().getName() == normalName @@ -829,8 +829,8 @@ class ContainerAPITest extends APISpec { setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) expect: "Get first page of blob listings (sync and async)" - cc.listBlobsFlat(options, null).iterableByPage().iterator().next().getValue().size() == PAGE_SIZE - ccAsync.listBlobsFlat(options).byPage().blockFirst().getValue().size() == PAGE_SIZE + cc.listBlobs(options, null).iterableByPage().iterator().next().getValue().size() == PAGE_SIZE + ccAsync.listBlobs(options).byPage().blockFirst().getValue().size() == PAGE_SIZE } def "List blobs flat options fail"() { @@ -851,7 +851,7 @@ class ContainerAPITest extends APISpec { } when: "list blobs with sync client" - def pagedIterable = cc.listBlobsFlat(new ListBlobsOptions().setMaxResultsPerPage(PAGE_SIZE), null) + def pagedIterable = cc.listBlobs(new ListBlobsOptions().setMaxResultsPerPage(PAGE_SIZE), null) def pagedSyncResponse1 = pagedIterable.iterableByPage().iterator().next() def pagedSyncResponse2 = pagedIterable.iterableByPage(pagedSyncResponse1.getContinuationToken()).iterator().next() @@ -862,7 +862,7 @@ class ContainerAPITest extends APISpec { when: "list blobs with async client" - def pagedFlux = ccAsync.listBlobsFlat(new ListBlobsOptions().setMaxResultsPerPage(PAGE_SIZE)) + def pagedFlux = ccAsync.listBlobs(new ListBlobsOptions().setMaxResultsPerPage(PAGE_SIZE)) def pagedResponse1 = pagedFlux.byPage().blockFirst() def pagedResponse2 = pagedFlux.byPage(pagedResponse1.getContinuationToken()).blockFirst() @@ -877,7 +877,7 @@ class ContainerAPITest extends APISpec { cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: - cc.listBlobsFlat().iterator().hasNext() + cc.listBlobs().iterator().hasNext() then: thrown(BlobStorageException) @@ -896,7 +896,7 @@ class ContainerAPITest extends APISpec { } when: "Consume results by page" - cc.listBlobsFlat(new ListBlobsOptions().setMaxResultsPerPage(PAGE_RESULTS), Duration.ofSeconds(10)).streamByPage().count() + cc.listBlobs(new ListBlobsOptions().setMaxResultsPerPage(PAGE_RESULTS), Duration.ofSeconds(10)).streamByPage().count() then: "Still have paging functionality" notThrown(Exception) @@ -915,7 +915,7 @@ class ContainerAPITest extends APISpec { } when: "Consume results by page" - cc.listBlobsHierarchy("/", new ListBlobsOptions().setMaxResultsPerPage(PAGE_RESULTS), Duration.ofSeconds(10)).streamByPage().count() + cc.listBlobsByHierarchy("/", new ListBlobsOptions().setMaxResultsPerPage(PAGE_RESULTS), Duration.ofSeconds(10)).streamByPage().count() then: "Still have paging functionality" notThrown(Exception) @@ -928,7 +928,7 @@ class ContainerAPITest extends APISpec { bu.create(512) when: - def blobs = cc.listBlobsHierarchy(null).iterator() + def blobs = cc.listBlobsByHierarchy(null).iterator() then: // response.getStatusCode() == 200 @@ -942,7 +942,7 @@ class ContainerAPITest extends APISpec { def "List blobs hierarchy min"() { when: - cc.listBlobsHierarchy("/").iterator().hasNext() + cc.listBlobsByHierarchy("/").iterator().hasNext() then: notThrown(BlobStorageException) @@ -958,7 +958,7 @@ class ContainerAPITest extends APISpec { setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - def blobs = cc.listBlobsHierarchy("", options, null).stream().collect(Collectors.toList()) + def blobs = cc.listBlobsByHierarchy("", options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -982,7 +982,7 @@ class ContainerAPITest extends APISpec { setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - def blobs = cc.listBlobsHierarchy("", options, null).stream().collect(Collectors.toList()) + def blobs = cc.listBlobsByHierarchy("", options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -1003,7 +1003,7 @@ class ContainerAPITest extends APISpec { setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - def blobs = cc.listBlobsHierarchy("", options, null).stream().collect(Collectors.toList()) + def blobs = cc.listBlobsByHierarchy("", options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -1021,7 +1021,7 @@ class ContainerAPITest extends APISpec { when: def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveDeletedBlobs(true)) - def blobs = cc.listBlobsHierarchy("", options, null).iterator() + def blobs = cc.listBlobsByHierarchy("", options, null).iterator() then: blobs.next().getName() == name @@ -1040,7 +1040,7 @@ class ContainerAPITest extends APISpec { setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - def blobs = cc.listBlobsHierarchy("", options, null).iterator() + def blobs = cc.listBlobsByHierarchy("", options, null).iterator() then: blobs.next().getName() == normalName @@ -1060,7 +1060,7 @@ class ContainerAPITest extends APISpec { when: // use async client, as there is no paging functionality for sync yet - def blobs = ccAsync.listBlobsHierarchy("", options).byPage().blockFirst() + def blobs = ccAsync.listBlobsByHierarchy("", options).byPage().blockFirst() then: blobs.getValue().size() == 1 @@ -1071,7 +1071,7 @@ class ContainerAPITest extends APISpec { when: def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveSnapshots(snapshots)) .setMaxResultsPerPage(maxResults) - cc.listBlobsHierarchy(null, options, null).iterator().hasNext() + cc.listBlobsByHierarchy(null, options, null).iterator().hasNext() then: thrown(exceptionType) @@ -1093,7 +1093,7 @@ class ContainerAPITest extends APISpec { when: def foundBlobs = [] as Set def foundPrefixes = [] as Set - cc.listBlobsHierarchy(null).stream().collect(Collectors.toList()) + cc.listBlobsByHierarchy(null).stream().collect(Collectors.toList()) .forEach { blobItem -> if (blobItem.isPrefix()) { foundPrefixes << blobItem.getName() @@ -1120,7 +1120,7 @@ class ContainerAPITest extends APISpec { bc.create(512) } - def blobs = cc.listBlobsHierarchy("/", new ListBlobsOptions().setMaxResultsPerPage(PAGE_SIZE), null) + def blobs = cc.listBlobsByHierarchy("/", new ListBlobsOptions().setMaxResultsPerPage(PAGE_SIZE), null) when: def firstPage = blobs.iterableByPage().iterator().next() @@ -1147,7 +1147,7 @@ class ContainerAPITest extends APISpec { } expect: "listing operation will fetch all 10 blobs, despite page size being smaller than 10" - cc.listBlobsFlat(new ListBlobsOptions().setMaxResultsPerPage(PAGE_SIZE), null).stream().count() == NUM_BLOBS + cc.listBlobs(new ListBlobsOptions().setMaxResultsPerPage(PAGE_SIZE), null).stream().count() == NUM_BLOBS } def "List blobs hier error"() { @@ -1155,7 +1155,7 @@ class ContainerAPITest extends APISpec { cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: - cc.listBlobsHierarchy(".").iterator().hasNext() + cc.listBlobsByHierarchy(".").iterator().hasNext() then: thrown(BlobStorageException) @@ -1177,7 +1177,7 @@ class ContainerAPITest extends APISpec { bu4.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null, null, null, null).getStatusCode() == 201 when: - def blobs = cc.listBlobsFlat().iterator() + def blobs = cc.listBlobs().iterator() then: blobs.next().getName() == name diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy index 6343231f7a7e..f8830d44776b 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy @@ -240,7 +240,7 @@ class SASTest extends APISpec { def client1 = getContainerClient(sasWithId, cc.getBlobContainerUrl()) - client1.listBlobsFlat().iterator().hasNext() + client1.listBlobs().iterator().hasNext() def sasWithPermissions = new BlobServiceSasSignatureValues() .setPermissions(permissions) @@ -250,7 +250,7 @@ class SASTest extends APISpec { .encode() def client2 = getContainerClient(sasWithPermissions, cc.getBlobContainerUrl()) - client2.listBlobsFlat().iterator().hasNext() + client2.listBlobs().iterator().hasNext() then: notThrown(BlobStorageException) @@ -516,7 +516,7 @@ class SASTest extends APISpec { .encode() def client = getContainerClient(sasWithPermissions, cc.getBlobContainerUrl()) - client.listBlobsFlat().iterator().hasNext() + client.listBlobs().iterator().hasNext() then: notThrown(BlobStorageException) @@ -1127,7 +1127,7 @@ class SASTest extends APISpec { parts.setSasQueryParameters(sasValues.generateSasQueryParameters(primaryCredential)) when: - def splitParts = parts.toURL().toString().split("\\?") + def splitParts = parts.toUrl().toString().split("\\?") then: splitParts.size() == 2 // Ensure that there is only one question mark even when sas and snapshot are present diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy index 149ae1255eb4..dabe50a2b3f5 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy @@ -11,14 +11,14 @@ import com.azure.storage.blob.BlobServiceVersion import com.azure.storage.blob.BlobUrlParts import com.azure.storage.blob.models.BlobRange import com.azure.storage.blob.models.UserDelegationKey +import com.azure.storage.common.StorageSharedKeyCredential +import com.azure.storage.common.Utility +import com.azure.storage.common.implementation.Constants import com.azure.storage.common.sas.AccountSasPermission import com.azure.storage.common.sas.AccountSasResourceType import com.azure.storage.common.sas.AccountSasSignatureValues -import com.azure.storage.common.sas.SasProtocol -import com.azure.storage.common.StorageSharedKeyCredential -import com.azure.storage.common.implementation.Constants -import com.azure.storage.common.Utility import com.azure.storage.common.sas.SasIpRange +import com.azure.storage.common.sas.SasProtocol import spock.lang.Unroll import java.time.LocalDateTime @@ -623,7 +623,7 @@ class HelperTest extends APISpec { parts.setSasQueryParameters(sasValues.generateSasQueryParameters(primaryCredential)) when: - String[] splitParts = parts.toURL().toString().split("\\?") + String[] splitParts = parts.toUrl().toString().split("\\?") then: splitParts.size() == 2 // Ensure that there is only one question mark even when sas and snapshot are present @@ -642,7 +642,7 @@ class HelperTest extends APISpec { .setBlobName("blob") then: - new BlobUrlParts().parse(bup.toURL()).getBlobContainerName() == BlobContainerAsyncClient.ROOT_CONTAINER_NAME + new BlobUrlParts().parse(bup.toUrl()).getBlobContainerName() == BlobContainerAsyncClient.ROOT_CONTAINER_NAME } def "URLParser"() { @@ -660,4 +660,26 @@ class HelperTest extends APISpec { parts.getSasQueryParameters().getResource() == "c" parts.getSasQueryParameters().getSignature() == Utility.urlDecode("Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D") } + + @Unroll + def "IP URLParser"() { + when: + BlobUrlParts parts = BlobUrlParts.parse(new URL(endpoint)) + + then: + parts.getScheme() == scheme + parts.getHost() == host + parts.getAccountName() == accountName + parts.getBlobContainerName() == blobContainerName + parts.getBlobName() == blobName + + where: + endpoint | scheme | host | accountName | blobContainerName | blobName + "http://127.0.0.1:10000/devstoreaccount1" | "http" | "127.0.0.1:10000" | "devstoreaccount1" | null | null + "http://127.0.0.1:10000/devstoreaccount1/container" | "http" | "127.0.0.1:10000" | "devstoreaccount1" | "container" | null + "http://127.0.0.1:10000/devstoreaccount1/container/blob" | "http" | "127.0.0.1:10000" | "devstoreaccount1" | "container" | "blob" + "http://localhost:10000/devstoreaccount1" | "http" | "localhost:10000" | "devstoreaccount1" | null | null + "http://localhost:10000/devstoreaccount1/container" | "http" | "localhost:10000" | "devstoreaccount1" | "container" | null + "http://localhost:10000/devstoreaccount1/container/blob" | "http" | "localhost:10000" | "devstoreaccount1" | "container" | "blob" + } } diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsdeleted.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsdeleted.json index c1fc9e2fec1d..ca9dbd7750ea 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsdeleted.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsdeleted.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted0223361d5ed343cbf64?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted036242cfc2a02f8eb34?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9b4743ef-24f5-4dff-9ab7-eb42cb885585" + "x-ms-client-request-id" : "5576e196-5b67-491d-9dc1-eb8256a18e02" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADD71F414A", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:37 GMT", + "ETag" : "0x8D753EAB6EA5E6A", + "Last-Modified" : "Fri, 18 Oct 2019 16:46:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8073f25d-501e-002e-2a96-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:25:37 GMT", - "x-ms-client-request-id" : "9b4743ef-24f5-4dff-9ab7-eb42cb885585" + "x-ms-request-id" : "1a313f85-f01e-00c6-58d3-854d4a000000", + "Date" : "Fri, 18 Oct 2019 16:46:25 GMT", + "x-ms-client-request-id" : "5576e196-5b67-491d-9dc1-eb8256a18e02" }, "Exception" : null }, { @@ -26,7 +26,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "af107a11-a179-4c8f-b11c-ab8e946685e9", + "x-ms-client-request-id" : "9520e03a-af7b-49fa-b567-6a8797103216", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { @@ -35,40 +35,40 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f86b51-c01e-012f-5796-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:25:37 GMT", - "x-ms-client-request-id" : "af107a11-a179-4c8f-b11c-ab8e946685e9" + "x-ms-request-id" : "1a313fdb-f01e-00c6-22d3-854d4a000000", + "Date" : "Fri, 18 Oct 2019 16:46:25 GMT", + "x-ms-client-request-id" : "9520e03a-af7b-49fa-b567-6a8797103216" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted0223361d5ed343cbf64/javabloblistblobshieroptionsdeleted1540932cc9acc2be7", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted036242cfc2a02f8eb34/javabloblistblobshieroptionsdeleted187023e466a08e9a2", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b39540b4-07c7-4c95-b254-5a35185d9730" + "x-ms-client-request-id" : "9fb4938e-57dd-427f-b981-b32b81474212" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADE9126BF7", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:07 GMT", + "ETag" : "0x8D753EAC919A573", + "Last-Modified" : "Fri, 18 Oct 2019 16:46:55 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "807419cf-501e-002e-5596-83b0b1000000", + "x-ms-request-id" : "1a316837-f01e-00c6-3ed3-854d4a000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:07 GMT", - "x-ms-client-request-id" : "b39540b4-07c7-4c95-b254-5a35185d9730" + "Date" : "Fri, 18 Oct 2019 16:46:55 GMT", + "x-ms-client-request-id" : "9fb4938e-57dd-427f-b981-b32b81474212" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted0223361d5ed343cbf64/javabloblistblobshieroptionsdeleted1540932cc9acc2be7", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted036242cfc2a02f8eb34/javabloblistblobshieroptionsdeleted187023e466a08e9a2", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a51f906a-66e6-408e-9e18-7618da714141" + "x-ms-client-request-id" : "1498401d-781e-4a7e-83c0-9df1bbc6aeb6" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -77,18 +77,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f8d0a7-c01e-012f-2f96-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:26:07 GMT", - "x-ms-client-request-id" : "a51f906a-66e6-408e-9e18-7618da714141" + "x-ms-request-id" : "1a316847-f01e-00c6-4cd3-854d4a000000", + "Date" : "Fri, 18 Oct 2019 16:46:56 GMT", + "x-ms-client-request-id" : "1498401d-781e-4a7e-83c0-9df1bbc6aeb6" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted0223361d5ed343cbf64?delimiter=&include=deleted&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted036242cfc2a02f8eb34?delimiter=&include=deleted&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c157222d-aa22-4dc6-a247-989f272fa81a" + "x-ms-client-request-id" : "12d338aa-c5ac-40ef-aef8-21b7eef27fd8" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -96,10 +96,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "80741a13-501e-002e-0f96-83b0b1000000", - "Body" : "javabloblistblobshieroptionsdeleted1540932cc9acc2be7trueTue, 15 Oct 2019 20:26:07 GMTTue, 15 Oct 2019 20:26:07 GMT0x8D751ADE9126BF70application/octet-streamAppendBlobtrueTue, 15 Oct 2019 20:26:07 GMT1", - "Date" : "Tue, 15 Oct 2019 20:26:07 GMT", - "x-ms-client-request-id" : "c157222d-aa22-4dc6-a247-989f272fa81a", + "x-ms-request-id" : "1a3168f3-f01e-00c6-5dd3-854d4a000000", + "Body" : "javabloblistblobshieroptionsdeleted187023e466a08e9a2trueFri, 18 Oct 2019 16:46:55 GMTFri, 18 Oct 2019 16:46:55 GMT0x8D753EAC919A5730application/octet-streamAppendBlobtrueFri, 18 Oct 2019 16:46:55 GMT1", + "Date" : "Fri, 18 Oct 2019 16:46:56 GMT", + "x-ms-client-request-id" : "12d338aa-c5ac-40ef-aef8-21b7eef27fd8", "Content-Type" : "application/xml" }, "Exception" : null @@ -109,7 +109,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0f0648d3-70ee-4d64-83e1-c4707235473e", + "x-ms-client-request-id" : "e82998f1-52e1-41b7-92b0-e5f5129dad2d", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { @@ -118,9 +118,9 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f8d0f1-c01e-012f-7096-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:26:07 GMT", - "x-ms-client-request-id" : "0f0648d3-70ee-4d64-83e1-c4707235473e" + "x-ms-request-id" : "1a316910-f01e-00c6-75d3-854d4a000000", + "Date" : "Fri, 18 Oct 2019 16:46:56 GMT", + "x-ms-client-request-id" : "e82998f1-52e1-41b7-92b0-e5f5129dad2d" }, "Exception" : null }, { @@ -129,7 +129,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c6947b2f-433a-4388-9c31-bc802349e85c" + "x-ms-client-request-id" : "b81aa94a-392f-4e8d-966a-15345da68dc3" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -137,20 +137,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8074474f-501e-002e-7696-83b0b1000000", - "Body" : "jtclistblobshieroptionsdeletedjtclistblobshieroptionsdeleted0223361d5ed343cbf64Tue, 15 Oct 2019 20:25:37 GMT\"0x8D751ADD71F414A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:26:37 GMT", - "x-ms-client-request-id" : "c6947b2f-433a-4388-9c31-bc802349e85c", + "x-ms-request-id" : "1a31904e-f01e-00c6-80d3-854d4a000000", + "Body" : "jtclistblobshieroptionsdeletedjtclistblobshieroptionsdeleted036242cfc2a02f8eb34Fri, 18 Oct 2019 16:46:25 GMT\"0x8D753EAB6EA5E6A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 18 Oct 2019 16:47:26 GMT", + "x-ms-client-request-id" : "b81aa94a-392f-4e8d-966a-15345da68dc3", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted0223361d5ed343cbf64?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted036242cfc2a02f8eb34?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "864ed67c-2dfd-4854-b500-bad508953c61" + "x-ms-client-request-id" : "28fe657b-55e3-400d-a279-898ac0007ff4" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -158,11 +158,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f9409d-c01e-012f-2196-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:26:38 GMT", - "x-ms-client-request-id" : "864ed67c-2dfd-4854-b500-bad508953c61" + "x-ms-request-id" : "1a31905d-f01e-00c6-0ed3-854d4a000000", + "Date" : "Fri, 18 Oct 2019 16:47:26 GMT", + "x-ms-client-request-id" : "28fe657b-55e3-400d-a279-898ac0007ff4" }, "Exception" : null } ], - "variables" : [ "jtclistblobshieroptionsdeleted0223361d5ed343cbf64", "javabloblistblobshieroptionsdeleted1540932cc9acc2be7" ] + "variables" : [ "jtclistblobshieroptionsdeleted036242cfc2a02f8eb34", "javabloblistblobshieroptionsdeleted187023e466a08e9a2" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[0].json new file mode 100644 index 000000000000..229cad827add --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[0].json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparsercbe38650eefd2b3db?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "07c9f837-eb52-433a-acb5-3ea2082bfe39" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7536D4C596D57", + "Last-Modified" : "Fri, 18 Oct 2019 01:48:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e803f3cb-601e-0129-3056-850061000000", + "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", + "x-ms-client-request-id" : "07c9f837-eb52-433a-acb5-3ea2082bfe39" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "03bbce88-2e54-4326-96f7-d3f85a4a68b6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e803f3e6-601e-0129-4156-850061000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparsercbe38650eefd2b3dbFri, 18 Oct 2019 01:48:39 GMT\"0x8D7536D4C596D57\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", + "x-ms-client-request-id" : "03bbce88-2e54-4326-96f7-d3f85a4a68b6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparsercbe38650eefd2b3db?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b9bcf2e4-b7de-4edb-9779-8e56920d10cd" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "e803f3f1-601e-0129-4b56-850061000000", + "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", + "x-ms-client-request-id" : "b9bcf2e4-b7de-4edb-9779-8e56920d10cd" + }, + "Exception" : null + } ], + "variables" : [ "jtcipurlparser0helpertestipurlparsercbe38650eefd2b3db" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[1].json new file mode 100644 index 000000000000..2e5b7264535c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[1].json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparserdcd885757bf71270f?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "21008819-8ba9-470c-993c-d1c632c92ff5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7536D4CA6DECA", + "Last-Modified" : "Fri, 18 Oct 2019 01:48:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e803f3fe-601e-0129-5256-850061000000", + "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", + "x-ms-client-request-id" : "21008819-8ba9-470c-993c-d1c632c92ff5" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7242a3d7-9eaa-4627-985f-65bee741cfb5" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e803f413-601e-0129-6056-850061000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparserdcd885757bf71270fFri, 18 Oct 2019 01:48:39 GMT\"0x8D7536D4CA6DECA\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", + "x-ms-client-request-id" : "7242a3d7-9eaa-4627-985f-65bee741cfb5", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparserdcd885757bf71270f?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9dfc2d69-9150-4ad8-b042-48116d3a8fe0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "e803f425-601e-0129-6c56-850061000000", + "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", + "x-ms-client-request-id" : "9dfc2d69-9150-4ad8-b042-48116d3a8fe0" + }, + "Exception" : null + } ], + "variables" : [ "jtcipurlparser0helpertestipurlparserdcd885757bf71270f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[2].json new file mode 100644 index 000000000000..66816d6dc24a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[2].json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser0ca19990074741782?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ee4677b7-bf8d-4038-af01-e47887e2d597" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7536D4CC4F62D", + "Last-Modified" : "Fri, 18 Oct 2019 01:48:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e803f436-601e-0129-7656-850061000000", + "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", + "x-ms-client-request-id" : "ee4677b7-bf8d-4038-af01-e47887e2d597" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "43e0a7f4-301b-4514-afb2-7f73eec11835" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "edcef28f-f01e-0089-6356-858952000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparser0ca19990074741782Fri, 18 Oct 2019 01:48:40 GMT\"0x8D7536D4CC4F62D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", + "x-ms-client-request-id" : "43e0a7f4-301b-4514-afb2-7f73eec11835", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser0ca19990074741782?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "251fa9cb-8f30-4103-8a4e-500a0c139788" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "e803f47d-601e-0129-2356-850061000000", + "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", + "x-ms-client-request-id" : "251fa9cb-8f30-4103-8a4e-500a0c139788" + }, + "Exception" : null + } ], + "variables" : [ "jtcipurlparser0helpertestipurlparser0ca19990074741782" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[3].json new file mode 100644 index 000000000000..820afbc32436 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[3].json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser2564658662180fcf8?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2d21ccc2-d255-461f-b70d-8ce1c0fb9a24" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7536D4D070889", + "Last-Modified" : "Fri, 18 Oct 2019 01:48:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "edcef2a6-f01e-0089-7556-858952000000", + "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", + "x-ms-client-request-id" : "2d21ccc2-d255-461f-b70d-8ce1c0fb9a24" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6074de00-97bf-4617-b985-90602e2c2f92" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e803f48f-601e-0129-3056-850061000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparser2564658662180fcf8Fri, 18 Oct 2019 01:48:40 GMT\"0x8D7536D4D070889\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", + "x-ms-client-request-id" : "6074de00-97bf-4617-b985-90602e2c2f92", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser2564658662180fcf8?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bec9b4ba-3fc7-4c86-b392-6ec64a660af1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "edcef2cd-f01e-0089-1356-858952000000", + "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", + "x-ms-client-request-id" : "bec9b4ba-3fc7-4c86-b392-6ec64a660af1" + }, + "Exception" : null + } ], + "variables" : [ "jtcipurlparser0helpertestipurlparser2564658662180fcf8" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[4].json new file mode 100644 index 000000000000..67c746092450 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[4].json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser74641933e75cfe7b5?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1adae2d9-a26a-40f3-bdde-abe5e5ef4747" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7536D4D1D670D", + "Last-Modified" : "Fri, 18 Oct 2019 01:48:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e803f4b2-601e-0129-4556-850061000000", + "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", + "x-ms-client-request-id" : "1adae2d9-a26a-40f3-bdde-abe5e5ef4747" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a2652f5b-7d03-452e-8d36-5efaef30b20a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "edcef2ec-f01e-0089-2f56-858952000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparser74641933e75cfe7b5Fri, 18 Oct 2019 01:48:40 GMT\"0x8D7536D4D1D670D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", + "x-ms-client-request-id" : "a2652f5b-7d03-452e-8d36-5efaef30b20a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser74641933e75cfe7b5?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a48584fa-b948-47e0-8755-e4b73c4748b4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "e803f4c6-601e-0129-5556-850061000000", + "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", + "x-ms-client-request-id" : "a48584fa-b948-47e0-8755-e4b73c4748b4" + }, + "Exception" : null + } ], + "variables" : [ "jtcipurlparser0helpertestipurlparser74641933e75cfe7b5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[5].json new file mode 100644 index 000000000000..8734697e9be4 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[5].json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparsere7c691883442c6c8e?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bf574c1c-8c28-49be-909d-bbfa8bb27c46" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7536D4D380FB1", + "Last-Modified" : "Fri, 18 Oct 2019 01:48:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "edcef2f8-f01e-0089-3856-858952000000", + "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", + "x-ms-client-request-id" : "bf574c1c-8c28-49be-909d-bbfa8bb27c46" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "91fe2630-a544-4560-8338-e295ea5b440b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e803f4db-601e-0129-6456-850061000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparsere7c691883442c6c8eFri, 18 Oct 2019 01:48:40 GMT\"0x8D7536D4D380FB1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", + "x-ms-client-request-id" : "91fe2630-a544-4560-8338-e295ea5b440b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparsere7c691883442c6c8e?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8a1440b3-7e19-4c03-b2db-edcb0303eb9b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "edcef311-f01e-0089-4c56-858952000000", + "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", + "x-ms-client-request-id" : "8a1440b3-7e19-4c03-b2db-edcb0303eb9b" + }, + "Exception" : null + } ], + "variables" : [ "jtcipurlparser0helpertestipurlparsere7c691883442c6c8e" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java index 58c01f0ebbb1..8f381a22cec0 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java @@ -440,31 +440,6 @@ public static URL appendToUrlPath(String baseURL, String name) { } } - /** - * Strips the account name from host part of the URL object. - * - * @param url URL having its hostanme - * @return account name. - */ - public static String getAccountName(URL url) { - UrlBuilder builder = UrlBuilder.parse(url); - String accountName = null; - String host = builder.getHost(); - //Parse host to get account name - // host will look like this : .blob.core.windows.net - if (!ImplUtils.isNullOrEmpty(host)) { - int accountNameIndex = host.indexOf('.'); - if (accountNameIndex == -1) { - // host only contains account name - accountName = host; - } else { - // if host is separated by . - accountName = host.substring(0, accountNameIndex); - } - } - return accountName; - } - /** * Strips the last path segment from the passed URL. * diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java index dcbbe8abe8c2..3b23cfe8bd36 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java @@ -13,16 +13,19 @@ import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.policy.RequestRetryOptions; import com.azure.storage.common.policy.RequestRetryPolicy; import com.azure.storage.common.policy.ResponseValidationPolicyBuilder; - import com.azure.storage.common.policy.ScrubEtagPolicy; + +import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.function.Supplier; +import java.util.regex.Pattern; /** * This class provides helper methods for common builder patterns. @@ -31,6 +34,9 @@ final class BuilderHelper { private static final String DEFAULT_USER_AGENT_NAME = "azure-storage-file"; private static final String DEFAULT_USER_AGENT_VERSION = "12.0.0-preview.5"; + private static final Pattern IP_URL_PATTERN = Pattern + .compile("(?:\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|(?:localhost)"); + /** * Constructs a {@link HttpPipeline} from values passed from a builder. * @@ -101,4 +107,37 @@ private static HttpPipelinePolicy getResponseValidationPolicy() { .addOptionalEcho(Constants.HeaderConstants.CLIENT_REQUEST_ID) .build(); } + + /** + * Extracts the account name from the passed Azure Storage URL. + * + * @param url Azure Storage URL. + * @return the account name in the endpoint, or null if the URL doesn't match the expected formats. + */ + static String getAccountName(URL url) { + if (IP_URL_PATTERN.matcher(url.getHost()).find()) { + // URL is using an IP pattern of http://127.0.0.1:10000/accountName or http://localhost:10000/accountName + String path = url.getPath(); + if (!ImplUtils.isNullOrEmpty(path) && path.charAt(0) == '/') { + path = path.substring(1); + } + + String[] pathPieces = path.split("/", 1); + return (pathPieces.length == 1) ? pathPieces[0] : null; + } else { + // URL is using a pattern of http://accountName.blob.core.windows.net + String host = url.getHost(); + + if (ImplUtils.isNullOrEmpty(host)) { + return null; + } + + int accountNameIndex = host.indexOf('.'); + if (accountNameIndex == -1) { + return host; + } else { + return host.substring(0, accountNameIndex); + } + } + } } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java index a33655f92b74..02f6cf89d9f1 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java @@ -72,6 +72,7 @@ public class DirectoryAsyncClient { private final String directoryPath; private final String snapshot; private final String accountName; + private final FileServiceVersion serviceVersion; /** * Creates a DirectoryAsyncClient that sends requests to the storage directory at {@link @@ -84,7 +85,7 @@ public class DirectoryAsyncClient { * @param snapshot The snapshot of the share */ DirectoryAsyncClient(AzureFileStorageImpl azureFileStorageClient, String shareName, String directoryPath, - String snapshot, String accountName) { + String snapshot, String accountName, FileServiceVersion serviceVersion) { Objects.requireNonNull(shareName, "'shareName' cannot be null."); Objects.requireNonNull(directoryPath); this.shareName = shareName; @@ -92,6 +93,7 @@ public class DirectoryAsyncClient { this.snapshot = snapshot; this.azureFileStorageClient = azureFileStorageClient; this.accountName = accountName; + this.serviceVersion = serviceVersion; } /** @@ -113,8 +115,8 @@ public String getDirectoryUrl() { * * @return the service version the client is using. */ - public String getServiceVersion() { - return azureFileStorageClient.getVersion(); + public FileServiceVersion getServiceVersion() { + return serviceVersion; } /** @@ -128,7 +130,7 @@ public String getServiceVersion() { */ public FileAsyncClient getFileClient(String fileName) { String filePath = directoryPath + "/" + fileName; - return new FileAsyncClient(azureFileStorageClient, shareName, filePath, null, accountName); + return new FileAsyncClient(azureFileStorageClient, shareName, filePath, null, accountName, serviceVersion); } /** @@ -142,7 +144,8 @@ public FileAsyncClient getFileClient(String fileName) { */ public DirectoryAsyncClient getSubDirectoryClient(String subDirectoryName) { String directoryPath = this.directoryPath + "/" + subDirectoryName; - return new DirectoryAsyncClient(azureFileStorageClient, shareName, directoryPath, snapshot, accountName); + return new DirectoryAsyncClient(azureFileStorageClient, shareName, directoryPath, snapshot, accountName, + serviceVersion); } /** diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java index 929356124066..66b5b265ab26 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java @@ -66,7 +66,7 @@ public String getDirectoryUrl() { * * @return the service version the client is using. */ - public String getServiceVersion() { + public FileServiceVersion getServiceVersion() { return directoryAsyncClient.getServiceVersion(); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java index ffd6d6f70536..a0259fd6f24d 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java @@ -96,6 +96,7 @@ public class FileAsyncClient { private final String filePath; private final String snapshot; private final String accountName; + private final FileServiceVersion serviceVersion; /** * Creates a FileAsyncClient that sends requests to the storage file at {@link AzureFileStorageImpl#getUrl() @@ -107,7 +108,7 @@ public class FileAsyncClient { * @param snapshot The snapshot of the share */ FileAsyncClient(AzureFileStorageImpl azureFileStorageClient, String shareName, String filePath, - String snapshot, String accountName) { + String snapshot, String accountName, FileServiceVersion serviceVersion) { Objects.requireNonNull(shareName, "'shareName' cannot be null."); Objects.requireNonNull(filePath, "'filePath' cannot be null."); this.shareName = shareName; @@ -115,6 +116,7 @@ public class FileAsyncClient { this.snapshot = snapshot; this.azureFileStorageClient = azureFileStorageClient; this.accountName = accountName; + this.serviceVersion = serviceVersion; } /** @@ -136,8 +138,8 @@ public String getFileUrl() { * * @return the service version the client is using. */ - public String getServiceVersion() { - return azureFileStorageClient.getVersion(); + public FileServiceVersion getServiceVersion() { + return serviceVersion; } /** diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java index 88dadde8e2a8..96109220dc4c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java @@ -77,7 +77,7 @@ public String getFileUrl() { * * @return the service version the client is using. */ - public String getServiceVersion() { + public FileServiceVersion getServiceVersion() { return fileAsyncClient.getServiceVersion(); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java index b3bfc3e13a5f..943b5d0621fa 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java @@ -106,10 +106,13 @@ public class FileClientBuilder { public FileClientBuilder() { } - private AzureFileStorageImpl constructImpl() { + private FileServiceVersion getServiceVersion() { + return version != null ? version : FileServiceVersion.getLatest(); + } + + private AzureFileStorageImpl constructImpl(FileServiceVersion serviceVersion) { Objects.requireNonNull(shareName, "'shareName' cannot be null."); Objects.requireNonNull(resourcePath, "'resourcePath' cannot be null."); - FileServiceVersion serviceVersion = version != null ? version : FileServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { if (storageSharedKeyCredential != null) { @@ -145,7 +148,9 @@ private AzureFileStorageImpl constructImpl() { * or {@link #sasToken(String) SAS token} has been set. */ public DirectoryAsyncClient buildDirectoryAsyncClient() { - return new DirectoryAsyncClient(constructImpl(), shareName, resourcePath, shareSnapshot, accountName); + FileServiceVersion serviceVersion = getServiceVersion(); + return new DirectoryAsyncClient(constructImpl(serviceVersion), shareName, resourcePath, shareSnapshot, + accountName, serviceVersion); } /** @@ -183,8 +188,9 @@ public DirectoryClient buildDirectoryClient() { * or {@link #sasToken(String) SAS token} has been set. */ public FileAsyncClient buildFileAsyncClient() { - - return new FileAsyncClient(constructImpl(), shareName, resourcePath, shareSnapshot, accountName); + FileServiceVersion serviceVersion = getServiceVersion(); + return new FileAsyncClient(constructImpl(serviceVersion), shareName, resourcePath, shareSnapshot, + accountName, serviceVersion); } /** @@ -226,7 +232,7 @@ public FileClientBuilder endpoint(String endpoint) { URL fullUrl = new URL(endpoint); this.endpoint = fullUrl.getProtocol() + "://" + fullUrl.getHost(); - this.accountName = Utility.getAccountName(fullUrl); + this.accountName = BuilderHelper.getAccountName(fullUrl); // Attempt to get the share name and file path from the URL passed String[] pathSegments = fullUrl.getPath().split("/"); diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java index de3f9ce32788..83d2d6dfc4d3 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java @@ -55,15 +55,18 @@ public final class FileServiceAsyncClient { private final ClientLogger logger = new ClientLogger(FileServiceAsyncClient.class); private final AzureFileStorageImpl azureFileStorageClient; private final String accountName; + private final FileServiceVersion serviceVersion; /** * Creates a FileServiceClient from the passed {@link AzureFileStorageImpl implementation client}. * * @param azureFileStorage Client that interacts with the service interfaces. */ - FileServiceAsyncClient(AzureFileStorageImpl azureFileStorage, String accountName) { + FileServiceAsyncClient(AzureFileStorageImpl azureFileStorage, String accountName, + FileServiceVersion serviceVersion) { this.azureFileStorageClient = azureFileStorage; this.accountName = accountName; + this.serviceVersion = serviceVersion; } /** @@ -80,8 +83,8 @@ public String getFileServiceUrl() { * * @return the service version the client is using. */ - public String getServiceVersion() { - return azureFileStorageClient.getVersion(); + public FileServiceVersion getServiceVersion() { + return serviceVersion; } /** @@ -110,7 +113,7 @@ public ShareAsyncClient getShareAsyncClient(String shareName) { * @return a ShareAsyncClient that interacts with the specified share */ public ShareAsyncClient getShareAsyncClient(String shareName, String snapshot) { - return new ShareAsyncClient(azureFileStorageClient, shareName, snapshot, accountName); + return new ShareAsyncClient(azureFileStorageClient, shareName, snapshot, accountName, serviceVersion); } /** @@ -416,7 +419,8 @@ public Mono> createShareWithResponse(String shareName Mono> createShareWithResponse(String shareName, Map metadata, Integer quotaInGB, Context context) { - ShareAsyncClient shareAsyncClient = new ShareAsyncClient(azureFileStorageClient, shareName, null, accountName); + ShareAsyncClient shareAsyncClient = new ShareAsyncClient(azureFileStorageClient, shareName, null, + accountName, serviceVersion); return shareAsyncClient.createWithResponse(metadata, quotaInGB, context).map(response -> new SimpleResponse<>(response, shareAsyncClient)); diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java index 81eae4e7fec7..08683cbffb66 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java @@ -62,7 +62,7 @@ public String getFileServiceUrl() { * * @return the service version the client is using. */ - public String getServiceVersion() { + public FileServiceVersion getServiceVersion() { return fileServiceAsyncClient.getServiceVersion(); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java index 0f7f8bb5d2b6..31f792ee316c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java @@ -93,7 +93,21 @@ public final class FileServiceClientBuilder { public FileServiceClientBuilder() { } - private AzureFileStorageImpl constructImpl() { + /** + * Creates a {@link FileServiceAsyncClient} based on options set in the builder. Every time this method is called a + * new instance of {@link FileServiceAsyncClient} is created. + * + *

    + * If {@link FileServiceClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and {@link + * FileServiceClientBuilder#endpoint(String) endpoint} are used to create the {@link FileServiceAsyncClient client}. + * All other builder settings are ignored. + *

    + * + * @return A FileServiceAsyncClient with the options set from the builder. + * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} or + * {@link #sasToken(String) SAS token} has been set. + */ + public FileServiceAsyncClient buildAsyncClient() { FileServiceVersion serviceVersion = version != null ? version : FileServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { if (storageSharedKeyCredential != null) { @@ -106,29 +120,13 @@ private AzureFileStorageImpl constructImpl() { } }, retryOptions, logOptions, httpClient, additionalPolicies, configuration, serviceVersion); - return new AzureFileStorageBuilder() + AzureFileStorageImpl azureFileStorage = new AzureFileStorageBuilder() .url(endpoint) .pipeline(pipeline) .version(serviceVersion.getVersion()) .build(); - } - /** - * Creates a {@link FileServiceAsyncClient} based on options set in the builder. Every time this method is called a - * new instance of {@link FileServiceAsyncClient} is created. - * - *

    - * If {@link FileServiceClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and {@link - * FileServiceClientBuilder#endpoint(String) endpoint} are used to create the {@link FileServiceAsyncClient client}. - * All other builder settings are ignored. - *

    - * - * @return A FileServiceAsyncClient with the options set from the builder. - * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} - * or {@link #sasToken(String) SAS token} has been set. - */ - public FileServiceAsyncClient buildAsyncClient() { - return new FileServiceAsyncClient(constructImpl(), accountName); + return new FileServiceAsyncClient(azureFileStorage, accountName, serviceVersion); } /** @@ -166,7 +164,7 @@ public FileServiceClientBuilder endpoint(String endpoint) { URL fullUrl = new URL(endpoint); this.endpoint = fullUrl.getProtocol() + "://" + fullUrl.getHost(); - this.accountName = Utility.getAccountName(fullUrl); + this.accountName = BuilderHelper.getAccountName(fullUrl); // Attempt to get the SAS token from the URL passed String sasToken = new FileServiceSasQueryParameters( diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java index e1808feb40ce..cbd409e939bf 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java @@ -66,6 +66,7 @@ public class ShareAsyncClient { private final String shareName; private final String snapshot; private final String accountName; + private final FileServiceVersion serviceVersion; /** * Creates a ShareAsyncClient that sends requests to the storage share at {@link AzureFileStorageImpl#getUrl() @@ -75,12 +76,14 @@ public class ShareAsyncClient { * @param client Client that interacts with the service interfaces * @param shareName Name of the share */ - ShareAsyncClient(AzureFileStorageImpl client, String shareName, String snapshot, String accountName) { + ShareAsyncClient(AzureFileStorageImpl client, String shareName, String snapshot, String accountName, + FileServiceVersion serviceVersion) { Objects.requireNonNull(shareName, "'shareName' cannot be null."); this.shareName = shareName; this.snapshot = snapshot; this.accountName = accountName; this.azureFileStorageClient = client; + this.serviceVersion = serviceVersion; } /** @@ -101,8 +104,8 @@ public String getShareUrl() { * * @return the service version the client is using. */ - public String getServiceVersion() { - return azureFileStorageClient.getVersion(); + public FileServiceVersion getServiceVersion() { + return serviceVersion; } /** @@ -127,7 +130,8 @@ public DirectoryAsyncClient getRootDirectoryClient() { * @return a {@link DirectoryAsyncClient} that interacts with the directory in the share */ public DirectoryAsyncClient getDirectoryClient(String directoryName) { - return new DirectoryAsyncClient(azureFileStorageClient, shareName, directoryName, snapshot, accountName); + return new DirectoryAsyncClient(azureFileStorageClient, shareName, directoryName, snapshot, accountName, + serviceVersion); } /** @@ -140,7 +144,8 @@ public DirectoryAsyncClient getDirectoryClient(String directoryName) { * @return a {@link FileAsyncClient} that interacts with the file in the share */ public FileAsyncClient getFileClient(String filePath) { - return new FileAsyncClient(azureFileStorageClient, shareName, filePath, snapshot, accountName); + return new FileAsyncClient(azureFileStorageClient, shareName, filePath, snapshot, accountName, + serviceVersion); } /** diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java index f071d5e2b975..47f1c4a0f8bc 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java @@ -12,11 +12,11 @@ import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.FileHttpHeaders; import com.azure.storage.file.models.FileSignedIdentifier; +import com.azure.storage.file.models.FileStorageException; import com.azure.storage.file.models.ShareInfo; import com.azure.storage.file.models.ShareProperties; import com.azure.storage.file.models.ShareSnapshotInfo; import com.azure.storage.file.models.ShareStatistics; -import com.azure.storage.file.models.FileStorageException; import reactor.core.publisher.Mono; import java.time.Duration; @@ -60,7 +60,7 @@ public String getShareUrl() { * * @return the service version the client is using. */ - public String getServiceVersion() { + public FileServiceVersion getServiceVersion() { return client.getServiceVersion(); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java index 3b397cf6f9f1..9f52fa6c5998 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java @@ -97,7 +97,22 @@ public class ShareClientBuilder { public ShareClientBuilder() { } - private AzureFileStorageImpl constructImpl() { + /** + * Creates a {@link ShareAsyncClient} based on options set in the builder. Every time {@code buildAsyncClient()} is + * called a new instance of {@link ShareAsyncClient} is created. + * + *

    + * If {@link ShareClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and {@link + * ShareClientBuilder#endpoint(String) endpoint} are used to create the {@link ShareAsyncClient client}. All other + * builder settings are ignored. + *

    + * + * @return A ShareAsyncClient with the options set from the builder. + * @throws NullPointerException If {@code shareName} is {@code null}. + * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} or + * {@link #sasToken(String) SAS token} has been set. + */ + public ShareAsyncClient buildAsyncClient() { Objects.requireNonNull(shareName, "'shareName' cannot be null."); FileServiceVersion serviceVersion = version != null ? version : FileServiceVersion.getLatest(); @@ -112,30 +127,13 @@ private AzureFileStorageImpl constructImpl() { } }, retryOptions, logOptions, httpClient, additionalPolicies, configuration, serviceVersion); - return new AzureFileStorageBuilder() + AzureFileStorageImpl azureFileStorage = new AzureFileStorageBuilder() .url(endpoint) .pipeline(pipeline) .version(serviceVersion.getVersion()) .build(); - } - /** - * Creates a {@link ShareAsyncClient} based on options set in the builder. Every time {@code buildAsyncClient()} is - * called a new instance of {@link ShareAsyncClient} is created. - * - *

    - * If {@link ShareClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and {@link - * ShareClientBuilder#endpoint(String) endpoint} are used to create the {@link ShareAsyncClient client}. All other - * builder settings are ignored. - *

    - * - * @return A ShareAsyncClient with the options set from the builder. - * @throws NullPointerException If {@code shareName} is {@code null}. - * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} - * or {@link #sasToken(String) SAS token} has been set. - */ - public ShareAsyncClient buildAsyncClient() { - return new ShareAsyncClient(constructImpl(), shareName, snapshot, accountName); + return new ShareAsyncClient(azureFileStorage, shareName, snapshot, accountName, serviceVersion); } /** @@ -176,7 +174,7 @@ public ShareClientBuilder endpoint(String endpoint) { URL fullUrl = new URL(endpoint); this.endpoint = fullUrl.getProtocol() + "://" + fullUrl.getHost(); - this.accountName = Utility.getAccountName(fullUrl); + this.accountName = BuilderHelper.getAccountName(fullUrl); // Attempt to get the share name from the URL passed String[] pathSegments = fullUrl.getPath().split("/"); diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java index 0dd8faed255f..d9156d4e0ac1 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java @@ -13,16 +13,23 @@ import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.policy.RequestRetryOptions; import com.azure.storage.common.policy.RequestRetryPolicy; import com.azure.storage.common.policy.ResponseValidationPolicyBuilder; - import com.azure.storage.common.policy.ScrubEtagPolicy; + +import java.net.MalformedURLException; +import java.net.URL; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.function.Supplier; +import java.util.regex.Pattern; /** * This class provides helper methods for common builder patterns. @@ -31,6 +38,74 @@ final class BuilderHelper { private static final String DEFAULT_USER_AGENT_NAME = "azure-storage-queue"; private static final String DEFAULT_USER_AGENT_VERSION = "12.0.0-preview.5"; + private static final Pattern IP_URL_PATTERN = Pattern + .compile("(?:\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|(?:localhost)"); + + /** + * Parse the endpoint for the account name, queue name, and SAS token query parameters. + * + * @param endpoint Endpoint to parse. + * @param logger {@link ClientLogger} used to log any exception. + * @return The parsed endpoint as a {@link QueueUrlParts}. + */ + static QueueUrlParts parseEndpoint(String endpoint, ClientLogger logger) { + Objects.requireNonNull(endpoint); + try { + URL url = new URL(endpoint); + QueueUrlParts parts = new QueueUrlParts(); + + parts.setEndpoint(url.getProtocol() + "://" + url.getAuthority()); + + if (IP_URL_PATTERN.matcher(url.getHost()).find()) { + // URL is using an IP pattern of http://127.0.0.1:10000/accountName/queueName + // or http://localhost:10000/accountName/queueName + String path = url.getPath(); + if (!ImplUtils.isNullOrEmpty(path) && path.charAt(0) == '/') { + path = path.substring(1); + } + + String[] pathPieces = path.split("/", 2); + parts.setAccountName(pathPieces[0]); + + if (pathPieces.length == 2) { + parts.setQueueName(pathPieces[1]); + } + } else { + // URL is using a pattern of http://accountName.blob.core.windows.net/queueName + String host = url.getHost(); + + String accountName = null; + if (!ImplUtils.isNullOrEmpty(host)) { + int accountNameIndex = host.indexOf('.'); + if (accountNameIndex == -1) { + accountName = host; + } else { + accountName = host.substring(0, accountNameIndex); + } + } + + parts.setAccountName(accountName); + + String[] pathSegments = url.getPath().split("/", 2); + if (pathSegments.length == 2 && !ImplUtils.isNullOrEmpty(pathSegments[1])) { + parts.setQueueName(pathSegments[1]); + } + } + + // Attempt to get the SAS token from the URL passed + String sasToken = new QueueServiceSasQueryParameters( + Utility.parseQueryStringSplitValues(url.getQuery()), false).encode(); + if (!ImplUtils.isNullOrEmpty(sasToken)) { + parts.setQueueName(sasToken); + } + + return parts; + } catch (MalformedURLException ex) { + throw logger.logExceptionAsError( + new IllegalArgumentException("The Azure Storage Queue endpoint url is malformed.", ex)); + } + } + /** * Constructs a {@link HttpPipeline} from values passed from a builder. * @@ -101,4 +176,47 @@ private static HttpPipelinePolicy getResponseValidationPolicy() { .addOptionalEcho(Constants.HeaderConstants.CLIENT_REQUEST_ID) .build(); } + + static class QueueUrlParts { + private String endpoint; + private String accountName; + private String queueName; + private String sasToken; + + String getEndpoint() { + return endpoint; + } + + QueueUrlParts setEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + String getAccountName() { + return accountName; + } + + QueueUrlParts setAccountName(String accountName) { + this.accountName = accountName; + return this; + } + + String getQueueName() { + return queueName; + } + + QueueUrlParts setQueueName(String queueName) { + this.queueName = queueName; + return this; + } + + String getSasToken() { + return sasToken; + } + + QueueUrlParts setSasToken(String sasToken) { + this.sasToken = sasToken; + return this; + } + } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java index 546712b7b11a..95db814d1cf9 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java @@ -65,6 +65,7 @@ public final class QueueAsyncClient { private final AzureQueueStorageImpl client; private final String queueName; private final String accountName; + private final QueueServiceVersion serviceVersion; /** * Creates a QueueAsyncClient that sends requests to the storage queue service at {@link #getQueueUrl() endpoint}. @@ -73,11 +74,13 @@ public final class QueueAsyncClient { * @param client Client that interacts with the service interfaces * @param queueName Name of the queue */ - QueueAsyncClient(AzureQueueStorageImpl client, String queueName, String accountName) { + QueueAsyncClient(AzureQueueStorageImpl client, String queueName, String accountName, + QueueServiceVersion serviceVersion) { Objects.requireNonNull(queueName, "'queueName' cannot be null."); this.queueName = queueName; this.client = client; this.accountName = accountName; + this.serviceVersion = serviceVersion; } /** @@ -92,8 +95,8 @@ public String getQueueUrl() { * * @return the service version the client is using. */ - public String getServiceVersion() { - return client.getVersion(); + public QueueServiceVersion getServiceVersion() { + return serviceVersion; } /** diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java index 60e39f8e3de3..8e8a44097ab7 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java @@ -61,7 +61,7 @@ public String getQueueUrl() { * * @return the service version the client is using. */ - public String getServiceVersion() { + public QueueServiceVersion getServiceVersion() { return client.getServiceVersion(); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java index 8abdd18f0f15..ebd69f24b87c 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java @@ -12,8 +12,8 @@ import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; @@ -24,8 +24,6 @@ import com.azure.storage.queue.implementation.AzureQueueStorageBuilder; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; -import java.net.MalformedURLException; -import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -101,29 +99,6 @@ public final class QueueClientBuilder { public QueueClientBuilder() { } - private AzureQueueStorageImpl constructImpl() { - Objects.requireNonNull(queueName, "'queueName' cannot be null."); - QueueServiceVersion serviceVersion = version != null ? version : QueueServiceVersion.getLatest(); - - HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { - if (storageSharedKeyCredential != null) { - return new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential); - } else if (tokenCredential != null) { - return new BearerTokenAuthenticationPolicy(tokenCredential, String.format("%s/.default", endpoint)); - } else if (sasTokenCredential != null) { - return new SasTokenCredentialPolicy(sasTokenCredential); - } else { - return null; - } - }, retryOptions, logOptions, httpClient, additionalPolicies, configuration, serviceVersion); - - return new AzureQueueStorageBuilder() - .url(endpoint) - .pipeline(pipeline) - .version(serviceVersion.getVersion()) - .build(); - } - /** * Creates a {@link QueueClient} based on options set in the builder. Every time {@code buildClient()} is called a * new instance of {@link QueueClient} is created. @@ -159,7 +134,28 @@ public QueueClient buildClient() { * or {@link #sasToken(String) SAS token} has been set. */ public QueueAsyncClient buildAsyncClient() { - return new QueueAsyncClient(constructImpl(), queueName, accountName); + Utility.assertNotNull("queueName", queueName); + QueueServiceVersion serviceVersion = version != null ? version : QueueServiceVersion.getLatest(); + + HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { + if (storageSharedKeyCredential != null) { + return new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential); + } else if (tokenCredential != null) { + return new BearerTokenAuthenticationPolicy(tokenCredential, String.format("%s/.default", endpoint)); + } else if (sasTokenCredential != null) { + return new SasTokenCredentialPolicy(sasTokenCredential); + } else { + return null; + } + }, retryOptions, logOptions, httpClient, additionalPolicies, configuration, serviceVersion); + + AzureQueueStorageImpl azureQueueStorage = new AzureQueueStorageBuilder() + .url(endpoint) + .pipeline(pipeline) + .version(serviceVersion.getVersion()) + .build(); + + return new QueueAsyncClient(azureQueueStorage, queueName, accountName, serviceVersion); } /** @@ -177,29 +173,13 @@ public QueueAsyncClient buildAsyncClient() { * @throws IllegalArgumentException If {@code endpoint} isn't a proper URL */ public QueueClientBuilder endpoint(String endpoint) { - Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); - try { - URL fullURL = new URL(endpoint); - this.endpoint = fullURL.getProtocol() + "://" + fullURL.getHost(); - - this.accountName = Utility.getAccountName(fullURL); + BuilderHelper.QueueUrlParts parts = BuilderHelper.parseEndpoint(endpoint, logger); + this.endpoint = parts.getEndpoint(); + this.accountName = parts.getAccountName(); + this.queueName = parts.getQueueName(); - // Attempt to get the queue name from the URL passed - String[] pathSegments = fullURL.getPath().split("/", 2); - if (pathSegments.length == 2 && !ImplUtils.isNullOrEmpty(pathSegments[1])) { - this.queueName = pathSegments[1]; - } - - // Attempt to get the SAS token from the URL passed - String sasToken = new QueueServiceSasQueryParameters(Utility - .parseQueryStringSplitValues(fullURL.getQuery()), false).encode(); - if (!ImplUtils.isNullOrEmpty(sasToken)) { - this.sasToken(sasToken); - } - } catch (MalformedURLException ex) { - throw logger.logExceptionAsError( - new IllegalArgumentException("The Azure Storage Queue endpoint url is malformed. Endpoint: " - + endpoint)); + if (!ImplUtils.isNullOrEmpty(parts.getSasToken())) { + sasToken(parts.getSasToken()); } return this; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java index d0c9efc6837d..6caa404b578a 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java @@ -54,15 +54,18 @@ public final class QueueServiceAsyncClient { private final ClientLogger logger = new ClientLogger(QueueServiceAsyncClient.class); private final AzureQueueStorageImpl client; private final String accountName; + private final QueueServiceVersion serviceVersion; /** * Creates a QueueServiceAsyncClient from the passed {@link AzureQueueStorageImpl implementation client}. * * @param azureQueueStorage Client that interacts with the service interfaces. */ - QueueServiceAsyncClient(AzureQueueStorageImpl azureQueueStorage, String accountName) { + QueueServiceAsyncClient(AzureQueueStorageImpl azureQueueStorage, String accountName, + QueueServiceVersion serviceVersion) { this.client = azureQueueStorage; this.accountName = accountName; + this.serviceVersion = serviceVersion; } /** @@ -77,8 +80,8 @@ public String getQueueServiceUrl() { * * @return the service version the client is using. */ - public String getServiceVersion() { - return client.getVersion(); + public QueueServiceVersion getServiceVersion() { + return serviceVersion; } /** @@ -90,7 +93,7 @@ public String getServiceVersion() { * @return QueueAsyncClient that interacts with the specified queue */ public QueueAsyncClient getQueueAsyncClient(String queueName) { - return new QueueAsyncClient(client, queueName, accountName); + return new QueueAsyncClient(client, queueName, accountName, serviceVersion); } /** @@ -141,7 +144,7 @@ public Mono> createQueueWithResponse(String queueName Mono> createQueueWithResponse(String queueName, Map metadata, Context context) { - QueueAsyncClient queueAsyncClient = new QueueAsyncClient(client, queueName, accountName); + QueueAsyncClient queueAsyncClient = new QueueAsyncClient(client, queueName, accountName, serviceVersion); return queueAsyncClient.createWithResponse(metadata, context) .map(response -> new SimpleResponse<>(response, queueAsyncClient)); @@ -190,7 +193,7 @@ public Mono> deleteQueueWithResponse(String queueName) { } Mono> deleteQueueWithResponse(String queueName, Context context) { - return new QueueAsyncClient(client, queueName, accountName).deleteWithResponse(context); + return new QueueAsyncClient(client, queueName, accountName, serviceVersion).deleteWithResponse(context); } /** diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java index 5327b49ac79d..f305a781321d 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java @@ -60,7 +60,7 @@ public String getQueueServiceUrl() { * * @return the service version the client is using. */ - public String getServiceVersion() { + public QueueServiceVersion getServiceVersion() { return client.getServiceVersion(); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java index 68abbf4b20ae..49479b763932 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java @@ -12,7 +12,6 @@ import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; @@ -24,8 +23,6 @@ import com.azure.storage.queue.implementation.AzureQueueStorageBuilder; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; -import java.net.MalformedURLException; -import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -98,7 +95,22 @@ public final class QueueServiceClientBuilder { public QueueServiceClientBuilder() { } - private AzureQueueStorageImpl constructImpl() { + /** + * Creates a {@link QueueServiceAsyncClient} based on options set in the builder. Every time this is called a new + * instance of {@link QueueServiceAsyncClient} is created. + * + *

    + * If {@link QueueServiceClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and {@link + * QueueServiceClientBuilder#endpoint(String) endpoint} are used to create the {@link QueueServiceAsyncClient + * client}. All other builder settings are ignored. + *

    + * + * @return A QueueServiceAsyncClient with the options set from the builder. + * @throws NullPointerException If {@code endpoint} or {@code queueName} have not been set. + * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} or + * {@link #sasToken(String) SAS token} has been set. + */ + public QueueServiceAsyncClient buildAsyncClient() { QueueServiceVersion serviceVersion = version != null ? version : QueueServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { if (storageSharedKeyCredential != null) { @@ -112,30 +124,13 @@ private AzureQueueStorageImpl constructImpl() { } }, retryOptions, logOptions, httpClient, additionalPolicies, configuration, serviceVersion); - return new AzureQueueStorageBuilder() + AzureQueueStorageImpl azureQueueStorage = new AzureQueueStorageBuilder() .url(endpoint) .pipeline(pipeline) .version(serviceVersion.getVersion()) .build(); - } - /** - * Creates a {@link QueueServiceAsyncClient} based on options set in the builder. Every time this is called a new - * instance of {@link QueueServiceAsyncClient} is created. - * - *

    - * If {@link QueueServiceClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and {@link - * QueueServiceClientBuilder#endpoint(String) endpoint} are used to create the {@link QueueServiceAsyncClient - * client}. All other builder settings are ignored. - *

    - * - * @return A QueueServiceAsyncClient with the options set from the builder. - * @throws NullPointerException If {@code endpoint} or {@code queueName} have not been set. - * @throws IllegalArgumentException If neither a {@link StorageSharedKeyCredential} - * or {@link #sasToken(String) SAS token} has been set. - */ - public QueueServiceAsyncClient buildAsyncClient() { - return new QueueServiceAsyncClient(constructImpl(), accountName); + return new QueueServiceAsyncClient(azureQueueStorage, accountName, serviceVersion); } /** @@ -171,22 +166,12 @@ public QueueServiceClient buildClient() { * @throws IllegalArgumentException If {@code endpoint} is a malformed URL. */ public QueueServiceClientBuilder endpoint(String endpoint) { - Objects.requireNonNull(endpoint); - try { - URL fullURL = new URL(endpoint); - this.endpoint = fullURL.getProtocol() + "://" + fullURL.getHost(); + BuilderHelper.QueueUrlParts parts = BuilderHelper.parseEndpoint(endpoint, logger); + this.endpoint = parts.getEndpoint(); + this.accountName = parts.getAccountName(); - this.accountName = Utility.getAccountName(fullURL); - - // Attempt to get the SAS token from the URL passed - String sasToken = new QueueServiceSasQueryParameters( - Utility.parseQueryStringSplitValues(fullURL.getQuery()), false).encode(); - if (!ImplUtils.isNullOrEmpty(sasToken)) { - this.sasToken(sasToken); - } - } catch (MalformedURLException ex) { - throw logger.logExceptionAsError( - new IllegalArgumentException("The Azure Storage Queue endpoint url is malformed.")); + if (!ImplUtils.isNullOrEmpty(parts.getSasToken())) { + sasToken(parts.getSasToken()); } return this; diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAPITests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAPITests.groovy index d8a1c79aed5f..cdc1c99bc062 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAPITests.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAPITests.groovy @@ -43,6 +43,18 @@ class QueueAPITests extends APISpec { expectURL == queueURL } + def "IP based endpoint"() { + when: + def queueClient = new QueueClientBuilder() + .connectionString(connectionString) + .endpoint("http://127.0.0.1:10001/devstoreaccount1/myqueue") + .buildClient() + + then: + queueClient.getAccountName() == "devstoreaccount1" + queueClient.getQueueName() == "myqueue" + } + def "Create queue with shared key"() { expect: QueueTestHelper.assertResponseStatusCode(queueClient.createWithResponse(null, null, null), 201) diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAysncAPITests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAysncAPITests.groovy index c4809d052509..8a81ac6e4d3c 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAysncAPITests.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAysncAPITests.groovy @@ -42,6 +42,18 @@ class QueueAysncAPITests extends APISpec { expectURL == queueURL } + def "IP based endpoint"() { + when: + def queueAsyncClient = new QueueClientBuilder() + .connectionString(connectionString) + .endpoint("http://127.0.0.1:10001/devstoreaccount1/myqueue") + .buildAsyncClient() + + then: + queueAsyncClient.getAccountName() == "devstoreaccount1" + queueAsyncClient.getQueueName() == "myqueue" + } + def "Create queue with shared key"() { expect: StepVerifier.create(queueAsyncClient.createWithResponse(null)).assertNext { diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsIPBasedEndpoint.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsIPBasedEndpoint.json new file mode 100644 index 000000000000..1c7a8514ceb1 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsIPBasedEndpoint.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "queueapitestsipbasedendpoint82856204b5f9459724" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsIPBasedEndpoint.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsIPBasedEndpoint.json new file mode 100644 index 000000000000..c3a85bc77d62 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsIPBasedEndpoint.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "queueaysncapitestsipbasedendpoint711627dcd27223e0" ] +} \ No newline at end of file From c7a1c802d4379557773f2c3e0fa8a411f9fdfc0e Mon Sep 17 00:00:00 2001 From: Shawn Fang <45607042+mssfang@users.noreply.github.com> Date: Fri, 18 Oct 2019 22:05:32 -0700 Subject: [PATCH 23/64] AzConfig fixes for Renaming, Exception Handling, Doc. Tests (#5900) * delete addSetting(ConfigurationSetting) * renaming asOfDateTime to acceptDateTime * renamig lock and unlock to readOnly * getSetting 304 will not throw * exception hierachi * correct checkstyle errors * reoreder * enable user-defined retry policy * update conditional getSetting() request and tests * refactor based on connie feedback * update test Records * user default getKey() test * after getKey() update record --- .../ConfigurationAsyncClient.java | 169 +- .../appconfiguration/ConfigurationClient.java | 82 +- .../ConfigurationClientBuilder.java | 8 +- .../ConfigurationService.java | 9 - .../models/ConfigurationSetting.java | 10 +- .../models/SettingFields.java | 4 +- ...urationAsyncClientJavaDocCodeSnippets.java | 2 +- .../appconfiguration/ConfigurationSets.java | 3 +- .../data/appconfiguration/PipelineSample.java | 9 +- .../ConfigurationAsyncClientTest.java | 110 +- .../ConfigurationClientTest.java | 43 +- .../ConfigurationClientTestBase.java | 3 +- .../session-records/addExistingSetting.json | 136 +- .../resources/session-records/addSetting.json | 108 +- .../session-records/addSettingEmptyKey.json | 28 +- .../session-records/addSettingEmptyValue.json | 152 +- .../session-records/addSettingNullKey.json | 16 +- .../session-records/clearReadOnly.json | 120 +- ...clearReadOnlyWithConfigurationSetting.json | 120 +- .../session-records/deleteSetting.json | 176 +- .../deleteSettingNotFound.json | 112 +- .../session-records/deleteSettingNullKey.json | 16 +- .../deleteSettingWithETag.json | 248 +- .../resources/session-records/getSetting.json | 152 +- .../getSettingConditionalRequest.json | 122 + .../session-records/getSettingNotFound.json | 90 +- .../getSettingWhenValueNotUpdated.json | 184 ++ .../session-records/listRevisions.json | 144 +- .../listRevisionsAcceptDateTime.json | 148 +- .../listRevisionsWithMultipleKeys.json | 170 +- .../listRevisionsWithMultipleLabels.json | 170 +- .../listRevisionsWithPagination.json | 1160 ++++----- ...isionsWithPaginationAndRepeatIterator.json | 1178 ++++----- ...evisionsWithPaginationAndRepeatStream.json | 1178 ++++----- .../listRevisionsWithRange.json | 126 +- .../listSettingsAcceptDateTime.json | 148 +- .../listSettingsSelectFields.json | 390 +-- .../listSettingsWithPagination.json | 2238 ++++++++--------- .../session-records/listWithKeyAndLabel.json | 100 +- .../session-records/listWithMultipleKeys.json | 126 +- .../listWithMultipleLabels.json | 126 +- .../session-records/setReadOnly.json | 124 +- .../setReadOnlyWithConfigurationSetting.json | 124 +- .../resources/session-records/setSetting.json | 108 +- .../session-records/setSettingEmptyKey.json | 28 +- .../session-records/setSettingEmptyValue.json | 152 +- .../session-records/setSettingIfEtag.json | 252 +- .../session-records/setSettingNullKey.json | 16 +- 48 files changed, 5378 insertions(+), 5060 deletions(-) create mode 100644 sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingConditionalRequest.json create mode 100644 sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingWhenValueNotUpdated.json diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java index 74fdd66872b5..1531482f03f5 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java @@ -6,6 +6,9 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ResourceExistsException; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.ResponseBase; import com.azure.data.appconfiguration.models.ConfigurationSetting; import com.azure.data.appconfiguration.models.SettingFields; import com.azure.data.appconfiguration.models.SettingSelector; @@ -26,14 +29,16 @@ import java.time.OffsetDateTime; import java.util.Objects; +import java.util.function.Function; import static com.azure.core.implementation.util.FluxUtil.monoError; import static com.azure.core.implementation.util.FluxUtil.withContext; /** * This class provides a client that contains all the operations for {@link ConfigurationSetting ConfigurationSettings} - * in Azure App Configuration Store. Operations allowed by the client are adding, retrieving, deleting, lock and unlock - * ConfigurationSettings, and listing settings or revision of a setting based on a {@link SettingSelector filter}. + * in Azure App Configuration Store. Operations allowed by the client are adding, retrieving, deleting, set read-only + * and clear read-only ConfigurationSettings, and listing settings or revision of a setting based on a + * {@link SettingSelector filter}. * *

    Instantiating an asynchronous Configuration Client

    * @@ -98,34 +103,6 @@ public Mono addSetting(String key, String label, String va } } - /** - * Adds a configuration value in the service if that key and label does not exist.The label value of the - * ConfigurationSetting is optional. - * - *

    Code Samples

    - * - *

    Add a setting with the key "prodDBConnection", label "westUS", and value "db_connection".

    - * - * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.addSetting#ConfigurationSetting} - * - * @param setting The setting to add based on its key and optional label combination. - * @return The {@link ConfigurationSetting} that was created, or an empty Mono if a key collision occurs or the key - * is an invalid value (which will also throw HttpResponseException described below). - * @throws NullPointerException If {@code setting} is {@code null}. - * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. - * @throws ResourceModifiedException If a ConfigurationSetting with the same key and label exists. - * @throws HttpResponseException If {@link ConfigurationSetting#getKey() key} is an empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono addSetting(ConfigurationSetting setting) { - try { - return withContext(context -> addSetting(setting, context)) - .flatMap(response -> Mono.justOrEmpty(response.getValue())); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - /** * Adds a configuration value in the service if that key and label does not exist. The label value of the * ConfigurationSetting is optional. @@ -161,6 +138,17 @@ Mono> addSetting(ConfigurationSetting setting, Co // finds any existing configuration settings, then its e-tag will match and the service will return an error. return service.setKey(serviceEndpoint, setting.getKey(), setting.getLabel(), setting, null, getETagValue(ETAG_ANY), context) + .onErrorResume(HttpResponseException.class, + (Function>>) throwable -> { + final HttpResponseException e = (HttpResponseException) throwable; + final HttpResponse httpResponse = e.getResponse(); + if (httpResponse.getStatusCode() == 412) { + return Mono.error(new ResourceExistsException("Setting was already present.", httpResponse, + throwable)); + } + + return Mono.error(throwable); + }) .doOnSubscribe(ignoredValue -> logger.info("Adding ConfigurationSetting - {}", setting)) .doOnSuccess(response -> logger.info("Added ConfigurationSetting - {}", response.getValue())) .onErrorMap(ConfigurationAsyncClient::addSettingExceptionMapper) @@ -184,7 +172,7 @@ Mono> addSetting(ConfigurationSetting setting, Co * @return The {@link ConfigurationSetting} that was created or updated, or an empty Mono if the key is an invalid * value (which will also throw HttpResponseException described below). * @throws IllegalArgumentException If {@code key} is {@code null}. - * @throws ResourceModifiedException If the setting exists and is locked. + * @throws ResourceModifiedException If the setting exists and is read-only. * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -218,13 +206,13 @@ public Mono setSetting(String key, String label, String va * @param ifUnchanged Flag indicating if the {@code setting} {@link ConfigurationSetting#getETag ETag} is used as a * IF-MATCH header. * @return A REST response containing the {@link ConfigurationSetting} that was created or updated, if the key is an - * invalid value, the setting is locked, or an etag was provided but does not match the service's current etag value - * (which will also throw HttpResponseException described below). + * invalid value, the setting is read-only, or an etag was provided but does not match the service's current etag + * value (which will also throw HttpResponseException described below). * @throws NullPointerException If {@code setting} is {@code null}. * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. * @throws ResourceModifiedException If the {@link ConfigurationSetting#getETag() etag} was specified, is not the * wildcard character, and the current configuration value's etag does not match, or the setting exists and is - * locked. + * read-only. * @throws HttpResponseException If {@link ConfigurationSetting#getKey() key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -285,7 +273,7 @@ public Mono getSetting(String key, String label) { /** * Attempts to get a ConfigurationSetting that matches the {@code key}, the optional {@code label}, and the optional - * {@code asOfDateTime} combination. + * {@code acceptDateTime} combination. * *

    Code Samples

    * @@ -296,8 +284,8 @@ public Mono getSetting(String key, String label) { * @param key The key of the setting to retrieve. * @param label The label of the configuration setting to retrieve, or optionally, null if a setting with * label is desired. - * @param asOfDateTime To access a past state of the configuration setting, or optionally, null if a setting with - * {@code asOfDateTime} is desired. + * @param acceptDateTime To access a past state of the configuration setting, or optionally, null if a setting with + * {@code acceptDateTime} is desired. * @return The {@link ConfigurationSetting} stored in the service, or an empty Mono if the configuration value does * not exist or the key is an invalid value (which will also throw HttpResponseException described below). * @throws IllegalArgumentException If {@code key} is {@code null}. @@ -305,10 +293,10 @@ public Mono getSetting(String key, String label) { * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getSetting(String key, String label, OffsetDateTime asOfDateTime) { + public Mono getSetting(String key, String label, OffsetDateTime acceptDateTime) { try { return withContext( - context -> getSetting(new ConfigurationSetting().setKey(key).setLabel(label), asOfDateTime, + context -> getSetting(new ConfigurationSetting().setKey(key).setLabel(label), acceptDateTime, false, context)) .flatMap(response -> Mono.justOrEmpty(response.getValue())); } catch (RuntimeException ex) { @@ -318,7 +306,7 @@ public Mono getSetting(String key, String label, OffsetDat /** * Attempts to get the ConfigurationSetting with a matching {@link ConfigurationSetting#getKey() key}, and optional - * {@link ConfigurationSetting#getLabel() label}, optional {@code asOfDateTime} and optional ETag combination. + * {@link ConfigurationSetting#getLabel() label}, optional {@code acceptDateTime} and optional ETag combination. * *

    Code Samples

    * @@ -327,8 +315,8 @@ public Mono getSetting(String key, String label, OffsetDat * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.getSettingWithResponse#ConfigurationSetting-OffsetDateTime-boolean} * * @param setting The setting to retrieve. - * @param asOfDateTime To access a past state of the configuration setting, or optionally, null if a setting with - * {@code asOfDateTime} is desired. + * @param acceptDateTime To access a past state of the configuration setting, or optionally, null if a setting with + * {@code acceptDateTime} is desired. * @param ifChanged Flag indicating if the {@code setting} {@link ConfigurationSetting#getETag ETag} is used as a * If-None-Match header. * @return A REST response containing the {@link ConfigurationSetting} stored in the service, or {@code null} if @@ -341,23 +329,36 @@ public Mono getSetting(String key, String label, OffsetDat */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getSettingWithResponse(ConfigurationSetting setting, - OffsetDateTime asOfDateTime, + OffsetDateTime acceptDateTime, boolean ifChanged) { try { - return withContext(context -> getSetting(setting, asOfDateTime, ifChanged, context)); + return withContext(context -> getSetting(setting, acceptDateTime, ifChanged, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> getSetting(ConfigurationSetting setting, OffsetDateTime asOfDateTime, + Mono> getSetting(ConfigurationSetting setting, OffsetDateTime acceptDateTime, boolean onlyIfChanged, Context context) { // Validate that setting and key is not null. The key is used in the service URL so it cannot be null. validateSetting(setting); final String ifNoneMatchETag = onlyIfChanged ? getETagValue(setting.getETag()) : null; return service.getKeyValue(serviceEndpoint, setting.getKey(), setting.getLabel(), null, - asOfDateTime == null ? null : asOfDateTime.toString(), null, ifNoneMatchETag, context) + acceptDateTime == null ? null : acceptDateTime.toString(), null, ifNoneMatchETag, context) + .onErrorResume(HttpResponseException.class, + (Function>>) throwable -> { + final HttpResponseException e = (HttpResponseException) throwable; + final HttpResponse httpResponse = e.getResponse(); + if (httpResponse.getStatusCode() == 304) { + return Mono.just(new ResponseBase(httpResponse.getRequest(), + httpResponse.getStatusCode(), httpResponse.getHeaders(), null, null)); + } else if (httpResponse.getStatusCode() == 404) { + return Mono.error(new ResourceNotFoundException("Setting not found.", httpResponse, throwable)); + } + + return Mono.error(throwable); + }) .doOnSubscribe(ignoredValue -> logger.info("Retrieving ConfigurationSetting - {}", setting)) .doOnSuccess(response -> logger.info("Retrieved ConfigurationSetting - {}", response.getValue())) .doOnError(error -> logger.warning("Failed to get ConfigurationSetting - {}", setting, error)); @@ -378,7 +379,7 @@ Mono> getSetting(ConfigurationSetting setting, Of * @return The deleted ConfigurationSetting or an empty Mono is also returned if the {@code key} is an invalid value * (which will also throw HttpResponseException described below). * @throws IllegalArgumentException If {@code key} is {@code null}. - * @throws ResourceModifiedException If {@code setting} is locked. + * @throws ResourceModifiedException If {@code setting} is read-only. * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -415,7 +416,7 @@ public Mono deleteSetting(String key, String label) { * (which will also throw HttpResponseException described below). * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. * @throws NullPointerException When {@code setting} is {@code null}. - * @throws ResourceModifiedException If {@code setting} is locked. + * @throws ResourceModifiedException If {@code setting} is read-only. * @throws ResourceNotFoundException If {@link ConfigurationSetting#getETag() etag} is specified, not the wildcard * character, and does not match the current etag value. * @throws HttpResponseException If {@link ConfigurationSetting#getKey() key} is an empty string. @@ -443,18 +444,20 @@ Mono> deleteSetting(ConfigurationSetting setting, } /** - * Lock the {@link ConfigurationSetting} with a matching {@code key}, and optional {@code label} combination. + * Set the {@link ConfigurationSetting} to read-only with a matching {@code key}, and optional {@code label} + * combination. * *

    Code Samples

    * - *

    Lock the setting with the key-label "prodDBConnection"-"westUS".

    + *

    Set the setting to read-only with the key-label "prodDBConnection"-"westUS".

    * * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.setReadOnly#string-string} * - * @param key The key of configuration setting to lock. - * @param label The label of configuration setting to lock, or optionally, null if a setting with label is desired. - * @return The {@link ConfigurationSetting} that was locked, or an empty Mono if a key collision occurs or the key - * is an invalid value (which will also throw HttpResponseException described below). + * @param key The key of configuration setting to set to be read-only. + * @param label The label of configuration setting to read-only, or optionally, null if a setting with label is + * desired. + * @return The {@link ConfigurationSetting} that is read-only, or an empty Mono if a key collision occurs or the + * key is an invalid value (which will also throw HttpResponseException described below). * @throws IllegalArgumentException If {@code key} is {@code null}. * @throws HttpResponseException If {@code key} is an empty string. */ @@ -470,19 +473,19 @@ public Mono setReadOnly(String key, String label) { } /** - * Lock the {@link ConfigurationSetting} with a matching {@link ConfigurationSetting#getKey() key}, and optional - * {@link ConfigurationSetting#getLabel() label} combination. + * Set the {@link ConfigurationSetting} to read-only with a matching {@link ConfigurationSetting#getKey() key}, + * and optional {@link ConfigurationSetting#getLabel() label} combination. * *

    Code Samples

    * - *

    Lock the setting with the key-label "prodDBConnection"-"westUS".

    + *

    Set the setting to read-only with the key-label "prodDBConnection"-"westUS".

    * * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.setReadOnlyWithResponse#ConfigurationSetting} * - * @param setting The setting to lock based on its key and optional label combination. - * @return A REST response containing the locked ConfigurationSetting or {@code null} if didn't exist. {@code null} - * is also returned if the {@link ConfigurationSetting#getKey() key} is an invalid value. (which will also throw - * HttpResponseException described below). + * @param setting The setting to set to read-only based on its key and optional label combination. + * @return A REST response containing the read-only ConfigurationSetting or {@code null} if didn't exist. + * {@code null} is also returned if the {@link ConfigurationSetting#getKey() key} is an invalid value. + * (which will also throw HttpResponseException described below). * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. * @throws HttpResponseException If {@link ConfigurationSetting#getKey() key} is an empty string. */ @@ -507,19 +510,21 @@ Mono> setReadOnly(ConfigurationSetting setting, C } /** - * Unlock the {@link ConfigurationSetting} with a matching {@code key}, and optional {@code label} combination. + * Clear read-only of the {@link ConfigurationSetting} with a matching {@code key}, and optional {@code label} + * combination. * *

    Code Samples

    * - *

    Unlock the setting with the key-label "prodDBConnection"-"westUS".

    + *

    Clear read-only of the setting with the key-label "prodDBConnection"-"westUS".

    * * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.clearReadOnly#string-string} * - * @param key The key of configuration setting to unlock. - * @param label The label of configuration setting to unlock, or optionally, null if a setting with + * @param key The key of configuration setting to clear read-only. + * @param label The label of configuration setting to clear read-only, or optionally, null if a setting with * label is desired. - * @return The {@link ConfigurationSetting} that was unlocked, or an empty Mono is also returned if a key collision - * occurs or the key is an invalid value (which will also throw HttpResponseException described below). + * @return The read-only of {@link ConfigurationSetting} that was cleared, or an empty Mono is also returned if + * a key collision occurs or the key is an invalid value (which will also throw HttpResponseException described + * below). * @throws IllegalArgumentException If {@code key} is {@code null}. * @throws HttpResponseException If {@code key} is an empty string. */ @@ -535,17 +540,17 @@ public Mono clearReadOnly(String key, String label) { } /** - * Unlock the {@link ConfigurationSetting} with a matching {@link ConfigurationSetting#getKey() key}, and optional - * {@link ConfigurationSetting#getLabel() label} combination. + * Clear read-only of the {@link ConfigurationSetting} with a matching {@link ConfigurationSetting#getKey() key}, + * and optional {@link ConfigurationSetting#getLabel() label} combination. * *

    Code Samples

    * - *

    Unlock the setting with the key-label "prodDBConnection"-"westUS".

    + *

    Clear read-only of the setting with the key-label "prodDBConnection"-"westUS".

    * * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.clearReadOnlyWithResponse#ConfigurationSetting} * - * @param setting The setting to unlock based on its key and optional label combination. - * @return A REST response containing the unlocked ConfigurationSetting, or {@code null} if didn't exist. + * @param setting The setting to clear read-only based on its key and optional label combination. + * @return A REST response containing the cleared read-only ConfigurationSetting, or {@code null} if didn't exist. * {@code null} is also returned if the {@link ConfigurationSetting#getKey() key} is an invalid value. (which will * also throw HttpResponseException described below). * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. @@ -560,8 +565,6 @@ public Mono> clearReadOnlyWithResponse(Configurat } } - - Mono> clearReadOnly(ConfigurationSetting setting, Context context) { // Validate that setting and key is not null. The key is used in the service URL so it cannot be null. validateSetting(setting); @@ -683,17 +686,15 @@ Mono> listSettingRevisionsFirstPage(SettingS String labels = ImplUtils.arrayToString(selector.getLabels(), label -> label); String range = selector.getRange() != null ? String.format(RANGE_QUERY, selector.getRange()) : null; - result = - service.listKeyValueRevisions( - serviceEndpoint, keys, labels, fields, selector.getAcceptDateTime(), range, context) - .doOnRequest( - ignoredValue -> logger.info("Listing ConfigurationSetting revisions - {}", selector)) - .doOnSuccess(response -> logger.info("Listed ConfigurationSetting revisions - {}", selector)) - .doOnError( - error -> logger - .warning("Failed to list ConfigurationSetting revisions - {}", selector, error)); + result = service.listKeyValueRevisions( + serviceEndpoint, keys, labels, fields, selector.getAcceptDateTime(), range, context) + .doOnRequest(ignoredValue -> logger.info("Listing ConfigurationSetting revisions - {}", selector)) + .doOnSuccess(response -> logger.info("Listed ConfigurationSetting revisions - {}", selector)) + .doOnError(error -> + logger.warning("Failed to list ConfigurationSetting revisions - {}", selector, error)); } else { - result = service.listKeyValueRevisions(serviceEndpoint, null, null, null, null, null, context) + result = service.listKeyValueRevisions( + serviceEndpoint, null, null, null, null, null, context) .doOnRequest(ignoredValue -> logger.info("Listing ConfigurationSetting revisions")) .doOnSuccess(response -> logger.info("Listed ConfigurationSetting revisions")) .doOnError(error -> logger.warning("Failed to list all ConfigurationSetting revisions", error)); diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java index 2e15359cbffe..1fdf60bc0f45 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java @@ -20,8 +20,9 @@ /** * This class provides a client that contains all the operations for {@link ConfigurationSetting ConfigurationSettings} - * in Azure App Configuration Store. Operations allowed by the client are adding, retrieving, deleting, lock and unlock - * ConfigurationSettings, and listing settings or revision of a setting based on a {@link SettingSelector filter}. + * in Azure App Configuration Store. Operations allowed by the client are adding, retrieving, deleting, set read-only + * and clear read-only ConfigurationSettings, and listing settings or revision of a setting based on a + * {@link SettingSelector filter}. * *

    Instantiating a synchronous Configuration Client

    * @@ -113,7 +114,7 @@ public Response addSettingWithResponse(ConfigurationSettin * @return The {@link ConfigurationSetting} that was created or updated, or {@code null} if the key is an invalid * value (which will also throw ServiceRequestException described below). * @throws IllegalArgumentException If {@code key} is {@code null}. - * @throws ResourceModifiedException If the setting exists and is locked. + * @throws ResourceModifiedException If the setting exists and is read-only. * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -148,7 +149,7 @@ public ConfigurationSetting setSetting(String key, String label, String value) { * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. * @throws ResourceModifiedException If the {@link ConfigurationSetting#getETag() etag} was specified, is not the * wildcard character, and the current configuration value's etag does not match, or the setting exists and is - * locked. + * read-only. * @throws HttpResponseException If {@link ConfigurationSetting#getKey() key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -182,7 +183,7 @@ public ConfigurationSetting getSetting(String key, String label) { /** * Attempts to get a ConfigurationSetting that matches the {@code key}, the optional {@code label}, and the optional - * {@code asOfDateTime} combination. + * {@code acceptDateTime} combination. * *

    Code Samples

    * @@ -193,8 +194,8 @@ public ConfigurationSetting getSetting(String key, String label) { * @param key The key of the setting to retrieve. * @param label The label of the configuration setting to create or update, or optionally, null if a setting with * label is desired. - * @param asOfDateTime To access a past state of the configuration setting, or optionally, null if a setting with - * {@code asOfDateTime} is desired. + * @param acceptDateTime To access a past state of the configuration setting, or optionally, null if a setting with + * {@code acceptDateTime} is desired. * @return The {@link ConfigurationSetting} stored in the service, or {@code null}, if the configuration value does * not exist or the key is an invalid value (which will also throw ServiceRequestException described below). * @throws IllegalArgumentException If {@code key} is {@code null}. @@ -202,15 +203,15 @@ public ConfigurationSetting getSetting(String key, String label) { * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationSetting getSetting(String key, String label, OffsetDateTime asOfDateTime) { + public ConfigurationSetting getSetting(String key, String label, OffsetDateTime acceptDateTime) { return client.getSetting( - new ConfigurationSetting().setKey(key).setLabel(label), asOfDateTime, false, Context.NONE) + new ConfigurationSetting().setKey(key).setLabel(label), acceptDateTime, false, Context.NONE) .flatMap(FluxUtil::toMono).block(); } /** * Attempts to get the ConfigurationSetting with a matching {@link ConfigurationSetting#getKey() key}, and optional - * {@link ConfigurationSetting#getLabel() label}, optional {@code asOfDateTime} and optional ETag combination. + * {@link ConfigurationSetting#getLabel() label}, optional {@code acceptDateTime} and optional ETag combination. * *

    Code Samples

    * @@ -219,8 +220,8 @@ public ConfigurationSetting getSetting(String key, String label, OffsetDateTime * {@codesnippet com.azure.data.applicationconfig.configurationclient.getSettingWithResponse#ConfigurationSetting-OffsetDateTime-boolean-Context} * * @param setting The setting to retrieve. - * @param asOfDateTime To access a past state of the configuration setting, or optionally, null if a setting with - * {@code asOfDateTime} is desired. + * @param acceptDateTime To access a past state of the configuration setting, or optionally, null if a setting with + * {@code acceptDateTime} is desired. * @param ifChanged Flag indicating if the {@code setting} {@link ConfigurationSetting#getETag ETag} is used as a * If-None-Match header. * @param context Additional context that is passed through the Http pipeline during the service call. @@ -234,10 +235,10 @@ public ConfigurationSetting getSetting(String key, String label, OffsetDateTime */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getSettingWithResponse(ConfigurationSetting setting, - OffsetDateTime asOfDateTime, + OffsetDateTime acceptDateTime, boolean ifChanged, Context context) { - return client.getSetting(setting, asOfDateTime, ifChanged, context).block(); + return client.getSetting(setting, acceptDateTime, ifChanged, context).block(); } /** @@ -255,7 +256,7 @@ public Response getSettingWithResponse(ConfigurationSettin * @return The deleted ConfigurationSetting or {@code null} if it didn't exist. {@code null} is also returned if the * {@code key} is an invalid value (which will also throw ServiceRequestException described below). * @throws IllegalArgumentException If {@code key} is {@code null}. - * @throws ResourceModifiedException If {@code setting} is locked. + * @throws ResourceModifiedException If {@code setting} is read-only. * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -288,7 +289,7 @@ public ConfigurationSetting deleteSetting(String key, String label) { * (which will also throw ServiceRequestException described below). * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. * @throws NullPointerException When {@code setting} is {@code null}. - * @throws ResourceModifiedException If {@code setting} is locked. + * @throws ResourceModifiedException If {@code setting} is read-only. * @throws ResourceNotFoundException If {@link ConfigurationSetting#getETag() etag} is specified, not the wildcard * character, and does not match the current etag value. * @throws HttpResponseException If {@link ConfigurationSetting#getKey() key} is an empty string. @@ -300,17 +301,19 @@ public Response deleteSettingWithResponse(ConfigurationSet } /** - * Lock the {@link ConfigurationSetting} with a matching {@code key}, optional {@code label} combination. + * Set the {@link ConfigurationSetting} to read-only with a matching {@code key}, optional {@code label} + * combination. * *

    Code Samples

    * - *

    Lock the setting with the key-label "prodDBConnection"-"westUS".

    + *

    Set the setting to read-only with the key-label "prodDBConnection"-"westUS".

    * * {@codesnippet com.azure.data.applicationconfig.configurationclient.setReadOnly#string-string} * - * @param key The key of configuration setting to lock. - * @param label The label of configuration setting to lock, or optionally, null if a setting with label is desired. - * @return The {@link ConfigurationSetting} that was locked, or {@code null} is also returned if a key collision + * @param key The key of configuration setting to set to read-only. + * @param label The label of configuration setting to set to read-only, or optionally, null if a setting with label + * is desired. + * @return The {@link ConfigurationSetting} that is read-only, or {@code null} is also returned if a key collision * occurs or the key is an invalid value (which will also throw HttpResponseException described below). * @throws IllegalArgumentException If {@code key} is {@code null}. * @throws HttpResponseException If {@code key} is an empty string. @@ -321,20 +324,20 @@ public ConfigurationSetting setReadOnly(String key, String label) { } /** - * Lock the {@link ConfigurationSetting} with a matching {@link ConfigurationSetting#getKey() key}, and optional - * {@link ConfigurationSetting#getLabel() label} combination. + * Set the {@link ConfigurationSetting} to read-only with a matching {@link ConfigurationSetting#getKey() key}, and + * optional {@link ConfigurationSetting#getLabel() label} combination. * *

    Code Samples

    * - *

    Lock the setting with the key-label "prodDBConnection"-"westUS".

    + *

    Set the setting to read-only with the key-label "prodDBConnection"-"westUS".

    * * {@codesnippet com.azure.data.applicationconfig.configurationclient.setReadOnlyWithResponse#ConfigurationSetting-Context} * - * @param setting The setting to lock based on its key and optional label combination. + * @param setting The setting to set to read-only based on its key and optional label combination. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A REST response containing the locked ConfigurationSetting or {@code null} if didn't exist. {@code null} - * is also returned if the {@link ConfigurationSetting#getKey() key} is an invalid value. (which will also throw - * HttpResponseException described below). + * @return A REST response containing the read-only ConfigurationSetting or {@code null} if didn't exist. + * {@code null} is also returned if the {@link ConfigurationSetting#getKey() key} is an invalid value. (which will + * also throw HttpResponseException described below). * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. * @throws HttpResponseException If {@link ConfigurationSetting#getKey() key} is an empty string. */ @@ -344,19 +347,20 @@ public Response setReadOnlyWithResponse(ConfigurationSetti } /** - * Unlock the {@link ConfigurationSetting} with a matching {@code key}, optional {@code label} combination. + * Clear read-only of the {@link ConfigurationSetting} with a matching {@code key}, optional {@code label} + * combination. * *

    Code Samples

    * - *

    Unlock the setting with the key-label "prodDBConnection"-"westUS".

    + *

    Clear read-only of the setting with the key-label "prodDBConnection"-"westUS".

    * * {@codesnippet com.azure.data.applicationconfig.configurationclient.clearReadOnly#string-string} * - * @param key The key of configuration setting to unlock. - * @param label The label of configuration setting to unlock, or optionally, null if a setting with + * @param key The key of configuration setting to clear read-only. + * @param label The label of configuration setting to clear read-only, or optionally, null if a setting with * label is desired. - * @return The {@link ConfigurationSetting} that was unlocked, or {@code null} is also returned if a key collision - * occurs or the key is an invalid value (which will also throw HttpResponseException described below). + * @return The {@link ConfigurationSetting} that read-only is cleared, or {@code null} is also returned if a key + * collision occurs or the key is an invalid value (which will also throw HttpResponseException described below). * @throws IllegalArgumentException If {@code key} is {@code null}. * @throws HttpResponseException If {@code key} is an empty string. */ @@ -367,18 +371,18 @@ public ConfigurationSetting clearReadOnly(String key, String label) { } /** - * Unlock the {@link ConfigurationSetting} with a matching {@link ConfigurationSetting#getKey() key}, and optional - * {@link ConfigurationSetting#getLabel() label} combination. + * Clear read-only of the {@link ConfigurationSetting} with a matching {@link ConfigurationSetting#getKey() key}, + * and optional {@link ConfigurationSetting#getLabel() label} combination. * *

    Code Samples

    * - *

    Unlock the setting with the key-label "prodDBConnection"-"westUS".

    + *

    Clear read-only of the setting with the key-label "prodDBConnection"-"westUS".

    * * {@codesnippet com.azure.data.applicationconfig.configurationclient.clearReadOnlyWithResponse#ConfigurationSetting-Context} * - * @param setting The setting to unlock based on its key and optional label combination. + * @param setting The setting to clear read-only based on its key and optional label combination. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A REST response containing the unlocked ConfigurationSetting, or {@code null} if didn't exist. + * @return A REST response containing the cleared read-only ConfigurationSetting, or {@code null} if didn't exist. * {@code null} is also returned if the {@link ConfigurationSetting#getKey() key} is an invalid value. (which will * also throw HttpResponseException described below). * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java index d657bbc091ff..c8aa50c70fff 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java @@ -81,7 +81,7 @@ public final class ConfigurationClientBuilder { private HttpClient httpClient; private HttpLogOptions httpLogOptions; private HttpPipeline pipeline; - private RetryPolicy retryPolicy; + private HttpPipelinePolicy retryPolicy; private Configuration configuration; private ConfigurationServiceVersion version; @@ -297,14 +297,14 @@ public ConfigurationClientBuilder configuration(Configuration configuration) { } /** - * Sets the {@link RetryPolicy} that is used when each request is sent. + * Sets the {@link HttpPipelinePolicy} that is used when each request is sent. * * The default retry policy will be used if not provided {@link ConfigurationClientBuilder#buildAsyncClient()} * to build {@link ConfigurationAsyncClient} or {@link ConfigurationClient}. - * @param retryPolicy RetryPolicy applied to each request. + * @param retryPolicy user's retry policy applied to each request. * @return The updated ConfigurationClientBuilder object. */ - public ConfigurationClientBuilder retryPolicy(RetryPolicy retryPolicy) { + public ConfigurationClientBuilder retryPolicy(HttpPipelinePolicy retryPolicy) { this.retryPolicy = retryPolicy; return this; } diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationService.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationService.java index 684e949a8e8f..17a31814bb1e 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationService.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationService.java @@ -19,8 +19,6 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.UnexpectedResponseExceptionType; import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.Response; import com.azure.core.implementation.http.ContentType; @@ -38,7 +36,6 @@ interface ConfigurationService { @Get("kv/{key}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(code = {404}, value = ResourceNotFoundException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> getKeyValue( @HostParam("url") String url, @@ -52,8 +49,6 @@ Mono> getKeyValue( @Put("kv/{key}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(code = {409}, value = ResourceModifiedException.class) - @UnexpectedResponseExceptionType(code = {412}, value = ResourceNotFoundException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> setKey( @HostParam("url") String url, @@ -66,8 +61,6 @@ Mono> setKey( @Delete("kv/{key}") @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(code = {409}, value = ResourceModifiedException.class) - @UnexpectedResponseExceptionType(code = {412}, value = ResourceNotFoundException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> delete( @HostParam("url") String url, @@ -79,7 +72,6 @@ Mono> delete( @Put("locks/{key}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(code = {404}, value = ResourceNotFoundException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> lockKeyValue( @HostParam("url") String url, @@ -91,7 +83,6 @@ Mono> lockKeyValue( @Delete("locks/{key}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(code = {404}, value = ResourceNotFoundException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> unlockKeyValue( @HostParam("url") String url, diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/ConfigurationSetting.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/ConfigurationSetting.java index bbd67c542427..91014b1bb396 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/ConfigurationSetting.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/ConfigurationSetting.java @@ -39,7 +39,7 @@ public class ConfigurationSetting { private OffsetDateTime lastModified; @JsonProperty(value = "locked") - private boolean locked; + private boolean readOnly; @JsonProperty(value = "tags") private Map tags; @@ -161,15 +161,15 @@ public OffsetDateTime getLastModified() { } /** - * Gets whether or not the configuration setting is locked. If the setting is locked, then no modifications can be + * Gets whether or not the configuration setting is read-only. If it is, then no modifications can be * made to this setting. * * This is a readonly property. It is populated from responses from the Azure App Configuration service. * - * @return true if locked; false otherwise. + * @return true if read-only; false otherwise. */ - public boolean isLocked() { - return locked; + public boolean isReadOnly() { + return readOnly; } /** diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SettingFields.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SettingFields.java index 2e5876f73a95..918fae793036 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SettingFields.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SettingFields.java @@ -39,9 +39,9 @@ public final class SettingFields extends ExpandableStringEnum { */ public static final SettingFields LAST_MODIFIED = fromString("LAST_MODIFIED"); /** - * Populates the {@link ConfigurationSetting#isLocked()} from the service. + * Populates the {@link ConfigurationSetting#isReadOnly()} from the service. */ - public static final SettingFields LOCKED = fromString("LOCKED"); + public static final SettingFields READ_ONLY = fromString("LOCKED"); /** * Populates the {@link ConfigurationSetting#getTags()} from the service. */ diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationAsyncClientJavaDocCodeSnippets.java b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationAsyncClientJavaDocCodeSnippets.java index a08176deb35c..f98bc084d8d5 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationAsyncClientJavaDocCodeSnippets.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationAsyncClientJavaDocCodeSnippets.java @@ -37,7 +37,7 @@ public void addSettingsCodeSnippet() { * Code snippets for {@link ConfigurationAsyncClient#addSetting(ConfigurationSetting)} */ // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.addSetting#ConfigurationSetting - client.addSetting(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS").setValue("db_connection")) + client.addSetting("prodDBConnection", "westUS", "db_connection") .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(response -> System.out.printf("Key: %s, Label: %s, Value: %s", response.getKey(), response.getLabel(), response.getValue())); diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationSets.java b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationSets.java index 091fddcc13e7..4b2feabcfe30 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationSets.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationSets.java @@ -108,6 +108,7 @@ private static Mono addConfigurations(ConfigurationAsyncClient client, Str .setValue(MAPPER.writeValueAsString(complexConfiguration)) .setContentType("application/json"); - return Flux.merge(client.addSetting(keyVaultSetting), client.addSetting(endpointSetting)).then(); + return Flux.merge(client.addSetting(keyVaultSetting.getKey(), keyVaultSetting.getLabel(), keyVaultSetting.getValue()), + client.addSetting(endpointSetting.getKey(), endpointSetting.getLabel(), endpointSetting.getValue())).then(); } } diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/PipelineSample.java b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/PipelineSample.java index e98d26f8ab36..a2ea04705972 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/PipelineSample.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/PipelineSample.java @@ -50,10 +50,11 @@ public static void main(String[] args) throws NoSuchAlgorithmException, Invalid .buildAsyncClient(); // Adding a couple of settings and then fetching all the settings in our repository. - final List settings = Flux.concat(client.addSetting(new ConfigurationSetting().setKey("hello").setValue("world")), - client.setSetting("newSetting", null, "newValue")) - .then(client.listSettings(new SettingSelector().setKeys("*")).collectList()) - .block(); + final List settings = Flux.concat( + client.addSetting("hello", null, "world"), + client.setSetting("newSetting", null, "newValue")) + .then(client.listSettings(new SettingSelector().setKeys("*")).collectList()) + .block(); // Cleaning up after ourselves by deleting the values. final Stream stream = settings == null diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java index 5fac0819a3de..eb2f2aeb74ae 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java @@ -2,7 +2,8 @@ // Licensed under the MIT License. package com.azure.data.appconfiguration; -import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceExistsException; import com.azure.core.exception.ResourceNotFoundException; import com.azure.core.http.netty.NettyAsyncHttpClientBuilder; import com.azure.core.http.policy.HttpLogDetailLevel; @@ -58,8 +59,8 @@ protected void afterTest() { logger.info("Cleaning up created key values."); client.listSettings(new SettingSelector().setKeys(keyPrefix + "*")) .flatMap(configurationSetting -> { - logger.info("Deleting key:label [{}:{}]. isLocked? {}", configurationSetting.getKey(), configurationSetting.getLabel(), configurationSetting.isLocked()); - Mono> unlock = configurationSetting.isLocked() ? client.clearReadOnlyWithResponse(configurationSetting) : Mono.empty(); + logger.info("Deleting key:label [{}:{}]. isReadOnly? {}", configurationSetting.getKey(), configurationSetting.getLabel(), configurationSetting.isReadOnly()); + Mono> unlock = configurationSetting.isReadOnly() ? client.clearReadOnlyWithResponse(configurationSetting) : Mono.empty(); return unlock.then(client.deleteSettingWithResponse(configurationSetting, false)); }) .blockLast(); @@ -72,7 +73,7 @@ protected void afterTest() { */ public void addSetting() { addSettingRunner((expected) -> - StepVerifier.create(client.addSetting(expected)) + StepVerifier.create(client.addSettingWithResponse(expected)) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete()); } @@ -108,7 +109,7 @@ public void addSettingNullKey() { .expectError(IllegalArgumentException.class) .verify(); - StepVerifier.create(client.addSetting(null)) + StepVerifier.create(client.addSettingWithResponse(null)) .expectError(NullPointerException.class) .verify(); } @@ -118,13 +119,13 @@ public void addSettingNullKey() { */ public void addExistingSetting() { addExistingSettingRunner((expected) -> - StepVerifier.create(client.addSetting(expected).then(client.addSetting(expected))) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceModifiedException.class, HttpURLConnection.HTTP_PRECON_FAILED))); + StepVerifier.create(client.addSettingWithResponse(expected).then(client.addSettingWithResponse(expected))) + .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceExistsException.class, HttpURLConnection.HTTP_PRECON_FAILED))); } /** * Tests that a configuration is able to be added or updated with set. - * When the configuration is locked updates cannot happen, this will result in a 409. + * When the configuration is read-only updates cannot happen, this will result in a 409. */ public void setSetting() { setSettingRunner((expected, update) -> @@ -142,16 +143,16 @@ public void setSettingIfEtag() { setSettingIfEtagRunner((initial, update) -> { // This etag is not the correct format. It is not the correct hash that the service is expecting. StepVerifier.create(client.setSettingWithResponse(initial.setETag("badEtag"), true)) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED)); + .verifyErrorSatisfies(ex -> assertRestException(ex, HttpResponseException.class, HttpURLConnection.HTTP_PRECON_FAILED)); - final String etag = client.addSetting(initial).block().getETag(); + final String etag = client.addSettingWithResponse(initial).block().getValue().getETag(); StepVerifier.create(client.setSettingWithResponse(update.setETag(etag), true)) .assertNext(response -> assertConfigurationEquals(update, response)) .verifyComplete(); StepVerifier.create(client.setSettingWithResponse(initial, true)) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED)); + .verifyErrorSatisfies(ex -> assertRestException(ex, HttpResponseException.class, HttpURLConnection.HTTP_PRECON_FAILED)); StepVerifier.create(client.getSettingWithResponse(update, null, false)) .assertNext(response -> assertConfigurationEquals(update, response)) @@ -195,11 +196,11 @@ public void setSettingNullKey() { } /** - * Tests that a configuration is able to be retrieved when it exists, whether or not it is locked. + * Tests that a configuration is able to be retrieved when it exists, whether or not it is read-only. */ public void getSetting() { getSettingRunner((expected) -> - StepVerifier.create(client.addSetting(expected).then(client.getSettingWithResponse(expected, null, false))) + StepVerifier.create(client.addSettingWithResponse(expected).then(client.getSettingWithResponse(expected, null, false))) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete()); } @@ -212,7 +213,7 @@ public void getSettingNotFound() { final ConfigurationSetting neverRetrievedConfiguration = new ConfigurationSetting().setKey(key).setValue("myNeverRetreivedValue"); final ConfigurationSetting nonExistentLabel = new ConfigurationSetting().setKey(key).setLabel("myNonExistentLabel"); - StepVerifier.create(client.addSetting(neverRetrievedConfiguration)) + StepVerifier.create(client.addSettingWithResponse(neverRetrievedConfiguration)) .assertNext(response -> assertConfigurationEquals(neverRetrievedConfiguration, response)) .verifyComplete(); @@ -231,7 +232,7 @@ public void getSettingNotFound() { */ public void deleteSetting() { deleteSettingRunner((expected) -> { - StepVerifier.create(client.addSetting(expected).then(client.getSettingWithResponse(expected, null, false))) + StepVerifier.create(client.addSettingWithResponse(expected).then(client.getSettingWithResponse(expected, null, false))) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); @@ -251,7 +252,7 @@ public void deleteSettingNotFound() { final String key = getKey(); final ConfigurationSetting neverDeletedConfiguration = new ConfigurationSetting().setKey(key).setValue("myNeverDeletedValue"); - StepVerifier.create(client.addSetting(neverDeletedConfiguration)) + StepVerifier.create(client.addSettingWithResponse(neverDeletedConfiguration)) .assertNext(response -> assertConfigurationEquals(neverDeletedConfiguration, response)) .verifyComplete(); @@ -274,7 +275,7 @@ public void deleteSettingNotFound() { */ public void deleteSettingWithETag() { deleteSettingWithETagRunner((initial, update) -> { - final ConfigurationSetting initiallyAddedConfig = client.addSetting(initial).block(); + final ConfigurationSetting initiallyAddedConfig = client.addSettingWithResponse(initial).block().getValue(); final ConfigurationSetting updatedConfig = client.setSettingWithResponse(update, true).block().getValue(); StepVerifier.create(client.getSettingWithResponse(initial, null, false)) @@ -282,7 +283,7 @@ public void deleteSettingWithETag() { .verifyComplete(); StepVerifier.create(client.deleteSettingWithResponse(initiallyAddedConfig, true)) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED)); + .verifyErrorSatisfies(ex -> assertRestException(ex, HttpResponseException.class, HttpURLConnection.HTTP_PRECON_FAILED)); StepVerifier.create(client.deleteSettingWithResponse(updatedConfig, true)) .assertNext(response -> assertConfigurationEquals(update, response)) @@ -304,46 +305,46 @@ public void deleteSettingNullKey() { } /** - * Tests assert that the setting can not be deleted after lock the setting. + * Tests assert that the setting can not be deleted after set the setting to read-only. */ public void setReadOnly() { lockUnlockRunner((expected) -> { - StepVerifier.create(client.addSetting(expected)) + StepVerifier.create(client.addSettingWithResponse(expected)) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); - // lock setting + // read-only setting StepVerifier.create(client.setReadOnly(expected.getKey(), expected.getLabel())) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); // unsuccessfully delete StepVerifier.create(client.deleteSettingWithResponse(expected, false)) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceModifiedException.class, 409)); + .verifyErrorSatisfies(ex -> assertRestException(ex, HttpResponseException.class, 409)); }); } /** - * Tests assert that the setting can be deleted after unlock the setting. + * Tests assert that the setting can be deleted after clear read-only of the setting. */ public void clearReadOnly() { lockUnlockRunner((expected) -> { - StepVerifier.create(client.addSetting(expected)) + StepVerifier.create(client.addSettingWithResponse(expected)) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); - // lock setting + // read-only setting StepVerifier.create(client.setReadOnly(expected.getKey(), expected.getLabel())) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); // unsuccessfully delete StepVerifier.create(client.deleteSettingWithResponse(expected, false)) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceModifiedException.class, 409)); + .verifyErrorSatisfies(ex -> assertRestException(ex, HttpResponseException.class, 409)); - // unlock setting and delete + // clear read-only of setting and delete StepVerifier.create(client.clearReadOnly(expected.getKey(), expected.getLabel())) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); @@ -356,44 +357,44 @@ public void clearReadOnly() { } /** - * Tests assert that the setting can not be deleted after lock the setting. + * Tests assert that the setting can not be deleted after set the setting to read-only. */ public void setReadOnlyWithConfigurationSetting() { lockUnlockRunner((expected) -> { - StepVerifier.create(client.addSetting(expected)) + StepVerifier.create(client.addSettingWithResponse(expected)) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); - // lock setting + // read-only setting StepVerifier.create(client.setReadOnlyWithResponse(expected)) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); // unsuccessfully delete StepVerifier.create(client.deleteSettingWithResponse(expected, false)) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceModifiedException.class, 409)); + .verifyErrorSatisfies(ex -> assertRestException(ex, HttpResponseException.class, 409)); }); } /** - * Tests assert that the setting can be deleted after unlock the setting. + * Tests assert that the setting can be deleted after clear read-only of the setting. */ public void clearReadOnlyWithConfigurationSetting() { lockUnlockRunner((expected) -> { - StepVerifier.create(client.addSetting(expected)) + StepVerifier.create(client.addSettingWithResponse(expected)) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); - // lock setting + // read-only setting StepVerifier.create(client.setReadOnly(expected.getKey(), expected.getLabel())) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); // unsuccessfully delete StepVerifier.create(client.deleteSettingWithResponse(expected, false)) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceModifiedException.class, 409)); + .verifyErrorSatisfies(ex -> assertRestException(ex, HttpResponseException.class, 409)); - // unlock setting and delete + // clear read-only setting and delete StepVerifier.create(client.clearReadOnlyWithResponse(expected)) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); @@ -439,11 +440,11 @@ public void listWithMultipleKeys() { listWithMultipleKeysRunner(key, key2, (setting, setting2) -> { List selected = new ArrayList<>(); - StepVerifier.create(client.addSetting(setting)) + StepVerifier.create(client.addSettingWithResponse(setting)) .assertNext(response -> assertConfigurationEquals(setting, response)) .verifyComplete(); - StepVerifier.create(client.addSetting(setting2)) + StepVerifier.create(client.addSettingWithResponse(setting2)) .assertNext(response -> assertConfigurationEquals(setting2, response)) .verifyComplete(); @@ -468,11 +469,11 @@ public void listWithMultipleLabels() { listWithMultipleLabelsRunner(key, label, label2, (setting, setting2) -> { List selected = new ArrayList<>(); - StepVerifier.create(client.addSetting(setting)) + StepVerifier.create(client.addSettingWithResponse(setting)) .assertNext(response -> assertConfigurationEquals(setting, response)) .verifyComplete(); - StepVerifier.create(client.addSetting(setting2)) + StepVerifier.create(client.addSettingWithResponse(setting2)) .assertNext(response -> assertConfigurationEquals(setting2, response)) .verifyComplete(); @@ -587,7 +588,7 @@ public void listRevisionsWithMultipleKeys() { listRevisionsWithMultipleKeysRunner(key, key2, (testInput) -> { List selected = new ArrayList<>(); - StepVerifier.create(client.addSetting(testInput.get(0))) + StepVerifier.create(client.addSettingWithResponse(testInput.get(0))) .assertNext(response -> assertConfigurationEquals(testInput.get(0), response)) .verifyComplete(); @@ -595,7 +596,7 @@ public void listRevisionsWithMultipleKeys() { .assertNext(response -> assertConfigurationEquals(testInput.get(1), response)) .verifyComplete(); - StepVerifier.create(client.addSetting(testInput.get(2))) + StepVerifier.create(client.addSettingWithResponse(testInput.get(2))) .assertNext(response -> assertConfigurationEquals(testInput.get(2), response)) .verifyComplete(); @@ -625,7 +626,7 @@ public void listRevisionsWithMultipleLabels() { listRevisionsWithMultipleLabelsRunner(key, label, label2, (testInput) -> { List selected = new ArrayList<>(); - StepVerifier.create(client.addSetting(testInput.get(0))) + StepVerifier.create(client.addSettingWithResponse(testInput.get(0))) .assertNext(response -> assertConfigurationEquals(testInput.get(0), response)) .verifyComplete(); @@ -633,7 +634,7 @@ public void listRevisionsWithMultipleLabels() { .assertNext(response -> assertConfigurationEquals(testInput.get(1), response)) .verifyComplete(); - StepVerifier.create(client.addSetting(testInput.get(2))) + StepVerifier.create(client.addSettingWithResponse(testInput.get(2))) .assertNext(response -> assertConfigurationEquals(testInput.get(2), response)) .verifyComplete(); @@ -661,7 +662,7 @@ public void listRevisionsWithRange() { final ConfigurationSetting updated = new ConfigurationSetting().setKey(original.getKey()).setValue("anotherValue"); final ConfigurationSetting updated2 = new ConfigurationSetting().setKey(original.getKey()).setValue("anotherValue2"); - StepVerifier.create(client.addSetting(original)) + StepVerifier.create(client.addSettingWithResponse(original)) .assertNext(response -> assertConfigurationEquals(original, response)) .verifyComplete(); @@ -686,7 +687,7 @@ public void listRevisionsInvalidRange() { final String key = getKey(); final ConfigurationSetting original = new ConfigurationSetting().setKey(key).setValue("myValue"); - StepVerifier.create(client.addSetting(original)) + StepVerifier.create(client.addSettingWithResponse(original)) .assertNext(response -> assertConfigurationEquals(original, response)) .verifyComplete(); @@ -839,23 +840,32 @@ public void listSettingsWithPagination() { * scenario will return a setting when the etag provided does not match the one of the current setting. */ public void getSettingWhenValueNotUpdated() { - final String key = testResourceNamer.randomName(keyPrefix, 16); + final String key = getKey(); final ConfigurationSetting expected = new ConfigurationSetting().setKey(key).setValue("myValue"); final ConfigurationSetting newExpected = new ConfigurationSetting().setKey(key).setValue("myNewValue"); - final ConfigurationSetting block = client.addSetting(expected).single().block(); + final ConfigurationSetting block = client.addSettingWithResponse(expected).block().getValue(); assertNotNull(block); - assertConfigurationEquals(expected, block); + + // conditional get, now the setting has not be updated yet, resulting 304 and null value + StepVerifier.create(client.getSettingWithResponse(block, null, true)) + .assertNext(response -> assertConfigurationEquals(null, response, 304)) + .verifyComplete(); StepVerifier.create(client.setSettingWithResponse(newExpected, false)) .assertNext(response -> assertConfigurationEquals(newExpected, response)) .verifyComplete(); + + // conditional get, now the setting is updated and we are able to get a new setting with 200 code + StepVerifier.create(client.getSettingWithResponse(block, null, true)) + .assertNext(response -> assertConfigurationEquals(newExpected, response)) + .verifyComplete(); } public void deleteAllSettings() { client.listSettings(new SettingSelector().setKeys("*")) .flatMap(configurationSetting -> { - logger.info("Deleting key:label [{}:{}]. isLocked? {}", configurationSetting.getKey(), configurationSetting.getLabel(), configurationSetting.isLocked()); + logger.info("Deleting key:label [{}:{}]. isReadOnly? {}", configurationSetting.getKey(), configurationSetting.getLabel(), configurationSetting.isReadOnly()); return client.deleteSettingWithResponse(configurationSetting, false); }).blockLast(); } diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java index 87283dcea567..efbfe3608950 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java @@ -2,13 +2,14 @@ // Licensed under the MIT License. package com.azure.data.appconfiguration; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceExistsException; import com.azure.core.http.netty.NettyAsyncHttpClientBuilder; import com.azure.core.http.policy.HttpLogOptions; import com.azure.data.appconfiguration.models.ConfigurationSetting; import com.azure.data.appconfiguration.models.Range; import com.azure.data.appconfiguration.models.SettingFields; import com.azure.data.appconfiguration.models.SettingSelector; -import com.azure.core.exception.ResourceModifiedException; import com.azure.core.exception.ResourceNotFoundException; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.RetryPolicy; @@ -55,8 +56,8 @@ protected void beforeTest() { protected void afterTest() { logger.info("Cleaning up created key values."); client.listSettings(new SettingSelector().setKeys(keyPrefix + "*")).forEach(configurationSetting -> { - logger.info("Deleting key:label [{}:{}]. isLocked? {}", configurationSetting.getKey(), configurationSetting.getLabel(), configurationSetting.isLocked()); - if (configurationSetting.isLocked()) { + logger.info("Deleting key:label [{}:{}]. isReadOnly? {}", configurationSetting.getKey(), configurationSetting.getLabel(), configurationSetting.isReadOnly()); + if (configurationSetting.isReadOnly()) { client.clearReadOnlyWithResponse(configurationSetting, Context.NONE); } client.deleteSettingWithResponse(configurationSetting, false, Context.NONE).getValue(); @@ -104,13 +105,13 @@ public void addExistingSetting() { addExistingSettingRunner((expected) -> { client.addSettingWithResponse(expected, Context.NONE).getValue(); assertRestException(() -> client.addSettingWithResponse(expected, Context.NONE).getValue(), - ResourceModifiedException.class, HttpURLConnection.HTTP_PRECON_FAILED); + ResourceExistsException.class, HttpURLConnection.HTTP_PRECON_FAILED); }); } /** * Tests that a configuration is able to be added or updated with set. - * When the configuration is locked updates cannot happen, this will result in a 409. + * When the configuration is read-only updates cannot happen, this will result in a 409. */ public void setSetting() { setSettingRunner((expected, update) -> assertConfigurationEquals(expected, client.setSettingWithResponse(expected, false, Context.NONE).getValue())); @@ -124,12 +125,12 @@ public void setSetting() { public void setSettingIfEtag() { setSettingIfEtagRunner((initial, update) -> { // This etag is not the correct format. It is not the correct hash that the service is expecting. - assertRestException(() -> client.setSettingWithResponse(initial.setETag("badEtag"), true, Context.NONE).getValue(), ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED); + assertRestException(() -> client.setSettingWithResponse(initial.setETag("badEtag"), true, Context.NONE).getValue(), HttpResponseException.class, HttpURLConnection.HTTP_PRECON_FAILED); final String etag = client.addSettingWithResponse(initial, Context.NONE).getValue().getETag(); assertConfigurationEquals(update, client.setSettingWithResponse(update.setETag(etag), true, Context.NONE)); - assertRestException(() -> client.setSettingWithResponse(initial, true, Context.NONE).getValue(), ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED); + assertRestException(() -> client.setSettingWithResponse(initial, true, Context.NONE).getValue(), HttpResponseException.class, HttpURLConnection.HTTP_PRECON_FAILED); assertConfigurationEquals(update, client.getSetting(update.getKey(), update.getLabel())); }); } @@ -161,7 +162,7 @@ public void setSettingNullKey() { } /** - * Tests that a configuration is able to be retrieved when it exists, whether or not it is locked. + * Tests that a configuration is able to be retrieved when it exists, whether or not it is read-only. */ public void getSetting() { getSettingRunner((expected) -> { @@ -225,7 +226,7 @@ public void deleteSettingWithETag() { final ConfigurationSetting updatedConfig = client.setSettingWithResponse(update, false, Context.NONE).getValue(); assertConfigurationEquals(update, client.getSetting(initial.getKey(), initial.getLabel())); - assertRestException(() -> client.deleteSettingWithResponse(initiallyAddedConfig, true, Context.NONE).getValue(), ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED); + assertRestException(() -> client.deleteSettingWithResponse(initiallyAddedConfig, true, Context.NONE).getValue(), HttpResponseException.class, HttpURLConnection.HTTP_PRECON_FAILED); assertConfigurationEquals(update, client.deleteSettingWithResponse(updatedConfig, true, Context.NONE).getValue()); assertRestException(() -> client.getSetting(initial.getKey(), initial.getLabel()), ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND); }); @@ -240,37 +241,37 @@ public void deleteSettingNullKey() { } /** - * Tests assert that the setting can not be deleted after lock the setting. + * Tests assert that the setting can not be deleted after set the setting to read-only. */ public void setReadOnly() { lockUnlockRunner((expected) -> { - // lock setting + // read-only setting client.addSettingWithResponse(expected, Context.NONE); client.setReadOnly(expected.getKey(), expected.getLabel()); // unsuccessfully delete assertRestException(() -> client.deleteSettingWithResponse(expected, false, Context.NONE), - ResourceModifiedException.class, 409); + HttpResponseException.class, 409); }); } /** - * Tests assert that the setting can be deleted after unlock the setting. + * Tests assert that the setting can be deleted after clear read-only of the setting. */ public void clearReadOnly() { lockUnlockRunner((expected) -> { - // lock setting + // read-only setting client.addSettingWithResponse(expected, Context.NONE); client.setReadOnlyWithResponse(expected, Context.NONE).getValue(); // unsuccessfully delete assertRestException(() -> client.deleteSettingWithResponse(expected, false, Context.NONE), - ResourceModifiedException.class, 409); + HttpResponseException.class, 409); - // unlock setting and delete + // clear read-only setting and delete client.clearReadOnly(expected.getKey(), expected.getLabel()); // successfully deleted @@ -291,7 +292,7 @@ public void setReadOnlyWithConfigurationSetting() { // unsuccessfully delete assertRestException(() -> client.deleteSettingWithResponse(expected, false, Context.NONE), - ResourceModifiedException.class, 409); + HttpResponseException.class, 409); }); } @@ -308,7 +309,7 @@ public void clearReadOnlyWithConfigurationSetting() { // unsuccessfully deleted assertRestException(() -> client.deleteSettingWithResponse(expected, false, Context.NONE), - ResourceModifiedException.class, 409); + HttpResponseException.class, 409); // unlock setting and delete client.clearReadOnlyWithResponse(expected, Context.NONE); @@ -619,13 +620,17 @@ public void getSettingWhenValueNotUpdated() { assertNotNull(block); assertConfigurationEquals(expected, block); + // conditional get, now the setting has not be updated yet, resulting 304 and null value + assertConfigurationEquals(null, client.getSettingWithResponse(block, null, true, Context.NONE), 304); assertConfigurationEquals(newExpected, client.setSettingWithResponse(newExpected, false, Context.NONE).getValue()); + // conditional get, now the setting is updated and we are able to get a new setting with 200 code + assertConfigurationEquals(newExpected, client.getSettingWithResponse(newExpected, null, true, Context.NONE).getValue()); } public void deleteAllSettings() { client.listSettings(new SettingSelector().setKeys("*")).forEach(configurationSetting -> { - logger.info("Deleting key:label [{}:{}]. isLocked? {}", configurationSetting.getKey(), configurationSetting.getLabel(), configurationSetting.isLocked()); + logger.info("Deleting key:label [{}:{}]. isReadOnly? {}", configurationSetting.getKey(), configurationSetting.getLabel(), configurationSetting.isReadOnly()); client.deleteSettingWithResponse(configurationSetting, false, Context.NONE).getValue(); }); } diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java index cad49c6a78df..843db1c0141e 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java @@ -390,7 +390,6 @@ void listRevisionsWithMultipleLabelsRunner(String key, String label, String labe @Test public abstract void listRevisionsWithPaginationAndRepeatIterator(); - @Ignore("Getting a configuration setting only when the value has changed is not a common scenario.") @Test public abstract void getSettingWhenValueNotUpdated(); @@ -530,7 +529,7 @@ static boolean equals(ConfigurationSetting o1, ConfigurationSetting o2) { || !Objects.equals(o1.getValue(), o2.getValue()) || !Objects.equals(o1.getETag(), o2.getETag()) || !Objects.equals(o1.getLastModified(), o2.getLastModified()) - || !Objects.equals(o1.isLocked(), o2.isLocked()) + || !Objects.equals(o1.isReadOnly(), o2.isReadOnly()) || !Objects.equals(o1.getContentType(), o2.getContentType()) || ImplUtils.isNullOrEmpty(o1.getTags()) != ImplUtils.isNullOrEmpty(o2.getTags())) { return false; diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addExistingSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addExistingSetting.json index 952dc22e0d7f..1c9a75306b1a 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addExistingSetting.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addExistingSetting.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4698176943a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8632510683e", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d9c5bc46-dd47-4633-853d-b60bf1ed929b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "23301075-cd1a-4582-94fa-0accdf8ba505", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:09 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:22 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "19c8b56a-6a3f-4826-9916-a4cdb43257a6", + "x-ms-correlation-request-id" : "1285917f-0265-47cb-83c5-7f7d74d8a1e5", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"XeRcofiXwscGLct7QL3onmIJ6ix\"", + "ETag" : "\"loGyBpHmOAmod3U9PY7d0IddW1l\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTg=;sn=402218", - "x-ms-request-id" : "19c8b56a-6a3f-4826-9916-a4cdb43257a6", - "Body" : "{\"etag\":\"XeRcofiXwscGLct7QL3onmIJ6ix\",\"key\":\"key4698176943a\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:09+00:00\"}", - "x-ms-client-request-id" : "d9c5bc46-dd47-4633-853d-b60bf1ed929b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMTc=;sn=449017", + "x-ms-request-id" : "1285917f-0265-47cb-83c5-7f7d74d8a1e5", + "Body" : "{\"etag\":\"loGyBpHmOAmod3U9PY7d0IddW1l\",\"key\":\"key8632510683e\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"}", + "x-ms-client-request-id" : "23301075-cd1a-4582-94fa-0accdf8ba505", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4698176943a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8632510683e", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6d55a717-65b8-459c-82d7-bab147afc050", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "45a1f67e-3ee6-4c70-8879-4fa9d88eede7", "Content-Type" : "application/json" }, "Response" : { @@ -45,23 +45,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:22 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4b1a6c27-2b6f-42d9-bd14-a8dcc87686d3", + "x-ms-correlation-request-id" : "2bb310c1-dc20-459b-9c12-8023974f9d11", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "4b1a6c27-2b6f-42d9-bd14-a8dcc87686d3", - "x-ms-client-request-id" : "6d55a717-65b8-459c-82d7-bab147afc050" + "x-ms-request-id" : "2bb310c1-dc20-459b-9c12-8023974f9d11", + "x-ms-client-request-id" : "45a1f67e-3ee6-4c70-8879-4fa9d88eede7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4698176943a?label=d3a073aa61144c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8632510683e?label=fafb8817904851", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "056b8260-25c0-4a70-89cf-ea5fbd4185d1", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6d2f8eed-b027-47d3-ba16-003e3a94f81e", "Content-Type" : "application/json" }, "Response" : { @@ -70,29 +70,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:09 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:22 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b2fa0e71-f0a0-4a4a-a0e5-7d31cea66f5d", + "x-ms-correlation-request-id" : "ea5be197-34cd-4ced-b626-01e6e1791e75", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"pv2IHijBAr5pAFOMerC6HtedCnU\"", + "ETag" : "\"bzq1ef8IVBtFn1FiOFDIGnokZlL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTk=;sn=402219", - "x-ms-request-id" : "b2fa0e71-f0a0-4a4a-a0e5-7d31cea66f5d", - "Body" : "{\"etag\":\"pv2IHijBAr5pAFOMerC6HtedCnU\",\"key\":\"key4698176943a\",\"label\":\"d3a073aa61144c\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:09+00:00\"}", - "x-ms-client-request-id" : "056b8260-25c0-4a70-89cf-ea5fbd4185d1", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMTg=;sn=449018", + "x-ms-request-id" : "ea5be197-34cd-4ced-b626-01e6e1791e75", + "Body" : "{\"etag\":\"bzq1ef8IVBtFn1FiOFDIGnokZlL\",\"key\":\"key8632510683e\",\"label\":\"fafb8817904851\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"}", + "x-ms-client-request-id" : "6d2f8eed-b027-47d3-ba16-003e3a94f81e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4698176943a?label=d3a073aa61144c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8632510683e?label=fafb8817904851", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2f52e2fe-c93b-46ca-87b6-f2ccc82fae57", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5a19927e-83e6-4e99-8ac7-2c654e340861", "Content-Type" : "application/json" }, "Response" : { @@ -102,23 +102,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:22 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "51772193-2e77-4d61-b421-65196ccfc35f", + "x-ms-correlation-request-id" : "a7b316af-1204-49c6-994b-957f4aee65e3", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "51772193-2e77-4d61-b421-65196ccfc35f", - "x-ms-client-request-id" : "2f52e2fe-c93b-46ca-87b6-f2ccc82fae57" + "x-ms-request-id" : "a7b316af-1204-49c6-994b-957f4aee65e3", + "x-ms-client-request-id" : "5a19927e-83e6-4e99-8ac7-2c654e340861" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key46981%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key86325%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0f5669e5-0e3d-4849-b03b-a8062a72beb1", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c4fd46b9-0dc7-41e3-b10f-2059a8823f3b", "Content-Type" : "application/json" }, "Response" : { @@ -129,25 +129,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:22 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "10465feb-34a2-40de-b0f1-199e3a1d04ba", + "x-ms-correlation-request-id" : "2569efe4-821d-4111-883c-35b55577d1fc", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTk=;sn=402219", - "x-ms-request-id" : "10465feb-34a2-40de-b0f1-199e3a1d04ba", - "Body" : "{\"items\":[{\"etag\":\"XeRcofiXwscGLct7QL3onmIJ6ix\",\"key\":\"key4698176943a\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:09+00:00\"},{\"etag\":\"pv2IHijBAr5pAFOMerC6HtedCnU\",\"key\":\"key4698176943a\",\"label\":\"d3a073aa61144c\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:09+00:00\"}]}", - "x-ms-client-request-id" : "0f5669e5-0e3d-4849-b03b-a8062a72beb1", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMTg=;sn=449018", + "x-ms-request-id" : "2569efe4-821d-4111-883c-35b55577d1fc", + "Body" : "{\"items\":[{\"etag\":\"loGyBpHmOAmod3U9PY7d0IddW1l\",\"key\":\"key8632510683e\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"},{\"etag\":\"bzq1ef8IVBtFn1FiOFDIGnokZlL\",\"key\":\"key8632510683e\",\"label\":\"fafb8817904851\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"}]}", + "x-ms-client-request-id" : "c4fd46b9-0dc7-41e3-b10f-2059a8823f3b", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4698176943a?label=d3a073aa61144c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8632510683e", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "14de7cdb-4a52-461b-a76f-1c4ef5fd3e00", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "14c94d08-b14f-4e1f-9ee0-ad098989d4c7", "Content-Type" : "application/json" }, "Response" : { @@ -156,29 +156,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:09 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:22 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "dd527e52-9b0f-4a1d-852a-2ebfbe97ccaf", + "x-ms-correlation-request-id" : "f743c635-2ee9-471f-b20f-7fc7a3803e52", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"pv2IHijBAr5pAFOMerC6HtedCnU\"", + "ETag" : "\"loGyBpHmOAmod3U9PY7d0IddW1l\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMjA=;sn=402220", - "x-ms-request-id" : "dd527e52-9b0f-4a1d-852a-2ebfbe97ccaf", - "Body" : "{\"etag\":\"pv2IHijBAr5pAFOMerC6HtedCnU\",\"key\":\"key4698176943a\",\"label\":\"d3a073aa61144c\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:09+00:00\"}", - "x-ms-client-request-id" : "14de7cdb-4a52-461b-a76f-1c4ef5fd3e00", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMTk=;sn=449019", + "x-ms-request-id" : "f743c635-2ee9-471f-b20f-7fc7a3803e52", + "Body" : "{\"etag\":\"loGyBpHmOAmod3U9PY7d0IddW1l\",\"key\":\"key8632510683e\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"}", + "x-ms-client-request-id" : "14c94d08-b14f-4e1f-9ee0-ad098989d4c7", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4698176943a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8632510683e?label=fafb8817904851", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "752d740f-75a8-464f-8e31-48ce4dae4516", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1b5fea7f-3c4d-4171-b81f-4e1411da7cc6", "Content-Type" : "application/json" }, "Response" : { @@ -187,23 +187,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:09 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:22 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "67af2cbf-3b80-42ac-9b08-c88f95f35e17", + "x-ms-correlation-request-id" : "1f9e73dc-2069-4e61-8145-54f99b7538fa", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"XeRcofiXwscGLct7QL3onmIJ6ix\"", + "ETag" : "\"bzq1ef8IVBtFn1FiOFDIGnokZlL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMjE=;sn=402221", - "x-ms-request-id" : "67af2cbf-3b80-42ac-9b08-c88f95f35e17", - "Body" : "{\"etag\":\"XeRcofiXwscGLct7QL3onmIJ6ix\",\"key\":\"key4698176943a\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:09+00:00\"}", - "x-ms-client-request-id" : "752d740f-75a8-464f-8e31-48ce4dae4516", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMjA=;sn=449020", + "x-ms-request-id" : "1f9e73dc-2069-4e61-8145-54f99b7538fa", + "Body" : "{\"etag\":\"bzq1ef8IVBtFn1FiOFDIGnokZlL\",\"key\":\"key8632510683e\",\"label\":\"fafb8817904851\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"}", + "x-ms-client-request-id" : "1b5fea7f-3c4d-4171-b81f-4e1411da7cc6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key46981", "d3a073aa", "key4698176943a", "d3a073aa61144c" ] + "variables" : [ "key86325", "fafb8817", "key8632510683e", "fafb8817904851" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSetting.json index 45ad29cff5a1..ccb5ab4586fb 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSetting.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSetting.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76430011527", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3446628026c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d09086bd-19a0-448d-b360-6776a89c1e2d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7b2a8509-fb09-407b-a329-3763c8b52fb6", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "e6976d8c-9fce-41a5-a366-ee607786701c", + "x-ms-correlation-request-id" : "e0470fa3-f717-474f-a5f0-0e2f64f2c262", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"NmbeU1aenfIlap0wuCcR2AcUQ2G\"", + "ETag" : "\"kjWHpilVhZzgCsy2FuXJvf4UB8w\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMDQ=;sn=402004", - "x-ms-request-id" : "e6976d8c-9fce-41a5-a366-ee607786701c", - "Body" : "{\"etag\":\"NmbeU1aenfIlap0wuCcR2AcUQ2G\",\"key\":\"key76430011527\",\"label\":null,\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"}", - "x-ms-client-request-id" : "d09086bd-19a0-448d-b360-6776a89c1e2d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTY=;sn=448796", + "x-ms-request-id" : "e0470fa3-f717-474f-a5f0-0e2f64f2c262", + "Body" : "{\"etag\":\"kjWHpilVhZzgCsy2FuXJvf4UB8w\",\"key\":\"key3446628026c\",\"label\":null,\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "7b2a8509-fb09-407b-a329-3763c8b52fb6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76430011527?label=80e2a77d37613d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3446628026c?label=21fb55a472549e", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "43991883-cf69-4969-8245-99b1f47ed715", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8a9c664b-99d9-4997-b205-d88ecaf19442", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4a598272-e19f-4f44-b05e-cc3123d5d3fd", + "x-ms-correlation-request-id" : "2a7e134c-55c9-4643-98b6-9836dd18a8fd", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"r27vsVE0wLgZh7O6JznRC5LHmDS\"", + "ETag" : "\"APL0mjtqWqjIZD0v4oKPeGol9nO\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMDU=;sn=402005", - "x-ms-request-id" : "4a598272-e19f-4f44-b05e-cc3123d5d3fd", - "Body" : "{\"etag\":\"r27vsVE0wLgZh7O6JznRC5LHmDS\",\"key\":\"key76430011527\",\"label\":\"80e2a77d37613d\",\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"}", - "x-ms-client-request-id" : "43991883-cf69-4969-8245-99b1f47ed715", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTc=;sn=448797", + "x-ms-request-id" : "2a7e134c-55c9-4643-98b6-9836dd18a8fd", + "Body" : "{\"etag\":\"APL0mjtqWqjIZD0v4oKPeGol9nO\",\"key\":\"key3446628026c\",\"label\":\"21fb55a472549e\",\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "8a9c664b-99d9-4997-b205-d88ecaf19442", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key76430%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key34466%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "75fb65da-9380-4991-9c57-148a747da914", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "383e33c0-4a36-4d9a-9e81-9f25ac730df6", "Content-Type" : "application/json" }, "Response" : { @@ -77,25 +77,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c2d5a063-e626-42bb-83f9-995cf72ae907", + "x-ms-correlation-request-id" : "738b8b77-b16f-4f10-9181-a58fc643a777", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMDU=;sn=402005", - "x-ms-request-id" : "c2d5a063-e626-42bb-83f9-995cf72ae907", - "Body" : "{\"items\":[{\"etag\":\"NmbeU1aenfIlap0wuCcR2AcUQ2G\",\"key\":\"key76430011527\",\"label\":null,\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"},{\"etag\":\"r27vsVE0wLgZh7O6JznRC5LHmDS\",\"key\":\"key76430011527\",\"label\":\"80e2a77d37613d\",\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"}]}", - "x-ms-client-request-id" : "75fb65da-9380-4991-9c57-148a747da914", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTc=;sn=448797", + "x-ms-request-id" : "738b8b77-b16f-4f10-9181-a58fc643a777", + "Body" : "{\"items\":[{\"etag\":\"kjWHpilVhZzgCsy2FuXJvf4UB8w\",\"key\":\"key3446628026c\",\"label\":null,\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"},{\"etag\":\"APL0mjtqWqjIZD0v4oKPeGol9nO\",\"key\":\"key3446628026c\",\"label\":\"21fb55a472549e\",\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}]}", + "x-ms-client-request-id" : "383e33c0-4a36-4d9a-9e81-9f25ac730df6", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76430011527", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3446628026c?label=21fb55a472549e", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "95181ab1-7ba7-4c14-b7c7-df77e35362cf", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "067e384d-edb6-423d-ab08-5a9bcbdc7d5f", "Content-Type" : "application/json" }, "Response" : { @@ -104,29 +104,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a3c34714-e1a7-430a-a35f-b60405a266a2", + "x-ms-correlation-request-id" : "ff354c2f-1fb1-4fe4-8315-fe53638d30da", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"NmbeU1aenfIlap0wuCcR2AcUQ2G\"", + "ETag" : "\"APL0mjtqWqjIZD0v4oKPeGol9nO\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMDY=;sn=402006", - "x-ms-request-id" : "a3c34714-e1a7-430a-a35f-b60405a266a2", - "Body" : "{\"etag\":\"NmbeU1aenfIlap0wuCcR2AcUQ2G\",\"key\":\"key76430011527\",\"label\":null,\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"}", - "x-ms-client-request-id" : "95181ab1-7ba7-4c14-b7c7-df77e35362cf", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTk=;sn=448799", + "x-ms-request-id" : "ff354c2f-1fb1-4fe4-8315-fe53638d30da", + "Body" : "{\"etag\":\"APL0mjtqWqjIZD0v4oKPeGol9nO\",\"key\":\"key3446628026c\",\"label\":\"21fb55a472549e\",\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "067e384d-edb6-423d-ab08-5a9bcbdc7d5f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76430011527?label=80e2a77d37613d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3446628026c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f7c25d15-d2f1-45ec-b7c3-2e7646ef949b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1d1ec116-f41a-4fb7-a14d-a0a4b7b3793a", "Content-Type" : "application/json" }, "Response" : { @@ -135,23 +135,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "006f6073-53be-4e0b-b7cd-e0d03bc6636b", + "x-ms-correlation-request-id" : "5643825b-3e08-4234-83d3-c122a5ee4040", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"r27vsVE0wLgZh7O6JznRC5LHmDS\"", + "ETag" : "\"kjWHpilVhZzgCsy2FuXJvf4UB8w\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMDc=;sn=402007", - "x-ms-request-id" : "006f6073-53be-4e0b-b7cd-e0d03bc6636b", - "Body" : "{\"etag\":\"r27vsVE0wLgZh7O6JznRC5LHmDS\",\"key\":\"key76430011527\",\"label\":\"80e2a77d37613d\",\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"}", - "x-ms-client-request-id" : "f7c25d15-d2f1-45ec-b7c3-2e7646ef949b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTg=;sn=448798", + "x-ms-request-id" : "5643825b-3e08-4234-83d3-c122a5ee4040", + "Body" : "{\"etag\":\"kjWHpilVhZzgCsy2FuXJvf4UB8w\",\"key\":\"key3446628026c\",\"label\":null,\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "1d1ec116-f41a-4fb7-a14d-a0a4b7b3793a", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key76430", "80e2a77d", "key76430011527", "80e2a77d37613d" ] + "variables" : [ "key34466", "21fb55a4", "key3446628026c", "21fb55a472549e" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyKey.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyKey.json index 13e2521aecc0..ce58a4e948a7 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyKey.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyKey.json @@ -3,8 +3,8 @@ "Method" : "PUT", "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d4a8f8bd-8883-473b-9852-33a5458b7500", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "529c7e89-4741-455c-8df7-42db3f9f9d14", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "405", - "Date" : "Tue, 08 Oct 2019 17:59:56 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "052258c1-f421-492c-b713-56504a0c594f", + "x-ms-correlation-request-id" : "aa73aeed-59f9-4575-8f76-d21eed99881d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "052258c1-f421-492c-b713-56504a0c594f", - "x-ms-client-request-id" : "d4a8f8bd-8883-473b-9852-33a5458b7500" + "x-ms-request-id" : "aa73aeed-59f9-4575-8f76-d21eed99881d", + "x-ms-client-request-id" : "529c7e89-4741-455c-8df7-42db3f9f9d14" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key23141%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key56729%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ae83a8c1-a919-4ba6-bafe-6744fa3e3f05", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5c26e65a-0918-4025-b0b3-6ab7f99bf4a0", "Content-Type" : "application/json" }, "Response" : { @@ -41,18 +41,18 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:56 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b99624bf-6a1b-40c8-9813-26e256674d3e", + "x-ms-correlation-request-id" : "70b8c4ed-6551-47a5-9570-f84d1d3cb15b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "x-ms-request-id" : "b99624bf-6a1b-40c8-9813-26e256674d3e", + "x-ms-request-id" : "70b8c4ed-6551-47a5-9570-f84d1d3cb15b", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "ae83a8c1-a919-4ba6-bafe-6744fa3e3f05", + "x-ms-client-request-id" : "5c26e65a-0918-4025-b0b3-6ab7f99bf4a0", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key23141", "45954c2b" ] + "variables" : [ "key56729", "63a8c269" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyValue.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyValue.json index 97ccc5885a1e..6209ce2dbc19 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyValue.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyValue.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4480332209d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key70916840278", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cd4d1b87-20b0-4c2e-b422-2a2bddb1c3ac", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2f7541d1-6f6a-4d47-b5c1-f977629426e0", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:21 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a473b298-f100-459c-949f-62d773ff7f91", + "x-ms-correlation-request-id" : "4be58390-7562-4646-9352-4a60dd6b13ff", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"gPx2ExAdLVlx1yjdn3JS2QWWD6M\"", + "ETag" : "\"DsXUfpQi8ZphyBLcBIEOj96BSsM\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDQ=;sn=402204", - "x-ms-request-id" : "a473b298-f100-459c-949f-62d773ff7f91", - "Body" : "{\"etag\":\"gPx2ExAdLVlx1yjdn3JS2QWWD6M\",\"key\":\"key4480332209d\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "cd4d1b87-20b0-4c2e-b422-2a2bddb1c3ac", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDM=;sn=449003", + "x-ms-request-id" : "4be58390-7562-4646-9352-4a60dd6b13ff", + "Body" : "{\"etag\":\"DsXUfpQi8ZphyBLcBIEOj96BSsM\",\"key\":\"key70916840278\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"}", + "x-ms-client-request-id" : "2f7541d1-6f6a-4d47-b5c1-f977629426e0", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4480332209d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key70916840278", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "edae9ad2-5364-4603-ba06-a3ca178edb8b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "886f1b1f-3806-4d90-bedc-a19f301d6c0f", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:21 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "47b81857-3618-4abd-9e92-6c2497668ff0", + "x-ms-correlation-request-id" : "a5cb36cb-b074-42d2-9ceb-c85164ad2345", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"gPx2ExAdLVlx1yjdn3JS2QWWD6M\"", + "ETag" : "\"DsXUfpQi8ZphyBLcBIEOj96BSsM\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDQ=;sn=402204", - "x-ms-request-id" : "47b81857-3618-4abd-9e92-6c2497668ff0", - "Body" : "{\"etag\":\"gPx2ExAdLVlx1yjdn3JS2QWWD6M\",\"key\":\"key4480332209d\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "edae9ad2-5364-4603-ba06-a3ca178edb8b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDM=;sn=449003", + "x-ms-request-id" : "a5cb36cb-b074-42d2-9ceb-c85164ad2345", + "Body" : "{\"etag\":\"DsXUfpQi8ZphyBLcBIEOj96BSsM\",\"key\":\"key70916840278\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"}", + "x-ms-client-request-id" : "886f1b1f-3806-4d90-bedc-a19f301d6c0f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4480332209d-1", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key70916840278-1", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5a41f566-dbb3-45d8-b6c3-3dd51059da2d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0eccd2d6-2187-4e9f-b4fc-0139a90fbebf", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:21 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "24b12387-af90-4858-a338-570a86e2511a", + "x-ms-correlation-request-id" : "dde85931-c387-490e-8140-a35b4a4391e5", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"5JWJO4CdVExKoEARHTJ7WIpZbsM\"", + "ETag" : "\"P0fXhJVJ4d4suawlIxFNS2ZesEO\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDU=;sn=402205", - "x-ms-request-id" : "24b12387-af90-4858-a338-570a86e2511a", - "Body" : "{\"etag\":\"5JWJO4CdVExKoEARHTJ7WIpZbsM\",\"key\":\"key4480332209d-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "5a41f566-dbb3-45d8-b6c3-3dd51059da2d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDQ=;sn=449004", + "x-ms-request-id" : "dde85931-c387-490e-8140-a35b4a4391e5", + "Body" : "{\"etag\":\"P0fXhJVJ4d4suawlIxFNS2ZesEO\",\"key\":\"key70916840278-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"}", + "x-ms-client-request-id" : "0eccd2d6-2187-4e9f-b4fc-0139a90fbebf", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4480332209d-1", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key70916840278-1", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c627fb64-6359-4610-9302-bbb5dc74abee", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "aa2741eb-67fd-4c7b-9f01-e9df8bf523a0", "Content-Type" : "application/json" }, "Response" : { @@ -106,29 +106,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:21 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "54d27b34-2213-4bb8-b2f1-fdb5ba2bdd63", + "x-ms-correlation-request-id" : "a5927822-d331-4a9f-8faa-88a6da8cc082", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"5JWJO4CdVExKoEARHTJ7WIpZbsM\"", + "ETag" : "\"P0fXhJVJ4d4suawlIxFNS2ZesEO\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDU=;sn=402205", - "x-ms-request-id" : "54d27b34-2213-4bb8-b2f1-fdb5ba2bdd63", - "Body" : "{\"etag\":\"5JWJO4CdVExKoEARHTJ7WIpZbsM\",\"key\":\"key4480332209d-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "c627fb64-6359-4610-9302-bbb5dc74abee", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDQ=;sn=449004", + "x-ms-request-id" : "a5927822-d331-4a9f-8faa-88a6da8cc082", + "Body" : "{\"etag\":\"P0fXhJVJ4d4suawlIxFNS2ZesEO\",\"key\":\"key70916840278-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"}", + "x-ms-client-request-id" : "aa2741eb-67fd-4c7b-9f01-e9df8bf523a0", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key44803%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key70916%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "142f0780-0f47-4928-bb4e-f2465941b6ea", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cfe98eab-ff45-47c7-b2e6-65e5e3d504f4", "Content-Type" : "application/json" }, "Response" : { @@ -139,25 +139,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "51ae536f-9453-4283-9d52-6e8591d83602", + "x-ms-correlation-request-id" : "94add236-6968-42ac-93cf-6dfcce1bfdce", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDU=;sn=402205", - "x-ms-request-id" : "51ae536f-9453-4283-9d52-6e8591d83602", - "Body" : "{\"items\":[{\"etag\":\"gPx2ExAdLVlx1yjdn3JS2QWWD6M\",\"key\":\"key4480332209d\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"},{\"etag\":\"5JWJO4CdVExKoEARHTJ7WIpZbsM\",\"key\":\"key4480332209d-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}]}", - "x-ms-client-request-id" : "142f0780-0f47-4928-bb4e-f2465941b6ea", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDQ=;sn=449004", + "x-ms-request-id" : "94add236-6968-42ac-93cf-6dfcce1bfdce", + "Body" : "{\"items\":[{\"etag\":\"DsXUfpQi8ZphyBLcBIEOj96BSsM\",\"key\":\"key70916840278\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"},{\"etag\":\"P0fXhJVJ4d4suawlIxFNS2ZesEO\",\"key\":\"key70916840278-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"}]}", + "x-ms-client-request-id" : "cfe98eab-ff45-47c7-b2e6-65e5e3d504f4", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4480332209d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key70916840278-1", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "109a9eae-2303-42b0-9235-cf7ea06121f3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e5e7b679-5732-4136-beb0-137051d12768", "Content-Type" : "application/json" }, "Response" : { @@ -166,29 +166,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:21 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b8e3e622-f45a-4a9d-a024-1a1fb370957a", + "x-ms-correlation-request-id" : "5f025a30-72d8-4fc1-a0fa-894009ea2927", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"gPx2ExAdLVlx1yjdn3JS2QWWD6M\"", + "ETag" : "\"P0fXhJVJ4d4suawlIxFNS2ZesEO\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDY=;sn=402206", - "x-ms-request-id" : "b8e3e622-f45a-4a9d-a024-1a1fb370957a", - "Body" : "{\"etag\":\"gPx2ExAdLVlx1yjdn3JS2QWWD6M\",\"key\":\"key4480332209d\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "109a9eae-2303-42b0-9235-cf7ea06121f3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDU=;sn=449005", + "x-ms-request-id" : "5f025a30-72d8-4fc1-a0fa-894009ea2927", + "Body" : "{\"etag\":\"P0fXhJVJ4d4suawlIxFNS2ZesEO\",\"key\":\"key70916840278-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"}", + "x-ms-client-request-id" : "e5e7b679-5732-4136-beb0-137051d12768", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4480332209d-1", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key70916840278", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "783e4575-83a0-4fb9-869a-d4354db56f6c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2a029cad-5692-407e-89cc-9e8dc8cf2c9e", "Content-Type" : "application/json" }, "Response" : { @@ -197,23 +197,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:21 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d9894ca3-2817-49eb-a1ca-af058626511a", + "x-ms-correlation-request-id" : "d1956ca1-fd9d-476b-862c-a3c9a5c989bd", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"5JWJO4CdVExKoEARHTJ7WIpZbsM\"", + "ETag" : "\"DsXUfpQi8ZphyBLcBIEOj96BSsM\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDc=;sn=402207", - "x-ms-request-id" : "d9894ca3-2817-49eb-a1ca-af058626511a", - "Body" : "{\"etag\":\"5JWJO4CdVExKoEARHTJ7WIpZbsM\",\"key\":\"key4480332209d-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "783e4575-83a0-4fb9-869a-d4354db56f6c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDY=;sn=449006", + "x-ms-request-id" : "d1956ca1-fd9d-476b-862c-a3c9a5c989bd", + "Body" : "{\"etag\":\"DsXUfpQi8ZphyBLcBIEOj96BSsM\",\"key\":\"key70916840278\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"}", + "x-ms-client-request-id" : "2a029cad-5692-407e-89cc-9e8dc8cf2c9e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key44803", "fa53f538", "key4480332209d" ] + "variables" : [ "key70916", "bebce1ed", "key70916840278" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingNullKey.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingNullKey.json index fe6b9c548b91..51d1c1309e85 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingNullKey.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingNullKey.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key86794%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key62989%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1fcc96c4-88c1-4fe1-8a3e-c7ee60836323", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1da0063a-5137-4493-815a-c9734bce11fe", "Content-Type" : "application/json" }, "Response" : { @@ -15,18 +15,18 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4652e3e8-e1f4-48ef-9321-1ab383c34741", + "x-ms-correlation-request-id" : "35ad5abf-8e0b-4731-bf11-cf2f70dc6a3e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "x-ms-request-id" : "4652e3e8-e1f4-48ef-9321-1ab383c34741", + "x-ms-request-id" : "35ad5abf-8e0b-4731-bf11-cf2f70dc6a3e", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "1fcc96c4-88c1-4fe1-8a3e-c7ee60836323", + "x-ms-client-request-id" : "1da0063a-5137-4493-815a-c9734bce11fe", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key86794", "b276ff1c" ] + "variables" : [ "key62989", "45d10e31" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/clearReadOnly.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/clearReadOnly.json index feb108a3c7fa..40b0555f97d0 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/clearReadOnly.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/clearReadOnly.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3444584588c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key93226613917", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c087fb46-9efe-4f57-8b00-3a0e91d0382a", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4db6e367-4a44-437c-8179-da9036586bfd", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:53 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "61377d2b-1675-4d34-a9cb-64ac10fbb0e8", + "x-ms-correlation-request-id" : "b512f42b-f3a5-4699-b6e8-8a49b884ae3e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"1iKQfhzV9Rllbq6RTI5biqH0oJb\"", + "ETag" : "\"9Jd7wwVPbTwHKQM3BDh5w8sZlbX\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NTk=;sn=401859", - "x-ms-request-id" : "61377d2b-1675-4d34-a9cb-64ac10fbb0e8", - "Body" : "{\"etag\":\"1iKQfhzV9Rllbq6RTI5biqH0oJb\",\"key\":\"key3444584588c\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"}", - "x-ms-client-request-id" : "c087fb46-9efe-4f57-8b00-3a0e91d0382a", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NTI=;sn=448652", + "x-ms-request-id" : "b512f42b-f3a5-4699-b6e8-8a49b884ae3e", + "Body" : "{\"etag\":\"9Jd7wwVPbTwHKQM3BDh5w8sZlbX\",\"key\":\"key93226613917\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"}", + "x-ms-client-request-id" : "4db6e367-4a44-437c-8179-da9036586bfd", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key3444584588c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key93226613917", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "826b0216-2b0c-423e-91c2-392de3a30b53", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "424454eb-6353-4a1e-b078-cc6957bc1ec0", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:53 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "808a2a47-5c56-4280-a43d-dca22208a599", + "x-ms-correlation-request-id" : "a9eed17b-9e7c-469d-8bb6-52eb03224961", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"FrLGW3I2UjIh2csCM2HnJZncs33\"", + "ETag" : "\"QhYuTrguArr3wE2peAfWYqeotMB\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NjA=;sn=401860", - "x-ms-request-id" : "808a2a47-5c56-4280-a43d-dca22208a599", - "Body" : "{\"etag\":\"FrLGW3I2UjIh2csCM2HnJZncs33\",\"key\":\"key3444584588c\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":true,\"last_modified\":\"2019-10-08T17:59:40+00:00\"}", - "x-ms-client-request-id" : "826b0216-2b0c-423e-91c2-392de3a30b53", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NTM=;sn=448653", + "x-ms-request-id" : "a9eed17b-9e7c-469d-8bb6-52eb03224961", + "Body" : "{\"etag\":\"QhYuTrguArr3wE2peAfWYqeotMB\",\"key\":\"key93226613917\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":true,\"last_modified\":\"2019-10-19T00:45:53+00:00\"}", + "x-ms-client-request-id" : "424454eb-6353-4a1e-b078-cc6957bc1ec0", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3444584588c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key93226613917", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4a3cec34-6aa7-4a61-b7bf-60752e937b9a", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3bcc6206-22c5-4d42-8d4c-59ba5cf3b7e7", "Content-Type" : "application/json" }, "Response" : { @@ -77,24 +77,24 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "409", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "8d9f854b-295f-4bc3-af89-6d447743d2fd", + "x-ms-correlation-request-id" : "0bbffc0a-48ce-4fd6-b571-017866c04b03", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "x-ms-request-id" : "8d9f854b-295f-4bc3-af89-6d447743d2fd", - "Body" : "{\"type\":\"https://azconfig.io/errors/key-locked\",\"title\":\"Modifing key 'key3444584588c' is not allowed\",\"name\":\"key3444584588c\",\"detail\":\"The key is read-only. To allow modification unlock it first.\",\"status\":409}", - "x-ms-client-request-id" : "4a3cec34-6aa7-4a61-b7bf-60752e937b9a", + "x-ms-request-id" : "0bbffc0a-48ce-4fd6-b571-017866c04b03", + "Body" : "{\"type\":\"https://azconfig.io/errors/key-locked\",\"title\":\"Modifing key 'key93226613917' is not allowed\",\"name\":\"key93226613917\",\"detail\":\"The key is read-only. To allow modification unlock it first.\",\"status\":409}", + "x-ms-client-request-id" : "3bcc6206-22c5-4d42-8d4c-59ba5cf3b7e7", "Content-Type" : "application/vnd.microsoft.azconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key3444584588c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key93226613917", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0f8feab1-fc3b-417f-94a4-53923a850e0b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f670c062-44ab-4988-a800-aef889774b77", "Content-Type" : "application/json" }, "Response" : { @@ -103,29 +103,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:53 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2952609d-9508-41ff-ba7b-ed78e9f9d77c", + "x-ms-correlation-request-id" : "11de81b8-abde-41ea-8d8c-44c932a233cf", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"VedHYgnlIN4NbrIHMvkv827M2jG\"", + "ETag" : "\"pBTzxOQTOlklKnomcOSLoWzdZ8B\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NjE=;sn=401861", - "x-ms-request-id" : "2952609d-9508-41ff-ba7b-ed78e9f9d77c", - "Body" : "{\"etag\":\"VedHYgnlIN4NbrIHMvkv827M2jG\",\"key\":\"key3444584588c\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"}", - "x-ms-client-request-id" : "0f8feab1-fc3b-417f-94a4-53923a850e0b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NTQ=;sn=448654", + "x-ms-request-id" : "11de81b8-abde-41ea-8d8c-44c932a233cf", + "Body" : "{\"etag\":\"pBTzxOQTOlklKnomcOSLoWzdZ8B\",\"key\":\"key93226613917\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"}", + "x-ms-client-request-id" : "f670c062-44ab-4988-a800-aef889774b77", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3444584588c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key93226613917", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ddcda472-141a-4546-8152-307d53f90b51", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5748a4d7-09ff-44dd-9d30-ecebdd8eb637", "Content-Type" : "application/json" }, "Response" : { @@ -134,29 +134,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:53 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "e48ee5ba-08d5-4f98-9497-cece5f4653dd", + "x-ms-correlation-request-id" : "aff615a0-57ff-4694-a8c7-0e60452aa569", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"VedHYgnlIN4NbrIHMvkv827M2jG\"", + "ETag" : "\"pBTzxOQTOlklKnomcOSLoWzdZ8B\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NjI=;sn=401862", - "x-ms-request-id" : "e48ee5ba-08d5-4f98-9497-cece5f4653dd", - "Body" : "{\"etag\":\"VedHYgnlIN4NbrIHMvkv827M2jG\",\"key\":\"key3444584588c\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"}", - "x-ms-client-request-id" : "ddcda472-141a-4546-8152-307d53f90b51", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NTU=;sn=448655", + "x-ms-request-id" : "aff615a0-57ff-4694-a8c7-0e60452aa569", + "Body" : "{\"etag\":\"pBTzxOQTOlklKnomcOSLoWzdZ8B\",\"key\":\"key93226613917\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"}", + "x-ms-client-request-id" : "5748a4d7-09ff-44dd-9d30-ecebdd8eb637", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key34445%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key93226%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "18c4a56f-9c42-42c8-a757-c449b0f21ded", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6aadfe3b-b012-4a49-a7b8-efc982045a25", "Content-Type" : "application/json" }, "Response" : { @@ -167,18 +167,18 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c4b22c0f-75fd-483f-bedd-9e04a24d5c27", + "x-ms-correlation-request-id" : "0c82a904-f3e4-41ef-9410-559077d7309f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "x-ms-request-id" : "c4b22c0f-75fd-483f-bedd-9e04a24d5c27", + "x-ms-request-id" : "0c82a904-f3e4-41ef-9410-559077d7309f", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "18c4a56f-9c42-42c8-a757-c449b0f21ded", + "x-ms-client-request-id" : "6aadfe3b-b012-4a49-a7b8-efc982045a25", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key34445", "ce41586f", "key3444584588c" ] + "variables" : [ "key93226", "78fd5a32", "key93226613917" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/clearReadOnlyWithConfigurationSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/clearReadOnlyWithConfigurationSetting.json index 2a7ebef3ae42..37f42a266929 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/clearReadOnlyWithConfigurationSetting.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/clearReadOnlyWithConfigurationSetting.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8048596285a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key94037757904", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "edd3707f-fc6f-43c4-92a7-7132cc014362", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "656354b4-702a-4409-8f38-5d1ffd5c6b7b", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:08 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3b2a5751-1de9-4de9-8efc-2867de58110e", + "x-ms-correlation-request-id" : "29b11d71-6f32-4cfe-b503-368fd28d68a3", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"oJmXvM3TfovH47dKpRSeGZLNqPU\"", + "ETag" : "\"KFSV0Pt4Ef5LTascmmCS1ZQnhKB\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMDA=;sn=402000", - "x-ms-request-id" : "3b2a5751-1de9-4de9-8efc-2867de58110e", - "Body" : "{\"etag\":\"oJmXvM3TfovH47dKpRSeGZLNqPU\",\"key\":\"key8048596285a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"}", - "x-ms-client-request-id" : "edd3707f-fc6f-43c4-92a7-7132cc014362", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTI=;sn=448792", + "x-ms-request-id" : "29b11d71-6f32-4cfe-b503-368fd28d68a3", + "Body" : "{\"etag\":\"KFSV0Pt4Ef5LTascmmCS1ZQnhKB\",\"key\":\"key94037757904\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"}", + "x-ms-client-request-id" : "656354b4-702a-4409-8f38-5d1ffd5c6b7b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key8048596285a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key94037757904", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3df6c618-8436-4df8-8858-37b5fab08b38", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "039e696b-61cb-4a44-a0d1-673fbc8eaeea", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:08 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6d0d7baa-0e03-44b7-a2f6-63ea5f96e94c", + "x-ms-correlation-request-id" : "307dea17-b6c1-46ee-8ffc-9dbbeae22e75", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"MAFPDDmwbat57Adaa7h5IyiEVjV\"", + "ETag" : "\"4x281gauNmTI4QVlgfFdGDeVYqf\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMDE=;sn=402001", - "x-ms-request-id" : "6d0d7baa-0e03-44b7-a2f6-63ea5f96e94c", - "Body" : "{\"etag\":\"MAFPDDmwbat57Adaa7h5IyiEVjV\",\"key\":\"key8048596285a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":true,\"last_modified\":\"2019-10-08T17:59:57+00:00\"}", - "x-ms-client-request-id" : "3df6c618-8436-4df8-8858-37b5fab08b38", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTM=;sn=448793", + "x-ms-request-id" : "307dea17-b6c1-46ee-8ffc-9dbbeae22e75", + "Body" : "{\"etag\":\"4x281gauNmTI4QVlgfFdGDeVYqf\",\"key\":\"key94037757904\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":true,\"last_modified\":\"2019-10-19T00:46:08+00:00\"}", + "x-ms-client-request-id" : "039e696b-61cb-4a44-a0d1-673fbc8eaeea", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8048596285a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key94037757904", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b3b2191f-7cb3-4511-b20a-922327de6ad2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b05fcf94-cc5d-4d08-b79d-e512e2d05072", "Content-Type" : "application/json" }, "Response" : { @@ -77,24 +77,24 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "409", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7a8903e1-220d-4a8a-88a3-31a2816db6aa", + "x-ms-correlation-request-id" : "e8e27193-f0f8-4bb2-b88d-c4b956f3e401", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "x-ms-request-id" : "7a8903e1-220d-4a8a-88a3-31a2816db6aa", - "Body" : "{\"type\":\"https://azconfig.io/errors/key-locked\",\"title\":\"Modifing key 'key8048596285a' is not allowed\",\"name\":\"key8048596285a\",\"detail\":\"The key is read-only. To allow modification unlock it first.\",\"status\":409}", - "x-ms-client-request-id" : "b3b2191f-7cb3-4511-b20a-922327de6ad2", + "x-ms-request-id" : "e8e27193-f0f8-4bb2-b88d-c4b956f3e401", + "Body" : "{\"type\":\"https://azconfig.io/errors/key-locked\",\"title\":\"Modifing key 'key94037757904' is not allowed\",\"name\":\"key94037757904\",\"detail\":\"The key is read-only. To allow modification unlock it first.\",\"status\":409}", + "x-ms-client-request-id" : "b05fcf94-cc5d-4d08-b79d-e512e2d05072", "Content-Type" : "application/vnd.microsoft.azconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key8048596285a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key94037757904", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d403da2c-3a12-4357-bffd-5d204a2effdd", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "38bd5199-52e8-4786-a9ab-1202f3a811bf", "Content-Type" : "application/json" }, "Response" : { @@ -103,29 +103,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "231c7e25-1d5b-4fe6-b2c5-66d422495de9", + "x-ms-correlation-request-id" : "b215724e-f01a-42b4-a6aa-33ef8591abfe", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"j4j6rdTo6r058Zzk5FPw2V59jO6\"", + "ETag" : "\"u5ezbz22TsmLTE4eyvofG0j3i3T\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMDI=;sn=402002", - "x-ms-request-id" : "231c7e25-1d5b-4fe6-b2c5-66d422495de9", - "Body" : "{\"etag\":\"j4j6rdTo6r058Zzk5FPw2V59jO6\",\"key\":\"key8048596285a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"}", - "x-ms-client-request-id" : "d403da2c-3a12-4357-bffd-5d204a2effdd", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTQ=;sn=448794", + "x-ms-request-id" : "b215724e-f01a-42b4-a6aa-33ef8591abfe", + "Body" : "{\"etag\":\"u5ezbz22TsmLTE4eyvofG0j3i3T\",\"key\":\"key94037757904\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "38bd5199-52e8-4786-a9ab-1202f3a811bf", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8048596285a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key94037757904", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "05612e25-dadf-463f-ad7d-9d197b41a641", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9ee80cd3-8934-4903-900d-6f0aeca3da50", "Content-Type" : "application/json" }, "Response" : { @@ -134,29 +134,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d9744bb8-a37f-48b0-bcac-83355921ec65", + "x-ms-correlation-request-id" : "e22ddaa2-511e-45ac-a1c8-9d9ce1ddcf73", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"j4j6rdTo6r058Zzk5FPw2V59jO6\"", + "ETag" : "\"u5ezbz22TsmLTE4eyvofG0j3i3T\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMDM=;sn=402003", - "x-ms-request-id" : "d9744bb8-a37f-48b0-bcac-83355921ec65", - "Body" : "{\"etag\":\"j4j6rdTo6r058Zzk5FPw2V59jO6\",\"key\":\"key8048596285a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"}", - "x-ms-client-request-id" : "05612e25-dadf-463f-ad7d-9d197b41a641", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTU=;sn=448795", + "x-ms-request-id" : "e22ddaa2-511e-45ac-a1c8-9d9ce1ddcf73", + "Body" : "{\"etag\":\"u5ezbz22TsmLTE4eyvofG0j3i3T\",\"key\":\"key94037757904\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "9ee80cd3-8934-4903-900d-6f0aeca3da50", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key80485%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key94037%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "51b87500-0bbd-4eca-8048-8fb1c7df0c40", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8c8ea126-0e8f-401c-8b78-130925031729", "Content-Type" : "application/json" }, "Response" : { @@ -167,18 +167,18 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "19ecbe48-2d37-4407-949b-c8fec2652ec4", + "x-ms-correlation-request-id" : "fed18ff5-151a-4f05-89a0-d17c8e8df13a", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "x-ms-request-id" : "19ecbe48-2d37-4407-949b-c8fec2652ec4", + "x-ms-request-id" : "fed18ff5-151a-4f05-89a0-d17c8e8df13a", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "51b87500-0bbd-4eca-8048-8fb1c7df0c40", + "x-ms-client-request-id" : "8c8ea126-0e8f-401c-8b78-130925031729", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key80485", "361d6c1b", "key8048596285a" ] + "variables" : [ "key94037", "25383a26", "key94037757904" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSetting.json index d4006b82afb7..169c7d87e9ab 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSetting.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSetting.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key32964465041", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key90083468760", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "efbcbc6c-f40a-429a-96e3-bafb32d6a0b2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c3c96975-0ce1-4dc9-9ede-1517949034c3", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:21 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "5a1c2ed5-7fba-4d5e-ba94-dcb315b52c27", + "x-ms-correlation-request-id" : "e34f90ea-7e92-46c2-95b5-ddf2eec230ff", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"p8PwrbuggnSmCE1TFmZpMT6KHXr\"", + "ETag" : "\"Yq6lq5kkX9BVNcaVNAQqteE8LbW\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDg=;sn=402208", - "x-ms-request-id" : "5a1c2ed5-7fba-4d5e-ba94-dcb315b52c27", - "Body" : "{\"etag\":\"p8PwrbuggnSmCE1TFmZpMT6KHXr\",\"key\":\"key32964465041\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "efbcbc6c-f40a-429a-96e3-bafb32d6a0b2", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDc=;sn=449007", + "x-ms-request-id" : "e34f90ea-7e92-46c2-95b5-ddf2eec230ff", + "Body" : "{\"etag\":\"Yq6lq5kkX9BVNcaVNAQqteE8LbW\",\"key\":\"key90083468760\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"}", + "x-ms-client-request-id" : "c3c96975-0ce1-4dc9-9ede-1517949034c3", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key32964465041", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key90083468760", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a8f6f6d5-bdfe-42b0-81f3-8f89e93a39b2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0935ba87-3b37-4cd7-8aa0-a95a8c94f9bd", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:21 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a6aeb110-3b8f-4080-bbb1-f3ab6112df6a", + "x-ms-correlation-request-id" : "55846f3a-b1c8-4f05-8d20-182b76fc1515", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"p8PwrbuggnSmCE1TFmZpMT6KHXr\"", + "ETag" : "\"Yq6lq5kkX9BVNcaVNAQqteE8LbW\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDg=;sn=402208", - "x-ms-request-id" : "a6aeb110-3b8f-4080-bbb1-f3ab6112df6a", - "Body" : "{\"etag\":\"p8PwrbuggnSmCE1TFmZpMT6KHXr\",\"key\":\"key32964465041\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "a8f6f6d5-bdfe-42b0-81f3-8f89e93a39b2", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDc=;sn=449007", + "x-ms-request-id" : "55846f3a-b1c8-4f05-8d20-182b76fc1515", + "Body" : "{\"etag\":\"Yq6lq5kkX9BVNcaVNAQqteE8LbW\",\"key\":\"key90083468760\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"}", + "x-ms-client-request-id" : "0935ba87-3b37-4cd7-8aa0-a95a8c94f9bd", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key32964465041", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key90083468760", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "701a1a05-ef6c-4660-90a4-69010271b587", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "63b26c09-8d01-4e5a-9b5c-64dcfe1a2d2f", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:21 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6b4e333c-ce84-4079-9705-ad0643e8c0f4", + "x-ms-correlation-request-id" : "643a571d-703c-42e7-9570-d96eafdf3a6e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"p8PwrbuggnSmCE1TFmZpMT6KHXr\"", + "ETag" : "\"Yq6lq5kkX9BVNcaVNAQqteE8LbW\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDk=;sn=402209", - "x-ms-request-id" : "6b4e333c-ce84-4079-9705-ad0643e8c0f4", - "Body" : "{\"etag\":\"p8PwrbuggnSmCE1TFmZpMT6KHXr\",\"key\":\"key32964465041\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "701a1a05-ef6c-4660-90a4-69010271b587", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDg=;sn=449008", + "x-ms-request-id" : "643a571d-703c-42e7-9570-d96eafdf3a6e", + "Body" : "{\"etag\":\"Yq6lq5kkX9BVNcaVNAQqteE8LbW\",\"key\":\"key90083468760\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"}", + "x-ms-client-request-id" : "63b26c09-8d01-4e5a-9b5c-64dcfe1a2d2f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key32964465041", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key90083468760", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c80213a9-81a9-403d-87ab-a5682941055d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "92352201-905c-4c75-8fc2-f2fad5688f0f", "Content-Type" : "application/json" }, "Response" : { @@ -107,23 +107,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "0aa8ce24-08fe-4fc6-9b32-bb116e1b53dd", + "x-ms-correlation-request-id" : "d189b66a-8698-476e-a68c-5da4cbb2143c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "0aa8ce24-08fe-4fc6-9b32-bb116e1b53dd", - "x-ms-client-request-id" : "c80213a9-81a9-403d-87ab-a5682941055d" + "x-ms-request-id" : "d189b66a-8698-476e-a68c-5da4cbb2143c", + "x-ms-client-request-id" : "92352201-905c-4c75-8fc2-f2fad5688f0f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key32964465041?label=1d4142c4689823", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key90083468760?label=5594982654926a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "252c3996-27da-4526-8d4e-65e868db8561", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "25977d6d-f6e6-49b8-b8ff-1b2732da2de5", "Content-Type" : "application/json" }, "Response" : { @@ -132,29 +132,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:21 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b338d646-9446-422a-8d2b-ed722a15b3af", + "x-ms-correlation-request-id" : "3dd3bc66-5bed-4325-89f0-5fd4f774f14a", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"1GV77j1km5dNGqV6FjrL7AEQ7PV\"", + "ETag" : "\"DsY7LzFDbb3VBakb0VqDi45NXKs\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTA=;sn=402210", - "x-ms-request-id" : "b338d646-9446-422a-8d2b-ed722a15b3af", - "Body" : "{\"etag\":\"1GV77j1km5dNGqV6FjrL7AEQ7PV\",\"key\":\"key32964465041\",\"label\":\"1d4142c4689823\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:08+00:00\"}", - "x-ms-client-request-id" : "252c3996-27da-4526-8d4e-65e868db8561", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDk=;sn=449009", + "x-ms-request-id" : "3dd3bc66-5bed-4325-89f0-5fd4f774f14a", + "Body" : "{\"etag\":\"DsY7LzFDbb3VBakb0VqDi45NXKs\",\"key\":\"key90083468760\",\"label\":\"5594982654926a\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"}", + "x-ms-client-request-id" : "25977d6d-f6e6-49b8-b8ff-1b2732da2de5", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key32964465041?label=1d4142c4689823", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key90083468760?label=5594982654926a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0d785bb8-6a07-4d93-a124-3e45ff76744b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a3bbf40b-d188-4877-99cd-e1f5885bad61", "Content-Type" : "application/json" }, "Response" : { @@ -163,29 +163,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:21 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4cdb50cc-0ec0-406a-ab8a-1723cde851de", + "x-ms-correlation-request-id" : "4de05238-2376-490e-b721-e21ec247bf4c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"1GV77j1km5dNGqV6FjrL7AEQ7PV\"", + "ETag" : "\"DsY7LzFDbb3VBakb0VqDi45NXKs\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTA=;sn=402210", - "x-ms-request-id" : "4cdb50cc-0ec0-406a-ab8a-1723cde851de", - "Body" : "{\"etag\":\"1GV77j1km5dNGqV6FjrL7AEQ7PV\",\"key\":\"key32964465041\",\"label\":\"1d4142c4689823\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:08+00:00\"}", - "x-ms-client-request-id" : "0d785bb8-6a07-4d93-a124-3e45ff76744b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDk=;sn=449009", + "x-ms-request-id" : "4de05238-2376-490e-b721-e21ec247bf4c", + "Body" : "{\"etag\":\"DsY7LzFDbb3VBakb0VqDi45NXKs\",\"key\":\"key90083468760\",\"label\":\"5594982654926a\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"}", + "x-ms-client-request-id" : "a3bbf40b-d188-4877-99cd-e1f5885bad61", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key32964465041?label=1d4142c4689823", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key90083468760?label=5594982654926a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "efb556b0-f08e-4dc4-958e-9a3b90a4a23f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b2ae3812-6057-403e-af9b-815225014c96", "Content-Type" : "application/json" }, "Response" : { @@ -194,29 +194,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:21 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "0c1660b3-d680-4c05-b7b0-4d4b2fe600b0", + "x-ms-correlation-request-id" : "36795407-eeaa-46fb-88d8-1a115453050e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"1GV77j1km5dNGqV6FjrL7AEQ7PV\"", + "ETag" : "\"DsY7LzFDbb3VBakb0VqDi45NXKs\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTE=;sn=402211", - "x-ms-request-id" : "0c1660b3-d680-4c05-b7b0-4d4b2fe600b0", - "Body" : "{\"etag\":\"1GV77j1km5dNGqV6FjrL7AEQ7PV\",\"key\":\"key32964465041\",\"label\":\"1d4142c4689823\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:08+00:00\"}", - "x-ms-client-request-id" : "efb556b0-f08e-4dc4-958e-9a3b90a4a23f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMTA=;sn=449010", + "x-ms-request-id" : "36795407-eeaa-46fb-88d8-1a115453050e", + "Body" : "{\"etag\":\"DsY7LzFDbb3VBakb0VqDi45NXKs\",\"key\":\"key90083468760\",\"label\":\"5594982654926a\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:21+00:00\"}", + "x-ms-client-request-id" : "b2ae3812-6057-403e-af9b-815225014c96", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key32964465041?label=1d4142c4689823", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key90083468760?label=5594982654926a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5c6fc2ae-3397-4aa5-8cf1-5fec1409130f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d568375c-5d00-4e62-8d90-d5c7e1b76875", "Content-Type" : "application/json" }, "Response" : { @@ -226,23 +226,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "17a6d8e8-7420-498b-bd8b-55eb3e5f14e1", + "x-ms-correlation-request-id" : "e54476c2-e800-4e99-9c4d-3e47a9e0b562", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "17a6d8e8-7420-498b-bd8b-55eb3e5f14e1", - "x-ms-client-request-id" : "5c6fc2ae-3397-4aa5-8cf1-5fec1409130f" + "x-ms-request-id" : "e54476c2-e800-4e99-9c4d-3e47a9e0b562", + "x-ms-client-request-id" : "d568375c-5d00-4e62-8d90-d5c7e1b76875" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key32964%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key90083%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f0507e31-7530-46ef-bcd1-865e038965c5", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a8271741-602c-4c55-8ab0-6c59f7935a46", "Content-Type" : "application/json" }, "Response" : { @@ -253,18 +253,18 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2b664f36-d7f5-4410-aa91-d2d4f3ad1964", + "x-ms-correlation-request-id" : "45433832-0a3c-4616-91d1-11087d23e5e0", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "x-ms-request-id" : "2b664f36-d7f5-4410-aa91-d2d4f3ad1964", + "x-ms-request-id" : "45433832-0a3c-4616-91d1-11087d23e5e0", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "f0507e31-7530-46ef-bcd1-865e038965c5", + "x-ms-client-request-id" : "a8271741-602c-4c55-8ab0-6c59f7935a46", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key32964", "1d4142c4", "key32964465041", "1d4142c4689823" ] + "variables" : [ "key90083", "55949826", "key90083468760", "5594982654926a" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNotFound.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNotFound.json index fe915dd086a4..d40d893edc54 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNotFound.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNotFound.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key33425090354", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2950825201a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cb15fd6b-21db-4295-a0e1-c293efd04004", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "65c23e40-200d-4477-a263-9bd390c64ba9", "Content-Type" : "application/json" }, "Response" : { @@ -13,20 +13,20 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:15 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "10177667-3d60-4875-a0e0-849967efe0d8", + "x-ms-correlation-request-id" : "caffd6ee-f5d9-4040-816b-c5fd1ef5d90c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"1rd0F29aIvBbsSMnCFmC5dOC5Hh\"", + "ETag" : "\"qHY0RxXSfmFACjos56xM6xUvnUA\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjY=;sn=402066", - "x-ms-request-id" : "10177667-3d60-4875-a0e0-849967efe0d8", - "Body" : "{\"etag\":\"1rd0F29aIvBbsSMnCFmC5dOC5Hh\",\"key\":\"key33425090354\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:02+00:00\"}", - "x-ms-client-request-id" : "cb15fd6b-21db-4295-a0e1-c293efd04004", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NjE=;sn=448861", + "x-ms-request-id" : "caffd6ee-f5d9-4040-816b-c5fd1ef5d90c", + "Body" : "{\"etag\":\"qHY0RxXSfmFACjos56xM6xUvnUA\",\"key\":\"key2950825201a\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:15+00:00\"}", + "x-ms-client-request-id" : "65c23e40-200d-4477-a263-9bd390c64ba9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null @@ -34,8 +34,8 @@ "Method" : "DELETE", "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/myNonExistentKey", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4a50c7f9-03a1-48f9-9d86-7ec9d9e46fdb", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3496f8da-4f22-4395-b58d-6c91b4b385e9", "Content-Type" : "application/json" }, "Response" : { @@ -45,23 +45,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "46b0021e-7f96-4123-9ca2-d7055ba2291a", + "x-ms-correlation-request-id" : "9721507b-e3e5-4bc3-86ce-9f3bbc1fcc14", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "46b0021e-7f96-4123-9ca2-d7055ba2291a", - "x-ms-client-request-id" : "4a50c7f9-03a1-48f9-9d86-7ec9d9e46fdb" + "x-ms-request-id" : "9721507b-e3e5-4bc3-86ce-9f3bbc1fcc14", + "x-ms-client-request-id" : "3496f8da-4f22-4395-b58d-6c91b4b385e9" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key33425090354?label=myNonExistentLabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2950825201a?label=myNonExistentLabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "11f526ca-7f1a-4e57-9d06-f8dc689f5564", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d5b60eb6-2e64-4986-86d1-dacb0f2429cf", "Content-Type" : "application/json" }, "Response" : { @@ -71,23 +71,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "afab8895-d734-4358-b156-116567828b01", + "x-ms-correlation-request-id" : "b718409a-3700-435d-a4da-104201a2b98a", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "afab8895-d734-4358-b156-116567828b01", - "x-ms-client-request-id" : "11f526ca-7f1a-4e57-9d06-f8dc689f5564" + "x-ms-request-id" : "b718409a-3700-435d-a4da-104201a2b98a", + "x-ms-client-request-id" : "d5b60eb6-2e64-4986-86d1-dacb0f2429cf" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key33425090354", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2950825201a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2a4e4e38-6d29-4ee6-85f4-39430e90559e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e1d07228-97cf-4d1c-8cd2-8c11d9648d4f", "Content-Type" : "application/json" }, "Response" : { @@ -96,29 +96,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:15 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4a138b5c-e462-4449-8176-98264a9da842", + "x-ms-correlation-request-id" : "62bd31d8-cfbd-4827-8d43-d25a0b213f00", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"1rd0F29aIvBbsSMnCFmC5dOC5Hh\"", + "ETag" : "\"qHY0RxXSfmFACjos56xM6xUvnUA\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjY=;sn=402066", - "x-ms-request-id" : "4a138b5c-e462-4449-8176-98264a9da842", - "Body" : "{\"etag\":\"1rd0F29aIvBbsSMnCFmC5dOC5Hh\",\"key\":\"key33425090354\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:02+00:00\"}", - "x-ms-client-request-id" : "2a4e4e38-6d29-4ee6-85f4-39430e90559e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NjE=;sn=448861", + "x-ms-request-id" : "62bd31d8-cfbd-4827-8d43-d25a0b213f00", + "Body" : "{\"etag\":\"qHY0RxXSfmFACjos56xM6xUvnUA\",\"key\":\"key2950825201a\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:15+00:00\"}", + "x-ms-client-request-id" : "e1d07228-97cf-4d1c-8cd2-8c11d9648d4f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key33425%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key29508%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d4c9aaa7-a8e3-4262-b926-44b2a94f0439", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "545f902e-e3a1-4523-ac7d-b8d7dee26fcf", "Content-Type" : "application/json" }, "Response" : { @@ -129,25 +129,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "edab2c1a-073c-4ee6-af93-39e8ebea9eb0", + "x-ms-correlation-request-id" : "702894b0-b117-4b03-b93f-e72874d70781", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjY=;sn=402066", - "x-ms-request-id" : "edab2c1a-073c-4ee6-af93-39e8ebea9eb0", - "Body" : "{\"items\":[{\"etag\":\"1rd0F29aIvBbsSMnCFmC5dOC5Hh\",\"key\":\"key33425090354\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:02+00:00\"}]}", - "x-ms-client-request-id" : "d4c9aaa7-a8e3-4262-b926-44b2a94f0439", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NjE=;sn=448861", + "x-ms-request-id" : "702894b0-b117-4b03-b93f-e72874d70781", + "Body" : "{\"items\":[{\"etag\":\"qHY0RxXSfmFACjos56xM6xUvnUA\",\"key\":\"key2950825201a\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:15+00:00\"}]}", + "x-ms-client-request-id" : "545f902e-e3a1-4523-ac7d-b8d7dee26fcf", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key33425090354", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2950825201a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0c566479-8733-4197-9caa-7a7dd1f1bc47", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c4143766-f1a6-48d3-b3e7-6a45d80b7f07", "Content-Type" : "application/json" }, "Response" : { @@ -156,23 +156,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:15 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4a05e81d-04bc-4a8e-9d07-b8ff3be47860", + "x-ms-correlation-request-id" : "15352ec9-766e-46e1-9996-b5ccb99d2ba3", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"1rd0F29aIvBbsSMnCFmC5dOC5Hh\"", + "ETag" : "\"qHY0RxXSfmFACjos56xM6xUvnUA\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjc=;sn=402067", - "x-ms-request-id" : "4a05e81d-04bc-4a8e-9d07-b8ff3be47860", - "Body" : "{\"etag\":\"1rd0F29aIvBbsSMnCFmC5dOC5Hh\",\"key\":\"key33425090354\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:02+00:00\"}", - "x-ms-client-request-id" : "0c566479-8733-4197-9caa-7a7dd1f1bc47", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NjI=;sn=448862", + "x-ms-request-id" : "15352ec9-766e-46e1-9996-b5ccb99d2ba3", + "Body" : "{\"etag\":\"qHY0RxXSfmFACjos56xM6xUvnUA\",\"key\":\"key2950825201a\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:15+00:00\"}", + "x-ms-client-request-id" : "c4143766-f1a6-48d3-b3e7-6a45d80b7f07", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key33425", "e7095d5a", "key33425090354" ] + "variables" : [ "key29508", "8bbf5444", "key2950825201a" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNullKey.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNullKey.json index 74e1041772cf..322f4a2a1c5a 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNullKey.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNullKey.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key17558%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key72123%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e458ea30-ba38-4b90-aba0-bc328c67dfbc", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "53f558ea-4296-4f2d-9076-4002c5a8b408", "Content-Type" : "application/json" }, "Response" : { @@ -15,18 +15,18 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4d483c3b-a462-4280-8c9a-bb2db3c45b60", + "x-ms-correlation-request-id" : "33e83660-3da0-423b-8cf5-00586dcb7ef8", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "x-ms-request-id" : "4d483c3b-a462-4280-8c9a-bb2db3c45b60", + "x-ms-request-id" : "33e83660-3da0-423b-8cf5-00586dcb7ef8", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "e458ea30-ba38-4b90-aba0-bc328c67dfbc", + "x-ms-client-request-id" : "53f558ea-4296-4f2d-9076-4002c5a8b408", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key17558", "5520cc44" ] + "variables" : [ "key72123", "6af1e158" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingWithETag.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingWithETag.json index 340f2561fc92..16d2657b8d07 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingWithETag.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingWithETag.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2537871756c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8827326073f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "382211ef-44c8-4e12-a09f-999be8afd199", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7f644f7f-8bc3-4b93-9513-0b1dcbb13c13", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "bd82c53f-eea0-4c4a-96c4-8ac523d9aa4e", + "x-ms-correlation-request-id" : "929ce730-ad1f-491d-81c0-0ef43e6c292e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"4vEbSokbHOPWuq0qJbsBx467Cnl\"", + "ETag" : "\"YG2vWOZtfHebq6T1b7MmBz1QrhQ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTI=;sn=402212", - "x-ms-request-id" : "bd82c53f-eea0-4c4a-96c4-8ac523d9aa4e", - "Body" : "{\"etag\":\"4vEbSokbHOPWuq0qJbsBx467Cnl\",\"key\":\"key2537871756c\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:08+00:00\"}", - "x-ms-client-request-id" : "382211ef-44c8-4e12-a09f-999be8afd199", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMTE=;sn=449011", + "x-ms-request-id" : "929ce730-ad1f-491d-81c0-0ef43e6c292e", + "Body" : "{\"etag\":\"YG2vWOZtfHebq6T1b7MmBz1QrhQ\",\"key\":\"key8827326073f\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"}", + "x-ms-client-request-id" : "7f644f7f-8bc3-4b93-9513-0b1dcbb13c13", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2537871756c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8827326073f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "78a0f54b-ddc6-45aa-b5d1-6f7331fe76c9", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fdfae79e-77c4-484a-81a8-8fa0941e342e", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1f440cab-7e36-45dc-b249-3727599a9c6e", + "x-ms-correlation-request-id" : "901522f8-3d09-4284-9da8-6622d3416ce6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"qghVf0Y0JbJKIKxcsfZyuvyE6db\"", + "ETag" : "\"dh1RqtjHlgwB7h46Fe2NeLNtyMg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTM=;sn=402213", - "x-ms-request-id" : "1f440cab-7e36-45dc-b249-3727599a9c6e", - "Body" : "{\"etag\":\"qghVf0Y0JbJKIKxcsfZyuvyE6db\",\"key\":\"key2537871756c\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:08+00:00\"}", - "x-ms-client-request-id" : "78a0f54b-ddc6-45aa-b5d1-6f7331fe76c9", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMTI=;sn=449012", + "x-ms-request-id" : "901522f8-3d09-4284-9da8-6622d3416ce6", + "Body" : "{\"etag\":\"dh1RqtjHlgwB7h46Fe2NeLNtyMg\",\"key\":\"key8827326073f\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"}", + "x-ms-client-request-id" : "fdfae79e-77c4-484a-81a8-8fa0941e342e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2537871756c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8827326073f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "216f5c69-f691-40fc-844b-eb439a1ce7e8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fc90fb51-fbfd-4545-a00b-f901dede8967", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "121af22b-396d-4d68-b314-3343e5594b2e", + "x-ms-correlation-request-id" : "51f77a85-1187-4849-ae4e-01a2ad22ef34", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"qghVf0Y0JbJKIKxcsfZyuvyE6db\"", + "ETag" : "\"dh1RqtjHlgwB7h46Fe2NeLNtyMg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTM=;sn=402213", - "x-ms-request-id" : "121af22b-396d-4d68-b314-3343e5594b2e", - "Body" : "{\"etag\":\"qghVf0Y0JbJKIKxcsfZyuvyE6db\",\"key\":\"key2537871756c\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:08+00:00\"}", - "x-ms-client-request-id" : "216f5c69-f691-40fc-844b-eb439a1ce7e8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMTI=;sn=449012", + "x-ms-request-id" : "51f77a85-1187-4849-ae4e-01a2ad22ef34", + "Body" : "{\"etag\":\"dh1RqtjHlgwB7h46Fe2NeLNtyMg\",\"key\":\"key8827326073f\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"}", + "x-ms-client-request-id" : "fc90fb51-fbfd-4545-a00b-f901dede8967", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2537871756c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8827326073f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "83ef0949-c6de-4cc4-9e10-37f29a01dcd8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9ec16916-25ef-42ee-bccd-ea72b7ca00da", "Content-Type" : "application/json" }, "Response" : { @@ -107,23 +107,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "eca259ac-4ea1-4faa-82ff-2f51193c09ec", + "x-ms-correlation-request-id" : "98ba0257-4e3e-4eaf-8ac9-8a86cb1e3d98", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "eca259ac-4ea1-4faa-82ff-2f51193c09ec", - "x-ms-client-request-id" : "83ef0949-c6de-4cc4-9e10-37f29a01dcd8" + "x-ms-request-id" : "98ba0257-4e3e-4eaf-8ac9-8a86cb1e3d98", + "x-ms-client-request-id" : "9ec16916-25ef-42ee-bccd-ea72b7ca00da" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2537871756c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8827326073f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4cb86a77-c0c2-4d6b-9c30-d2387dd3a150", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d728dcf0-de9c-44db-95ea-afe7e4a54174", "Content-Type" : "application/json" }, "Response" : { @@ -132,29 +132,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a4ed3729-a9b0-45f4-a2d1-31f576e6c36b", + "x-ms-correlation-request-id" : "dd55b476-aac0-477f-a828-f137d1fb974d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"qghVf0Y0JbJKIKxcsfZyuvyE6db\"", + "ETag" : "\"dh1RqtjHlgwB7h46Fe2NeLNtyMg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTQ=;sn=402214", - "x-ms-request-id" : "a4ed3729-a9b0-45f4-a2d1-31f576e6c36b", - "Body" : "{\"etag\":\"qghVf0Y0JbJKIKxcsfZyuvyE6db\",\"key\":\"key2537871756c\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:08+00:00\"}", - "x-ms-client-request-id" : "4cb86a77-c0c2-4d6b-9c30-d2387dd3a150", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMTM=;sn=449013", + "x-ms-request-id" : "dd55b476-aac0-477f-a828-f137d1fb974d", + "Body" : "{\"etag\":\"dh1RqtjHlgwB7h46Fe2NeLNtyMg\",\"key\":\"key8827326073f\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"}", + "x-ms-client-request-id" : "d728dcf0-de9c-44db-95ea-afe7e4a54174", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2537871756c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8827326073f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "226e57d9-4ad5-45ea-b685-223210f07b00", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fce6161c-2b20-4e27-9b5d-94cd21594354", "Content-Type" : "application/json" }, "Response" : { @@ -164,23 +164,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "e88009d4-6fbb-441b-9b34-49e1165fb522", + "x-ms-correlation-request-id" : "f71394cf-f7b0-48ce-a28b-332313aafa4e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "e88009d4-6fbb-441b-9b34-49e1165fb522", - "x-ms-client-request-id" : "226e57d9-4ad5-45ea-b685-223210f07b00" + "x-ms-request-id" : "f71394cf-f7b0-48ce-a28b-332313aafa4e", + "x-ms-client-request-id" : "fce6161c-2b20-4e27-9b5d-94cd21594354" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2537871756c?label=dd32d065429766", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8827326073f?label=2b996e9f35460c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6a4e7546-5fa7-427e-9945-9d17fac90851", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d6ffe9c2-cd99-40a6-a71d-7022715c4ad5", "Content-Type" : "application/json" }, "Response" : { @@ -189,29 +189,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "31ebe8bd-394c-4cc9-9c9a-39e94db34ebc", + "x-ms-correlation-request-id" : "287ae823-3f38-4c1c-a5d9-5adcd033055e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"NsStNiyXPXPbDzpEtqB9OsMaEYn\"", + "ETag" : "\"mjpXy69zQSfymJibA9mWCero47l\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTU=;sn=402215", - "x-ms-request-id" : "31ebe8bd-394c-4cc9-9c9a-39e94db34ebc", - "Body" : "{\"etag\":\"NsStNiyXPXPbDzpEtqB9OsMaEYn\",\"key\":\"key2537871756c\",\"label\":\"dd32d065429766\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:08+00:00\"}", - "x-ms-client-request-id" : "6a4e7546-5fa7-427e-9945-9d17fac90851", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMTQ=;sn=449014", + "x-ms-request-id" : "287ae823-3f38-4c1c-a5d9-5adcd033055e", + "Body" : "{\"etag\":\"mjpXy69zQSfymJibA9mWCero47l\",\"key\":\"key8827326073f\",\"label\":\"2b996e9f35460c\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"}", + "x-ms-client-request-id" : "d6ffe9c2-cd99-40a6-a71d-7022715c4ad5", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2537871756c?label=dd32d065429766", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8827326073f?label=2b996e9f35460c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4cb11a17-a559-4e14-9503-6882b39a97dc", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9aabef84-2bb7-45d9-9890-50fd4b00315a", "Content-Type" : "application/json" }, "Response" : { @@ -220,29 +220,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:21 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "caa51de4-37d3-455b-a38f-747155cbc393", + "x-ms-correlation-request-id" : "70a4a4c3-32b3-49ce-88b2-4abd4f65895c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"xDncEdFk2wPr6pzhGUqK3uCVtyM\"", + "ETag" : "\"vUHSE690xedMbqQSK6rDbU6Se0k\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTY=;sn=402216", - "x-ms-request-id" : "caa51de4-37d3-455b-a38f-747155cbc393", - "Body" : "{\"etag\":\"xDncEdFk2wPr6pzhGUqK3uCVtyM\",\"key\":\"key2537871756c\",\"label\":\"dd32d065429766\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:08+00:00\"}", - "x-ms-client-request-id" : "4cb11a17-a559-4e14-9503-6882b39a97dc", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMTU=;sn=449015", + "x-ms-request-id" : "70a4a4c3-32b3-49ce-88b2-4abd4f65895c", + "Body" : "{\"etag\":\"vUHSE690xedMbqQSK6rDbU6Se0k\",\"key\":\"key8827326073f\",\"label\":\"2b996e9f35460c\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"}", + "x-ms-client-request-id" : "9aabef84-2bb7-45d9-9890-50fd4b00315a", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2537871756c?label=dd32d065429766", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8827326073f?label=2b996e9f35460c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "eba5ba58-5ded-43aa-b668-1329ef47d9d0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e51202d1-f9f3-4444-b465-843c89148ce4", "Content-Type" : "application/json" }, "Response" : { @@ -251,29 +251,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:22 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ce56c51f-7680-4b84-9b6f-0f1530a35a8d", + "x-ms-correlation-request-id" : "e7f0060b-b233-44b8-96cb-ef08ac45f9ec", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"xDncEdFk2wPr6pzhGUqK3uCVtyM\"", + "ETag" : "\"vUHSE690xedMbqQSK6rDbU6Se0k\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTY=;sn=402216", - "x-ms-request-id" : "ce56c51f-7680-4b84-9b6f-0f1530a35a8d", - "Body" : "{\"etag\":\"xDncEdFk2wPr6pzhGUqK3uCVtyM\",\"key\":\"key2537871756c\",\"label\":\"dd32d065429766\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:08+00:00\"}", - "x-ms-client-request-id" : "eba5ba58-5ded-43aa-b668-1329ef47d9d0", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMTU=;sn=449015", + "x-ms-request-id" : "e7f0060b-b233-44b8-96cb-ef08ac45f9ec", + "Body" : "{\"etag\":\"vUHSE690xedMbqQSK6rDbU6Se0k\",\"key\":\"key8827326073f\",\"label\":\"2b996e9f35460c\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"}", + "x-ms-client-request-id" : "e51202d1-f9f3-4444-b465-843c89148ce4", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2537871756c?label=dd32d065429766", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8827326073f?label=2b996e9f35460c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "62df94d7-2d17-4892-b73e-55885b193b50", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "54032f9e-4d2d-4569-bdc1-e7b249742a88", "Content-Type" : "application/json" }, "Response" : { @@ -283,23 +283,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:22 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "e81fa424-fee4-49b0-aa92-a4e07c4512ff", + "x-ms-correlation-request-id" : "1b05f6d1-4f5b-498d-a4e7-242ec4eaf6cd", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "e81fa424-fee4-49b0-aa92-a4e07c4512ff", - "x-ms-client-request-id" : "62df94d7-2d17-4892-b73e-55885b193b50" + "x-ms-request-id" : "1b05f6d1-4f5b-498d-a4e7-242ec4eaf6cd", + "x-ms-client-request-id" : "54032f9e-4d2d-4569-bdc1-e7b249742a88" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2537871756c?label=dd32d065429766", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8827326073f?label=2b996e9f35460c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "94b4f1ec-2144-43b8-a229-f12665f7d197", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "af1a6414-f024-488a-9500-65f8ce053cc3", "Content-Type" : "application/json" }, "Response" : { @@ -308,29 +308,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:22 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9b6d51e7-c8ea-4064-bbe1-8652d21c32dd", + "x-ms-correlation-request-id" : "9dd99bf7-508f-4607-a61f-19e1bcea9875", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"xDncEdFk2wPr6pzhGUqK3uCVtyM\"", + "ETag" : "\"vUHSE690xedMbqQSK6rDbU6Se0k\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMTc=;sn=402217", - "x-ms-request-id" : "9b6d51e7-c8ea-4064-bbe1-8652d21c32dd", - "Body" : "{\"etag\":\"xDncEdFk2wPr6pzhGUqK3uCVtyM\",\"key\":\"key2537871756c\",\"label\":\"dd32d065429766\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:08+00:00\"}", - "x-ms-client-request-id" : "94b4f1ec-2144-43b8-a229-f12665f7d197", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMTY=;sn=449016", + "x-ms-request-id" : "9dd99bf7-508f-4607-a61f-19e1bcea9875", + "Body" : "{\"etag\":\"vUHSE690xedMbqQSK6rDbU6Se0k\",\"key\":\"key8827326073f\",\"label\":\"2b996e9f35460c\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:22+00:00\"}", + "x-ms-client-request-id" : "af1a6414-f024-488a-9500-65f8ce053cc3", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2537871756c?label=dd32d065429766", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8827326073f?label=2b996e9f35460c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "319f6d04-db10-4bb0-8187-1c2675b5199f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2ec85959-0840-4189-9cab-bb6fe3f5aff4", "Content-Type" : "application/json" }, "Response" : { @@ -340,23 +340,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:22 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "336d86ab-c8c7-4a61-af34-c69da09090f7", + "x-ms-correlation-request-id" : "14880887-926c-4393-8c7c-3debd8bea091", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "336d86ab-c8c7-4a61-af34-c69da09090f7", - "x-ms-client-request-id" : "319f6d04-db10-4bb0-8187-1c2675b5199f" + "x-ms-request-id" : "14880887-926c-4393-8c7c-3debd8bea091", + "x-ms-client-request-id" : "2ec85959-0840-4189-9cab-bb6fe3f5aff4" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key25378%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key88273%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "33436c64-8dd6-4468-b355-08d13b6dedcd", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2cd6326b-c69c-46e2-87f3-4bcff85a361c", "Content-Type" : "application/json" }, "Response" : { @@ -367,18 +367,18 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:08 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:22 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "dbf3707c-6950-4d6c-b28a-9630f26abed1", + "x-ms-correlation-request-id" : "d84e2d65-72d8-42be-b39d-761d71d4c665", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "x-ms-request-id" : "dbf3707c-6950-4d6c-b28a-9630f26abed1", + "x-ms-request-id" : "d84e2d65-72d8-42be-b39d-761d71d4c665", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "33436c64-8dd6-4468-b355-08d13b6dedcd", + "x-ms-client-request-id" : "2cd6326b-c69c-46e2-87f3-4bcff85a361c", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key25378", "dd32d065", "key2537871756c", "dd32d065429766" ] + "variables" : [ "key88273", "2b996e9f", "key8827326073f", "2b996e9f35460c" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSetting.json index 7898e37069b5..06b886de7bab 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSetting.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSetting.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key48257913731", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key9727811817c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e46cae45-3baa-4028-8d30-e135dfc2cd55", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d7b9623a-7bf4-4a39-9c7b-af9403c32827", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9fb80e2b-9839-4d4a-948c-c4ce4c1c6d93", + "x-ms-correlation-request-id" : "8cc925f6-a803-4ae0-a12a-fb0fec7ab726", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"0R54qt4NDVOipyM0GolVCCaKtfk\"", + "ETag" : "\"KDcBXnfWxxMcTMv3Z4EsnBuYiJZ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NjM=;sn=401863", - "x-ms-request-id" : "9fb80e2b-9839-4d4a-948c-c4ce4c1c6d93", - "Body" : "{\"etag\":\"0R54qt4NDVOipyM0GolVCCaKtfk\",\"key\":\"key48257913731\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "e46cae45-3baa-4028-8d30-e135dfc2cd55", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NTY=;sn=448656", + "x-ms-request-id" : "8cc925f6-a803-4ae0-a12a-fb0fec7ab726", + "Body" : "{\"etag\":\"KDcBXnfWxxMcTMv3Z4EsnBuYiJZ\",\"key\":\"key9727811817c\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "d7b9623a-7bf4-4a39-9c7b-af9403c32827", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key48257913731", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key9727811817c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "78f5d24d-1573-4832-8c41-9a563c77d706", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "28f286c1-21d5-497c-90c1-73af30887b70", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c41d8f51-01c6-41d9-b65a-494c85cf08fb", + "x-ms-correlation-request-id" : "e028b620-2593-4346-aa9d-4af2d74de83e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"0R54qt4NDVOipyM0GolVCCaKtfk\"", + "ETag" : "\"KDcBXnfWxxMcTMv3Z4EsnBuYiJZ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NjM=;sn=401863", - "x-ms-request-id" : "c41d8f51-01c6-41d9-b65a-494c85cf08fb", - "Body" : "{\"etag\":\"0R54qt4NDVOipyM0GolVCCaKtfk\",\"key\":\"key48257913731\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "78f5d24d-1573-4832-8c41-9a563c77d706", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NTY=;sn=448656", + "x-ms-request-id" : "e028b620-2593-4346-aa9d-4af2d74de83e", + "Body" : "{\"etag\":\"KDcBXnfWxxMcTMv3Z4EsnBuYiJZ\",\"key\":\"key9727811817c\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "28f286c1-21d5-497c-90c1-73af30887b70", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key48257913731?label=myLabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key9727811817c?label=myLabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f37fb1f5-69af-4cdf-957c-36438b4b8c14", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "67412861-31b8-4772-9cca-05210ee7a7ee", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "200a1bef-e2ac-4147-b6de-94e273c3326a", + "x-ms-correlation-request-id" : "ffce1d11-cd4c-43f3-89f8-e17b013e0e29", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"jw4GCGcn4Jbh8Ch4sA4cX88aC2W\"", + "ETag" : "\"Qtyge7y2tTRsW5KEtJPYJYdDZkd\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NjQ=;sn=401864", - "x-ms-request-id" : "200a1bef-e2ac-4147-b6de-94e273c3326a", - "Body" : "{\"etag\":\"jw4GCGcn4Jbh8Ch4sA4cX88aC2W\",\"key\":\"key48257913731\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "f37fb1f5-69af-4cdf-957c-36438b4b8c14", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NTc=;sn=448657", + "x-ms-request-id" : "ffce1d11-cd4c-43f3-89f8-e17b013e0e29", + "Body" : "{\"etag\":\"Qtyge7y2tTRsW5KEtJPYJYdDZkd\",\"key\":\"key9727811817c\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "67412861-31b8-4772-9cca-05210ee7a7ee", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key48257913731?label=myLabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key9727811817c?label=myLabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ec8b1177-6df8-45da-b274-ad8a500160f6", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7b89aa45-9e27-4017-be60-755040c3cb37", "Content-Type" : "application/json" }, "Response" : { @@ -106,29 +106,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "417cf182-99bb-459b-b07d-98585fb6b36f", + "x-ms-correlation-request-id" : "18b91188-54ab-4fea-a9eb-f89f5aad985e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"jw4GCGcn4Jbh8Ch4sA4cX88aC2W\"", + "ETag" : "\"Qtyge7y2tTRsW5KEtJPYJYdDZkd\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NjQ=;sn=401864", - "x-ms-request-id" : "417cf182-99bb-459b-b07d-98585fb6b36f", - "Body" : "{\"etag\":\"jw4GCGcn4Jbh8Ch4sA4cX88aC2W\",\"key\":\"key48257913731\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "ec8b1177-6df8-45da-b274-ad8a500160f6", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NTc=;sn=448657", + "x-ms-request-id" : "18b91188-54ab-4fea-a9eb-f89f5aad985e", + "Body" : "{\"etag\":\"Qtyge7y2tTRsW5KEtJPYJYdDZkd\",\"key\":\"key9727811817c\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "7b89aa45-9e27-4017-be60-755040c3cb37", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key48257%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key97278%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "924e2e2d-8828-487b-aa2b-e7344eadfb57", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "95d91897-2793-40b0-8da6-76b64a238a71", "Content-Type" : "application/json" }, "Response" : { @@ -139,25 +139,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "66131ffb-49d6-48ff-b2fe-fda01d25f81e", + "x-ms-correlation-request-id" : "8542bffa-759e-4e3c-9b54-bd4d79d491f9", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NjQ=;sn=401864", - "x-ms-request-id" : "66131ffb-49d6-48ff-b2fe-fda01d25f81e", - "Body" : "{\"items\":[{\"etag\":\"0R54qt4NDVOipyM0GolVCCaKtfk\",\"key\":\"key48257913731\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"},{\"etag\":\"jw4GCGcn4Jbh8Ch4sA4cX88aC2W\",\"key\":\"key48257913731\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}]}", - "x-ms-client-request-id" : "924e2e2d-8828-487b-aa2b-e7344eadfb57", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NTc=;sn=448657", + "x-ms-request-id" : "8542bffa-759e-4e3c-9b54-bd4d79d491f9", + "Body" : "{\"items\":[{\"etag\":\"KDcBXnfWxxMcTMv3Z4EsnBuYiJZ\",\"key\":\"key9727811817c\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"},{\"etag\":\"Qtyge7y2tTRsW5KEtJPYJYdDZkd\",\"key\":\"key9727811817c\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}]}", + "x-ms-client-request-id" : "95d91897-2793-40b0-8da6-76b64a238a71", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key48257913731", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key9727811817c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9d280568-0883-4ae7-8895-b90a5cef6953", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "33e7deda-1e18-47b5-ad94-fc464af3da99", "Content-Type" : "application/json" }, "Response" : { @@ -166,29 +166,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ca90d4da-a360-4f83-a036-240d3310c014", + "x-ms-correlation-request-id" : "fbcc6a23-cceb-421e-a778-8250d9b175ad", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"0R54qt4NDVOipyM0GolVCCaKtfk\"", + "ETag" : "\"KDcBXnfWxxMcTMv3Z4EsnBuYiJZ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NjU=;sn=401865", - "x-ms-request-id" : "ca90d4da-a360-4f83-a036-240d3310c014", - "Body" : "{\"etag\":\"0R54qt4NDVOipyM0GolVCCaKtfk\",\"key\":\"key48257913731\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "9d280568-0883-4ae7-8895-b90a5cef6953", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NTg=;sn=448658", + "x-ms-request-id" : "fbcc6a23-cceb-421e-a778-8250d9b175ad", + "Body" : "{\"etag\":\"KDcBXnfWxxMcTMv3Z4EsnBuYiJZ\",\"key\":\"key9727811817c\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "33e7deda-1e18-47b5-ad94-fc464af3da99", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key48257913731?label=myLabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key9727811817c?label=myLabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ccc6e7ea-b100-4c57-9e59-c8012b278913", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "058cbd6f-7430-46c5-bd42-a24ee72d38a8", "Content-Type" : "application/json" }, "Response" : { @@ -197,23 +197,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "01598bf8-9cbc-4276-98ca-d95a246b5b8d", + "x-ms-correlation-request-id" : "9a518a61-a2c2-40e5-a0e4-e8f7916057ab", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"jw4GCGcn4Jbh8Ch4sA4cX88aC2W\"", + "ETag" : "\"Qtyge7y2tTRsW5KEtJPYJYdDZkd\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NjY=;sn=401866", - "x-ms-request-id" : "01598bf8-9cbc-4276-98ca-d95a246b5b8d", - "Body" : "{\"etag\":\"jw4GCGcn4Jbh8Ch4sA4cX88aC2W\",\"key\":\"key48257913731\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "ccc6e7ea-b100-4c57-9e59-c8012b278913", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NTk=;sn=448659", + "x-ms-request-id" : "9a518a61-a2c2-40e5-a0e4-e8f7916057ab", + "Body" : "{\"etag\":\"Qtyge7y2tTRsW5KEtJPYJYdDZkd\",\"key\":\"key9727811817c\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "058cbd6f-7430-46c5-bd42-a24ee72d38a8", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key48257", "35b6de53", "key48257913731" ] + "variables" : [ "key97278", "81f9e204", "key9727811817c" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingConditionalRequest.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingConditionalRequest.json new file mode 100644 index 000000000000..5ca500e771a6 --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingConditionalRequest.json @@ -0,0 +1,122 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4331534614a", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ca508706-e8b5-486d-8942-8fba97359586", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Fri, 18 Oct 2019 19:09:50 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Fri, 18 Oct 2019 19:09:49 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2f56f441-2682-4539-aa91-30cf5f0c7a27", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"jZFpVh6cYBWjwK7yxcmNfxwOOQi\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSM0NDM2MTE=;sn=443611", + "x-ms-request-id" : "2f56f441-2682-4539-aa91-30cf5f0c7a27", + "Body" : "{\"etag\":\"jZFpVh6cYBWjwK7yxcmNfxwOOQi\",\"key\":\"key4331534614a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-18T19:09:50+00:00\"}", + "x-ms-client-request-id" : "ca508706-e8b5-486d-8942-8fba97359586", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4331534614a", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5f4653e8-28e3-4d26-b844-da9656492118", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "304", + "Date" : "Fri, 18 Oct 2019 19:09:49 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "47b0a2c4-cb7b-4841-bc3e-6e9d6e6c1dfb", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"jZFpVh6cYBWjwK7yxcmNfxwOOQi\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSM0NDM2MTE=;sn=443611", + "x-ms-request-id" : "47b0a2c4-cb7b-4841-bc3e-6e9d6e6c1dfb", + "x-ms-client-request-id" : "5f4653e8-28e3-4d26-b844-da9656492118" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key43315%2a", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c75d7878-d1b5-49a1-90a7-8358d0dbfaad", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Fri, 18 Oct 2019 19:09:50 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ed03fadb-57ea-44a8-a29c-d8b941dc5345", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSM0NDM2MTE=;sn=443611", + "x-ms-request-id" : "ed03fadb-57ea-44a8-a29c-d8b941dc5345", + "Body" : "{\"items\":[{\"etag\":\"jZFpVh6cYBWjwK7yxcmNfxwOOQi\",\"key\":\"key4331534614a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-18T19:09:50+00:00\"}]}", + "x-ms-client-request-id" : "c75d7878-d1b5-49a1-90a7-8358d0dbfaad", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4331534614a", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4904fdb4-b9bb-467b-bf21-186630a888ee", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Fri, 18 Oct 2019 19:09:50 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Fri, 18 Oct 2019 19:09:50 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "0e3a79e1-b03f-433f-8b9d-600af5d5b9d8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"jZFpVh6cYBWjwK7yxcmNfxwOOQi\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSM0NDM2MTI=;sn=443612", + "x-ms-request-id" : "0e3a79e1-b03f-433f-8b9d-600af5d5b9d8", + "Body" : "{\"etag\":\"jZFpVh6cYBWjwK7yxcmNfxwOOQi\",\"key\":\"key4331534614a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-18T19:09:50+00:00\"}", + "x-ms-client-request-id" : "4904fdb4-b9bb-467b-bf21-186630a888ee", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "key43315", "e38e9b26", "key4331534614a" ] +} \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingNotFound.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingNotFound.json index f25155260cde..e9847ae2f9ed 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingNotFound.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingNotFound.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key91122869329", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3405730952b", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7d59eb4a-4534-4638-b01b-766511b8c0bd", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0e4fab5f-900f-48af-ab41-5612120da0b7", "Content-Type" : "application/json" }, "Response" : { @@ -13,20 +13,20 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:15 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2e6c2ec0-0719-4b86-95f6-e675fd7b56af", + "x-ms-correlation-request-id" : "3f3e8205-d7bd-43b8-96ed-c931a88fc7da", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"DEGyWcm3tZncZhlNcmeb8AxGfUM\"", + "ETag" : "\"AKvXqqEUoEz8f1d4fjlD9TCBnEX\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjQ=;sn=402064", - "x-ms-request-id" : "2e6c2ec0-0719-4b86-95f6-e675fd7b56af", - "Body" : "{\"etag\":\"DEGyWcm3tZncZhlNcmeb8AxGfUM\",\"key\":\"key91122869329\",\"label\":null,\"content_type\":null,\"value\":\"myNeverRetreivedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:02+00:00\"}", - "x-ms-client-request-id" : "7d59eb4a-4534-4638-b01b-766511b8c0bd", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTk=;sn=448859", + "x-ms-request-id" : "3f3e8205-d7bd-43b8-96ed-c931a88fc7da", + "Body" : "{\"etag\":\"AKvXqqEUoEz8f1d4fjlD9TCBnEX\",\"key\":\"key3405730952b\",\"label\":null,\"content_type\":null,\"value\":\"myNeverRetreivedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:15+00:00\"}", + "x-ms-client-request-id" : "0e4fab5f-900f-48af-ab41-5612120da0b7", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null @@ -34,8 +34,8 @@ "Method" : "GET", "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/myNonExistentKey", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5a64afb0-6722-4d3e-8646-3bc75674c8a4", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "87945e07-2de4-480d-ac24-31e09fc0ce47", "Content-Type" : "application/json" }, "Response" : { @@ -45,23 +45,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "149e47ec-d20f-4a4e-a957-8be81828b422", + "x-ms-correlation-request-id" : "4ceb889c-5391-4c16-85a1-3b62150cdb71", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "149e47ec-d20f-4a4e-a957-8be81828b422", - "x-ms-client-request-id" : "5a64afb0-6722-4d3e-8646-3bc75674c8a4" + "x-ms-request-id" : "4ceb889c-5391-4c16-85a1-3b62150cdb71", + "x-ms-client-request-id" : "87945e07-2de4-480d-ac24-31e09fc0ce47" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key91122869329?label=myNonExistentLabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3405730952b?label=myNonExistentLabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "76f4a9d4-a79b-466e-bf08-950520f57225", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d13ec496-fbf4-4843-b856-d9f863ddf8ee", "Content-Type" : "application/json" }, "Response" : { @@ -71,23 +71,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b9d628ec-a092-4674-b2a1-e7099003a268", + "x-ms-correlation-request-id" : "9c3f5dce-529d-41f3-9197-0114fccae943", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "b9d628ec-a092-4674-b2a1-e7099003a268", - "x-ms-client-request-id" : "76f4a9d4-a79b-466e-bf08-950520f57225" + "x-ms-request-id" : "9c3f5dce-529d-41f3-9197-0114fccae943", + "x-ms-client-request-id" : "d13ec496-fbf4-4843-b856-d9f863ddf8ee" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key91122%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key34057%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c9ef7da6-feb8-4d7d-bdee-4e7e8401bcfe", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "105cbbe6-6904-4184-98b4-f4e67cab908e", "Content-Type" : "application/json" }, "Response" : { @@ -98,25 +98,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f02605f2-4b85-442c-afcb-2df46dfa1365", + "x-ms-correlation-request-id" : "0c9c2641-5c2b-4b4d-8a51-155581a1d6db", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjQ=;sn=402064", - "x-ms-request-id" : "f02605f2-4b85-442c-afcb-2df46dfa1365", - "Body" : "{\"items\":[{\"etag\":\"DEGyWcm3tZncZhlNcmeb8AxGfUM\",\"key\":\"key91122869329\",\"label\":null,\"content_type\":null,\"value\":\"myNeverRetreivedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:02+00:00\"}]}", - "x-ms-client-request-id" : "c9ef7da6-feb8-4d7d-bdee-4e7e8401bcfe", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTk=;sn=448859", + "x-ms-request-id" : "0c9c2641-5c2b-4b4d-8a51-155581a1d6db", + "Body" : "{\"items\":[{\"etag\":\"AKvXqqEUoEz8f1d4fjlD9TCBnEX\",\"key\":\"key3405730952b\",\"label\":null,\"content_type\":null,\"value\":\"myNeverRetreivedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:15+00:00\"}]}", + "x-ms-client-request-id" : "105cbbe6-6904-4184-98b4-f4e67cab908e", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key91122869329", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3405730952b", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "67d48b30-ad9f-4e2d-a0af-770cba192da4", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "15c45092-aa68-46af-991d-45679e4cf2c0", "Content-Type" : "application/json" }, "Response" : { @@ -125,23 +125,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:15 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "5e536f02-462b-4ab9-8c00-877dfa5a7960", + "x-ms-correlation-request-id" : "f2802456-618c-46ba-a167-425268150752", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"DEGyWcm3tZncZhlNcmeb8AxGfUM\"", + "ETag" : "\"AKvXqqEUoEz8f1d4fjlD9TCBnEX\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjU=;sn=402065", - "x-ms-request-id" : "5e536f02-462b-4ab9-8c00-877dfa5a7960", - "Body" : "{\"etag\":\"DEGyWcm3tZncZhlNcmeb8AxGfUM\",\"key\":\"key91122869329\",\"label\":null,\"content_type\":null,\"value\":\"myNeverRetreivedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:02+00:00\"}", - "x-ms-client-request-id" : "67d48b30-ad9f-4e2d-a0af-770cba192da4", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NjA=;sn=448860", + "x-ms-request-id" : "f2802456-618c-46ba-a167-425268150752", + "Body" : "{\"etag\":\"AKvXqqEUoEz8f1d4fjlD9TCBnEX\",\"key\":\"key3405730952b\",\"label\":null,\"content_type\":null,\"value\":\"myNeverRetreivedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:15+00:00\"}", + "x-ms-client-request-id" : "15c45092-aa68-46af-991d-45679e4cf2c0", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key91122", "2acf026c", "key91122869329" ] + "variables" : [ "key34057", "0c29b5d9", "key3405730952b" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingWhenValueNotUpdated.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingWhenValueNotUpdated.json new file mode 100644 index 000000000000..c29eef96e678 --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingWhenValueNotUpdated.json @@ -0,0 +1,184 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key34903598246", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0c20329a-dea9-42dd-a377-765d51f2edcf", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:16 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 19 Oct 2019 00:46:16 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "eae45c3d-e8c3-4497-9eb4-43cc35882fe0", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"akwyZ9xOarhzcJN6Mjc2KhguT1l\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4Njk=;sn=448869", + "x-ms-request-id" : "eae45c3d-e8c3-4497-9eb4-43cc35882fe0", + "Body" : "{\"etag\":\"akwyZ9xOarhzcJN6Mjc2KhguT1l\",\"key\":\"key34903598246\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}", + "x-ms-client-request-id" : "0c20329a-dea9-42dd-a377-765d51f2edcf", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key34903598246", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b1798295-1e05-4d35-ad87-ce64ce26e065", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "304", + "Date" : "Sat, 19 Oct 2019 00:46:16 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9a3e301c-1d36-44c5-a2dd-6d796bdcbc7c", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"akwyZ9xOarhzcJN6Mjc2KhguT1l\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4Njk=;sn=448869", + "x-ms-request-id" : "9a3e301c-1d36-44c5-a2dd-6d796bdcbc7c", + "x-ms-client-request-id" : "b1798295-1e05-4d35-ad87-ce64ce26e065" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key34903598246", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fc47eedb-284f-4fde-9d4d-c90a6f0864e4", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:16 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 19 Oct 2019 00:46:16 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9188f943-c6e5-4488-9f7a-7edbb280c3d8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"kwFXpTyGjUB2dqL0MzJyp3VJCuz\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NzA=;sn=448870", + "x-ms-request-id" : "9188f943-c6e5-4488-9f7a-7edbb280c3d8", + "Body" : "{\"etag\":\"kwFXpTyGjUB2dqL0MzJyp3VJCuz\",\"key\":\"key34903598246\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}", + "x-ms-client-request-id" : "fc47eedb-284f-4fde-9d4d-c90a6f0864e4", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key34903598246", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "12e92099-9fcc-4dd8-b6b0-8a098ed516a0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:16 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 19 Oct 2019 00:46:16 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d9ef6f1a-4764-478b-9cad-4350a61a83e5", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"kwFXpTyGjUB2dqL0MzJyp3VJCuz\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NzA=;sn=448870", + "x-ms-request-id" : "d9ef6f1a-4764-478b-9cad-4350a61a83e5", + "Body" : "{\"etag\":\"kwFXpTyGjUB2dqL0MzJyp3VJCuz\",\"key\":\"key34903598246\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}", + "x-ms-client-request-id" : "12e92099-9fcc-4dd8-b6b0-8a098ed516a0", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key34903%2a", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6926c841-6472-4e0e-8c5d-b7925f53d4c9", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 19 Oct 2019 00:46:16 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1999710e-5588-4fc0-a112-56420cfd7181", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NzA=;sn=448870", + "x-ms-request-id" : "1999710e-5588-4fc0-a112-56420cfd7181", + "Body" : "{\"items\":[{\"etag\":\"kwFXpTyGjUB2dqL0MzJyp3VJCuz\",\"key\":\"key34903598246\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}]}", + "x-ms-client-request-id" : "6926c841-6472-4e0e-8c5d-b7925f53d4c9", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key34903598246", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dbe8ed30-eb09-43a6-8f42-ae1492cf598f", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:16 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 19 Oct 2019 00:46:16 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9fffc949-1de2-49ab-984e-77a7d7882ae2", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"kwFXpTyGjUB2dqL0MzJyp3VJCuz\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NzE=;sn=448871", + "x-ms-request-id" : "9fffc949-1de2-49ab-984e-77a7d7882ae2", + "Body" : "{\"etag\":\"kwFXpTyGjUB2dqL0MzJyp3VJCuz\",\"key\":\"key34903598246\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}", + "x-ms-client-request-id" : "dbe8ed30-eb09-43a6-8f42-ae1492cf598f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "key34903", "bce35a5c", "key34903598246" ] +} \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisions.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisions.json index 60b4ad24ff82..4906498fabd4 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisions.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisions.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key21742605721", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key89149542970", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6bffd686-cfa3-4949-9b4a-07ebf02dca45", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1a31097e-4b57-4917-858a-3497e2cd4312", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1ec75b9c-a2d0-4bda-970a-fb78668b3ee9", + "x-ms-correlation-request-id" : "1f28aba1-838c-4bef-886e-b97d3a807546", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"aXB6VZ5LjG1BKzs0h2MQXPJ8vyz\"", + "ETag" : "\"eyLgwzCMR55okPBewwKG4S34uSk\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMDg=;sn=402008", - "x-ms-request-id" : "1ec75b9c-a2d0-4bda-970a-fb78668b3ee9", - "Body" : "{\"etag\":\"aXB6VZ5LjG1BKzs0h2MQXPJ8vyz\",\"key\":\"key21742605721\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "6bffd686-cfa3-4949-9b4a-07ebf02dca45", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MDA=;sn=448800", + "x-ms-request-id" : "1f28aba1-838c-4bef-886e-b97d3a807546", + "Body" : "{\"etag\":\"eyLgwzCMR55okPBewwKG4S34uSk\",\"key\":\"key89149542970\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "1a31097e-4b57-4917-858a-3497e2cd4312", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key21742605721", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key89149542970", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "358c98e3-5fc3-4216-b3b4-eeb90fe2b2f5", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ebd2a910-1b4b-47ae-9e1d-fe64f7d87703", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "60fbc03c-937a-4a0c-91ce-7f555fc21a28", + "x-ms-correlation-request-id" : "5b54610d-f0f9-483e-8487-664c04652ad5", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"23pOU3UXnRVFAmvhLV51TDxBumV\"", + "ETag" : "\"3AeINnsNjQBqcnJViAa0L29aHQz\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMDk=;sn=402009", - "x-ms-request-id" : "60fbc03c-937a-4a0c-91ce-7f555fc21a28", - "Body" : "{\"etag\":\"23pOU3UXnRVFAmvhLV51TDxBumV\",\"key\":\"key21742605721\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "358c98e3-5fc3-4216-b3b4-eeb90fe2b2f5", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MDE=;sn=448801", + "x-ms-request-id" : "5b54610d-f0f9-483e-8487-664c04652ad5", + "Body" : "{\"etag\":\"3AeINnsNjQBqcnJViAa0L29aHQz\",\"key\":\"key89149542970\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "ebd2a910-1b4b-47ae-9e1d-fe64f7d87703", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key21742605721", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key89149542970", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "98b23c9c-cfa1-4d12-a5f2-0d888bd09977", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "32df23c5-38f2-44e5-9970-2e1803f0e5b4", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "46def52a-dced-450d-baf6-1ca29bfb32a1", + "x-ms-correlation-request-id" : "1dcea1ff-44f1-4785-9826-5edf2f86b0cf", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"AOiNkijH1QmrCxLVfyIepB12u8M\"", + "ETag" : "\"gRJpS3y6x8Kavqgb2g9ZtIyG9h3\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMTA=;sn=402010", - "x-ms-request-id" : "46def52a-dced-450d-baf6-1ca29bfb32a1", - "Body" : "{\"etag\":\"AOiNkijH1QmrCxLVfyIepB12u8M\",\"key\":\"key21742605721\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "98b23c9c-cfa1-4d12-a5f2-0d888bd09977", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MDI=;sn=448802", + "x-ms-request-id" : "1dcea1ff-44f1-4785-9826-5edf2f86b0cf", + "Body" : "{\"etag\":\"gRJpS3y6x8Kavqgb2g9ZtIyG9h3\",\"key\":\"key89149542970\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "32df23c5-38f2-44e5-9970-2e1803f0e5b4", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key21742605721", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key89149542970", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "71f89af6-bcd0-45f1-81c2-7f496703383f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cd230bc2-c362-4653-8c5a-68a9737b18f7", "Content-Type" : "application/json" }, "Response" : { @@ -108,26 +108,26 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "48f24680-8386-4f76-8857-587405d3ec77", + "x-ms-correlation-request-id" : "bc623f2d-30ed-4214-98a1-87812f85f45e", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMTA=;sn=402010", - "x-ms-request-id" : "48f24680-8386-4f76-8857-587405d3ec77", - "Body" : "{\"items\":[{\"etag\":\"AOiNkijH1QmrCxLVfyIepB12u8M\",\"key\":\"key21742605721\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"23pOU3UXnRVFAmvhLV51TDxBumV\",\"key\":\"key21742605721\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"aXB6VZ5LjG1BKzs0h2MQXPJ8vyz\",\"key\":\"key21742605721\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}]}", - "x-ms-client-request-id" : "71f89af6-bcd0-45f1-81c2-7f496703383f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MDI=;sn=448802", + "x-ms-request-id" : "bc623f2d-30ed-4214-98a1-87812f85f45e", + "Body" : "{\"items\":[{\"etag\":\"gRJpS3y6x8Kavqgb2g9ZtIyG9h3\",\"key\":\"key89149542970\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"},{\"etag\":\"3AeINnsNjQBqcnJViAa0L29aHQz\",\"key\":\"key89149542970\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"},{\"etag\":\"eyLgwzCMR55okPBewwKG4S34uSk\",\"key\":\"key89149542970\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}]}", + "x-ms-client-request-id" : "cd230bc2-c362-4653-8c5a-68a9737b18f7", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key21742605721&$select=key%2cetag", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key89149542970&$select=key%2cetag", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "96b24035-da03-4a87-ac4c-d3a5dc2a5522", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dd6b9a65-f296-48a3-b744-6bbdedc70099", "Content-Type" : "application/json" }, "Response" : { @@ -138,26 +138,26 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9e7b6cd8-ac81-4189-b2fc-7ec910fdade8", + "x-ms-correlation-request-id" : "c0112c78-6c47-46db-a406-0c91888c1526", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMTA=;sn=402010", - "x-ms-request-id" : "9e7b6cd8-ac81-4189-b2fc-7ec910fdade8", - "Body" : "{\"items\":[{\"etag\":\"AOiNkijH1QmrCxLVfyIepB12u8M\",\"key\":\"key21742605721\"},{\"etag\":\"23pOU3UXnRVFAmvhLV51TDxBumV\",\"key\":\"key21742605721\"},{\"etag\":\"aXB6VZ5LjG1BKzs0h2MQXPJ8vyz\",\"key\":\"key21742605721\"}]}", - "x-ms-client-request-id" : "96b24035-da03-4a87-ac4c-d3a5dc2a5522", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MDI=;sn=448802", + "x-ms-request-id" : "c0112c78-6c47-46db-a406-0c91888c1526", + "Body" : "{\"items\":[{\"etag\":\"gRJpS3y6x8Kavqgb2g9ZtIyG9h3\",\"key\":\"key89149542970\"},{\"etag\":\"3AeINnsNjQBqcnJViAa0L29aHQz\",\"key\":\"key89149542970\"},{\"etag\":\"eyLgwzCMR55okPBewwKG4S34uSk\",\"key\":\"key89149542970\"}]}", + "x-ms-client-request-id" : "dd6b9a65-f296-48a3-b744-6bbdedc70099", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key21742%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key89149%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3d1ddbd1-22ca-4732-817b-aea6169447a0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "469a2540-9b11-4fb2-8dc2-69fcd30ab1ea", "Content-Type" : "application/json" }, "Response" : { @@ -168,25 +168,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c0429bf1-400f-4868-9c9d-7b8f54b46ec7", + "x-ms-correlation-request-id" : "3646ddd0-5b3f-4cb0-b043-ad97f4b7f53e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMTA=;sn=402010", - "x-ms-request-id" : "c0429bf1-400f-4868-9c9d-7b8f54b46ec7", - "Body" : "{\"items\":[{\"etag\":\"AOiNkijH1QmrCxLVfyIepB12u8M\",\"key\":\"key21742605721\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}]}", - "x-ms-client-request-id" : "3d1ddbd1-22ca-4732-817b-aea6169447a0", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MDI=;sn=448802", + "x-ms-request-id" : "3646ddd0-5b3f-4cb0-b043-ad97f4b7f53e", + "Body" : "{\"items\":[{\"etag\":\"gRJpS3y6x8Kavqgb2g9ZtIyG9h3\",\"key\":\"key89149542970\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}]}", + "x-ms-client-request-id" : "469a2540-9b11-4fb2-8dc2-69fcd30ab1ea", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key21742605721", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key89149542970", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4b3a94d9-4764-4686-b822-5d48467de53c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "55a1b384-9593-4729-a58b-2d436224a277", "Content-Type" : "application/json" }, "Response" : { @@ -195,23 +195,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "cb899b5e-16a3-4b07-a462-9e829f957eaa", + "x-ms-correlation-request-id" : "a0866d6a-f5c2-4a48-80e2-70c00cb43856", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"AOiNkijH1QmrCxLVfyIepB12u8M\"", + "ETag" : "\"gRJpS3y6x8Kavqgb2g9ZtIyG9h3\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMTE=;sn=402011", - "x-ms-request-id" : "cb899b5e-16a3-4b07-a462-9e829f957eaa", - "Body" : "{\"etag\":\"AOiNkijH1QmrCxLVfyIepB12u8M\",\"key\":\"key21742605721\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "4b3a94d9-4764-4686-b822-5d48467de53c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MDM=;sn=448803", + "x-ms-request-id" : "a0866d6a-f5c2-4a48-80e2-70c00cb43856", + "Body" : "{\"etag\":\"gRJpS3y6x8Kavqgb2g9ZtIyG9h3\",\"key\":\"key89149542970\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "55a1b384-9593-4729-a58b-2d436224a277", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key21742", "d6570bc1", "key21742605721" ] + "variables" : [ "key89149", "d16fbee9", "key89149542970" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsAcceptDateTime.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsAcceptDateTime.json index 416204ebe0d2..3bd9cda6ffa9 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsAcceptDateTime.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsAcceptDateTime.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key84791133054", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8966294649b", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "95834d7e-ccb5-444a-9d17-1dc29221b1bd", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "41d9456a-d9fd-4a08-9cd7-3d8b390f8e6b", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:03 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:17 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:16 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3fb0a929-50c7-4e51-9022-f3d07c707c49", + "x-ms-correlation-request-id" : "581dea31-dd54-4757-b74e-a66986de6695", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"cOygB9OmiVX9003YxyI8TkKIUPu\"", + "ETag" : "\"IUBjoYJgfk48Nuv5u16JhhpQ95K\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzQ=;sn=402074", - "x-ms-request-id" : "3fb0a929-50c7-4e51-9022-f3d07c707c49", - "Body" : "{\"etag\":\"cOygB9OmiVX9003YxyI8TkKIUPu\",\"key\":\"key84791133054\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:03+00:00\"}", - "x-ms-client-request-id" : "95834d7e-ccb5-444a-9d17-1dc29221b1bd", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NzI=;sn=448872", + "x-ms-request-id" : "581dea31-dd54-4757-b74e-a66986de6695", + "Body" : "{\"etag\":\"IUBjoYJgfk48Nuv5u16JhhpQ95K\",\"key\":\"key8966294649b\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:17+00:00\"}", + "x-ms-client-request-id" : "41d9456a-d9fd-4a08-9cd7-3d8b390f8e6b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key84791133054", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8966294649b", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "65638546-0597-4d79-b4da-296a820568a4", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "88552e7f-276a-41a1-beb3-365d101138db", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:03 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:17 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:16 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "09dee594-f740-4218-839e-027c79a83fdf", + "x-ms-correlation-request-id" : "0d1d3b22-4eb7-4d3d-b728-6f31a3ee71b7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"a2NSmiOzUQhw4fCad50F5CzkllD\"", + "ETag" : "\"bBb90XMTYgNj5mR4HgPsFwlRL4r\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzU=;sn=402075", - "x-ms-request-id" : "09dee594-f740-4218-839e-027c79a83fdf", - "Body" : "{\"etag\":\"a2NSmiOzUQhw4fCad50F5CzkllD\",\"key\":\"key84791133054\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:03+00:00\"}", - "x-ms-client-request-id" : "65638546-0597-4d79-b4da-296a820568a4", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NzQ=;sn=448874", + "x-ms-request-id" : "0d1d3b22-4eb7-4d3d-b728-6f31a3ee71b7", + "Body" : "{\"etag\":\"bBb90XMTYgNj5mR4HgPsFwlRL4r\",\"key\":\"key8966294649b\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:17+00:00\"}", + "x-ms-client-request-id" : "88552e7f-276a-41a1-beb3-365d101138db", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key84791133054", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8966294649b", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b60b73e0-2697-4d89-8040-410bdbd8f2c6", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8bfbb031-5b0a-4067-9a1a-028e6b1f35f8", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:18 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7deb718d-6b54-4ee1-bf8e-ecd37eaa3f3e", + "x-ms-correlation-request-id" : "e27f16df-e2d8-42ed-8e6b-dee1121e2c8d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"A4QnTiefCXaVkLn2Z17ic985kXZ\"", + "ETag" : "\"iGpQWxNABD60AzKPWXVvxj5l5Mo\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzY=;sn=402076", - "x-ms-request-id" : "7deb718d-6b54-4ee1-bf8e-ecd37eaa3f3e", - "Body" : "{\"etag\":\"A4QnTiefCXaVkLn2Z17ic985kXZ\",\"key\":\"key84791133054\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:05+00:00\"}", - "x-ms-client-request-id" : "b60b73e0-2697-4d89-8040-410bdbd8f2c6", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NzU=;sn=448875", + "x-ms-request-id" : "e27f16df-e2d8-42ed-8e6b-dee1121e2c8d", + "Body" : "{\"etag\":\"iGpQWxNABD60AzKPWXVvxj5l5Mo\",\"key\":\"key8966294649b\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "8bfbb031-5b0a-4067-9a1a-028e6b1f35f8", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key84791133054", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key8966294649b", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e760229a-297d-4a8b-b389-731eca147974", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0a599275-abdb-4b61-b4de-f8a5f83853b1", "Content-Type" : "application/json" }, "Response" : { @@ -108,58 +108,58 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:18 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "bfc597f9-3495-4ea0-a920-40d4f3fc1c57", + "x-ms-correlation-request-id" : "11bd9723-e09f-481b-9421-14e1fc2bcab6", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzY=;sn=402076", - "x-ms-request-id" : "bfc597f9-3495-4ea0-a920-40d4f3fc1c57", - "Body" : "{\"items\":[{\"etag\":\"A4QnTiefCXaVkLn2Z17ic985kXZ\",\"key\":\"key84791133054\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:05+00:00\"},{\"etag\":\"a2NSmiOzUQhw4fCad50F5CzkllD\",\"key\":\"key84791133054\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:03+00:00\"},{\"etag\":\"cOygB9OmiVX9003YxyI8TkKIUPu\",\"key\":\"key84791133054\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:03+00:00\"}]}", - "x-ms-client-request-id" : "e760229a-297d-4a8b-b389-731eca147974", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NzU=;sn=448875", + "x-ms-request-id" : "11bd9723-e09f-481b-9421-14e1fc2bcab6", + "Body" : "{\"items\":[{\"etag\":\"iGpQWxNABD60AzKPWXVvxj5l5Mo\",\"key\":\"key8966294649b\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"bBb90XMTYgNj5mR4HgPsFwlRL4r\",\"key\":\"key8966294649b\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:17+00:00\"},{\"etag\":\"IUBjoYJgfk48Nuv5u16JhhpQ95K\",\"key\":\"key8966294649b\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:17+00:00\"}]}", + "x-ms-client-request-id" : "0a599275-abdb-4b61-b4de-f8a5f83853b1", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key84791133054", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key8966294649b", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ff1701b1-dbcc-423a-b868-7e42558c2117", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e5398d5f-c805-4d94-ba87-2a6a4a40cc42", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", "Server" : "openresty/1.15.8.1", - "Memento-Datetime" : "Tue, 08 Oct 2019 18:00:03 GMT", + "Memento-Datetime" : "Sat, 19 Oct 2019 00:46:17 GMT", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:18 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7ceea3f7-15e6-4e57-a88f-88854f6b91e3", + "x-ms-correlation-request-id" : "a5b6853d-5e87-4fd8-a0ae-63fb06964464", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzY=;sn=402076", - "x-ms-request-id" : "7ceea3f7-15e6-4e57-a88f-88854f6b91e3", - "Body" : "{\"items\":[{\"etag\":\"a2NSmiOzUQhw4fCad50F5CzkllD\",\"key\":\"key84791133054\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:03+00:00\"},{\"etag\":\"cOygB9OmiVX9003YxyI8TkKIUPu\",\"key\":\"key84791133054\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:03+00:00\"}]}", - "Link" : "; rel=\"original\"", - "x-ms-client-request-id" : "ff1701b1-dbcc-423a-b868-7e42558c2117", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NzU=;sn=448875", + "x-ms-request-id" : "a5b6853d-5e87-4fd8-a0ae-63fb06964464", + "Body" : "{\"items\":[{\"etag\":\"bBb90XMTYgNj5mR4HgPsFwlRL4r\",\"key\":\"key8966294649b\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:17+00:00\"},{\"etag\":\"IUBjoYJgfk48Nuv5u16JhhpQ95K\",\"key\":\"key8966294649b\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:17+00:00\"}]}", + "Link" : "; rel=\"original\"", + "x-ms-client-request-id" : "e5398d5f-c805-4d94-ba87-2a6a4a40cc42", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key84791%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key89662%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c1e01b3d-6947-4079-97e5-ad14ec15e156", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4d520a47-9ea6-49b2-9275-3f4ba1575d84", "Content-Type" : "application/json" }, "Response" : { @@ -170,25 +170,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:18 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "10022bc9-501b-4a30-8a82-6c58c75499e8", + "x-ms-correlation-request-id" : "86635e6c-4613-4814-8bba-7f6e30a85344", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzY=;sn=402076", - "x-ms-request-id" : "10022bc9-501b-4a30-8a82-6c58c75499e8", - "Body" : "{\"items\":[{\"etag\":\"A4QnTiefCXaVkLn2Z17ic985kXZ\",\"key\":\"key84791133054\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:05+00:00\"}]}", - "x-ms-client-request-id" : "c1e01b3d-6947-4079-97e5-ad14ec15e156", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NzU=;sn=448875", + "x-ms-request-id" : "86635e6c-4613-4814-8bba-7f6e30a85344", + "Body" : "{\"items\":[{\"etag\":\"iGpQWxNABD60AzKPWXVvxj5l5Mo\",\"key\":\"key8966294649b\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}]}", + "x-ms-client-request-id" : "4d520a47-9ea6-49b2-9275-3f4ba1575d84", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key84791133054", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8966294649b", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a4070b59-e8a2-4e1b-ae41-529bcc5f19e3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "73ef61b0-caeb-4bd1-b9ce-269444149d0e", "Content-Type" : "application/json" }, "Response" : { @@ -197,23 +197,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:18 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3b9b58aa-0c13-424a-b396-dad9b4ea7d35", + "x-ms-correlation-request-id" : "4256f04f-6049-4ca4-ad2e-23c67c250d88", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"A4QnTiefCXaVkLn2Z17ic985kXZ\"", + "ETag" : "\"iGpQWxNABD60AzKPWXVvxj5l5Mo\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzc=;sn=402077", - "x-ms-request-id" : "3b9b58aa-0c13-424a-b396-dad9b4ea7d35", - "Body" : "{\"etag\":\"A4QnTiefCXaVkLn2Z17ic985kXZ\",\"key\":\"key84791133054\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:05+00:00\"}", - "x-ms-client-request-id" : "a4070b59-e8a2-4e1b-ae41-529bcc5f19e3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NzY=;sn=448876", + "x-ms-request-id" : "4256f04f-6049-4ca4-ad2e-23c67c250d88", + "Body" : "{\"etag\":\"iGpQWxNABD60AzKPWXVvxj5l5Mo\",\"key\":\"key8966294649b\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "73ef61b0-caeb-4bd1-b9ce-269444149d0e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key84791", "f2e00f1d", "key84791133054" ] + "variables" : [ "key89662", "8b85ff37", "key8966294649b" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleKeys.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleKeys.json index 15ba567be142..88df253c77f5 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleKeys.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleKeys.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key48292403733", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43441828361", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0e75baa3-2400-4690-9426-aa3204ea8528", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b193c6c2-4f0e-4bac-83a2-4c33e0ac6231", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f63d69d0-6ae4-47b9-bebf-6b01c9a61e77", + "x-ms-correlation-request-id" : "38d9f113-a7eb-4050-9fec-42d93e58e0b3", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"wpj7ZXjqTcubP4HbZ10LwT1Vp9x\"", + "ETag" : "\"Tf18KswhnxqX5nfR8v8dAMCh7BD\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxODI=;sn=402182", - "x-ms-request-id" : "f63d69d0-6ae4-47b9-bebf-6b01c9a61e77", - "Body" : "{\"etag\":\"wpj7ZXjqTcubP4HbZ10LwT1Vp9x\",\"key\":\"key48292403733\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "0e75baa3-2400-4690-9426-aa3204ea8528", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5ODE=;sn=448981", + "x-ms-request-id" : "38d9f113-a7eb-4050-9fec-42d93e58e0b3", + "Body" : "{\"etag\":\"Tf18KswhnxqX5nfR8v8dAMCh7BD\",\"key\":\"key43441828361\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "b193c6c2-4f0e-4bac-83a2-4c33e0ac6231", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key48292403733", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43441828361", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "74a2035f-406c-48cc-affd-0ddd5c34aee0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e7d9cfd9-66e2-4953-888c-8e113fc0e694", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "05dfc5c8-c8c1-4c45-a7e2-a98fbeffcfa9", + "x-ms-correlation-request-id" : "b4ec11ba-1b9e-41bf-80ef-a2c54a6645cf", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"WA64za3qyJqWAKQklrfnAbfAjNB\"", + "ETag" : "\"jxNqDx09tHcOTYkInTDwP2ALhhs\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxODM=;sn=402183", - "x-ms-request-id" : "05dfc5c8-c8c1-4c45-a7e2-a98fbeffcfa9", - "Body" : "{\"etag\":\"WA64za3qyJqWAKQklrfnAbfAjNB\",\"key\":\"key48292403733\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "74a2035f-406c-48cc-affd-0ddd5c34aee0", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5ODI=;sn=448982", + "x-ms-request-id" : "b4ec11ba-1b9e-41bf-80ef-a2c54a6645cf", + "Body" : "{\"etag\":\"jxNqDx09tHcOTYkInTDwP2ALhhs\",\"key\":\"key43441828361\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "e7d9cfd9-66e2-4953-888c-8e113fc0e694", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key48292813744", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43441560148", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e826927b-cdac-42f0-b5a9-63a8b5661524", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6a11c2f3-a3a2-4929-93b2-8a1ab7921564", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "fe253404-805e-458a-a4a5-e515659eb924", + "x-ms-correlation-request-id" : "a12e1e87-73d2-456a-a3a5-9179778dca93", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"XqqXnOgD7YmBgHWHbWvt9VrCD85\"", + "ETag" : "\"5q5SeVWKXDedezG8IBGs6nhhvJ1\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxODQ=;sn=402184", - "x-ms-request-id" : "fe253404-805e-458a-a4a5-e515659eb924", - "Body" : "{\"etag\":\"XqqXnOgD7YmBgHWHbWvt9VrCD85\",\"key\":\"key48292813744\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "e826927b-cdac-42f0-b5a9-63a8b5661524", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5ODM=;sn=448983", + "x-ms-request-id" : "a12e1e87-73d2-456a-a3a5-9179778dca93", + "Body" : "{\"etag\":\"5q5SeVWKXDedezG8IBGs6nhhvJ1\",\"key\":\"key43441560148\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "6a11c2f3-a3a2-4929-93b2-8a1ab7921564", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key48292813744", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43441560148", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1f0719ad-c9e9-4587-90ef-d9dc81ed8578", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fa399dc0-495e-408c-901f-1d8dbf2af610", "Content-Type" : "application/json" }, "Response" : { @@ -106,29 +106,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "20b70cc0-8f26-408b-bb8a-0c9927cb0bda", + "x-ms-correlation-request-id" : "2d8a79d3-ba53-4933-a2cf-31889579ee4a", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"qKaUvb3qgi3wZUR8BZCCPnEKttY\"", + "ETag" : "\"QTKydUmfcnnxRp2KTVVMqSgcPDL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxODU=;sn=402185", - "x-ms-request-id" : "20b70cc0-8f26-408b-bb8a-0c9927cb0bda", - "Body" : "{\"etag\":\"qKaUvb3qgi3wZUR8BZCCPnEKttY\",\"key\":\"key48292813744\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "1f0719ad-c9e9-4587-90ef-d9dc81ed8578", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5ODQ=;sn=448984", + "x-ms-request-id" : "2d8a79d3-ba53-4933-a2cf-31889579ee4a", + "Body" : "{\"etag\":\"QTKydUmfcnnxRp2KTVVMqSgcPDL\",\"key\":\"key43441560148\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "fa399dc0-495e-408c-901f-1d8dbf2af610", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key48292403733%2ckey48292813744", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key43441828361%2ckey43441560148", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4b711aed-d578-4153-b4c4-204c9429dea8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "64584ed2-54da-4853-91c5-8af8a5f7d512", "Content-Type" : "application/json" }, "Response" : { @@ -139,26 +139,26 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b0e59c91-2542-459c-a3d4-0daa17c98762", + "x-ms-correlation-request-id" : "80abc974-dda5-41aa-a4c3-9a337baf8369", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxODU=;sn=402185", - "x-ms-request-id" : "b0e59c91-2542-459c-a3d4-0daa17c98762", - "Body" : "{\"items\":[{\"etag\":\"qKaUvb3qgi3wZUR8BZCCPnEKttY\",\"key\":\"key48292813744\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"},{\"etag\":\"XqqXnOgD7YmBgHWHbWvt9VrCD85\",\"key\":\"key48292813744\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"WA64za3qyJqWAKQklrfnAbfAjNB\",\"key\":\"key48292403733\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"wpj7ZXjqTcubP4HbZ10LwT1Vp9x\",\"key\":\"key48292403733\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}]}", - "x-ms-client-request-id" : "4b711aed-d578-4153-b4c4-204c9429dea8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5ODQ=;sn=448984", + "x-ms-request-id" : "80abc974-dda5-41aa-a4c3-9a337baf8369", + "Body" : "{\"items\":[{\"etag\":\"QTKydUmfcnnxRp2KTVVMqSgcPDL\",\"key\":\"key43441560148\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"},{\"etag\":\"5q5SeVWKXDedezG8IBGs6nhhvJ1\",\"key\":\"key43441560148\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"},{\"etag\":\"jxNqDx09tHcOTYkInTDwP2ALhhs\",\"key\":\"key43441828361\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"},{\"etag\":\"Tf18KswhnxqX5nfR8v8dAMCh7BD\",\"key\":\"key43441828361\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}]}", + "x-ms-client-request-id" : "64584ed2-54da-4853-91c5-8af8a5f7d512", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key48292%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key43441%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5b578c06-c492-478d-b712-ac4e7c665b77", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "228c8f96-86b7-44d0-a3be-94283e8132cc", "Content-Type" : "application/json" }, "Response" : { @@ -169,25 +169,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3ce2c243-e63b-4390-9584-2eadbe47737f", + "x-ms-correlation-request-id" : "d65e432f-9cc8-4c44-b332-f9f35af9dd21", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxODU=;sn=402185", - "x-ms-request-id" : "3ce2c243-e63b-4390-9584-2eadbe47737f", - "Body" : "{\"items\":[{\"etag\":\"WA64za3qyJqWAKQklrfnAbfAjNB\",\"key\":\"key48292403733\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"qKaUvb3qgi3wZUR8BZCCPnEKttY\",\"key\":\"key48292813744\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}]}", - "x-ms-client-request-id" : "5b578c06-c492-478d-b712-ac4e7c665b77", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5ODQ=;sn=448984", + "x-ms-request-id" : "d65e432f-9cc8-4c44-b332-f9f35af9dd21", + "Body" : "{\"items\":[{\"etag\":\"QTKydUmfcnnxRp2KTVVMqSgcPDL\",\"key\":\"key43441560148\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"},{\"etag\":\"jxNqDx09tHcOTYkInTDwP2ALhhs\",\"key\":\"key43441828361\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}]}", + "x-ms-client-request-id" : "228c8f96-86b7-44d0-a3be-94283e8132cc", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key48292813744", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43441828361", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e9d8de71-a3b4-4c9a-860e-cb347b0c60e6", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "70aec2f9-393b-4a5e-a56e-ecf69c2529e1", "Content-Type" : "application/json" }, "Response" : { @@ -196,29 +196,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c57b5514-37ad-4b49-8908-d12fdf86b196", + "x-ms-correlation-request-id" : "a9eb8349-df58-44fc-a3f9-b0841c7874a2", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"qKaUvb3qgi3wZUR8BZCCPnEKttY\"", + "ETag" : "\"jxNqDx09tHcOTYkInTDwP2ALhhs\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxODY=;sn=402186", - "x-ms-request-id" : "c57b5514-37ad-4b49-8908-d12fdf86b196", - "Body" : "{\"etag\":\"qKaUvb3qgi3wZUR8BZCCPnEKttY\",\"key\":\"key48292813744\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "e9d8de71-a3b4-4c9a-860e-cb347b0c60e6", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5ODU=;sn=448985", + "x-ms-request-id" : "a9eb8349-df58-44fc-a3f9-b0841c7874a2", + "Body" : "{\"etag\":\"jxNqDx09tHcOTYkInTDwP2ALhhs\",\"key\":\"key43441828361\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "70aec2f9-393b-4a5e-a56e-ecf69c2529e1", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key48292403733", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43441560148", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8a28c7e0-890c-4bf2-be2c-426bda6f9f32", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fd5e0884-b725-4654-be77-4ceca6cfd09f", "Content-Type" : "application/json" }, "Response" : { @@ -227,23 +227,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "272f2f5c-2ff7-4b86-8508-7f7e109708bd", + "x-ms-correlation-request-id" : "93a34d77-ce3a-408a-8409-945632f8ecc7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"WA64za3qyJqWAKQklrfnAbfAjNB\"", + "ETag" : "\"QTKydUmfcnnxRp2KTVVMqSgcPDL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxODc=;sn=402187", - "x-ms-request-id" : "272f2f5c-2ff7-4b86-8508-7f7e109708bd", - "Body" : "{\"etag\":\"WA64za3qyJqWAKQklrfnAbfAjNB\",\"key\":\"key48292403733\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "8a28c7e0-890c-4bf2-be2c-426bda6f9f32", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5ODY=;sn=448986", + "x-ms-request-id" : "93a34d77-ce3a-408a-8409-945632f8ecc7", + "Body" : "{\"etag\":\"QTKydUmfcnnxRp2KTVVMqSgcPDL\",\"key\":\"key43441560148\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "fd5e0884-b725-4654-be77-4ceca6cfd09f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key48292", "9f93ea5f", "key48292403733", "key48292813744" ] + "variables" : [ "key43441", "5deb3c5d", "key43441828361", "key43441560148" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleLabels.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleLabels.json index 363372f457be..3cb1ed2b752a 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleLabels.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleLabels.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8122460424e?label=9e06cf8312717a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key7715764561c?label=62928f32775592", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e029d415-5437-43b4-a5a9-e5af734de8e6", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "271c8a87-0501-4c43-88cb-4c7a27ca929f", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:53 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:39 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:52 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d1d24af6-1581-40e3-a646-acef4141b7de", + "x-ms-correlation-request-id" : "9de3deac-77da-42c9-b3bc-b381ba7f5eea", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"OFm0wGcdivpmUZFjVshFqj34luo\"", + "ETag" : "\"90rRpxrniAnEUPac7azIsJWbh8q\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NTM=;sn=401853", - "x-ms-request-id" : "d1d24af6-1581-40e3-a646-acef4141b7de", - "Body" : "{\"etag\":\"OFm0wGcdivpmUZFjVshFqj34luo\",\"key\":\"key8122460424e\",\"label\":\"9e06cf8312717a\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"}", - "x-ms-client-request-id" : "e029d415-5437-43b4-a5a9-e5af734de8e6", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NDY=;sn=448646", + "x-ms-request-id" : "9de3deac-77da-42c9-b3bc-b381ba7f5eea", + "Body" : "{\"etag\":\"90rRpxrniAnEUPac7azIsJWbh8q\",\"key\":\"key7715764561c\",\"label\":\"62928f32775592\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"}", + "x-ms-client-request-id" : "271c8a87-0501-4c43-88cb-4c7a27ca929f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8122460424e?label=9e06cf8312717a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key7715764561c?label=62928f32775592", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c101cc35-257b-43ce-9c47-7e50020f093c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d761535a-ba58-4e05-881f-c1bc34b6b972", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:53 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:39 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:52 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c8e9b59c-1ff3-4cad-9d63-9a1950664623", + "x-ms-correlation-request-id" : "5e5183bd-4948-4e37-99e9-05361fddb7bd", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"MJ67l53EEb4MYSGBBEBqHRK1NVB\"", + "ETag" : "\"uxKJ7TyCxcMn47x7l8jqr7nOuAp\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NTQ=;sn=401854", - "x-ms-request-id" : "c8e9b59c-1ff3-4cad-9d63-9a1950664623", - "Body" : "{\"etag\":\"MJ67l53EEb4MYSGBBEBqHRK1NVB\",\"key\":\"key8122460424e\",\"label\":\"9e06cf8312717a\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"}", - "x-ms-client-request-id" : "c101cc35-257b-43ce-9c47-7e50020f093c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NDc=;sn=448647", + "x-ms-request-id" : "5e5183bd-4948-4e37-99e9-05361fddb7bd", + "Body" : "{\"etag\":\"uxKJ7TyCxcMn47x7l8jqr7nOuAp\",\"key\":\"key7715764561c\",\"label\":\"62928f32775592\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"}", + "x-ms-client-request-id" : "d761535a-ba58-4e05-881f-c1bc34b6b972", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8122460424e?label=9e06cf83933869", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key7715764561c?label=62928f32361583", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1783350c-10a3-4046-90ee-eaece2fff112", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7e815d6c-f8bc-4aea-a534-60c8425ac3b5", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:53 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:39 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:52 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3250cfea-a372-4fd7-a8b1-f5d2f6cbc648", + "x-ms-correlation-request-id" : "c9ace458-8033-42b1-b1a3-08aff9b2a25d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"pzGYxSPr8tni9Zy6LJAGR3XN7wi\"", + "ETag" : "\"mC9dpubXna31qHf9GC0qLeRazFD\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NTU=;sn=401855", - "x-ms-request-id" : "3250cfea-a372-4fd7-a8b1-f5d2f6cbc648", - "Body" : "{\"etag\":\"pzGYxSPr8tni9Zy6LJAGR3XN7wi\",\"key\":\"key8122460424e\",\"label\":\"9e06cf83933869\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"}", - "x-ms-client-request-id" : "1783350c-10a3-4046-90ee-eaece2fff112", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NDg=;sn=448648", + "x-ms-request-id" : "c9ace458-8033-42b1-b1a3-08aff9b2a25d", + "Body" : "{\"etag\":\"mC9dpubXna31qHf9GC0qLeRazFD\",\"key\":\"key7715764561c\",\"label\":\"62928f32361583\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"}", + "x-ms-client-request-id" : "7e815d6c-f8bc-4aea-a534-60c8425ac3b5", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8122460424e?label=9e06cf83933869", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key7715764561c?label=62928f32361583", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8cc57d51-e977-4191-bc67-c480e1ac38bc", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0ade755b-9ba8-4710-b7ae-83e6fe9bb2d9", "Content-Type" : "application/json" }, "Response" : { @@ -106,29 +106,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:53 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:39 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:52 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1df4abd1-c624-4c56-a47f-e3c7debbb0f3", + "x-ms-correlation-request-id" : "efefd389-9b8d-4c07-985a-a15a6cfa050b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"vFpkydlXmFdSRUbzs7FcBMH5ecd\"", + "ETag" : "\"Fg1yM9uh8XBr8KwYzMtixyQo1id\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NTY=;sn=401856", - "x-ms-request-id" : "1df4abd1-c624-4c56-a47f-e3c7debbb0f3", - "Body" : "{\"etag\":\"vFpkydlXmFdSRUbzs7FcBMH5ecd\",\"key\":\"key8122460424e\",\"label\":\"9e06cf83933869\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"}", - "x-ms-client-request-id" : "8cc57d51-e977-4191-bc67-c480e1ac38bc", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NDk=;sn=448649", + "x-ms-request-id" : "efefd389-9b8d-4c07-985a-a15a6cfa050b", + "Body" : "{\"etag\":\"Fg1yM9uh8XBr8KwYzMtixyQo1id\",\"key\":\"key7715764561c\",\"label\":\"62928f32361583\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"}", + "x-ms-client-request-id" : "0ade755b-9ba8-4710-b7ae-83e6fe9bb2d9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key8122460424e&label=9e06cf8312717a%2c9e06cf83933869", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key7715764561c&label=62928f32775592%2c62928f32361583", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7b8d29e2-3b45-4e4e-af7b-70b6d2cbc515", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6a4e5665-f112-4d3c-86e1-cd1516b8ff80", "Content-Type" : "application/json" }, "Response" : { @@ -139,26 +139,26 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:39 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:52 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "89d3cb38-9ee9-4584-a756-a2549e4e8538", + "x-ms-correlation-request-id" : "c735ee41-1939-42ca-8375-1722e434eeb1", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NTY=;sn=401856", - "x-ms-request-id" : "89d3cb38-9ee9-4584-a756-a2549e4e8538", - "Body" : "{\"items\":[{\"etag\":\"vFpkydlXmFdSRUbzs7FcBMH5ecd\",\"key\":\"key8122460424e\",\"label\":\"9e06cf83933869\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"},{\"etag\":\"pzGYxSPr8tni9Zy6LJAGR3XN7wi\",\"key\":\"key8122460424e\",\"label\":\"9e06cf83933869\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"},{\"etag\":\"MJ67l53EEb4MYSGBBEBqHRK1NVB\",\"key\":\"key8122460424e\",\"label\":\"9e06cf8312717a\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"},{\"etag\":\"OFm0wGcdivpmUZFjVshFqj34luo\",\"key\":\"key8122460424e\",\"label\":\"9e06cf8312717a\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"}]}", - "x-ms-client-request-id" : "7b8d29e2-3b45-4e4e-af7b-70b6d2cbc515", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NDk=;sn=448649", + "x-ms-request-id" : "c735ee41-1939-42ca-8375-1722e434eeb1", + "Body" : "{\"items\":[{\"etag\":\"Fg1yM9uh8XBr8KwYzMtixyQo1id\",\"key\":\"key7715764561c\",\"label\":\"62928f32361583\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"},{\"etag\":\"mC9dpubXna31qHf9GC0qLeRazFD\",\"key\":\"key7715764561c\",\"label\":\"62928f32361583\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"},{\"etag\":\"uxKJ7TyCxcMn47x7l8jqr7nOuAp\",\"key\":\"key7715764561c\",\"label\":\"62928f32775592\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"},{\"etag\":\"90rRpxrniAnEUPac7azIsJWbh8q\",\"key\":\"key7715764561c\",\"label\":\"62928f32775592\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"}]}", + "x-ms-client-request-id" : "6a4e5665-f112-4d3c-86e1-cd1516b8ff80", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key81224%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key77157%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "22d10128-93d6-4197-ad48-de507c767790", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c2f7f061-a0cc-4528-afa1-51ea2e3a0937", "Content-Type" : "application/json" }, "Response" : { @@ -169,25 +169,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:39 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "25a22dd5-e1c1-4b3c-b879-5b73b712f06d", + "x-ms-correlation-request-id" : "84eaec77-2cbb-4d7d-b45b-c855c0d494f8", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NTY=;sn=401856", - "x-ms-request-id" : "25a22dd5-e1c1-4b3c-b879-5b73b712f06d", - "Body" : "{\"items\":[{\"etag\":\"MJ67l53EEb4MYSGBBEBqHRK1NVB\",\"key\":\"key8122460424e\",\"label\":\"9e06cf8312717a\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"},{\"etag\":\"vFpkydlXmFdSRUbzs7FcBMH5ecd\",\"key\":\"key8122460424e\",\"label\":\"9e06cf83933869\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"}]}", - "x-ms-client-request-id" : "22d10128-93d6-4197-ad48-de507c767790", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NDk=;sn=448649", + "x-ms-request-id" : "84eaec77-2cbb-4d7d-b45b-c855c0d494f8", + "Body" : "{\"items\":[{\"etag\":\"Fg1yM9uh8XBr8KwYzMtixyQo1id\",\"key\":\"key7715764561c\",\"label\":\"62928f32361583\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"},{\"etag\":\"uxKJ7TyCxcMn47x7l8jqr7nOuAp\",\"key\":\"key7715764561c\",\"label\":\"62928f32775592\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"}]}", + "x-ms-client-request-id" : "c2f7f061-a0cc-4528-afa1-51ea2e3a0937", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8122460424e?label=9e06cf83933869", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key7715764561c?label=62928f32361583", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "253481ca-e210-4ea6-bf3d-02b8d88fdbbe", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3b66b366-838f-4ccf-8652-03f42372f771", "Content-Type" : "application/json" }, "Response" : { @@ -196,29 +196,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:53 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3e42be82-6058-440e-827e-98ff713313b6", + "x-ms-correlation-request-id" : "5f3e08a4-4fff-4d37-9497-47d41a4996d1", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"vFpkydlXmFdSRUbzs7FcBMH5ecd\"", + "ETag" : "\"Fg1yM9uh8XBr8KwYzMtixyQo1id\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NTc=;sn=401857", - "x-ms-request-id" : "3e42be82-6058-440e-827e-98ff713313b6", - "Body" : "{\"etag\":\"vFpkydlXmFdSRUbzs7FcBMH5ecd\",\"key\":\"key8122460424e\",\"label\":\"9e06cf83933869\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"}", - "x-ms-client-request-id" : "253481ca-e210-4ea6-bf3d-02b8d88fdbbe", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NTA=;sn=448650", + "x-ms-request-id" : "5f3e08a4-4fff-4d37-9497-47d41a4996d1", + "Body" : "{\"etag\":\"Fg1yM9uh8XBr8KwYzMtixyQo1id\",\"key\":\"key7715764561c\",\"label\":\"62928f32361583\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"}", + "x-ms-client-request-id" : "3b66b366-838f-4ccf-8652-03f42372f771", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8122460424e?label=9e06cf8312717a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key7715764561c?label=62928f32775592", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "39a67491-9d4f-4455-9101-7e89f964ebb3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9fc79ad7-366c-4942-bc51-e03e02fd999c", "Content-Type" : "application/json" }, "Response" : { @@ -227,23 +227,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:53 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:53 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "562840b8-ad12-4bb2-b9e9-7c61865b91a6", + "x-ms-correlation-request-id" : "548ca136-3250-4c28-b4ce-92cf5bec8974", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"MJ67l53EEb4MYSGBBEBqHRK1NVB\"", + "ETag" : "\"uxKJ7TyCxcMn47x7l8jqr7nOuAp\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NTg=;sn=401858", - "x-ms-request-id" : "562840b8-ad12-4bb2-b9e9-7c61865b91a6", - "Body" : "{\"etag\":\"MJ67l53EEb4MYSGBBEBqHRK1NVB\",\"key\":\"key8122460424e\",\"label\":\"9e06cf8312717a\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:40+00:00\"}", - "x-ms-client-request-id" : "39a67491-9d4f-4455-9101-7e89f964ebb3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NTE=;sn=448651", + "x-ms-request-id" : "548ca136-3250-4c28-b4ce-92cf5bec8974", + "Body" : "{\"etag\":\"uxKJ7TyCxcMn47x7l8jqr7nOuAp\",\"key\":\"key7715764561c\",\"label\":\"62928f32775592\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:53+00:00\"}", + "x-ms-client-request-id" : "9fc79ad7-366c-4942-bc51-e03e02fd999c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key81224", "9e06cf83", "key8122460424e", "9e06cf8312717a", "9e06cf83933869" ] + "variables" : [ "key77157", "62928f32", "key7715764561c", "62928f32775592", "62928f32361583" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPagination.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPagination.json index 5d65dee91f2f..5ebbc5fe4887 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPagination.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPagination.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "96c63dc5-5ce2-4d69-ace3-ac7eb602f73d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "af237a30-3de9-4b93-b2ac-ed7be895fcea", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:43 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "480e24a6-a9e5-45fe-b961-6d78a83c3302", + "x-ms-correlation-request-id" : "129bc761-4814-4cd5-b909-2d3eff67c09f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"EpdP8vuAEwrmvoXu2Dk2FzWWku2\"", + "ETag" : "\"J0Ay2IRkPi9fxTMpJ5ulUyN9C6P\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4Nzk=;sn=401879", - "x-ms-request-id" : "480e24a6-a9e5-45fe-b961-6d78a83c3302", - "Body" : "{\"etag\":\"EpdP8vuAEwrmvoXu2Dk2FzWWku2\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "96c63dc5-5ce2-4d69-ace3-ac7eb602f73d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NzI=;sn=448672", + "x-ms-request-id" : "129bc761-4814-4cd5-b909-2d3eff67c09f", + "Body" : "{\"etag\":\"J0Ay2IRkPi9fxTMpJ5ulUyN9C6P\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "af237a30-3de9-4b93-b2ac-ed7be895fcea", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3da252d8-43be-4ca5-ab6f-335c82cf15d5", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "96fa0961-83c0-481a-a85a-fc1e824e74a3", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:43 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2ce0da16-1450-49bf-953b-0f0f8a837107", + "x-ms-correlation-request-id" : "400e94b7-06f3-4421-aac2-094976bcdd91", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"khd9ryKO7ZSItzefZmJAa5ykF5B\"", + "ETag" : "\"hYHpoWiu9ie0qFqTPv5zqqgfq7F\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4ODA=;sn=401880", - "x-ms-request-id" : "2ce0da16-1450-49bf-953b-0f0f8a837107", - "Body" : "{\"etag\":\"khd9ryKO7ZSItzefZmJAa5ykF5B\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "3da252d8-43be-4ca5-ab6f-335c82cf15d5", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NzM=;sn=448673", + "x-ms-request-id" : "400e94b7-06f3-4421-aac2-094976bcdd91", + "Body" : "{\"etag\":\"hYHpoWiu9ie0qFqTPv5zqqgfq7F\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "96fa0961-83c0-481a-a85a-fc1e824e74a3", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1b2fedbc-0fb2-4b1d-84e5-21f03f6fb288", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "86183ec0-b651-4e1a-b342-fffb3e5c202f", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "26389c6c-6564-4aad-8707-e2ff3a04e6c4", + "x-ms-correlation-request-id" : "2820b03e-2cbb-465a-8668-ebe927901d0f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"XnBl4bTSKOMUWWgszKmhshDaHXX\"", + "ETag" : "\"XU4M0lZYO6uGgNzB0MqaCu9USUC\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4ODE=;sn=401881", - "x-ms-request-id" : "26389c6c-6564-4aad-8707-e2ff3a04e6c4", - "Body" : "{\"etag\":\"XnBl4bTSKOMUWWgszKmhshDaHXX\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "1b2fedbc-0fb2-4b1d-84e5-21f03f6fb288", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NzQ=;sn=448674", + "x-ms-request-id" : "2820b03e-2cbb-465a-8668-ebe927901d0f", + "Body" : "{\"etag\":\"XU4M0lZYO6uGgNzB0MqaCu9USUC\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "86183ec0-b651-4e1a-b342-fffb3e5c202f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d6fd2b60-13d3-47ff-a25d-6c1739261d78", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2dc50b39-5491-498e-8132-c486293c9b5d", "Content-Type" : "application/json" }, "Response" : { @@ -106,29 +106,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "0487b31c-1c57-4106-a3d9-dc68cd96178e", + "x-ms-correlation-request-id" : "52b65040-fe49-476d-85f1-7e3f27a1672a", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"MNhtUmNxUzxPN2Yw8eZdElPFJEX\"", + "ETag" : "\"9D330iltxDDdLkmVdWVqEFkG8OR\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4ODI=;sn=401882", - "x-ms-request-id" : "0487b31c-1c57-4106-a3d9-dc68cd96178e", - "Body" : "{\"etag\":\"MNhtUmNxUzxPN2Yw8eZdElPFJEX\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "d6fd2b60-13d3-47ff-a25d-6c1739261d78", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NzU=;sn=448675", + "x-ms-request-id" : "52b65040-fe49-476d-85f1-7e3f27a1672a", + "Body" : "{\"etag\":\"9D330iltxDDdLkmVdWVqEFkG8OR\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "2dc50b39-5491-498e-8132-c486293c9b5d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ce1415f9-2261-4fd0-8d73-24008ad31cc0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "72cdab7c-d76c-470a-aeb6-9e577c508a9e", "Content-Type" : "application/json" }, "Response" : { @@ -137,29 +137,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "67a3e05d-1ab6-4070-a85e-0802e96f2cd2", + "x-ms-correlation-request-id" : "a1fe2fed-627a-4c6a-afe4-539f6d038c1d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Ohy0hjlAoOWkIYhOHhUEm1wuCLn\"", + "ETag" : "\"0XH3xmsFwtrITmBK1wiMNy9KL1B\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4ODM=;sn=401883", - "x-ms-request-id" : "67a3e05d-1ab6-4070-a85e-0802e96f2cd2", - "Body" : "{\"etag\":\"Ohy0hjlAoOWkIYhOHhUEm1wuCLn\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "ce1415f9-2261-4fd0-8d73-24008ad31cc0", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NzY=;sn=448676", + "x-ms-request-id" : "a1fe2fed-627a-4c6a-afe4-539f6d038c1d", + "Body" : "{\"etag\":\"0XH3xmsFwtrITmBK1wiMNy9KL1B\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "72cdab7c-d76c-470a-aeb6-9e577c508a9e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0be3f5e2-7422-482f-8246-b081907122af", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d152ff6d-7d68-4891-8dea-2cafbaf35e6f", "Content-Type" : "application/json" }, "Response" : { @@ -168,29 +168,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "30593d2e-fdf3-415d-9e32-0dadbd508729", + "x-ms-correlation-request-id" : "80a3a67c-c4c0-4437-be12-5c2639e3b659", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"9mVudh9TKHDcrChGETfexNny0Gp\"", + "ETag" : "\"4JSuQiKzUY5tMkGzIUQfStfFR2K\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4ODQ=;sn=401884", - "x-ms-request-id" : "30593d2e-fdf3-415d-9e32-0dadbd508729", - "Body" : "{\"etag\":\"9mVudh9TKHDcrChGETfexNny0Gp\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "0be3f5e2-7422-482f-8246-b081907122af", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2Nzc=;sn=448677", + "x-ms-request-id" : "80a3a67c-c4c0-4437-be12-5c2639e3b659", + "Body" : "{\"etag\":\"4JSuQiKzUY5tMkGzIUQfStfFR2K\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "d152ff6d-7d68-4891-8dea-2cafbaf35e6f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "bbb1d58a-500b-45d9-a2b2-4372ce69343e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8dedb193-8099-42f7-9052-263117b9003d", "Content-Type" : "application/json" }, "Response" : { @@ -199,29 +199,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "efa16638-fbcb-4561-b5f2-8527f8f0312c", + "x-ms-correlation-request-id" : "72252238-a40c-4aee-952b-a1c99f11e697", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"YLDRKkTCdFqa0SeJnQwWIngNubq\"", + "ETag" : "\"pOni7z3SDTtiMMkl82v6dMv9u9I\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4ODU=;sn=401885", - "x-ms-request-id" : "efa16638-fbcb-4561-b5f2-8527f8f0312c", - "Body" : "{\"etag\":\"YLDRKkTCdFqa0SeJnQwWIngNubq\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "bbb1d58a-500b-45d9-a2b2-4372ce69343e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2Nzg=;sn=448678", + "x-ms-request-id" : "72252238-a40c-4aee-952b-a1c99f11e697", + "Body" : "{\"etag\":\"pOni7z3SDTtiMMkl82v6dMv9u9I\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "8dedb193-8099-42f7-9052-263117b9003d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d2af0e4b-3f80-439e-a014-560294dfcea4", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6b5161eb-3a47-4c23-a5de-be3585a0824f", "Content-Type" : "application/json" }, "Response" : { @@ -230,29 +230,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "32d0c3aa-1d1b-4f3b-917e-9f101d8ac061", + "x-ms-correlation-request-id" : "a7c7e8c8-de35-4582-895b-0918f7277e9b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"MTj5S0rjUjWpX2WItGf87rSD0Yb\"", + "ETag" : "\"Jjc0astmVnbLDfad0ikFYKiJgHn\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4ODY=;sn=401886", - "x-ms-request-id" : "32d0c3aa-1d1b-4f3b-917e-9f101d8ac061", - "Body" : "{\"etag\":\"MTj5S0rjUjWpX2WItGf87rSD0Yb\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "d2af0e4b-3f80-439e-a014-560294dfcea4", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2Nzk=;sn=448679", + "x-ms-request-id" : "a7c7e8c8-de35-4582-895b-0918f7277e9b", + "Body" : "{\"etag\":\"Jjc0astmVnbLDfad0ikFYKiJgHn\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "6b5161eb-3a47-4c23-a5de-be3585a0824f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "85107aed-ecc4-4c6f-a14c-1a8dbe23c3f5", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "106cf71a-989f-4f08-9900-1aa8afd87f90", "Content-Type" : "application/json" }, "Response" : { @@ -261,29 +261,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "986f2425-4a21-409c-8cc3-2cd96e86f716", + "x-ms-correlation-request-id" : "ffc76c5d-cd06-48c4-ab23-81b22c65307b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Bvl3CPnaNcesQVKCmrde2fNXQ3D\"", + "ETag" : "\"dc5I6e4tc56Afo8iALM560nqnHN\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4ODc=;sn=401887", - "x-ms-request-id" : "986f2425-4a21-409c-8cc3-2cd96e86f716", - "Body" : "{\"etag\":\"Bvl3CPnaNcesQVKCmrde2fNXQ3D\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "85107aed-ecc4-4c6f-a14c-1a8dbe23c3f5", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2ODA=;sn=448680", + "x-ms-request-id" : "ffc76c5d-cd06-48c4-ab23-81b22c65307b", + "Body" : "{\"etag\":\"dc5I6e4tc56Afo8iALM560nqnHN\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "106cf71a-989f-4f08-9900-1aa8afd87f90", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6ccdd45f-9d46-42fa-8e68-00cad970874a", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dccf2a14-e513-4620-9e2d-8254388c88bc", "Content-Type" : "application/json" }, "Response" : { @@ -292,29 +292,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "de0a70f9-fe57-414e-8237-79e0d777201c", + "x-ms-correlation-request-id" : "0c88f664-b825-41fe-b46c-a205627de91f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"D58TVgUIa8T7IDj3i4IByWppe9A\"", + "ETag" : "\"0yTnOoYjlczrxMVkzULZ6wcXn2V\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4ODg=;sn=401888", - "x-ms-request-id" : "de0a70f9-fe57-414e-8237-79e0d777201c", - "Body" : "{\"etag\":\"D58TVgUIa8T7IDj3i4IByWppe9A\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "6ccdd45f-9d46-42fa-8e68-00cad970874a", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2ODE=;sn=448681", + "x-ms-request-id" : "0c88f664-b825-41fe-b46c-a205627de91f", + "Body" : "{\"etag\":\"0yTnOoYjlczrxMVkzULZ6wcXn2V\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "dccf2a14-e513-4620-9e2d-8254388c88bc", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "42254cb8-1a36-4549-9893-8ea60351e9ca", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "883c9623-2d41-4d07-ac5f-68feaa91e092", "Content-Type" : "application/json" }, "Response" : { @@ -323,29 +323,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9eaec81f-0bbe-48f8-a4d6-5ae8dbd53124", + "x-ms-correlation-request-id" : "434407e0-70fb-41f2-bb11-20eeb17e14a1", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"QebQdw0Zczu2Sq0oIQSwYuV5xSD\"", + "ETag" : "\"f15Sgb0v9GHkCTX4IfSli7kBGcl\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4ODk=;sn=401889", - "x-ms-request-id" : "9eaec81f-0bbe-48f8-a4d6-5ae8dbd53124", - "Body" : "{\"etag\":\"QebQdw0Zczu2Sq0oIQSwYuV5xSD\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "42254cb8-1a36-4549-9893-8ea60351e9ca", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2ODI=;sn=448682", + "x-ms-request-id" : "434407e0-70fb-41f2-bb11-20eeb17e14a1", + "Body" : "{\"etag\":\"f15Sgb0v9GHkCTX4IfSli7kBGcl\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "883c9623-2d41-4d07-ac5f-68feaa91e092", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "920bb70a-70dd-41a2-974b-3a9ba49b3eb4", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "289bb278-c223-474b-9b75-4a3b41d7f193", "Content-Type" : "application/json" }, "Response" : { @@ -354,29 +354,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f8ae1dcc-4742-427d-a01a-9f017b24f65f", + "x-ms-correlation-request-id" : "788165ac-a64f-40dd-b6c5-b9593dd4415d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"WcEguOHtsC87HP08rRc2vsDX3Ae\"", + "ETag" : "\"GxSlQvb6ksQSrAIe4kFyjlwwEFb\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4OTA=;sn=401890", - "x-ms-request-id" : "f8ae1dcc-4742-427d-a01a-9f017b24f65f", - "Body" : "{\"etag\":\"WcEguOHtsC87HP08rRc2vsDX3Ae\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "920bb70a-70dd-41a2-974b-3a9ba49b3eb4", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2ODM=;sn=448683", + "x-ms-request-id" : "788165ac-a64f-40dd-b6c5-b9593dd4415d", + "Body" : "{\"etag\":\"GxSlQvb6ksQSrAIe4kFyjlwwEFb\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "289bb278-c223-474b-9b75-4a3b41d7f193", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c00794c4-d625-4143-8d1c-bee2d7266513", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "69b58095-bc5b-4fcc-9b45-dee68eff7cb1", "Content-Type" : "application/json" }, "Response" : { @@ -385,29 +385,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1439bd8b-df8f-42b1-907a-d5b94caa1ad2", + "x-ms-correlation-request-id" : "d4bf3086-e1ce-464b-931a-8e497caf21db", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"YKneIjPYcdENMnYDD3lLUfuAwPr\"", + "ETag" : "\"iJPEXP4nq8deTRpu4T2DX1yTC1W\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4OTE=;sn=401891", - "x-ms-request-id" : "1439bd8b-df8f-42b1-907a-d5b94caa1ad2", - "Body" : "{\"etag\":\"YKneIjPYcdENMnYDD3lLUfuAwPr\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "c00794c4-d625-4143-8d1c-bee2d7266513", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2ODQ=;sn=448684", + "x-ms-request-id" : "d4bf3086-e1ce-464b-931a-8e497caf21db", + "Body" : "{\"etag\":\"iJPEXP4nq8deTRpu4T2DX1yTC1W\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "69b58095-bc5b-4fcc-9b45-dee68eff7cb1", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cd6a106a-3c44-40af-8ab4-f0858d8011f0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "10b312b6-7230-444f-b998-825f28e56687", "Content-Type" : "application/json" }, "Response" : { @@ -416,29 +416,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "313c5fbd-77e2-4ea1-a1ab-67ff1eadb22e", + "x-ms-correlation-request-id" : "66a6abec-7834-441b-88aa-1033ce58793b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"E4fSNjBC6XjAZymJJjarHvjrAtf\"", + "ETag" : "\"w2jTc9zhyt3MDzUdZwHyTBWHloa\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4OTI=;sn=401892", - "x-ms-request-id" : "313c5fbd-77e2-4ea1-a1ab-67ff1eadb22e", - "Body" : "{\"etag\":\"E4fSNjBC6XjAZymJJjarHvjrAtf\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "cd6a106a-3c44-40af-8ab4-f0858d8011f0", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2ODU=;sn=448685", + "x-ms-request-id" : "66a6abec-7834-441b-88aa-1033ce58793b", + "Body" : "{\"etag\":\"w2jTc9zhyt3MDzUdZwHyTBWHloa\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "10b312b6-7230-444f-b998-825f28e56687", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5bd629bc-9de1-43c5-ad5a-d7d189e40643", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d852f4df-8a78-4e14-9ea4-3fea86cc1545", "Content-Type" : "application/json" }, "Response" : { @@ -447,29 +447,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6261298c-d313-471a-bb58-7553f4c6ae83", + "x-ms-correlation-request-id" : "3eda7502-31f1-4f05-b5a1-e35e5bafdc61", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Jr7HpQOEqOaSoo9542fEdy39nN8\"", + "ETag" : "\"LMNgpjnGmcc85a9xCU8HYgn98YD\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4OTM=;sn=401893", - "x-ms-request-id" : "6261298c-d313-471a-bb58-7553f4c6ae83", - "Body" : "{\"etag\":\"Jr7HpQOEqOaSoo9542fEdy39nN8\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "5bd629bc-9de1-43c5-ad5a-d7d189e40643", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2ODY=;sn=448686", + "x-ms-request-id" : "3eda7502-31f1-4f05-b5a1-e35e5bafdc61", + "Body" : "{\"etag\":\"LMNgpjnGmcc85a9xCU8HYgn98YD\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "d852f4df-8a78-4e14-9ea4-3fea86cc1545", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "282532d2-576c-42da-ba9c-d422abf0b40e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "065286b8-b68e-404a-ad4b-8204971688cb", "Content-Type" : "application/json" }, "Response" : { @@ -478,29 +478,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "48c5df50-9cfe-4e7a-9766-0977bf56b284", + "x-ms-correlation-request-id" : "aba2301b-7957-4a5c-9c35-92c8b731308a", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"1tfEMGKiJC67OuqQO3BrtXSrHVW\"", + "ETag" : "\"FCKmq5IYpHXBmmDrCqzvg7ulIAX\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4OTQ=;sn=401894", - "x-ms-request-id" : "48c5df50-9cfe-4e7a-9766-0977bf56b284", - "Body" : "{\"etag\":\"1tfEMGKiJC67OuqQO3BrtXSrHVW\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "282532d2-576c-42da-ba9c-d422abf0b40e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2ODc=;sn=448687", + "x-ms-request-id" : "aba2301b-7957-4a5c-9c35-92c8b731308a", + "Body" : "{\"etag\":\"FCKmq5IYpHXBmmDrCqzvg7ulIAX\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "065286b8-b68e-404a-ad4b-8204971688cb", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5ec35278-2c4b-40c9-ad08-519608638188", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "edc806d0-bb66-4903-bb7a-475f257af609", "Content-Type" : "application/json" }, "Response" : { @@ -509,29 +509,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c7fe4735-d054-4a5a-9f47-95aacb100171", + "x-ms-correlation-request-id" : "449716cb-6348-4ddd-a7be-20bc99154e9b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"6yv3YQRQUpufzSUkDNphYe8OUUj\"", + "ETag" : "\"Lq8TyR9mS0oXvFGSBj5XLe6pqni\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4OTU=;sn=401895", - "x-ms-request-id" : "c7fe4735-d054-4a5a-9f47-95aacb100171", - "Body" : "{\"etag\":\"6yv3YQRQUpufzSUkDNphYe8OUUj\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "5ec35278-2c4b-40c9-ad08-519608638188", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2ODg=;sn=448688", + "x-ms-request-id" : "449716cb-6348-4ddd-a7be-20bc99154e9b", + "Body" : "{\"etag\":\"Lq8TyR9mS0oXvFGSBj5XLe6pqni\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "edc806d0-bb66-4903-bb7a-475f257af609", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e015673a-cd9d-4c3e-8837-3d56f5076ea2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6f31c1e7-fbde-4c6a-aacb-71210de5e229", "Content-Type" : "application/json" }, "Response" : { @@ -540,29 +540,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6f3a4133-a996-4763-868f-6b1d2cd79807", + "x-ms-correlation-request-id" : "69ea4122-deab-4eea-8a24-d8f1c5fabe71", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Rnm0neuM9vbKgmknlXkdxgw30in\"", + "ETag" : "\"xeI46ZMcsco20hEX1MOCwOVcKCL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4OTc=;sn=401897", - "x-ms-request-id" : "6f3a4133-a996-4763-868f-6b1d2cd79807", - "Body" : "{\"etag\":\"Rnm0neuM9vbKgmknlXkdxgw30in\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "e015673a-cd9d-4c3e-8837-3d56f5076ea2", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2ODk=;sn=448689", + "x-ms-request-id" : "69ea4122-deab-4eea-8a24-d8f1c5fabe71", + "Body" : "{\"etag\":\"xeI46ZMcsco20hEX1MOCwOVcKCL\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "6f31c1e7-fbde-4c6a-aacb-71210de5e229", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a2139fb5-0bbc-43e4-8beb-ba8e77377ec9", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f247df72-a29a-4b48-836c-165c8cd9c8d7", "Content-Type" : "application/json" }, "Response" : { @@ -571,29 +571,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "617f04e1-5698-412f-ab8c-a253493bf107", + "x-ms-correlation-request-id" : "14d7000c-e214-4c3c-b081-0cb5dd40d3f1", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"YBo7FqwZUBS1t3cjjMHOrQ65hcw\"", + "ETag" : "\"vpv9lTyZ6kWuQMLN2WJVQkMXMmZ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4OTY=;sn=401896", - "x-ms-request-id" : "617f04e1-5698-412f-ab8c-a253493bf107", - "Body" : "{\"etag\":\"YBo7FqwZUBS1t3cjjMHOrQ65hcw\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "a2139fb5-0bbc-43e4-8beb-ba8e77377ec9", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2OTA=;sn=448690", + "x-ms-request-id" : "14d7000c-e214-4c3c-b081-0cb5dd40d3f1", + "Body" : "{\"etag\":\"vpv9lTyZ6kWuQMLN2WJVQkMXMmZ\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "f247df72-a29a-4b48-836c-165c8cd9c8d7", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "62af4ec7-a4f6-44ef-8840-b4c515a752f4", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fe7df252-c7e4-46fb-86d4-cc9ce7540148", "Content-Type" : "application/json" }, "Response" : { @@ -602,29 +602,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "5304a783-b9db-4b23-801e-ccf418dfa51a", + "x-ms-correlation-request-id" : "796eb165-1b26-4244-9554-9229f0c78b66", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"sFVMRsixGCAtVOUAPmn1qeq8U73\"", + "ETag" : "\"Rx83YO3wBDxTeNNthwDF5Yb85ke\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4OTg=;sn=401898", - "x-ms-request-id" : "5304a783-b9db-4b23-801e-ccf418dfa51a", - "Body" : "{\"etag\":\"sFVMRsixGCAtVOUAPmn1qeq8U73\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "62af4ec7-a4f6-44ef-8840-b4c515a752f4", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2OTE=;sn=448691", + "x-ms-request-id" : "796eb165-1b26-4244-9554-9229f0c78b66", + "Body" : "{\"etag\":\"Rx83YO3wBDxTeNNthwDF5Yb85ke\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "fe7df252-c7e4-46fb-86d4-cc9ce7540148", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "10feb09e-4382-4ba7-a371-f0688b88885b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "30351364-8f31-45a8-a132-69c60bddf830", "Content-Type" : "application/json" }, "Response" : { @@ -633,29 +633,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a69fe3bd-5273-403c-b770-0eb1ed629090", + "x-ms-correlation-request-id" : "a3ed203f-94d4-44bc-9805-4bcedbe32256", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"keElUWCB9v5hXLDzlwNjAFxUhVn\"", + "ETag" : "\"Mh99iKmIvPtLdwSytInprDtnAhM\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4OTk=;sn=401899", - "x-ms-request-id" : "a69fe3bd-5273-403c-b770-0eb1ed629090", - "Body" : "{\"etag\":\"keElUWCB9v5hXLDzlwNjAFxUhVn\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "10feb09e-4382-4ba7-a371-f0688b88885b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2OTI=;sn=448692", + "x-ms-request-id" : "a3ed203f-94d4-44bc-9805-4bcedbe32256", + "Body" : "{\"etag\":\"Mh99iKmIvPtLdwSytInprDtnAhM\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "30351364-8f31-45a8-a132-69c60bddf830", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b802b7f1-2404-4e1a-bfe5-ff262facb965", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "09a05501-20e1-4383-abfb-b7253695b551", "Content-Type" : "application/json" }, "Response" : { @@ -664,29 +664,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ba48f51d-20c3-4db3-932f-a5f8faa8fc36", + "x-ms-correlation-request-id" : "3f87174e-bfae-460d-ab76-5a0c9b07cd18", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"EWyJsesayqZcSLnDtSQBJloH7D0\"", + "ETag" : "\"TijpWfnb25ZYJLKuC3zDQepJRb8\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MDA=;sn=401900", - "x-ms-request-id" : "ba48f51d-20c3-4db3-932f-a5f8faa8fc36", - "Body" : "{\"etag\":\"EWyJsesayqZcSLnDtSQBJloH7D0\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "b802b7f1-2404-4e1a-bfe5-ff262facb965", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2OTM=;sn=448693", + "x-ms-request-id" : "3f87174e-bfae-460d-ab76-5a0c9b07cd18", + "Body" : "{\"etag\":\"TijpWfnb25ZYJLKuC3zDQepJRb8\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "09a05501-20e1-4383-abfb-b7253695b551", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "66da76ec-6286-4798-814e-474dc0820307", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cd8f3df1-4acb-4f36-ba51-4050e437a861", "Content-Type" : "application/json" }, "Response" : { @@ -695,29 +695,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4d1e421d-3eb3-49d1-870c-25571733b446", + "x-ms-correlation-request-id" : "dca277b3-561f-4e10-89ff-a92ad0a00516", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"NlNKxdBvspWdwd9ORcCfjC3dmTZ\"", + "ETag" : "\"qZLxV8YFXj71oeSMZuWFfHlEyEd\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MDE=;sn=401901", - "x-ms-request-id" : "4d1e421d-3eb3-49d1-870c-25571733b446", - "Body" : "{\"etag\":\"NlNKxdBvspWdwd9ORcCfjC3dmTZ\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "66da76ec-6286-4798-814e-474dc0820307", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2OTQ=;sn=448694", + "x-ms-request-id" : "dca277b3-561f-4e10-89ff-a92ad0a00516", + "Body" : "{\"etag\":\"qZLxV8YFXj71oeSMZuWFfHlEyEd\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "cd8f3df1-4acb-4f36-ba51-4050e437a861", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "254a34fc-4d41-408c-b43d-04640a22d869", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "45554c43-2cc1-4556-9f9b-01911e599ab2", "Content-Type" : "application/json" }, "Response" : { @@ -726,29 +726,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "21653c17-f59e-49a2-b35a-66c77dcbace4", + "x-ms-correlation-request-id" : "405e6610-9601-4cee-a639-761a8fab022c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"HCXyWP4wcU2k0Dd1bU6HPaPL3jq\"", + "ETag" : "\"ULJ6LAvIpfIALNOmknAqpoUBaQ4\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MDI=;sn=401902", - "x-ms-request-id" : "21653c17-f59e-49a2-b35a-66c77dcbace4", - "Body" : "{\"etag\":\"HCXyWP4wcU2k0Dd1bU6HPaPL3jq\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "254a34fc-4d41-408c-b43d-04640a22d869", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2OTU=;sn=448695", + "x-ms-request-id" : "405e6610-9601-4cee-a639-761a8fab022c", + "Body" : "{\"etag\":\"ULJ6LAvIpfIALNOmknAqpoUBaQ4\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "45554c43-2cc1-4556-9f9b-01911e599ab2", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b99e9526-c4d0-4ffe-b38b-34163b41c9f6", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "df3c229f-d10a-4e4c-a6ef-a0245014eb75", "Content-Type" : "application/json" }, "Response" : { @@ -757,29 +757,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "88303232-3fd3-49c3-ab72-daae661bc815", + "x-ms-correlation-request-id" : "7ccef65a-eb40-41bb-9024-b116bc425964", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"8mF29vrcZe4TWMk87RZDgsen0yK\"", + "ETag" : "\"gfoIibVtKlSHBOl35EuGN3PMQzX\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MDM=;sn=401903", - "x-ms-request-id" : "88303232-3fd3-49c3-ab72-daae661bc815", - "Body" : "{\"etag\":\"8mF29vrcZe4TWMk87RZDgsen0yK\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "b99e9526-c4d0-4ffe-b38b-34163b41c9f6", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2OTY=;sn=448696", + "x-ms-request-id" : "7ccef65a-eb40-41bb-9024-b116bc425964", + "Body" : "{\"etag\":\"gfoIibVtKlSHBOl35EuGN3PMQzX\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "df3c229f-d10a-4e4c-a6ef-a0245014eb75", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "63ea910f-ed68-40a4-852e-11cb7a37e70d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4e3503c1-aa45-4b0c-b521-61f010c4fa5c", "Content-Type" : "application/json" }, "Response" : { @@ -788,29 +788,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "537f4168-be27-4849-afb9-7504e3c1ba28", + "x-ms-correlation-request-id" : "6311a62b-69a2-4ed0-8ba3-4e7621d57172", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Q3szWJPgEBF6cE225kM3mAiN6rN\"", + "ETag" : "\"ePxJVBMZdRfVrvUbyg9PeWdxopp\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MDQ=;sn=401904", - "x-ms-request-id" : "537f4168-be27-4849-afb9-7504e3c1ba28", - "Body" : "{\"etag\":\"Q3szWJPgEBF6cE225kM3mAiN6rN\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "63ea910f-ed68-40a4-852e-11cb7a37e70d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2OTc=;sn=448697", + "x-ms-request-id" : "6311a62b-69a2-4ed0-8ba3-4e7621d57172", + "Body" : "{\"etag\":\"ePxJVBMZdRfVrvUbyg9PeWdxopp\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "4e3503c1-aa45-4b0c-b521-61f010c4fa5c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "288c3ed7-0d6c-4c2e-9456-d07a9b55c3ff", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "14b747e4-7d1b-442b-b5b9-a5a4eaf5f0ac", "Content-Type" : "application/json" }, "Response" : { @@ -819,29 +819,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "752651f7-040e-4a35-a86a-42543461e6b7", + "x-ms-correlation-request-id" : "e1398b79-adc7-4f57-bbe1-113e8529d392", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"bpz5k6HvcFes5oppkKFnfIvlNEv\"", + "ETag" : "\"9sPDvy3hu11CCUdh0KJvfwauX2C\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MDU=;sn=401905", - "x-ms-request-id" : "752651f7-040e-4a35-a86a-42543461e6b7", - "Body" : "{\"etag\":\"bpz5k6HvcFes5oppkKFnfIvlNEv\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "288c3ed7-0d6c-4c2e-9456-d07a9b55c3ff", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2OTg=;sn=448698", + "x-ms-request-id" : "e1398b79-adc7-4f57-bbe1-113e8529d392", + "Body" : "{\"etag\":\"9sPDvy3hu11CCUdh0KJvfwauX2C\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "14b747e4-7d1b-442b-b5b9-a5a4eaf5f0ac", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6e036583-5b8c-4d72-922f-94e2914bf2e4", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "674763d8-315f-4ab7-a57f-51ba0fad6a36", "Content-Type" : "application/json" }, "Response" : { @@ -850,29 +850,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "aba3932f-5445-4550-b257-4ead305e5ee4", + "x-ms-correlation-request-id" : "0f8b5a7a-18b8-48e6-9fe2-a2487a3e3848", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"wg0EsLDc0NaXQkwuuro6fPpkuXq\"", + "ETag" : "\"oX6Mhtw8Ellpnknj1pvyhAxu2ZB\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MDY=;sn=401906", - "x-ms-request-id" : "aba3932f-5445-4550-b257-4ead305e5ee4", - "Body" : "{\"etag\":\"wg0EsLDc0NaXQkwuuro6fPpkuXq\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "6e036583-5b8c-4d72-922f-94e2914bf2e4", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2OTk=;sn=448699", + "x-ms-request-id" : "0f8b5a7a-18b8-48e6-9fe2-a2487a3e3848", + "Body" : "{\"etag\":\"oX6Mhtw8Ellpnknj1pvyhAxu2ZB\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "674763d8-315f-4ab7-a57f-51ba0fad6a36", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f348deac-dadb-4d3c-89fe-9991ea018fea", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "97ddac15-ff04-4300-b28c-1a9c689c0c6e", "Content-Type" : "application/json" }, "Response" : { @@ -881,29 +881,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f1cba05a-3b95-451d-839b-2093b35f6919", + "x-ms-correlation-request-id" : "b630fa03-e799-4b50-980c-13cc5dc418ba", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"jM8oOyPruiVD36Td9Oo7I7tbowW\"", + "ETag" : "\"tHbllpriECI06CJAUz3mnIXcmVh\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MDc=;sn=401907", - "x-ms-request-id" : "f1cba05a-3b95-451d-839b-2093b35f6919", - "Body" : "{\"etag\":\"jM8oOyPruiVD36Td9Oo7I7tbowW\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "f348deac-dadb-4d3c-89fe-9991ea018fea", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MDA=;sn=448700", + "x-ms-request-id" : "b630fa03-e799-4b50-980c-13cc5dc418ba", + "Body" : "{\"etag\":\"tHbllpriECI06CJAUz3mnIXcmVh\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "97ddac15-ff04-4300-b28c-1a9c689c0c6e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "53566e03-c77e-491b-85c8-1c6ef53c2b24", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8c73e93a-7c1b-4a6f-acb7-9a6d4f038f88", "Content-Type" : "application/json" }, "Response" : { @@ -912,29 +912,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9d7c3bee-d0ac-42a9-a202-c55fac41603d", + "x-ms-correlation-request-id" : "5a5c394c-46d9-4aed-8ef4-ec7afb67efd2", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"hfQ04kCGpODo45HY3vb2mbxqlAi\"", + "ETag" : "\"zGzFE7Q3eZgQKIkrt1uzIKBYHmC\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MDg=;sn=401908", - "x-ms-request-id" : "9d7c3bee-d0ac-42a9-a202-c55fac41603d", - "Body" : "{\"etag\":\"hfQ04kCGpODo45HY3vb2mbxqlAi\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "53566e03-c77e-491b-85c8-1c6ef53c2b24", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MDE=;sn=448701", + "x-ms-request-id" : "5a5c394c-46d9-4aed-8ef4-ec7afb67efd2", + "Body" : "{\"etag\":\"zGzFE7Q3eZgQKIkrt1uzIKBYHmC\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "8c73e93a-7c1b-4a6f-acb7-9a6d4f038f88", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "98a98326-9241-425b-ba73-0eb23b042769", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "88ec33af-6069-480a-b569-cd78a9d5b456", "Content-Type" : "application/json" }, "Response" : { @@ -943,29 +943,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "744cb79d-8291-4ae8-8330-a258b86915f7", + "x-ms-correlation-request-id" : "0c2c0adf-869a-4019-83c8-bd8d9507779c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ey23XzdCi3Zc9TtEB27HyRCgAnj\"", + "ETag" : "\"adqUgvt2NKPXxNQMCgEx74Sv9wL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MDk=;sn=401909", - "x-ms-request-id" : "744cb79d-8291-4ae8-8330-a258b86915f7", - "Body" : "{\"etag\":\"ey23XzdCi3Zc9TtEB27HyRCgAnj\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"}", - "x-ms-client-request-id" : "98a98326-9241-425b-ba73-0eb23b042769", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MDI=;sn=448702", + "x-ms-request-id" : "0c2c0adf-869a-4019-83c8-bd8d9507779c", + "Body" : "{\"etag\":\"adqUgvt2NKPXxNQMCgEx74Sv9wL\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "88ec33af-6069-480a-b569-cd78a9d5b456", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cae33c1c-136c-4a37-9f9b-29ec2cb5acd3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "42285008-c050-4b2c-8eb1-2e07412ed662", "Content-Type" : "application/json" }, "Response" : { @@ -974,29 +974,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "38a551fe-3a5c-4576-bd1f-18956b1add01", + "x-ms-correlation-request-id" : "b2f5db06-ca5b-4b7f-9b97-01268e4f50a0", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"lPH7S3FnnXRs2zPNvDAweva8KX7\"", + "ETag" : "\"4M6Y3Ziy8gIWxwKBxDtP9FtCuui\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MTA=;sn=401910", - "x-ms-request-id" : "38a551fe-3a5c-4576-bd1f-18956b1add01", - "Body" : "{\"etag\":\"lPH7S3FnnXRs2zPNvDAweva8KX7\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"}", - "x-ms-client-request-id" : "cae33c1c-136c-4a37-9f9b-29ec2cb5acd3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MDM=;sn=448703", + "x-ms-request-id" : "b2f5db06-ca5b-4b7f-9b97-01268e4f50a0", + "Body" : "{\"etag\":\"4M6Y3Ziy8gIWxwKBxDtP9FtCuui\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "42285008-c050-4b2c-8eb1-2e07412ed662", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "999b7c61-c811-4bdb-9919-48c5c737a6d9", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "af84535e-5b7b-4d93-b193-63a84fe58596", "Content-Type" : "application/json" }, "Response" : { @@ -1005,29 +1005,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "30da6b2f-1031-4d3c-b582-22b947dc9779", + "x-ms-correlation-request-id" : "925a124c-d178-4443-949d-6da8134153e0", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"NWGRHJtI0pWYTLaO7tCv9zuNMiB\"", + "ETag" : "\"0U8W7ELbd32KbxM343SAeoGeFv6\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MTE=;sn=401911", - "x-ms-request-id" : "30da6b2f-1031-4d3c-b582-22b947dc9779", - "Body" : "{\"etag\":\"NWGRHJtI0pWYTLaO7tCv9zuNMiB\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"}", - "x-ms-client-request-id" : "999b7c61-c811-4bdb-9919-48c5c737a6d9", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MDQ=;sn=448704", + "x-ms-request-id" : "925a124c-d178-4443-949d-6da8134153e0", + "Body" : "{\"etag\":\"0U8W7ELbd32KbxM343SAeoGeFv6\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "af84535e-5b7b-4d93-b193-63a84fe58596", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c38f5220-c454-4682-825b-dfa1e80ff44b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a866534d-1a74-4f5d-920f-6fb1c78e7df7", "Content-Type" : "application/json" }, "Response" : { @@ -1036,29 +1036,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a8125b09-5cf6-4c7e-acad-affdfafb09e2", + "x-ms-correlation-request-id" : "56bc5fee-bf90-4f6c-b860-f14d4632aa33", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"8iWb3KKmOvXYtjJ48yNGORggnLO\"", + "ETag" : "\"3SE72TIjKQirPc3kfcj0PySveIK\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MTI=;sn=401912", - "x-ms-request-id" : "a8125b09-5cf6-4c7e-acad-affdfafb09e2", - "Body" : "{\"etag\":\"8iWb3KKmOvXYtjJ48yNGORggnLO\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"}", - "x-ms-client-request-id" : "c38f5220-c454-4682-825b-dfa1e80ff44b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MDU=;sn=448705", + "x-ms-request-id" : "56bc5fee-bf90-4f6c-b860-f14d4632aa33", + "Body" : "{\"etag\":\"3SE72TIjKQirPc3kfcj0PySveIK\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "a866534d-1a74-4f5d-920f-6fb1c78e7df7", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "98ffe53b-2153-45d3-8764-ecb461089f03", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a1cd360c-d377-45e8-a437-0a857625b702", "Content-Type" : "application/json" }, "Response" : { @@ -1067,29 +1067,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:58 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "0c5d3a40-3a00-445d-a6d9-3d58ab70c718", + "x-ms-correlation-request-id" : "f3a3a455-6cf2-440a-8859-1a375bb28ec8", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"IEeuaKtSFx4AggA2JxxDoAtdjTJ\"", + "ETag" : "\"TBz057F7lBr2NwWUa7nZhZGBt3r\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MTM=;sn=401913", - "x-ms-request-id" : "0c5d3a40-3a00-445d-a6d9-3d58ab70c718", - "Body" : "{\"etag\":\"IEeuaKtSFx4AggA2JxxDoAtdjTJ\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"}", - "x-ms-client-request-id" : "98ffe53b-2153-45d3-8764-ecb461089f03", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MDY=;sn=448706", + "x-ms-request-id" : "f3a3a455-6cf2-440a-8859-1a375bb28ec8", + "Body" : "{\"etag\":\"TBz057F7lBr2NwWUa7nZhZGBt3r\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "a1cd360c-d377-45e8-a437-0a857625b702", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2b2a2305-a3aa-42f3-8892-b983659143ff", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d2665a26-3c0a-431f-84c0-c5a52056f97b", "Content-Type" : "application/json" }, "Response" : { @@ -1098,29 +1098,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:58 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "febad5b8-38f3-4b76-9dd0-6333110db957", + "x-ms-correlation-request-id" : "ea2e6c16-529e-4e3c-abdf-b88af6ec303f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"7rhr178fWjyQod2yQh2F7VoTceV\"", + "ETag" : "\"3E4UV3ya1bGVE62LkIB0Sbaf4qL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MTQ=;sn=401914", - "x-ms-request-id" : "febad5b8-38f3-4b76-9dd0-6333110db957", - "Body" : "{\"etag\":\"7rhr178fWjyQod2yQh2F7VoTceV\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"}", - "x-ms-client-request-id" : "2b2a2305-a3aa-42f3-8892-b983659143ff", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MDc=;sn=448707", + "x-ms-request-id" : "ea2e6c16-529e-4e3c-abdf-b88af6ec303f", + "Body" : "{\"etag\":\"3E4UV3ya1bGVE62LkIB0Sbaf4qL\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "d2665a26-3c0a-431f-84c0-c5a52056f97b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "532169d0-5e0f-48b4-a267-e8e56518d82d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b074f4e3-5ae7-4e62-94c4-357a0f74e27a", "Content-Type" : "application/json" }, "Response" : { @@ -1129,29 +1129,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:58 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1de7e071-91b0-409a-958e-7a7d0b516cdd", + "x-ms-correlation-request-id" : "7dc44cd3-19b3-46c5-9222-c4d44683a0f3", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"YtfQK3ejzQvAiFdp7wMtHXwp1hC\"", + "ETag" : "\"0vHC4gBNGjOJzigBRbfT4ZX1QyF\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MTU=;sn=401915", - "x-ms-request-id" : "1de7e071-91b0-409a-958e-7a7d0b516cdd", - "Body" : "{\"etag\":\"YtfQK3ejzQvAiFdp7wMtHXwp1hC\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"}", - "x-ms-client-request-id" : "532169d0-5e0f-48b4-a267-e8e56518d82d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MDg=;sn=448708", + "x-ms-request-id" : "7dc44cd3-19b3-46c5-9222-c4d44683a0f3", + "Body" : "{\"etag\":\"0vHC4gBNGjOJzigBRbfT4ZX1QyF\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "b074f4e3-5ae7-4e62-94c4-357a0f74e27a", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "13608edd-3658-4c31-8011-12d63cbda610", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4c280484-5152-498a-80d8-50a4025ce905", "Content-Type" : "application/json" }, "Response" : { @@ -1160,29 +1160,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:58 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3e32e5df-e802-46cd-96de-f187cf52ec5d", + "x-ms-correlation-request-id" : "df736f18-06fa-4b53-8659-afe78e85125c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"atHIfTQbkeALizAJFEVqkQSNSNo\"", + "ETag" : "\"htuYxr8ya41DQpr4GpWRiqun5be\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MTY=;sn=401916", - "x-ms-request-id" : "3e32e5df-e802-46cd-96de-f187cf52ec5d", - "Body" : "{\"etag\":\"atHIfTQbkeALizAJFEVqkQSNSNo\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"}", - "x-ms-client-request-id" : "13608edd-3658-4c31-8011-12d63cbda610", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MDk=;sn=448709", + "x-ms-request-id" : "df736f18-06fa-4b53-8659-afe78e85125c", + "Body" : "{\"etag\":\"htuYxr8ya41DQpr4GpWRiqun5be\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "4c280484-5152-498a-80d8-50a4025ce905", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "596adb85-ae64-48ae-a8c9-2e8184d9f9c3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cc297df3-6e73-4906-a121-3108cfaedd11", "Content-Type" : "application/json" }, "Response" : { @@ -1191,29 +1191,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:58 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4d6336b5-e31a-4f03-b0a0-d21a358c4ec5", + "x-ms-correlation-request-id" : "7d6c7ded-0846-4c7d-8143-cd53fcb45bc3", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"KED8AnNLp8cQ6MsIxtLSIkNroXb\"", + "ETag" : "\"mNgLXjQJUyYiDkMIEWlqQVfm4Cd\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MTc=;sn=401917", - "x-ms-request-id" : "4d6336b5-e31a-4f03-b0a0-d21a358c4ec5", - "Body" : "{\"etag\":\"KED8AnNLp8cQ6MsIxtLSIkNroXb\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"}", - "x-ms-client-request-id" : "596adb85-ae64-48ae-a8c9-2e8184d9f9c3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MTA=;sn=448710", + "x-ms-request-id" : "7d6c7ded-0846-4c7d-8143-cd53fcb45bc3", + "Body" : "{\"etag\":\"mNgLXjQJUyYiDkMIEWlqQVfm4Cd\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "cc297df3-6e73-4906-a121-3108cfaedd11", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "fa1c17a9-7fa6-4157-b318-0362d48e47bc", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a03c8fe5-d18e-43e4-bf58-eb01fa760fcb", "Content-Type" : "application/json" }, "Response" : { @@ -1222,29 +1222,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:58 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a14635b5-fc27-4b31-81c8-4a898d934b94", + "x-ms-correlation-request-id" : "b2ba453e-4dcc-44f1-9910-c496fd0cef60", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"M4bQy7x1fAPLFmvkEduxvoSYQfR\"", + "ETag" : "\"KBx6vyzYvh6OXIbgRw52ABefttF\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MTg=;sn=401918", - "x-ms-request-id" : "a14635b5-fc27-4b31-81c8-4a898d934b94", - "Body" : "{\"etag\":\"M4bQy7x1fAPLFmvkEduxvoSYQfR\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"}", - "x-ms-client-request-id" : "fa1c17a9-7fa6-4157-b318-0362d48e47bc", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MTE=;sn=448711", + "x-ms-request-id" : "b2ba453e-4dcc-44f1-9910-c496fd0cef60", + "Body" : "{\"etag\":\"KBx6vyzYvh6OXIbgRw52ABefttF\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "a03c8fe5-d18e-43e4-bf58-eb01fa760fcb", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3842e2ab-f983-498a-863e-1f6c9b01f6aa", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "70d01017-7c9d-4fad-93f3-c52fa77be083", "Content-Type" : "application/json" }, "Response" : { @@ -1253,29 +1253,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:58 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "41838a0c-5acc-4609-bb83-3058c2033309", + "x-ms-correlation-request-id" : "d51cbbd5-a00b-4262-8c15-c271b166afe0", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"r6uMwDMZt11Dj6dWFqmZH01vB5z\"", + "ETag" : "\"8JxL5Y9iiHb8lj6HinI4ecnSu91\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MTk=;sn=401919", - "x-ms-request-id" : "41838a0c-5acc-4609-bb83-3058c2033309", - "Body" : "{\"etag\":\"r6uMwDMZt11Dj6dWFqmZH01vB5z\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"}", - "x-ms-client-request-id" : "3842e2ab-f983-498a-863e-1f6c9b01f6aa", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MTI=;sn=448712", + "x-ms-request-id" : "d51cbbd5-a00b-4262-8c15-c271b166afe0", + "Body" : "{\"etag\":\"8JxL5Y9iiHb8lj6HinI4ecnSu91\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "70d01017-7c9d-4fad-93f3-c52fa77be083", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5859dccb-a35c-41cb-a5be-b00262041f1f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9fa04bf2-96ff-4cac-81b4-da3aa43b4f80", "Content-Type" : "application/json" }, "Response" : { @@ -1284,29 +1284,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:58 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b55b5601-c135-4b9d-8713-f40a3e91602b", + "x-ms-correlation-request-id" : "4c590cb0-3a64-4cfa-b781-b2adeb86d592", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"hJiPyZCV88nbOXFJUl4dlRJ7Y29\"", + "ETag" : "\"K0jeZL3uUTfJjCZPhsAkIePO3Nk\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MjA=;sn=401920", - "x-ms-request-id" : "b55b5601-c135-4b9d-8713-f40a3e91602b", - "Body" : "{\"etag\":\"hJiPyZCV88nbOXFJUl4dlRJ7Y29\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"}", - "x-ms-client-request-id" : "5859dccb-a35c-41cb-a5be-b00262041f1f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MTM=;sn=448713", + "x-ms-request-id" : "4c590cb0-3a64-4cfa-b781-b2adeb86d592", + "Body" : "{\"etag\":\"K0jeZL3uUTfJjCZPhsAkIePO3Nk\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "9fa04bf2-96ff-4cac-81b4-da3aa43b4f80", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cab0a2e2-2c9c-4750-965b-0ae8f6a21369", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f46f9aa3-1b83-42e7-b45a-c0632d87f6e6", "Content-Type" : "application/json" }, "Response" : { @@ -1315,29 +1315,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:58 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a4810b02-c427-45e1-9450-5dc0abe5cbb0", + "x-ms-correlation-request-id" : "007ba26e-d8fb-4d2f-b431-fe7ea0dcbcab", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"RlJgj5X1jnYDdraQIrLYBgfDMMA\"", + "ETag" : "\"doCBeNFPFDS61F1GNEJ1s7j0jtj\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MjE=;sn=401921", - "x-ms-request-id" : "a4810b02-c427-45e1-9450-5dc0abe5cbb0", - "Body" : "{\"etag\":\"RlJgj5X1jnYDdraQIrLYBgfDMMA\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"}", - "x-ms-client-request-id" : "cab0a2e2-2c9c-4750-965b-0ae8f6a21369", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MTQ=;sn=448714", + "x-ms-request-id" : "007ba26e-d8fb-4d2f-b431-fe7ea0dcbcab", + "Body" : "{\"etag\":\"doCBeNFPFDS61F1GNEJ1s7j0jtj\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "f46f9aa3-1b83-42e7-b45a-c0632d87f6e6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5cf2e17c-c03b-483a-aee6-5777fe3f9d1e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "732e90af-767a-435c-b575-3ef4597e2fa9", "Content-Type" : "application/json" }, "Response" : { @@ -1346,29 +1346,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:46 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:45 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:58 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "88b3d6cf-7659-4758-8e66-8ec5af821e39", + "x-ms-correlation-request-id" : "d0bdbcdb-0d1d-4234-9778-f50458058c82", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"zcxFFm4kKuoEb9PSZljiJkamOyt\"", + "ETag" : "\"IxAUxXdNY6CalwY69Snqfaa3XHB\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MjI=;sn=401922", - "x-ms-request-id" : "88b3d6cf-7659-4758-8e66-8ec5af821e39", - "Body" : "{\"etag\":\"zcxFFm4kKuoEb9PSZljiJkamOyt\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:46+00:00\"}", - "x-ms-client-request-id" : "5cf2e17c-c03b-483a-aee6-5777fe3f9d1e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MTU=;sn=448715", + "x-ms-request-id" : "d0bdbcdb-0d1d-4234-9778-f50458058c82", + "Body" : "{\"etag\":\"IxAUxXdNY6CalwY69Snqfaa3XHB\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "732e90af-767a-435c-b575-3ef4597e2fa9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d6992925-b7bc-4dad-9a61-1c5bc609aa43", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "56961ff3-01cf-472c-9011-7d9ea7e26fda", "Content-Type" : "application/json" }, "Response" : { @@ -1377,29 +1377,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:47 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:47 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:58 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "5f899eae-609a-4adf-aac7-09f0d90d6969", + "x-ms-correlation-request-id" : "7af888f2-a9fd-4972-b987-c24775473ba6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ogifPB2ftuuAgzxAkXdhWt8CWQ6\"", + "ETag" : "\"wNROGYFSSk0GfemAUKErU33EKic\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MjM=;sn=401923", - "x-ms-request-id" : "5f899eae-609a-4adf-aac7-09f0d90d6969", - "Body" : "{\"etag\":\"ogifPB2ftuuAgzxAkXdhWt8CWQ6\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:47+00:00\"}", - "x-ms-client-request-id" : "d6992925-b7bc-4dad-9a61-1c5bc609aa43", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MTY=;sn=448716", + "x-ms-request-id" : "7af888f2-a9fd-4972-b987-c24775473ba6", + "Body" : "{\"etag\":\"wNROGYFSSk0GfemAUKErU33EKic\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"}", + "x-ms-client-request-id" : "56961ff3-01cf-472c-9011-7d9ea7e26fda", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ecee7e95-95a1-4909-a8cd-34b3980069d2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "29b453b3-1c27-4a52-98c3-5b9dcf41003c", "Content-Type" : "application/json" }, "Response" : { @@ -1408,29 +1408,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:47 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:59 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:47 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:58 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f808aab6-a200-465b-bfaa-bfd75365df89", + "x-ms-correlation-request-id" : "a6b1ee5c-df18-4836-b047-e6618fb05522", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"1pTmtnRccg6GrJpLpp7PNUdbize\"", + "ETag" : "\"pUDsIbI1AhfjGdK7IIHS9exwS4a\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MjQ=;sn=401924", - "x-ms-request-id" : "f808aab6-a200-465b-bfaa-bfd75365df89", - "Body" : "{\"etag\":\"1pTmtnRccg6GrJpLpp7PNUdbize\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:47+00:00\"}", - "x-ms-client-request-id" : "ecee7e95-95a1-4909-a8cd-34b3980069d2", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MTc=;sn=448717", + "x-ms-request-id" : "a6b1ee5c-df18-4836-b047-e6618fb05522", + "Body" : "{\"etag\":\"pUDsIbI1AhfjGdK7IIHS9exwS4a\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:59+00:00\"}", + "x-ms-client-request-id" : "29b453b3-1c27-4a52-98c3-5b9dcf41003c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "15e53f60-5059-4279-bb8b-52983e4dae1b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ecd60d94-c55b-48dd-9972-b041c72bb7c5", "Content-Type" : "application/json" }, "Response" : { @@ -1439,29 +1439,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:47 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:00 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:47 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:00 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "149f075d-de86-48f9-af47-7d7f2ae69db4", + "x-ms-correlation-request-id" : "a25aae99-0979-4be9-9534-976626305c33", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"vqKGqxAZ4Hv1plqZM75QDLYmgDc\"", + "ETag" : "\"oLAU4SpxhGDXBwzddLlDoHNAfWu\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MjU=;sn=401925", - "x-ms-request-id" : "149f075d-de86-48f9-af47-7d7f2ae69db4", - "Body" : "{\"etag\":\"vqKGqxAZ4Hv1plqZM75QDLYmgDc\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:47+00:00\"}", - "x-ms-client-request-id" : "15e53f60-5059-4279-bb8b-52983e4dae1b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MTg=;sn=448718", + "x-ms-request-id" : "a25aae99-0979-4be9-9534-976626305c33", + "Body" : "{\"etag\":\"oLAU4SpxhGDXBwzddLlDoHNAfWu\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:00+00:00\"}", + "x-ms-client-request-id" : "ecd60d94-c55b-48dd-9972-b041c72bb7c5", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3dca170a-3711-47ff-a3f5-f2c3f99bee51", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3bcb6981-733b-41e9-b4f7-9f8393b71619", "Content-Type" : "application/json" }, "Response" : { @@ -1470,29 +1470,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:47 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:00 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:47 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:00 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "310da427-3605-4e89-827c-9a60db3209af", + "x-ms-correlation-request-id" : "5a114a40-e253-48a7-a5b3-292b1a6d543d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"3kDwGcPGt1TT1KNmmwhVN4wAQZU\"", + "ETag" : "\"ptI9eYYX2lvSd8V6VODS0z59jV8\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MjY=;sn=401926", - "x-ms-request-id" : "310da427-3605-4e89-827c-9a60db3209af", - "Body" : "{\"etag\":\"3kDwGcPGt1TT1KNmmwhVN4wAQZU\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:47+00:00\"}", - "x-ms-client-request-id" : "3dca170a-3711-47ff-a3f5-f2c3f99bee51", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MTk=;sn=448719", + "x-ms-request-id" : "5a114a40-e253-48a7-a5b3-292b1a6d543d", + "Body" : "{\"etag\":\"ptI9eYYX2lvSd8V6VODS0z59jV8\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:00+00:00\"}", + "x-ms-client-request-id" : "3bcb6981-733b-41e9-b4f7-9f8393b71619", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4db4417c-7348-448b-ba45-d59834ccd9fe", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7172cbf3-7957-4b7f-8aad-c9d3b2f194dc", "Content-Type" : "application/json" }, "Response" : { @@ -1501,29 +1501,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:47 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:00 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:47 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:00 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "5cbf0417-19a3-4c68-a8c3-53c43a9fb84b", + "x-ms-correlation-request-id" : "03abdf54-79f6-4910-8e49-e9ff8efca331", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"fFe2fN4arp2nV6kRCsknDpSU8Ba\"", + "ETag" : "\"OgWEBKRaQrwy93aZqSgpayM3lqD\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Mjc=;sn=401927", - "x-ms-request-id" : "5cbf0417-19a3-4c68-a8c3-53c43a9fb84b", - "Body" : "{\"etag\":\"fFe2fN4arp2nV6kRCsknDpSU8Ba\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:47+00:00\"}", - "x-ms-client-request-id" : "4db4417c-7348-448b-ba45-d59834ccd9fe", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MjA=;sn=448720", + "x-ms-request-id" : "03abdf54-79f6-4910-8e49-e9ff8efca331", + "Body" : "{\"etag\":\"OgWEBKRaQrwy93aZqSgpayM3lqD\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:00+00:00\"}", + "x-ms-client-request-id" : "7172cbf3-7957-4b7f-8aad-c9d3b2f194dc", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4bc329f3-620f-4026-88b3-5ac5a38dbd19", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0ce64249-9d51-4054-b72f-b2b9141c5f80", "Content-Type" : "application/json" }, "Response" : { @@ -1532,29 +1532,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:49 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:00 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:49 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:00 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f591f49d-6ca5-46f3-99b9-363053846a81", + "x-ms-correlation-request-id" : "e619a66a-3b22-453a-94e6-3ee75e15af23", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"9qZLPmZqxvIPob06ABd32hpb54W\"", + "ETag" : "\"D7YbWOOZ7qpm1fvw9keYit86gou\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Mjg=;sn=401928", - "x-ms-request-id" : "f591f49d-6ca5-46f3-99b9-363053846a81", - "Body" : "{\"etag\":\"9qZLPmZqxvIPob06ABd32hpb54W\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:49+00:00\"}", - "x-ms-client-request-id" : "4bc329f3-620f-4026-88b3-5ac5a38dbd19", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MjE=;sn=448721", + "x-ms-request-id" : "e619a66a-3b22-453a-94e6-3ee75e15af23", + "Body" : "{\"etag\":\"D7YbWOOZ7qpm1fvw9keYit86gou\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:00+00:00\"}", + "x-ms-client-request-id" : "0ce64249-9d51-4054-b72f-b2b9141c5f80", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key27532&label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key77856&label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7f99e735-5299-4c42-8d95-5438a65a88d2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d419ac99-ee5c-4bdd-aee3-b3c80c8bfb05", "Content-Type" : "application/json" }, "Response" : { @@ -1565,26 +1565,26 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:49 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:00 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d43eb076-8455-4190-9fc6-faecfa9040a7", + "x-ms-correlation-request-id" : "b8e8db85-9ea5-4e54-abf2-7024c08f7ab4", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Mjg=;sn=401928", - "x-ms-request-id" : "d43eb076-8455-4190-9fc6-faecfa9040a7", - "Body" : "{\"items\":[{\"etag\":\"9qZLPmZqxvIPob06ABd32hpb54W\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:49+00:00\"},{\"etag\":\"fFe2fN4arp2nV6kRCsknDpSU8Ba\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:47+00:00\"},{\"etag\":\"3kDwGcPGt1TT1KNmmwhVN4wAQZU\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:47+00:00\"},{\"etag\":\"vqKGqxAZ4Hv1plqZM75QDLYmgDc\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:47+00:00\"},{\"etag\":\"1pTmtnRccg6GrJpLpp7PNUdbize\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:47+00:00\"},{\"etag\":\"ogifPB2ftuuAgzxAkXdhWt8CWQ6\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:47+00:00\"},{\"etag\":\"zcxFFm4kKuoEb9PSZljiJkamOyt\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:46+00:00\"},{\"etag\":\"RlJgj5X1jnYDdraQIrLYBgfDMMA\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"},{\"etag\":\"hJiPyZCV88nbOXFJUl4dlRJ7Y29\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"},{\"etag\":\"r6uMwDMZt11Dj6dWFqmZH01vB5z\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"},{\"etag\":\"M4bQy7x1fAPLFmvkEduxvoSYQfR\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"},{\"etag\":\"KED8AnNLp8cQ6MsIxtLSIkNroXb\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"},{\"etag\":\"atHIfTQbkeALizAJFEVqkQSNSNo\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"},{\"etag\":\"YtfQK3ejzQvAiFdp7wMtHXwp1hC\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"},{\"etag\":\"7rhr178fWjyQod2yQh2F7VoTceV\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"},{\"etag\":\"IEeuaKtSFx4AggA2JxxDoAtdjTJ\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"},{\"etag\":\"8iWb3KKmOvXYtjJ48yNGORggnLO\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"},{\"etag\":\"NWGRHJtI0pWYTLaO7tCv9zuNMiB\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"},{\"etag\":\"lPH7S3FnnXRs2zPNvDAweva8KX7\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"},{\"etag\":\"ey23XzdCi3Zc9TtEB27HyRCgAnj\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:45+00:00\"},{\"etag\":\"hfQ04kCGpODo45HY3vb2mbxqlAi\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"jM8oOyPruiVD36Td9Oo7I7tbowW\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"wg0EsLDc0NaXQkwuuro6fPpkuXq\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"bpz5k6HvcFes5oppkKFnfIvlNEv\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"Q3szWJPgEBF6cE225kM3mAiN6rN\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"8mF29vrcZe4TWMk87RZDgsen0yK\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"HCXyWP4wcU2k0Dd1bU6HPaPL3jq\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"NlNKxdBvspWdwd9ORcCfjC3dmTZ\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"EWyJsesayqZcSLnDtSQBJloH7D0\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"keElUWCB9v5hXLDzlwNjAFxUhVn\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"sFVMRsixGCAtVOUAPmn1qeq8U73\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"Rnm0neuM9vbKgmknlXkdxgw30in\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"YBo7FqwZUBS1t3cjjMHOrQ65hcw\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"6yv3YQRQUpufzSUkDNphYe8OUUj\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"1tfEMGKiJC67OuqQO3BrtXSrHVW\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"Jr7HpQOEqOaSoo9542fEdy39nN8\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"E4fSNjBC6XjAZymJJjarHvjrAtf\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"YKneIjPYcdENMnYDD3lLUfuAwPr\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"WcEguOHtsC87HP08rRc2vsDX3Ae\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"QebQdw0Zczu2Sq0oIQSwYuV5xSD\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"D58TVgUIa8T7IDj3i4IByWppe9A\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"Bvl3CPnaNcesQVKCmrde2fNXQ3D\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"MTj5S0rjUjWpX2WItGf87rSD0Yb\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"YLDRKkTCdFqa0SeJnQwWIngNubq\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"9mVudh9TKHDcrChGETfexNny0Gp\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"Ohy0hjlAoOWkIYhOHhUEm1wuCLn\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"MNhtUmNxUzxPN2Yw8eZdElPFJEX\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"XnBl4bTSKOMUWWgszKmhshDaHXX\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"khd9ryKO7ZSItzefZmJAa5ykF5B\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"EpdP8vuAEwrmvoXu2Dk2FzWWku2\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}]}", - "x-ms-client-request-id" : "7f99e735-5299-4c42-8d95-5438a65a88d2", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MjE=;sn=448721", + "x-ms-request-id" : "b8e8db85-9ea5-4e54-abf2-7024c08f7ab4", + "Body" : "{\"items\":[{\"etag\":\"D7YbWOOZ7qpm1fvw9keYit86gou\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:00+00:00\"},{\"etag\":\"OgWEBKRaQrwy93aZqSgpayM3lqD\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:00+00:00\"},{\"etag\":\"ptI9eYYX2lvSd8V6VODS0z59jV8\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:00+00:00\"},{\"etag\":\"oLAU4SpxhGDXBwzddLlDoHNAfWu\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:00+00:00\"},{\"etag\":\"pUDsIbI1AhfjGdK7IIHS9exwS4a\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:59+00:00\"},{\"etag\":\"wNROGYFSSk0GfemAUKErU33EKic\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"IxAUxXdNY6CalwY69Snqfaa3XHB\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"doCBeNFPFDS61F1GNEJ1s7j0jtj\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"K0jeZL3uUTfJjCZPhsAkIePO3Nk\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"8JxL5Y9iiHb8lj6HinI4ecnSu91\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"KBx6vyzYvh6OXIbgRw52ABefttF\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"mNgLXjQJUyYiDkMIEWlqQVfm4Cd\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"htuYxr8ya41DQpr4GpWRiqun5be\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"0vHC4gBNGjOJzigBRbfT4ZX1QyF\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"3E4UV3ya1bGVE62LkIB0Sbaf4qL\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"TBz057F7lBr2NwWUa7nZhZGBt3r\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"3SE72TIjKQirPc3kfcj0PySveIK\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"0U8W7ELbd32KbxM343SAeoGeFv6\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"4M6Y3Ziy8gIWxwKBxDtP9FtCuui\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"adqUgvt2NKPXxNQMCgEx74Sv9wL\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"zGzFE7Q3eZgQKIkrt1uzIKBYHmC\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"tHbllpriECI06CJAUz3mnIXcmVh\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"oX6Mhtw8Ellpnknj1pvyhAxu2ZB\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"9sPDvy3hu11CCUdh0KJvfwauX2C\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"ePxJVBMZdRfVrvUbyg9PeWdxopp\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:58+00:00\"},{\"etag\":\"gfoIibVtKlSHBOl35EuGN3PMQzX\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"ULJ6LAvIpfIALNOmknAqpoUBaQ4\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"qZLxV8YFXj71oeSMZuWFfHlEyEd\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"TijpWfnb25ZYJLKuC3zDQepJRb8\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"Mh99iKmIvPtLdwSytInprDtnAhM\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"Rx83YO3wBDxTeNNthwDF5Yb85ke\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"vpv9lTyZ6kWuQMLN2WJVQkMXMmZ\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"xeI46ZMcsco20hEX1MOCwOVcKCL\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"Lq8TyR9mS0oXvFGSBj5XLe6pqni\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"FCKmq5IYpHXBmmDrCqzvg7ulIAX\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"LMNgpjnGmcc85a9xCU8HYgn98YD\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"w2jTc9zhyt3MDzUdZwHyTBWHloa\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"iJPEXP4nq8deTRpu4T2DX1yTC1W\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"GxSlQvb6ksQSrAIe4kFyjlwwEFb\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"f15Sgb0v9GHkCTX4IfSli7kBGcl\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"0yTnOoYjlczrxMVkzULZ6wcXn2V\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"dc5I6e4tc56Afo8iALM560nqnHN\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"Jjc0astmVnbLDfad0ikFYKiJgHn\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"pOni7z3SDTtiMMkl82v6dMv9u9I\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"4JSuQiKzUY5tMkGzIUQfStfFR2K\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"0XH3xmsFwtrITmBK1wiMNy9KL1B\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"9D330iltxDDdLkmVdWVqEFkG8OR\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"XU4M0lZYO6uGgNzB0MqaCu9USUC\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"hYHpoWiu9ie0qFqTPv5zqqgfq7F\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"J0Ay2IRkPi9fxTMpJ5ulUyN9C6P\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}]}", + "x-ms-client-request-id" : "d419ac99-ee5c-4bdd-aee3-b3c80c8bfb05", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key27532%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key77856%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "87f80aea-9e1a-4615-b4d9-4c4168788376", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f2f7db10-6a12-4029-8127-caec62e0fe39", "Content-Type" : "application/json" }, "Response" : { @@ -1595,25 +1595,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:49 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:00 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "0486e18f-f8e8-4615-a6cc-de3f5f510d45", + "x-ms-correlation-request-id" : "e3a2ce0e-4718-44f9-9801-8137cae7263b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Mjg=;sn=401928", - "x-ms-request-id" : "0486e18f-f8e8-4615-a6cc-de3f5f510d45", - "Body" : "{\"items\":[{\"etag\":\"9qZLPmZqxvIPob06ABd32hpb54W\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:49+00:00\"}]}", - "x-ms-client-request-id" : "87f80aea-9e1a-4615-b4d9-4c4168788376", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MjE=;sn=448721", + "x-ms-request-id" : "e3a2ce0e-4718-44f9-9801-8137cae7263b", + "Body" : "{\"items\":[{\"etag\":\"D7YbWOOZ7qpm1fvw9keYit86gou\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:00+00:00\"}]}", + "x-ms-client-request-id" : "f2f7db10-6a12-4029-8127-caec62e0fe39", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key27532?label=ea26d74d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77856?label=2114f456", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "487a6eea-1873-400e-9072-ef221a492ecd", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "da4788eb-c10b-4b7c-b5d5-1e62ecaec41c", "Content-Type" : "application/json" }, "Response" : { @@ -1622,23 +1622,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:49 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:00 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:49 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:00 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "5e578a03-141f-4c8d-be5f-ca34cf5bb2e4", + "x-ms-correlation-request-id" : "84869595-a8ab-4f20-85cd-1dbdb1082d0e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"9qZLPmZqxvIPob06ABd32hpb54W\"", + "ETag" : "\"D7YbWOOZ7qpm1fvw9keYit86gou\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Mjk=;sn=401929", - "x-ms-request-id" : "5e578a03-141f-4c8d-be5f-ca34cf5bb2e4", - "Body" : "{\"etag\":\"9qZLPmZqxvIPob06ABd32hpb54W\",\"key\":\"key27532\",\"label\":\"ea26d74d\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:49+00:00\"}", - "x-ms-client-request-id" : "487a6eea-1873-400e-9072-ef221a492ecd", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MjI=;sn=448722", + "x-ms-request-id" : "84869595-a8ab-4f20-85cd-1dbdb1082d0e", + "Body" : "{\"etag\":\"D7YbWOOZ7qpm1fvw9keYit86gou\",\"key\":\"key77856\",\"label\":\"2114f456\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:00+00:00\"}", + "x-ms-client-request-id" : "da4788eb-c10b-4b7c-b5d5-1e62ecaec41c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key27532", "ea26d74d" ] + "variables" : [ "key77856", "2114f456" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatIterator.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatIterator.json index 9b5dad899056..50f0e3103f13 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatIterator.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatIterator.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "056b8819-e5a9-47d1-8b8e-31190e6d1130", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "54a214a4-4226-4da1-bff6-40b69ace6613", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "bd73aa51-8176-4ef8-b3cc-dc03df591702", + "x-ms-correlation-request-id" : "5edaa89d-bf30-4912-9ced-e88655993ae4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"PC6DQyhhVMrJeBtHkrjuvGB5bAu\"", + "ETag" : "\"FZAFabTnfEHWpUKeav1sxwecR97\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMTI=;sn=402012", - "x-ms-request-id" : "bd73aa51-8176-4ef8-b3cc-dc03df591702", - "Body" : "{\"etag\":\"PC6DQyhhVMrJeBtHkrjuvGB5bAu\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "056b8819-e5a9-47d1-8b8e-31190e6d1130", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MDQ=;sn=448804", + "x-ms-request-id" : "5edaa89d-bf30-4912-9ced-e88655993ae4", + "Body" : "{\"etag\":\"FZAFabTnfEHWpUKeav1sxwecR97\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "54a214a4-4226-4da1-bff6-40b69ace6613", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ecaebd83-cb6c-4982-b043-6e638a0afca5", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e008f719-215a-4056-88b9-2c97dddb0173", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a40b47d9-7367-44d7-8c16-d16cd465f594", + "x-ms-correlation-request-id" : "5b752969-6116-47b3-89f6-53e5e9af761f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ioK181clrT2w05Bi04hvAMclN3E\"", + "ETag" : "\"N2LNXWjtzSvt5CV3d0gGjixJbOw\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMTM=;sn=402013", - "x-ms-request-id" : "a40b47d9-7367-44d7-8c16-d16cd465f594", - "Body" : "{\"etag\":\"ioK181clrT2w05Bi04hvAMclN3E\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "ecaebd83-cb6c-4982-b043-6e638a0afca5", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MDU=;sn=448805", + "x-ms-request-id" : "5b752969-6116-47b3-89f6-53e5e9af761f", + "Body" : "{\"etag\":\"N2LNXWjtzSvt5CV3d0gGjixJbOw\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "e008f719-215a-4056-88b9-2c97dddb0173", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "469b35cb-f879-462a-8c12-da04ed706990", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4c1e2c16-6e22-42e7-8a79-20dd4ead125c", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1b89c96d-70ad-40d2-9646-e40c8dab2e98", + "x-ms-correlation-request-id" : "83b39f34-6495-4e41-92d8-4fde7437a3f9", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"NBTbSBMDAVfLONziyDvHHJYMVll\"", + "ETag" : "\"ZU7DVbk6gNRU8GSbYDnKtR7zZpZ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMTQ=;sn=402014", - "x-ms-request-id" : "1b89c96d-70ad-40d2-9646-e40c8dab2e98", - "Body" : "{\"etag\":\"NBTbSBMDAVfLONziyDvHHJYMVll\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "469b35cb-f879-462a-8c12-da04ed706990", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MDY=;sn=448806", + "x-ms-request-id" : "83b39f34-6495-4e41-92d8-4fde7437a3f9", + "Body" : "{\"etag\":\"ZU7DVbk6gNRU8GSbYDnKtR7zZpZ\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "4c1e2c16-6e22-42e7-8a79-20dd4ead125c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9e849b55-42a8-47a8-a36d-f1c309cc0c43", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a3e314c8-9cce-4f78-b61e-0d22939faf75", "Content-Type" : "application/json" }, "Response" : { @@ -106,29 +106,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "0ca8351e-c7a4-4d63-a66e-906d40b8b5a5", + "x-ms-correlation-request-id" : "36e3c2da-6ce5-4b20-9935-0ff3d6ba5682", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"NCYR5T8x21cEqYEbwiWPdqmvyuy\"", + "ETag" : "\"rfSvQqevqGQgIIocj0X7PvFjHGf\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMTU=;sn=402015", - "x-ms-request-id" : "0ca8351e-c7a4-4d63-a66e-906d40b8b5a5", - "Body" : "{\"etag\":\"NCYR5T8x21cEqYEbwiWPdqmvyuy\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "9e849b55-42a8-47a8-a36d-f1c309cc0c43", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MDc=;sn=448807", + "x-ms-request-id" : "36e3c2da-6ce5-4b20-9935-0ff3d6ba5682", + "Body" : "{\"etag\":\"rfSvQqevqGQgIIocj0X7PvFjHGf\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "a3e314c8-9cce-4f78-b61e-0d22939faf75", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "79ce49b6-09a6-41af-8dcb-8022bbcf3764", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2d7a4306-5f18-41fa-8ea0-4faf0d29ea66", "Content-Type" : "application/json" }, "Response" : { @@ -137,29 +137,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "671a5f11-f1b7-48ac-8947-9054b5c4db77", + "x-ms-correlation-request-id" : "d21aa3b0-d5c0-4bea-8612-d130913aa91f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"i9wRVj4QV2SXsuInzCfhBQyxOMB\"", + "ETag" : "\"KevjuE6cKdnVGgFa4YtpzpYGkVj\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMTY=;sn=402016", - "x-ms-request-id" : "671a5f11-f1b7-48ac-8947-9054b5c4db77", - "Body" : "{\"etag\":\"i9wRVj4QV2SXsuInzCfhBQyxOMB\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "79ce49b6-09a6-41af-8dcb-8022bbcf3764", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MDg=;sn=448808", + "x-ms-request-id" : "d21aa3b0-d5c0-4bea-8612-d130913aa91f", + "Body" : "{\"etag\":\"KevjuE6cKdnVGgFa4YtpzpYGkVj\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "2d7a4306-5f18-41fa-8ea0-4faf0d29ea66", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c1ac873d-eda0-4971-92b4-466726f45f63", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c9054208-a30f-41a8-85e8-34cc474b116a", "Content-Type" : "application/json" }, "Response" : { @@ -168,29 +168,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "31953d50-6f10-4ab0-923c-ef00dcb35051", + "x-ms-correlation-request-id" : "bbbaa975-3e9c-44f8-baf8-816068bf784a", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"dZTZmS0Ur9mZpYmzOpHCwnlQnl4\"", + "ETag" : "\"QytFCFuooQFbJGo2glYOWDOH2xy\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMTc=;sn=402017", - "x-ms-request-id" : "31953d50-6f10-4ab0-923c-ef00dcb35051", - "Body" : "{\"etag\":\"dZTZmS0Ur9mZpYmzOpHCwnlQnl4\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "c1ac873d-eda0-4971-92b4-466726f45f63", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MDk=;sn=448809", + "x-ms-request-id" : "bbbaa975-3e9c-44f8-baf8-816068bf784a", + "Body" : "{\"etag\":\"QytFCFuooQFbJGo2glYOWDOH2xy\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}", + "x-ms-client-request-id" : "c9054208-a30f-41a8-85e8-34cc474b116a", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c67c6a3b-a483-45b0-8d3b-42b8895f556f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "959cb11b-fb1c-486b-b1a7-bc072dbd50c6", "Content-Type" : "application/json" }, "Response" : { @@ -199,29 +199,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "dc9f02fc-a7f3-4dee-8e37-6f713a219a4d", + "x-ms-correlation-request-id" : "9606d656-8de9-45e8-a176-042aa3531d7b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"n04n2w6oWvbNPeRcFUOitVpPS88\"", + "ETag" : "\"m1LDZu8e38PNPiDcCAJx5BKz5in\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMTg=;sn=402018", - "x-ms-request-id" : "dc9f02fc-a7f3-4dee-8e37-6f713a219a4d", - "Body" : "{\"etag\":\"n04n2w6oWvbNPeRcFUOitVpPS88\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "c67c6a3b-a483-45b0-8d3b-42b8895f556f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MTA=;sn=448810", + "x-ms-request-id" : "9606d656-8de9-45e8-a176-042aa3531d7b", + "Body" : "{\"etag\":\"m1LDZu8e38PNPiDcCAJx5BKz5in\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "959cb11b-fb1c-486b-b1a7-bc072dbd50c6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6f1b583a-bd79-4c45-8970-b91224fb8230", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4cbbac49-1c3b-4655-8588-60f5f18d6b0c", "Content-Type" : "application/json" }, "Response" : { @@ -230,29 +230,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "dbab8c2d-459b-4b4c-ba11-16c77ed52c26", + "x-ms-correlation-request-id" : "8207e95b-e0c2-4d77-b813-59dcbe8b3af4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"xhlq19immDfDrYbs8mA8KTVUOku\"", + "ETag" : "\"s8L6qQLEEwBt8qcyViGHVVOqs1q\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMTk=;sn=402019", - "x-ms-request-id" : "dbab8c2d-459b-4b4c-ba11-16c77ed52c26", - "Body" : "{\"etag\":\"xhlq19immDfDrYbs8mA8KTVUOku\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "6f1b583a-bd79-4c45-8970-b91224fb8230", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MTE=;sn=448811", + "x-ms-request-id" : "8207e95b-e0c2-4d77-b813-59dcbe8b3af4", + "Body" : "{\"etag\":\"s8L6qQLEEwBt8qcyViGHVVOqs1q\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "4cbbac49-1c3b-4655-8588-60f5f18d6b0c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5eb90856-569e-4ddb-9b82-90c449cf505f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b9d2fd3e-d2ff-452d-9130-3b40332ce8cc", "Content-Type" : "application/json" }, "Response" : { @@ -261,29 +261,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ad76bfcc-2823-4191-b8c5-b48df62e6f74", + "x-ms-correlation-request-id" : "c7be0010-11ce-4085-8b51-7a3f1c0208fe", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"2zBH8uYLyqAQ8GPKlGrNZQ52987\"", + "ETag" : "\"QmbfeQ8N2U7fySscDmziMOVWnFE\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMjA=;sn=402020", - "x-ms-request-id" : "ad76bfcc-2823-4191-b8c5-b48df62e6f74", - "Body" : "{\"etag\":\"2zBH8uYLyqAQ8GPKlGrNZQ52987\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "5eb90856-569e-4ddb-9b82-90c449cf505f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MTI=;sn=448812", + "x-ms-request-id" : "c7be0010-11ce-4085-8b51-7a3f1c0208fe", + "Body" : "{\"etag\":\"QmbfeQ8N2U7fySscDmziMOVWnFE\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "b9d2fd3e-d2ff-452d-9130-3b40332ce8cc", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9012144c-36e8-4409-9fa3-915f5d76a742", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5a200e48-a03c-426f-8531-b07de568cded", "Content-Type" : "application/json" }, "Response" : { @@ -292,29 +292,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4f31261d-ce3e-4ab4-a23f-5ec24ad6f922", + "x-ms-correlation-request-id" : "eac87d63-c735-412b-86da-f107517886cb", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ll334gzYeWMLZdxQoCzTjWvBK0c\"", + "ETag" : "\"G3jjwKLQnjYD1nuyFjo8JP5toPI\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMjE=;sn=402021", - "x-ms-request-id" : "4f31261d-ce3e-4ab4-a23f-5ec24ad6f922", - "Body" : "{\"etag\":\"ll334gzYeWMLZdxQoCzTjWvBK0c\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "9012144c-36e8-4409-9fa3-915f5d76a742", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MTM=;sn=448813", + "x-ms-request-id" : "eac87d63-c735-412b-86da-f107517886cb", + "Body" : "{\"etag\":\"G3jjwKLQnjYD1nuyFjo8JP5toPI\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "5a200e48-a03c-426f-8531-b07de568cded", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ce496ccf-f8dc-4fa2-b4b1-3f5a6e723171", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f1194a9a-1e77-4845-8e15-fb9b3f0af4b5", "Content-Type" : "application/json" }, "Response" : { @@ -323,29 +323,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ee4b85b9-1268-4c15-88b9-9ab5ecdf8365", + "x-ms-correlation-request-id" : "14f816b5-6db1-48ae-bbe4-3eae73555657", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"4A4j3PCOK8WwJ7PPXISewFzYk4V\"", + "ETag" : "\"JXr2Yf7rDhrMw3mNYItItaOt2CY\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMjI=;sn=402022", - "x-ms-request-id" : "ee4b85b9-1268-4c15-88b9-9ab5ecdf8365", - "Body" : "{\"etag\":\"4A4j3PCOK8WwJ7PPXISewFzYk4V\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "ce496ccf-f8dc-4fa2-b4b1-3f5a6e723171", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MTQ=;sn=448814", + "x-ms-request-id" : "14f816b5-6db1-48ae-bbe4-3eae73555657", + "Body" : "{\"etag\":\"JXr2Yf7rDhrMw3mNYItItaOt2CY\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "f1194a9a-1e77-4845-8e15-fb9b3f0af4b5", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cc30eb39-1241-418c-8fbd-4cedb6136e04", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8198071a-171c-4f13-93c5-7c8ec95e31cb", "Content-Type" : "application/json" }, "Response" : { @@ -354,29 +354,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "40551ed5-26ce-43ea-85cd-4507b2c1895d", + "x-ms-correlation-request-id" : "5177fb11-d979-4af7-8edc-666faff783ba", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Ma8pN2mfyfCL9TxeFuluDChm0Od\"", + "ETag" : "\"91XFoa58YgiNcMp4b8H89ikyF0J\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMjM=;sn=402023", - "x-ms-request-id" : "40551ed5-26ce-43ea-85cd-4507b2c1895d", - "Body" : "{\"etag\":\"Ma8pN2mfyfCL9TxeFuluDChm0Od\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "cc30eb39-1241-418c-8fbd-4cedb6136e04", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MTU=;sn=448815", + "x-ms-request-id" : "5177fb11-d979-4af7-8edc-666faff783ba", + "Body" : "{\"etag\":\"91XFoa58YgiNcMp4b8H89ikyF0J\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "8198071a-171c-4f13-93c5-7c8ec95e31cb", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "eaedd4cb-ba30-4890-835b-5577b47ee87b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ee34d6d5-c727-4674-821f-5a7aae59e4ff", "Content-Type" : "application/json" }, "Response" : { @@ -385,29 +385,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "261a2954-7f6b-4a6e-867c-9d78f10175ea", + "x-ms-correlation-request-id" : "f8cebb86-6630-4dfa-a045-8671069bf5c0", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"x8vgzCKSxkgx7sLO7mnFOFQaXv9\"", + "ETag" : "\"vFACikDtVqmtVGUFiLcrOgYFxdp\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMjQ=;sn=402024", - "x-ms-request-id" : "261a2954-7f6b-4a6e-867c-9d78f10175ea", - "Body" : "{\"etag\":\"x8vgzCKSxkgx7sLO7mnFOFQaXv9\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "eaedd4cb-ba30-4890-835b-5577b47ee87b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MTY=;sn=448816", + "x-ms-request-id" : "f8cebb86-6630-4dfa-a045-8671069bf5c0", + "Body" : "{\"etag\":\"vFACikDtVqmtVGUFiLcrOgYFxdp\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "ee34d6d5-c727-4674-821f-5a7aae59e4ff", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3883776b-dff4-497f-844c-a9d3aa238b44", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e3269f8c-0ee8-4256-a0de-e97fc07102f4", "Content-Type" : "application/json" }, "Response" : { @@ -416,29 +416,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b0817f4f-ed6f-41bb-b97a-1618cc8fe317", + "x-ms-correlation-request-id" : "35fdcb66-c68b-4d7f-998c-718a06d8cc88", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"WRhxNESPJltZ5be0d1YzRBXgC0x\"", + "ETag" : "\"c4A6DzudOdeviQHr99hpC0VfXSD\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMjU=;sn=402025", - "x-ms-request-id" : "b0817f4f-ed6f-41bb-b97a-1618cc8fe317", - "Body" : "{\"etag\":\"WRhxNESPJltZ5be0d1YzRBXgC0x\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "3883776b-dff4-497f-844c-a9d3aa238b44", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MTc=;sn=448817", + "x-ms-request-id" : "35fdcb66-c68b-4d7f-998c-718a06d8cc88", + "Body" : "{\"etag\":\"c4A6DzudOdeviQHr99hpC0VfXSD\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "e3269f8c-0ee8-4256-a0de-e97fc07102f4", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "17f7973d-b6d3-4f9e-a67d-a61d9442000d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "783cd9a6-a02a-4d26-bf48-998b9311edfd", "Content-Type" : "application/json" }, "Response" : { @@ -447,29 +447,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "34e7b9c1-4614-4b31-a164-109e35986639", + "x-ms-correlation-request-id" : "b0436e46-a194-495a-bef5-44f114751845", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"tVAVQkz5XbwwmnR5DggfeKdBmc1\"", + "ETag" : "\"ChzWOWvlqOsUDw2p2esCOm0Ci0F\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMjY=;sn=402026", - "x-ms-request-id" : "34e7b9c1-4614-4b31-a164-109e35986639", - "Body" : "{\"etag\":\"tVAVQkz5XbwwmnR5DggfeKdBmc1\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "17f7973d-b6d3-4f9e-a67d-a61d9442000d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MTg=;sn=448818", + "x-ms-request-id" : "b0436e46-a194-495a-bef5-44f114751845", + "Body" : "{\"etag\":\"ChzWOWvlqOsUDw2p2esCOm0Ci0F\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "783cd9a6-a02a-4d26-bf48-998b9311edfd", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9863208e-914c-427a-b92b-51a74a5eec4e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "874ba3a3-f1cf-4f3d-b624-371ed06e78b3", "Content-Type" : "application/json" }, "Response" : { @@ -478,29 +478,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ff9910c8-48fb-411c-8395-72ab81b88602", + "x-ms-correlation-request-id" : "bc638601-a643-44f7-9ea6-9bdc95b3a013", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"V4oU5BIGKAtAAS1kbMgH2uOLd58\"", + "ETag" : "\"bmaAj49gVenK3UwyVkj75UpDJpv\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMjc=;sn=402027", - "x-ms-request-id" : "ff9910c8-48fb-411c-8395-72ab81b88602", - "Body" : "{\"etag\":\"V4oU5BIGKAtAAS1kbMgH2uOLd58\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "9863208e-914c-427a-b92b-51a74a5eec4e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MTk=;sn=448819", + "x-ms-request-id" : "bc638601-a643-44f7-9ea6-9bdc95b3a013", + "Body" : "{\"etag\":\"bmaAj49gVenK3UwyVkj75UpDJpv\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "874ba3a3-f1cf-4f3d-b624-371ed06e78b3", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "597690e4-4130-49bf-8739-7ec605acd134", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "50647cdc-f8b0-4d0f-9f89-a1c5cfc6c2b5", "Content-Type" : "application/json" }, "Response" : { @@ -509,29 +509,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "646d8228-f544-4f86-9e43-e2d5b9cddbdd", + "x-ms-correlation-request-id" : "2e3b7e2b-5fd7-402e-bc95-43212d8880f2", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"EaoKSrDzV8IJQUpvKIuYGvO1Dng\"", + "ETag" : "\"xFbnC0j5yBZQdumUz818nwBHKQn\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMjg=;sn=402028", - "x-ms-request-id" : "646d8228-f544-4f86-9e43-e2d5b9cddbdd", - "Body" : "{\"etag\":\"EaoKSrDzV8IJQUpvKIuYGvO1Dng\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "597690e4-4130-49bf-8739-7ec605acd134", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MjA=;sn=448820", + "x-ms-request-id" : "2e3b7e2b-5fd7-402e-bc95-43212d8880f2", + "Body" : "{\"etag\":\"xFbnC0j5yBZQdumUz818nwBHKQn\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "50647cdc-f8b0-4d0f-9f89-a1c5cfc6c2b5", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "678a5b67-02a5-4323-89a8-baf4251a9465", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "24d44751-5fb3-402a-9f2c-3e10e4969525", "Content-Type" : "application/json" }, "Response" : { @@ -540,29 +540,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "984b0c2d-225c-4f02-b888-fd06c162b149", + "x-ms-correlation-request-id" : "2193c816-7f55-44fe-a2cf-f4af74f18c17", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"RcrTJcs8sjesaxXuRJX8kIkY5Fo\"", + "ETag" : "\"oVETWru8TCWbevFL1dg1QG0oPGM\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMjk=;sn=402029", - "x-ms-request-id" : "984b0c2d-225c-4f02-b888-fd06c162b149", - "Body" : "{\"etag\":\"RcrTJcs8sjesaxXuRJX8kIkY5Fo\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "678a5b67-02a5-4323-89a8-baf4251a9465", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MjE=;sn=448821", + "x-ms-request-id" : "2193c816-7f55-44fe-a2cf-f4af74f18c17", + "Body" : "{\"etag\":\"oVETWru8TCWbevFL1dg1QG0oPGM\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "24d44751-5fb3-402a-9f2c-3e10e4969525", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e30ac0dd-1470-4db5-9ebf-de839e4d6a28", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a81cc62a-4807-41df-a963-af7548f5785f", "Content-Type" : "application/json" }, "Response" : { @@ -571,29 +571,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2bc35b80-fad0-4f34-a4c2-a98101599c1f", + "x-ms-correlation-request-id" : "8a43789e-02cb-4db4-b4d9-fe575233228e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"SJvJ8XLz6NPI0lSE7K9F8X1DWCS\"", + "ETag" : "\"fqgvALZ5JNaFLmJTyRc7Oss4tNz\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMzA=;sn=402030", - "x-ms-request-id" : "2bc35b80-fad0-4f34-a4c2-a98101599c1f", - "Body" : "{\"etag\":\"SJvJ8XLz6NPI0lSE7K9F8X1DWCS\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "e30ac0dd-1470-4db5-9ebf-de839e4d6a28", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MjM=;sn=448823", + "x-ms-request-id" : "8a43789e-02cb-4db4-b4d9-fe575233228e", + "Body" : "{\"etag\":\"fqgvALZ5JNaFLmJTyRc7Oss4tNz\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "a81cc62a-4807-41df-a963-af7548f5785f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4cfeeae2-1997-42c8-bafa-eaeb06f23c9e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "65d8b22f-8f26-4622-ad48-6b38865c1457", "Content-Type" : "application/json" }, "Response" : { @@ -602,29 +602,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7c3f4177-12bd-45bd-99d8-f208ce7036c7", + "x-ms-correlation-request-id" : "a57a79da-d892-4bb4-8aa4-5fc1f906fab6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"U7wOFwJhupWPsL31XVJmxIhZ0Ph\"", + "ETag" : "\"WcL6UvunFbc6CIM75b4nyBFx4mc\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMzE=;sn=402031", - "x-ms-request-id" : "7c3f4177-12bd-45bd-99d8-f208ce7036c7", - "Body" : "{\"etag\":\"U7wOFwJhupWPsL31XVJmxIhZ0Ph\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "4cfeeae2-1997-42c8-bafa-eaeb06f23c9e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MjU=;sn=448825", + "x-ms-request-id" : "a57a79da-d892-4bb4-8aa4-5fc1f906fab6", + "Body" : "{\"etag\":\"WcL6UvunFbc6CIM75b4nyBFx4mc\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "65d8b22f-8f26-4622-ad48-6b38865c1457", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8d88d4fe-f3bd-4ee8-bd8a-45ec84184838", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9352e083-02d2-4c1d-b887-74a7b4216aee", "Content-Type" : "application/json" }, "Response" : { @@ -633,29 +633,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a53b5b2e-08f0-449b-8add-46f400e099a1", + "x-ms-correlation-request-id" : "2a20bbeb-f141-4447-8d6b-601a59effc6d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"tu4iPmRxMQYvks4z9RC4o1GnGP5\"", + "ETag" : "\"6okVqENIsU6ddspEsdPZH5TDQ9M\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMzI=;sn=402032", - "x-ms-request-id" : "a53b5b2e-08f0-449b-8add-46f400e099a1", - "Body" : "{\"etag\":\"tu4iPmRxMQYvks4z9RC4o1GnGP5\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "8d88d4fe-f3bd-4ee8-bd8a-45ec84184838", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4Mjc=;sn=448827", + "x-ms-request-id" : "2a20bbeb-f141-4447-8d6b-601a59effc6d", + "Body" : "{\"etag\":\"6okVqENIsU6ddspEsdPZH5TDQ9M\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "9352e083-02d2-4c1d-b887-74a7b4216aee", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "67810300-29a7-4627-aff8-ef7d5af4d119", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b85a8af7-dae1-41c7-8f9c-63cdc37a552d", "Content-Type" : "application/json" }, "Response" : { @@ -664,29 +664,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4b2a6bc4-053d-47a5-aaf3-4a96d26ca96c", + "x-ms-correlation-request-id" : "141f7308-02d7-4ec7-a699-5e14a1bab01b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"F1EtO0JuW2OtU8pB8zMRckcoeu7\"", + "ETag" : "\"hVyqwgYZZWenEKQmjm7hfQNircs\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMzM=;sn=402033", - "x-ms-request-id" : "4b2a6bc4-053d-47a5-aaf3-4a96d26ca96c", - "Body" : "{\"etag\":\"F1EtO0JuW2OtU8pB8zMRckcoeu7\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "67810300-29a7-4627-aff8-ef7d5af4d119", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4Mjk=;sn=448829", + "x-ms-request-id" : "141f7308-02d7-4ec7-a699-5e14a1bab01b", + "Body" : "{\"etag\":\"hVyqwgYZZWenEKQmjm7hfQNircs\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "b85a8af7-dae1-41c7-8f9c-63cdc37a552d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "63b740f7-1910-446a-8530-50ae48a1e3e8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d6474f93-6515-43f5-8ca2-843256340dc9", "Content-Type" : "application/json" }, "Response" : { @@ -695,29 +695,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "699a40d5-8c38-4633-b79a-1970206c7387", + "x-ms-correlation-request-id" : "3e5c4f16-de08-46b1-bd74-1906902351e7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"sJ7JMKrnOxSy1n693JmhMm8hrFu\"", + "ETag" : "\"TVDXinM9LfzCxgwI8SA06anZYbx\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMzQ=;sn=402034", - "x-ms-request-id" : "699a40d5-8c38-4633-b79a-1970206c7387", - "Body" : "{\"etag\":\"sJ7JMKrnOxSy1n693JmhMm8hrFu\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "63b740f7-1910-446a-8530-50ae48a1e3e8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MzA=;sn=448830", + "x-ms-request-id" : "3e5c4f16-de08-46b1-bd74-1906902351e7", + "Body" : "{\"etag\":\"TVDXinM9LfzCxgwI8SA06anZYbx\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "d6474f93-6515-43f5-8ca2-843256340dc9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a8f0ee62-f575-462e-a107-96747ca2215b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bf90a3ef-5b84-48d2-b5e7-c6667ee0a7ee", "Content-Type" : "application/json" }, "Response" : { @@ -726,29 +726,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "36dd7b1a-3ee5-4551-9880-cc4071e306c0", + "x-ms-correlation-request-id" : "ff8b9c38-3df9-44be-9c9e-67080d098d58", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"BSiEuHiQEwo6gloCsDcK7qC1UsC\"", + "ETag" : "\"3TZafOaickReomPxdfNuFG9sWHc\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMzU=;sn=402035", - "x-ms-request-id" : "36dd7b1a-3ee5-4551-9880-cc4071e306c0", - "Body" : "{\"etag\":\"BSiEuHiQEwo6gloCsDcK7qC1UsC\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}", - "x-ms-client-request-id" : "a8f0ee62-f575-462e-a107-96747ca2215b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MzE=;sn=448831", + "x-ms-request-id" : "ff8b9c38-3df9-44be-9c9e-67080d098d58", + "Body" : "{\"etag\":\"3TZafOaickReomPxdfNuFG9sWHc\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "bf90a3ef-5b84-48d2-b5e7-c6667ee0a7ee", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "598566f7-b0cf-4f13-b1e6-fd0bcadf3398", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7528d349-f8b4-43c5-8775-da5adec807d3", "Content-Type" : "application/json" }, "Response" : { @@ -757,29 +757,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b8cb214f-1e72-4ea2-b453-36087c33bc5c", + "x-ms-correlation-request-id" : "cb6541fc-c2b5-4ba4-a333-2c1cda448652", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"JJ4MfFb1kCaYzqQ7Tnjg40Kcwv0\"", + "ETag" : "\"HpK3Y0Cv6HvKPhfT6l49E8xGubq\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMzY=;sn=402036", - "x-ms-request-id" : "b8cb214f-1e72-4ea2-b453-36087c33bc5c", - "Body" : "{\"etag\":\"JJ4MfFb1kCaYzqQ7Tnjg40Kcwv0\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "598566f7-b0cf-4f13-b1e6-fd0bcadf3398", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MzI=;sn=448832", + "x-ms-request-id" : "cb6541fc-c2b5-4ba4-a333-2c1cda448652", + "Body" : "{\"etag\":\"HpK3Y0Cv6HvKPhfT6l49E8xGubq\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "7528d349-f8b4-43c5-8775-da5adec807d3", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b0b18c01-44e3-4798-9af7-bd0da35c3bbd", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0376a8c6-47c5-487c-836f-00d8b9a44706", "Content-Type" : "application/json" }, "Response" : { @@ -788,29 +788,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d1ba6c57-9638-43e3-8c11-34ba5f987fd4", + "x-ms-correlation-request-id" : "b230e989-098f-42f7-9baa-9e99500dec21", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"5CsTAn5AL1yPbrrB8KMb185smep\"", + "ETag" : "\"VrkzZjCCOue53dy9wyHuw4z2jFb\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMzc=;sn=402037", - "x-ms-request-id" : "d1ba6c57-9638-43e3-8c11-34ba5f987fd4", - "Body" : "{\"etag\":\"5CsTAn5AL1yPbrrB8KMb185smep\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "b0b18c01-44e3-4798-9af7-bd0da35c3bbd", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MzM=;sn=448833", + "x-ms-request-id" : "b230e989-098f-42f7-9baa-9e99500dec21", + "Body" : "{\"etag\":\"VrkzZjCCOue53dy9wyHuw4z2jFb\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "0376a8c6-47c5-487c-836f-00d8b9a44706", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "76ba4148-615e-4641-b836-2fde33b364dc", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0e49ea87-3581-4ff2-a886-cd5db2dadfa3", "Content-Type" : "application/json" }, "Response" : { @@ -819,29 +819,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "590d6471-4f76-4fdd-9bf9-64a171e387dd", + "x-ms-correlation-request-id" : "3d02a4f1-17b1-4fc0-92ef-f0f59b3739ec", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"JSi62HWxL37Y737EXUfLvwKYp7f\"", + "ETag" : "\"BnvyN2q1L8JAKqYSJyfAfrI7Dzq\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwMzk=;sn=402039", - "x-ms-request-id" : "590d6471-4f76-4fdd-9bf9-64a171e387dd", - "Body" : "{\"etag\":\"JSi62HWxL37Y737EXUfLvwKYp7f\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "76ba4148-615e-4641-b836-2fde33b364dc", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MzQ=;sn=448834", + "x-ms-request-id" : "3d02a4f1-17b1-4fc0-92ef-f0f59b3739ec", + "Body" : "{\"etag\":\"BnvyN2q1L8JAKqYSJyfAfrI7Dzq\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "0e49ea87-3581-4ff2-a886-cd5db2dadfa3", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2f391a8e-40cf-42e1-ada8-bc8b8aba7c7c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7f2394dd-e50c-4649-9dba-f9f9c7593948", "Content-Type" : "application/json" }, "Response" : { @@ -850,29 +850,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:58 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:09 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9775f87d-58ee-4509-8c13-8c953d14473b", + "x-ms-correlation-request-id" : "c09b080d-b824-4dbc-8134-1d3ba1fca675", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"AHZioZVeIVkH7VS7HmMPDiIL6JJ\"", + "ETag" : "\"13UGPn3gQhzboECtTNTkBL6lg8D\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNDA=;sn=402040", - "x-ms-request-id" : "9775f87d-58ee-4509-8c13-8c953d14473b", - "Body" : "{\"etag\":\"AHZioZVeIVkH7VS7HmMPDiIL6JJ\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "2f391a8e-40cf-42e1-ada8-bc8b8aba7c7c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MzU=;sn=448835", + "x-ms-request-id" : "c09b080d-b824-4dbc-8134-1d3ba1fca675", + "Body" : "{\"etag\":\"13UGPn3gQhzboECtTNTkBL6lg8D\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "7f2394dd-e50c-4649-9dba-f9f9c7593948", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6d2cff58-e33d-4121-ac1b-ecb2142ec0ea", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7b743be7-2aa8-435c-bf5e-e3dd3286e528", "Content-Type" : "application/json" }, "Response" : { @@ -881,29 +881,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "aba667ca-9c1d-4306-80e9-42014b249e21", + "x-ms-correlation-request-id" : "0673705d-2359-4ada-800d-80192bb53885", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"2y1CKwZJ7L1yDyeABDdvF8nt2i5\"", + "ETag" : "\"QsxUrvBmOrfXiwdQAJM9Goy0fyN\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNDE=;sn=402041", - "x-ms-request-id" : "aba667ca-9c1d-4306-80e9-42014b249e21", - "Body" : "{\"etag\":\"2y1CKwZJ7L1yDyeABDdvF8nt2i5\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "6d2cff58-e33d-4121-ac1b-ecb2142ec0ea", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4MzY=;sn=448836", + "x-ms-request-id" : "0673705d-2359-4ada-800d-80192bb53885", + "Body" : "{\"etag\":\"QsxUrvBmOrfXiwdQAJM9Goy0fyN\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "7b743be7-2aa8-435c-bf5e-e3dd3286e528", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "418a4e49-3a7a-4c5e-a3ec-3f1ccaf628ae", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fddb52b3-86ce-428f-909b-62f00191f973", "Content-Type" : "application/json" }, "Response" : { @@ -912,29 +912,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:10 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7c888e0a-d657-4dd8-915b-be06bf945661", + "x-ms-correlation-request-id" : "06c55095-c6dd-4790-a292-322f861420f5", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"lLgDi4TTmkZo4hhiWaBADtED3Pw\"", + "ETag" : "\"S0thi08VjYCNlZTGCwKNXz7FgHA\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNDI=;sn=402042", - "x-ms-request-id" : "7c888e0a-d657-4dd8-915b-be06bf945661", - "Body" : "{\"etag\":\"lLgDi4TTmkZo4hhiWaBADtED3Pw\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "418a4e49-3a7a-4c5e-a3ec-3f1ccaf628ae", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4Mzc=;sn=448837", + "x-ms-request-id" : "06c55095-c6dd-4790-a292-322f861420f5", + "Body" : "{\"etag\":\"S0thi08VjYCNlZTGCwKNXz7FgHA\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"}", + "x-ms-client-request-id" : "fddb52b3-86ce-428f-909b-62f00191f973", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "35c98324-fcd6-4bd2-9727-092d9f291b46", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "06bad403-7b06-4ecf-ac00-0a16b2db5929", "Content-Type" : "application/json" }, "Response" : { @@ -943,29 +943,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "687542ce-3c1c-49bb-b5b4-f7a9be03e8b9", + "x-ms-correlation-request-id" : "ae0b96ea-e225-4ebf-8e43-021a19b9bd06", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Vy1hLAx3uzFY4u8bIJX1NwsMxLA\"", + "ETag" : "\"wsPM9ihC74RF9d94E9JEzcXXHTP\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNDM=;sn=402043", - "x-ms-request-id" : "687542ce-3c1c-49bb-b5b4-f7a9be03e8b9", - "Body" : "{\"etag\":\"Vy1hLAx3uzFY4u8bIJX1NwsMxLA\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "35c98324-fcd6-4bd2-9727-092d9f291b46", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4Mzg=;sn=448838", + "x-ms-request-id" : "ae0b96ea-e225-4ebf-8e43-021a19b9bd06", + "Body" : "{\"etag\":\"wsPM9ihC74RF9d94E9JEzcXXHTP\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"}", + "x-ms-client-request-id" : "06bad403-7b06-4ecf-ac00-0a16b2db5929", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "15e2bf42-d7cf-4991-967c-3734328a58d8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d667333c-74b4-4d8c-a8ea-7ab081d3695b", "Content-Type" : "application/json" }, "Response" : { @@ -974,29 +974,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6cdac5c9-9e49-413f-9a18-051b5345ddae", + "x-ms-correlation-request-id" : "287ecca5-6b34-440b-83b6-37fab67a8857", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"aKmK1EJiYpzr9Urv1BKn9vsIE0k\"", + "ETag" : "\"ThClQgFSID2iT4f501eO1Mp66Hp\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNDQ=;sn=402044", - "x-ms-request-id" : "6cdac5c9-9e49-413f-9a18-051b5345ddae", - "Body" : "{\"etag\":\"aKmK1EJiYpzr9Urv1BKn9vsIE0k\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "15e2bf42-d7cf-4991-967c-3734328a58d8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4Mzk=;sn=448839", + "x-ms-request-id" : "287ecca5-6b34-440b-83b6-37fab67a8857", + "Body" : "{\"etag\":\"ThClQgFSID2iT4f501eO1Mp66Hp\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"}", + "x-ms-client-request-id" : "d667333c-74b4-4d8c-a8ea-7ab081d3695b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b479b563-561b-465d-9abe-99cb2973b25b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f6cc8401-8e0e-409f-9324-c836c0e98204", "Content-Type" : "application/json" }, "Response" : { @@ -1005,29 +1005,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "20ed0a24-db67-4fb6-a41a-e5341c55f5ec", + "x-ms-correlation-request-id" : "627efc08-8f8d-44cb-8aa1-d022a9a2b4cc", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"qGEwSOcNrPAWccey3FzMKaP4YgN\"", + "ETag" : "\"BkxbbBxY4Cxksx2URX1HcNKDK0t\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNDU=;sn=402045", - "x-ms-request-id" : "20ed0a24-db67-4fb6-a41a-e5341c55f5ec", - "Body" : "{\"etag\":\"qGEwSOcNrPAWccey3FzMKaP4YgN\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "b479b563-561b-465d-9abe-99cb2973b25b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NDA=;sn=448840", + "x-ms-request-id" : "627efc08-8f8d-44cb-8aa1-d022a9a2b4cc", + "Body" : "{\"etag\":\"BkxbbBxY4Cxksx2URX1HcNKDK0t\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"}", + "x-ms-client-request-id" : "f6cc8401-8e0e-409f-9324-c836c0e98204", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6936e18d-64ee-438a-8abf-25a6a51c3e33", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "69d6eaa7-5ff7-4175-81cb-8c720ab186cc", "Content-Type" : "application/json" }, "Response" : { @@ -1036,29 +1036,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a4f878f8-8d46-42ca-b4a9-81375a1ac8c7", + "x-ms-correlation-request-id" : "27efa52d-0fd6-40e2-be0c-dbac14e0ba50", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"2mfk3KgLOZhu18wsjmlG4PDRKcp\"", + "ETag" : "\"MjFoUnlvtwJ8MX5vwpu1EsiUmzQ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNDY=;sn=402046", - "x-ms-request-id" : "a4f878f8-8d46-42ca-b4a9-81375a1ac8c7", - "Body" : "{\"etag\":\"2mfk3KgLOZhu18wsjmlG4PDRKcp\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "6936e18d-64ee-438a-8abf-25a6a51c3e33", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NDE=;sn=448841", + "x-ms-request-id" : "27efa52d-0fd6-40e2-be0c-dbac14e0ba50", + "Body" : "{\"etag\":\"MjFoUnlvtwJ8MX5vwpu1EsiUmzQ\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"}", + "x-ms-client-request-id" : "69d6eaa7-5ff7-4175-81cb-8c720ab186cc", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "92f73c30-aeb9-43f8-bd03-953eae3e61c4", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f10aaba7-0389-49c3-b19f-4d9e8f921299", "Content-Type" : "application/json" }, "Response" : { @@ -1067,29 +1067,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "026059fd-3683-448b-8b76-0e2fe8bcb0d3", + "x-ms-correlation-request-id" : "1ab389c6-96e1-402e-a5b9-0caa10f687db", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"B3WWdx34hkpJZeWWHlm4qvYNkzJ\"", + "ETag" : "\"wPqBkjkFKq5wUXd3ZaqiOgdCor7\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNDc=;sn=402047", - "x-ms-request-id" : "026059fd-3683-448b-8b76-0e2fe8bcb0d3", - "Body" : "{\"etag\":\"B3WWdx34hkpJZeWWHlm4qvYNkzJ\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "92f73c30-aeb9-43f8-bd03-953eae3e61c4", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NDI=;sn=448842", + "x-ms-request-id" : "1ab389c6-96e1-402e-a5b9-0caa10f687db", + "Body" : "{\"etag\":\"wPqBkjkFKq5wUXd3ZaqiOgdCor7\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"}", + "x-ms-client-request-id" : "f10aaba7-0389-49c3-b19f-4d9e8f921299", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "19b9b4e1-be0c-44b5-b69f-0bc382c92a11", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "966acc77-e2a5-4805-9d31-7f0a9c5a0bdf", "Content-Type" : "application/json" }, "Response" : { @@ -1098,29 +1098,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4c901a5c-f36a-4497-adfb-cf2fd2d8af74", + "x-ms-correlation-request-id" : "9f77b3fa-bee5-4691-978f-1c0a73aabe22", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"OzXNw33DyHIga2Qgwzc4onr1f6o\"", + "ETag" : "\"merAHFhlsqpjpmFywwgNWzsjVW8\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNDg=;sn=402048", - "x-ms-request-id" : "4c901a5c-f36a-4497-adfb-cf2fd2d8af74", - "Body" : "{\"etag\":\"OzXNw33DyHIga2Qgwzc4onr1f6o\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "19b9b4e1-be0c-44b5-b69f-0bc382c92a11", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NDM=;sn=448843", + "x-ms-request-id" : "9f77b3fa-bee5-4691-978f-1c0a73aabe22", + "Body" : "{\"etag\":\"merAHFhlsqpjpmFywwgNWzsjVW8\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"}", + "x-ms-client-request-id" : "966acc77-e2a5-4805-9d31-7f0a9c5a0bdf", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "03a728a6-b2dc-4800-a640-662fb64346ac", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "15bd9876-fe6f-410f-94b4-66b8bb9cf345", "Content-Type" : "application/json" }, "Response" : { @@ -1129,29 +1129,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d8f969a5-cb28-4294-b44e-6d8541018430", + "x-ms-correlation-request-id" : "2a1d7168-3c04-4265-a58b-4dcbd77a9b6b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"lhX5LSkJ68WcT0Cr5Z6fHzXlSSd\"", + "ETag" : "\"9cz9tvzTy2ut6xWeYAUgGH6QTIy\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNDk=;sn=402049", - "x-ms-request-id" : "d8f969a5-cb28-4294-b44e-6d8541018430", - "Body" : "{\"etag\":\"lhX5LSkJ68WcT0Cr5Z6fHzXlSSd\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "03a728a6-b2dc-4800-a640-662fb64346ac", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NDQ=;sn=448844", + "x-ms-request-id" : "2a1d7168-3c04-4265-a58b-4dcbd77a9b6b", + "Body" : "{\"etag\":\"9cz9tvzTy2ut6xWeYAUgGH6QTIy\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"}", + "x-ms-client-request-id" : "15bd9876-fe6f-410f-94b4-66b8bb9cf345", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7b3d9a4b-4abf-4499-b44e-8a171d91680e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6cabc595-b355-452b-a8e9-a58193465042", "Content-Type" : "application/json" }, "Response" : { @@ -1160,29 +1160,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7ebccc57-b222-4ad5-b7b2-46d51d489d1d", + "x-ms-correlation-request-id" : "d06a183a-5075-412a-ad61-04bc1ecbcc2c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ElM76b2WEMkMeTHGwlk3VMJOZQ9\"", + "ETag" : "\"KDvf8eqzeLb1gfuHYMzVaQefLzc\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNTA=;sn=402050", - "x-ms-request-id" : "7ebccc57-b222-4ad5-b7b2-46d51d489d1d", - "Body" : "{\"etag\":\"ElM76b2WEMkMeTHGwlk3VMJOZQ9\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "7b3d9a4b-4abf-4499-b44e-8a171d91680e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NDU=;sn=448845", + "x-ms-request-id" : "d06a183a-5075-412a-ad61-04bc1ecbcc2c", + "Body" : "{\"etag\":\"KDvf8eqzeLb1gfuHYMzVaQefLzc\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"}", + "x-ms-client-request-id" : "6cabc595-b355-452b-a8e9-a58193465042", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "835184ff-ca9b-448d-a742-b0153ebcad3a", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7f7ffab5-219c-4c81-9b2d-166734e0cc5c", "Content-Type" : "application/json" }, "Response" : { @@ -1191,29 +1191,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "eecb617c-d8ee-4014-b357-5944f22f4791", + "x-ms-correlation-request-id" : "55c47b7d-622c-428d-9fef-ffb3801d3361", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"biv8FsDjeTJ1mItQrHwgUKgnaPr\"", + "ETag" : "\"c5v9GMQzDzEYwlex7hEbKdcuABg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNTE=;sn=402051", - "x-ms-request-id" : "eecb617c-d8ee-4014-b357-5944f22f4791", - "Body" : "{\"etag\":\"biv8FsDjeTJ1mItQrHwgUKgnaPr\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "835184ff-ca9b-448d-a742-b0153ebcad3a", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NDY=;sn=448846", + "x-ms-request-id" : "55c47b7d-622c-428d-9fef-ffb3801d3361", + "Body" : "{\"etag\":\"c5v9GMQzDzEYwlex7hEbKdcuABg\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"}", + "x-ms-client-request-id" : "7f7ffab5-219c-4c81-9b2d-166734e0cc5c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "721108ff-45e4-44d2-8790-d8e5dca11c80", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4f2ca347-78c0-43f7-8e96-eb2ac0d20b57", "Content-Type" : "application/json" }, "Response" : { @@ -1222,29 +1222,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:59 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f30ad490-df40-4687-a897-f5388ce33718", + "x-ms-correlation-request-id" : "75cf7653-3981-452e-80da-be4ff9295b84", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"cBA1GU8GbtYnZUNgwycKwvAnPCS\"", + "ETag" : "\"gRPRD6gCueNtvcEB3xDHPIdkPJA\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNTI=;sn=402052", - "x-ms-request-id" : "f30ad490-df40-4687-a897-f5388ce33718", - "Body" : "{\"etag\":\"cBA1GU8GbtYnZUNgwycKwvAnPCS\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"}", - "x-ms-client-request-id" : "721108ff-45e4-44d2-8790-d8e5dca11c80", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NDc=;sn=448847", + "x-ms-request-id" : "75cf7653-3981-452e-80da-be4ff9295b84", + "Body" : "{\"etag\":\"gRPRD6gCueNtvcEB3xDHPIdkPJA\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"}", + "x-ms-client-request-id" : "4f2ca347-78c0-43f7-8e96-eb2ac0d20b57", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "31dbcdf2-3554-4692-960a-54524e269e9f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "27f20633-ab06-4623-b959-5b888cfa6164", "Content-Type" : "application/json" }, "Response" : { @@ -1253,29 +1253,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "bfd51dd9-7bb8-450b-88d4-5f6a96f88fed", + "x-ms-correlation-request-id" : "780ccc33-df17-4e7e-978b-070ad4fa8f49", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"4ZIJbgsu27loMAKDKSjxOCXney7\"", + "ETag" : "\"ypbuvCHZZ6gaeJdunbKTPgosul1\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNTM=;sn=402053", - "x-ms-request-id" : "bfd51dd9-7bb8-450b-88d4-5f6a96f88fed", - "Body" : "{\"etag\":\"4ZIJbgsu27loMAKDKSjxOCXney7\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"}", - "x-ms-client-request-id" : "31dbcdf2-3554-4692-960a-54524e269e9f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NDg=;sn=448848", + "x-ms-request-id" : "780ccc33-df17-4e7e-978b-070ad4fa8f49", + "Body" : "{\"etag\":\"ypbuvCHZZ6gaeJdunbKTPgosul1\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"}", + "x-ms-client-request-id" : "27f20633-ab06-4623-b959-5b888cfa6164", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8f73aee5-8054-4f45-ad03-2b1b6f1caa6b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8409b7ce-0af3-41ec-84ec-82018632e216", "Content-Type" : "application/json" }, "Response" : { @@ -1284,29 +1284,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:10 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2264c5ff-b354-443f-bd98-0faec7605767", + "x-ms-correlation-request-id" : "72930d4c-1242-4435-b9aa-108204e2804d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"yvJ0B4uPSMa9Cwimy2yBr5n9OeB\"", + "ETag" : "\"UyhwBqaATswEGGj8MkqAGuaGgqp\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNTQ=;sn=402054", - "x-ms-request-id" : "2264c5ff-b354-443f-bd98-0faec7605767", - "Body" : "{\"etag\":\"yvJ0B4uPSMa9Cwimy2yBr5n9OeB\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"}", - "x-ms-client-request-id" : "8f73aee5-8054-4f45-ad03-2b1b6f1caa6b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NDk=;sn=448849", + "x-ms-request-id" : "72930d4c-1242-4435-b9aa-108204e2804d", + "Body" : "{\"etag\":\"UyhwBqaATswEGGj8MkqAGuaGgqp\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"}", + "x-ms-client-request-id" : "8409b7ce-0af3-41ec-84ec-82018632e216", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "92c7f85f-baf9-48f2-938e-0bec067c34a2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9457c622-4b79-4751-a219-4a932ec47d1d", "Content-Type" : "application/json" }, "Response" : { @@ -1315,29 +1315,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:12 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:12 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "61c3234a-968e-457b-adcb-0618556ab476", + "x-ms-correlation-request-id" : "323ad094-8b48-4c87-91eb-b274d461869f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"da40iYwVJmquY0kHa4CEAscs2U1\"", + "ETag" : "\"FXz5aNjiAv4zWkD5PfsY7c9WdqM\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNTU=;sn=402055", - "x-ms-request-id" : "61c3234a-968e-457b-adcb-0618556ab476", - "Body" : "{\"etag\":\"da40iYwVJmquY0kHa4CEAscs2U1\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"}", - "x-ms-client-request-id" : "92c7f85f-baf9-48f2-938e-0bec067c34a2", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTA=;sn=448850", + "x-ms-request-id" : "323ad094-8b48-4c87-91eb-b274d461869f", + "Body" : "{\"etag\":\"FXz5aNjiAv4zWkD5PfsY7c9WdqM\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:12+00:00\"}", + "x-ms-client-request-id" : "9457c622-4b79-4751-a219-4a932ec47d1d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "30902489-7d19-482f-a837-f7fb6963646d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "20747007-b9a1-470b-a527-09fe84047c63", "Content-Type" : "application/json" }, "Response" : { @@ -1346,29 +1346,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:13 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:12 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "302b3362-c028-4c6e-bc3d-0f22b9bc4b60", + "x-ms-correlation-request-id" : "f2b5754e-e17c-4699-8978-814585ab888b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ug6jmv4SgxyOKOJ1mzbmTMu84KX\"", + "ETag" : "\"qZPXBV7Ag6SONsrgdBRnMzGHOSD\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNTY=;sn=402056", - "x-ms-request-id" : "302b3362-c028-4c6e-bc3d-0f22b9bc4b60", - "Body" : "{\"etag\":\"ug6jmv4SgxyOKOJ1mzbmTMu84KX\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"}", - "x-ms-client-request-id" : "30902489-7d19-482f-a837-f7fb6963646d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTE=;sn=448851", + "x-ms-request-id" : "f2b5754e-e17c-4699-8978-814585ab888b", + "Body" : "{\"etag\":\"qZPXBV7Ag6SONsrgdBRnMzGHOSD\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"}", + "x-ms-client-request-id" : "20747007-b9a1-470b-a527-09fe84047c63", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ba7eec96-a0ef-438d-b478-b579510f6cd8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "542ab5c7-a05e-481f-bd96-8620203d53ed", "Content-Type" : "application/json" }, "Response" : { @@ -1377,29 +1377,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:13 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:12 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "10d5a24a-0e7b-4b55-a071-b469bd97a4b3", + "x-ms-correlation-request-id" : "6488361d-6c00-4011-a256-b5e7c88a283f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"PYpc7lKuZsGWBWzlBJLVsSjYW6U\"", + "ETag" : "\"6q67VxKcQ41fnjr3dYsensjMxSs\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNTc=;sn=402057", - "x-ms-request-id" : "10d5a24a-0e7b-4b55-a071-b469bd97a4b3", - "Body" : "{\"etag\":\"PYpc7lKuZsGWBWzlBJLVsSjYW6U\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"}", - "x-ms-client-request-id" : "ba7eec96-a0ef-438d-b478-b579510f6cd8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTI=;sn=448852", + "x-ms-request-id" : "6488361d-6c00-4011-a256-b5e7c88a283f", + "Body" : "{\"etag\":\"6q67VxKcQ41fnjr3dYsensjMxSs\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"}", + "x-ms-client-request-id" : "542ab5c7-a05e-481f-bd96-8620203d53ed", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f009bf6f-dba2-4f65-9d33-c520289e2218", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "42cfd3a0-d35e-44b7-9dbc-befe69942407", "Content-Type" : "application/json" }, "Response" : { @@ -1408,29 +1408,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:13 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:12 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "78c6e51e-3dd5-4af4-9912-6a63af212169", + "x-ms-correlation-request-id" : "8a4f539e-317b-4f47-aed6-79e894c3b5fc", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"GcIgiS8X0cqeuJf3cbgZQvypeUy\"", + "ETag" : "\"h9PYktLctzF49ob9jaWYEOcFULc\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNTg=;sn=402058", - "x-ms-request-id" : "78c6e51e-3dd5-4af4-9912-6a63af212169", - "Body" : "{\"etag\":\"GcIgiS8X0cqeuJf3cbgZQvypeUy\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"}", - "x-ms-client-request-id" : "f009bf6f-dba2-4f65-9d33-c520289e2218", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTM=;sn=448853", + "x-ms-request-id" : "8a4f539e-317b-4f47-aed6-79e894c3b5fc", + "Body" : "{\"etag\":\"h9PYktLctzF49ob9jaWYEOcFULc\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"}", + "x-ms-client-request-id" : "42cfd3a0-d35e-44b7-9dbc-befe69942407", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "dc9b748b-f663-41e9-b8f0-ee23faf79bc2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "aa3ce70a-8a4c-4a60-857f-8e8ce1a62490", "Content-Type" : "application/json" }, "Response" : { @@ -1439,29 +1439,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:13 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:12 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "50deaed2-3499-412e-97ed-49004b12caca", + "x-ms-correlation-request-id" : "02734745-f05f-4b3c-9174-6f6cf6b24cc4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"m8LwfgeyyFe1G7Kf6OfSy95gwf5\"", + "ETag" : "\"GYCNqA7I5ddzK5FL2ScnFK9bQSO\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNTk=;sn=402059", - "x-ms-request-id" : "50deaed2-3499-412e-97ed-49004b12caca", - "Body" : "{\"etag\":\"m8LwfgeyyFe1G7Kf6OfSy95gwf5\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"}", - "x-ms-client-request-id" : "dc9b748b-f663-41e9-b8f0-ee23faf79bc2", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTQ=;sn=448854", + "x-ms-request-id" : "02734745-f05f-4b3c-9174-6f6cf6b24cc4", + "Body" : "{\"etag\":\"GYCNqA7I5ddzK5FL2ScnFK9bQSO\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"}", + "x-ms-client-request-id" : "aa3ce70a-8a4c-4a60-857f-8e8ce1a62490", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7a2aad62-1a43-4746-a08a-17a7009ac9a1", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e28602dd-0675-4d12-9878-4e691ecab61c", "Content-Type" : "application/json" }, "Response" : { @@ -1470,29 +1470,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:13 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:12 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "8751e685-edd9-472a-aadb-8f60b978ba8a", + "x-ms-correlation-request-id" : "a8269940-e89e-419c-9d99-c6494ba72a2d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"g6cKAEFeFT4N8yYz63ZZ5Mo6dqU\"", + "ETag" : "\"Tqv2aWozv7Z2HAStQgjWEzt2a8M\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjA=;sn=402060", - "x-ms-request-id" : "8751e685-edd9-472a-aadb-8f60b978ba8a", - "Body" : "{\"etag\":\"g6cKAEFeFT4N8yYz63ZZ5Mo6dqU\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"}", - "x-ms-client-request-id" : "7a2aad62-1a43-4746-a08a-17a7009ac9a1", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTU=;sn=448855", + "x-ms-request-id" : "a8269940-e89e-419c-9d99-c6494ba72a2d", + "Body" : "{\"etag\":\"Tqv2aWozv7Z2HAStQgjWEzt2a8M\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"}", + "x-ms-client-request-id" : "e28602dd-0675-4d12-9878-4e691ecab61c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c190e939-fca2-485c-b634-6d27034bccdb", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "db9538ca-bcad-46da-9081-f6b20c1c5226", "Content-Type" : "application/json" }, "Response" : { @@ -1501,29 +1501,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:13 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:13 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b117d90e-51ee-4dbb-a46d-d56d5b4ef460", + "x-ms-correlation-request-id" : "fe8ccf52-4e56-4efb-aea9-989ebb64e54b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"IKBeeVA1e6iGdA06qJqxnfQZ9Q2\"", + "ETag" : "\"IaDjAWGI8BNjdFzRuFSXo244xGW\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjE=;sn=402061", - "x-ms-request-id" : "b117d90e-51ee-4dbb-a46d-d56d5b4ef460", - "Body" : "{\"etag\":\"IKBeeVA1e6iGdA06qJqxnfQZ9Q2\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"}", - "x-ms-client-request-id" : "c190e939-fca2-485c-b634-6d27034bccdb", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTY=;sn=448856", + "x-ms-request-id" : "fe8ccf52-4e56-4efb-aea9-989ebb64e54b", + "Body" : "{\"etag\":\"IaDjAWGI8BNjdFzRuFSXo244xGW\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"}", + "x-ms-client-request-id" : "db9538ca-bcad-46da-9081-f6b20c1c5226", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "dae6b658-2e79-42e3-8916-999d0bfa4eda", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "94203ec0-2271-43b3-9d5b-cc9154f0abea", "Content-Type" : "application/json" }, "Response" : { @@ -1532,29 +1532,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:15 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:14 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "46bd1ea5-9f3e-4787-9d4d-54b90f879441", + "x-ms-correlation-request-id" : "4975ad39-9548-4c05-8f97-586530e23dd4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ce2NQ90DuIAQH7D9brDhjjXmgXX\"", + "ETag" : "\"ul83jMJqU9ed1Bj4pyJxlSVj4Aq\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjI=;sn=402062", - "x-ms-request-id" : "46bd1ea5-9f3e-4787-9d4d-54b90f879441", - "Body" : "{\"etag\":\"ce2NQ90DuIAQH7D9brDhjjXmgXX\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"}", - "x-ms-client-request-id" : "dae6b658-2e79-42e3-8916-999d0bfa4eda", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTc=;sn=448857", + "x-ms-request-id" : "4975ad39-9548-4c05-8f97-586530e23dd4", + "Body" : "{\"etag\":\"ul83jMJqU9ed1Bj4pyJxlSVj4Aq\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:15+00:00\"}", + "x-ms-client-request-id" : "94203ec0-2271-43b3-9d5b-cc9154f0abea", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key79829&label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key76033&label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9f69d0fd-e500-43ac-88d5-353f9a5067ef", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "12538e00-a68d-4e90-bd61-b0a9468ea15d", "Content-Type" : "application/json" }, "Response" : { @@ -1565,26 +1565,26 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:14 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "beedef28-d55d-4369-870a-2004d595409e", + "x-ms-correlation-request-id" : "91351f46-76ea-4ef5-ac2b-216df21a83a0", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjI=;sn=402062", - "x-ms-request-id" : "beedef28-d55d-4369-870a-2004d595409e", - "Body" : "{\"items\":[{\"etag\":\"ce2NQ90DuIAQH7D9brDhjjXmgXX\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"IKBeeVA1e6iGdA06qJqxnfQZ9Q2\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"g6cKAEFeFT4N8yYz63ZZ5Mo6dqU\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"m8LwfgeyyFe1G7Kf6OfSy95gwf5\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"GcIgiS8X0cqeuJf3cbgZQvypeUy\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"PYpc7lKuZsGWBWzlBJLVsSjYW6U\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"ug6jmv4SgxyOKOJ1mzbmTMu84KX\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"da40iYwVJmquY0kHa4CEAscs2U1\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"yvJ0B4uPSMa9Cwimy2yBr5n9OeB\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"4ZIJbgsu27loMAKDKSjxOCXney7\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"cBA1GU8GbtYnZUNgwycKwvAnPCS\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"biv8FsDjeTJ1mItQrHwgUKgnaPr\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"ElM76b2WEMkMeTHGwlk3VMJOZQ9\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"lhX5LSkJ68WcT0Cr5Z6fHzXlSSd\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"OzXNw33DyHIga2Qgwzc4onr1f6o\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"B3WWdx34hkpJZeWWHlm4qvYNkzJ\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"2mfk3KgLOZhu18wsjmlG4PDRKcp\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"qGEwSOcNrPAWccey3FzMKaP4YgN\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"aKmK1EJiYpzr9Urv1BKn9vsIE0k\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"Vy1hLAx3uzFY4u8bIJX1NwsMxLA\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"lLgDi4TTmkZo4hhiWaBADtED3Pw\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"2y1CKwZJ7L1yDyeABDdvF8nt2i5\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"AHZioZVeIVkH7VS7HmMPDiIL6JJ\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"JSi62HWxL37Y737EXUfLvwKYp7f\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"5CsTAn5AL1yPbrrB8KMb185smep\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"JJ4MfFb1kCaYzqQ7Tnjg40Kcwv0\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"BSiEuHiQEwo6gloCsDcK7qC1UsC\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"sJ7JMKrnOxSy1n693JmhMm8hrFu\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"F1EtO0JuW2OtU8pB8zMRckcoeu7\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"tu4iPmRxMQYvks4z9RC4o1GnGP5\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"U7wOFwJhupWPsL31XVJmxIhZ0Ph\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"SJvJ8XLz6NPI0lSE7K9F8X1DWCS\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"RcrTJcs8sjesaxXuRJX8kIkY5Fo\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"EaoKSrDzV8IJQUpvKIuYGvO1Dng\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"V4oU5BIGKAtAAS1kbMgH2uOLd58\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"tVAVQkz5XbwwmnR5DggfeKdBmc1\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"WRhxNESPJltZ5be0d1YzRBXgC0x\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"x8vgzCKSxkgx7sLO7mnFOFQaXv9\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"Ma8pN2mfyfCL9TxeFuluDChm0Od\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"4A4j3PCOK8WwJ7PPXISewFzYk4V\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"ll334gzYeWMLZdxQoCzTjWvBK0c\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"2zBH8uYLyqAQ8GPKlGrNZQ52987\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"xhlq19immDfDrYbs8mA8KTVUOku\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"n04n2w6oWvbNPeRcFUOitVpPS88\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"dZTZmS0Ur9mZpYmzOpHCwnlQnl4\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"i9wRVj4QV2SXsuInzCfhBQyxOMB\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"NCYR5T8x21cEqYEbwiWPdqmvyuy\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"NBTbSBMDAVfLONziyDvHHJYMVll\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"ioK181clrT2w05Bi04hvAMclN3E\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"PC6DQyhhVMrJeBtHkrjuvGB5bAu\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}]}", - "x-ms-client-request-id" : "9f69d0fd-e500-43ac-88d5-353f9a5067ef", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTc=;sn=448857", + "x-ms-request-id" : "91351f46-76ea-4ef5-ac2b-216df21a83a0", + "Body" : "{\"items\":[{\"etag\":\"ul83jMJqU9ed1Bj4pyJxlSVj4Aq\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:15+00:00\"},{\"etag\":\"IaDjAWGI8BNjdFzRuFSXo244xGW\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"},{\"etag\":\"Tqv2aWozv7Z2HAStQgjWEzt2a8M\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"},{\"etag\":\"GYCNqA7I5ddzK5FL2ScnFK9bQSO\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"},{\"etag\":\"h9PYktLctzF49ob9jaWYEOcFULc\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"},{\"etag\":\"6q67VxKcQ41fnjr3dYsensjMxSs\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"},{\"etag\":\"qZPXBV7Ag6SONsrgdBRnMzGHOSD\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"},{\"etag\":\"FXz5aNjiAv4zWkD5PfsY7c9WdqM\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:12+00:00\"},{\"etag\":\"UyhwBqaATswEGGj8MkqAGuaGgqp\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"ypbuvCHZZ6gaeJdunbKTPgosul1\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"gRPRD6gCueNtvcEB3xDHPIdkPJA\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"c5v9GMQzDzEYwlex7hEbKdcuABg\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"KDvf8eqzeLb1gfuHYMzVaQefLzc\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"9cz9tvzTy2ut6xWeYAUgGH6QTIy\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"merAHFhlsqpjpmFywwgNWzsjVW8\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"wPqBkjkFKq5wUXd3ZaqiOgdCor7\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"MjFoUnlvtwJ8MX5vwpu1EsiUmzQ\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"BkxbbBxY4Cxksx2URX1HcNKDK0t\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"ThClQgFSID2iT4f501eO1Mp66Hp\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"wsPM9ihC74RF9d94E9JEzcXXHTP\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"S0thi08VjYCNlZTGCwKNXz7FgHA\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"QsxUrvBmOrfXiwdQAJM9Goy0fyN\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"13UGPn3gQhzboECtTNTkBL6lg8D\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"BnvyN2q1L8JAKqYSJyfAfrI7Dzq\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"VrkzZjCCOue53dy9wyHuw4z2jFb\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"HpK3Y0Cv6HvKPhfT6l49E8xGubq\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"3TZafOaickReomPxdfNuFG9sWHc\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"TVDXinM9LfzCxgwI8SA06anZYbx\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"hVyqwgYZZWenEKQmjm7hfQNircs\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"6okVqENIsU6ddspEsdPZH5TDQ9M\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"WcL6UvunFbc6CIM75b4nyBFx4mc\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"fqgvALZ5JNaFLmJTyRc7Oss4tNz\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"oVETWru8TCWbevFL1dg1QG0oPGM\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"xFbnC0j5yBZQdumUz818nwBHKQn\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"bmaAj49gVenK3UwyVkj75UpDJpv\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"ChzWOWvlqOsUDw2p2esCOm0Ci0F\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"c4A6DzudOdeviQHr99hpC0VfXSD\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"vFACikDtVqmtVGUFiLcrOgYFxdp\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"91XFoa58YgiNcMp4b8H89ikyF0J\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"JXr2Yf7rDhrMw3mNYItItaOt2CY\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"G3jjwKLQnjYD1nuyFjo8JP5toPI\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"QmbfeQ8N2U7fySscDmziMOVWnFE\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"s8L6qQLEEwBt8qcyViGHVVOqs1q\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"m1LDZu8e38PNPiDcCAJx5BKz5in\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"QytFCFuooQFbJGo2glYOWDOH2xy\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"},{\"etag\":\"KevjuE6cKdnVGgFa4YtpzpYGkVj\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"},{\"etag\":\"rfSvQqevqGQgIIocj0X7PvFjHGf\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"},{\"etag\":\"ZU7DVbk6gNRU8GSbYDnKtR7zZpZ\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"},{\"etag\":\"N2LNXWjtzSvt5CV3d0gGjixJbOw\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"},{\"etag\":\"FZAFabTnfEHWpUKeav1sxwecR97\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}]}", + "x-ms-client-request-id" : "12538e00-a68d-4e90-bd61-b0a9468ea15d", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key79829&label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key76033&label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "76b470a5-73d9-4763-96ed-318b955aed16", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c9f97a5e-43b8-4289-9d75-9d96cea9ae28", "Content-Type" : "application/json" }, "Response" : { @@ -1595,26 +1595,26 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:14 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c681bb2d-5553-4df1-b073-c21ee956b7c6", + "x-ms-correlation-request-id" : "92272412-a9aa-43c4-a0de-a72b980ccbd8", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjI=;sn=402062", - "x-ms-request-id" : "c681bb2d-5553-4df1-b073-c21ee956b7c6", - "Body" : "{\"items\":[{\"etag\":\"ce2NQ90DuIAQH7D9brDhjjXmgXX\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"IKBeeVA1e6iGdA06qJqxnfQZ9Q2\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"g6cKAEFeFT4N8yYz63ZZ5Mo6dqU\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"m8LwfgeyyFe1G7Kf6OfSy95gwf5\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"GcIgiS8X0cqeuJf3cbgZQvypeUy\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"PYpc7lKuZsGWBWzlBJLVsSjYW6U\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"ug6jmv4SgxyOKOJ1mzbmTMu84KX\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"da40iYwVJmquY0kHa4CEAscs2U1\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"yvJ0B4uPSMa9Cwimy2yBr5n9OeB\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"4ZIJbgsu27loMAKDKSjxOCXney7\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"},{\"etag\":\"cBA1GU8GbtYnZUNgwycKwvAnPCS\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"biv8FsDjeTJ1mItQrHwgUKgnaPr\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"ElM76b2WEMkMeTHGwlk3VMJOZQ9\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"lhX5LSkJ68WcT0Cr5Z6fHzXlSSd\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"OzXNw33DyHIga2Qgwzc4onr1f6o\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"B3WWdx34hkpJZeWWHlm4qvYNkzJ\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"2mfk3KgLOZhu18wsjmlG4PDRKcp\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"qGEwSOcNrPAWccey3FzMKaP4YgN\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"aKmK1EJiYpzr9Urv1BKn9vsIE0k\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"Vy1hLAx3uzFY4u8bIJX1NwsMxLA\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"lLgDi4TTmkZo4hhiWaBADtED3Pw\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"2y1CKwZJ7L1yDyeABDdvF8nt2i5\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"AHZioZVeIVkH7VS7HmMPDiIL6JJ\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"JSi62HWxL37Y737EXUfLvwKYp7f\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"5CsTAn5AL1yPbrrB8KMb185smep\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"JJ4MfFb1kCaYzqQ7Tnjg40Kcwv0\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:59+00:00\"},{\"etag\":\"BSiEuHiQEwo6gloCsDcK7qC1UsC\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"sJ7JMKrnOxSy1n693JmhMm8hrFu\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"F1EtO0JuW2OtU8pB8zMRckcoeu7\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"tu4iPmRxMQYvks4z9RC4o1GnGP5\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"U7wOFwJhupWPsL31XVJmxIhZ0Ph\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"SJvJ8XLz6NPI0lSE7K9F8X1DWCS\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"RcrTJcs8sjesaxXuRJX8kIkY5Fo\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"EaoKSrDzV8IJQUpvKIuYGvO1Dng\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"V4oU5BIGKAtAAS1kbMgH2uOLd58\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"tVAVQkz5XbwwmnR5DggfeKdBmc1\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"WRhxNESPJltZ5be0d1YzRBXgC0x\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"x8vgzCKSxkgx7sLO7mnFOFQaXv9\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"Ma8pN2mfyfCL9TxeFuluDChm0Od\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"4A4j3PCOK8WwJ7PPXISewFzYk4V\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"ll334gzYeWMLZdxQoCzTjWvBK0c\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"2zBH8uYLyqAQ8GPKlGrNZQ52987\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"xhlq19immDfDrYbs8mA8KTVUOku\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"n04n2w6oWvbNPeRcFUOitVpPS88\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"dZTZmS0Ur9mZpYmzOpHCwnlQnl4\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"i9wRVj4QV2SXsuInzCfhBQyxOMB\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"NCYR5T8x21cEqYEbwiWPdqmvyuy\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"NBTbSBMDAVfLONziyDvHHJYMVll\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"ioK181clrT2w05Bi04hvAMclN3E\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"},{\"etag\":\"PC6DQyhhVMrJeBtHkrjuvGB5bAu\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:58+00:00\"}]}", - "x-ms-client-request-id" : "76b470a5-73d9-4763-96ed-318b955aed16", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTc=;sn=448857", + "x-ms-request-id" : "92272412-a9aa-43c4-a0de-a72b980ccbd8", + "Body" : "{\"items\":[{\"etag\":\"ul83jMJqU9ed1Bj4pyJxlSVj4Aq\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:15+00:00\"},{\"etag\":\"IaDjAWGI8BNjdFzRuFSXo244xGW\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"},{\"etag\":\"Tqv2aWozv7Z2HAStQgjWEzt2a8M\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"},{\"etag\":\"GYCNqA7I5ddzK5FL2ScnFK9bQSO\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"},{\"etag\":\"h9PYktLctzF49ob9jaWYEOcFULc\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"},{\"etag\":\"6q67VxKcQ41fnjr3dYsensjMxSs\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"},{\"etag\":\"qZPXBV7Ag6SONsrgdBRnMzGHOSD\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:13+00:00\"},{\"etag\":\"FXz5aNjiAv4zWkD5PfsY7c9WdqM\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:12+00:00\"},{\"etag\":\"UyhwBqaATswEGGj8MkqAGuaGgqp\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"ypbuvCHZZ6gaeJdunbKTPgosul1\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"gRPRD6gCueNtvcEB3xDHPIdkPJA\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"c5v9GMQzDzEYwlex7hEbKdcuABg\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"KDvf8eqzeLb1gfuHYMzVaQefLzc\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"9cz9tvzTy2ut6xWeYAUgGH6QTIy\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"merAHFhlsqpjpmFywwgNWzsjVW8\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"wPqBkjkFKq5wUXd3ZaqiOgdCor7\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"MjFoUnlvtwJ8MX5vwpu1EsiUmzQ\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"BkxbbBxY4Cxksx2URX1HcNKDK0t\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"ThClQgFSID2iT4f501eO1Mp66Hp\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"wsPM9ihC74RF9d94E9JEzcXXHTP\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:11+00:00\"},{\"etag\":\"S0thi08VjYCNlZTGCwKNXz7FgHA\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"QsxUrvBmOrfXiwdQAJM9Goy0fyN\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"13UGPn3gQhzboECtTNTkBL6lg8D\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"BnvyN2q1L8JAKqYSJyfAfrI7Dzq\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"VrkzZjCCOue53dy9wyHuw4z2jFb\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"HpK3Y0Cv6HvKPhfT6l49E8xGubq\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"3TZafOaickReomPxdfNuFG9sWHc\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"TVDXinM9LfzCxgwI8SA06anZYbx\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"hVyqwgYZZWenEKQmjm7hfQNircs\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"6okVqENIsU6ddspEsdPZH5TDQ9M\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"WcL6UvunFbc6CIM75b4nyBFx4mc\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"fqgvALZ5JNaFLmJTyRc7Oss4tNz\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"oVETWru8TCWbevFL1dg1QG0oPGM\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"xFbnC0j5yBZQdumUz818nwBHKQn\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"bmaAj49gVenK3UwyVkj75UpDJpv\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"ChzWOWvlqOsUDw2p2esCOm0Ci0F\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"c4A6DzudOdeviQHr99hpC0VfXSD\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"vFACikDtVqmtVGUFiLcrOgYFxdp\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"91XFoa58YgiNcMp4b8H89ikyF0J\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"JXr2Yf7rDhrMw3mNYItItaOt2CY\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"G3jjwKLQnjYD1nuyFjo8JP5toPI\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"QmbfeQ8N2U7fySscDmziMOVWnFE\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"s8L6qQLEEwBt8qcyViGHVVOqs1q\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"m1LDZu8e38PNPiDcCAJx5BKz5in\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:10+00:00\"},{\"etag\":\"QytFCFuooQFbJGo2glYOWDOH2xy\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"},{\"etag\":\"KevjuE6cKdnVGgFa4YtpzpYGkVj\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"},{\"etag\":\"rfSvQqevqGQgIIocj0X7PvFjHGf\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"},{\"etag\":\"ZU7DVbk6gNRU8GSbYDnKtR7zZpZ\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"},{\"etag\":\"N2LNXWjtzSvt5CV3d0gGjixJbOw\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"},{\"etag\":\"FZAFabTnfEHWpUKeav1sxwecR97\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:09+00:00\"}]}", + "x-ms-client-request-id" : "c9f97a5e-43b8-4289-9d75-9d96cea9ae28", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key79829%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key76033%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d0648839-b16a-4600-8963-23d4bf6e4064", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "16ab60eb-8e9d-48a3-aa50-41ea96142b75", "Content-Type" : "application/json" }, "Response" : { @@ -1625,25 +1625,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:14 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4f7ef774-b9e8-4f83-9e27-eaf945d19694", + "x-ms-correlation-request-id" : "dc4658b0-950c-4064-af57-dea93792e8b3", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjI=;sn=402062", - "x-ms-request-id" : "4f7ef774-b9e8-4f83-9e27-eaf945d19694", - "Body" : "{\"items\":[{\"etag\":\"ce2NQ90DuIAQH7D9brDhjjXmgXX\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"}]}", - "x-ms-client-request-id" : "d0648839-b16a-4600-8963-23d4bf6e4064", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTc=;sn=448857", + "x-ms-request-id" : "dc4658b0-950c-4064-af57-dea93792e8b3", + "Body" : "{\"items\":[{\"etag\":\"ul83jMJqU9ed1Bj4pyJxlSVj4Aq\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:15+00:00\"}]}", + "x-ms-client-request-id" : "16ab60eb-8e9d-48a3-aa50-41ea96142b75", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79829?label=6c43f0dc", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key76033?label=352ce59c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9fc8f47b-38a9-4d8e-9169-aa75a30baf9d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d37ec33c-2477-4eea-8aa1-2ae9b1f4f1a8", "Content-Type" : "application/json" }, "Response" : { @@ -1652,23 +1652,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:15 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:01 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:14 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "23ea59c1-fca0-41f9-bac7-0c8e5899e3ec", + "x-ms-correlation-request-id" : "4cfdb1f3-3adb-4a0e-a428-5b3f8754c5e7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ce2NQ90DuIAQH7D9brDhjjXmgXX\"", + "ETag" : "\"ul83jMJqU9ed1Bj4pyJxlSVj4Aq\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjM=;sn=402063", - "x-ms-request-id" : "23ea59c1-fca0-41f9-bac7-0c8e5899e3ec", - "Body" : "{\"etag\":\"ce2NQ90DuIAQH7D9brDhjjXmgXX\",\"key\":\"key79829\",\"label\":\"6c43f0dc\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:01+00:00\"}", - "x-ms-client-request-id" : "9fc8f47b-38a9-4d8e-9169-aa75a30baf9d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NTg=;sn=448858", + "x-ms-request-id" : "4cfdb1f3-3adb-4a0e-a428-5b3f8754c5e7", + "Body" : "{\"etag\":\"ul83jMJqU9ed1Bj4pyJxlSVj4Aq\",\"key\":\"key76033\",\"label\":\"352ce59c\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:15+00:00\"}", + "x-ms-client-request-id" : "d37ec33c-2477-4eea-8aa1-2ae9b1f4f1a8", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key79829", "6c43f0dc" ] + "variables" : [ "key76033", "352ce59c" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatStream.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatStream.json index 9fe0bf521357..28861a8aa4d3 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatStream.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatStream.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2e088217-b4ed-4996-8e64-6248a6e9490b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a7e289d4-9f21-41d7-a56d-b463b43f9c73", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c4289216-20ad-4fec-aa57-a251848250e9", + "x-ms-correlation-request-id" : "8f55032c-9249-4b55-ab27-c355cc9b73aa", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"b6EQq2pKMFm3aQAvjqGrHfbZmtc\"", + "ETag" : "\"kdiKJOVmNn14EWvsd3OHuHcloA2\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NDk=;sn=401949", - "x-ms-request-id" : "c4289216-20ad-4fec-aa57-a251848250e9", - "Body" : "{\"etag\":\"b6EQq2pKMFm3aQAvjqGrHfbZmtc\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "2e088217-b4ed-4996-8e64-6248a6e9490b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NDE=;sn=448741", + "x-ms-request-id" : "8f55032c-9249-4b55-ab27-c355cc9b73aa", + "Body" : "{\"etag\":\"kdiKJOVmNn14EWvsd3OHuHcloA2\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "a7e289d4-9f21-41d7-a56d-b463b43f9c73", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d36c9c78-178f-4e37-93dd-33a5568fd8c1", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "25ee3be7-b990-4805-b491-a01591e31e5f", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a1591a76-4e6f-4462-b25d-dbb1b3c4c6b6", + "x-ms-correlation-request-id" : "26ae78e2-57ca-4e04-a3d7-d84e719faa49", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"HPj45VKgNaAnnSYhPAmOTVcl6ql\"", + "ETag" : "\"gY2JuGLdQ5PgvMLmvpTpzsVcVqG\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NTA=;sn=401950", - "x-ms-request-id" : "a1591a76-4e6f-4462-b25d-dbb1b3c4c6b6", - "Body" : "{\"etag\":\"HPj45VKgNaAnnSYhPAmOTVcl6ql\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "d36c9c78-178f-4e37-93dd-33a5568fd8c1", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NDI=;sn=448742", + "x-ms-request-id" : "26ae78e2-57ca-4e04-a3d7-d84e719faa49", + "Body" : "{\"etag\":\"gY2JuGLdQ5PgvMLmvpTpzsVcVqG\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "25ee3be7-b990-4805-b491-a01591e31e5f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "170475e9-d1bf-4ca2-96cb-06276f1cbe9f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a7287ab7-4284-47de-aa45-2d03ea8f079b", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b6d4030c-f0e2-4ba9-bf65-5ff8812cd6ae", + "x-ms-correlation-request-id" : "d7b69b46-467d-47ae-bd14-e5bd9e436b3e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"CZOO38en0KW45NEaFdPR40lowuC\"", + "ETag" : "\"SkwJSoCGo2ZovUYSQX9E284Iakj\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NTE=;sn=401951", - "x-ms-request-id" : "b6d4030c-f0e2-4ba9-bf65-5ff8812cd6ae", - "Body" : "{\"etag\":\"CZOO38en0KW45NEaFdPR40lowuC\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "170475e9-d1bf-4ca2-96cb-06276f1cbe9f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NDM=;sn=448743", + "x-ms-request-id" : "d7b69b46-467d-47ae-bd14-e5bd9e436b3e", + "Body" : "{\"etag\":\"SkwJSoCGo2ZovUYSQX9E284Iakj\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "a7287ab7-4284-47de-aa45-2d03ea8f079b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "16927dfe-add2-4512-a444-2161720656f3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2da30ccd-1b5e-41d1-a1bd-c58238535396", "Content-Type" : "application/json" }, "Response" : { @@ -106,29 +106,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3de87752-a8aa-4750-8a1e-a3ba559c2d0b", + "x-ms-correlation-request-id" : "de21d1eb-de7e-4452-9bee-87371b0c48c2", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"iWpeG44smVf39f0quwijZc2KwJZ\"", + "ETag" : "\"yNXChimXfnwrSztFeXvM08Rh0QQ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NTI=;sn=401952", - "x-ms-request-id" : "3de87752-a8aa-4750-8a1e-a3ba559c2d0b", - "Body" : "{\"etag\":\"iWpeG44smVf39f0quwijZc2KwJZ\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "16927dfe-add2-4512-a444-2161720656f3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NDQ=;sn=448744", + "x-ms-request-id" : "de21d1eb-de7e-4452-9bee-87371b0c48c2", + "Body" : "{\"etag\":\"yNXChimXfnwrSztFeXvM08Rh0QQ\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "2da30ccd-1b5e-41d1-a1bd-c58238535396", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "38c1c9d2-5aa9-47e1-b585-3a4d5998c65c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "256bbe30-33f4-4530-ab55-a2633a329b22", "Content-Type" : "application/json" }, "Response" : { @@ -137,29 +137,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f9c49330-0d4f-4bcf-8ab8-3781dd619977", + "x-ms-correlation-request-id" : "0437b189-6fc3-4dac-bf0e-77db084fb8e1", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"BztP1XcXpdX5vamCxMLGWp1AG0H\"", + "ETag" : "\"yvNojVaKpS16pbxDTe9xwj0otQc\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NTM=;sn=401953", - "x-ms-request-id" : "f9c49330-0d4f-4bcf-8ab8-3781dd619977", - "Body" : "{\"etag\":\"BztP1XcXpdX5vamCxMLGWp1AG0H\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "38c1c9d2-5aa9-47e1-b585-3a4d5998c65c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NDU=;sn=448745", + "x-ms-request-id" : "0437b189-6fc3-4dac-bf0e-77db084fb8e1", + "Body" : "{\"etag\":\"yvNojVaKpS16pbxDTe9xwj0otQc\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "256bbe30-33f4-4530-ab55-a2633a329b22", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e089f178-779e-4ae8-b7b6-76713b6f1b46", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7650121b-8281-4ab2-9870-4339d13e050b", "Content-Type" : "application/json" }, "Response" : { @@ -168,29 +168,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ead301a3-d399-4f01-9050-a2192f2ae447", + "x-ms-correlation-request-id" : "e351c91b-7832-4917-b4b6-bfa919b4523e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"CAm5d6cCma2nt0cC7gTuREytuzr\"", + "ETag" : "\"saMyZRBoeBZHOROpZNLUH4s3yHY\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NTQ=;sn=401954", - "x-ms-request-id" : "ead301a3-d399-4f01-9050-a2192f2ae447", - "Body" : "{\"etag\":\"CAm5d6cCma2nt0cC7gTuREytuzr\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "e089f178-779e-4ae8-b7b6-76713b6f1b46", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NDY=;sn=448746", + "x-ms-request-id" : "e351c91b-7832-4917-b4b6-bfa919b4523e", + "Body" : "{\"etag\":\"saMyZRBoeBZHOROpZNLUH4s3yHY\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "7650121b-8281-4ab2-9870-4339d13e050b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2ccc8d0b-a64f-4522-b64b-1b1cbf2d617a", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4980a373-ac3d-48ca-8818-930c4a1db41e", "Content-Type" : "application/json" }, "Response" : { @@ -199,29 +199,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3a73d67b-88d0-467f-bebe-cedf7ff1268f", + "x-ms-correlation-request-id" : "a1ab49e9-af12-4abc-8075-908919f88184", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"BRytgWxDAgEdYLdgM8NN0thAKEX\"", + "ETag" : "\"QivqlcE8vGy9YvrpccqKQJxFR99\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NTU=;sn=401955", - "x-ms-request-id" : "3a73d67b-88d0-467f-bebe-cedf7ff1268f", - "Body" : "{\"etag\":\"BRytgWxDAgEdYLdgM8NN0thAKEX\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "2ccc8d0b-a64f-4522-b64b-1b1cbf2d617a", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NDc=;sn=448747", + "x-ms-request-id" : "a1ab49e9-af12-4abc-8075-908919f88184", + "Body" : "{\"etag\":\"QivqlcE8vGy9YvrpccqKQJxFR99\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "4980a373-ac3d-48ca-8818-930c4a1db41e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "855ac797-0525-4301-b101-f6b13addfd6f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d7af05ec-a039-4107-b5c1-1dfeca4490e6", "Content-Type" : "application/json" }, "Response" : { @@ -230,29 +230,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a92cd87a-e672-485e-9ce6-a13ea76dba24", + "x-ms-correlation-request-id" : "4abe9223-527e-4709-ab22-786f58a5305c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"epemQcbB2DeyvLFqJjNqG4U9N1v\"", + "ETag" : "\"11vBEjJ9W1dSHYlm83bTbEEGxt8\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NTY=;sn=401956", - "x-ms-request-id" : "a92cd87a-e672-485e-9ce6-a13ea76dba24", - "Body" : "{\"etag\":\"epemQcbB2DeyvLFqJjNqG4U9N1v\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "855ac797-0525-4301-b101-f6b13addfd6f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NDg=;sn=448748", + "x-ms-request-id" : "4abe9223-527e-4709-ab22-786f58a5305c", + "Body" : "{\"etag\":\"11vBEjJ9W1dSHYlm83bTbEEGxt8\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "d7af05ec-a039-4107-b5c1-1dfeca4490e6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c8a945fb-d561-4a9b-91a8-5be2945d31ae", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "21e17678-9480-4a5f-b11d-3aa2480f1531", "Content-Type" : "application/json" }, "Response" : { @@ -261,29 +261,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "75a51b95-5afb-457e-ad6e-2e66a114e956", + "x-ms-correlation-request-id" : "adae2697-da84-4a51-bacc-61d430c57fa2", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"N2oYg9NAMBPiHhbwEEVCJD1vykP\"", + "ETag" : "\"ebhuRkb77o3v8t6wYv3iok3wEOC\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NTc=;sn=401957", - "x-ms-request-id" : "75a51b95-5afb-457e-ad6e-2e66a114e956", - "Body" : "{\"etag\":\"N2oYg9NAMBPiHhbwEEVCJD1vykP\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "c8a945fb-d561-4a9b-91a8-5be2945d31ae", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NDk=;sn=448749", + "x-ms-request-id" : "adae2697-da84-4a51-bacc-61d430c57fa2", + "Body" : "{\"etag\":\"ebhuRkb77o3v8t6wYv3iok3wEOC\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "21e17678-9480-4a5f-b11d-3aa2480f1531", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f80e9391-8082-46b3-901d-f59909fc9ada", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "330c5084-1fae-498d-a3d3-5bf59b691369", "Content-Type" : "application/json" }, "Response" : { @@ -292,29 +292,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4d55f5a4-dbf7-41fc-ba38-e37371854a61", + "x-ms-correlation-request-id" : "e9a24fc8-a357-4acb-815d-a982db323d42", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"5xzgsF7KcaHE50mYELTTgaPUI1I\"", + "ETag" : "\"bla9yQ7cwD0EsU9ScK70o18PTlY\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NTg=;sn=401958", - "x-ms-request-id" : "4d55f5a4-dbf7-41fc-ba38-e37371854a61", - "Body" : "{\"etag\":\"5xzgsF7KcaHE50mYELTTgaPUI1I\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "f80e9391-8082-46b3-901d-f59909fc9ada", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NTA=;sn=448750", + "x-ms-request-id" : "e9a24fc8-a357-4acb-815d-a982db323d42", + "Body" : "{\"etag\":\"bla9yQ7cwD0EsU9ScK70o18PTlY\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "330c5084-1fae-498d-a3d3-5bf59b691369", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2f28fcae-99c1-42dd-8c0c-a23d819cf87c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1c03d219-353b-4cb8-a893-1d53eaa17f88", "Content-Type" : "application/json" }, "Response" : { @@ -323,29 +323,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9af9b955-0d3f-40f5-83ed-614da8ffa32a", + "x-ms-correlation-request-id" : "2ed73ae0-c958-49d2-a9ca-c4127f298278", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"15DfQe63XtKtlrzrppAUUpaoCw1\"", + "ETag" : "\"PuUJ4oUdfmsHiJeKhjR1kad4zlt\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NTk=;sn=401959", - "x-ms-request-id" : "9af9b955-0d3f-40f5-83ed-614da8ffa32a", - "Body" : "{\"etag\":\"15DfQe63XtKtlrzrppAUUpaoCw1\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "2f28fcae-99c1-42dd-8c0c-a23d819cf87c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NTE=;sn=448751", + "x-ms-request-id" : "2ed73ae0-c958-49d2-a9ca-c4127f298278", + "Body" : "{\"etag\":\"PuUJ4oUdfmsHiJeKhjR1kad4zlt\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "1c03d219-353b-4cb8-a893-1d53eaa17f88", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b56a16c1-634e-4502-a541-9eb5d5aeab13", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "206c4be2-f3ab-4370-bb9e-ccc4034d97e4", "Content-Type" : "application/json" }, "Response" : { @@ -354,29 +354,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "e71689ce-a867-4445-a6f3-0468b060730c", + "x-ms-correlation-request-id" : "0a61647e-e187-4118-821b-206fb4d62abb", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"8hs0D34PsJgJgpPM2nhOZWLh9t9\"", + "ETag" : "\"gm1MsxX0iJf85xubullz5qrdttv\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NjA=;sn=401960", - "x-ms-request-id" : "e71689ce-a867-4445-a6f3-0468b060730c", - "Body" : "{\"etag\":\"8hs0D34PsJgJgpPM2nhOZWLh9t9\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "b56a16c1-634e-4502-a541-9eb5d5aeab13", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NTI=;sn=448752", + "x-ms-request-id" : "0a61647e-e187-4118-821b-206fb4d62abb", + "Body" : "{\"etag\":\"gm1MsxX0iJf85xubullz5qrdttv\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "206c4be2-f3ab-4370-bb9e-ccc4034d97e4", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "50cadbcb-f95e-4a0b-884e-6d39312ca8ef", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9d07ae9f-f5ad-49a4-a5ad-7b9e2079a2d1", "Content-Type" : "application/json" }, "Response" : { @@ -385,29 +385,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "75d5201b-e37d-4ea8-bb88-b0203e7a1451", + "x-ms-correlation-request-id" : "7d90ac1f-28c4-40cc-8963-3ce2ae523358", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"aW5eBC8GoHYMGYpjcr0MFJsnNZL\"", + "ETag" : "\"9bqakt1CAiEvu00gO1hqElbVMoj\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NjE=;sn=401961", - "x-ms-request-id" : "75d5201b-e37d-4ea8-bb88-b0203e7a1451", - "Body" : "{\"etag\":\"aW5eBC8GoHYMGYpjcr0MFJsnNZL\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "50cadbcb-f95e-4a0b-884e-6d39312ca8ef", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NTM=;sn=448753", + "x-ms-request-id" : "7d90ac1f-28c4-40cc-8963-3ce2ae523358", + "Body" : "{\"etag\":\"9bqakt1CAiEvu00gO1hqElbVMoj\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "9d07ae9f-f5ad-49a4-a5ad-7b9e2079a2d1", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cebad247-2cca-4fbc-bbb5-138a5d1be9df", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "477189c4-f01e-498c-881f-82f1e10cadbf", "Content-Type" : "application/json" }, "Response" : { @@ -416,29 +416,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "27cb5231-30aa-46c4-ad6b-dab0bbce0552", + "x-ms-correlation-request-id" : "3e9705ec-d5e0-49f5-a788-9eb0e86c35c7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"gIwPO0fQ3GiOlakubS9OMAGyNIQ\"", + "ETag" : "\"T6YXfjLgDzPFDubk5Y48hxQeSlg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NjI=;sn=401962", - "x-ms-request-id" : "27cb5231-30aa-46c4-ad6b-dab0bbce0552", - "Body" : "{\"etag\":\"gIwPO0fQ3GiOlakubS9OMAGyNIQ\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "cebad247-2cca-4fbc-bbb5-138a5d1be9df", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NTQ=;sn=448754", + "x-ms-request-id" : "3e9705ec-d5e0-49f5-a788-9eb0e86c35c7", + "Body" : "{\"etag\":\"T6YXfjLgDzPFDubk5Y48hxQeSlg\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "477189c4-f01e-498c-881f-82f1e10cadbf", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e463d984-b815-452c-8531-c586308dc5c8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "771eb436-c0c2-4e9e-97bc-9db7c01b3a88", "Content-Type" : "application/json" }, "Response" : { @@ -447,29 +447,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "8f899035-e242-4adb-b889-84e12b48f05f", + "x-ms-correlation-request-id" : "c7ef7036-9ab6-4ce4-8a4b-e5179dcf70a4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"2BLvKBI38PRnQ2YQD2kttZ69T0X\"", + "ETag" : "\"Xs7kmcNMOUUwaTbV8WjoVtQTHBV\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NjM=;sn=401963", - "x-ms-request-id" : "8f899035-e242-4adb-b889-84e12b48f05f", - "Body" : "{\"etag\":\"2BLvKBI38PRnQ2YQD2kttZ69T0X\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "e463d984-b815-452c-8531-c586308dc5c8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NTU=;sn=448755", + "x-ms-request-id" : "c7ef7036-9ab6-4ce4-8a4b-e5179dcf70a4", + "Body" : "{\"etag\":\"Xs7kmcNMOUUwaTbV8WjoVtQTHBV\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "771eb436-c0c2-4e9e-97bc-9db7c01b3a88", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b415f7a7-2954-4464-baaa-9c51c95f244f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dbc33665-f6f2-4b28-9525-cd129742e8bc", "Content-Type" : "application/json" }, "Response" : { @@ -478,29 +478,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a5626599-32ee-4e7c-95d4-0568813cf7ad", + "x-ms-correlation-request-id" : "cd2b8d76-e360-4faf-88e6-a4bbc7bfc71f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"PsdGDvpgrhptUfqqt9e8pKXvbfV\"", + "ETag" : "\"KCAK9YgDpo5vVVvGAbtiYGK3lLj\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NjQ=;sn=401964", - "x-ms-request-id" : "a5626599-32ee-4e7c-95d4-0568813cf7ad", - "Body" : "{\"etag\":\"PsdGDvpgrhptUfqqt9e8pKXvbfV\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "b415f7a7-2954-4464-baaa-9c51c95f244f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NTY=;sn=448756", + "x-ms-request-id" : "cd2b8d76-e360-4faf-88e6-a4bbc7bfc71f", + "Body" : "{\"etag\":\"KCAK9YgDpo5vVVvGAbtiYGK3lLj\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "dbc33665-f6f2-4b28-9525-cd129742e8bc", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7065f6f2-0c00-42e2-9e23-6aa19b8f4e71", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "af9a331d-612b-4dd7-897f-d7e4d8ee05a9", "Content-Type" : "application/json" }, "Response" : { @@ -509,29 +509,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "5039eb35-018b-4c65-89c8-b6a4595133c6", + "x-ms-correlation-request-id" : "8a5adc25-b35e-45a6-aca8-5ee1f4957463", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"5cdguOI0YWNW7hiEPxik3bxkfFg\"", + "ETag" : "\"oCVW5CdOMq5NIPOhUgTJe2O8fhr\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NjU=;sn=401965", - "x-ms-request-id" : "5039eb35-018b-4c65-89c8-b6a4595133c6", - "Body" : "{\"etag\":\"5cdguOI0YWNW7hiEPxik3bxkfFg\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "7065f6f2-0c00-42e2-9e23-6aa19b8f4e71", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NTc=;sn=448757", + "x-ms-request-id" : "8a5adc25-b35e-45a6-aca8-5ee1f4957463", + "Body" : "{\"etag\":\"oCVW5CdOMq5NIPOhUgTJe2O8fhr\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "af9a331d-612b-4dd7-897f-d7e4d8ee05a9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4fce35ac-9937-45e9-9758-5f5cd39358cd", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f08612f8-a20b-4854-86e8-0acaa374bf26", "Content-Type" : "application/json" }, "Response" : { @@ -540,29 +540,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a302725d-cb57-4e13-8135-6cbdb4c53c73", + "x-ms-correlation-request-id" : "4af13dd2-01cb-4c66-a346-143f6d9002d5", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"yklnkOJJeSpGP23n53Z2krYqLMw\"", + "ETag" : "\"V9KvBw3AkC6ckyBgYbZWbUB2YPF\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NjY=;sn=401966", - "x-ms-request-id" : "a302725d-cb57-4e13-8135-6cbdb4c53c73", - "Body" : "{\"etag\":\"yklnkOJJeSpGP23n53Z2krYqLMw\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "4fce35ac-9937-45e9-9758-5f5cd39358cd", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NTg=;sn=448758", + "x-ms-request-id" : "4af13dd2-01cb-4c66-a346-143f6d9002d5", + "Body" : "{\"etag\":\"V9KvBw3AkC6ckyBgYbZWbUB2YPF\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "f08612f8-a20b-4854-86e8-0acaa374bf26", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c2489a70-5709-4368-ba19-3f6446920ced", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "57c9559e-7d56-4f72-9f98-e53552945025", "Content-Type" : "application/json" }, "Response" : { @@ -571,29 +571,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "665158c7-1747-4340-8ea6-7e83ae91517a", + "x-ms-correlation-request-id" : "a168a662-8afe-4304-9898-29f8e40c4fc8", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"rYuLhxdxOPp8A3gnypxAynxjX7e\"", + "ETag" : "\"lM6clnN1Sf5D2yFfGaGEMr4fhMQ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Njc=;sn=401967", - "x-ms-request-id" : "665158c7-1747-4340-8ea6-7e83ae91517a", - "Body" : "{\"etag\":\"rYuLhxdxOPp8A3gnypxAynxjX7e\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "c2489a70-5709-4368-ba19-3f6446920ced", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NTk=;sn=448759", + "x-ms-request-id" : "a168a662-8afe-4304-9898-29f8e40c4fc8", + "Body" : "{\"etag\":\"lM6clnN1Sf5D2yFfGaGEMr4fhMQ\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "57c9559e-7d56-4f72-9f98-e53552945025", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "594187b5-7411-4aef-a14f-6d87417e7e14", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cf9cf600-e0a9-4df2-84d5-5d6c9aa06872", "Content-Type" : "application/json" }, "Response" : { @@ -602,29 +602,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3c68622c-43e4-47e6-9e92-cdd09927b301", + "x-ms-correlation-request-id" : "1b0a266c-3c1c-4c28-a8c3-fb832652bc34", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"HIZMdlr14PJ1ueLZCemBXC0dsQo\"", + "ETag" : "\"eaIzNXTaoulBKPPsNHwnbVMeLbS\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Njg=;sn=401968", - "x-ms-request-id" : "3c68622c-43e4-47e6-9e92-cdd09927b301", - "Body" : "{\"etag\":\"HIZMdlr14PJ1ueLZCemBXC0dsQo\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "594187b5-7411-4aef-a14f-6d87417e7e14", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NjA=;sn=448760", + "x-ms-request-id" : "1b0a266c-3c1c-4c28-a8c3-fb832652bc34", + "Body" : "{\"etag\":\"eaIzNXTaoulBKPPsNHwnbVMeLbS\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "cf9cf600-e0a9-4df2-84d5-5d6c9aa06872", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4dce42c8-334c-4014-90ed-412525293dc9", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "564dd707-5f41-4998-940c-58bd3466a00c", "Content-Type" : "application/json" }, "Response" : { @@ -633,29 +633,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3aa1b5e0-2054-4abb-b679-f6c290e60ca8", + "x-ms-correlation-request-id" : "8085f1d1-df01-4e38-bdbe-7e23bb88f23f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"P7C9boVUnzQlYWzzSMJEBXfJ0Uc\"", + "ETag" : "\"7MX0M9p1tOa2Fnr9OGzyWTkLOdi\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Njk=;sn=401969", - "x-ms-request-id" : "3aa1b5e0-2054-4abb-b679-f6c290e60ca8", - "Body" : "{\"etag\":\"P7C9boVUnzQlYWzzSMJEBXfJ0Uc\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "4dce42c8-334c-4014-90ed-412525293dc9", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NjE=;sn=448761", + "x-ms-request-id" : "8085f1d1-df01-4e38-bdbe-7e23bb88f23f", + "Body" : "{\"etag\":\"7MX0M9p1tOa2Fnr9OGzyWTkLOdi\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "564dd707-5f41-4998-940c-58bd3466a00c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "096a5391-ee23-44db-b110-262bea7a6df5", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4f37419d-a2d7-441b-b303-a3cc167c7987", "Content-Type" : "application/json" }, "Response" : { @@ -664,29 +664,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "269049da-51ff-4cbc-9a9b-5811fa086117", + "x-ms-correlation-request-id" : "ac965e72-519a-4ace-a338-6c636b00aee4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"KtppWKIMeXsbrQ4QxWCQhP6Ad6X\"", + "ETag" : "\"hJ58YdHvhOOg2knMXbtG35WbP8n\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NzA=;sn=401970", - "x-ms-request-id" : "269049da-51ff-4cbc-9a9b-5811fa086117", - "Body" : "{\"etag\":\"KtppWKIMeXsbrQ4QxWCQhP6Ad6X\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "096a5391-ee23-44db-b110-262bea7a6df5", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NjI=;sn=448762", + "x-ms-request-id" : "ac965e72-519a-4ace-a338-6c636b00aee4", + "Body" : "{\"etag\":\"hJ58YdHvhOOg2knMXbtG35WbP8n\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "4f37419d-a2d7-441b-b303-a3cc167c7987", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a2eed5c8-671b-420e-b66a-46b78d35fb0a", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8a6e03ec-5b26-4b73-98a9-b9f43914d05d", "Content-Type" : "application/json" }, "Response" : { @@ -695,29 +695,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "76b5b051-5353-4fc7-be39-8b7b7a23969a", + "x-ms-correlation-request-id" : "8a3fd5ac-4575-4d1d-b251-d53465d6726b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"O5jLyO6HDCvRYwKxz52Q76OttwF\"", + "ETag" : "\"wSb0inpedc1McnHvBXXXu9SDN0Q\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NzE=;sn=401971", - "x-ms-request-id" : "76b5b051-5353-4fc7-be39-8b7b7a23969a", - "Body" : "{\"etag\":\"O5jLyO6HDCvRYwKxz52Q76OttwF\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "a2eed5c8-671b-420e-b66a-46b78d35fb0a", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NjM=;sn=448763", + "x-ms-request-id" : "8a3fd5ac-4575-4d1d-b251-d53465d6726b", + "Body" : "{\"etag\":\"wSb0inpedc1McnHvBXXXu9SDN0Q\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "8a6e03ec-5b26-4b73-98a9-b9f43914d05d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d93961d5-9729-473a-b108-321cec204bd7", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0766b7ec-ff43-4a32-8581-1da2cc480f58", "Content-Type" : "application/json" }, "Response" : { @@ -726,29 +726,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "8aaad837-567e-4b54-99aa-67bd1549bccb", + "x-ms-correlation-request-id" : "abc3f012-2bf3-491b-81c8-b7852667a882", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"UQ8YCiOwjxKqWwpDIVeVrOxjVqd\"", + "ETag" : "\"FU5QhzsHqBSBmJ7PW5Ju5RRr2vU\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NzI=;sn=401972", - "x-ms-request-id" : "8aaad837-567e-4b54-99aa-67bd1549bccb", - "Body" : "{\"etag\":\"UQ8YCiOwjxKqWwpDIVeVrOxjVqd\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "d93961d5-9729-473a-b108-321cec204bd7", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NjQ=;sn=448764", + "x-ms-request-id" : "abc3f012-2bf3-491b-81c8-b7852667a882", + "Body" : "{\"etag\":\"FU5QhzsHqBSBmJ7PW5Ju5RRr2vU\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "0766b7ec-ff43-4a32-8581-1da2cc480f58", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a869c9c8-5a33-468d-9376-b2ed423ce1e8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a806c910-a3dc-43bf-b96c-2ca3a85473e0", "Content-Type" : "application/json" }, "Response" : { @@ -757,29 +757,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "05344a7c-494d-4e47-ba83-9a52c3cf0c79", + "x-ms-correlation-request-id" : "207e0218-e26c-4ca4-9a5e-d30bfbec057d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ajdPMatth09oHDlGegPEMxAPUBf\"", + "ETag" : "\"TLm9WB8rHDiSI7crkN4n37psVfR\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NzM=;sn=401973", - "x-ms-request-id" : "05344a7c-494d-4e47-ba83-9a52c3cf0c79", - "Body" : "{\"etag\":\"ajdPMatth09oHDlGegPEMxAPUBf\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "a869c9c8-5a33-468d-9376-b2ed423ce1e8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NjU=;sn=448765", + "x-ms-request-id" : "207e0218-e26c-4ca4-9a5e-d30bfbec057d", + "Body" : "{\"etag\":\"TLm9WB8rHDiSI7crkN4n37psVfR\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "a806c910-a3dc-43bf-b96c-2ca3a85473e0", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f1a77cb0-277f-42f7-a6e4-5212040708d7", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "22ec736a-5436-463a-8186-e65b5f0a82a8", "Content-Type" : "application/json" }, "Response" : { @@ -788,29 +788,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:03 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "937b4c36-3136-4f43-b022-2ea5e84baf26", + "x-ms-correlation-request-id" : "dfbcfb92-5817-4e5e-882c-21e9977d1484", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"iXjuU6OH5rRg59KVDIIh9mT70Aw\"", + "ETag" : "\"U2TSC6RUQ4gZYB23zgfrgY95JyE\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NzQ=;sn=401974", - "x-ms-request-id" : "937b4c36-3136-4f43-b022-2ea5e84baf26", - "Body" : "{\"etag\":\"iXjuU6OH5rRg59KVDIIh9mT70Aw\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "f1a77cb0-277f-42f7-a6e4-5212040708d7", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NjY=;sn=448766", + "x-ms-request-id" : "dfbcfb92-5817-4e5e-882c-21e9977d1484", + "Body" : "{\"etag\":\"U2TSC6RUQ4gZYB23zgfrgY95JyE\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "22ec736a-5436-463a-8186-e65b5f0a82a8", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7e7b45c3-bdf4-49c0-8e46-6f4747bd9f62", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9b8d63b7-9a99-407d-991e-f00339bcdd76", "Content-Type" : "application/json" }, "Response" : { @@ -819,29 +819,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:03 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "58361714-71b5-4657-9f04-f7bc59fc1743", + "x-ms-correlation-request-id" : "474cdf6f-7a3f-4e34-9eaf-a6762a0c3474", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"rzsfylpRJpwiQqUjUrvW660yTl5\"", + "ETag" : "\"6wWMEBP5TunYRZPoGR7gZmgupZg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NzU=;sn=401975", - "x-ms-request-id" : "58361714-71b5-4657-9f04-f7bc59fc1743", - "Body" : "{\"etag\":\"rzsfylpRJpwiQqUjUrvW660yTl5\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "7e7b45c3-bdf4-49c0-8e46-6f4747bd9f62", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Njc=;sn=448767", + "x-ms-request-id" : "474cdf6f-7a3f-4e34-9eaf-a6762a0c3474", + "Body" : "{\"etag\":\"6wWMEBP5TunYRZPoGR7gZmgupZg\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "9b8d63b7-9a99-407d-991e-f00339bcdd76", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6a99a79f-7d07-4cff-81c2-34d083340f99", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6e75dcb5-8cfa-40d8-b8a8-f8c5845e4060", "Content-Type" : "application/json" }, "Response" : { @@ -850,29 +850,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:03 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "220a9820-676a-43b7-948a-e162bac2572f", + "x-ms-correlation-request-id" : "6590e271-3e63-45d2-89d3-5aef389547e6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"u1COzpBjfMxxZxMKhd3awgQusS2\"", + "ETag" : "\"LQ5gJNPWOm9uinOVPyDAeWt6etq\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NzY=;sn=401976", - "x-ms-request-id" : "220a9820-676a-43b7-948a-e162bac2572f", - "Body" : "{\"etag\":\"u1COzpBjfMxxZxMKhd3awgQusS2\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"}", - "x-ms-client-request-id" : "6a99a79f-7d07-4cff-81c2-34d083340f99", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Njg=;sn=448768", + "x-ms-request-id" : "6590e271-3e63-45d2-89d3-5aef389547e6", + "Body" : "{\"etag\":\"LQ5gJNPWOm9uinOVPyDAeWt6etq\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "6e75dcb5-8cfa-40d8-b8a8-f8c5845e4060", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5c35f1ae-0887-46e7-b578-37604ba4ae8e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8a82e25f-5915-4ce5-bbf6-91d62d48d070", "Content-Type" : "application/json" }, "Response" : { @@ -881,29 +881,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:53 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:03 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ff8f6c20-f88c-479d-a05d-0e3b0eccc184", + "x-ms-correlation-request-id" : "8f070da0-5554-4654-a036-061c71a85047", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ZOTmSDQeFAC6qAs5Uyqsov8vR1L\"", + "ETag" : "\"ZKZ9zzq5WPjikzQnp3Jq63mVRnA\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Nzc=;sn=401977", - "x-ms-request-id" : "ff8f6c20-f88c-479d-a05d-0e3b0eccc184", - "Body" : "{\"etag\":\"ZOTmSDQeFAC6qAs5Uyqsov8vR1L\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"}", - "x-ms-client-request-id" : "5c35f1ae-0887-46e7-b578-37604ba4ae8e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Njk=;sn=448769", + "x-ms-request-id" : "8f070da0-5554-4654-a036-061c71a85047", + "Body" : "{\"etag\":\"ZKZ9zzq5WPjikzQnp3Jq63mVRnA\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"}", + "x-ms-client-request-id" : "8a82e25f-5915-4ce5-bbf6-91d62d48d070", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "99a211de-c731-48f8-87b9-910a2e1798af", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5ab136d1-5cbe-45bc-8dbc-87e46ffe2dee", "Content-Type" : "application/json" }, "Response" : { @@ -912,29 +912,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:53 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:04 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:03 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "05c453fb-721c-41a9-8a34-d2c5afa2b76a", + "x-ms-correlation-request-id" : "4e2ca9e0-2809-4295-9772-627bf018e79d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"BoNa53OjcYtV8tQg9QuxMQkHmiw\"", + "ETag" : "\"6Y5WLF8rpwCRjdlihaFED917EEh\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Nzg=;sn=401978", - "x-ms-request-id" : "05c453fb-721c-41a9-8a34-d2c5afa2b76a", - "Body" : "{\"etag\":\"BoNa53OjcYtV8tQg9QuxMQkHmiw\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"}", - "x-ms-client-request-id" : "99a211de-c731-48f8-87b9-910a2e1798af", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NzA=;sn=448770", + "x-ms-request-id" : "4e2ca9e0-2809-4295-9772-627bf018e79d", + "Body" : "{\"etag\":\"6Y5WLF8rpwCRjdlihaFED917EEh\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"}", + "x-ms-client-request-id" : "5ab136d1-5cbe-45bc-8dbc-87e46ffe2dee", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1fce5f93-266c-444e-88b3-b9adc7d8da88", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a1e6ea67-747b-4718-801a-a9560b815986", "Content-Type" : "application/json" }, "Response" : { @@ -943,29 +943,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:53 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:04 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:03 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4dfcdf8f-0110-4f50-96d4-cf62d198cff9", + "x-ms-correlation-request-id" : "de8037ce-7c6f-4c10-a608-28493d025aec", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"xSM6q74gp2SUV0kFiJyYx4kvuE3\"", + "ETag" : "\"YoaedIOjOWKf5QuR6JDVragW23N\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Nzk=;sn=401979", - "x-ms-request-id" : "4dfcdf8f-0110-4f50-96d4-cf62d198cff9", - "Body" : "{\"etag\":\"xSM6q74gp2SUV0kFiJyYx4kvuE3\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"}", - "x-ms-client-request-id" : "1fce5f93-266c-444e-88b3-b9adc7d8da88", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NzE=;sn=448771", + "x-ms-request-id" : "de8037ce-7c6f-4c10-a608-28493d025aec", + "Body" : "{\"etag\":\"YoaedIOjOWKf5QuR6JDVragW23N\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"}", + "x-ms-client-request-id" : "a1e6ea67-747b-4718-801a-a9560b815986", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "fe429450-b8f2-4278-ba0a-1491b809c793", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ada854cd-f017-4b56-8316-79c5d83b8283", "Content-Type" : "application/json" }, "Response" : { @@ -974,29 +974,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:53 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:04 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:03 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3fe4393e-80e2-4437-80b4-a7c9c41b6405", + "x-ms-correlation-request-id" : "38a6602f-a315-4b44-a077-d0958621ff6d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"4blNoH3mYLItmAf6ApA3ruL09Ci\"", + "ETag" : "\"2694W2eBmfwUqli55kYPbzkFrRD\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5ODA=;sn=401980", - "x-ms-request-id" : "3fe4393e-80e2-4437-80b4-a7c9c41b6405", - "Body" : "{\"etag\":\"4blNoH3mYLItmAf6ApA3ruL09Ci\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"}", - "x-ms-client-request-id" : "fe429450-b8f2-4278-ba0a-1491b809c793", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NzI=;sn=448772", + "x-ms-request-id" : "38a6602f-a315-4b44-a077-d0958621ff6d", + "Body" : "{\"etag\":\"2694W2eBmfwUqli55kYPbzkFrRD\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"}", + "x-ms-client-request-id" : "ada854cd-f017-4b56-8316-79c5d83b8283", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "05f962af-1eed-4626-9e4d-9fff4f596160", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "35f94032-fd88-41c1-92a9-ccff1401e027", "Content-Type" : "application/json" }, "Response" : { @@ -1005,29 +1005,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:53 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:04 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:03 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "8d2a56e2-3dfd-45a6-b4c5-38467a2f3d6d", + "x-ms-correlation-request-id" : "bd9a7caf-16ac-4c53-83bb-246c8bbda1ae", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"GqHkhKoC3d6OfXJijQez8PG2gFN\"", + "ETag" : "\"XnZ41RMjyCXByaayWaHIOztFrPu\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5ODE=;sn=401981", - "x-ms-request-id" : "8d2a56e2-3dfd-45a6-b4c5-38467a2f3d6d", - "Body" : "{\"etag\":\"GqHkhKoC3d6OfXJijQez8PG2gFN\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"}", - "x-ms-client-request-id" : "05f962af-1eed-4626-9e4d-9fff4f596160", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NzM=;sn=448773", + "x-ms-request-id" : "bd9a7caf-16ac-4c53-83bb-246c8bbda1ae", + "Body" : "{\"etag\":\"XnZ41RMjyCXByaayWaHIOztFrPu\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"}", + "x-ms-client-request-id" : "35f94032-fd88-41c1-92a9-ccff1401e027", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5f920e66-5383-4c00-8761-cbf0447f659d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "43c7dddb-ed9d-4c20-ac1c-c489df56caec", "Content-Type" : "application/json" }, "Response" : { @@ -1036,29 +1036,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:53 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:04 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:03 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "87d3ed87-df9e-4acd-8bfd-97a7314570cd", + "x-ms-correlation-request-id" : "3efe10c4-68bb-4c94-a956-a8d9faceebed", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"TDTt9hvi4mbXwLSQUJd84rII0tD\"", + "ETag" : "\"4ekEbe2IalNeV0AeiQizsmCqg5f\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5ODI=;sn=401982", - "x-ms-request-id" : "87d3ed87-df9e-4acd-8bfd-97a7314570cd", - "Body" : "{\"etag\":\"TDTt9hvi4mbXwLSQUJd84rII0tD\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"}", - "x-ms-client-request-id" : "5f920e66-5383-4c00-8761-cbf0447f659d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NzQ=;sn=448774", + "x-ms-request-id" : "3efe10c4-68bb-4c94-a956-a8d9faceebed", + "Body" : "{\"etag\":\"4ekEbe2IalNeV0AeiQizsmCqg5f\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"}", + "x-ms-client-request-id" : "43c7dddb-ed9d-4c20-ac1c-c489df56caec", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8b1488ba-f733-436a-b249-b7ac170fe174", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d57cc3d4-327d-4aef-b463-53e0ed6737f6", "Content-Type" : "application/json" }, "Response" : { @@ -1067,29 +1067,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:53 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:04 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:03 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7cad5c3a-b24b-4c36-8511-36b51bb10a01", + "x-ms-correlation-request-id" : "f53faa28-4f27-4b28-83c7-8965a67b2aad", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"liYVszpf9NcCuEIhM6aiiuQ52iq\"", + "ETag" : "\"yaQ4ExcfmG3vqVVDUobCaSeTP2f\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5ODM=;sn=401983", - "x-ms-request-id" : "7cad5c3a-b24b-4c36-8511-36b51bb10a01", - "Body" : "{\"etag\":\"liYVszpf9NcCuEIhM6aiiuQ52iq\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"}", - "x-ms-client-request-id" : "8b1488ba-f733-436a-b249-b7ac170fe174", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NzU=;sn=448775", + "x-ms-request-id" : "f53faa28-4f27-4b28-83c7-8965a67b2aad", + "Body" : "{\"etag\":\"yaQ4ExcfmG3vqVVDUobCaSeTP2f\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"}", + "x-ms-client-request-id" : "d57cc3d4-327d-4aef-b463-53e0ed6737f6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c71a9216-edc0-43c1-b3b2-c23eea221ef0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "898302e1-c4a3-41f2-b608-5c5f84eef594", "Content-Type" : "application/json" }, "Response" : { @@ -1098,29 +1098,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:53 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:04 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:03 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "90e2c1a8-ed1c-4629-aa75-3178f655a1f3", + "x-ms-correlation-request-id" : "2426e69b-17b2-4c01-93de-3c0ca80214de", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"GoLiDb47yNtzrwG1oIsWkc9Xltp\"", + "ETag" : "\"XrLuMJaXdk1AAvoI1FlM09KuLzN\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5ODQ=;sn=401984", - "x-ms-request-id" : "90e2c1a8-ed1c-4629-aa75-3178f655a1f3", - "Body" : "{\"etag\":\"GoLiDb47yNtzrwG1oIsWkc9Xltp\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"}", - "x-ms-client-request-id" : "c71a9216-edc0-43c1-b3b2-c23eea221ef0", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NzY=;sn=448776", + "x-ms-request-id" : "2426e69b-17b2-4c01-93de-3c0ca80214de", + "Body" : "{\"etag\":\"XrLuMJaXdk1AAvoI1FlM09KuLzN\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"}", + "x-ms-client-request-id" : "898302e1-c4a3-41f2-b608-5c5f84eef594", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5d5df59f-330c-4557-aefb-670015833657", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a60fc087-b70f-4b90-bce6-d2914cc6bad6", "Content-Type" : "application/json" }, "Response" : { @@ -1129,29 +1129,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:53 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:04 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:03 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "85dd1aba-91e9-4ea1-8dd5-77ff9d49fba2", + "x-ms-correlation-request-id" : "2b636e83-b255-4d39-a20d-ab61dc5712b2", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"nIWmaH51XBeusqImqUu6K9Xo0al\"", + "ETag" : "\"pnIkqJWCdbfOjFDBIGuL2slh6l9\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5ODU=;sn=401985", - "x-ms-request-id" : "85dd1aba-91e9-4ea1-8dd5-77ff9d49fba2", - "Body" : "{\"etag\":\"nIWmaH51XBeusqImqUu6K9Xo0al\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"}", - "x-ms-client-request-id" : "5d5df59f-330c-4557-aefb-670015833657", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Nzc=;sn=448777", + "x-ms-request-id" : "2b636e83-b255-4d39-a20d-ab61dc5712b2", + "Body" : "{\"etag\":\"pnIkqJWCdbfOjFDBIGuL2slh6l9\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"}", + "x-ms-client-request-id" : "a60fc087-b70f-4b90-bce6-d2914cc6bad6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "58c9aab7-e39f-4241-8cf6-869895f00704", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4fc7d850-cf8e-4f0a-a40d-959fd3420800", "Content-Type" : "application/json" }, "Response" : { @@ -1160,29 +1160,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:53 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:04 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:03 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d33fbda3-1731-436e-8c3f-4ba7a9c4b0ea", + "x-ms-correlation-request-id" : "dd6c22ff-aa79-467b-af38-73b371672e5e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ODtETasvfSU4ye3cKysbkvrPAMA\"", + "ETag" : "\"a5KlHgfVme8ZJhLS2De4nmz3jkK\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5ODY=;sn=401986", - "x-ms-request-id" : "d33fbda3-1731-436e-8c3f-4ba7a9c4b0ea", - "Body" : "{\"etag\":\"ODtETasvfSU4ye3cKysbkvrPAMA\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"}", - "x-ms-client-request-id" : "58c9aab7-e39f-4241-8cf6-869895f00704", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Nzg=;sn=448778", + "x-ms-request-id" : "dd6c22ff-aa79-467b-af38-73b371672e5e", + "Body" : "{\"etag\":\"a5KlHgfVme8ZJhLS2De4nmz3jkK\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"}", + "x-ms-client-request-id" : "4fc7d850-cf8e-4f0a-a40d-959fd3420800", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2d6fc4f7-f2aa-4593-84ae-3a503b1c0bf9", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d3f9d159-a4ac-4307-9d1f-82b9e95cf647", "Content-Type" : "application/json" }, "Response" : { @@ -1191,29 +1191,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:53 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:06 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:05 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7c10a1aa-a809-4a4a-b2f3-fdb9b4a6aef5", + "x-ms-correlation-request-id" : "d05517a5-2087-47bd-bbb6-0e703aa80f5e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"FAEzcPrvlCyWUuWcGUJj8vC0WQh\"", + "ETag" : "\"t5GwQhocpxKnnSmGfmpnDB9FSVd\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5ODc=;sn=401987", - "x-ms-request-id" : "7c10a1aa-a809-4a4a-b2f3-fdb9b4a6aef5", - "Body" : "{\"etag\":\"FAEzcPrvlCyWUuWcGUJj8vC0WQh\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"}", - "x-ms-client-request-id" : "2d6fc4f7-f2aa-4593-84ae-3a503b1c0bf9", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Nzk=;sn=448779", + "x-ms-request-id" : "d05517a5-2087-47bd-bbb6-0e703aa80f5e", + "Body" : "{\"etag\":\"t5GwQhocpxKnnSmGfmpnDB9FSVd\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"}", + "x-ms-client-request-id" : "d3f9d159-a4ac-4307-9d1f-82b9e95cf647", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "af4d3c90-251c-446e-9c5c-74d02dc5d32f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "11ac2ed5-d089-4ad6-a123-13cee70e6fdc", "Content-Type" : "application/json" }, "Response" : { @@ -1222,29 +1222,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:53 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:06 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:05 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f1dc998d-3fe9-49e6-b678-b6be4cee836a", + "x-ms-correlation-request-id" : "d2c1e058-0ed6-4ffd-8af2-4baa876736a1", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"n4uP0KtYvBoB3AnxRAzeAT88LbX\"", + "ETag" : "\"ZzFRLCoCWhV8kdQSZEDsOQ9T4hM\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5ODg=;sn=401988", - "x-ms-request-id" : "f1dc998d-3fe9-49e6-b678-b6be4cee836a", - "Body" : "{\"etag\":\"n4uP0KtYvBoB3AnxRAzeAT88LbX\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"}", - "x-ms-client-request-id" : "af4d3c90-251c-446e-9c5c-74d02dc5d32f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3ODA=;sn=448780", + "x-ms-request-id" : "d2c1e058-0ed6-4ffd-8af2-4baa876736a1", + "Body" : "{\"etag\":\"ZzFRLCoCWhV8kdQSZEDsOQ9T4hM\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"}", + "x-ms-client-request-id" : "11ac2ed5-d089-4ad6-a123-13cee70e6fdc", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9e5d307b-d759-4881-ab0d-d8ee415760bb", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1a7dac98-597f-42a3-b50d-c876be52a2e6", "Content-Type" : "application/json" }, "Response" : { @@ -1253,29 +1253,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:53 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:06 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:52 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:05 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b72e35dc-d5bd-4e6b-abc3-97a308700ee1", + "x-ms-correlation-request-id" : "215cee26-a6c3-4ba9-8542-db90b1c123cd", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Ps8HSeeYFqLpGndXGfUwgkViVD3\"", + "ETag" : "\"9nU1hliYTTwg1cOm4JWQFpC2ilx\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5ODk=;sn=401989", - "x-ms-request-id" : "b72e35dc-d5bd-4e6b-abc3-97a308700ee1", - "Body" : "{\"etag\":\"Ps8HSeeYFqLpGndXGfUwgkViVD3\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"}", - "x-ms-client-request-id" : "9e5d307b-d759-4881-ab0d-d8ee415760bb", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3ODE=;sn=448781", + "x-ms-request-id" : "215cee26-a6c3-4ba9-8542-db90b1c123cd", + "Body" : "{\"etag\":\"9nU1hliYTTwg1cOm4JWQFpC2ilx\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"}", + "x-ms-client-request-id" : "1a7dac98-597f-42a3-b50d-c876be52a2e6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8bf09581-27dc-4d56-954e-1ab822f91811", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "79ab2fc1-909d-46e0-a395-f73fb2745dca", "Content-Type" : "application/json" }, "Response" : { @@ -1284,29 +1284,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:54 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:06 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:54 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:05 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6bcda950-b65a-4daa-b71f-a5f60a195d22", + "x-ms-correlation-request-id" : "160c47e9-1b45-4770-8467-d1459a5f638c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"8vuEDgBNv6QK5HbCEqZVdEGtCcK\"", + "ETag" : "\"0vdpVoYEpKgHXW4vZIoocik4f0P\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5OTA=;sn=401990", - "x-ms-request-id" : "6bcda950-b65a-4daa-b71f-a5f60a195d22", - "Body" : "{\"etag\":\"8vuEDgBNv6QK5HbCEqZVdEGtCcK\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:54+00:00\"}", - "x-ms-client-request-id" : "8bf09581-27dc-4d56-954e-1ab822f91811", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3ODI=;sn=448782", + "x-ms-request-id" : "160c47e9-1b45-4770-8467-d1459a5f638c", + "Body" : "{\"etag\":\"0vdpVoYEpKgHXW4vZIoocik4f0P\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"}", + "x-ms-client-request-id" : "79ab2fc1-909d-46e0-a395-f73fb2745dca", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e037b38d-61b6-46a7-b563-d9ea6c031b6c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9ba8eed6-8739-4485-8e2c-eaa85d43ef97", "Content-Type" : "application/json" }, "Response" : { @@ -1315,29 +1315,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:55 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:06 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:54 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:05 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "e26e2b92-603f-48a1-9993-11036a18de6a", + "x-ms-correlation-request-id" : "efe3a8a3-74ac-410d-8264-d2493d4cba07", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"dhp8o1K3OtLfHDriSRspUqUuNyt\"", + "ETag" : "\"b4CtLtH76bWrx41AedNNsIkT3sk\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5OTE=;sn=401991", - "x-ms-request-id" : "e26e2b92-603f-48a1-9993-11036a18de6a", - "Body" : "{\"etag\":\"dhp8o1K3OtLfHDriSRspUqUuNyt\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"}", - "x-ms-client-request-id" : "e037b38d-61b6-46a7-b563-d9ea6c031b6c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3ODM=;sn=448783", + "x-ms-request-id" : "efe3a8a3-74ac-410d-8264-d2493d4cba07", + "Body" : "{\"etag\":\"b4CtLtH76bWrx41AedNNsIkT3sk\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"}", + "x-ms-client-request-id" : "9ba8eed6-8739-4485-8e2c-eaa85d43ef97", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3ddafbfb-4fb4-46d0-9047-4a1d25acc992", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "828a6bf1-e150-4c67-81d1-459830f219ba", "Content-Type" : "application/json" }, "Response" : { @@ -1346,29 +1346,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:55 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:06 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:54 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:05 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "de322952-1b1b-421c-b848-83e37aff983a", + "x-ms-correlation-request-id" : "e5168771-9f8c-454e-bdd0-a241e9293bb1", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"GESwh1OVfFS373in2IoPpZKHZce\"", + "ETag" : "\"bSPNexlTSsAq8MArpjLoJXy1DQP\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5OTI=;sn=401992", - "x-ms-request-id" : "de322952-1b1b-421c-b848-83e37aff983a", - "Body" : "{\"etag\":\"GESwh1OVfFS373in2IoPpZKHZce\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"}", - "x-ms-client-request-id" : "3ddafbfb-4fb4-46d0-9047-4a1d25acc992", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3ODQ=;sn=448784", + "x-ms-request-id" : "e5168771-9f8c-454e-bdd0-a241e9293bb1", + "Body" : "{\"etag\":\"bSPNexlTSsAq8MArpjLoJXy1DQP\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"}", + "x-ms-client-request-id" : "828a6bf1-e150-4c67-81d1-459830f219ba", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "463c0b4d-bca6-4ee3-adb7-730106d142e7", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d437669b-868f-44be-9563-e3de021642f2", "Content-Type" : "application/json" }, "Response" : { @@ -1377,29 +1377,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:55 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:06 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:54 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:05 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1ca864c1-aa2a-40e1-8034-e325b6f108ea", + "x-ms-correlation-request-id" : "e3a89f25-9d24-411b-b975-b97eb4cad99d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"rr4FSdKwF9fUIVOpYWUJ7L7QA7K\"", + "ETag" : "\"rAHQHyWUvXajolovBv4y3FqWU0l\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5OTM=;sn=401993", - "x-ms-request-id" : "1ca864c1-aa2a-40e1-8034-e325b6f108ea", - "Body" : "{\"etag\":\"rr4FSdKwF9fUIVOpYWUJ7L7QA7K\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"}", - "x-ms-client-request-id" : "463c0b4d-bca6-4ee3-adb7-730106d142e7", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3ODU=;sn=448785", + "x-ms-request-id" : "e3a89f25-9d24-411b-b975-b97eb4cad99d", + "Body" : "{\"etag\":\"rAHQHyWUvXajolovBv4y3FqWU0l\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"}", + "x-ms-client-request-id" : "d437669b-868f-44be-9563-e3de021642f2", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "583d9c42-63f1-4b2c-a3aa-5b6fcc061a10", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a5d6c23c-ae6a-4ef4-9cd5-9e98438f5523", "Content-Type" : "application/json" }, "Response" : { @@ -1408,29 +1408,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:55 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:06 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:54 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:05 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "acc8cbe8-4bea-4a66-b702-7c9c73098443", + "x-ms-correlation-request-id" : "9dd53364-0077-44e6-b995-3a2128d096ed", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"iow3nMBJz8JY9usZ9gKTNtBQqrn\"", + "ETag" : "\"p1c9NhnfCOeAKQPYjPoihzOufyP\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5OTQ=;sn=401994", - "x-ms-request-id" : "acc8cbe8-4bea-4a66-b702-7c9c73098443", - "Body" : "{\"etag\":\"iow3nMBJz8JY9usZ9gKTNtBQqrn\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"}", - "x-ms-client-request-id" : "583d9c42-63f1-4b2c-a3aa-5b6fcc061a10", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3ODY=;sn=448786", + "x-ms-request-id" : "9dd53364-0077-44e6-b995-3a2128d096ed", + "Body" : "{\"etag\":\"p1c9NhnfCOeAKQPYjPoihzOufyP\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"}", + "x-ms-client-request-id" : "a5d6c23c-ae6a-4ef4-9cd5-9e98438f5523", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cc32d6de-3d08-4c83-a11a-e4c986c6fee1", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "908f6a7e-e997-4008-ba7c-a5602d2793f1", "Content-Type" : "application/json" }, "Response" : { @@ -1439,29 +1439,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:55 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:08 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:54 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:07 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "dd5fae33-20e7-4cdd-ac13-2691bbb878a2", + "x-ms-correlation-request-id" : "6e69a02d-cc72-4067-bea6-16186087e32f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ZN0I8yPgVcwFZ4cfQoZMXAubr7z\"", + "ETag" : "\"3X0pvEG77rQcJjCJgIkGvcKaA6H\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5OTU=;sn=401995", - "x-ms-request-id" : "dd5fae33-20e7-4cdd-ac13-2691bbb878a2", - "Body" : "{\"etag\":\"ZN0I8yPgVcwFZ4cfQoZMXAubr7z\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"}", - "x-ms-client-request-id" : "cc32d6de-3d08-4c83-a11a-e4c986c6fee1", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3ODc=;sn=448787", + "x-ms-request-id" : "6e69a02d-cc72-4067-bea6-16186087e32f", + "Body" : "{\"etag\":\"3X0pvEG77rQcJjCJgIkGvcKaA6H\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"}", + "x-ms-client-request-id" : "908f6a7e-e997-4008-ba7c-a5602d2793f1", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4796d51c-8a17-4237-a326-da3bdb884ed2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2b0b998e-623e-4915-80dc-b31e16cf2f34", "Content-Type" : "application/json" }, "Response" : { @@ -1470,29 +1470,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:55 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:08 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:54 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:07 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4f5efecd-7762-464f-a0f3-785a0cace001", + "x-ms-correlation-request-id" : "ed391ec7-8cf7-48fc-b2b1-f03379dd850f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"yxD8yiibxH97r7YVO26623Pz4Hc\"", + "ETag" : "\"1iHrqjvAExB4yJpzf8rbGhUTD0O\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5OTY=;sn=401996", - "x-ms-request-id" : "4f5efecd-7762-464f-a0f3-785a0cace001", - "Body" : "{\"etag\":\"yxD8yiibxH97r7YVO26623Pz4Hc\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"}", - "x-ms-client-request-id" : "4796d51c-8a17-4237-a326-da3bdb884ed2", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3ODg=;sn=448788", + "x-ms-request-id" : "ed391ec7-8cf7-48fc-b2b1-f03379dd850f", + "Body" : "{\"etag\":\"1iHrqjvAExB4yJpzf8rbGhUTD0O\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"}", + "x-ms-client-request-id" : "2b0b998e-623e-4915-80dc-b31e16cf2f34", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a5200085-30f2-40df-a051-d7197e033a21", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2dfe7ebd-bf13-44bd-8152-60d402b588bb", "Content-Type" : "application/json" }, "Response" : { @@ -1501,29 +1501,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:55 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:08 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:54 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:07 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "124d87b4-d04b-49e9-899a-63694e343600", + "x-ms-correlation-request-id" : "51ca29e7-2cde-4ef1-a4f9-6869f9ec4786", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"0YjRRhN26fQNI2SEXG28FyTQEUe\"", + "ETag" : "\"vyLD0iADXXT193PwQqpv1dDrQUd\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5OTc=;sn=401997", - "x-ms-request-id" : "124d87b4-d04b-49e9-899a-63694e343600", - "Body" : "{\"etag\":\"0YjRRhN26fQNI2SEXG28FyTQEUe\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"}", - "x-ms-client-request-id" : "a5200085-30f2-40df-a051-d7197e033a21", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3ODk=;sn=448789", + "x-ms-request-id" : "51ca29e7-2cde-4ef1-a4f9-6869f9ec4786", + "Body" : "{\"etag\":\"vyLD0iADXXT193PwQqpv1dDrQUd\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"}", + "x-ms-client-request-id" : "2dfe7ebd-bf13-44bd-8152-60d402b588bb", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9ba3e295-bc1e-4ca8-85c5-eb73f0b6cd4b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a259bcfa-47d0-46cb-8259-63679c543cc0", "Content-Type" : "application/json" }, "Response" : { @@ -1532,29 +1532,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:08 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:56 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:07 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4c46c2c1-fab2-46c7-9f99-b6c0fc6f693b", + "x-ms-correlation-request-id" : "14a566cf-bb92-42ac-9648-21b3f1fcd906", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"C6AUu0hn2weQuBGkesFAjqN5kga\"", + "ETag" : "\"nv0XQMpZNdxwKcOhsC3fUj3waR1\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5OTg=;sn=401998", - "x-ms-request-id" : "4c46c2c1-fab2-46c7-9f99-b6c0fc6f693b", - "Body" : "{\"etag\":\"C6AUu0hn2weQuBGkesFAjqN5kga\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"}", - "x-ms-client-request-id" : "9ba3e295-bc1e-4ca8-85c5-eb73f0b6cd4b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTA=;sn=448790", + "x-ms-request-id" : "14a566cf-bb92-42ac-9648-21b3f1fcd906", + "Body" : "{\"etag\":\"nv0XQMpZNdxwKcOhsC3fUj3waR1\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"}", + "x-ms-client-request-id" : "a259bcfa-47d0-46cb-8259-63679c543cc0", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key53393&label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key64805&label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "369bbe37-1d4e-4dbb-8ccb-d375e577a6f2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "49611fb4-edbd-4f39-ba7f-bb249bf07e87", "Content-Type" : "application/json" }, "Response" : { @@ -1565,26 +1565,26 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:56 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:07 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "31ebc940-a508-4e84-b867-6a2eb40e8546", + "x-ms-correlation-request-id" : "8a75b1c6-6e0c-4539-b216-0fa80a3499a6", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5OTg=;sn=401998", - "x-ms-request-id" : "31ebc940-a508-4e84-b867-6a2eb40e8546", - "Body" : "{\"items\":[{\"etag\":\"C6AUu0hn2weQuBGkesFAjqN5kga\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"},{\"etag\":\"0YjRRhN26fQNI2SEXG28FyTQEUe\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"yxD8yiibxH97r7YVO26623Pz4Hc\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"ZN0I8yPgVcwFZ4cfQoZMXAubr7z\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"iow3nMBJz8JY9usZ9gKTNtBQqrn\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"rr4FSdKwF9fUIVOpYWUJ7L7QA7K\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"GESwh1OVfFS373in2IoPpZKHZce\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"dhp8o1K3OtLfHDriSRspUqUuNyt\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"8vuEDgBNv6QK5HbCEqZVdEGtCcK\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:54+00:00\"},{\"etag\":\"Ps8HSeeYFqLpGndXGfUwgkViVD3\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"n4uP0KtYvBoB3AnxRAzeAT88LbX\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"FAEzcPrvlCyWUuWcGUJj8vC0WQh\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"ODtETasvfSU4ye3cKysbkvrPAMA\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"nIWmaH51XBeusqImqUu6K9Xo0al\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"GoLiDb47yNtzrwG1oIsWkc9Xltp\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"liYVszpf9NcCuEIhM6aiiuQ52iq\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"TDTt9hvi4mbXwLSQUJd84rII0tD\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"GqHkhKoC3d6OfXJijQez8PG2gFN\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"4blNoH3mYLItmAf6ApA3ruL09Ci\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"xSM6q74gp2SUV0kFiJyYx4kvuE3\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"BoNa53OjcYtV8tQg9QuxMQkHmiw\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"ZOTmSDQeFAC6qAs5Uyqsov8vR1L\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"u1COzpBjfMxxZxMKhd3awgQusS2\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"rzsfylpRJpwiQqUjUrvW660yTl5\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"iXjuU6OH5rRg59KVDIIh9mT70Aw\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"ajdPMatth09oHDlGegPEMxAPUBf\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"UQ8YCiOwjxKqWwpDIVeVrOxjVqd\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"O5jLyO6HDCvRYwKxz52Q76OttwF\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"KtppWKIMeXsbrQ4QxWCQhP6Ad6X\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"P7C9boVUnzQlYWzzSMJEBXfJ0Uc\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"HIZMdlr14PJ1ueLZCemBXC0dsQo\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"rYuLhxdxOPp8A3gnypxAynxjX7e\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"yklnkOJJeSpGP23n53Z2krYqLMw\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"5cdguOI0YWNW7hiEPxik3bxkfFg\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"PsdGDvpgrhptUfqqt9e8pKXvbfV\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"2BLvKBI38PRnQ2YQD2kttZ69T0X\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"gIwPO0fQ3GiOlakubS9OMAGyNIQ\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"aW5eBC8GoHYMGYpjcr0MFJsnNZL\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"8hs0D34PsJgJgpPM2nhOZWLh9t9\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"15DfQe63XtKtlrzrppAUUpaoCw1\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"5xzgsF7KcaHE50mYELTTgaPUI1I\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"N2oYg9NAMBPiHhbwEEVCJD1vykP\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"epemQcbB2DeyvLFqJjNqG4U9N1v\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"BRytgWxDAgEdYLdgM8NN0thAKEX\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"CAm5d6cCma2nt0cC7gTuREytuzr\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"BztP1XcXpdX5vamCxMLGWp1AG0H\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"iWpeG44smVf39f0quwijZc2KwJZ\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"CZOO38en0KW45NEaFdPR40lowuC\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"HPj45VKgNaAnnSYhPAmOTVcl6ql\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"b6EQq2pKMFm3aQAvjqGrHfbZmtc\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}]}", - "x-ms-client-request-id" : "369bbe37-1d4e-4dbb-8ccb-d375e577a6f2", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTA=;sn=448790", + "x-ms-request-id" : "8a75b1c6-6e0c-4539-b216-0fa80a3499a6", + "Body" : "{\"items\":[{\"etag\":\"nv0XQMpZNdxwKcOhsC3fUj3waR1\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"},{\"etag\":\"vyLD0iADXXT193PwQqpv1dDrQUd\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"},{\"etag\":\"1iHrqjvAExB4yJpzf8rbGhUTD0O\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"},{\"etag\":\"3X0pvEG77rQcJjCJgIkGvcKaA6H\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"},{\"etag\":\"p1c9NhnfCOeAKQPYjPoihzOufyP\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"rAHQHyWUvXajolovBv4y3FqWU0l\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"bSPNexlTSsAq8MArpjLoJXy1DQP\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"b4CtLtH76bWrx41AedNNsIkT3sk\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"0vdpVoYEpKgHXW4vZIoocik4f0P\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"9nU1hliYTTwg1cOm4JWQFpC2ilx\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"ZzFRLCoCWhV8kdQSZEDsOQ9T4hM\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"t5GwQhocpxKnnSmGfmpnDB9FSVd\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"a5KlHgfVme8ZJhLS2De4nmz3jkK\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"pnIkqJWCdbfOjFDBIGuL2slh6l9\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"XrLuMJaXdk1AAvoI1FlM09KuLzN\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"yaQ4ExcfmG3vqVVDUobCaSeTP2f\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"4ekEbe2IalNeV0AeiQizsmCqg5f\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"XnZ41RMjyCXByaayWaHIOztFrPu\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"2694W2eBmfwUqli55kYPbzkFrRD\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"YoaedIOjOWKf5QuR6JDVragW23N\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"6Y5WLF8rpwCRjdlihaFED917EEh\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"ZKZ9zzq5WPjikzQnp3Jq63mVRnA\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"LQ5gJNPWOm9uinOVPyDAeWt6etq\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"6wWMEBP5TunYRZPoGR7gZmgupZg\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"U2TSC6RUQ4gZYB23zgfrgY95JyE\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"TLm9WB8rHDiSI7crkN4n37psVfR\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"FU5QhzsHqBSBmJ7PW5Ju5RRr2vU\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"wSb0inpedc1McnHvBXXXu9SDN0Q\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"hJ58YdHvhOOg2knMXbtG35WbP8n\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"7MX0M9p1tOa2Fnr9OGzyWTkLOdi\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"eaIzNXTaoulBKPPsNHwnbVMeLbS\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"lM6clnN1Sf5D2yFfGaGEMr4fhMQ\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"V9KvBw3AkC6ckyBgYbZWbUB2YPF\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"oCVW5CdOMq5NIPOhUgTJe2O8fhr\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"KCAK9YgDpo5vVVvGAbtiYGK3lLj\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"Xs7kmcNMOUUwaTbV8WjoVtQTHBV\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"T6YXfjLgDzPFDubk5Y48hxQeSlg\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"9bqakt1CAiEvu00gO1hqElbVMoj\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"gm1MsxX0iJf85xubullz5qrdttv\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"PuUJ4oUdfmsHiJeKhjR1kad4zlt\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"bla9yQ7cwD0EsU9ScK70o18PTlY\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"ebhuRkb77o3v8t6wYv3iok3wEOC\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"11vBEjJ9W1dSHYlm83bTbEEGxt8\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"QivqlcE8vGy9YvrpccqKQJxFR99\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"saMyZRBoeBZHOROpZNLUH4s3yHY\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"},{\"etag\":\"yvNojVaKpS16pbxDTe9xwj0otQc\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"},{\"etag\":\"yNXChimXfnwrSztFeXvM08Rh0QQ\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"},{\"etag\":\"SkwJSoCGo2ZovUYSQX9E284Iakj\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"},{\"etag\":\"gY2JuGLdQ5PgvMLmvpTpzsVcVqG\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"},{\"etag\":\"kdiKJOVmNn14EWvsd3OHuHcloA2\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}]}", + "x-ms-client-request-id" : "49611fb4-edbd-4f39-ba7f-bb249bf07e87", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key53393&label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key64805&label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7f78a061-1419-4bdb-9fd1-e95e584940aa", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "507354dd-706d-47aa-8ced-edc90d3ed13a", "Content-Type" : "application/json" }, "Response" : { @@ -1595,26 +1595,26 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:56 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4f1a7f6b-d28e-4aad-85a2-65883873dd8b", + "x-ms-correlation-request-id" : "8938b69c-9ef7-409b-ac1a-c3282f47c762", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5OTg=;sn=401998", - "x-ms-request-id" : "4f1a7f6b-d28e-4aad-85a2-65883873dd8b", - "Body" : "{\"items\":[{\"etag\":\"C6AUu0hn2weQuBGkesFAjqN5kga\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"},{\"etag\":\"0YjRRhN26fQNI2SEXG28FyTQEUe\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"yxD8yiibxH97r7YVO26623Pz4Hc\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"ZN0I8yPgVcwFZ4cfQoZMXAubr7z\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"iow3nMBJz8JY9usZ9gKTNtBQqrn\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"rr4FSdKwF9fUIVOpYWUJ7L7QA7K\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"GESwh1OVfFS373in2IoPpZKHZce\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"dhp8o1K3OtLfHDriSRspUqUuNyt\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:55+00:00\"},{\"etag\":\"8vuEDgBNv6QK5HbCEqZVdEGtCcK\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:54+00:00\"},{\"etag\":\"Ps8HSeeYFqLpGndXGfUwgkViVD3\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"n4uP0KtYvBoB3AnxRAzeAT88LbX\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"FAEzcPrvlCyWUuWcGUJj8vC0WQh\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"ODtETasvfSU4ye3cKysbkvrPAMA\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"nIWmaH51XBeusqImqUu6K9Xo0al\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"GoLiDb47yNtzrwG1oIsWkc9Xltp\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"liYVszpf9NcCuEIhM6aiiuQ52iq\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"TDTt9hvi4mbXwLSQUJd84rII0tD\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"GqHkhKoC3d6OfXJijQez8PG2gFN\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"4blNoH3mYLItmAf6ApA3ruL09Ci\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"xSM6q74gp2SUV0kFiJyYx4kvuE3\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"BoNa53OjcYtV8tQg9QuxMQkHmiw\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"ZOTmSDQeFAC6qAs5Uyqsov8vR1L\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:53+00:00\"},{\"etag\":\"u1COzpBjfMxxZxMKhd3awgQusS2\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"rzsfylpRJpwiQqUjUrvW660yTl5\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"iXjuU6OH5rRg59KVDIIh9mT70Aw\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"ajdPMatth09oHDlGegPEMxAPUBf\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"UQ8YCiOwjxKqWwpDIVeVrOxjVqd\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"O5jLyO6HDCvRYwKxz52Q76OttwF\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"KtppWKIMeXsbrQ4QxWCQhP6Ad6X\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"P7C9boVUnzQlYWzzSMJEBXfJ0Uc\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"HIZMdlr14PJ1ueLZCemBXC0dsQo\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"rYuLhxdxOPp8A3gnypxAynxjX7e\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"yklnkOJJeSpGP23n53Z2krYqLMw\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"5cdguOI0YWNW7hiEPxik3bxkfFg\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"PsdGDvpgrhptUfqqt9e8pKXvbfV\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"2BLvKBI38PRnQ2YQD2kttZ69T0X\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"gIwPO0fQ3GiOlakubS9OMAGyNIQ\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"aW5eBC8GoHYMGYpjcr0MFJsnNZL\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:52+00:00\"},{\"etag\":\"8hs0D34PsJgJgpPM2nhOZWLh9t9\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"15DfQe63XtKtlrzrppAUUpaoCw1\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"5xzgsF7KcaHE50mYELTTgaPUI1I\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"N2oYg9NAMBPiHhbwEEVCJD1vykP\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"epemQcbB2DeyvLFqJjNqG4U9N1v\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"BRytgWxDAgEdYLdgM8NN0thAKEX\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"CAm5d6cCma2nt0cC7gTuREytuzr\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"BztP1XcXpdX5vamCxMLGWp1AG0H\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"iWpeG44smVf39f0quwijZc2KwJZ\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"CZOO38en0KW45NEaFdPR40lowuC\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"HPj45VKgNaAnnSYhPAmOTVcl6ql\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"b6EQq2pKMFm3aQAvjqGrHfbZmtc\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}]}", - "x-ms-client-request-id" : "7f78a061-1419-4bdb-9fd1-e95e584940aa", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTA=;sn=448790", + "x-ms-request-id" : "8938b69c-9ef7-409b-ac1a-c3282f47c762", + "Body" : "{\"items\":[{\"etag\":\"nv0XQMpZNdxwKcOhsC3fUj3waR1\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"},{\"etag\":\"vyLD0iADXXT193PwQqpv1dDrQUd\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"},{\"etag\":\"1iHrqjvAExB4yJpzf8rbGhUTD0O\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"},{\"etag\":\"3X0pvEG77rQcJjCJgIkGvcKaA6H\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"},{\"etag\":\"p1c9NhnfCOeAKQPYjPoihzOufyP\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"rAHQHyWUvXajolovBv4y3FqWU0l\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"bSPNexlTSsAq8MArpjLoJXy1DQP\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"b4CtLtH76bWrx41AedNNsIkT3sk\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"0vdpVoYEpKgHXW4vZIoocik4f0P\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"9nU1hliYTTwg1cOm4JWQFpC2ilx\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"ZzFRLCoCWhV8kdQSZEDsOQ9T4hM\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"t5GwQhocpxKnnSmGfmpnDB9FSVd\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:06+00:00\"},{\"etag\":\"a5KlHgfVme8ZJhLS2De4nmz3jkK\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"pnIkqJWCdbfOjFDBIGuL2slh6l9\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"XrLuMJaXdk1AAvoI1FlM09KuLzN\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"yaQ4ExcfmG3vqVVDUobCaSeTP2f\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"4ekEbe2IalNeV0AeiQizsmCqg5f\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"XnZ41RMjyCXByaayWaHIOztFrPu\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"2694W2eBmfwUqli55kYPbzkFrRD\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"YoaedIOjOWKf5QuR6JDVragW23N\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"6Y5WLF8rpwCRjdlihaFED917EEh\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:04+00:00\"},{\"etag\":\"ZKZ9zzq5WPjikzQnp3Jq63mVRnA\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"LQ5gJNPWOm9uinOVPyDAeWt6etq\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"6wWMEBP5TunYRZPoGR7gZmgupZg\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"U2TSC6RUQ4gZYB23zgfrgY95JyE\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"TLm9WB8rHDiSI7crkN4n37psVfR\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"FU5QhzsHqBSBmJ7PW5Ju5RRr2vU\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"wSb0inpedc1McnHvBXXXu9SDN0Q\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"hJ58YdHvhOOg2knMXbtG35WbP8n\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"7MX0M9p1tOa2Fnr9OGzyWTkLOdi\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"eaIzNXTaoulBKPPsNHwnbVMeLbS\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"lM6clnN1Sf5D2yFfGaGEMr4fhMQ\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"V9KvBw3AkC6ckyBgYbZWbUB2YPF\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"oCVW5CdOMq5NIPOhUgTJe2O8fhr\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"KCAK9YgDpo5vVVvGAbtiYGK3lLj\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"Xs7kmcNMOUUwaTbV8WjoVtQTHBV\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"T6YXfjLgDzPFDubk5Y48hxQeSlg\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"9bqakt1CAiEvu00gO1hqElbVMoj\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"gm1MsxX0iJf85xubullz5qrdttv\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"PuUJ4oUdfmsHiJeKhjR1kad4zlt\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"bla9yQ7cwD0EsU9ScK70o18PTlY\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"ebhuRkb77o3v8t6wYv3iok3wEOC\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"11vBEjJ9W1dSHYlm83bTbEEGxt8\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"QivqlcE8vGy9YvrpccqKQJxFR99\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:03+00:00\"},{\"etag\":\"saMyZRBoeBZHOROpZNLUH4s3yHY\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"},{\"etag\":\"yvNojVaKpS16pbxDTe9xwj0otQc\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"},{\"etag\":\"yNXChimXfnwrSztFeXvM08Rh0QQ\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"},{\"etag\":\"SkwJSoCGo2ZovUYSQX9E284Iakj\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"},{\"etag\":\"gY2JuGLdQ5PgvMLmvpTpzsVcVqG\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"},{\"etag\":\"kdiKJOVmNn14EWvsd3OHuHcloA2\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}]}", + "x-ms-client-request-id" : "507354dd-706d-47aa-8ced-edc90d3ed13a", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key53393%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key64805%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "da56eaff-efcb-4bcb-836e-bb100e5b06e8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f4284848-7338-4401-8e64-f67e92d86d6f", "Content-Type" : "application/json" }, "Response" : { @@ -1625,25 +1625,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:56 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "575751f8-bcec-41b3-ab65-4f01e5cd4d89", + "x-ms-correlation-request-id" : "92410c4f-e7b4-46b0-a4f6-54b8b066de8a", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5OTg=;sn=401998", - "x-ms-request-id" : "575751f8-bcec-41b3-ab65-4f01e5cd4d89", - "Body" : "{\"items\":[{\"etag\":\"C6AUu0hn2weQuBGkesFAjqN5kga\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"}]}", - "x-ms-client-request-id" : "da56eaff-efcb-4bcb-836e-bb100e5b06e8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTA=;sn=448790", + "x-ms-request-id" : "92410c4f-e7b4-46b0-a4f6-54b8b066de8a", + "Body" : "{\"items\":[{\"etag\":\"nv0XQMpZNdxwKcOhsC3fUj3waR1\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"}]}", + "x-ms-client-request-id" : "f4284848-7338-4401-8e64-f67e92d86d6f", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key53393?label=91d97472", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key64805?label=ee50730d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "163323c6-def7-4380-b4ca-b5cea1780255", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "673bbdf4-7798-4c71-aec7-37bb7fc4b8e9", "Content-Type" : "application/json" }, "Response" : { @@ -1652,23 +1652,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:57 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:08 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:56 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:08 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f151f6e4-8f54-4046-9e3f-809dc9ff255a", + "x-ms-correlation-request-id" : "61afe965-99a1-41a3-b519-da82e7f9029d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"C6AUu0hn2weQuBGkesFAjqN5kga\"", + "ETag" : "\"nv0XQMpZNdxwKcOhsC3fUj3waR1\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5OTk=;sn=401999", - "x-ms-request-id" : "f151f6e4-8f54-4046-9e3f-809dc9ff255a", - "Body" : "{\"etag\":\"C6AUu0hn2weQuBGkesFAjqN5kga\",\"key\":\"key53393\",\"label\":\"91d97472\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:57+00:00\"}", - "x-ms-client-request-id" : "163323c6-def7-4380-b4ca-b5cea1780255", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3OTE=;sn=448791", + "x-ms-request-id" : "61afe965-99a1-41a3-b519-da82e7f9029d", + "Body" : "{\"etag\":\"nv0XQMpZNdxwKcOhsC3fUj3waR1\",\"key\":\"key64805\",\"label\":\"ee50730d\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:08+00:00\"}", + "x-ms-client-request-id" : "673bbdf4-7798-4c71-aec7-37bb7fc4b8e9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key53393", "91d97472" ] + "variables" : [ "key64805", "ee50730d" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithRange.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithRange.json index bb4613102427..c89fb2229d32 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithRange.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithRange.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key5801548220d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key19527078538", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "45d4021d-3b88-44d5-99f3-c511e30024be", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c3dfe8aa-c089-48f8-8729-cacae210a9a9", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:01 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:49 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d07f29aa-37ce-41c2-a7a2-27ecdd3a8b5e", + "x-ms-correlation-request-id" : "3c93b70d-353f-4dd7-acfd-440ff52df17f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ivHhA72t0dmeIN8726hS5gF203i\"", + "ETag" : "\"TWUQV4mOTI3wrIGtUUEkwuy51j9\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MzQ=;sn=401934", - "x-ms-request-id" : "d07f29aa-37ce-41c2-a7a2-27ecdd3a8b5e", - "Body" : "{\"etag\":\"ivHhA72t0dmeIN8726hS5gF203i\",\"key\":\"key5801548220d\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}", - "x-ms-client-request-id" : "45d4021d-3b88-44d5-99f3-c511e30024be", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Mjc=;sn=448727", + "x-ms-request-id" : "3c93b70d-353f-4dd7-acfd-440ff52df17f", + "Body" : "{\"etag\":\"TWUQV4mOTI3wrIGtUUEkwuy51j9\",\"key\":\"key19527078538\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}", + "x-ms-client-request-id" : "c3dfe8aa-c089-48f8-8729-cacae210a9a9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key5801548220d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key19527078538", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "69e2635b-fe12-45ad-b5ef-e928ce125b69", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "60dff53b-50a6-4972-b1e2-ef752712c054", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:01 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b9975b92-9fd7-4462-89c6-55ed76a42b8f", + "x-ms-correlation-request-id" : "377fb793-0254-46e9-ad4a-2a3b1112dfbd", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"1iLyZWySb4gf6zmIgkCFqYcl3Yo\"", + "ETag" : "\"gT7aw0PdTdr95xBUpxt3dNZrwUr\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MzU=;sn=401935", - "x-ms-request-id" : "b9975b92-9fd7-4462-89c6-55ed76a42b8f", - "Body" : "{\"etag\":\"1iLyZWySb4gf6zmIgkCFqYcl3Yo\",\"key\":\"key5801548220d\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}", - "x-ms-client-request-id" : "69e2635b-fe12-45ad-b5ef-e928ce125b69", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Mjg=;sn=448728", + "x-ms-request-id" : "377fb793-0254-46e9-ad4a-2a3b1112dfbd", + "Body" : "{\"etag\":\"gT7aw0PdTdr95xBUpxt3dNZrwUr\",\"key\":\"key19527078538\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}", + "x-ms-client-request-id" : "60dff53b-50a6-4972-b1e2-ef752712c054", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key5801548220d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key19527078538", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4cb42f55-c739-464c-bf91-fbbe968e5909", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "39e4d995-4e60-4f5b-9d28-02a4f1426a90", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:01 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "022b20c1-a501-48bb-bcb5-171811a5aecd", + "x-ms-correlation-request-id" : "145c3e10-5a1f-43bd-8c9b-6a82cc483b1e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"cJxQ12haevyhSvOSPiQtdMJCqTd\"", + "ETag" : "\"v9V3DqnXS7cGNKy2mxmTp0E4Ahn\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MzY=;sn=401936", - "x-ms-request-id" : "022b20c1-a501-48bb-bcb5-171811a5aecd", - "Body" : "{\"etag\":\"cJxQ12haevyhSvOSPiQtdMJCqTd\",\"key\":\"key5801548220d\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}", - "x-ms-client-request-id" : "4cb42f55-c739-464c-bf91-fbbe968e5909", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Mjk=;sn=448729", + "x-ms-request-id" : "145c3e10-5a1f-43bd-8c9b-6a82cc483b1e", + "Body" : "{\"etag\":\"v9V3DqnXS7cGNKy2mxmTp0E4Ahn\",\"key\":\"key19527078538\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}", + "x-ms-client-request-id" : "39e4d995-4e60-4f5b-9d28-02a4f1426a90", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key5801548220d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key19527078538", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0a997b2c-eeb3-4aeb-817d-dbb6a9218855", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ac578dc2-a301-440b-b66a-ab5b61a113a9", "Content-Type" : "application/json" }, "Response" : { @@ -109,26 +109,26 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "206", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "87e932e8-ea87-4ede-98b9-94fc363bb227", + "x-ms-correlation-request-id" : "698690a3-98a9-486b-9375-110e1487e319", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MzY=;sn=401936", - "x-ms-request-id" : "87e932e8-ea87-4ede-98b9-94fc363bb227", - "Body" : "{\"items\":[{\"etag\":\"1iLyZWySb4gf6zmIgkCFqYcl3Yo\",\"key\":\"key5801548220d\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"},{\"etag\":\"ivHhA72t0dmeIN8726hS5gF203i\",\"key\":\"key5801548220d\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}]}", - "x-ms-client-request-id" : "0a997b2c-eeb3-4aeb-817d-dbb6a9218855", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Mjk=;sn=448729", + "x-ms-request-id" : "698690a3-98a9-486b-9375-110e1487e319", + "Body" : "{\"items\":[{\"etag\":\"gT7aw0PdTdr95xBUpxt3dNZrwUr\",\"key\":\"key19527078538\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"},{\"etag\":\"TWUQV4mOTI3wrIGtUUEkwuy51j9\",\"key\":\"key19527078538\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}]}", + "x-ms-client-request-id" : "ac578dc2-a301-440b-b66a-ab5b61a113a9", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key58015%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key19527%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "243a67ca-ed7d-4a79-bc71-cc0677cf1a89", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6cb4580d-f0b3-4809-8a38-4a5f682ec16a", "Content-Type" : "application/json" }, "Response" : { @@ -139,25 +139,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "91f5af3c-a675-4cb4-b0a9-b78f8c320c1b", + "x-ms-correlation-request-id" : "d55eadfd-6eb7-46a1-a6cd-9b8083c2d1f2", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MzY=;sn=401936", - "x-ms-request-id" : "91f5af3c-a675-4cb4-b0a9-b78f8c320c1b", - "Body" : "{\"items\":[{\"etag\":\"cJxQ12haevyhSvOSPiQtdMJCqTd\",\"key\":\"key5801548220d\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}]}", - "x-ms-client-request-id" : "243a67ca-ed7d-4a79-bc71-cc0677cf1a89", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Mjk=;sn=448729", + "x-ms-request-id" : "d55eadfd-6eb7-46a1-a6cd-9b8083c2d1f2", + "Body" : "{\"items\":[{\"etag\":\"v9V3DqnXS7cGNKy2mxmTp0E4Ahn\",\"key\":\"key19527078538\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}]}", + "x-ms-client-request-id" : "6cb4580d-f0b3-4809-8a38-4a5f682ec16a", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key5801548220d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key19527078538", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d4b1902e-6d38-4ade-ac93-0cec9628d003", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "691515b1-b256-437a-8c44-5c37adbeeb1b", "Content-Type" : "application/json" }, "Response" : { @@ -166,23 +166,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:01 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9616421f-aeac-4938-9cbb-b0425a05d9b4", + "x-ms-correlation-request-id" : "b8919812-9596-4330-923e-b12035589261", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"cJxQ12haevyhSvOSPiQtdMJCqTd\"", + "ETag" : "\"v9V3DqnXS7cGNKy2mxmTp0E4Ahn\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Mzc=;sn=401937", - "x-ms-request-id" : "9616421f-aeac-4938-9cbb-b0425a05d9b4", - "Body" : "{\"etag\":\"cJxQ12haevyhSvOSPiQtdMJCqTd\",\"key\":\"key5801548220d\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}", - "x-ms-client-request-id" : "d4b1902e-6d38-4ade-ac93-0cec9628d003", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MzA=;sn=448730", + "x-ms-request-id" : "b8919812-9596-4330-923e-b12035589261", + "Body" : "{\"etag\":\"v9V3DqnXS7cGNKy2mxmTp0E4Ahn\",\"key\":\"key19527078538\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}", + "x-ms-client-request-id" : "691515b1-b256-437a-8c44-5c37adbeeb1b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key58015", "ed2ecb03", "key5801548220d" ] + "variables" : [ "key19527", "36a9626e", "key19527078538" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsAcceptDateTime.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsAcceptDateTime.json index 0a25f40c5e25..a0ee16c0c20e 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsAcceptDateTime.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsAcceptDateTime.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1185138186f", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0211359924d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7fd0361c-0522-4aef-a73a-ee69a26bf7b2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8e161ee4-5e87-4bd7-8c40-f7f6847bc17b", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:42 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "99b0355f-9d14-4a72-8464-3ff2da809663", + "x-ms-correlation-request-id" : "3669bc4f-b7f3-4a84-9b3e-0c9ac0af7d76", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"CftebqLiruCd7o1F6MQdYA5KcGH\"", + "ETag" : "\"9X11lrPtrxcHrxNxvhFuYDW44C1\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NzU=;sn=401875", - "x-ms-request-id" : "99b0355f-9d14-4a72-8464-3ff2da809663", - "Body" : "{\"etag\":\"CftebqLiruCd7o1F6MQdYA5KcGH\",\"key\":\"key1185138186f\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:42+00:00\"}", - "x-ms-client-request-id" : "7fd0361c-0522-4aef-a73a-ee69a26bf7b2", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2Njg=;sn=448668", + "x-ms-request-id" : "3669bc4f-b7f3-4a84-9b3e-0c9ac0af7d76", + "Body" : "{\"etag\":\"9X11lrPtrxcHrxNxvhFuYDW44C1\",\"key\":\"key0211359924d\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:55+00:00\"}", + "x-ms-client-request-id" : "8e161ee4-5e87-4bd7-8c40-f7f6847bc17b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1185138186f", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0211359924d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "fe0b25af-3f35-46c6-b3c2-ed71bd367b1a", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7347bf28-820b-432f-8546-9d33360642f3", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:42 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6c231ebc-8a68-46db-99ab-847522d34da7", + "x-ms-correlation-request-id" : "db5690a4-8a71-47a9-9960-83bf1e75c73f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"nG3XJysrQmDUxVEUozagMnVNjRp\"", + "ETag" : "\"CVyJlOohLcGSWF9NGgBaWaBfyFb\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NzY=;sn=401876", - "x-ms-request-id" : "6c231ebc-8a68-46db-99ab-847522d34da7", - "Body" : "{\"etag\":\"nG3XJysrQmDUxVEUozagMnVNjRp\",\"key\":\"key1185138186f\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:42+00:00\"}", - "x-ms-client-request-id" : "fe0b25af-3f35-46c6-b3c2-ed71bd367b1a", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2Njk=;sn=448669", + "x-ms-request-id" : "db5690a4-8a71-47a9-9960-83bf1e75c73f", + "Body" : "{\"etag\":\"CVyJlOohLcGSWF9NGgBaWaBfyFb\",\"key\":\"key0211359924d\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:55+00:00\"}", + "x-ms-client-request-id" : "7347bf28-820b-432f-8546-9d33360642f3", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1185138186f", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0211359924d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "fd0814da-5b9f-4c45-b27b-fec633ed1eae", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2eecec66-d7d9-4824-8f5a-f613a838bde2", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:43 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:56 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "801326a8-9f3f-4fe0-971a-4620d300d5fa", + "x-ms-correlation-request-id" : "706818ba-aa93-421c-b64b-2fdd2a12eedd", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"pfISi7RWuKksfCjzMANTH2XM1fA\"", + "ETag" : "\"j7UldKx9vwuBDQd2JlYMJwC3Juo\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4Nzc=;sn=401877", - "x-ms-request-id" : "801326a8-9f3f-4fe0-971a-4620d300d5fa", - "Body" : "{\"etag\":\"pfISi7RWuKksfCjzMANTH2XM1fA\",\"key\":\"key1185138186f\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "fd0814da-5b9f-4c45-b27b-fec633ed1eae", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NzA=;sn=448670", + "x-ms-request-id" : "706818ba-aa93-421c-b64b-2fdd2a12eedd", + "Body" : "{\"etag\":\"j7UldKx9vwuBDQd2JlYMJwC3Juo\",\"key\":\"key0211359924d\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "2eecec66-d7d9-4824-8f5a-f613a838bde2", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key1185138186f", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key0211359924d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "43a18e8d-f36b-4919-8c24-019322634996", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "97fe034e-e4c2-404c-83e9-75070a6e4238", "Content-Type" : "application/json" }, "Response" : { @@ -108,57 +108,57 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:43 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:56 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "074d7bb5-bae7-4837-9765-bdc04593da8e", + "x-ms-correlation-request-id" : "e001c823-b0cb-426a-b1fe-11d0402b7e10", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4Nzc=;sn=401877", - "x-ms-request-id" : "074d7bb5-bae7-4837-9765-bdc04593da8e", - "Body" : "{\"items\":[{\"etag\":\"pfISi7RWuKksfCjzMANTH2XM1fA\",\"key\":\"key1185138186f\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"},{\"etag\":\"nG3XJysrQmDUxVEUozagMnVNjRp\",\"key\":\"key1185138186f\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:42+00:00\"},{\"etag\":\"CftebqLiruCd7o1F6MQdYA5KcGH\",\"key\":\"key1185138186f\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:42+00:00\"}]}", - "x-ms-client-request-id" : "43a18e8d-f36b-4919-8c24-019322634996", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NzA=;sn=448670", + "x-ms-request-id" : "e001c823-b0cb-426a-b1fe-11d0402b7e10", + "Body" : "{\"items\":[{\"etag\":\"j7UldKx9vwuBDQd2JlYMJwC3Juo\",\"key\":\"key0211359924d\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"},{\"etag\":\"CVyJlOohLcGSWF9NGgBaWaBfyFb\",\"key\":\"key0211359924d\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:55+00:00\"},{\"etag\":\"9X11lrPtrxcHrxNxvhFuYDW44C1\",\"key\":\"key0211359924d\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:55+00:00\"}]}", + "x-ms-client-request-id" : "97fe034e-e4c2-404c-83e9-75070a6e4238", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key1185138186f", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key0211359924d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5bc2e31a-ef76-4db6-8646-e34388bf9cff", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3b999f9c-bfa4-47fc-b3cc-27085c5bb98b", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", "Server" : "openresty/1.15.8.1", - "Memento-Datetime" : "Tue, 08 Oct 2019 17:59:42 GMT", + "Memento-Datetime" : "Sat, 19 Oct 2019 00:45:55 GMT", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:43 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:56 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "5494b05d-01e0-40c7-ba47-cba5ea703d51", + "x-ms-correlation-request-id" : "64398030-5dde-48e3-b2cb-b57ef14063d7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4Nzc=;sn=401877", - "x-ms-request-id" : "5494b05d-01e0-40c7-ba47-cba5ea703d51", - "Body" : "{\"items\":[{\"etag\":\"nG3XJysrQmDUxVEUozagMnVNjRp\",\"key\":\"key1185138186f\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:42+00:00\"}]}", - "Link" : "; rel=\"original\"", - "x-ms-client-request-id" : "5bc2e31a-ef76-4db6-8646-e34388bf9cff", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NzA=;sn=448670", + "x-ms-request-id" : "64398030-5dde-48e3-b2cb-b57ef14063d7", + "Body" : "{\"items\":[{\"etag\":\"CVyJlOohLcGSWF9NGgBaWaBfyFb\",\"key\":\"key0211359924d\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:55+00:00\"}]}", + "Link" : "; rel=\"original\"", + "x-ms-client-request-id" : "3b999f9c-bfa4-47fc-b3cc-27085c5bb98b", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key11851%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key02113%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d88ee9a4-7e0c-462b-921f-2f4a5716b2e8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cee7021b-3b26-4a66-9c01-2d8a67f26bcb", "Content-Type" : "application/json" }, "Response" : { @@ -169,25 +169,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:43 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:56 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4cf8d9bb-43c5-4118-9ad7-aa2bf8d36cc6", + "x-ms-correlation-request-id" : "fc8439d3-040b-4ea3-a766-e4f2b9efee77", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4Nzc=;sn=401877", - "x-ms-request-id" : "4cf8d9bb-43c5-4118-9ad7-aa2bf8d36cc6", - "Body" : "{\"items\":[{\"etag\":\"pfISi7RWuKksfCjzMANTH2XM1fA\",\"key\":\"key1185138186f\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}]}", - "x-ms-client-request-id" : "d88ee9a4-7e0c-462b-921f-2f4a5716b2e8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NzA=;sn=448670", + "x-ms-request-id" : "fc8439d3-040b-4ea3-a766-e4f2b9efee77", + "Body" : "{\"items\":[{\"etag\":\"j7UldKx9vwuBDQd2JlYMJwC3Juo\",\"key\":\"key0211359924d\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}]}", + "x-ms-client-request-id" : "cee7021b-3b26-4a66-9c01-2d8a67f26bcb", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1185138186f", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0211359924d", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c9844b0f-ebc0-468c-b6e3-573d2302cc6d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "55ed0733-da98-4110-835d-f7519cd9d394", "Content-Type" : "application/json" }, "Response" : { @@ -196,23 +196,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:44 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:43 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:57 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "88b11471-0193-416d-85c4-905275b3872c", + "x-ms-correlation-request-id" : "6d9a45f9-78c0-45a4-8e82-dc007dc52f20", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"pfISi7RWuKksfCjzMANTH2XM1fA\"", + "ETag" : "\"j7UldKx9vwuBDQd2JlYMJwC3Juo\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4Nzg=;sn=401878", - "x-ms-request-id" : "88b11471-0193-416d-85c4-905275b3872c", - "Body" : "{\"etag\":\"pfISi7RWuKksfCjzMANTH2XM1fA\",\"key\":\"key1185138186f\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:44+00:00\"}", - "x-ms-client-request-id" : "c9844b0f-ebc0-468c-b6e3-573d2302cc6d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NzE=;sn=448671", + "x-ms-request-id" : "6d9a45f9-78c0-45a4-8e82-dc007dc52f20", + "Body" : "{\"etag\":\"j7UldKx9vwuBDQd2JlYMJwC3Juo\",\"key\":\"key0211359924d\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:57+00:00\"}", + "x-ms-client-request-id" : "55ed0733-da98-4110-835d-f7519cd9d394", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key11851", "3f605c5c", "key1185138186f" ] + "variables" : [ "key02113", "e7c9d96e", "key0211359924d" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsSelectFields.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsSelectFields.json index 38d6c562d070..5c1bea6c7122 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsSelectFields.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsSelectFields.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-0?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-fetch-1?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "270dd4b4-75df-496b-b8ac-74b7c7121d80", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "286ad09f-8987-473c-b6b7-22d5697fad0f", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7a599a50-6190-41bf-99bb-e06780551449", + "x-ms-correlation-request-id" : "7e484cfa-84d8-4b90-bdc9-ed61ca7546ed", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"dheO1iiObEbzV7JXk5SVT7gAkbW\"", + "ETag" : "\"Dd6qaGSKtJFu1pdNT2YHeM1yPcD\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxODg=;sn=402188", - "x-ms-request-id" : "7a599a50-6190-41bf-99bb-e06780551449", - "Body" : "{\"etag\":\"dheO1iiObEbzV7JXk5SVT7gAkbW\",\"key\":\"key79219-0\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "270dd4b4-75df-496b-b8ac-74b7c7121d80", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5ODc=;sn=448987", + "x-ms-request-id" : "7e484cfa-84d8-4b90-bdc9-ed61ca7546ed", + "Body" : "{\"etag\":\"Dd6qaGSKtJFu1pdNT2YHeM1yPcD\",\"key\":\"key62400-fetch-1\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "286ad09f-8987-473c-b6b7-22d5697fad0f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-fetch-1?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-4?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "15890eb0-24f6-4c89-a041-c703670a19b6", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "77e712b4-0775-430c-87c5-897e79055657", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "34103640-0feb-4e2f-9d6f-3345b4c6fb5f", + "x-ms-correlation-request-id" : "e31a0722-191c-41bd-b615-c81f7e2420ac", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"KVXnFFzAFndhL5XFMuwlA5J1jbn\"", + "ETag" : "\"H4LRuI3MmFmhRaClDoR0Az2Gx2N\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxODk=;sn=402189", - "x-ms-request-id" : "34103640-0feb-4e2f-9d6f-3345b4c6fb5f", - "Body" : "{\"etag\":\"KVXnFFzAFndhL5XFMuwlA5J1jbn\",\"key\":\"key79219-fetch-1\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "15890eb0-24f6-4c89-a041-c703670a19b6", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5ODk=;sn=448989", + "x-ms-request-id" : "e31a0722-191c-41bd-b615-c81f7e2420ac", + "Body" : "{\"etag\":\"H4LRuI3MmFmhRaClDoR0Az2Gx2N\",\"key\":\"key62400-4\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "77e712b4-0775-430c-87c5-897e79055657", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-fetch-3?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-0?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f3054ac5-2ff7-40de-86ae-56bccb862a0e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5f2c211a-4e29-4318-9722-4cd6ced11b08", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3cdb2d52-a393-4547-aa0e-e2b03a0029bb", + "x-ms-correlation-request-id" : "584f2bbe-d892-476c-8bb2-c4bc346ac5a2", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ts2rH3exdH0rb6WOrRGf0LR3dum\"", + "ETag" : "\"zNCQlbMmGKJI5QcPQzGbgzOhtFH\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxOTA=;sn=402190", - "x-ms-request-id" : "3cdb2d52-a393-4547-aa0e-e2b03a0029bb", - "Body" : "{\"etag\":\"ts2rH3exdH0rb6WOrRGf0LR3dum\",\"key\":\"key79219-fetch-3\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "f3054ac5-2ff7-40de-86ae-56bccb862a0e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5ODg=;sn=448988", + "x-ms-request-id" : "584f2bbe-d892-476c-8bb2-c4bc346ac5a2", + "Body" : "{\"etag\":\"zNCQlbMmGKJI5QcPQzGbgzOhtFH\",\"key\":\"key62400-0\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "5f2c211a-4e29-4318-9722-4cd6ced11b08", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-2?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-2?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "60535c91-4ecc-4e83-ba07-fb714d24184a", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "272296a1-4294-44e7-897d-b285699466a2", "Content-Type" : "application/json" }, "Response" : { @@ -106,29 +106,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f081e3cb-40fe-4ad3-a4ef-c7c62096f7bf", + "x-ms-correlation-request-id" : "6ce8a49a-ea56-425f-a5a2-6f1c7755a7ca", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"dsQEVUdg2EIeRGn8Yvx1v0aMVwf\"", + "ETag" : "\"dn01uV0d6wnDsiqnebOKA1wHkol\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxOTE=;sn=402191", - "x-ms-request-id" : "f081e3cb-40fe-4ad3-a4ef-c7c62096f7bf", - "Body" : "{\"etag\":\"dsQEVUdg2EIeRGn8Yvx1v0aMVwf\",\"key\":\"key79219-2\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "60535c91-4ecc-4e83-ba07-fb714d24184a", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5OTE=;sn=448991", + "x-ms-request-id" : "6ce8a49a-ea56-425f-a5a2-6f1c7755a7ca", + "Body" : "{\"etag\":\"dn01uV0d6wnDsiqnebOKA1wHkol\",\"key\":\"key62400-2\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "272296a1-4294-44e7-897d-b285699466a2", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-fetch-5?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-fetch-7?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ece76afb-ca70-404a-a7b3-1ba1d35cc6e6", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "97c4b10a-4140-4865-b2f0-6ca77527ad89", "Content-Type" : "application/json" }, "Response" : { @@ -137,29 +137,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "591d9c46-edf3-479d-9841-5bb352fcb0ab", + "x-ms-correlation-request-id" : "69406d1a-1927-4125-9e99-5be11a307da6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"vxcPO6s6bZREcUPQkU0YNbIk1HZ\"", + "ETag" : "\"7Qw7xnvbuh4ne6yCAH52TjfMvtg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxOTI=;sn=402192", - "x-ms-request-id" : "591d9c46-edf3-479d-9841-5bb352fcb0ab", - "Body" : "{\"etag\":\"vxcPO6s6bZREcUPQkU0YNbIk1HZ\",\"key\":\"key79219-fetch-5\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "ece76afb-ca70-404a-a7b3-1ba1d35cc6e6", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5OTA=;sn=448990", + "x-ms-request-id" : "69406d1a-1927-4125-9e99-5be11a307da6", + "Body" : "{\"etag\":\"7Qw7xnvbuh4ne6yCAH52TjfMvtg\",\"key\":\"key62400-fetch-7\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "97c4b10a-4140-4865-b2f0-6ca77527ad89", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-fetch-7?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-fetch-3?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2728cb4b-3cb6-476a-9581-3e74f00c53b3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cd022afa-23f7-401a-9f19-56f3b1eda7d9", "Content-Type" : "application/json" }, "Response" : { @@ -168,29 +168,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "01e55f52-b988-4110-9f86-77cbac8caea3", + "x-ms-correlation-request-id" : "3538f3df-c25b-4b05-a221-eafe90aff254", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"nSOefEPoQOEoXUZWc0WGUXMi8wV\"", + "ETag" : "\"pEXDR95DAsnDfTjASm2djWpBClo\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxOTM=;sn=402193", - "x-ms-request-id" : "01e55f52-b988-4110-9f86-77cbac8caea3", - "Body" : "{\"etag\":\"nSOefEPoQOEoXUZWc0WGUXMi8wV\",\"key\":\"key79219-fetch-7\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "2728cb4b-3cb6-476a-9581-3e74f00c53b3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5OTI=;sn=448992", + "x-ms-request-id" : "3538f3df-c25b-4b05-a221-eafe90aff254", + "Body" : "{\"etag\":\"pEXDR95DAsnDfTjASm2djWpBClo\",\"key\":\"key62400-fetch-3\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "cd022afa-23f7-401a-9f19-56f3b1eda7d9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-4?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-fetch-5?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "077bb5d5-cbc6-4492-b4c3-8696a2073a9d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "81ececfe-8663-4233-a5d5-4706de678f08", "Content-Type" : "application/json" }, "Response" : { @@ -199,29 +199,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b9d0e4f9-e45e-4e83-908d-54533331d7a9", + "x-ms-correlation-request-id" : "84a7cefa-56bc-4220-b54e-54764a28ba99", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"LPv9xCuTYJiTCNGCJoflsbLfB6p\"", + "ETag" : "\"sR5hFb4qu3LlhkHSK7LuOxubLaA\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxOTQ=;sn=402194", - "x-ms-request-id" : "b9d0e4f9-e45e-4e83-908d-54533331d7a9", - "Body" : "{\"etag\":\"LPv9xCuTYJiTCNGCJoflsbLfB6p\",\"key\":\"key79219-4\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "077bb5d5-cbc6-4492-b4c3-8696a2073a9d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5OTM=;sn=448993", + "x-ms-request-id" : "84a7cefa-56bc-4220-b54e-54764a28ba99", + "Body" : "{\"etag\":\"sR5hFb4qu3LlhkHSK7LuOxubLaA\",\"key\":\"key62400-fetch-5\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "81ececfe-8663-4233-a5d5-4706de678f08", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-6?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-6?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f1114f7d-7824-45a1-bdd8-7767ee510848", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "656c8114-1501-4b53-980e-0b27934c9ddf", "Content-Type" : "application/json" }, "Response" : { @@ -230,29 +230,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "bf9ed9a3-8d6a-4276-8194-413e640de0c7", + "x-ms-correlation-request-id" : "0c9813bf-81b2-4a54-9cab-e98f027fcd75", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"bz8ENpxpQwUmrr6Og2XFEmXsRkD\"", + "ETag" : "\"U1bgInA1YiyH6pMrUMFIQFXNRRv\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxOTU=;sn=402195", - "x-ms-request-id" : "bf9ed9a3-8d6a-4276-8194-413e640de0c7", - "Body" : "{\"etag\":\"bz8ENpxpQwUmrr6Og2XFEmXsRkD\",\"key\":\"key79219-6\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "f1114f7d-7824-45a1-bdd8-7767ee510848", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5OTQ=;sn=448994", + "x-ms-request-id" : "0c9813bf-81b2-4a54-9cab-e98f027fcd75", + "Body" : "{\"etag\":\"U1bgInA1YiyH6pMrUMFIQFXNRRv\",\"key\":\"key62400-6\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "656c8114-1501-4b53-980e-0b27934c9ddf", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key79219-fetch-%2a&label=%2a-second%2a&$select=key%2cetag%2ccontent_type%2ctags", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key62400-fetch-%2a&label=%2a-second%2a&$select=key%2cetag%2ccontent_type%2ctags", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b01995da-258d-49ce-8aec-f8210ec9867e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c61d492d-92f9-4b35-9c2e-5057d4a05c4e", "Content-Type" : "application/json" }, "Response" : { @@ -263,25 +263,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3f72a301-f4ba-4df7-9624-c71fd99aafe2", + "x-ms-correlation-request-id" : "1bf35018-db16-44f4-a844-8c2e1e8d32de", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxOTU=;sn=402195", - "x-ms-request-id" : "3f72a301-f4ba-4df7-9624-c71fd99aafe2", - "Body" : "{\"items\":[{\"etag\":\"vxcPO6s6bZREcUPQkU0YNbIk1HZ\",\"key\":\"key79219-fetch-5\",\"content_type\":null,\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"}},{\"etag\":\"nSOefEPoQOEoXUZWc0WGUXMi8wV\",\"key\":\"key79219-fetch-7\",\"content_type\":null,\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"}}]}", - "x-ms-client-request-id" : "b01995da-258d-49ce-8aec-f8210ec9867e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5OTQ=;sn=448994", + "x-ms-request-id" : "1bf35018-db16-44f4-a844-8c2e1e8d32de", + "Body" : "{\"items\":[{\"etag\":\"sR5hFb4qu3LlhkHSK7LuOxubLaA\",\"key\":\"key62400-fetch-5\",\"content_type\":null,\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"}},{\"etag\":\"7Qw7xnvbuh4ne6yCAH52TjfMvtg\",\"key\":\"key62400-fetch-7\",\"content_type\":null,\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"}}]}", + "x-ms-client-request-id" : "c61d492d-92f9-4b35-9c2e-5057d4a05c4e", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key79219%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key62400%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1455bff4-95a8-4aab-82a9-6347be37d698", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2663df18-41da-4119-bcbc-de986c76f2ce", "Content-Type" : "application/json" }, "Response" : { @@ -292,25 +292,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "8fb13284-0ade-48aa-99dd-80a9b0521cbc", + "x-ms-correlation-request-id" : "b7b4f674-082f-4f8f-864b-5f7f67c5b52e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxOTU=;sn=402195", - "x-ms-request-id" : "8fb13284-0ade-48aa-99dd-80a9b0521cbc", - "Body" : "{\"items\":[{\"etag\":\"dheO1iiObEbzV7JXk5SVT7gAkbW\",\"key\":\"key79219-0\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"},{\"etag\":\"dsQEVUdg2EIeRGn8Yvx1v0aMVwf\",\"key\":\"key79219-2\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"},{\"etag\":\"LPv9xCuTYJiTCNGCJoflsbLfB6p\",\"key\":\"key79219-4\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"},{\"etag\":\"bz8ENpxpQwUmrr6Og2XFEmXsRkD\",\"key\":\"key79219-6\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"},{\"etag\":\"KVXnFFzAFndhL5XFMuwlA5J1jbn\",\"key\":\"key79219-fetch-1\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"},{\"etag\":\"ts2rH3exdH0rb6WOrRGf0LR3dum\",\"key\":\"key79219-fetch-3\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"},{\"etag\":\"vxcPO6s6bZREcUPQkU0YNbIk1HZ\",\"key\":\"key79219-fetch-5\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"},{\"etag\":\"nSOefEPoQOEoXUZWc0WGUXMi8wV\",\"key\":\"key79219-fetch-7\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}]}", - "x-ms-client-request-id" : "1455bff4-95a8-4aab-82a9-6347be37d698", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5OTQ=;sn=448994", + "x-ms-request-id" : "b7b4f674-082f-4f8f-864b-5f7f67c5b52e", + "Body" : "{\"items\":[{\"etag\":\"zNCQlbMmGKJI5QcPQzGbgzOhtFH\",\"key\":\"key62400-0\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"},{\"etag\":\"dn01uV0d6wnDsiqnebOKA1wHkol\",\"key\":\"key62400-2\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"},{\"etag\":\"H4LRuI3MmFmhRaClDoR0Az2Gx2N\",\"key\":\"key62400-4\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"},{\"etag\":\"U1bgInA1YiyH6pMrUMFIQFXNRRv\",\"key\":\"key62400-6\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"},{\"etag\":\"Dd6qaGSKtJFu1pdNT2YHeM1yPcD\",\"key\":\"key62400-fetch-1\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"},{\"etag\":\"pEXDR95DAsnDfTjASm2djWpBClo\",\"key\":\"key62400-fetch-3\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"},{\"etag\":\"sR5hFb4qu3LlhkHSK7LuOxubLaA\",\"key\":\"key62400-fetch-5\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"},{\"etag\":\"7Qw7xnvbuh4ne6yCAH52TjfMvtg\",\"key\":\"key62400-fetch-7\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}]}", + "x-ms-client-request-id" : "2663df18-41da-4119-bcbc-de986c76f2ce", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-0?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-0?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d4d1ccf0-4e93-427e-96dd-05adf66b830b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "32aba115-46ec-4cd6-8788-0302d0067260", "Content-Type" : "application/json" }, "Response" : { @@ -319,29 +319,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2db6645a-75b7-46e2-ad34-2cdc88d1d0c5", + "x-ms-correlation-request-id" : "e00409bd-17a4-457e-adf6-89dc3d32feed", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"dheO1iiObEbzV7JXk5SVT7gAkbW\"", + "ETag" : "\"zNCQlbMmGKJI5QcPQzGbgzOhtFH\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxOTY=;sn=402196", - "x-ms-request-id" : "2db6645a-75b7-46e2-ad34-2cdc88d1d0c5", - "Body" : "{\"etag\":\"dheO1iiObEbzV7JXk5SVT7gAkbW\",\"key\":\"key79219-0\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "d4d1ccf0-4e93-427e-96dd-05adf66b830b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5OTY=;sn=448996", + "x-ms-request-id" : "e00409bd-17a4-457e-adf6-89dc3d32feed", + "Body" : "{\"etag\":\"zNCQlbMmGKJI5QcPQzGbgzOhtFH\",\"key\":\"key62400-0\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "32aba115-46ec-4cd6-8788-0302d0067260", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-4?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-6?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7060bfab-3209-437e-bcca-c5f2da0dd215", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "39428ab8-8487-4a5f-931d-a9dd344d9a39", "Content-Type" : "application/json" }, "Response" : { @@ -350,29 +350,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "29b857ef-8fee-4284-a311-87f19d84f100", + "x-ms-correlation-request-id" : "0020b26c-00c4-428b-974f-087e1df052b4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"LPv9xCuTYJiTCNGCJoflsbLfB6p\"", + "ETag" : "\"U1bgInA1YiyH6pMrUMFIQFXNRRv\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxOTc=;sn=402197", - "x-ms-request-id" : "29b857ef-8fee-4284-a311-87f19d84f100", - "Body" : "{\"etag\":\"LPv9xCuTYJiTCNGCJoflsbLfB6p\",\"key\":\"key79219-4\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "7060bfab-3209-437e-bcca-c5f2da0dd215", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5OTU=;sn=448995", + "x-ms-request-id" : "0020b26c-00c4-428b-974f-087e1df052b4", + "Body" : "{\"etag\":\"U1bgInA1YiyH6pMrUMFIQFXNRRv\",\"key\":\"key62400-6\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "39428ab8-8487-4a5f-931d-a9dd344d9a39", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-6?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-4?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "70818714-ac93-49e5-a6d3-f9b08bfd12fe", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "41155f7f-3642-44f3-b218-66f910534720", "Content-Type" : "application/json" }, "Response" : { @@ -381,29 +381,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "29d4064f-579f-40bc-ad9c-4215143e7b64", + "x-ms-correlation-request-id" : "ea65f82f-7a5f-49e2-a103-dc9c1d0c0d70", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"bz8ENpxpQwUmrr6Og2XFEmXsRkD\"", + "ETag" : "\"H4LRuI3MmFmhRaClDoR0Az2Gx2N\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxOTg=;sn=402198", - "x-ms-request-id" : "29d4064f-579f-40bc-ad9c-4215143e7b64", - "Body" : "{\"etag\":\"bz8ENpxpQwUmrr6Og2XFEmXsRkD\",\"key\":\"key79219-6\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "70818714-ac93-49e5-a6d3-f9b08bfd12fe", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5OTc=;sn=448997", + "x-ms-request-id" : "ea65f82f-7a5f-49e2-a103-dc9c1d0c0d70", + "Body" : "{\"etag\":\"H4LRuI3MmFmhRaClDoR0Az2Gx2N\",\"key\":\"key62400-4\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "41155f7f-3642-44f3-b218-66f910534720", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-2?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-fetch-1?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "001bd11a-c4bd-4053-a7a6-27fad1cb6e10", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0e97a8ce-6e72-4798-a1cd-01f30d95f2d9", "Content-Type" : "application/json" }, "Response" : { @@ -412,29 +412,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "8273dc9a-5159-4649-9bdf-363aa88ce26d", + "x-ms-correlation-request-id" : "e57ad041-9e60-4870-9d68-0eb8bf85bac4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"dsQEVUdg2EIeRGn8Yvx1v0aMVwf\"", + "ETag" : "\"Dd6qaGSKtJFu1pdNT2YHeM1yPcD\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxOTk=;sn=402199", - "x-ms-request-id" : "8273dc9a-5159-4649-9bdf-363aa88ce26d", - "Body" : "{\"etag\":\"dsQEVUdg2EIeRGn8Yvx1v0aMVwf\",\"key\":\"key79219-2\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "001bd11a-c4bd-4053-a7a6-27fad1cb6e10", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5OTk=;sn=448999", + "x-ms-request-id" : "e57ad041-9e60-4870-9d68-0eb8bf85bac4", + "Body" : "{\"etag\":\"Dd6qaGSKtJFu1pdNT2YHeM1yPcD\",\"key\":\"key62400-fetch-1\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "0e97a8ce-6e72-4798-a1cd-01f30d95f2d9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-fetch-3?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-2?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c0f7722b-6415-4224-ab45-cd8b92c77c2b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b1997797-ff08-4beb-af69-e9ef7b610497", "Content-Type" : "application/json" }, "Response" : { @@ -443,29 +443,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "e7420bbd-c1cf-4e76-a9bc-57e1da0e0658", + "x-ms-correlation-request-id" : "7a7b320c-fe78-404d-b0ce-ea536b3babc7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ts2rH3exdH0rb6WOrRGf0LR3dum\"", + "ETag" : "\"dn01uV0d6wnDsiqnebOKA1wHkol\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDA=;sn=402200", - "x-ms-request-id" : "e7420bbd-c1cf-4e76-a9bc-57e1da0e0658", - "Body" : "{\"etag\":\"ts2rH3exdH0rb6WOrRGf0LR3dum\",\"key\":\"key79219-fetch-3\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "c0f7722b-6415-4224-ab45-cd8b92c77c2b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5OTg=;sn=448998", + "x-ms-request-id" : "7a7b320c-fe78-404d-b0ce-ea536b3babc7", + "Body" : "{\"etag\":\"dn01uV0d6wnDsiqnebOKA1wHkol\",\"key\":\"key62400-2\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "b1997797-ff08-4beb-af69-e9ef7b610497", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-fetch-1?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-fetch-7?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b63b1eaf-fe40-476a-8fa6-412703806bec", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1a901e8c-dd26-4c3a-a2bd-1c2666363a8f", "Content-Type" : "application/json" }, "Response" : { @@ -474,29 +474,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4e3ff9b1-f301-4a3b-844f-faf3d1339426", + "x-ms-correlation-request-id" : "4fb0da7b-57fa-40f3-aa11-6b53daf8eae1", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"KVXnFFzAFndhL5XFMuwlA5J1jbn\"", + "ETag" : "\"7Qw7xnvbuh4ne6yCAH52TjfMvtg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDE=;sn=402201", - "x-ms-request-id" : "4e3ff9b1-f301-4a3b-844f-faf3d1339426", - "Body" : "{\"etag\":\"KVXnFFzAFndhL5XFMuwlA5J1jbn\",\"key\":\"key79219-fetch-1\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "b63b1eaf-fe40-476a-8fa6-412703806bec", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDA=;sn=449000", + "x-ms-request-id" : "4fb0da7b-57fa-40f3-aa11-6b53daf8eae1", + "Body" : "{\"etag\":\"7Qw7xnvbuh4ne6yCAH52TjfMvtg\",\"key\":\"key62400-fetch-7\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "1a901e8c-dd26-4c3a-a2bd-1c2666363a8f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-fetch-5?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-fetch-3?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1734576f-e794-4f3a-8325-bdb0a085f7f8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "def80e0f-a5b4-44a4-90e2-a832063a5d40", "Content-Type" : "application/json" }, "Response" : { @@ -505,29 +505,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "58e6f647-22f1-410f-840c-f3e7f6c615f5", + "x-ms-correlation-request-id" : "4e63bc48-ab00-4563-8b8b-eda7739ec8da", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"vxcPO6s6bZREcUPQkU0YNbIk1HZ\"", + "ETag" : "\"pEXDR95DAsnDfTjASm2djWpBClo\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDI=;sn=402202", - "x-ms-request-id" : "58e6f647-22f1-410f-840c-f3e7f6c615f5", - "Body" : "{\"etag\":\"vxcPO6s6bZREcUPQkU0YNbIk1HZ\",\"key\":\"key79219-fetch-5\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "1734576f-e794-4f3a-8325-bdb0a085f7f8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDE=;sn=449001", + "x-ms-request-id" : "4e63bc48-ab00-4563-8b8b-eda7739ec8da", + "Body" : "{\"etag\":\"pEXDR95DAsnDfTjASm2djWpBClo\",\"key\":\"key62400-fetch-3\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "def80e0f-a5b4-44a4-90e2-a832063a5d40", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key79219-fetch-7?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62400-fetch-5?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5389a2bc-5a28-46b0-9a1a-4607b4609908", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f4b66edc-c670-45d5-899b-76f18e5fe544", "Content-Type" : "application/json" }, "Response" : { @@ -536,23 +536,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:07 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "73e85dee-e148-463b-aa32-c27650e6eac2", + "x-ms-correlation-request-id" : "3375135e-0f72-4945-8270-0bf8fcda8d63", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"nSOefEPoQOEoXUZWc0WGUXMi8wV\"", + "ETag" : "\"sR5hFb4qu3LlhkHSK7LuOxubLaA\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIyMDM=;sn=402203", - "x-ms-request-id" : "73e85dee-e148-463b-aa32-c27650e6eac2", - "Body" : "{\"etag\":\"nSOefEPoQOEoXUZWc0WGUXMi8wV\",\"key\":\"key79219-fetch-7\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:07+00:00\"}", - "x-ms-client-request-id" : "5389a2bc-5a28-46b0-9a1a-4607b4609908", + "Sync-Token" : "zAJw6V16=MDotMSM0NDkwMDI=;sn=449002", + "x-ms-request-id" : "3375135e-0f72-4945-8270-0bf8fcda8d63", + "Body" : "{\"etag\":\"sR5hFb4qu3LlhkHSK7LuOxubLaA\",\"key\":\"key62400-fetch-5\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "f4b66edc-c670-45d5-899b-76f18e5fe544", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key79219", "b046a5c9" ] + "variables" : [ "key62400", "9208141d" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsWithPagination.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsWithPagination.json index 65bf0c8541c4..859b611fbf9e 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsWithPagination.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsWithPagination.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-1?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-1?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7b0e5b92-d29c-4e6f-be11-22c14c4dc4e3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c6796454-30c5-4abf-8306-a82431052f53", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "dbdf24d9-4107-4ede-8758-a7d6a963d7e5", + "x-ms-correlation-request-id" : "d688cf42-424a-4745-931e-2d709262378b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Y4jOSQJ3iWWF0YQFyv3dga4xRoC\"", + "ETag" : "\"eT6gWQBpHTUQzP3ay3xNidpgEmb\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwODI=;sn=402082", - "x-ms-request-id" : "dbdf24d9-4107-4ede-8758-a7d6a963d7e5", - "Body" : "{\"etag\":\"Y4jOSQJ3iWWF0YQFyv3dga4xRoC\",\"key\":\"key77675-1\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "7b0e5b92-d29c-4e6f-be11-22c14c4dc4e3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4ODI=;sn=448882", + "x-ms-request-id" : "d688cf42-424a-4745-931e-2d709262378b", + "Body" : "{\"etag\":\"eT6gWQBpHTUQzP3ay3xNidpgEmb\",\"key\":\"key03953-1\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "c6796454-30c5-4abf-8306-a82431052f53", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-2?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-0?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cf1214e9-1e30-474a-b401-2fc284684bab", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f02aa1e2-0b9b-4fc2-9b9a-1ec0aec61400", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "93d3dc92-fb99-4974-a6c4-4f758342c446", + "x-ms-correlation-request-id" : "e0451683-2fc9-4200-b984-85b25cb1138d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"bhRVwUG59W0TnYFi7t0Nw5EUSZb\"", + "ETag" : "\"68JzbrzD1uVTGTlH3kYGA2qkvCa\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwODM=;sn=402083", - "x-ms-request-id" : "93d3dc92-fb99-4974-a6c4-4f758342c446", - "Body" : "{\"etag\":\"bhRVwUG59W0TnYFi7t0Nw5EUSZb\",\"key\":\"key77675-2\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "cf1214e9-1e30-474a-b401-2fc284684bab", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4ODE=;sn=448881", + "x-ms-request-id" : "e0451683-2fc9-4200-b984-85b25cb1138d", + "Body" : "{\"etag\":\"68JzbrzD1uVTGTlH3kYGA2qkvCa\",\"key\":\"key03953-0\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "f02aa1e2-0b9b-4fc2-9b9a-1ec0aec61400", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-6?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-3?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2a3ab295-85fc-4b91-b3bf-705e8842d667", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2706fc53-bc36-4562-a0c0-65197f8f2889", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7ba4741b-05b4-4606-a298-7db02c4c881c", + "x-ms-correlation-request-id" : "2ba20aaf-42ab-4a8f-a40d-b54b711f69c6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"NrMcmMqfsr1JD00a5CpJrhzqpeN\"", + "ETag" : "\"Nlbx8tmQYez4cBaDRfCQtIqB3pu\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwODQ=;sn=402084", - "x-ms-request-id" : "7ba4741b-05b4-4606-a298-7db02c4c881c", - "Body" : "{\"etag\":\"NrMcmMqfsr1JD00a5CpJrhzqpeN\",\"key\":\"key77675-6\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "2a3ab295-85fc-4b91-b3bf-705e8842d667", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4ODM=;sn=448883", + "x-ms-request-id" : "2ba20aaf-42ab-4a8f-a40d-b54b711f69c6", + "Body" : "{\"etag\":\"Nlbx8tmQYez4cBaDRfCQtIqB3pu\",\"key\":\"key03953-3\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "2706fc53-bc36-4562-a0c0-65197f8f2889", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-0?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-2?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "85e1d7ce-736a-4603-8d7b-79cb473aa02b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a3fd8071-1dbb-47aa-8b20-b752c05609c6", "Content-Type" : "application/json" }, "Response" : { @@ -106,29 +106,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "97547f0d-8a80-4f06-bad2-1be0010c9dbd", + "x-ms-correlation-request-id" : "442b464b-7081-4bb4-89b4-6ec2bfa21dbe", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"SyCoB4ncMwTxfL07MMaroyjZGKl\"", + "ETag" : "\"RqDXyM8WP2SeKOGFaA0YHLJqTR6\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwODU=;sn=402085", - "x-ms-request-id" : "97547f0d-8a80-4f06-bad2-1be0010c9dbd", - "Body" : "{\"etag\":\"SyCoB4ncMwTxfL07MMaroyjZGKl\",\"key\":\"key77675-0\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "85e1d7ce-736a-4603-8d7b-79cb473aa02b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4ODU=;sn=448885", + "x-ms-request-id" : "442b464b-7081-4bb4-89b4-6ec2bfa21dbe", + "Body" : "{\"etag\":\"RqDXyM8WP2SeKOGFaA0YHLJqTR6\",\"key\":\"key03953-2\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "a3fd8071-1dbb-47aa-8b20-b752c05609c6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-7?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-4?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9d03ec49-8a68-492f-921d-267638f8c9be", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "970a29d5-b22e-4419-baa0-16459eb477a8", "Content-Type" : "application/json" }, "Response" : { @@ -137,29 +137,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "32f0dbde-c454-490d-b4b8-6c9877f18632", + "x-ms-correlation-request-id" : "943fc239-cd52-4acf-97e5-ffbda8646502", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"OqAaQ6p0ewOebyrWM2tmplCN2Cy\"", + "ETag" : "\"lJSDraq5NrfAHboSzlV4Ki9kIwU\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwODY=;sn=402086", - "x-ms-request-id" : "32f0dbde-c454-490d-b4b8-6c9877f18632", - "Body" : "{\"etag\":\"OqAaQ6p0ewOebyrWM2tmplCN2Cy\",\"key\":\"key77675-7\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "9d03ec49-8a68-492f-921d-267638f8c9be", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4ODQ=;sn=448884", + "x-ms-request-id" : "943fc239-cd52-4acf-97e5-ffbda8646502", + "Body" : "{\"etag\":\"lJSDraq5NrfAHboSzlV4Ki9kIwU\",\"key\":\"key03953-4\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "970a29d5-b22e-4419-baa0-16459eb477a8", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-9?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-6?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "61be5a37-57d0-41a4-b368-d82b08394374", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bd1ee2e7-ee92-4052-aa9b-000bd4c7de61", "Content-Type" : "application/json" }, "Response" : { @@ -168,29 +168,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1c3bb926-25dd-48fc-ba2a-94f5af6c8ab6", + "x-ms-correlation-request-id" : "a9397494-81d8-4126-8623-3b7c8eb035e7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"qBTCtW9Mjn9aVjClZoFgkVAQqZn\"", + "ETag" : "\"Mq0G38oS3lXjkYAzw95OoVomKQg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwODc=;sn=402087", - "x-ms-request-id" : "1c3bb926-25dd-48fc-ba2a-94f5af6c8ab6", - "Body" : "{\"etag\":\"qBTCtW9Mjn9aVjClZoFgkVAQqZn\",\"key\":\"key77675-9\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "61be5a37-57d0-41a4-b368-d82b08394374", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4ODY=;sn=448886", + "x-ms-request-id" : "a9397494-81d8-4126-8623-3b7c8eb035e7", + "Body" : "{\"etag\":\"Mq0G38oS3lXjkYAzw95OoVomKQg\",\"key\":\"key03953-6\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "bd1ee2e7-ee92-4052-aa9b-000bd4c7de61", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-3?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-8?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d43852db-0067-4652-b6e2-4f13b48a7d65", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "510e893b-c3c0-45f0-be58-d4315b4b4158", "Content-Type" : "application/json" }, "Response" : { @@ -199,29 +199,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6923a35c-1d9d-4c69-8692-3961c638e32a", + "x-ms-correlation-request-id" : "046ca5d0-710d-4b8b-bbc1-d1497f3e5ec5", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"wixV97BoQSTW92GF60PqMJWUB5m\"", + "ETag" : "\"OJow4UA6HGC6mJ5DYIPzquNa6Hx\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwODg=;sn=402088", - "x-ms-request-id" : "6923a35c-1d9d-4c69-8692-3961c638e32a", - "Body" : "{\"etag\":\"wixV97BoQSTW92GF60PqMJWUB5m\",\"key\":\"key77675-3\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "d43852db-0067-4652-b6e2-4f13b48a7d65", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4ODg=;sn=448888", + "x-ms-request-id" : "046ca5d0-710d-4b8b-bbc1-d1497f3e5ec5", + "Body" : "{\"etag\":\"OJow4UA6HGC6mJ5DYIPzquNa6Hx\",\"key\":\"key03953-8\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "510e893b-c3c0-45f0-be58-d4315b4b4158", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-8?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-7?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "63cdeaf1-9b88-4954-b31d-eb6d4c50d1f3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9874399f-4259-4db5-9252-861d26195c5e", "Content-Type" : "application/json" }, "Response" : { @@ -230,29 +230,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "865caa7f-a9c4-4a42-86b2-b407607e1875", + "x-ms-correlation-request-id" : "aa7168f0-eaee-43bc-8cfb-fcd731799b5c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"1WyTjrDYBgkLxVbcpfZKnoQRGd8\"", + "ETag" : "\"x80TEuOC0jC84Zcve9B1JRW0J5z\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwODk=;sn=402089", - "x-ms-request-id" : "865caa7f-a9c4-4a42-86b2-b407607e1875", - "Body" : "{\"etag\":\"1WyTjrDYBgkLxVbcpfZKnoQRGd8\",\"key\":\"key77675-8\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "63cdeaf1-9b88-4954-b31d-eb6d4c50d1f3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4ODc=;sn=448887", + "x-ms-request-id" : "aa7168f0-eaee-43bc-8cfb-fcd731799b5c", + "Body" : "{\"etag\":\"x80TEuOC0jC84Zcve9B1JRW0J5z\",\"key\":\"key03953-7\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "9874399f-4259-4db5-9252-861d26195c5e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-10?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-5?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "34471c67-62e5-4312-bada-a5aa89ef162b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9d73ca71-f44a-4967-a465-d6499cd450bb", "Content-Type" : "application/json" }, "Response" : { @@ -261,29 +261,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "edfdf208-f5f2-4489-a551-1509f2fc1614", + "x-ms-correlation-request-id" : "d423db97-2fa9-45d4-b18b-cabc1a230771", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Lg1QYWMdNfFrdpXYcJ60dvEfCE1\"", + "ETag" : "\"86FfClIX9oZEGMNmgvtYCI4GBnG\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwOTA=;sn=402090", - "x-ms-request-id" : "edfdf208-f5f2-4489-a551-1509f2fc1614", - "Body" : "{\"etag\":\"Lg1QYWMdNfFrdpXYcJ60dvEfCE1\",\"key\":\"key77675-10\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "34471c67-62e5-4312-bada-a5aa89ef162b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4ODk=;sn=448889", + "x-ms-request-id" : "d423db97-2fa9-45d4-b18b-cabc1a230771", + "Body" : "{\"etag\":\"86FfClIX9oZEGMNmgvtYCI4GBnG\",\"key\":\"key03953-5\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "9d73ca71-f44a-4967-a465-d6499cd450bb", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-4?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-12?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0cf5099f-72a1-46d5-b249-fe4808250240", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "07bdd3f5-e748-4a67-8ae0-4ddecfedd2d3", "Content-Type" : "application/json" }, "Response" : { @@ -292,29 +292,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "5490f0fb-84f7-4e7f-8056-bac7cfc3962b", + "x-ms-correlation-request-id" : "196be425-9383-44e1-8d3b-e48d2465d770", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"pzYHseOmcZDIsfSHE6pqHMsM370\"", + "ETag" : "\"mHS9xL8ADDMLycJL4MfeNiEiRrE\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwOTE=;sn=402091", - "x-ms-request-id" : "5490f0fb-84f7-4e7f-8056-bac7cfc3962b", - "Body" : "{\"etag\":\"pzYHseOmcZDIsfSHE6pqHMsM370\",\"key\":\"key77675-4\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "0cf5099f-72a1-46d5-b249-fe4808250240", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4OTA=;sn=448890", + "x-ms-request-id" : "196be425-9383-44e1-8d3b-e48d2465d770", + "Body" : "{\"etag\":\"mHS9xL8ADDMLycJL4MfeNiEiRrE\",\"key\":\"key03953-12\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "07bdd3f5-e748-4a67-8ae0-4ddecfedd2d3", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-12?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-9?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b2670b3d-35a2-42d6-9f25-3563428f4480", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ea2fdd50-8f3a-404b-801e-458436e7bce9", "Content-Type" : "application/json" }, "Response" : { @@ -323,29 +323,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f30878b2-f9ef-4f24-a851-07545e4ef85e", + "x-ms-correlation-request-id" : "48cf5570-7d54-4525-85e6-fe9f8bb516e0", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Q3YFc18LfxrEM3CzglKt5x4tB0i\"", + "ETag" : "\"jHZgGukBaH5oXxdWqk9Q1PWBvlU\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwOTI=;sn=402092", - "x-ms-request-id" : "f30878b2-f9ef-4f24-a851-07545e4ef85e", - "Body" : "{\"etag\":\"Q3YFc18LfxrEM3CzglKt5x4tB0i\",\"key\":\"key77675-12\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "b2670b3d-35a2-42d6-9f25-3563428f4480", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4OTE=;sn=448891", + "x-ms-request-id" : "48cf5570-7d54-4525-85e6-fe9f8bb516e0", + "Body" : "{\"etag\":\"jHZgGukBaH5oXxdWqk9Q1PWBvlU\",\"key\":\"key03953-9\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "ea2fdd50-8f3a-404b-801e-458436e7bce9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-19?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-13?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2f2cc8bc-c126-4a4d-8e5d-18d1b7bd6b6a", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "517626fd-6d1c-473b-b692-5d2748da26b9", "Content-Type" : "application/json" }, "Response" : { @@ -354,29 +354,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a46253c8-dde5-49a0-a3f4-7f9bdc5f5903", + "x-ms-correlation-request-id" : "f33369e3-0e72-42e3-b919-b122d5766772", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"mCnhM0ZbYQq3DUXe7iXQ8b1Cucn\"", + "ETag" : "\"e0NOxqhpxAbIqsHtUXaHerDMibd\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwOTM=;sn=402093", - "x-ms-request-id" : "a46253c8-dde5-49a0-a3f4-7f9bdc5f5903", - "Body" : "{\"etag\":\"mCnhM0ZbYQq3DUXe7iXQ8b1Cucn\",\"key\":\"key77675-19\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "2f2cc8bc-c126-4a4d-8e5d-18d1b7bd6b6a", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4OTI=;sn=448892", + "x-ms-request-id" : "f33369e3-0e72-42e3-b919-b122d5766772", + "Body" : "{\"etag\":\"e0NOxqhpxAbIqsHtUXaHerDMibd\",\"key\":\"key03953-13\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "517626fd-6d1c-473b-b692-5d2748da26b9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-5?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-10?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "03216fe0-9b2d-447a-bdbc-55d7010270d5", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9d3f00e4-88d1-4c73-a348-109a19c0ec4d", "Content-Type" : "application/json" }, "Response" : { @@ -385,29 +385,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "72e21e13-480d-4134-9ba1-6bbe6fb0c314", + "x-ms-correlation-request-id" : "e49834df-a557-45da-a994-11487e960521", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"A5z0bZ7UuvT6WhY1ps7YQ0Scpt4\"", + "ETag" : "\"F2g6nE7frqtvqmPJseykCyw43pO\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwOTQ=;sn=402094", - "x-ms-request-id" : "72e21e13-480d-4134-9ba1-6bbe6fb0c314", - "Body" : "{\"etag\":\"A5z0bZ7UuvT6WhY1ps7YQ0Scpt4\",\"key\":\"key77675-5\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "03216fe0-9b2d-447a-bdbc-55d7010270d5", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4OTQ=;sn=448894", + "x-ms-request-id" : "e49834df-a557-45da-a994-11487e960521", + "Body" : "{\"etag\":\"F2g6nE7frqtvqmPJseykCyw43pO\",\"key\":\"key03953-10\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "9d3f00e4-88d1-4c73-a348-109a19c0ec4d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-13?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-19?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "434f2c99-fba3-4d1a-8170-81e6d66edc88", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fddfe2d1-0aeb-4718-abbb-07a298af6693", "Content-Type" : "application/json" }, "Response" : { @@ -416,29 +416,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c0d39062-185c-481b-87ba-293b65b3ab3a", + "x-ms-correlation-request-id" : "8dbb82fe-27fd-4853-9575-2fa23b9c4d35", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"rMbortuTLiSyRlEXf47JDCN3iu4\"", + "ETag" : "\"mHNIWrRXTYyTNlql94q7u6zsA14\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwOTU=;sn=402095", - "x-ms-request-id" : "c0d39062-185c-481b-87ba-293b65b3ab3a", - "Body" : "{\"etag\":\"rMbortuTLiSyRlEXf47JDCN3iu4\",\"key\":\"key77675-13\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "434f2c99-fba3-4d1a-8170-81e6d66edc88", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4OTM=;sn=448893", + "x-ms-request-id" : "8dbb82fe-27fd-4853-9575-2fa23b9c4d35", + "Body" : "{\"etag\":\"mHNIWrRXTYyTNlql94q7u6zsA14\",\"key\":\"key03953-19\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "fddfe2d1-0aeb-4718-abbb-07a298af6693", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-18?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-14?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8a40e281-1637-4098-9f3a-afaa27d9670d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0923f1b8-58e9-4f2f-a9a5-de3ddd91068b", "Content-Type" : "application/json" }, "Response" : { @@ -447,29 +447,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "8250eb18-597f-4b7a-89c9-1aa0d7ef4bc4", + "x-ms-correlation-request-id" : "258b4c07-d5d8-4348-8c4e-a973248cf71f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"AcWOxcQrKbsf6SSHfkBggPxch0K\"", + "ETag" : "\"Ih7Lu1muvStTIpq1HkObo5tTHYH\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwOTY=;sn=402096", - "x-ms-request-id" : "8250eb18-597f-4b7a-89c9-1aa0d7ef4bc4", - "Body" : "{\"etag\":\"AcWOxcQrKbsf6SSHfkBggPxch0K\",\"key\":\"key77675-18\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "8a40e281-1637-4098-9f3a-afaa27d9670d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4OTU=;sn=448895", + "x-ms-request-id" : "258b4c07-d5d8-4348-8c4e-a973248cf71f", + "Body" : "{\"etag\":\"Ih7Lu1muvStTIpq1HkObo5tTHYH\",\"key\":\"key03953-14\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "0923f1b8-58e9-4f2f-a9a5-de3ddd91068b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-11?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-17?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "81e0824d-286b-4a16-aeb1-e4edb60101c8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e3ab9616-f7e0-4c71-b521-1a479b7dbf86", "Content-Type" : "application/json" }, "Response" : { @@ -478,29 +478,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "38f9ec74-35cb-480b-81af-dc89d5aa0567", + "x-ms-correlation-request-id" : "aabc1a43-091c-408f-aa38-fec7cce0bd45", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"lC7KkdOwhvt0SAlkIkrGVADXaZF\"", + "ETag" : "\"C9ROKprf2KOjY6QCIwGKls4k3Ac\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwOTc=;sn=402097", - "x-ms-request-id" : "38f9ec74-35cb-480b-81af-dc89d5aa0567", - "Body" : "{\"etag\":\"lC7KkdOwhvt0SAlkIkrGVADXaZF\",\"key\":\"key77675-11\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "81e0824d-286b-4a16-aeb1-e4edb60101c8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4OTY=;sn=448896", + "x-ms-request-id" : "aabc1a43-091c-408f-aa38-fec7cce0bd45", + "Body" : "{\"etag\":\"C9ROKprf2KOjY6QCIwGKls4k3Ac\",\"key\":\"key03953-17\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "e3ab9616-f7e0-4c71-b521-1a479b7dbf86", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-15?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-11?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e8e2782e-3c75-4962-bf84-0e2629d94a40", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2621a264-fc6c-43b6-8c4a-19835fc64882", "Content-Type" : "application/json" }, "Response" : { @@ -509,29 +509,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4b8b1e3e-ed34-4b35-82dc-f8f981c259ca", + "x-ms-correlation-request-id" : "c18c6df2-d6eb-4f49-aecf-d1d18ae6e256", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"un0b2OwBsFV53RuFqYrp5379Q8Q\"", + "ETag" : "\"PCVhpmCoxrLXcyycKwFKPHb5XZM\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwOTg=;sn=402098", - "x-ms-request-id" : "4b8b1e3e-ed34-4b35-82dc-f8f981c259ca", - "Body" : "{\"etag\":\"un0b2OwBsFV53RuFqYrp5379Q8Q\",\"key\":\"key77675-15\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "e8e2782e-3c75-4962-bf84-0e2629d94a40", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4OTc=;sn=448897", + "x-ms-request-id" : "c18c6df2-d6eb-4f49-aecf-d1d18ae6e256", + "Body" : "{\"etag\":\"PCVhpmCoxrLXcyycKwFKPHb5XZM\",\"key\":\"key03953-11\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "2621a264-fc6c-43b6-8c4a-19835fc64882", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-20?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-16?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d0d29538-9781-4b0b-926e-a31398803824", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6b74d0bd-3fa7-4382-9dd8-fca07d073f8b", "Content-Type" : "application/json" }, "Response" : { @@ -540,29 +540,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b3b0e366-ecfe-4d81-8e00-8a93de549da9", + "x-ms-correlation-request-id" : "ca762715-06b6-4f5d-9c03-bd75cecca079", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"IFeUgAqjUcOhhswAPgsteSWYi3z\"", + "ETag" : "\"ODAMabDV5w8cxUqs51JFuv6bLfl\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwOTk=;sn=402099", - "x-ms-request-id" : "b3b0e366-ecfe-4d81-8e00-8a93de549da9", - "Body" : "{\"etag\":\"IFeUgAqjUcOhhswAPgsteSWYi3z\",\"key\":\"key77675-20\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "d0d29538-9781-4b0b-926e-a31398803824", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4OTg=;sn=448898", + "x-ms-request-id" : "ca762715-06b6-4f5d-9c03-bd75cecca079", + "Body" : "{\"etag\":\"ODAMabDV5w8cxUqs51JFuv6bLfl\",\"key\":\"key03953-16\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "6b74d0bd-3fa7-4382-9dd8-fca07d073f8b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-17?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-20?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ddf6031e-3438-4446-825f-852db83aabd9", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5328bb5e-6bb3-42ff-b77b-bda8c3a70228", "Content-Type" : "application/json" }, "Response" : { @@ -571,29 +571,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6601bc20-3f81-4fc5-906e-e9c7b4eb4348", + "x-ms-correlation-request-id" : "b1adba09-006a-4f51-90e4-7717bddf6238", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"4DAvKThgWxQXeAmLoFVcmiHkV5e\"", + "ETag" : "\"1xyPUmZUE5hB14XTlANuXECrl7r\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMDA=;sn=402100", - "x-ms-request-id" : "6601bc20-3f81-4fc5-906e-e9c7b4eb4348", - "Body" : "{\"etag\":\"4DAvKThgWxQXeAmLoFVcmiHkV5e\",\"key\":\"key77675-17\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "ddf6031e-3438-4446-825f-852db83aabd9", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4OTk=;sn=448899", + "x-ms-request-id" : "b1adba09-006a-4f51-90e4-7717bddf6238", + "Body" : "{\"etag\":\"1xyPUmZUE5hB14XTlANuXECrl7r\",\"key\":\"key03953-20\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "5328bb5e-6bb3-42ff-b77b-bda8c3a70228", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-16?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-15?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "77a3778b-1c35-453a-be8a-64d02022f1fa", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3b678aac-2db5-4943-b273-80205ea58073", "Content-Type" : "application/json" }, "Response" : { @@ -602,29 +602,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "04640f1b-77a1-4627-8d4d-03bb543d0d2e", + "x-ms-correlation-request-id" : "e2b2b226-7b64-430c-9678-eddbe08e8743", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"SXP2l2BpubEbGRcr3rebn2MdQHk\"", + "ETag" : "\"suWeZq0sguk5W0XErIyUdpi0JVP\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMDE=;sn=402101", - "x-ms-request-id" : "04640f1b-77a1-4627-8d4d-03bb543d0d2e", - "Body" : "{\"etag\":\"SXP2l2BpubEbGRcr3rebn2MdQHk\",\"key\":\"key77675-16\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "77a3778b-1c35-453a-be8a-64d02022f1fa", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MDA=;sn=448900", + "x-ms-request-id" : "e2b2b226-7b64-430c-9678-eddbe08e8743", + "Body" : "{\"etag\":\"suWeZq0sguk5W0XErIyUdpi0JVP\",\"key\":\"key03953-15\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "3b678aac-2db5-4943-b273-80205ea58073", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-22?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-22?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "052fdb8b-3705-486e-ac68-4bfc97348909", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3501869a-a765-49ec-869e-3c3a5c04d280", "Content-Type" : "application/json" }, "Response" : { @@ -633,29 +633,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "fb9000c8-817e-4d58-8690-513fc159838e", + "x-ms-correlation-request-id" : "9a8580e8-9875-4c7f-b92e-805c3af9466c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"XcE3dTbBMap6GG5j2cDfzMVFY1t\"", + "ETag" : "\"El25lGouYDby5QKAPWpbO84TRaW\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMDI=;sn=402102", - "x-ms-request-id" : "fb9000c8-817e-4d58-8690-513fc159838e", - "Body" : "{\"etag\":\"XcE3dTbBMap6GG5j2cDfzMVFY1t\",\"key\":\"key77675-22\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "052fdb8b-3705-486e-ac68-4bfc97348909", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MDE=;sn=448901", + "x-ms-request-id" : "9a8580e8-9875-4c7f-b92e-805c3af9466c", + "Body" : "{\"etag\":\"El25lGouYDby5QKAPWpbO84TRaW\",\"key\":\"key03953-22\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "3501869a-a765-49ec-869e-3c3a5c04d280", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-25?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-18?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "42a51f69-05fa-4b74-8c3e-8bf5ad894e8e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4a5df89e-fa92-4616-9d69-9040d0a08273", "Content-Type" : "application/json" }, "Response" : { @@ -664,29 +664,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b6289a03-cf5d-43a3-9b6a-fcf81e553340", + "x-ms-correlation-request-id" : "2e01a075-004a-43b0-a9fa-178acd48c76d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"hkOAn903TwxV9SXq2CvNtqO0537\"", + "ETag" : "\"f7hUP2JvcKEn7SUwE71OrzYgr2d\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMDM=;sn=402103", - "x-ms-request-id" : "b6289a03-cf5d-43a3-9b6a-fcf81e553340", - "Body" : "{\"etag\":\"hkOAn903TwxV9SXq2CvNtqO0537\",\"key\":\"key77675-25\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "42a51f69-05fa-4b74-8c3e-8bf5ad894e8e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MDI=;sn=448902", + "x-ms-request-id" : "2e01a075-004a-43b0-a9fa-178acd48c76d", + "Body" : "{\"etag\":\"f7hUP2JvcKEn7SUwE71OrzYgr2d\",\"key\":\"key03953-18\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "4a5df89e-fa92-4616-9d69-9040d0a08273", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-14?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-23?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "47d30de6-1259-477c-b34d-25f3c2d504cb", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4679a3ca-158b-437a-9363-9b8e64ef06cf", "Content-Type" : "application/json" }, "Response" : { @@ -695,29 +695,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c5a7cf64-490d-4e73-8488-17e494bba347", + "x-ms-correlation-request-id" : "9be3938e-bd86-4067-8965-1a8d1c472c9a", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"j2VoD97B0t62M1ORa1n4MSLCdZT\"", + "ETag" : "\"lDuGBRMri2JiEQ85MLd971FegYg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMDQ=;sn=402104", - "x-ms-request-id" : "c5a7cf64-490d-4e73-8488-17e494bba347", - "Body" : "{\"etag\":\"j2VoD97B0t62M1ORa1n4MSLCdZT\",\"key\":\"key77675-14\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "47d30de6-1259-477c-b34d-25f3c2d504cb", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MDM=;sn=448903", + "x-ms-request-id" : "9be3938e-bd86-4067-8965-1a8d1c472c9a", + "Body" : "{\"etag\":\"lDuGBRMri2JiEQ85MLd971FegYg\",\"key\":\"key03953-23\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "4679a3ca-158b-437a-9363-9b8e64ef06cf", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-24?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-26?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "45b95a5c-a526-4ca8-bcdd-d6497b7adba5", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f2f13433-2b7b-4bf4-82c2-6a9e4e8c2a8d", "Content-Type" : "application/json" }, "Response" : { @@ -726,29 +726,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f2857752-cacf-4292-bbe6-5062db1d007b", + "x-ms-correlation-request-id" : "1b7e107a-e46c-4285-9940-38639ae50c29", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"OZUziDK8mJNNyEctFKYcJ1wtdJ5\"", + "ETag" : "\"HNObyRGSZgdcdm2bBbyJC2ZbEfE\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMDU=;sn=402105", - "x-ms-request-id" : "f2857752-cacf-4292-bbe6-5062db1d007b", - "Body" : "{\"etag\":\"OZUziDK8mJNNyEctFKYcJ1wtdJ5\",\"key\":\"key77675-24\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "45b95a5c-a526-4ca8-bcdd-d6497b7adba5", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MDQ=;sn=448904", + "x-ms-request-id" : "1b7e107a-e46c-4285-9940-38639ae50c29", + "Body" : "{\"etag\":\"HNObyRGSZgdcdm2bBbyJC2ZbEfE\",\"key\":\"key03953-26\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "f2f13433-2b7b-4bf4-82c2-6a9e4e8c2a8d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-26?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-21?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "84e00ee5-3289-400d-a77f-9c56f4d75982", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2102c607-acfd-4f44-acde-770564380695", "Content-Type" : "application/json" }, "Response" : { @@ -757,29 +757,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "258e16b3-dafd-4934-a48f-1baea21a866f", + "x-ms-correlation-request-id" : "d7981100-f325-4173-bb00-3e51f1773ead", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"wMJBsnf9Vrt6BZvgwCfaOYquTax\"", + "ETag" : "\"ZY8wHjYJbX5HDqPPElg7kf84VVs\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMDY=;sn=402106", - "x-ms-request-id" : "258e16b3-dafd-4934-a48f-1baea21a866f", - "Body" : "{\"etag\":\"wMJBsnf9Vrt6BZvgwCfaOYquTax\",\"key\":\"key77675-26\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "84e00ee5-3289-400d-a77f-9c56f4d75982", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MDU=;sn=448905", + "x-ms-request-id" : "d7981100-f325-4173-bb00-3e51f1773ead", + "Body" : "{\"etag\":\"ZY8wHjYJbX5HDqPPElg7kf84VVs\",\"key\":\"key03953-21\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "2102c607-acfd-4f44-acde-770564380695", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-21?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-24?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8844f954-948a-4751-95a9-4404c3220f45", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ebd6df5f-27fe-4e68-88bf-cf98d190d2e4", "Content-Type" : "application/json" }, "Response" : { @@ -788,29 +788,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4bcb033b-256f-42d8-a377-b8be3aec92ce", + "x-ms-correlation-request-id" : "f4503fb4-e5e7-40bc-a955-e54490198c34", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"wiK765ABT5Dvq7L5U755fuGvZiF\"", + "ETag" : "\"T9V3eQb8gXcilcx92JXavSlYKGl\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMDc=;sn=402107", - "x-ms-request-id" : "4bcb033b-256f-42d8-a377-b8be3aec92ce", - "Body" : "{\"etag\":\"wiK765ABT5Dvq7L5U755fuGvZiF\",\"key\":\"key77675-21\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "8844f954-948a-4751-95a9-4404c3220f45", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MDY=;sn=448906", + "x-ms-request-id" : "f4503fb4-e5e7-40bc-a955-e54490198c34", + "Body" : "{\"etag\":\"T9V3eQb8gXcilcx92JXavSlYKGl\",\"key\":\"key03953-24\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "ebd6df5f-27fe-4e68-88bf-cf98d190d2e4", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-28?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-25?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7cb52ef3-8c2c-4065-9d28-150475c0b636", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "df5b59f0-f9c0-411c-8ee6-e30b9caf7c64", "Content-Type" : "application/json" }, "Response" : { @@ -819,29 +819,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "33b92bbf-2834-4d20-80b9-8f083b76e0d1", + "x-ms-correlation-request-id" : "cd0880ef-a252-4c3f-8822-19ab91e72e39", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"dxKecYjos2s2WxLhm6ElE6tRrNG\"", + "ETag" : "\"ifj4ZorMRRVMldsfFK2ED5PG3b1\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMDg=;sn=402108", - "x-ms-request-id" : "33b92bbf-2834-4d20-80b9-8f083b76e0d1", - "Body" : "{\"etag\":\"dxKecYjos2s2WxLhm6ElE6tRrNG\",\"key\":\"key77675-28\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "7cb52ef3-8c2c-4065-9d28-150475c0b636", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MDc=;sn=448907", + "x-ms-request-id" : "cd0880ef-a252-4c3f-8822-19ab91e72e39", + "Body" : "{\"etag\":\"ifj4ZorMRRVMldsfFK2ED5PG3b1\",\"key\":\"key03953-25\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "df5b59f0-f9c0-411c-8ee6-e30b9caf7c64", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-27?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-28?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0d04a62f-5e26-437d-8c9e-8f136342d741", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ab532e1c-29b2-4193-ab47-9726456741e3", "Content-Type" : "application/json" }, "Response" : { @@ -850,29 +850,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b1136ddf-f103-4b3e-9bcb-b8496ba878b9", + "x-ms-correlation-request-id" : "e1a71f33-923f-49a3-b0d6-bd991a2871ef", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"H5gYEq79VlZxHJTTqARQttpOIai\"", + "ETag" : "\"1dmmMBF48gHG1R0EZYs2sVVoMqs\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMDk=;sn=402109", - "x-ms-request-id" : "b1136ddf-f103-4b3e-9bcb-b8496ba878b9", - "Body" : "{\"etag\":\"H5gYEq79VlZxHJTTqARQttpOIai\",\"key\":\"key77675-27\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "0d04a62f-5e26-437d-8c9e-8f136342d741", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MDg=;sn=448908", + "x-ms-request-id" : "e1a71f33-923f-49a3-b0d6-bd991a2871ef", + "Body" : "{\"etag\":\"1dmmMBF48gHG1R0EZYs2sVVoMqs\",\"key\":\"key03953-28\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "ab532e1c-29b2-4193-ab47-9726456741e3", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-23?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-29?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3599c41c-5548-4d82-9558-615635324f15", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "64a3e9c6-8a37-4d69-ad86-ea34709a0020", "Content-Type" : "application/json" }, "Response" : { @@ -881,29 +881,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "49653eab-7989-49f8-9442-763cb135ea17", + "x-ms-correlation-request-id" : "9bb940a8-c581-49f6-8519-a372dfeb9eb9", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"CaGQzsMLuybDA8ZMcCdiCK7Pn1h\"", + "ETag" : "\"AkjPn4sK7JufrU0T0QGbg7N4IF8\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMTA=;sn=402110", - "x-ms-request-id" : "49653eab-7989-49f8-9442-763cb135ea17", - "Body" : "{\"etag\":\"CaGQzsMLuybDA8ZMcCdiCK7Pn1h\",\"key\":\"key77675-23\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "3599c41c-5548-4d82-9558-615635324f15", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MDk=;sn=448909", + "x-ms-request-id" : "9bb940a8-c581-49f6-8519-a372dfeb9eb9", + "Body" : "{\"etag\":\"AkjPn4sK7JufrU0T0QGbg7N4IF8\",\"key\":\"key03953-29\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "64a3e9c6-8a37-4d69-ad86-ea34709a0020", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-30?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-27?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5c9883f3-fee0-45b2-876e-523715829a33", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0ea2da8c-f1b9-4536-8bb8-8f2c4f5ce8d7", "Content-Type" : "application/json" }, "Response" : { @@ -912,29 +912,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "14c547b7-7d84-4de5-ae2f-c89c25c13483", + "x-ms-correlation-request-id" : "db3e23e3-0c1b-4a8c-ba1c-1ed4e908dc7f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ALw0TGWzE06mzd3kBB0iWNkL7C7\"", + "ETag" : "\"QC2fOFuVwbzQgDHpJTa9W3je0pp\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMTE=;sn=402111", - "x-ms-request-id" : "14c547b7-7d84-4de5-ae2f-c89c25c13483", - "Body" : "{\"etag\":\"ALw0TGWzE06mzd3kBB0iWNkL7C7\",\"key\":\"key77675-30\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "5c9883f3-fee0-45b2-876e-523715829a33", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MTA=;sn=448910", + "x-ms-request-id" : "db3e23e3-0c1b-4a8c-ba1c-1ed4e908dc7f", + "Body" : "{\"etag\":\"QC2fOFuVwbzQgDHpJTa9W3je0pp\",\"key\":\"key03953-27\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "0ea2da8c-f1b9-4536-8bb8-8f2c4f5ce8d7", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-29?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-31?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e2a76ce7-491a-4e25-91eb-4171adec7590", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "24e4abab-ff2f-426c-88e1-2c1c1c54838f", "Content-Type" : "application/json" }, "Response" : { @@ -943,29 +943,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "44c5964f-c32e-401f-9076-1727bfd70cbb", + "x-ms-correlation-request-id" : "6d91a220-67ed-4f67-9ff2-c974d5b388a8", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"XDtwx4ByFDNEu1IPu1IDCBUFL1C\"", + "ETag" : "\"7FSzDUaaet8mVo5b8iGj7LZOa4L\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMTI=;sn=402112", - "x-ms-request-id" : "44c5964f-c32e-401f-9076-1727bfd70cbb", - "Body" : "{\"etag\":\"XDtwx4ByFDNEu1IPu1IDCBUFL1C\",\"key\":\"key77675-29\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "e2a76ce7-491a-4e25-91eb-4171adec7590", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MTE=;sn=448911", + "x-ms-request-id" : "6d91a220-67ed-4f67-9ff2-c974d5b388a8", + "Body" : "{\"etag\":\"7FSzDUaaet8mVo5b8iGj7LZOa4L\",\"key\":\"key03953-31\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "24e4abab-ff2f-426c-88e1-2c1c1c54838f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-31?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-33?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3522bd72-8746-463a-86f8-a88e745dc771", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8429c026-7339-4486-b3f5-fec5bd71a268", "Content-Type" : "application/json" }, "Response" : { @@ -974,29 +974,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "18c0dccb-8370-470c-b23f-869f539ce033", + "x-ms-correlation-request-id" : "a6b5dc9a-9dd9-49ee-95b4-b57f1d60b6b8", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"patmeBOnDHsJJhuMysUIS7CJkji\"", + "ETag" : "\"t9GXVy1UszZDYdI9ukUANnQCHMW\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMTM=;sn=402113", - "x-ms-request-id" : "18c0dccb-8370-470c-b23f-869f539ce033", - "Body" : "{\"etag\":\"patmeBOnDHsJJhuMysUIS7CJkji\",\"key\":\"key77675-31\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "3522bd72-8746-463a-86f8-a88e745dc771", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MTI=;sn=448912", + "x-ms-request-id" : "a6b5dc9a-9dd9-49ee-95b4-b57f1d60b6b8", + "Body" : "{\"etag\":\"t9GXVy1UszZDYdI9ukUANnQCHMW\",\"key\":\"key03953-33\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "8429c026-7339-4486-b3f5-fec5bd71a268", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-32?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-30?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "31c1e6e8-e3a3-4db8-aaa0-6d7ac800c886", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ad73befb-f124-4e03-ba59-78904b6f796f", "Content-Type" : "application/json" }, "Response" : { @@ -1005,29 +1005,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "48cd3043-140b-409e-82c6-523fe4b7b3b5", + "x-ms-correlation-request-id" : "38a58b21-b973-4d61-9c19-1b0f62848037", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"4nt2a9Gb3ulXUZicpVvWt19C45n\"", + "ETag" : "\"BktmW393FzcqmJ7mF1veMJXnMsG\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMTQ=;sn=402114", - "x-ms-request-id" : "48cd3043-140b-409e-82c6-523fe4b7b3b5", - "Body" : "{\"etag\":\"4nt2a9Gb3ulXUZicpVvWt19C45n\",\"key\":\"key77675-32\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "31c1e6e8-e3a3-4db8-aaa0-6d7ac800c886", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MTM=;sn=448913", + "x-ms-request-id" : "38a58b21-b973-4d61-9c19-1b0f62848037", + "Body" : "{\"etag\":\"BktmW393FzcqmJ7mF1veMJXnMsG\",\"key\":\"key03953-30\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "ad73befb-f124-4e03-ba59-78904b6f796f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-33?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-38?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "18886154-cd88-49fd-a162-028f94c1fd6c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b5818e84-8379-4d09-a6de-016070bbf5ec", "Content-Type" : "application/json" }, "Response" : { @@ -1036,29 +1036,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d44131ca-b899-43f1-9199-91c058184ed0", + "x-ms-correlation-request-id" : "b414bde9-e31d-447f-9261-70e4e30f2b86", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"c8blqKxbsfCUK6xGBdrhQTzyty2\"", + "ETag" : "\"sk6LhsDTGZWDzmU6xIOTHOcdG7F\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMTU=;sn=402115", - "x-ms-request-id" : "d44131ca-b899-43f1-9199-91c058184ed0", - "Body" : "{\"etag\":\"c8blqKxbsfCUK6xGBdrhQTzyty2\",\"key\":\"key77675-33\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "18886154-cd88-49fd-a162-028f94c1fd6c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MTQ=;sn=448914", + "x-ms-request-id" : "b414bde9-e31d-447f-9261-70e4e30f2b86", + "Body" : "{\"etag\":\"sk6LhsDTGZWDzmU6xIOTHOcdG7F\",\"key\":\"key03953-38\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "b5818e84-8379-4d09-a6de-016070bbf5ec", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-37?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-36?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f1f883cb-a0b5-4152-892c-f0f95bc350f6", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c5e2d6a8-ac12-4e52-b16c-69331dfd27b9", "Content-Type" : "application/json" }, "Response" : { @@ -1067,29 +1067,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d19183c8-3576-4e14-a467-0cbc98bc6188", + "x-ms-correlation-request-id" : "a1dc4f15-2091-4cc9-9249-99cad51962cf", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"H9MtAitgyH1US14uFLkAOtEBdK7\"", + "ETag" : "\"z1BywtJKNKu3OJiMo15AdnEstje\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMTY=;sn=402116", - "x-ms-request-id" : "d19183c8-3576-4e14-a467-0cbc98bc6188", - "Body" : "{\"etag\":\"H9MtAitgyH1US14uFLkAOtEBdK7\",\"key\":\"key77675-37\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "f1f883cb-a0b5-4152-892c-f0f95bc350f6", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MTY=;sn=448916", + "x-ms-request-id" : "a1dc4f15-2091-4cc9-9249-99cad51962cf", + "Body" : "{\"etag\":\"z1BywtJKNKu3OJiMo15AdnEstje\",\"key\":\"key03953-36\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "c5e2d6a8-ac12-4e52-b16c-69331dfd27b9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-34?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-32?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ef5770ba-a9bf-4fc4-b2c7-b8b4acf35cad", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1c48ed5d-ff46-4d5d-aae0-b0c50a15fe7a", "Content-Type" : "application/json" }, "Response" : { @@ -1098,29 +1098,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "56afeec8-612f-421e-a794-666f1b454f5b", + "x-ms-correlation-request-id" : "46bc7e8c-30ff-476b-8fd2-e548d1aca10f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"IhKNTUbrfXeEiVvarTAlAxchNV9\"", + "ETag" : "\"DlBQK2YI6hvbR9F9h9AICwhdsM9\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMTc=;sn=402117", - "x-ms-request-id" : "56afeec8-612f-421e-a794-666f1b454f5b", - "Body" : "{\"etag\":\"IhKNTUbrfXeEiVvarTAlAxchNV9\",\"key\":\"key77675-34\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "ef5770ba-a9bf-4fc4-b2c7-b8b4acf35cad", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MTU=;sn=448915", + "x-ms-request-id" : "46bc7e8c-30ff-476b-8fd2-e548d1aca10f", + "Body" : "{\"etag\":\"DlBQK2YI6hvbR9F9h9AICwhdsM9\",\"key\":\"key03953-32\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "1c48ed5d-ff46-4d5d-aae0-b0c50a15fe7a", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-40?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-40?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8bd93975-ace2-4796-b6d3-3332fb7b4ecb", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4e68eb83-557e-4835-95d6-109a2ef15c55", "Content-Type" : "application/json" }, "Response" : { @@ -1129,29 +1129,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "66c2eddd-7cab-410b-bef5-1146735585a8", + "x-ms-correlation-request-id" : "a427ecdd-ff4a-4792-87bf-b80ba3ace7d4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"XqSea0TGcbhzEZtES4gH5FaA3Xm\"", + "ETag" : "\"8PMXqYbZOu6HgVD4Pnxb4olv5hG\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMTg=;sn=402118", - "x-ms-request-id" : "66c2eddd-7cab-410b-bef5-1146735585a8", - "Body" : "{\"etag\":\"XqSea0TGcbhzEZtES4gH5FaA3Xm\",\"key\":\"key77675-40\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "8bd93975-ace2-4796-b6d3-3332fb7b4ecb", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MTc=;sn=448917", + "x-ms-request-id" : "a427ecdd-ff4a-4792-87bf-b80ba3ace7d4", + "Body" : "{\"etag\":\"8PMXqYbZOu6HgVD4Pnxb4olv5hG\",\"key\":\"key03953-40\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "4e68eb83-557e-4835-95d6-109a2ef15c55", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-36?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-37?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3f5fc966-3d53-41df-8b78-3017797e0e1b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f0104c62-7b33-46f4-a2d5-962657d9db6b", "Content-Type" : "application/json" }, "Response" : { @@ -1160,29 +1160,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "66e4cfee-d915-4510-9f90-ef90adbedda5", + "x-ms-correlation-request-id" : "9783cf1a-3814-4ec4-a8a8-90e039ee7d52", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"QaLjo90YE3VINlG0rD5vJK8jlOc\"", + "ETag" : "\"SHqYslNedJO2CPMdtakKAB7k6lt\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMTk=;sn=402119", - "x-ms-request-id" : "66e4cfee-d915-4510-9f90-ef90adbedda5", - "Body" : "{\"etag\":\"QaLjo90YE3VINlG0rD5vJK8jlOc\",\"key\":\"key77675-36\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "3f5fc966-3d53-41df-8b78-3017797e0e1b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MTg=;sn=448918", + "x-ms-request-id" : "9783cf1a-3814-4ec4-a8a8-90e039ee7d52", + "Body" : "{\"etag\":\"SHqYslNedJO2CPMdtakKAB7k6lt\",\"key\":\"key03953-37\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "f0104c62-7b33-46f4-a2d5-962657d9db6b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-35?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-34?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c9cad726-eaa1-4606-abf3-2e79401aa113", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "79c8d70d-26c5-462d-8906-b238f76b6b61", "Content-Type" : "application/json" }, "Response" : { @@ -1191,29 +1191,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9e6ccba7-d6c0-456c-9698-f51acad0c672", + "x-ms-correlation-request-id" : "34460ffd-c7e9-469e-991c-eadf4c396158", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"CWyFuQqtNUxdJWSmicYinAMOEuB\"", + "ETag" : "\"9vKDk70A7bbRrDF12SpKJQ17yLn\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMjA=;sn=402120", - "x-ms-request-id" : "9e6ccba7-d6c0-456c-9698-f51acad0c672", - "Body" : "{\"etag\":\"CWyFuQqtNUxdJWSmicYinAMOEuB\",\"key\":\"key77675-35\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "c9cad726-eaa1-4606-abf3-2e79401aa113", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MTk=;sn=448919", + "x-ms-request-id" : "34460ffd-c7e9-469e-991c-eadf4c396158", + "Body" : "{\"etag\":\"9vKDk70A7bbRrDF12SpKJQ17yLn\",\"key\":\"key03953-34\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "79c8d70d-26c5-462d-8906-b238f76b6b61", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-41?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-41?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d68c676f-5654-4382-81b5-a309c173d205", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7a9010de-97b5-4adc-b878-906eec933c85", "Content-Type" : "application/json" }, "Response" : { @@ -1222,29 +1222,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "259c344c-2a9b-4cee-9a77-6074cabf102f", + "x-ms-correlation-request-id" : "1814c931-911e-446d-8abf-92cef11d2369", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"MHAjlUu8i2yhPSpmDLPaenOWiAd\"", + "ETag" : "\"relplQqgKHxtuQWHHxepvL5GAvl\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMjE=;sn=402121", - "x-ms-request-id" : "259c344c-2a9b-4cee-9a77-6074cabf102f", - "Body" : "{\"etag\":\"MHAjlUu8i2yhPSpmDLPaenOWiAd\",\"key\":\"key77675-41\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "d68c676f-5654-4382-81b5-a309c173d205", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MjA=;sn=448920", + "x-ms-request-id" : "1814c931-911e-446d-8abf-92cef11d2369", + "Body" : "{\"etag\":\"relplQqgKHxtuQWHHxepvL5GAvl\",\"key\":\"key03953-41\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "7a9010de-97b5-4adc-b878-906eec933c85", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-44?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-35?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "21bdcd15-adaf-4491-830d-741091823e11", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f2656380-0cd9-4585-8058-ecd838a5c6d4", "Content-Type" : "application/json" }, "Response" : { @@ -1253,29 +1253,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "95ab0dc0-3603-42cb-95f4-db9782b3e00b", + "x-ms-correlation-request-id" : "01cba9f2-bb29-41a1-9eaf-ce2f60537236", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"rl2EAP9iqpZMQGfHYhrNLcOBKN5\"", + "ETag" : "\"wZVw8bIY0P3bUy5CcSxOGc4KRuL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMjI=;sn=402122", - "x-ms-request-id" : "95ab0dc0-3603-42cb-95f4-db9782b3e00b", - "Body" : "{\"etag\":\"rl2EAP9iqpZMQGfHYhrNLcOBKN5\",\"key\":\"key77675-44\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "21bdcd15-adaf-4491-830d-741091823e11", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MjE=;sn=448921", + "x-ms-request-id" : "01cba9f2-bb29-41a1-9eaf-ce2f60537236", + "Body" : "{\"etag\":\"wZVw8bIY0P3bUy5CcSxOGc4KRuL\",\"key\":\"key03953-35\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "f2656380-0cd9-4585-8058-ecd838a5c6d4", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-38?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-42?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "04bca0a1-5532-4728-86c2-5dac9ed836aa", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "42787f50-c2a2-4d8d-abf2-f44afb1f9bc7", "Content-Type" : "application/json" }, "Response" : { @@ -1284,29 +1284,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "48bb4eb0-c3db-4f3e-9f0c-10e955266d3f", + "x-ms-correlation-request-id" : "37e546ea-c8da-4c63-aa40-7bb9e5a5cfdb", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"lDpYnWfhbEvDfjuk2dD7pZG9zlY\"", + "ETag" : "\"vF4utnv79Eud5dcYzV09ZlUJlJM\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMjM=;sn=402123", - "x-ms-request-id" : "48bb4eb0-c3db-4f3e-9f0c-10e955266d3f", - "Body" : "{\"etag\":\"lDpYnWfhbEvDfjuk2dD7pZG9zlY\",\"key\":\"key77675-38\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "04bca0a1-5532-4728-86c2-5dac9ed836aa", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MjI=;sn=448922", + "x-ms-request-id" : "37e546ea-c8da-4c63-aa40-7bb9e5a5cfdb", + "Body" : "{\"etag\":\"vF4utnv79Eud5dcYzV09ZlUJlJM\",\"key\":\"key03953-42\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "42787f50-c2a2-4d8d-abf2-f44afb1f9bc7", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-43?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-47?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8c3e2d36-5fd0-45de-a539-ba7d396f5f1d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "390937ed-a1bc-49c3-9e76-b7769cda77a0", "Content-Type" : "application/json" }, "Response" : { @@ -1315,29 +1315,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "99dc5005-bab3-4db3-8796-1610cfc657f3", + "x-ms-correlation-request-id" : "3498c833-05f1-4674-84c9-e0cf562f1816", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"UsOYtgmmcS81KqeuhXuXSxzUGFP\"", + "ETag" : "\"cGvbAtxrOHSYxlzZWRSIBQSs0at\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMjQ=;sn=402124", - "x-ms-request-id" : "99dc5005-bab3-4db3-8796-1610cfc657f3", - "Body" : "{\"etag\":\"UsOYtgmmcS81KqeuhXuXSxzUGFP\",\"key\":\"key77675-43\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "8c3e2d36-5fd0-45de-a539-ba7d396f5f1d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MjM=;sn=448923", + "x-ms-request-id" : "3498c833-05f1-4674-84c9-e0cf562f1816", + "Body" : "{\"etag\":\"cGvbAtxrOHSYxlzZWRSIBQSs0at\",\"key\":\"key03953-47\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "390937ed-a1bc-49c3-9e76-b7769cda77a0", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-49?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-43?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d64a6c44-73d8-4139-bcd0-f981fccfe2c5", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "13a14275-016b-420c-97a1-bd987fd54c61", "Content-Type" : "application/json" }, "Response" : { @@ -1346,29 +1346,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ce0d17db-67ac-49d0-abd5-e984c1d58203", + "x-ms-correlation-request-id" : "e1a64c06-bf0e-4201-8f1a-90a8491af95b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"jKLo554vSLWMmpCQwPOzOoqxXh7\"", + "ETag" : "\"lLfuDs7phuMILkLVccHyqRewvR8\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMjU=;sn=402125", - "x-ms-request-id" : "ce0d17db-67ac-49d0-abd5-e984c1d58203", - "Body" : "{\"etag\":\"jKLo554vSLWMmpCQwPOzOoqxXh7\",\"key\":\"key77675-49\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "d64a6c44-73d8-4139-bcd0-f981fccfe2c5", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MjQ=;sn=448924", + "x-ms-request-id" : "e1a64c06-bf0e-4201-8f1a-90a8491af95b", + "Body" : "{\"etag\":\"lLfuDs7phuMILkLVccHyqRewvR8\",\"key\":\"key03953-43\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "13a14275-016b-420c-97a1-bd987fd54c61", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-39?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-39?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e56a995a-c68f-4e90-a1bc-589e38808d26", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "742be1c0-e877-450a-b108-5786d7889db1", "Content-Type" : "application/json" }, "Response" : { @@ -1377,29 +1377,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1f86d03f-828a-4ae2-8075-1f948255bb26", + "x-ms-correlation-request-id" : "d945201a-4bd4-4b7e-9c91-063886a60176", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"s7aAqrRXIrD44eDoZgItSSdW4LJ\"", + "ETag" : "\"QzbJg6ANYjKLu5t1RnsLVdxzaIL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMjY=;sn=402126", - "x-ms-request-id" : "1f86d03f-828a-4ae2-8075-1f948255bb26", - "Body" : "{\"etag\":\"s7aAqrRXIrD44eDoZgItSSdW4LJ\",\"key\":\"key77675-39\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "e56a995a-c68f-4e90-a1bc-589e38808d26", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MjU=;sn=448925", + "x-ms-request-id" : "d945201a-4bd4-4b7e-9c91-063886a60176", + "Body" : "{\"etag\":\"QzbJg6ANYjKLu5t1RnsLVdxzaIL\",\"key\":\"key03953-39\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "742be1c0-e877-450a-b108-5786d7889db1", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-45?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-49?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "604aef49-a187-46e9-b4ce-71834d4a1c2c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3de5972b-86b4-4d10-b749-a1a7cc119959", "Content-Type" : "application/json" }, "Response" : { @@ -1408,29 +1408,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "16c76e46-3359-4210-a2a6-02d84a3801e1", + "x-ms-correlation-request-id" : "fb6f7ffd-e180-403a-ac29-71ec34efc110", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"RRZWYBhwh9Jb6Gy1DzD8LNjRr7Q\"", + "ETag" : "\"YsVz3R1RhySImlih3852wVTcSnI\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMjc=;sn=402127", - "x-ms-request-id" : "16c76e46-3359-4210-a2a6-02d84a3801e1", - "Body" : "{\"etag\":\"RRZWYBhwh9Jb6Gy1DzD8LNjRr7Q\",\"key\":\"key77675-45\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "604aef49-a187-46e9-b4ce-71834d4a1c2c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MjY=;sn=448926", + "x-ms-request-id" : "fb6f7ffd-e180-403a-ac29-71ec34efc110", + "Body" : "{\"etag\":\"YsVz3R1RhySImlih3852wVTcSnI\",\"key\":\"key03953-49\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "3de5972b-86b4-4d10-b749-a1a7cc119959", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-42?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-45?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3815dc9f-4723-406d-b8e2-ce85fdefe921", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9f495950-c03d-4ee4-a443-7d4cdc09e4f0", "Content-Type" : "application/json" }, "Response" : { @@ -1439,29 +1439,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "36de1508-bd2f-4f76-b752-00477e3d2053", + "x-ms-correlation-request-id" : "5f367485-4f45-4c0d-b3b5-0ccbb522fb86", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"acN4zvZf58MAQIvDtqDCb3kE15L\"", + "ETag" : "\"n3eCNHiTWRzAnjLOimxpW4cZDiL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMjg=;sn=402128", - "x-ms-request-id" : "36de1508-bd2f-4f76-b752-00477e3d2053", - "Body" : "{\"etag\":\"acN4zvZf58MAQIvDtqDCb3kE15L\",\"key\":\"key77675-42\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "3815dc9f-4723-406d-b8e2-ce85fdefe921", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5Mjc=;sn=448927", + "x-ms-request-id" : "5f367485-4f45-4c0d-b3b5-0ccbb522fb86", + "Body" : "{\"etag\":\"n3eCNHiTWRzAnjLOimxpW4cZDiL\",\"key\":\"key03953-45\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "9f495950-c03d-4ee4-a443-7d4cdc09e4f0", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-47?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-48?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b685d601-ce9a-4d67-ad18-1a91ac4a0e44", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "eeaf512e-ff97-48f6-90bb-14a4aacfc46e", "Content-Type" : "application/json" }, "Response" : { @@ -1470,29 +1470,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "5c7b6e20-edcc-43f9-9da5-92488eee8672", + "x-ms-correlation-request-id" : "b7e047ab-273d-4af0-8140-5ec839ac3448", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"a0Yl4ZQITG18paKtDl7GApPO7m5\"", + "ETag" : "\"zpHh9NjFmQLclZ0KPWbYH2Iqz6H\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMjk=;sn=402129", - "x-ms-request-id" : "5c7b6e20-edcc-43f9-9da5-92488eee8672", - "Body" : "{\"etag\":\"a0Yl4ZQITG18paKtDl7GApPO7m5\",\"key\":\"key77675-47\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "b685d601-ce9a-4d67-ad18-1a91ac4a0e44", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5Mjg=;sn=448928", + "x-ms-request-id" : "b7e047ab-273d-4af0-8140-5ec839ac3448", + "Body" : "{\"etag\":\"zpHh9NjFmQLclZ0KPWbYH2Iqz6H\",\"key\":\"key03953-48\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "eeaf512e-ff97-48f6-90bb-14a4aacfc46e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-46?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-46?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "645ed612-1a0f-4c1f-9446-cb39d02307b3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "49b8d379-45ea-4f7e-be26-4157d76c824f", "Content-Type" : "application/json" }, "Response" : { @@ -1501,29 +1501,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "68f83445-5f76-4648-bc3d-8c84b6776fc3", + "x-ms-correlation-request-id" : "d3e762cb-2238-4250-b39f-3f554353ffae", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"zKFvyruqC3k019DLdd4wKX9snpi\"", + "ETag" : "\"I80H2T8goEeHVNluIR9AOzLfqpX\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMzA=;sn=402130", - "x-ms-request-id" : "68f83445-5f76-4648-bc3d-8c84b6776fc3", - "Body" : "{\"etag\":\"zKFvyruqC3k019DLdd4wKX9snpi\",\"key\":\"key77675-46\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "645ed612-1a0f-4c1f-9446-cb39d02307b3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5Mjk=;sn=448929", + "x-ms-request-id" : "d3e762cb-2238-4250-b39f-3f554353ffae", + "Body" : "{\"etag\":\"I80H2T8goEeHVNluIR9AOzLfqpX\",\"key\":\"key03953-46\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "49b8d379-45ea-4f7e-be26-4157d76c824f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-48?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-44?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5c0c1a8d-5667-43a3-851a-25134984c4ef", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a66c0fd4-74c1-4bc8-b3c7-e5a70662ae0c", "Content-Type" : "application/json" }, "Response" : { @@ -1532,29 +1532,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6c2beaf4-4c20-48b3-ba82-f9c2eec93381", + "x-ms-correlation-request-id" : "4d1f4460-9457-47de-84ad-0432ef03ecf8", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"eDNDePK1ZwQSZHmbAXI3bpWnB5g\"", + "ETag" : "\"uvTUhc2JWLWeQuKuZpeGrEkqZ3e\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMzE=;sn=402131", - "x-ms-request-id" : "6c2beaf4-4c20-48b3-ba82-f9c2eec93381", - "Body" : "{\"etag\":\"eDNDePK1ZwQSZHmbAXI3bpWnB5g\",\"key\":\"key77675-48\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "5c0c1a8d-5667-43a3-851a-25134984c4ef", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MzA=;sn=448930", + "x-ms-request-id" : "4d1f4460-9457-47de-84ad-0432ef03ecf8", + "Body" : "{\"etag\":\"uvTUhc2JWLWeQuKuZpeGrEkqZ3e\",\"key\":\"key03953-44\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "a66c0fd4-74c1-4bc8-b3c7-e5a70662ae0c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key77675-%2a&label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key03953-%2a&label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d1b44e3f-79b1-4c1c-a773-7f31ced06a6d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "21793d7e-e5c5-4ea5-ba34-119d42a8deca", "Content-Type" : "application/json" }, "Response" : { @@ -1565,25 +1565,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "52cedb69-e1d1-45e8-9660-5a48381ec940", + "x-ms-correlation-request-id" : "13791b2b-48e8-4f8f-8d57-568782ba6f96", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMzE=;sn=402131", - "x-ms-request-id" : "52cedb69-e1d1-45e8-9660-5a48381ec940", - "Body" : "{\"items\":[{\"etag\":\"SyCoB4ncMwTxfL07MMaroyjZGKl\",\"key\":\"key77675-0\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"Y4jOSQJ3iWWF0YQFyv3dga4xRoC\",\"key\":\"key77675-1\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"Lg1QYWMdNfFrdpXYcJ60dvEfCE1\",\"key\":\"key77675-10\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"lC7KkdOwhvt0SAlkIkrGVADXaZF\",\"key\":\"key77675-11\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"Q3YFc18LfxrEM3CzglKt5x4tB0i\",\"key\":\"key77675-12\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"rMbortuTLiSyRlEXf47JDCN3iu4\",\"key\":\"key77675-13\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"j2VoD97B0t62M1ORa1n4MSLCdZT\",\"key\":\"key77675-14\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"un0b2OwBsFV53RuFqYrp5379Q8Q\",\"key\":\"key77675-15\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"SXP2l2BpubEbGRcr3rebn2MdQHk\",\"key\":\"key77675-16\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"4DAvKThgWxQXeAmLoFVcmiHkV5e\",\"key\":\"key77675-17\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"AcWOxcQrKbsf6SSHfkBggPxch0K\",\"key\":\"key77675-18\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"mCnhM0ZbYQq3DUXe7iXQ8b1Cucn\",\"key\":\"key77675-19\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"bhRVwUG59W0TnYFi7t0Nw5EUSZb\",\"key\":\"key77675-2\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"IFeUgAqjUcOhhswAPgsteSWYi3z\",\"key\":\"key77675-20\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"wiK765ABT5Dvq7L5U755fuGvZiF\",\"key\":\"key77675-21\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"XcE3dTbBMap6GG5j2cDfzMVFY1t\",\"key\":\"key77675-22\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"CaGQzsMLuybDA8ZMcCdiCK7Pn1h\",\"key\":\"key77675-23\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"OZUziDK8mJNNyEctFKYcJ1wtdJ5\",\"key\":\"key77675-24\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"hkOAn903TwxV9SXq2CvNtqO0537\",\"key\":\"key77675-25\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"wMJBsnf9Vrt6BZvgwCfaOYquTax\",\"key\":\"key77675-26\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"H5gYEq79VlZxHJTTqARQttpOIai\",\"key\":\"key77675-27\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"dxKecYjos2s2WxLhm6ElE6tRrNG\",\"key\":\"key77675-28\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"XDtwx4ByFDNEu1IPu1IDCBUFL1C\",\"key\":\"key77675-29\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"wixV97BoQSTW92GF60PqMJWUB5m\",\"key\":\"key77675-3\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"ALw0TGWzE06mzd3kBB0iWNkL7C7\",\"key\":\"key77675-30\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"patmeBOnDHsJJhuMysUIS7CJkji\",\"key\":\"key77675-31\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"4nt2a9Gb3ulXUZicpVvWt19C45n\",\"key\":\"key77675-32\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"c8blqKxbsfCUK6xGBdrhQTzyty2\",\"key\":\"key77675-33\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"IhKNTUbrfXeEiVvarTAlAxchNV9\",\"key\":\"key77675-34\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"CWyFuQqtNUxdJWSmicYinAMOEuB\",\"key\":\"key77675-35\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"QaLjo90YE3VINlG0rD5vJK8jlOc\",\"key\":\"key77675-36\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"H9MtAitgyH1US14uFLkAOtEBdK7\",\"key\":\"key77675-37\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"lDpYnWfhbEvDfjuk2dD7pZG9zlY\",\"key\":\"key77675-38\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"s7aAqrRXIrD44eDoZgItSSdW4LJ\",\"key\":\"key77675-39\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"pzYHseOmcZDIsfSHE6pqHMsM370\",\"key\":\"key77675-4\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"XqSea0TGcbhzEZtES4gH5FaA3Xm\",\"key\":\"key77675-40\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"MHAjlUu8i2yhPSpmDLPaenOWiAd\",\"key\":\"key77675-41\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"acN4zvZf58MAQIvDtqDCb3kE15L\",\"key\":\"key77675-42\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"UsOYtgmmcS81KqeuhXuXSxzUGFP\",\"key\":\"key77675-43\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"rl2EAP9iqpZMQGfHYhrNLcOBKN5\",\"key\":\"key77675-44\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"RRZWYBhwh9Jb6Gy1DzD8LNjRr7Q\",\"key\":\"key77675-45\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"zKFvyruqC3k019DLdd4wKX9snpi\",\"key\":\"key77675-46\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"a0Yl4ZQITG18paKtDl7GApPO7m5\",\"key\":\"key77675-47\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"eDNDePK1ZwQSZHmbAXI3bpWnB5g\",\"key\":\"key77675-48\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"jKLo554vSLWMmpCQwPOzOoqxXh7\",\"key\":\"key77675-49\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"A5z0bZ7UuvT6WhY1ps7YQ0Scpt4\",\"key\":\"key77675-5\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"NrMcmMqfsr1JD00a5CpJrhzqpeN\",\"key\":\"key77675-6\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"OqAaQ6p0ewOebyrWM2tmplCN2Cy\",\"key\":\"key77675-7\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"1WyTjrDYBgkLxVbcpfZKnoQRGd8\",\"key\":\"key77675-8\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"qBTCtW9Mjn9aVjClZoFgkVAQqZn\",\"key\":\"key77675-9\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}]}", - "x-ms-client-request-id" : "d1b44e3f-79b1-4c1c-a773-7f31ced06a6d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MzA=;sn=448930", + "x-ms-request-id" : "13791b2b-48e8-4f8f-8d57-568782ba6f96", + "Body" : "{\"items\":[{\"etag\":\"68JzbrzD1uVTGTlH3kYGA2qkvCa\",\"key\":\"key03953-0\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"eT6gWQBpHTUQzP3ay3xNidpgEmb\",\"key\":\"key03953-1\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"F2g6nE7frqtvqmPJseykCyw43pO\",\"key\":\"key03953-10\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"PCVhpmCoxrLXcyycKwFKPHb5XZM\",\"key\":\"key03953-11\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"mHS9xL8ADDMLycJL4MfeNiEiRrE\",\"key\":\"key03953-12\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"e0NOxqhpxAbIqsHtUXaHerDMibd\",\"key\":\"key03953-13\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"Ih7Lu1muvStTIpq1HkObo5tTHYH\",\"key\":\"key03953-14\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"suWeZq0sguk5W0XErIyUdpi0JVP\",\"key\":\"key03953-15\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"ODAMabDV5w8cxUqs51JFuv6bLfl\",\"key\":\"key03953-16\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"C9ROKprf2KOjY6QCIwGKls4k3Ac\",\"key\":\"key03953-17\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"f7hUP2JvcKEn7SUwE71OrzYgr2d\",\"key\":\"key03953-18\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"mHNIWrRXTYyTNlql94q7u6zsA14\",\"key\":\"key03953-19\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"RqDXyM8WP2SeKOGFaA0YHLJqTR6\",\"key\":\"key03953-2\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"1xyPUmZUE5hB14XTlANuXECrl7r\",\"key\":\"key03953-20\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"ZY8wHjYJbX5HDqPPElg7kf84VVs\",\"key\":\"key03953-21\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"El25lGouYDby5QKAPWpbO84TRaW\",\"key\":\"key03953-22\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"lDuGBRMri2JiEQ85MLd971FegYg\",\"key\":\"key03953-23\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"T9V3eQb8gXcilcx92JXavSlYKGl\",\"key\":\"key03953-24\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"ifj4ZorMRRVMldsfFK2ED5PG3b1\",\"key\":\"key03953-25\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"HNObyRGSZgdcdm2bBbyJC2ZbEfE\",\"key\":\"key03953-26\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"QC2fOFuVwbzQgDHpJTa9W3je0pp\",\"key\":\"key03953-27\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"1dmmMBF48gHG1R0EZYs2sVVoMqs\",\"key\":\"key03953-28\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"AkjPn4sK7JufrU0T0QGbg7N4IF8\",\"key\":\"key03953-29\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"Nlbx8tmQYez4cBaDRfCQtIqB3pu\",\"key\":\"key03953-3\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"BktmW393FzcqmJ7mF1veMJXnMsG\",\"key\":\"key03953-30\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"7FSzDUaaet8mVo5b8iGj7LZOa4L\",\"key\":\"key03953-31\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"DlBQK2YI6hvbR9F9h9AICwhdsM9\",\"key\":\"key03953-32\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"t9GXVy1UszZDYdI9ukUANnQCHMW\",\"key\":\"key03953-33\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"9vKDk70A7bbRrDF12SpKJQ17yLn\",\"key\":\"key03953-34\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"wZVw8bIY0P3bUy5CcSxOGc4KRuL\",\"key\":\"key03953-35\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"z1BywtJKNKu3OJiMo15AdnEstje\",\"key\":\"key03953-36\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"SHqYslNedJO2CPMdtakKAB7k6lt\",\"key\":\"key03953-37\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"sk6LhsDTGZWDzmU6xIOTHOcdG7F\",\"key\":\"key03953-38\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"QzbJg6ANYjKLu5t1RnsLVdxzaIL\",\"key\":\"key03953-39\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"lJSDraq5NrfAHboSzlV4Ki9kIwU\",\"key\":\"key03953-4\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"8PMXqYbZOu6HgVD4Pnxb4olv5hG\",\"key\":\"key03953-40\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"relplQqgKHxtuQWHHxepvL5GAvl\",\"key\":\"key03953-41\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"vF4utnv79Eud5dcYzV09ZlUJlJM\",\"key\":\"key03953-42\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"lLfuDs7phuMILkLVccHyqRewvR8\",\"key\":\"key03953-43\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"uvTUhc2JWLWeQuKuZpeGrEkqZ3e\",\"key\":\"key03953-44\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"},{\"etag\":\"n3eCNHiTWRzAnjLOimxpW4cZDiL\",\"key\":\"key03953-45\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"I80H2T8goEeHVNluIR9AOzLfqpX\",\"key\":\"key03953-46\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"cGvbAtxrOHSYxlzZWRSIBQSs0at\",\"key\":\"key03953-47\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"zpHh9NjFmQLclZ0KPWbYH2Iqz6H\",\"key\":\"key03953-48\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"YsVz3R1RhySImlih3852wVTcSnI\",\"key\":\"key03953-49\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"86FfClIX9oZEGMNmgvtYCI4GBnG\",\"key\":\"key03953-5\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"Mq0G38oS3lXjkYAzw95OoVomKQg\",\"key\":\"key03953-6\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"x80TEuOC0jC84Zcve9B1JRW0J5z\",\"key\":\"key03953-7\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"OJow4UA6HGC6mJ5DYIPzquNa6Hx\",\"key\":\"key03953-8\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"jHZgGukBaH5oXxdWqk9Q1PWBvlU\",\"key\":\"key03953-9\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}]}", + "x-ms-client-request-id" : "21793d7e-e5c5-4ea5-ba34-119d42a8deca", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key77675%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key03953%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "92c0bb78-d2c4-43c2-bf2e-b63383a41162", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "34022f88-648a-4b46-ba8f-61cf48f70103", "Content-Type" : "application/json" }, "Response" : { @@ -1594,25 +1594,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6e6e1ee9-0d80-4c3f-ae3d-8a21c7599d7f", + "x-ms-correlation-request-id" : "ca9882b7-8c7f-4b5a-9fcf-d4ff80f92f75", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMzE=;sn=402131", - "x-ms-request-id" : "6e6e1ee9-0d80-4c3f-ae3d-8a21c7599d7f", - "Body" : "{\"items\":[{\"etag\":\"SyCoB4ncMwTxfL07MMaroyjZGKl\",\"key\":\"key77675-0\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"Y4jOSQJ3iWWF0YQFyv3dga4xRoC\",\"key\":\"key77675-1\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"Lg1QYWMdNfFrdpXYcJ60dvEfCE1\",\"key\":\"key77675-10\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"lC7KkdOwhvt0SAlkIkrGVADXaZF\",\"key\":\"key77675-11\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"Q3YFc18LfxrEM3CzglKt5x4tB0i\",\"key\":\"key77675-12\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"rMbortuTLiSyRlEXf47JDCN3iu4\",\"key\":\"key77675-13\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"j2VoD97B0t62M1ORa1n4MSLCdZT\",\"key\":\"key77675-14\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"un0b2OwBsFV53RuFqYrp5379Q8Q\",\"key\":\"key77675-15\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"SXP2l2BpubEbGRcr3rebn2MdQHk\",\"key\":\"key77675-16\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"4DAvKThgWxQXeAmLoFVcmiHkV5e\",\"key\":\"key77675-17\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"AcWOxcQrKbsf6SSHfkBggPxch0K\",\"key\":\"key77675-18\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"mCnhM0ZbYQq3DUXe7iXQ8b1Cucn\",\"key\":\"key77675-19\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"bhRVwUG59W0TnYFi7t0Nw5EUSZb\",\"key\":\"key77675-2\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"IFeUgAqjUcOhhswAPgsteSWYi3z\",\"key\":\"key77675-20\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"wiK765ABT5Dvq7L5U755fuGvZiF\",\"key\":\"key77675-21\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"XcE3dTbBMap6GG5j2cDfzMVFY1t\",\"key\":\"key77675-22\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"CaGQzsMLuybDA8ZMcCdiCK7Pn1h\",\"key\":\"key77675-23\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"OZUziDK8mJNNyEctFKYcJ1wtdJ5\",\"key\":\"key77675-24\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"hkOAn903TwxV9SXq2CvNtqO0537\",\"key\":\"key77675-25\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"wMJBsnf9Vrt6BZvgwCfaOYquTax\",\"key\":\"key77675-26\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"H5gYEq79VlZxHJTTqARQttpOIai\",\"key\":\"key77675-27\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"dxKecYjos2s2WxLhm6ElE6tRrNG\",\"key\":\"key77675-28\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"XDtwx4ByFDNEu1IPu1IDCBUFL1C\",\"key\":\"key77675-29\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"wixV97BoQSTW92GF60PqMJWUB5m\",\"key\":\"key77675-3\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"ALw0TGWzE06mzd3kBB0iWNkL7C7\",\"key\":\"key77675-30\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"patmeBOnDHsJJhuMysUIS7CJkji\",\"key\":\"key77675-31\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"4nt2a9Gb3ulXUZicpVvWt19C45n\",\"key\":\"key77675-32\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"c8blqKxbsfCUK6xGBdrhQTzyty2\",\"key\":\"key77675-33\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"IhKNTUbrfXeEiVvarTAlAxchNV9\",\"key\":\"key77675-34\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"CWyFuQqtNUxdJWSmicYinAMOEuB\",\"key\":\"key77675-35\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"QaLjo90YE3VINlG0rD5vJK8jlOc\",\"key\":\"key77675-36\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"H9MtAitgyH1US14uFLkAOtEBdK7\",\"key\":\"key77675-37\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"lDpYnWfhbEvDfjuk2dD7pZG9zlY\",\"key\":\"key77675-38\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"s7aAqrRXIrD44eDoZgItSSdW4LJ\",\"key\":\"key77675-39\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"pzYHseOmcZDIsfSHE6pqHMsM370\",\"key\":\"key77675-4\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"XqSea0TGcbhzEZtES4gH5FaA3Xm\",\"key\":\"key77675-40\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"MHAjlUu8i2yhPSpmDLPaenOWiAd\",\"key\":\"key77675-41\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"acN4zvZf58MAQIvDtqDCb3kE15L\",\"key\":\"key77675-42\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"UsOYtgmmcS81KqeuhXuXSxzUGFP\",\"key\":\"key77675-43\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"rl2EAP9iqpZMQGfHYhrNLcOBKN5\",\"key\":\"key77675-44\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"RRZWYBhwh9Jb6Gy1DzD8LNjRr7Q\",\"key\":\"key77675-45\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"zKFvyruqC3k019DLdd4wKX9snpi\",\"key\":\"key77675-46\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"a0Yl4ZQITG18paKtDl7GApPO7m5\",\"key\":\"key77675-47\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"eDNDePK1ZwQSZHmbAXI3bpWnB5g\",\"key\":\"key77675-48\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"jKLo554vSLWMmpCQwPOzOoqxXh7\",\"key\":\"key77675-49\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"A5z0bZ7UuvT6WhY1ps7YQ0Scpt4\",\"key\":\"key77675-5\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"NrMcmMqfsr1JD00a5CpJrhzqpeN\",\"key\":\"key77675-6\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"OqAaQ6p0ewOebyrWM2tmplCN2Cy\",\"key\":\"key77675-7\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"1WyTjrDYBgkLxVbcpfZKnoQRGd8\",\"key\":\"key77675-8\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"},{\"etag\":\"qBTCtW9Mjn9aVjClZoFgkVAQqZn\",\"key\":\"key77675-9\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}]}", - "x-ms-client-request-id" : "92c0bb78-d2c4-43c2-bf2e-b63383a41162", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MzA=;sn=448930", + "x-ms-request-id" : "ca9882b7-8c7f-4b5a-9fcf-d4ff80f92f75", + "Body" : "{\"items\":[{\"etag\":\"68JzbrzD1uVTGTlH3kYGA2qkvCa\",\"key\":\"key03953-0\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"eT6gWQBpHTUQzP3ay3xNidpgEmb\",\"key\":\"key03953-1\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"F2g6nE7frqtvqmPJseykCyw43pO\",\"key\":\"key03953-10\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"PCVhpmCoxrLXcyycKwFKPHb5XZM\",\"key\":\"key03953-11\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"mHS9xL8ADDMLycJL4MfeNiEiRrE\",\"key\":\"key03953-12\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"e0NOxqhpxAbIqsHtUXaHerDMibd\",\"key\":\"key03953-13\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"Ih7Lu1muvStTIpq1HkObo5tTHYH\",\"key\":\"key03953-14\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"suWeZq0sguk5W0XErIyUdpi0JVP\",\"key\":\"key03953-15\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"ODAMabDV5w8cxUqs51JFuv6bLfl\",\"key\":\"key03953-16\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"C9ROKprf2KOjY6QCIwGKls4k3Ac\",\"key\":\"key03953-17\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"f7hUP2JvcKEn7SUwE71OrzYgr2d\",\"key\":\"key03953-18\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"mHNIWrRXTYyTNlql94q7u6zsA14\",\"key\":\"key03953-19\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"RqDXyM8WP2SeKOGFaA0YHLJqTR6\",\"key\":\"key03953-2\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"1xyPUmZUE5hB14XTlANuXECrl7r\",\"key\":\"key03953-20\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"ZY8wHjYJbX5HDqPPElg7kf84VVs\",\"key\":\"key03953-21\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"El25lGouYDby5QKAPWpbO84TRaW\",\"key\":\"key03953-22\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"lDuGBRMri2JiEQ85MLd971FegYg\",\"key\":\"key03953-23\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"T9V3eQb8gXcilcx92JXavSlYKGl\",\"key\":\"key03953-24\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"ifj4ZorMRRVMldsfFK2ED5PG3b1\",\"key\":\"key03953-25\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"HNObyRGSZgdcdm2bBbyJC2ZbEfE\",\"key\":\"key03953-26\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"QC2fOFuVwbzQgDHpJTa9W3je0pp\",\"key\":\"key03953-27\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"1dmmMBF48gHG1R0EZYs2sVVoMqs\",\"key\":\"key03953-28\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"AkjPn4sK7JufrU0T0QGbg7N4IF8\",\"key\":\"key03953-29\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"Nlbx8tmQYez4cBaDRfCQtIqB3pu\",\"key\":\"key03953-3\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"BktmW393FzcqmJ7mF1veMJXnMsG\",\"key\":\"key03953-30\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"7FSzDUaaet8mVo5b8iGj7LZOa4L\",\"key\":\"key03953-31\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"DlBQK2YI6hvbR9F9h9AICwhdsM9\",\"key\":\"key03953-32\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"t9GXVy1UszZDYdI9ukUANnQCHMW\",\"key\":\"key03953-33\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"9vKDk70A7bbRrDF12SpKJQ17yLn\",\"key\":\"key03953-34\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"wZVw8bIY0P3bUy5CcSxOGc4KRuL\",\"key\":\"key03953-35\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"z1BywtJKNKu3OJiMo15AdnEstje\",\"key\":\"key03953-36\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"SHqYslNedJO2CPMdtakKAB7k6lt\",\"key\":\"key03953-37\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"sk6LhsDTGZWDzmU6xIOTHOcdG7F\",\"key\":\"key03953-38\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"QzbJg6ANYjKLu5t1RnsLVdxzaIL\",\"key\":\"key03953-39\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"lJSDraq5NrfAHboSzlV4Ki9kIwU\",\"key\":\"key03953-4\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"8PMXqYbZOu6HgVD4Pnxb4olv5hG\",\"key\":\"key03953-40\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"relplQqgKHxtuQWHHxepvL5GAvl\",\"key\":\"key03953-41\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"vF4utnv79Eud5dcYzV09ZlUJlJM\",\"key\":\"key03953-42\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"lLfuDs7phuMILkLVccHyqRewvR8\",\"key\":\"key03953-43\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"uvTUhc2JWLWeQuKuZpeGrEkqZ3e\",\"key\":\"key03953-44\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"},{\"etag\":\"n3eCNHiTWRzAnjLOimxpW4cZDiL\",\"key\":\"key03953-45\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"I80H2T8goEeHVNluIR9AOzLfqpX\",\"key\":\"key03953-46\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"cGvbAtxrOHSYxlzZWRSIBQSs0at\",\"key\":\"key03953-47\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"zpHh9NjFmQLclZ0KPWbYH2Iqz6H\",\"key\":\"key03953-48\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"YsVz3R1RhySImlih3852wVTcSnI\",\"key\":\"key03953-49\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"86FfClIX9oZEGMNmgvtYCI4GBnG\",\"key\":\"key03953-5\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"Mq0G38oS3lXjkYAzw95OoVomKQg\",\"key\":\"key03953-6\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"x80TEuOC0jC84Zcve9B1JRW0J5z\",\"key\":\"key03953-7\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"OJow4UA6HGC6mJ5DYIPzquNa6Hx\",\"key\":\"key03953-8\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"},{\"etag\":\"jHZgGukBaH5oXxdWqk9Q1PWBvlU\",\"key\":\"key03953-9\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}]}", + "x-ms-client-request-id" : "34022f88-648a-4b46-ba8f-61cf48f70103", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-0?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-1?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f03cf182-3433-423c-88ee-629845a93e2e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ede2a8a3-3c8e-4737-b03d-69b6d232beac", "Content-Type" : "application/json" }, "Response" : { @@ -1621,29 +1621,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2b674f20-c35c-47d1-893b-680b0a75cd3b", + "x-ms-correlation-request-id" : "6b7f6eb6-2387-4cb3-994b-dfc31f86cb54", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"SyCoB4ncMwTxfL07MMaroyjZGKl\"", + "ETag" : "\"eT6gWQBpHTUQzP3ay3xNidpgEmb\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMzI=;sn=402132", - "x-ms-request-id" : "2b674f20-c35c-47d1-893b-680b0a75cd3b", - "Body" : "{\"etag\":\"SyCoB4ncMwTxfL07MMaroyjZGKl\",\"key\":\"key77675-0\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "f03cf182-3433-423c-88ee-629845a93e2e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MzE=;sn=448931", + "x-ms-request-id" : "6b7f6eb6-2387-4cb3-994b-dfc31f86cb54", + "Body" : "{\"etag\":\"eT6gWQBpHTUQzP3ay3xNidpgEmb\",\"key\":\"key03953-1\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "ede2a8a3-3c8e-4737-b03d-69b6d232beac", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-11?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-0?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5e4b1954-61df-4260-8194-adc2d424da6e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5dae8eca-94c5-480a-bf04-ce601650dc8f", "Content-Type" : "application/json" }, "Response" : { @@ -1652,29 +1652,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b2273f55-b978-4a80-936c-881a85aed7c6", + "x-ms-correlation-request-id" : "2c81b1c1-535b-4cc3-99d0-1a9e48784865", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"lC7KkdOwhvt0SAlkIkrGVADXaZF\"", + "ETag" : "\"68JzbrzD1uVTGTlH3kYGA2qkvCa\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMzQ=;sn=402134", - "x-ms-request-id" : "b2273f55-b978-4a80-936c-881a85aed7c6", - "Body" : "{\"etag\":\"lC7KkdOwhvt0SAlkIkrGVADXaZF\",\"key\":\"key77675-11\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "5e4b1954-61df-4260-8194-adc2d424da6e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MzI=;sn=448932", + "x-ms-request-id" : "2c81b1c1-535b-4cc3-99d0-1a9e48784865", + "Body" : "{\"etag\":\"68JzbrzD1uVTGTlH3kYGA2qkvCa\",\"key\":\"key03953-0\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "5dae8eca-94c5-480a-bf04-ce601650dc8f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-12?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-11?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6153346e-6258-4bc9-a85a-1343c3fe5385", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "54e06732-fea0-4e87-ae83-5d65f56e47ef", "Content-Type" : "application/json" }, "Response" : { @@ -1683,29 +1683,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "fe951553-a387-4273-8991-bfd22df3fd3d", + "x-ms-correlation-request-id" : "0270ea99-5eb8-40d7-8675-fd65d01aa20f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Q3YFc18LfxrEM3CzglKt5x4tB0i\"", + "ETag" : "\"PCVhpmCoxrLXcyycKwFKPHb5XZM\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMzU=;sn=402135", - "x-ms-request-id" : "fe951553-a387-4273-8991-bfd22df3fd3d", - "Body" : "{\"etag\":\"Q3YFc18LfxrEM3CzglKt5x4tB0i\",\"key\":\"key77675-12\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "6153346e-6258-4bc9-a85a-1343c3fe5385", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MzM=;sn=448933", + "x-ms-request-id" : "0270ea99-5eb8-40d7-8675-fd65d01aa20f", + "Body" : "{\"etag\":\"PCVhpmCoxrLXcyycKwFKPHb5XZM\",\"key\":\"key03953-11\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "54e06732-fea0-4e87-ae83-5d65f56e47ef", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-10?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-17?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "fb4cad21-6135-4290-9e3e-d78cfd8f18ba", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "03ec623f-2dfe-466b-b881-54a88eb0d2f9", "Content-Type" : "application/json" }, "Response" : { @@ -1714,29 +1714,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "338a5faf-26f1-4636-b434-eea30921220d", + "x-ms-correlation-request-id" : "f52aec1c-38ee-4e2a-85fe-910bd8da47ad", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Lg1QYWMdNfFrdpXYcJ60dvEfCE1\"", + "ETag" : "\"C9ROKprf2KOjY6QCIwGKls4k3Ac\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMzY=;sn=402136", - "x-ms-request-id" : "338a5faf-26f1-4636-b434-eea30921220d", - "Body" : "{\"etag\":\"Lg1QYWMdNfFrdpXYcJ60dvEfCE1\",\"key\":\"key77675-10\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "fb4cad21-6135-4290-9e3e-d78cfd8f18ba", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MzQ=;sn=448934", + "x-ms-request-id" : "f52aec1c-38ee-4e2a-85fe-910bd8da47ad", + "Body" : "{\"etag\":\"C9ROKprf2KOjY6QCIwGKls4k3Ac\",\"key\":\"key03953-17\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "03ec623f-2dfe-466b-b881-54a88eb0d2f9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-15?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-10?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0b19f1a2-a7c8-47a4-80dd-58430e7c7a09", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ef309290-7e8c-4ac2-a835-0fad16a0c5ee", "Content-Type" : "application/json" }, "Response" : { @@ -1745,29 +1745,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a388f2fd-d18a-48f1-9da9-1773f16a4fa8", + "x-ms-correlation-request-id" : "d9c2573a-764a-4b15-a2b2-b9dd36646ec2", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"un0b2OwBsFV53RuFqYrp5379Q8Q\"", + "ETag" : "\"F2g6nE7frqtvqmPJseykCyw43pO\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMzc=;sn=402137", - "x-ms-request-id" : "a388f2fd-d18a-48f1-9da9-1773f16a4fa8", - "Body" : "{\"etag\":\"un0b2OwBsFV53RuFqYrp5379Q8Q\",\"key\":\"key77675-15\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "0b19f1a2-a7c8-47a4-80dd-58430e7c7a09", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MzU=;sn=448935", + "x-ms-request-id" : "d9c2573a-764a-4b15-a2b2-b9dd36646ec2", + "Body" : "{\"etag\":\"F2g6nE7frqtvqmPJseykCyw43pO\",\"key\":\"key03953-10\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "ef309290-7e8c-4ac2-a835-0fad16a0c5ee", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-1?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-13?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "365a0c8c-24f1-45c9-b569-955e77083cca", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7285c57e-95ed-4bdf-94bb-c55386dc9210", "Content-Type" : "application/json" }, "Response" : { @@ -1776,29 +1776,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "91afb26b-dde2-4284-92fa-8654f7b91e7e", + "x-ms-correlation-request-id" : "5d17fb0b-b16a-46e1-a026-c611691b7409", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Y4jOSQJ3iWWF0YQFyv3dga4xRoC\"", + "ETag" : "\"e0NOxqhpxAbIqsHtUXaHerDMibd\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMzM=;sn=402133", - "x-ms-request-id" : "91afb26b-dde2-4284-92fa-8654f7b91e7e", - "Body" : "{\"etag\":\"Y4jOSQJ3iWWF0YQFyv3dga4xRoC\",\"key\":\"key77675-1\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "365a0c8c-24f1-45c9-b569-955e77083cca", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5MzY=;sn=448936", + "x-ms-request-id" : "5d17fb0b-b16a-46e1-a026-c611691b7409", + "Body" : "{\"etag\":\"e0NOxqhpxAbIqsHtUXaHerDMibd\",\"key\":\"key03953-13\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "7285c57e-95ed-4bdf-94bb-c55386dc9210", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-14?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-14?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "aed9333c-aee9-40e6-b140-0ae4b803ab5b", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "01e44ae1-4c2b-4531-ae2f-b6e27ccc9ecb", "Content-Type" : "application/json" }, "Response" : { @@ -1807,29 +1807,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7cf78f78-83c4-463a-84ca-3f8b03dcb6f2", + "x-ms-correlation-request-id" : "9dd753f2-0037-46aa-8eb7-47b7e89f31c0", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"j2VoD97B0t62M1ORa1n4MSLCdZT\"", + "ETag" : "\"Ih7Lu1muvStTIpq1HkObo5tTHYH\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMzg=;sn=402138", - "x-ms-request-id" : "7cf78f78-83c4-463a-84ca-3f8b03dcb6f2", - "Body" : "{\"etag\":\"j2VoD97B0t62M1ORa1n4MSLCdZT\",\"key\":\"key77675-14\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "aed9333c-aee9-40e6-b140-0ae4b803ab5b", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5Mzc=;sn=448937", + "x-ms-request-id" : "9dd753f2-0037-46aa-8eb7-47b7e89f31c0", + "Body" : "{\"etag\":\"Ih7Lu1muvStTIpq1HkObo5tTHYH\",\"key\":\"key03953-14\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "01e44ae1-4c2b-4531-ae2f-b6e27ccc9ecb", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-13?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-15?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2d20b1ed-a4b9-4010-bc21-58e7e01ed717", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d5153e70-b510-41c0-ac9d-466306941e0c", "Content-Type" : "application/json" }, "Response" : { @@ -1838,29 +1838,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ea0509d1-e157-4baa-82b8-334d116fc82a", + "x-ms-correlation-request-id" : "3ac97ffd-76cd-47df-93a7-3b73eddc2e4f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"rMbortuTLiSyRlEXf47JDCN3iu4\"", + "ETag" : "\"suWeZq0sguk5W0XErIyUdpi0JVP\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxMzk=;sn=402139", - "x-ms-request-id" : "ea0509d1-e157-4baa-82b8-334d116fc82a", - "Body" : "{\"etag\":\"rMbortuTLiSyRlEXf47JDCN3iu4\",\"key\":\"key77675-13\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "2d20b1ed-a4b9-4010-bc21-58e7e01ed717", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5Mzk=;sn=448939", + "x-ms-request-id" : "3ac97ffd-76cd-47df-93a7-3b73eddc2e4f", + "Body" : "{\"etag\":\"suWeZq0sguk5W0XErIyUdpi0JVP\",\"key\":\"key03953-15\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "d5153e70-b510-41c0-ac9d-466306941e0c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-16?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-18?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "113082f2-6176-4ce9-b7f9-7b60707771cc", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6bac3cfa-8af6-45a6-a9e4-ca8fa3276cfe", "Content-Type" : "application/json" }, "Response" : { @@ -1869,29 +1869,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1de64244-7be8-40cd-963a-90d93057baf6", + "x-ms-correlation-request-id" : "2e90eba2-7c17-462a-85b2-a08668dc9a3c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"SXP2l2BpubEbGRcr3rebn2MdQHk\"", + "ETag" : "\"f7hUP2JvcKEn7SUwE71OrzYgr2d\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNDA=;sn=402140", - "x-ms-request-id" : "1de64244-7be8-40cd-963a-90d93057baf6", - "Body" : "{\"etag\":\"SXP2l2BpubEbGRcr3rebn2MdQHk\",\"key\":\"key77675-16\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "113082f2-6176-4ce9-b7f9-7b60707771cc", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NDE=;sn=448941", + "x-ms-request-id" : "2e90eba2-7c17-462a-85b2-a08668dc9a3c", + "Body" : "{\"etag\":\"f7hUP2JvcKEn7SUwE71OrzYgr2d\",\"key\":\"key03953-18\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "6bac3cfa-8af6-45a6-a9e4-ca8fa3276cfe", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-19?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-19?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3cbd2246-a0d8-49a5-b11d-67b7ea801c97", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7f8f9207-43ad-4748-b553-6507e99ae44b", "Content-Type" : "application/json" }, "Response" : { @@ -1900,29 +1900,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "946b6752-c10b-45ae-b3e6-0e7a00ae1564", + "x-ms-correlation-request-id" : "21c65b29-5928-4468-99a1-ba96773c3caf", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"mCnhM0ZbYQq3DUXe7iXQ8b1Cucn\"", + "ETag" : "\"mHNIWrRXTYyTNlql94q7u6zsA14\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNDE=;sn=402141", - "x-ms-request-id" : "946b6752-c10b-45ae-b3e6-0e7a00ae1564", - "Body" : "{\"etag\":\"mCnhM0ZbYQq3DUXe7iXQ8b1Cucn\",\"key\":\"key77675-19\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "3cbd2246-a0d8-49a5-b11d-67b7ea801c97", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NDI=;sn=448942", + "x-ms-request-id" : "21c65b29-5928-4468-99a1-ba96773c3caf", + "Body" : "{\"etag\":\"mHNIWrRXTYyTNlql94q7u6zsA14\",\"key\":\"key03953-19\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "7f8f9207-43ad-4748-b553-6507e99ae44b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-17?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-22?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0e71a934-97b7-4e66-917d-ce83fa70940c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f3802df8-7c71-48fd-974c-889bfbb7add8", "Content-Type" : "application/json" }, "Response" : { @@ -1931,29 +1931,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7834de72-f6da-455f-92a5-7088a320bcfc", + "x-ms-correlation-request-id" : "2aff989e-a026-4708-8851-4a3e420b6c66", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"4DAvKThgWxQXeAmLoFVcmiHkV5e\"", + "ETag" : "\"El25lGouYDby5QKAPWpbO84TRaW\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNDI=;sn=402142", - "x-ms-request-id" : "7834de72-f6da-455f-92a5-7088a320bcfc", - "Body" : "{\"etag\":\"4DAvKThgWxQXeAmLoFVcmiHkV5e\",\"key\":\"key77675-17\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "0e71a934-97b7-4e66-917d-ce83fa70940c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NDQ=;sn=448944", + "x-ms-request-id" : "2aff989e-a026-4708-8851-4a3e420b6c66", + "Body" : "{\"etag\":\"El25lGouYDby5QKAPWpbO84TRaW\",\"key\":\"key03953-22\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "f3802df8-7c71-48fd-974c-889bfbb7add8", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-2?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-20?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b9ff7480-2f31-43dc-be64-ee7fc39cf1c2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5082c3bb-1849-4763-90f8-47663725abad", "Content-Type" : "application/json" }, "Response" : { @@ -1962,29 +1962,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "8c5fe723-f62d-479f-8fc5-a88fc2d8944c", + "x-ms-correlation-request-id" : "8f6e117f-52b5-44b6-b164-24072edcc150", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"bhRVwUG59W0TnYFi7t0Nw5EUSZb\"", + "ETag" : "\"1xyPUmZUE5hB14XTlANuXECrl7r\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNDM=;sn=402143", - "x-ms-request-id" : "8c5fe723-f62d-479f-8fc5-a88fc2d8944c", - "Body" : "{\"etag\":\"bhRVwUG59W0TnYFi7t0Nw5EUSZb\",\"key\":\"key77675-2\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "b9ff7480-2f31-43dc-be64-ee7fc39cf1c2", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NDM=;sn=448943", + "x-ms-request-id" : "8f6e117f-52b5-44b6-b164-24072edcc150", + "Body" : "{\"etag\":\"1xyPUmZUE5hB14XTlANuXECrl7r\",\"key\":\"key03953-20\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "5082c3bb-1849-4763-90f8-47663725abad", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-24?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-2?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0696ab4d-5a61-4d46-882b-9603ce7379cd", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6acea097-1059-4498-b13c-b6844ec80527", "Content-Type" : "application/json" }, "Response" : { @@ -1993,29 +1993,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "45d6c814-61cd-406f-ae90-26e70d2c82ba", + "x-ms-correlation-request-id" : "7419f90e-ca19-417e-a640-043179ae44d3", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"OZUziDK8mJNNyEctFKYcJ1wtdJ5\"", + "ETag" : "\"RqDXyM8WP2SeKOGFaA0YHLJqTR6\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNDQ=;sn=402144", - "x-ms-request-id" : "45d6c814-61cd-406f-ae90-26e70d2c82ba", - "Body" : "{\"etag\":\"OZUziDK8mJNNyEctFKYcJ1wtdJ5\",\"key\":\"key77675-24\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "0696ab4d-5a61-4d46-882b-9603ce7379cd", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NDU=;sn=448945", + "x-ms-request-id" : "7419f90e-ca19-417e-a640-043179ae44d3", + "Body" : "{\"etag\":\"RqDXyM8WP2SeKOGFaA0YHLJqTR6\",\"key\":\"key03953-2\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "6acea097-1059-4498-b13c-b6844ec80527", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-18?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-25?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "857881c8-b07a-4f21-a12c-2546a232e758", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b56dd030-6084-4761-aa9f-a6bb2699cafb", "Content-Type" : "application/json" }, "Response" : { @@ -2024,29 +2024,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1316678c-5547-4229-a6d2-09a3ad6c12d2", + "x-ms-correlation-request-id" : "cfd476ba-6e37-443a-bb25-ef1c889cb97b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"AcWOxcQrKbsf6SSHfkBggPxch0K\"", + "ETag" : "\"ifj4ZorMRRVMldsfFK2ED5PG3b1\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNDU=;sn=402145", - "x-ms-request-id" : "1316678c-5547-4229-a6d2-09a3ad6c12d2", - "Body" : "{\"etag\":\"AcWOxcQrKbsf6SSHfkBggPxch0K\",\"key\":\"key77675-18\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "857881c8-b07a-4f21-a12c-2546a232e758", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NDY=;sn=448946", + "x-ms-request-id" : "cfd476ba-6e37-443a-bb25-ef1c889cb97b", + "Body" : "{\"etag\":\"ifj4ZorMRRVMldsfFK2ED5PG3b1\",\"key\":\"key03953-25\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "b56dd030-6084-4761-aa9f-a6bb2699cafb", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-20?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-21?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "dcb38c30-3ec7-42ef-9562-56e2d79e38b6", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bb0a82ee-1fe1-4f94-85a6-cb4f316335e3", "Content-Type" : "application/json" }, "Response" : { @@ -2055,29 +2055,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c3e04b2d-7db1-4749-8ec4-22270eb77122", + "x-ms-correlation-request-id" : "eb97c5b2-f65f-4b38-8620-2811290c22b6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"IFeUgAqjUcOhhswAPgsteSWYi3z\"", + "ETag" : "\"ZY8wHjYJbX5HDqPPElg7kf84VVs\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNDY=;sn=402146", - "x-ms-request-id" : "c3e04b2d-7db1-4749-8ec4-22270eb77122", - "Body" : "{\"etag\":\"IFeUgAqjUcOhhswAPgsteSWYi3z\",\"key\":\"key77675-20\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "dcb38c30-3ec7-42ef-9562-56e2d79e38b6", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NDc=;sn=448947", + "x-ms-request-id" : "eb97c5b2-f65f-4b38-8620-2811290c22b6", + "Body" : "{\"etag\":\"ZY8wHjYJbX5HDqPPElg7kf84VVs\",\"key\":\"key03953-21\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "bb0a82ee-1fe1-4f94-85a6-cb4f316335e3", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-25?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-23?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "80d26670-3d31-4e4d-8408-4ea0a6162ea5", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8cfbf797-3e8d-476c-97a9-18ff896661de", "Content-Type" : "application/json" }, "Response" : { @@ -2086,29 +2086,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "38d6fc74-33ed-4be2-aafd-39914d54102b", + "x-ms-correlation-request-id" : "1f324fde-3749-45a6-a78e-97f7f7312ea7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"hkOAn903TwxV9SXq2CvNtqO0537\"", + "ETag" : "\"lDuGBRMri2JiEQ85MLd971FegYg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNDc=;sn=402147", - "x-ms-request-id" : "38d6fc74-33ed-4be2-aafd-39914d54102b", - "Body" : "{\"etag\":\"hkOAn903TwxV9SXq2CvNtqO0537\",\"key\":\"key77675-25\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "80d26670-3d31-4e4d-8408-4ea0a6162ea5", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NDg=;sn=448948", + "x-ms-request-id" : "1f324fde-3749-45a6-a78e-97f7f7312ea7", + "Body" : "{\"etag\":\"lDuGBRMri2JiEQ85MLd971FegYg\",\"key\":\"key03953-23\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "8cfbf797-3e8d-476c-97a9-18ff896661de", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-21?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-27?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d6fdf7f0-3ddc-41b8-9d15-07c0ee228e20", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3beb727d-2b0d-41af-bce8-c6af39624dcd", "Content-Type" : "application/json" }, "Response" : { @@ -2117,29 +2117,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "27f23329-40f7-444a-bac8-28d351460690", + "x-ms-correlation-request-id" : "5889141d-0bce-4f91-84ad-1a05d2eab2a7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"wiK765ABT5Dvq7L5U755fuGvZiF\"", + "ETag" : "\"QC2fOFuVwbzQgDHpJTa9W3je0pp\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNDg=;sn=402148", - "x-ms-request-id" : "27f23329-40f7-444a-bac8-28d351460690", - "Body" : "{\"etag\":\"wiK765ABT5Dvq7L5U755fuGvZiF\",\"key\":\"key77675-21\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "d6fdf7f0-3ddc-41b8-9d15-07c0ee228e20", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NDk=;sn=448949", + "x-ms-request-id" : "5889141d-0bce-4f91-84ad-1a05d2eab2a7", + "Body" : "{\"etag\":\"QC2fOFuVwbzQgDHpJTa9W3je0pp\",\"key\":\"key03953-27\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "3beb727d-2b0d-41af-bce8-c6af39624dcd", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-22?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-31?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2b60bfa6-6e24-48d5-8ea7-c87d0e5c9097", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4a5c2935-0c2a-42b6-afad-f7cd2c2e9eb1", "Content-Type" : "application/json" }, "Response" : { @@ -2148,29 +2148,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9a0b263c-fb98-49d6-afda-4e6a3ec9c697", + "x-ms-correlation-request-id" : "343f9045-9eab-48f5-86b5-fa26f6e0f58f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"XcE3dTbBMap6GG5j2cDfzMVFY1t\"", + "ETag" : "\"7FSzDUaaet8mVo5b8iGj7LZOa4L\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNDk=;sn=402149", - "x-ms-request-id" : "9a0b263c-fb98-49d6-afda-4e6a3ec9c697", - "Body" : "{\"etag\":\"XcE3dTbBMap6GG5j2cDfzMVFY1t\",\"key\":\"key77675-22\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "2b60bfa6-6e24-48d5-8ea7-c87d0e5c9097", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NTA=;sn=448950", + "x-ms-request-id" : "343f9045-9eab-48f5-86b5-fa26f6e0f58f", + "Body" : "{\"etag\":\"7FSzDUaaet8mVo5b8iGj7LZOa4L\",\"key\":\"key03953-31\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "4a5c2935-0c2a-42b6-afad-f7cd2c2e9eb1", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-23?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-24?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "64514301-527a-4e95-94ef-6a94d29cc0ce", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fa5d11ed-c890-401d-b75e-ce3dbe290dd1", "Content-Type" : "application/json" }, "Response" : { @@ -2179,29 +2179,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ed982886-9106-46c1-b577-7d7c35000110", + "x-ms-correlation-request-id" : "f2a05530-8912-48c4-b285-07a711ca7960", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"CaGQzsMLuybDA8ZMcCdiCK7Pn1h\"", + "ETag" : "\"T9V3eQb8gXcilcx92JXavSlYKGl\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNTE=;sn=402151", - "x-ms-request-id" : "ed982886-9106-46c1-b577-7d7c35000110", - "Body" : "{\"etag\":\"CaGQzsMLuybDA8ZMcCdiCK7Pn1h\",\"key\":\"key77675-23\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "64514301-527a-4e95-94ef-6a94d29cc0ce", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NTE=;sn=448951", + "x-ms-request-id" : "f2a05530-8912-48c4-b285-07a711ca7960", + "Body" : "{\"etag\":\"T9V3eQb8gXcilcx92JXavSlYKGl\",\"key\":\"key03953-24\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "fa5d11ed-c890-401d-b75e-ce3dbe290dd1", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-3?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-3?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "05410a1d-10f8-4078-9a7f-83c2d6551736", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "74b893f4-733f-4b9b-ae2e-0aabb90018b2", "Content-Type" : "application/json" }, "Response" : { @@ -2210,29 +2210,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a8083e0c-7436-4073-8a62-f78bea828a23", + "x-ms-correlation-request-id" : "74b296b9-f603-49c4-bc95-ea16f9f3c743", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"wixV97BoQSTW92GF60PqMJWUB5m\"", + "ETag" : "\"Nlbx8tmQYez4cBaDRfCQtIqB3pu\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNTA=;sn=402150", - "x-ms-request-id" : "a8083e0c-7436-4073-8a62-f78bea828a23", - "Body" : "{\"etag\":\"wixV97BoQSTW92GF60PqMJWUB5m\",\"key\":\"key77675-3\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "05410a1d-10f8-4078-9a7f-83c2d6551736", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NTI=;sn=448952", + "x-ms-request-id" : "74b296b9-f603-49c4-bc95-ea16f9f3c743", + "Body" : "{\"etag\":\"Nlbx8tmQYez4cBaDRfCQtIqB3pu\",\"key\":\"key03953-3\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "74b893f4-733f-4b9b-ae2e-0aabb90018b2", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-26?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-28?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6cd58e2f-2a98-40d7-b3b8-886ec8dfe84c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ce0c7dea-77b8-446b-bfe3-9117c04904e4", "Content-Type" : "application/json" }, "Response" : { @@ -2241,29 +2241,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a25cb7c3-a15a-4a2d-8a3d-1c0a6b36a177", + "x-ms-correlation-request-id" : "42945594-d76b-4c49-b02d-30d262463ef4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"wMJBsnf9Vrt6BZvgwCfaOYquTax\"", + "ETag" : "\"1dmmMBF48gHG1R0EZYs2sVVoMqs\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNTI=;sn=402152", - "x-ms-request-id" : "a25cb7c3-a15a-4a2d-8a3d-1c0a6b36a177", - "Body" : "{\"etag\":\"wMJBsnf9Vrt6BZvgwCfaOYquTax\",\"key\":\"key77675-26\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "6cd58e2f-2a98-40d7-b3b8-886ec8dfe84c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NTQ=;sn=448954", + "x-ms-request-id" : "42945594-d76b-4c49-b02d-30d262463ef4", + "Body" : "{\"etag\":\"1dmmMBF48gHG1R0EZYs2sVVoMqs\",\"key\":\"key03953-28\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "ce0c7dea-77b8-446b-bfe3-9117c04904e4", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-32?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-33?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "bf499f84-e1cb-4975-8024-46d029d89ae7", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8e9836e7-1aad-488d-ae27-41637511a8d3", "Content-Type" : "application/json" }, "Response" : { @@ -2272,29 +2272,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "781d78f0-8674-4601-a118-6f53b9b836ad", + "x-ms-correlation-request-id" : "55508e12-c7d0-4c24-a88f-bb2e22fa70d9", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"4nt2a9Gb3ulXUZicpVvWt19C45n\"", + "ETag" : "\"t9GXVy1UszZDYdI9ukUANnQCHMW\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNTM=;sn=402153", - "x-ms-request-id" : "781d78f0-8674-4601-a118-6f53b9b836ad", - "Body" : "{\"etag\":\"4nt2a9Gb3ulXUZicpVvWt19C45n\",\"key\":\"key77675-32\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "bf499f84-e1cb-4975-8024-46d029d89ae7", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NTM=;sn=448953", + "x-ms-request-id" : "55508e12-c7d0-4c24-a88f-bb2e22fa70d9", + "Body" : "{\"etag\":\"t9GXVy1UszZDYdI9ukUANnQCHMW\",\"key\":\"key03953-33\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "8e9836e7-1aad-488d-ae27-41637511a8d3", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-28?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-12?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "30625372-c08c-41a9-810d-bd0baa42ae4c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4f627849-1c8f-4d85-96e4-eb07d452dd57", "Content-Type" : "application/json" }, "Response" : { @@ -2303,29 +2303,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "8fd8adca-82de-4d7d-bdf4-3f6ccc70135f", + "x-ms-correlation-request-id" : "3fdcffcc-f4d3-4697-a669-62c51820703f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"dxKecYjos2s2WxLhm6ElE6tRrNG\"", + "ETag" : "\"mHS9xL8ADDMLycJL4MfeNiEiRrE\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNTQ=;sn=402154", - "x-ms-request-id" : "8fd8adca-82de-4d7d-bdf4-3f6ccc70135f", - "Body" : "{\"etag\":\"dxKecYjos2s2WxLhm6ElE6tRrNG\",\"key\":\"key77675-28\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "30625372-c08c-41a9-810d-bd0baa42ae4c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NDA=;sn=448940", + "x-ms-request-id" : "3fdcffcc-f4d3-4697-a669-62c51820703f", + "Body" : "{\"etag\":\"mHS9xL8ADDMLycJL4MfeNiEiRrE\",\"key\":\"key03953-12\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "4f627849-1c8f-4d85-96e4-eb07d452dd57", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-27?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-16?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "db3d6482-7bc8-4747-855c-886d0d2ca1a3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a72ecb33-5b72-41fa-94a1-f6fbedb25b91", "Content-Type" : "application/json" }, "Response" : { @@ -2334,29 +2334,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b478b41d-141e-4c79-a488-b7f009d9920d", + "x-ms-correlation-request-id" : "6f4e5744-f8be-4e20-8f67-ade287d4b3cf", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"H5gYEq79VlZxHJTTqARQttpOIai\"", + "ETag" : "\"ODAMabDV5w8cxUqs51JFuv6bLfl\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNTU=;sn=402155", - "x-ms-request-id" : "b478b41d-141e-4c79-a488-b7f009d9920d", - "Body" : "{\"etag\":\"H5gYEq79VlZxHJTTqARQttpOIai\",\"key\":\"key77675-27\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "db3d6482-7bc8-4747-855c-886d0d2ca1a3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5Mzg=;sn=448938", + "x-ms-request-id" : "6f4e5744-f8be-4e20-8f67-ade287d4b3cf", + "Body" : "{\"etag\":\"ODAMabDV5w8cxUqs51JFuv6bLfl\",\"key\":\"key03953-16\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "a72ecb33-5b72-41fa-94a1-f6fbedb25b91", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-29?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-29?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0edc3771-2d61-4bf9-97e1-475883042899", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b7231165-7ba6-4212-8063-0d08659b16e2", "Content-Type" : "application/json" }, "Response" : { @@ -2365,29 +2365,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "32d8dfc0-303b-4c96-9349-7eaee8f500c4", + "x-ms-correlation-request-id" : "a1b412b9-74da-4a56-8c86-79b27ec7d010", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"XDtwx4ByFDNEu1IPu1IDCBUFL1C\"", + "ETag" : "\"AkjPn4sK7JufrU0T0QGbg7N4IF8\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNTc=;sn=402157", - "x-ms-request-id" : "32d8dfc0-303b-4c96-9349-7eaee8f500c4", - "Body" : "{\"etag\":\"XDtwx4ByFDNEu1IPu1IDCBUFL1C\",\"key\":\"key77675-29\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "0edc3771-2d61-4bf9-97e1-475883042899", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NTU=;sn=448955", + "x-ms-request-id" : "a1b412b9-74da-4a56-8c86-79b27ec7d010", + "Body" : "{\"etag\":\"AkjPn4sK7JufrU0T0QGbg7N4IF8\",\"key\":\"key03953-29\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "b7231165-7ba6-4212-8063-0d08659b16e2", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-34?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-34?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7a0444f9-9700-4bb9-a265-a905a7609ae3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1b05ae65-ceec-4231-bd92-0bc59d6eb86e", "Content-Type" : "application/json" }, "Response" : { @@ -2396,29 +2396,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7102c0e5-8621-445f-ad42-f6412a92242c", + "x-ms-correlation-request-id" : "9b817907-97d3-4b3f-8faf-9008c125840b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"IhKNTUbrfXeEiVvarTAlAxchNV9\"", + "ETag" : "\"9vKDk70A7bbRrDF12SpKJQ17yLn\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNTg=;sn=402158", - "x-ms-request-id" : "7102c0e5-8621-445f-ad42-f6412a92242c", - "Body" : "{\"etag\":\"IhKNTUbrfXeEiVvarTAlAxchNV9\",\"key\":\"key77675-34\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "7a0444f9-9700-4bb9-a265-a905a7609ae3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NTY=;sn=448956", + "x-ms-request-id" : "9b817907-97d3-4b3f-8faf-9008c125840b", + "Body" : "{\"etag\":\"9vKDk70A7bbRrDF12SpKJQ17yLn\",\"key\":\"key03953-34\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "1b05ae65-ceec-4231-bd92-0bc59d6eb86e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-33?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-26?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f794a31f-a08b-46ff-b966-7c875c3696b1", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8045b7ce-6ec3-4d1d-b70e-7beb3c8e18e7", "Content-Type" : "application/json" }, "Response" : { @@ -2427,29 +2427,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f9b2178a-19e4-4d3f-9e13-8091084f0163", + "x-ms-correlation-request-id" : "262279b6-5c38-4692-a958-9dec0472d7eb", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"c8blqKxbsfCUK6xGBdrhQTzyty2\"", + "ETag" : "\"HNObyRGSZgdcdm2bBbyJC2ZbEfE\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNTY=;sn=402156", - "x-ms-request-id" : "f9b2178a-19e4-4d3f-9e13-8091084f0163", - "Body" : "{\"etag\":\"c8blqKxbsfCUK6xGBdrhQTzyty2\",\"key\":\"key77675-33\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "f794a31f-a08b-46ff-b966-7c875c3696b1", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NTc=;sn=448957", + "x-ms-request-id" : "262279b6-5c38-4692-a958-9dec0472d7eb", + "Body" : "{\"etag\":\"HNObyRGSZgdcdm2bBbyJC2ZbEfE\",\"key\":\"key03953-26\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "8045b7ce-6ec3-4d1d-b70e-7beb3c8e18e7", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-35?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-38?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "07acc13e-bbeb-4bd5-a3e0-6afbfc92e7d2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "40431efa-8d26-4f25-9c5d-250348850cee", "Content-Type" : "application/json" }, "Response" : { @@ -2458,29 +2458,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "dd3c5fc7-dcc7-4279-a78f-31d86325554a", + "x-ms-correlation-request-id" : "4d81d980-0f0a-41a3-a5c3-cccbe48bc04a", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"CWyFuQqtNUxdJWSmicYinAMOEuB\"", + "ETag" : "\"sk6LhsDTGZWDzmU6xIOTHOcdG7F\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNTk=;sn=402159", - "x-ms-request-id" : "dd3c5fc7-dcc7-4279-a78f-31d86325554a", - "Body" : "{\"etag\":\"CWyFuQqtNUxdJWSmicYinAMOEuB\",\"key\":\"key77675-35\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "07acc13e-bbeb-4bd5-a3e0-6afbfc92e7d2", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NTk=;sn=448959", + "x-ms-request-id" : "4d81d980-0f0a-41a3-a5c3-cccbe48bc04a", + "Body" : "{\"etag\":\"sk6LhsDTGZWDzmU6xIOTHOcdG7F\",\"key\":\"key03953-38\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "40431efa-8d26-4f25-9c5d-250348850cee", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-30?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-36?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8201ba44-5664-4c08-b65f-750a86b1c850", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7f0acd0d-8ab3-4d55-97e9-46cea653df71", "Content-Type" : "application/json" }, "Response" : { @@ -2489,29 +2489,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "8ba5d74a-83f2-4096-8a2e-5304a2207f9b", + "x-ms-correlation-request-id" : "242cf73c-5128-45e7-9189-39565bb00038", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ALw0TGWzE06mzd3kBB0iWNkL7C7\"", + "ETag" : "\"z1BywtJKNKu3OJiMo15AdnEstje\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNjA=;sn=402160", - "x-ms-request-id" : "8ba5d74a-83f2-4096-8a2e-5304a2207f9b", - "Body" : "{\"etag\":\"ALw0TGWzE06mzd3kBB0iWNkL7C7\",\"key\":\"key77675-30\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "8201ba44-5664-4c08-b65f-750a86b1c850", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NTg=;sn=448958", + "x-ms-request-id" : "242cf73c-5128-45e7-9189-39565bb00038", + "Body" : "{\"etag\":\"z1BywtJKNKu3OJiMo15AdnEstje\",\"key\":\"key03953-36\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "7f0acd0d-8ab3-4d55-97e9-46cea653df71", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-36?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-30?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "029ecd19-e3ad-44f7-a62e-a37fcf4929a8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6ea4a942-5e28-498f-8a0a-fcdc03b62b80", "Content-Type" : "application/json" }, "Response" : { @@ -2520,29 +2520,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "bf21ba3c-c8af-4718-a287-748fd0a8afeb", + "x-ms-correlation-request-id" : "f3ac2907-f5ec-4bcf-bab2-dd8ee967df0c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"QaLjo90YE3VINlG0rD5vJK8jlOc\"", + "ETag" : "\"BktmW393FzcqmJ7mF1veMJXnMsG\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNjE=;sn=402161", - "x-ms-request-id" : "bf21ba3c-c8af-4718-a287-748fd0a8afeb", - "Body" : "{\"etag\":\"QaLjo90YE3VINlG0rD5vJK8jlOc\",\"key\":\"key77675-36\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "029ecd19-e3ad-44f7-a62e-a37fcf4929a8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NjA=;sn=448960", + "x-ms-request-id" : "f3ac2907-f5ec-4bcf-bab2-dd8ee967df0c", + "Body" : "{\"etag\":\"BktmW393FzcqmJ7mF1veMJXnMsG\",\"key\":\"key03953-30\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "6ea4a942-5e28-498f-8a0a-fcdc03b62b80", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-38?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-39?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a6dd1b5e-12e5-458a-a67e-a2cb45f4baf0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2e6b424a-feda-48c8-a151-6ed9497b6dd1", "Content-Type" : "application/json" }, "Response" : { @@ -2551,29 +2551,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c7219bb4-d2c4-4c7a-8a4c-3d757f62cdc5", + "x-ms-correlation-request-id" : "d2f4234b-0025-4de5-86e5-cbab36a6edc4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"lDpYnWfhbEvDfjuk2dD7pZG9zlY\"", + "ETag" : "\"QzbJg6ANYjKLu5t1RnsLVdxzaIL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNjI=;sn=402162", - "x-ms-request-id" : "c7219bb4-d2c4-4c7a-8a4c-3d757f62cdc5", - "Body" : "{\"etag\":\"lDpYnWfhbEvDfjuk2dD7pZG9zlY\",\"key\":\"key77675-38\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "a6dd1b5e-12e5-458a-a67e-a2cb45f4baf0", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NjI=;sn=448962", + "x-ms-request-id" : "d2f4234b-0025-4de5-86e5-cbab36a6edc4", + "Body" : "{\"etag\":\"QzbJg6ANYjKLu5t1RnsLVdxzaIL\",\"key\":\"key03953-39\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "2e6b424a-feda-48c8-a151-6ed9497b6dd1", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-31?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-37?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "fd401391-d689-4504-a437-980aac269431", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4f1c9780-1acf-4a8b-94dc-e0eb22b948d7", "Content-Type" : "application/json" }, "Response" : { @@ -2582,29 +2582,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ef41c97e-cf8d-41f3-acaf-a007a7b0590b", + "x-ms-correlation-request-id" : "b7407ae6-7d14-463e-b105-1c56fd7ce9d0", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"patmeBOnDHsJJhuMysUIS7CJkji\"", + "ETag" : "\"SHqYslNedJO2CPMdtakKAB7k6lt\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNjM=;sn=402163", - "x-ms-request-id" : "ef41c97e-cf8d-41f3-acaf-a007a7b0590b", - "Body" : "{\"etag\":\"patmeBOnDHsJJhuMysUIS7CJkji\",\"key\":\"key77675-31\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "fd401391-d689-4504-a437-980aac269431", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NjE=;sn=448961", + "x-ms-request-id" : "b7407ae6-7d14-463e-b105-1c56fd7ce9d0", + "Body" : "{\"etag\":\"SHqYslNedJO2CPMdtakKAB7k6lt\",\"key\":\"key03953-37\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "4f1c9780-1acf-4a8b-94dc-e0eb22b948d7", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-37?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-32?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "acf96300-08b8-4c06-b82c-8f2c8f4f1d90", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "75fe842b-f938-4042-92a0-fd35bfad8d5b", "Content-Type" : "application/json" }, "Response" : { @@ -2613,29 +2613,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "aec9d554-09ed-4506-965d-95d129f619e9", + "x-ms-correlation-request-id" : "6f01394a-b8fc-4104-8272-3af84e3a0207", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"H9MtAitgyH1US14uFLkAOtEBdK7\"", + "ETag" : "\"DlBQK2YI6hvbR9F9h9AICwhdsM9\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNjQ=;sn=402164", - "x-ms-request-id" : "aec9d554-09ed-4506-965d-95d129f619e9", - "Body" : "{\"etag\":\"H9MtAitgyH1US14uFLkAOtEBdK7\",\"key\":\"key77675-37\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "acf96300-08b8-4c06-b82c-8f2c8f4f1d90", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NjM=;sn=448963", + "x-ms-request-id" : "6f01394a-b8fc-4104-8272-3af84e3a0207", + "Body" : "{\"etag\":\"DlBQK2YI6hvbR9F9h9AICwhdsM9\",\"key\":\"key03953-32\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "75fe842b-f938-4042-92a0-fd35bfad8d5b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-4?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-4?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f99c069c-b615-4794-8618-5cb57ed4e876", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "845cf928-8ab9-42f3-9cf6-7beeebe1ddda", "Content-Type" : "application/json" }, "Response" : { @@ -2644,29 +2644,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d39814b0-3445-448c-809e-afaebeb30d67", + "x-ms-correlation-request-id" : "6cb1307c-0e05-4e01-892a-241f0b3d31ac", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"pzYHseOmcZDIsfSHE6pqHMsM370\"", + "ETag" : "\"lJSDraq5NrfAHboSzlV4Ki9kIwU\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNjU=;sn=402165", - "x-ms-request-id" : "d39814b0-3445-448c-809e-afaebeb30d67", - "Body" : "{\"etag\":\"pzYHseOmcZDIsfSHE6pqHMsM370\",\"key\":\"key77675-4\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "f99c069c-b615-4794-8618-5cb57ed4e876", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NjQ=;sn=448964", + "x-ms-request-id" : "6cb1307c-0e05-4e01-892a-241f0b3d31ac", + "Body" : "{\"etag\":\"lJSDraq5NrfAHboSzlV4Ki9kIwU\",\"key\":\"key03953-4\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "845cf928-8ab9-42f3-9cf6-7beeebe1ddda", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-39?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-40?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a02b6e07-bf8e-42bc-a69b-079289f728e3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6a950e59-210d-4e64-8be3-7a2eacae36e6", "Content-Type" : "application/json" }, "Response" : { @@ -2675,29 +2675,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "5fa90aa6-6e1a-4cf5-bd05-328668cd9c1a", + "x-ms-correlation-request-id" : "2f85729e-820b-4c8e-8d7a-4a69484bd0d4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"s7aAqrRXIrD44eDoZgItSSdW4LJ\"", + "ETag" : "\"8PMXqYbZOu6HgVD4Pnxb4olv5hG\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNjY=;sn=402166", - "x-ms-request-id" : "5fa90aa6-6e1a-4cf5-bd05-328668cd9c1a", - "Body" : "{\"etag\":\"s7aAqrRXIrD44eDoZgItSSdW4LJ\",\"key\":\"key77675-39\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "a02b6e07-bf8e-42bc-a69b-079289f728e3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NjU=;sn=448965", + "x-ms-request-id" : "2f85729e-820b-4c8e-8d7a-4a69484bd0d4", + "Body" : "{\"etag\":\"8PMXqYbZOu6HgVD4Pnxb4olv5hG\",\"key\":\"key03953-40\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "6a950e59-210d-4e64-8be3-7a2eacae36e6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-44?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-35?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0f9354e0-1b4c-45a0-a793-e817f31c5f69", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c76c2578-7c0a-4568-baa6-d22547e3b330", "Content-Type" : "application/json" }, "Response" : { @@ -2706,29 +2706,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "caf1bc53-eea4-4c80-a1b4-4ba0d7a0a2f3", + "x-ms-correlation-request-id" : "3c4760f0-80f2-4e1e-b6e8-3f7a127f4fae", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"rl2EAP9iqpZMQGfHYhrNLcOBKN5\"", + "ETag" : "\"wZVw8bIY0P3bUy5CcSxOGc4KRuL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNjc=;sn=402167", - "x-ms-request-id" : "caf1bc53-eea4-4c80-a1b4-4ba0d7a0a2f3", - "Body" : "{\"etag\":\"rl2EAP9iqpZMQGfHYhrNLcOBKN5\",\"key\":\"key77675-44\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "0f9354e0-1b4c-45a0-a793-e817f31c5f69", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NjY=;sn=448966", + "x-ms-request-id" : "3c4760f0-80f2-4e1e-b6e8-3f7a127f4fae", + "Body" : "{\"etag\":\"wZVw8bIY0P3bUy5CcSxOGc4KRuL\",\"key\":\"key03953-35\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "c76c2578-7c0a-4568-baa6-d22547e3b330", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-40?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-46?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "bbabc69d-adb2-4f2c-83ed-556a060ac7ff", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c2782c49-67c9-4e43-875e-8ccb867c0540", "Content-Type" : "application/json" }, "Response" : { @@ -2737,29 +2737,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a6ccea4b-189f-40bf-bb9c-30339f6c09ad", + "x-ms-correlation-request-id" : "b1556fc2-a96f-4a1d-8bab-1d8f3786f18f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"XqSea0TGcbhzEZtES4gH5FaA3Xm\"", + "ETag" : "\"I80H2T8goEeHVNluIR9AOzLfqpX\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNjg=;sn=402168", - "x-ms-request-id" : "a6ccea4b-189f-40bf-bb9c-30339f6c09ad", - "Body" : "{\"etag\":\"XqSea0TGcbhzEZtES4gH5FaA3Xm\",\"key\":\"key77675-40\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "bbabc69d-adb2-4f2c-83ed-556a060ac7ff", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5Njc=;sn=448967", + "x-ms-request-id" : "b1556fc2-a96f-4a1d-8bab-1d8f3786f18f", + "Body" : "{\"etag\":\"I80H2T8goEeHVNluIR9AOzLfqpX\",\"key\":\"key03953-46\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "c2782c49-67c9-4e43-875e-8ccb867c0540", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-45?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-44?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3f274431-a41c-487e-94ba-f906354bde2c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "788853aa-f0fb-4d8c-a75e-f8c554900202", "Content-Type" : "application/json" }, "Response" : { @@ -2768,29 +2768,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:20 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3c238f9b-6143-4609-b498-b80e1553df71", + "x-ms-correlation-request-id" : "84801849-8582-4426-984f-06e1bce5d057", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"RRZWYBhwh9Jb6Gy1DzD8LNjRr7Q\"", + "ETag" : "\"uvTUhc2JWLWeQuKuZpeGrEkqZ3e\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNjk=;sn=402169", - "x-ms-request-id" : "3c238f9b-6143-4609-b498-b80e1553df71", - "Body" : "{\"etag\":\"RRZWYBhwh9Jb6Gy1DzD8LNjRr7Q\",\"key\":\"key77675-45\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "3f274431-a41c-487e-94ba-f906354bde2c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5Njg=;sn=448968", + "x-ms-request-id" : "84801849-8582-4426-984f-06e1bce5d057", + "Body" : "{\"etag\":\"uvTUhc2JWLWeQuKuZpeGrEkqZ3e\",\"key\":\"key03953-44\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:20+00:00\"}", + "x-ms-client-request-id" : "788853aa-f0fb-4d8c-a75e-f8c554900202", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-47?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-41?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "eff81d2a-d087-47ba-82e4-ee475fcf761e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "40ebb632-42d1-44ea-8eeb-0a71683b5960", "Content-Type" : "application/json" }, "Response" : { @@ -2799,29 +2799,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "63e62ec7-41bf-4158-b448-7c755ba4fbab", + "x-ms-correlation-request-id" : "2abf7869-fd8c-4d52-be33-75a67fed503f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"a0Yl4ZQITG18paKtDl7GApPO7m5\"", + "ETag" : "\"relplQqgKHxtuQWHHxepvL5GAvl\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNzA=;sn=402170", - "x-ms-request-id" : "63e62ec7-41bf-4158-b448-7c755ba4fbab", - "Body" : "{\"etag\":\"a0Yl4ZQITG18paKtDl7GApPO7m5\",\"key\":\"key77675-47\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "eff81d2a-d087-47ba-82e4-ee475fcf761e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5Njk=;sn=448969", + "x-ms-request-id" : "2abf7869-fd8c-4d52-be33-75a67fed503f", + "Body" : "{\"etag\":\"relplQqgKHxtuQWHHxepvL5GAvl\",\"key\":\"key03953-41\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "40ebb632-42d1-44ea-8eeb-0a71683b5960", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-41?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-45?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "04345807-43f9-49d6-96fa-6bd55b560a94", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9f32a7f5-6b95-4485-a40c-0060252a4bd5", "Content-Type" : "application/json" }, "Response" : { @@ -2830,29 +2830,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "47461c4a-1253-462b-afd4-00711a3faa39", + "x-ms-correlation-request-id" : "4598a093-b781-4d65-af7a-b11d7a260ffa", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"MHAjlUu8i2yhPSpmDLPaenOWiAd\"", + "ETag" : "\"n3eCNHiTWRzAnjLOimxpW4cZDiL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNzE=;sn=402171", - "x-ms-request-id" : "47461c4a-1253-462b-afd4-00711a3faa39", - "Body" : "{\"etag\":\"MHAjlUu8i2yhPSpmDLPaenOWiAd\",\"key\":\"key77675-41\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "04345807-43f9-49d6-96fa-6bd55b560a94", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NzE=;sn=448971", + "x-ms-request-id" : "4598a093-b781-4d65-af7a-b11d7a260ffa", + "Body" : "{\"etag\":\"n3eCNHiTWRzAnjLOimxpW4cZDiL\",\"key\":\"key03953-45\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "9f32a7f5-6b95-4485-a40c-0060252a4bd5", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-46?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-48?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0b5c09a3-0229-4c01-bb2a-4b6675d479cf", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b7b76475-37a4-4942-a63a-a7568e14dd47", "Content-Type" : "application/json" }, "Response" : { @@ -2861,29 +2861,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1c57625f-d766-45af-92eb-a51a2b8f3182", + "x-ms-correlation-request-id" : "2de1bb86-8b7b-407f-a2b4-912acabeb3f1", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"zKFvyruqC3k019DLdd4wKX9snpi\"", + "ETag" : "\"zpHh9NjFmQLclZ0KPWbYH2Iqz6H\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNzI=;sn=402172", - "x-ms-request-id" : "1c57625f-d766-45af-92eb-a51a2b8f3182", - "Body" : "{\"etag\":\"zKFvyruqC3k019DLdd4wKX9snpi\",\"key\":\"key77675-46\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "0b5c09a3-0229-4c01-bb2a-4b6675d479cf", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NzA=;sn=448970", + "x-ms-request-id" : "2de1bb86-8b7b-407f-a2b4-912acabeb3f1", + "Body" : "{\"etag\":\"zpHh9NjFmQLclZ0KPWbYH2Iqz6H\",\"key\":\"key03953-48\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "b7b76475-37a4-4942-a63a-a7568e14dd47", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-48?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-43?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2df4f14c-0164-445c-9982-8bc954b33dc7", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c59963fc-1b44-4530-b163-11f0ebee0e20", "Content-Type" : "application/json" }, "Response" : { @@ -2892,29 +2892,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "80b29573-1427-47b6-8f81-8b3bebe215e7", + "x-ms-correlation-request-id" : "18c172ae-478b-41e7-979c-0517eecaca87", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"eDNDePK1ZwQSZHmbAXI3bpWnB5g\"", + "ETag" : "\"lLfuDs7phuMILkLVccHyqRewvR8\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNzM=;sn=402173", - "x-ms-request-id" : "80b29573-1427-47b6-8f81-8b3bebe215e7", - "Body" : "{\"etag\":\"eDNDePK1ZwQSZHmbAXI3bpWnB5g\",\"key\":\"key77675-48\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "2df4f14c-0164-445c-9982-8bc954b33dc7", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NzI=;sn=448972", + "x-ms-request-id" : "18c172ae-478b-41e7-979c-0517eecaca87", + "Body" : "{\"etag\":\"lLfuDs7phuMILkLVccHyqRewvR8\",\"key\":\"key03953-43\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "c59963fc-1b44-4530-b163-11f0ebee0e20", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-42?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-47?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e7f61e1d-975c-46d4-a986-f3676f8f4b16", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "32c8f71c-a380-4fc8-81e5-4a1f94a6c692", "Content-Type" : "application/json" }, "Response" : { @@ -2923,29 +2923,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b7f05f9c-8f88-4412-a94b-fc2a90561914", + "x-ms-correlation-request-id" : "ee620b6f-729b-4c99-94f6-6bf2cab8c7bc", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"acN4zvZf58MAQIvDtqDCb3kE15L\"", + "ETag" : "\"cGvbAtxrOHSYxlzZWRSIBQSs0at\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNzQ=;sn=402174", - "x-ms-request-id" : "b7f05f9c-8f88-4412-a94b-fc2a90561914", - "Body" : "{\"etag\":\"acN4zvZf58MAQIvDtqDCb3kE15L\",\"key\":\"key77675-42\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "e7f61e1d-975c-46d4-a986-f3676f8f4b16", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NzQ=;sn=448974", + "x-ms-request-id" : "ee620b6f-729b-4c99-94f6-6bf2cab8c7bc", + "Body" : "{\"etag\":\"cGvbAtxrOHSYxlzZWRSIBQSs0at\",\"key\":\"key03953-47\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "32c8f71c-a380-4fc8-81e5-4a1f94a6c692", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-5?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-7?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f1052b99-f8a0-4ea7-9f2c-129018a33376", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5db81db0-1b13-4f37-9aa5-bf7308553b32", "Content-Type" : "application/json" }, "Response" : { @@ -2954,29 +2954,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "377de60d-51f0-4daf-bf84-759ec2acf996", + "x-ms-correlation-request-id" : "e837af2c-8eb7-4eb7-a3f1-e4f99387f9ca", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"A5z0bZ7UuvT6WhY1ps7YQ0Scpt4\"", + "ETag" : "\"x80TEuOC0jC84Zcve9B1JRW0J5z\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNzU=;sn=402175", - "x-ms-request-id" : "377de60d-51f0-4daf-bf84-759ec2acf996", - "Body" : "{\"etag\":\"A5z0bZ7UuvT6WhY1ps7YQ0Scpt4\",\"key\":\"key77675-5\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "f1052b99-f8a0-4ea7-9f2c-129018a33376", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NzM=;sn=448973", + "x-ms-request-id" : "e837af2c-8eb7-4eb7-a3f1-e4f99387f9ca", + "Body" : "{\"etag\":\"x80TEuOC0jC84Zcve9B1JRW0J5z\",\"key\":\"key03953-7\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "5db81db0-1b13-4f37-9aa5-bf7308553b32", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-43?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-42?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2cd7ddb5-36a7-4cb2-99e5-1fdbfd92d750", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "44488fbf-569b-43d8-a474-405b127b6062", "Content-Type" : "application/json" }, "Response" : { @@ -2985,29 +2985,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3aff4fb6-4911-456f-915b-61e2eaf1f9c1", + "x-ms-correlation-request-id" : "5fd18cb2-259f-4074-9f15-bdd1c1409118", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"UsOYtgmmcS81KqeuhXuXSxzUGFP\"", + "ETag" : "\"vF4utnv79Eud5dcYzV09ZlUJlJM\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNzY=;sn=402176", - "x-ms-request-id" : "3aff4fb6-4911-456f-915b-61e2eaf1f9c1", - "Body" : "{\"etag\":\"UsOYtgmmcS81KqeuhXuXSxzUGFP\",\"key\":\"key77675-43\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "2cd7ddb5-36a7-4cb2-99e5-1fdbfd92d750", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NzU=;sn=448975", + "x-ms-request-id" : "5fd18cb2-259f-4074-9f15-bdd1c1409118", + "Body" : "{\"etag\":\"vF4utnv79Eud5dcYzV09ZlUJlJM\",\"key\":\"key03953-42\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "44488fbf-569b-43d8-a474-405b127b6062", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-7?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-6?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e8c85fbe-38d5-4ffa-8b0e-e414ef637d31", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f64c2bf0-6420-45f8-b197-1a94fd90b2cd", "Content-Type" : "application/json" }, "Response" : { @@ -3016,29 +3016,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9e80878e-8e7a-4150-aa8e-e550414bc277", + "x-ms-correlation-request-id" : "f2c5ff51-ec0b-41c2-a2cf-b1c15169fd0c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"OqAaQ6p0ewOebyrWM2tmplCN2Cy\"", + "ETag" : "\"Mq0G38oS3lXjkYAzw95OoVomKQg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNzc=;sn=402177", - "x-ms-request-id" : "9e80878e-8e7a-4150-aa8e-e550414bc277", - "Body" : "{\"etag\":\"OqAaQ6p0ewOebyrWM2tmplCN2Cy\",\"key\":\"key77675-7\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "e8c85fbe-38d5-4ffa-8b0e-e414ef637d31", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5Nzc=;sn=448977", + "x-ms-request-id" : "f2c5ff51-ec0b-41c2-a2cf-b1c15169fd0c", + "Body" : "{\"etag\":\"Mq0G38oS3lXjkYAzw95OoVomKQg\",\"key\":\"key03953-6\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "f64c2bf0-6420-45f8-b197-1a94fd90b2cd", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-6?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-5?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f9ee76ec-6b07-4d98-ab5b-669dc862ed30", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1716e74c-bdf1-4864-8887-ddb025b12c63", "Content-Type" : "application/json" }, "Response" : { @@ -3047,29 +3047,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4ee074d9-12f3-42aa-b67d-9a3834809029", + "x-ms-correlation-request-id" : "e6e14cfa-af79-4fb1-b851-29a9c5972521", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"NrMcmMqfsr1JD00a5CpJrhzqpeN\"", + "ETag" : "\"86FfClIX9oZEGMNmgvtYCI4GBnG\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNzg=;sn=402178", - "x-ms-request-id" : "4ee074d9-12f3-42aa-b67d-9a3834809029", - "Body" : "{\"etag\":\"NrMcmMqfsr1JD00a5CpJrhzqpeN\",\"key\":\"key77675-6\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "f9ee76ec-6b07-4d98-ab5b-669dc862ed30", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5NzY=;sn=448976", + "x-ms-request-id" : "e6e14cfa-af79-4fb1-b851-29a9c5972521", + "Body" : "{\"etag\":\"86FfClIX9oZEGMNmgvtYCI4GBnG\",\"key\":\"key03953-5\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "1716e74c-bdf1-4864-8887-ddb025b12c63", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-8?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-49?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "945e7fcc-bb84-487b-85b9-891428da974c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "33f64bbe-57d4-4571-b1af-574ddffdf453", "Content-Type" : "application/json" }, "Response" : { @@ -3078,29 +3078,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6f11b37e-9d26-4685-b2ba-8728a6c91f2b", + "x-ms-correlation-request-id" : "098ff172-199e-4ab1-946a-5633cbeaec2d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"1WyTjrDYBgkLxVbcpfZKnoQRGd8\"", + "ETag" : "\"YsVz3R1RhySImlih3852wVTcSnI\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxNzk=;sn=402179", - "x-ms-request-id" : "6f11b37e-9d26-4685-b2ba-8728a6c91f2b", - "Body" : "{\"etag\":\"1WyTjrDYBgkLxVbcpfZKnoQRGd8\",\"key\":\"key77675-8\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "945e7fcc-bb84-487b-85b9-891428da974c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5Nzg=;sn=448978", + "x-ms-request-id" : "098ff172-199e-4ab1-946a-5633cbeaec2d", + "Body" : "{\"etag\":\"YsVz3R1RhySImlih3852wVTcSnI\",\"key\":\"key03953-49\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "33f64bbe-57d4-4571-b1af-574ddffdf453", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-49?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-8?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5ef68bd8-7867-4863-b607-817e7db4247a", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ffdfc40a-f012-40c9-af57-6b04128c6190", "Content-Type" : "application/json" }, "Response" : { @@ -3109,29 +3109,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c56d32bb-c580-470d-ae4c-93941987bc39", + "x-ms-correlation-request-id" : "98ecc12f-5817-4498-8c43-54b40b3d3c2f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"jKLo554vSLWMmpCQwPOzOoqxXh7\"", + "ETag" : "\"OJow4UA6HGC6mJ5DYIPzquNa6Hx\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxODA=;sn=402180", - "x-ms-request-id" : "c56d32bb-c580-470d-ae4c-93941987bc39", - "Body" : "{\"etag\":\"jKLo554vSLWMmpCQwPOzOoqxXh7\",\"key\":\"key77675-49\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "5ef68bd8-7867-4863-b607-817e7db4247a", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5Nzk=;sn=448979", + "x-ms-request-id" : "98ecc12f-5817-4498-8c43-54b40b3d3c2f", + "Body" : "{\"etag\":\"OJow4UA6HGC6mJ5DYIPzquNa6Hx\",\"key\":\"key03953-8\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "ffdfc40a-f012-40c9-af57-6b04128c6190", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key77675-9?label=286ad20b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key03953-9?label=e091bd57", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a4203732-f655-4587-8a01-f8bd02c2ac9d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f039053a-d822-4e84-99ea-e6c26e53c877", "Content-Type" : "application/json" }, "Response" : { @@ -3140,23 +3140,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:20 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "8b4f324e-43d0-4fdb-b7d1-470f35e0ba75", + "x-ms-correlation-request-id" : "972bcc3b-81c7-43e8-8786-3050abe49a45", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"qBTCtW9Mjn9aVjClZoFgkVAQqZn\"", + "ETag" : "\"jHZgGukBaH5oXxdWqk9Q1PWBvlU\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIxODE=;sn=402181", - "x-ms-request-id" : "8b4f324e-43d0-4fdb-b7d1-470f35e0ba75", - "Body" : "{\"etag\":\"qBTCtW9Mjn9aVjClZoFgkVAQqZn\",\"key\":\"key77675-9\",\"label\":\"286ad20b\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "a4203732-f655-4587-8a01-f8bd02c2ac9d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg5ODA=;sn=448980", + "x-ms-request-id" : "972bcc3b-81c7-43e8-8786-3050abe49a45", + "Body" : "{\"etag\":\"jHZgGukBaH5oXxdWqk9Q1PWBvlU\",\"key\":\"key03953-9\",\"label\":\"e091bd57\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "f039053a-d822-4e84-99ea-e6c26e53c877", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key77675", "286ad20b" ] + "variables" : [ "key03953", "e091bd57" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithKeyAndLabel.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithKeyAndLabel.json index 30c02b592bfb..cb85d851b5dd 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithKeyAndLabel.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithKeyAndLabel.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key5229737760d?label=lbl83559", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key52402735139?label=lbl06808", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8aed392c-4d23-48cb-970b-69c4165fd9e7", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "93983bc7-2b8a-4d96-89b1-2da2cdc4f18c", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:16 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c52a2b1c-bacf-41c1-ab59-49b8abee0079", + "x-ms-correlation-request-id" : "27a34dd4-8d99-48d8-8d4f-d93e7e1e1c24", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ZAn98HgQoXZtUSrsrFWorZxcMpp\"", + "ETag" : "\"FHllit4YB8E1HPxYIGeb8EJ9rYc\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjg=;sn=402068", - "x-ms-request-id" : "c52a2b1c-bacf-41c1-ab59-49b8abee0079", - "Body" : "{\"etag\":\"ZAn98HgQoXZtUSrsrFWorZxcMpp\",\"key\":\"key5229737760d\",\"label\":\"lbl83559\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:02+00:00\"}", - "x-ms-client-request-id" : "8aed392c-4d23-48cb-970b-69c4165fd9e7", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NjM=;sn=448863", + "x-ms-request-id" : "27a34dd4-8d99-48d8-8d4f-d93e7e1e1c24", + "Body" : "{\"etag\":\"FHllit4YB8E1HPxYIGeb8EJ9rYc\",\"key\":\"key52402735139\",\"label\":\"lbl06808\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}", + "x-ms-client-request-id" : "93983bc7-2b8a-4d96-89b1-2da2cdc4f18c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key5229737760d&label=lbl83559", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key52402735139&label=lbl06808", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "835dc108-1f6b-4f51-a84a-4aa9fed6b3e9", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "efdeaf9e-dd16-4dbb-ae8b-2316ac2e41c1", "Content-Type" : "application/json" }, "Response" : { @@ -46,25 +46,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9ac08f46-0c4b-4cf8-860d-ebc590249de8", + "x-ms-correlation-request-id" : "1164ce87-63b2-406b-a28c-50c42ac4b250", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjg=;sn=402068", - "x-ms-request-id" : "9ac08f46-0c4b-4cf8-860d-ebc590249de8", - "Body" : "{\"items\":[{\"etag\":\"ZAn98HgQoXZtUSrsrFWorZxcMpp\",\"key\":\"key5229737760d\",\"label\":\"lbl83559\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:02+00:00\"}]}", - "x-ms-client-request-id" : "835dc108-1f6b-4f51-a84a-4aa9fed6b3e9", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NjM=;sn=448863", + "x-ms-request-id" : "1164ce87-63b2-406b-a28c-50c42ac4b250", + "Body" : "{\"items\":[{\"etag\":\"FHllit4YB8E1HPxYIGeb8EJ9rYc\",\"key\":\"key52402735139\",\"label\":\"lbl06808\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}]}", + "x-ms-client-request-id" : "efdeaf9e-dd16-4dbb-ae8b-2316ac2e41c1", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key5229737760d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key52402735139", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b327e3fc-81cd-472f-9142-b1a839c7c0fc", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8725e237-0fe4-446c-a0ab-29f8f53117d1", "Content-Type" : "application/json" }, "Response" : { @@ -75,25 +75,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d6f82234-3ce0-4a13-8a17-6f66a93e5e23", + "x-ms-correlation-request-id" : "d2b166dd-84bb-4023-aba0-1fd8585c74be", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjg=;sn=402068", - "x-ms-request-id" : "d6f82234-3ce0-4a13-8a17-6f66a93e5e23", - "Body" : "{\"items\":[{\"etag\":\"ZAn98HgQoXZtUSrsrFWorZxcMpp\",\"key\":\"key5229737760d\",\"label\":\"lbl83559\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:02+00:00\"}]}", - "x-ms-client-request-id" : "b327e3fc-81cd-472f-9142-b1a839c7c0fc", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NjM=;sn=448863", + "x-ms-request-id" : "d2b166dd-84bb-4023-aba0-1fd8585c74be", + "Body" : "{\"items\":[{\"etag\":\"FHllit4YB8E1HPxYIGeb8EJ9rYc\",\"key\":\"key52402735139\",\"label\":\"lbl06808\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}]}", + "x-ms-client-request-id" : "8725e237-0fe4-446c-a0ab-29f8f53117d1", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key52297%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key52402%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c86c5044-2b59-4ec6-8478-4c2b9599b51f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7295caf8-7663-4e2c-a70c-a401733c3782", "Content-Type" : "application/json" }, "Response" : { @@ -104,25 +104,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f1f31739-5376-4f5f-b14e-d3d384afe6a9", + "x-ms-correlation-request-id" : "cd31d748-c1b4-45a1-9031-e522d678f63f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjg=;sn=402068", - "x-ms-request-id" : "f1f31739-5376-4f5f-b14e-d3d384afe6a9", - "Body" : "{\"items\":[{\"etag\":\"ZAn98HgQoXZtUSrsrFWorZxcMpp\",\"key\":\"key5229737760d\",\"label\":\"lbl83559\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:02+00:00\"}]}", - "x-ms-client-request-id" : "c86c5044-2b59-4ec6-8478-4c2b9599b51f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NjM=;sn=448863", + "x-ms-request-id" : "cd31d748-c1b4-45a1-9031-e522d678f63f", + "Body" : "{\"items\":[{\"etag\":\"FHllit4YB8E1HPxYIGeb8EJ9rYc\",\"key\":\"key52402735139\",\"label\":\"lbl06808\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}]}", + "x-ms-client-request-id" : "7295caf8-7663-4e2c-a70c-a401733c3782", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key5229737760d?label=lbl83559", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key52402735139?label=lbl06808", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "16484758-b6bd-4f0e-a635-8e00596cf419", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7b9777a1-a1ff-445f-ade8-b026f035f56d", "Content-Type" : "application/json" }, "Response" : { @@ -131,23 +131,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:16 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "42efab17-ada7-4689-96ba-b075a1dbf486", + "x-ms-correlation-request-id" : "0cdbd2fc-0e34-4898-8ea8-66187f6e95d8", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ZAn98HgQoXZtUSrsrFWorZxcMpp\"", + "ETag" : "\"FHllit4YB8E1HPxYIGeb8EJ9rYc\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNjk=;sn=402069", - "x-ms-request-id" : "42efab17-ada7-4689-96ba-b075a1dbf486", - "Body" : "{\"etag\":\"ZAn98HgQoXZtUSrsrFWorZxcMpp\",\"key\":\"key5229737760d\",\"label\":\"lbl83559\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:02+00:00\"}", - "x-ms-client-request-id" : "16484758-b6bd-4f0e-a635-8e00596cf419", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NjQ=;sn=448864", + "x-ms-request-id" : "0cdbd2fc-0e34-4898-8ea8-66187f6e95d8", + "Body" : "{\"etag\":\"FHllit4YB8E1HPxYIGeb8EJ9rYc\",\"key\":\"key52402735139\",\"label\":\"lbl06808\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}", + "x-ms-client-request-id" : "7b9777a1-a1ff-445f-ade8-b026f035f56d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key52297", "7b9ca490", "key5229737760d", "lbl83559" ] + "variables" : [ "key52402", "a6228ccb", "key52402735139", "lbl06808" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleKeys.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleKeys.json index 64de54060952..b4ead0caeceb 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleKeys.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleKeys.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4313429597b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key60281886136", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e30d2be9-cde7-41e9-b0a4-ac89688f1137", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bd0751c1-3510-429e-a9cf-063cfe683d51", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:01 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:49 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:00 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9a887598-058a-474e-9f47-a90cbc025fdb", + "x-ms-correlation-request-id" : "facbb503-3b7b-498a-8da5-601ef34eb5ec", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"fnCPiTdP7D7gxpLiT3peCcXWo8a\"", + "ETag" : "\"pvDTrdS35vXkyMkAnC76iZ7u594\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MzA=;sn=401930", - "x-ms-request-id" : "9a887598-058a-474e-9f47-a90cbc025fdb", - "Body" : "{\"etag\":\"fnCPiTdP7D7gxpLiT3peCcXWo8a\",\"key\":\"key4313429597b\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}", - "x-ms-client-request-id" : "e30d2be9-cde7-41e9-b0a4-ac89688f1137", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MjM=;sn=448723", + "x-ms-request-id" : "facbb503-3b7b-498a-8da5-601ef34eb5ec", + "Body" : "{\"etag\":\"pvDTrdS35vXkyMkAnC76iZ7u594\",\"key\":\"key60281886136\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}", + "x-ms-client-request-id" : "bd0751c1-3510-429e-a9cf-063cfe683d51", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4313440600a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key60281212031", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "82693c13-77b8-495f-bef8-82dc39c41bf8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cbaf91a8-0881-4c51-b868-d1dca9f36800", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:01 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:49 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:00 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "35635643-81a2-473c-937b-d96990b29f0d", + "x-ms-correlation-request-id" : "312b22be-091f-4b2a-a42f-07c05fe26f37", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"WP5AYJ2JQbih8tQo9GpgnOxx3pc\"", + "ETag" : "\"xfpb2pwIZiWm36nM8H81WunRzoI\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MzE=;sn=401931", - "x-ms-request-id" : "35635643-81a2-473c-937b-d96990b29f0d", - "Body" : "{\"etag\":\"WP5AYJ2JQbih8tQo9GpgnOxx3pc\",\"key\":\"key4313440600a\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}", - "x-ms-client-request-id" : "82693c13-77b8-495f-bef8-82dc39c41bf8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MjQ=;sn=448724", + "x-ms-request-id" : "312b22be-091f-4b2a-a42f-07c05fe26f37", + "Body" : "{\"etag\":\"xfpb2pwIZiWm36nM8H81WunRzoI\",\"key\":\"key60281212031\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}", + "x-ms-client-request-id" : "cbaf91a8-0881-4c51-b868-d1dca9f36800", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key4313429597b%2ckey4313440600a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key60281886136%2ckey60281212031", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1f8c59a8-bed5-4c78-8da6-3648422fd2d8", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dc621973-2f44-44d5-889a-2ac6e396c519", "Content-Type" : "application/json" }, "Response" : { @@ -77,25 +77,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:49 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:00 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "111769e5-920a-4896-8a47-a4a9aa010766", + "x-ms-correlation-request-id" : "4b26e051-bde0-4c98-9916-acc2872a5e9b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MzE=;sn=401931", - "x-ms-request-id" : "111769e5-920a-4896-8a47-a4a9aa010766", - "Body" : "{\"items\":[{\"etag\":\"fnCPiTdP7D7gxpLiT3peCcXWo8a\",\"key\":\"key4313429597b\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"},{\"etag\":\"WP5AYJ2JQbih8tQo9GpgnOxx3pc\",\"key\":\"key4313440600a\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}]}", - "x-ms-client-request-id" : "1f8c59a8-bed5-4c78-8da6-3648422fd2d8", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MjQ=;sn=448724", + "x-ms-request-id" : "4b26e051-bde0-4c98-9916-acc2872a5e9b", + "Body" : "{\"items\":[{\"etag\":\"xfpb2pwIZiWm36nM8H81WunRzoI\",\"key\":\"key60281212031\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"},{\"etag\":\"pvDTrdS35vXkyMkAnC76iZ7u594\",\"key\":\"key60281886136\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}]}", + "x-ms-client-request-id" : "dc621973-2f44-44d5-889a-2ac6e396c519", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key43134%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key60281%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5c659bb5-50c1-43c1-9552-617cd80dd3fe", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ca8e9e68-013b-4f4c-a320-717253e865cf", "Content-Type" : "application/json" }, "Response" : { @@ -106,25 +106,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:49 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:00 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "69f1ff31-a0ce-42aa-82d0-254d03433c1d", + "x-ms-correlation-request-id" : "22f84f0a-100b-476e-8002-7c4dec465f73", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MzE=;sn=401931", - "x-ms-request-id" : "69f1ff31-a0ce-42aa-82d0-254d03433c1d", - "Body" : "{\"items\":[{\"etag\":\"fnCPiTdP7D7gxpLiT3peCcXWo8a\",\"key\":\"key4313429597b\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"},{\"etag\":\"WP5AYJ2JQbih8tQo9GpgnOxx3pc\",\"key\":\"key4313440600a\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}]}", - "x-ms-client-request-id" : "5c659bb5-50c1-43c1-9552-617cd80dd3fe", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MjQ=;sn=448724", + "x-ms-request-id" : "22f84f0a-100b-476e-8002-7c4dec465f73", + "Body" : "{\"items\":[{\"etag\":\"xfpb2pwIZiWm36nM8H81WunRzoI\",\"key\":\"key60281212031\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"},{\"etag\":\"pvDTrdS35vXkyMkAnC76iZ7u594\",\"key\":\"key60281886136\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}]}", + "x-ms-client-request-id" : "ca8e9e68-013b-4f4c-a320-717253e865cf", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4313440600a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key60281886136", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3b0dd707-0c0f-454e-a4a9-26ca0b761f26", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a2c08e9d-c0d6-4f65-9247-81ad50e0b2a7", "Content-Type" : "application/json" }, "Response" : { @@ -133,29 +133,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:01 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:49 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:00 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "856b2603-2faa-44bd-b742-f2869bac5559", + "x-ms-correlation-request-id" : "11acda51-1dca-44f1-9a6b-acbe8740f589", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"WP5AYJ2JQbih8tQo9GpgnOxx3pc\"", + "ETag" : "\"pvDTrdS35vXkyMkAnC76iZ7u594\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MzI=;sn=401932", - "x-ms-request-id" : "856b2603-2faa-44bd-b742-f2869bac5559", - "Body" : "{\"etag\":\"WP5AYJ2JQbih8tQo9GpgnOxx3pc\",\"key\":\"key4313440600a\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}", - "x-ms-client-request-id" : "3b0dd707-0c0f-454e-a4a9-26ca0b761f26", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MjU=;sn=448725", + "x-ms-request-id" : "11acda51-1dca-44f1-9a6b-acbe8740f589", + "Body" : "{\"etag\":\"pvDTrdS35vXkyMkAnC76iZ7u594\",\"key\":\"key60281886136\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}", + "x-ms-client-request-id" : "a2c08e9d-c0d6-4f65-9247-81ad50e0b2a7", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4313429597b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key60281212031", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5f496721-b73c-43de-8c40-a5acfce6dd25", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5826c432-e943-432b-a405-3e1a79456bd6", "Content-Type" : "application/json" }, "Response" : { @@ -164,23 +164,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:01 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:49 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:00 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "39caa102-f8ea-4873-990a-3024fd9f2744", + "x-ms-correlation-request-id" : "754e976a-72d9-4ef1-99bb-9cb7de6004c0", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"fnCPiTdP7D7gxpLiT3peCcXWo8a\"", + "ETag" : "\"xfpb2pwIZiWm36nM8H81WunRzoI\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5MzM=;sn=401933", - "x-ms-request-id" : "39caa102-f8ea-4873-990a-3024fd9f2744", - "Body" : "{\"etag\":\"fnCPiTdP7D7gxpLiT3peCcXWo8a\",\"key\":\"key4313429597b\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}", - "x-ms-client-request-id" : "5f496721-b73c-43de-8c40-a5acfce6dd25", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MjY=;sn=448726", + "x-ms-request-id" : "754e976a-72d9-4ef1-99bb-9cb7de6004c0", + "Body" : "{\"etag\":\"xfpb2pwIZiWm36nM8H81WunRzoI\",\"key\":\"key60281212031\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}", + "x-ms-client-request-id" : "5826c432-e943-432b-a405-3e1a79456bd6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key43134", "bc67a1a4", "key4313429597b", "key4313440600a" ] + "variables" : [ "key60281", "200f8b50", "key60281886136", "key60281212031" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleLabels.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleLabels.json index c2862f109be8..37daa60fdc01 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleLabels.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleLabels.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4521528133e?label=65ad50bf25369c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82052858927?label=a85ce4e0792005", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1a8053a2-d000-4ec9-a584-93985d341cdc", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3ffdb830-059b-4e88-b583-b8bf2694bee6", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "498d6da7-3d03-4d8a-bfb6-9d41a271d3bb", + "x-ms-correlation-request-id" : "408a3fa0-2884-4e75-88a6-00e9a140f102", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"IUOxXg9bR4bwGHXFLCJqYehIzuS\"", + "ETag" : "\"ZymSngZNs5Mp1omWXu8SLhBPob2\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4Njc=;sn=401867", - "x-ms-request-id" : "498d6da7-3d03-4d8a-bfb6-9d41a271d3bb", - "Body" : "{\"etag\":\"IUOxXg9bR4bwGHXFLCJqYehIzuS\",\"key\":\"key4521528133e\",\"label\":\"65ad50bf25369c\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "1a8053a2-d000-4ec9-a584-93985d341cdc", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NjA=;sn=448660", + "x-ms-request-id" : "408a3fa0-2884-4e75-88a6-00e9a140f102", + "Body" : "{\"etag\":\"ZymSngZNs5Mp1omWXu8SLhBPob2\",\"key\":\"key82052858927\",\"label\":\"a85ce4e0792005\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "3ffdb830-059b-4e88-b583-b8bf2694bee6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4521528133e?label=65ad50bf51860b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82052858927?label=a85ce4e029636e", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "be9d1026-1a51-4a08-8475-3ccf3fe17322", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fb7693d6-ca0e-4dbd-be33-1844f000a034", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:40 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "74c8923f-666c-4c62-a57b-b216eb35a28b", + "x-ms-correlation-request-id" : "2d71c87e-8f6b-42fa-931b-d415facaa664", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"xMT0mO2KfyE1NLvObA3c1IKLSG1\"", + "ETag" : "\"JWf3Ywda9jPBxLMHmtOAFjRtho0\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4Njg=;sn=401868", - "x-ms-request-id" : "74c8923f-666c-4c62-a57b-b216eb35a28b", - "Body" : "{\"etag\":\"xMT0mO2KfyE1NLvObA3c1IKLSG1\",\"key\":\"key4521528133e\",\"label\":\"65ad50bf51860b\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "be9d1026-1a51-4a08-8475-3ccf3fe17322", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NjE=;sn=448661", + "x-ms-request-id" : "2d71c87e-8f6b-42fa-931b-d415facaa664", + "Body" : "{\"etag\":\"JWf3Ywda9jPBxLMHmtOAFjRtho0\",\"key\":\"key82052858927\",\"label\":\"a85ce4e029636e\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "fb7693d6-ca0e-4dbd-be33-1844f000a034", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key4521528133e&label=65ad50bf25369c%2c65ad50bf51860b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key82052858927&label=a85ce4e0792005%2ca85ce4e029636e", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e7ddf708-5060-4e1b-bf50-3636ee37f523", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a7254861-d97c-4cb9-9552-474c9fe43658", "Content-Type" : "application/json" }, "Response" : { @@ -77,25 +77,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4fcd52ae-ad21-4ba1-b83b-e04427fb7ed8", + "x-ms-correlation-request-id" : "49f31b34-136d-4748-93f6-c18354d8b9cf", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4Njg=;sn=401868", - "x-ms-request-id" : "4fcd52ae-ad21-4ba1-b83b-e04427fb7ed8", - "Body" : "{\"items\":[{\"etag\":\"IUOxXg9bR4bwGHXFLCJqYehIzuS\",\"key\":\"key4521528133e\",\"label\":\"65ad50bf25369c\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"},{\"etag\":\"xMT0mO2KfyE1NLvObA3c1IKLSG1\",\"key\":\"key4521528133e\",\"label\":\"65ad50bf51860b\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}]}", - "x-ms-client-request-id" : "e7ddf708-5060-4e1b-bf50-3636ee37f523", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NjE=;sn=448661", + "x-ms-request-id" : "49f31b34-136d-4748-93f6-c18354d8b9cf", + "Body" : "{\"items\":[{\"etag\":\"JWf3Ywda9jPBxLMHmtOAFjRtho0\",\"key\":\"key82052858927\",\"label\":\"a85ce4e029636e\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"},{\"etag\":\"ZymSngZNs5Mp1omWXu8SLhBPob2\",\"key\":\"key82052858927\",\"label\":\"a85ce4e0792005\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}]}", + "x-ms-client-request-id" : "a7254861-d97c-4cb9-9552-474c9fe43658", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key45215%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key82052%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ecd03268-10d6-4faf-a479-c820492b1c4d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fe3ce4da-45c3-464c-847a-933a03801968", "Content-Type" : "application/json" }, "Response" : { @@ -106,25 +106,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "bef853fa-0639-450f-953b-e220e98243cd", + "x-ms-correlation-request-id" : "b5afe5a7-63ed-448e-9a2e-546eed8cf15b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4Njg=;sn=401868", - "x-ms-request-id" : "bef853fa-0639-450f-953b-e220e98243cd", - "Body" : "{\"items\":[{\"etag\":\"IUOxXg9bR4bwGHXFLCJqYehIzuS\",\"key\":\"key4521528133e\",\"label\":\"65ad50bf25369c\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"},{\"etag\":\"xMT0mO2KfyE1NLvObA3c1IKLSG1\",\"key\":\"key4521528133e\",\"label\":\"65ad50bf51860b\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}]}", - "x-ms-client-request-id" : "ecd03268-10d6-4faf-a479-c820492b1c4d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NjE=;sn=448661", + "x-ms-request-id" : "b5afe5a7-63ed-448e-9a2e-546eed8cf15b", + "Body" : "{\"items\":[{\"etag\":\"JWf3Ywda9jPBxLMHmtOAFjRtho0\",\"key\":\"key82052858927\",\"label\":\"a85ce4e029636e\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"},{\"etag\":\"ZymSngZNs5Mp1omWXu8SLhBPob2\",\"key\":\"key82052858927\",\"label\":\"a85ce4e0792005\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}]}", + "x-ms-client-request-id" : "fe3ce4da-45c3-464c-847a-933a03801968", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4521528133e?label=65ad50bf25369c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82052858927?label=a85ce4e029636e", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9674bf83-92b7-4182-a35d-bfca4507532e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a8a4b8d2-d7b3-4403-a5a8-cfdceff04f23", "Content-Type" : "application/json" }, "Response" : { @@ -133,29 +133,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ade309aa-608a-43a6-bc22-27c02f3c15bc", + "x-ms-correlation-request-id" : "a7ae9a14-b3a8-409f-9b12-4e72c5f6f3ef", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"IUOxXg9bR4bwGHXFLCJqYehIzuS\"", + "ETag" : "\"JWf3Ywda9jPBxLMHmtOAFjRtho0\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4Njk=;sn=401869", - "x-ms-request-id" : "ade309aa-608a-43a6-bc22-27c02f3c15bc", - "Body" : "{\"etag\":\"IUOxXg9bR4bwGHXFLCJqYehIzuS\",\"key\":\"key4521528133e\",\"label\":\"65ad50bf25369c\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "9674bf83-92b7-4182-a35d-bfca4507532e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NjI=;sn=448662", + "x-ms-request-id" : "a7ae9a14-b3a8-409f-9b12-4e72c5f6f3ef", + "Body" : "{\"etag\":\"JWf3Ywda9jPBxLMHmtOAFjRtho0\",\"key\":\"key82052858927\",\"label\":\"a85ce4e029636e\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "a8a4b8d2-d7b3-4403-a5a8-cfdceff04f23", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key4521528133e?label=65ad50bf51860b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82052858927?label=a85ce4e0792005", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "27999f61-48d9-4d73-8179-6e8a3c1f3299", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "747d22b5-0e13-4ed5-87c8-278b68fc355a", "Content-Type" : "application/json" }, "Response" : { @@ -164,23 +164,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c63ef9d3-7c16-45a5-9c41-995e4f398bfa", + "x-ms-correlation-request-id" : "8e846148-c6f8-4bac-9adb-b4b4a5c0a370", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"xMT0mO2KfyE1NLvObA3c1IKLSG1\"", + "ETag" : "\"ZymSngZNs5Mp1omWXu8SLhBPob2\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NzA=;sn=401870", - "x-ms-request-id" : "c63ef9d3-7c16-45a5-9c41-995e4f398bfa", - "Body" : "{\"etag\":\"xMT0mO2KfyE1NLvObA3c1IKLSG1\",\"key\":\"key4521528133e\",\"label\":\"65ad50bf51860b\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "27999f61-48d9-4d73-8179-6e8a3c1f3299", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NjM=;sn=448663", + "x-ms-request-id" : "8e846148-c6f8-4bac-9adb-b4b4a5c0a370", + "Body" : "{\"etag\":\"ZymSngZNs5Mp1omWXu8SLhBPob2\",\"key\":\"key82052858927\",\"label\":\"a85ce4e0792005\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "747d22b5-0e13-4ed5-87c8-278b68fc355a", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key45215", "65ad50bf", "key4521528133e", "65ad50bf25369c", "65ad50bf51860b" ] + "variables" : [ "key82052", "a85ce4e0", "key82052858927", "a85ce4e0792005", "a85ce4e029636e" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setReadOnly.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setReadOnly.json index cf4c2d589de2..f4102f5d1d70 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setReadOnly.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setReadOnly.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key9056490174b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3011481254a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7af19e97-6b7c-4978-8635-aca2d43556be", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9e467885-bf48-4129-ad6d-b6252211b26f", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "aeae0d53-bc54-40f8-aef1-b24b1712cb40", + "x-ms-correlation-request-id" : "c9341319-90d9-49a1-a75c-fe8dc335f0ab", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"vGjJyUdcJ60Q2m9Z53kxNY0gHwf\"", + "ETag" : "\"lg2zBVJVHpYYtb8Qwsb0Jre9YYP\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzg=;sn=402078", - "x-ms-request-id" : "aeae0d53-bc54-40f8-aef1-b24b1712cb40", - "Body" : "{\"etag\":\"vGjJyUdcJ60Q2m9Z53kxNY0gHwf\",\"key\":\"key9056490174b\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:05+00:00\"}", - "x-ms-client-request-id" : "7af19e97-6b7c-4978-8635-aca2d43556be", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4Nzc=;sn=448877", + "x-ms-request-id" : "c9341319-90d9-49a1-a75c-fe8dc335f0ab", + "Body" : "{\"etag\":\"lg2zBVJVHpYYtb8Qwsb0Jre9YYP\",\"key\":\"key3011481254a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "9e467885-bf48-4129-ad6d-b6252211b26f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key9056490174b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key3011481254a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d70edc4f-7e53-4c0d-9128-8860387ba8b3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "77bfa814-39c7-43d8-8f6c-10c97141db9f", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "adf57678-7c5a-48bb-bc7d-ee576a127045", + "x-ms-correlation-request-id" : "3cf7e7b9-c9f2-4ea4-a700-9c0b3135c12b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"La37M9cWDVeayHffK1car98yxvM\"", + "ETag" : "\"R2P9m4am4TyhPtPUG6lkHtiqfh4\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzk=;sn=402079", - "x-ms-request-id" : "adf57678-7c5a-48bb-bc7d-ee576a127045", - "Body" : "{\"etag\":\"La37M9cWDVeayHffK1car98yxvM\",\"key\":\"key9056490174b\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":true,\"last_modified\":\"2019-10-08T18:00:05+00:00\"}", - "x-ms-client-request-id" : "d70edc4f-7e53-4c0d-9128-8860387ba8b3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4Nzg=;sn=448878", + "x-ms-request-id" : "3cf7e7b9-c9f2-4ea4-a700-9c0b3135c12b", + "Body" : "{\"etag\":\"R2P9m4am4TyhPtPUG6lkHtiqfh4\",\"key\":\"key3011481254a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":true,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "77bfa814-39c7-43d8-8f6c-10c97141db9f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key9056490174b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3011481254a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "44856358-8e96-42fe-99d8-41e730394507", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dd4b5c3b-80f3-413c-903c-af597fc59151", "Content-Type" : "application/json" }, "Response" : { @@ -77,24 +77,24 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "409", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "0b6b670f-017f-4cca-bf09-05771398b729", + "x-ms-correlation-request-id" : "593d77a5-f212-49dc-810c-1dbfbb4b67ef", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "x-ms-request-id" : "0b6b670f-017f-4cca-bf09-05771398b729", - "Body" : "{\"type\":\"https://azconfig.io/errors/key-locked\",\"title\":\"Modifing key 'key9056490174b' is not allowed\",\"name\":\"key9056490174b\",\"detail\":\"The key is read-only. To allow modification unlock it first.\",\"status\":409}", - "x-ms-client-request-id" : "44856358-8e96-42fe-99d8-41e730394507", + "x-ms-request-id" : "593d77a5-f212-49dc-810c-1dbfbb4b67ef", + "Body" : "{\"type\":\"https://azconfig.io/errors/key-locked\",\"title\":\"Modifing key 'key3011481254a' is not allowed\",\"name\":\"key3011481254a\",\"detail\":\"The key is read-only. To allow modification unlock it first.\",\"status\":409}", + "x-ms-client-request-id" : "dd4b5c3b-80f3-413c-903c-af597fc59151", "Content-Type" : "application/vnd.microsoft.azconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key90564%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key30114%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b12913ba-907a-40fd-b325-f21fe2d20591", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0faf0de5-e4d8-4fb1-9fc3-a66ac38eac30", "Content-Type" : "application/json" }, "Response" : { @@ -105,25 +105,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "03390468-0de8-461a-8c5e-b277aafa1890", + "x-ms-correlation-request-id" : "bb041e57-16b9-49b7-89ea-ae1252c10b80", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzk=;sn=402079", - "x-ms-request-id" : "03390468-0de8-461a-8c5e-b277aafa1890", - "Body" : "{\"items\":[{\"etag\":\"La37M9cWDVeayHffK1car98yxvM\",\"key\":\"key9056490174b\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":true,\"last_modified\":\"2019-10-08T18:00:05+00:00\"}]}", - "x-ms-client-request-id" : "b12913ba-907a-40fd-b325-f21fe2d20591", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4Nzg=;sn=448878", + "x-ms-request-id" : "bb041e57-16b9-49b7-89ea-ae1252c10b80", + "Body" : "{\"items\":[{\"etag\":\"R2P9m4am4TyhPtPUG6lkHtiqfh4\",\"key\":\"key3011481254a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":true,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}]}", + "x-ms-client-request-id" : "0faf0de5-e4d8-4fb1-9fc3-a66ac38eac30", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key9056490174b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key3011481254a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9baf2591-f101-4afb-92f3-73b7dbe0fab5", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bc6eda6b-2c43-439a-8756-523f1d4e1a77", "Content-Type" : "application/json" }, "Response" : { @@ -132,29 +132,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "90e2d166-fc8d-418a-bf1f-bbb02323c6bc", + "x-ms-correlation-request-id" : "6ae800e1-f0ab-4a15-90d9-8d3d8a8714be", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Zf9T9vsLbS3L3pnIqSEo2HrHrmO\"", + "ETag" : "\"MeTi3Tl3sz3D3oHUGpKv6HtkuHx\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwODA=;sn=402080", - "x-ms-request-id" : "90e2d166-fc8d-418a-bf1f-bbb02323c6bc", - "Body" : "{\"etag\":\"Zf9T9vsLbS3L3pnIqSEo2HrHrmO\",\"key\":\"key9056490174b\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "9baf2591-f101-4afb-92f3-73b7dbe0fab5", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4Nzk=;sn=448879", + "x-ms-request-id" : "6ae800e1-f0ab-4a15-90d9-8d3d8a8714be", + "Body" : "{\"etag\":\"MeTi3Tl3sz3D3oHUGpKv6HtkuHx\",\"key\":\"key3011481254a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "bc6eda6b-2c43-439a-8756-523f1d4e1a77", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key9056490174b", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3011481254a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "808e918c-0154-4718-b0b5-4b62ab7ec892", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "12964cba-1a02-4539-bd05-25237cfaa6d1", "Content-Type" : "application/json" }, "Response" : { @@ -163,23 +163,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:06 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:05 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:19 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f120924f-4760-45a7-a40e-8967289044fb", + "x-ms-correlation-request-id" : "77c2ab22-d1ec-45fd-b88d-45c88ca14ab7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Zf9T9vsLbS3L3pnIqSEo2HrHrmO\"", + "ETag" : "\"MeTi3Tl3sz3D3oHUGpKv6HtkuHx\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwODE=;sn=402081", - "x-ms-request-id" : "f120924f-4760-45a7-a40e-8967289044fb", - "Body" : "{\"etag\":\"Zf9T9vsLbS3L3pnIqSEo2HrHrmO\",\"key\":\"key9056490174b\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:06+00:00\"}", - "x-ms-client-request-id" : "808e918c-0154-4718-b0b5-4b62ab7ec892", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4ODA=;sn=448880", + "x-ms-request-id" : "77c2ab22-d1ec-45fd-b88d-45c88ca14ab7", + "Body" : "{\"etag\":\"MeTi3Tl3sz3D3oHUGpKv6HtkuHx\",\"key\":\"key3011481254a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:19+00:00\"}", + "x-ms-client-request-id" : "12964cba-1a02-4539-bd05-25237cfaa6d1", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key90564", "336abc89", "key9056490174b" ] + "variables" : [ "key30114", "4eca295d", "key3011481254a" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setReadOnlyWithConfigurationSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setReadOnlyWithConfigurationSetting.json index 6bb6a5431cdd..2fbd3c91feaf 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setReadOnlyWithConfigurationSetting.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setReadOnlyWithConfigurationSetting.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key30509299985", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2275341318f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9af2ba4d-4ae5-4aff-9bb4-71c0ab42ea29", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f8624044-8876-4421-adcf-0d79e4ca1543", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:01 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d90b8e64-9d53-490b-9f2c-04abdbade40c", + "x-ms-correlation-request-id" : "da644871-f8c6-4a6f-aad3-1a5dc41a0131", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ia9jNigFkzw16BEojwSDRyRt8BT\"", + "ETag" : "\"gej4rrESwosET2Eo0gcQ2uPwvSy\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Mzg=;sn=401938", - "x-ms-request-id" : "d90b8e64-9d53-490b-9f2c-04abdbade40c", - "Body" : "{\"etag\":\"ia9jNigFkzw16BEojwSDRyRt8BT\",\"key\":\"key30509299985\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}", - "x-ms-client-request-id" : "9af2ba4d-4ae5-4aff-9bb4-71c0ab42ea29", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MzE=;sn=448731", + "x-ms-request-id" : "da644871-f8c6-4a6f-aad3-1a5dc41a0131", + "Body" : "{\"etag\":\"gej4rrESwosET2Eo0gcQ2uPwvSy\",\"key\":\"key2275341318f\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}", + "x-ms-client-request-id" : "f8624044-8876-4421-adcf-0d79e4ca1543", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key30509299985", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key2275341318f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "09da3ffa-abe0-4711-95bc-0a5ed4a4826d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3999cdfd-fc4e-4221-88b2-00ef0f12ef86", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:01 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "30f2ba91-b3bc-4ca9-80d2-d5394ce31427", + "x-ms-correlation-request-id" : "d711176c-a886-4eb5-b1e1-21a6a6f83a23", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"7ZsaxIMFmPbwWiITDfPzdF6qbiY\"", + "ETag" : "\"CYP7pgSCGF7HXALQD6zSw5uWGST\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Mzk=;sn=401939", - "x-ms-request-id" : "30f2ba91-b3bc-4ca9-80d2-d5394ce31427", - "Body" : "{\"etag\":\"7ZsaxIMFmPbwWiITDfPzdF6qbiY\",\"key\":\"key30509299985\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":true,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}", - "x-ms-client-request-id" : "09da3ffa-abe0-4711-95bc-0a5ed4a4826d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MzI=;sn=448732", + "x-ms-request-id" : "d711176c-a886-4eb5-b1e1-21a6a6f83a23", + "Body" : "{\"etag\":\"CYP7pgSCGF7HXALQD6zSw5uWGST\",\"key\":\"key2275341318f\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":true,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}", + "x-ms-client-request-id" : "3999cdfd-fc4e-4221-88b2-00ef0f12ef86", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key30509299985", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2275341318f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e8327149-8930-4d6f-a8ea-07e34590d1d2", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "87d05921-b1fd-4ac1-9c9c-bf7e3cd93838", "Content-Type" : "application/json" }, "Response" : { @@ -77,24 +77,24 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "409", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "770f63ec-39f4-4ecb-9d8b-5c94358c1b1e", + "x-ms-correlation-request-id" : "a58a97ef-1d71-4c3c-8151-c3a31ca4ad16", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "x-ms-request-id" : "770f63ec-39f4-4ecb-9d8b-5c94358c1b1e", - "Body" : "{\"type\":\"https://azconfig.io/errors/key-locked\",\"title\":\"Modifing key 'key30509299985' is not allowed\",\"name\":\"key30509299985\",\"detail\":\"The key is read-only. To allow modification unlock it first.\",\"status\":409}", - "x-ms-client-request-id" : "e8327149-8930-4d6f-a8ea-07e34590d1d2", + "x-ms-request-id" : "a58a97ef-1d71-4c3c-8151-c3a31ca4ad16", + "Body" : "{\"type\":\"https://azconfig.io/errors/key-locked\",\"title\":\"Modifing key 'key2275341318f' is not allowed\",\"name\":\"key2275341318f\",\"detail\":\"The key is read-only. To allow modification unlock it first.\",\"status\":409}", + "x-ms-client-request-id" : "87d05921-b1fd-4ac1-9c9c-bf7e3cd93838", "Content-Type" : "application/vnd.microsoft.azconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key30509%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key22753%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1af3c4b0-fda7-499f-bdba-e05ae6e76ddb", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "06cc7358-b0e2-416f-bf27-7f546ba4099f", "Content-Type" : "application/json" }, "Response" : { @@ -105,25 +105,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c4d34252-0273-416a-89cf-b87be3c8bb0e", + "x-ms-correlation-request-id" : "9749e65c-fcb7-40b9-b232-86782d4ed2df", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5Mzk=;sn=401939", - "x-ms-request-id" : "c4d34252-0273-416a-89cf-b87be3c8bb0e", - "Body" : "{\"items\":[{\"etag\":\"7ZsaxIMFmPbwWiITDfPzdF6qbiY\",\"key\":\"key30509299985\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":true,\"last_modified\":\"2019-10-08T17:59:50+00:00\"}]}", - "x-ms-client-request-id" : "1af3c4b0-fda7-499f-bdba-e05ae6e76ddb", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MzI=;sn=448732", + "x-ms-request-id" : "9749e65c-fcb7-40b9-b232-86782d4ed2df", + "Body" : "{\"items\":[{\"etag\":\"CYP7pgSCGF7HXALQD6zSw5uWGST\",\"key\":\"key2275341318f\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":true,\"last_modified\":\"2019-10-19T00:46:01+00:00\"}]}", + "x-ms-client-request-id" : "06cc7358-b0e2-416f-bf27-7f546ba4099f", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key30509299985", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/locks/key2275341318f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b03a101b-218b-4612-b831-10ac15e6de0d", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "eb4f2a6e-8d46-43f8-bfb7-2c0d8f6a699a", "Content-Type" : "application/json" }, "Response" : { @@ -132,29 +132,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2a2ac49a-f879-4b83-a025-34ca2738d812", + "x-ms-correlation-request-id" : "7aa41fd0-7c2b-4ea3-a24b-3807c08aef22", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"P0eqCUpbWtQtaXUgCifccOHvAVi\"", + "ETag" : "\"kwiKPgPh79PwVECMJUHfioCi2kv\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NDA=;sn=401940", - "x-ms-request-id" : "2a2ac49a-f879-4b83-a025-34ca2738d812", - "Body" : "{\"etag\":\"P0eqCUpbWtQtaXUgCifccOHvAVi\",\"key\":\"key30509299985\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "b03a101b-218b-4612-b831-10ac15e6de0d", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MzM=;sn=448733", + "x-ms-request-id" : "7aa41fd0-7c2b-4ea3-a24b-3807c08aef22", + "Body" : "{\"etag\":\"kwiKPgPh79PwVECMJUHfioCi2kv\",\"key\":\"key2275341318f\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "eb4f2a6e-8d46-43f8-bfb7-2c0d8f6a699a", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key30509299985", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key2275341318f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f0903ce0-529b-4a84-be21-00dc9515190f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a7e405a5-4f9c-464c-87c9-1c65edc1e515", "Content-Type" : "application/json" }, "Response" : { @@ -163,23 +163,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b2ed5985-5cb6-4b4c-9a08-6dc5df0184eb", + "x-ms-correlation-request-id" : "8e7c513c-2751-4bc2-a730-94a99d757c0f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"P0eqCUpbWtQtaXUgCifccOHvAVi\"", + "ETag" : "\"kwiKPgPh79PwVECMJUHfioCi2kv\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NDE=;sn=401941", - "x-ms-request-id" : "b2ed5985-5cb6-4b4c-9a08-6dc5df0184eb", - "Body" : "{\"etag\":\"P0eqCUpbWtQtaXUgCifccOHvAVi\",\"key\":\"key30509299985\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "f0903ce0-529b-4a84-be21-00dc9515190f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MzQ=;sn=448734", + "x-ms-request-id" : "8e7c513c-2751-4bc2-a730-94a99d757c0f", + "Body" : "{\"etag\":\"kwiKPgPh79PwVECMJUHfioCi2kv\",\"key\":\"key2275341318f\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "a7e405a5-4f9c-464c-87c9-1c65edc1e515", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key30509", "44b0591a", "key30509299985" ] + "variables" : [ "key22753", "be827f6b", "key2275341318f" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSetting.json index 8ac05b280aa5..abb85d5efca1 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSetting.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSetting.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8417899698e", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key26160938028", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "48365e45-4f2f-4a73-a251-3f8dfc3cf991", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ad3e00a0-5917-4680-91c8-81bd1bef2470", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:03 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:16 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:16 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6231f7b4-c0bb-4568-ab90-6042ea5d2f3d", + "x-ms-correlation-request-id" : "d650c547-1745-4b0e-a662-a8e24d88e38d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"JfDtd3SyxWREBueMzI0qanY89ps\"", + "ETag" : "\"3wbaUkQ8zQcL5LsGXePoDQjtcwS\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzA=;sn=402070", - "x-ms-request-id" : "6231f7b4-c0bb-4568-ab90-6042ea5d2f3d", - "Body" : "{\"etag\":\"JfDtd3SyxWREBueMzI0qanY89ps\",\"key\":\"key8417899698e\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:03+00:00\"}", - "x-ms-client-request-id" : "48365e45-4f2f-4a73-a251-3f8dfc3cf991", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NjU=;sn=448865", + "x-ms-request-id" : "d650c547-1745-4b0e-a662-a8e24d88e38d", + "Body" : "{\"etag\":\"3wbaUkQ8zQcL5LsGXePoDQjtcwS\",\"key\":\"key26160938028\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}", + "x-ms-client-request-id" : "ad3e00a0-5917-4680-91c8-81bd1bef2470", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8417899698e?label=747f664b538537", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key26160938028?label=22ed9fef271509", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7ba0367e-9663-4c82-8486-206f7b26f88e", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b20389cb-9a8b-49db-b02d-c79a32309c6d", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:03 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:16 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:16 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "75a9da80-7453-4960-877e-b4a0efccaa08", + "x-ms-correlation-request-id" : "0dd054b5-7a45-42e0-a959-61438baa6008", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"TbbXx7XCDCq4v3VTjUhfiFDUV83\"", + "ETag" : "\"amAjiD4Ng3my9Zr6mIc4d4Jv0nQ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzE=;sn=402071", - "x-ms-request-id" : "75a9da80-7453-4960-877e-b4a0efccaa08", - "Body" : "{\"etag\":\"TbbXx7XCDCq4v3VTjUhfiFDUV83\",\"key\":\"key8417899698e\",\"label\":\"747f664b538537\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:03+00:00\"}", - "x-ms-client-request-id" : "7ba0367e-9663-4c82-8486-206f7b26f88e", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NjY=;sn=448866", + "x-ms-request-id" : "0dd054b5-7a45-42e0-a959-61438baa6008", + "Body" : "{\"etag\":\"amAjiD4Ng3my9Zr6mIc4d4Jv0nQ\",\"key\":\"key26160938028\",\"label\":\"22ed9fef271509\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}", + "x-ms-client-request-id" : "b20389cb-9a8b-49db-b02d-c79a32309c6d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key84178%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key26160%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "dc2f592f-e7bc-4e61-869d-7d0600415413", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9c6f8423-003d-4b64-ade1-23f12384e20d", "Content-Type" : "application/json" }, "Response" : { @@ -77,25 +77,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:16 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3cdf61bf-7291-4d7f-add4-d18ce9d26f7b", + "x-ms-correlation-request-id" : "8aca5e1a-60c9-4282-b001-067fe7b2b59f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzE=;sn=402071", - "x-ms-request-id" : "3cdf61bf-7291-4d7f-add4-d18ce9d26f7b", - "Body" : "{\"items\":[{\"etag\":\"JfDtd3SyxWREBueMzI0qanY89ps\",\"key\":\"key8417899698e\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:03+00:00\"},{\"etag\":\"TbbXx7XCDCq4v3VTjUhfiFDUV83\",\"key\":\"key8417899698e\",\"label\":\"747f664b538537\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:03+00:00\"}]}", - "x-ms-client-request-id" : "dc2f592f-e7bc-4e61-869d-7d0600415413", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4NjY=;sn=448866", + "x-ms-request-id" : "8aca5e1a-60c9-4282-b001-067fe7b2b59f", + "Body" : "{\"items\":[{\"etag\":\"3wbaUkQ8zQcL5LsGXePoDQjtcwS\",\"key\":\"key26160938028\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"},{\"etag\":\"amAjiD4Ng3my9Zr6mIc4d4Jv0nQ\",\"key\":\"key26160938028\",\"label\":\"22ed9fef271509\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}]}", + "x-ms-client-request-id" : "9c6f8423-003d-4b64-ade1-23f12384e20d", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8417899698e", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key26160938028", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9dd9364b-44dc-4590-bb82-4c32cc5aa916", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "582dc435-f34d-4096-b70c-563170d94e8b", "Content-Type" : "application/json" }, "Response" : { @@ -104,29 +104,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:03 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:16 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:16 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d9804b7b-1727-4090-bfe6-14507fd5074a", + "x-ms-correlation-request-id" : "b306a01d-16c9-4dbc-abfe-91567d1660b7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"JfDtd3SyxWREBueMzI0qanY89ps\"", + "ETag" : "\"3wbaUkQ8zQcL5LsGXePoDQjtcwS\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzI=;sn=402072", - "x-ms-request-id" : "d9804b7b-1727-4090-bfe6-14507fd5074a", - "Body" : "{\"etag\":\"JfDtd3SyxWREBueMzI0qanY89ps\",\"key\":\"key8417899698e\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:03+00:00\"}", - "x-ms-client-request-id" : "9dd9364b-44dc-4590-bb82-4c32cc5aa916", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4Njc=;sn=448867", + "x-ms-request-id" : "b306a01d-16c9-4dbc-abfe-91567d1660b7", + "Body" : "{\"etag\":\"3wbaUkQ8zQcL5LsGXePoDQjtcwS\",\"key\":\"key26160938028\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}", + "x-ms-client-request-id" : "582dc435-f34d-4096-b70c-563170d94e8b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8417899698e?label=747f664b538537", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key26160938028?label=22ed9fef271509", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "dadc2879-cf19-497e-af38-9eec8dc91a82", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b114cf66-7d6f-407b-977e-5ce9f0774c47", "Content-Type" : "application/json" }, "Response" : { @@ -135,23 +135,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 18:00:03 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:16 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:16 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d8de8df4-61c3-4aa1-8805-8ea4d30db764", + "x-ms-correlation-request-id" : "e44cd6f2-f75c-4004-878d-2309ccde4167", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"TbbXx7XCDCq4v3VTjUhfiFDUV83\"", + "ETag" : "\"amAjiD4Ng3my9Zr6mIc4d4Jv0nQ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDIwNzM=;sn=402073", - "x-ms-request-id" : "d8de8df4-61c3-4aa1-8805-8ea4d30db764", - "Body" : "{\"etag\":\"TbbXx7XCDCq4v3VTjUhfiFDUV83\",\"key\":\"key8417899698e\",\"label\":\"747f664b538537\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T18:00:03+00:00\"}", - "x-ms-client-request-id" : "dadc2879-cf19-497e-af38-9eec8dc91a82", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg4Njg=;sn=448868", + "x-ms-request-id" : "e44cd6f2-f75c-4004-878d-2309ccde4167", + "Body" : "{\"etag\":\"amAjiD4Ng3my9Zr6mIc4d4Jv0nQ\",\"key\":\"key26160938028\",\"label\":\"22ed9fef271509\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:16+00:00\"}", + "x-ms-client-request-id" : "b114cf66-7d6f-407b-977e-5ce9f0774c47", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key84178", "747f664b", "key8417899698e", "747f664b538537" ] + "variables" : [ "key26160", "22ed9fef", "key26160938028", "22ed9fef271509" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyKey.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyKey.json index 78ddbd60d92a..d4b39524e12b 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyKey.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyKey.json @@ -3,8 +3,8 @@ "Method" : "PUT", "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "79f8d137-27b7-4d92-b1a5-0367dc6bedd4", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1ff6cc77-abac-48f6-9552-ebbaa4ac06cc", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "405", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "aa8fc1bf-a60a-4ce1-82cb-3a93b9fe4baf", + "x-ms-correlation-request-id" : "4a59a7f4-df29-4764-b171-56f0c06ebd1c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "aa8fc1bf-a60a-4ce1-82cb-3a93b9fe4baf", - "x-ms-client-request-id" : "79f8d137-27b7-4d92-b1a5-0367dc6bedd4" + "x-ms-request-id" : "4a59a7f4-df29-4764-b171-56f0c06ebd1c", + "x-ms-client-request-id" : "1ff6cc77-abac-48f6-9552-ebbaa4ac06cc" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key67129%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key87741%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a861117b-44ac-43aa-94a9-c43a57240606", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "43fe3b67-f00b-4652-9b63-02d15d7f48f2", "Content-Type" : "application/json" }, "Response" : { @@ -41,18 +41,18 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 18:00:02 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:15 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c6f261ee-b612-45d4-994e-3c58b120c4ae", + "x-ms-correlation-request-id" : "419464a2-4ab2-4375-8edd-0b883973b9ae", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "x-ms-request-id" : "c6f261ee-b612-45d4-994e-3c58b120c4ae", + "x-ms-request-id" : "419464a2-4ab2-4375-8edd-0b883973b9ae", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "a861117b-44ac-43aa-94a9-c43a57240606", + "x-ms-client-request-id" : "43fe3b67-f00b-4652-9b63-02d15d7f48f2", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key67129", "6ef77939" ] + "variables" : [ "key87741", "16d2bdd3" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyValue.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyValue.json index 9c0f4cb4f5a8..1447834c0068 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyValue.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyValue.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0885623471a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key11524055564", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1ee1307a-fb5b-4eee-a419-3122d70897e5", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "67faf4d5-9b0e-46df-9c5b-d0f280df48bb", "Content-Type" : "application/json" }, "Response" : { @@ -13,29 +13,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ce8c88e9-dac5-4687-9756-21957b2a621c", + "x-ms-correlation-request-id" : "2d017365-8efb-41e9-8ed6-685f8c4a9cbd", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"cr658u6Gg460YYzJ8rsRiMf70oN\"", + "ETag" : "\"o7hagpN7lReUrFJXVYGKU24Hhml\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NzE=;sn=401871", - "x-ms-request-id" : "ce8c88e9-dac5-4687-9756-21957b2a621c", - "Body" : "{\"etag\":\"cr658u6Gg460YYzJ8rsRiMf70oN\",\"key\":\"key0885623471a\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "1ee1307a-fb5b-4eee-a419-3122d70897e5", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NjQ=;sn=448664", + "x-ms-request-id" : "2d017365-8efb-41e9-8ed6-685f8c4a9cbd", + "Body" : "{\"etag\":\"o7hagpN7lReUrFJXVYGKU24Hhml\",\"key\":\"key11524055564\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "67faf4d5-9b0e-46df-9c5b-d0f280df48bb", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0885623471a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key11524055564", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e56e033f-8881-4ceb-b4c1-797d86ec7956", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "280fe897-daf4-4abf-9abe-c2fbcf283d74", "Content-Type" : "application/json" }, "Response" : { @@ -44,29 +44,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "0e7293af-580a-4e55-abff-4b93c579f12c", + "x-ms-correlation-request-id" : "a0449015-0fc0-493a-8234-6a77f454e756", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"cr658u6Gg460YYzJ8rsRiMf70oN\"", + "ETag" : "\"o7hagpN7lReUrFJXVYGKU24Hhml\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NzE=;sn=401871", - "x-ms-request-id" : "0e7293af-580a-4e55-abff-4b93c579f12c", - "Body" : "{\"etag\":\"cr658u6Gg460YYzJ8rsRiMf70oN\",\"key\":\"key0885623471a\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "e56e033f-8881-4ceb-b4c1-797d86ec7956", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NjQ=;sn=448664", + "x-ms-request-id" : "a0449015-0fc0-493a-8234-6a77f454e756", + "Body" : "{\"etag\":\"o7hagpN7lReUrFJXVYGKU24Hhml\",\"key\":\"key11524055564\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "280fe897-daf4-4abf-9abe-c2fbcf283d74", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0885623471a-1", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key11524055564-1", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d0f2d9b6-cfb8-4de8-b18c-ae71872a4871", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9fd563e0-a053-4c6b-adfc-0aafef5c70c9", "Content-Type" : "application/json" }, "Response" : { @@ -75,29 +75,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "db2344d3-5383-4397-b793-da3708486305", + "x-ms-correlation-request-id" : "008ac4df-6dec-4020-8c8b-627122930648", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"HrM6Rd0ZKkNGxuTNPJuObI5l01L\"", + "ETag" : "\"YOVdNEP6FcMdVw8InnfW2VKcLWc\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NzI=;sn=401872", - "x-ms-request-id" : "db2344d3-5383-4397-b793-da3708486305", - "Body" : "{\"etag\":\"HrM6Rd0ZKkNGxuTNPJuObI5l01L\",\"key\":\"key0885623471a-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "d0f2d9b6-cfb8-4de8-b18c-ae71872a4871", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NjU=;sn=448665", + "x-ms-request-id" : "008ac4df-6dec-4020-8c8b-627122930648", + "Body" : "{\"etag\":\"YOVdNEP6FcMdVw8InnfW2VKcLWc\",\"key\":\"key11524055564-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "9fd563e0-a053-4c6b-adfc-0aafef5c70c9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0885623471a-1", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key11524055564-1", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "20d3dafe-2d8d-40ea-9749-367b0cda5f3f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9583bde3-0cf4-4a87-a70c-7714b4bea635", "Content-Type" : "application/json" }, "Response" : { @@ -106,29 +106,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "36681ae0-a083-45cb-baa4-b2cae857a7b6", + "x-ms-correlation-request-id" : "17f3f296-6e55-4968-9c0e-1ebdd7af269f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"HrM6Rd0ZKkNGxuTNPJuObI5l01L\"", + "ETag" : "\"YOVdNEP6FcMdVw8InnfW2VKcLWc\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NzI=;sn=401872", - "x-ms-request-id" : "36681ae0-a083-45cb-baa4-b2cae857a7b6", - "Body" : "{\"etag\":\"HrM6Rd0ZKkNGxuTNPJuObI5l01L\",\"key\":\"key0885623471a-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "20d3dafe-2d8d-40ea-9749-367b0cda5f3f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NjU=;sn=448665", + "x-ms-request-id" : "17f3f296-6e55-4968-9c0e-1ebdd7af269f", + "Body" : "{\"etag\":\"YOVdNEP6FcMdVw8InnfW2VKcLWc\",\"key\":\"key11524055564-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "9583bde3-0cf4-4a87-a70c-7714b4bea635", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key08856%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key11524%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3492572d-2458-4fd4-8d39-264f97b43666", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0cc1a477-bedd-44be-a53f-81d02d53557d", "Content-Type" : "application/json" }, "Response" : { @@ -139,25 +139,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f91b48db-ad7b-466e-af64-74db68baf0bd", + "x-ms-correlation-request-id" : "2f52176b-64d7-4a4b-9bde-c74fac62245b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NzI=;sn=401872", - "x-ms-request-id" : "f91b48db-ad7b-466e-af64-74db68baf0bd", - "Body" : "{\"items\":[{\"etag\":\"cr658u6Gg460YYzJ8rsRiMf70oN\",\"key\":\"key0885623471a\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"},{\"etag\":\"HrM6Rd0ZKkNGxuTNPJuObI5l01L\",\"key\":\"key0885623471a-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}]}", - "x-ms-client-request-id" : "3492572d-2458-4fd4-8d39-264f97b43666", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NjU=;sn=448665", + "x-ms-request-id" : "2f52176b-64d7-4a4b-9bde-c74fac62245b", + "Body" : "{\"items\":[{\"etag\":\"o7hagpN7lReUrFJXVYGKU24Hhml\",\"key\":\"key11524055564\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"},{\"etag\":\"YOVdNEP6FcMdVw8InnfW2VKcLWc\",\"key\":\"key11524055564-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}]}", + "x-ms-client-request-id" : "0cc1a477-bedd-44be-a53f-81d02d53557d", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0885623471a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key11524055564", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "dd40d347-509f-48ad-bf71-931994f4341c", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0123b634-3325-403d-a088-7ac8586abb2a", "Content-Type" : "application/json" }, "Response" : { @@ -166,29 +166,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "0ef7657a-c2bc-4906-b749-9227976f8804", + "x-ms-correlation-request-id" : "9880abec-3489-40b4-94f6-cc96b37d76df", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"cr658u6Gg460YYzJ8rsRiMf70oN\"", + "ETag" : "\"o7hagpN7lReUrFJXVYGKU24Hhml\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NzM=;sn=401873", - "x-ms-request-id" : "0ef7657a-c2bc-4906-b749-9227976f8804", - "Body" : "{\"etag\":\"cr658u6Gg460YYzJ8rsRiMf70oN\",\"key\":\"key0885623471a\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "dd40d347-509f-48ad-bf71-931994f4341c", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2NjY=;sn=448666", + "x-ms-request-id" : "9880abec-3489-40b4-94f6-cc96b37d76df", + "Body" : "{\"etag\":\"o7hagpN7lReUrFJXVYGKU24Hhml\",\"key\":\"key11524055564\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "0123b634-3325-403d-a088-7ac8586abb2a", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0885623471a-1", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key11524055564-1", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e3fb1ef9-6b78-4db3-a061-8a3e28500262", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "eb712c9e-5749-4beb-ae25-bbe9b7812b2a", "Content-Type" : "application/json" }, "Response" : { @@ -197,23 +197,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:45:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:41 GMT", + "Date" : "Sat, 19 Oct 2019 00:45:54 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "93ab3268-6b79-4131-95f7-35ca27c39d9a", + "x-ms-correlation-request-id" : "ae4a71e4-1689-4a8e-84a9-072766a3d500", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"HrM6Rd0ZKkNGxuTNPJuObI5l01L\"", + "ETag" : "\"YOVdNEP6FcMdVw8InnfW2VKcLWc\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE4NzQ=;sn=401874", - "x-ms-request-id" : "93ab3268-6b79-4131-95f7-35ca27c39d9a", - "Body" : "{\"etag\":\"HrM6Rd0ZKkNGxuTNPJuObI5l01L\",\"key\":\"key0885623471a-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:41+00:00\"}", - "x-ms-client-request-id" : "e3fb1ef9-6b78-4db3-a061-8a3e28500262", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg2Njc=;sn=448667", + "x-ms-request-id" : "ae4a71e4-1689-4a8e-84a9-072766a3d500", + "Body" : "{\"etag\":\"YOVdNEP6FcMdVw8InnfW2VKcLWc\",\"key\":\"key11524055564-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:45:54+00:00\"}", + "x-ms-client-request-id" : "eb712c9e-5749-4beb-ae25-bbe9b7812b2a", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key08856", "3b127a46", "key0885623471a" ] + "variables" : [ "key11524", "bff3323f", "key11524055564" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingIfEtag.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingIfEtag.json index 4ea16b103395..18ac200f1b3d 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingIfEtag.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingIfEtag.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key04396155290", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1767045048a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "343e13bf-5d73-46c4-92e5-954f76ca57a9", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cf5fa12a-986c-471e-b344-b2f5c4a63d4f", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9af0e48c-80b6-4250-91a8-ff2efc8b87f8", + "x-ms-correlation-request-id" : "05f5c6bc-a157-4af1-adee-2b3eeb0d2c99", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "9af0e48c-80b6-4250-91a8-ff2efc8b87f8", - "x-ms-client-request-id" : "343e13bf-5d73-46c4-92e5-954f76ca57a9" + "x-ms-request-id" : "05f5c6bc-a157-4af1-adee-2b3eeb0d2c99", + "x-ms-client-request-id" : "cf5fa12a-986c-471e-b344-b2f5c4a63d4f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key04396155290", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1767045048a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5f54a616-0812-4c8e-bc52-cab7d2dce480", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f6c24256-0ee8-4670-9944-430dbac3081d", "Content-Type" : "application/json" }, "Response" : { @@ -39,29 +39,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9913d424-26c0-4145-9eef-8fdf1daf473a", + "x-ms-correlation-request-id" : "58f29efc-703e-4d21-8775-913138c74996", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"xqe1cg7bfaDtpCB8ZEbE4Nb43sp\"", + "ETag" : "\"JMokzMY9bt3pSz55DXuft4E3UPl\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NDI=;sn=401942", - "x-ms-request-id" : "9913d424-26c0-4145-9eef-8fdf1daf473a", - "Body" : "{\"etag\":\"xqe1cg7bfaDtpCB8ZEbE4Nb43sp\",\"key\":\"key04396155290\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "5f54a616-0812-4c8e-bc52-cab7d2dce480", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MzU=;sn=448735", + "x-ms-request-id" : "58f29efc-703e-4d21-8775-913138c74996", + "Body" : "{\"etag\":\"JMokzMY9bt3pSz55DXuft4E3UPl\",\"key\":\"key1767045048a\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "f6c24256-0ee8-4670-9944-430dbac3081d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key04396155290", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1767045048a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "51082168-99af-42d7-b9fa-4ec243094ab6", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "84e2e5a7-892c-4de4-a443-6abd80166851", "Content-Type" : "application/json" }, "Response" : { @@ -70,29 +70,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f7f848d5-3979-4878-9818-6977d91f4653", + "x-ms-correlation-request-id" : "b1e6ebb7-701c-4f7e-8e72-d4c4615d19b6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"QbewLzRHYBLyyYfimSOIOiiac9u\"", + "ETag" : "\"hurtxD1UeWBMagIbmIUEnO6uZua\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NDM=;sn=401943", - "x-ms-request-id" : "f7f848d5-3979-4878-9818-6977d91f4653", - "Body" : "{\"etag\":\"QbewLzRHYBLyyYfimSOIOiiac9u\",\"key\":\"key04396155290\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "51082168-99af-42d7-b9fa-4ec243094ab6", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MzY=;sn=448736", + "x-ms-request-id" : "b1e6ebb7-701c-4f7e-8e72-d4c4615d19b6", + "Body" : "{\"etag\":\"hurtxD1UeWBMagIbmIUEnO6uZua\",\"key\":\"key1767045048a\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "84e2e5a7-892c-4de4-a443-6abd80166851", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key04396155290", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1767045048a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7c8d1c2a-a940-4db4-b5f3-311db0ee2854", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "311e5ef3-cc99-40a9-8876-c798fd8cca9e", "Content-Type" : "application/json" }, "Response" : { @@ -102,23 +102,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "781b206c-15cd-4460-89cb-33a774967517", + "x-ms-correlation-request-id" : "44ae64bd-db85-41e6-aa54-c8cf0d5dda79", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "781b206c-15cd-4460-89cb-33a774967517", - "x-ms-client-request-id" : "7c8d1c2a-a940-4db4-b5f3-311db0ee2854" + "x-ms-request-id" : "44ae64bd-db85-41e6-aa54-c8cf0d5dda79", + "x-ms-client-request-id" : "311e5ef3-cc99-40a9-8876-c798fd8cca9e" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key04396155290", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1767045048a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "db877cb1-8c00-4825-a20b-925545884876", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c5a41c4f-a1e3-4863-9ce8-5d6c59472fd5", "Content-Type" : "application/json" }, "Response" : { @@ -127,29 +127,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "e462c205-ad2d-4dd5-89db-2f5b28fecef8", + "x-ms-correlation-request-id" : "71265bd1-f02f-410d-bb0a-bfa8053b29b6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"QbewLzRHYBLyyYfimSOIOiiac9u\"", + "ETag" : "\"hurtxD1UeWBMagIbmIUEnO6uZua\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NDM=;sn=401943", - "x-ms-request-id" : "e462c205-ad2d-4dd5-89db-2f5b28fecef8", - "Body" : "{\"etag\":\"QbewLzRHYBLyyYfimSOIOiiac9u\",\"key\":\"key04396155290\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "db877cb1-8c00-4825-a20b-925545884876", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3MzY=;sn=448736", + "x-ms-request-id" : "71265bd1-f02f-410d-bb0a-bfa8053b29b6", + "Body" : "{\"etag\":\"hurtxD1UeWBMagIbmIUEnO6uZua\",\"key\":\"key1767045048a\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "c5a41c4f-a1e3-4863-9ce8-5d6c59472fd5", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key04396155290?label=21e67f5a084033", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1767045048a?label=bb8fa5fd705404", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9f01a8f3-8014-42b9-9731-4777ae75ee05", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "994f54f9-448e-4abd-8452-49c9b1b52e1e", "Content-Type" : "application/json" }, "Response" : { @@ -159,23 +159,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d60c2943-0693-423f-be9a-34b6deeb09ff", + "x-ms-correlation-request-id" : "98babd8f-6fc7-4fc6-b99e-559ceb7b39d0", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "d60c2943-0693-423f-be9a-34b6deeb09ff", - "x-ms-client-request-id" : "9f01a8f3-8014-42b9-9731-4777ae75ee05" + "x-ms-request-id" : "98babd8f-6fc7-4fc6-b99e-559ceb7b39d0", + "x-ms-client-request-id" : "994f54f9-448e-4abd-8452-49c9b1b52e1e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key04396155290?label=21e67f5a084033", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1767045048a?label=bb8fa5fd705404", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e69b0a0a-f8f8-4f45-a5d3-9ee3fdd2c945", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6aa4c172-6e20-4d87-8e44-8bf94cc6172b", "Content-Type" : "application/json" }, "Response" : { @@ -184,29 +184,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "e5af2dcd-e7d1-4230-8122-f3a5868cfb27", + "x-ms-correlation-request-id" : "0d8aac14-1cd0-418e-959e-6f2521089464", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"x3BsgjOdMno4o01pOlJpsSM1pS7\"", + "ETag" : "\"A1HLwljZjcIm6O7WQTI0PslhA4U\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NDQ=;sn=401944", - "x-ms-request-id" : "e5af2dcd-e7d1-4230-8122-f3a5868cfb27", - "Body" : "{\"etag\":\"x3BsgjOdMno4o01pOlJpsSM1pS7\",\"key\":\"key04396155290\",\"label\":\"21e67f5a084033\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "e69b0a0a-f8f8-4f45-a5d3-9ee3fdd2c945", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Mzc=;sn=448737", + "x-ms-request-id" : "0d8aac14-1cd0-418e-959e-6f2521089464", + "Body" : "{\"etag\":\"A1HLwljZjcIm6O7WQTI0PslhA4U\",\"key\":\"key1767045048a\",\"label\":\"bb8fa5fd705404\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "6aa4c172-6e20-4d87-8e44-8bf94cc6172b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key04396155290?label=21e67f5a084033", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1767045048a?label=bb8fa5fd705404", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "124f3e7d-bed4-4d2e-b6a3-82557fd542fa", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "33e4662d-ad2c-4694-a61a-fb64a7ac0472", "Content-Type" : "application/json" }, "Response" : { @@ -215,29 +215,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "cb7831d7-72e9-4d6c-9131-dd9d60934fba", + "x-ms-correlation-request-id" : "fe485ea4-ed5b-4452-988b-053e35d430dc", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"J9CwFVPAQYE9smEg9341MzAtQ1U\"", + "ETag" : "\"Q3qmetYgmnYFr9NkMRN9FJ4wiRH\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NDU=;sn=401945", - "x-ms-request-id" : "cb7831d7-72e9-4d6c-9131-dd9d60934fba", - "Body" : "{\"etag\":\"J9CwFVPAQYE9smEg9341MzAtQ1U\",\"key\":\"key04396155290\",\"label\":\"21e67f5a084033\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "124f3e7d-bed4-4d2e-b6a3-82557fd542fa", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Mzg=;sn=448738", + "x-ms-request-id" : "fe485ea4-ed5b-4452-988b-053e35d430dc", + "Body" : "{\"etag\":\"Q3qmetYgmnYFr9NkMRN9FJ4wiRH\",\"key\":\"key1767045048a\",\"label\":\"bb8fa5fd705404\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "33e4662d-ad2c-4694-a61a-fb64a7ac0472", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key04396155290?label=21e67f5a084033", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1767045048a?label=bb8fa5fd705404", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f5208896-a277-4726-bf38-ebb9485da6d6", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "17919d6d-1747-401b-a318-64d64dd41283", "Content-Type" : "application/json" }, "Response" : { @@ -247,23 +247,23 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c8b82fef-df6f-491d-b717-a00538930ec8", + "x-ms-correlation-request-id" : "fc9f8ad6-2673-4838-b825-fb16b6dbb3c6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", "Content-Length" : "0", - "x-ms-request-id" : "c8b82fef-df6f-491d-b717-a00538930ec8", - "x-ms-client-request-id" : "f5208896-a277-4726-bf38-ebb9485da6d6" + "x-ms-request-id" : "fc9f8ad6-2673-4838-b825-fb16b6dbb3c6", + "x-ms-client-request-id" : "17919d6d-1747-401b-a318-64d64dd41283" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key04396155290?label=21e67f5a084033", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1767045048a?label=bb8fa5fd705404", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b339ebf8-98fa-4d62-baaa-70ee2928ce1f", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "00b10ab5-5409-4e62-a9d8-356a7ee10180", "Content-Type" : "application/json" }, "Response" : { @@ -272,29 +272,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6a83d819-6e3e-4088-a85b-b71e7651011d", + "x-ms-correlation-request-id" : "d6f689a6-bf9f-4dbe-a440-93e88f9d2508", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"J9CwFVPAQYE9smEg9341MzAtQ1U\"", + "ETag" : "\"Q3qmetYgmnYFr9NkMRN9FJ4wiRH\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NDU=;sn=401945", - "x-ms-request-id" : "6a83d819-6e3e-4088-a85b-b71e7651011d", - "Body" : "{\"etag\":\"J9CwFVPAQYE9smEg9341MzAtQ1U\",\"key\":\"key04396155290\",\"label\":\"21e67f5a084033\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "b339ebf8-98fa-4d62-baaa-70ee2928ce1f", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Mzg=;sn=448738", + "x-ms-request-id" : "d6f689a6-bf9f-4dbe-a440-93e88f9d2508", + "Body" : "{\"etag\":\"Q3qmetYgmnYFr9NkMRN9FJ4wiRH\",\"key\":\"key1767045048a\",\"label\":\"bb8fa5fd705404\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "00b10ab5-5409-4e62-a9d8-356a7ee10180", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key04396%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key17670%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "764d20ca-065c-47f6-a583-f65e8b39be60", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "95730a3d-d3e0-4dfb-ba5e-eb22ea2f7af3", "Content-Type" : "application/json" }, "Response" : { @@ -305,25 +305,25 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d1a16531-395e-48df-a2f7-ef04dca36dac", + "x-ms-correlation-request-id" : "edde6b5e-504f-4183-8fb0-e1849be18354", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NDU=;sn=401945", - "x-ms-request-id" : "d1a16531-395e-48df-a2f7-ef04dca36dac", - "Body" : "{\"items\":[{\"etag\":\"QbewLzRHYBLyyYfimSOIOiiac9u\",\"key\":\"key04396155290\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"},{\"etag\":\"J9CwFVPAQYE9smEg9341MzAtQ1U\",\"key\":\"key04396155290\",\"label\":\"21e67f5a084033\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}]}", - "x-ms-client-request-id" : "764d20ca-065c-47f6-a583-f65e8b39be60", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Mzg=;sn=448738", + "x-ms-request-id" : "edde6b5e-504f-4183-8fb0-e1849be18354", + "Body" : "{\"items\":[{\"etag\":\"hurtxD1UeWBMagIbmIUEnO6uZua\",\"key\":\"key1767045048a\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"},{\"etag\":\"Q3qmetYgmnYFr9NkMRN9FJ4wiRH\",\"key\":\"key1767045048a\",\"label\":\"bb8fa5fd705404\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}]}", + "x-ms-client-request-id" : "95730a3d-d3e0-4dfb-ba5e-eb22ea2f7af3", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key04396155290", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1767045048a?label=bb8fa5fd705404", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c5b70ee7-0cb9-43a4-adf1-188d9cda0db3", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "43f0ce6a-037b-473f-a754-1c06973ddeb4", "Content-Type" : "application/json" }, "Response" : { @@ -332,29 +332,29 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c8ed3f39-0086-49e3-b10c-3d106b7e9169", + "x-ms-correlation-request-id" : "88db8c85-cb34-49c3-97ed-0ced4ab94556", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"QbewLzRHYBLyyYfimSOIOiiac9u\"", + "ETag" : "\"Q3qmetYgmnYFr9NkMRN9FJ4wiRH\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NDc=;sn=401947", - "x-ms-request-id" : "c8ed3f39-0086-49e3-b10c-3d106b7e9169", - "Body" : "{\"etag\":\"QbewLzRHYBLyyYfimSOIOiiac9u\",\"key\":\"key04396155290\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "c5b70ee7-0cb9-43a4-adf1-188d9cda0db3", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3Mzk=;sn=448739", + "x-ms-request-id" : "88db8c85-cb34-49c3-97ed-0ced4ab94556", + "Body" : "{\"etag\":\"Q3qmetYgmnYFr9NkMRN9FJ4wiRH\",\"key\":\"key1767045048a\",\"label\":\"bb8fa5fd705404\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "43f0ce6a-037b-473f-a754-1c06973ddeb4", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key04396155290?label=21e67f5a084033", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1767045048a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d4be2b0a-dd2a-48c3-a18f-67401c76dcfa", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1d2e2e8a-70ed-4756-b9e5-21f721396a2c", "Content-Type" : "application/json" }, "Response" : { @@ -363,23 +363,23 @@ "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Last-Modified" : "Sat, 19 Oct 2019 00:46:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:51 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:02 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c181d77b-de74-4fd1-9734-0ab432de30b7", + "x-ms-correlation-request-id" : "036ba83b-8b62-496c-9ff1-9c8311bbcbdd", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"J9CwFVPAQYE9smEg9341MzAtQ1U\"", + "ETag" : "\"hurtxD1UeWBMagIbmIUEnO6uZua\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=MDotMSM0MDE5NDg=;sn=401948", - "x-ms-request-id" : "c181d77b-de74-4fd1-9734-0ab432de30b7", - "Body" : "{\"etag\":\"J9CwFVPAQYE9smEg9341MzAtQ1U\",\"key\":\"key04396155290\",\"label\":\"21e67f5a084033\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-08T17:59:51+00:00\"}", - "x-ms-client-request-id" : "d4be2b0a-dd2a-48c3-a18f-67401c76dcfa", + "Sync-Token" : "zAJw6V16=MDotMSM0NDg3NDA=;sn=448740", + "x-ms-request-id" : "036ba83b-8b62-496c-9ff1-9c8311bbcbdd", + "Body" : "{\"etag\":\"hurtxD1UeWBMagIbmIUEnO6uZua\",\"key\":\"key1767045048a\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-19T00:46:02+00:00\"}", + "x-ms-client-request-id" : "1d2e2e8a-70ed-4756-b9e5-21f721396a2c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key04396", "21e67f5a", "key04396155290", "21e67f5a084033" ] + "variables" : [ "key17670", "bb8fa5fd", "key1767045048a", "bb8fa5fd705404" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingNullKey.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingNullKey.json index a0182f2f3c62..0c5152856c01 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingNullKey.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingNullKey.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "GET", - "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key23232%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key27847%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "36860f69-1dbd-4f5a-8993-626d7bd04d82", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.6 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "62b1ccff-980b-47ba-baf5-cd2d0b1ced75", "Content-Type" : "application/json" }, "Response" : { @@ -15,18 +15,18 @@ "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 08 Oct 2019 17:59:50 GMT", + "Date" : "Sat, 19 Oct 2019 00:46:01 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "0cd43df9-5e8a-4953-8619-1f324cfcdddf", + "x-ms-correlation-request-id" : "8845d7c6-6109-45fc-96d2-41d4ecd5d126", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "x-ms-request-id" : "0cd43df9-5e8a-4953-8619-1f324cfcdddf", + "x-ms-request-id" : "8845d7c6-6109-45fc-96d2-41d4ecd5d126", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "36860f69-1dbd-4f5a-8993-626d7bd04d82", + "x-ms-client-request-id" : "62b1ccff-980b-47ba-baf5-cd2d0b1ced75", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "key23232", "fca12a2d" ] + "variables" : [ "key27847", "620423f1" ] } \ No newline at end of file From f4922a40264e82480c8bcc2cdbe2e09253e60b00 Mon Sep 17 00:00:00 2001 From: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Date: Sat, 19 Oct 2019 10:09:04 -0700 Subject: [PATCH 24/64] Remove internal use method under implementations. (#5940) --- .../checkstyle/checkstyle-suppressions.xml | 1 + .../blob/batch/BlobBatchAsyncClient.java | 6 +- .../storage/blob/batch/BlobBatchClient.java | 7 +- .../cryptography/EncryptedBlobClient.java | 4 +- .../com/azure/storage/blob/BlobClient.java | 4 +- .../blob/BlobContainerAsyncClient.java | 10 +- .../storage/blob/BlobContainerClient.java | 18 +- .../storage/blob/BlobServiceAsyncClient.java | 15 +- .../azure/storage/blob/BlobServiceClient.java | 12 +- .../azure/storage/blob/HttpGetterInfo.java | 4 +- .../azure/storage/blob/UploadBufferPool.java | 6 +- .../blob/models/ParallelTransferOptions.java | 6 +- .../blob/specialized/AppendBlobClient.java | 7 +- .../blob/specialized/BlobAsyncClientBase.java | 4 +- .../blob/specialized/BlobClientBase.java | 32 +- .../BlobServiceSasSignatureValues.java | 35 ++- .../blob/specialized/BlockBlobClient.java | 11 +- .../specialized/DownloadAsyncResponse.java | 8 +- .../storage/blob/specialized/LeaseClient.java | 12 +- .../blob/specialized/PageBlobClient.java | 19 +- .../com/azure/storage/blob/SASTest.groovy | 61 ++-- .../blob/specialized/HelperTest.groovy | 21 +- .../common/StorageSharedKeyCredential.java | 33 +- .../com/azure/storage/common/Utility.java | 296 +----------------- .../common/implementation/Constants.java | 7 + .../implementation/StorageImplUtils.java | 253 +++++++++++++++ .../common/policy/RequestRetryOptions.java | 10 +- .../common/sas/AccountSasQueryParameters.java | 1 - .../common/sas/AccountSasSignatureValues.java | 18 +- .../common/sas/BaseSasQueryParameters.java | 2 +- .../src/main/java/module-info.java | 1 + ...SASTokenCredentialJavaDocCodeSnippets.java | 9 +- .../storage/file/DirectoryAsyncClient.java | 10 +- .../azure/storage/file/DirectoryClient.java | 18 +- .../azure/storage/file/FileAsyncClient.java | 10 +- .../com/azure/storage/file/FileClient.java | 29 +- .../azure/storage/file/FileClientBuilder.java | 5 +- .../storage/file/FileServiceAsyncClient.java | 4 +- .../azure/storage/file/FileServiceClient.java | 8 +- .../file/FileServiceClientBuilder.java | 5 +- .../file/FileServiceSasSignatureValues.java | 17 +- .../com/azure/storage/file/ShareClient.java | 22 +- .../storage/file/ShareClientBuilder.java | 5 +- .../azure/storage/queue/BuilderHelper.java | 4 +- .../azure/storage/queue/QueueAsyncClient.java | 6 +- .../com/azure/storage/queue/QueueClient.java | 20 +- .../storage/queue/QueueClientBuilder.java | 4 +- .../queue/QueueServiceAsyncClient.java | 4 +- .../storage/queue/QueueServiceClient.java | 12 +- .../queue/QueueServiceClientBuilder.java | 1 - .../queue/QueueServiceSasSignatureValues.java | 15 +- 51 files changed, 568 insertions(+), 564 deletions(-) create mode 100644 sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml index 85dcc3e00234..7bf100478e9d 100755 --- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml +++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml @@ -178,6 +178,7 @@ + diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java index 089f5de97167..58c20f41c43a 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java @@ -21,7 +21,7 @@ import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; import java.time.Duration; @@ -147,7 +147,7 @@ public PagedFlux> deleteBlobs(List blobUrls, DeleteSnapsh PagedFlux> deleteBlobsWithTimeout(List blobUrls, DeleteSnapshotsOptionType deleteOptions, Duration timeout, Context context) { return new PagedFlux<>(() -> - Utility.applyOptionalTimeout(submitDeleteBlobsBatch(blobUrls, deleteOptions, context), timeout)); + StorageImplUtils.applyOptionalTimeout(submitDeleteBlobsBatch(blobUrls, deleteOptions, context), timeout)); } private Mono>> submitDeleteBlobsBatch(List blobUrls, @@ -181,7 +181,7 @@ public PagedFlux> setBlobsAccessTier(List blobUrls, Acces PagedFlux> setBlobsAccessTierWithTimeout(List blobUrls, AccessTier accessTier, Duration timeout, Context context) { return new PagedFlux<>(() -> - Utility.applyOptionalTimeout(submitSetTierBatch(blobUrls, accessTier, context), timeout)); + StorageImplUtils.applyOptionalTimeout(submitSetTierBatch(blobUrls, accessTier, context), timeout)); } private Mono>> submitSetTierBatch(List blobUrls, AccessTier accessTier, diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClient.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClient.java index 27fc75877dae..1d650ee037f7 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClient.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClient.java @@ -12,8 +12,7 @@ import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.common.Utility; - +import com.azure.storage.common.implementation.StorageImplUtils; import java.time.Duration; import java.util.List; @@ -85,8 +84,8 @@ public void submitBatch(BlobBatch batch) { @ServiceMethod(returns = ReturnType.SINGLE) public Response submitBatchWithResponse(BlobBatch batch, boolean throwOnAnyFailure, Duration timeout, Context context) { - return Utility.blockWithOptionalTimeout(client.submitBatchWithResponse(batch, throwOnAnyFailure, context), - timeout); + return StorageImplUtils.blockWithOptionalTimeout(client.submitBatchWithResponse(batch, + throwOnAnyFailure, context), timeout); } /** diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClient.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClient.java index 9f7d7b40e9de..0d297ab773d0 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClient.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClient.java @@ -11,7 +11,7 @@ import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.ParallelTransferOptions; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; import java.io.UncheckedIOException; @@ -92,7 +92,7 @@ public void uploadFromFile(String filePath, ParallelTransferOptions parallelTran headers, metadata, tier, accessConditions); try { - Utility.blockWithOptionalTimeout(upload, timeout); + StorageImplUtils.blockWithOptionalTimeout(upload, timeout); } catch (UncheckedIOException e) { throw logger.logExceptionAsError(e); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java index d50887b48a36..6fd26cf88bba 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java @@ -14,7 +14,7 @@ import com.azure.storage.blob.specialized.BlockBlobClient; import com.azure.storage.blob.specialized.PageBlobClient; import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; import java.io.UncheckedIOException; @@ -135,7 +135,7 @@ public void uploadFromFile(String filePath, ParallelTransferOptions parallelTran filePath, parallelTransferOptions, headers, metadata, tier, accessConditions); try { - Utility.blockWithOptionalTimeout(upload, timeout); + StorageImplUtils.blockWithOptionalTimeout(upload, timeout); } catch (UncheckedIOException e) { throw logger.logExceptionAsError(e); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index 8ca108b7e7a1..d21d83b66e32 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -29,7 +29,7 @@ import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; import java.time.Duration; @@ -139,8 +139,8 @@ public BlobAsyncClient getBlobAsyncClient(String blobName) { */ public BlobAsyncClient getBlobAsyncClient(String blobName, String snapshot) { return new BlobAsyncClient(getHttpPipeline(), - Utility.appendToUrlPath(getBlobContainerUrl(), blobName).toString(), getServiceVersion(), getAccountName(), - getBlobContainerName(), blobName, snapshot, getCustomerProvidedKey()); + StorageImplUtils.appendToUrlPath(getBlobContainerUrl(), blobName).toString(), getServiceVersion(), + getAccountName(), getBlobContainerName(), blobName, snapshot, getCustomerProvidedKey()); } /** @@ -718,7 +718,7 @@ private Mono listBlobsFlatSegment(String Duration timeout) { options = options == null ? new ListBlobsOptions() : options; - return Utility.applyOptionalTimeout( + return StorageImplUtils.applyOptionalTimeout( this.azureBlobStorage.containers().listBlobFlatSegmentWithRestResponseAsync(null, options.getPrefix(), marker, options.getMaxResultsPerPage(), options.getDetails().toList(), null, null, Context.NONE), timeout); @@ -846,7 +846,7 @@ private Mono listBlobsHierarchySegme new UnsupportedOperationException("Including snapshots in a hierarchical listing is not supported.")); } - return Utility.applyOptionalTimeout( + return StorageImplUtils.applyOptionalTimeout( this.azureBlobStorage.containers().listBlobHierarchySegmentWithRestResponseAsync(null, delimiter, options.getPrefix(), marker, options.getMaxResultsPerPage(), options.getDetails().toList(), null, null, Context.NONE), diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 103d3fabe9df..efaa9b2a34bb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -17,7 +17,7 @@ import com.azure.storage.blob.models.ListBlobsOptions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; import java.time.Duration; @@ -178,7 +178,7 @@ public boolean exists() { public Response existsWithResponse(Duration timeout, Context context) { Mono> response = blobContainerAsyncClient.existsWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -213,7 +213,7 @@ public void create() { public Response createWithResponse(Map metadata, PublicAccessType accessType, Duration timeout, Context context) { Mono> response = blobContainerAsyncClient.createWithResponse(metadata, accessType, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -247,7 +247,7 @@ public Response deleteWithResponse(BlobContainerAccessConditions accessCon Context context) { Mono> response = blobContainerAsyncClient.deleteWithResponse(accessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -283,7 +283,7 @@ public Response getPropertiesWithResponse(LeaseAccessCo Mono> response = blobContainerAsyncClient .getPropertiesWithResponse(leaseAccessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -317,7 +317,7 @@ public Response setMetadataWithResponse(Map metadata, BlobContainerAccessConditions accessConditions, Duration timeout, Context context) { Mono> response = blobContainerAsyncClient.setMetadataWithResponse(metadata, accessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -356,7 +356,7 @@ public Response getAccessPolicyWithResponse( Mono> response = blobContainerAsyncClient .getAccessPolicyWithResponse(leaseAccessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -408,7 +408,7 @@ public Response setAccessPolicyWithResponse(PublicAccessType accessType, Mono> response = blobContainerAsyncClient .setAccessPolicyWithResponse(accessType, identifiers, accessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -558,6 +558,6 @@ public StorageAccountInfo getAccountInfo(Duration timeout) { public Response getAccountInfoWithResponse(Duration timeout, Context context) { Mono> response = blobContainerAsyncClient.getAccountInfoWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java index 8c5fad2f961d..effa314ed434 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java @@ -27,7 +27,8 @@ import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.UserDelegationKey; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; import java.time.Duration; @@ -111,8 +112,8 @@ public BlobContainerAsyncClient getBlobContainerAsyncClient(String containerName } return new BlobContainerAsyncClient(getHttpPipeline(), - Utility.appendToUrlPath(getAccountUrl(), containerName).toString(), getServiceVersion(), getAccountName(), - containerName, customerProvidedKey); + StorageImplUtils.appendToUrlPath(getAccountUrl(), containerName).toString(), getServiceVersion(), + getAccountName(), containerName, customerProvidedKey); } /** @@ -295,7 +296,7 @@ private Mono listBlobContainersSegmen ListBlobContainersOptions options, Duration timeout) { options = options == null ? new ListBlobContainersOptions() : options; - return Utility.applyOptionalTimeout( + return StorageImplUtils.applyOptionalTimeout( this.azureBlobStorage.services().listBlobContainersSegmentWithRestResponseAsync( options.getPrefix(), marker, options.getMaxResultsPerPage(), options.getDetails().toIncludeType(), null, null, Context.NONE), timeout); @@ -438,7 +439,7 @@ public Mono> getUserDelegationKeyWithResponse(Offset Mono> getUserDelegationKeyWithResponse(OffsetDateTime start, OffsetDateTime expiry, Context context) { - Utility.assertNotNull("expiry", expiry); + StorageImplUtils.assertNotNull("expiry", expiry); if (start != null && !start.isBefore(expiry)) { throw logger.logExceptionAsError( new IllegalArgumentException("`start` must be null or a datetime before `expiry`.")); @@ -446,8 +447,8 @@ Mono> getUserDelegationKeyWithResponse(OffsetDateTim return this.azureBlobStorage.services().getUserDelegationKeyWithRestResponseAsync( new KeyInfo() - .setStart(start == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(start)) - .setExpiry(Utility.ISO_8601_UTC_DATE_FORMATTER.format(expiry)), + .setStart(start == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(start)) + .setExpiry(Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiry)), null, null, context).map(rb -> new SimpleResponse<>(rb, rb.getValue())); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index a403aa378254..a418caae2769 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -17,7 +17,7 @@ import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.UserDelegationKey; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; import java.time.Duration; @@ -221,7 +221,7 @@ public Response getPropertiesWithResponse(Duration timeou Mono> response = blobServiceAsyncClient.getPropertiesWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -259,7 +259,7 @@ public Response setPropertiesWithResponse(BlobServiceProperties properties Context context) { Mono> response = blobServiceAsyncClient.setPropertiesWithResponse(properties, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -297,7 +297,7 @@ public Response getUserDelegationKeyWithResponse(OffsetDateTi Mono> response = blobServiceAsyncClient.getUserDelegationKeyWithResponse(start, expiry, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -333,7 +333,7 @@ public BlobServiceStatistics getStatistics() { public Response getStatisticsWithResponse(Duration timeout, Context context) { Mono> response = blobServiceAsyncClient.getStatisticsWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -361,7 +361,7 @@ public StorageAccountInfo getAccountInfo() { public Response getAccountInfoWithResponse(Duration timeout, Context context) { Mono> response = blobServiceAsyncClient.getAccountInfoWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HttpGetterInfo.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HttpGetterInfo.java index efba9e6f43ef..29ce7bc00cf4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HttpGetterInfo.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HttpGetterInfo.java @@ -5,8 +5,8 @@ import com.azure.core.util.Context; import com.azure.storage.blob.models.BlobAccessConditions; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import java.time.Duration; /** @@ -55,7 +55,7 @@ public Long getCount() { */ public HttpGetterInfo setCount(Long count) { if (count != null) { - Utility.assertInBounds("count", count, 0, Long.MAX_VALUE); + StorageImplUtils.assertInBounds("count", count, 0, Long.MAX_VALUE); } this.count = count; return this; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/UploadBufferPool.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/UploadBufferPool.java index 6f35d2e7006b..f9ad4a216618 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/UploadBufferPool.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/UploadBufferPool.java @@ -5,7 +5,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.specialized.BlockBlobClient; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Flux; import java.nio.ByteBuffer; @@ -59,13 +59,13 @@ final class UploadBufferPool { We only need one overflow buffer because the max size of a ByteBuffer is assumed to be the size as a buffer in the pool. */ - Utility.assertInBounds("numBuffs", numBuffs, 2, Integer.MAX_VALUE); + StorageImplUtils.assertInBounds("numBuffs", numBuffs, 2, Integer.MAX_VALUE); this.maxBuffs = numBuffs; buffers = new LinkedBlockingQueue<>(numBuffs); // These buffers will be used in calls to stageBlock, so they must be no greater than block size. - Utility.assertInBounds("buffSize", buffSize, 1, BlockBlobClient.MAX_STAGE_BLOCK_BYTES); + StorageImplUtils.assertInBounds("buffSize", buffSize, 1, BlockBlobClient.MAX_STAGE_BLOCK_BYTES); this.buffSize = buffSize; // We prep the queue with two buffers in case there is overflow. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java index 75176df184b9..20da1dccd513 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java @@ -5,7 +5,7 @@ import com.azure.storage.blob.ProgressReceiver; import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; public class ParallelTransferOptions { @@ -64,7 +64,7 @@ public ProgressReceiver getProgressReceiver() { * @throws IllegalArgumentException when block size is less than 0 or greater than max blob block size (10MB). */ public ParallelTransferOptions setBlockSize(int blockSize) { - Utility.assertInBounds("blockSize", blockSize, 0, BLOB_MAX_BLOCK_SIZE); + StorageImplUtils.assertInBounds("blockSize", blockSize, 0, BLOB_MAX_BLOCK_SIZE); this.blockSize = blockSize; return this; } @@ -80,7 +80,7 @@ public ParallelTransferOptions setBlockSize(int blockSize) { * @throws IllegalArgumentException when numBuffers is less than 2. */ public ParallelTransferOptions setNumBuffers(int numBuffers) { - Utility.assertInBounds("numBuffers", numBuffers, 2, Integer.MAX_VALUE); + StorageImplUtils.assertInBounds("numBuffers", numBuffers, 2, Integer.MAX_VALUE); this.numBuffers = numBuffers; return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 5d33ee53779b..41024d158c4f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -19,6 +19,7 @@ import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; @@ -119,7 +120,7 @@ public AppendBlobItem create() { */ public Response createWithResponse(BlobHttpHeaders headers, Map metadata, BlobAccessConditions accessConditions, Duration timeout, Context context) { - return Utility.blockWithOptionalTimeout(appendBlobAsyncClient. + return StorageImplUtils.blockWithOptionalTimeout(appendBlobAsyncClient. createWithResponse(headers, metadata, accessConditions, context), timeout); } @@ -169,7 +170,7 @@ public Response appendBlockWithResponse(InputStream data, long l Flux fbb = Utility.convertStreamToByteBuffer(data, length, MAX_APPEND_BLOCK_BYTES); Mono> response = appendBlobAsyncClient.appendBlockWithResponse( fbb.subscribeOn(Schedulers.elastic()), length, appendBlobAccessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -215,6 +216,6 @@ public Response appendBlockFromUrlWithResponse(String sourceUrl, SourceModifiedAccessConditions sourceAccessConditions, Duration timeout, Context context) { Mono> response = appendBlobAsyncClient.appendBlockFromUrlWithResponse(sourceUrl, sourceRange, sourceContentMD5, destAccessConditions, sourceAccessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index b940c83b38f3..85ddb887bf38 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -31,8 +31,8 @@ import com.azure.storage.blob.models.ReliableDownloadOptions; import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.blob.models.StorageAccountInfo; -import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; @@ -1047,7 +1047,7 @@ public Mono> setAccessTierWithResponse(AccessTier tier, Rehydrate Mono> setTierWithResponse(AccessTier tier, RehydratePriority priority, LeaseAccessConditions leaseAccessConditions, Context context) { - Utility.assertNotNull("tier", tier); + StorageImplUtils.assertNotNull("tier", tier); return this.azureBlobStorage.blobs().setTierWithRestResponseAsync( null, null, tier, null, priority, null, leaseAccessConditions, context) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 83bbedbdda63..85e6c3a5e5c1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -25,7 +25,7 @@ import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.ReliableDownloadOptions; import com.azure.storage.blob.models.StorageAccountInfo; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.Exceptions; import reactor.core.publisher.Mono; @@ -209,7 +209,7 @@ public Boolean exists() { public Response existsWithResponse(Duration timeout, Context context) { Mono> response = client.existsWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -261,7 +261,7 @@ public Response startCopyFromURLWithResponse(String sourceUrl, Map abortCopyFromURLWithResponse(String copyId, LeaseAccessCon Mono> response = client.abortCopyFromURLWithResponse(copyId, leaseAccessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -353,7 +353,7 @@ public Response copyFromURLWithResponse(String copySource, Map downloadWithResponse(OutputStream stream, BlobRange range, ReliableDownloadOptions options, BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Duration timeout, Context context) { - Utility.assertNotNull("stream", stream); + StorageImplUtils.assertNotNull("stream", stream); Mono> download = client .downloadWithResponse(range, options, accessConditions, rangeGetContentMD5, context) .flatMap(response -> response.getValue().reduce(stream, (outputStream, buffer) -> { @@ -411,7 +411,7 @@ public Response downloadWithResponse(OutputStream stream, BlobRange range, } }).thenReturn(new SimpleResponse<>(response, null))); - return Utility.blockWithOptionalTimeout(download, timeout); + return StorageImplUtils.blockWithOptionalTimeout(download, timeout); } /** @@ -475,7 +475,7 @@ public Response downloadToFileWithResponse(String filePath, Blob BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Duration timeout, Context context) { Mono> download = client.downloadToFileWithResponse(filePath, range, parallelTransferOptions, options, accessConditions, rangeGetContentMD5, context); - return Utility.blockWithOptionalTimeout(download, timeout); + return StorageImplUtils.blockWithOptionalTimeout(download, timeout); } /** @@ -515,7 +515,7 @@ public Response deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSna Mono> response = client .deleteWithResponse(deleteBlobSnapshotOptions, accessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -553,7 +553,7 @@ public Response getPropertiesWithResponse(BlobAccessConditions a Context context) { Mono> response = client.getPropertiesWithResponse(accessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -595,7 +595,7 @@ public Response setHttpHeadersWithResponse(BlobHttpHeaders headers, BlobAc Mono> response = client .setHttpHeadersWithResponse(headers, accessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -636,7 +636,7 @@ public Response setMetadataWithResponse(Map metadata, Blob Duration timeout, Context context) { Mono> response = client.setMetadataWithResponse(metadata, accessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -680,7 +680,7 @@ public Response createSnapshotWithResponse(Map m .createSnapshotWithResponse(metadata, accessConditions, context) .map(rb -> new SimpleResponse<>(rb, new BlobClientBase(rb.getValue()))); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -728,7 +728,7 @@ public Response setAccessTierWithResponse(AccessTier tier, RehydratePriori Mono> response = client.setTierWithResponse(tier, priority, leaseAccessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -762,7 +762,7 @@ public void undelete() { public Response undeleteWithResponse(Duration timeout, Context context) { Mono> response = client.undeleteWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -798,6 +798,6 @@ public StorageAccountInfo getAccountInfo() { public Response getAccountInfoWithResponse(Duration timeout, Context context) { Mono> response = client.getAccountInfoWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java index 41164b76854e..8d2bb20fc0c1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java @@ -9,13 +9,13 @@ import com.azure.storage.blob.BlobSasPermission; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.common.Utility; import com.azure.storage.common.sas.SasIpRange; import com.azure.storage.common.sas.SasProtocol; import java.time.OffsetDateTime; - /** * Used to generate a Shared Access Signature (SAS) for an Azure Blob Storage service. Once all the values here are set, * call {@link @@ -223,7 +223,7 @@ public String getPermissions() { * @throws NullPointerException if {@code permissions} is null. */ public BlobServiceSasSignatureValues setPermissions(BlobSasPermission permissions) { - Utility.assertNotNull("permissions", permissions); + StorageImplUtils.assertNotNull("permissions", permissions); this.permissions = permissions.toString(); return this; } @@ -236,7 +236,7 @@ public BlobServiceSasSignatureValues setPermissions(BlobSasPermission permission * @throws NullPointerException if {@code permissions} is null. */ public BlobServiceSasSignatureValues setPermissions(BlobContainerSasPermission permissions) { - Utility.assertNotNull("permissions", permissions); + StorageImplUtils.assertNotNull("permissions", permissions); this.permissions = permissions.toString(); return this; } @@ -472,7 +472,7 @@ public BlobServiceSasSignatureValues setContentType(String contentType) { */ public BlobServiceSasQueryParameters generateSasQueryParameters( StorageSharedKeyCredential storageSharedKeyCredentials) { - Utility.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); + StorageImplUtils.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); ensureState(); @@ -522,18 +522,21 @@ public BlobServiceSasQueryParameters generateSasQueryParameters( */ public BlobServiceSasQueryParameters generateSasQueryParameters(UserDelegationKey delegationKey, String accountName) { - Utility.assertNotNull("delegationKey", delegationKey); - Utility.assertNotNull("accountName", accountName); + StorageImplUtils.assertNotNull("delegationKey", delegationKey); + StorageImplUtils.assertNotNull("accountName", accountName); ensureState(); // Signature is generated on the un-url-encoded values. final String canonicalName = getCanonicalName(accountName); - String signature = Utility.computeHMac256(delegationKey.getValue(), stringToSign(delegationKey, canonicalName)); + String signature = StorageImplUtils.computeHMac256( + delegationKey.getValue(), stringToSign(delegationKey, canonicalName)); + return new BlobServiceSasQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, - this.sasIpRange, null /* identifier */, this.resource, this.permissions, signature, this.cacheControl, - this.contentDisposition, this.contentEncoding, this.contentLanguage, this.contentType, delegationKey); + this.sasIpRange, null /* identifier */, this.resource, this.permissions, signature, + this.cacheControl, this.contentDisposition, this.contentEncoding, this.contentLanguage, this.contentType, + delegationKey); } /** @@ -594,8 +597,8 @@ private String getCanonicalName(String account) { private String stringToSign(String canonicalName) { return String.join("\n", this.permissions == null ? "" : permissions, - this.startTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), - this.expiryTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), + this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), + this.expiryTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), canonicalName, this.identifier == null ? "" : this.identifier, this.sasIpRange == null ? "" : this.sasIpRange.toString(), @@ -614,13 +617,13 @@ private String stringToSign(String canonicalName) { private String stringToSign(final UserDelegationKey key, String canonicalName) { return String.join("\n", this.permissions == null ? "" : this.permissions, - this.startTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), - this.expiryTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), + this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), + this.expiryTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), canonicalName, key.getSignedOid() == null ? "" : key.getSignedOid(), key.getSignedTid() == null ? "" : key.getSignedTid(), - key.getSignedStart() == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedStart()), - key.getSignedExpiry() == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedExpiry()), + key.getSignedStart() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedStart()), + key.getSignedExpiry() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedExpiry()), key.getSignedService() == null ? "" : key.getSignedService(), key.getSignedVersion() == null ? "" : key.getSignedVersion(), this.sasIpRange == null ? "" : this.sasIpRange.toString(), diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java index 006520439b9c..dec7fc3bfd9b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java @@ -21,6 +21,7 @@ import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; @@ -156,7 +157,7 @@ public Response uploadWithResponse(InputStream data, long length, accessConditions, context); try { - return Utility.blockWithOptionalTimeout(upload, timeout); + return StorageImplUtils.blockWithOptionalTimeout(upload, timeout); } catch (UncheckedIOException e) { throw logger.logExceptionAsError(e); } @@ -211,7 +212,7 @@ public Response stageBlockWithResponse(String base64BlockID, InputStream d Mono> response = blockBlobAsyncClient.stageBlockWithResponse(base64BlockID, fbb.subscribeOn(Schedulers.elastic()), length, leaseAccessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -267,7 +268,7 @@ public Response stageBlockFromURLWithResponse(String base64BlockID, String SourceModifiedAccessConditions sourceModifiedAccessConditions, Duration timeout, Context context) { Mono> response = blockBlobAsyncClient.stageBlockFromURLWithResponse(base64BlockID, sourceUrl, sourceRange, sourceContentMD5, leaseAccessConditions, sourceModifiedAccessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -307,7 +308,7 @@ public Response listBlocksWithResponse(BlockListType listType, Mono> response = blockBlobAsyncClient.listBlocksWithResponse(listType, leaseAccessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -356,6 +357,6 @@ public Response commitBlockListWithResponse(List base64Bl Mono> response = blockBlobAsyncClient.commitBlockListWithResponse( base64BlockIDs, headers, metadata, tier, accessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java index e59878350865..c6bbe08a67a3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java @@ -7,7 +7,7 @@ import com.azure.storage.blob.HttpGetterInfo; import com.azure.storage.blob.models.BlobDownloadHeaders; import com.azure.storage.blob.models.ReliableDownloadOptions; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -41,9 +41,9 @@ public final class DownloadAsyncResponse { // The constructor is package-private because customers should not be creating their own responses. DownloadAsyncResponse(ResponseBase> response, HttpGetterInfo info, Function> getter) { - Utility.assertNotNull("getter", getter); - Utility.assertNotNull("info", info); - Utility.assertNotNull("info.eTag", info.getETag()); + StorageImplUtils.assertNotNull("getter", getter); + StorageImplUtils.assertNotNull("info", info); + StorageImplUtils.assertNotNull("info.eTag", info.getETag()); this.rawResponse = response; this.info = info; this.getter = getter; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java index bc01530be04c..ef349950fd5d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java @@ -11,8 +11,8 @@ import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.BlobContainerClient; import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import java.net.URL; import java.time.Duration; @@ -97,7 +97,7 @@ public String acquireLease(int duration) { @ServiceMethod(returns = ReturnType.SINGLE) public Response acquireLeaseWithResponse(int duration, ModifiedAccessConditions modifiedAccessConditions, Duration timeout, Context context) { - return Utility.blockWithOptionalTimeout(this.client + return StorageImplUtils.blockWithOptionalTimeout(this.client .acquireLeaseWithResponse(duration, modifiedAccessConditions, context), timeout); } @@ -132,7 +132,7 @@ public String renewLease() { @ServiceMethod(returns = ReturnType.SINGLE) public Response renewLeaseWithResponse(ModifiedAccessConditions modifiedAccessConditions, Duration timeout, Context context) { - return Utility.blockWithOptionalTimeout(this.client + return StorageImplUtils.blockWithOptionalTimeout(this.client .renewLeaseWithResponse(modifiedAccessConditions, context), timeout); } @@ -165,7 +165,7 @@ public void releaseLease() { @ServiceMethod(returns = ReturnType.SINGLE) public Response releaseLeaseWithResponse(ModifiedAccessConditions modifiedAccessConditions, Duration timeout, Context context) { - return Utility.blockWithOptionalTimeout(this.client + return StorageImplUtils.blockWithOptionalTimeout(this.client .releaseLeaseWithResponse(modifiedAccessConditions, context), timeout); } @@ -207,7 +207,7 @@ public Integer breakLease() { @ServiceMethod(returns = ReturnType.SINGLE) public Response breakLeaseWithResponse(Integer breakPeriodInSeconds, ModifiedAccessConditions modifiedAccessConditions, Duration timeout, Context context) { - return Utility.blockWithOptionalTimeout(this.client + return StorageImplUtils.blockWithOptionalTimeout(this.client .breakLeaseWithResponse(breakPeriodInSeconds, modifiedAccessConditions, context), timeout); } @@ -244,7 +244,7 @@ public String changeLease(String proposedId) { @ServiceMethod(returns = ReturnType.SINGLE) public Response changeLeaseWithResponse(String proposedId, ModifiedAccessConditions modifiedAccessConditions, Duration timeout, Context context) { - return Utility.blockWithOptionalTimeout(this.client + return StorageImplUtils.blockWithOptionalTimeout(this.client .changeLeaseWithResponse(proposedId, modifiedAccessConditions, context), timeout); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index 8d5d1c099ba6..e85ff562275a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -21,6 +21,7 @@ import com.azure.storage.blob.models.SequenceNumberActionType; import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; @@ -137,7 +138,7 @@ public Response createWithResponse(long size, Long sequenceNumber, Map metadata, BlobAccessConditions accessConditions, Duration timeout, Context context) { Mono> response = pageBlobAsyncClient.createWithResponse(size, sequenceNumber, headers, metadata, accessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -194,7 +195,7 @@ public Response uploadPagesWithResponse(PageRange pageRange, Input Mono> response = pageBlobAsyncClient.uploadPagesWithResponse(pageRange, fbb.subscribeOn(Schedulers.elastic()), pageBlobAccessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -255,7 +256,7 @@ public Response uploadPagesFromURLWithResponse(PageRange range, St Mono> response = pageBlobAsyncClient.uploadPagesFromURLWithResponse(range, sourceUrl, sourceOffset, sourceContentMD5, destAccessConditions, sourceAccessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -296,7 +297,7 @@ public Response clearPagesWithResponse(PageRange pageRange, Mono> response = pageBlobAsyncClient.clearPagesWithResponse(pageRange, pageBlobAccessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -330,7 +331,7 @@ public PageList getPageRanges(BlobRange blobRange) { */ public Response getPageRangesWithResponse(BlobRange blobRange, BlobAccessConditions accessConditions, Duration timeout, Context context) { - return Utility.blockWithOptionalTimeout(pageBlobAsyncClient + return StorageImplUtils.blockWithOptionalTimeout(pageBlobAsyncClient .getPageRangesWithResponse(blobRange, accessConditions, context), timeout); } @@ -373,7 +374,7 @@ public PageList getPageRangesDiff(BlobRange blobRange, String prevSnapshot) { */ public Response getPageRangesDiffWithResponse(BlobRange blobRange, String prevSnapshot, BlobAccessConditions accessConditions, Duration timeout, Context context) { - return Utility.blockWithOptionalTimeout(pageBlobAsyncClient + return StorageImplUtils.blockWithOptionalTimeout(pageBlobAsyncClient .getPageRangesDiffWithResponse(blobRange, prevSnapshot, accessConditions, context), timeout); } @@ -411,7 +412,7 @@ public PageBlobItem resize(long size) { public Response resizeWithResponse(long size, BlobAccessConditions accessConditions, Duration timeout, Context context) { Mono> response = pageBlobAsyncClient.resizeWithResponse(size, accessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -452,7 +453,7 @@ public Response updateSequenceNumberWithResponse(SequenceNumberAct Long sequenceNumber, BlobAccessConditions accessConditions, Duration timeout, Context context) { Mono> response = pageBlobAsyncClient .updateSequenceNumberWithResponse(action, sequenceNumber, accessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -502,6 +503,6 @@ public Response copyIncrementalWithResponse(String source, Strin ModifiedAccessConditions modifiedAccessConditions, Duration timeout, Context context) { Mono> response = pageBlobAsyncClient .copyIncrementalWithResponse(source, snapshot, modifiedAccessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy index f8830d44776b..857ffe3ee926 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy @@ -10,6 +10,8 @@ import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.blob.models.UserDelegationKey import com.azure.storage.blob.specialized.BlobServiceSasSignatureValues import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder +import com.azure.storage.common.Utility +import com.azure.storage.common.implementation.StorageImplUtils import com.azure.storage.common.sas.AccountSasResourceType import com.azure.storage.common.sas.AccountSasService import com.azure.storage.common.sas.AccountSasPermission @@ -18,7 +20,6 @@ import com.azure.storage.common.sas.SasProtocol import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.common.implementation.Constants -import com.azure.storage.common.Utility import com.azure.storage.common.sas.SasIpRange import spock.lang.Unroll @@ -670,16 +671,16 @@ class SASTest extends APISpec { */ where: startTime | identifier | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign - OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | null | null | null || "r\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | "id" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\nid\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | new SasIpRange() | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" - null | null | null | null | null | "control" | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\ncontrol\n\n\n\n" - null | null | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\ndisposition\n\n\n" - null | null | null | null | null | null | null | "encoding" | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\nencoding\n\n" - null | null | null | null | null | null | null | null | "language" | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\nlanguage\n" - null | null | null | null | null | null | null | null | null | "type" || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\ntype" + OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | null | null | null || "r\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | "id" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\nid\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | new SasIpRange() | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" + null | null | null | null | null | "control" | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\ncontrol\n\n\n\n" + null | null | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\ndisposition\n\n\n" + null | null | null | null | null | null | null | "encoding" | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\nencoding\n\n" + null | null | null | null | null | null | null | null | "language" | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\nlanguage\n" + null | null | null | null | null | null | null | null | null | "type" || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\ntype" } @Unroll @@ -721,28 +722,28 @@ class SASTest extends APISpec { def token = v.generateSasQueryParameters(key, primaryCredential.getAccountName()) then: - token.getSignature() == Utility.computeHMac256(key.getValue(), expected) + token.getSignature() == StorageImplUtils.computeHMac256(key.getValue(), expected) /* We test string to sign functionality directly related to user delegation sas specific parameters */ where: startTime | keyOid | keyTid | keyStart | keyExpiry | keyService | keyVersion | keyValue | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign - OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | "11111111-1111-1111-1111-111111111111" | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n11111111-1111-1111-1111-111111111111\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | "22222222-2222-2222-2222-222222222222" | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n22222222-2222-2222-2222-222222222222\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | null | null | null | "b" | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\nb\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | "2018-06-17" | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n2018-06-17\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | new SasIpRange() | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | "control" | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\ncontrol\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\ndisposition\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | "encoding" | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\nencoding\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | "language" | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\nlanguage\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | "type" || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\ntype" + OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | "11111111-1111-1111-1111-111111111111" | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n11111111-1111-1111-1111-111111111111\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | "22222222-2222-2222-2222-222222222222" | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n22222222-2222-2222-2222-222222222222\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | "b" | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\nb\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | "2018-06-17" | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n2018-06-17\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | new SasIpRange() | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | "control" | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\ncontrol\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\ndisposition\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | "encoding" | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\nencoding\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | "language" | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\nlanguage\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | "type" || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\ntype" } def "serviceSasSignatureValues IA"() { @@ -967,9 +968,9 @@ class SASTest extends APISpec { where: startTime | ipRange | protocol || expectedStringToSign - OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null || "%s" + "\nr\nb\no\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" - null | new SasIpRange() | null || "%s" + "\nr\nb\no\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" - null | null | SasProtocol.HTTPS_ONLY || "%s" + "\nr\nb\no\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" + OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null || "%s" + "\nr\nb\no\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" + null | new SasIpRange() | null || "%s" + "\nr\nb\no\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" + null | null | SasProtocol.HTTPS_ONLY || "%s" + "\nr\nb\no\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" } @Unroll diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy index dabe50a2b3f5..53e15aedfcaf 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy @@ -11,6 +11,7 @@ import com.azure.storage.blob.BlobServiceVersion import com.azure.storage.blob.BlobUrlParts import com.azure.storage.blob.models.BlobRange import com.azure.storage.blob.models.UserDelegationKey +import com.azure.storage.common.implementation.StorageImplUtils import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.common.Utility import com.azure.storage.common.implementation.Constants @@ -122,12 +123,12 @@ class HelperTest extends APISpec { if (startTime != null) { expectedStringToSign = String.format(expectedStringToSign, - Utility.ISO_8601_UTC_DATE_FORMATTER.format(startTime), - Utility.ISO_8601_UTC_DATE_FORMATTER.format(expiryTime), + Constants.ISO_8601_UTC_DATE_FORMATTER.format(startTime), + Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiryTime), primaryCredential.getAccountName()) } else { expectedStringToSign = String.format(expectedStringToSign, - Utility.ISO_8601_UTC_DATE_FORMATTER.format(expiryTime), + Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiryTime), primaryCredential.getAccountName()) } @@ -199,10 +200,10 @@ class HelperTest extends APISpec { BlobServiceSasQueryParameters token = v.generateSasQueryParameters(key, primaryCredential.getAccountName()) - expectedStringToSign = String.format(expectedStringToSign, Utility.ISO_8601_UTC_DATE_FORMATTER.format(v.getExpiryTime()), primaryCredential.getAccountName()) + expectedStringToSign = String.format(expectedStringToSign, Constants.ISO_8601_UTC_DATE_FORMATTER.format(v.getExpiryTime()), primaryCredential.getAccountName()) then: - token.getSignature() == Utility.computeHMac256(key.getValue(), expectedStringToSign) + token.getSignature() == StorageImplUtils.computeHMac256(key.getValue(), expectedStringToSign) /* We test string to sign functionality directly related to user delegation sas specific parameters @@ -210,7 +211,7 @@ class HelperTest extends APISpec { where: permissions | startTime | expiryTime | keyOid | keyTid | keyStart | keyExpiry | keyService | keyVersion | keyValue | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign new BlobSasPermission() | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n%s\n" + "/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" null | null | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" null | null | null | "11111111-1111-1111-1111-111111111111" | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n11111111-1111-1111-1111-111111111111\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" null | null | null | null | "22222222-2222-2222-2222-222222222222" | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n22222222-2222-2222-2222-222222222222\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" @@ -242,7 +243,7 @@ class HelperTest extends APISpec { } expectedStringToSign = String.format(expectedStringToSign, - Utility.ISO_8601_UTC_DATE_FORMATTER.format(expiryTime), + Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiryTime), primaryCredential.getAccountName()) when: @@ -461,9 +462,9 @@ class HelperTest extends APISpec { where: startTime | ipRange | protocol || expectedStringToSign - OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null || "%s\nr\nb\no\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" - null | new SasIpRange() | null || "%s\nr\nb\no\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" - null | null | SasProtocol.HTTPS_ONLY || "%s\nr\nb\no\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" + OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null || "%s\nr\nb\no\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" + null | new SasIpRange() | null || "%s\nr\nb\no\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" + null | null | SasProtocol.HTTPS_ONLY || "%s\nr\nb\no\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" } @Unroll diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/StorageSharedKeyCredential.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/StorageSharedKeyCredential.java index 948551f4744a..dbebb2545e22 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/StorageSharedKeyCredential.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/StorageSharedKeyCredential.java @@ -3,8 +3,12 @@ package com.azure.storage.common; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.implementation.util.ImplUtils; +import com.azure.storage.common.implementation.StorageImplUtils; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; @@ -88,7 +92,8 @@ public String getAccountName() { * @return the SharedKey authorization value */ public String generateAuthorizationHeader(URL requestURL, String httpMethod, Map headers) { - String signature = Utility.computeHMac256(accountKey, buildStringToSign(requestURL, httpMethod, headers)); + String signature = StorageImplUtils.computeHMac256(accountKey, + buildStringToSign(requestURL, httpMethod, headers)); return String.format(AUTHORIZATION_HEADER_FORMAT, accountName, signature); } @@ -102,7 +107,7 @@ public String generateAuthorizationHeader(URL requestURL, String httpMethod, Map * string, or the UTF-8 charset isn't supported. */ public String computeHmac256(final String stringToSign) { - return Utility.computeHMac256(accountKey, stringToSign); + return StorageImplUtils.computeHMac256(accountKey, stringToSign); } private String buildStringToSign(URL requestURL, String httpMethod, Map headers) { @@ -110,7 +115,8 @@ private String buildStringToSign(URL requestURL, String httpMethod, Map queryParams = Utility.parseQueryStringSplitValues(requestURL.getQuery()); + Map queryParams = StorageImplUtils.parseQueryStringSplitValues(requestURL.getQuery()); ArrayList queryParamNames = new ArrayList<>(queryParams.keySet()); Collections.sort(queryParamNames); @@ -203,4 +209,23 @@ private String getCanonicalizedResource(URL requestURL) { // append to main string builder the join of completed params with new line return canonicalizedResource.toString(); } + + /** + * Searches for a {@link StorageSharedKeyCredential} in the passed {@link HttpPipeline}. + * + * @param httpPipeline Pipeline being searched + * @return a StorageSharedKeyCredential if the pipeline contains one, otherwise null. + */ + public static StorageSharedKeyCredential getSharedKeyCredentialFromPipeline(HttpPipeline httpPipeline) { + for (int i = 0; i < httpPipeline.getPolicyCount(); i++) { + HttpPipelinePolicy httpPipelinePolicy = httpPipeline.getPolicy(i); + if (httpPipelinePolicy instanceof StorageSharedKeyCredentialPolicy) { + StorageSharedKeyCredentialPolicy storageSharedKeyCredentialPolicy = + (StorageSharedKeyCredentialPolicy) httpPipelinePolicy; + return storageSharedKeyCredentialPolicy.sharedKeyCredential(); + } + } + return null; + } + } diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java index 8f381a22cec0..1fc33ce660d3 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/Utility.java @@ -4,57 +4,28 @@ package com.azure.storage.common; import com.azure.core.exception.UnexpectedLengthException; -import com.azure.core.http.HttpHeader; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.implementation.http.UrlBuilder; import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -import javax.crypto.Mac; -import javax.crypto.spec.SecretKeySpec; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.net.MalformedURLException; -import java.net.URL; import java.net.URLDecoder; import java.net.URLEncoder; import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.time.Duration; import java.time.LocalDateTime; import java.time.OffsetDateTime; -import java.time.ZoneId; import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; -import java.util.Base64; import java.util.Locale; -import java.util.Map; -import java.util.TreeMap; -import java.util.function.Function; public final class Utility { private static final ClientLogger LOGGER = new ClientLogger(Utility.class); - private static final String DESERIALIZED_HEADERS = "deserializedHeaders"; - private static final String ETAG = "eTag"; private static final String UTF8_CHARSET = "UTF-8"; - private static final String ARGUMENT_NULL_OR_EMPTY = - "The argument must not be null or an empty string. Argument name: %s."; - private static final String PARAMETER_NOT_IN_RANGE = "The value of the parameter '%s' should be between %s and %s."; private static final String INVALID_DATE_STRING = "Invalid Date String: %s."; - private static final String NO_PATH_SEGMENTS = "URL %s does not contain path segments."; - public static final DateTimeFormatter ISO_8601_UTC_DATE_FORMATTER = - DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.ROOT).withZone(ZoneId.of("UTC")); /** * Stores a reference to the date/time pattern with the greatest precision Java.util.Date is capable of expressing. */ @@ -73,46 +44,6 @@ public final class Utility { private static final int MAX_PRECISION_DATESTRING_LENGTH = MAX_PRECISION_PATTERN.replaceAll("'", "") .length(); - /** - * Parses the query string into a key-value pair map that maintains key, query parameter key, order. The value is - * stored as a string (ex. key=val1,val2,val3 instead of key=[val1, val2, val3]). - * - * @param queryString Query string to parse - * @return a mapping of query string pieces as key-value pairs. - */ - public static Map parseQueryString(final String queryString) { - return parseQueryStringHelper(queryString, Utility::urlDecode); - } - - /** - * Parses the query string into a key-value pair map that maintains key, query parameter key, order. The value is - * stored as a parsed array (ex. key=[val1, val2, val3] instead of key=val1,val2,val3). - * - * @param queryString Query string to parse - * @return a mapping of query string pieces as key-value pairs. - */ - public static Map parseQueryStringSplitValues(final String queryString) { - return parseQueryStringHelper(queryString, (value) -> urlDecode(value).split(",")); - } - - private static Map parseQueryStringHelper(final String queryString, - Function valueParser) { - TreeMap pieces = new TreeMap<>(); - - if (ImplUtils.isNullOrEmpty(queryString)) { - return pieces; - } - - for (String kvp : queryString.split("&")) { - int equalIndex = kvp.indexOf("="); - String key = urlDecode(kvp.substring(0, equalIndex).toLowerCase(Locale.ROOT)); - T value = valueParser.apply(kvp.substring(equalIndex + 1)); - - pieces.putIfAbsent(key, value); - } - - return pieces; - } /** * Performs a safe decoding of the passed string, taking care to preserve each {@code +} character rather than @@ -216,81 +147,6 @@ private static String encode(final String stringToEncode) { } } - /** - * Blocks an asynchronous response with an optional timeout. - * - * @param response Asynchronous response to block - * @param timeout Optional timeout - * @param Return type of the asynchronous response - * @return the value of the asynchronous response - * @throws RuntimeException If the asynchronous response doesn't complete before the timeout expires. - */ - public static T blockWithOptionalTimeout(Mono response, Duration timeout) { - if (timeout == null) { - return response.block(); - } else { - return response.block(timeout); - } - } - - /** - * Applies a timeout to a publisher if the given timeout is not null. - * - * @param publisher Mono to apply optional timeout to. - * @param timeout Optional timeout. - * @param Return type of the Mono. - * @return Mono with an applied timeout, if any. - */ - public static Mono applyOptionalTimeout(Mono publisher, Duration timeout) { - return timeout == null - ? publisher - : publisher.timeout(timeout); - } - - /** - * Applies a timeout to a publisher if the given timeout is not null. - * - * @param publisher Flux to apply optional timeout to. - * @param timeout Optional timeout. - * @param Return type of the Flux. - * @return Flux with an applied timeout, if any. - */ - public static Flux applyOptionalTimeout(Flux publisher, Duration timeout) { - return timeout == null - ? publisher - : publisher.timeout(timeout); - } - - /** - * Asserts that a value is not {@code null}. - * - * @param param Name of the parameter - * @param value Value of the parameter - * @throws NullPointerException If {@code value} is {@code null} - */ - public static void assertNotNull(final String param, final Object value) { - if (value == null) { - throw new NullPointerException(String.format(Locale.ROOT, ARGUMENT_NULL_OR_EMPTY, param)); - } - } - - /** - * Asserts that the specified number is in the valid range. The range is inclusive. - * - * @param param Name of the parameter - * @param value Value of the parameter - * @param min The minimum allowed value - * @param max The maximum allowed value - * @throws IllegalArgumentException If {@code value} is less than {@code min} or {@code value} is greater than - * {@code max}. - */ - public static void assertInBounds(final String param, final long value, final long min, final long max) { - if (value < min || value > max) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format(Locale.ROOT, - PARAMETER_NOT_IN_RANGE, param, min, max))); - } - } - /** * Given a String representing a date in a form of the ISO8601 pattern, generates a Date representing it with up to * millisecond precision. @@ -329,157 +185,7 @@ public static OffsetDateTime parseDate(String dateString) { DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern, Locale.ROOT); return LocalDateTime.parse(dateString, formatter).atZone(ZoneOffset.UTC).toOffsetDateTime(); - } - - /** - * Wraps any potential error responses from the service and applies post processing of the response's eTag header to - * standardize the value. - * - * @param response Response from a service call - * @param errorWrapper Error wrapping function that is applied to the response - * @param Value type of the response - * @return an updated response with post processing steps applied. - */ - public static Mono postProcessResponse(Mono response, Function, Mono> errorWrapper) { - return scrubETagHeader(errorWrapper.apply(response)); - } - - /* - The service is inconsistent in whether or not the etag header value has quotes. This method will check if the - response returns an etag value, and if it does, remove any quotes that may be present to give the user a more - predictable format to work with. - */ - private static Mono scrubETagHeader(Mono unprocessedResponse) { - return unprocessedResponse.map(response -> { - String eTag = null; - - try { - Object headers = response.getClass().getMethod(DESERIALIZED_HEADERS).invoke(response); - Method eTagGetterMethod = headers.getClass().getMethod(ETAG); - eTag = (String) eTagGetterMethod.invoke(headers); - - if (eTag == null) { - return response; - } - - eTag = eTag.replace("\"", ""); - headers.getClass().getMethod(ETAG, String.class).invoke(headers, eTag); - } catch (NoSuchMethodException ex) { - // Response did not return an eTag value. - } catch (IllegalAccessException | InvocationTargetException ex) { - // Unable to access the method or the invoked method threw an exception. - } - - try { - HttpHeaders rawHeaders = (HttpHeaders) response.getClass().getMethod("getHeaders") - .invoke(response); - // - if (eTag != null) { - rawHeaders.put(ETAG, eTag); - } else { - HttpHeader eTagHeader = rawHeaders.get(ETAG); - if (eTagHeader != null && eTagHeader.getValue() != null) { - eTag = eTagHeader.getValue().replace("\"", ""); - rawHeaders.put(ETAG, eTag); - } - } - } catch (NoSuchMethodException e) { - // Response did not return an eTag value. No change necessary. - } catch (IllegalAccessException | InvocationTargetException e) { - // Unable to access the method or the invoked method threw an exception. - } - - return response; - }); - } - - /** - * Computes a signature for the specified string using the HMAC-SHA256 algorithm. - * - * @param base64Key Base64 encoded key used to sign the string - * @param stringToSign UTF-8 encoded string to sign - * @return the HMAC-SHA256 encoded signature - * @throws RuntimeException If the HMAC-SHA256 algorithm isn't support, if the key isn't a valid Base64 encoded - * string, or the UTF-8 charset isn't supported. - */ - public static String computeHMac256(final String base64Key, final String stringToSign) { - try { - byte[] key = Base64.getDecoder().decode(base64Key); - Mac hmacSHA256 = Mac.getInstance("HmacSHA256"); - hmacSHA256.init(new SecretKeySpec(key, "HmacSHA256")); - byte[] utf8Bytes = stringToSign.getBytes(StandardCharsets.UTF_8); - return Base64.getEncoder().encodeToString(hmacSHA256.doFinal(utf8Bytes)); - } catch (NoSuchAlgorithmException | InvalidKeyException ex) { - throw new RuntimeException(ex); - } - } - - /** - * Appends a string to the end of the passed URL's path. - * - * @param baseURL URL having a path appended - * @param name Name of the path - * @return a URL with the path appended. - * @throws IllegalArgumentException If {@code name} causes the URL to become malformed. - */ - public static URL appendToUrlPath(String baseURL, String name) { - UrlBuilder builder = UrlBuilder.parse(baseURL); - - if (builder.getPath() == null) { - builder.setPath("/"); - } else if (!builder.getPath().endsWith("/")) { - builder.setPath(builder.getPath() + "/"); - } - - builder.setPath(builder.getPath() + name); - - try { - return builder.toURL(); - } catch (MalformedURLException ex) { - throw new IllegalArgumentException(ex); - } - } - - /** - * Strips the last path segment from the passed URL. - * - * @param baseUrl URL having its last path segment stripped - * @return a URL with the path segment stripped. - * @throws IllegalArgumentException If stripping the last path segment causes the URL to become malformed or it - * doesn't contain any path segments. - */ - public static URL stripLastPathSegment(URL baseUrl) { - UrlBuilder builder = UrlBuilder.parse(baseUrl); - - if (builder.getPath() == null || !builder.getPath().contains("/")) { - throw new IllegalArgumentException(String.format(Locale.ROOT, NO_PATH_SEGMENTS, baseUrl)); - } - - builder.setPath(builder.getPath().substring(0, builder.getPath().lastIndexOf("/"))); - try { - return builder.toURL(); - } catch (MalformedURLException ex) { - throw new IllegalArgumentException(ex); - } - } - - /** - * Searches for a {@link StorageSharedKeyCredential} in the passed {@link HttpPipeline}. - * - * @param httpPipeline Pipeline being searched - * @return a StorageSharedKeyCredential if the pipeline contains one, otherwise null. - */ - public static StorageSharedKeyCredential getSharedKeyCredential(HttpPipeline httpPipeline) { - for (int i = 0; i < httpPipeline.getPolicyCount(); i++) { - HttpPipelinePolicy httpPipelinePolicy = httpPipeline.getPolicy(i); - if (httpPipelinePolicy instanceof StorageSharedKeyCredentialPolicy) { - StorageSharedKeyCredentialPolicy storageSharedKeyCredentialPolicy = - (StorageSharedKeyCredentialPolicy) httpPipelinePolicy; - return storageSharedKeyCredentialPolicy.sharedKeyCredential(); - } - } - return null; - } + } /** * A utility method for converting the input stream to Flux of ByteBuffer. Will check the equality of entity length diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java index 505f1bf87bf9..df5b6a0e3d2b 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java @@ -4,6 +4,9 @@ package com.azure.storage.common.implementation; import com.azure.storage.common.sas.SasProtocol; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; +import java.util.Locale; /** * Defines general constants. @@ -42,6 +45,10 @@ public final class Constants { public static final String ENUM_COULD_NOT_BE_PARSED_INVALID_VALUE = "%s could not be parsed from '%s' due to invalid value %s."; + + public static final DateTimeFormatter ISO_8601_UTC_DATE_FORMATTER = + DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.ROOT).withZone(ZoneId.of("UTC")); + private Constants() { } diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java new file mode 100644 index 000000000000..95e039a3dda8 --- /dev/null +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.implementation; + +import com.azure.core.implementation.http.UrlBuilder; +import com.azure.core.implementation.util.ImplUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.common.Utility; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.time.Duration; +import java.util.Base64; +import java.util.Locale; +import java.util.Map; +import java.util.TreeMap; +import java.util.function.Function; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; + +import static com.azure.storage.common.Utility.urlDecode; + +/** + * Utility class which is used internally. + */ +public class StorageImplUtils { + private static final ClientLogger LOGGER = new ClientLogger(StorageImplUtils.class); + + private static final String ARGUMENT_NULL_OR_EMPTY = + "The argument must not be null or an empty string. Argument name: %s."; + + private static final String PARAMETER_NOT_IN_RANGE = "The value of the parameter '%s' should be between %s and %s."; + + private static final String NO_PATH_SEGMENTS = "URL %s does not contain path segments."; + + /** + * Parses the query string into a key-value pair map that maintains key, query parameter key, order. The value is + * stored as a string (ex. key=val1,val2,val3 instead of key=[val1, val2, val3]). + * + * @param queryString Query string to parse + * @return a mapping of query string pieces as key-value pairs. + */ + public static Map parseQueryString(final String queryString) { + return parseQueryStringHelper(queryString, Utility::urlDecode); + } + + /** + * Parses the query string into a key-value pair map that maintains key, query parameter key, order. The value is + * stored as a parsed array (ex. key=[val1, val2, val3] instead of key=val1,val2,val3). + * + * @param queryString Query string to parse + * @return a mapping of query string pieces as key-value pairs. + */ + public static Map parseQueryStringSplitValues(final String queryString) { + return parseQueryStringHelper(queryString, (value) -> urlDecode(value).split(",")); + } + + private static Map parseQueryStringHelper(final String queryString, + Function valueParser) { + TreeMap pieces = new TreeMap<>(); + + if (com.azure.core.implementation.util.ImplUtils.isNullOrEmpty(queryString)) { + return pieces; + } + + for (String kvp : queryString.split("&")) { + int equalIndex = kvp.indexOf("="); + String key = urlDecode(kvp.substring(0, equalIndex).toLowerCase(Locale.ROOT)); + T value = valueParser.apply(kvp.substring(equalIndex + 1)); + + pieces.putIfAbsent(key, value); + } + + return pieces; + } + + /** + * Blocks an asynchronous response with an optional timeout. + * + * @param response Asynchronous response to block + * @param timeout Optional timeout + * @param Return type of the asynchronous response + * @return the value of the asynchronous response + * @throws RuntimeException If the asynchronous response doesn't complete before the timeout expires. + */ + public static T blockWithOptionalTimeout(Mono response, Duration timeout) { + if (timeout == null) { + return response.block(); + } else { + return response.block(timeout); + } + } + + /** + * Applies a timeout to a publisher if the given timeout is not null. + * + * @param publisher Mono to apply optional timeout to. + * @param timeout Optional timeout. + * @param Return type of the Mono. + * @return Mono with an applied timeout, if any. + */ + public static Mono applyOptionalTimeout(Mono publisher, Duration timeout) { + return timeout == null + ? publisher + : publisher.timeout(timeout); + } + + /** + * Applies a timeout to a publisher if the given timeout is not null. + * + * @param publisher Flux to apply optional timeout to. + * @param timeout Optional timeout. + * @param Return type of the Flux. + * @return Flux with an applied timeout, if any. + */ + public static Flux applyOptionalTimeout(Flux publisher, Duration timeout) { + return timeout == null + ? publisher + : publisher.timeout(timeout); + } + + /** + * Asserts that a value is not {@code null}. + * + * @param param Name of the parameter + * @param value Value of the parameter + * @throws NullPointerException If {@code value} is {@code null} + */ + public static void assertNotNull(final String param, final Object value) { + if (value == null) { + throw new NullPointerException(String.format(Locale.ROOT, ARGUMENT_NULL_OR_EMPTY, param)); + } + } + + /** + * Asserts that the specified number is in the valid range. The range is inclusive. + * + * @param param Name of the parameter + * @param value Value of the parameter + * @param min The minimum allowed value + * @param max The maximum allowed value + * @throws IllegalArgumentException If {@code value} is less than {@code min} or {@code value} is greater than + * {@code max}. + */ + public static void assertInBounds(final String param, final long value, final long min, final long max) { + if (value < min || value > max) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format(Locale.ROOT, + PARAMETER_NOT_IN_RANGE, param, min, max))); + } + } + + /** + * Computes a signature for the specified string using the HMAC-SHA256 algorithm. + * + * @param base64Key Base64 encoded key used to sign the string + * @param stringToSign UTF-8 encoded string to sign + * @return the HMAC-SHA256 encoded signature + * @throws RuntimeException If the HMAC-SHA256 algorithm isn't support, if the key isn't a valid Base64 encoded + * string, or the UTF-8 charset isn't supported. + */ + public static String computeHMac256(final String base64Key, final String stringToSign) { + try { + byte[] key = Base64.getDecoder().decode(base64Key); + Mac hmacSHA256 = Mac.getInstance("HmacSHA256"); + hmacSHA256.init(new SecretKeySpec(key, "HmacSHA256")); + byte[] utf8Bytes = stringToSign.getBytes(StandardCharsets.UTF_8); + return Base64.getEncoder().encodeToString(hmacSHA256.doFinal(utf8Bytes)); + } catch (NoSuchAlgorithmException | InvalidKeyException ex) { + throw new RuntimeException(ex); + } + } + + /** + * Appends a string to the end of the passed URL's path. + * + * @param baseURL URL having a path appended + * @param name Name of the path + * @return a URL with the path appended. + * @throws IllegalArgumentException If {@code name} causes the URL to become malformed. + */ + public static URL appendToUrlPath(String baseURL, String name) { + UrlBuilder builder = UrlBuilder.parse(baseURL); + + if (builder.getPath() == null) { + builder.setPath("/"); + } else if (!builder.getPath().endsWith("/")) { + builder.setPath(builder.getPath() + "/"); + } + + builder.setPath(builder.getPath() + name); + + try { + return builder.toURL(); + } catch (MalformedURLException ex) { + throw new IllegalArgumentException(ex); + } + } + + + /** + * Strips the last path segment from the passed URL. + * + * @param baseUrl URL having its last path segment stripped + * @return a URL with the path segment stripped. + * @throws IllegalArgumentException If stripping the last path segment causes the URL to become malformed or it + * doesn't contain any path segments. + */ + public static URL stripLastPathSegment(URL baseUrl) { + UrlBuilder builder = UrlBuilder.parse(baseUrl); + + if (builder.getPath() == null || !builder.getPath().contains("/")) { + throw new IllegalArgumentException(String.format(Locale.ROOT, NO_PATH_SEGMENTS, baseUrl)); + } + + builder.setPath(builder.getPath().substring(0, builder.getPath().lastIndexOf("/"))); + try { + return builder.toURL(); + } catch (MalformedURLException ex) { + throw new IllegalArgumentException(ex); + } + } + + /** + * Strips the account name from host part of the URL object. + * + * @param url URL having its hostanme + * @return account name. + */ + public static String getAccountName(URL url) { + UrlBuilder builder = UrlBuilder.parse(url); + String accountName = null; + String host = builder.getHost(); + //Parse host to get account name + // host will look like this : .blob.core.windows.net + if (!ImplUtils.isNullOrEmpty(host)) { + int accountNameIndex = host.indexOf('.'); + if (accountNameIndex == -1) { + // host only contains account name + accountName = host; + } else { + // if host is separated by . + accountName = host.substring(0, accountNameIndex); + } + } + return accountName; + } +} diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java index ecb6bb900460..db6569aee333 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java @@ -5,8 +5,8 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import java.util.concurrent.TimeUnit; /** @@ -59,14 +59,14 @@ public RequestRetryOptions(RetryPolicyType retryPolicyType, Integer maxTries, In Long retryDelayInMs, Long maxRetryDelayInMs, String secondaryHost) { this.retryPolicyType = retryPolicyType == null ? RetryPolicyType.EXPONENTIAL : retryPolicyType; if (maxTries != null) { - Utility.assertInBounds("maxRetries", maxTries, 1, Integer.MAX_VALUE); + StorageImplUtils.assertInBounds("maxRetries", maxTries, 1, Integer.MAX_VALUE); this.maxTries = maxTries; } else { this.maxTries = 4; } if (tryTimeout != null) { - Utility.assertInBounds("tryTimeout", tryTimeout, 1, Integer.MAX_VALUE); + StorageImplUtils.assertInBounds("tryTimeout", tryTimeout, 1, Integer.MAX_VALUE); this.tryTimeout = tryTimeout; } else { this.tryTimeout = Integer.MAX_VALUE; @@ -79,8 +79,8 @@ public RequestRetryOptions(RetryPolicyType retryPolicyType, Integer maxTries, In } if (retryDelayInMs != null) { - Utility.assertInBounds("maxRetryDelayInMs", maxRetryDelayInMs, 1, Long.MAX_VALUE); - Utility.assertInBounds("retryDelayInMs", retryDelayInMs, 1, maxRetryDelayInMs); + StorageImplUtils.assertInBounds("maxRetryDelayInMs", maxRetryDelayInMs, 1, Long.MAX_VALUE); + StorageImplUtils.assertInBounds("retryDelayInMs", retryDelayInMs, 1, maxRetryDelayInMs); this.maxRetryDelayInMs = maxRetryDelayInMs; this.retryDelayInMs = retryDelayInMs; } else { diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasQueryParameters.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasQueryParameters.java index 085cb3449acb..37093937b409 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasQueryParameters.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasQueryParameters.java @@ -3,7 +3,6 @@ package com.azure.storage.common.sas; - import com.azure.storage.common.implementation.Constants; import java.time.OffsetDateTime; import java.util.Map; diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java index 1b5c31636c80..58efbbe213ac 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java @@ -4,9 +4,9 @@ package com.azure.storage.common.sas; import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.StorageImplUtils; import java.time.OffsetDateTime; /** @@ -260,12 +260,12 @@ public AccountSasSignatureValues setResourceTypes(String resourceTypes) { */ public AccountSasQueryParameters generateSasQueryParameters( StorageSharedKeyCredential storageSharedKeyCredentials) { - Utility.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); - Utility.assertNotNull("services", this.services); - Utility.assertNotNull("resourceTypes", this.resourceTypes); - Utility.assertNotNull("expiryTime", this.expiryTime); - Utility.assertNotNull("permissions", this.permissions); - Utility.assertNotNull("version", this.version); + StorageImplUtils.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); + StorageImplUtils.assertNotNull("services", this.services); + StorageImplUtils.assertNotNull("resourceTypes", this.resourceTypes); + StorageImplUtils.assertNotNull("expiryTime", this.expiryTime); + StorageImplUtils.assertNotNull("permissions", this.permissions); + StorageImplUtils.assertNotNull("version", this.version); // Signature is generated on the un-url-encoded values. String signature = storageSharedKeyCredentials.computeHmac256(stringToSign(storageSharedKeyCredentials)); @@ -280,8 +280,8 @@ private String stringToSign(final StorageSharedKeyCredential storageSharedKeyCre AccountSasPermission.parse(this.permissions).toString(), // guarantees ordering this.services, resourceTypes, - this.startTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), - Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), + this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), + Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), this.sasIpRange == null ? "" : this.sasIpRange.toString(), this.protocol == null ? "" : this.protocol.toString(), this.version, diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/BaseSasQueryParameters.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/BaseSasQueryParameters.java index 5055f37fe532..648faf156554 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/BaseSasQueryParameters.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/BaseSasQueryParameters.java @@ -192,7 +192,7 @@ protected String formatQueryParameterDate(OffsetDateTime dateTime) { if (dateTime == null) { return null; } else { - return Utility.ISO_8601_UTC_DATE_FORMATTER.format(dateTime); + return Constants.ISO_8601_UTC_DATE_FORMATTER.format(dateTime); } } diff --git a/sdk/storage/azure-storage-common/src/main/java/module-info.java b/sdk/storage/azure-storage-common/src/main/java/module-info.java index 24e9cd2d34ec..538800045c3f 100644 --- a/sdk/storage/azure-storage-common/src/main/java/module-info.java +++ b/sdk/storage/azure-storage-common/src/main/java/module-info.java @@ -11,6 +11,7 @@ exports com.azure.storage.common.implementation to // FIXME this should not be a long-term solution com.azure.storage.blob, com.azure.storage.blob.cryptography, + com.azure.storage.blob.batch, com.azure.storage.file, com.azure.storage.queue; diff --git a/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/credentials/SASTokenCredentialJavaDocCodeSnippets.java b/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/credentials/SASTokenCredentialJavaDocCodeSnippets.java index 2988a14cbd4b..d0f94b0f4ac4 100644 --- a/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/credentials/SASTokenCredentialJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/credentials/SASTokenCredentialJavaDocCodeSnippets.java @@ -3,11 +3,10 @@ package com.azure.storage.common.credentials; -import com.azure.storage.common.Utility; - import com.azure.storage.common.implementation.credentials.SasTokenCredential; import java.net.MalformedURLException; import java.net.URL; +import java.util.HashMap; import java.util.Map; /** @@ -37,8 +36,12 @@ public void fromSASTokenString() { */ public void fromQueryParameters() { // BEGIN: com.azure.storage.common.credentials.SasTokenCredential.fromQueryParameters#Map + Map queryMap = new HashMap() {{ + put("queryPara1", "queryValue1"); + put("queryPara2", "queryValue2"); + }}; SasTokenCredential credential = SasTokenCredential - .fromQueryParameters(Utility.parseQueryString(url.getQuery())); + .fromQueryParameters(queryMap); // END: com.azure.storage.common.credentials.SasTokenCredential.fromQueryParameters#Map } } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java index 02f6cf89d9f1..2eb0b5b63cda 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java @@ -14,8 +14,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.file.implementation.AzureFileStorageImpl; import com.azure.storage.file.implementation.models.DirectorysCreateResponse; import com.azure.storage.file.implementation.models.DirectorysGetPropertiesResponse; @@ -517,7 +517,7 @@ public PagedFlux listFilesAndDirectories(String prefix, Integer PagedFlux listFilesAndDirectoriesWithOptionalTimeout(String prefix, Integer maxResultsPerPage, Duration timeout, Context context) { Function>> retriever = - marker -> Utility.applyOptionalTimeout(this.azureFileStorageClient.directorys() + marker -> StorageImplUtils.applyOptionalTimeout(this.azureFileStorageClient.directorys() .listFilesAndDirectoriesSegmentWithRestResponseAsync(shareName, directoryPath, prefix, snapshot, marker, maxResultsPerPage, null, context), timeout) .map(response -> new PagedResponseBase<>(response.getRequest(), @@ -558,7 +558,7 @@ public PagedFlux listHandles(Integer maxResultPerPage, boolean recur PagedFlux listHandlesWithOptionalTimeout(Integer maxResultPerPage, boolean recursive, Duration timeout, Context context) { Function>> retriever = - marker -> Utility.applyOptionalTimeout(this.azureFileStorageClient.directorys() + marker -> StorageImplUtils.applyOptionalTimeout(this.azureFileStorageClient.directorys() .listHandlesWithRestResponseAsync(shareName, directoryPath, marker, maxResultPerPage, null, snapshot, recursive, context), timeout) .map(response -> new PagedResponseBase<>(response.getRequest(), @@ -650,7 +650,7 @@ public Mono forceCloseAllHandles(boolean recursive) { PagedFlux forceCloseAllHandlesWithTimeout(boolean recursive, Duration timeout, Context context) { Function>> retriever = - marker -> Utility.applyOptionalTimeout(this.azureFileStorageClient.directorys() + marker -> StorageImplUtils.applyOptionalTimeout(this.azureFileStorageClient.directorys() .forceCloseHandlesWithRestResponseAsync(shareName, directoryPath, "*", null, marker, snapshot, recursive, context), timeout) .map(response -> new PagedResponseBase<>(response.getRequest(), @@ -1024,7 +1024,7 @@ private void validateFilePermissionAndKey(String filePermission, String filePer } if (filePermission != null) { - Utility.assertInBounds("filePermission", + StorageImplUtils.assertInBounds("filePermission", filePermission.getBytes(StandardCharsets.UTF_8).length, 0, 8 * Constants.KB); } } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java index 66b5b265ab26..54a4b8425013 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java @@ -8,8 +8,8 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.file.models.DirectoryInfo; import com.azure.storage.file.models.DirectoryProperties; import com.azure.storage.file.models.DirectorySetMetadataInfo; @@ -143,7 +143,7 @@ public Response createWithResponse(FileSmbProperties smbPropertie Map metadata, Duration timeout, Context context) { Mono> response = directoryAsyncClient .createWithResponse(smbProperties, filePermission, metadata, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -185,7 +185,7 @@ public void delete() { */ public Response deleteWithResponse(Duration timeout, Context context) { Mono> response = directoryAsyncClient.deleteWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -228,7 +228,7 @@ public DirectoryProperties getProperties() { */ public Response getPropertiesWithResponse(Duration timeout, Context context) { Mono> response = directoryAsyncClient.getPropertiesWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -274,7 +274,7 @@ public Response setPropertiesWithResponse(FileSmbProperties smbPr Duration timeout, Context context) { Mono> response = directoryAsyncClient .setPropertiesWithResponse(smbProperties, filePermission, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -334,7 +334,7 @@ public Response setMetadataWithResponse(Map> response = directoryAsyncClient .setMetadataWithResponse(metadata, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -453,7 +453,7 @@ public void forceCloseHandle(String handleId) { * @return A response that only contains headers and response status code. */ public Response forceCloseHandleWithResponse(String handleId, Duration timeout, Context context) { - return Utility.blockWithOptionalTimeout(directoryAsyncClient + return StorageImplUtils.blockWithOptionalTimeout(directoryAsyncClient .forceCloseHandleWithResponse(handleId, context), timeout); } @@ -581,7 +581,7 @@ public void deleteSubDirectory(String subDirectoryName) { */ public Response deleteSubDirectoryWithResponse(String subDirectoryName, Duration timeout, Context context) { Mono> response = directoryAsyncClient.deleteSubDirectoryWithResponse(subDirectoryName, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -685,7 +685,7 @@ public void deleteFile(String fileName) { */ public Response deleteFileWithResponse(String fileName, Duration timeout, Context context) { Mono> response = directoryAsyncClient.deleteFileWithResponse(fileName, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java index a0259fd6f24d..74831e5b3935 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java @@ -13,9 +13,9 @@ import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.file.implementation.AzureFileStorageImpl; import com.azure.storage.file.implementation.models.FileGetPropertiesHeaders; import com.azure.storage.file.implementation.models.FileRangeWriteType; @@ -1046,7 +1046,7 @@ public PagedFlux listRanges(FileRange range) { PagedFlux listRangesWithOptionalTimeout(FileRange range, Duration timeout, Context context) { String rangeString = range == null ? null : range.toString(); Function>> retriever = - marker -> Utility.applyOptionalTimeout(this.azureFileStorageClient.files() + marker -> StorageImplUtils.applyOptionalTimeout(this.azureFileStorageClient.files() .getRangeListWithRestResponseAsync(shareName, filePath, snapshot, null, rangeString, context), timeout) .map(response -> new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), @@ -1105,7 +1105,7 @@ public PagedFlux listHandles(Integer maxResultsPerPage) { PagedFlux listHandlesWithOptionalTimeout(Integer maxResultsPerPage, Duration timeout, Context context) { Function>> retriever = - marker -> Utility.applyOptionalTimeout(this.azureFileStorageClient.files() + marker -> StorageImplUtils.applyOptionalTimeout(this.azureFileStorageClient.files() .listHandlesWithRestResponseAsync(shareName, filePath, marker, maxResultsPerPage, null, snapshot, context), timeout) .map(response -> new PagedResponseBase<>(response.getRequest(), @@ -1195,7 +1195,7 @@ public Mono forceCloseAllHandles() { PagedFlux forceCloseAllHandlesWithOptionalTimeout(Duration timeout, Context context) { Function>> retriever = - marker -> Utility.applyOptionalTimeout(this.azureFileStorageClient.files() + marker -> StorageImplUtils.applyOptionalTimeout(this.azureFileStorageClient.files() .forceCloseHandlesWithRestResponseAsync(shareName, filePath, "*", null, marker, snapshot, context), timeout) .map(response -> new PagedResponseBase<>(response.getRequest(), @@ -1365,7 +1365,7 @@ private void validateFilePermissionAndKey(String filePermission, String filePer } if (filePermission != null) { - Utility.assertInBounds("filePermission", + StorageImplUtils.assertInBounds("filePermission", filePermission.getBytes(StandardCharsets.UTF_8).length, 0, 8 * Constants.KB); } } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java index 96109220dc4c..76d32fc770bc 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java @@ -10,8 +10,9 @@ import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.file.models.FileCopyInfo; import com.azure.storage.file.models.FileHttpHeaders; import com.azure.storage.file.models.FileInfo; @@ -179,7 +180,7 @@ public Response createWithResponse(long maxSize, FileHttpHeaders httpH Context context) { Mono> response = fileAsyncClient .createWithResponse(maxSize, httpHeaders, smbProperties, filePermission, metadata, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -229,7 +230,7 @@ public FileCopyInfo startCopy(String sourceUrl, Map metadata) { public Response startCopyWithResponse(String sourceUrl, Map metadata, Duration timeout, Context context) { Mono> response = fileAsyncClient.startCopyWithResponse(sourceUrl, metadata, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -271,7 +272,7 @@ public void abortCopy(String copyId) { */ public Response abortCopyWithResponse(String copyId, Duration timeout, Context context) { Mono> response = fileAsyncClient.abortCopyWithResponse(copyId, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -322,7 +323,7 @@ public Response downloadToFileWithResponse(String downloadFilePa Duration timeout, Context context) { Mono> response = fileAsyncClient.downloadToFileWithResponse(downloadFilePath, range, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -381,7 +382,7 @@ public Response downloadWithResponse(OutputStream stream, FileRange range, } }).thenReturn(new SimpleResponse<>(response, null))); - return Utility.blockWithOptionalTimeout(download, timeout); + return StorageImplUtils.blockWithOptionalTimeout(download, timeout); } /** @@ -424,7 +425,7 @@ public void delete() { */ public Response deleteWithResponse(Duration timeout, Context context) { Mono> response = fileAsyncClient.deleteWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -467,7 +468,7 @@ public FileProperties getProperties() { */ public Response getPropertiesWithResponse(Duration timeout, Context context) { Mono> response = fileAsyncClient.getPropertiesWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -534,7 +535,7 @@ public Response setPropertiesWithResponse(long newFileSize, FileHttpHe FileSmbProperties smbProperties, String filePermission, Duration timeout, Context context) { Mono> response = fileAsyncClient .setPropertiesWithResponse(newFileSize, httpHeaders, smbProperties, filePermission, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -592,7 +593,7 @@ public FileMetadataInfo setMetadata(Map metadata) { public Response setMetadataWithResponse(Map metadata, Duration timeout, Context context) { Mono> response = fileAsyncClient.setMetadataWithResponse(metadata, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -645,7 +646,7 @@ public FileUploadInfo upload(InputStream data, long length) { */ public Response uploadWithResponse(InputStream data, long length, Long offset, Duration timeout, Context context) { - return Utility.blockWithOptionalTimeout(fileAsyncClient.uploadWithResponse(Utility + return StorageImplUtils.blockWithOptionalTimeout(fileAsyncClient.uploadWithResponse(Utility .convertStreamToByteBuffer(data, length, (int) FileAsyncClient.FILE_DEFAULT_BLOCK_SIZE), length, offset, context), timeout); } @@ -703,7 +704,7 @@ public Response uploadRangeFromUrlWithResponse(long long sourceOffset, String sourceUrl, Duration timeout, Context context) { Mono> response = fileAsyncClient.uploadRangeFromUrlWithResponse(length, destinationOffset, sourceOffset, sourceUrl, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -750,7 +751,7 @@ public FileUploadInfo clearRange(long length) { public Response clearRangeWithResponse(long length, long offset, Duration timeout, Context context) { Mono> response = fileAsyncClient.clearRangeWithResponse(length, offset, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -892,7 +893,7 @@ public void forceCloseHandle(String handleId) { * @return A response that only contains headers and response status code. */ public Response forceCloseHandleWithResponse(String handleId, Duration timeout, Context context) { - return Utility.blockWithOptionalTimeout(fileAsyncClient + return StorageImplUtils.blockWithOptionalTimeout(fileAsyncClient .forceCloseHandleWithResponse(handleId, context), timeout); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java index 943b5d0621fa..78f3bff26797 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java @@ -11,8 +11,8 @@ import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; @@ -231,7 +231,6 @@ public FileClientBuilder endpoint(String endpoint) { try { URL fullUrl = new URL(endpoint); this.endpoint = fullUrl.getProtocol() + "://" + fullUrl.getHost(); - this.accountName = BuilderHelper.getAccountName(fullUrl); // Attempt to get the share name and file path from the URL passed @@ -243,7 +242,7 @@ public FileClientBuilder endpoint(String endpoint) { // Attempt to get the SAS token from the URL passed String sasToken = new FileServiceSasQueryParameters( - Utility.parseQueryStringSplitValues(fullUrl.getQuery()), false).encode(); + StorageImplUtils.parseQueryStringSplitValues(fullUrl.getQuery()), false).encode(); if (!ImplUtils.isNullOrEmpty(sasToken)) { sasToken(sasToken); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java index 83d2d6dfc4d3..40756dd2a6e6 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java @@ -13,8 +13,8 @@ import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.file.implementation.AzureFileStorageImpl; import com.azure.storage.file.implementation.models.DeleteSnapshotsOptionType; import com.azure.storage.file.implementation.models.ListSharesIncludeType; @@ -202,7 +202,7 @@ PagedFlux listSharesWithOptionalTimeout(String marker, ListSharesOpti } Function>> retriever = - nextMarker -> Utility.applyOptionalTimeout(this.azureFileStorageClient.services() + nextMarker -> StorageImplUtils.applyOptionalTimeout(this.azureFileStorageClient.services() .listSharesSegmentWithRestResponseAsync( prefix, nextMarker, maxResultsPerPage, include, null, context), timeout) .map(response -> new PagedResponseBase<>(response.getRequest(), diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java index 08683cbffb66..197135b9aa8d 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java @@ -8,8 +8,8 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.file.models.FileCorsRule; import com.azure.storage.file.models.FileServiceProperties; import com.azure.storage.file.models.ListSharesOptions; @@ -180,7 +180,7 @@ public FileServiceProperties getProperties() { */ public Response getPropertiesWithResponse(Duration timeout, Context context) { Mono> response = fileServiceAsyncClient.getPropertiesWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -267,7 +267,7 @@ public void setProperties(FileServiceProperties properties) { public Response setPropertiesWithResponse(FileServiceProperties properties, Duration timeout, Context context) { Mono> response = fileServiceAsyncClient.setPropertiesWithResponse(properties, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -365,7 +365,7 @@ public void deleteShare(String shareName) { public Response deleteShareWithResponse(String shareName, String snapshot, Duration timeout, Context context) { Mono> response = fileServiceAsyncClient.deleteShareWithResponse(shareName, snapshot, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java index 31f792ee316c..cd36635a97d7 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java @@ -11,8 +11,8 @@ import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; @@ -163,12 +163,11 @@ public FileServiceClientBuilder endpoint(String endpoint) { try { URL fullUrl = new URL(endpoint); this.endpoint = fullUrl.getProtocol() + "://" + fullUrl.getHost(); - this.accountName = BuilderHelper.getAccountName(fullUrl); // Attempt to get the SAS token from the URL passed String sasToken = new FileServiceSasQueryParameters( - Utility.parseQueryStringSplitValues(fullUrl.getQuery()), false).encode(); + StorageImplUtils.parseQueryStringSplitValues(fullUrl.getQuery()), false).encode(); if (!ImplUtils.isNullOrEmpty(sasToken)) { this.sasToken(sasToken); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java index cbc80f24c896..d1f48da91d8c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java @@ -4,10 +4,11 @@ package com.azure.storage.file; import com.azure.core.implementation.util.ImplUtils; -import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.common.Utility; -import com.azure.storage.common.sas.SasIpRange; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.sas.SasProtocol; +import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.sas.SasIpRange; +import com.azure.storage.common.StorageSharedKeyCredential; import java.time.OffsetDateTime; @@ -169,7 +170,7 @@ public String getPermissions() { * @return the updated FileServiceSasSignatureValues object. */ public FileServiceSasSignatureValues setPermissions(ShareSasPermission permissions) { - Utility.assertNotNull("permissions", permissions); + StorageImplUtils.assertNotNull("permissions", permissions); this.permissions = permissions.toString(); return this; } @@ -182,7 +183,7 @@ public FileServiceSasSignatureValues setPermissions(ShareSasPermission permissio * @return the updated FileServiceSasSignatureValues object */ public FileServiceSasSignatureValues setPermissions(FileSasPermission permissions) { - Utility.assertNotNull("permissions", permissions); + StorageImplUtils.assertNotNull("permissions", permissions); this.permissions = permissions.toString(); return this; } @@ -392,7 +393,7 @@ public FileServiceSasSignatureValues setContentType(String contentType) { */ public FileServiceSasQueryParameters generateSasQueryParameters( StorageSharedKeyCredential storageSharedKeyCredentials) { - Utility.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); + StorageImplUtils.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); final String resource; if (ImplUtils.isNullOrEmpty(filePath)) { @@ -445,8 +446,8 @@ private static String getCanonicalName(String account, String shareName, String private String stringToSign(String canonicalName) { return String.join("\n", this.permissions == null ? "" : this.permissions, - this.startTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), - this.expiryTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), + this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), + this.expiryTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), canonicalName, this.identifier == null ? "" : this.identifier, this.sasIpRange == null ? "" : this.sasIpRange.toString(), diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java index 47f1c4a0f8bc..5b225329002c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java @@ -8,8 +8,8 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.file.models.FileHttpHeaders; import com.azure.storage.file.models.FileSignedIdentifier; import com.azure.storage.file.models.FileStorageException; @@ -151,7 +151,7 @@ public ShareInfo create() { public Response createWithResponse(Map metadata, Integer quotaInGB, Duration timeout, Context context) { Mono> response = client.createWithResponse(metadata, quotaInGB, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -200,7 +200,7 @@ public ShareSnapshotInfo createSnapshot() { public Response createSnapshotWithResponse(Map metadata, Duration timeout, Context context) { Mono> response = client.createSnapshotWithResponse(metadata, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -242,7 +242,7 @@ public void delete() { */ public Response deleteWithResponse(Duration timeout, Context context) { Mono> response = client.deleteWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -287,7 +287,7 @@ public ShareProperties getProperties() { */ public Response getPropertiesWithResponse(Duration timeout, Context context) { Mono> response = client.getPropertiesWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -332,7 +332,7 @@ public ShareInfo setQuota(int quotaInGB) { */ public Response setQuotaWithResponse(int quotaInGB, Duration timeout, Context context) { Mono> response = client.setQuotaWithResponse(quotaInGB, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -386,7 +386,7 @@ public ShareInfo setMetadata(Map metadata) { public Response setMetadataWithResponse(Map metadata, Duration timeout, Context context) { Mono> response = client.setMetadataWithResponse(metadata, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -454,7 +454,7 @@ public ShareInfo setAccessPolicy(List permissions) { public Response setAccessPolicyWithResponse(List permissions, Duration timeout, Context context) { Mono> response = client.setAccessPolicyWithResponse(permissions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -495,7 +495,7 @@ public ShareStatistics getStatistics() { */ public Response getStatisticsWithResponse(Duration timeout, Context context) { Mono> response = client.getStatisticsWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -667,7 +667,7 @@ public void deleteDirectory(String directoryName) { */ public Response deleteDirectoryWithResponse(String directoryName, Duration timeout, Context context) { Mono> response = client.deleteDirectoryWithResponse(directoryName, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -711,7 +711,7 @@ public void deleteFile(String fileName) { */ public Response deleteFileWithResponse(String fileName, Duration timeout, Context context) { Mono> response = client.deleteFileWithResponse(fileName, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java index 9f52fa6c5998..69f0e5b157cb 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java @@ -11,8 +11,8 @@ import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; @@ -176,6 +176,7 @@ public ShareClientBuilder endpoint(String endpoint) { this.accountName = BuilderHelper.getAccountName(fullUrl); + // Attempt to get the share name from the URL passed String[] pathSegments = fullUrl.getPath().split("/"); int length = pathSegments.length; @@ -187,7 +188,7 @@ public ShareClientBuilder endpoint(String endpoint) { // Attempt to get the SAS token from the URL passed String sasToken = new FileServiceSasQueryParameters( - Utility.parseQueryStringSplitValues(fullUrl.getQuery()), false).encode(); + StorageImplUtils.parseQueryStringSplitValues(fullUrl.getQuery()), false).encode(); if (!ImplUtils.isNullOrEmpty(sasToken)) { this.sasToken(sasToken); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java index d9156d4e0ac1..3a0b1147db75 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java @@ -16,8 +16,8 @@ import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.policy.RequestRetryOptions; import com.azure.storage.common.policy.RequestRetryPolicy; import com.azure.storage.common.policy.ResponseValidationPolicyBuilder; @@ -94,7 +94,7 @@ static QueueUrlParts parseEndpoint(String endpoint, ClientLogger logger) { // Attempt to get the SAS token from the URL passed String sasToken = new QueueServiceSasQueryParameters( - Utility.parseQueryStringSplitValues(url.getQuery()), false).encode(); + StorageImplUtils.parseQueryStringSplitValues(url.getQuery()), false).encode(); if (!ImplUtils.isNullOrEmpty(sasToken)) { parts.setQueueName(sasToken); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java index 95db814d1cf9..9110cd9b93c5 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java @@ -12,8 +12,8 @@ import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; import com.azure.storage.queue.implementation.models.MessageIdUpdateHeaders; import com.azure.storage.queue.implementation.models.MessageIdsUpdateResponse; @@ -653,7 +653,7 @@ PagedFlux receiveMessagesWithOptionalTimeout(Integer maxMessag Duration timeout, Context context) { Integer visibilityTimeoutInSeconds = (visibilityTimeout == null) ? null : (int) visibilityTimeout.getSeconds(); Function>> retriever = - marker -> Utility.applyOptionalTimeout(this.client.messages() + marker -> StorageImplUtils.applyOptionalTimeout(this.client.messages() .dequeueWithRestResponseAsync(queueName, maxMessages, visibilityTimeoutInSeconds, null, null, context), timeout) .map(response -> new PagedResponseBase<>(response.getRequest(), @@ -724,7 +724,7 @@ public PagedFlux peekMessages(Integer maxMessages) { PagedFlux peekMessagesWithOptionalTimeout(Integer maxMessages, Duration timeout, Context context) { Function>> retriever = - marker -> Utility.applyOptionalTimeout(this.client.messages() + marker -> StorageImplUtils.applyOptionalTimeout(this.client.messages() .peekWithRestResponseAsync(queueName, maxMessages, null, null, context), timeout) .map(response -> new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java index 8e8a44097ab7..d513e812f548 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java @@ -6,8 +6,8 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.queue.models.PeekedMessageItem; import com.azure.storage.queue.models.QueueMessageItem; import com.azure.storage.queue.models.QueueProperties; @@ -106,7 +106,7 @@ public void create() { */ public Response createWithResponse(Map metadata, Duration timeout, Context context) { Mono> response = client.createWithResponse(metadata, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -148,7 +148,7 @@ public void delete() { */ public Response deleteWithResponse(Duration timeout, Context context) { Mono> response = client.deleteWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -193,7 +193,7 @@ public QueueProperties getProperties() { */ public Response getPropertiesWithResponse(Duration timeout, Context context) { Mono> response = client.getPropertiesWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -249,7 +249,7 @@ public void setMetadata(Map metadata) { */ public Response setMetadataWithResponse(Map metadata, Duration timeout, Context context) { Mono> response = client.setMetadataWithResponse(metadata, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -315,7 +315,7 @@ public void setAccessPolicy(List permissions) { public Response setAccessPolicyWithResponse(List permissions, Duration timeout, Context context) { Mono> response = client.setAccessPolicyWithResponse(permissions, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -357,7 +357,7 @@ public void clearMessages() { */ public Response clearMessagesWithResponse(Duration timeout, Context context) { Mono> response = client.clearMessagesWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -419,7 +419,7 @@ public Response sendMessageWithResponse(String messageText, D Duration timeToLive, Duration timeout, Context context) { Mono> response = client.sendMessageWithResponse(messageText, visibilityTimeout, timeToLive, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -616,7 +616,7 @@ public Response updateMessageWithResponse(String messageId, String messageText, Duration visibilityTimeout, Duration timeout, Context context) { Mono> response = client.updateMessageWithResponse(messageId, popReceipt, messageText, visibilityTimeout, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -665,7 +665,7 @@ public void deleteMessage(String messageId, String popReceipt) { public Response deleteMessageWithResponse(String messageId, String popReceipt, Duration timeout, Context context) { Mono> response = client.deleteMessageWithResponse(messageId, popReceipt, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java index ebd69f24b87c..08cb21908ead 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java @@ -13,7 +13,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; @@ -134,7 +134,7 @@ public QueueClient buildClient() { * or {@link #sasToken(String) SAS token} has been set. */ public QueueAsyncClient buildAsyncClient() { - Utility.assertNotNull("queueName", queueName); + StorageImplUtils.assertNotNull("queueName", queueName); QueueServiceVersion serviceVersion = version != null ? version : QueueServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java index 6caa404b578a..064620f010d6 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java @@ -11,8 +11,8 @@ import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; import com.azure.storage.queue.implementation.models.ListQueuesIncludeType; import com.azure.storage.queue.models.QueueCorsRule; @@ -270,7 +270,7 @@ PagedFlux listQueuesWithOptionalTimeout(String marker, QueuesSegmentO } Function>> retriever = - nextMarker -> Utility.applyOptionalTimeout(this.client.services() + nextMarker -> StorageImplUtils.applyOptionalTimeout(this.client.services() .listQueuesSegmentWithRestResponseAsync(prefix, nextMarker, maxResultsPerPage, include, null, null, context), timeout) .map(response -> new PagedResponseBase<>(response.getRequest(), diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java index f305a781321d..79c2e09d2826 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java @@ -7,8 +7,8 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; -import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.queue.models.QueueCorsRule; import com.azure.storage.queue.models.QueueItem; import com.azure.storage.queue.models.QueueServiceProperties; @@ -116,7 +116,7 @@ public Response createQueueWithResponse(String queueName, Map> asyncResponse = client.createQueueWithResponse(queueName, metadata, context); - Response response = Utility.blockWithOptionalTimeout(asyncResponse, timeout); + Response response = StorageImplUtils.blockWithOptionalTimeout(asyncResponse, timeout); return new SimpleResponse<>(response, new QueueClient(response.getValue())); } @@ -155,7 +155,7 @@ public void deleteQueue(String queueName) { */ public Response deleteQueueWithResponse(String queueName, Duration timeout, Context context) { Mono> response = client.deleteQueueWithResponse(queueName, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -263,7 +263,7 @@ public QueueServiceProperties getProperties() { */ public Response getPropertiesWithResponse(Duration timeout, Context context) { Mono> response = client.getPropertiesWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -351,7 +351,7 @@ public void setProperties(QueueServiceProperties properties) { public Response setPropertiesWithResponse(QueueServiceProperties properties, Duration timeout, Context context) { Mono> response = client.setPropertiesWithResponse(properties, context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } /** @@ -392,7 +392,7 @@ public QueueServiceStatistics getStatistics() { */ public Response getStatisticsWithResponse(Duration timeout, Context context) { Mono> response = client.getStatisticsWithResponse(context); - return Utility.blockWithOptionalTimeout(response, timeout); + return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java index 49479b763932..51b9b8271e9a 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java @@ -169,7 +169,6 @@ public QueueServiceClientBuilder endpoint(String endpoint) { BuilderHelper.QueueUrlParts parts = BuilderHelper.parseEndpoint(endpoint, logger); this.endpoint = parts.getEndpoint(); this.accountName = parts.getAccountName(); - if (!ImplUtils.isNullOrEmpty(parts.getSasToken())) { sasToken(parts.getSasToken()); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java index 70713c71b0f7..67256676400d 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java @@ -3,11 +3,12 @@ package com.azure.storage.queue; +import com.azure.storage.common.implementation.StorageImplUtils; +import com.azure.storage.common.sas.SasProtocol; +import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.sas.SasIpRange; import com.azure.core.implementation.util.ImplUtils; import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.common.Utility; -import com.azure.storage.common.sas.SasIpRange; -import com.azure.storage.common.sas.SasProtocol; import java.time.OffsetDateTime; @@ -148,7 +149,7 @@ public String getPermissions() { * @throws NullPointerException if {@code permissions} is null. */ public QueueServiceSasSignatureValues setPermissions(QueueSasPermission permissions) { - Utility.assertNotNull("permissions", permissions); + StorageImplUtils.assertNotNull("permissions", permissions); this.permissions = permissions.toString(); return this; } @@ -238,7 +239,7 @@ public QueueServiceSasSignatureValues setIdentifier(String identifier) { */ public QueueServiceSasQueryParameters generateSasQueryParameters( StorageSharedKeyCredential storageSharedKeyCredentials) { - Utility.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); + StorageImplUtils.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); if (ImplUtils.isNullOrEmpty(version)) { version = QueueServiceVersion.getLatest().getVersion(); @@ -267,8 +268,8 @@ private static String getCanonicalName(String account, String queueName) { private String stringToSign(String canonicalName) { return String.join("\n", this.permissions == null ? "" : this.permissions, - this.startTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), - this.expiryTime == null ? "" : Utility.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), + this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), + this.expiryTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), canonicalName, this.identifier == null ? "" : this.identifier, this.sasIpRange == null ? "" : this.sasIpRange.toString(), From 5a2361a1fe7046d785fdb8a0793b9d27cf7ef8dc Mon Sep 17 00:00:00 2001 From: Connie Yau Date: Sat, 19 Oct 2019 16:53:20 -0700 Subject: [PATCH 25/64] Adds Poller support for BlobAsyncClient and BlobClient beginCopyFromUrl (#5826) * Add BlobCopyInfo. * Add support for beginCopyUrl using Poller. * Update BlobClientBase. to use Poller API. * Fix codesnippets. * Update documentation in FileCopyInfo. * Make BlobCopyInfo export the same fields as FileCopy. * Update FileAsyncClient to return custom statuses and end polling when there is an Error. * Update BlobAsyncClient to end polling when an error occurs. --- .../storage/blob/models/BlobCopyInfo.java | 109 +++++++++ .../blob/specialized/BlobAsyncClientBase.java | 191 ++++++++++++---- .../blob/specialized/BlobClientBase.java | 40 ++-- .../BlobAsyncClientJavaDocCodeSnippets.java | 31 +-- .../blob/BlobClientJavaDocCodeSnippets.java | 29 --- ...lobAsyncClientBaseJavaDocCodeSnippets.java | 52 +++-- .../BlobClientBaseJavaDocCodeSnippets.java | 33 +-- .../com/azure/storage/blob/BlobAPITest.groovy | 55 ++++- .../storage/blob/ContainerAPITest.groovy | 19 +- .../BlobAPITestcopypoller.json | 208 ++++++++++++++++++ .../azure/storage/file/FileAsyncClient.java | 140 ++++++++---- .../com/azure/storage/file/FileClient.java | 39 +--- .../storage/file/models/FileCopyInfo.java | 62 +++++- .../file/FileAsyncJavaDocCodeSamples.java | 41 ++-- .../storage/file/FileJavaDocCodeSamples.java | 31 +-- .../com/azure/storage/file/FileSample.java | 31 +-- .../azure/storage/file/FileAPITests.groovy | 21 +- .../storage/file/FileAsyncAPITests.groovy | 11 +- .../FileAPITestsStartCopy.json | 119 +++++++--- .../FileAPITestsStartCopyError.json | 78 ++++--- .../FileAsyncAPITestsStartCopy.json | 119 +++++++--- .../FileAsyncAPITestsStartCopyError.json | 78 ++++--- 22 files changed, 1086 insertions(+), 451 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopyInfo.java create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopypoller.json diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopyInfo.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopyInfo.java new file mode 100644 index 000000000000..432995e5f7b5 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopyInfo.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.models; + +import com.azure.core.annotation.Immutable; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; + +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * The status of a long running Azure Blob copy operation. + * + * @see BlobAsyncClient#beginCopy(String, Duration) + * @see BlobClient#beginCopy(String, Duration) + */ +@Immutable +public class BlobCopyInfo { + private final String copyId; + private final String copySource; + private final CopyStatusType copyStatus; + private final String eTag; + private final OffsetDateTime lastModified; + private final String error; + + /** + * Creates an instance of {@link BlobCopyInfo}. + * + * @param copyId The identifier of the copy operation. + * @param copySource The url of the source blob. The contents are being copied from this blob. + * @param copyStatus The status of the copy operation. + * @param error An error message for the copy operation. {@code null} if there are no errors. + * @param eTag If the copy is completed, contains the ETag of the destination blob. If the copy is not complete, + * contains the ETag of the empty blob created. + * @param lastModified The date/time that the copy operation to the destination blob completed. + * + * @throws NullPointerException If {@code copyId}, {@code copySource}, {@code eTag}, or {@code copyStatus} is null. + */ + public BlobCopyInfo(String copySource, String copyId, CopyStatusType copyStatus, String eTag, + OffsetDateTime lastModified, String error) { + this.copyId = Objects.requireNonNull(copyId, "'copyId' cannot be null."); + this.copySource = Objects.requireNonNull(copySource, "'copySource' cannot be null."); + this.copyStatus = Objects.requireNonNull(copyStatus, "'copyStatus' cannot be null."); + this.eTag = Objects.requireNonNull(eTag, "'eTag' cannot be null."); + this.lastModified = lastModified; + this.error = error; + } + + /** + * Gets the identifier for the copy operation. + * + * @return The identifier for the copy operation. + */ + public String getCopyId() { + return copyId; + } + + /** + * Gets the url of the source blob. + * + * @return The url of the source blob. + */ + public String getCopySourceUrl() { + return copySource; + } + + /** + * Gets the status of the copy operation. + * + * @return The status of the copy operation. + */ + public CopyStatusType getCopyStatus() { + return copyStatus; + } + + /** + * Gets an error description associated with the copy operation. + * + * @return An error description associated with the copy, or {@code null} if there is no error associated with this + * copy operation. + */ + public String getError() { + return error; + } + + /** + * Gets the date/time that the copy operation to the destination blob completed. + * + * @return The date/time that the copy operation to the destination blob completed. + */ + public OffsetDateTime getLastModified() { + return lastModified; + } + + /** + * If the copy is complete, contains the ETag of the destination blob. If the copy isn't complete, contains the + * ETag of the empty blob created at the start of the copy. + * + * The ETag value will be in quotes. + * + * @return The ETag for the copy. + */ + public String getETag() { + return eTag; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index 85ddb887bf38..4ce195ce19bd 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -8,8 +8,12 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.util.FluxUtil; +import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.PollResponse.OperationStatus; +import com.azure.core.util.polling.Poller; import com.azure.storage.blob.BlobProperties; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.HttpGetterInfo; @@ -17,11 +21,14 @@ import com.azure.storage.blob.ProgressReporter; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.models.BlobStartCopyFromURLHeaders; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobCopyInfo; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobStorageException; +import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; import com.azure.storage.blob.models.LeaseAccessConditions; @@ -47,6 +54,7 @@ import java.nio.file.FileAlreadyExistsException; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; +import java.time.Duration; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -267,28 +275,32 @@ Mono> existsWithResponse(Context context) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.startCopyFromURL#String} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopy#String-Duration} * *

    For more information, see the * Azure Docs

    * * @param sourceUrl The source URL to copy from. URLs outside of Azure may only be copied to block blobs. - * @return A reactive response containing the copy ID for the long running operation. + * @param pollInterval Duration between each poll for the copy status. If none is specified, a default of one second + * is used. + * @return A {@link Poller} that polls the blob copy operation until it has completed, has failed, or has been + * cancelled. */ - public Mono startCopyFromURL(String sourceUrl) { - try { - return startCopyFromURLWithResponse(sourceUrl, null, null, null, null, null).flatMap(FluxUtil::toMono); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } + public Poller beginCopy(String sourceUrl, Duration pollInterval) { + return beginCopy(sourceUrl, null, null, null, null, null, pollInterval); } /** * Copies the data at the source URL to a blob. * - *

    Code Samples

    + *

    Starting a copy operation

    + * Starting a copy operation and polling on the responses. * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.startCopyFromURLWithResponse#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration} + * + *

    Cancelling a copy operation

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopyFromUrlCancel#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration} * *

    For more information, see the * Azure Docs

    @@ -297,49 +309,134 @@ public Mono startCopyFromURL(String sourceUrl) { * @param metadata Metadata to associate with the destination blob. * @param tier {@link AccessTier} for the destination blob. * @param priority {@link RehydratePriority} for rehydrating the blob. - * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access - * conditions related to the modification of data. ETag and LastModifiedTime are used to construct conditions - * related to when the blob was changed relative to the given request. The request will fail if the specified - * condition is not satisfied. + * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP + * Access conditions related to the modification of data. ETag and LastModifiedTime are used to construct + * conditions related to when the blob was changed relative to the given request. The request will fail if the + * specified condition is not satisfied. * @param destAccessConditions {@link BlobAccessConditions} against the destination. - * @return A reactive response containing the copy ID for the long running operation. + * @param pollInterval Duration between each poll for the copy status. If none is specified, a default of one second + * is used. + * @return A {@link Poller} that polls the blob copy operation until it has completed, has failed, or has been + * cancelled. */ - public Mono> startCopyFromURLWithResponse(String sourceUrl, Map metadata, - AccessTier tier, RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, - BlobAccessConditions destAccessConditions) { - try { - return withContext(context -> startCopyFromURLWithResponse(sourceUrl, metadata, tier, priority, - sourceModifiedAccessConditions, destAccessConditions, context)); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - Mono> startCopyFromURLWithResponse(String sourceUrl, Map metadata, AccessTier tier, - RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, - BlobAccessConditions destAccessConditions, Context context) { - sourceModifiedAccessConditions = sourceModifiedAccessConditions == null - ? new ModifiedAccessConditions() : sourceModifiedAccessConditions; - destAccessConditions = destAccessConditions == null ? new BlobAccessConditions() : destAccessConditions; + public Poller beginCopy(String sourceUrl, Map metadata, AccessTier tier, + RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, + BlobAccessConditions destAccessConditions, Duration pollInterval) { + + final Duration interval = pollInterval != null ? pollInterval : Duration.ofSeconds(1); + final ModifiedAccessConditions sourceModifiedCondition = sourceModifiedAccessConditions == null + ? new ModifiedAccessConditions() + : sourceModifiedAccessConditions; + final BlobAccessConditions destinationAccessConditions = destAccessConditions == null + ? new BlobAccessConditions() + : destAccessConditions; // We want to hide the SourceAccessConditions type from the user for consistency's sake, so we convert here. - SourceModifiedAccessConditions sourceConditions = new SourceModifiedAccessConditions() - .setSourceIfModifiedSince(sourceModifiedAccessConditions.getIfModifiedSince()) - .setSourceIfUnmodifiedSince(sourceModifiedAccessConditions.getIfUnmodifiedSince()) - .setSourceIfMatch(sourceModifiedAccessConditions.getIfMatch()) - .setSourceIfNoneMatch(sourceModifiedAccessConditions.getIfNoneMatch()); + final SourceModifiedAccessConditions sourceConditions = new SourceModifiedAccessConditions() + .setSourceIfModifiedSince(sourceModifiedCondition.getIfModifiedSince()) + .setSourceIfUnmodifiedSince(sourceModifiedCondition.getIfUnmodifiedSince()) + .setSourceIfMatch(sourceModifiedCondition.getIfMatch()) + .setSourceIfNoneMatch(sourceModifiedCondition.getIfNoneMatch()); + + return new Poller<>(interval, + response -> { + try { + return onPoll(response); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + }, + Mono::empty, + () -> { + try { + return onStart(sourceUrl, metadata, tier, priority, sourceConditions, destinationAccessConditions); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + }, + poller -> { + final PollResponse response = poller.getLastPollResponse(); + + if (response == null || response.getValue() == null) { + return Mono.error(logger.logExceptionAsError( + new IllegalArgumentException("Cannot cancel a poll response that never started."))); + } + + final String copyIdentifier = response.getValue().getCopyId(); + + if (!ImplUtils.isNullOrEmpty(copyIdentifier)) { + logger.info("Cancelling copy operation for copy id: {}", copyIdentifier); + + return abortCopyFromURL(copyIdentifier).thenReturn(response.getValue()); + } + + return Mono.empty(); + }); + } + private Mono onStart(String sourceUrl, Map metadata, AccessTier tier, + RehydratePriority priority, SourceModifiedAccessConditions sourceModifiedAccessConditions, + BlobAccessConditions destinationAccessConditions) { URL url; try { url = new URL(sourceUrl); } catch (MalformedURLException ex) { - throw logger.logExceptionAsError(new IllegalArgumentException("'sourceUrl' is not a valid url.")); + throw logger.logExceptionAsError(new IllegalArgumentException("'sourceUrl' is not a valid url.", ex)); } - return this.azureBlobStorage.blobs().startCopyFromURLWithRestResponseAsync( - null, null, url, null, metadata, tier, priority, null, sourceConditions, - destAccessConditions.getModifiedAccessConditions(), destAccessConditions.getLeaseAccessConditions(), - context).map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getCopyId())); + return withContext( + context -> azureBlobStorage.blobs().startCopyFromURLWithRestResponseAsync(null, null, url, null, metadata, + tier, priority, null, sourceModifiedAccessConditions, + destinationAccessConditions.getModifiedAccessConditions(), + destinationAccessConditions.getLeaseAccessConditions(), context)) + .map(response -> { + final BlobStartCopyFromURLHeaders headers = response.getDeserializedHeaders(); + + return new BlobCopyInfo(sourceUrl, headers.getCopyId(), headers.getCopyStatus(), + headers.getETag(), headers.getLastModified(), headers.getErrorCode()); + }); + } + + private Mono> onPoll(PollResponse pollResponse) { + if (pollResponse.getStatus() == OperationStatus.SUCCESSFULLY_COMPLETED + || pollResponse.getStatus() == OperationStatus.FAILED) { + return Mono.just(pollResponse); + } + + final BlobCopyInfo lastInfo = pollResponse.getValue(); + if (lastInfo == null) { + logger.warning("BlobCopyInfo does not exist. Activation operation failed."); + return Mono.just(new PollResponse<>( + OperationStatus.fromString("COPY_START_FAILED", true), null)); + } + + return getProperties().map(response -> { + final CopyStatusType status = response.getCopyStatus(); + final BlobCopyInfo result = new BlobCopyInfo(response.getCopySource(), response.getCopyId(), status, + response.getETag(), response.getCopyCompletionTime(), response.getCopyStatusDescription()); + + OperationStatus operationStatus; + switch (status) { + case SUCCESS: + operationStatus = OperationStatus.SUCCESSFULLY_COMPLETED; + break; + case FAILED: + operationStatus = OperationStatus.FAILED; + break; + case ABORTED: + operationStatus = OperationStatus.USER_CANCELLED; + break; + case PENDING: + operationStatus = OperationStatus.IN_PROGRESS; + break; + default: + throw logger.logExceptionAsError(new IllegalArgumentException( + "CopyStatusType is not supported. Status: " + status)); + } + + return new PollResponse<>(operationStatus, result); + }).onErrorReturn( + new PollResponse<>(OperationStatus.fromString("POLLING_FAILED", true), lastInfo)); } /** @@ -352,6 +449,10 @@ Mono> startCopyFromURLWithResponse(String sourceUrl, MapFor more information, see the * Azure Docs

    * + * @see #copyFromURL(String) + * @see #beginCopy(String, Duration) + * @see #beginCopy(String, Map, AccessTier, RehydratePriority, ModifiedAccessConditions, + * BlobAccessConditions, Duration) * @param copyId The id of the copy operation to abort. * @return A reactive response signalling completion. */ @@ -373,6 +474,10 @@ public Mono abortCopyFromURL(String copyId) { *

    For more information, see the * Azure Docs

    * + * @see #copyFromURL(String) + * @see #beginCopy(String, Duration) + * @see #beginCopy(String, Map, AccessTier, RehydratePriority, ModifiedAccessConditions, + * BlobAccessConditions, Duration) * @param copyId The id of the copy operation to abort. * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does * not match the active lease on the blob. @@ -402,7 +507,7 @@ Mono> abortCopyFromURLWithResponse(String copyId, LeaseAccessCond * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURL#String} * *

    For more information, see the - * Azure Docs

    + * Azure Docs

    * * @param copySource The source URL to copy from. * @return A reactive response containing the copy ID for the long running operation. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 85e6c3a5e5c1..aa92c9455531 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -9,11 +9,13 @@ import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.Poller; import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.BlobProperties; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobCopyInfo; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobStorageException; @@ -217,17 +219,19 @@ public Response existsWithResponse(Duration timeout, Context context) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.startCopyFromURL#String} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.beginCopy#String-Duration} * *

    For more information, see the - * Azure Docs

    + * Azure Docs

    * * @param sourceUrl The source URL to copy from. URLs outside of Azure may only be copied to block blobs. - * @return The copy ID for the long running operation. - * @throws IllegalArgumentException If {@code sourceUrl} is a malformed {@link URL}. + * @param pollInterval Duration between each poll for the copy status. If none is specified, a default of one second + * is used. + * @return A {@link Poller} that polls the blob copy operation until it has completed, has failed, or has been + * cancelled. */ - public String startCopyFromURL(String sourceUrl) { - return startCopyFromURLWithResponse(sourceUrl, null, null, null, null, null, null, Context.NONE).getValue(); + public Poller beginCopy(String sourceUrl, Duration pollInterval) { + return beginCopy(sourceUrl, null, null, null, null, null, pollInterval); } /** @@ -235,10 +239,10 @@ public String startCopyFromURL(String sourceUrl) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.startCopyFromURLWithResponse#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration} * *

    For more information, see the - * Azure Docs

    + * Azure Docs

    * * @param sourceUrl The source URL to copy from. URLs outside of Azure may only be copied to block blobs. * @param metadata Metadata to associate with the destination blob. @@ -249,19 +253,17 @@ public String startCopyFromURL(String sourceUrl) { * related to when the blob was changed relative to the given request. The request will fail if the specified * condition is not satisfied. * @param destAccessConditions {@link BlobAccessConditions} against the destination. - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return The copy ID for the long running operation. - * @throws IllegalArgumentException If {@code sourceUrl} is a malformed {@link URL}. + * @param pollInterval Duration between each poll for the copy status. If none is specified, a default of one second + * is used. + * @return A {@link Poller} that polls the blob copy operation until it has completed, has failed, or has been + * cancelled. */ - public Response startCopyFromURLWithResponse(String sourceUrl, Map metadata, - AccessTier tier, RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, - BlobAccessConditions destAccessConditions, Duration timeout, Context context) { - Mono> response = client - .startCopyFromURLWithResponse(sourceUrl, metadata, tier, priority, sourceModifiedAccessConditions, - destAccessConditions, context); + public Poller beginCopy(String sourceUrl, Map metadata, AccessTier tier, + RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, + BlobAccessConditions destAccessConditions, Duration pollInterval) { - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return client.beginCopy(sourceUrl, metadata, tier, priority, sourceModifiedAccessConditions, + destAccessConditions, pollInterval); } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java index a259bae63bff..be10d48b44c6 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java @@ -51,16 +51,6 @@ public void existsCodeSnippet() { // END: com.azure.storage.blob.BlobAsyncClient.exists } - /** - * Code snippets for {@link BlobAsyncClient#startCopyFromURL(String)} - */ - public void startCopyFromURLCodeSnippet() { - // BEGIN: com.azure.storage.blob.BlobAsyncClient.startCopyFromURL#String - client.startCopyFromURL(url) - .subscribe(response -> System.out.printf("Copy identifier: %s%n", response)); - // END: com.azure.storage.blob.BlobAsyncClient.startCopyFromURL#String - } - /** * Code snippets for {@link BlobAsyncClient#abortCopyFromURL(String)} */ @@ -218,7 +208,7 @@ public void getAccountInfoCodeSnippet() { } /** - * Code snippet for {@link BlobAsyncClient#existsWithResponse()} + * Code snippet for {@link BlobAsyncClient#existsWithResponse()}abortCopyFromURL */ public void existsWithResponseCodeSnippet() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.existsWithResponse @@ -226,25 +216,6 @@ public void existsWithResponseCodeSnippet() { // END: com.azure.storage.blob.BlobAsyncClient.existsWithResponse } - /** - * Code snippets for {@link BlobAsyncClient#startCopyFromURLWithResponse(String, Map, AccessTier, - * RehydratePriority, ModifiedAccessConditions, BlobAccessConditions)} - */ - public void startCopyFromURLWithResponseCodeSnippets() { - - // BEGIN: com.azure.storage.blob.BlobAsyncClient.startCopyFromURLWithResponse#String-Metadata-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions - Map metadata = Collections.singletonMap("metadata", "value"); - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); - - client.startCopyFromURLWithResponse(url, metadata, AccessTier.HOT, RehydratePriority.STANDARD, - modifiedAccessConditions, blobAccessConditions) - .subscribe(response -> System.out.printf("Copy identifier: %s%n", response.getValue())); - // END: com.azure.storage.blob.BlobAsyncClient.startCopyFromURLWithResponse#String-Metadata-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions - } - /** * Code snippets for {@link BlobAsyncClient#abortCopyFromURLWithResponse(String, LeaseAccessConditions)} */ diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java index 9244e128a849..f6432842dff7 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java @@ -54,15 +54,6 @@ public void existsCodeSnippet() { // END: com.azure.storage.blob.BlobClient.exists } - /** - * Code snippets for {@link BlobClient#startCopyFromURL(String)} - */ - public void startCopyFromURL() { - // BEGIN: com.azure.storage.blob.BlobClient.startCopyFromURL#String - System.out.printf("Copy identifier: %s%n", client.startCopyFromURL(url)); - // END: com.azure.storage.blob.BlobClient.startCopyFromURL#String - } - /** * Code snippets for {@link BlobClient#abortCopyFromURL(String)} */ @@ -205,26 +196,6 @@ public void existsWithResponseCodeSnippet() { // END: com.azure.storage.blob.BlobClient.existsWithResponse#Duration-Context } - /** - * Code snippets for {@link BlobClient#startCopyFromURLWithResponse(String, Map, AccessTier, RehydratePriority, - * ModifiedAccessConditions, BlobAccessConditions, Duration, Context)} - */ - public void startCopyFromURLWithResponseCodeSnippets() { - - // BEGIN: com.azure.storage.blob.BlobClient.startCopyFromURLWithResponse#String-Metadata-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration-Context - Map metadata = Collections.singletonMap("metadata", "value"); - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); - - System.out.printf("Copy identifier: %s%n", - client.startCopyFromURLWithResponse(url, metadata, AccessTier.HOT, RehydratePriority.STANDARD, - modifiedAccessConditions, blobAccessConditions, timeout, - new Context(key2, value2))); - // END: com.azure.storage.blob.BlobClient.startCopyFromURLWithResponse#String-Metadata-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration-Context - } - /** * Code snippets for {@link BlobClient#abortCopyFromURLWithResponse(String, LeaseAccessConditions, Duration, Context)} */ diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java index e11d9da1debc..5ca38d362a84 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java @@ -3,9 +3,11 @@ package com.azure.storage.blob.specialized; +import com.azure.core.util.polling.Poller; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobCopyInfo; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; @@ -18,6 +20,7 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.UncheckedIOException; +import java.time.Duration; import java.time.OffsetDateTime; import java.util.Collections; import java.util.Map; @@ -44,13 +47,13 @@ public void existsCodeSnippet() { } /** - * Code snippets for {@link BlobAsyncClientBase#startCopyFromURL(String)} + * Code snippets for {@link BlobAsyncClientBase#beginCopy(String, Duration)} */ - public void startCopyFromURLCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.startCopyFromURL#String - client.startCopyFromURL(url) + public void beginCopyCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopy#String-Duration + client.beginCopy(url, Duration.ofSeconds(3)).getObserver() .subscribe(response -> System.out.printf("Copy identifier: %s%n", response)); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.startCopyFromURL#String + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopy#String-Duration } /** @@ -220,22 +223,45 @@ public void existsWithResponseCodeSnippet() { } /** - * Code snippets for {@link BlobAsyncClientBase#startCopyFromURLWithResponse(String, Map, AccessTier, - * RehydratePriority, ModifiedAccessConditions, BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClientBase#beginCopy(String, Map, AccessTier, + * RehydratePriority, ModifiedAccessConditions, BlobAccessConditions, Duration)} */ - public void startCopyFromURLWithResponseCodeSnippets() { + public void beginCopyCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration + Map metadata = Collections.singletonMap("metadata", "value"); + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); + BlobAccessConditions blobAccessConditions = new BlobAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.startCopyFromURLWithResponse#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions + client.beginCopy(url, metadata, AccessTier.HOT, RehydratePriority.STANDARD, + modifiedAccessConditions, blobAccessConditions, Duration.ofSeconds(2)) + .getObserver() + .subscribe(response -> { + BlobCopyInfo info = response.getValue(); + System.out.printf("CopyId: %s. Status: %s%n", info.getCopyId(), info.getCopyStatus()); + }); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobAsyncClientBase#beginCopy(String, Map, AccessTier, + * RehydratePriority, ModifiedAccessConditions, BlobAccessConditions, Duration)} + */ + public void beginCopyFromUrlCancelCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopyFromUrlCancel#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration Map metadata = Collections.singletonMap("metadata", "value"); ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); BlobAccessConditions blobAccessConditions = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); - client.startCopyFromURLWithResponse(url, metadata, AccessTier.HOT, RehydratePriority.STANDARD, - modifiedAccessConditions, blobAccessConditions) - .subscribe(response -> System.out.printf("Copy identifier: %s%n", response.getValue())); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.startCopyFromURLWithResponse#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions + Poller poller = client.beginCopy(url, metadata, AccessTier.HOT, + RehydratePriority.STANDARD, modifiedAccessConditions, blobAccessConditions, Duration.ofSeconds(2)); + + // Cancel a poll operation. + poller.cancelOperation().block(); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopyFromUrlCancel#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java index 3b6475f532d7..80b2213a0a72 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java @@ -4,9 +4,12 @@ package com.azure.storage.blob.specialized; import com.azure.core.util.Context; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; import com.azure.storage.blob.BlobProperties; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobCopyInfo; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; @@ -52,12 +55,15 @@ public void existsCodeSnippet() { } /** - * Code snippets for {@link BlobClientBase#startCopyFromURL(String)} + * Code snippets for {@link BlobClientBase#beginCopy(String, Duration)} */ public void startCopyFromURL() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.startCopyFromURL#String - System.out.printf("Copy identifier: %s%n", client.startCopyFromURL(url)); - // END: com.azure.storage.blob.specialized.BlobClientBase.startCopyFromURL#String + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.beginCopy#String-Duration + final Poller poller = client.beginCopy(url, Duration.ofSeconds(2)); + poller.getObserver().subscribe(response -> { + System.out.printf("Copy identifier: %s%n", response.getValue().getCopyId()); + }); + // END: com.azure.storage.blob.specialized.BlobClientBase.beginCopy#String-Duration } /** @@ -204,23 +210,22 @@ public void existsWithResponseCodeSnippet() { } /** - * Code snippets for {@link BlobClientBase#startCopyFromURLWithResponse(String, Map, AccessTier, RehydratePriority, - * ModifiedAccessConditions, BlobAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClientBase#beginCopy(String, Map, AccessTier, RehydratePriority, + * ModifiedAccessConditions, BlobAccessConditions, Duration)} */ - public void startCopyFromURLWithResponseCodeSnippets() { - - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.startCopyFromURLWithResponse#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration-Context + public void beginCopyFromUrl() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration Map metadata = Collections.singletonMap("metadata", "value"); ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( new LeaseAccessConditions().setLeaseId(leaseId)); + Poller poller = client.beginCopy(url, metadata, AccessTier.HOT, + RehydratePriority.STANDARD, modifiedAccessConditions, blobAccessConditions, Duration.ofSeconds(2)); - System.out.printf("Copy identifier: %s%n", - client.startCopyFromURLWithResponse(url, metadata, AccessTier.HOT, RehydratePriority.STANDARD, - modifiedAccessConditions, blobAccessConditions, timeout, - new Context(key2, value2))); - // END: com.azure.storage.blob.specialized.BlobClientBase.startCopyFromURLWithResponse#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration-Context + PollResponse response = poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); + System.out.printf("Copy identifier: %s%n", response.getValue().getCopyId()); + // END: com.azure.storage.blob.specialized.BlobClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration } /** diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy index b1d3cf0a8444..d2b455aed10d 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy @@ -25,6 +25,7 @@ import com.azure.storage.blob.models.SyncCopyStatusType import com.azure.storage.blob.specialized.BlobClientBase import com.azure.storage.blob.specialized.BlobServiceSasSignatureValues import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder +import reactor.test.StepVerifier import spock.lang.Unroll import java.nio.ByteBuffer @@ -716,7 +717,7 @@ class BlobAPITest extends APISpec { setup: def copyDestBlob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() def headers = - copyDestBlob.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null, null).getHeaders() + copyDestBlob.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null).getHeaders() when: while (copyDestBlob.getProperties().getCopyStatus() == CopyStatusType.PENDING) { @@ -735,7 +736,37 @@ class BlobAPITest extends APISpec { def "Copy min"() { expect: - bc.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null, null).getStatusCode() == 202 + bc.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null).getStatusCode() == 202 + } + + def "Copy poller"() { + setup: + def copyDestBlob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() + def poller = copyDestBlob.beginCopy(bc.getBlobUrl(), null, null, null, null, null, null); + + when: + def verifier = StepVerifier.create(poller.getObserver()) + + then: + verifier.assertNext({ + assert it.getValue() != null + assert it.getValue().getCopyId() != null + assert it.getValue().getCopySourceUrl() == bc.getBlobUrl() + }).verifyComplete() + + expect: + def properties = copyDestBlob.getProperties() + + properties.getCopyStatus() == CopyStatusType.SUCCESS + properties.getCopyCompletionTime() != null + properties.getCopyProgress() != null + properties.getCopySource() != null + properties.getCopyId() != null + + def lastResponse = poller.getLastPollResponse() + lastResponse != null + lastResponse.getValue() != null + lastResponse.getValue().getCopyId() == properties.getCopyId() } @Unroll @@ -750,7 +781,7 @@ class BlobAPITest extends APISpec { metadata.put(key2, value2) } - def status = bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), metadata, null, null, null, null, null, null) + def status = bu2.copyFromURLWithResponse(bc.getBlobUrl(), metadata, null, null, null, null, null) .getHeaders().getValue("x-ms-copy-status") def start = OffsetDateTime.now() @@ -784,7 +815,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) expect: - copyDestBlob.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, mac, null, null, null).getStatusCode() == 202 + copyDestBlob.copyFromURLWithResponse(bc.getBlobUrl(), null, null, mac, null, null, null).getStatusCode() == 202 where: modified | unmodified | match | noneMatch @@ -807,7 +838,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) when: - bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, mac, null, null, null) + bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, mac, null, null, null) then: thrown(BlobStorageException) @@ -837,7 +868,7 @@ class BlobAPITest extends APISpec { expect: - bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, bac, null, null).getStatusCode() == 202 + bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null).getStatusCode() == 202 where: modified | unmodified | match | noneMatch | leaseID @@ -865,7 +896,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch)) when: - bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, bac, null, null) + bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null) then: thrown(BlobStorageException) @@ -896,7 +927,7 @@ class BlobAPITest extends APISpec { def leaseID = setupBlobLeaseCondition(bu2, receivedLeaseID) when: - def copyID = bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, + def copyID = bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)), null, null).getValue() bu2.abortCopyFromURLWithResponse(copyID, new LeaseAccessConditions().setLeaseId(garbageLeaseID), null, null) @@ -922,7 +953,7 @@ class BlobAPITest extends APISpec { def bu2 = cu2.getBlobClient(generateBlobName()) when: - def copyID = bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null, null).getValue() + def copyID = bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null).getValue() def response = bu2.abortCopyFromURLWithResponse(copyID, null, null, null) def headers = response.getHeaders() @@ -949,7 +980,7 @@ class BlobAPITest extends APISpec { def bu2 = cu2.getBlobClient(generateBlobName()) when: - def copyID = bu2.startCopyFromURL(bc.getBlobUrl()) + def copyID = bu2.copyFromURL(bc.getBlobUrl()) then: bu2.abortCopyFromURLWithResponse(copyID, null, null, null).getStatusCode() == 204 @@ -972,7 +1003,7 @@ class BlobAPITest extends APISpec { when: def copyID = - bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, + bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)), null, null).getValue() then: @@ -986,7 +1017,7 @@ class BlobAPITest extends APISpec { bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - bc.startCopyFromURL("http://www.error.com") + bc.copyFromURL("http://www.error.com") then: thrown(BlobStorageException) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy index 8c6ab5810c53..83f29f5cfe63 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy @@ -4,22 +4,7 @@ package com.azure.storage.blob import com.azure.core.http.rest.Response -import com.azure.storage.blob.models.AccessTier -import com.azure.storage.blob.models.AppendBlobItem -import com.azure.storage.blob.models.BlobAccessPolicy -import com.azure.storage.blob.models.BlobContainerAccessConditions -import com.azure.storage.blob.models.BlobErrorCode -import com.azure.storage.blob.models.BlobListDetails -import com.azure.storage.blob.models.BlobSignedIdentifier -import com.azure.storage.blob.models.BlobType -import com.azure.storage.blob.models.CopyStatusType -import com.azure.storage.blob.models.LeaseAccessConditions -import com.azure.storage.blob.models.LeaseStateType -import com.azure.storage.blob.models.LeaseStatusType -import com.azure.storage.blob.models.ListBlobsOptions -import com.azure.storage.blob.models.ModifiedAccessConditions -import com.azure.storage.blob.models.PublicAccessType -import com.azure.storage.blob.models.BlobStorageException +import com.azure.storage.blob.models.* import com.azure.storage.blob.specialized.AppendBlobClient import com.azure.storage.blob.specialized.BlobClientBase import spock.lang.Unroll @@ -673,7 +658,7 @@ class ContainerAPITest extends APISpec { def copyBlob = cc.getBlobClient(copyName).getPageBlobClient() - copyBlob.startCopyFromURL(normal.getBlobUrl()) + def poller = copyBlob.beginCopy(normal.getBlobUrl(), Duration.ofSeconds(2)) def start = OffsetDateTime.now() def status = CopyStatusType.PENDING while (status != CopyStatusType.SUCCESS) { diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopypoller.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopypoller.json new file mode 100644 index 000000000000..8d539e5bb526 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopypoller.json @@ -0,0 +1,208 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "38ffc126-a960-4422-9483-6f15c7ff63ca" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7529B4D6F2811", + "Last-Modified" : "Thu, 17 Oct 2019 00:45:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "9d9971cb-001e-00d8-1584-8497a7000000", + "Date" : "Thu, 17 Oct 2019 00:45:26 GMT", + "x-ms-client-request-id" : "38ffc126-a960-4422-9483-6f15c7ff63ca" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller1blobapitestcopypoller3a1499542089c08", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "4dd7bbaa-e59d-43bf-9c76-8fe4f705884d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Thu, 17 Oct 2019 00:45:27 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 17 Oct 2019 00:45:27 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D7529B4D9EECFA", + "Content-Length" : "0", + "x-ms-request-id" : "9d997217-001e-00d8-5784-8497a7000000", + "x-ms-client-request-id" : "4dd7bbaa-e59d-43bf-9c76-8fe4f705884d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller2blobapitestcopypoller3a137183fc57c48", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "e7726eda-b242-46cd-9dda-f4717e8b9144" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "5bd8fac4-9277-45a2-9e4e-495043105346", + "ETag" : "0x8D7529B4DAEA831", + "Last-Modified" : "Thu, 17 Oct 2019 00:45:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "x-ms-copy-status" : "success", + "StatusCode" : "202", + "x-ms-request-id" : "9d997232-001e-00d8-6f84-8497a7000000", + "Date" : "Thu, 17 Oct 2019 00:45:27 GMT", + "x-ms-client-request-id" : "e7726eda-b242-46cd-9dda-f4717e8b9144" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller2blobapitestcopypoller3a137183fc57c48", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "0ce2657b-3890-4106-b561-82f78511b8ab" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "faa83f4c-3538-404e-86fe-0c7524c9b883", + "ETag" : "0x8D7529B4DBD0386", + "Last-Modified" : "Thu, 17 Oct 2019 00:45:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "x-ms-copy-status" : "success", + "StatusCode" : "202", + "x-ms-request-id" : "9d99724c-001e-00d8-0484-8497a7000000", + "Date" : "Thu, 17 Oct 2019 00:45:27 GMT", + "x-ms-client-request-id" : "0ce2657b-3890-4106-b561-82f78511b8ab" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller2blobapitestcopypoller3a137183fc57c48", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "640b28be-b3b1-498d-8e1f-7dc8f8040dbb" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Thu, 17 Oct 2019 00:45:27 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Thu, 17 Oct 2019 00:45:27 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "9d99735e-001e-00d8-6684-8497a7000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "faa83f4c-3538-404e-86fe-0c7524c9b883", + "x-ms-copy-source" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller1blobapitestcopypoller3a1499542089c08", + "x-ms-copy-progress" : "7/7", + "Date" : "Thu, 17 Oct 2019 00:45:28 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Thu, 17 Oct 2019 00:45:27 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D7529B4DBD0386", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "640b28be-b3b1-498d-8e1f-7dc8f8040dbb" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller2blobapitestcopypoller3a137183fc57c48", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "cea082d8-c4bb-47a0-9e15-bd7ee73365c6" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Thu, 17 Oct 2019 00:45:27 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Thu, 17 Oct 2019 00:45:27 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "9d99811e-001e-00d8-6184-8497a7000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "faa83f4c-3538-404e-86fe-0c7524c9b883", + "x-ms-copy-source" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller1blobapitestcopypoller3a1499542089c08", + "x-ms-copy-progress" : "7/7", + "Date" : "Thu, 17 Oct 2019 00:45:40 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Thu, 17 Oct 2019 00:45:27 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D7529B4DBD0386", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "cea082d8-c4bb-47a0-9e15-bd7ee73365c6" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://storageaccount.blob.core.windows.net?prefix=jtccopypoller&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "ff18891a-417d-4460-9d83-c21beb73f8e9" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "9d99812a-001e-00d8-6d84-8497a7000000", + "Body" : "jtccopypollerjtccopypoller0blobapitestcopypoller3a1062384d8832d2ffThu, 17 Oct 2019 00:45:26 GMT\"0x8D7529B4D6F2811\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 17 Oct 2019 00:45:40 GMT", + "x-ms-client-request-id" : "ff18891a-417d-4460-9d83-c21beb73f8e9", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "225a2053-ecbf-4ebd-a7b7-e18509848f2a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "9d998150-001e-00d8-0c84-8497a7000000", + "Date" : "Thu, 17 Oct 2019 00:45:40 GMT", + "x-ms-client-request-id" : "225a2053-ecbf-4ebd-a7b7-e18509848f2a" + }, + "Exception" : null + } ], + "variables" : [ "jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff", "javablobcopypoller1blobapitestcopypoller3a1499542089c08", "javablobcopypoller2blobapitestcopypoller3a137183fc57c48" ] +} diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java index 74831e5b3935..21bc3da3fa94 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java @@ -11,21 +11,25 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.http.PagedResponseBase; import com.azure.core.implementation.util.FluxUtil; +import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.PollResponse.OperationStatus; +import com.azure.core.util.polling.Poller; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.file.implementation.AzureFileStorageImpl; import com.azure.storage.file.implementation.models.FileGetPropertiesHeaders; import com.azure.storage.file.implementation.models.FileRangeWriteType; +import com.azure.storage.file.implementation.models.FileStartCopyHeaders; import com.azure.storage.file.implementation.models.FileUploadRangeFromURLHeaders; import com.azure.storage.file.implementation.models.FileUploadRangeHeaders; import com.azure.storage.file.implementation.models.FilesCreateResponse; import com.azure.storage.file.implementation.models.FilesGetPropertiesResponse; import com.azure.storage.file.implementation.models.FilesSetHTTPHeadersResponse; import com.azure.storage.file.implementation.models.FilesSetMetadataResponse; -import com.azure.storage.file.implementation.models.FilesStartCopyResponse; import com.azure.storage.file.implementation.models.FilesUploadRangeFromURLResponse; import com.azure.storage.file.implementation.models.FilesUploadRangeResponse; import com.azure.storage.file.models.CopyStatusType; @@ -62,6 +66,7 @@ import java.util.Map; import java.util.Objects; import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import java.util.stream.Collectors; @@ -226,56 +231,106 @@ Mono> createWithResponse(long maxSize, FileHttpHeaders httpHe * *

    Copy file from source url to the {@code resourcePath}

    * - * {@codesnippet com.azure.storage.file.fileAsyncClient.startCopy#string-map} + * {@codesnippet com.azure.storage.file.fileAsyncClient.beginCopy#string-map-duration} * *

    For more information, see the * Azure Docs.

    * * @param sourceUrl Specifies the URL of the source file or blob, up to 2 KB in length. + * @param pollInterval Duration between each poll for the copy status. If none is specified, a default of one second + * is used. * @param metadata Optional name-value pairs associated with the file as metadata. Metadata names must adhere to the * naming rules. - * @return The {@link FileCopyInfo file copy info}. + * @return A {@link Poller} that polls the file copy operation until it has completed or has been cancelled. * @see C# identifiers */ - public Mono startCopy(String sourceUrl, Map metadata) { - try { - return startCopyWithResponse(sourceUrl, metadata).flatMap(FluxUtil::toMono); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } + public Poller beginCopy(String sourceUrl, Map metadata, Duration pollInterval) { + final AtomicReference copyId = new AtomicReference<>(); + final Duration interval = pollInterval != null ? pollInterval : Duration.ofSeconds(1); + + return new Poller<>(interval, + response -> { + try { + return onPoll(response); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + }, + Mono::empty, + () -> { + try { + return withContext(context -> azureFileStorageClient.files() + .startCopyWithRestResponseAsync(shareName, filePath, sourceUrl, null, metadata, context)) + .map(response -> { + final FileStartCopyHeaders headers = response.getDeserializedHeaders(); + copyId.set(headers.getCopyId()); + + return new FileCopyInfo(sourceUrl, headers.getCopyId(), headers.getCopyStatus(), + headers.getETag(), headers.getLastModified(), headers.getErrorCode()); + }); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + }, + poller -> { + final PollResponse response = poller.getLastPollResponse(); + + if (response == null || response.getValue() == null) { + return Mono.error(logger.logExceptionAsError( + new IllegalArgumentException("Cannot cancel a poll response that never started."))); + } + + final String copyIdentifier = response.getValue().getCopyId(); + + if (!ImplUtils.isNullOrEmpty(copyIdentifier)) { + logger.info("Cancelling copy operation for copy id: {}", copyIdentifier); + + return abortCopy(copyIdentifier).thenReturn(response.getValue()); + } + + return Mono.empty(); + }); } - /** - * Copies a blob or file to a destination file within the storage account. - * - *

    Code Samples

    - * - *

    Copy file from source url to the {@code resourcePath}

    - * - * {@codesnippet com.azure.storage.file.fileAsyncClient.startCopyWithResponse#string-map} - * - *

    For more information, see the - * Azure Docs.

    - * - * @param sourceUrl Specifies the URL of the source file or blob, up to 2 KB in length. - * @param metadata Optional name-value pairs associated with the file as metadata. Metadata names must adhere to the - * naming rules. - * @return A response containing the {@link FileCopyInfo file copy info} and the status of copying the file. - * @see C# identifiers - */ - public Mono> startCopyWithResponse(String sourceUrl, Map metadata) { - try { - return withContext(context -> startCopyWithResponse(sourceUrl, metadata, context)); - } catch (RuntimeException ex) { - return monoError(logger, ex); + private Mono> onPoll(PollResponse pollResponse) { + if (pollResponse.getStatus() == OperationStatus.SUCCESSFULLY_COMPLETED + || pollResponse.getStatus() == OperationStatus.FAILED) { + return Mono.just(pollResponse); } - } - Mono> startCopyWithResponse(String sourceUrl, Map metadata, - Context context) { - return azureFileStorageClient.files() - .startCopyWithRestResponseAsync(shareName, filePath, sourceUrl, null, metadata, context) - .map(this::startCopyResponse); + final FileCopyInfo lastInfo = pollResponse.getValue(); + if (lastInfo == null) { + logger.warning("FileCopyInfo does not exist. Activation operation failed."); + return Mono.just(new PollResponse<>(OperationStatus.fromString("COPY_START_FAILED", true), null)); + } + + return getProperties() + .map(response -> { + final CopyStatusType status = response.getCopyStatus(); + final FileCopyInfo result = new FileCopyInfo(response.getCopySource(), response.getCopyId(), status, + response.getETag(), response.getCopyCompletionTime(), response.getCopyStatusDescription()); + + OperationStatus operationStatus; + switch (status) { + case SUCCESS: + operationStatus = OperationStatus.SUCCESSFULLY_COMPLETED; + break; + case FAILED: + operationStatus = OperationStatus.FAILED; + break; + case ABORTED: + operationStatus = OperationStatus.USER_CANCELLED; + break; + case PENDING: + operationStatus = OperationStatus.IN_PROGRESS; + break; + default: + throw logger.logExceptionAsError(new IllegalArgumentException( + "CopyStatusType is not supported. Status: " + status)); + } + + return new PollResponse<>(operationStatus, result); + }).onErrorReturn(new PollResponse<>(OperationStatus.fromString("POLLING_FAILED", true), lastInfo)); } /** @@ -1269,15 +1324,6 @@ private Response createFileInfoResponse(final FilesCreateResponse resp return new SimpleResponse<>(response, fileInfo); } - private Response startCopyResponse(final FilesStartCopyResponse response) { - String eTag = response.getDeserializedHeaders().getETag(); - OffsetDateTime lastModified = response.getDeserializedHeaders().getLastModified(); - String copyId = response.getDeserializedHeaders().getCopyId(); - CopyStatusType copyStatus = response.getDeserializedHeaders().getCopyStatus(); - FileCopyInfo fileCopyInfo = new FileCopyInfo(eTag, lastModified, copyId, copyStatus); - return new SimpleResponse<>(response, fileCopyInfo); - } - private Response setPropertiesResponse(final FilesSetHTTPHeadersResponse response) { String eTag = response.getDeserializedHeaders().getETag(); OffsetDateTime lastModified = response.getDeserializedHeaders().getLastModified(); diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java index 76d32fc770bc..b1eef3cadb2e 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java @@ -10,6 +10,7 @@ import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.Poller; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.StorageImplUtils; @@ -190,7 +191,7 @@ public Response createWithResponse(long maxSize, FileHttpHeaders httpH * *

    Copy file from source getDirectoryUrl to the {@code resourcePath}

    * - * {@codesnippet com.azure.storage.file.fileClient.startCopy#string-map} + * {@codesnippet com.azure.storage.file.fileClient.beginCopy#string-map-duration} * *

    For more information, see the * Azure Docs.

    @@ -198,39 +199,13 @@ public Response createWithResponse(long maxSize, FileHttpHeaders httpH * @param sourceUrl Specifies the URL of the source file or blob, up to 2 KB in length. * @param metadata Optional name-value pairs associated with the file as metadata. Metadata names must adhere to the * naming rules. - * @return The {@link FileCopyInfo file copy info} + * @param pollInterval Duration between each poll for the copy status. If none is specified, a default of one second + * is used. + * @return A {@link Poller} that polls the file copy operation until it has completed or has been cancelled. * @see C# identifiers */ - public FileCopyInfo startCopy(String sourceUrl, Map metadata) { - return startCopyWithResponse(sourceUrl, metadata, null, Context.NONE).getValue(); - } - - /** - * Copies a blob or file to a destination file within the storage account. - * - *

    Code Samples

    - * - *

    Copy file from source getDirectoryUrl to the {@code resourcePath}

    - * - * {@codesnippet com.azure.storage.file.fileClient.startCopyWithResponse#string-map-duration-context} - * - *

    For more information, see the - * Azure Docs.

    - * - * @param sourceUrl Specifies the URL of the source file or blob, up to 2 KB in length. - * @param metadata Optional name-value pairs associated with the file as metadata. Metadata names must adhere to the - * naming rules. - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing the {@link FileCopyInfo file copy info} and the status of copying the file. - * @throws RuntimeException if the operation doesn't complete before the timeout concludes. - * @see C# identifiers - */ - public Response startCopyWithResponse(String sourceUrl, Map metadata, - Duration timeout, Context context) { - Mono> response = fileAsyncClient.startCopyWithResponse(sourceUrl, metadata, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + public Poller beginCopy(String sourceUrl, Map metadata, Duration pollInterval) { + return fileAsyncClient.beginCopy(sourceUrl, metadata, pollInterval); } /** diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileCopyInfo.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileCopyInfo.java index aabff8fb3e44..7bfa9077e0d7 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileCopyInfo.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileCopyInfo.java @@ -3,51 +3,74 @@ package com.azure.storage.file.models; +import com.azure.core.annotation.Immutable; +import com.azure.storage.file.FileAsyncClient; + +import java.time.Duration; import java.time.OffsetDateTime; +import java.util.Map; /** * Contains copy information about a File in the storage File service. + * + * @see FileAsyncClient#beginCopy(String, Map, Duration) */ +@Immutable public final class FileCopyInfo { + private final String copySource; private final String eTag; private final OffsetDateTime lastModified; private final String copyId; private final CopyStatusType copyStatus; + private final String error; /** * Creates an instance of copy information about a specific File. * - * @param eTag Entity tag that corresponds to the directory. - * @param lastModified Last time the directory was modified. + * @param eTag If the copy is completed, contains the ETag of the destination file. If the copy is not complete, + * contains the ETag of the empty file created at the start of the copy. + * @param lastModified The date/time that the copy operation to the destination file completed. * @param copyId String identifier for this copy operation. * @param copyStatus State of the copy operation with these values: *
      *
    • success: the copy completed successfully.
    • *
    • pending: the copy is still in progress.
    • *
    + * @param copySource The url of the source file. + * @param error An error message for the copy operation. {@code null} if there are no errors. */ - public FileCopyInfo(final String eTag, final OffsetDateTime lastModified, final String copyId, final CopyStatusType copyStatus) { + public FileCopyInfo(String copySource, String copyId, CopyStatusType copyStatus, String eTag, + OffsetDateTime lastModified, String error) { this.eTag = eTag; this.lastModified = lastModified; this.copyId = copyId; this.copyStatus = copyStatus; + this.copySource = copySource; + this.error = error; } /** - * @return Entity tag that corresponds to the directory. + * If the copy is completed, contains the ETag of the destination file. If the copy is not complete, contains the + * ETag of the empty file created at the start of the copy. + * + * @return The ETag for the copy. */ public String getETag() { return eTag; } /** - * @return Last time the directory was modified. + * Gets the date/time that the copy operation to the destination file completed. + * + * @return Gets the date/time that the copy operation to the destination file completed. */ public OffsetDateTime getLastModified() { return lastModified; } /** + * Gets the string identifier for this copy operation. + * * @return String identifier for this copy operation. */ public String getCopyId() { @@ -55,11 +78,34 @@ public String getCopyId() { } /** - * @return State of the copy operation with these values: - * - success: the copy completed successfully. - * - pending: the copy is still in progress. + * Gets the status of the copy operation. The status could be: + *
      + *
    1. {@link CopyStatusType#SUCCESS success}: The copy completed successfully.
    2. + *
    3. {@link CopyStatusType#PENDING pending}: The copy is still in progress.
    4. + *
    + * + * @return Status of the copy operation. */ public CopyStatusType getCopyStatus() { return copyStatus; } + + /** + * Gets the the source file used in the last attempted copy file operation. + * + * @return The url of the source file. + */ + public String getCopySourceUrl() { + return copySource; + } + + /** + * Gets an error description associated with the copy operation. + * + * @return An error description associated with the copy, or {@code null} if there is no error associated with this + * copy operation. + */ + public String getError() { + return error; + } } diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java index 2173ce689be2..57e7a3936530 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java @@ -2,7 +2,9 @@ // Licensed under the MIT License. package com.azure.storage.file; +import com.azure.core.util.polling.Poller; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.file.models.FileCopyInfo; import com.azure.storage.file.models.FileHttpHeaders; import com.azure.storage.file.models.FileProperties; import com.azure.storage.file.models.FileRange; @@ -13,6 +15,7 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; +import java.time.Duration; import java.time.LocalDateTime; import java.time.OffsetDateTime; import java.time.ZoneOffset; @@ -37,7 +40,6 @@ public void asyncInitialization() { // END: com.azure.storage.file.fileAsyncClient.instantiation } - /** * Generates code sample for creating a {@link FileAsyncClient} with SAS token. * @return An instance of {@link FileAsyncClient} @@ -85,7 +87,6 @@ public FileAsyncClient createAsyncClientWithConnectionString() { return fileAsyncClient; } - /** * Generates a code sample for using {@link FileAsyncClient#create(long)} */ @@ -127,33 +128,21 @@ public void createWithResponse() { } /** - * Generates a code sample for using {@link FileAsyncClient#startCopy(String, Map)} + * Generates a code sample for using {@link FileAsyncClient#beginCopy(String, Map, Duration)} */ - public void copyFileAsync() { + public void beginCopy() { FileAsyncClient fileAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.fileAsyncClient.startCopy#string-map - fileAsyncClient.startCopy("https://{accountName}.file.core.windows.net?{SASToken}", - Collections.singletonMap("file", "metadata")).subscribe( - response -> System.out.println("Successfully copied the file;"), - error -> System.err.println(error.toString()), - () -> System.out.println("Complete copying the file.") - ); - // END: com.azure.storage.file.fileAsyncClient.startCopy#string-map - } + // BEGIN: com.azure.storage.file.fileAsyncClient.beginCopy#string-map-duration + Poller poller = fileAsyncClient.beginCopy( + "https://{accountName}.file.core.windows.net?{SASToken}", + Collections.singletonMap("file", "metadata"), Duration.ofSeconds(2)); - /** - * Generates a code sample for using {@link FileAsyncClient#startCopyWithResponse(String, Map)} - */ - public void startCopyWithResponse() { - FileAsyncClient fileAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.fileAsyncClient.startCopyWithResponse#string-map - fileAsyncClient.startCopyWithResponse("https://{accountName}.file.core.windows.net?{SASToken}", - Collections.singletonMap("file", "metadata")).subscribe( - response -> - System.out.println("Successfully copying the file with status code: " + response.getStatusCode()), - error -> System.err.println(error.toString()) - ); - // END: com.azure.storage.file.fileAsyncClient.startCopyWithResponse#string-map + poller.getObserver().subscribe(response -> { + final FileCopyInfo value = response.getValue(); + System.out.printf("Copy source: %s. Status: %s.%n", value.getCopySourceUrl(), value.getCopyStatus()); + }, error -> System.err.println("Error: " + error), + () -> System.out.println("Complete copying the file.")); + // END: com.azure.storage.file.fileAsyncClient.beginCopy#string-map-duration } /** diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java index 85b938a0937b..980c2f082be9 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java @@ -4,6 +4,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.core.util.polling.Poller; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.models.FileCopyInfo; import com.azure.storage.file.models.FileHttpHeaders; @@ -67,7 +68,6 @@ public FileClient createClientWithSASToken() { return fileClient; } - /** * Generates code sample for creating a {@link FileClient} with SAS token. * @@ -141,29 +141,20 @@ public void createWithResponse() { } /** - * Generates a code sample for using {@link FileClient#startCopy(String, Map)} + * Generates a code sample for using {@link FileClient#beginCopy(String, Map, Duration)} */ - public void startCopy() { + public void beginCopy() { FileClient fileClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.fileClient.startCopy#string-map - FileCopyInfo response = fileClient.startCopy( + // BEGIN: com.azure.storage.file.fileClient.beginCopy#string-map-duration + Poller poller = fileClient.beginCopy( "https://{accountName}.file.core.windows.net?{SASToken}", - Collections.singletonMap("file", "metadata")); - System.out.println("Complete copying the file with copy Id: " + response.getCopyId()); - // END: com.azure.storage.file.fileClient.startCopy#string-map - } + Collections.singletonMap("file", "metadata"), Duration.ofSeconds(2)); - /** - * Generates a code sample for using {@link FileClient#startCopyWithResponse(String, Map, Duration, Context)} - */ - public void startCopyWithResponse() { - FileClient fileClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.fileClient.startCopyWithResponse#string-map-duration-context - Response response = fileClient.startCopyWithResponse( - "https://{accountName}.file.core.windows.net?{SASToken}", - Collections.singletonMap("file", "metadata"), Duration.ofSeconds(1), new Context(key1, value1)); - System.out.println("Complete copying the file with copy Id: " + response.getValue().getCopyId()); - // END: com.azure.storage.file.fileClient.startCopyWithResponse#string-map-duration-context + poller.getObserver().subscribe(response -> { + final FileCopyInfo value = response.getValue(); + System.out.printf("Copy source: %s. Status: %s.%n", value.getCopySourceUrl(), value.getCopyStatus()); + }); + // END: com.azure.storage.file.fileClient.beginCopy#string-map-duration } /** diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileSample.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileSample.java index 29438f6914af..af316d22d05c 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileSample.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileSample.java @@ -3,6 +3,7 @@ package com.azure.storage.file; import com.azure.core.util.Configuration; +import com.azure.core.util.polling.Poller; import com.azure.storage.file.models.CopyStatusType; import com.azure.storage.file.models.FileCopyInfo; import com.azure.storage.file.models.FileProperties; @@ -14,6 +15,7 @@ import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.nio.file.Files; +import java.time.Duration; import java.util.UUID; /** @@ -70,22 +72,21 @@ public static void main(String[] args) { String clientURL = srcFileClient.getFileUrl(); String sourceURL = clientURL + "/" + shareName + "/" + parentDirName + "/" + srcFileName; - - FileCopyInfo copyResponse; - try { - copyResponse = destFileClient.startCopy(sourceURL, null); - } catch (FileStorageException e) { - throw new RuntimeException("Failed to start the copy of source file. Reasons: " + e.getMessage()); - } - - // Abort the copy if the status is pending. - if (copyResponse.getCopyStatus() == CopyStatusType.PENDING) { - try { - destFileClient.abortCopy(copyResponse.getCopyId()); - } catch (FileStorageException e) { - System.out.println("Failed to abort the copy. Reasons: " + e.getMessage()); + Duration pollInterval = Duration.ofSeconds(2); + Poller poller = destFileClient.beginCopy(sourceURL, null, pollInterval); + + poller.getObserver().subscribe(pollResponse -> { + final FileCopyInfo copyInfo = pollResponse.getValue(); + + // Abort the copy if the status is pending. + if (copyInfo.getCopyStatus() == CopyStatusType.PENDING) { + try { + destFileClient.abortCopy(copyInfo.getCopyId()); + } catch (FileStorageException e) { + System.out.println("Failed to abort the copy. Reasons: " + e.getMessage()); + } } - } + }); // Upload a local file to the storage. String filePath = "C:/resourcePath/"; diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy index 2ea17095fa93..b6f854f0dd7c 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy @@ -5,8 +5,9 @@ package com.azure.storage.file import com.azure.core.exception.HttpResponseException import com.azure.core.exception.UnexpectedLengthException -import com.azure.core.http.rest.Response import com.azure.core.util.Context +import com.azure.core.util.polling.Poller +import com.azure.storage.common.implementation.Constants import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.common.implementation.Constants import com.azure.storage.file.models.FileCopyInfo @@ -16,6 +17,7 @@ import com.azure.storage.file.models.FileRange import com.azure.storage.file.models.FileStorageException import com.azure.storage.file.models.NtfsFileAttributes import com.azure.storage.file.models.ShareSnapshotInfo +import reactor.test.StepVerifier import spock.lang.Ignore import spock.lang.Unroll @@ -412,11 +414,13 @@ class FileAPITests extends APISpec { def sourceURL = primaryFileClient.getFileUrl() when: - Response copyInfoResponse = primaryFileClient.startCopyWithResponse(sourceURL, null, null, null) + Poller copyInfoResponse = primaryFileClient.beginCopy(sourceURL, null, null) + def verifier = StepVerifier.create(copyInfoResponse.getObserver()) then: - FileTestHelper.assertResponseStatusCode(copyInfoResponse, 202) - copyInfoResponse.getValue().getCopyId() != null + verifier.assertNext({ + assert it.getValue().getCopyId() != null + }).thenCancel().verify() } def "Start copy error"() { @@ -424,11 +428,14 @@ class FileAPITests extends APISpec { primaryFileClient.create(1024) when: - primaryFileClient.startCopyWithResponse("some url", testMetadata, null, null) + Poller copyInfoPoller = primaryFileClient.beginCopy("some url", testMetadata, null) + def verifier = StepVerifier.create(copyInfoPoller.getObserver()) then: - def e = thrown(FileStorageException) - FileTestHelper.assertExceptionStatusCodeAndMessage(e, 400, FileErrorCode.INVALID_HEADER_VALUE) + verifier.verifyErrorSatisfies{ + assert it instanceof FileStorageException + assert FileTestHelper.assertExceptionStatusCodeAndMessage(it, 400, FileErrorCode.INVALID_HEADER_VALUE) + } } @Ignore diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy index 1b6e02e36662..2f27e7d8a429 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy @@ -6,7 +6,10 @@ package com.azure.storage.file import com.azure.core.exception.HttpResponseException import com.azure.core.exception.UnexpectedLengthException import com.azure.core.implementation.util.FluxUtil +import com.azure.core.util.polling.Poller import com.azure.storage.common.StorageSharedKeyCredential +import com.azure.storage.common.implementation.Constants +import com.azure.storage.file.models.FileCopyInfo import com.azure.storage.file.models.FileErrorCode import com.azure.storage.file.models.FileHttpHeaders import com.azure.storage.file.models.FileRange @@ -21,6 +24,7 @@ import java.nio.ByteBuffer import java.nio.charset.StandardCharsets import java.nio.file.FileAlreadyExistsException import java.nio.file.NoSuchFileException +import java.time.Duration import java.time.LocalDateTime import java.time.OffsetDateTime import java.time.ZoneOffset @@ -439,11 +443,11 @@ class FileAsyncAPITests extends APISpec { def sourceURL = primaryFileAsyncClient.getFileUrl() when: - def copyInfoVerifier = StepVerifier.create(primaryFileAsyncClient.startCopyWithResponse(sourceURL, null)) + Poller poller = primaryFileAsyncClient.beginCopy(sourceURL, null, Duration.ofSeconds(2)) + def copyInfoVerifier = StepVerifier.create(poller.getObserver()) then: copyInfoVerifier.assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 202) assert it.getValue().getCopyId() != null }.verifyComplete() } @@ -453,7 +457,8 @@ class FileAsyncAPITests extends APISpec { primaryFileAsyncClient.create(1024).block() when: - def startCopyErrorVerifier = StepVerifier.create(primaryFileAsyncClient.startCopyWithResponse("some url", testMetadata)) + Poller poller = primaryFileAsyncClient.beginCopy("some url", testMetadata, Duration.ofSeconds(2)) + def startCopyErrorVerifier = StepVerifier.create(poller.getObserver()) then: startCopyErrorVerifier.verifyErrorSatisfies { diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsStartCopy.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsStartCopy.json index 761c5da180ed..f237674be9f6 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsStartCopy.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsStartCopy.json @@ -1,77 +1,136 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopye2d881782c5ba?restype=share", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopy3bc54417f49e9?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9cb546b6-5bfc-4e5e-8c47-aa354d1cdafb" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "8d8d46c6-ba4e-4422-8e86-2c174a4213da" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7519F7473529F", - "Last-Modified" : "Tue, 15 Oct 2019 18:42:39 GMT", + "ETag" : "0x8D751B8680E4EDB", + "Last-Modified" : "Tue, 15 Oct 2019 21:41:15 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "89e9e6df-f01a-00ef-3e88-833b08000000", - "Date" : "Tue, 15 Oct 2019 18:42:39 GMT", - "x-ms-client-request-id" : "9cb546b6-5bfc-4e5e-8c47-aa354d1cdafb" + "x-ms-request-id" : "a3618125-f01a-005b-4ca1-83f367000000", + "Date" : "Tue, 15 Oct 2019 21:41:14 GMT", + "x-ms-client-request-id" : "8d8d46c6-ba4e-4422-8e86-2c174a4213da" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopye2d881782c5ba/fileapitestsstartcopyfileapitestsstartcopye2d13437beabf", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopy3bc54417f49e9/fileapitestsstartcopyfileapitestsstartcopy3bc4725899f8f", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a30942b8-2401-42cc-852f-831d5bd30e21" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "d8d95da4-d2f0-4a62-b881-3717bb9f9a88" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "2189138948451189390*13168958551941065216", + "x-ms-file-permission-key" : "9604464107523284943*3308177023012697921", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-10-15T18:42:39.2242449Z", - "Last-Modified" : "Tue, 15 Oct 2019 18:42:39 GMT", + "x-ms-file-creation-time" : "2019-10-15T21:41:16.3452632Z", + "Last-Modified" : "Tue, 15 Oct 2019 21:41:16 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 18:42:39 GMT", - "ETag" : "0x8D7519F747D7111", + "Date" : "Tue, 15 Oct 2019 21:41:15 GMT", + "ETag" : "0x8D751B8686454D8", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-10-15T18:42:39.2242449Z", + "x-ms-file-change-time" : "2019-10-15T21:41:16.3452632Z", "x-ms-file-parent-id" : "0", "Content-Length" : "0", - "x-ms-request-id" : "89e9e6e1-f01a-00ef-3f88-833b08000000", - "x-ms-client-request-id" : "a30942b8-2401-42cc-852f-831d5bd30e21", - "x-ms-file-last-write-time" : "2019-10-15T18:42:39.2242449Z" + "x-ms-request-id" : "a3618128-f01a-005b-4da1-83f367000000", + "x-ms-client-request-id" : "d8d95da4-d2f0-4a62-b881-3717bb9f9a88", + "x-ms-file-last-write-time" : "2019-10-15T21:41:16.3452632Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopye2d881782c5ba/fileapitestsstartcopyfileapitestsstartcopye2d13437beabf", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopy3bc54417f49e9/fileapitestsstartcopyfileapitestsstartcopy3bc4725899f8f", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "85a2f05d-bfbc-456f-85c8-cccabebc3ebc" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "9da40971-84f6-487f-9943-11cf33c8fe1b" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "c3cbc713-da6d-4f42-ab37-cb826be1e45d", - "ETag" : "0x8D7519F75D0D1C6", - "Last-Modified" : "Tue, 15 Oct 2019 18:42:41 GMT", + "x-ms-copy-id" : "fefbf7d9-a206-4f65-a0ad-07329c3f33e2", + "ETag" : "0x8D751B8692AD52D", + "Last-Modified" : "Tue, 15 Oct 2019 21:41:17 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "89e9e6e3-f01a-00ef-4088-833b08000000", - "Date" : "Tue, 15 Oct 2019 18:42:41 GMT", - "x-ms-client-request-id" : "85a2f05d-bfbc-456f-85c8-cccabebc3ebc" + "x-ms-request-id" : "a3618129-f01a-005b-4ea1-83f367000000", + "Date" : "Tue, 15 Oct 2019 21:41:16 GMT", + "x-ms-client-request-id" : "9da40971-84f6-487f-9943-11cf33c8fe1b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopy3bc54417f49e9/fileapitestsstartcopyfileapitestsstartcopy3bc4725899f8f", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "57bf76fc-2ee3-489b-b0f1-f7168aca29d0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "dbdef45e-103c-4e75-8cdd-23b5fd4c4ced", + "ETag" : "0x8D751B8692C5C05", + "Last-Modified" : "Tue, 15 Oct 2019 21:41:17 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "x-ms-copy-status" : "success", + "StatusCode" : "202", + "x-ms-request-id" : "06ce1a21-f01a-0016-1aa1-833c8b000000", + "Date" : "Tue, 15 Oct 2019 21:41:17 GMT", + "x-ms-client-request-id" : "57bf76fc-2ee3-489b-b0f1-f7168aca29d0" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopy3bc54417f49e9/fileapitestsstartcopyfileapitestsstartcopy3bc4725899f8f", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "87257c00-25fd-4728-bd35-3a753d66275f" + }, + "Response" : { + "x-ms-file-id" : "13835128424026341376", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-file-creation-time" : "2019-10-15T21:41:17.6561669Z", + "Last-Modified" : "Tue, 15 Oct 2019 21:41:17 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-file-attributes" : "Archive", + "Content-Length" : "1024", + "x-ms-request-id" : "06ce1a2a-f01a-0016-1ba1-833c8b000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-file-permission-key" : "9604464107523284943*3308177023012697921", + "x-ms-copy-id" : "dbdef45e-103c-4e75-8cdd-23b5fd4c4ced", + "x-ms-copy-source" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopy3bc54417f49e9/fileapitestsstartcopyfileapitestsstartcopy3bc4725899f8f", + "x-ms-copy-progress" : "1024/1024", + "Date" : "Tue, 15 Oct 2019 21:41:18 GMT", + "x-ms-copy-completion-time" : "Tue, 15 Oct 2019 21:41:17 GMT", + "x-ms-server-encrypted" : "true", + "x-ms-type" : "File", + "ETag" : "0x8D751B8692C5C05", + "x-ms-file-change-time" : "2019-10-15T21:41:16.3452632Z", + "x-ms-file-parent-id" : "0", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "87257c00-25fd-4728-bd35-3a753d66275f", + "x-ms-file-last-write-time" : "2019-10-15T21:41:16.3452632Z" }, "Exception" : null } ], - "variables" : [ "fileapitestsstartcopyfileapitestsstartcopye2d881782c5ba", "fileapitestsstartcopyfileapitestsstartcopye2d13437beabf" ] + "variables" : [ "fileapitestsstartcopyfileapitestsstartcopy3bc54417f49e9", "fileapitestsstartcopyfileapitestsstartcopy3bc4725899f8f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsStartCopyError.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsStartCopyError.json index abd4a0f3533b..3f199ae9de87 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsStartCopyError.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsStartCopyError.json @@ -1,61 +1,61 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyerror7397693d0956b6f5f43?restype=share", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyerror28458207491bbd96542?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d1f8f2fe-9cc8-4971-ac71-7b16ea7ec208" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "27115d15-7434-4d08-8b7f-65962b483a08" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7519F75EBD0A8", - "Last-Modified" : "Tue, 15 Oct 2019 18:42:41 GMT", + "ETag" : "0x8D751B8750A15FD", + "Last-Modified" : "Tue, 15 Oct 2019 21:41:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "89e9e6ea-f01a-00ef-4488-833b08000000", - "Date" : "Tue, 15 Oct 2019 18:42:41 GMT", - "x-ms-client-request-id" : "d1f8f2fe-9cc8-4971-ac71-7b16ea7ec208" + "x-ms-request-id" : "248805d1-601a-0004-06a1-83475b000000", + "Date" : "Tue, 15 Oct 2019 21:41:36 GMT", + "x-ms-client-request-id" : "27115d15-7434-4d08-8b7f-65962b483a08" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyerror7397693d0956b6f5f43/fileapitestsstartcopyerror341770d39ec821a214c", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyerror28458207491bbd96542/fileapitestsstartcopyerror35474d41de6300b9846", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "eaf8b0d9-9fd6-49bd-9978-d60f1e41b322" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "a95d1516-6232-408e-a8a4-ede4b617d881" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "2189138948451189390*13168958551941065216", + "x-ms-file-permission-key" : "9604464107523284943*3308177023012697921", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-10-15T18:42:41.7006348Z", - "Last-Modified" : "Tue, 15 Oct 2019 18:42:41 GMT", + "x-ms-file-creation-time" : "2019-10-15T21:41:37.9912096Z", + "Last-Modified" : "Tue, 15 Oct 2019 21:41:37 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 18:42:41 GMT", - "ETag" : "0x8D7519F75F74F0C", + "Date" : "Tue, 15 Oct 2019 21:41:37 GMT", + "ETag" : "0x8D751B8754B3DA0", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-10-15T18:42:41.7006348Z", + "x-ms-file-change-time" : "2019-10-15T21:41:37.9912096Z", "x-ms-file-parent-id" : "0", "Content-Length" : "0", - "x-ms-request-id" : "89e9e6ec-f01a-00ef-4588-833b08000000", - "x-ms-client-request-id" : "eaf8b0d9-9fd6-49bd-9978-d60f1e41b322", - "x-ms-file-last-write-time" : "2019-10-15T18:42:41.7006348Z" + "x-ms-request-id" : "248805d4-601a-0004-07a1-83475b000000", + "x-ms-client-request-id" : "a95d1516-6232-408e-a8a4-ede4b617d881", + "x-ms-file-last-write-time" : "2019-10-15T21:41:37.9912096Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyerror7397693d0956b6f5f43/fileapitestsstartcopyerror341770d39ec821a214c", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyerror28458207491bbd96542/fileapitestsstartcopyerror35474d41de6300b9846", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2077567b-bdac-41af-a656-82b77b9f0cc8" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1f60c99f-e3a5-4719-a0da-7cbfb9ff72cf" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -64,13 +64,35 @@ "retry-after" : "0", "Content-Length" : "330", "StatusCode" : "400", - "x-ms-request-id" : "89e9e6ee-f01a-00ef-4688-833b08000000", - "Body" : "InvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:89e9e6ee-f01a-00ef-4688-833b08000000\nTime:2019-10-15T18:42:41.7334139Zx-ms-copy-sourcesome url", - "Date" : "Tue, 15 Oct 2019 18:42:41 GMT", - "x-ms-client-request-id" : "2077567b-bdac-41af-a656-82b77b9f0cc8", + "x-ms-request-id" : "248805d5-601a-0004-08a1-83475b000000", + "Body" : "InvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:248805d5-601a-0004-08a1-83475b000000\nTime:2019-10-15T21:41:38.0585654Zx-ms-copy-sourcesome url", + "Date" : "Tue, 15 Oct 2019 21:41:37 GMT", + "x-ms-client-request-id" : "1f60c99f-e3a5-4719-a0da-7cbfb9ff72cf", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsstartcopyerror28458207491bbd96542/fileapitestsstartcopyerror35474d41de6300b9846", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "551ef826-c8df-4c41-b94d-d2a433afe89d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidHeaderValue", + "retry-after" : "0", + "Content-Length" : "330", + "StatusCode" : "400", + "x-ms-request-id" : "44e15348-001a-005f-7ba1-837e60000000", + "Body" : "InvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:44e15348-001a-005f-7ba1-837e60000000\nTime:2019-10-15T21:41:38.2040085Zx-ms-copy-sourcesome url", + "Date" : "Tue, 15 Oct 2019 21:41:37 GMT", + "x-ms-client-request-id" : "551ef826-c8df-4c41-b94d-d2a433afe89d", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "fileapitestsstartcopyerror7397693d0956b6f5f43", "fileapitestsstartcopyerror341770d39ec821a214c" ] + "variables" : [ "fileapitestsstartcopyerror28458207491bbd96542", "fileapitestsstartcopyerror35474d41de6300b9846" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsStartCopy.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsStartCopy.json index 9591a1fa6ad4..c5e4cf19c2db 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsStartCopy.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsStartCopy.json @@ -1,77 +1,136 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopy593919ee1df1316d744?restype=share", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopy606390130d9fa0bfb42?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b7ef709b-c5d4-40fd-8192-4b4c044553a4" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f2227d9f-138b-4116-a57b-9c7fc8155e36" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7519F7EF2B546", - "Last-Modified" : "Tue, 15 Oct 2019 18:42:56 GMT", + "ETag" : "0x8D751B801DA8D69", + "Last-Modified" : "Tue, 15 Oct 2019 21:38:24 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "83e489f4-a01a-0116-7288-83b7bd000000", - "Date" : "Tue, 15 Oct 2019 18:42:55 GMT", - "x-ms-client-request-id" : "b7ef709b-c5d4-40fd-8192-4b4c044553a4" + "x-ms-request-id" : "afa69bd9-401a-00d8-09a0-83ed05000000", + "Date" : "Tue, 15 Oct 2019 21:38:23 GMT", + "x-ms-client-request-id" : "f2227d9f-138b-4116-a57b-9c7fc8155e36" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopy593919ee1df1316d744/fileasyncapitestsstartcopy73178a2c6efe5d03a4c", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopy606390130d9fa0bfb42/fileasyncapitestsstartcopy248944bd49275d32246", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d9ca5b00-0cea-48b6-ae9f-9874aa41b724" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "ed13dbb4-49a0-4170-821b-73c724db1e94" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "2189138948451189390*13168958551941065216", + "x-ms-file-permission-key" : "9604464107523284943*3308177023012697921", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-10-15T18:42:56.8372365Z", - "Last-Modified" : "Tue, 15 Oct 2019 18:42:56 GMT", + "x-ms-file-creation-time" : "2019-10-15T21:38:24.8067953Z", + "Last-Modified" : "Tue, 15 Oct 2019 21:38:24 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 18:42:55 GMT", - "ETag" : "0x8D7519F7EFCF88D", + "Date" : "Tue, 15 Oct 2019 21:38:24 GMT", + "ETag" : "0x8D751B80225A371", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-10-15T18:42:56.8372365Z", + "x-ms-file-change-time" : "2019-10-15T21:38:24.8067953Z", "x-ms-file-parent-id" : "0", "Content-Length" : "0", - "x-ms-request-id" : "83e489f6-a01a-0116-7388-83b7bd000000", - "x-ms-client-request-id" : "d9ca5b00-0cea-48b6-ae9f-9874aa41b724", - "x-ms-file-last-write-time" : "2019-10-15T18:42:56.8372365Z" + "x-ms-request-id" : "afa69bdc-401a-00d8-0aa0-83ed05000000", + "x-ms-client-request-id" : "ed13dbb4-49a0-4170-821b-73c724db1e94", + "x-ms-file-last-write-time" : "2019-10-15T21:38:24.8067953Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopy593919ee1df1316d744/fileasyncapitestsstartcopy73178a2c6efe5d03a4c", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopy606390130d9fa0bfb42/fileasyncapitestsstartcopy248944bd49275d32246", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1187fa27-16ba-4d3c-9bb2-e99d7fab2dba" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "08686d35-a007-461f-8d60-b50d2ad3d1c7" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "c13d9105-7d69-40b1-872d-d472db49a33e", - "ETag" : "0x8D7519F7F5603D7", - "Last-Modified" : "Tue, 15 Oct 2019 18:42:57 GMT", + "x-ms-copy-id" : "f7eb6878-fcbf-436d-8194-7558daea2c15", + "ETag" : "0x8D751B8039F18BA", + "Last-Modified" : "Tue, 15 Oct 2019 21:38:27 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "83e489f7-a01a-0116-7488-83b7bd000000", - "Date" : "Tue, 15 Oct 2019 18:42:56 GMT", - "x-ms-client-request-id" : "1187fa27-16ba-4d3c-9bb2-e99d7fab2dba" + "x-ms-request-id" : "afa69bdd-401a-00d8-0ba0-83ed05000000", + "Date" : "Tue, 15 Oct 2019 21:38:26 GMT", + "x-ms-client-request-id" : "08686d35-a007-461f-8d60-b50d2ad3d1c7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopy606390130d9fa0bfb42/fileasyncapitestsstartcopy248944bd49275d32246", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "8d75093c-8287-46c7-b312-58bf6a441551" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "c9899b92-ecde-4769-832c-57bbd152dacc", + "ETag" : "0x8D751B803CDD210", + "Last-Modified" : "Tue, 15 Oct 2019 21:38:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "x-ms-copy-status" : "success", + "StatusCode" : "202", + "x-ms-request-id" : "bd2ec1c7-901a-00e4-47a0-83c4c2000000", + "Date" : "Tue, 15 Oct 2019 21:38:27 GMT", + "x-ms-client-request-id" : "8d75093c-8287-46c7-b312-58bf6a441551" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopy606390130d9fa0bfb42/fileasyncapitestsstartcopy248944bd49275d32246", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "2542eb4f-0239-465e-bcc2-3da9d2c219fd" + }, + "Response" : { + "x-ms-file-id" : "13835128424026341376", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-file-creation-time" : "2019-10-15T21:38:27.5867152Z", + "Last-Modified" : "Tue, 15 Oct 2019 21:38:27 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-file-attributes" : "Archive", + "Content-Length" : "1024", + "x-ms-request-id" : "afa69be1-401a-00d8-0ca0-83ed05000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-file-permission-key" : "9604464107523284943*3308177023012697921", + "x-ms-copy-id" : "c9899b92-ecde-4769-832c-57bbd152dacc", + "x-ms-copy-source" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopy606390130d9fa0bfb42/fileasyncapitestsstartcopy248944bd49275d32246", + "x-ms-copy-progress" : "1024/1024", + "Date" : "Tue, 15 Oct 2019 21:38:27 GMT", + "x-ms-copy-completion-time" : "Tue, 15 Oct 2019 21:38:27 GMT", + "x-ms-server-encrypted" : "true", + "x-ms-type" : "File", + "ETag" : "0x8D751B803CDD210", + "x-ms-file-change-time" : "2019-10-15T21:38:24.8067953Z", + "x-ms-file-parent-id" : "0", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "2542eb4f-0239-465e-bcc2-3da9d2c219fd", + "x-ms-file-last-write-time" : "2019-10-15T21:38:24.8067953Z" }, "Exception" : null } ], - "variables" : [ "fileasyncapitestsstartcopy593919ee1df1316d744", "fileasyncapitestsstartcopy73178a2c6efe5d03a4c" ] + "variables" : [ "fileasyncapitestsstartcopy606390130d9fa0bfb42", "fileasyncapitestsstartcopy248944bd49275d32246" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsStartCopyError.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsStartCopyError.json index 10260784edf3..5df885c6aea6 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsStartCopyError.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsStartCopyError.json @@ -1,61 +1,61 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopyerror70896712202ebab72?restype=share", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopyerror85870950f26f35d37?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f46e340a-d5fe-4c0e-b6f0-bf3aa3c7e2a0" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "0bb8f91f-cdfa-4549-9115-116d1f1bea32" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7519F7F710494", - "Last-Modified" : "Tue, 15 Oct 2019 18:42:57 GMT", + "ETag" : "0x8D751B83F918A04", + "Last-Modified" : "Tue, 15 Oct 2019 21:40:07 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "83e489fb-a01a-0116-7788-83b7bd000000", - "Date" : "Tue, 15 Oct 2019 18:42:56 GMT", - "x-ms-client-request-id" : "f46e340a-d5fe-4c0e-b6f0-bf3aa3c7e2a0" + "x-ms-request-id" : "c2d3b891-501a-006d-24a1-837e17000000", + "Date" : "Tue, 15 Oct 2019 21:40:07 GMT", + "x-ms-client-request-id" : "0bb8f91f-cdfa-4549-9115-116d1f1bea32" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopyerror70896712202ebab72/fileasyncapitestsstartcopyerror474756224c0483c8a", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopyerror85870950f26f35d37/fileasyncapitestsstartcopyerror6088886835f5b876a", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "31a47337-a009-4ac3-823f-9e3c7105ef7b" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "0ff7d3da-a4a2-4973-9a15-ea58416445f5" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "2189138948451189390*13168958551941065216", + "x-ms-file-permission-key" : "9604464107523284943*3308177023012697921", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-10-15T18:42:57.6970624Z", - "Last-Modified" : "Tue, 15 Oct 2019 18:42:57 GMT", + "x-ms-file-creation-time" : "2019-10-15T21:40:08.4813943Z", + "Last-Modified" : "Tue, 15 Oct 2019 21:40:08 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 18:42:56 GMT", - "ETag" : "0x8D7519F7F802B80", + "Date" : "Tue, 15 Oct 2019 21:40:07 GMT", + "ETag" : "0x8D751B83FF12077", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-10-15T18:42:57.6970624Z", + "x-ms-file-change-time" : "2019-10-15T21:40:08.4813943Z", "x-ms-file-parent-id" : "0", "Content-Length" : "0", - "x-ms-request-id" : "83e489fd-a01a-0116-7888-83b7bd000000", - "x-ms-client-request-id" : "31a47337-a009-4ac3-823f-9e3c7105ef7b", - "x-ms-file-last-write-time" : "2019-10-15T18:42:57.6970624Z" + "x-ms-request-id" : "c2d3b894-501a-006d-25a1-837e17000000", + "x-ms-client-request-id" : "0ff7d3da-a4a2-4973-9a15-ea58416445f5", + "x-ms-file-last-write-time" : "2019-10-15T21:40:08.4813943Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopyerror70896712202ebab72/fileasyncapitestsstartcopyerror474756224c0483c8a", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopyerror85870950f26f35d37/fileasyncapitestsstartcopyerror6088886835f5b876a", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "71ae643b-4eab-4716-9798-250beb508453" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "be528edb-31bd-4edd-9480-9da549e09bcf" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -64,13 +64,35 @@ "retry-after" : "0", "Content-Length" : "330", "StatusCode" : "400", - "x-ms-request-id" : "83e489fe-a01a-0116-7988-83b7bd000000", - "Body" : "InvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:83e489fe-a01a-0116-7988-83b7bd000000\nTime:2019-10-15T18:42:57.8209737Zx-ms-copy-sourcesome url", - "Date" : "Tue, 15 Oct 2019 18:42:56 GMT", - "x-ms-client-request-id" : "71ae643b-4eab-4716-9798-250beb508453", + "x-ms-request-id" : "c2d3b895-501a-006d-26a1-837e17000000", + "Body" : "InvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:c2d3b895-501a-006d-26a1-837e17000000\nTime:2019-10-15T21:40:08.5414472Zx-ms-copy-sourcesome url", + "Date" : "Tue, 15 Oct 2019 21:40:07 GMT", + "x-ms-client-request-id" : "be528edb-31bd-4edd-9480-9da549e09bcf", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsstartcopyerror85870950f26f35d37/fileasyncapitestsstartcopyerror6088886835f5b876a", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "874fe4e3-c724-404c-8c5c-a7cebb6b9aa8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidHeaderValue", + "retry-after" : "0", + "Content-Length" : "330", + "StatusCode" : "400", + "x-ms-request-id" : "a3c60786-c01a-00b4-20a1-830692000000", + "Body" : "InvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:a3c60786-c01a-00b4-20a1-830692000000\nTime:2019-10-15T21:40:08.6785610Zx-ms-copy-sourcesome url", + "Date" : "Tue, 15 Oct 2019 21:40:08 GMT", + "x-ms-client-request-id" : "874fe4e3-c724-404c-8c5c-a7cebb6b9aa8", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "fileasyncapitestsstartcopyerror70896712202ebab72", "fileasyncapitestsstartcopyerror474756224c0483c8a" ] + "variables" : [ "fileasyncapitestsstartcopyerror85870950f26f35d37", "fileasyncapitestsstartcopyerror6088886835f5b876a" ] } \ No newline at end of file From ca64b49a839d1ad43e6db25dc27ac580a10ce739 Mon Sep 17 00:00:00 2001 From: Hemant Tanwar Date: Sat, 19 Oct 2019 21:08:08 -0700 Subject: [PATCH 26/64] rerv5 api review comments (#5931) * rerv5 api review comments --- .../blob/BlobContainerSasPermission.java | 12 ++--- .../azure/storage/blob/BlobSasPermission.java | 10 ++-- .../com/azure/storage/blob/SASTest.groovy | 46 +++++++++---------- .../blob/specialized/HelperTest.groovy | 38 +++++++-------- .../common/sas/AccountSasPermission.java | 16 +++---- .../storage/common/sas/AccountSasService.java | 16 +++---- .../azure/storage/file/FileSasPermission.java | 8 ++-- .../storage/file/ShareSasPermission.java | 10 ++-- .../azure/storage/file/FileSASTests.groovy | 20 ++++---- .../storage/queue/QueueSasPermission.java | 8 ++-- .../azure/storage/queue/QueueSASTests.groovy | 12 ++--- 11 files changed, 98 insertions(+), 98 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerSasPermission.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerSasPermission.java index 386473e7fe26..943212a3382a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerSasPermission.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerSasPermission.java @@ -77,7 +77,7 @@ public static BlobContainerSasPermission parse(String permString) { /** * @return the read permission status */ - public boolean getReadPermission() { + public boolean hasReadPermission() { return readPermission; } @@ -95,7 +95,7 @@ public BlobContainerSasPermission setReadPermission(boolean hasReadPermission) { /** * @return the add permission status */ - public boolean getAddPermission() { + public boolean hasAddPermission() { return addPermission; } @@ -113,7 +113,7 @@ public BlobContainerSasPermission setAddPermission(boolean hasAddPermission) { /** * @return the create permission status */ - public boolean getCreatePermission() { + public boolean hasCreatePermission() { return createPermission; } @@ -131,7 +131,7 @@ public BlobContainerSasPermission setCreatePermission(boolean hasCreatePermissio /** * @return the write permission status */ - public boolean getWritePermission() { + public boolean hasWritePermission() { return writePermission; } @@ -149,7 +149,7 @@ public BlobContainerSasPermission setWritePermission(boolean hasWritePermission) /** * @return the delete permission status */ - public boolean getDeletePermission() { + public boolean hasDeletePermission() { return deletePermission; } @@ -167,7 +167,7 @@ public BlobContainerSasPermission setDeletePermission(boolean hasDeletePermissio /** * @return the list permission status */ - public boolean getListPermission() { + public boolean hasListPermission() { return listPermission; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobSasPermission.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobSasPermission.java index a037873a739b..2c9ec5ef3596 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobSasPermission.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobSasPermission.java @@ -72,7 +72,7 @@ public static BlobSasPermission parse(String permString) { /** * @return the read permission status. */ - public boolean getReadPermission() { + public boolean hasReadPermission() { return readPermission; } @@ -90,7 +90,7 @@ public BlobSasPermission setReadPermission(boolean hasReadPermission) { /** * @return the add permission status. */ - public boolean getAddPermission() { + public boolean hasAddPermission() { return addPermission; } @@ -108,7 +108,7 @@ public BlobSasPermission setAddPermission(boolean hasAddPermission) { /** * @return the create permission status. */ - public boolean getCreatePermission() { + public boolean hasCreatePermission() { return createPermission; } @@ -126,7 +126,7 @@ public BlobSasPermission setCreatePermission(boolean hasCreatePermission) { /** * @return the write permission status. */ - public boolean getWritePermission() { + public boolean hasWritePermission() { return writePermission; } @@ -144,7 +144,7 @@ public BlobSasPermission setWritePermission(boolean hasWritePermission) { /** * @return the delete permission status. */ - public boolean getDeletePermission() { + public boolean hasDeletePermission() { return deletePermission; } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy index 857ffe3ee926..d7eeba17db36 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy @@ -531,7 +531,7 @@ class SASTest extends APISpec { bu.upload(new ByteArrayInputStream(data), data.length) def service = new AccountSasService() - .setBlob(true) + .setBlobAccess(true) def resourceType = new AccountSasResourceType() .setContainer(true) .setService(true) @@ -559,7 +559,7 @@ class SASTest extends APISpec { bu.upload(new ByteArrayInputStream(data), data.length) def service = new AccountSasService() - .setBlob(true) + .setBlobAccess(true) def resourceType = new AccountSasResourceType() .setContainer(true) .setService(true) @@ -581,7 +581,7 @@ class SASTest extends APISpec { def "accountSAS network create container fails"() { setup: def service = new AccountSasService() - .setBlob(true) + .setBlobAccess(true) def resourceType = new AccountSasResourceType() .setContainer(true) .setService(true) @@ -604,7 +604,7 @@ class SASTest extends APISpec { def "accountSAS network create container succeeds"() { setup: def service = new AccountSasService() - .setBlob(true) + .setBlobAccess(true) def resourceType = new AccountSasResourceType() .setContainer(true) .setService(true) @@ -788,11 +788,11 @@ class SASTest extends APISpec { def perms = BlobSasPermission.parse(permString) then: - perms.getReadPermission() == read - perms.getWritePermission() == write - perms.getDeletePermission() == delete - perms.getCreatePermission() == create - perms.getAddPermission() == add + perms.hasReadPermission() == read + perms.hasWritePermission() == write + perms.hasDeletePermission() == delete + perms.hasCreatePermission() == create + perms.hasAddPermission() == add where: permString || read | write | delete | create | add @@ -844,12 +844,12 @@ class SASTest extends APISpec { def perms = BlobContainerSasPermission.parse(permString) then: - perms.getReadPermission() == read - perms.getWritePermission() == write - perms.getDeletePermission() == delete - perms.getCreatePermission() == create - perms.getAddPermission() == add - perms.getListPermission() == list + perms.hasReadPermission() == read + perms.hasWritePermission() == write + perms.hasDeletePermission() == delete + perms.hasCreatePermission() == create + perms.hasAddPermission() == add + perms.hasListPermission() == list where: permString || read | write | delete | create | add | list @@ -1035,14 +1035,14 @@ class SASTest extends APISpec { def perms = AccountSasPermission.parse(permString) then: - perms.getReadPermission() == read - perms.getWritePermission() == write - perms.getDeletePermission() == delete - perms.getListPermission() == list - perms.getAddPermission() == add - perms.getCreatePermission() == create - perms.getUpdatePermission() == update - perms.getProcessMessages() == process + perms.hasReadPermission() == read + perms.hasWritePermission() == write + perms.hasDeletePermission() == delete + perms.hasListPermission() == list + perms.hasAddPermission() == add + perms.hasCreatePermission() == create + perms.hasUpdatePermission() == update + perms.hasProcessMessages() == process where: permString || read | write | delete | list | add | create | update | process diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy index 53e15aedfcaf..329191f71649 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy @@ -305,11 +305,11 @@ class HelperTest extends APISpec { BlobSasPermission perms = BlobSasPermission.parse(permString) then: - perms.getReadPermission() == read - perms.getWritePermission() == write - perms.getDeletePermission() == delete - perms.getCreatePermission() == create - perms.getAddPermission() == add + perms.hasReadPermission() == read + perms.hasWritePermission() == write + perms.hasDeletePermission() == delete + perms.hasCreatePermission() == create + perms.hasAddPermission() == add where: permString || read | write | delete | create | add @@ -361,12 +361,12 @@ class HelperTest extends APISpec { BlobContainerSasPermission perms = BlobContainerSasPermission.parse(permString) then: - perms.getReadPermission() == read - perms.getWritePermission() == write - perms.getDeletePermission() == delete - perms.getCreatePermission() == create - perms.getAddPermission() == add - perms.getListPermission() == list + perms.hasReadPermission() == read + perms.hasWritePermission() == write + perms.hasDeletePermission() == delete + perms.hasCreatePermission() == create + perms.hasAddPermission() == add + perms.hasListPermission() == list where: permString || read | write | delete | create | add | list @@ -529,14 +529,14 @@ class HelperTest extends APISpec { AccountSasPermission perms = AccountSasPermission.parse(permString) then: - perms.getReadPermission() == read - perms.getWritePermission() == write - perms.getDeletePermission() == delete - perms.getListPermission() == list - perms.getAddPermission() == add - perms.getCreatePermission() == create - perms.getUpdatePermission() == update - perms.getProcessMessages() == process + perms.hasReadPermission() == read + perms.hasWritePermission() == write + perms.hasDeletePermission() == delete + perms.hasListPermission() == list + perms.hasAddPermission() == add + perms.hasCreatePermission() == create + perms.hasUpdatePermission() == update + perms.hasProcessMessages() == process where: permString || read | write | delete | list | add | create | update | process diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java index f278d6cfd5aa..7a758231a2e5 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java @@ -89,7 +89,7 @@ public static AccountSasPermission parse(String permString) { /** * @return the read permission status */ - public boolean getReadPermission() { + public boolean hasReadPermission() { return readPermission; } @@ -107,7 +107,7 @@ public AccountSasPermission setReadPermission(boolean hasReadPermission) { /** * @return the add permission status */ - public boolean getAddPermission() { + public boolean hasAddPermission() { return addPermission; } @@ -125,7 +125,7 @@ public AccountSasPermission setAddPermission(boolean hasAddPermission) { /** * @return the create permission status */ - public boolean getCreatePermission() { + public boolean hasCreatePermission() { return createPermission; } @@ -143,7 +143,7 @@ public AccountSasPermission setCreatePermission(boolean hasCreatePermission) { /** * @return the write permission status */ - public boolean getWritePermission() { + public boolean hasWritePermission() { return writePermission; } @@ -161,7 +161,7 @@ public AccountSasPermission setWritePermission(boolean hasWritePermission) { /** * @return the delete permission status */ - public boolean getDeletePermission() { + public boolean hasDeletePermission() { return deletePermission; } @@ -179,7 +179,7 @@ public AccountSasPermission setDeletePermission(boolean hasDeletePermission) { /** * @return the list permission status */ - public boolean getListPermission() { + public boolean hasListPermission() { return listPermission; } @@ -200,7 +200,7 @@ public AccountSasPermission setListPermission(boolean hasListPermission) { * * @return the update permission status */ - public boolean getUpdatePermission() { + public boolean hasUpdatePermission() { return updatePermission; } @@ -220,7 +220,7 @@ public AccountSasPermission setUpdatePermission(boolean hasUpdatePermission) { * * @return the process messages permission status. */ - public boolean getProcessMessages() { + public boolean hasProcessMessages() { return processMessagesPermission; } diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasService.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasService.java index 99d77f02eead..09e2960b88b7 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasService.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasService.java @@ -69,7 +69,7 @@ public static AccountSasService parse(String servicesString) { /** * @return the access status for blob resources. */ - public boolean isBlob() { + public boolean hasBlobAccess() { return blob; } @@ -79,7 +79,7 @@ public boolean isBlob() { * @param blob Access status to set * @return the updated AccountSasService object. */ - public AccountSasService setBlob(boolean blob) { + public AccountSasService setBlobAccess(boolean blob) { this.blob = blob; return this; } @@ -87,7 +87,7 @@ public AccountSasService setBlob(boolean blob) { /** * @return the access status for file resources. */ - public boolean isFile() { + public boolean hasFileAccess() { return file; } @@ -97,7 +97,7 @@ public boolean isFile() { * @param file Access status to set * @return the updated AccountSasService object. */ - public AccountSasService setFile(boolean file) { + public AccountSasService setFileAccess(boolean file) { this.file = file; return this; } @@ -105,7 +105,7 @@ public AccountSasService setFile(boolean file) { /** * @return the access status for queue resources. */ - public boolean isQueue() { + public boolean hasQueueAccess() { return queue; } @@ -115,7 +115,7 @@ public boolean isQueue() { * @param queue Access status to set * @return the updated AccountSasService object. */ - public AccountSasService setQueue(boolean queue) { + public AccountSasService setQueueAccess(boolean queue) { this.queue = queue; return this; } @@ -123,7 +123,7 @@ public AccountSasService setQueue(boolean queue) { /** * @return the access status for table resources. */ - public boolean isTable() { + public boolean hasTableAccess() { return table; } @@ -133,7 +133,7 @@ public boolean isTable() { * @param table Access status to set * @return the updated AccountSasService object. */ - public AccountSasService setTable(boolean table) { + public AccountSasService setTableAccess(boolean table) { this.table = table; return this; } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileSasPermission.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileSasPermission.java index 5f504d2f9e5b..bf2cb4efb047 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileSasPermission.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileSasPermission.java @@ -67,7 +67,7 @@ public static FileSasPermission parse(String permString) { /** * @return the read permission status */ - public boolean getReadPermission() { + public boolean hasReadPermission() { return readPermission; } @@ -85,7 +85,7 @@ public FileSasPermission setReadPermission(boolean hasReadPermission) { /** * @return the create permission status */ - public boolean getCreatePermission() { + public boolean hasCreatePermission() { return createPermission; } @@ -103,7 +103,7 @@ public FileSasPermission setCreatePermission(boolean hasCreatePermission) { /** * @return the write permission status */ - public boolean getWritePermission() { + public boolean hasWritePermission() { return writePermission; } @@ -121,7 +121,7 @@ public FileSasPermission setWritePermission(boolean hasWritePermission) { /** * @return the delete permission status */ - public boolean getDeletePermission() { + public boolean hasDeletePermission() { return deletePermission; } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareSasPermission.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareSasPermission.java index 205b7a8a7915..0ad6cf970d1d 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareSasPermission.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareSasPermission.java @@ -73,7 +73,7 @@ public static ShareSasPermission parse(String permissionString) { /** * @return the read permission status */ - public boolean getReadPermission() { + public boolean hasReadPermission() { return readPermission; } @@ -91,7 +91,7 @@ public ShareSasPermission setReadPermission(boolean hasReadPermission) { /** * @return the create permission status */ - public boolean getCreatePermission() { + public boolean hasCreatePermission() { return createPermission; } @@ -109,7 +109,7 @@ public ShareSasPermission setCreatePermission(boolean hasCreatePermission) { /** * @return the write permission status */ - public boolean getWritePermission() { + public boolean hasWritePermission() { return writePermission; } @@ -127,7 +127,7 @@ public ShareSasPermission setWritePermission(boolean hasWritePermission) { /** * @return the delete permission status */ - public boolean getDeletePermission() { + public boolean hasDeletePermission() { return deletePermission; } @@ -145,7 +145,7 @@ public ShareSasPermission setDeletePermission(boolean hasDeletePermission) { /** * @return the list permission status */ - public boolean getListPermission() { + public boolean hasListPermission() { return listPermission; } diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy index 8cf15c8ecbf0..92e26f08232e 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy @@ -58,10 +58,10 @@ class FileSASTests extends APISpec { def perms = FileSasPermission.parse(permString) then: - perms.getReadPermission() == read - perms.getWritePermission() == write - perms.getDeletePermission() == delete - perms.getCreatePermission() == create + perms.hasReadPermission() == read + perms.hasWritePermission() == write + perms.hasDeletePermission() == delete + perms.hasCreatePermission() == create where: permString || read | write | delete | create @@ -110,11 +110,11 @@ class FileSASTests extends APISpec { def perms = ShareSasPermission.parse(permString) then: - perms.getReadPermission() == read - perms.getWritePermission() == write - perms.getDeletePermission() == delete - perms.getCreatePermission() == create - perms.getListPermission() == list + perms.hasReadPermission() == read + perms.hasWritePermission() == write + perms.hasDeletePermission() == delete + perms.hasCreatePermission() == create + perms.hasListPermission() == list where: permString || read | write | delete | create | list @@ -309,7 +309,7 @@ class FileSASTests extends APISpec { def "AccountSAS FileService network test create delete share succeeds"() { setup: def service = new AccountSasService() - .setFile(true) + .setFileAccess(true) def resourceType = new AccountSasResourceType() .setContainer(true) .setService(true) diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSasPermission.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSasPermission.java index 345055d2f443..88f7055c54a1 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSasPermission.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSasPermission.java @@ -68,7 +68,7 @@ public static QueueSasPermission parse(String permString) { /** * @return the read permission status. */ - public boolean getReadPermission() { + public boolean hasReadPermission() { return readPermission; } @@ -86,7 +86,7 @@ public QueueSasPermission setReadPermission(boolean hasReadPermission) { /** * @return the add permission status. */ - public boolean getAddPermission() { + public boolean hasAddPermission() { return addPermission; } @@ -104,7 +104,7 @@ public QueueSasPermission setAddPermission(boolean hasAddPermission) { /** * @return the update permission status. */ - public boolean getUpdatePermission() { + public boolean hasUpdatePermission() { return updatePermission; } @@ -122,7 +122,7 @@ public QueueSasPermission setUpdatePermission(boolean hasUpdatePermission) { /** * @return the process permission status. */ - public boolean getProcessPermission() { + public boolean hasProcessPermission() { return processPermission; } diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy index ec624b6aa7c6..ebe77196b8b4 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy @@ -36,10 +36,10 @@ class QueueSASTests extends APISpec { def perms = QueueSasPermission.parse(permString) then: - perms.getReadPermission() == read - perms.getAddPermission() == add - perms.getUpdatePermission() == update - perms.getProcessPermission() == process + perms.hasReadPermission() == read + perms.hasAddPermission() == add + perms.hasUpdatePermission() == update + perms.hasProcessPermission() == process where: permString || read | add | update | process @@ -239,7 +239,7 @@ class QueueSASTests extends APISpec { @Test def "Test Account QueueServiceSAS create queue delete queue"() { def service = new AccountSasService() - .setQueue(true) + .setQueueAccess(true) def resourceType = new AccountSasResourceType() .setContainer(true) .setService(true) @@ -273,7 +273,7 @@ class QueueSASTests extends APISpec { @Test def "Test Account QueueServiceSAS list queues"() { def service = new AccountSasService() - .setQueue(true) + .setQueueAccess(true) def resourceType = new AccountSasResourceType() .setContainer(true) .setService(true) From 7441888afc390e48b50aa4ca4ac642f2a5fe2791 Mon Sep 17 00:00:00 2001 From: Kushagra Thapar Date: Mon, 21 Oct 2019 10:14:31 -0700 Subject: [PATCH 27/64] Added @JsonIgnore to getLogger in JsonSerializable (#5951) * Added jsonIgnore to logger of JsonSerializable * Updated version to 3.3.1 --- sdk/cosmos/changelog/README.md | 3 + .../microsoft-azure-cosmos-benchmark/pom.xml | 6 +- .../microsoft-azure-cosmos-examples/pom.xml | 6 +- sdk/cosmos/microsoft-azure-cosmos/pom.xml | 4 +- .../azure/data/cosmos/JsonSerializable.java | 62 ++++++++++--------- .../data/cosmos/internal/HttpConstants.java | 2 +- sdk/cosmos/pom.xml | 4 +- 7 files changed, 46 insertions(+), 41 deletions(-) diff --git a/sdk/cosmos/changelog/README.md b/sdk/cosmos/changelog/README.md index beaff07fef3b..3c00e3cf3287 100644 --- a/sdk/cosmos/changelog/README.md +++ b/sdk/cosmos/changelog/README.md @@ -1,5 +1,8 @@ ## Changelog +### 3.3.1 +- Added @JsonIgnore on getLogger in JsonSerializable + ### 3.3.0 - **Version Upgrades** - Project Reactor version upgrade to 3.3.0.RELEASE diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml b/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml index 4c10b94c262b..7604f27acb91 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml +++ b/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml @@ -8,12 +8,12 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos-parent - 3.4.0 + 3.3.1 com.microsoft.azure azure-cosmos-benchmark - 3.4.0 + 3.3.1 Microsoft Azure SDK for SQL API of Azure Cosmos DB Service - Benchmarking tool This package contains Benchmarking tool for Microsoft Azure SDK for SQL API of Azure Cosmos DB Service https://github.com/Azure/azure-sdk-for-java @@ -33,7 +33,7 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos - 3.4.0 + 3.3.1 diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml b/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml index 4a55aa812f07..11662f8db5bc 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml +++ b/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml @@ -8,12 +8,12 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos-parent - 3.4.0 + 3.3.1 com.microsoft.azure azure-cosmos-examples - 3.4.0 + 3.3.1 Microsoft Azure SDK for SQL API of Azure Cosmos DB Service - Examples This package contains examples for Microsoft Azure SDK for SQL API of Azure Cosmos DB Service https://github.com/Azure/azure-sdk-for-java @@ -89,7 +89,7 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos - 3.4.0 + 3.3.1 diff --git a/sdk/cosmos/microsoft-azure-cosmos/pom.xml b/sdk/cosmos/microsoft-azure-cosmos/pom.xml index 2660c5b31a7a..abe32ef363c3 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/pom.xml +++ b/sdk/cosmos/microsoft-azure-cosmos/pom.xml @@ -7,12 +7,12 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos-parent - 3.4.0 + 3.3.1 com.microsoft.azure azure-cosmos - 3.4.0 + 3.3.1 Microsoft Azure SDK for SQL API of Azure Cosmos DB Service This Package contains Microsoft Azure Cosmos SDK (with Reactive Extension rx support) for Azure Cosmos DB SQL API jar diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/JsonSerializable.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/JsonSerializable.java index 613abb4b0aa0..a70ec3c7e896 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/JsonSerializable.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/JsonSerializable.java @@ -5,6 +5,7 @@ import com.azure.data.cosmos.internal.Strings; import com.azure.data.cosmos.internal.Utils; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -32,14 +33,14 @@ public class JsonSerializable { private final static ObjectMapper OBJECT_MAPPER = Utils.getSimpleObjectMapper(); private ObjectMapper om; transient ObjectNode propertyBag = null; - + protected JsonSerializable() { this.propertyBag = OBJECT_MAPPER.createObjectNode(); } /** * Constructor. - * + * * @param jsonString the json string that represents the JsonSerializable. * @param objectMapper the custom object mapper */ @@ -48,10 +49,10 @@ protected JsonSerializable() { this.propertyBag = fromJson(jsonString); this.om = objectMapper; } - + /** * Constructor. - * + * * @param jsonString the json string that represents the JsonSerializable. */ protected JsonSerializable(String jsonString) { @@ -76,7 +77,7 @@ private ObjectMapper getMapper() { void setMapper(ObjectMapper om) { this.om = om; } - + private static void checkForValidPOJO(Class c) { if (c.isAnonymousClass() || c.isLocalClass()) { throw new IllegalArgumentException( @@ -88,6 +89,7 @@ private static void checkForValidPOJO(Class c) { } } + @JsonIgnore public Logger getLogger() { return logger; } @@ -106,7 +108,7 @@ public Map getMap() { /** * Checks whether a property exists. - * + * * @param propertyName the property to look up. * @return true if the property exists. */ @@ -116,7 +118,7 @@ public boolean has(String propertyName) { /** * Removes a value by propertyName. - * + * * @param propertyName the property to remove. */ void remove(String propertyName) { @@ -125,7 +127,7 @@ void remove(String propertyName) { /** * Sets the value of a property. - * + * * @param the type of the object. * @param propertyName the property to set. * @param value the value of the property. @@ -183,7 +185,7 @@ private void internalSetCollection(String propertyName, Collection collec /** * Gets a property value as Object. - * + * * @param propertyName the property to get. * @return the value of the property. */ @@ -194,10 +196,10 @@ public Object get(String propertyName) { return null; } } - + /** * Gets a string value. - * + * * @param propertyName the property to get. * @return the string value. */ @@ -211,7 +213,7 @@ public String getString(String propertyName) { /** * Gets a boolean value. - * + * * @param propertyName the property to get. * @return the boolean value. */ @@ -225,7 +227,7 @@ public Boolean getBoolean(String propertyName) { /** * Gets an integer value. - * + * * @param propertyName the property to get. * @return the boolean value */ @@ -239,7 +241,7 @@ public Integer getInt(String propertyName) { /** * Gets a long value. - * + * * @param propertyName the property to get. * @return the long value */ @@ -253,7 +255,7 @@ public Long getLong(String propertyName) { /** * Gets a double value. - * + * * @param propertyName the property to get. * @return the double value. */ @@ -267,7 +269,7 @@ public Double getDouble(String propertyName) { /** * Gets an object value. - * + * * @param the type of the object. * @param propertyName the property to get. * @param c the class of the object. If c is a POJO class, it must be a member (and not an anonymous or local) @@ -390,7 +392,7 @@ public List getList(String propertyName, Class c, boolean ... convertF /** * Gets an object collection. - * + * * @param the type of the objects in the collection. * @param propertyName the property to get * @param c the class of the object. If c is a POJO class, it must be a member (and not an anonymous or local) @@ -405,7 +407,7 @@ public Collection getCollection(String propertyName, Class c, boolean /** * Gets a JSONObject. - * + * * @param propertyName the property to get. * @return the JSONObject. */ @@ -419,7 +421,7 @@ ObjectNode getObject(String propertyName) { /** * Gets a JSONObject collection. - * + * * @param propertyName the property to get. * @return the JSONObject collection. */ @@ -433,12 +435,12 @@ Collection getCollection(String propertyName) { } } - return result; + return result; } /** * Gets the value of a property identified by an array of property names that forms the path. - * + * * @param propertyNames that form the path to the property to get. * @return the value of the property. */ @@ -462,12 +464,12 @@ public Object getObjectByPath(List propertyNames) { break; } } while (iterator.hasNext()); - + if (value != null && matchedProperties == propertyNames.size()) { return getValue(value); } } - + return null; } @@ -517,7 +519,7 @@ private String toPrettyJson(Object object){ /** * Converts to an Object (only POJOs and JSONObject are supported). - * + * * @param the type of the object. * @param c the class of the object, either a POJO class or JSONObject. If c is a POJO class, it must be a member * (and not an anonymous or local) and a static one. @@ -547,16 +549,16 @@ public T toObject(Class c) { /** * Converts to a JSON string. - * + * * @return the JSON string. */ public String toJson() { return this.toJson(SerializationFormattingPolicy.NONE); } - + /** * Converts to a JSON string. - * + * * @param formattingPolicy the formatting policy to be used. * @return the JSON string. */ @@ -571,10 +573,10 @@ public String toJson(SerializationFormattingPolicy formattingPolicy) { /** * Gets Simple STRING representation of property bag. - * - * For proper conversion to json and inclusion of the default values + * + * For proper conversion to json and inclusion of the default values * use {@link #toJson()}. - * + * * @return string representation of property bag. */ public String toString() { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java index 1be5f38b07fd..76d0f627c6f8 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java @@ -252,7 +252,7 @@ public static class Versions { // TODO: FIXME we can use maven plugin for generating a version file // @see // https://stackoverflow.com/questions/2469922/generate-a-version-java-file-in-maven - public static final String SDK_VERSION = "3.4.0"; + public static final String SDK_VERSION = "3.3.1"; public static final String SDK_NAME = "cosmosdb-java-sdk"; } diff --git a/sdk/cosmos/pom.xml b/sdk/cosmos/pom.xml index fb70af8fa2e9..25e7233d34c7 100644 --- a/sdk/cosmos/pom.xml +++ b/sdk/cosmos/pom.xml @@ -13,7 +13,7 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos-parent - 3.4.0 + 3.3.1 pom Microsoft Azure Cosmos DB SQL API @@ -55,7 +55,7 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos - 3.4.0 + 3.3.1 From fda977a65395b5518377b5f55ac15ae598f6e817 Mon Sep 17 00:00:00 2001 From: Nebrass Lamouchi Date: Mon, 21 Oct 2019 22:37:58 +0200 Subject: [PATCH 28/64] Upgrade the async-http-client version to resolve the SRCCLR-SID-21682 vulnerability issue (#5957) --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index cf3439f99be8..d4557be782f7 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -117,7 +117,7 @@ 0.9.0.RELEASE 4.1.42.Final 4.2.2 - 2.5.2 + 2.10.4 0.20.0 1.2.4 24.1.1-jre From f815c6a1575d8662dff8715fe0ff265c93833021 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Mon, 21 Oct 2019 14:39:33 -0700 Subject: [PATCH 29/64] Storage Blobs Extends and Uses RequestConditions (#5955) * Removed codegen AccessCondition classes for hand-written classes * Cleaning up linting and tests * Fix unit tests and BlobOutputStream implementation * Fixed invalid JavaDoc --- .../blob/BlobPartitionManager.java | 19 +- .../blob/BlobPartitionManagerTest.java | 10 +- .../azure/storage/blob/batch/BlobBatch.java | 46 +- ...obBatchAsyncClientJavaDocCodeSnippets.java | 7 +- .../BlobBatchClientJavaDocCodeSnippets.java | 7 +- .../batch/BlobBatchJavaDocCodeSnippets.java | 42 +- .../storage/blob/batch/ReadmeCodeSamples.java | 9 +- .../EncryptedBlobAsyncClient.java | 13 +- .../cryptography/EncryptedBlobClient.java | 8 +- ...tedBlobAsyncClientJavaDocCodeSnippets.java | 26 +- ...ncryptedBlobClientJavaDocCodeSnippets.java | 17 +- .../cryptography/EncryptedFlux.java | 5 +- .../EncyptedBlockBlobAPITest.groovy | 27 +- .../azure/storage/blob/BlobAsyncClient.java | 19 +- .../com/azure/storage/blob/BlobClient.java | 8 +- .../blob/BlobContainerAsyncClient.java | 106 ++- .../storage/blob/BlobContainerClient.java | 105 ++- .../azure/storage/blob/HttpGetterInfo.java | 10 +- .../blob/implementation/AppendBlobsImpl.java | 187 ++--- .../AzureBlobStorageBuilder.java | 6 +- .../blob/implementation/BlobsImpl.java | 717 +++++------------- .../blob/implementation/BlockBlobsImpl.java | 173 ++--- .../blob/implementation/ContainersImpl.java | 210 ++--- .../blob/implementation/DirectorysImpl.java | 227 ++---- .../blob/implementation/PageBlobsImpl.java | 459 ++++------- .../models/AppendBlobAccessConditions.java | 98 --- .../models/AppendBlobRequestConditions.java | 125 +++ .../AppendPositionAccessConditions.java | 98 --- .../blob/models/BlobAccessConditions.java | 71 -- .../models/BlobContainerAccessConditions.java | 71 -- .../blob/models/BlobRequestConditions.java | 88 +++ .../blob/models/LeaseAccessConditions.java | 45 -- .../blob/models/ModifiedAccessConditions.java | 148 ---- .../blob/models/PageBlobAccessConditions.java | 96 --- .../models/PageBlobRequestConditions.java | 141 ++++ .../SequenceNumberAccessConditions.java | 110 --- .../SourceModifiedAccessConditions.java | 150 ---- .../specialized/AppendBlobAsyncClient.java | 77 +- .../blob/specialized/AppendBlobClient.java | 31 +- .../blob/specialized/BlobAsyncClientBase.java | 233 +++--- .../blob/specialized/BlobClientBase.java | 119 ++- .../blob/specialized/BlobInputStream.java | 17 +- .../blob/specialized/BlobOutputStream.java | 91 +-- .../specialized/BlockBlobAsyncClient.java | 101 ++- .../blob/specialized/BlockBlobClient.java | 94 ++- .../blob/specialized/LeaseAsyncClient.java | 101 ++- .../storage/blob/specialized/LeaseClient.java | 24 +- .../blob/specialized/PageBlobAsyncClient.java | 197 ++--- .../blob/specialized/PageBlobClient.java | 73 +- .../SpecializedBlobClientBuilder.java | 5 +- .../BlobAsyncClientJavaDocCodeSnippets.java | 96 +-- .../blob/BlobClientJavaDocCodeSnippets.java | 85 +-- ...ntainerAsyncClientJavaDocCodeSnippets.java | 63 +- ...lobContainerClientJavaDocCodeSnippets.java | 61 +- ...endBlobAsyncClientJavaDocCodeSnippets.java | 48 +- .../AppendBlobClientJavaDocCodeSnippets.java | 49 +- ...lobAsyncClientBaseJavaDocCodeSnippets.java | 115 ++- .../BlobClientBaseJavaDocCodeSnippets.java | 107 ++- ...ockBlobAsyncClientJavaDocCodeSnippets.java | 59 +- .../BlockBlobClientJavaDocCodeSnippets.java | 62 +- .../LeaseAsyncClientJavaDocCodeSnippets.java | 42 +- .../LeaseClientJavaDocCodeSnippets.java | 44 +- ...ageBlobAsyncClientJavaDocCodeSnippets.java | 105 ++- .../PageBlobClientJavaDocCodeSnippets.java | 104 ++- .../com/azure/storage/blob/BlobAPITest.groovy | 234 +++--- .../storage/blob/ContainerAPITest.groovy | 87 ++- .../blob/specialized/AppendBlobAPITest.groovy | 130 ++-- .../blob/specialized/BlockBlobAPITest.groovy | 110 ++- .../blob/specialized/LeaseAPITest.groovy | 51 +- .../blob/specialized/PageBlobAPITest.groovy | 292 ++++--- .../azure-storage-blob/swagger/README.md | 36 +- 71 files changed, 2667 insertions(+), 4180 deletions(-) delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAccessConditions.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobRequestConditions.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAccessConditions.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessConditions.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRequestConditions.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobAccessConditions.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobRequestConditions.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManager.java b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManager.java index 0b21ab147259..1a3703bb6ea9 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManager.java +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManager.java @@ -12,12 +12,11 @@ import com.azure.messaging.eventhubs.models.PartitionOwnership; import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.BlobContainerAsyncClient; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobItem; import com.azure.storage.blob.models.BlobListDetails; import com.azure.storage.blob.models.BlobItemProperties; import com.azure.storage.blob.models.ListBlobsOptions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import reactor.core.Exceptions; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -109,21 +108,20 @@ public Flux claimOwnership(PartitionOwnership... requestedPa metadata.put(OFFSET, offset == null ? null : String.valueOf(offset)); Long sequenceNumber = partitionOwnership.getSequenceNumber(); metadata.put(SEQUENCE_NUMBER, sequenceNumber == null ? null : String.valueOf(sequenceNumber)); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions(); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions(); if (ImplUtils.isNullOrEmpty(partitionOwnership.getETag())) { // New blob should be created - blobAccessConditions.setModifiedAccessConditions(new ModifiedAccessConditions().setIfNoneMatch("*")); + blobRequestConditions.setIfNoneMatch("*"); return blobAsyncClient.getBlockBlobAsyncClient() - .uploadWithResponse(Flux.just(UPLOAD_DATA), 0, null, metadata, null, blobAccessConditions) + .uploadWithResponse(Flux.just(UPLOAD_DATA), 0, null, metadata, null, blobRequestConditions) .flatMapMany(response -> updateOwnershipETag(response, partitionOwnership), error -> { logger.info(CLAIM_ERROR, partitionId, error.getMessage()); return Mono.empty(); }, Mono::empty); } else { // update existing blob - blobAccessConditions.setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfMatch(partitionOwnership.getETag())); - return blobAsyncClient.setMetadataWithResponse(metadata, blobAccessConditions) + blobRequestConditions.setIfMatch(partitionOwnership.getETag()); + return blobAsyncClient.setMetadataWithResponse(metadata, blobRequestConditions) .flatMapMany(response -> updateOwnershipETag(response, partitionOwnership), error -> { logger.info(CLAIM_ERROR, partitionId, error.getMessage()); return Mono.empty(); @@ -165,10 +163,9 @@ public Mono updateCheckpoint(Checkpoint checkpoint) { metadata.put(OFFSET, offset); metadata.put(OWNER_ID, checkpoint.getOwnerId()); BlobAsyncClient blobAsyncClient = blobClients.get(blobName); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions() - .setModifiedAccessConditions(new ModifiedAccessConditions().setIfMatch(checkpoint.getETag())); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setIfMatch(checkpoint.getETag()); - return blobAsyncClient.setMetadataWithResponse(metadata, blobAccessConditions) + return blobAsyncClient.setMetadataWithResponse(metadata, blobRequestConditions) .map(response -> response.getHeaders().get(ETAG).getValue()); } diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerTest.java b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerTest.java index 0f67c9d973a9..98cca1df6368 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerTest.java @@ -14,7 +14,7 @@ import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.BlobContainerAsyncClient; import com.azure.storage.blob.specialized.BlockBlobAsyncClient; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobItem; import com.azure.storage.blob.models.BlobItemProperties; import com.azure.storage.blob.models.ListBlobsOptions; @@ -96,7 +96,7 @@ public void testUpdateCheckpoint() { Map headers = new HashMap<>(); headers.put("eTag", "etag2"); when(blobContainerAsyncClient.getBlobAsyncClient("eh/cg/0")).thenReturn(blobAsyncClient); - when(blobAsyncClient.setMetadataWithResponse(ArgumentMatchers.>any(), any(BlobAccessConditions.class))) + when(blobAsyncClient.setMetadataWithResponse(ArgumentMatchers.>any(), any(BlobRequestConditions.class))) .thenReturn(Mono.just(new SimpleResponse<>(null, 200, new HttpHeaders(headers), null))); BlobPartitionManager blobPartitionManager = new BlobPartitionManager(blobContainerAsyncClient); @@ -116,7 +116,7 @@ public void testClaimOwnership() { when(blobContainerAsyncClient.getBlobAsyncClient("eh/cg/0")).thenReturn(blobAsyncClient); when(blobAsyncClient.getBlockBlobAsyncClient()).thenReturn(blockBlobAsyncClient); when(blockBlobAsyncClient.uploadWithResponse(ArgumentMatchers.>any(), eq(0L), - isNull(), any(Map.class), isNull(), any(BlobAccessConditions.class))) + isNull(), any(Map.class), isNull(), any(BlobRequestConditions.class))) .thenReturn(Mono.just(new ResponseBase<>(null, 200, httpHeaders, null, null))); BlobPartitionManager blobPartitionManager = new BlobPartitionManager(blobContainerAsyncClient); @@ -157,7 +157,7 @@ public void testUpdateCheckpointError() { Map headers = new HashMap<>(); headers.put("eTag", "etag2"); when(blobContainerAsyncClient.getBlobAsyncClient("eh/cg/0")).thenReturn(blobAsyncClient); - when(blobAsyncClient.setMetadataWithResponse(ArgumentMatchers.>any(), any(BlobAccessConditions.class))) + when(blobAsyncClient.setMetadataWithResponse(ArgumentMatchers.>any(), any(BlobRequestConditions.class))) .thenReturn(Mono.error(new SocketTimeoutException())); BlobPartitionManager blobPartitionManager = new BlobPartitionManager(blobContainerAsyncClient); @@ -174,7 +174,7 @@ public void testFailedOwnershipClaim() { when(blobContainerAsyncClient.getBlobAsyncClient("eh/cg/0")).thenReturn(blobAsyncClient); when(blobAsyncClient.getBlockBlobAsyncClient()).thenReturn(blockBlobAsyncClient); when(blockBlobAsyncClient.uploadWithResponse(ArgumentMatchers.>any(), eq(0L), - isNull(), ArgumentMatchers.>any(), isNull(), any(BlobAccessConditions.class))) + isNull(), ArgumentMatchers.>any(), isNull(), any(BlobRequestConditions.class))) .thenReturn(Mono.error(new ResourceModifiedException("Etag did not match", null))); BlobPartitionManager blobPartitionManager = new BlobPartitionManager(blobContainerAsyncClient); StepVerifier.create(blobPartitionManager.claimOwnership(po)).verifyComplete(); diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java index 6363e94f5be4..dcee3ae36c7c 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java @@ -18,9 +18,8 @@ import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.BlobClientBuilder; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import reactor.core.Disposable; import reactor.core.Exceptions; @@ -145,20 +144,20 @@ public Response deleteBlob(String containerName, String blobName) { * *

    Code sample

    * - * {@codesnippet com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-String-DeleteSnapshotsOptionType-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-String-DeleteSnapshotsOptionType-BlobRequestConditions} * * @param containerName The container of the blob. * @param blobName The name of the blob. * @param deleteOptions Delete options for the blob and its snapshots. - * @param blobAccessConditions Additional access conditions that must be met to allow this operation. + * @param blobRequestConditions Additional access conditions that must be met to allow this operation. * @return a {@link Response} that will be used to associate this operation to the response when the batch is * submitted. * @throws UnsupportedOperationException If this batch has already added an operation of another type. */ public Response deleteBlob(String containerName, String blobName, - DeleteSnapshotsOptionType deleteOptions, BlobAccessConditions blobAccessConditions) { + DeleteSnapshotsOptionType deleteOptions, BlobRequestConditions blobRequestConditions) { return deleteBlobHelper(String.format(PATH_TEMPLATE, containerName, blobName), - deleteOptions, blobAccessConditions); + deleteOptions, blobRequestConditions); } /** @@ -182,24 +181,24 @@ public Response deleteBlob(String blobUrl) { * *

    Code sample

    * - * {@codesnippet com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-DeleteSnapshotsOptionType-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-DeleteSnapshotsOptionType-BlobRequestConditions} * * @param blobUrl URL of the blob. * @param deleteOptions Delete options for the blob and its snapshots. - * @param blobAccessConditions Additional access conditions that must be met to allow this operation. + * @param blobRequestConditions Additional access conditions that must be met to allow this operation. * @return a {@link Response} that will be used to associate this operation to the response when the batch is * submitted. * @throws UnsupportedOperationException If this batch has already added an operation of another type. */ public Response deleteBlob(String blobUrl, DeleteSnapshotsOptionType deleteOptions, - BlobAccessConditions blobAccessConditions) { - return deleteBlobHelper(getUrlPath(blobUrl), deleteOptions, blobAccessConditions); + BlobRequestConditions blobRequestConditions) { + return deleteBlobHelper(getUrlPath(blobUrl), deleteOptions, blobRequestConditions); } private Response deleteBlobHelper(String urlPath, DeleteSnapshotsOptionType deleteOptions, - BlobAccessConditions blobAccessConditions) { + BlobRequestConditions blobRequestConditions) { setBatchType(BlobBatchType.DELETE); - return createBatchOperation(blobAsyncClient.deleteWithResponse(deleteOptions, blobAccessConditions), + return createBatchOperation(blobAsyncClient.deleteWithResponse(deleteOptions, blobRequestConditions), urlPath, EXPECTED_DELETE_STATUS_CODES); } @@ -226,20 +225,19 @@ public Response setBlobAccessTier(String containerName, String blobName, A * *

    Code sample

    * - * {@codesnippet com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-String-AccessTier-LeaseAccessConditions} + * {@codesnippet com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-String-AccessTier-String} * * @param containerName The container of the blob. * @param blobName The name of the blob. * @param accessTier The tier to set on the blob. - * @param leaseAccessConditions Lease access conditions that must be met to allow this operation. + * @param leaseId The lease ID the active lease on the blob must match. * @return a {@link Response} that will be used to associate this operation to the response when the batch is * submitted. * @throws UnsupportedOperationException If this batch has already added an operation of another type. */ public Response setBlobAccessTier(String containerName, String blobName, AccessTier accessTier, - LeaseAccessConditions leaseAccessConditions) { - return setBlobAccessTierHelper(String.format(PATH_TEMPLATE, containerName, blobName), accessTier, - leaseAccessConditions); + String leaseId) { + return setBlobAccessTierHelper(String.format(PATH_TEMPLATE, containerName, blobName), accessTier, leaseId); } /** @@ -264,24 +262,22 @@ public Response setBlobAccessTier(String blobUrl, AccessTier accessTier) { * *

    Code sample

    * - * {@codesnippet com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-AccessTier-LeaseAccessConditions} + * {@codesnippet com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-AccessTier-String} * * @param blobUrl URL of the blob. * @param accessTier The tier to set on the blob. - * @param leaseAccessConditions Lease access conditions that must be met to allow this operation. + * @param leaseId The lease ID the active lease on the blob must match. * @return a {@link Response} that will be used to associate this operation to the response when the batch is * submitted. * @throws UnsupportedOperationException If this batch has already added an operation of another type. */ - public Response setBlobAccessTier(String blobUrl, AccessTier accessTier, - LeaseAccessConditions leaseAccessConditions) { - return setBlobAccessTierHelper(getUrlPath(blobUrl), accessTier, leaseAccessConditions); + public Response setBlobAccessTier(String blobUrl, AccessTier accessTier, String leaseId) { + return setBlobAccessTierHelper(getUrlPath(blobUrl), accessTier, leaseId); } - private Response setBlobAccessTierHelper(String urlPath, AccessTier accessTier, - LeaseAccessConditions leaseAccessConditions) { + private Response setBlobAccessTierHelper(String urlPath, AccessTier accessTier, String leaseId) { setBatchType(BlobBatchType.SET_TIER); - return createBatchOperation(blobAsyncClient.setAccessTierWithResponse(accessTier, null, leaseAccessConditions), + return createBatchOperation(blobAsyncClient.setAccessTierWithResponse(accessTier, null, leaseId), urlPath, EXPECTED_SET_TIER_STATUS_CODES); } diff --git a/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/BlobBatchAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/BlobBatchAsyncClientJavaDocCodeSnippets.java index c2aea5237ccc..0360173fc1d2 100644 --- a/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/BlobBatchAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/BlobBatchAsyncClientJavaDocCodeSnippets.java @@ -8,9 +8,8 @@ import com.azure.storage.blob.BlobClientBuilder; import com.azure.storage.blob.BlobServiceClientBuilder; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.LeaseAccessConditions; import java.util.ArrayList; import java.util.List; @@ -31,7 +30,7 @@ public void submitBatch() { Response deleteResponse1 = batch.deleteBlob("container", "blob1"); Response deleteResponse2 = batch.deleteBlob("container", "blob2", DeleteSnapshotsOptionType.INCLUDE, - new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId("leaseId"))); + new BlobRequestConditions().setLeaseId("leaseId")); batchAsyncClient.submitBatch(batch).subscribe(response -> { System.out.println("Batch submission completed successfully."); @@ -50,7 +49,7 @@ public void submitBatchWithResponse() { Response deleteResponse1 = batch.deleteBlob("container", "blob1"); Response deleteResponse2 = batch.deleteBlob("container", "blob2", DeleteSnapshotsOptionType.INCLUDE, - new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId("leaseId"))); + new BlobRequestConditions().setLeaseId("leaseId")); batchAsyncClient.submitBatchWithResponse(batch, true).subscribe(response -> { System.out.printf("Batch submission completed with status code: %d%n", response.getStatusCode()); diff --git a/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/BlobBatchClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/BlobBatchClientJavaDocCodeSnippets.java index e86c29df3425..5dc2c38a752c 100644 --- a/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/BlobBatchClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/BlobBatchClientJavaDocCodeSnippets.java @@ -9,9 +9,8 @@ import com.azure.storage.blob.BlobClientBuilder; import com.azure.storage.blob.BlobServiceClientBuilder; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.BlobStorageException; import java.time.Duration; @@ -35,7 +34,7 @@ public void submitBatch() { Response deleteResponse1 = batch.deleteBlob("container", "blob1"); Response deleteResponse2 = batch.deleteBlob("container", "blob2", DeleteSnapshotsOptionType.INCLUDE, - new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId("leaseId"))); + new BlobRequestConditions().setLeaseId("leaseId")); try { batchClient.submitBatch(batch); @@ -57,7 +56,7 @@ public void submitBatchWithResponse() { Response deleteResponse1 = batch.deleteBlob("container", "blob1"); Response deleteResponse2 = batch.deleteBlob("container", "blob2", DeleteSnapshotsOptionType.INCLUDE, - new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId("leaseId"))); + new BlobRequestConditions().setLeaseId("leaseId")); try { System.out.printf("Batch submission completed with status code: %d%n", diff --git a/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/BlobBatchJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/BlobBatchJavaDocCodeSnippets.java index 1777d65a27a8..cda826ebd2a4 100644 --- a/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/BlobBatchJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/BlobBatchJavaDocCodeSnippets.java @@ -6,9 +6,8 @@ import com.azure.core.http.rest.Response; import com.azure.storage.blob.BlobServiceClientBuilder; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.LeaseAccessConditions; /** * Code snippets for {@link BlobBatch} @@ -51,29 +50,27 @@ public void addSimpleDeleteOperationWithUrl() { } /** - * Code snippet for {@link BlobBatch#deleteBlob(String, String, DeleteSnapshotsOptionType, BlobAccessConditions)} + * Code snippet for {@link BlobBatch#deleteBlob(String, String, DeleteSnapshotsOptionType, BlobRequestConditions)} */ public void addDeleteOperationWithNames() { - // BEGIN: com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-String-DeleteSnapshotsOptionType-BlobAccessConditions - BlobAccessConditions blobAccessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId("{lease ID}")); + // BEGIN: com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-String-DeleteSnapshotsOptionType-BlobRequestConditions + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId("{lease ID}"); Response deleteResponse = batch.deleteBlob("{container name}", "{blob name}", - DeleteSnapshotsOptionType.INCLUDE, blobAccessConditions); - // END: com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-String-DeleteSnapshotsOptionType-BlobAccessConditions + DeleteSnapshotsOptionType.INCLUDE, blobRequestConditions); + // END: com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-String-DeleteSnapshotsOptionType-BlobRequestConditions } /** - * Code snippet for {@link BlobBatch#deleteBlob(String, DeleteSnapshotsOptionType, BlobAccessConditions)} + * Code snippet for {@link BlobBatch#deleteBlob(String, DeleteSnapshotsOptionType, BlobRequestConditions)} */ public void addDeleteOperationWithUrl() { - // BEGIN: com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-DeleteSnapshotsOptionType-BlobAccessConditions - BlobAccessConditions blobAccessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId("{lease ID}")); + // BEGIN: com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-DeleteSnapshotsOptionType-BlobRequestConditions + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId("{lease ID}"); Response deleteResponse = batch.deleteBlob("{url of blob}", DeleteSnapshotsOptionType.INCLUDE, - blobAccessConditions); - // END: com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-DeleteSnapshotsOptionType-BlobAccessConditions + blobRequestConditions); + // END: com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-DeleteSnapshotsOptionType-BlobRequestConditions } /** @@ -95,22 +92,21 @@ public void addSimpleSetTierWithUrl() { } /** - * Code snippet for {@link BlobBatch#setBlobAccessTier(String, String, AccessTier, LeaseAccessConditions)} + * Code snippet for {@link BlobBatch#setBlobAccessTier(String, String, AccessTier, String)} */ public void addSetTierWithNames() { - // BEGIN: com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-String-AccessTier-LeaseAccessConditions + // BEGIN: com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-String-AccessTier-String Response setTierResponse = batch.setBlobAccessTier("{container name}", "{blob name}", AccessTier.HOT, - new LeaseAccessConditions().setLeaseId("{lease ID}")); - // END: com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-String-AccessTier-LeaseAccessConditions + "{lease ID}"); + // END: com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-String-AccessTier-String } /** - * Code snippet for {@link BlobBatch#setBlobAccessTier(String, AccessTier, LeaseAccessConditions)} + * Code snippet for {@link BlobBatch#setBlobAccessTier(String, AccessTier, String)} */ public void addSetTierWithUrl() { - // BEGIN: com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-AccessTier-LeaseAccessConditions - Response setTierResponse = batch.setBlobAccessTier("{url of blob}", AccessTier.HOT, - new LeaseAccessConditions().setLeaseId("{lease ID}")); - // END: com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-AccessTier-LeaseAccessConditions + // BEGIN: com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-AccessTier-String + Response setTierResponse = batch.setBlobAccessTier("{url of blob}", AccessTier.HOT, "{lease ID}"); + // END: com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-AccessTier-String } } diff --git a/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/ReadmeCodeSamples.java b/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/ReadmeCodeSamples.java index 9e639e1c6dfe..66f986bd4729 100644 --- a/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/ReadmeCodeSamples.java +++ b/sdk/storage/azure-storage-blob-batch/src/samples/java/com/azure/storage/blob/batch/ReadmeCodeSamples.java @@ -7,9 +7,8 @@ import com.azure.storage.blob.BlobServiceClient; import com.azure.storage.blob.BlobServiceClientBuilder; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.LeaseAccessConditions; import java.util.Arrays; import java.util.List; @@ -54,8 +53,8 @@ public void advancedBatchingDelete() { // Delete a blob that has a lease. Response deleteWithLeaseResponse = - blobBatch.deleteBlob(blobUrlWithLease, DeleteSnapshotsOptionType.INCLUDE, new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId("leaseId"))); + blobBatch.deleteBlob(blobUrlWithLease, DeleteSnapshotsOptionType.INCLUDE, new BlobRequestConditions() + .setLeaseId("leaseId")); blobBatchClient.submitBatch(blobBatch); System.out.printf("Deleting blob completed with status code %d%n", deleteResponse.getStatusCode()); @@ -76,7 +75,7 @@ public void advancedBatchingSetTier() { // Set AccessTier on a blob that has a lease. Response setTierWithLeaseResponse = blobBatch.setBlobAccessTier(blobUrlWithLease, AccessTier.HOT, - new LeaseAccessConditions().setLeaseId("leaseId")); + "leaseId"); blobBatchClient.submitBatch(blobBatch); System.out.printf("Set AccessTier on blob completed with status code %d%n", setTierResponse.getStatusCode()); diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java index 0dd72082f2c4..5ec355138193 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java @@ -12,7 +12,7 @@ import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlockBlobItem; import com.azure.storage.blob.models.ParallelTransferOptions; @@ -178,12 +178,12 @@ public Mono upload(Flux data, ParallelTransferOptions * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response containing the information of the uploaded block blob. */ public Mono> uploadWithResponse(Flux data, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers, Map metadata, - AccessTier tier, BlobAccessConditions accessConditions) { + AccessTier tier, BlobRequestConditions accessConditions) { try { final Map metadataFinal = metadata == null ? new HashMap<>() : metadata; Mono> dataFinal = prepareToSendEncryptedRequest(data, metadataFinal); @@ -219,20 +219,21 @@ public Mono uploadFromFile(String filePath) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions} * * @param filePath Path to the upload file * @param parallelTransferOptions {@link ParallelTransferOptions} to use to upload from file. * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return An empty response * @throws IllegalArgumentException If {@code blockSize} is less than 0 or greater than 100MB * @throws UncheckedIOException If an I/O error occurs */ public Mono uploadFromFile(String filePath, ParallelTransferOptions parallelTransferOptions, - BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions) { + BlobHttpHeaders headers, Map metadata, AccessTier tier, + BlobRequestConditions accessConditions) { try { final Map metadataFinal = metadata == null ? new HashMap<>() : metadata; final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClient.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClient.java index 0d297ab773d0..d14b1237899c 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClient.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClient.java @@ -8,7 +8,7 @@ import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.BlobClientBuilder; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.common.implementation.StorageImplUtils; @@ -73,7 +73,7 @@ public void uploadFromFile(String filePath) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.cryptography.EncryptedBlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions-Duration} + * {@codesnippet com.azure.storage.blob.specialized.cryptography.EncryptedBlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration} * * @param filePath Path of the file to upload * @param parallelTransferOptions {@link ParallelTransferOptions} to use to upload from file. Number of parallel @@ -81,12 +81,12 @@ public void uploadFromFile(String filePath) { * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the uploaded blob - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @throws UncheckedIOException If an I/O error occurs */ public void uploadFromFile(String filePath, ParallelTransferOptions parallelTransferOptions, - BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions, + BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobRequestConditions accessConditions, Duration timeout) throws UncheckedIOException { Mono upload = this.encryptedBlobAsyncClient.uploadFromFile(filePath, parallelTransferOptions, headers, metadata, tier, accessConditions); diff --git a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java index 8f21f98ba792..6176bff3a175 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java @@ -4,10 +4,8 @@ package com.azure.storage.blob.specialized.cryptography; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobHttpHeaders; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.specialized.BlockBlobAsyncClient; import reactor.core.publisher.Flux; @@ -61,7 +59,7 @@ public void upload() { } /** - * Code snippet for {@link EncryptedBlobAsyncClient#uploadWithResponse(Flux, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobAccessConditions)} + * Code snippet for {@link EncryptedBlobAsyncClient#uploadWithResponse(Flux, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions)} */ public void upload2() { // BEGIN: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadWithResponse#Flux-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions @@ -71,10 +69,9 @@ public void upload2() { .setBlobContentType("binary"); Map metadata = new HashMap<>(Collections.singletonMap("metadata", "value")); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() .setBlockSize(blockSize) .setNumBuffers(numBuffers); @@ -97,20 +94,19 @@ public void uploadFromFile() { } /** - * Code snippet for {@link EncryptedBlobAsyncClient#uploadFromFile(String, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobAccessConditions)} + * Code snippet for {@link EncryptedBlobAsyncClient#uploadFromFile(String, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions)} */ public void uploadFromFile2() { - // BEGIN: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions BlobHttpHeaders headers = new BlobHttpHeaders() .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) .setBlobContentLanguage("en-US") .setBlobContentType("binary"); Map metadata = new HashMap<>(Collections.singletonMap("metadata", "value")); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() .setBlockSize(blockSize); @@ -118,6 +114,6 @@ public void uploadFromFile2() { client.uploadFromFile(filePath, parallelTransferOptions, headers, metadata, AccessTier.HOT, accessConditions) .doOnError(throwable -> System.err.printf("Failed to upload from file %s%n", throwable.getMessage())) .subscribe(completion -> System.out.println("Upload from file succeeded")); - // END: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions + // END: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions } } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientJavaDocCodeSnippets.java index 963519b98fb4..1f759bc93917 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientJavaDocCodeSnippets.java @@ -4,10 +4,8 @@ package com.azure.storage.blob.specialized.cryptography; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobHttpHeaders; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.ParallelTransferOptions; import java.io.ByteArrayInputStream; @@ -59,22 +57,21 @@ public void uploadFromFile() throws IOException { } /** - * Code snippet for {@link EncryptedBlobClient#uploadFromFile(String, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobAccessConditions, Duration)} + * Code snippet for {@link EncryptedBlobClient#uploadFromFile(String, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions, Duration)} * * @throws IOException If an I/O error occurs */ public void uploadFromFile2() throws IOException { - // BEGIN: com.azure.storage.blob.specialized.cryptography.EncryptedBlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions-Duration + // BEGIN: com.azure.storage.blob.specialized.cryptography.EncryptedBlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration BlobHttpHeaders headers = new BlobHttpHeaders() .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) .setBlobContentLanguage("en-US") .setBlobContentType("binary"); Map metadata = new HashMap<>(Collections.singletonMap("metadata", "value")); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); int blockSize = 100 * 1024 * 1024; // 100 MB; ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() .setBlockSize(blockSize); @@ -86,6 +83,6 @@ public void uploadFromFile2() throws IOException { } catch (UncheckedIOException ex) { System.err.printf("Failed to upload from file %s%n", ex.getMessage()); } - // END: com.azure.storage.blob.specialized.cryptography.EncryptedBlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions-Duration + // END: com.azure.storage.blob.specialized.cryptography.EncryptedBlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration } } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedFlux.java b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedFlux.java index 5fee5c2f11d2..0f87bfa4d1ae 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedFlux.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedFlux.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.specialized.cryptography; import com.azure.core.cryptography.AsyncKeyEncryptionKey; +import com.azure.storage.blob.BlobServiceVersion; import org.reactivestreams.Subscriber; import reactor.core.CoreSubscriber; import reactor.core.publisher.Flux; @@ -140,8 +141,8 @@ public EncryptedFlux(int testCase, AsyncKeyEncryptionKey key, APISpec spec) thro this.testCase = testCase; this.plainText = spec.getRandomData(DOWNLOAD_SIZE - 2); // This will yield two bytes of padding... for fun. - EncryptedBlob encryptedBlob = new EncryptedBlobAsyncClient(null, null, null, null, null, null, null, key, - "keyWrapAlgorithm") + EncryptedBlob encryptedBlob = new EncryptedBlobAsyncClient(null, null, BlobServiceVersion.getLatest(), + null, null, null, null, key, "keyWrapAlgorithm") .encryptBlob(Flux.just(this.plainText)).block(); this.cipherText = APISpec.collectBytesInBuffer(encryptedBlob.getCiphertextFlux()).block(); this.encryptionData = encryptedBlob.getEncryptionData(); diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy index 1ed3adbd1ac0..19e31b3f370b 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy @@ -3,12 +3,11 @@ package com.azure.storage.blob.specialized.cryptography import com.azure.core.cryptography.AsyncKeyEncryptionKey import com.azure.core.cryptography.AsyncKeyEncryptionKeyResolver import com.azure.storage.blob.BlobContainerClient -import com.azure.storage.blob.models.BlobAccessConditions +import com.azure.storage.blob.models.BlobRequestConditions import com.azure.storage.blob.models.BlobErrorCode import com.azure.storage.blob.models.BlobHttpHeaders import com.azure.storage.blob.models.BlobStorageException -import com.azure.storage.blob.models.LeaseAccessConditions -import com.azure.storage.blob.models.ModifiedAccessConditions + import com.azure.storage.blob.models.ParallelTransferOptions import com.azure.storage.blob.specialized.BlockBlobAsyncClient import com.azure.storage.blob.specialized.BlockBlobClient @@ -296,17 +295,19 @@ class EncyptedBlockBlobAPITest extends APISpec { beac.upload(defaultFlux, null).block() def etag = setupBlobMatchCondition(beac, match) leaseID = setupBlobLeaseCondition(beac, leaseID) - BlobAccessConditions bac = new BlobAccessConditions().setModifiedAccessConditions( - new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) - .setIfMatch(etag).setIfNoneMatch(noneMatch)) - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) + BlobRequestConditions bac = new BlobRequestConditions() + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setIfMatch(etag) + .setIfNoneMatch(noneMatch) + .setLeaseId(leaseID) then: beac.uploadWithResponse(defaultFlux, null, null, null, null, bac).block().getStatusCode() == 201 when: etag = setupBlobMatchCondition(beac, match) - bac.getModifiedAccessConditions().setIfMatch(etag) + bac.setIfMatch(etag) then: ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() @@ -332,10 +333,12 @@ class EncyptedBlockBlobAPITest extends APISpec { beac.upload(defaultFlux, null).block() noneMatch = setupBlobMatchCondition(beac, noneMatch) setupBlobLeaseCondition(beac, leaseID) - BlobAccessConditions bac = new BlobAccessConditions().setModifiedAccessConditions( - new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) - .setIfMatch(match).setIfNoneMatch(noneMatch)) - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) + BlobRequestConditions bac = new BlobRequestConditions() + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setLeaseId(leaseID) when: ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java index 876912c56beb..5c20bf97c96b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java @@ -8,9 +8,9 @@ import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlockBlobItem; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; @@ -222,18 +222,18 @@ public Mono upload(Flux data, ParallelTransferOptions * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response containing the information of the uploaded block blob. */ public Mono> uploadWithResponse(Flux data, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers, Map metadata, - AccessTier tier, BlobAccessConditions accessConditions) { + AccessTier tier, BlobRequestConditions accessConditions) { try { // TODO: Parallelism parameter? Or let Reactor handle it? // TODO: Sample/api reference Objects.requireNonNull(data, "'data' must not be null"); - BlobAccessConditions accessConditionsFinal = accessConditions == null - ? new BlobAccessConditions() : accessConditions; + BlobRequestConditions accessConditionsFinal = accessConditions == null + ? new BlobRequestConditions() : accessConditions; final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null ? new ParallelTransferOptions() : parallelTransferOptions; int blockSize = finalParallelTransferOptions.getBlockSize(); @@ -282,7 +282,7 @@ as we can guarantee we only need at most two buffers for any call to write (two UUID.randomUUID().toString().getBytes(UTF_8)); return getBlockBlobAsyncClient().stageBlockWithResponse(blockId, progressData, buffer.remaining(), - accessConditionsFinal.getLeaseAccessConditions()) + accessConditionsFinal.getLeaseId()) // We only care about the stageBlock insofar as it was successful, // but we need to collect the ids. .map(x -> blockId) @@ -325,7 +325,7 @@ public Mono uploadFromFile(String filePath) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions} * * @param filePath Path to the upload file * @param parallelTransferOptions {@link ParallelTransferOptions} to use to upload from file. Number of parallel @@ -333,14 +333,15 @@ public Mono uploadFromFile(String filePath) { * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return An empty response * @throws IllegalArgumentException If {@code blockSize} is less than 0 or greater than 100MB * @throws UncheckedIOException If an I/O error occurs */ // TODO (gapra) : Investigate if this is can be parallelized, and include the parallelTransfers parameter. public Mono uploadFromFile(String filePath, ParallelTransferOptions parallelTransferOptions, - BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions) { + BlobHttpHeaders headers, Map metadata, AccessTier tier, + BlobRequestConditions accessConditions) { try { final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null ? new ParallelTransferOptions() diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java index 6fd26cf88bba..bfca2aba7824 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java @@ -6,7 +6,7 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.specialized.AppendBlobClient; @@ -116,7 +116,7 @@ public void uploadFromFile(String filePath) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions-Duration} + * {@codesnippet com.azure.storage.blob.BlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration} * * @param filePath Path of the file to upload * @param parallelTransferOptions {@link ParallelTransferOptions} to use to upload from file. Number of parallel @@ -124,12 +124,12 @@ public void uploadFromFile(String filePath) { * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the uploaded blob - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @throws UncheckedIOException If an I/O error occurs */ public void uploadFromFile(String filePath, ParallelTransferOptions parallelTransferOptions, - BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions, + BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobRequestConditions accessConditions, Duration timeout) { Mono upload = this.client.uploadFromFile( filePath, parallelTransferOptions, headers, metadata, tier, accessConditions); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index d21d83b66e32..21ac655f05c3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -18,15 +18,13 @@ import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentResponse; import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentResponse; -import com.azure.storage.blob.models.BlobContainerAccessConditions; import com.azure.storage.blob.models.BlobContainerAccessPolicies; import com.azure.storage.blob.models.BlobItem; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobSignedIdentifier; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CpkInfo; -import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.ListBlobsOptions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.common.implementation.StorageImplUtils; @@ -139,7 +137,7 @@ public BlobAsyncClient getBlobAsyncClient(String blobName) { */ public BlobAsyncClient getBlobAsyncClient(String blobName, String snapshot) { return new BlobAsyncClient(getHttpPipeline(), - StorageImplUtils.appendToUrlPath(getBlobContainerUrl(), blobName).toString(), getServiceVersion(), + StorageImplUtils.appendToUrlPath(getBlobContainerUrl(), blobName).toString(), getServiceVersion(), getAccountName(), getBlobContainerName(), blobName, snapshot, getCustomerProvidedKey()); } @@ -326,14 +324,14 @@ public Mono delete() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.deleteWithResponse#BlobContainerAccessConditions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.deleteWithResponse#BlobRequestConditions} * - * @param accessConditions {@link BlobContainerAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response signalling completion. - * @throws UnsupportedOperationException If {@link BlobContainerAccessConditions#getModifiedAccessConditions()} has - * either {@link ModifiedAccessConditions#getIfMatch()} or {@link ModifiedAccessConditions#getIfNoneMatch()} set. + * @throws UnsupportedOperationException If either {@link BlobRequestConditions#getIfMatch()} or + * {@link BlobRequestConditions#getIfNoneMatch()} is set. */ - public Mono> deleteWithResponse(BlobContainerAccessConditions accessConditions) { + public Mono> deleteWithResponse(BlobRequestConditions accessConditions) { try { return withContext(context -> deleteWithResponse(accessConditions, context)); } catch (RuntimeException ex) { @@ -341,18 +339,18 @@ public Mono> deleteWithResponse(BlobContainerAccessConditions acc } } - Mono> deleteWithResponse(BlobContainerAccessConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new BlobContainerAccessConditions() : accessConditions; + Mono> deleteWithResponse(BlobRequestConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; - if (!validateNoETag(accessConditions.getModifiedAccessConditions())) { + if (!validateNoETag(accessConditions)) { // Throwing is preferred to Single.error because this will error out immediately instead of waiting until // subscription. throw logger.logExceptionAsError( new UnsupportedOperationException("ETag access conditions are not supported for this API.")); } - return this.azureBlobStorage.containers().deleteWithRestResponseAsync(null, null, null, - accessConditions.getLeaseAccessConditions(), accessConditions.getModifiedAccessConditions(), context) + return this.azureBlobStorage.containers().deleteWithRestResponseAsync(null, null, accessConditions.getLeaseId(), + accessConditions.getIfModifiedSince(), accessConditions.getIfUnmodifiedSince(), null, context) .map(response -> new SimpleResponse<>(response, null)); } @@ -381,25 +379,22 @@ public Mono getProperties() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.getPropertiesWithResponse#LeaseAccessConditions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.getPropertiesWithResponse#String} * - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. + * @param leaseId The lease ID the active lease on the container must match. * @return A reactive response containing the container properties. */ - public Mono> getPropertiesWithResponse( - LeaseAccessConditions leaseAccessConditions) { + public Mono> getPropertiesWithResponse(String leaseId) { try { - return withContext(context -> getPropertiesWithResponse(leaseAccessConditions, context)); + return withContext(context -> getPropertiesWithResponse(leaseId, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> getPropertiesWithResponse(LeaseAccessConditions leaseAccessConditions, - Context context) { + Mono> getPropertiesWithResponse(String leaseId, Context context) { return this.azureBlobStorage.containers() - .getPropertiesWithRestResponseAsync(null, null, null, leaseAccessConditions, context) + .getPropertiesWithRestResponseAsync(null, null, leaseId, null, context) .map(rb -> new SimpleResponse<>(rb, new BlobContainerProperties(rb.getDeserializedHeaders()))); } @@ -429,16 +424,16 @@ public Mono setMetadata(Map metadata) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.setMetadataWithResponse#Map-BlobContainerAccessConditions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.setMetadataWithResponse#Map-BlobRequestConditions} * * @param metadata Metadata to associate with the container. - * @param accessConditions {@link BlobContainerAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response signalling completion. - * @throws UnsupportedOperationException If {@link BlobContainerAccessConditions#getModifiedAccessConditions()} has - * anything set other than {@link ModifiedAccessConditions#getIfModifiedSince()}. + * @throws UnsupportedOperationException If one of {@link BlobRequestConditions#getIfMatch()}, + * {@link BlobRequestConditions#getIfNoneMatch()}, or {@link BlobRequestConditions#getIfUnmodifiedSince()} is set. */ public Mono> setMetadataWithResponse(Map metadata, - BlobContainerAccessConditions accessConditions) { + BlobRequestConditions accessConditions) { try { return withContext(context -> setMetadataWithResponse(metadata, accessConditions, context)); } catch (RuntimeException ex) { @@ -447,10 +442,9 @@ public Mono> setMetadataWithResponse(Map metadata } Mono> setMetadataWithResponse(Map metadata, - BlobContainerAccessConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new BlobContainerAccessConditions() : accessConditions; - if (!validateNoETag(accessConditions.getModifiedAccessConditions()) - || accessConditions.getModifiedAccessConditions().getIfUnmodifiedSince() != null) { + BlobRequestConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; + if (!validateNoETag(accessConditions) || accessConditions.getIfUnmodifiedSince() != null) { // Throwing is preferred to Single.error because this will error out immediately instead of waiting until // subscription. throw logger.logExceptionAsError(new UnsupportedOperationException( @@ -458,8 +452,8 @@ Mono> setMetadataWithResponse(Map metadata, } return this.azureBlobStorage.containers().setMetadataWithRestResponseAsync(null, null, - metadata, null, accessConditions.getLeaseAccessConditions(), accessConditions.getModifiedAccessConditions(), - context).map(response -> new SimpleResponse<>(response, null)); + accessConditions.getLeaseId(), metadata, accessConditions.getIfModifiedSince(), null, context) + .map(response -> new SimpleResponse<>(response, null)); } /** @@ -488,26 +482,24 @@ public Mono getAccessPolicy() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.getAccessPolicyWithResponse#LeaseAccessConditions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.getAccessPolicyWithResponse#String} * - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. + * @param leaseId The lease ID the active lease on the container must match. * @return A reactive response containing the container access policy. */ - public Mono> getAccessPolicyWithResponse( - LeaseAccessConditions leaseAccessConditions) { + public Mono> getAccessPolicyWithResponse(String leaseId) { try { - return withContext(context -> getAccessPolicyWithResponse(leaseAccessConditions, context)); + return withContext(context -> getAccessPolicyWithResponse(leaseId, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> getAccessPolicyWithResponse(LeaseAccessConditions leaseAccessConditions, - Context context) { - return this.azureBlobStorage.containers().getAccessPolicyWithRestResponseAsync(null, null, - null, leaseAccessConditions, context).map(response -> new SimpleResponse<>(response, - new BlobContainerAccessPolicies(response.getDeserializedHeaders().getBlobPublicAccess(), + Mono> getAccessPolicyWithResponse(String leaseId, Context context) { + return this.azureBlobStorage.containers().getAccessPolicyWithRestResponseAsync( + null, null, leaseId, null, context) + .map(response -> new SimpleResponse<>(response, + new BlobContainerAccessPolicies(response.getDeserializedHeaders().getBlobPublicAccess(), response.getValue()))); } @@ -545,7 +537,7 @@ public Mono setAccessPolicy(PublicAccessType accessType, ListCode Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobContainerAccessConditions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobRequestConditions} * * @param accessType Specifies how the data in this container is available to the public. See the * x-ms-blob-public-access header in the Azure Docs for more information. Pass null for no public access. @@ -553,13 +545,13 @@ public Mono setAccessPolicy(PublicAccessType accessType, Listhere * for more information. Passing null will clear all access policies. - * @param accessConditions {@link BlobContainerAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response signalling completion. - * @throws UnsupportedOperationException If {@link BlobContainerAccessConditions#getModifiedAccessConditions()} has - * either {@link ModifiedAccessConditions#getIfMatch()} or {@link ModifiedAccessConditions#getIfNoneMatch()} set. + * @throws UnsupportedOperationException If either {@link BlobRequestConditions#getIfMatch()} or + * {@link BlobRequestConditions#getIfNoneMatch()} is set. */ public Mono> setAccessPolicyWithResponse(PublicAccessType accessType, - List identifiers, BlobContainerAccessConditions accessConditions) { + List identifiers, BlobRequestConditions accessConditions) { try { return withContext( context -> setAccessPolicyWithResponse(accessType, identifiers, accessConditions, context)); @@ -569,10 +561,10 @@ public Mono> setAccessPolicyWithResponse(PublicAccessType accessT } Mono> setAccessPolicyWithResponse(PublicAccessType accessType, - List identifiers, BlobContainerAccessConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new BlobContainerAccessConditions() : accessConditions; + List identifiers, BlobRequestConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; - if (!validateNoETag(accessConditions.getModifiedAccessConditions())) { + if (!validateNoETag(accessConditions)) { // Throwing is preferred to Single.error because this will error out immediately instead of waiting until // subscription. throw logger.logExceptionAsError( @@ -598,9 +590,9 @@ OffsetDateTime.now will only give back milliseconds (more precise fields are zer } } - return this.azureBlobStorage.containers().setAccessPolicyWithRestResponseAsync(null, - identifiers, null, accessType, null, accessConditions.getLeaseAccessConditions(), - accessConditions.getModifiedAccessConditions(), context) + return this.azureBlobStorage.containers().setAccessPolicyWithRestResponseAsync( + null, identifiers, null, accessConditions.getLeaseId(), accessType, accessConditions.getIfModifiedSince(), + accessConditions.getIfUnmodifiedSince(), null, context) .map(response -> new SimpleResponse<>(response, null)); } @@ -895,7 +887,7 @@ Mono> getAccountInfoWithResponse(Context context) { } - private boolean validateNoETag(ModifiedAccessConditions modifiedAccessConditions) { + private boolean validateNoETag(BlobRequestConditions modifiedAccessConditions) { if (modifiedAccessConditions == null) { return true; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index efaa9b2a34bb..d8e5023226d3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -8,22 +8,22 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.storage.blob.models.BlobContainerAccessConditions; import com.azure.storage.blob.models.BlobContainerAccessPolicies; import com.azure.storage.blob.models.BlobItem; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobSignedIdentifier; import com.azure.storage.blob.models.CpkInfo; -import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.ListBlobsOptions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; -import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; import java.time.Duration; import java.util.List; import java.util.Map; +import static com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout; + /** * Client to a container. It may only be instantiated through a {@link BlobContainerClientBuilder} or via the method * {@link BlobServiceClient#getBlobContainerClient(String)}. This class does not hold any state about a particular @@ -40,7 +40,7 @@ */ @ServiceClient(builder = BlobContainerClientBuilder.class) public final class BlobContainerClient { - private final BlobContainerAsyncClient blobContainerAsyncClient; + private final BlobContainerAsyncClient client; public static final String ROOT_CONTAINER_NAME = BlobContainerAsyncClient.ROOT_CONTAINER_NAME; @@ -51,10 +51,10 @@ public final class BlobContainerClient { /** * Package-private constructor for use by {@link BlobContainerClientBuilder}. * - * @param blobContainerAsyncClient the async container client + * @param client the async container client */ - BlobContainerClient(BlobContainerAsyncClient blobContainerAsyncClient) { - this.blobContainerAsyncClient = blobContainerAsyncClient; + BlobContainerClient(BlobContainerAsyncClient client) { + this.client = client; } @@ -72,7 +72,7 @@ public final class BlobContainerClient { * @return A new {@link BlobClient} object which references the blob with the specified name in this container. */ public BlobClient getBlobClient(String blobName) { - return new BlobClient(blobContainerAsyncClient.getBlobAsyncClient(blobName)); + return new BlobClient(client.getBlobAsyncClient(blobName)); } /** @@ -90,7 +90,7 @@ public BlobClient getBlobClient(String blobName) { * @return A new {@link BlobClient} object which references the blob with the specified name in this container. */ public BlobClient getBlobClient(String blobName, String snapshot) { - return new BlobClient(blobContainerAsyncClient.getBlobAsyncClient(blobName, snapshot)); + return new BlobClient(client.getBlobAsyncClient(blobName, snapshot)); } /** @@ -103,7 +103,7 @@ public BlobClient getBlobClient(String blobName, String snapshot) { * @return The name of container. */ public String getBlobContainerName() { - return this.blobContainerAsyncClient.getBlobContainerName(); + return this.client.getBlobContainerName(); } /** @@ -112,7 +112,7 @@ public String getBlobContainerName() { * @return the URL. */ public String getBlobContainerUrl() { - return blobContainerAsyncClient.getBlobContainerUrl(); + return client.getBlobContainerUrl(); } /** @@ -121,7 +121,7 @@ public String getBlobContainerUrl() { * @return account name associated with this storage resource. */ public String getAccountName() { - return this.blobContainerAsyncClient.getAccountName(); + return this.client.getAccountName(); } /** @@ -130,7 +130,7 @@ public String getAccountName() { * @return the service version the client is using. */ public BlobServiceVersion getServiceVersion() { - return this.blobContainerAsyncClient.getServiceVersion(); + return this.client.getServiceVersion(); } /** @@ -139,7 +139,7 @@ public BlobServiceVersion getServiceVersion() { * @return The pipeline. */ public HttpPipeline getHttpPipeline() { - return blobContainerAsyncClient.getHttpPipeline(); + return client.getHttpPipeline(); } /** @@ -149,7 +149,7 @@ public HttpPipeline getHttpPipeline() { * @return the customer provided key used for encryption. */ public CpkInfo getCustomerProvidedKey() { - return blobContainerAsyncClient.getCustomerProvidedKey(); + return client.getCustomerProvidedKey(); } /** @@ -176,9 +176,9 @@ public boolean exists() { * @return true if the container exists, false if it doesn't */ public Response existsWithResponse(Duration timeout, Context context) { - Mono> response = blobContainerAsyncClient.existsWithResponse(context); + Mono> response = client.existsWithResponse(context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } /** @@ -212,8 +212,8 @@ public void create() { */ public Response createWithResponse(Map metadata, PublicAccessType accessType, Duration timeout, Context context) { - Mono> response = blobContainerAsyncClient.createWithResponse(metadata, accessType, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + Mono> response = client.createWithResponse(metadata, accessType, context); + return blockWithOptionalTimeout(response, timeout); } /** @@ -236,18 +236,18 @@ public void delete() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerClient.deleteWithResponse#BlobContainerAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.deleteWithResponse#BlobRequestConditions-Duration-Context} * - * @param accessConditions {@link BlobContainerAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers */ - public Response deleteWithResponse(BlobContainerAccessConditions accessConditions, Duration timeout, + public Response deleteWithResponse(BlobRequestConditions accessConditions, Duration timeout, Context context) { - Mono> response = blobContainerAsyncClient.deleteWithResponse(accessConditions, context); + Mono> response = client.deleteWithResponse(accessConditions, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } /** @@ -270,20 +270,16 @@ public BlobContainerProperties getProperties() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerClient.getPropertiesWithResponse#LeaseAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.getPropertiesWithResponse#String-Duration-Context} * - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. + * @param leaseId The lease ID the active lease on the container must match. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The container properties. */ - public Response getPropertiesWithResponse(LeaseAccessConditions leaseAccessConditions, - Duration timeout, Context context) { - Mono> response = blobContainerAsyncClient - .getPropertiesWithResponse(leaseAccessConditions, context); - - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + public Response getPropertiesWithResponse(String leaseId, Duration timeout, + Context context) { + return blockWithOptionalTimeout(client.getPropertiesWithResponse(leaseId, context), timeout); } /** @@ -306,18 +302,18 @@ public void setMetadata(Map metadata) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerClient.setMetadataWithResponse#Map-BlobContainerAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.setMetadataWithResponse#Map-BlobRequestConditions-Duration-Context} * @param metadata Metadata to associate with the container. - * @param accessConditions {@link BlobContainerAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers */ public Response setMetadataWithResponse(Map metadata, - BlobContainerAccessConditions accessConditions, Duration timeout, Context context) { - Mono> response = blobContainerAsyncClient.setMetadataWithResponse(metadata, accessConditions, + BlobRequestConditions accessConditions, Duration timeout, Context context) { + Mono> response = client.setMetadataWithResponse(metadata, accessConditions, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } /** @@ -342,21 +338,16 @@ public BlobContainerAccessPolicies getAccessPolicy() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerClient.getAccessPolicyWithResponse#LeaseAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.getAccessPolicyWithResponse#String-Duration-Context} * - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. + * @param leaseId The lease ID the active lease on the container must match. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The container access policy. */ - public Response getAccessPolicyWithResponse( - LeaseAccessConditions leaseAccessConditions, - Duration timeout, Context context) { - Mono> response = blobContainerAsyncClient - .getAccessPolicyWithResponse(leaseAccessConditions, context); - - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + public Response getAccessPolicyWithResponse(String leaseId, Duration timeout, + Context context) { + return blockWithOptionalTimeout(client.getAccessPolicyWithResponse(leaseId, context), timeout); } /** @@ -389,7 +380,7 @@ public void setAccessPolicy(PublicAccessType accessType, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobContainerClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobContainerAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobRequestConditions-Duration-Context} * * @param accessType Specifies how the data in this container is available to the public. See the * x-ms-blob-public-access header in the Azure Docs for more information. Pass null for no public access. @@ -397,18 +388,18 @@ public void setAccessPolicy(PublicAccessType accessType, * Please see * here * for more information. Passing null will clear all access policies. - * @param accessConditions {@link BlobContainerAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers */ public Response setAccessPolicyWithResponse(PublicAccessType accessType, - List identifiers, BlobContainerAccessConditions accessConditions, + List identifiers, BlobRequestConditions accessConditions, Duration timeout, Context context) { - Mono> response = blobContainerAsyncClient + Mono> response = client .setAccessPolicyWithResponse(accessType, identifiers, accessConditions, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } /** @@ -452,7 +443,7 @@ public PagedIterable listBlobs() { * @return The listed blobs, flattened. */ public PagedIterable listBlobs(ListBlobsOptions options, Duration timeout) { - return new PagedIterable<>(blobContainerAsyncClient.listBlobsFlatWithOptionalTimeout(options, timeout)); + return new PagedIterable<>(client.listBlobsFlatWithOptionalTimeout(options, timeout)); } /** @@ -524,7 +515,7 @@ public PagedIterable listBlobsByHierarchy(String directory) { * @return A reactive response emitting the prefixes and blobs. */ public PagedIterable listBlobsByHierarchy(String delimiter, ListBlobsOptions options, Duration timeout) { - return new PagedIterable<>(blobContainerAsyncClient + return new PagedIterable<>(client .listBlobsHierarchyWithOptionalTimeout(delimiter, options, timeout)); } @@ -556,8 +547,8 @@ public StorageAccountInfo getAccountInfo(Duration timeout) { * @return The account info. */ public Response getAccountInfoWithResponse(Duration timeout, Context context) { - Mono> response = blobContainerAsyncClient.getAccountInfoWithResponse(context); + Mono> response = client.getAccountInfoWithResponse(context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HttpGetterInfo.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HttpGetterInfo.java index 29ce7bc00cf4..9c0fa81cf257 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HttpGetterInfo.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HttpGetterInfo.java @@ -4,9 +4,9 @@ package com.azure.storage.blob; import com.azure.core.util.Context; -import com.azure.storage.blob.models.BlobAccessConditions; - +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.common.implementation.StorageImplUtils; + import java.time.Duration; /** @@ -63,8 +63,8 @@ public HttpGetterInfo setCount(Long count) { /** * @return the eTag used when creating If-Match header. eTag is returned with any operation that modifies the - * resource and when retrieving {@link BlobClient#getPropertiesWithResponse(BlobAccessConditions, Duration, Context) - * properties}. Defaults to null. + * resource and when retrieving {@link BlobClient#getPropertiesWithResponse(BlobRequestConditions, Duration, + * Context) properties}. Defaults to null. */ public String getETag() { return eTag; @@ -72,7 +72,7 @@ public String getETag() { /** * Sets the eTag used when creating If-Match header. eTag is returned with any operation that modifies the resource - * and when retrieving {@link BlobClient#getPropertiesWithResponse(BlobAccessConditions, Duration, Context) + * and when retrieving {@link BlobClient#getPropertiesWithResponse(BlobRequestConditions, Duration, Context) * properties}. Defaults to null. * * @param eTag Resource's eTag diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java index 74e741187ffa..0c083509f716 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java @@ -23,20 +23,17 @@ import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockFromUrlResponse; import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockResponse; import com.azure.storage.blob.implementation.models.AppendBlobsCreateResponse; -import com.azure.storage.blob.models.BlobStorageException; -import com.azure.storage.blob.models.AppendPositionAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; +import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.EncryptionAlgorithmType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + import java.net.URL; import java.nio.ByteBuffer; import java.time.OffsetDateTime; import java.util.Map; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -73,17 +70,17 @@ private interface AppendBlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono appendBlock(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono appendBlock(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono appendBlockFromUrl(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, Context context); + Mono appendBlockFromUrl(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); } /** @@ -100,6 +97,9 @@ private interface AppendBlobsService { public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, Context context) { final Integer timeout = null; final Map metadata = null; + final String leaseId = null; + final String ifMatch = null; + final String ifNoneMatch = null; final String requestId = null; final String blobType = "AppendBlob"; final String blobContentType = null; @@ -107,16 +107,13 @@ public Mono createWithRestResponseAsync(String contai final String blobContentLanguage = null; final String blobCacheControl = null; final String blobContentDisposition = null; - final String leaseId = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; - final String ifMatch = null; - final String ifNoneMatch = null; - String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + String blobContentMD5Converted = null; + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -127,17 +124,20 @@ public Mono createWithRestResponseAsync(String contai * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param blobHttpHeaders Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, Integer timeout, Map metadata, String requestId, BlobHttpHeaders blobHttpHeaders, LeaseAccessConditions leaseAccessConditions, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, Context context) { final String blobType = "AppendBlob"; String blobContentType = null; if (blobHttpHeaders != null) { @@ -163,10 +163,6 @@ public Mono createWithRestResponseAsync(String contai if (blobHttpHeaders != null) { blobContentDisposition = blobHttpHeaders.getBlobContentDisposition(); } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -179,26 +175,10 @@ public Mono createWithRestResponseAsync(String contai if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -215,21 +195,21 @@ public Mono createWithRestResponseAsync(String contai @ServiceMethod(returns = ReturnType.SINGLE) public Mono appendBlockWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Context context) { final Integer timeout = null; - final String requestId = null; - final String comp = "appendblock"; final String leaseId = null; final Long maxSize = null; final Long appendPosition = null; + final String ifMatch = null; + final String ifNoneMatch = null; + final String requestId = null; + final String comp = "appendblock"; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; - final String ifMatch = null; - final String ifNoneMatch = null; String transactionalContentMD5Converted = null; String transactionalContentCrc64Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.appendBlock(containerName, blob, this.client.getUrl(), body, timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, this.client.getVersion(), requestId, comp, leaseId, maxSize, appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.appendBlock(containerName, blob, this.client.getUrl(), body, timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -242,30 +222,22 @@ public Mono appendBlockWithRestResponseAsync(Str * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. - * @param appendPositionAccessConditions Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono appendBlockWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, LeaseAccessConditions leaseAccessConditions, AppendPositionAccessConditions appendPositionAccessConditions, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono appendBlockWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, Context context) { final String comp = "appendblock"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - Long maxSize = null; - if (appendPositionAccessConditions != null) { - maxSize = appendPositionAccessConditions.getMaxSize(); - } - Long appendPosition = null; - if (appendPositionAccessConditions != null) { - appendPosition = appendPositionAccessConditions.getAppendPosition(); - } String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -278,27 +250,11 @@ public Mono appendBlockWithRestResponseAsync(Str if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.appendBlock(containerName, blob, this.client.getUrl(), body, timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, this.client.getVersion(), requestId, comp, leaseId, maxSize, appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.appendBlock(containerName, blob, this.client.getUrl(), body, timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -316,11 +272,6 @@ public Mono appendBlockWithRestResponseAsync(Str public Mono appendBlockFromUrlWithRestResponseAsync(String containerName, String blob, URL sourceUrl, long contentLength, Context context) { final String sourceRange = null; final Integer timeout = null; - final String requestId = null; - final String comp = "appendblock"; - final String encryptionKey = null; - final String encryptionKeySha256 = null; - final EncryptionAlgorithmType encryptionAlgorithm = null; final String leaseId = null; final Long maxSize = null; final Long appendPosition = null; @@ -328,6 +279,11 @@ public Mono appendBlockFromUrlWithRestRes final String ifNoneMatch = null; final String sourceIfMatch = null; final String sourceIfNoneMatch = null; + final String requestId = null; + final String comp = "appendblock"; + final String encryptionKey = null; + final String encryptionKeySha256 = null; + final EncryptionAlgorithmType encryptionAlgorithm = null; String sourceContentMD5Converted = null; String sourceContentcrc64Converted = null; String transactionalContentMD5Converted = null; @@ -335,7 +291,7 @@ public Mono appendBlockFromUrlWithRestRes DateTimeRfc1123 ifUnmodifiedSinceConverted = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; - return service.appendBlockFromUrl(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, transactionalContentMD5Converted, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.appendBlockFromUrl(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, transactionalContentMD5Converted, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -350,18 +306,25 @@ public Mono appendBlockFromUrlWithRestRes * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param cpkInfo Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. - * @param appendPositionAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. - * @param sourceModifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono appendBlockFromUrlWithRestResponseAsync(String containerName, String blob, URL sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, byte[] transactionalContentMD5, String requestId, CpkInfo cpkInfo, LeaseAccessConditions leaseAccessConditions, AppendPositionAccessConditions appendPositionAccessConditions, ModifiedAccessConditions modifiedAccessConditions, SourceModifiedAccessConditions sourceModifiedAccessConditions, Context context) { + public Mono appendBlockFromUrlWithRestResponseAsync(String containerName, String blob, URL sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, CpkInfo cpkInfo, Context context) { final String comp = "appendblock"; String encryptionKey = null; if (cpkInfo != null) { @@ -375,50 +338,6 @@ public Mono appendBlockFromUrlWithRestRes if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - Long maxSize = null; - if (appendPositionAccessConditions != null) { - maxSize = appendPositionAccessConditions.getMaxSize(); - } - Long appendPosition = null; - if (appendPositionAccessConditions != null) { - appendPosition = appendPositionAccessConditions.getAppendPosition(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - OffsetDateTime sourceIfModifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfModifiedSince = sourceModifiedAccessConditions.getSourceIfModifiedSince(); - } - OffsetDateTime sourceIfUnmodifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfUnmodifiedSince = sourceModifiedAccessConditions.getSourceIfUnmodifiedSince(); - } - String sourceIfMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfMatch = sourceModifiedAccessConditions.getSourceIfMatch(); - } - String sourceIfNoneMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfNoneMatch = sourceModifiedAccessConditions.getSourceIfNoneMatch(); - } String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); @@ -426,6 +345,6 @@ public Mono appendBlockFromUrlWithRestRes DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.appendBlockFromUrl(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, transactionalContentMD5Converted, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.appendBlockFromUrl(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, transactionalContentMD5Converted, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java index e00af9d33a30..2733e398966b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java @@ -91,7 +91,11 @@ public AzureBlobStorageImpl build() { if (this.url != null) { client.setUrl(this.url); } - client.setVersion(this.version); + if (this.version != null) { + client.setVersion(this.version); + } else { + client.setVersion("2019-02-02"); + } if (this.pathRenameMode != null) { client.setPathRenameMode(this.pathRenameMode); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java index 6ca20a1e3c6c..6a4180ca45a7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java @@ -45,21 +45,19 @@ import com.azure.storage.blob.implementation.models.BlobsUndeleteResponse; import com.azure.storage.blob.implementation.models.DataLakeStorageErrorException; import com.azure.storage.blob.implementation.models.DirectoryHttpHeaders; -import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobHttpHeaders; +import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; import com.azure.storage.blob.models.EncryptionAlgorithmType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PathRenameMode; import com.azure.storage.blob.models.RehydratePriority; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; +import reactor.core.publisher.Mono; + import java.net.URL; import java.time.OffsetDateTime; import java.util.Map; -import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -96,32 +94,32 @@ private interface BlobsService { @Get("{containerName}/{blob}") @ExpectedResponses({200, 206}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono download(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5, @HeaderParam("x-ms-range-get-content-crc64") Boolean rangeGetContentCRC64, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono download(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5, @HeaderParam("x-ms-range-get-content-crc64") Boolean rangeGetContentCRC64, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Head("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono getProperties(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono getProperties(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Delete("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono delete(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono delete(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); @Patch("{filesystem}/{path}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) - Mono setAccessControl(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, @HeaderParam("x-ms-permissions") String posixPermissions, @HeaderParam("x-ms-acl") String posixAcl, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-version") String version, @QueryParam("action") String action, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); + Mono setAccessControl(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, @HeaderParam("x-ms-permissions") String posixPermissions, @HeaderParam("x-ms-acl") String posixAcl, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-version") String version, @QueryParam("action") String action, Context context); @Head("{filesystem}/{path}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) - Mono getAccessControl(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @QueryParam("upn") Boolean upn, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-version") String version, @QueryParam("action") String action, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); + Mono getAccessControl(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @QueryParam("upn") Boolean upn, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-version") String version, @QueryParam("action") String action, Context context); @Put("{filesystem}/{path}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) - Mono rename(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @QueryParam("mode") PathRenameMode pathRenameMode, @HeaderParam("x-ms-rename-source") String renameSource, @HeaderParam("x-ms-properties") String directoryProperties, @HeaderParam("x-ms-permissions") String posixPermissions, @HeaderParam("x-ms-umask") String posixUmask, @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-cache-control") String cacheControl, @HeaderParam("x-ms-content-type") String contentType, @HeaderParam("x-ms-content-encoding") String contentEncoding, @HeaderParam("x-ms-content-language") String contentLanguage, @HeaderParam("x-ms-content-disposition") String contentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, Context context); + Mono rename(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @QueryParam("mode") PathRenameMode pathRenameMode, @HeaderParam("x-ms-rename-source") String renameSource, @HeaderParam("x-ms-properties") String directoryProperties, @HeaderParam("x-ms-permissions") String posixPermissions, @HeaderParam("x-ms-umask") String posixUmask, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-cache-control") String cacheControl, @HeaderParam("x-ms-content-type") String contentType, @HeaderParam("x-ms-content-encoding") String contentEncoding, @HeaderParam("x-ms-content-language") String contentLanguage, @HeaderParam("x-ms-content-disposition") String contentDisposition, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @@ -131,62 +129,62 @@ private interface BlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono setHTTPHeaders(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono setHTTPHeaders(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono setMetadata(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono setMetadata(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono acquireLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono acquireLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono releaseLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono releaseLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono renewLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono renewLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono changeLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono changeLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono breakLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono breakLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono createSnapshot(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-lease-id") String leaseId, Context context); + Mono createSnapshot(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono startCopyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-lease-id") String leaseId, Context context); + Mono startCopyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono copyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-lease-id") String leaseId, Context context); + Mono copyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono abortCopyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("copyid") String copyId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, @HeaderParam("x-ms-lease-id") String leaseId, Context context); + Mono abortCopyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("copyid") String copyId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono setTier(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, Context context); + Mono setTier(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @QueryParam("comp") String comp, Context context); @Get("{containerName}/{blob}") @ExpectedResponses({200}) @@ -208,18 +206,18 @@ public Mono downloadWithRestResponseAsync(String containe final String snapshot = null; final Integer timeout = null; final String range = null; + final String leaseId = null; final Boolean rangeGetContentMD5 = null; final Boolean rangeGetContentCRC64 = null; + final String ifMatch = null; + final String ifNoneMatch = null; final String requestId = null; - final String leaseId = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; - final String ifMatch = null; - final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.download(containerName, blob, this.client.getUrl(), snapshot, timeout, range, rangeGetContentMD5, rangeGetContentCRC64, this.client.getVersion(), requestId, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.download(containerName, blob, this.client.getUrl(), snapshot, timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -230,22 +228,21 @@ public Mono downloadWithRestResponseAsync(String containe * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size. * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64 hash for the range, as long as the range is less than or equal to 4 MB in size. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono downloadWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, String range, Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64, String requestId, LeaseAccessConditions leaseAccessConditions, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, Context context) { - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } + public Mono downloadWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, Context context) { String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -258,25 +255,9 @@ public Mono downloadWithRestResponseAsync(String containe if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.download(containerName, blob, this.client.getUrl(), snapshot, timeout, range, rangeGetContentMD5, rangeGetContentCRC64, this.client.getVersion(), requestId, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.download(containerName, blob, this.client.getUrl(), snapshot, timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -292,16 +273,16 @@ public Mono downloadWithRestResponseAsync(String containe public Mono getPropertiesWithRestResponseAsync(String containerName, String blob, Context context) { final String snapshot = null; final Integer timeout = null; - final String requestId = null; final String leaseId = null; + final String ifMatch = null; + final String ifNoneMatch = null; + final String requestId = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; - final String ifMatch = null; - final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.getProperties(containerName, blob, this.client.getUrl(), snapshot, timeout, this.client.getVersion(), requestId, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getProperties(containerName, blob, this.client.getUrl(), snapshot, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -311,20 +292,19 @@ public Mono getPropertiesWithRestResponseAsync(Strin * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, Context context) { - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } + public Mono getPropertiesWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, Context context) { String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -337,25 +317,9 @@ public Mono getPropertiesWithRestResponseAsync(Strin if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getProperties(containerName, blob, this.client.getUrl(), snapshot, timeout, this.client.getVersion(), requestId, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getProperties(containerName, blob, this.client.getUrl(), snapshot, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -371,14 +335,14 @@ public Mono getPropertiesWithRestResponseAsync(Strin public Mono deleteWithRestResponseAsync(String containerName, String blob, Context context) { final String snapshot = null; final Integer timeout = null; - final DeleteSnapshotsOptionType deleteSnapshots = null; - final String requestId = null; final String leaseId = null; + final DeleteSnapshotsOptionType deleteSnapshots = null; final String ifMatch = null; final String ifNoneMatch = null; + final String requestId = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.delete(containerName, blob, this.client.getUrl(), snapshot, timeout, deleteSnapshots, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.delete(containerName, blob, this.client.getUrl(), snapshot, timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, context); } /** @@ -388,39 +352,22 @@ public Mono deleteWithRestResponseAsync(String containerNam * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob itself. Possible values include: 'include', 'only'. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, DeleteSnapshotsOptionType deleteSnapshots, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } + public Mono deleteWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, Context context) { DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.delete(containerName, blob, this.client.getUrl(), snapshot, timeout, deleteSnapshots, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.delete(containerName, blob, this.client.getUrl(), snapshot, timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, context); } /** @@ -433,61 +380,44 @@ public Mono deleteWithRestResponseAsync(String containerNam @ServiceMethod(returns = ReturnType.SINGLE) public Mono setAccessControlWithRestResponseAsync(Context context) { final Integer timeout = null; + final String leaseId = null; final String owner = null; final String group = null; final String posixPermissions = null; final String posixAcl = null; - final String requestId = null; - final String action = "setAccessControl"; - final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String requestId = null; + final String action = "setAccessControl"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.setAccessControl(this.client.getUrl(), timeout, owner, group, posixPermissions, posixAcl, requestId, this.client.getVersion(), action, leaseId, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.setAccessControl(this.client.getUrl(), timeout, leaseId, owner, group, posixPermissions, posixAcl, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, requestId, this.client.getVersion(), action, context); } /** * Set the owner, group, permissions, or access control list for a blob. * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param owner Optional. The owner of the blob or directory. * @param group Optional. The owning group of the blob or directory. * @param posixPermissions Optional and only valid if Hierarchical Namespace is enabled for the account. Sets POSIX access permissions for the file owner, the file owning group, and others. Each class may be granted read, write, or execute permission. The sticky bit is also supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. * @param posixAcl Sets POSIX access control rights on files and directories. The value is a comma-separated list of access control entries. Each access control entry (ACE) consists of a scope, a type, a user or group identifier, and permissions in the format "[scope:][type]:[id]:[permissions]". + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setAccessControlWithRestResponseAsync(Integer timeout, String owner, String group, String posixPermissions, String posixAcl, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono setAccessControlWithRestResponseAsync(Integer timeout, String leaseId, String owner, String group, String posixPermissions, String posixAcl, String ifMatch, String ifNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String action = "setAccessControl"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setAccessControl(this.client.getUrl(), timeout, owner, group, posixPermissions, posixAcl, requestId, this.client.getVersion(), action, leaseId, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.setAccessControl(this.client.getUrl(), timeout, leaseId, owner, group, posixPermissions, posixAcl, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, requestId, this.client.getVersion(), action, context); } /** @@ -501,14 +431,14 @@ public Mono setAccessControlWithRestResponseAsync public Mono getAccessControlWithRestResponseAsync(Context context) { final Integer timeout = null; final Boolean upn = null; - final String requestId = null; - final String action = "getAccessControl"; final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String requestId = null; + final String action = "getAccessControl"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.getAccessControl(this.client.getUrl(), timeout, upn, requestId, this.client.getVersion(), action, leaseId, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.getAccessControl(this.client.getUrl(), timeout, upn, leaseId, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, requestId, this.client.getVersion(), action, context); } /** @@ -516,39 +446,22 @@ public Mono getAccessControlWithRestResponseAsync * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param upn Optional. Valid only when Hierarchical Namespace is enabled for the account. If "true", the identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure Active Directory Object IDs. The default value is false. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccessControlWithRestResponseAsync(Integer timeout, Boolean upn, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono getAccessControlWithRestResponseAsync(Integer timeout, Boolean upn, String leaseId, String ifMatch, String ifNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String action = "getAccessControl"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getAccessControl(this.client.getUrl(), timeout, upn, requestId, this.client.getVersion(), action, leaseId, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.getAccessControl(this.client.getUrl(), timeout, upn, leaseId, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, requestId, this.client.getVersion(), action, context); } /** @@ -567,23 +480,23 @@ public Mono renameWithRestResponseAsync(String filesystem, final String directoryProperties = null; final String posixPermissions = null; final String posixUmask = null; + final String leaseId = null; final String sourceLeaseId = null; + final String ifMatch = null; + final String ifNoneMatch = null; + final String sourceIfMatch = null; + final String sourceIfNoneMatch = null; final String requestId = null; final String cacheControl = null; final String contentType = null; final String contentEncoding = null; final String contentLanguage = null; final String contentDisposition = null; - final String leaseId = null; - final String ifMatch = null; - final String ifNoneMatch = null; - final String sourceIfMatch = null; - final String sourceIfNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; - return service.rename(filesystem, path, this.client.getUrl(), timeout, this.client.getPathRenameMode(), renameSource, directoryProperties, posixPermissions, posixUmask, sourceLeaseId, this.client.getVersion(), requestId, cacheControl, contentType, contentEncoding, contentLanguage, contentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.rename(filesystem, path, this.client.getUrl(), timeout, this.client.getPathRenameMode(), renameSource, directoryProperties, posixPermissions, posixUmask, leaseId, sourceLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, cacheControl, contentType, contentEncoding, contentLanguage, contentDisposition, context); } /** @@ -596,18 +509,24 @@ public Mono renameWithRestResponseAsync(String filesystem, * @param directoryProperties Optional. User-defined properties to be stored with the file or directory, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", where each value is base64 encoded. * @param posixPermissions Optional and only valid if Hierarchical Namespace is enabled for the account. Sets POSIX access permissions for the file owner, the file owning group, and others. Each class may be granted read, write, or execute permission. The sticky bit is also supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. * @param posixUmask Only valid if Hierarchical Namespace is enabled for the account. This umask restricts permission settings for file and directory, and will only be applied when default Acl does not exist in parent directory. If the umask bit has set, it means that the corresponding permission will be disabled. Otherwise the corresponding permission will be determined by the permission. A 4-digit octal notation (e.g. 0022) is supported here. If no umask was specified, a default umask - 0027 will be used. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and the leaase ID must match. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param directoryHttpHeaders Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. - * @param sourceModifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono renameWithRestResponseAsync(String filesystem, String path, String renameSource, Integer timeout, String directoryProperties, String posixPermissions, String posixUmask, String sourceLeaseId, String requestId, DirectoryHttpHeaders directoryHttpHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, SourceModifiedAccessConditions sourceModifiedAccessConditions, Context context) { + public Mono renameWithRestResponseAsync(String filesystem, String path, String renameSource, Integer timeout, String directoryProperties, String posixPermissions, String posixUmask, String leaseId, String sourceLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, DirectoryHttpHeaders directoryHttpHeaders, Context context) { String cacheControl = null; if (directoryHttpHeaders != null) { cacheControl = directoryHttpHeaders.getCacheControl(); @@ -628,47 +547,11 @@ public Mono renameWithRestResponseAsync(String filesystem, if (directoryHttpHeaders != null) { contentDisposition = directoryHttpHeaders.getContentDisposition(); } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - OffsetDateTime sourceIfModifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfModifiedSince = sourceModifiedAccessConditions.getSourceIfModifiedSince(); - } - OffsetDateTime sourceIfUnmodifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfUnmodifiedSince = sourceModifiedAccessConditions.getSourceIfUnmodifiedSince(); - } - String sourceIfMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfMatch = sourceModifiedAccessConditions.getSourceIfMatch(); - } - String sourceIfNoneMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfNoneMatch = sourceModifiedAccessConditions.getSourceIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.rename(filesystem, path, this.client.getUrl(), timeout, this.client.getPathRenameMode(), renameSource, directoryProperties, posixPermissions, posixUmask, sourceLeaseId, this.client.getVersion(), requestId, cacheControl, contentType, contentEncoding, contentLanguage, contentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.rename(filesystem, path, this.client.getUrl(), timeout, this.client.getPathRenameMode(), renameSource, directoryProperties, posixPermissions, posixUmask, leaseId, sourceLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, cacheControl, contentType, contentEncoding, contentLanguage, contentDisposition, context); } /** @@ -717,6 +600,9 @@ public Mono undeleteWithRestResponseAsync(String containe @ServiceMethod(returns = ReturnType.SINGLE) public Mono setHTTPHeadersWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; + final String leaseId = null; + final String ifMatch = null; + final String ifNoneMatch = null; final String requestId = null; final String comp = "properties"; final String blobCacheControl = null; @@ -724,13 +610,10 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str final String blobContentEncoding = null; final String blobContentLanguage = null; final String blobContentDisposition = null; - final String leaseId = null; - final String ifMatch = null; - final String ifNoneMatch = null; - String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + String blobContentMD5Converted = null; + return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, context); } /** @@ -739,16 +622,19 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param blobHttpHeaders Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setHTTPHeadersWithRestResponseAsync(String containerName, String blob, Integer timeout, String requestId, BlobHttpHeaders blobHttpHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono setHTTPHeadersWithRestResponseAsync(String containerName, String blob, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, BlobHttpHeaders blobHttpHeaders, Context context) { final String comp = "properties"; String blobCacheControl = null; if (blobHttpHeaders != null) { @@ -774,30 +660,10 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str if (blobHttpHeaders != null) { blobContentDisposition = blobHttpHeaders.getBlobContentDisposition(); } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); + return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, context); } /** @@ -813,17 +679,17 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str public Mono setMetadataWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final Map metadata = null; + final String leaseId = null; + final String ifMatch = null; + final String ifNoneMatch = null; final String requestId = null; final String comp = "metadata"; - final String leaseId = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; - final String ifMatch = null; - final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.setMetadata(containerName, blob, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, comp, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.setMetadata(containerName, blob, this.client.getUrl(), timeout, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -833,21 +699,20 @@ public Mono setMetadataWithRestResponseAsync(String co * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setMetadataWithRestResponseAsync(String containerName, String blob, Integer timeout, Map metadata, String requestId, LeaseAccessConditions leaseAccessConditions, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono setMetadataWithRestResponseAsync(String containerName, String blob, Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, Context context) { final String comp = "metadata"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -860,25 +725,9 @@ public Mono setMetadataWithRestResponseAsync(String co if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setMetadata(containerName, blob, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, comp, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.setMetadata(containerName, blob, this.client.getUrl(), timeout, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -895,14 +744,14 @@ public Mono acquireLeaseWithRestResponseAsync(String final Integer timeout = null; final Integer duration = null; final String proposedLeaseId = null; + final String ifMatch = null; + final String ifNoneMatch = null; final String requestId = null; final String comp = "lease"; final String action = "acquire"; - final String ifMatch = null; - final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.acquireLease(containerName, blob, this.client.getUrl(), timeout, duration, proposedLeaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.acquireLease(containerName, blob, this.client.getUrl(), timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, context); } /** @@ -913,35 +762,22 @@ public Mono acquireLeaseWithRestResponseAsync(String * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono acquireLeaseWithRestResponseAsync(String containerName, String blob, Integer timeout, Integer duration, String proposedLeaseId, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono acquireLeaseWithRestResponseAsync(String containerName, String blob, Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, Context context) { final String comp = "lease"; final String action = "acquire"; - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLease(containerName, blob, this.client.getUrl(), timeout, duration, proposedLeaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.acquireLease(containerName, blob, this.client.getUrl(), timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, context); } /** @@ -957,14 +793,14 @@ public Mono acquireLeaseWithRestResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) public Mono releaseLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Context context) { final Integer timeout = null; + final String ifMatch = null; + final String ifNoneMatch = null; final String requestId = null; final String comp = "lease"; final String action = "release"; - final String ifMatch = null; - final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.releaseLease(containerName, blob, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.releaseLease(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, context); } /** @@ -974,35 +810,22 @@ public Mono releaseLeaseWithRestResponseAsync(String * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono releaseLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono releaseLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, Context context) { final String comp = "lease"; final String action = "release"; - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLease(containerName, blob, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.releaseLease(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, context); } /** @@ -1018,14 +841,14 @@ public Mono releaseLeaseWithRestResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) public Mono renewLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Context context) { final Integer timeout = null; + final String ifMatch = null; + final String ifNoneMatch = null; final String requestId = null; final String comp = "lease"; final String action = "renew"; - final String ifMatch = null; - final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.renewLease(containerName, blob, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.renewLease(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, context); } /** @@ -1035,35 +858,22 @@ public Mono renewLeaseWithRestResponseAsync(String cont * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono renewLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono renewLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, Context context) { final String comp = "lease"; final String action = "renew"; - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLease(containerName, blob, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.renewLease(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, context); } /** @@ -1080,14 +890,14 @@ public Mono renewLeaseWithRestResponseAsync(String cont @ServiceMethod(returns = ReturnType.SINGLE) public Mono changeLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, String proposedLeaseId, Context context) { final Integer timeout = null; + final String ifMatch = null; + final String ifNoneMatch = null; final String requestId = null; final String comp = "lease"; final String action = "change"; - final String ifMatch = null; - final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.changeLease(containerName, blob, this.client.getUrl(), timeout, leaseId, proposedLeaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.changeLease(containerName, blob, this.client.getUrl(), timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, context); } /** @@ -1098,35 +908,22 @@ public Mono changeLeaseWithRestResponseAsync(String co * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono changeLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, String proposedLeaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono changeLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, Context context) { final String comp = "lease"; final String action = "change"; - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLease(containerName, blob, this.client.getUrl(), timeout, leaseId, proposedLeaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.changeLease(containerName, blob, this.client.getUrl(), timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, context); } /** @@ -1142,14 +939,14 @@ public Mono changeLeaseWithRestResponseAsync(String co public Mono breakLeaseWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final Integer breakPeriod = null; + final String ifMatch = null; + final String ifNoneMatch = null; final String requestId = null; final String comp = "lease"; final String action = "break"; - final String ifMatch = null; - final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.breakLease(containerName, blob, this.client.getUrl(), timeout, breakPeriod, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.breakLease(containerName, blob, this.client.getUrl(), timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, context); } /** @@ -1159,35 +956,22 @@ public Mono breakLeaseWithRestResponseAsync(String cont * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono breakLeaseWithRestResponseAsync(String containerName, String blob, Integer timeout, Integer breakPeriod, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono breakLeaseWithRestResponseAsync(String containerName, String blob, Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, Context context) { final String comp = "lease"; final String action = "break"; - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLease(containerName, blob, this.client.getUrl(), timeout, breakPeriod, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.breakLease(containerName, blob, this.client.getUrl(), timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, context); } /** @@ -1203,17 +987,17 @@ public Mono breakLeaseWithRestResponseAsync(String cont public Mono createSnapshotWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final Map metadata = null; + final String ifMatch = null; + final String ifNoneMatch = null; + final String leaseId = null; final String requestId = null; final String comp = "snapshot"; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; - final String ifMatch = null; - final String ifNoneMatch = null; - final String leaseId = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.createSnapshot(containerName, blob, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.createSnapshot(containerName, blob, this.client.getUrl(), timeout, metadata, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -1223,16 +1007,19 @@ public Mono createSnapshotWithRestResponseAsync(Str * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param cpkInfo Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createSnapshotWithRestResponseAsync(String containerName, String blob, Integer timeout, Map metadata, String requestId, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, LeaseAccessConditions leaseAccessConditions, Context context) { + public Mono createSnapshotWithRestResponseAsync(String containerName, String blob, Integer timeout, Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String leaseId, String requestId, CpkInfo cpkInfo, Context context) { final String comp = "snapshot"; String encryptionKey = null; if (cpkInfo != null) { @@ -1246,29 +1033,9 @@ public Mono createSnapshotWithRestResponseAsync(Str if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.createSnapshot(containerName, blob, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.createSnapshot(containerName, blob, this.client.getUrl(), timeout, metadata, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -1287,17 +1054,17 @@ public Mono startCopyFromURLWithRestResponseAsync final Map metadata = null; final AccessTier tier = null; final RehydratePriority rehydratePriority = null; - final String requestId = null; final String sourceIfMatch = null; final String sourceIfNoneMatch = null; final String ifMatch = null; final String ifNoneMatch = null; final String leaseId = null; + final String requestId = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.startCopyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, rehydratePriority, copySource, this.client.getVersion(), requestId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.startCopyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, copySource, leaseId, this.client.getVersion(), requestId, context); } /** @@ -1310,57 +1077,27 @@ public Mono startCopyFromURLWithRestResponseAsync * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information. * @param tier Optional. Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'. * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. Possible values include: 'High', 'Standard'. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param sourceModifiedAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono startCopyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, Map metadata, AccessTier tier, RehydratePriority rehydratePriority, String requestId, SourceModifiedAccessConditions sourceModifiedAccessConditions, ModifiedAccessConditions modifiedAccessConditions, LeaseAccessConditions leaseAccessConditions, Context context) { - OffsetDateTime sourceIfModifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfModifiedSince = sourceModifiedAccessConditions.getSourceIfModifiedSince(); - } - OffsetDateTime sourceIfUnmodifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfUnmodifiedSince = sourceModifiedAccessConditions.getSourceIfUnmodifiedSince(); - } - String sourceIfMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfMatch = sourceModifiedAccessConditions.getSourceIfMatch(); - } - String sourceIfNoneMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfNoneMatch = sourceModifiedAccessConditions.getSourceIfNoneMatch(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } + public Mono startCopyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, Map metadata, AccessTier tier, RehydratePriority rehydratePriority, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String leaseId, String requestId, Context context) { DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.startCopyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, rehydratePriority, copySource, this.client.getVersion(), requestId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.startCopyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, copySource, leaseId, this.client.getVersion(), requestId, context); } /** @@ -1378,18 +1115,18 @@ public Mono copyFromURLWithRestResponseAsync(String co final Integer timeout = null; final Map metadata = null; final AccessTier tier = null; - final String requestId = null; - final String xMsRequiresSync = "true"; final String sourceIfMatch = null; final String sourceIfNoneMatch = null; final String ifMatch = null; final String ifNoneMatch = null; final String leaseId = null; + final String requestId = null; + final String xMsRequiresSync = "true"; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.copyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, copySource, this.client.getVersion(), requestId, xMsRequiresSync, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.copyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, copySource, leaseId, this.client.getVersion(), requestId, xMsRequiresSync, context); } /** @@ -1401,58 +1138,28 @@ public Mono copyFromURLWithRestResponseAsync(String co * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information. * @param tier Optional. Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param sourceModifiedAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono copyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, Map metadata, AccessTier tier, String requestId, SourceModifiedAccessConditions sourceModifiedAccessConditions, ModifiedAccessConditions modifiedAccessConditions, LeaseAccessConditions leaseAccessConditions, Context context) { + public Mono copyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String leaseId, String requestId, Context context) { final String xMsRequiresSync = "true"; - OffsetDateTime sourceIfModifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfModifiedSince = sourceModifiedAccessConditions.getSourceIfModifiedSince(); - } - OffsetDateTime sourceIfUnmodifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfUnmodifiedSince = sourceModifiedAccessConditions.getSourceIfUnmodifiedSince(); - } - String sourceIfMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfMatch = sourceModifiedAccessConditions.getSourceIfMatch(); - } - String sourceIfNoneMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfNoneMatch = sourceModifiedAccessConditions.getSourceIfNoneMatch(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.copyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, copySource, this.client.getVersion(), requestId, xMsRequiresSync, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.copyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, copySource, leaseId, this.client.getVersion(), requestId, xMsRequiresSync, context); } /** @@ -1468,11 +1175,11 @@ public Mono copyFromURLWithRestResponseAsync(String co @ServiceMethod(returns = ReturnType.SINGLE) public Mono abortCopyFromURLWithRestResponseAsync(String containerName, String blob, String copyId, Context context) { final Integer timeout = null; + final String leaseId = null; final String requestId = null; final String comp = "copy"; final String copyActionAbortConstant = "abort"; - final String leaseId = null; - return service.abortCopyFromURL(containerName, blob, this.client.getUrl(), copyId, timeout, this.client.getVersion(), requestId, comp, copyActionAbortConstant, leaseId, context); + return service.abortCopyFromURL(containerName, blob, this.client.getUrl(), copyId, timeout, leaseId, this.client.getVersion(), requestId, comp, copyActionAbortConstant, context); } /** @@ -1482,21 +1189,17 @@ public Mono abortCopyFromURLWithRestResponseAsync * @param blob The blob name. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono abortCopyFromURLWithRestResponseAsync(String containerName, String blob, String copyId, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { + public Mono abortCopyFromURLWithRestResponseAsync(String containerName, String blob, String copyId, Integer timeout, String leaseId, String requestId, Context context) { final String comp = "copy"; final String copyActionAbortConstant = "abort"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - return service.abortCopyFromURL(containerName, blob, this.client.getUrl(), copyId, timeout, this.client.getVersion(), requestId, comp, copyActionAbortConstant, leaseId, context); + return service.abortCopyFromURL(containerName, blob, this.client.getUrl(), copyId, timeout, leaseId, this.client.getVersion(), requestId, comp, copyActionAbortConstant, context); } /** @@ -1514,9 +1217,9 @@ public Mono setTierWithRestResponseAsync(String containerN final Integer timeout = null; final RehydratePriority rehydratePriority = null; final String requestId = null; - final String comp = "tier"; final String leaseId = null; - return service.setTier(containerName, blob, this.client.getUrl(), timeout, tier, rehydratePriority, this.client.getVersion(), requestId, comp, leaseId, context); + final String comp = "tier"; + return service.setTier(containerName, blob, this.client.getUrl(), timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, comp, context); } /** @@ -1528,19 +1231,15 @@ public Mono setTierWithRestResponseAsync(String containerN * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. Possible values include: 'High', 'Standard'. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setTierWithRestResponseAsync(String containerName, String blob, AccessTier tier, Integer timeout, RehydratePriority rehydratePriority, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { + public Mono setTierWithRestResponseAsync(String containerName, String blob, AccessTier tier, Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, Context context) { final String comp = "tier"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - return service.setTier(containerName, blob, this.client.getUrl(), timeout, tier, rehydratePriority, this.client.getVersion(), requestId, comp, leaseId, context); + return service.setTier(containerName, blob, this.client.getUrl(), timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, comp, context); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java index 1f40ff3ce871..04c7037e98f7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java @@ -26,22 +26,20 @@ import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromURLResponse; import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockResponse; import com.azure.storage.blob.implementation.models.BlockBlobsUploadResponse; -import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobHttpHeaders; +import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.BlockListType; import com.azure.storage.blob.models.BlockLookupList; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.EncryptionAlgorithmType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + import java.net.URL; import java.nio.ByteBuffer; import java.time.OffsetDateTime; import java.util.Map; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -78,27 +76,27 @@ private interface BlockBlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono upload(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono upload(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono stageBlock(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("blockid") String blockId, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); + Mono stageBlock(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("blockid") String blockId, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono stageBlockFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("blockid") String blockId, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, Context context); + Mono stageBlockFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("blockid") String blockId, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono commitBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, @BodyParam("application/xml; charset=utf-8") BlockLookupList blocks, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono commitBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @BodyParam("application/xml; charset=utf-8") BlockLookupList blocks, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Get("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono getBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("blocklisttype") BlockListType listType, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, Context context); + Mono getBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("blocklisttype") BlockListType listType, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); } /** @@ -116,7 +114,10 @@ private interface BlockBlobsService { public Mono uploadWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Context context) { final Integer timeout = null; final Map metadata = null; + final String leaseId = null; final AccessTier tier = null; + final String ifMatch = null; + final String ifNoneMatch = null; final String requestId = null; final String blobType = "BlockBlob"; final String blobContentType = null; @@ -124,16 +125,13 @@ public Mono uploadWithRestResponseAsync(String contain final String blobContentLanguage = null; final String blobCacheControl = null; final String blobContentDisposition = null; - final String leaseId = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; - final String ifMatch = null; - final String ifNoneMatch = null; - String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.upload(containerName, blob, this.client.getUrl(), body, timeout, contentLength, metadata, tier, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + String blobContentMD5Converted = null; + return service.upload(containerName, blob, this.client.getUrl(), body, timeout, contentLength, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -145,18 +143,21 @@ public Mono uploadWithRestResponseAsync(String contain * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param blobHttpHeaders Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, Map metadata, AccessTier tier, String requestId, BlobHttpHeaders blobHttpHeaders, LeaseAccessConditions leaseAccessConditions, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono uploadWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, Context context) { final String blobType = "BlockBlob"; String blobContentType = null; if (blobHttpHeaders != null) { @@ -182,10 +183,6 @@ public Mono uploadWithRestResponseAsync(String contain if (blobHttpHeaders != null) { blobContentDisposition = blobHttpHeaders.getBlobContentDisposition(); } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -198,26 +195,10 @@ public Mono uploadWithRestResponseAsync(String contain if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.upload(containerName, blob, this.client.getUrl(), body, timeout, contentLength, metadata, tier, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); + return service.upload(containerName, blob, this.client.getUrl(), body, timeout, contentLength, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -235,15 +216,15 @@ public Mono uploadWithRestResponseAsync(String contain @ServiceMethod(returns = ReturnType.SINGLE) public Mono stageBlockWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, Flux body, Context context) { final Integer timeout = null; + final String leaseId = null; final String requestId = null; final String comp = "block"; - final String leaseId = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; String transactionalContentMD5Converted = null; String transactionalContentCrc64Converted = null; - return service.stageBlock(containerName, blob, this.client.getUrl(), blockId, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, body, timeout, this.client.getVersion(), requestId, comp, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); + return service.stageBlock(containerName, blob, this.client.getUrl(), blockId, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, body, timeout, leaseId, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -257,20 +238,16 @@ public Mono stageBlockWithRestResponseAsync(String * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stageBlockWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, Flux body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, CpkInfo cpkInfo, Context context) { + public Mono stageBlockWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, Flux body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String leaseId, String requestId, CpkInfo cpkInfo, Context context) { final String comp = "block"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -285,7 +262,7 @@ public Mono stageBlockWithRestResponseAsync(String } String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.stageBlock(containerName, blob, this.client.getUrl(), blockId, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, body, timeout, this.client.getVersion(), requestId, comp, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); + return service.stageBlock(containerName, blob, this.client.getUrl(), blockId, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, body, timeout, leaseId, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -304,19 +281,19 @@ public Mono stageBlockWithRestResponseAsync(String public Mono stageBlockFromURLWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, URL sourceUrl, Context context) { final String sourceRange = null; final Integer timeout = null; + final String leaseId = null; + final String sourceIfMatch = null; + final String sourceIfNoneMatch = null; final String requestId = null; final String comp = "block"; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; - final String leaseId = null; - final String sourceIfMatch = null; - final String sourceIfNoneMatch = null; String sourceContentMD5Converted = null; String sourceContentcrc64Converted = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; - return service.stageBlockFromURL(containerName, blob, this.client.getUrl(), blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.stageBlockFromURL(containerName, blob, this.client.getUrl(), blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -331,16 +308,19 @@ public Mono stageBlockFromURLWithRestRespon * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param cpkInfo Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. - * @param sourceModifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stageBlockFromURLWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, URL sourceUrl, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, String requestId, CpkInfo cpkInfo, LeaseAccessConditions leaseAccessConditions, SourceModifiedAccessConditions sourceModifiedAccessConditions, Context context) { + public Mono stageBlockFromURLWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, URL sourceUrl, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, CpkInfo cpkInfo, Context context) { final String comp = "block"; String encryptionKey = null; if (cpkInfo != null) { @@ -354,31 +334,11 @@ public Mono stageBlockFromURLWithRestRespon if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - OffsetDateTime sourceIfModifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfModifiedSince = sourceModifiedAccessConditions.getSourceIfModifiedSince(); - } - OffsetDateTime sourceIfUnmodifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfUnmodifiedSince = sourceModifiedAccessConditions.getSourceIfUnmodifiedSince(); - } - String sourceIfMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfMatch = sourceModifiedAccessConditions.getSourceIfMatch(); - } - String sourceIfNoneMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfNoneMatch = sourceModifiedAccessConditions.getSourceIfNoneMatch(); - } String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.stageBlockFromURL(containerName, blob, this.client.getUrl(), blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.stageBlockFromURL(containerName, blob, this.client.getUrl(), blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -395,7 +355,10 @@ public Mono stageBlockFromURLWithRestRespon public Mono commitBlockListWithRestResponseAsync(String containerName, String blob, BlockLookupList blocks, Context context) { final Integer timeout = null; final Map metadata = null; + final String leaseId = null; final AccessTier tier = null; + final String ifMatch = null; + final String ifNoneMatch = null; final String requestId = null; final String comp = "blocklist"; final String blobCacheControl = null; @@ -403,18 +366,15 @@ public Mono commitBlockListWithRestResponseAs final String blobContentEncoding = null; final String blobContentLanguage = null; final String blobContentDisposition = null; - final String leaseId = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; - final String ifMatch = null; - final String ifNoneMatch = null; String transactionalContentMD5Converted = null; String transactionalContentCrc64Converted = null; - String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, tier, blocks, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + String blobContentMD5Converted = null; + return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blocks, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -427,18 +387,21 @@ public Mono commitBlockListWithRestResponseAs * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param blobHttpHeaders Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono commitBlockListWithRestResponseAsync(String containerName, String blob, BlockLookupList blocks, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Map metadata, AccessTier tier, String requestId, BlobHttpHeaders blobHttpHeaders, LeaseAccessConditions leaseAccessConditions, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono commitBlockListWithRestResponseAsync(String containerName, String blob, BlockLookupList blocks, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, Context context) { final String comp = "blocklist"; String blobCacheControl = null; if (blobHttpHeaders != null) { @@ -464,10 +427,6 @@ public Mono commitBlockListWithRestResponseAs if (blobHttpHeaders != null) { blobContentDisposition = blobHttpHeaders.getBlobContentDisposition(); } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -480,28 +439,12 @@ public Mono commitBlockListWithRestResponseAs if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, tier, blocks, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); + return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blocks, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -518,10 +461,10 @@ public Mono commitBlockListWithRestResponseAs public Mono getBlockListWithRestResponseAsync(String containerName, String blob, BlockListType listType, Context context) { final String snapshot = null; final Integer timeout = null; + final String leaseId = null; final String requestId = null; final String comp = "blocklist"; - final String leaseId = null; - return service.getBlockList(containerName, blob, this.client.getUrl(), snapshot, listType, timeout, this.client.getVersion(), requestId, comp, leaseId, context); + return service.getBlockList(containerName, blob, this.client.getUrl(), snapshot, listType, timeout, leaseId, this.client.getVersion(), requestId, comp, context); } /** @@ -532,19 +475,15 @@ public Mono getBlockListWithRestResponseAsync(St * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both lists together. Possible values include: 'committed', 'uncommitted', 'all'. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getBlockListWithRestResponseAsync(String containerName, String blob, BlockListType listType, String snapshot, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { + public Mono getBlockListWithRestResponseAsync(String containerName, String blob, BlockListType listType, String snapshot, Integer timeout, String leaseId, String requestId, Context context) { final String comp = "blocklist"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - return service.getBlockList(containerName, blob, this.client.getUrl(), snapshot, listType, timeout, this.client.getVersion(), requestId, comp, leaseId, context); + return service.getBlockList(containerName, blob, this.client.getUrl(), snapshot, listType, timeout, leaseId, this.client.getVersion(), requestId, comp, context); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java index e717a901b7cb..a62adb3e7998 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -37,16 +37,15 @@ import com.azure.storage.blob.implementation.models.ContainersRenewLeaseResponse; import com.azure.storage.blob.implementation.models.ContainersSetAccessPolicyResponse; import com.azure.storage.blob.implementation.models.ContainersSetMetadataResponse; -import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.BlobSignedIdentifier; -import com.azure.storage.blob.models.LeaseAccessConditions; +import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.ListBlobsIncludeItem; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PublicAccessType; +import reactor.core.publisher.Mono; + import java.time.OffsetDateTime; import java.util.List; import java.util.Map; -import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -88,52 +87,52 @@ private interface ContainersService { @Get("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono getProperties(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-id") String leaseId, Context context); + Mono getProperties(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, Context context); @Delete("{containerName}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono delete(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); + Mono delete(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, Context context); @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono setMetadata(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, Context context); + Mono setMetadata(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); @Get("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono getAccessPolicy(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, Context context); + Mono getAccessPolicy(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono setAccessPolicy(@PathParam("containerName") String containerName, @HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") SignedIdentifiersWrapper containerAcl, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-blob-public-access") PublicAccessType access, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); + Mono setAccessPolicy(@PathParam("containerName") String containerName, @HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") SignedIdentifiersWrapper containerAcl, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-public-access") PublicAccessType access, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); @Put("{containerName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono acquireLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); + Mono acquireLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono releaseLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); + Mono releaseLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono renewLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); + Mono renewLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono breakLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); + Mono breakLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono changeLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); + Mono changeLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, Context context); @Get("{containerName}") @ExpectedResponses({200}) @@ -198,10 +197,10 @@ public Mono createWithRestResponseAsync(String contain @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; + final String leaseId = null; final String requestId = null; final String restype = "container"; - final String leaseId = null; - return service.getProperties(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, leaseId, context); + return service.getProperties(containerName, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, restype, context); } /** @@ -209,20 +208,16 @@ public Mono getPropertiesWithRestResponseAsync( * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesWithRestResponseAsync(String containerName, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { + public Mono getPropertiesWithRestResponseAsync(String containerName, Integer timeout, String leaseId, String requestId, Context context) { final String restype = "container"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - return service.getProperties(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, leaseId, context); + return service.getProperties(containerName, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, restype, context); } /** @@ -236,12 +231,12 @@ public Mono getPropertiesWithRestResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; + final String leaseId = null; final String requestId = null; final String restype = "container"; - final String leaseId = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.delete(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.delete(containerName, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, restype, context); } /** @@ -249,31 +244,20 @@ public Mono deleteWithRestResponseAsync(String contain * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteWithRestResponseAsync(String containerName, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono deleteWithRestResponseAsync(String containerName, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String restype = "container"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.delete(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.delete(containerName, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, restype, context); } /** @@ -287,13 +271,13 @@ public Mono deleteWithRestResponseAsync(String contain @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadataWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; + final String leaseId = null; final Map metadata = null; final String requestId = null; final String restype = "container"; final String comp = "metadata"; - final String leaseId = null; DateTimeRfc1123 ifModifiedSinceConverted = null; - return service.setMetadata(containerName, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, context); + return service.setMetadata(containerName, this.client.getUrl(), timeout, leaseId, metadata, ifModifiedSinceConverted, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -301,28 +285,20 @@ public Mono setMetadataWithRestResponseAsync(Stri * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setMetadataWithRestResponseAsync(String containerName, Integer timeout, Map metadata, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono setMetadataWithRestResponseAsync(String containerName, Integer timeout, String leaseId, Map metadata, OffsetDateTime ifModifiedSince, String requestId, Context context) { final String restype = "container"; final String comp = "metadata"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - return service.setMetadata(containerName, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, context); + return service.setMetadata(containerName, this.client.getUrl(), timeout, leaseId, metadata, ifModifiedSinceConverted, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -336,11 +312,11 @@ public Mono setMetadataWithRestResponseAsync(Stri @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAccessPolicyWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; + final String leaseId = null; final String requestId = null; final String restype = "container"; final String comp = "acl"; - final String leaseId = null; - return service.getAccessPolicy(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, leaseId, context); + return service.getAccessPolicy(containerName, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -348,21 +324,17 @@ public Mono getAccessPolicyWithRestResponseAs * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccessPolicyWithRestResponseAsync(String containerName, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { + public Mono getAccessPolicyWithRestResponseAsync(String containerName, Integer timeout, String leaseId, String requestId, Context context) { final String restype = "container"; final String comp = "acl"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - return service.getAccessPolicy(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, leaseId, context); + return service.getAccessPolicy(containerName, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -376,15 +348,15 @@ public Mono getAccessPolicyWithRestResponseAs @ServiceMethod(returns = ReturnType.SINGLE) public Mono setAccessPolicyWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; + final String leaseId = null; final PublicAccessType access = null; final String requestId = null; final String restype = "container"; final String comp = "acl"; - final String leaseId = null; SignedIdentifiersWrapper containerAclConverted = new SignedIdentifiersWrapper(null); DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.setAccessPolicy(containerName, this.client.getUrl(), containerAclConverted, timeout, access, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.setAccessPolicy(containerName, this.client.getUrl(), containerAclConverted, timeout, leaseId, access, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -393,34 +365,23 @@ public Mono setAccessPolicyWithRestResponseAs * @param containerName The container name. * @param containerAcl the acls for the container. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param access Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'container', 'blob'. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setAccessPolicyWithRestResponseAsync(String containerName, List containerAcl, Integer timeout, PublicAccessType access, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono setAccessPolicyWithRestResponseAsync(String containerName, List containerAcl, Integer timeout, String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String restype = "container"; final String comp = "acl"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } SignedIdentifiersWrapper containerAclConverted = new SignedIdentifiersWrapper(containerAcl); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setAccessPolicy(containerName, this.client.getUrl(), containerAclConverted, timeout, access, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.setAccessPolicy(containerName, this.client.getUrl(), containerAclConverted, timeout, leaseId, access, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -442,7 +403,7 @@ public Mono acquireLeaseWithRestResponseAsync(St final String action = "acquire"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.acquireLease(containerName, this.client.getUrl(), timeout, duration, proposedLeaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.acquireLease(containerName, this.client.getUrl(), timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, comp, restype, action, context); } /** @@ -452,28 +413,21 @@ public Mono acquireLeaseWithRestResponseAsync(St * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono acquireLeaseWithRestResponseAsync(String containerName, Integer timeout, Integer duration, String proposedLeaseId, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono acquireLeaseWithRestResponseAsync(String containerName, Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String comp = "lease"; final String restype = "container"; final String action = "acquire"; - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLease(containerName, this.client.getUrl(), timeout, duration, proposedLeaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.acquireLease(containerName, this.client.getUrl(), timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, comp, restype, action, context); } /** @@ -494,7 +448,7 @@ public Mono releaseLeaseWithRestResponseAsync(St final String action = "release"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.releaseLease(containerName, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.releaseLease(containerName, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, comp, restype, action, context); } /** @@ -503,28 +457,21 @@ public Mono releaseLeaseWithRestResponseAsync(St * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono releaseLeaseWithRestResponseAsync(String containerName, String leaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono releaseLeaseWithRestResponseAsync(String containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String comp = "lease"; final String restype = "container"; final String action = "release"; - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLease(containerName, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.releaseLease(containerName, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, comp, restype, action, context); } /** @@ -545,7 +492,7 @@ public Mono renewLeaseWithRestResponseAsync(String final String action = "renew"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.renewLease(containerName, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.renewLease(containerName, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, comp, restype, action, context); } /** @@ -554,28 +501,21 @@ public Mono renewLeaseWithRestResponseAsync(String * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono renewLeaseWithRestResponseAsync(String containerName, String leaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono renewLeaseWithRestResponseAsync(String containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String comp = "lease"; final String restype = "container"; final String action = "renew"; - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLease(containerName, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.renewLease(containerName, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, comp, restype, action, context); } /** @@ -596,7 +536,7 @@ public Mono breakLeaseWithRestResponseAsync(String final String action = "break"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.breakLease(containerName, this.client.getUrl(), timeout, breakPeriod, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.breakLease(containerName, this.client.getUrl(), timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, comp, restype, action, context); } /** @@ -605,28 +545,21 @@ public Mono breakLeaseWithRestResponseAsync(String * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono breakLeaseWithRestResponseAsync(String containerName, Integer timeout, Integer breakPeriod, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono breakLeaseWithRestResponseAsync(String containerName, Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String comp = "lease"; final String restype = "container"; final String action = "break"; - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLease(containerName, this.client.getUrl(), timeout, breakPeriod, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.breakLease(containerName, this.client.getUrl(), timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, comp, restype, action, context); } /** @@ -648,7 +581,7 @@ public Mono changeLeaseWithRestResponseAsync(Stri final String action = "change"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.changeLease(containerName, this.client.getUrl(), timeout, leaseId, proposedLeaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.changeLease(containerName, this.client.getUrl(), timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, comp, restype, action, context); } /** @@ -658,28 +591,21 @@ public Mono changeLeaseWithRestResponseAsync(Stri * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono changeLeaseWithRestResponseAsync(String containerName, String leaseId, String proposedLeaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono changeLeaseWithRestResponseAsync(String containerName, String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String comp = "lease"; final String restype = "container"; final String action = "change"; - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLease(containerName, this.client.getUrl(), timeout, leaseId, proposedLeaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.changeLease(containerName, this.client.getUrl(), timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, comp, restype, action, context); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/DirectorysImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/DirectorysImpl.java index f50c46ed2342..ae152e2dc68c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/DirectorysImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/DirectorysImpl.java @@ -28,10 +28,7 @@ import com.azure.storage.blob.implementation.models.DirectorysGetAccessControlResponse; import com.azure.storage.blob.implementation.models.DirectorysRenameResponse; import com.azure.storage.blob.implementation.models.DirectorysSetAccessControlResponse; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PathRenameMode; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; import java.time.OffsetDateTime; import reactor.core.publisher.Mono; @@ -70,27 +67,27 @@ private interface DirectorysService { @Put("{filesystem}/{path}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) - Mono create(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-properties") String directoryProperties, @HeaderParam("x-ms-permissions") String posixPermissions, @HeaderParam("x-ms-umask") String posixUmask, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("resource") String resource, @HeaderParam("x-ms-cache-control") String cacheControl, @HeaderParam("x-ms-content-type") String contentType, @HeaderParam("x-ms-content-encoding") String contentEncoding, @HeaderParam("x-ms-content-language") String contentLanguage, @HeaderParam("x-ms-content-disposition") String contentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono create(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-properties") String directoryProperties, @HeaderParam("x-ms-permissions") String posixPermissions, @HeaderParam("x-ms-umask") String posixUmask, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("resource") String resource, @HeaderParam("x-ms-cache-control") String cacheControl, @HeaderParam("x-ms-content-type") String contentType, @HeaderParam("x-ms-content-encoding") String contentEncoding, @HeaderParam("x-ms-content-language") String contentLanguage, @HeaderParam("x-ms-content-disposition") String contentDisposition, Context context); @Put("{filesystem}/{path}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) - Mono rename(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @QueryParam("continuation") String marker, @QueryParam("mode") PathRenameMode pathRenameMode, @HeaderParam("x-ms-rename-source") String renameSource, @HeaderParam("x-ms-properties") String directoryProperties, @HeaderParam("x-ms-permissions") String posixPermissions, @HeaderParam("x-ms-umask") String posixUmask, @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-cache-control") String cacheControl, @HeaderParam("x-ms-content-type") String contentType, @HeaderParam("x-ms-content-encoding") String contentEncoding, @HeaderParam("x-ms-content-language") String contentLanguage, @HeaderParam("x-ms-content-disposition") String contentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, Context context); + Mono rename(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @QueryParam("continuation") String marker, @QueryParam("mode") PathRenameMode pathRenameMode, @HeaderParam("x-ms-rename-source") String renameSource, @HeaderParam("x-ms-properties") String directoryProperties, @HeaderParam("x-ms-permissions") String posixPermissions, @HeaderParam("x-ms-umask") String posixUmask, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-cache-control") String cacheControl, @HeaderParam("x-ms-content-type") String contentType, @HeaderParam("x-ms-content-encoding") String contentEncoding, @HeaderParam("x-ms-content-language") String contentLanguage, @HeaderParam("x-ms-content-disposition") String contentDisposition, Context context); @Delete("{filesystem}/{path}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) - Mono delete(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @QueryParam("recursive") boolean recursiveDirectoryDelete, @QueryParam("continuation") String marker, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono delete(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @QueryParam("recursive") boolean recursiveDirectoryDelete, @QueryParam("continuation") String marker, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); @Patch("{filesystem}/{path}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) - Mono setAccessControl(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, @HeaderParam("x-ms-permissions") String posixPermissions, @HeaderParam("x-ms-acl") String posixAcl, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-version") String version, @QueryParam("action") String action, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); + Mono setAccessControl(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, @HeaderParam("x-ms-permissions") String posixPermissions, @HeaderParam("x-ms-acl") String posixAcl, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-version") String version, @QueryParam("action") String action, Context context); @Head("{filesystem}/{path}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) - Mono getAccessControl(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @QueryParam("upn") Boolean upn, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-version") String version, @QueryParam("action") String action, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); + Mono getAccessControl(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @QueryParam("upn") Boolean upn, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-version") String version, @QueryParam("action") String action, Context context); } /** @@ -108,6 +105,9 @@ public Mono createWithRestResponseAsync(String filesys final String directoryProperties = null; final String posixPermissions = null; final String posixUmask = null; + final String leaseId = null; + final String ifMatch = null; + final String ifNoneMatch = null; final String requestId = null; final String resource = "directory"; final String cacheControl = null; @@ -115,12 +115,9 @@ public Mono createWithRestResponseAsync(String filesys final String contentEncoding = null; final String contentLanguage = null; final String contentDisposition = null; - final String leaseId = null; - final String ifMatch = null; - final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.create(filesystem, path, this.client.getUrl(), timeout, directoryProperties, posixPermissions, posixUmask, this.client.getVersion(), requestId, resource, cacheControl, contentType, contentEncoding, contentLanguage, contentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.create(filesystem, path, this.client.getUrl(), timeout, directoryProperties, posixPermissions, posixUmask, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, resource, cacheControl, contentType, contentEncoding, contentLanguage, contentDisposition, context); } /** @@ -132,16 +129,19 @@ public Mono createWithRestResponseAsync(String filesys * @param directoryProperties Optional. User-defined properties to be stored with the file or directory, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", where each value is base64 encoded. * @param posixPermissions Optional and only valid if Hierarchical Namespace is enabled for the account. Sets POSIX access permissions for the file owner, the file owning group, and others. Each class may be granted read, write, or execute permission. The sticky bit is also supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. * @param posixUmask Only valid if Hierarchical Namespace is enabled for the account. This umask restricts permission settings for file and directory, and will only be applied when default Acl does not exist in parent directory. If the umask bit has set, it means that the corresponding permission will be disabled. Otherwise the corresponding permission will be determined by the permission. A 4-digit octal notation (e.g. 0022) is supported here. If no umask was specified, a default umask - 0027 will be used. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param directoryHttpHeaders Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createWithRestResponseAsync(String filesystem, String path, Integer timeout, String directoryProperties, String posixPermissions, String posixUmask, String requestId, DirectoryHttpHeaders directoryHttpHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono createWithRestResponseAsync(String filesystem, String path, Integer timeout, String directoryProperties, String posixPermissions, String posixUmask, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, DirectoryHttpHeaders directoryHttpHeaders, Context context) { final String resource = "directory"; String cacheControl = null; if (directoryHttpHeaders != null) { @@ -163,29 +163,9 @@ public Mono createWithRestResponseAsync(String filesys if (directoryHttpHeaders != null) { contentDisposition = directoryHttpHeaders.getContentDisposition(); } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.create(filesystem, path, this.client.getUrl(), timeout, directoryProperties, posixPermissions, posixUmask, this.client.getVersion(), requestId, resource, cacheControl, contentType, contentEncoding, contentLanguage, contentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.create(filesystem, path, this.client.getUrl(), timeout, directoryProperties, posixPermissions, posixUmask, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, resource, cacheControl, contentType, contentEncoding, contentLanguage, contentDisposition, context); } /** @@ -205,23 +185,23 @@ public Mono renameWithRestResponseAsync(String filesys final String directoryProperties = null; final String posixPermissions = null; final String posixUmask = null; + final String leaseId = null; final String sourceLeaseId = null; + final String ifMatch = null; + final String ifNoneMatch = null; + final String sourceIfMatch = null; + final String sourceIfNoneMatch = null; final String requestId = null; final String cacheControl = null; final String contentType = null; final String contentEncoding = null; final String contentLanguage = null; final String contentDisposition = null; - final String leaseId = null; - final String ifMatch = null; - final String ifNoneMatch = null; - final String sourceIfMatch = null; - final String sourceIfNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; - return service.rename(filesystem, path, this.client.getUrl(), timeout, marker, this.client.getPathRenameMode(), renameSource, directoryProperties, posixPermissions, posixUmask, sourceLeaseId, this.client.getVersion(), requestId, cacheControl, contentType, contentEncoding, contentLanguage, contentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.rename(filesystem, path, this.client.getUrl(), timeout, marker, this.client.getPathRenameMode(), renameSource, directoryProperties, posixPermissions, posixUmask, leaseId, sourceLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, cacheControl, contentType, contentEncoding, contentLanguage, contentDisposition, context); } /** @@ -235,18 +215,24 @@ public Mono renameWithRestResponseAsync(String filesys * @param directoryProperties Optional. User-defined properties to be stored with the file or directory, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", where each value is base64 encoded. * @param posixPermissions Optional and only valid if Hierarchical Namespace is enabled for the account. Sets POSIX access permissions for the file owner, the file owning group, and others. Each class may be granted read, write, or execute permission. The sticky bit is also supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. * @param posixUmask Only valid if Hierarchical Namespace is enabled for the account. This umask restricts permission settings for file and directory, and will only be applied when default Acl does not exist in parent directory. If the umask bit has set, it means that the corresponding permission will be disabled. Otherwise the corresponding permission will be determined by the permission. A 4-digit octal notation (e.g. 0022) is supported here. If no umask was specified, a default umask - 0027 will be used. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and the leaase ID must match. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param directoryHttpHeaders Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. - * @param sourceModifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono renameWithRestResponseAsync(String filesystem, String path, String renameSource, Integer timeout, String marker, String directoryProperties, String posixPermissions, String posixUmask, String sourceLeaseId, String requestId, DirectoryHttpHeaders directoryHttpHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, SourceModifiedAccessConditions sourceModifiedAccessConditions, Context context) { + public Mono renameWithRestResponseAsync(String filesystem, String path, String renameSource, Integer timeout, String marker, String directoryProperties, String posixPermissions, String posixUmask, String leaseId, String sourceLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, DirectoryHttpHeaders directoryHttpHeaders, Context context) { String cacheControl = null; if (directoryHttpHeaders != null) { cacheControl = directoryHttpHeaders.getCacheControl(); @@ -267,47 +253,11 @@ public Mono renameWithRestResponseAsync(String filesys if (directoryHttpHeaders != null) { contentDisposition = directoryHttpHeaders.getContentDisposition(); } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - OffsetDateTime sourceIfModifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfModifiedSince = sourceModifiedAccessConditions.getSourceIfModifiedSince(); - } - OffsetDateTime sourceIfUnmodifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfUnmodifiedSince = sourceModifiedAccessConditions.getSourceIfUnmodifiedSince(); - } - String sourceIfMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfMatch = sourceModifiedAccessConditions.getSourceIfMatch(); - } - String sourceIfNoneMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfNoneMatch = sourceModifiedAccessConditions.getSourceIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.rename(filesystem, path, this.client.getUrl(), timeout, marker, this.client.getPathRenameMode(), renameSource, directoryProperties, posixPermissions, posixUmask, sourceLeaseId, this.client.getVersion(), requestId, cacheControl, contentType, contentEncoding, contentLanguage, contentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.rename(filesystem, path, this.client.getUrl(), timeout, marker, this.client.getPathRenameMode(), renameSource, directoryProperties, posixPermissions, posixUmask, leaseId, sourceLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, cacheControl, contentType, contentEncoding, contentLanguage, contentDisposition, context); } /** @@ -324,13 +274,13 @@ public Mono renameWithRestResponseAsync(String filesys public Mono deleteWithRestResponseAsync(String filesystem, String path, boolean recursiveDirectoryDelete, Context context) { final Integer timeout = null; final String marker = null; - final String requestId = null; final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String requestId = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.delete(filesystem, path, this.client.getUrl(), timeout, recursiveDirectoryDelete, marker, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.delete(filesystem, path, this.client.getUrl(), timeout, recursiveDirectoryDelete, marker, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, context); } /** @@ -341,38 +291,21 @@ public Mono deleteWithRestResponseAsync(String filesys * @param recursiveDirectoryDelete If "true", all paths beneath the directory will be deleted. If "false" and the directory is non-empty, an error occurs. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param marker When renaming a directory, the number of paths that are renamed with each invocation is limited. If the number of paths to be renamed exceeds this limit, a continuation token is returned in this response header. When a continuation token is returned in the response, it must be specified in a subsequent invocation of the rename operation to continue renaming the directory. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteWithRestResponseAsync(String filesystem, String path, boolean recursiveDirectoryDelete, Integer timeout, String marker, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } + public Mono deleteWithRestResponseAsync(String filesystem, String path, boolean recursiveDirectoryDelete, Integer timeout, String marker, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, Context context) { DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.delete(filesystem, path, this.client.getUrl(), timeout, recursiveDirectoryDelete, marker, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.delete(filesystem, path, this.client.getUrl(), timeout, recursiveDirectoryDelete, marker, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, context); } /** @@ -385,61 +318,44 @@ public Mono deleteWithRestResponseAsync(String filesys @ServiceMethod(returns = ReturnType.SINGLE) public Mono setAccessControlWithRestResponseAsync(Context context) { final Integer timeout = null; + final String leaseId = null; final String owner = null; final String group = null; final String posixPermissions = null; final String posixAcl = null; - final String requestId = null; - final String action = "setAccessControl"; - final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String requestId = null; + final String action = "setAccessControl"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.setAccessControl(this.client.getUrl(), timeout, owner, group, posixPermissions, posixAcl, requestId, this.client.getVersion(), action, leaseId, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.setAccessControl(this.client.getUrl(), timeout, leaseId, owner, group, posixPermissions, posixAcl, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, requestId, this.client.getVersion(), action, context); } /** * Set the owner, group, permissions, or access control list for a directory. * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param owner Optional. The owner of the blob or directory. * @param group Optional. The owning group of the blob or directory. * @param posixPermissions Optional and only valid if Hierarchical Namespace is enabled for the account. Sets POSIX access permissions for the file owner, the file owning group, and others. Each class may be granted read, write, or execute permission. The sticky bit is also supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. * @param posixAcl Sets POSIX access control rights on files and directories. The value is a comma-separated list of access control entries. Each access control entry (ACE) consists of a scope, a type, a user or group identifier, and permissions in the format "[scope:][type]:[id]:[permissions]". + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setAccessControlWithRestResponseAsync(Integer timeout, String owner, String group, String posixPermissions, String posixAcl, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono setAccessControlWithRestResponseAsync(Integer timeout, String leaseId, String owner, String group, String posixPermissions, String posixAcl, String ifMatch, String ifNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String action = "setAccessControl"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setAccessControl(this.client.getUrl(), timeout, owner, group, posixPermissions, posixAcl, requestId, this.client.getVersion(), action, leaseId, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.setAccessControl(this.client.getUrl(), timeout, leaseId, owner, group, posixPermissions, posixAcl, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, requestId, this.client.getVersion(), action, context); } /** @@ -453,14 +369,14 @@ public Mono setAccessControlWithRestResponse public Mono getAccessControlWithRestResponseAsync(Context context) { final Integer timeout = null; final Boolean upn = null; - final String requestId = null; - final String action = "getAccessControl"; final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String requestId = null; + final String action = "getAccessControl"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.getAccessControl(this.client.getUrl(), timeout, upn, requestId, this.client.getVersion(), action, leaseId, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.getAccessControl(this.client.getUrl(), timeout, upn, leaseId, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, requestId, this.client.getVersion(), action, context); } /** @@ -468,38 +384,21 @@ public Mono getAccessControlWithRestResponse * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param upn Optional. Valid only when Hierarchical Namespace is enabled for the account. If "true", the identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure Active Directory Object IDs. The default value is false. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccessControlWithRestResponseAsync(Integer timeout, Boolean upn, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono getAccessControlWithRestResponseAsync(Integer timeout, Boolean upn, String leaseId, String ifMatch, String ifNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String action = "getAccessControl"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getAccessControl(this.client.getUrl(), timeout, upn, requestId, this.client.getVersion(), action, leaseId, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.getAccessControl(this.client.getUrl(), timeout, upn, leaseId, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, requestId, this.client.getVersion(), action, context); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java index b5727a6ed00a..df03ea323d6b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java @@ -31,21 +31,18 @@ import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromURLResponse; import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesResponse; import com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier; -import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.BlobHttpHeaders; +import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.EncryptionAlgorithmType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.SequenceNumberAccessConditions; import com.azure.storage.blob.models.SequenceNumberActionType; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + import java.net.URL; import java.nio.ByteBuffer; import java.time.OffsetDateTime; import java.util.Map; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -82,47 +79,47 @@ private interface PageBlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono uploadPages(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono uploadPages(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono clearPages(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono clearPages(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono uploadPagesFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, Context context); + Mono uploadPagesFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Get("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono getPageRanges(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono getPageRanges(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); @Get("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono getPageRangesDiff(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @QueryParam("prevsnapshot") String prevsnapshot, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono getPageRangesDiff(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @QueryParam("prevsnapshot") String prevsnapshot, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono resize(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono resize(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono updateSequenceNumber(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-sequence-number-action") SequenceNumberActionType sequenceNumberAction, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono updateSequenceNumber(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-sequence-number-action") SequenceNumberActionType sequenceNumberAction, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono copyIncremental(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono copyIncremental(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); } /** @@ -141,6 +138,9 @@ public Mono createWithRestResponseAsync(String containe final Integer timeout = null; final PremiumPageBlobAccessTier tier = null; final Map metadata = null; + final String leaseId = null; + final String ifMatch = null; + final String ifNoneMatch = null; final Long blobSequenceNumber = 0L; final String requestId = null; final String blobType = "PageBlob"; @@ -149,16 +149,13 @@ public Mono createWithRestResponseAsync(String containe final String blobContentLanguage = null; final String blobCacheControl = null; final String blobContentDisposition = null; - final String leaseId = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; - final String ifMatch = null; - final String ifNoneMatch = null; - String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + String blobContentMD5Converted = null; + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -171,18 +168,21 @@ public Mono createWithRestResponseAsync(String containe * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param tier Optional. Indicates the tier to be set on the page blob. Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80'. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param blobHttpHeaders Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, Map metadata, Long blobSequenceNumber, String requestId, BlobHttpHeaders blobHttpHeaders, LeaseAccessConditions leaseAccessConditions, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long blobSequenceNumber, String requestId, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, Context context) { final String blobType = "PageBlob"; String blobContentType = null; if (blobHttpHeaders != null) { @@ -208,10 +208,6 @@ public Mono createWithRestResponseAsync(String containe if (blobHttpHeaders != null) { blobContentDisposition = blobHttpHeaders.getBlobContentDisposition(); } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -224,26 +220,10 @@ public Mono createWithRestResponseAsync(String containe if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -261,23 +241,23 @@ public Mono createWithRestResponseAsync(String containe public Mono uploadPagesWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Context context) { final Integer timeout = null; final String range = null; - final String requestId = null; - final String comp = "page"; - final String pageWrite = "update"; final String leaseId = null; - final String encryptionKey = null; - final String encryptionKeySha256 = null; - final EncryptionAlgorithmType encryptionAlgorithm = null; final Long ifSequenceNumberLessThanOrEqualTo = null; final Long ifSequenceNumberLessThan = null; final Long ifSequenceNumberEqualTo = null; final String ifMatch = null; final String ifNoneMatch = null; + final String requestId = null; + final String comp = "page"; + final String pageWrite = "update"; + final String encryptionKey = null; + final String encryptionKeySha256 = null; + final EncryptionAlgorithmType encryptionAlgorithm = null; String transactionalContentMD5Converted = null; String transactionalContentCrc64Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.uploadPages(containerName, blob, this.client.getUrl(), body, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, this.client.getVersion(), requestId, comp, pageWrite, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.uploadPages(containerName, blob, this.client.getUrl(), body, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -291,23 +271,24 @@ public Mono uploadPagesWithRestResponseAsync(Strin * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. - * @param sequenceNumberAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadPagesWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String range, String requestId, LeaseAccessConditions leaseAccessConditions, CpkInfo cpkInfo, SequenceNumberAccessConditions sequenceNumberAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono uploadPagesWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, Context context) { final String comp = "page"; final String pageWrite = "update"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -320,39 +301,11 @@ public Mono uploadPagesWithRestResponseAsync(Strin if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - Long ifSequenceNumberLessThanOrEqualTo = null; - if (sequenceNumberAccessConditions != null) { - ifSequenceNumberLessThanOrEqualTo = sequenceNumberAccessConditions.getIfSequenceNumberLessThanOrEqualTo(); - } - Long ifSequenceNumberLessThan = null; - if (sequenceNumberAccessConditions != null) { - ifSequenceNumberLessThan = sequenceNumberAccessConditions.getIfSequenceNumberLessThan(); - } - Long ifSequenceNumberEqualTo = null; - if (sequenceNumberAccessConditions != null) { - ifSequenceNumberEqualTo = sequenceNumberAccessConditions.getIfSequenceNumberEqualTo(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.uploadPages(containerName, blob, this.client.getUrl(), body, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, this.client.getVersion(), requestId, comp, pageWrite, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.uploadPages(containerName, blob, this.client.getUrl(), body, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -369,21 +322,21 @@ public Mono uploadPagesWithRestResponseAsync(Strin public Mono clearPagesWithRestResponseAsync(String containerName, String blob, long contentLength, Context context) { final Integer timeout = null; final String range = null; - final String requestId = null; - final String comp = "page"; - final String pageWrite = "clear"; final String leaseId = null; - final String encryptionKey = null; - final String encryptionKeySha256 = null; - final EncryptionAlgorithmType encryptionAlgorithm = null; final Long ifSequenceNumberLessThanOrEqualTo = null; final Long ifSequenceNumberLessThan = null; final Long ifSequenceNumberEqualTo = null; final String ifMatch = null; final String ifNoneMatch = null; + final String requestId = null; + final String comp = "page"; + final String pageWrite = "clear"; + final String encryptionKey = null; + final String encryptionKeySha256 = null; + final EncryptionAlgorithmType encryptionAlgorithm = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.clearPages(containerName, blob, this.client.getUrl(), contentLength, timeout, range, this.client.getVersion(), requestId, comp, pageWrite, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.clearPages(containerName, blob, this.client.getUrl(), contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -394,23 +347,24 @@ public Mono clearPagesWithRestResponseAsync(String * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. - * @param sequenceNumberAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono clearPagesWithRestResponseAsync(String containerName, String blob, long contentLength, Integer timeout, String range, String requestId, LeaseAccessConditions leaseAccessConditions, CpkInfo cpkInfo, SequenceNumberAccessConditions sequenceNumberAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono clearPagesWithRestResponseAsync(String containerName, String blob, long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, Context context) { final String comp = "page"; final String pageWrite = "clear"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -423,37 +377,9 @@ public Mono clearPagesWithRestResponseAsync(String if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - Long ifSequenceNumberLessThanOrEqualTo = null; - if (sequenceNumberAccessConditions != null) { - ifSequenceNumberLessThanOrEqualTo = sequenceNumberAccessConditions.getIfSequenceNumberLessThanOrEqualTo(); - } - Long ifSequenceNumberLessThan = null; - if (sequenceNumberAccessConditions != null) { - ifSequenceNumberLessThan = sequenceNumberAccessConditions.getIfSequenceNumberLessThan(); - } - Long ifSequenceNumberEqualTo = null; - if (sequenceNumberAccessConditions != null) { - ifSequenceNumberEqualTo = sequenceNumberAccessConditions.getIfSequenceNumberEqualTo(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.clearPages(containerName, blob, this.client.getUrl(), contentLength, timeout, range, this.client.getVersion(), requestId, comp, pageWrite, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.clearPages(containerName, blob, this.client.getUrl(), contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -472,12 +398,6 @@ public Mono clearPagesWithRestResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadPagesFromURLWithRestResponseAsync(String containerName, String blob, URL sourceUrl, String sourceRange, long contentLength, String range, Context context) { final Integer timeout = null; - final String requestId = null; - final String comp = "page"; - final String pageWrite = "update"; - final String encryptionKey = null; - final String encryptionKeySha256 = null; - final EncryptionAlgorithmType encryptionAlgorithm = null; final String leaseId = null; final Long ifSequenceNumberLessThanOrEqualTo = null; final Long ifSequenceNumberLessThan = null; @@ -486,13 +406,19 @@ public Mono uploadPagesFromURLWithRestRespo final String ifNoneMatch = null; final String sourceIfMatch = null; final String sourceIfNoneMatch = null; + final String requestId = null; + final String comp = "page"; + final String pageWrite = "update"; + final String encryptionKey = null; + final String encryptionKeySha256 = null; + final EncryptionAlgorithmType encryptionAlgorithm = null; String sourceContentMD5Converted = null; String sourceContentcrc64Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; - return service.uploadPagesFromURL(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.uploadPagesFromURL(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -507,18 +433,26 @@ public Mono uploadPagesFromURLWithRestRespo * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param cpkInfo Additional parameters for the operation. - * @param leaseAccessConditions Additional parameters for the operation. - * @param sequenceNumberAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. - * @param sourceModifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadPagesFromURLWithRestResponseAsync(String containerName, String blob, URL sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, String requestId, CpkInfo cpkInfo, LeaseAccessConditions leaseAccessConditions, SequenceNumberAccessConditions sequenceNumberAccessConditions, ModifiedAccessConditions modifiedAccessConditions, SourceModifiedAccessConditions sourceModifiedAccessConditions, Context context) { + public Mono uploadPagesFromURLWithRestResponseAsync(String containerName, String blob, URL sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, CpkInfo cpkInfo, Context context) { final String comp = "page"; final String pageWrite = "update"; String encryptionKey = null; @@ -533,61 +467,13 @@ public Mono uploadPagesFromURLWithRestRespo if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - Long ifSequenceNumberLessThanOrEqualTo = null; - if (sequenceNumberAccessConditions != null) { - ifSequenceNumberLessThanOrEqualTo = sequenceNumberAccessConditions.getIfSequenceNumberLessThanOrEqualTo(); - } - Long ifSequenceNumberLessThan = null; - if (sequenceNumberAccessConditions != null) { - ifSequenceNumberLessThan = sequenceNumberAccessConditions.getIfSequenceNumberLessThan(); - } - Long ifSequenceNumberEqualTo = null; - if (sequenceNumberAccessConditions != null) { - ifSequenceNumberEqualTo = sequenceNumberAccessConditions.getIfSequenceNumberEqualTo(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } - OffsetDateTime sourceIfModifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfModifiedSince = sourceModifiedAccessConditions.getSourceIfModifiedSince(); - } - OffsetDateTime sourceIfUnmodifiedSince = null; - if (sourceModifiedAccessConditions != null) { - sourceIfUnmodifiedSince = sourceModifiedAccessConditions.getSourceIfUnmodifiedSince(); - } - String sourceIfMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfMatch = sourceModifiedAccessConditions.getSourceIfMatch(); - } - String sourceIfNoneMatch = null; - if (sourceModifiedAccessConditions != null) { - sourceIfNoneMatch = sourceModifiedAccessConditions.getSourceIfNoneMatch(); - } String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.uploadPagesFromURL(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.uploadPagesFromURL(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -604,14 +490,14 @@ public Mono getPageRangesWithRestResponseAsync(S final String snapshot = null; final Integer timeout = null; final String range = null; - final String requestId = null; - final String comp = "pagelist"; final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String requestId = null; + final String comp = "pagelist"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.getPageRanges(containerName, blob, this.client.getUrl(), snapshot, timeout, range, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getPageRanges(containerName, blob, this.client.getUrl(), snapshot, timeout, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, context); } /** @@ -622,39 +508,22 @@ public Mono getPageRangesWithRestResponseAsync(S * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPageRangesWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, String range, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono getPageRangesWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, Context context) { final String comp = "pagelist"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRanges(containerName, blob, this.client.getUrl(), snapshot, timeout, range, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getPageRanges(containerName, blob, this.client.getUrl(), snapshot, timeout, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, context); } /** @@ -672,14 +541,14 @@ public Mono getPageRangesDiffWithRestRespons final Integer timeout = null; final String prevsnapshot = null; final String range = null; - final String requestId = null; - final String comp = "pagelist"; final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String requestId = null; + final String comp = "pagelist"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.getPageRangesDiff(containerName, blob, this.client.getUrl(), snapshot, timeout, prevsnapshot, range, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getPageRangesDiff(containerName, blob, this.client.getUrl(), snapshot, timeout, prevsnapshot, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, context); } /** @@ -691,39 +560,22 @@ public Mono getPageRangesDiffWithRestRespons * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that specifies that the response will contain only pages that were changed between target blob and previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only for blobs created on or after January 1, 2016. * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPageRangesDiffWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, String prevsnapshot, String range, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono getPageRangesDiffWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, String prevsnapshot, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, Context context) { final String comp = "pagelist"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRangesDiff(containerName, blob, this.client.getUrl(), snapshot, timeout, prevsnapshot, range, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getPageRangesDiff(containerName, blob, this.client.getUrl(), snapshot, timeout, prevsnapshot, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, context); } /** @@ -739,17 +591,17 @@ public Mono getPageRangesDiffWithRestRespons @ServiceMethod(returns = ReturnType.SINGLE) public Mono resizeWithRestResponseAsync(String containerName, String blob, long blobContentLength, Context context) { final Integer timeout = null; + final String leaseId = null; + final String ifMatch = null; + final String ifNoneMatch = null; final String requestId = null; final String comp = "properties"; - final String leaseId = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; - final String ifMatch = null; - final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.resize(containerName, blob, this.client.getUrl(), timeout, blobContentLength, this.client.getVersion(), requestId, comp, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.resize(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blobContentLength, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -759,21 +611,20 @@ public Mono resizeWithRestResponseAsync(String containe * @param blob The blob name. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono resizeWithRestResponseAsync(String containerName, String blob, long blobContentLength, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono resizeWithRestResponseAsync(String containerName, String blob, long blobContentLength, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, Context context) { final String comp = "properties"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -786,25 +637,9 @@ public Mono resizeWithRestResponseAsync(String containe if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.resize(containerName, blob, this.client.getUrl(), timeout, blobContentLength, this.client.getVersion(), requestId, comp, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.resize(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blobContentLength, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -820,15 +655,15 @@ public Mono resizeWithRestResponseAsync(String containe @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateSequenceNumberWithRestResponseAsync(String containerName, String blob, SequenceNumberActionType sequenceNumberAction, Context context) { final Integer timeout = null; - final Long blobSequenceNumber = 0L; - final String requestId = null; - final String comp = "properties"; final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final Long blobSequenceNumber = 0L; + final String requestId = null; + final String comp = "properties"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.updateSequenceNumber(containerName, blob, this.client.getUrl(), timeout, sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.updateSequenceNumber(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, comp, context); } /** @@ -838,40 +673,23 @@ public Mono updateSequenceNumberWithRestR * @param blob The blob name. * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This property applies to page blobs only. This property indicates how the service should modify the blob's sequence number. Possible values include: 'max', 'update', 'increment'. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param leaseAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateSequenceNumberWithRestResponseAsync(String containerName, String blob, SequenceNumberActionType sequenceNumberAction, Integer timeout, Long blobSequenceNumber, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono updateSequenceNumberWithRestResponseAsync(String containerName, String blob, SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long blobSequenceNumber, String requestId, Context context) { final String comp = "properties"; - String leaseId = null; - if (leaseAccessConditions != null) { - leaseId = leaseAccessConditions.getLeaseId(); - } - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.updateSequenceNumber(containerName, blob, this.client.getUrl(), timeout, sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.updateSequenceNumber(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, comp, context); } /** @@ -887,13 +705,13 @@ public Mono updateSequenceNumberWithRestR @ServiceMethod(returns = ReturnType.SINGLE) public Mono copyIncrementalWithRestResponseAsync(String containerName, String blob, URL copySource, Context context) { final Integer timeout = null; - final String requestId = null; - final String comp = "incrementalcopy"; final String ifMatch = null; final String ifNoneMatch = null; + final String requestId = null; + final String comp = "incrementalcopy"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.copyIncremental(containerName, blob, this.client.getUrl(), timeout, copySource, this.client.getVersion(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.copyIncremental(containerName, blob, this.client.getUrl(), timeout, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, copySource, this.client.getVersion(), requestId, comp, context); } /** @@ -903,33 +721,20 @@ public Mono copyIncrementalWithRestResponseAsy * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono copyIncrementalWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono copyIncrementalWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, Context context) { final String comp = "incrementalcopy"; - OffsetDateTime ifModifiedSince = null; - if (modifiedAccessConditions != null) { - ifModifiedSince = modifiedAccessConditions.getIfModifiedSince(); - } - OffsetDateTime ifUnmodifiedSince = null; - if (modifiedAccessConditions != null) { - ifUnmodifiedSince = modifiedAccessConditions.getIfUnmodifiedSince(); - } - String ifMatch = null; - if (modifiedAccessConditions != null) { - ifMatch = modifiedAccessConditions.getIfMatch(); - } - String ifNoneMatch = null; - if (modifiedAccessConditions != null) { - ifNoneMatch = modifiedAccessConditions.getIfNoneMatch(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.copyIncremental(containerName, blob, this.client.getUrl(), timeout, copySource, this.client.getVersion(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.copyIncremental(containerName, blob, this.client.getUrl(), timeout, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, copySource, this.client.getVersion(), requestId, comp, context); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAccessConditions.java deleted file mode 100644 index 292d6ffb9dbc..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAccessConditions.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob.models; - -/** - * This class contains values that restrict the successful completion of AppendBlock operations to certain conditions. - * Any field may be set to null if no access conditions are desired. - *

    - * Please refer to the request header section - * here for more conceptual - * information. - */ -public final class AppendBlobAccessConditions { - - private AppendPositionAccessConditions appendPositionAccessConditions; - - private ModifiedAccessConditions modifiedAccessConditions; - - private LeaseAccessConditions leaseAccessConditions; - - /** - * Creates an instance which has fields set to non-null, empty values. - */ - public AppendBlobAccessConditions() { - appendPositionAccessConditions = new AppendPositionAccessConditions(); - modifiedAccessConditions = new ModifiedAccessConditions(); - leaseAccessConditions = new LeaseAccessConditions(); - } - - /** - * Access conditions used for appending data only if the operation meets the provided conditions related to the - * size of the append blob. - * - * @return the append position access conditions - */ - public AppendPositionAccessConditions getAppendPositionAccessConditions() { - return appendPositionAccessConditions; - } - - /** - * Access conditions used for appending data only if the operation meets the provided conditions related to the - * size of the append blob. - * - * @param appendPositionAccessConditions the append position access conditions to set - * @return the updated AppendBlobAccessConditions object - */ - public AppendBlobAccessConditions setAppendPositionAccessConditions(AppendPositionAccessConditions appendPositionAccessConditions) { - this.appendPositionAccessConditions = appendPositionAccessConditions; - return this; - } - - /** - * Standard HTTP Access conditions related to the modification of data. ETag and LastModifiedTime are used to - * construct conditions related to when the blob was changed relative to the given request. The request - * will fail if the specified condition is not satisfied. - * - * @return the modified access conditions - */ - public ModifiedAccessConditions getModifiedAccessConditions() { - return modifiedAccessConditions; - } - - /** - * Standard HTTP Access conditions related to the modification of data. ETag and LastModifiedTime are used to - * construct conditions related to when the blob was changed relative to the given request. The request - * will fail if the specified condition is not satisfied. - * - * @param modifiedAccessConditions the modified access conditions to set - * @return the updated AppendBlobAccessConditions object - */ - public AppendBlobAccessConditions setModifiedAccessConditions(ModifiedAccessConditions modifiedAccessConditions) { - this.modifiedAccessConditions = modifiedAccessConditions; - return this; - } - - /** - * By setting lease access conditions, requests will fail if the provided lease does not match the active lease on - * the blob. - * - * @return the lease access conditions - */ - public LeaseAccessConditions getLeaseAccessConditions() { - return leaseAccessConditions; - } - - /** - * By setting lease access conditions, requests will fail if the provided lease does not match the active lease on - * the blob. - * - * @param leaseAccessConditions the lease access conditions to set - * @return the updated AppendBlobAccessConditions object - */ - public AppendBlobAccessConditions setLeaseAccessConditions(LeaseAccessConditions leaseAccessConditions) { - this.leaseAccessConditions = leaseAccessConditions; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobRequestConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobRequestConditions.java new file mode 100644 index 000000000000..55333aef1f5d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobRequestConditions.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.models; + +import java.time.OffsetDateTime; + +/** + * This class contains values that restrict the successful completion of AppendBlock operations to certain conditions. + * Any field may be set to null if no access conditions are desired. + *

    + * Please refer to the request header section + * here for more conceptual + * information. + */ +public final class AppendBlobRequestConditions extends BlobRequestConditions { + private Long maxSize; + private Long appendPosition; + + /** + * Optionally limit requests to resources that match the passed ETag. + * + * @param ifMatch ETag that resources must match. + * @return The updated AppendBlobRequestConditions object. + */ + @Override + public AppendBlobRequestConditions setIfMatch(String ifMatch) { + super.setIfMatch(ifMatch); + return this; + } + + /** + * Optionally limit requests to resources that do not match the passed ETag. + * + * @param ifNoneMatch ETag that resources must not match. + * @return The updated AppendBlobRequestConditions object. + */ + @Override + public AppendBlobRequestConditions setIfNoneMatch(String ifNoneMatch) { + super.setIfNoneMatch(ifNoneMatch); + return this; + } + + /** + * Optionally limit requests to resources that have only been modified since the passed + * {@link OffsetDateTime datetime}. + * + * @param ifModifiedSince The datetime that resources must have been modified since. + * @return The updated AppendBlobRequestConditions object. + */ + @Override + public AppendBlobRequestConditions setIfModifiedSince(OffsetDateTime ifModifiedSince) { + super.setIfModifiedSince(ifModifiedSince); + return this; + } + + /** + * Optionally limit requests to resources that have remained unmodified since the passed + * {@link OffsetDateTime datetime}. + * + * @param ifUnmodifiedSince The datetime that resources must have remained unmodified since. + * @return The updated AppendBlobRequestConditions object. + */ + @Override + public AppendBlobRequestConditions setIfUnmodifiedSince(OffsetDateTime ifUnmodifiedSince) { + super.setIfUnmodifiedSince(ifUnmodifiedSince); + return this; + } + + /** + * Optionally limits requests to blobs and containers that match the lease ID. + * + * @param leaseId Lease ID that blobs and containers must match. + * @return The updated AppendBlobRequestConditions object. + */ + @Override + public AppendBlobRequestConditions setLeaseId(String leaseId) { + super.setLeaseId(leaseId); + return this; + } + + /** + * Gets the max length in bytes allowed for the append blob. + * + *

    If the operation would cause the append blob to grow larger than the limit the request will fail.

    + * + * @return The max length in bytes allowed for the append blob. + */ + public Long getMaxSize() { + return maxSize; + } + + /** + * Sets the max length in bytes allowed for the append blob. + * + *

    If the operation would cause the append blob to grow larger than the limit the request will fail.

    + * + * @param maxSize Append blob size byte limit. + * @return The updated AppendBlobRequestConditions object. + */ + public AppendBlobRequestConditions setMaxSize(Long maxSize) { + this.maxSize = maxSize; + return this; + } + + /** + * Gets the byte offset that the append position of the append blob must match. + * + * @return The byte offset that must match the append position. + */ + public Long getAppendPosition() { + return appendPosition; + } + + /** + * Sets the byte offset that the append position of the append blob must match. + * + * @param appendPosition Byte offset to compare to the append position. + * @return The updated AppendBlobRequestConditions object. + */ + public AppendBlobRequestConditions setAppendPosition(Long appendPosition) { + this.appendPosition = appendPosition; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java deleted file mode 100644 index cbee4d28758b..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.storage.blob.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -/** - * Additional parameters for a set of operations, such as: - * AppendBlobs_appendBlock, AppendBlobs_appendBlockFromUrl. - */ -@JacksonXmlRootElement(localName = "append-position-access-conditions") -@Fluent -public final class AppendPositionAccessConditions { - /* - * Optional conditional header. The max length in bytes permitted for the - * append blob. If the Append Block operation would cause the blob to - * exceed that limit or if the blob size is already greater than the value - * specified in this header, the request will fail with - * MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition - * Failed). - */ - @JsonProperty(value = "maxSize") - private Long maxSize; - - /* - * Optional conditional header, used only for the Append Block operation. A - * number indicating the byte offset to compare. Append Block will succeed - * only if the append position is equal to this number. If it is not, the - * request will fail with the AppendPositionConditionNotMet error (HTTP - * status code 412 - Precondition Failed). - */ - @JsonProperty(value = "appendPosition") - private Long appendPosition; - - /** - * Get the maxSize property: Optional conditional header. The max length in - * bytes permitted for the append blob. If the Append Block operation would - * cause the blob to exceed that limit or if the blob size is already - * greater than the value specified in this header, the request will fail - * with MaxBlobSizeConditionNotMet error (HTTP status code 412 - - * Precondition Failed). - * - * @return the maxSize value. - */ - public Long getMaxSize() { - return this.maxSize; - } - - /** - * Set the maxSize property: Optional conditional header. The max length in - * bytes permitted for the append blob. If the Append Block operation would - * cause the blob to exceed that limit or if the blob size is already - * greater than the value specified in this header, the request will fail - * with MaxBlobSizeConditionNotMet error (HTTP status code 412 - - * Precondition Failed). - * - * @param maxSize the maxSize value to set. - * @return the AppendPositionAccessConditions object itself. - */ - public AppendPositionAccessConditions setMaxSize(Long maxSize) { - this.maxSize = maxSize; - return this; - } - - /** - * Get the appendPosition property: Optional conditional header, used only - * for the Append Block operation. A number indicating the byte offset to - * compare. Append Block will succeed only if the append position is equal - * to this number. If it is not, the request will fail with the - * AppendPositionConditionNotMet error (HTTP status code 412 - Precondition - * Failed). - * - * @return the appendPosition value. - */ - public Long getAppendPosition() { - return this.appendPosition; - } - - /** - * Set the appendPosition property: Optional conditional header, used only - * for the Append Block operation. A number indicating the byte offset to - * compare. Append Block will succeed only if the append position is equal - * to this number. If it is not, the request will fail with the - * AppendPositionConditionNotMet error (HTTP status code 412 - Precondition - * Failed). - * - * @param appendPosition the appendPosition value to set. - * @return the AppendPositionAccessConditions object itself. - */ - public AppendPositionAccessConditions setAppendPosition(Long appendPosition) { - this.appendPosition = appendPosition; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAccessConditions.java deleted file mode 100644 index ef002660ee0a..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAccessConditions.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob.models; - -/** - * This class contains values which will restrict the successful operation of a variety of requests to the conditions - * present. These conditions are entirely optional. The entire object or any of its properties may be set to null when - * passed to a method to indicate that those conditions are not desired. Please refer to the type of each field for more - * information on those particular access conditions. - */ -public final class BlobAccessConditions { - - private ModifiedAccessConditions modifiedAccessConditions; - - private LeaseAccessConditions leaseAccessConditions; - - /** - * Creates an instance which has fields set to non-null, empty values. - */ - public BlobAccessConditions() { - modifiedAccessConditions = new ModifiedAccessConditions(); - leaseAccessConditions = new LeaseAccessConditions(); - } - - /** - * Standard HTTP Access conditions related to the modification of data. ETag and LastModifiedTime are used to - * construct conditions related to when the blob was changed relative to the given request. The request - * will fail if the specified condition is not satisfied. - * - * @return the modified access conditions - */ - public ModifiedAccessConditions getModifiedAccessConditions() { - return modifiedAccessConditions; - } - - /** - * Standard HTTP Access conditions related to the modification of data. ETag and LastModifiedTime are used to - * construct conditions related to when the blob was changed relative to the given request. The request - * will fail if the specified condition is not satisfied. - * - * @param modifiedAccessConditions the modified access conditions to set - * @return the updated BlobAccessConditions object - */ - public BlobAccessConditions setModifiedAccessConditions(ModifiedAccessConditions modifiedAccessConditions) { - this.modifiedAccessConditions = modifiedAccessConditions; - return this; - } - - /** - * By setting lease access conditions, requests will fail if the provided lease does not match the active lease on - * the blob. - * - * @return the lease access conditions - */ - public LeaseAccessConditions getLeaseAccessConditions() { - return leaseAccessConditions; - } - - /** - * By setting lease access conditions, requests will fail if the provided lease does not match the active lease on - * the blob. - * - * @param leaseAccessConditions the lease access conditions to set - * @return the updated BlobAccessConditions object - */ - public BlobAccessConditions setLeaseAccessConditions(LeaseAccessConditions leaseAccessConditions) { - this.leaseAccessConditions = leaseAccessConditions; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessConditions.java deleted file mode 100644 index b2bf5d25e0c1..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessConditions.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob.models; - -/** - * This class contains values which will restrict the successful operation of a variety of requests to the conditions - * present. These conditions are entirely optional. The entire object or any of its properties may be set to null when - * passed to a method to indicate that those conditions are not desired. Please refer to the type of each field for more - * information on those particular access conditions. - */ -public final class BlobContainerAccessConditions { - - private ModifiedAccessConditions modifiedAccessConditions; - - private LeaseAccessConditions leaseAccessConditions; - - /** - * Creates an instance which has fields set to non-null, empty values. - */ - public BlobContainerAccessConditions() { - this.modifiedAccessConditions = new ModifiedAccessConditions(); - this.leaseAccessConditions = new LeaseAccessConditions(); - } - - /** - * Standard HTTP Access conditions related to the modification of data. ETag and LastModifiedTime are used to - * construct conditions related to when the blob was changed relative to the given request. The request - * will fail if the specified condition is not satisfied. - * - * @return the modified access conditions - */ - public ModifiedAccessConditions getModifiedAccessConditions() { - return modifiedAccessConditions; - } - - /** - * Standard HTTP Access conditions related to the modification of data. ETag and LastModifiedTime are used to - * construct conditions related to when the blob was changed relative to the given request. The request - * will fail if the specified condition is not satisfied. - * - * @param modifiedAccessConditions the modified access conditions to set - * @return the updated ContainerAccessConditions object - */ - public BlobContainerAccessConditions setModifiedAccessConditions(ModifiedAccessConditions modifiedAccessConditions) { - this.modifiedAccessConditions = modifiedAccessConditions; - return this; - } - - /** - * By setting lease access conditions, requests will fail if the provided lease does not match the active lease on - * the blob. - * - * @return the lease access conditions - */ - public LeaseAccessConditions getLeaseAccessConditions() { - return leaseAccessConditions; - } - - /** - * By setting lease access conditions, requests will fail if the provided lease does not match the active lease on - * the blob. - * - * @param leaseID the lease access conditions to set - * @return the updated ContainerAccessConditions object - */ - public BlobContainerAccessConditions setLeaseAccessConditions(LeaseAccessConditions leaseID) { - this.leaseAccessConditions = leaseID; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRequestConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRequestConditions.java new file mode 100644 index 000000000000..5f48513a1bab --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRequestConditions.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.models; + +import com.azure.core.http.RequestConditions; + +import java.time.OffsetDateTime; + +/** + * This class contains values which will restrict the successful operation of a variety of requests to the conditions + * present. These conditions are entirely optional. The entire object or any of its properties may be set to null when + * passed to a method to indicate that those conditions are not desired. Please refer to the type of each field for more + * information on those particular access conditions. + */ +public class BlobRequestConditions extends RequestConditions { + private String leaseId; + + /** + * Optionally limit requests to resources that match the passed ETag. + * + * @param ifMatch ETag that resources must match. + * @return The updated BlobRequestConditions object. + */ + @Override + public BlobRequestConditions setIfMatch(String ifMatch) { + super.setIfMatch(ifMatch); + return this; + } + + /** + * Optionally limit requests to resources that do not match the passed ETag. + * + * @param ifNoneMatch ETag that resources must not match. + * @return The updated BlobRequestConditions object. + */ + @Override + public BlobRequestConditions setIfNoneMatch(String ifNoneMatch) { + super.setIfNoneMatch(ifNoneMatch); + return this; + } + + /** + * Optionally limit requests to resources that have only been modified since the passed + * {@link OffsetDateTime datetime}. + * + * @param ifModifiedSince The datetime that resources must have been modified since. + * @return The updated BlobRequestConditions object. + */ + @Override + public BlobRequestConditions setIfModifiedSince(OffsetDateTime ifModifiedSince) { + super.setIfModifiedSince(ifModifiedSince); + return this; + } + + /** + * Optionally limit requests to resources that have remained unmodified since the passed + * {@link OffsetDateTime datetime}. + * + * @param ifUnmodifiedSince The datetime that resources must have remained unmodified since. + * @return The updated BlobRequestConditions object. + */ + @Override + public BlobRequestConditions setIfUnmodifiedSince(OffsetDateTime ifUnmodifiedSince) { + super.setIfUnmodifiedSince(ifUnmodifiedSince); + return this; + } + + /** + * Gets the lease ID that blobs and containers must match. + * + * @return The lease ID that blobs and containers must match. + */ + public String getLeaseId() { + return leaseId; + } + + /** + * Optionally limits requests to blobs and containers that match the lease ID. + * + * @param leaseId Lease ID that blobs and containers must match. + * @return The updated BlobRequestConditions object. + */ + public BlobRequestConditions setLeaseId(String leaseId) { + this.leaseId = leaseId; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java deleted file mode 100644 index cf9a2271ed3b..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.storage.blob.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -/** - * Additional parameters for a set of operations. - */ -@JacksonXmlRootElement(localName = "lease-access-conditions") -@Fluent -public final class LeaseAccessConditions { - /* - * If specified, the operation only succeeds if the resource's lease is - * active and matches this ID. - */ - @JsonProperty(value = "leaseId") - private String leaseId; - - /** - * Get the leaseId property: If specified, the operation only succeeds if - * the resource's lease is active and matches this ID. - * - * @return the leaseId value. - */ - public String getLeaseId() { - return this.leaseId; - } - - /** - * Set the leaseId property: If specified, the operation only succeeds if - * the resource's lease is active and matches this ID. - * - * @param leaseId the leaseId value to set. - * @return the LeaseAccessConditions object itself. - */ - public LeaseAccessConditions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java deleted file mode 100644 index a7c29031cd18..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.storage.blob.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.implementation.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.time.OffsetDateTime; - -/** - * Additional parameters for a set of operations. - */ -@JacksonXmlRootElement(localName = "modified-access-conditions") -@Fluent -public final class ModifiedAccessConditions { - /* - * Specify this header value to operate only on a blob if it has been - * modified since the specified date/time. - */ - @JsonProperty(value = "ifModifiedSince") - private DateTimeRfc1123 ifModifiedSince; - - /* - * Specify this header value to operate only on a blob if it has not been - * modified since the specified date/time. - */ - @JsonProperty(value = "ifUnmodifiedSince") - private DateTimeRfc1123 ifUnmodifiedSince; - - /* - * Specify an ETag value to operate only on blobs with a matching value. - */ - @JsonProperty(value = "ifMatch") - private String ifMatch; - - /* - * Specify an ETag value to operate only on blobs without a matching value. - */ - @JsonProperty(value = "ifNoneMatch") - private String ifNoneMatch; - - /** - * Get the ifModifiedSince property: Specify this header value to operate - * only on a blob if it has been modified since the specified date/time. - * - * @return the ifModifiedSince value. - */ - public OffsetDateTime getIfModifiedSince() { - if (this.ifModifiedSince == null) { - return null; - } - return this.ifModifiedSince.getDateTime(); - } - - /** - * Set the ifModifiedSince property: Specify this header value to operate - * only on a blob if it has been modified since the specified date/time. - * - * @param ifModifiedSince the ifModifiedSince value to set. - * @return the ModifiedAccessConditions object itself. - */ - public ModifiedAccessConditions setIfModifiedSince(OffsetDateTime ifModifiedSince) { - if (ifModifiedSince == null) { - this.ifModifiedSince = null; - } else { - this.ifModifiedSince = new DateTimeRfc1123(ifModifiedSince); - } - return this; - } - - /** - * Get the ifUnmodifiedSince property: Specify this header value to operate - * only on a blob if it has not been modified since the specified - * date/time. - * - * @return the ifUnmodifiedSince value. - */ - public OffsetDateTime getIfUnmodifiedSince() { - if (this.ifUnmodifiedSince == null) { - return null; - } - return this.ifUnmodifiedSince.getDateTime(); - } - - /** - * Set the ifUnmodifiedSince property: Specify this header value to operate - * only on a blob if it has not been modified since the specified - * date/time. - * - * @param ifUnmodifiedSince the ifUnmodifiedSince value to set. - * @return the ModifiedAccessConditions object itself. - */ - public ModifiedAccessConditions setIfUnmodifiedSince(OffsetDateTime ifUnmodifiedSince) { - if (ifUnmodifiedSince == null) { - this.ifUnmodifiedSince = null; - } else { - this.ifUnmodifiedSince = new DateTimeRfc1123(ifUnmodifiedSince); - } - return this; - } - - /** - * Get the ifMatch property: Specify an ETag value to operate only on blobs - * with a matching value. - * - * @return the ifMatch value. - */ - public String getIfMatch() { - return this.ifMatch; - } - - /** - * Set the ifMatch property: Specify an ETag value to operate only on blobs - * with a matching value. - * - * @param ifMatch the ifMatch value to set. - * @return the ModifiedAccessConditions object itself. - */ - public ModifiedAccessConditions setIfMatch(String ifMatch) { - this.ifMatch = ifMatch; - return this; - } - - /** - * Get the ifNoneMatch property: Specify an ETag value to operate only on - * blobs without a matching value. - * - * @return the ifNoneMatch value. - */ - public String getIfNoneMatch() { - return this.ifNoneMatch; - } - - /** - * Set the ifNoneMatch property: Specify an ETag value to operate only on - * blobs without a matching value. - * - * @param ifNoneMatch the ifNoneMatch value to set. - * @return the ModifiedAccessConditions object itself. - */ - public ModifiedAccessConditions setIfNoneMatch(String ifNoneMatch) { - this.ifNoneMatch = ifNoneMatch; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobAccessConditions.java deleted file mode 100644 index 8d52111311b7..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobAccessConditions.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob.models; - -/** - * This class contains values that restrict the successful completion of PageBlob operations to certain conditions. - * It may be set to null if no access conditions are desired. - *

    - * Please refer to the request header section - * here for more conceptual information. - */ -public final class PageBlobAccessConditions { - - private SequenceNumberAccessConditions sequenceNumberAccessConditions; - - private ModifiedAccessConditions modifiedAccessConditions; - - private LeaseAccessConditions leaseAccessConditions; - - /** - * Creates an instance which has fields set to non-null, empty values. - */ - public PageBlobAccessConditions() { - this.sequenceNumberAccessConditions = new SequenceNumberAccessConditions(); - this.modifiedAccessConditions = new ModifiedAccessConditions(); - this.leaseAccessConditions = new LeaseAccessConditions(); - } - - /** - * Access conditions that will fail the request if the sequence number does not meet the provided condition. - * - * @return the sequence number access conditions - */ - public SequenceNumberAccessConditions getSequenceNumberAccessConditions() { - return sequenceNumberAccessConditions; - } - - /** - * Access conditions that will fail the request if the sequence number does not meet the provided condition. - * - * @param sequenceNumberAccessConditions the sequence number access conditions to set - * @return the updated PageBlobAccessConditions object - */ - public PageBlobAccessConditions setSequenceNumberAccessConditions( - SequenceNumberAccessConditions sequenceNumberAccessConditions) { - this.sequenceNumberAccessConditions = sequenceNumberAccessConditions; - return this; - } - - /** - * Standard HTTP Access conditions related to the modification of data. ETag and LastModifiedTime are used to - * construct conditions related to when the blob was changed relative to the given request. The request - * will fail if the specified condition is not satisfied. - * - * @return the modified access conditions - */ - public ModifiedAccessConditions getModifiedAccessConditions() { - return modifiedAccessConditions; - } - - /** - * Standard HTTP Access conditions related to the modification of data. ETag and LastModifiedTime are used to - * construct conditions related to when the blob was changed relative to the given request. The request - * will fail if the specified condition is not satisfied. - * - * @param modifiedAccessConditions the modified access conditions to set - * @return the updated PageBlobAccessConditions object - */ - public PageBlobAccessConditions setModifiedAccessConditions(ModifiedAccessConditions modifiedAccessConditions) { - this.modifiedAccessConditions = modifiedAccessConditions; - return this; - } - - /** - * By setting lease access conditions, requests will fail if the provided lease does not match the active lease on - * the blob. - * - * @return the lease access conditions - */ - public LeaseAccessConditions getLeaseAccessConditions() { - return leaseAccessConditions; - } - - /** - * By setting lease access conditions, requests will fail if the provided lease does not match the active lease on - * the blob. - * - * @param leaseAccessConditions the lease access conditions to set - * @return the updated PageBlobAccessConditions object - */ - public PageBlobAccessConditions setLeaseAccessConditions(LeaseAccessConditions leaseAccessConditions) { - this.leaseAccessConditions = leaseAccessConditions; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobRequestConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobRequestConditions.java new file mode 100644 index 000000000000..d1d00465e78a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobRequestConditions.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.models; + +import java.time.OffsetDateTime; + +/** + * This class contains values that restrict the successful completion of PageBlob operations to certain conditions. + * It may be set to null if no access conditions are desired. + *

    + * Please refer to the request header section + * here for more conceptual information. + */ +public final class PageBlobRequestConditions extends BlobRequestConditions { + private Long ifSequenceNumberLessThanOrEqualTo; + private Long ifSequenceNumberLessThan; + private Long ifSequenceNumberEqualTo; + + /** + * Optionally limit requests to resources that match the passed ETag. + * + * @param ifMatch ETag that resources must match. + * @return The updated PageBlobRequestConditions object. + */ + @Override + public PageBlobRequestConditions setIfMatch(String ifMatch) { + super.setIfMatch(ifMatch); + return this; + } + + /** + * Optionally limit requests to resources that do not match the passed ETag. + * + * @param ifNoneMatch ETag that resources must not match. + * @return The updated PageBlobRequestConditions object. + */ + @Override + public PageBlobRequestConditions setIfNoneMatch(String ifNoneMatch) { + super.setIfNoneMatch(ifNoneMatch); + return this; + } + + /** + * Optionally limit requests to resources that have only been modified since the passed + * {@link OffsetDateTime datetime}. + * + * @param ifModifiedSince The datetime that resources must have been modified since. + * @return The updated PageBlobRequestConditions object. + */ + @Override + public PageBlobRequestConditions setIfModifiedSince(OffsetDateTime ifModifiedSince) { + super.setIfModifiedSince(ifModifiedSince); + return this; + } + + /** + * Optionally limit requests to resources that have remained unmodified since the passed + * {@link OffsetDateTime datetime}. + * + * @param ifUnmodifiedSince The datetime that resources must have remained unmodified since. + * @return The updated PageBlobRequestConditions object. + */ + @Override + public PageBlobRequestConditions setIfUnmodifiedSince(OffsetDateTime ifUnmodifiedSince) { + super.setIfUnmodifiedSince(ifUnmodifiedSince); + return this; + } + + /** + * Optionally limits requests to blobs and containers that match the lease ID. + * + * @param leaseId Lease ID that blobs and containers must match. + * @return The updated PageBlobRequestConditions object. + */ + @Override + public PageBlobRequestConditions setLeaseId(String leaseId) { + super.setLeaseId(leaseId); + return this; + } + + /** + * Gets the value that the page blob's sequence number must be less than or equal to. + * + * @return The value the sequence number must be less than or equal to. + */ + public Long getIfSequenceNumberLessThanOrEqualTo() { + return ifSequenceNumberLessThanOrEqualTo; + } + + /** + * Sets the value that the page blob's sequence number must be less than or equal to. + * + * @param ifSequenceNumberLessThanOrEqualTo The value the sequence number must be less than or equal to. + * @return The updated PageBlobRequestConditions object. + */ + public PageBlobRequestConditions setIfSequenceNumberLessThanOrEqualTo(Long ifSequenceNumberLessThanOrEqualTo) { + this.ifSequenceNumberLessThanOrEqualTo = ifSequenceNumberLessThanOrEqualTo; + return this; + } + + /** + * Gets the value that the page blob's sequence number must be less than. + * + * @return The value the sequence number must be less than. + */ + public Long getIfSequenceNumberLessThan() { + return ifSequenceNumberLessThan; + } + + /** + * Sets the value that the page blob's sequence number must be less than. + * + * @param ifSequenceNumberLessThan The value the sequence number must be less than. + * @return The updated PageBlobRequestConditions object. + */ + public PageBlobRequestConditions setIfSequenceNumberLessThan(Long ifSequenceNumberLessThan) { + this.ifSequenceNumberLessThan = ifSequenceNumberLessThan; + return this; + } + + /** + * Gets the value that the page blob's sequence number must be equal to. + * + * @return The value the sequence number must be equal to. + */ + public Long getIfSequenceNumberEqualTo() { + return ifSequenceNumberEqualTo; + } + + /** + * Sets the value that the page blob's sequence number must be less equal to. + * + * @param ifSequenceNumberEqualTo The value the sequence number must be equal to. + * @return The updated PageBlobRequestConditions object. + */ + public PageBlobRequestConditions setIfSequenceNumberEqualTo(Long ifSequenceNumberEqualTo) { + this.ifSequenceNumberEqualTo = ifSequenceNumberEqualTo; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java deleted file mode 100644 index a1d9b107b388..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.storage.blob.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -/** - * Additional parameters for a set of operations, such as: - * PageBlobs_uploadPages, PageBlobs_clearPages, PageBlobs_uploadPagesFromURL. - */ -@JacksonXmlRootElement(localName = "sequence-number-access-conditions") -@Fluent -public final class SequenceNumberAccessConditions { - /* - * Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. - */ - @JsonProperty(value = "ifSequenceNumberLessThanOrEqualTo") - private Long ifSequenceNumberLessThanOrEqualTo; - - /* - * Specify this header value to operate only on a blob if it has a sequence - * number less than the specified. - */ - @JsonProperty(value = "ifSequenceNumberLessThan") - private Long ifSequenceNumberLessThan; - - /* - * Specify this header value to operate only on a blob if it has the - * specified sequence number. - */ - @JsonProperty(value = "ifSequenceNumberEqualTo") - private Long ifSequenceNumberEqualTo; - - /** - * Get the ifSequenceNumberLessThanOrEqualTo property: Specify this header - * value to operate only on a blob if it has a sequence number less than or - * equal to the specified. - * - * @return the ifSequenceNumberLessThanOrEqualTo value. - */ - public Long getIfSequenceNumberLessThanOrEqualTo() { - return this.ifSequenceNumberLessThanOrEqualTo; - } - - /** - * Set the ifSequenceNumberLessThanOrEqualTo property: Specify this header - * value to operate only on a blob if it has a sequence number less than or - * equal to the specified. - * - * @param ifSequenceNumberLessThanOrEqualTo the - * ifSequenceNumberLessThanOrEqualTo value to set. - * @return the SequenceNumberAccessConditions object itself. - */ - public SequenceNumberAccessConditions setIfSequenceNumberLessThanOrEqualTo(Long ifSequenceNumberLessThanOrEqualTo) { - this.ifSequenceNumberLessThanOrEqualTo = ifSequenceNumberLessThanOrEqualTo; - return this; - } - - /** - * Get the ifSequenceNumberLessThan property: Specify this header value to - * operate only on a blob if it has a sequence number less than the - * specified. - * - * @return the ifSequenceNumberLessThan value. - */ - public Long getIfSequenceNumberLessThan() { - return this.ifSequenceNumberLessThan; - } - - /** - * Set the ifSequenceNumberLessThan property: Specify this header value to - * operate only on a blob if it has a sequence number less than the - * specified. - * - * @param ifSequenceNumberLessThan the ifSequenceNumberLessThan value to - * set. - * @return the SequenceNumberAccessConditions object itself. - */ - public SequenceNumberAccessConditions setIfSequenceNumberLessThan(Long ifSequenceNumberLessThan) { - this.ifSequenceNumberLessThan = ifSequenceNumberLessThan; - return this; - } - - /** - * Get the ifSequenceNumberEqualTo property: Specify this header value to - * operate only on a blob if it has the specified sequence number. - * - * @return the ifSequenceNumberEqualTo value. - */ - public Long getIfSequenceNumberEqualTo() { - return this.ifSequenceNumberEqualTo; - } - - /** - * Set the ifSequenceNumberEqualTo property: Specify this header value to - * operate only on a blob if it has the specified sequence number. - * - * @param ifSequenceNumberEqualTo the ifSequenceNumberEqualTo value to set. - * @return the SequenceNumberAccessConditions object itself. - */ - public SequenceNumberAccessConditions setIfSequenceNumberEqualTo(Long ifSequenceNumberEqualTo) { - this.ifSequenceNumberEqualTo = ifSequenceNumberEqualTo; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java deleted file mode 100644 index 1e28f1940ba2..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.storage.blob.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.implementation.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.time.OffsetDateTime; - -/** - * Additional parameters for a set of operations. - */ -@JacksonXmlRootElement(localName = "source-modified-access-conditions") -@Fluent -public final class SourceModifiedAccessConditions { - /* - * Specify this header value to operate only on a blob if it has been - * modified since the specified date/time. - */ - @JsonProperty(value = "sourceIfModifiedSince") - private DateTimeRfc1123 sourceIfModifiedSince; - - /* - * Specify this header value to operate only on a blob if it has not been - * modified since the specified date/time. - */ - @JsonProperty(value = "sourceIfUnmodifiedSince") - private DateTimeRfc1123 sourceIfUnmodifiedSince; - - /* - * Specify an ETag value to operate only on blobs with a matching value. - */ - @JsonProperty(value = "sourceIfMatch") - private String sourceIfMatch; - - /* - * Specify an ETag value to operate only on blobs without a matching value. - */ - @JsonProperty(value = "sourceIfNoneMatch") - private String sourceIfNoneMatch; - - /** - * Get the sourceIfModifiedSince property: Specify this header value to - * operate only on a blob if it has been modified since the specified - * date/time. - * - * @return the sourceIfModifiedSince value. - */ - public OffsetDateTime getSourceIfModifiedSince() { - if (this.sourceIfModifiedSince == null) { - return null; - } - return this.sourceIfModifiedSince.getDateTime(); - } - - /** - * Set the sourceIfModifiedSince property: Specify this header value to - * operate only on a blob if it has been modified since the specified - * date/time. - * - * @param sourceIfModifiedSince the sourceIfModifiedSince value to set. - * @return the SourceModifiedAccessConditions object itself. - */ - public SourceModifiedAccessConditions setSourceIfModifiedSince(OffsetDateTime sourceIfModifiedSince) { - if (sourceIfModifiedSince == null) { - this.sourceIfModifiedSince = null; - } else { - this.sourceIfModifiedSince = new DateTimeRfc1123(sourceIfModifiedSince); - } - return this; - } - - /** - * Get the sourceIfUnmodifiedSince property: Specify this header value to - * operate only on a blob if it has not been modified since the specified - * date/time. - * - * @return the sourceIfUnmodifiedSince value. - */ - public OffsetDateTime getSourceIfUnmodifiedSince() { - if (this.sourceIfUnmodifiedSince == null) { - return null; - } - return this.sourceIfUnmodifiedSince.getDateTime(); - } - - /** - * Set the sourceIfUnmodifiedSince property: Specify this header value to - * operate only on a blob if it has not been modified since the specified - * date/time. - * - * @param sourceIfUnmodifiedSince the sourceIfUnmodifiedSince value to set. - * @return the SourceModifiedAccessConditions object itself. - */ - public SourceModifiedAccessConditions setSourceIfUnmodifiedSince(OffsetDateTime sourceIfUnmodifiedSince) { - if (sourceIfUnmodifiedSince == null) { - this.sourceIfUnmodifiedSince = null; - } else { - this.sourceIfUnmodifiedSince = new DateTimeRfc1123(sourceIfUnmodifiedSince); - } - return this; - } - - /** - * Get the sourceIfMatch property: Specify an ETag value to operate only on - * blobs with a matching value. - * - * @return the sourceIfMatch value. - */ - public String getSourceIfMatch() { - return this.sourceIfMatch; - } - - /** - * Set the sourceIfMatch property: Specify an ETag value to operate only on - * blobs with a matching value. - * - * @param sourceIfMatch the sourceIfMatch value to set. - * @return the SourceModifiedAccessConditions object itself. - */ - public SourceModifiedAccessConditions setSourceIfMatch(String sourceIfMatch) { - this.sourceIfMatch = sourceIfMatch; - return this; - } - - /** - * Get the sourceIfNoneMatch property: Specify an ETag value to operate - * only on blobs without a matching value. - * - * @return the sourceIfNoneMatch value. - */ - public String getSourceIfNoneMatch() { - return this.sourceIfNoneMatch; - } - - /** - * Set the sourceIfNoneMatch property: Specify an ETag value to operate - * only on blobs without a matching value. - * - * @param sourceIfNoneMatch the sourceIfNoneMatch value to set. - * @return the SourceModifiedAccessConditions object itself. - */ - public SourceModifiedAccessConditions setSourceIfNoneMatch(String sourceIfNoneMatch) { - this.sourceIfNoneMatch = sourceIfNoneMatch; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java index 176d0235244f..8218d2463911 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java @@ -5,6 +5,7 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.RequestConditions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.util.FluxUtil; @@ -17,13 +18,12 @@ import com.azure.storage.blob.implementation.models.AppendBlobAppendBlockFromUrlHeaders; import com.azure.storage.blob.implementation.models.AppendBlobAppendBlockHeaders; import com.azure.storage.blob.implementation.models.AppendBlobCreateHeaders; -import com.azure.storage.blob.models.AppendBlobAccessConditions; +import com.azure.storage.blob.models.AppendBlobRequestConditions; import com.azure.storage.blob.models.AppendBlobItem; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.CpkInfo; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.common.implementation.Constants; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -110,16 +110,16 @@ public Mono create() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.AppendBlobAsyncClient.createWithResponse#BlobHttpHeaders-Map-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobAsyncClient.createWithResponse#BlobHttpHeaders-Map-BlobRequestConditions} * * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A {@link Mono} containing {@link Response} whose {@link Response#getValue() value} contains the created * appended blob. */ public Mono> createWithResponse(BlobHttpHeaders headers, Map metadata, - BlobAccessConditions accessConditions) { + BlobRequestConditions accessConditions) { try { return withContext(context -> createWithResponse(headers, metadata, accessConditions, context)); } catch (RuntimeException ex) { @@ -128,12 +128,13 @@ public Mono> createWithResponse(BlobHttpHeaders headers } Mono> createWithResponse(BlobHttpHeaders headers, Map metadata, - BlobAccessConditions accessConditions, Context context) { - accessConditions = (accessConditions == null) ? new BlobAccessConditions() : accessConditions; + BlobRequestConditions accessConditions, Context context) { + accessConditions = (accessConditions == null) ? new BlobRequestConditions() : accessConditions; - return this.azureBlobStorage.appendBlobs().createWithRestResponseAsync(null, - null, 0, null, metadata, null, headers, accessConditions.getLeaseAccessConditions(), - getCustomerProvidedKey(), accessConditions.getModifiedAccessConditions(), context) + return this.azureBlobStorage.appendBlobs().createWithRestResponseAsync(null, null, 0, null, metadata, + accessConditions.getLeaseId(), accessConditions.getIfModifiedSince(), + accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), + null, headers, getCustomerProvidedKey(), context) .map(rb -> { AppendBlobCreateHeaders hd = rb.getDeserializedHeaders(); AppendBlobItem item = new AppendBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), @@ -180,29 +181,30 @@ public Mono appendBlock(Flux data, long length) { * (the default). In other words, the Flux must produce the same data each time it is subscribed to. * @param length The exact length of the data. It is important that this value match precisely the length of the * data emitted by the {@code Flux}. - * @param appendBlobAccessConditions {@link AppendBlobAccessConditions} + * @param appendBlobRequestConditions {@link AppendBlobRequestConditions} * @return A {@link Mono} containing {@link Response} whose {@link Response#getValue() value} contains the append * blob operation. */ public Mono> appendBlockWithResponse(Flux data, long length, - AppendBlobAccessConditions appendBlobAccessConditions) { + AppendBlobRequestConditions appendBlobRequestConditions) { try { - return withContext(context -> appendBlockWithResponse(data, length, appendBlobAccessConditions, context)); + return withContext(context -> appendBlockWithResponse(data, length, appendBlobRequestConditions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } Mono> appendBlockWithResponse(Flux data, long length, - AppendBlobAccessConditions appendBlobAccessConditions, Context context) { - appendBlobAccessConditions = appendBlobAccessConditions == null ? new AppendBlobAccessConditions() - : appendBlobAccessConditions; + AppendBlobRequestConditions appendBlobRequestConditions, Context context) { + appendBlobRequestConditions = appendBlobRequestConditions == null ? new AppendBlobRequestConditions() + : appendBlobRequestConditions; return this.azureBlobStorage.appendBlobs().appendBlockWithRestResponseAsync( - null, null, data, length, null, null, null, null, - appendBlobAccessConditions.getLeaseAccessConditions(), - appendBlobAccessConditions.getAppendPositionAccessConditions(), getCustomerProvidedKey(), - appendBlobAccessConditions.getModifiedAccessConditions(), context) + null, null, data, length, null, null, null, appendBlobRequestConditions.getLeaseId(), + appendBlobRequestConditions.getMaxSize(), appendBlobRequestConditions.getAppendPosition(), + appendBlobRequestConditions.getIfModifiedSince(), appendBlobRequestConditions.getIfUnmodifiedSince(), + appendBlobRequestConditions.getIfMatch(), appendBlobRequestConditions.getIfNoneMatch(), null, + getCustomerProvidedKey(), context) .map(rb -> { AppendBlobAppendBlockHeaders hd = rb.getDeserializedHeaders(); AppendBlobItem item = new AppendBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), @@ -239,7 +241,7 @@ public Mono appendBlockFromUrl(String sourceUrl, BlobRange sourc * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobRequestConditions-BlobRequestConditions} * * @param sourceUrl The url to the blob that will be the source of the copy. A source blob in the same storage * account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob @@ -248,14 +250,14 @@ public Mono appendBlockFromUrl(String sourceUrl, BlobRange sourc * @param sourceRange {@link BlobRange} * @param sourceContentMD5 An MD5 hash of the block content from the source blob. If specified, the service will * calculate the MD5 of the received data and fail the request if it does not match the provided MD5. - * @param destAccessConditions {@link AppendBlobAccessConditions} - * @param sourceAccessConditions {@link SourceModifiedAccessConditions} + * @param destAccessConditions {@link AppendBlobRequestConditions} + * @param sourceAccessConditions {@link BlobRequestConditions} * @return A {@link Mono} containing {@link Response} whose {@link Response#getValue() value} contains the append * blob operation. */ public Mono> appendBlockFromUrlWithResponse(String sourceUrl, BlobRange sourceRange, - byte[] sourceContentMD5, AppendBlobAccessConditions destAccessConditions, - SourceModifiedAccessConditions sourceAccessConditions) { + byte[] sourceContentMD5, AppendBlobRequestConditions destAccessConditions, + BlobRequestConditions sourceAccessConditions) { try { return withContext(context -> appendBlockFromUrlWithResponse(sourceUrl, sourceRange, sourceContentMD5, destAccessConditions, sourceAccessConditions, context)); @@ -265,11 +267,13 @@ public Mono> appendBlockFromUrlWithResponse(String sour } Mono> appendBlockFromUrlWithResponse(String sourceUrl, BlobRange sourceRange, - byte[] sourceContentMD5, AppendBlobAccessConditions destAccessConditions, - SourceModifiedAccessConditions sourceAccessConditions, Context context) { - sourceRange = sourceRange == null ? new BlobRange(0) : sourceRange; - destAccessConditions = destAccessConditions == null - ? new AppendBlobAccessConditions() : destAccessConditions; + byte[] sourceContentMD5, AppendBlobRequestConditions destAccessConditions, + RequestConditions sourceAccessConditions, Context context) { + sourceRange = (sourceRange == null) ? new BlobRange(0) : sourceRange; + destAccessConditions = (destAccessConditions == null) + ? new AppendBlobRequestConditions() : destAccessConditions; + sourceAccessConditions = (sourceAccessConditions == null) + ? new RequestConditions() : sourceAccessConditions; URL url; try { @@ -279,10 +283,13 @@ Mono> appendBlockFromUrlWithResponse(String sourceUrl, } return this.azureBlobStorage.appendBlobs().appendBlockFromUrlWithRestResponseAsync(null, null, url, 0, - sourceRange.toString(), sourceContentMD5, null, null, null, null, getCustomerProvidedKey(), - destAccessConditions.getLeaseAccessConditions(), - destAccessConditions.getAppendPositionAccessConditions(), - destAccessConditions.getModifiedAccessConditions(), sourceAccessConditions, context) + sourceRange.toString(), sourceContentMD5, null, null, null, destAccessConditions.getLeaseId(), + destAccessConditions.getMaxSize(), destAccessConditions.getAppendPosition(), + destAccessConditions.getIfModifiedSince(), destAccessConditions.getIfUnmodifiedSince(), + destAccessConditions.getIfMatch(), destAccessConditions.getIfNoneMatch(), + sourceAccessConditions.getIfModifiedSince(), sourceAccessConditions.getIfUnmodifiedSince(), + sourceAccessConditions.getIfMatch(), sourceAccessConditions.getIfNoneMatch(), null, + getCustomerProvidedKey(), context) .map(rb -> { AppendBlobAppendBlockFromUrlHeaders hd = rb.getDeserializedHeaders(); AppendBlobItem item = new AppendBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 41024d158c4f..50c28122fde8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -11,13 +11,12 @@ import com.azure.storage.blob.BlobClientBuilder; import com.azure.storage.blob.BlobContainerClient; import com.azure.storage.blob.BlobServiceClient; -import com.azure.storage.blob.models.AppendBlobAccessConditions; import com.azure.storage.blob.models.AppendBlobItem; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.AppendBlobRequestConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobStorageException; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Flux; @@ -82,12 +81,12 @@ public BlobOutputStream getBlobOutputStream() { * Creates and opens an output stream to write data to the append blob. If the blob already exists on the service, * it will be overwritten. * - * @param accessConditions A {@link BlobAccessConditions} object that represents the access conditions for the + * @param accessConditions A {@link BlobRequestConditions} object that represents the access conditions for the * blob. * @return A {@link BlobOutputStream} object used to write data to the blob. * @throws BlobStorageException If a storage service error occurred. */ - public BlobOutputStream getBlobOutputStream(AppendBlobAccessConditions accessConditions) { + public BlobOutputStream getBlobOutputStream(AppendBlobRequestConditions accessConditions) { return BlobOutputStream.appendBlobOutputStream(appendBlobAsyncClient, accessConditions); } @@ -109,17 +108,17 @@ public AppendBlobItem create() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.AppendBlobClient.createWithResponse#BlobHttpHeaders-Map-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobClient.createWithResponse#BlobHttpHeaders-Map-BlobRequestConditions-Duration-Context} * * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A {@link Response} whose {@link Response#getValue() value} contains the created appended blob. */ public Response createWithResponse(BlobHttpHeaders headers, Map metadata, - BlobAccessConditions accessConditions, Duration timeout, Context context) { + BlobRequestConditions accessConditions, Duration timeout, Context context) { return StorageImplUtils.blockWithOptionalTimeout(appendBlobAsyncClient. createWithResponse(headers, metadata, accessConditions, context), timeout); } @@ -157,7 +156,7 @@ public AppendBlobItem appendBlock(InputStream data, long length) { * (the default). In other words, the Flux must produce the same data each time it is subscribed to. * @param length The exact length of the data. It is important that this value match precisely the length of the * data emitted by the {@code Flux}. - * @param appendBlobAccessConditions {@link AppendBlobAccessConditions} + * @param appendBlobRequestConditions {@link AppendBlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A {@link Response} whose {@link Response#getValue() value} contains the append blob operation. @@ -165,11 +164,11 @@ public AppendBlobItem appendBlock(InputStream data, long length) { * @throws NullPointerException if the input data is null. */ public Response appendBlockWithResponse(InputStream data, long length, - AppendBlobAccessConditions appendBlobAccessConditions, Duration timeout, Context context) { + AppendBlobRequestConditions appendBlobRequestConditions, Duration timeout, Context context) { Objects.requireNonNull(data, "'data' cannot be null."); Flux fbb = Utility.convertStreamToByteBuffer(data, length, MAX_APPEND_BLOCK_BYTES); Mono> response = appendBlobAsyncClient.appendBlockWithResponse( - fbb.subscribeOn(Schedulers.elastic()), length, appendBlobAccessConditions, context); + fbb.subscribeOn(Schedulers.elastic()), length, appendBlobRequestConditions, context); return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } @@ -196,7 +195,7 @@ public AppendBlobItem appendBlockFromUrl(String sourceUrl, BlobRange sourceRange * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.AppendBlobClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobRequestConditions-BlobRequestConditions-Duration-Context} * * @param sourceUrl The url to the blob that will be the source of the copy. A source blob in the same storage * account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob @@ -205,15 +204,15 @@ public AppendBlobItem appendBlockFromUrl(String sourceUrl, BlobRange sourceRange * @param sourceRange {@link BlobRange} * @param sourceContentMD5 An MD5 hash of the block content from the source blob. If specified, the service will * calculate the MD5 of the received data and fail the request if it does not match the provided MD5. - * @param destAccessConditions {@link AppendBlobAccessConditions} - * @param sourceAccessConditions {@link SourceModifiedAccessConditions} + * @param destAccessConditions {@link AppendBlobRequestConditions} + * @param sourceAccessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The information of the append blob operation. */ public Response appendBlockFromUrlWithResponse(String sourceUrl, BlobRange sourceRange, - byte[] sourceContentMD5, AppendBlobAccessConditions destAccessConditions, - SourceModifiedAccessConditions sourceAccessConditions, Duration timeout, Context context) { + byte[] sourceContentMD5, AppendBlobRequestConditions destAccessConditions, + BlobRequestConditions sourceAccessConditions, Duration timeout, Context context) { Mono> response = appendBlobAsyncClient.appendBlockFromUrlWithResponse(sourceUrl, sourceRange, sourceContentMD5, destAccessConditions, sourceAccessConditions, context); return StorageImplUtils.blockWithOptionalTimeout(response, timeout); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index 4ce195ce19bd..67e379d05987 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -5,6 +5,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; +import com.azure.core.http.RequestConditions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.util.FluxUtil; @@ -23,20 +24,17 @@ import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.implementation.models.BlobStartCopyFromURLHeaders; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobCopyInfo; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.ReliableDownloadOptions; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; @@ -296,11 +294,11 @@ public Poller beginCopy(String sourceUrl, Duration pollInter *

    Starting a copy operation

    * Starting a copy operation and polling on the responses. * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-RequestConditions-BlobRequestConditions-Duration} * *

    Cancelling a copy operation

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopyFromUrlCancel#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopyFromUrlCancel#String-Map-AccessTier-RehydratePriority-RequestConditions-BlobRequestConditions-Duration} * *

    For more information, see the * Azure Docs

    @@ -309,34 +307,34 @@ public Poller beginCopy(String sourceUrl, Duration pollInter * @param metadata Metadata to associate with the destination blob. * @param tier {@link AccessTier} for the destination blob. * @param priority {@link RehydratePriority} for rehydrating the blob. - * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP + * @param sourceModifiedAccessConditions {@link RequestConditions} against the source. Standard HTTP * Access conditions related to the modification of data. ETag and LastModifiedTime are used to construct * conditions related to when the blob was changed relative to the given request. The request will fail if the * specified condition is not satisfied. - * @param destAccessConditions {@link BlobAccessConditions} against the destination. + * @param destAccessConditions {@link BlobRequestConditions} against the destination. * @param pollInterval Duration between each poll for the copy status. If none is specified, a default of one second * is used. * @return A {@link Poller} that polls the blob copy operation until it has completed, has failed, or has been * cancelled. */ public Poller beginCopy(String sourceUrl, Map metadata, AccessTier tier, - RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, - BlobAccessConditions destAccessConditions, Duration pollInterval) { + RehydratePriority priority, RequestConditions sourceModifiedAccessConditions, + BlobRequestConditions destAccessConditions, Duration pollInterval) { final Duration interval = pollInterval != null ? pollInterval : Duration.ofSeconds(1); - final ModifiedAccessConditions sourceModifiedCondition = sourceModifiedAccessConditions == null - ? new ModifiedAccessConditions() + final RequestConditions sourceModifiedCondition = sourceModifiedAccessConditions == null + ? new RequestConditions() : sourceModifiedAccessConditions; - final BlobAccessConditions destinationAccessConditions = destAccessConditions == null - ? new BlobAccessConditions() + final BlobRequestConditions destinationAccessConditions = destAccessConditions == null + ? new BlobRequestConditions() : destAccessConditions; // We want to hide the SourceAccessConditions type from the user for consistency's sake, so we convert here. - final SourceModifiedAccessConditions sourceConditions = new SourceModifiedAccessConditions() - .setSourceIfModifiedSince(sourceModifiedCondition.getIfModifiedSince()) - .setSourceIfUnmodifiedSince(sourceModifiedCondition.getIfUnmodifiedSince()) - .setSourceIfMatch(sourceModifiedCondition.getIfMatch()) - .setSourceIfNoneMatch(sourceModifiedCondition.getIfNoneMatch()); + final RequestConditions sourceConditions = new RequestConditions() + .setIfModifiedSince(sourceModifiedCondition.getIfModifiedSince()) + .setIfUnmodifiedSince(sourceModifiedCondition.getIfUnmodifiedSince()) + .setIfMatch(sourceModifiedCondition.getIfMatch()) + .setIfNoneMatch(sourceModifiedCondition.getIfNoneMatch()); return new Poller<>(interval, response -> { @@ -375,8 +373,8 @@ public Poller beginCopy(String sourceUrl, Map onStart(String sourceUrl, Map metadata, AccessTier tier, - RehydratePriority priority, SourceModifiedAccessConditions sourceModifiedAccessConditions, - BlobAccessConditions destinationAccessConditions) { + RehydratePriority priority, RequestConditions sourceModifiedAccessConditions, + BlobRequestConditions destinationAccessConditions) { URL url; try { url = new URL(sourceUrl); @@ -386,9 +384,11 @@ private Mono onStart(String sourceUrl, Map metadat return withContext( context -> azureBlobStorage.blobs().startCopyFromURLWithRestResponseAsync(null, null, url, null, metadata, - tier, priority, null, sourceModifiedAccessConditions, - destinationAccessConditions.getModifiedAccessConditions(), - destinationAccessConditions.getLeaseAccessConditions(), context)) + tier, priority, sourceModifiedAccessConditions.getIfModifiedSince(), + sourceModifiedAccessConditions.getIfUnmodifiedSince(), sourceModifiedAccessConditions.getIfMatch(), + sourceModifiedAccessConditions.getIfNoneMatch(), destinationAccessConditions.getIfModifiedSince(), + destinationAccessConditions.getIfUnmodifiedSince(), destinationAccessConditions.getIfMatch(), + destinationAccessConditions.getIfNoneMatch(), destinationAccessConditions.getLeaseId(), null, context)) .map(response -> { final BlobStartCopyFromURLHeaders headers = response.getDeserializedHeaders(); @@ -451,8 +451,7 @@ private Mono> onPoll(PollResponse pollR * * @see #copyFromURL(String) * @see #beginCopy(String, Duration) - * @see #beginCopy(String, Map, AccessTier, RehydratePriority, ModifiedAccessConditions, - * BlobAccessConditions, Duration) + * @see #beginCopy(String, Map, AccessTier, RehydratePriority, RequestConditions, BlobRequestConditions, Duration) * @param copyId The id of the copy operation to abort. * @return A reactive response signalling completion. */ @@ -469,33 +468,29 @@ public Mono abortCopyFromURL(String copyId) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURLWithResponse#String-LeaseAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURLWithResponse#String-String} * *

    For more information, see the * Azure Docs

    * * @see #copyFromURL(String) * @see #beginCopy(String, Duration) - * @see #beginCopy(String, Map, AccessTier, RehydratePriority, ModifiedAccessConditions, - * BlobAccessConditions, Duration) + * @see #beginCopy(String, Map, AccessTier, RehydratePriority, RequestConditions, BlobRequestConditions, Duration) * @param copyId The id of the copy operation to abort. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. + * @param leaseId The lease ID the active lease on the blob must match. * @return A reactive response signalling completion. */ - public Mono> abortCopyFromURLWithResponse(String copyId, - LeaseAccessConditions leaseAccessConditions) { + public Mono> abortCopyFromURLWithResponse(String copyId, String leaseId) { try { - return withContext(context -> abortCopyFromURLWithResponse(copyId, leaseAccessConditions, context)); + return withContext(context -> abortCopyFromURLWithResponse(copyId, leaseId, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> abortCopyFromURLWithResponse(String copyId, LeaseAccessConditions leaseAccessConditions, - Context context) { + Mono> abortCopyFromURLWithResponse(String copyId, String leaseId, Context context) { return this.azureBlobStorage.blobs().abortCopyFromURLWithRestResponseAsync( - null, null, copyId, null, null, leaseAccessConditions, context) + null, null, copyId, null, leaseId, null, context) .map(response -> new SimpleResponse<>(response, null)); } @@ -525,7 +520,7 @@ public Mono copyFromURL(String copySource) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURLWithResponse#String-Map-AccessTier-ModifiedAccessConditions-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURLWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions} * *

    For more information, see the * Azure Docs

    @@ -533,16 +528,15 @@ public Mono copyFromURL(String copySource) { * @param copySource The source URL to copy from. URLs outside of Azure may only be copied to block blobs. * @param metadata Metadata to associate with the destination blob. * @param tier {@link AccessTier} for the destination blob. - * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access + * @param sourceModifiedAccessConditions {@link RequestConditions} against the source. Standard HTTP Access * conditions related to the modification of data. ETag and LastModifiedTime are used to construct conditions * related to when the blob was changed relative to the given request. The request will fail if the specified * condition is not satisfied. - * @param destAccessConditions {@link BlobAccessConditions} against the destination. + * @param destAccessConditions {@link BlobRequestConditions} against the destination. * @return A reactive response containing the copy ID for the long running operation. */ public Mono> copyFromURLWithResponse(String copySource, Map metadata, - AccessTier tier, ModifiedAccessConditions sourceModifiedAccessConditions, - BlobAccessConditions destAccessConditions) { + AccessTier tier, RequestConditions sourceModifiedAccessConditions, BlobRequestConditions destAccessConditions) { try { return withContext(context -> copyFromURLWithResponse(copySource, metadata, tier, sourceModifiedAccessConditions, destAccessConditions, context)); @@ -552,18 +546,10 @@ public Mono> copyFromURLWithResponse(String copySource, Map> copyFromURLWithResponse(String copySource, Map metadata, AccessTier tier, - ModifiedAccessConditions sourceModifiedAccessConditions, BlobAccessConditions destAccessConditions, - Context context) { + RequestConditions sourceModifiedAccessConditions, BlobRequestConditions destAccessConditions, Context context) { sourceModifiedAccessConditions = sourceModifiedAccessConditions == null - ? new ModifiedAccessConditions() : sourceModifiedAccessConditions; - destAccessConditions = destAccessConditions == null ? new BlobAccessConditions() : destAccessConditions; - - // We want to hide the SourceAccessConditions type from the user for consistency's sake, so we convert here. - SourceModifiedAccessConditions sourceConditions = new SourceModifiedAccessConditions() - .setSourceIfModifiedSince(sourceModifiedAccessConditions.getIfModifiedSince()) - .setSourceIfUnmodifiedSince(sourceModifiedAccessConditions.getIfUnmodifiedSince()) - .setSourceIfMatch(sourceModifiedAccessConditions.getIfMatch()) - .setSourceIfNoneMatch(sourceModifiedAccessConditions.getIfNoneMatch()); + ? new RequestConditions() : sourceModifiedAccessConditions; + destAccessConditions = destAccessConditions == null ? new BlobRequestConditions() : destAccessConditions; URL url; try { @@ -573,9 +559,12 @@ Mono> copyFromURLWithResponse(String copySource, Map new SimpleResponse<>(rb, rb.getDeserializedHeaders().getCopyId())); + null, null, url, null, metadata, tier, sourceModifiedAccessConditions.getIfModifiedSince(), + sourceModifiedAccessConditions.getIfUnmodifiedSince(), sourceModifiedAccessConditions.getIfMatch(), + sourceModifiedAccessConditions.getIfNoneMatch(), destAccessConditions.getIfModifiedSince(), + destAccessConditions.getIfUnmodifiedSince(), destAccessConditions.getIfMatch(), + destAccessConditions.getIfNoneMatch(), destAccessConditions.getLeaseId(), null, context) + .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getCopyId())); } /** @@ -613,12 +602,12 @@ public Flux download() { * * @param range {@link BlobRange} * @param options {@link ReliableDownloadOptions} - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. * @return A reactive response containing the blob data. */ public Mono>> downloadWithResponse(BlobRange range, ReliableDownloadOptions options, - BlobAccessConditions accessConditions, boolean rangeGetContentMD5) { + BlobRequestConditions accessConditions, boolean rangeGetContentMD5) { try { return withContext(context -> downloadWithResponse(range, options, accessConditions, rangeGetContentMD5, context)); @@ -628,7 +617,7 @@ public Mono>> downloadWithResponse(BlobRange range, Re } Mono>> downloadWithResponse(BlobRange range, ReliableDownloadOptions options, - BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Context context) { + BlobRequestConditions accessConditions, boolean rangeGetContentMD5, Context context) { return download(range, accessConditions, rangeGetContentMD5, context) .map(response -> new SimpleResponse<>( response.getRawResponse(), @@ -643,31 +632,31 @@ Mono>> downloadWithResponse(BlobRange range, ReliableD * will be automatically retried. This behavior may be configured with {@link ReliableDownloadOptions}. * * @param range {@link BlobRange} - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. * @return Emits the successful response. */ - Mono download(BlobRange range, BlobAccessConditions accessConditions, + Mono download(BlobRange range, BlobRequestConditions accessConditions, boolean rangeGetContentMD5) { return withContext(context -> download(range, accessConditions, rangeGetContentMD5, context)); } - Mono download(BlobRange range, BlobAccessConditions accessConditions, + Mono download(BlobRange range, BlobRequestConditions accessConditions, boolean rangeGetContentMD5, Context context) { range = range == null ? new BlobRange(0) : range; Boolean getMD5 = rangeGetContentMD5 ? rangeGetContentMD5 : null; - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; HttpGetterInfo info = new HttpGetterInfo() .setOffset(range.getOffset()) .setCount(range.getCount()) - .setETag(accessConditions.getModifiedAccessConditions().getIfMatch()); + .setETag(accessConditions.getIfMatch()); // TODO: range is BlobRange but expected as String // TODO: figure out correct response - return this.azureBlobStorage.blobs().downloadWithRestResponseAsync( - null, null, snapshot, null, range.toHeaderValue(), getMD5, null, null, - accessConditions.getLeaseAccessConditions(), customerProvidedKey, - accessConditions.getModifiedAccessConditions(), context) + return this.azureBlobStorage.blobs().downloadWithRestResponseAsync(null, null, snapshot, null, + range.toHeaderValue(), accessConditions.getLeaseId(), getMD5, null, accessConditions.getIfModifiedSince(), + accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), + null, customerProvidedKey, context) // Convert the autorest response to a DownloadAsyncResponse, which enable reliable download. .map(response -> { // If there wasn't an etag originally specified, lock on the one returned. @@ -676,8 +665,7 @@ Mono download(BlobRange range, BlobAccessConditions acces // In the event of a stream failure, make a new request to pick up where we left off. newInfo -> this.download(new BlobRange(newInfo.getOffset(), newInfo.getCount()), - new BlobAccessConditions().setModifiedAccessConditions( - new ModifiedAccessConditions().setIfMatch(info.getETag())), false, context)); + new BlobRequestConditions().setIfMatch(info.getETag()), false, context)); }); } @@ -724,7 +712,7 @@ public Mono downloadToFile(String filePath) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobRequestConditions-boolean} * *

    For more information, see the * Azure Docs

    @@ -734,7 +722,7 @@ public Mono downloadToFile(String filePath) { * @param parallelTransferOptions {@link ParallelTransferOptions} to use to download to file. Number of parallel * transfers parameter is ignored. * @param options {@link ReliableDownloadOptions} - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. * @return An empty response * @throws IllegalArgumentException If {@code blockSize} is less than 0 or greater than 100MB. @@ -742,7 +730,7 @@ public Mono downloadToFile(String filePath) { */ public Mono> downloadToFileWithResponse(String filePath, BlobRange range, ParallelTransferOptions parallelTransferOptions, ReliableDownloadOptions options, - BlobAccessConditions accessConditions, boolean rangeGetContentMD5) { + BlobRequestConditions accessConditions, boolean rangeGetContentMD5) { try { return withContext(context -> downloadToFileWithResponse(filePath, range, parallelTransferOptions, options, accessConditions, rangeGetContentMD5, context)); @@ -754,7 +742,7 @@ public Mono> downloadToFileWithResponse(String filePath // TODO (gapra) : Investigate if this is can be parallelized, and include the parallelTransfers parameter. Mono> downloadToFileWithResponse(String filePath, BlobRange range, ParallelTransferOptions parallelTransferOptions, ReliableDownloadOptions options, - BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Context context) { + BlobRequestConditions accessConditions, boolean rangeGetContentMD5, Context context) { final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null ? new ParallelTransferOptions() : parallelTransferOptions; @@ -774,7 +762,7 @@ Mono> downloadToFileWithResponse(String filePath, BlobR private Mono> processInRange(AsynchronousFileChannel channel, Response blobPropertiesResponse, BlobRange range, Integer blockSize, - ReliableDownloadOptions options, BlobAccessConditions accessConditions, boolean rangeGetContentMD5, + ReliableDownloadOptions options, BlobRequestConditions accessConditions, boolean rangeGetContentMD5, Context context, AtomicLong totalProgress, Lock progressLock, ProgressReceiver progressReceiver) { return Mono.justOrEmpty(range).switchIfEmpty(Mono.just(new BlobRange(0, blobPropertiesResponse.getValue().getBlobSize()))).flatMapMany(rg -> @@ -849,7 +837,7 @@ public Mono delete() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobRequestConditions} * *

    For more information, see the * Azure Docs

    @@ -857,11 +845,11 @@ public Mono delete() { * @param deleteBlobSnapshotOptions Specifies the behavior for deleting the snapshots on this blob. {@code Include} * will delete the base blob and all snapshots. {@code Only} will delete only the snapshots. If a snapshot is being * deleted, you must pass null. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response signalling completion. */ public Mono> deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, - BlobAccessConditions accessConditions) { + BlobRequestConditions accessConditions) { try { return withContext(context -> deleteWithResponse(deleteBlobSnapshotOptions, accessConditions, context)); } catch (RuntimeException ex) { @@ -870,13 +858,14 @@ public Mono> deleteWithResponse(DeleteSnapshotsOptionType deleteB } Mono> deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, - BlobAccessConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + BlobRequestConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; - return this.azureBlobStorage.blobs().deleteWithRestResponseAsync( - null, null, snapshot, null, deleteBlobSnapshotOptions, - null, accessConditions.getLeaseAccessConditions(), accessConditions.getModifiedAccessConditions(), - context).map(response -> new SimpleResponse<>(response, null)); + return this.azureBlobStorage.blobs().deleteWithRestResponseAsync(null, null, snapshot, null, + accessConditions.getLeaseId(), deleteBlobSnapshotOptions, accessConditions.getIfModifiedSince(), + accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), + null, context) + .map(response -> new SimpleResponse<>(response, null)); } /** @@ -904,15 +893,15 @@ public Mono getProperties() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.getPropertiesWithResponse#BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.getPropertiesWithResponse#BlobRequestConditions} * *

    For more information, see the * Azure Docs

    * - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response containing the blob properties and metadata. */ - public Mono> getPropertiesWithResponse(BlobAccessConditions accessConditions) { + public Mono> getPropertiesWithResponse(BlobRequestConditions accessConditions) { try { return withContext(context -> getPropertiesWithResponse(accessConditions, context)); } catch (RuntimeException ex) { @@ -920,12 +909,13 @@ public Mono> getPropertiesWithResponse(BlobAccessCondit } } - Mono> getPropertiesWithResponse(BlobAccessConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + Mono> getPropertiesWithResponse(BlobRequestConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; return this.azureBlobStorage.blobs().getPropertiesWithRestResponseAsync( - null, null, snapshot, null, null, accessConditions.getLeaseAccessConditions(), customerProvidedKey, - accessConditions.getModifiedAccessConditions(), context) + null, null, snapshot, null, accessConditions.getLeaseId(), accessConditions.getIfModifiedSince(), + accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), + null, customerProvidedKey, context) .map(rb -> new SimpleResponse<>(rb, new BlobProperties(rb.getDeserializedHeaders()))); } @@ -957,17 +947,17 @@ public Mono setHttpHeaders(BlobHttpHeaders headers) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobRequestConditions} * *

    For more information, see the * Azure Docs

    * * @param headers {@link BlobHttpHeaders} - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response signalling completion. */ public Mono> setHttpHeadersWithResponse(BlobHttpHeaders headers, - BlobAccessConditions accessConditions) { + BlobRequestConditions accessConditions) { try { return withContext(context -> setHttpHeadersWithResponse(headers, accessConditions, context)); } catch (RuntimeException ex) { @@ -975,13 +965,14 @@ public Mono> setHttpHeadersWithResponse(BlobHttpHeaders headers, } } - Mono> setHttpHeadersWithResponse(BlobHttpHeaders headers, BlobAccessConditions accessConditions, + Mono> setHttpHeadersWithResponse(BlobHttpHeaders headers, BlobRequestConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; return this.azureBlobStorage.blobs().setHTTPHeadersWithRestResponseAsync( - null, null, null, null, headers, - accessConditions.getLeaseAccessConditions(), accessConditions.getModifiedAccessConditions(), context) + null, null, null, accessConditions.getLeaseId(), accessConditions.getIfModifiedSince(), + accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), + null, headers, context) .map(response -> new SimpleResponse<>(response, null)); } @@ -1013,17 +1004,17 @@ public Mono setMetadata(Map metadata) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setMetadataWithResponse#Map-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setMetadataWithResponse#Map-BlobRequestConditions} * *

    For more information, see the * Azure Docs

    * * @param metadata Metadata to associate with the blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response signalling completion. */ public Mono> setMetadataWithResponse(Map metadata, - BlobAccessConditions accessConditions) { + BlobRequestConditions accessConditions) { try { return withContext(context -> setMetadataWithResponse(metadata, accessConditions, context)); } catch (RuntimeException ex) { @@ -1031,13 +1022,14 @@ public Mono> setMetadataWithResponse(Map metadata } } - Mono> setMetadataWithResponse(Map metadata, BlobAccessConditions accessConditions, + Mono> setMetadataWithResponse(Map metadata, BlobRequestConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; return this.azureBlobStorage.blobs().setMetadataWithRestResponseAsync( - null, null, null, metadata, null, accessConditions.getLeaseAccessConditions(), customerProvidedKey, - accessConditions.getModifiedAccessConditions(), context) + null, null, null, metadata, accessConditions.getLeaseId(), accessConditions.getIfModifiedSince(), + accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), + null, customerProvidedKey, context) .map(response -> new SimpleResponse<>(response, null)); } @@ -1067,18 +1059,18 @@ public Mono createSnapshot() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.createSnapshotWithResponse#Map-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.createSnapshotWithResponse#Map-BlobRequestConditions} * *

    For more information, see the * Azure Docs

    * * @param metadata Metadata to associate with the blob snapshot. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A response containing a {@link BlobAsyncClientBase} which is used to interact with the created snapshot, * use {@link #getSnapshotId()} to get the identifier for the snapshot. */ public Mono> createSnapshotWithResponse(Map metadata, - BlobAccessConditions accessConditions) { + BlobRequestConditions accessConditions) { try { return withContext(context -> createSnapshotWithResponse(metadata, accessConditions, context)); } catch (RuntimeException ex) { @@ -1087,12 +1079,13 @@ public Mono> createSnapshotWithResponse(Map> createSnapshotWithResponse(Map metadata, - BlobAccessConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + BlobRequestConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; return this.azureBlobStorage.blobs().createSnapshotWithRestResponseAsync( - null, null, null, metadata, null, customerProvidedKey, accessConditions.getModifiedAccessConditions(), - accessConditions.getLeaseAccessConditions(), context) + null, null, null, metadata, accessConditions.getIfModifiedSince(), accessConditions.getIfUnmodifiedSince(), + accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), accessConditions.getLeaseId(), null, + customerProvidedKey, context) .map(rb -> new SimpleResponse<>(rb, this.getSnapshotClient(rb.getDeserializedHeaders().getSnapshot()))); } @@ -1129,33 +1122,31 @@ public Mono setAccessTier(AccessTier tier) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-String} * *

    For more information, see the * Azure Docs

    * * @param tier The new tier for the blob. * @param priority Optional priority to set for re-hydrating blobs. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. + * @param leaseId The lease ID the active lease on the blob must match. * @return A reactive response signalling completion. * @throws NullPointerException if {@code tier} is null. */ - public Mono> setAccessTierWithResponse(AccessTier tier, RehydratePriority priority, - LeaseAccessConditions leaseAccessConditions) { + public Mono> setAccessTierWithResponse(AccessTier tier, RehydratePriority priority, String leaseId) { try { - return withContext(context -> setTierWithResponse(tier, priority, leaseAccessConditions, context)); + return withContext(context -> setTierWithResponse(tier, priority, leaseId, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> setTierWithResponse(AccessTier tier, RehydratePriority priority, - LeaseAccessConditions leaseAccessConditions, Context context) { + Mono> setTierWithResponse(AccessTier tier, RehydratePriority priority, String leaseId, + Context context) { StorageImplUtils.assertNotNull("tier", tier); return this.azureBlobStorage.blobs().setTierWithRestResponseAsync( - null, null, tier, null, priority, null, leaseAccessConditions, context) + null, null, tier, null, priority, null, leaseId, context) .map(response -> new SimpleResponse<>(response, null)); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index aa92c9455531..1b9ec4574939 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.specialized; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.RequestConditions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.util.FluxUtil; @@ -14,15 +15,13 @@ import com.azure.storage.blob.BlobProperties; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobCopyInfo; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.ReliableDownloadOptions; @@ -39,6 +38,8 @@ import java.time.Duration; import java.util.Map; +import static com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout; + /** * This class provides a client that contains all operations that apply to any blob type. * @@ -175,12 +176,12 @@ public final BlobInputStream openInputStream() { *

    * * @param range {@link BlobRange} - * @param accessConditions An {@link BlobAccessConditions} object that represents the access conditions for the + * @param accessConditions An {@link BlobRequestConditions} object that represents the access conditions for the * blob. * @return An InputStream object that represents the stream to use for reading from the blob. * @throws BlobStorageException If a storage service error occurred. */ - public final BlobInputStream openInputStream(BlobRange range, BlobAccessConditions accessConditions) { + public final BlobInputStream openInputStream(BlobRange range, BlobRequestConditions accessConditions) { return new BlobInputStream(client, range.getOffset(), range.getCount(), accessConditions); } @@ -211,7 +212,7 @@ public Boolean exists() { public Response existsWithResponse(Duration timeout, Context context) { Mono> response = client.existsWithResponse(context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } /** @@ -239,7 +240,7 @@ public Poller beginCopy(String sourceUrl, Duration pollInter * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-RequestConditions-BlobRequestConditions-Duration} * *

    For more information, see the * Azure Docs

    @@ -248,19 +249,19 @@ public Poller beginCopy(String sourceUrl, Duration pollInter * @param metadata Metadata to associate with the destination blob. * @param tier {@link AccessTier} for the destination blob. * @param priority {@link RehydratePriority} for rehydrating the blob. - * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access + * @param sourceModifiedAccessConditions {@link RequestConditions} against the source. Standard HTTP Access * conditions related to the modification of data. ETag and LastModifiedTime are used to construct conditions * related to when the blob was changed relative to the given request. The request will fail if the specified * condition is not satisfied. - * @param destAccessConditions {@link BlobAccessConditions} against the destination. + * @param destAccessConditions {@link BlobRequestConditions} against the destination. * @param pollInterval Duration between each poll for the copy status. If none is specified, a default of one second * is used. * @return A {@link Poller} that polls the blob copy operation until it has completed, has failed, or has been * cancelled. */ public Poller beginCopy(String sourceUrl, Map metadata, AccessTier tier, - RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, - BlobAccessConditions destAccessConditions, Duration pollInterval) { + RehydratePriority priority, RequestConditions sourceModifiedAccessConditions, + BlobRequestConditions destAccessConditions, Duration pollInterval) { return client.beginCopy(sourceUrl, metadata, tier, priority, sourceModifiedAccessConditions, destAccessConditions, pollInterval); @@ -287,24 +288,20 @@ public void abortCopyFromURL(String copyId) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURLWithResponse#String-LeaseAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURLWithResponse#String-String-Duration-Context} * *

    For more information, see the * Azure Docs

    * * @param copyId The id of the copy operation to abort. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. + * @param leaseId The lease ID the active lease on the blob must match. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers. */ - public Response abortCopyFromURLWithResponse(String copyId, LeaseAccessConditions leaseAccessConditions, - Duration timeout, Context context) { - Mono> response = client.abortCopyFromURLWithResponse(copyId, leaseAccessConditions, - context); - - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + public Response abortCopyFromURLWithResponse(String copyId, String leaseId, Duration timeout, + Context context) { + return blockWithOptionalTimeout(client.abortCopyFromURLWithResponse(copyId, leaseId, context), timeout); } /** @@ -330,7 +327,7 @@ public String copyFromURL(String copySource) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.copyFromURLWithResponse#String-Map-AccessTier-ModifiedAccessConditions-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.copyFromURLWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context} * *

    For more information, see the * Azure Docs

    @@ -338,24 +335,24 @@ public String copyFromURL(String copySource) { * @param copySource The source URL to copy from. URLs outside of Azure may only be copied to block blobs. * @param metadata Metadata to associate with the destination blob. * @param tier {@link AccessTier} for the destination blob. - * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access + * @param sourceModifiedAccessConditions {@link RequestConditions} against the source. Standard HTTP Access * conditions related to the modification of data. ETag and LastModifiedTime are used to construct conditions * related to when the blob was changed relative to the given request. The request will fail if the specified * condition is not satisfied. - * @param destAccessConditions {@link BlobAccessConditions} against the destination. + * @param destAccessConditions {@link BlobRequestConditions} against the destination. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The copy ID for the long running operation. * @throws IllegalArgumentException If {@code copySource} is a malformed {@link URL}. */ public Response copyFromURLWithResponse(String copySource, Map metadata, AccessTier tier, - ModifiedAccessConditions sourceModifiedAccessConditions, BlobAccessConditions destAccessConditions, + RequestConditions sourceModifiedAccessConditions, BlobRequestConditions destAccessConditions, Duration timeout, Context context) { Mono> response = client .copyFromURLWithResponse(copySource, metadata, tier, sourceModifiedAccessConditions, destAccessConditions, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } /** @@ -391,7 +388,7 @@ public void download(OutputStream stream) { * @param stream A non-null {@link OutputStream} instance where the downloaded data will be written. * @param range {@link BlobRange} * @param options {@link ReliableDownloadOptions} - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. @@ -400,7 +397,7 @@ public void download(OutputStream stream) { * @throws NullPointerException if {@code stream} is null */ public Response downloadWithResponse(OutputStream stream, BlobRange range, ReliableDownloadOptions options, - BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Duration timeout, Context context) { + BlobRequestConditions accessConditions, boolean rangeGetContentMD5, Duration timeout, Context context) { StorageImplUtils.assertNotNull("stream", stream); Mono> download = client .downloadWithResponse(range, options, accessConditions, rangeGetContentMD5, context) @@ -413,7 +410,7 @@ public Response downloadWithResponse(OutputStream stream, BlobRange range, } }).thenReturn(new SimpleResponse<>(response, null))); - return StorageImplUtils.blockWithOptionalTimeout(download, timeout); + return blockWithOptionalTimeout(download, timeout); } /** @@ -455,7 +452,7 @@ public BlobProperties downloadToFile(String filePath) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobRequestConditions-boolean-Duration-Context} * *

    For more information, see the * Azure Docs

    @@ -465,7 +462,7 @@ public BlobProperties downloadToFile(String filePath) { * @param parallelTransferOptions {@link ParallelTransferOptions} to use to download to file. Number of parallel * transfers parameter is ignored. * @param options {@link ReliableDownloadOptions} - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. @@ -474,10 +471,10 @@ public BlobProperties downloadToFile(String filePath) { */ public Response downloadToFileWithResponse(String filePath, BlobRange range, ParallelTransferOptions parallelTransferOptions, ReliableDownloadOptions options, - BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Duration timeout, Context context) { + BlobRequestConditions accessConditions, boolean rangeGetContentMD5, Duration timeout, Context context) { Mono> download = client.downloadToFileWithResponse(filePath, range, parallelTransferOptions, options, accessConditions, rangeGetContentMD5, context); - return StorageImplUtils.blockWithOptionalTimeout(download, timeout); + return blockWithOptionalTimeout(download, timeout); } /** @@ -499,7 +496,7 @@ public void delete() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobRequestConditions-Duration-Context} * *

    For more information, see the * Azure Docs

    @@ -507,17 +504,17 @@ public void delete() { * @param deleteBlobSnapshotOptions Specifies the behavior for deleting the snapshots on this blob. {@code Include} * will delete the base blob and all snapshots. {@code Only} will delete only the snapshots. If a snapshot is being * deleted, you must pass null. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers. */ public Response deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, - BlobAccessConditions accessConditions, Duration timeout, Context context) { + BlobRequestConditions accessConditions, Duration timeout, Context context) { Mono> response = client .deleteWithResponse(deleteBlobSnapshotOptions, accessConditions, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } /** @@ -541,21 +538,21 @@ public BlobProperties getProperties() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.getPropertiesWithResponse#BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.getPropertiesWithResponse#BlobRequestConditions-Duration-Context} * *

    For more information, see the * Azure Docs

    * - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The blob properties and metadata. */ - public Response getPropertiesWithResponse(BlobAccessConditions accessConditions, Duration timeout, + public Response getPropertiesWithResponse(BlobRequestConditions accessConditions, Duration timeout, Context context) { Mono> response = client.getPropertiesWithResponse(accessConditions, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } /** @@ -581,23 +578,23 @@ public void setHttpHeaders(BlobHttpHeaders headers) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobRequestConditions-Duration-Context} * *

    For more information, see the * Azure Docs

    * * @param headers {@link BlobHttpHeaders} - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers. */ - public Response setHttpHeadersWithResponse(BlobHttpHeaders headers, BlobAccessConditions accessConditions, + public Response setHttpHeadersWithResponse(BlobHttpHeaders headers, BlobRequestConditions accessConditions, Duration timeout, Context context) { Mono> response = client .setHttpHeadersWithResponse(headers, accessConditions, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } /** @@ -623,22 +620,22 @@ public void setMetadata(Map metadata) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setMetadataWithResponse#Map-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setMetadataWithResponse#Map-BlobRequestConditions-Duration-Context} * *

    For more information, see the * Azure Docs

    * * @param metadata Metadata to associate with the blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers. */ - public Response setMetadataWithResponse(Map metadata, BlobAccessConditions accessConditions, + public Response setMetadataWithResponse(Map metadata, BlobRequestConditions accessConditions, Duration timeout, Context context) { Mono> response = client.setMetadataWithResponse(metadata, accessConditions, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } /** @@ -664,25 +661,25 @@ public BlobClientBase createSnapshot() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.createSnapshotWithResponse#Map-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.createSnapshotWithResponse#Map-BlobRequestConditions-Duration-Context} * *

    For more information, see the * Azure Docs

    * * @param metadata Metadata to associate with the blob snapshot. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing a {@link BlobClient} which is used to interact with the created snapshot, use * {@link BlobClient#getSnapshotId()} to get the identifier for the snapshot. */ public Response createSnapshotWithResponse(Map metadata, - BlobAccessConditions accessConditions, Duration timeout, Context context) { + BlobRequestConditions accessConditions, Duration timeout, Context context) { Mono> response = client .createSnapshotWithResponse(metadata, accessConditions, context) .map(rb -> new SimpleResponse<>(rb, new BlobClientBase(rb.getValue()))); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } /** @@ -712,25 +709,21 @@ public void setAccessTier(AccessTier tier) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-String-Duration-Context} * *

    For more information, see the * Azure Docs

    * * @param tier The new tier for the blob. * @param priority Optional priority to set for re-hydrating blobs. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. + * @param leaseId The lease ID the active lease on the blob must match. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers. */ - public Response setAccessTierWithResponse(AccessTier tier, RehydratePriority priority, - LeaseAccessConditions leaseAccessConditions, Duration timeout, Context context) { - Mono> response = client.setTierWithResponse(tier, priority, leaseAccessConditions, - context); - - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + public Response setAccessTierWithResponse(AccessTier tier, RehydratePriority priority, String leaseId, + Duration timeout, Context context) { + return blockWithOptionalTimeout(client.setTierWithResponse(tier, priority, leaseId, context), timeout); } /** @@ -764,7 +757,7 @@ public void undelete() { public Response undeleteWithResponse(Duration timeout, Context context) { Mono> response = client.undeleteWithResponse(context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } /** @@ -800,6 +793,6 @@ public StorageAccountInfo getAccountInfo() { public Response getAccountInfoWithResponse(Duration timeout, Context context) { Mono> response = client.getAccountInfoWithResponse(context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobInputStream.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobInputStream.java index 5bcf4f3e3c09..fa738cf66a40 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobInputStream.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobInputStream.java @@ -3,10 +3,9 @@ package com.azure.storage.blob.specialized; import com.azure.core.implementation.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobAsyncClient; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.common.StorageInputStream; import com.azure.storage.common.implementation.Constants; @@ -18,27 +17,25 @@ * Provides an input stream to read a given blob resource. */ public final class BlobInputStream extends StorageInputStream { - private final ClientLogger logger = new ClientLogger(BlobInputStream.class); - /** * Holds the reference to the blob this stream is associated with. */ private final BlobAsyncClientBase blobClient; /** - * Holds the {@link BlobAccessConditions} object that represents the access conditions for the blob. + * Holds the {@link BlobRequestConditions} object that represents the access conditions for the blob. */ - private final BlobAccessConditions accessCondition; + private final BlobRequestConditions accessCondition; /** * Initializes a new instance of the BlobInputStream class. * * @param blobClient A {@link BlobAsyncClient} object which represents the blob that this stream is associated with. - * @param accessCondition An {@link BlobAccessConditions} object which represents the access conditions for the + * @param accessCondition An {@link BlobRequestConditions} object which represents the access conditions for the * blob. * @throws BlobStorageException An exception representing any error which occurred during the operation. */ - BlobInputStream(final BlobAsyncClient blobClient, final BlobAccessConditions accessCondition) + BlobInputStream(final BlobAsyncClient blobClient, final BlobRequestConditions accessCondition) throws BlobStorageException { this(blobClient, 0, null, accessCondition); } @@ -51,12 +48,12 @@ public final class BlobInputStream extends StorageInputStream { * with. * @param blobRangeOffset The offset of blob data to begin stream. * @param blobRangeLength How much data the stream should return after blobRangeOffset. - * @param accessCondition An {@link BlobAccessConditions} object which represents the access conditions for the + * @param accessCondition An {@link BlobRequestConditions} object which represents the access conditions for the * blob. * @throws BlobStorageException An exception representing any error which occurred during the operation. */ BlobInputStream(final BlobAsyncClientBase blobClient, long blobRangeOffset, Long blobRangeLength, - final BlobAccessConditions accessCondition) + final BlobRequestConditions accessCondition) throws BlobStorageException { super(blobRangeOffset, blobRangeLength, 4 * Constants.MB, blobClient.getProperties().block().getBlobSize()); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobOutputStream.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobOutputStream.java index 97983655d46b..513289053720 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobOutputStream.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobOutputStream.java @@ -3,12 +3,10 @@ package com.azure.storage.blob.specialized; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.blob.models.AppendBlobAccessConditions; -import com.azure.storage.blob.models.AppendPositionAccessConditions; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.AppendBlobRequestConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobStorageException; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.PageBlobAccessConditions; +import com.azure.storage.blob.models.PageBlobRequestConditions; import com.azure.storage.blob.models.PageRange; import com.azure.storage.common.StorageOutputStream; import com.azure.storage.common.implementation.Constants; @@ -31,17 +29,17 @@ public abstract class BlobOutputStream extends StorageOutputStream { } static BlobOutputStream appendBlobOutputStream(final AppendBlobAsyncClient client, - final AppendBlobAccessConditions appendBlobAccessConditions) { - return new AppendBlobOutputStream(client, appendBlobAccessConditions); + final AppendBlobRequestConditions appendBlobRequestConditions) { + return new AppendBlobOutputStream(client, appendBlobRequestConditions); } static BlobOutputStream blockBlobOutputStream(final BlockBlobAsyncClient client, - final BlobAccessConditions accessConditions) { + final BlobRequestConditions accessConditions) { return new BlockBlobOutputStream(client, accessConditions); } static BlobOutputStream pageBlobOutputStream(final PageBlobAsyncClient client, final PageRange pageRange, - final BlobAccessConditions accessConditions) { + final BlobRequestConditions accessConditions) { return new PageBlobOutputStream(client, pageRange, accessConditions); } @@ -79,37 +77,25 @@ private static final class AppendBlobOutputStream extends BlobOutputStream { private static final String INVALID_BLOCK_SIZE = "Block data should not exceed BlockBlobURL.MAX_STAGE_BLOCK_BYTES"; - private final AppendBlobAccessConditions appendBlobAccessConditions; - private final AppendPositionAccessConditions appendPositionAccessConditions; - private final long initialBlobOffset; + private final AppendBlobRequestConditions appendBlobRequestConditions; private final AppendBlobAsyncClient client; private AppendBlobOutputStream(final AppendBlobAsyncClient client, - final AppendBlobAccessConditions appendBlobAccessConditions) { + final AppendBlobRequestConditions appendBlobRequestConditions) { super(AppendBlobClient.MAX_APPEND_BLOCK_BYTES); this.client = client; - this.appendBlobAccessConditions = appendBlobAccessConditions; - - if (appendBlobAccessConditions != null) { - this.appendPositionAccessConditions = appendBlobAccessConditions.getAppendPositionAccessConditions(); - - if (appendBlobAccessConditions.getAppendPositionAccessConditions().getAppendPosition() != null) { - this.initialBlobOffset = appendBlobAccessConditions - .getAppendPositionAccessConditions() - .getAppendPosition(); - } else { - this.initialBlobOffset = client.getProperties().block().getBlobSize(); - } - } else { - this.initialBlobOffset = client.getProperties().block().getBlobSize(); - this.appendPositionAccessConditions = new AppendPositionAccessConditions(); + this.appendBlobRequestConditions = (appendBlobRequestConditions == null) + ? new AppendBlobRequestConditions() : appendBlobRequestConditions; + + if (this.appendBlobRequestConditions.getAppendPosition() == null) { + this.appendBlobRequestConditions.setAppendPosition(client.getProperties().block().getBlobSize()); } } - private Mono appendBlock(Flux blockData, long offset, long writeLength) { - this.appendPositionAccessConditions.setAppendPosition(offset); - - return client.appendBlockWithResponse(blockData, writeLength, appendBlobAccessConditions) + private Mono appendBlock(Flux blockData, long writeLength) { + long newAppendOffset = appendBlobRequestConditions.getAppendPosition() + writeLength; + return client.appendBlockWithResponse(blockData, writeLength, appendBlobRequestConditions) + .doOnNext(ignored -> appendBlobRequestConditions.setAppendPosition(newAppendOffset)) .then() .onErrorResume(t -> t instanceof IOException || t instanceof BlobStorageException, e -> { this.lastError = new IOException(e); @@ -126,17 +112,16 @@ protected Mono dispatchWrite(byte[] data, int writeLength, long offset) { // We cannot differentiate between max size condition failing only in the retry versus failing in the // first attempt and retry even for a single writer scenario. So we will eliminate the latter and handle // the former in the append block method. - if (this.appendPositionAccessConditions != null - && this.appendPositionAccessConditions.getMaxSize() != null - && this.initialBlobOffset > this.appendPositionAccessConditions.getMaxSize()) { + if (appendBlobRequestConditions.getMaxSize() != null + && appendBlobRequestConditions.getAppendPosition() > appendBlobRequestConditions.getMaxSize()) { this.lastError = new IOException(INVALID_BLOCK_SIZE); return Mono.error(this.lastError); } - Flux fbb = Flux.range(0, 1) - .concatMap(pos -> Mono.fromCallable(() -> ByteBuffer.wrap(data, (int) offset, writeLength))); + Flux fbb = Flux.range(0, 1).concatMap(pos -> Mono.fromCallable(() -> + ByteBuffer.wrap(data, (int) offset, writeLength))); - return this.appendBlock(fbb.subscribeOn(Schedulers.elastic()), this.initialBlobOffset, writeLength); + return this.appendBlock(fbb.subscribeOn(Schedulers.elastic()), writeLength); } @Override @@ -146,15 +131,15 @@ void commit() { } private static final class BlockBlobOutputStream extends BlobOutputStream { - private final BlobAccessConditions accessConditions; + private final BlobRequestConditions accessConditions; private final String blockIdPrefix; private final List blockList; private final BlockBlobAsyncClient client; - private BlockBlobOutputStream(final BlockBlobAsyncClient client, final BlobAccessConditions accessConditions) { + private BlockBlobOutputStream(final BlockBlobAsyncClient client, final BlobRequestConditions accessConditions) { super(BlockBlobClient.MAX_STAGE_BLOCK_BYTES); this.client = client; - this.accessConditions = accessConditions; + this.accessConditions = (accessConditions == null) ? new BlobRequestConditions() : accessConditions; this.blockIdPrefix = UUID.randomUUID().toString() + '-'; this.blockList = new ArrayList<>(); } @@ -171,10 +156,7 @@ private String getCurrentBlockId() { } private Mono writeBlock(Flux blockData, String blockId, long writeLength) { - LeaseAccessConditions leaseAccessConditions = (accessConditions == null) - ? null : accessConditions.getLeaseAccessConditions(); - - return client.stageBlockWithResponse(blockId, blockData, writeLength, leaseAccessConditions) + return client.stageBlockWithResponse(blockId, blockData, writeLength, this.accessConditions.getLeaseId()) .then() .onErrorResume(BlobStorageException.class, e -> { this.lastError = new IOException(e); @@ -212,27 +194,30 @@ private static final class PageBlobOutputStream extends BlobOutputStream { private final ClientLogger logger = new ClientLogger(PageBlobOutputStream.class); private final PageBlobAsyncClient client; - private final PageBlobAccessConditions pageBlobAccessConditions; + private final PageBlobRequestConditions pageBlobRequestConditions; private final PageRange pageRange; private PageBlobOutputStream(final PageBlobAsyncClient client, final PageRange pageRange, - final BlobAccessConditions blobAccessConditions) { + final BlobRequestConditions blobRequestConditions) { super(PageBlobClient.MAX_PUT_PAGES_BYTES); this.client = client; this.pageRange = pageRange; - if (blobAccessConditions != null) { - this.pageBlobAccessConditions = new PageBlobAccessConditions() - .setModifiedAccessConditions(blobAccessConditions.getModifiedAccessConditions()) - .setLeaseAccessConditions(blobAccessConditions.getLeaseAccessConditions()); + if (blobRequestConditions != null) { + this.pageBlobRequestConditions = new PageBlobRequestConditions() + .setLeaseId(blobRequestConditions.getLeaseId()) + .setIfMatch(blobRequestConditions.getIfMatch()) + .setIfNoneMatch(blobRequestConditions.getIfNoneMatch()) + .setIfModifiedSince(blobRequestConditions.getIfModifiedSince()) + .setIfUnmodifiedSince(blobRequestConditions.getIfUnmodifiedSince()); } else { - this.pageBlobAccessConditions = null; + this.pageBlobRequestConditions = null; } } private Mono writePages(Flux pageData, int length, long offset) { return client.uploadPagesWithResponse(new PageRange().setStart(offset).setEnd(offset + length - 1), - pageData, pageBlobAccessConditions) + pageData, pageBlobRequestConditions) .then() .onErrorResume(BlobStorageException.class, e -> { this.lastError = new IOException(e); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java index 23de1d1e4bbb..b5bf45e5a772 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java @@ -15,16 +15,14 @@ import com.azure.storage.blob.implementation.models.BlockBlobCommitBlockListHeaders; import com.azure.storage.blob.implementation.models.BlockBlobUploadHeaders; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlockBlobItem; import com.azure.storage.blob.models.BlockList; import com.azure.storage.blob.models.BlockListType; import com.azure.storage.blob.models.BlockLookupList; import com.azure.storage.blob.models.CpkInfo; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.common.implementation.Constants; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -142,11 +140,11 @@ public Mono upload(Flux data, long length) { * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response containing the information of the uploaded block blob. */ public Mono> uploadWithResponse(Flux data, long length, BlobHttpHeaders headers, - Map metadata, AccessTier tier, BlobAccessConditions accessConditions) { + Map metadata, AccessTier tier, BlobRequestConditions accessConditions) { try { return withContext(context -> uploadWithResponse(data, length, headers, metadata, tier, accessConditions, context)); @@ -156,12 +154,13 @@ public Mono> uploadWithResponse(Flux data, l } Mono> uploadWithResponse(Flux data, long length, BlobHttpHeaders headers, - Map metadata, AccessTier tier, BlobAccessConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + Map metadata, AccessTier tier, BlobRequestConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; - return this.azureBlobStorage.blockBlobs().uploadWithRestResponseAsync(null, - null, data, length, null, metadata, tier, null, headers, accessConditions.getLeaseAccessConditions(), - getCustomerProvidedKey(), accessConditions.getModifiedAccessConditions(), context) + return this.azureBlobStorage.blockBlobs().uploadWithRestResponseAsync(null, null, data, length, null, metadata, + accessConditions.getLeaseId(), tier, accessConditions.getIfModifiedSince(), + accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), + null, headers, getCustomerProvidedKey(), context) .map(rb -> { BlockBlobUploadHeaders hd = rb.getDeserializedHeaders(); BlockBlobItem item = new BlockBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), @@ -208,7 +207,7 @@ public Mono stageBlock(String base64BlockID, Flux data, long l * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockWithResponse#String-Flux-long-LeaseAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockWithResponse#String-Flux-long-String} * * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. @@ -216,25 +215,23 @@ public Mono stageBlock(String base64BlockID, Flux data, long l * (the default). In other words, the Flux must produce the same data each time it is subscribed to. * @param length The exact length of the data. It is important that this value match precisely the length of the * data emitted by the {@code Flux}. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. + * @param leaseId The lease ID the active lease on the blob must match. * @return A reactive response signalling completion. */ public Mono> stageBlockWithResponse(String base64BlockID, Flux data, long length, - LeaseAccessConditions leaseAccessConditions) { + String leaseId) { try { - return withContext(context -> stageBlockWithResponse(base64BlockID, data, length, leaseAccessConditions, - context)); + return withContext(context -> stageBlockWithResponse(base64BlockID, data, length, leaseId, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } Mono> stageBlockWithResponse(String base64BlockID, Flux data, long length, - LeaseAccessConditions leaseAccessConditions, Context context) { + String leaseId, Context context) { return this.azureBlobStorage.blockBlobs().stageBlockWithRestResponseAsync(null, null, - base64BlockID, length, data, null, null, null, null, leaseAccessConditions, getCustomerProvidedKey(), - context).map(response -> new SimpleResponse<>(response, null)); + base64BlockID, length, data, null, null, null, leaseId, null, getCustomerProvidedKey(), context) + .map(response -> new SimpleResponse<>(response, null)); } /** @@ -271,7 +268,7 @@ public Mono stageBlockFromURL(String base64BlockID, String sourceUrl, Blob * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions} * * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. @@ -282,26 +279,25 @@ public Mono stageBlockFromURL(String base64BlockID, String sourceUrl, Blob * @param sourceRange {@link BlobRange} * @param sourceContentMD5 An MD5 hash of the block content from the source blob. If specified, the service will * calculate the MD5 of the received data and fail the request if it does not match the provided MD5. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. - * @param sourceModifiedAccessConditions {@link SourceModifiedAccessConditions} + * @param leaseId The lease ID that the active lease on the blob must match. + * @param sourceRequestConditions {@link BlobRequestConditions} * @return A reactive response signalling completion. */ public Mono> stageBlockFromURLWithResponse(String base64BlockID, String sourceUrl, - BlobRange sourceRange, byte[] sourceContentMD5, LeaseAccessConditions leaseAccessConditions, - SourceModifiedAccessConditions sourceModifiedAccessConditions) { + BlobRange sourceRange, byte[] sourceContentMD5, String leaseId, BlobRequestConditions sourceRequestConditions) { try { return withContext(context -> stageBlockFromURLWithResponse(base64BlockID, sourceUrl, sourceRange, - sourceContentMD5, leaseAccessConditions, sourceModifiedAccessConditions)); + sourceContentMD5, leaseId, sourceRequestConditions)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> stageBlockFromURLWithResponse(String base64BlockID, String sourceUrl, - BlobRange sourceRange, byte[] sourceContentMD5, LeaseAccessConditions leaseAccessConditions, - SourceModifiedAccessConditions sourceModifiedAccessConditions, Context context) { - sourceRange = sourceRange == null ? new BlobRange(0) : sourceRange; + Mono> stageBlockFromURLWithResponse(String base64BlockID, String sourceUrl, BlobRange sourceRange, + byte[] sourceContentMD5, String leaseId, BlobRequestConditions sourceRequestConditions, Context context) { + sourceRange = (sourceRange == null) ? new BlobRange(0) : sourceRange; + sourceRequestConditions = (sourceRequestConditions == null) + ? new BlobRequestConditions() : sourceRequestConditions; URL url; try { @@ -310,9 +306,11 @@ Mono> stageBlockFromURLWithResponse(String base64BlockID, String throw logger.logExceptionAsError(new IllegalArgumentException("'sourceUrl' is not a valid url.")); } - return this.azureBlobStorage.blockBlobs().stageBlockFromURLWithRestResponseAsync(null, null, - base64BlockID, 0, url, sourceRange.toHeaderValue(), sourceContentMD5, null, null, - null, getCustomerProvidedKey(), leaseAccessConditions, sourceModifiedAccessConditions, context) + return this.azureBlobStorage.blockBlobs().stageBlockFromURLWithRestResponseAsync(null, null, base64BlockID, 0, + url, sourceRange.toHeaderValue(), sourceContentMD5, null, null, leaseId, + sourceRequestConditions.getIfModifiedSince(), sourceRequestConditions.getIfUnmodifiedSince(), + sourceRequestConditions.getIfMatch(), sourceRequestConditions.getIfNoneMatch(), null, + getCustomerProvidedKey(), context) .map(response -> new SimpleResponse<>(response, null)); } @@ -343,27 +341,24 @@ public Mono listBlocks(BlockListType listType) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocksWithResponse#BlockListType-String} * * @param listType Specifies which type of blocks to return. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. + * @param leaseId The lease ID the active lease on the blob must match. * @return A reactive response containing the list of blocks. */ - public Mono> listBlocksWithResponse(BlockListType listType, - LeaseAccessConditions leaseAccessConditions) { + public Mono> listBlocksWithResponse(BlockListType listType, String leaseId) { try { - return withContext(context -> listBlocksWithResponse(listType, leaseAccessConditions, context)); + return withContext(context -> listBlocksWithResponse(listType, leaseId, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> listBlocksWithResponse(BlockListType listType, - LeaseAccessConditions leaseAccessConditions, Context context) { + Mono> listBlocksWithResponse(BlockListType listType, String leaseId, Context context) { - return this.azureBlobStorage.blockBlobs().getBlockListWithRestResponseAsync(null, - null, listType, getSnapshotId(), null, null, leaseAccessConditions, context) + return this.azureBlobStorage.blockBlobs().getBlockListWithRestResponseAsync( + null, null, listType, getSnapshotId(), null, leaseId, null, context) .map(response -> new SimpleResponse<>(response, response.getValue())); } @@ -400,17 +395,18 @@ public Mono commitBlockList(List base64BlockIDs) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions} * * @param base64BlockIDs A list of base64 encode {@code String}s that specifies the block IDs to be committed. * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response containing the information of the block blob. */ public Mono> commitBlockListWithResponse(List base64BlockIDs, - BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions) { + BlobHttpHeaders headers, Map metadata, AccessTier tier, + BlobRequestConditions accessConditions) { try { return withContext(context -> commitBlockListWithResponse(base64BlockIDs, headers, metadata, tier, accessConditions, context)); @@ -420,14 +416,15 @@ public Mono> commitBlockListWithResponse(List ba } Mono> commitBlockListWithResponse(List base64BlockIDs, - BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions, + BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobRequestConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; - return this.azureBlobStorage.blockBlobs().commitBlockListWithRestResponseAsync( - null, null, new BlockLookupList().setLatest(base64BlockIDs), null, null, null, metadata, tier, null, - headers, accessConditions.getLeaseAccessConditions(), getCustomerProvidedKey(), - accessConditions.getModifiedAccessConditions(), context) + return this.azureBlobStorage.blockBlobs().commitBlockListWithRestResponseAsync(null, null, + new BlockLookupList().setLatest(base64BlockIDs), null, null, null, metadata, accessConditions.getLeaseId(), + tier, accessConditions.getIfModifiedSince(), accessConditions.getIfUnmodifiedSince(), + accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), null, headers, getCustomerProvidedKey(), + context) .map(rb -> { BlockBlobCommitBlockListHeaders hd = rb.getDeserializedHeaders(); BlockBlobItem item = new BlockBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java index dec7fc3bfd9b..0ec7f06dcde9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java @@ -11,22 +11,18 @@ import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.BlockBlobItem; import com.azure.storage.blob.models.BlockList; import com.azure.storage.blob.models.BlockListType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.common.Utility; -import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; -import java.io.IOException; import java.io.InputStream; import java.io.UncheckedIOException; import java.net.URL; @@ -36,6 +32,8 @@ import java.util.Map; import java.util.Objects; +import static com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout; + /** * Client to a block blob. It may only be instantiated through a {@link SpecializedBlobClientBuilder} or via the method * {@link BlobClient#getBlockBlobClient()}. This class does not hold any state about a particular blob, but is instead a @@ -49,7 +47,7 @@ public final class BlockBlobClient extends BlobClientBase { private final ClientLogger logger = new ClientLogger(BlockBlobClient.class); - private final BlockBlobAsyncClient blockBlobAsyncClient; + private final BlockBlobAsyncClient client; /** * Indicates the maximum number of bytes that can be sent in a call to upload. @@ -69,11 +67,11 @@ public final class BlockBlobClient extends BlobClientBase { /** * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. * - * @param blockBlobAsyncClient the async block blob client + * @param client the async block blob client */ - BlockBlobClient(BlockBlobAsyncClient blockBlobAsyncClient) { - super(blockBlobAsyncClient); - this.blockBlobAsyncClient = blockBlobAsyncClient; + BlockBlobClient(BlockBlobAsyncClient client) { + super(client); + this.client = client; } /** @@ -91,13 +89,13 @@ public BlobOutputStream getBlobOutputStream() { * Creates and opens an output stream to write data to the block blob. If the blob already exists on the service, it * will be overwritten. * - * @param accessConditions A {@link BlobAccessConditions} object that represents the access conditions for the + * @param accessConditions A {@link BlobRequestConditions} object that represents the access conditions for the * blob. * @return A {@link BlobOutputStream} object used to write data to the blob. * @throws BlobStorageException If a storage service error occurred. */ - public BlobOutputStream getBlobOutputStream(BlobAccessConditions accessConditions) { - return BlobOutputStream.blockBlobOutputStream(blockBlobAsyncClient, accessConditions); + public BlobOutputStream getBlobOutputStream(BlobRequestConditions accessConditions) { + return BlobOutputStream.blockBlobOutputStream(client, accessConditions); } /** @@ -115,9 +113,9 @@ public BlobOutputStream getBlobOutputStream(BlobAccessConditions accessCondition * @param length The exact length of the data. It is important that this value match precisely the length of the * data provided in the {@link InputStream}. * @return The information of the uploaded block blob. - * @throws IOException If an I/O error occurs + * @throws UncheckedIOException If an I/O error occurs */ - public BlockBlobItem upload(InputStream data, long length) throws IOException { + public BlockBlobItem upload(InputStream data, long length) { return uploadWithResponse(data, length, null, null, null, null, null, Context.NONE).getValue(); } @@ -130,7 +128,7 @@ public BlockBlobItem upload(InputStream data, long length) throws IOException { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration-Context} * * @param data The data to write to the blob. * @param length The exact length of the data. It is important that this value match precisely the length of the @@ -138,7 +136,7 @@ public BlockBlobItem upload(InputStream data, long length) throws IOException { * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The information of the uploaded block blob. @@ -147,17 +145,17 @@ public BlockBlobItem upload(InputStream data, long length) throws IOException { * @throws UncheckedIOException If an I/O error occurs */ public Response uploadWithResponse(InputStream data, long length, BlobHttpHeaders headers, - Map metadata, AccessTier tier, BlobAccessConditions accessConditions, Duration timeout, + Map metadata, AccessTier tier, BlobRequestConditions accessConditions, Duration timeout, Context context) { Objects.requireNonNull(data); Flux fbb = Utility.convertStreamToByteBuffer(data, length, BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE); - Mono> upload = blockBlobAsyncClient + Mono> upload = client .uploadWithResponse(fbb.subscribeOn(Schedulers.elastic()), length, headers, metadata, tier, accessConditions, context); try { - return StorageImplUtils.blockWithOptionalTimeout(upload, timeout); + return blockWithOptionalTimeout(upload, timeout); } catch (UncheckedIOException e) { throw logger.logExceptionAsError(e); } @@ -189,30 +187,29 @@ public void stageBlock(String base64BlockID, InputStream data, long length) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-LeaseAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-String-Duration-Context} * * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. * @param data The data to write to the block. * @param length The exact length of the data. It is important that this value match precisely the length of the * data provided in the {@link InputStream}. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. + * @param leaseId The lease ID the active lease on the blob must match. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers * @throws UnexpectedLengthException when the length of data does not match the input {@code length}. * @throws NullPointerException if the input data is null. */ - public Response stageBlockWithResponse(String base64BlockID, InputStream data, long length, - LeaseAccessConditions leaseAccessConditions, Duration timeout, Context context) { + public Response stageBlockWithResponse(String base64BlockID, InputStream data, long length, String leaseId, + Duration timeout, Context context) { Objects.requireNonNull(data); Flux fbb = Utility.convertStreamToByteBuffer(data, length, BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE); - Mono> response = blockBlobAsyncClient.stageBlockWithResponse(base64BlockID, - fbb.subscribeOn(Schedulers.elastic()), length, leaseAccessConditions, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + Mono> response = client.stageBlockWithResponse( + base64BlockID, fbb.subscribeOn(Schedulers.elastic()), length, leaseId, context); + return blockWithOptionalTimeout(response, timeout); } /** @@ -244,7 +241,7 @@ public void stageBlockFromURL(String base64BlockID, String sourceUrl, BlobRange * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions-Duration-Context} * * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. @@ -255,20 +252,19 @@ public void stageBlockFromURL(String base64BlockID, String sourceUrl, BlobRange * @param sourceRange {@link BlobRange} * @param sourceContentMD5 An MD5 hash of the block content from the source blob. If specified, the service will * calculate the MD5 of the received data and fail the request if it does not match the provided MD5. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. - * @param sourceModifiedAccessConditions {@link SourceModifiedAccessConditions} + * @param leaseId The lease ID that the active lease on the blob must match. + * @param sourceRequestConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers * @throws IllegalArgumentException If {@code sourceUrl} is a malformed {@link URL}. */ public Response stageBlockFromURLWithResponse(String base64BlockID, String sourceUrl, BlobRange sourceRange, - byte[] sourceContentMD5, LeaseAccessConditions leaseAccessConditions, - SourceModifiedAccessConditions sourceModifiedAccessConditions, Duration timeout, Context context) { - Mono> response = blockBlobAsyncClient.stageBlockFromURLWithResponse(base64BlockID, sourceUrl, - sourceRange, sourceContentMD5, leaseAccessConditions, sourceModifiedAccessConditions, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + byte[] sourceContentMD5, String leaseId, + BlobRequestConditions sourceRequestConditions, Duration timeout, Context context) { + Mono> response = client.stageBlockFromURLWithResponse(base64BlockID, sourceUrl, + sourceRange, sourceContentMD5, leaseId, sourceRequestConditions, context); + return blockWithOptionalTimeout(response, timeout); } /** @@ -294,21 +290,17 @@ public BlockList listBlocks(BlockListType listType) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.listBlocksWithResponse#BlockListType-String-Duration-Context} * * @param listType Specifies which type of blocks to return. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. + * @param leaseId The lease ID the active lease on the blob must match. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The list of blocks. */ - public Response listBlocksWithResponse(BlockListType listType, - LeaseAccessConditions leaseAccessConditions, Duration timeout, Context context) { - Mono> response = blockBlobAsyncClient.listBlocksWithResponse(listType, - leaseAccessConditions, context); - - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + public Response listBlocksWithResponse(BlockListType listType, String leaseId, Duration timeout, + Context context) { + return blockWithOptionalTimeout(client.listBlocksWithResponse(listType, leaseId, context), timeout); } /** @@ -340,23 +332,23 @@ public BlockBlobItem commitBlockList(List base64BlockIDs) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.uploadFromFile#List-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.uploadFromFile#List-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration-Context} * * @param base64BlockIDs A list of base64 encode {@code String}s that specifies the block IDs to be committed. * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The information of the block blob. */ public Response commitBlockListWithResponse(List base64BlockIDs, - BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions, + BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobRequestConditions accessConditions, Duration timeout, Context context) { - Mono> response = blockBlobAsyncClient.commitBlockListWithResponse( + Mono> response = client.commitBlockListWithResponse( base64BlockIDs, headers, metadata, tier, accessConditions, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return blockWithOptionalTimeout(response, timeout); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java index f6803c6bf9af..7953a307c24e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.RequestConditions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.util.FluxUtil; @@ -16,7 +17,6 @@ import com.azure.storage.blob.BlobContainerAsyncClient; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; -import com.azure.storage.blob.models.ModifiedAccessConditions; import reactor.core.publisher.Mono; import java.net.URL; @@ -85,8 +85,8 @@ public String getLeaseId() { } /** - * Acquires a lease for write and delete operations. The lease duration must be between 15 to 60 seconds or - * -1 for an infinite duration. + * Acquires a lease for write and delete operations. The lease duration must be between 15 to 60 seconds or -1 for + * an infinite duration. * *

    Code Samples

    * @@ -105,12 +105,12 @@ public Mono acquireLease(int duration) { } /** - * Acquires a lease for write and delete operations. The lease duration must be between 15 to 60 seconds, or - * -1 for an infinite duration. + * Acquires a lease for write and delete operations. The lease duration must be between 15 to 60 seconds, or -1 for + * an infinite duration. * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.acquireLeaseWithResponse#int-ModifiedAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.acquireLeaseWithResponse#int-RequestConditions} * * @param duration The duration of the lease between 15 to 60 seconds or -1 for an infinite duration. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and @@ -119,8 +119,7 @@ public Mono acquireLease(int duration) { * @return A reactive response containing the lease ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> acquireLeaseWithResponse(int duration, - ModifiedAccessConditions modifiedAccessConditions) { + public Mono> acquireLeaseWithResponse(int duration, RequestConditions modifiedAccessConditions) { try { return withContext(context -> acquireLeaseWithResponse(duration, modifiedAccessConditions, context)); } catch (RuntimeException ex) { @@ -128,15 +127,19 @@ public Mono> acquireLeaseWithResponse(int duration, } } - Mono> acquireLeaseWithResponse(int duration, ModifiedAccessConditions modifiedAccessConditions, + Mono> acquireLeaseWithResponse(int duration, RequestConditions modifiedAccessConditions, Context context) { + modifiedAccessConditions = (modifiedAccessConditions == null) + ? new RequestConditions() : modifiedAccessConditions; if (this.isBlob) { - return this.client.blobs().acquireLeaseWithRestResponseAsync( - null, null, null, duration, this.leaseId, null, modifiedAccessConditions, context) + return this.client.blobs().acquireLeaseWithRestResponseAsync(null, null, null, duration, this.leaseId, + modifiedAccessConditions.getIfModifiedSince(), modifiedAccessConditions.getIfUnmodifiedSince(), + modifiedAccessConditions.getIfMatch(), modifiedAccessConditions.getIfNoneMatch(), null, context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } else { - return this.client.containers().acquireLeaseWithRestResponseAsync( - null, null, duration, this.leaseId, null, modifiedAccessConditions, context) + return this.client.containers().acquireLeaseWithRestResponseAsync(null, null, duration, this.leaseId, + modifiedAccessConditions.getIfModifiedSince(), modifiedAccessConditions.getIfUnmodifiedSince(), + null, context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } } @@ -164,7 +167,7 @@ public Mono renewLease() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.renewLeaseWithResponse#ModifiedAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.renewLeaseWithResponse#RequestConditions} * * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the resource was changed relative to the given @@ -172,7 +175,7 @@ public Mono renewLease() { * @return A reactive response containing the renewed lease ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renewLeaseWithResponse(ModifiedAccessConditions modifiedAccessConditions) { + public Mono> renewLeaseWithResponse(RequestConditions modifiedAccessConditions) { try { return withContext(context -> renewLeaseWithResponse(modifiedAccessConditions, context)); } catch (RuntimeException ex) { @@ -180,14 +183,18 @@ public Mono> renewLeaseWithResponse(ModifiedAccessConditions mo } } - Mono> renewLeaseWithResponse(ModifiedAccessConditions modifiedAccessConditions, Context context) { + Mono> renewLeaseWithResponse(RequestConditions modifiedAccessConditions, Context context) { + modifiedAccessConditions = (modifiedAccessConditions == null) + ? new RequestConditions() : modifiedAccessConditions; if (this.isBlob) { - return this.client.blobs().renewLeaseWithRestResponseAsync( - null, null, this.leaseId, null, null, modifiedAccessConditions, context) + return this.client.blobs().renewLeaseWithRestResponseAsync(null, null, this.leaseId, null, + modifiedAccessConditions.getIfModifiedSince(), modifiedAccessConditions.getIfUnmodifiedSince(), + modifiedAccessConditions.getIfMatch(), modifiedAccessConditions.getIfNoneMatch(), null, context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } else { - return this.client.containers().renewLeaseWithRestResponseAsync( - null, this.leaseId, null, null, modifiedAccessConditions, context) + return this.client.containers().renewLeaseWithRestResponseAsync(null, this.leaseId, null, + modifiedAccessConditions.getIfModifiedSince(), modifiedAccessConditions.getIfUnmodifiedSince(), + null, context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } } @@ -215,7 +222,7 @@ public Mono releaseLease() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.releaseLeaseWithResponse#ModifiedAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.releaseLeaseWithResponse#RequestConditions} * * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the resource was changed relative to the given @@ -223,7 +230,7 @@ public Mono releaseLease() { * @return A reactive response signalling completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> releaseLeaseWithResponse(ModifiedAccessConditions modifiedAccessConditions) { + public Mono> releaseLeaseWithResponse(RequestConditions modifiedAccessConditions) { try { return withContext(context -> releaseLeaseWithResponse(modifiedAccessConditions, context)); } catch (RuntimeException ex) { @@ -231,14 +238,18 @@ public Mono> releaseLeaseWithResponse(ModifiedAccessConditions mo } } - Mono> releaseLeaseWithResponse(ModifiedAccessConditions modifiedAccessConditions, Context context) { + Mono> releaseLeaseWithResponse(RequestConditions modifiedAccessConditions, Context context) { + modifiedAccessConditions = (modifiedAccessConditions == null) + ? new RequestConditions() : modifiedAccessConditions; if (this.isBlob) { - return this.client.blobs().releaseLeaseWithRestResponseAsync( - null, null, this.leaseId, null, null, modifiedAccessConditions, context) + return this.client.blobs().releaseLeaseWithRestResponseAsync(null, null, this.leaseId, null, + modifiedAccessConditions.getIfModifiedSince(), modifiedAccessConditions.getIfUnmodifiedSince(), + modifiedAccessConditions.getIfMatch(), modifiedAccessConditions.getIfNoneMatch(), null, context) .map(response -> new SimpleResponse<>(response, null)); } else { - return this.client.containers().releaseLeaseWithRestResponseAsync( - null, this.leaseId, null, null, modifiedAccessConditions, context) + return this.client.containers().releaseLeaseWithRestResponseAsync(null, this.leaseId, null, + modifiedAccessConditions.getIfModifiedSince(), modifiedAccessConditions.getIfUnmodifiedSince(), + null, context) .map(response -> new SimpleResponse<>(response, null)); } } @@ -269,7 +280,7 @@ public Mono breakLease() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.breakLeaseWithResponse#Integer-ModifiedAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.breakLeaseWithResponse#Integer-RequestConditions} * * @param breakPeriodInSeconds An optional duration, between 0 and 60 seconds, that the lease should continue before * it is broken. If the break period is longer than the time remaining on the lease the remaining time on the lease @@ -282,7 +293,7 @@ public Mono breakLease() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> breakLeaseWithResponse(Integer breakPeriodInSeconds, - ModifiedAccessConditions modifiedAccessConditions) { + RequestConditions modifiedAccessConditions) { try { return withContext( context -> breakLeaseWithResponse(breakPeriodInSeconds, modifiedAccessConditions, context)); @@ -292,14 +303,18 @@ public Mono> breakLeaseWithResponse(Integer breakPeriodInSecon } Mono> breakLeaseWithResponse(Integer breakPeriodInSeconds, - ModifiedAccessConditions modifiedAccessConditions, Context context) { + RequestConditions modifiedAccessConditions, Context context) { + modifiedAccessConditions = (modifiedAccessConditions == null) + ? new RequestConditions() : modifiedAccessConditions; if (this.isBlob) { - return this.client.blobs().breakLeaseWithRestResponseAsync( - null, null, null, breakPeriodInSeconds, null, modifiedAccessConditions, context) + return this.client.blobs().breakLeaseWithRestResponseAsync(null, null, null, breakPeriodInSeconds, + modifiedAccessConditions.getIfModifiedSince(), modifiedAccessConditions.getIfUnmodifiedSince(), + modifiedAccessConditions.getIfMatch(), modifiedAccessConditions.getIfNoneMatch(), null, context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseTime())); } else { - return this.client.containers().breakLeaseWithRestResponseAsync( - null, null, breakPeriodInSeconds, null, modifiedAccessConditions, context) + return this.client.containers().breakLeaseWithRestResponseAsync(null, null, breakPeriodInSeconds, + modifiedAccessConditions.getIfModifiedSince(), modifiedAccessConditions.getIfUnmodifiedSince(), + null, context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseTime())); } } @@ -328,7 +343,7 @@ public Mono changeLease(String proposedId) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.changeLeaseWithResponse#String-ModifiedAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.changeLeaseWithResponse#String-RequestConditions} * * @param proposedId A new lease ID in a valid GUID format. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and @@ -338,7 +353,7 @@ public Mono changeLease(String proposedId) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> changeLeaseWithResponse(String proposedId, - ModifiedAccessConditions modifiedAccessConditions) { + RequestConditions modifiedAccessConditions) { try { return withContext(context -> changeLeaseWithResponse(proposedId, modifiedAccessConditions, context)); } catch (RuntimeException ex) { @@ -346,15 +361,19 @@ public Mono> changeLeaseWithResponse(String proposedId, } } - Mono> changeLeaseWithResponse(String proposedId, ModifiedAccessConditions modifiedAccessConditions, + Mono> changeLeaseWithResponse(String proposedId, RequestConditions modifiedAccessConditions, Context context) { + modifiedAccessConditions = (modifiedAccessConditions == null) + ? new RequestConditions() : modifiedAccessConditions; if (this.isBlob) { - return this.client.blobs().changeLeaseWithRestResponseAsync( - null, null, this.leaseId, proposedId, null, null, modifiedAccessConditions, context) + return this.client.blobs().changeLeaseWithRestResponseAsync(null, null, this.leaseId, proposedId, null, + modifiedAccessConditions.getIfModifiedSince(), modifiedAccessConditions.getIfUnmodifiedSince(), + modifiedAccessConditions.getIfMatch(), modifiedAccessConditions.getIfNoneMatch(), null, context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } else { - return this.client.containers().changeLeaseWithRestResponseAsync( - null, this.leaseId, proposedId, null, null, modifiedAccessConditions, context) + return this.client.containers().changeLeaseWithRestResponseAsync(null, this.leaseId, proposedId, null, + modifiedAccessConditions.getIfModifiedSince(), modifiedAccessConditions.getIfUnmodifiedSince(), + null, context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java index ef349950fd5d..63751a49ace8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java @@ -6,13 +6,13 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.RequestConditions; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.BlobContainerClient; -import com.azure.storage.blob.models.ModifiedAccessConditions; - import com.azure.storage.common.implementation.StorageImplUtils; + import java.net.URL; import java.time.Duration; @@ -84,7 +84,7 @@ public String acquireLease(int duration) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.acquireLeaseWithResponse#int-ModifiedAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.acquireLeaseWithResponse#int-RequestConditions-Duration-Context} * * @param duration The duration of the lease between 15 to 60 seconds or -1 for an infinite duration. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and @@ -95,7 +95,7 @@ public String acquireLease(int duration) { * @return The lease ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response acquireLeaseWithResponse(int duration, ModifiedAccessConditions modifiedAccessConditions, + public Response acquireLeaseWithResponse(int duration, RequestConditions modifiedAccessConditions, Duration timeout, Context context) { return StorageImplUtils.blockWithOptionalTimeout(this.client .acquireLeaseWithResponse(duration, modifiedAccessConditions, context), timeout); @@ -120,7 +120,7 @@ public String renewLease() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.renewLeaseWithResponse#ModifiedAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.renewLeaseWithResponse#RequestConditions-Duration-Context} * * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the resource was changed relative to the given @@ -130,7 +130,7 @@ public String renewLease() { * @return The renewed lease ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response renewLeaseWithResponse(ModifiedAccessConditions modifiedAccessConditions, Duration timeout, + public Response renewLeaseWithResponse(RequestConditions modifiedAccessConditions, Duration timeout, Context context) { return StorageImplUtils.blockWithOptionalTimeout(this.client .renewLeaseWithResponse(modifiedAccessConditions, context), timeout); @@ -153,7 +153,7 @@ public void releaseLease() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.releaseLeaseWithResponse#ModifiedAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.releaseLeaseWithResponse#RequestConditions-Duration-Context} * * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the resource was changed relative to the given @@ -163,7 +163,7 @@ public void releaseLease() { * @return A response containing status code and HTTP headers. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response releaseLeaseWithResponse(ModifiedAccessConditions modifiedAccessConditions, Duration timeout, + public Response releaseLeaseWithResponse(RequestConditions modifiedAccessConditions, Duration timeout, Context context) { return StorageImplUtils.blockWithOptionalTimeout(this.client .releaseLeaseWithResponse(modifiedAccessConditions, context), timeout); @@ -191,7 +191,7 @@ public Integer breakLease() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.breakLeaseWithResponse#Integer-ModifiedAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.breakLeaseWithResponse#Integer-RequestConditions-Duration-Context} * * @param breakPeriodInSeconds An optional duration, between 0 and 60 seconds, that the lease should continue before * it is broken. If the break period is longer than the time remaining on the lease the remaining time on the lease @@ -206,7 +206,7 @@ public Integer breakLease() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response breakLeaseWithResponse(Integer breakPeriodInSeconds, - ModifiedAccessConditions modifiedAccessConditions, Duration timeout, Context context) { + RequestConditions modifiedAccessConditions, Duration timeout, Context context) { return StorageImplUtils.blockWithOptionalTimeout(this.client .breakLeaseWithResponse(breakPeriodInSeconds, modifiedAccessConditions, context), timeout); } @@ -231,7 +231,7 @@ public String changeLease(String proposedId) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.changeLeaseWithResponse#String-ModifiedAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.changeLeaseWithResponse#String-RequestConditions-Duration-Context} * * @param proposedId A new lease ID in a valid GUID format. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and @@ -243,7 +243,7 @@ public String changeLease(String proposedId) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response changeLeaseWithResponse(String proposedId, - ModifiedAccessConditions modifiedAccessConditions, Duration timeout, Context context) { + RequestConditions modifiedAccessConditions, Duration timeout, Context context) { return StorageImplUtils.blockWithOptionalTimeout(this.client .changeLeaseWithResponse(proposedId, modifiedAccessConditions, context), timeout); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java index fc8d95cdeb67..762d5b92e29d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java @@ -5,6 +5,7 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.RequestConditions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.http.UrlBuilder; @@ -19,18 +20,16 @@ import com.azure.storage.blob.implementation.models.PageBlobUpdateSequenceNumberHeaders; import com.azure.storage.blob.implementation.models.PageBlobUploadPagesFromURLHeaders; import com.azure.storage.blob.implementation.models.PageBlobUploadPagesHeaders; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.CpkInfo; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.PageBlobAccessConditions; import com.azure.storage.blob.models.PageBlobItem; +import com.azure.storage.blob.models.PageBlobRequestConditions; import com.azure.storage.blob.models.PageList; import com.azure.storage.blob.models.PageRange; import com.azure.storage.blob.models.SequenceNumberActionType; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.common.implementation.Constants; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -118,7 +117,7 @@ public Mono create(long size) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobRequestConditions} * * @param size Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a * 512-byte boundary. @@ -126,13 +125,13 @@ public Mono create(long size) { * number must be between 0 and 2^63 - 1.The default value is 0. * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response containing the information of the created page blob. * @throws IllegalArgumentException If {@code size} isn't a multiple of {@link PageBlobAsyncClient#PAGE_BYTES} or * {@code sequenceNumber} isn't null and is less than 0. */ public Mono> createWithResponse(long size, Long sequenceNumber, BlobHttpHeaders headers, - Map metadata, BlobAccessConditions accessConditions) { + Map metadata, BlobRequestConditions accessConditions) { try { return withContext(context -> createWithResponse(size, sequenceNumber, headers, metadata, accessConditions, context)); @@ -142,8 +141,8 @@ public Mono> createWithResponse(long size, Long sequenceN } Mono> createWithResponse(long size, Long sequenceNumber, BlobHttpHeaders headers, - Map metadata, BlobAccessConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + Map metadata, BlobRequestConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; if (size % PAGE_BYTES != 0) { // Throwing is preferred to Single.error because this will error out immediately instead of waiting until @@ -158,9 +157,10 @@ Mono> createWithResponse(long size, Long sequenceNumber, new IllegalArgumentException("SequenceNumber must be greater than or equal to 0.")); } - return this.azureBlobStorage.pageBlobs().createWithRestResponseAsync(null, null, 0, size, - null, null, metadata, sequenceNumber, null, headers, accessConditions.getLeaseAccessConditions(), - getCustomerProvidedKey(), accessConditions.getModifiedAccessConditions(), context) + return this.azureBlobStorage.pageBlobs().createWithRestResponseAsync(null, null, 0, size, null, null, metadata, + accessConditions.getLeaseId(), accessConditions.getIfModifiedSince(), + accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), + sequenceNumber, null, headers, getCustomerProvidedKey(), context) .map(rb -> { PageBlobCreateHeaders hd = rb.getDeserializedHeaders(); PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), @@ -213,24 +213,24 @@ public Mono uploadPages(PageRange pageRange, Flux body * are 0-511, 512-1023, etc. * @param body The data to upload. Note that this {@code Flux} must be replayable if retries are enabled (the * default). In other words, the Flowable must produce the same data each time it is subscribed to. - * @param pageBlobAccessConditions {@link PageBlobAccessConditions} + * @param pageBlobRequestConditions {@link PageBlobRequestConditions} * @return A reactive response containing the information of the uploaded pages. * @throws IllegalArgumentException If {@code pageRange} is {@code null} */ public Mono> uploadPagesWithResponse(PageRange pageRange, Flux body, - PageBlobAccessConditions pageBlobAccessConditions) { + PageBlobRequestConditions pageBlobRequestConditions) { try { - return withContext(context -> uploadPagesWithResponse(pageRange, body, pageBlobAccessConditions, context)); + return withContext(context -> uploadPagesWithResponse(pageRange, body, pageBlobRequestConditions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } Mono> uploadPagesWithResponse(PageRange pageRange, Flux body, - PageBlobAccessConditions pageBlobAccessConditions, Context context) { - pageBlobAccessConditions = pageBlobAccessConditions == null - ? new PageBlobAccessConditions() - : pageBlobAccessConditions; + PageBlobRequestConditions pageBlobRequestConditions, Context context) { + pageBlobRequestConditions = pageBlobRequestConditions == null + ? new PageBlobRequestConditions() + : pageBlobRequestConditions; if (pageRange == null) { // Throwing is preferred to Single.error because this will error out immediately instead of waiting until @@ -239,11 +239,14 @@ Mono> uploadPagesWithResponse(PageRange pageRange, Flux { PageBlobUploadPagesHeaders hd = rb.getDeserializedHeaders(); PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), @@ -288,7 +291,7 @@ public Mono uploadPagesFromURL(PageRange range, String sourceUrl, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions} * * @param range The destination {@link PageRange} range. Given that pages must be aligned with 512-byte boundaries, * the start offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte @@ -300,26 +303,26 @@ public Mono uploadPagesFromURL(PageRange range, String sourceUrl, * @param sourceOffset The source offset to copy from. Pass null or 0 to copy from the beginning of source blob. * @param sourceContentMD5 An MD5 hash of the block content from the source blob. If specified, the service will * calculate the MD5 of the received data and fail the request if it does not match the provided MD5. - * @param destAccessConditions {@link PageBlobAccessConditions} - * @param sourceAccessConditions {@link SourceModifiedAccessConditions} + * @param destAccessConditions {@link PageBlobRequestConditions} + * @param sourceRequestConditions {@link BlobRequestConditions} * @return A reactive response containing the information of the uploaded pages. * @throws IllegalArgumentException If {@code range} is {@code null} */ public Mono> uploadPagesFromURLWithResponse(PageRange range, String sourceUrl, - Long sourceOffset, byte[] sourceContentMD5, PageBlobAccessConditions destAccessConditions, - SourceModifiedAccessConditions sourceAccessConditions) { + Long sourceOffset, byte[] sourceContentMD5, PageBlobRequestConditions destAccessConditions, + BlobRequestConditions sourceRequestConditions) { try { return withContext( context -> uploadPagesFromURLWithResponse(range, sourceUrl, sourceOffset, sourceContentMD5, - destAccessConditions, sourceAccessConditions, context)); + destAccessConditions, sourceRequestConditions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } Mono> uploadPagesFromURLWithResponse(PageRange range, String sourceUrl, Long sourceOffset, - byte[] sourceContentMD5, PageBlobAccessConditions destAccessConditions, - SourceModifiedAccessConditions sourceAccessConditions, Context context) { + byte[] sourceContentMD5, PageBlobRequestConditions destAccessConditions, + BlobRequestConditions sourceRequestConditions, Context context) { if (range == null) { // Throwing is preferred to Single.error because this will error out immediately instead of waiting until // subscription. @@ -336,7 +339,9 @@ Mono> uploadPagesFromURLWithResponse(PageRange range, Str .setStart(sourceOffset) .setEnd(sourceOffset + (range.getEnd() - range.getStart()))); - destAccessConditions = destAccessConditions == null ? new PageBlobAccessConditions() : destAccessConditions; + destAccessConditions = (destAccessConditions == null) ? new PageBlobRequestConditions() : destAccessConditions; + sourceRequestConditions = (sourceRequestConditions == null) + ? new BlobRequestConditions() : sourceRequestConditions; URL url; try { @@ -345,10 +350,15 @@ Mono> uploadPagesFromURLWithResponse(PageRange range, Str throw logger.logExceptionAsError(new IllegalArgumentException("'sourceUrl' is not a valid url.")); } - return this.azureBlobStorage.pageBlobs().uploadPagesFromURLWithRestResponseAsync(null, null, - url, sourceRangeString, 0, rangeString, sourceContentMD5, null, null, null, getCustomerProvidedKey(), - destAccessConditions.getLeaseAccessConditions(), destAccessConditions.getSequenceNumberAccessConditions(), - destAccessConditions.getModifiedAccessConditions(), sourceAccessConditions, context) + return this.azureBlobStorage.pageBlobs().uploadPagesFromURLWithRestResponseAsync( + null, null, url, sourceRangeString, 0, rangeString, sourceContentMD5, null, null, + destAccessConditions.getLeaseId(), destAccessConditions.getIfSequenceNumberLessThanOrEqualTo(), + destAccessConditions.getIfSequenceNumberLessThan(), destAccessConditions.getIfSequenceNumberEqualTo(), + destAccessConditions.getIfModifiedSince(), destAccessConditions.getIfUnmodifiedSince(), + destAccessConditions.getIfMatch(), destAccessConditions.getIfNoneMatch(), + sourceRequestConditions.getIfModifiedSince(), sourceRequestConditions.getIfUnmodifiedSince(), + sourceRequestConditions.getIfMatch(), sourceRequestConditions.getIfNoneMatch(), null, + getCustomerProvidedKey(), context) .map(rb -> { PageBlobUploadPagesFromURLHeaders hd = rb.getDeserializedHeaders(); PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), @@ -384,29 +394,29 @@ public Mono clearPages(PageRange pageRange) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.clearPagesWithResponse#PageRange-PageBlobRequestConditions} * * @param pageRange A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges * are 0-511, 512-1023, etc. - * @param pageBlobAccessConditions {@link PageBlobAccessConditions} + * @param pageBlobRequestConditions {@link PageBlobRequestConditions} * @return A reactive response containing the information of the cleared pages. * @throws IllegalArgumentException If {@code pageRange} is {@code null} */ public Mono> clearPagesWithResponse(PageRange pageRange, - PageBlobAccessConditions pageBlobAccessConditions) { + PageBlobRequestConditions pageBlobRequestConditions) { try { - return withContext(context -> clearPagesWithResponse(pageRange, pageBlobAccessConditions, context)); + return withContext(context -> clearPagesWithResponse(pageRange, pageBlobRequestConditions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } Mono> clearPagesWithResponse(PageRange pageRange, - PageBlobAccessConditions pageBlobAccessConditions, Context context) { - pageBlobAccessConditions = pageBlobAccessConditions == null - ? new PageBlobAccessConditions() - : pageBlobAccessConditions; + PageBlobRequestConditions pageBlobRequestConditions, Context context) { + pageBlobRequestConditions = pageBlobRequestConditions == null + ? new PageBlobRequestConditions() + : pageBlobRequestConditions; if (pageRange == null) { // Throwing is preferred to Single.error because this will error out immediately instead of waiting until // subscription. @@ -414,11 +424,12 @@ Mono> clearPagesWithResponse(PageRange pageRange, } String pageRangeStr = pageRangeToString(pageRange); - return this.azureBlobStorage.pageBlobs().clearPagesWithRestResponseAsync(null, - null, 0, null, pageRangeStr, null, - pageBlobAccessConditions.getLeaseAccessConditions(), getCustomerProvidedKey(), - pageBlobAccessConditions.getSequenceNumberAccessConditions(), - pageBlobAccessConditions.getModifiedAccessConditions(), context) + return this.azureBlobStorage.pageBlobs().clearPagesWithRestResponseAsync(null, null, 0, null, pageRangeStr, + pageBlobRequestConditions.getLeaseId(), pageBlobRequestConditions.getIfSequenceNumberLessThanOrEqualTo(), + pageBlobRequestConditions.getIfSequenceNumberLessThan(), + pageBlobRequestConditions.getIfSequenceNumberEqualTo(), pageBlobRequestConditions.getIfModifiedSince(), + pageBlobRequestConditions.getIfUnmodifiedSince(), pageBlobRequestConditions.getIfMatch(), + pageBlobRequestConditions.getIfNoneMatch(), null, getCustomerProvidedKey(), context) .map(rb -> { PageBlobClearPagesHeaders hd = rb.getDeserializedHeaders(); PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), @@ -452,14 +463,14 @@ public Mono getPageRanges(BlobRange blobRange) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesWithResponse#BlobRange-BlobRequestConditions} * * @param blobRange {@link BlobRange} - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response emitting all the page ranges. */ public Mono> getPageRangesWithResponse(BlobRange blobRange, - BlobAccessConditions accessConditions) { + BlobRequestConditions accessConditions) { try { return withContext(context -> getPageRangesWithResponse(blobRange, accessConditions, context)); } catch (RuntimeException ex) { @@ -467,15 +478,16 @@ public Mono> getPageRangesWithResponse(BlobRange blobRange, } } - Mono> getPageRangesWithResponse(BlobRange blobRange, BlobAccessConditions accessConditions, + Mono> getPageRangesWithResponse(BlobRange blobRange, BlobRequestConditions accessConditions, Context context) { blobRange = blobRange == null ? new BlobRange(0) : blobRange; - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; - return this.azureBlobStorage.pageBlobs().getPageRangesWithRestResponseAsync( - null, null, getSnapshotId(), null, blobRange.toHeaderValue(), - null, accessConditions.getLeaseAccessConditions(), accessConditions.getModifiedAccessConditions(), - context).map(response -> new SimpleResponse<>(response, response.getValue())); + return this.azureBlobStorage.pageBlobs().getPageRangesWithRestResponseAsync(null, null, getSnapshotId(), null, + blobRange.toHeaderValue(), accessConditions.getLeaseId(), accessConditions.getIfModifiedSince(), + accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), + null, context) + .map(response -> new SimpleResponse<>(response, response.getValue())); } /** @@ -508,18 +520,18 @@ public Mono getPageRangesDiff(BlobRange blobRange, String prevSnapshot * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesDiffWithResponse#BlobRange-String-BlobRequestConditions} * * @param blobRange {@link BlobRange} * @param prevSnapshot Specifies that the response will contain only pages that were changed between target blob and * previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as * long as the snapshot specified by prevsnapshot is the older of the two. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response emitting all the different page ranges. * @throws IllegalArgumentException If {@code prevSnapshot} is {@code null} */ public Mono> getPageRangesDiffWithResponse(BlobRange blobRange, String prevSnapshot, - BlobAccessConditions accessConditions) { + BlobRequestConditions accessConditions) { try { return withContext(context -> getPageRangesDiffWithResponse(blobRange, prevSnapshot, accessConditions, context)); @@ -529,18 +541,18 @@ public Mono> getPageRangesDiffWithResponse(BlobRange blobRang } Mono> getPageRangesDiffWithResponse(BlobRange blobRange, String prevSnapshot, - BlobAccessConditions accessConditions, Context context) { + BlobRequestConditions accessConditions, Context context) { blobRange = blobRange == null ? new BlobRange(0) : blobRange; - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; if (prevSnapshot == null) { throw logger.logExceptionAsError(new IllegalArgumentException("prevSnapshot cannot be null")); } - return this.azureBlobStorage.pageBlobs().getPageRangesDiffWithRestResponseAsync( - null, null, getSnapshotId(), null, prevSnapshot, - blobRange.toHeaderValue(), null, accessConditions.getLeaseAccessConditions(), - accessConditions.getModifiedAccessConditions(), context) + return this.azureBlobStorage.pageBlobs().getPageRangesDiffWithRestResponseAsync(null, null, getSnapshotId(), + null, prevSnapshot, blobRange.toHeaderValue(), accessConditions.getLeaseId(), + accessConditions.getIfModifiedSince(), accessConditions.getIfUnmodifiedSince(), + accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), null, context) .map(response -> new SimpleResponse<>(response, response.getValue())); } @@ -570,15 +582,15 @@ public Mono resize(long size) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.resizeWithResponse#long-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.resizeWithResponse#long-BlobRequestConditions} * * @param size Resizes a page blob to the specified size. If the specified value is less than the current size of * the blob, then all pages above the specified value are cleared. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response emitting the resized page blob. * @throws IllegalArgumentException If {@code size} isn't a multiple of {@link PageBlobAsyncClient#PAGE_BYTES} */ - public Mono> resizeWithResponse(long size, BlobAccessConditions accessConditions) { + public Mono> resizeWithResponse(long size, BlobRequestConditions accessConditions) { try { return withContext(context -> resizeWithResponse(size, accessConditions, context)); } catch (RuntimeException ex) { @@ -586,18 +598,20 @@ public Mono> resizeWithResponse(long size, BlobAccessCond } } - Mono> resizeWithResponse(long size, BlobAccessConditions accessConditions, Context context) { + Mono> resizeWithResponse(long size, BlobRequestConditions accessConditions, + Context context) { if (size % PAGE_BYTES != 0) { // Throwing is preferred to Single.error because this will error out immediately instead of waiting until // subscription. throw logger.logExceptionAsError( new IllegalArgumentException("size must be a multiple of PageBlobAsyncClient.PAGE_BYTES.")); } - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; - return this.azureBlobStorage.pageBlobs().resizeWithRestResponseAsync(null, - null, size, null, null, accessConditions.getLeaseAccessConditions(), getCustomerProvidedKey(), - accessConditions.getModifiedAccessConditions(), context) + return this.azureBlobStorage.pageBlobs().resizeWithRestResponseAsync(null, null, size, null, + accessConditions.getLeaseId(), accessConditions.getIfModifiedSince(), + accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), + null, getCustomerProvidedKey(), context) .map(rb -> { PageBlobResizeHeaders hd = rb.getDeserializedHeaders(); PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), null, null, null, @@ -633,17 +647,17 @@ public Mono updateSequenceNumber(SequenceNumberActionType action, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobRequestConditions} * * @param action Indicates how the service should modify the blob's sequence number. * @param sequenceNumber The blob's sequence number. The sequence number is a user-controlled property that you can * use to track requests and manage concurrency issues. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @return A reactive response emitting the updated page blob. * @throws IllegalArgumentException If {@code sequenceNumber} isn't null and is less than 0 */ public Mono> updateSequenceNumberWithResponse(SequenceNumberActionType action, - Long sequenceNumber, BlobAccessConditions accessConditions) { + Long sequenceNumber, BlobRequestConditions accessConditions) { try { return withContext(context -> updateSequenceNumberWithResponse(action, sequenceNumber, accessConditions, context)); @@ -653,19 +667,20 @@ public Mono> updateSequenceNumberWithResponse(SequenceNum } Mono> updateSequenceNumberWithResponse(SequenceNumberActionType action, Long sequenceNumber, - BlobAccessConditions accessConditions, Context context) { + BlobRequestConditions accessConditions, Context context) { if (sequenceNumber != null && sequenceNumber < 0) { // Throwing is preferred to Single.error because this will error out immediately instead of waiting until // subscription. throw logger.logExceptionAsError( new IllegalArgumentException("SequenceNumber must be greater than or equal to 0.")); } - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; sequenceNumber = action == SequenceNumberActionType.INCREMENT ? null : sequenceNumber; - return this.azureBlobStorage.pageBlobs().updateSequenceNumberWithRestResponseAsync(null, - null, action, null, sequenceNumber, null, - accessConditions.getLeaseAccessConditions(), accessConditions.getModifiedAccessConditions(), context) + return this.azureBlobStorage.pageBlobs().updateSequenceNumberWithRestResponseAsync(null, null, action, null, + accessConditions.getLeaseId(), accessConditions.getIfModifiedSince(), + accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), + sequenceNumber, null, context) .map(rb -> { PageBlobUpdateSequenceNumberHeaders hd = rb.getDeserializedHeaders(); PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), null, null, null, @@ -708,7 +723,7 @@ public Mono copyIncremental(String source, String snapshot) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.copyIncrementalWithResponse#String-String-ModifiedAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.copyIncrementalWithResponse#String-String-RequestConditions} * * @param source The source page blob. * @param snapshot The snapshot on the copy source. @@ -719,7 +734,7 @@ public Mono copyIncremental(String source, String snapshot) { * @throws IllegalStateException If {@code source} and {@code snapshot} form a malformed URL. */ public Mono> copyIncrementalWithResponse(String source, String snapshot, - ModifiedAccessConditions modifiedAccessConditions) { + RequestConditions modifiedAccessConditions) { try { return withContext( context -> copyIncrementalWithResponse(source, snapshot, modifiedAccessConditions, context)); @@ -729,9 +744,12 @@ public Mono> copyIncrementalWithResponse(String source, } Mono> copyIncrementalWithResponse(String source, String snapshot, - ModifiedAccessConditions modifiedAccessConditions, Context context) { + RequestConditions modifiedAccessConditions, Context context) { UrlBuilder builder = UrlBuilder.parse(source); builder.setQueryParameter(Constants.UrlConstants.SNAPSHOT_QUERY_PARAMETER, snapshot); + modifiedAccessConditions = (modifiedAccessConditions == null) + ? new RequestConditions() : modifiedAccessConditions; + URL url; try { url = builder.toURL(); @@ -739,8 +757,9 @@ Mono> copyIncrementalWithResponse(String source, String // We are parsing a valid url and adding a query parameter. If this fails, we can't recover. throw logger.logExceptionAsError(new IllegalArgumentException(e)); } - return this.azureBlobStorage.pageBlobs().copyIncrementalWithRestResponseAsync( - null, null, url, null, null, modifiedAccessConditions, context) + return this.azureBlobStorage.pageBlobs().copyIncrementalWithRestResponseAsync(null, null, url, null, + modifiedAccessConditions.getIfModifiedSince(), modifiedAccessConditions.getIfUnmodifiedSince(), + modifiedAccessConditions.getIfMatch(), modifiedAccessConditions.getIfNoneMatch(), null, context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getCopyStatus())); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index e85ff562275a..661c89c6199d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -5,21 +5,20 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.exception.UnexpectedLengthException; +import com.azure.core.http.RequestConditions; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.storage.blob.BlobClient; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CopyStatusType; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.PageBlobAccessConditions; import com.azure.storage.blob.models.PageBlobItem; +import com.azure.storage.blob.models.PageBlobRequestConditions; import com.azure.storage.blob.models.PageList; import com.azure.storage.blob.models.PageRange; import com.azure.storage.blob.models.SequenceNumberActionType; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Flux; @@ -87,12 +86,12 @@ public BlobOutputStream getBlobOutputStream(PageRange pageRange) { * @param pageRange A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges * are 0-511, 512-1023, etc. - * @param accessConditions A {@link BlobAccessConditions} object that represents the access conditions for the + * @param accessConditions A {@link BlobRequestConditions} object that represents the access conditions for the * blob. * @return A {@link BlobOutputStream} object used to write data to the blob. * @throws BlobStorageException If a storage service error occurred. */ - public BlobOutputStream getBlobOutputStream(PageRange pageRange, BlobAccessConditions accessConditions) { + public BlobOutputStream getBlobOutputStream(PageRange pageRange, BlobRequestConditions accessConditions) { return BlobOutputStream.pageBlobOutputStream(pageBlobAsyncClient, pageRange, accessConditions); } @@ -121,7 +120,7 @@ public PageBlobItem create(long size) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobRequestConditions-Duration-Context} * * @param size Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a * 512-byte boundary. @@ -129,13 +128,13 @@ public PageBlobItem create(long size) { * number must be between 0 and 2^63 - 1.The default value is 0. * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The information of the created page blob. */ public Response createWithResponse(long size, Long sequenceNumber, BlobHttpHeaders headers, - Map metadata, BlobAccessConditions accessConditions, Duration timeout, Context context) { + Map metadata, BlobRequestConditions accessConditions, Duration timeout, Context context) { Mono> response = pageBlobAsyncClient.createWithResponse(size, sequenceNumber, headers, metadata, accessConditions, context); return StorageImplUtils.blockWithOptionalTimeout(response, timeout); @@ -179,7 +178,7 @@ public PageBlobItem uploadPages(PageRange pageRange, InputStream body) { * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges * are 0-511, 512-1023, etc. * @param body The data to upload. - * @param pageBlobAccessConditions {@link PageBlobAccessConditions} + * @param pageBlobRequestConditions {@link PageBlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The information of the uploaded pages. @@ -187,14 +186,14 @@ public PageBlobItem uploadPages(PageRange pageRange, InputStream body) { * @throws NullPointerException if the input data is null. */ public Response uploadPagesWithResponse(PageRange pageRange, InputStream body, - PageBlobAccessConditions pageBlobAccessConditions, Duration timeout, Context context) { + PageBlobRequestConditions pageBlobRequestConditions, Duration timeout, Context context) { Objects.requireNonNull(body, "'body' cannot be null."); final long length = pageRange.getEnd() - pageRange.getStart() + 1; Flux fbb = Utility.convertStreamToByteBuffer(body, length, PAGE_BYTES); Mono> response = pageBlobAsyncClient.uploadPagesWithResponse(pageRange, fbb.subscribeOn(Schedulers.elastic()), - pageBlobAccessConditions, context); + pageBlobRequestConditions, context); return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } @@ -231,7 +230,7 @@ public PageBlobItem uploadPagesFromURL(PageRange range, String sourceUrl, Long s * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions-Duration-Context} * * @param range The destination {@link PageRange} range. Given that pages must be aligned with 512-byte boundaries, * the start offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte @@ -243,19 +242,19 @@ public PageBlobItem uploadPagesFromURL(PageRange range, String sourceUrl, Long s * @param sourceOffset The source offset to copy from. Pass null or 0 to copy from the beginning of source blob. * @param sourceContentMD5 An MD5 hash of the block content from the source blob. If specified, the service will * calculate the MD5 of the received data and fail the request if it does not match the provided MD5. - * @param destAccessConditions {@link PageBlobAccessConditions} - * @param sourceAccessConditions {@link SourceModifiedAccessConditions} + * @param destAccessConditions {@link PageBlobRequestConditions} + * @param sourceRequestConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The information of the uploaded pages. * @throws IllegalArgumentException If {@code sourceUrl} is a malformed {@link URL}. */ public Response uploadPagesFromURLWithResponse(PageRange range, String sourceUrl, Long sourceOffset, - byte[] sourceContentMD5, PageBlobAccessConditions destAccessConditions, - SourceModifiedAccessConditions sourceAccessConditions, Duration timeout, Context context) { + byte[] sourceContentMD5, PageBlobRequestConditions destAccessConditions, + BlobRequestConditions sourceRequestConditions, Duration timeout, Context context) { Mono> response = pageBlobAsyncClient.uploadPagesFromURLWithResponse(range, sourceUrl, - sourceOffset, sourceContentMD5, destAccessConditions, sourceAccessConditions, context); + sourceOffset, sourceContentMD5, destAccessConditions, sourceRequestConditions, context); return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } @@ -282,20 +281,20 @@ public PageBlobItem clearPages(PageRange pageRange) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.clearPagesWithResponse#PageRange-PageBlobRequestConditions-Duration-Context} * * @param pageRange A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges * are 0-511, 512-1023, etc. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param pageBlobAccessConditions {@link PageBlobAccessConditions} + * @param pageBlobRequestConditions {@link PageBlobRequestConditions} * @param context Additional context that is passed through the Http pipeline during the service call. * @return The information of the cleared pages. */ public Response clearPagesWithResponse(PageRange pageRange, - PageBlobAccessConditions pageBlobAccessConditions, Duration timeout, Context context) { + PageBlobRequestConditions pageBlobRequestConditions, Duration timeout, Context context) { Mono> response = pageBlobAsyncClient.clearPagesWithResponse(pageRange, - pageBlobAccessConditions, context); + pageBlobRequestConditions, context); return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } @@ -321,15 +320,15 @@ public PageList getPageRanges(BlobRange blobRange) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.getPageRangesWithResponse#BlobRange-BlobRequestConditions-Duration-Context} * * @param blobRange {@link BlobRange} - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return All the page ranges. */ - public Response getPageRangesWithResponse(BlobRange blobRange, BlobAccessConditions accessConditions, + public Response getPageRangesWithResponse(BlobRange blobRange, BlobRequestConditions accessConditions, Duration timeout, Context context) { return StorageImplUtils.blockWithOptionalTimeout(pageBlobAsyncClient .getPageRangesWithResponse(blobRange, accessConditions, context), timeout); @@ -361,19 +360,19 @@ public PageList getPageRangesDiff(BlobRange blobRange, String prevSnapshot) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiffWithResponse#BlobRange-String-BlobRequestConditions-Duration-Context} * * @param blobRange {@link BlobRange} * @param prevSnapshot Specifies that the response will contain only pages that were changed between target blob and * previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as * long as the snapshot specified by prevsnapshot is the older of the two. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return All the different page ranges. */ public Response getPageRangesDiffWithResponse(BlobRange blobRange, String prevSnapshot, - BlobAccessConditions accessConditions, Duration timeout, Context context) { + BlobRequestConditions accessConditions, Duration timeout, Context context) { return StorageImplUtils.blockWithOptionalTimeout(pageBlobAsyncClient .getPageRangesDiffWithResponse(blobRange, prevSnapshot, accessConditions, context), timeout); } @@ -400,17 +399,17 @@ public PageBlobItem resize(long size) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.resizeWithResponse#long-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.resizeWithResponse#long-BlobRequestConditions-Duration-Context} * * @param size Resizes a page blob to the specified size. If the specified value is less than the current size of * the blob, then all pages above the specified value are cleared. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The resized page blob. */ - public Response resizeWithResponse(long size, BlobAccessConditions accessConditions, Duration timeout, - Context context) { + public Response resizeWithResponse(long size, BlobRequestConditions accessConditions, + Duration timeout, Context context) { Mono> response = pageBlobAsyncClient.resizeWithResponse(size, accessConditions, context); return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } @@ -439,18 +438,18 @@ public PageBlobItem updateSequenceNumber(SequenceNumberActionType action, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobRequestConditions-Duration-Context} * * @param action Indicates how the service should modify the blob's sequence number. * @param sequenceNumber The blob's sequence number. The sequence number is a user-controlled property that you can * use to track requests and manage concurrency issues. - * @param accessConditions {@link BlobAccessConditions} + * @param accessConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The updated page blob. */ public Response updateSequenceNumberWithResponse(SequenceNumberActionType action, - Long sequenceNumber, BlobAccessConditions accessConditions, Duration timeout, Context context) { + Long sequenceNumber, BlobRequestConditions accessConditions, Duration timeout, Context context) { Mono> response = pageBlobAsyncClient .updateSequenceNumberWithResponse(action, sequenceNumber, accessConditions, context); return StorageImplUtils.blockWithOptionalTimeout(response, timeout); @@ -487,7 +486,7 @@ public CopyStatusType copyIncremental(String source, String snapshot) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.copyIncrementalWithResponse#String-String-ModifiedAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.copyIncrementalWithResponse#String-String-RequestConditions-Duration-Context} * * @param source The source page blob. * @param snapshot The snapshot on the copy source. @@ -500,7 +499,7 @@ public CopyStatusType copyIncremental(String source, String snapshot) { * @throws IllegalArgumentException If {@code source} is a malformed {@link URL}. */ public Response copyIncrementalWithResponse(String source, String snapshot, - ModifiedAccessConditions modifiedAccessConditions, Duration timeout, Context context) { + RequestConditions modifiedAccessConditions, Duration timeout, Context context) { Mono> response = pageBlobAsyncClient .copyIncrementalWithResponse(source, snapshot, modifiedAccessConditions, context); return StorageImplUtils.blockWithOptionalTimeout(response, timeout); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java index 6ec701ae74cb..beae1e024a68 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java @@ -20,7 +20,6 @@ import com.azure.storage.blob.implementation.util.BuilderHelper; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; -import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.PageRange; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; @@ -126,8 +125,8 @@ public BlockBlobClient buildBlockBlobClient() { * Creates a {@link BlockBlobAsyncClient} based on options set in the Builder. BlockBlobAsyncClients are used to * perform generic upload operations such as {@link BlockBlobAsyncClient#upload(Flux, long) upload from file} * and block blob specific operations such as {@link BlockBlobAsyncClient#stageBlockWithResponse(String, Flux, long, - * LeaseAccessConditions) stage block} and {@link BlockBlobAsyncClient#commitBlockList(List) commit block list}, - * only use this when the blob is known to be a block blob. + * String) stage block} and {@link BlockBlobAsyncClient#commitBlockList(List) commit block list}, only use this + * when the blob is known to be a block blob. * * @return a {@link BlockBlobAsyncClient} created from the configurations in this builder. * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java index be10d48b44c6..8b2ba088b91e 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java @@ -3,13 +3,12 @@ package com.azure.storage.blob; +import com.azure.core.http.RequestConditions; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.ReliableDownloadOptions; @@ -89,7 +88,7 @@ public void downloadCodeSnippet() { /** * Code snippets for {@link BlobAsyncClient#downloadWithResponse(BlobRange, ReliableDownloadOptions, - * BlobAccessConditions, boolean)} + * BlobRequestConditions, boolean)} * * @throws UncheckedIOException If an I/O error occurs */ @@ -113,7 +112,7 @@ public void downloadWithResponseCodeSnippet() { /** * Code snippets for {@link BlobAsyncClient#downloadToFile(String)} and {@link BlobAsyncClient#downloadToFileWithResponse( - * String, BlobRange, ParallelTransferOptions, ReliableDownloadOptions, BlobAccessConditions, boolean)} + * String, BlobRange, ParallelTransferOptions, ReliableDownloadOptions, BlobRequestConditions, boolean)} */ public void downloadToFileCodeSnippet() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.downloadToFile#String @@ -217,39 +216,37 @@ public void existsWithResponseCodeSnippet() { } /** - * Code snippets for {@link BlobAsyncClient#abortCopyFromURLWithResponse(String, LeaseAccessConditions)} + * Code snippets for {@link BlobAsyncClient#abortCopyFromURLWithResponse(String, String)} */ public void abortCopyFromURLWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURLWithResponse#String-LeaseAccessConditions - LeaseAccessConditions leaseAccessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - client.abortCopyFromURLWithResponse(copyId, leaseAccessConditions) + // BEGIN: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURLWithResponse#String-String + client.abortCopyFromURLWithResponse(copyId, leaseId) .subscribe( response -> System.out.printf("Aborted copy completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURLWithResponse#String-LeaseAccessConditions + // END: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURLWithResponse#String-String } /** * Code snippets for {@link BlobAsyncClient#copyFromURLWithResponse(String, Map, AccessTier, - * ModifiedAccessConditions, BlobAccessConditions)} + * RequestConditions, BlobRequestConditions)} */ public void copyFromURLWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobAsyncClient.copyFromURLWithResponse#String-Metadata-AccessTier-ModifiedAccessConditions-BlobAccessConditions + // BEGIN: com.azure.storage.blob.BlobAsyncClient.copyFromURLWithResponse#String-Metadata-AccessTier-RequestConditions-BlobRequestConditions Map metadata = Collections.singletonMap("metadata", "value"); - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); - client.copyFromURLWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, blobAccessConditions) + client.copyFromURLWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, blobRequestConditions) .subscribe(response -> System.out.printf("Copy identifier: %s%n", response)); - // END: com.azure.storage.blob.BlobAsyncClient.copyFromURLWithResponse#String-Metadata-AccessTier-ModifiedAccessConditions-BlobAccessConditions + // END: com.azure.storage.blob.BlobAsyncClient.copyFromURLWithResponse#String-Metadata-AccessTier-RequestConditions-BlobRequestConditions } /** * Code snippets for {@link BlobAsyncClient#downloadWithResponse(BlobRange, ReliableDownloadOptions, - * BlobAccessConditions, boolean)} + * BlobRequestConditions, boolean)} * * @throws UncheckedIOException If an I/O error occurs */ @@ -272,7 +269,7 @@ public void downloadWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClient#deleteWithResponse(DeleteSnapshotsOptionType, BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClient#deleteWithResponse(DeleteSnapshotsOptionType, BlobRequestConditions)} */ public void deleteWithResponseCodeSnippets() { @@ -283,13 +280,12 @@ public void deleteWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClient#getPropertiesWithResponse(BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClient#getPropertiesWithResponse(BlobRequestConditions)} */ public void getPropertiesWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.getPropertiesWithResponse#BlobAccessConditions - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); client.getPropertiesWithResponse(accessConditions).subscribe( response -> System.out.printf("Type: %s, Size: %d%n", response.getValue().getBlobType(), @@ -298,13 +294,12 @@ public void getPropertiesWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClient#setHttpHeadersWithResponse(BlobHttpHeaders, BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClient#setHttpHeadersWithResponse(BlobHttpHeaders, BlobRequestConditions)} */ public void setHTTPHeadersWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); client.setHttpHeadersWithResponse(new BlobHttpHeaders() .setBlobContentLanguage("en-US") @@ -316,12 +311,11 @@ public void setHTTPHeadersWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClient#setMetadataWithResponse(Map, BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClient#setMetadataWithResponse(Map, BlobRequestConditions)} */ public void setMetadataWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponse#Metadata-BlobAccessConditions - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); client.setMetadataWithResponse(Collections.singletonMap("metadata", "value"), accessConditions) .subscribe( @@ -330,14 +324,13 @@ public void setMetadataWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClient#createSnapshotWithResponse(Map, BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClient#createSnapshotWithResponse(Map, BlobRequestConditions)} */ public void createSnapshotWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.createSnapshotWithResponse#Metadata-BlobAccessConditions Map snapshotMetadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); client.createSnapshotWithResponse(snapshotMetadata, accessConditions) .subscribe(response -> System.out.printf("Identifier for the snapshot is %s%n", response.getValue())); @@ -345,16 +338,14 @@ public void createSnapshotWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions)} + * Code snippets for {@link BlobAsyncClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, String)} */ public void setTierWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobAsyncClient.setTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - - client.setAccessTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, accessConditions) + // BEGIN: com.azure.storage.blob.BlobAsyncClient.setTierWithResponse#AccessTier-RehydratePriority-String + client.setAccessTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, leaseId) .subscribe(response -> System.out.printf("Set tier completed with status code %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.BlobAsyncClient.setTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions + // END: com.azure.storage.blob.BlobAsyncClient.setTierWithResponse#AccessTier-RehydratePriority-String } /** @@ -412,7 +403,7 @@ public void upload3() { } /** - * Code snippet for {@link BlobAsyncClient#uploadWithResponse(Flux, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobAccessConditions)} + * Code snippet for {@link BlobAsyncClient#uploadWithResponse(Flux, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions)} */ public void upload4() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.uploadWithResponse#Flux-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions @@ -422,10 +413,9 @@ public void upload4() { .setBlobContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() .setBlockSize(blockSize) @@ -438,7 +428,7 @@ public void upload4() { } /** - * Code snippet for {@link BlobAsyncClient#uploadWithResponse(Flux, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobAccessConditions)} + * Code snippet for {@link BlobAsyncClient#uploadWithResponse(Flux, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions)} */ public void upload5() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.uploadWithResponse#Flux-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions.ProgressReporter @@ -448,10 +438,9 @@ public void upload5() { .setBlobContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() .setBlockSize(blockSize) @@ -477,27 +466,26 @@ public void uploadFromFile() { } /** - * Code snippet for {@link BlobAsyncClient#uploadFromFile(String, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobAccessConditions)} + * Code snippet for {@link BlobAsyncClient#uploadFromFile(String, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions)} */ public void uploadFromFile2() { - // BEGIN: com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions + // BEGIN: com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions BlobHttpHeaders headers = new BlobHttpHeaders() .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) .setBlobContentLanguage("en-US") .setBlobContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.uploadFromFile(filePath, new ParallelTransferOptions().setBlockSize(BlobAsyncClient.BLOB_MAX_UPLOAD_BLOCK_SIZE), headers, metadata, AccessTier.HOT, accessConditions) .doOnError(throwable -> System.err.printf("Failed to upload from file %s%n", throwable.getMessage())) .subscribe(completion -> System.out.println("Upload from file succeeded")); - // END: com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions + // END: com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java index f6432842dff7..5e9653064306 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java @@ -3,14 +3,13 @@ package com.azure.storage.blob; +import com.azure.core.http.RequestConditions; import com.azure.core.util.Context; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.ReliableDownloadOptions; @@ -85,7 +84,7 @@ public void download() { /** * Code snippets for {@link BlobClient#downloadToFile(String)} and - * {@link BlobClient#downloadToFileWithResponse(String, BlobRange, ParallelTransferOptions, ReliableDownloadOptions, BlobAccessConditions, boolean, Duration, Context)} + * {@link BlobClient#downloadToFileWithResponse(String, BlobRange, ParallelTransferOptions, ReliableDownloadOptions, BlobRequestConditions, boolean, Duration, Context)} */ public void downloadToFile() { // BEGIN: com.azure.storage.blob.BlobClient.downloadToFile#String @@ -155,13 +154,12 @@ public void createSnapshot() { } /** - * Code snippets for {@link BlobClientBase#setAccessTier(AccessTier)} and - * {@link BlobClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClientBase#setAccessTier(AccessTier)} */ public void setTier() { // BEGIN: com.azure.storage.blob.BlobClient.setTier#AccessTier - System.out.printf("Set tier completed with status code %d%n", - client.setAccessTierWithResponse(AccessTier.HOT, null, null, null, null).getStatusCode()); + client.setAccessTier(AccessTier.HOT); + System.out.println("Set tier completed."); // END: com.azure.storage.blob.BlobClient.setTier#AccessTier @@ -197,41 +195,39 @@ public void existsWithResponseCodeSnippet() { } /** - * Code snippets for {@link BlobClient#abortCopyFromURLWithResponse(String, LeaseAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClient#abortCopyFromURLWithResponse(String, String, Duration, Context)} */ public void abortCopyFromURLWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobClient.abortCopyFromURLWithResponse#String-LeaseAccessConditions-Duration-Context - LeaseAccessConditions leaseAccessConditions = new LeaseAccessConditions().setLeaseId(leaseId); + // BEGIN: com.azure.storage.blob.BlobClient.abortCopyFromURLWithResponse#String-String-Duration-Context System.out.printf("Aborted copy completed with status %d%n", - client.abortCopyFromURLWithResponse(copyId, leaseAccessConditions, timeout, + client.abortCopyFromURLWithResponse(copyId, leaseId, timeout, new Context(key2, value2)).getStatusCode()); - // END: com.azure.storage.blob.BlobClient.abortCopyFromURLWithResponse#String-LeaseAccessConditions-Duration-Context + // END: com.azure.storage.blob.BlobClient.abortCopyFromURLWithResponse#String-String-Duration-Context } /** - * Code snippets for {@link BlobClient#copyFromURLWithResponse(String, Map, AccessTier, ModifiedAccessConditions, - * BlobAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClient#copyFromURLWithResponse(String, Map, AccessTier, RequestConditions, + * BlobRequestConditions, Duration, Context)} */ public void copyFromURLWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobClient.copyFromURLWithResponse#String-Metadata-AccessTier-ModifiedAccessConditions-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.BlobClient.copyFromURLWithResponse#String-Metadata-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context Map metadata = Collections.singletonMap("metadata", "value"); - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); System.out.printf("Copy identifier: %s%n", client.copyFromURLWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, - blobAccessConditions, timeout, + blobRequestConditions, timeout, new Context(key1, value1)).getValue()); - // END: com.azure.storage.blob.BlobClient.copyFromURLWithResponse#String-Metadata-AccessTier-ModifiedAccessConditions-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.BlobClient.copyFromURLWithResponse#String-Metadata-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context } /** * Code snippets for {@link BlobClient#downloadWithResponse(OutputStream, BlobRange, ReliableDownloadOptions, - * BlobAccessConditions, boolean, Duration, Context)} + * BlobRequestConditions, boolean, Duration, Context)} * @throws UncheckedIOException If an I/O error occurs */ public void downloadWithResponseCodeSnippets() { @@ -247,7 +243,7 @@ public void downloadWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClient#deleteWithResponse(DeleteSnapshotsOptionType, BlobAccessConditions, Duration, + * Code snippets for {@link BlobClient#deleteWithResponse(DeleteSnapshotsOptionType, BlobRequestConditions, Duration, * Context)} */ public void deleteWithResponseCodeSnippets() { @@ -260,13 +256,12 @@ public void deleteWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClient#getPropertiesWithResponse(BlobAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClient#getPropertiesWithResponse(BlobRequestConditions, Duration, Context)} */ public void getPropertiesWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobClient.getPropertiesWithResponse#BlobAccessConditions-Duration-Context - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); BlobProperties properties = client.getPropertiesWithResponse(accessConditions, timeout, new Context(key2, value2)).getValue(); @@ -275,13 +270,12 @@ public void getPropertiesWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClient#setHttpHeadersWithResponse(BlobHttpHeaders, BlobAccessConditions, Duration, + * Code snippets for {@link BlobClient#setHttpHeadersWithResponse(BlobHttpHeaders, BlobRequestConditions, Duration, * Context)} */ public void setHTTPHeadersWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobClient.setHTTPHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions-Duration-Context - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); System.out.printf("Set HTTP headers completed with status %d%n", client.setHttpHeadersWithResponse(new BlobHttpHeaders() @@ -292,12 +286,11 @@ public void setHTTPHeadersWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClient#setMetadataWithResponse(Map, BlobAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClient#setMetadataWithResponse(Map, BlobRequestConditions, Duration, Context)} */ public void setMetadataWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobClient.setMetadataWithResponse#Metadata-BlobAccessConditions-Duration-Context - BlobAccessConditions accessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); System.out.printf("Set metadata completed with status %d%n", client.setMetadataWithResponse(Collections.singletonMap("metadata", "value"), accessConditions, timeout, @@ -306,15 +299,14 @@ public void setMetadataWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClient#createSnapshotWithResponse(Map, BlobAccessConditions, Duration, + * Code snippets for {@link BlobClient#createSnapshotWithResponse(Map, BlobRequestConditions, Duration, * Context)} */ public void createSnapshotWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobClient.createSnapshotWithResponse#Metadata-BlobAccessConditions-Duration-Context Map snapshotMetadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); System.out.printf("Identifier for the snapshot is %s%n", client.createSnapshotWithResponse(snapshotMetadata, accessConditions, timeout, @@ -323,16 +315,14 @@ public void createSnapshotWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, String, Duration, Context)} */ public void setTierWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobClient.setTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions-Duration-Context - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - + // BEGIN: com.azure.storage.blob.BlobClient.setTierWithResponse#AccessTier-RehydratePriority-String-Duration-Context System.out.printf("Set tier completed with status code %d%n", - client.setAccessTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, accessConditions, timeout, + client.setAccessTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, leaseId, timeout, new Context(key2, value2)).getStatusCode()); - // END: com.azure.storage.blob.BlobClient.setTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions-Duration-Context + // END: com.azure.storage.blob.BlobClient.setTierWithResponse#AccessTier-RehydratePriority-String-Duration-Context } /** @@ -392,22 +382,21 @@ public void uploadFromFile() throws IOException { } /** - * Code snippet for {@link BlobClient#uploadFromFile(String, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobAccessConditions, Duration)} + * Code snippet for {@link BlobClient#uploadFromFile(String, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions, Duration)} * * @throws IOException If an I/O error occurs */ public void uploadFromFile2() throws IOException { - // BEGIN: com.azure.storage.blob.BlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions-Duration + // BEGIN: com.azure.storage.blob.BlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration BlobHttpHeaders headers = new BlobHttpHeaders() .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) .setBlobContentLanguage("en-US") .setBlobContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); Integer blockSize = 100 * 1024 * 1024; // 100 MB; ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions().setBlockSize(blockSize); @@ -418,6 +407,6 @@ public void uploadFromFile2() throws IOException { } catch (UncheckedIOException ex) { System.err.printf("Failed to upload from file %s%n", ex.getMessage()); } - // END: com.azure.storage.blob.BlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions-Duration + // END: com.azure.storage.blob.BlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java index 25f3a2e68d75..cc72c75f2b7f 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java @@ -5,12 +5,10 @@ import com.azure.core.util.Context; import com.azure.storage.blob.models.BlobAccessPolicy; -import com.azure.storage.blob.models.BlobContainerAccessConditions; import com.azure.storage.blob.models.BlobListDetails; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobSignedIdentifier; -import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.ListBlobsOptions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PublicAccessType; import java.time.Duration; @@ -112,18 +110,17 @@ public void setDelete() { } /** - * Code snippet for {@link BlobContainerAsyncClient#deleteWithResponse(BlobContainerAccessConditions)} + * Code snippet for {@link BlobContainerAsyncClient#deleteWithResponse(BlobRequestConditions)} */ public void delete2() { - // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.deleteWithResponse#BlobContainerAccessConditions - BlobContainerAccessConditions accessConditions = new BlobContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.deleteWithResponse#BlobRequestConditions + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.deleteWithResponse(accessConditions).subscribe(response -> System.out.printf("Delete completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.BlobContainerAsyncClient.deleteWithResponse#BlobContainerAccessConditions + // END: com.azure.storage.blob.BlobContainerAsyncClient.deleteWithResponse#BlobRequestConditions } /** @@ -140,18 +137,16 @@ public void getProperties() { } /** - * Code snippet for {@link BlobContainerAsyncClient#getPropertiesWithResponse(LeaseAccessConditions)} + * Code snippet for {@link BlobContainerAsyncClient#getPropertiesWithResponse(String)} */ public void getProperties2() { - // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.getPropertiesWithResponse#LeaseAccessConditions - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - - client.getPropertiesWithResponse(accessConditions).subscribe(response -> + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.getPropertiesWithResponse#String + client.getPropertiesWithResponse(leaseId).subscribe(response -> System.out.printf("Public Access Type: %s, Legal Hold? %b, Immutable? %b%n", response.getValue().getBlobPublicAccess(), response.getValue().hasLegalHold(), response.getValue().hasImmutabilityPolicy())); - // END: com.azure.storage.blob.BlobContainerAsyncClient.getPropertiesWithResponse#LeaseAccessConditions + // END: com.azure.storage.blob.BlobContainerAsyncClient.getPropertiesWithResponse#String } /** @@ -167,19 +162,18 @@ public void setMetadata() { } /** - * Code snippet for {@link BlobContainerAsyncClient#setMetadataWithResponse(Map, BlobContainerAccessConditions)} + * Code snippet for {@link BlobContainerAsyncClient#setMetadataWithResponse(Map, BlobRequestConditions)} */ public void setMetadata2() { - // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.setMetadataWithResponse#Map-BlobContainerAccessConditions + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.setMetadataWithResponse#Map-BlobRequestConditions Map metadata = Collections.singletonMap("metadata", "value"); - BlobContainerAccessConditions accessConditions = new BlobContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.setMetadataWithResponse(metadata, accessConditions).subscribe(response -> System.out.printf("Set metadata completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.BlobContainerAsyncClient.setMetadataWithResponse#Map-BlobContainerAccessConditions + // END: com.azure.storage.blob.BlobContainerAsyncClient.setMetadataWithResponse#Map-BlobRequestConditions } /** @@ -200,13 +194,11 @@ public void getAccessPolicy() { } /** - * Code snippet for {@link BlobContainerAsyncClient#getAccessPolicyWithResponse(LeaseAccessConditions)} + * Code snippet for {@link BlobContainerAsyncClient#getAccessPolicyWithResponse(String)} */ public void getAccessPolicy2() { - // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.getAccessPolicyWithResponse#LeaseAccessConditions - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - - client.getAccessPolicyWithResponse(accessConditions).subscribe(response -> { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.getAccessPolicyWithResponse#String + client.getAccessPolicyWithResponse(leaseId).subscribe(response -> { System.out.printf("Blob Access Type: %s%n", response.getValue().getBlobAccessType()); for (BlobSignedIdentifier identifier : response.getValue().getIdentifiers()) { @@ -215,7 +207,7 @@ public void getAccessPolicy2() { identifier.getAccessPolicy().getPermissions()); } }); - // END: com.azure.storage.blob.BlobContainerAsyncClient.getAccessPolicyWithResponse#LeaseAccessConditions + // END: com.azure.storage.blob.BlobContainerAsyncClient.getAccessPolicyWithResponse#String } /** @@ -237,10 +229,10 @@ public void setAccessPolicy() { } /** - * Code snippet for {@link BlobContainerAsyncClient#setAccessPolicyWithResponse(PublicAccessType, List, BlobContainerAccessConditions)} + * Code snippet for {@link BlobContainerAsyncClient#setAccessPolicyWithResponse(PublicAccessType, List, BlobRequestConditions)} */ public void setAccessPolicy2() { - // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobContainerAccessConditions + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobRequestConditions BlobSignedIdentifier identifier = new BlobSignedIdentifier() .setId("name") .setAccessPolicy(new BlobAccessPolicy() @@ -248,15 +240,14 @@ public void setAccessPolicy2() { .setExpiresOn(OffsetDateTime.now().plusDays(7)) .setPermissions("permissionString")); - BlobContainerAccessConditions accessConditions = new BlobContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.setAccessPolicyWithResponse(PublicAccessType.CONTAINER, Collections.singletonList(identifier), accessConditions) .subscribe(response -> System.out.printf("Set access policy completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.BlobContainerAsyncClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobContainerAccessConditions + // END: com.azure.storage.blob.BlobContainerAsyncClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobRequestConditions } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java index 6e72cf732a66..b1b211e97ec0 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java @@ -5,15 +5,13 @@ import com.azure.core.util.Context; import com.azure.storage.blob.models.BlobAccessPolicy; -import com.azure.storage.blob.models.BlobContainerAccessConditions; import com.azure.storage.blob.models.BlobContainerAccessPolicies; import com.azure.storage.blob.models.BlobErrorCode; import com.azure.storage.blob.models.BlobListDetails; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobSignedIdentifier; import com.azure.storage.blob.models.BlobStorageException; -import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.ListBlobsOptions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; @@ -113,19 +111,18 @@ public void setDelete() { } /** - * Code snippet for {@link BlobContainerClient#deleteWithResponse(BlobContainerAccessConditions, Duration, Context)} + * Code snippet for {@link BlobContainerClient#deleteWithResponse(BlobRequestConditions, Duration, Context)} */ public void delete2() { - // BEGIN: com.azure.storage.blob.BlobContainerClient.deleteWithResponse#BlobContainerAccessConditions-Duration-Context - BlobContainerAccessConditions accessConditions = new BlobContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + // BEGIN: com.azure.storage.blob.BlobContainerClient.deleteWithResponse#BlobRequestConditions-Duration-Context + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); Context context = new Context("Key", "Value"); System.out.printf("Delete completed with status %d%n", client.deleteWithResponse( accessConditions, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.BlobContainerClient.deleteWithResponse#BlobContainerAccessConditions-Duration-Context + // END: com.azure.storage.blob.BlobContainerClient.deleteWithResponse#BlobRequestConditions-Duration-Context } /** @@ -142,20 +139,19 @@ public void getProperties() { } /** - * Code snippet for {@link BlobContainerClient#getPropertiesWithResponse(LeaseAccessConditions, Duration, Context)} + * Code snippet for {@link BlobContainerClient#getPropertiesWithResponse(String, Duration, Context)} */ public void getProperties2() { - // BEGIN: com.azure.storage.blob.BlobContainerClient.getPropertiesWithResponse#LeaseAccessConditions-Duration-Context - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); + // BEGIN: com.azure.storage.blob.BlobContainerClient.getPropertiesWithResponse#String-Duration-Context Context context = new Context("Key", "Value"); - BlobContainerProperties properties = client.getPropertiesWithResponse(accessConditions, timeout, context) + BlobContainerProperties properties = client.getPropertiesWithResponse(leaseId, timeout, context) .getValue(); System.out.printf("Public Access Type: %s, Legal Hold? %b, Immutable? %b%n", properties.getBlobPublicAccess(), properties.hasLegalHold(), properties.hasImmutabilityPolicy()); - // END: com.azure.storage.blob.BlobContainerClient.getPropertiesWithResponse#LeaseAccessConditions-Duration-Context + // END: com.azure.storage.blob.BlobContainerClient.getPropertiesWithResponse#String-Duration-Context } /** @@ -174,21 +170,20 @@ public void setMetadata() { } /** - * Code snippet for {@link BlobContainerClient#setMetadataWithResponse(Map, BlobContainerAccessConditions, Duration, + * Code snippet for {@link BlobContainerClient#setMetadataWithResponse(Map, BlobRequestConditions, Duration, * Context)} */ public void setMetadata2() { - // BEGIN: com.azure.storage.blob.BlobContainerClient.setMetadataWithResponse#Map-BlobContainerAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.BlobContainerClient.setMetadataWithResponse#Map-BlobRequestConditions-Duration-Context Map metadata = Collections.singletonMap("metadata", "value"); - BlobContainerAccessConditions accessConditions = new BlobContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); Context context = new Context("Key", "Value"); System.out.printf("Set metadata completed with status %d%n", client.setMetadataWithResponse(metadata, accessConditions, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.BlobContainerClient.setMetadataWithResponse#Map-BlobContainerAccessConditions-Duration-Context + // END: com.azure.storage.blob.BlobContainerClient.setMetadataWithResponse#Map-BlobRequestConditions-Duration-Context } /** @@ -208,13 +203,12 @@ public void getAccessPolicy() { } /** - * Code snippet for {@link BlobContainerClient#getAccessPolicyWithResponse(LeaseAccessConditions, Duration, Context)} + * Code snippet for {@link BlobContainerClient#getAccessPolicyWithResponse(String, Duration, Context)} */ public void getAccessPolicy2() { - // BEGIN: com.azure.storage.blob.BlobContainerClient.getAccessPolicyWithResponse#LeaseAccessConditions-Duration-Context - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); + // BEGIN: com.azure.storage.blob.BlobContainerClient.getAccessPolicyWithResponse#String-Duration-Context Context context = new Context("Key", "Value"); - BlobContainerAccessPolicies accessPolicies = client.getAccessPolicyWithResponse(accessConditions, timeout, context) + BlobContainerAccessPolicies accessPolicies = client.getAccessPolicyWithResponse(leaseId, timeout, context) .getValue(); System.out.printf("Blob Access Type: %s%n", accessPolicies.getBlobAccessType()); @@ -223,7 +217,7 @@ public void getAccessPolicy2() { identifier.getId(), identifier.getAccessPolicy().getPermissions()); } - // END: com.azure.storage.blob.BlobContainerClient.getAccessPolicyWithResponse#LeaseAccessConditions-Duration-Context + // END: com.azure.storage.blob.BlobContainerClient.getAccessPolicyWithResponse#String-Duration-Context } /** @@ -249,10 +243,10 @@ public void setAccessPolicy() { /** * Code snippet for {@link BlobContainerClient#setAccessPolicyWithResponse(PublicAccessType, List, - * BlobContainerAccessConditions, Duration, Context)} + * BlobRequestConditions, Duration, Context)} */ public void setAccessPolicy2() { - // BEGIN: com.azure.storage.blob.BlobContainerClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobContainerAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.BlobContainerClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobRequestConditions-Duration-Context BlobSignedIdentifier identifier = new BlobSignedIdentifier() .setId("name") .setAccessPolicy(new BlobAccessPolicy() @@ -260,10 +254,9 @@ public void setAccessPolicy2() { .setExpiresOn(OffsetDateTime.now().plusDays(7)) .setPermissions("permissionString")); - BlobContainerAccessConditions accessConditions = new BlobContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); Context context = new Context("Key", "Value"); @@ -273,7 +266,7 @@ public void setAccessPolicy2() { accessConditions, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.BlobContainerClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobContainerAccessConditions-Duration-Context + // END: com.azure.storage.blob.BlobContainerClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobRequestConditions-Duration-Context } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java index e98c1aa5b75b..b046637808a0 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java @@ -3,14 +3,10 @@ package com.azure.storage.blob.specialized; -import com.azure.storage.blob.models.AppendBlobAccessConditions; -import com.azure.storage.blob.models.AppendPositionAccessConditions; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.AppendBlobRequestConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import reactor.core.publisher.Flux; import java.nio.ByteBuffer; @@ -44,22 +40,20 @@ public void create() { } /** - * Code snippet for {@link AppendBlobAsyncClient#createWithResponse(BlobHttpHeaders, Map, BlobAccessConditions)} + * Code snippet for {@link AppendBlobAsyncClient#createWithResponse(BlobHttpHeaders, Map, BlobRequestConditions)} */ public void create2() { - // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.createWithResponse#BlobHttpHeaders-Map-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.createWithResponse#BlobHttpHeaders-Map-BlobRequestConditions BlobHttpHeaders headers = new BlobHttpHeaders() .setBlobContentType("binary") .setBlobContentLanguage("en-US"); Map metadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.createWithResponse(headers, metadata, accessConditions).subscribe(response -> System.out.printf("Created AppendBlob at %s%n", response.getValue().getLastModified())); - // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.createWithResponse#BlobHttpHeaders-Map-BlobAccessConditions + // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.createWithResponse#BlobHttpHeaders-Map-BlobRequestConditions } /** @@ -73,14 +67,13 @@ public void appendBlock() { } /** - * Code snippet for {@link AppendBlobAsyncClient#appendBlockWithResponse(Flux, long, AppendBlobAccessConditions)} + * Code snippet for {@link AppendBlobAsyncClient#appendBlockWithResponse(Flux, long, AppendBlobRequestConditions)} */ public void appendBlock2() { // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockWithResponse#Flux-long-AppendBlobAccessConditions - AppendBlobAccessConditions accessConditions = new AppendBlobAccessConditions() - .setAppendPositionAccessConditions(new AppendPositionAccessConditions() - .setAppendPosition(POSITION) - .setMaxSize(maxSize)); + AppendBlobRequestConditions accessConditions = new AppendBlobRequestConditions() + .setAppendPosition(POSITION) + .setMaxSize(maxSize); client.appendBlockWithResponse(data, length, accessConditions).subscribe(response -> System.out.printf("AppendBlob has %d committed blocks%n", response.getValue().getBlobCommittedBlockCount())); @@ -98,21 +91,20 @@ public void appendBlockFromUrl() { } /** - * Code snippet for {@link AppendBlobAsyncClient#appendBlockFromUrlWithResponse(String, BlobRange, byte[], AppendBlobAccessConditions, SourceModifiedAccessConditions)} + * Code snippet for {@link AppendBlobAsyncClient#appendBlockFromUrlWithResponse(String, BlobRange, byte[], AppendBlobRequestConditions, BlobRequestConditions)} */ public void appendBlockFromUrl2() { - // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions - AppendBlobAccessConditions appendBlobAccessConditions = new AppendBlobAccessConditions() - .setAppendPositionAccessConditions(new AppendPositionAccessConditions() - .setAppendPosition(POSITION) - .setMaxSize(maxSize)); + // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobRequestConditions-BlobRequestConditions + AppendBlobRequestConditions appendBlobRequestConditions = new AppendBlobRequestConditions() + .setAppendPosition(POSITION) + .setMaxSize(maxSize); - SourceModifiedAccessConditions modifiedAccessConditions = new SourceModifiedAccessConditions() - .setSourceIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + BlobRequestConditions modifiedAccessConditions = new BlobRequestConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.appendBlockFromUrlWithResponse(sourceUrl, new BlobRange(offset, count), null, - appendBlobAccessConditions, modifiedAccessConditions).subscribe(response -> + appendBlobRequestConditions, modifiedAccessConditions).subscribe(response -> System.out.printf("AppendBlob has %d committed blocks%n", response.getValue().getBlobCommittedBlockCount())); - // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions + // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobRequestConditions-BlobRequestConditions } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java index 829ddb462da8..04fc30d5f83d 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java @@ -4,14 +4,10 @@ package com.azure.storage.blob.specialized; import com.azure.core.util.Context; -import com.azure.storage.blob.models.AppendBlobAccessConditions; -import com.azure.storage.blob.models.AppendPositionAccessConditions; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.AppendBlobRequestConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; +import com.azure.storage.blob.models.BlobRequestConditions; import java.io.ByteArrayInputStream; import java.io.InputStream; @@ -47,24 +43,23 @@ public void create() { } /** - * Code snippet for {@link AppendBlobClient#createWithResponse(BlobHttpHeaders, Map, BlobAccessConditions, + * Code snippet for {@link AppendBlobClient#createWithResponse(BlobHttpHeaders, Map, BlobRequestConditions, * Duration, Context)} */ public void createWithResponse() { - // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.createWithResponse#BlobHttpHeaders-Map-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.createWithResponse#BlobHttpHeaders-Map-BlobRequestConditions-Duration-Context BlobHttpHeaders headers = new BlobHttpHeaders() .setBlobContentType("binary") .setBlobContentLanguage("en-US"); Map metadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); Context context = new Context("key", "value"); System.out.printf("Created AppendBlob at %s%n", client.createWithResponse(headers, metadata, accessConditions, timeout, context).getValue().getLastModified()); - // END: com.azure.storage.blob.specialized.AppendBlobClient.createWithResponse#BlobHttpHeaders-Map-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.AppendBlobClient.createWithResponse#BlobHttpHeaders-Map-BlobRequestConditions-Duration-Context } /** @@ -78,15 +73,14 @@ public void appendBlock() { } /** - * Code snippet for {@link AppendBlobClient#appendBlockWithResponse(InputStream, long, AppendBlobAccessConditions, + * Code snippet for {@link AppendBlobClient#appendBlockWithResponse(InputStream, long, AppendBlobRequestConditions, * Duration, Context)} */ public void appendBlock2() { // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.appendBlockWithResponse#InputStream-long-AppendBlobAccessConditions-Duration-Context - AppendBlobAccessConditions accessConditions = new AppendBlobAccessConditions() - .setAppendPositionAccessConditions(new AppendPositionAccessConditions() - .setAppendPosition(POSITION) - .setMaxSize(maxSize)); + AppendBlobRequestConditions accessConditions = new AppendBlobRequestConditions() + .setAppendPosition(POSITION) + .setMaxSize(maxSize); Context context = new Context("key", "value"); System.out.printf("AppendBlob has %d committed blocks%n", @@ -107,24 +101,23 @@ public void appendBlockFromUrl() { /** * Code snippet for {@link AppendBlobClient#appendBlockFromUrlWithResponse(String, BlobRange, byte[], - * AppendBlobAccessConditions, SourceModifiedAccessConditions, Duration, Context)} + * AppendBlobRequestConditions, BlobRequestConditions, Duration, Context)} */ public void appendBlockFromUrlWithResponse() { - // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context - AppendBlobAccessConditions appendBlobAccessConditions = new AppendBlobAccessConditions() - .setAppendPositionAccessConditions(new AppendPositionAccessConditions() - .setAppendPosition(POSITION) - .setMaxSize(maxSize)); + // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobRequestConditions-BlobRequestConditions-Duration-Context + AppendBlobRequestConditions appendBlobRequestConditions = new AppendBlobRequestConditions() + .setAppendPosition(POSITION) + .setMaxSize(maxSize); - SourceModifiedAccessConditions modifiedAccessConditions = new SourceModifiedAccessConditions() - .setSourceIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + BlobRequestConditions modifiedAccessConditions = new BlobRequestConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); Context context = new Context("key", "value"); System.out.printf("AppendBlob has %d committed blocks%n", client.appendBlockFromUrlWithResponse(sourceUrl, new BlobRange(offset, count), null, - appendBlobAccessConditions, modifiedAccessConditions, timeout, + appendBlobRequestConditions, modifiedAccessConditions, timeout, context).getValue().getBlobCommittedBlockCount()); - // END: com.azure.storage.blob.specialized.AppendBlobClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.AppendBlobClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobRequestConditions-BlobRequestConditions-Duration-Context } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java index 5ca38d362a84..c4927261706f 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java @@ -3,16 +3,15 @@ package com.azure.storage.blob.specialized; -import com.azure.core.util.polling.Poller; +import com.azure.core.http.RequestConditions; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.core.util.polling.Poller; import com.azure.storage.blob.models.BlobCopyInfo; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.ReliableDownloadOptions; @@ -94,7 +93,7 @@ public void downloadCodeSnippet() { /** * Code snippet for {@link BlobAsyncClientBase#downloadWithResponse(BlobRange, ReliableDownloadOptions, - * BlobAccessConditions, boolean)} + * BlobRequestConditions, boolean)} * * @throws UncheckedIOException If an I/O error occurs */ @@ -118,21 +117,21 @@ public void downloadWithResponseCodeSnippet() { /** * Code snippets for {@link BlobAsyncClientBase#downloadToFile(String)} and {@link BlobAsyncClientBase#downloadToFileWithResponse(String, - * BlobRange, ParallelTransferOptions, ReliableDownloadOptions, BlobAccessConditions, boolean)} + * BlobRange, ParallelTransferOptions, ReliableDownloadOptions, BlobRequestConditions, boolean)} */ public void downloadToFileCodeSnippet() { // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFile#String client.downloadToFile(file).subscribe(response -> System.out.println("Completed download to file")); // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFile#String - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobRequestConditions-boolean BlobRange range = new BlobRange(1024, 2048L); ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); client.downloadToFileWithResponse(file, range, null, options, null, false) .subscribe(response -> System.out.println("Completed download to file")); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobRequestConditions-boolean } /** @@ -224,15 +223,14 @@ public void existsWithResponseCodeSnippet() { /** * Code snippets for {@link BlobAsyncClientBase#beginCopy(String, Map, AccessTier, - * RehydratePriority, ModifiedAccessConditions, BlobAccessConditions, Duration)} + * RehydratePriority, RequestConditions, BlobRequestConditions, Duration)} */ public void beginCopyCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-RequestConditions-BlobRequestConditions-Duration Map metadata = Collections.singletonMap("metadata", "value"); - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions blobAccessConditions = new BlobRequestConditions().setLeaseId(leaseId); client.beginCopy(url, metadata, AccessTier.HOT, RehydratePriority.STANDARD, modifiedAccessConditions, blobAccessConditions, Duration.ofSeconds(2)) @@ -241,62 +239,59 @@ public void beginCopyCodeSnippets() { BlobCopyInfo info = response.getValue(); System.out.printf("CopyId: %s. Status: %s%n", info.getCopyId(), info.getCopyStatus()); }); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-RequestConditions-BlobRequestConditions-Duration } /** * Code snippets for {@link BlobAsyncClientBase#beginCopy(String, Map, AccessTier, - * RehydratePriority, ModifiedAccessConditions, BlobAccessConditions, Duration)} + * RehydratePriority, RequestConditions, BlobRequestConditions, Duration)} */ public void beginCopyFromUrlCancelCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopyFromUrlCancel#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopyFromUrlCancel#String-Map-AccessTier-RehydratePriority-RequestConditions-BlobRequestConditions-Duration Map metadata = Collections.singletonMap("metadata", "value"); - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); Poller poller = client.beginCopy(url, metadata, AccessTier.HOT, - RehydratePriority.STANDARD, modifiedAccessConditions, blobAccessConditions, Duration.ofSeconds(2)); + RehydratePriority.STANDARD, modifiedAccessConditions, blobRequestConditions, Duration.ofSeconds(2)); // Cancel a poll operation. poller.cancelOperation().block(); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopyFromUrlCancel#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.beginCopyFromUrlCancel#String-Map-AccessTier-RehydratePriority-RequestConditions-BlobRequestConditions-Duration } /** - * Code snippets for {@link BlobAsyncClientBase#abortCopyFromURLWithResponse(String, LeaseAccessConditions)} + * Code snippets for {@link BlobAsyncClientBase#abortCopyFromURLWithResponse(String, String)} */ public void abortCopyFromURLWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURLWithResponse#String-LeaseAccessConditions - LeaseAccessConditions leaseAccessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - client.abortCopyFromURLWithResponse(copyId, leaseAccessConditions) + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURLWithResponse#String-String + client.abortCopyFromURLWithResponse(copyId, leaseId) .subscribe(response -> System.out.printf("Aborted copy completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURLWithResponse#String-LeaseAccessConditions + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURLWithResponse#String-String } /** * Code snippets for {@link BlobAsyncClientBase#copyFromURLWithResponse(String, Map, AccessTier, - * ModifiedAccessConditions, BlobAccessConditions)} + * RequestConditions, BlobRequestConditions)} */ public void copyFromURLWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURLWithResponse#String-Map-AccessTier-ModifiedAccessConditions-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURLWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions Map metadata = Collections.singletonMap("metadata", "value"); - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); - client.copyFromURLWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, blobAccessConditions) + client.copyFromURLWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, blobRequestConditions) .subscribe(response -> System.out.printf("Copy identifier: %s%n", response)); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURLWithResponse#String-Map-AccessTier-ModifiedAccessConditions-BlobAccessConditions + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURLWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions } /** * Code snippets for {@link BlobAsyncClientBase#downloadWithResponse(BlobRange, ReliableDownloadOptions, - * BlobAccessConditions, boolean)} + * BlobRequestConditions, boolean)} * * @throws UncheckedIOException If an I/O error occurs */ @@ -319,39 +314,37 @@ public void downloadWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClientBase#deleteWithResponse(DeleteSnapshotsOptionType, BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClientBase#deleteWithResponse(DeleteSnapshotsOptionType, BlobRequestConditions)} */ public void deleteWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobRequestConditions client.deleteWithResponse(DeleteSnapshotsOptionType.INCLUDE, null) .subscribe(response -> System.out.printf("Delete completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobRequestConditions } /** - * Code snippets for {@link BlobAsyncClientBase#getPropertiesWithResponse(BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClientBase#getPropertiesWithResponse(BlobRequestConditions)} */ public void getPropertiesWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.getPropertiesWithResponse#BlobAccessConditions - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.getPropertiesWithResponse#BlobRequestConditions + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); client.getPropertiesWithResponse(accessConditions).subscribe( response -> System.out.printf("Type: %s, Size: %d%n", response.getValue().getBlobType(), response.getValue().getBlobSize())); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.getPropertiesWithResponse#BlobAccessConditions + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.getPropertiesWithResponse#BlobRequestConditions } /** - * Code snippets for {@link BlobAsyncClientBase#setHttpHeadersWithResponse(BlobHttpHeaders, BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClientBase#setHttpHeadersWithResponse(BlobHttpHeaders, BlobRequestConditions)} */ public void setHTTPHeadersWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobRequestConditions + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); client.setHttpHeadersWithResponse(new BlobHttpHeaders() .setBlobContentLanguage("en-US") @@ -359,48 +352,44 @@ public void setHTTPHeadersWithResponseCodeSnippets() { response -> System.out.printf("Set HTTP headers completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobRequestConditions } /** - * Code snippets for {@link BlobAsyncClientBase#setMetadataWithResponse(Map, BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClientBase#setMetadataWithResponse(Map, BlobRequestConditions)} */ public void setMetadataWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setMetadataWithResponse#Map-BlobAccessConditions - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setMetadataWithResponse#Map-BlobRequestConditions + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); client.setMetadataWithResponse(Collections.singletonMap("metadata", "value"), accessConditions) .subscribe(response -> System.out.printf("Set metadata completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setMetadataWithResponse#Map-BlobAccessConditions + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setMetadataWithResponse#Map-BlobRequestConditions } /** - * Code snippets for {@link BlobAsyncClientBase#createSnapshotWithResponse(Map, BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClientBase#createSnapshotWithResponse(Map, BlobRequestConditions)} */ public void createSnapshotWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.createSnapshotWithResponse#Map-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.createSnapshotWithResponse#Map-BlobRequestConditions Map snapshotMetadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); client.createSnapshotWithResponse(snapshotMetadata, accessConditions) .subscribe(response -> System.out.printf("Identifier for the snapshot is %s%n", response.getValue())); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.createSnapshotWithResponse#Map-BlobAccessConditions + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.createSnapshotWithResponse#Map-BlobRequestConditions } /** - * Code snippets for {@link BlobAsyncClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions)} + * Code snippets for {@link BlobAsyncClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, String)} */ public void setTierWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - - client.setAccessTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, accessConditions) + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-String + client.setAccessTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, leaseId) .subscribe(response -> System.out.printf("Set tier completed with status code %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-String } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java index 80b2213a0a72..180556b80107 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java @@ -3,18 +3,17 @@ package com.azure.storage.blob.specialized; +import com.azure.core.http.RequestConditions; import com.azure.core.util.Context; import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.Poller; import com.azure.storage.blob.BlobProperties; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobCopyInfo; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.ReliableDownloadOptions; @@ -97,7 +96,7 @@ public void download() { /** * Code snippets for {@link BlobClientBase#downloadToFile(String)} and - * {@link BlobClientBase#downloadToFileWithResponse(String, BlobRange, ParallelTransferOptions, ReliableDownloadOptions, BlobAccessConditions, + * {@link BlobClientBase#downloadToFileWithResponse(String, BlobRange, ParallelTransferOptions, ReliableDownloadOptions, BlobRequestConditions, * boolean, Duration, Context)} */ public void downloadToFile() { @@ -106,14 +105,14 @@ public void downloadToFile() { System.out.println("Completed download to file"); // END: com.azure.storage.blob.specialized.BlobClientBase.downloadToFile#String - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobRequestConditions-boolean-Duration-Context BlobRange range = new BlobRange(1024, 2048L); ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); client.downloadToFileWithResponse(file, range, new ParallelTransferOptions().setBlockSize(4 * Constants.MB), options, null, false, timeout, new Context(key2, value2)); System.out.println("Completed download to file"); - // END: com.azure.storage.blob.specialized.BlobClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobRequestConditions-boolean-Duration-Context } /** @@ -168,13 +167,12 @@ public void createSnapshot() { } /** - * Code snippets for {@link BlobClientBase#setAccessTier(AccessTier)} and - * {@link BlobClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClientBase#setAccessTier(AccessTier)} */ public void setTier() { // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setAccessTier#AccessTier - System.out.printf("Set tier completed with status code %d%n", - client.setAccessTierWithResponse(AccessTier.HOT, null, null, null, null).getStatusCode()); + client.setAccessTier(AccessTier.HOT); + System.out.println("Set tier completed."); // END: com.azure.storage.blob.specialized.BlobClientBase.setAccessTier#AccessTier @@ -211,59 +209,56 @@ public void existsWithResponseCodeSnippet() { /** * Code snippets for {@link BlobClientBase#beginCopy(String, Map, AccessTier, RehydratePriority, - * ModifiedAccessConditions, BlobAccessConditions, Duration)} + * RequestConditions, BlobRequestConditions, Duration)} */ public void beginCopyFromUrl() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-RequestConditions-BlobRequestConditions-Duration Map metadata = Collections.singletonMap("metadata", "value"); - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions blobAccessConditions = new BlobRequestConditions().setLeaseId(leaseId); Poller poller = client.beginCopy(url, metadata, AccessTier.HOT, RehydratePriority.STANDARD, modifiedAccessConditions, blobAccessConditions, Duration.ofSeconds(2)); PollResponse response = poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); System.out.printf("Copy identifier: %s%n", response.getValue().getCopyId()); - // END: com.azure.storage.blob.specialized.BlobClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration + // END: com.azure.storage.blob.specialized.BlobClientBase.beginCopy#String-Map-AccessTier-RehydratePriority-RequestConditions-BlobRequestConditions-Duration } /** - * Code snippets for {@link BlobClientBase#abortCopyFromURLWithResponse(String, LeaseAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClientBase#abortCopyFromURLWithResponse(String, String, Duration, Context)} */ public void abortCopyFromURLWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURLWithResponse#String-LeaseAccessConditions-Duration-Context - LeaseAccessConditions leaseAccessConditions = new LeaseAccessConditions().setLeaseId(leaseId); + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURLWithResponse#String-String-Duration-Context System.out.printf("Aborted copy completed with status %d%n", - client.abortCopyFromURLWithResponse(copyId, leaseAccessConditions, timeout, + client.abortCopyFromURLWithResponse(copyId, leaseId, timeout, new Context(key2, value2)).getStatusCode()); - // END: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURLWithResponse#String-LeaseAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURLWithResponse#String-String-Duration-Context } /** - * Code snippets for {@link BlobClientBase#copyFromURLWithResponse(String, Map, AccessTier, ModifiedAccessConditions, - * BlobAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClientBase#copyFromURLWithResponse(String, Map, AccessTier, RequestConditions, + * BlobRequestConditions, Duration, Context)} */ public void copyFromURLWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.copyFromURLWithResponse#String-Map-AccessTier-ModifiedAccessConditions-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.copyFromURLWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context Map metadata = Collections.singletonMap("metadata", "value"); - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); System.out.printf("Copy identifier: %s%n", client.copyFromURLWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, - blobAccessConditions, timeout, + blobRequestConditions, timeout, new Context(key1, value1)).getValue()); - // END: com.azure.storage.blob.specialized.BlobClientBase.copyFromURLWithResponse#String-Map-AccessTier-ModifiedAccessConditions-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.copyFromURLWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context } /** * Code snippets for {@link BlobClientBase#downloadWithResponse(OutputStream, BlobRange, ReliableDownloadOptions, - * BlobAccessConditions, boolean, Duration, Context)} + * BlobRequestConditions, boolean, Duration, Context)} * @throws UncheckedIOException If an I/O error occurs */ public void downloadWithResponseCodeSnippets() { @@ -279,92 +274,86 @@ public void downloadWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClientBase#deleteWithResponse(DeleteSnapshotsOptionType, BlobAccessConditions, Duration, + * Code snippets for {@link BlobClientBase#deleteWithResponse(DeleteSnapshotsOptionType, BlobRequestConditions, Duration, * Context)} */ public void deleteWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobRequestConditions-Duration-Context System.out.printf("Delete completed with status %d%n", client.deleteWithResponse(DeleteSnapshotsOptionType.INCLUDE, null, timeout, new Context(key1, value1)).getStatusCode()); - // END: com.azure.storage.blob.specialized.BlobClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobRequestConditions-Duration-Context } /** - * Code snippets for {@link BlobClientBase#getPropertiesWithResponse(BlobAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClientBase#getPropertiesWithResponse(BlobRequestConditions, Duration, Context)} */ public void getPropertiesWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.getPropertiesWithResponse#BlobAccessConditions-Duration-Context - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.getPropertiesWithResponse#BlobRequestConditions-Duration-Context + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); BlobProperties properties = client.getPropertiesWithResponse(accessConditions, timeout, new Context(key2, value2)).getValue(); System.out.printf("Type: %s, Size: %d%n", properties.getBlobType(), properties.getBlobSize()); - // END: com.azure.storage.blob.specialized.BlobClientBase.getPropertiesWithResponse#BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.getPropertiesWithResponse#BlobRequestConditions-Duration-Context } /** - * Code snippets for {@link BlobClientBase#setHttpHeadersWithResponse(BlobHttpHeaders, BlobAccessConditions, Duration, + * Code snippets for {@link BlobClientBase#setHttpHeadersWithResponse(BlobHttpHeaders, BlobRequestConditions, Duration, * Context)} */ public void setHTTPHeadersWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions-Duration-Context - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobRequestConditions-Duration-Context + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); System.out.printf("Set HTTP headers completed with status %d%n", client.setHttpHeadersWithResponse(new BlobHttpHeaders() .setBlobContentLanguage("en-US") .setBlobContentType("binary"), accessConditions, timeout, new Context(key1, value1)) .getStatusCode()); - // END: com.azure.storage.blob.specialized.BlobClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobRequestConditions-Duration-Context } /** - * Code snippets for {@link BlobClientBase#setMetadataWithResponse(Map, BlobAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClientBase#setMetadataWithResponse(Map, BlobRequestConditions, Duration, Context)} */ public void setMetadataWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setMetadataWithResponse#Map-BlobAccessConditions-Duration-Context - BlobAccessConditions accessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setMetadataWithResponse#Map-BlobRequestConditions-Duration-Context + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); System.out.printf("Set metadata completed with status %d%n", client.setMetadataWithResponse(Collections.singletonMap("metadata", "value"), accessConditions, timeout, new Context(key1, value1)).getStatusCode()); - // END: com.azure.storage.blob.specialized.BlobClientBase.setMetadataWithResponse#Map-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.setMetadataWithResponse#Map-BlobRequestConditions-Duration-Context } /** - * Code snippets for {@link BlobClientBase#createSnapshotWithResponse(Map, BlobAccessConditions, Duration, + * Code snippets for {@link BlobClientBase#createSnapshotWithResponse(Map, BlobRequestConditions, Duration, * Context)} */ public void createSnapshotWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.createSnapshotWithResponse#Map-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.createSnapshotWithResponse#Map-BlobRequestConditions-Duration-Context Map snapshotMetadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); System.out.printf("Identifier for the snapshot is %s%n", client.createSnapshotWithResponse(snapshotMetadata, accessConditions, timeout, new Context(key1, value1)).getValue()); - // END: com.azure.storage.blob.specialized.BlobClientBase.createSnapshotWithResponse#Map-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.createSnapshotWithResponse#Map-BlobRequestConditions-Duration-Context } /** - * Code snippets for {@link BlobClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, String, Duration, Context)} */ public void setTierWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions-Duration-Context - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-String-Duration-Context System.out.printf("Set tier completed with status code %d%n", - client.setAccessTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, accessConditions, timeout, + client.setAccessTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, leaseId, timeout, new Context(key2, value2)).getStatusCode()); - // END: com.azure.storage.blob.specialized.BlobClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-String-Duration-Context } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java index 840928d8ff9e..a7035fe96eec 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java @@ -4,14 +4,11 @@ package com.azure.storage.blob.specialized; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlockList; import com.azure.storage.blob.models.BlockListType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; import reactor.core.publisher.Flux; import java.nio.ByteBuffer; @@ -48,7 +45,7 @@ public void upload() { } /** - * Code snippet for {@link BlockBlobAsyncClient#uploadWithResponse(Flux, long, BlobHttpHeaders, Map, AccessTier, BlobAccessConditions)} + * Code snippet for {@link BlockBlobAsyncClient#uploadWithResponse(Flux, long, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions)} */ public void upload2() { // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.uploadWithResponse#Flux-long-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions @@ -58,10 +55,9 @@ public void upload2() { .setBlobContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.uploadWithResponse(data, length, headers, metadata, AccessTier.HOT, accessConditions) .subscribe(response -> System.out.printf("Uploaded BlockBlob MD5 is %s%n", @@ -82,14 +78,13 @@ public void stageBlock() { } /** - * Code snippet for {@link BlockBlobAsyncClient#stageBlockWithResponse(String, Flux, long, LeaseAccessConditions)} + * Code snippet for {@link BlockBlobAsyncClient#stageBlockWithResponse(String, Flux, long, String)} */ public void stageBlock2() { - // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockWithResponse#String-Flux-long-LeaseAccessConditions - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - client.stageBlockWithResponse(base64BlockID, data, length, accessConditions).subscribe(response -> + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockWithResponse#String-Flux-long-String + client.stageBlockWithResponse(base64BlockID, data, length, leaseId).subscribe(response -> System.out.printf("Staging block completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockWithResponse#String-Flux-long-LeaseAccessConditions + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockWithResponse#String-Flux-long-String } /** @@ -105,18 +100,17 @@ public void stageBlockFromURL() { } /** - * Code snippet for {@link BlockBlobAsyncClient#stageBlockFromURLWithResponse(String, String, BlobRange, byte[], LeaseAccessConditions, SourceModifiedAccessConditions)} + * Code snippet for {@link BlockBlobAsyncClient#stageBlockFromURLWithResponse(String, String, BlobRange, byte[], String, BlobRequestConditions)} */ public void stageBlockFromURL2() { - // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions - LeaseAccessConditions leaseAccessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - SourceModifiedAccessConditions sourceModifiedAccessConditions = new SourceModifiedAccessConditions() - .setSourceIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions + BlobRequestConditions sourceRequestConditions = new BlobRequestConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.stageBlockFromURLWithResponse(base64BlockID, sourceUrl, new BlobRange(offset, count), null, - leaseAccessConditions, sourceModifiedAccessConditions).subscribe(response -> + leaseId, sourceRequestConditions).subscribe(response -> System.out.printf("Staging block from URL completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions } /** @@ -135,13 +129,11 @@ public void listBlocks() { } /** - * Code snippet for {@link BlockBlobAsyncClient#listBlocksWithResponse(BlockListType, LeaseAccessConditions)} + * Code snippet for {@link BlockBlobAsyncClient#listBlocksWithResponse(BlockListType, String)} */ public void listBlocks2() { - // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - - client.listBlocksWithResponse(BlockListType.ALL, accessConditions).subscribe(response -> { + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocksWithResponse#BlockListType-String + client.listBlocksWithResponse(BlockListType.ALL, leaseId).subscribe(response -> { BlockList block = response.getValue(); System.out.println("Committed Blocks:"); block.getCommittedBlocks().forEach(b -> System.out.printf("Name: %s, Size: %d", b.getName(), b.getSize())); @@ -149,7 +141,7 @@ public void listBlocks2() { System.out.println("Uncommitted Blocks:"); block.getUncommittedBlocks().forEach(b -> System.out.printf("Name: %s, Size: %d", b.getName(), b.getSize())); }); - // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocksWithResponse#BlockListType-String } /** @@ -163,23 +155,22 @@ public void commitBlockList() { } /** - * Code snippet for {@link BlockBlobAsyncClient#commitBlockListWithResponse(List, BlobHttpHeaders, Map, AccessTier, BlobAccessConditions)} + * Code snippet for {@link BlockBlobAsyncClient#commitBlockListWithResponse(List, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions)} */ public void commitBlockList2() { - // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions BlobHttpHeaders headers = new BlobHttpHeaders() .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) .setBlobContentLanguage("en-US") .setBlobContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.commitBlockListWithResponse(Collections.singletonList(base64BlockID), headers, metadata, AccessTier.HOT, accessConditions).subscribe(response -> System.out.printf("Committing block list completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java index 3baffd8aef1e..6d77e4a94c1a 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java @@ -5,14 +5,11 @@ import com.azure.core.util.Context; import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlockList; import com.azure.storage.blob.models.BlockListType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -53,20 +50,19 @@ public void upload() throws IOException { } /** - * Code snippet for {@link BlockBlobClient#uploadWithResponse(InputStream, long, BlobHttpHeaders, Map, AccessTier, BlobAccessConditions, Duration, Context)} + * Code snippet for {@link BlockBlobClient#uploadWithResponse(InputStream, long, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions, Duration, Context)} */ public void upload2() { - // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration-Context BlobHttpHeaders headers = new BlobHttpHeaders() .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) .setBlobContentLanguage("en-US") .setBlobContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); Context context = new Context("key", "value"); System.out.printf("Uploaded BlockBlob MD5 is %s%n", Base64.getEncoder() @@ -74,7 +70,7 @@ public void upload2() { accessConditions, timeout, context) .getValue() .getContentMD5())); - // END: com.azure.storage.blob.specialized.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration-Context } /** @@ -87,15 +83,14 @@ public void stageBlock() { } /** - * Code snippet for {@link BlockBlobClient#stageBlockWithResponse(String, InputStream, long, LeaseAccessConditions, Duration, Context)} + * Code snippet for {@link BlockBlobClient#stageBlockWithResponse(String, InputStream, long, String, Duration, Context)} */ public void stageBlock2() { - // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-LeaseAccessConditions-Duration-Context - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-String-Duration-Context Context context = new Context("key", "value"); System.out.printf("Staging block completed with status %d%n", - client.stageBlockWithResponse(base64BlockID, data, length, accessConditions, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-LeaseAccessConditions-Duration-Context + client.stageBlockWithResponse(base64BlockID, data, length, leaseId, timeout, context).getStatusCode()); + // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-String-Duration-Context } /** @@ -108,19 +103,18 @@ public void stageBlockFromURL() { } /** - * Code snippet for {@link BlockBlobClient#stageBlockFromURLWithResponse(String, String, BlobRange, byte[], LeaseAccessConditions, SourceModifiedAccessConditions, Duration, Context)} + * Code snippet for {@link BlockBlobClient#stageBlockFromURLWithResponse(String, String, BlobRange, byte[], String, BlobRequestConditions, Duration, Context)} */ public void stageBlockFromURL2() { - // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions-Duration-Context - LeaseAccessConditions leaseAccessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - SourceModifiedAccessConditions sourceModifiedAccessConditions = new SourceModifiedAccessConditions() - .setSourceIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions-Duration-Context + BlobRequestConditions sourceRequestConditions = new BlobRequestConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); Context context = new Context("key", "value"); System.out.printf("Staging block from URL completed with status %d%n", client.stageBlockFromURLWithResponse(base64BlockID, sourceUrl, new BlobRange(offset, count), null, - leaseAccessConditions, sourceModifiedAccessConditions, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions-Duration-Context + leaseId, sourceRequestConditions, timeout, context).getStatusCode()); + // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions-Duration-Context } /** @@ -139,20 +133,19 @@ public void listBlocks() { } /** - * Code snippet for {@link BlockBlobClient#listBlocksWithResponse(BlockListType, LeaseAccessConditions, Duration, Context)} + * Code snippet for {@link BlockBlobClient#listBlocksWithResponse(BlockListType, String, Duration, Context)} */ public void listBlocks2() { - // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions-Duration-Context - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.listBlocksWithResponse#BlockListType-String-Duration-Context Context context = new Context("key", "value"); - BlockList block = client.listBlocksWithResponse(BlockListType.ALL, accessConditions, timeout, context).getValue(); + BlockList block = client.listBlocksWithResponse(BlockListType.ALL, leaseId, timeout, context).getValue(); System.out.println("Committed Blocks:"); block.getCommittedBlocks().forEach(b -> System.out.printf("Name: %s, Size: %d", b.getName(), b.getSize())); System.out.println("Uncommitted Blocks:"); block.getUncommittedBlocks().forEach(b -> System.out.printf("Name: %s, Size: %d", b.getName(), b.getSize())); - // END: com.azure.storage.blob.specialized.BlockBlobClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlockBlobClient.listBlocksWithResponse#BlockListType-String-Duration-Context } /** @@ -166,25 +159,24 @@ public void commitBlockList() { } /** - * Code snippet for {@link BlockBlobClient#commitBlockListWithResponse(List, BlobHttpHeaders, Map, AccessTier, BlobAccessConditions, Duration, Context)} + * Code snippet for {@link BlockBlobClient#commitBlockListWithResponse(List, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions, Duration, Context)} */ public void commitBlockList2() { - // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.uploadFromFile#List-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.uploadFromFile#List-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration-Context BlobHttpHeaders headers = new BlobHttpHeaders() .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) .setBlobContentLanguage("en-US") .setBlobContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + BlobRequestConditions accessConditions = new BlobRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); Context context = new Context("key", "value"); System.out.printf("Committing block list completed with status %d%n", client.commitBlockListWithResponse(Collections.singletonList(base64BlockID), headers, metadata, AccessTier.HOT, accessConditions, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.specialized.BlockBlobClient.uploadFromFile#List-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlockBlobClient.uploadFromFile#List-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration-Context } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java index d455c2cf72ff..00f4f0d6298d 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java @@ -3,8 +3,8 @@ package com.azure.storage.blob.specialized; +import com.azure.core.http.RequestConditions; import com.azure.storage.blob.BlobClientBuilder; -import com.azure.storage.blob.models.ModifiedAccessConditions; import java.time.OffsetDateTime; @@ -61,68 +61,68 @@ public void changeLeaseCodeSnippet() { } /** - * Code snippets for {@link LeaseAsyncClient#acquireLeaseWithResponse(int, ModifiedAccessConditions)} + * Code snippets for {@link LeaseAsyncClient#acquireLeaseWithResponse(int, RequestConditions)} */ public void acquireLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.acquireLeaseWithResponse#int-ModifiedAccessConditions - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.acquireLeaseWithResponse#int-RequestConditions + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfModifiedSince(OffsetDateTime.now().minusDays(3)); client.acquireLeaseWithResponse(60, modifiedAccessConditions).subscribe(response -> System.out.printf("Lease ID is %s%n", response.getValue())); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.acquireLeaseWithResponse#int-ModifiedAccessConditions + // END: com.azure.storage.blob.specialized.LeaseAsyncClient.acquireLeaseWithResponse#int-RequestConditions } /** - * Code snippets for {@link LeaseAsyncClient#renewLeaseWithResponse(ModifiedAccessConditions)} + * Code snippets for {@link LeaseAsyncClient#renewLeaseWithResponse(RequestConditions)} */ public void renewLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.renewLeaseWithResponse#ModifiedAccessConditions - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.renewLeaseWithResponse#RequestConditions + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.renewLeaseWithResponse(modifiedAccessConditions).subscribe(response -> System.out.printf("Renewed lease ID is %s%n", response.getValue())); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.renewLeaseWithResponse#ModifiedAccessConditions + // END: com.azure.storage.blob.specialized.LeaseAsyncClient.renewLeaseWithResponse#RequestConditions } /** - * Code snippets for {@link LeaseAsyncClient#releaseLeaseWithResponse(ModifiedAccessConditions)} + * Code snippets for {@link LeaseAsyncClient#releaseLeaseWithResponse(RequestConditions)} */ public void releaseLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.releaseLeaseWithResponse#ModifiedAccessConditions - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.releaseLeaseWithResponse#RequestConditions + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.releaseLeaseWithResponse(modifiedAccessConditions).subscribe(response -> System.out.printf("Release lease completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.releaseLeaseWithResponse#ModifiedAccessConditions + // END: com.azure.storage.blob.specialized.LeaseAsyncClient.releaseLeaseWithResponse#RequestConditions } /** - * Code snippets for {@link LeaseAsyncClient#breakLeaseWithResponse(Integer, ModifiedAccessConditions)} + * Code snippets for {@link LeaseAsyncClient#breakLeaseWithResponse(Integer, RequestConditions)} */ public void breakLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.breakLeaseWithResponse#Integer-ModifiedAccessConditions + // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.breakLeaseWithResponse#Integer-RequestConditions Integer retainLeaseInSeconds = 5; - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.breakLeaseWithResponse(retainLeaseInSeconds, modifiedAccessConditions).subscribe(response -> System.out.printf("The broken lease has %d seconds remaining on the lease", response.getValue())); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.breakLeaseWithResponse#Integer-ModifiedAccessConditions + // END: com.azure.storage.blob.specialized.LeaseAsyncClient.breakLeaseWithResponse#Integer-RequestConditions } /** - * Code snippets for {@link LeaseAsyncClient#changeLeaseWithResponse(String, ModifiedAccessConditions)} + * Code snippets for {@link LeaseAsyncClient#changeLeaseWithResponse(String, RequestConditions)} */ public void changeLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.changeLeaseWithResponse#String-ModifiedAccessConditions - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.changeLeaseWithResponse#String-RequestConditions + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.changeLeaseWithResponse("proposedId", modifiedAccessConditions).subscribe(response -> System.out.printf("Changed lease ID is %s%n", response.getValue())); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.changeLeaseWithResponse#String-ModifiedAccessConditions + // END: com.azure.storage.blob.specialized.LeaseAsyncClient.changeLeaseWithResponse#String-RequestConditions } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java index ec4fbbd6a414..8bee366da02c 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java @@ -3,9 +3,9 @@ package com.azure.storage.blob.specialized; +import com.azure.core.http.RequestConditions; import com.azure.core.util.Context; import com.azure.storage.blob.BlobClientBuilder; -import com.azure.storage.blob.models.ModifiedAccessConditions; import java.time.Duration; import java.time.OffsetDateTime; @@ -65,75 +65,73 @@ public void changeLease() { } /** - * Code snippets for {@link LeaseClient#acquireLeaseWithResponse(int, ModifiedAccessConditions, Duration, Context)} + * Code snippets for {@link LeaseClient#acquireLeaseWithResponse(int, com.azure.core.http.RequestConditions, Duration, Context)} */ public void acquireLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.acquireLeaseWithResponse#int-ModifiedAccessConditions-Duration-Context - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + // BEGIN: com.azure.storage.blob.specialized.LeaseClient.acquireLeaseWithResponse#int-RequestConditions-Duration-Context + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfModifiedSince(OffsetDateTime.now().minusDays(3)); System.out.printf("Lease ID is %s%n", client .acquireLeaseWithResponse(60, modifiedAccessConditions, timeout, new Context(key, value)) .getValue()); - // END: com.azure.storage.blob.specialized.LeaseClient.acquireLeaseWithResponse#int-ModifiedAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.LeaseClient.acquireLeaseWithResponse#int-RequestConditions-Duration-Context } /** - * Code snippets for {@link LeaseClient#renewLeaseWithResponse(ModifiedAccessConditions, Duration, Context)} + * Code snippets for {@link LeaseClient#renewLeaseWithResponse(RequestConditions, Duration, Context)} */ public void renewLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.renewLeaseWithResponse#ModifiedAccessConditions-Duration-Context - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + // BEGIN: com.azure.storage.blob.specialized.LeaseClient.renewLeaseWithResponse#RequestConditions-Duration-Context + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); System.out.printf("Renewed lease ID is %s%n", client.renewLeaseWithResponse(modifiedAccessConditions, timeout, new Context(key, value)) .getValue()); - // END: com.azure.storage.blob.specialized.LeaseClient.renewLeaseWithResponse#ModifiedAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.LeaseClient.renewLeaseWithResponse#RequestConditions-Duration-Context } /** - * Code snippets for {@link LeaseClient#releaseLeaseWithResponse(ModifiedAccessConditions, Duration, Context)} + * Code snippets for {@link LeaseClient#releaseLeaseWithResponse(RequestConditions, Duration, Context)} */ public void releaseLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.releaseLeaseWithResponse#ModifiedAccessConditions-Duration-Context - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + // BEGIN: com.azure.storage.blob.specialized.LeaseClient.releaseLeaseWithResponse#RequestConditions-Duration-Context + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); System.out.printf("Release lease completed with status %d%n", client.releaseLeaseWithResponse(modifiedAccessConditions, timeout, new Context(key, value)) .getStatusCode()); - // END: com.azure.storage.blob.specialized.LeaseClient.releaseLeaseWithResponse#ModifiedAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.LeaseClient.releaseLeaseWithResponse#RequestConditions-Duration-Context } /** - * Code snippets for {@link LeaseClient#breakLeaseWithResponse(Integer, ModifiedAccessConditions, Duration, - * Context)} + * Code snippets for {@link LeaseClient#breakLeaseWithResponse(Integer, RequestConditions, Duration, Context)} */ public void breakLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.breakLeaseWithResponse#Integer-ModifiedAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.LeaseClient.breakLeaseWithResponse#Integer-RequestConditions-Duration-Context Integer retainLeaseInSeconds = 5; - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); System.out.printf("The broken lease has %d seconds remaining on the lease", client .breakLeaseWithResponse(retainLeaseInSeconds, modifiedAccessConditions, timeout, new Context(key, value)) .getValue()); - // END: com.azure.storage.blob.specialized.LeaseClient.breakLeaseWithResponse#Integer-ModifiedAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.LeaseClient.breakLeaseWithResponse#Integer-RequestConditions-Duration-Context } /** - * Code snippets for {@link LeaseClient#changeLeaseWithResponse(String, ModifiedAccessConditions, Duration, - * Context)} + * Code snippets for {@link LeaseClient#changeLeaseWithResponse(String, RequestConditions, Duration, Context)} */ public void changeLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.changeLeaseWithResponse#String-ModifiedAccessConditions-Duration-Context - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + // BEGIN: com.azure.storage.blob.specialized.LeaseClient.changeLeaseWithResponse#String-RequestConditions-Duration-Context + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); System.out.printf("Changed lease ID is %s%n", client.changeLeaseWithResponse("proposedId", modifiedAccessConditions, timeout, new Context(key, value)) .getValue()); - // END: com.azure.storage.blob.specialized.LeaseClient.changeLeaseWithResponse#String-ModifiedAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.LeaseClient.changeLeaseWithResponse#String-RequestConditions-Duration-Context } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java index 5458b815b238..dd29b4b64d14 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java @@ -3,16 +3,14 @@ package com.azure.storage.blob.specialized; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.core.http.RequestConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.CopyStatusType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.PageBlobAccessConditions; +import com.azure.storage.blob.models.PageBlobRequestConditions; import com.azure.storage.blob.models.PageRange; import com.azure.storage.blob.models.SequenceNumberActionType; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; import reactor.core.publisher.Flux; import java.io.ByteArrayInputStream; @@ -54,22 +52,20 @@ public void setCreateCodeSnippet() { } /** - * Code snippets for {@link PageBlobAsyncClient#createWithResponse(long, Long, BlobHttpHeaders, Map, BlobAccessConditions)} + * Code snippets for {@link PageBlobAsyncClient#createWithResponse(long, Long, BlobHttpHeaders, Map, BlobRequestConditions)} */ public void createWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobRequestConditions BlobHttpHeaders headers = new BlobHttpHeaders() .setBlobContentLanguage("en-US") .setBlobContentType("binary"); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); - client - .createWithResponse(size, sequenceNumber, headers, metadata, blobAccessConditions) + client.createWithResponse(size, sequenceNumber, headers, metadata, blobRequestConditions) .subscribe(response -> System.out.printf( "Created page blob with sequence number %s%n", response.getValue().getBlobSequenceNumber())); - // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobRequestConditions } /** @@ -87,17 +83,16 @@ public void uploadPagesCodeSnippet() { } /** - * Code snippets for {@link PageBlobAsyncClient#uploadPagesWithResponse(PageRange, Flux, PageBlobAccessConditions)} + * Code snippets for {@link PageBlobAsyncClient#uploadPagesWithResponse(PageRange, Flux, PageBlobRequestConditions)} */ public void uploadPagesWithResponseCodeSnippet() { // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesWithResponse#PageRange-Flux-PageBlobAccessConditions PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); - PageBlobAccessConditions pageBlobAccessConditions = new PageBlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + PageBlobRequestConditions pageBlobRequestConditions = new PageBlobRequestConditions().setLeaseId(leaseId); - client.uploadPagesWithResponse(pageRange, body, pageBlobAccessConditions) + client.uploadPagesWithResponse(pageRange, body, pageBlobRequestConditions) .subscribe(response -> System.out.printf( "Uploaded page blob with sequence number %s%n", response.getValue().getBlobSequenceNumber())); // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesWithResponse#PageRange-Flux-PageBlobAccessConditions @@ -120,25 +115,24 @@ public void uploadPagesFromURLCodeSnippet() { /** * Code snippets for {@link PageBlobAsyncClient#uploadPagesFromURLWithResponse(PageRange, String, Long, byte[], - * PageBlobAccessConditions, SourceModifiedAccessConditions)} + * PageBlobRequestConditions, BlobRequestConditions)} */ public void uploadPagesFromURLWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); InputStream dataStream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8)); byte[] sourceContentMD5 = new byte[512]; - PageBlobAccessConditions pageBlobAccessConditions = new PageBlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); - SourceModifiedAccessConditions sourceAccessConditions = new SourceModifiedAccessConditions() - .setSourceIfModifiedSince(OffsetDateTime.now()); + PageBlobRequestConditions pageBlobRequestConditions = new PageBlobRequestConditions().setLeaseId(leaseId); + BlobRequestConditions sourceAccessConditions = new BlobRequestConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); - client.uploadPagesFromURLWithResponse(pageRange, url, sourceOffset, sourceContentMD5, pageBlobAccessConditions, + client.uploadPagesFromURLWithResponse(pageRange, url, sourceOffset, sourceContentMD5, pageBlobRequestConditions, sourceAccessConditions) .subscribe(response -> System.out.printf( "Uploaded page blob from URL with sequence number %s%n", response.getValue().getBlobSequenceNumber())); - // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions } /** @@ -156,20 +150,19 @@ public void clearPagesCodeSnippet() { } /** - * Code snippets for {@link PageBlobAsyncClient#clearPagesWithResponse(PageRange, PageBlobAccessConditions)} + * Code snippets for {@link PageBlobAsyncClient#clearPagesWithResponse(PageRange, PageBlobRequestConditions)} */ public void clearPagesWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.clearPagesWithResponse#PageRange-PageBlobRequestConditions PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); - PageBlobAccessConditions pageBlobAccessConditions = new PageBlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + PageBlobRequestConditions pageBlobRequestConditions = new PageBlobRequestConditions().setLeaseId(leaseId); - client.clearPagesWithResponse(pageRange, pageBlobAccessConditions) + client.clearPagesWithResponse(pageRange, pageBlobRequestConditions) .subscribe(response -> System.out.printf( "Cleared page blob with sequence number %s%n", response.getValue().getBlobSequenceNumber())); - // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.clearPagesWithResponse#PageRange-PageBlobRequestConditions } /** @@ -189,22 +182,21 @@ public void getPageRangesCodeSnippet() { } /** - * Code snippets for {@link PageBlobAsyncClient#getPageRangesWithResponse(BlobRange, BlobAccessConditions)} + * Code snippets for {@link PageBlobAsyncClient#getPageRangesWithResponse(BlobRange, BlobRequestConditions)} */ public void getPageRangesWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesWithResponse#BlobRange-BlobRequestConditions BlobRange blobRange = new BlobRange(offset); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); - client.getPageRangesWithResponse(blobRange, blobAccessConditions) + client.getPageRangesWithResponse(blobRange, blobRequestConditions) .subscribe(response -> { System.out.println("Valid Page Ranges are:"); for (PageRange pageRange : response.getValue().getPageRange()) { System.out.printf("Start: %s, End: %s%n", pageRange.getStart(), pageRange.getEnd()); } }); - // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesWithResponse#BlobRange-BlobRequestConditions } /** @@ -226,23 +218,22 @@ public void getPageRangesDiffCodeSnippet() { /** * Code snippets for {@link PageBlobAsyncClient#getPageRangesDiffWithResponse(BlobRange, String, - * BlobAccessConditions)} + * BlobRequestConditions)} */ public void getPageRangesDiffWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesDiffWithResponse#BlobRange-String-BlobRequestConditions BlobRange blobRange = new BlobRange(offset); final String prevSnapshot = "previous snapshot"; - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); - client.getPageRangesDiffWithResponse(blobRange, prevSnapshot, blobAccessConditions) + client.getPageRangesDiffWithResponse(blobRange, prevSnapshot, blobRequestConditions) .subscribe(response -> { System.out.println("Valid Page Ranges are:"); for (PageRange pageRange : response.getValue().getPageRange()) { System.out.printf("Start: %s, End: %s%n", pageRange.getStart(), pageRange.getEnd()); } }); - // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesDiffWithResponse#BlobRange-String-BlobRequestConditions } /** @@ -256,17 +247,16 @@ public void resizeCodeSnippet() { } /** - * Code snippets for {@link PageBlobAsyncClient#resizeWithResponse(long, BlobAccessConditions)} + * Code snippets for {@link PageBlobAsyncClient#resizeWithResponse(long, BlobRequestConditions)} */ public void resizeWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.resizeWithResponse#long-BlobAccessConditions - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.resizeWithResponse#long-BlobRequestConditions + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); - client.resizeWithResponse(size, blobAccessConditions) + client.resizeWithResponse(size, blobRequestConditions) .subscribe(response -> System.out.printf( "Page blob resized with sequence number %s%n", response.getValue().getBlobSequenceNumber())); - // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.resizeWithResponse#long-BlobAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.resizeWithResponse#long-BlobRequestConditions } /** @@ -282,17 +272,16 @@ public void updateSequenceNumberCodeSnippet() { /** * Code snippets for {@link PageBlobAsyncClient#updateSequenceNumberWithResponse(SequenceNumberActionType, Long, - * BlobAccessConditions)} + * BlobRequestConditions)} */ public void updateSequenceNumberWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobRequestConditions + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); - client.updateSequenceNumberWithResponse(SequenceNumberActionType.INCREMENT, size, blobAccessConditions) + client.updateSequenceNumberWithResponse(SequenceNumberActionType.INCREMENT, size, blobRequestConditions) .subscribe(response -> System.out.printf( "Page blob updated to sequence number %s%n", response.getValue().getBlobSequenceNumber())); - // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobRequestConditions } /** @@ -316,12 +305,12 @@ public void copyIncrementalCodeSnippet() { } /** - * Code snippets for {@link PageBlobAsyncClient#copyIncrementalWithResponse(String, String, ModifiedAccessConditions)} + * Code snippets for {@link PageBlobAsyncClient#copyIncrementalWithResponse(String, String, RequestConditions)} */ public void copyIncrementalWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.copyIncrementalWithResponse#String-String-ModifiedAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.copyIncrementalWithResponse#String-String-RequestConditions final String snapshot = "copy snapshot"; - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfNoneMatch("snapshotMatch"); client.copyIncrementalWithResponse(url, snapshot, modifiedAccessConditions) @@ -338,7 +327,7 @@ public void copyIncrementalWithResponseCodeSnippet() { System.out.println("Page blob copied pending"); } }); - // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.copyIncrementalWithResponse#String-String-ModifiedAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.copyIncrementalWithResponse#String-String-RequestConditions } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java index 19bf2870574d..84b93a87edf5 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java @@ -3,19 +3,17 @@ package com.azure.storage.blob.specialized; +import com.azure.core.http.RequestConditions; import com.azure.core.util.Context; -import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.CopyStatusType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.PageBlobAccessConditions; import com.azure.storage.blob.models.PageBlobItem; +import com.azure.storage.blob.models.PageBlobRequestConditions; import com.azure.storage.blob.models.PageList; import com.azure.storage.blob.models.PageRange; import com.azure.storage.blob.models.SequenceNumberActionType; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; import java.io.ByteArrayInputStream; import java.io.InputStream; @@ -54,23 +52,22 @@ public void createCodeSnippet() { } /** - * Code snippets for {@link PageBlobClient#createWithResponse(long, Long, BlobHttpHeaders, Map, BlobAccessConditions, Duration, Context)} + * Code snippets for {@link PageBlobClient#createWithResponse(long, Long, BlobHttpHeaders, Map, BlobRequestConditions, Duration, Context)} */ public void createWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobRequestConditions-Duration-Context BlobHttpHeaders headers = new BlobHttpHeaders() .setBlobContentLanguage("en-US") .setBlobContentType("binary"); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); Context context = new Context(key, value); PageBlobItem pageBlob = client - .createWithResponse(size, sequenceNumber, headers, metadata, blobAccessConditions, timeout, context) + .createWithResponse(size, sequenceNumber, headers, metadata, blobRequestConditions, timeout, context) .getValue(); System.out.printf("Created page blob with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.specialized.PageBlobClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobRequestConditions-Duration-Context } /** @@ -89,7 +86,7 @@ public void uploadPagesCodeSnippet() { } /** - * Code snippets for {@link PageBlobClient#uploadPagesWithResponse(PageRange, InputStream, PageBlobAccessConditions, + * Code snippets for {@link PageBlobClient#uploadPagesWithResponse(PageRange, InputStream, PageBlobRequestConditions, * Duration, Context)} */ public void uploadPagesWithResponseCodeSnippet() { @@ -98,12 +95,11 @@ public void uploadPagesWithResponseCodeSnippet() { .setStart(0) .setEnd(511); InputStream dataStream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8)); - PageBlobAccessConditions pageBlobAccessConditions = new PageBlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + PageBlobRequestConditions pageBlobRequestConditions = new PageBlobRequestConditions().setLeaseId(leaseId); Context context = new Context(key, value); PageBlobItem pageBlob = client - .uploadPagesWithResponse(pageRange, dataStream, pageBlobAccessConditions, timeout, context).getValue(); + .uploadPagesWithResponse(pageRange, dataStream, pageBlobRequestConditions, timeout, context).getValue(); System.out.printf("Uploaded page blob with sequence number %s%n", pageBlob.getBlobSequenceNumber()); // END: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesWithResponse#PageRange-InputStream-PageBlobAccessConditions-Duration-Context @@ -126,27 +122,26 @@ public void uploadPagesFromURLCodeSnippet() { /** * Code snippets for {@link PageBlobClient#uploadPagesFromURLWithResponse(PageRange, String, Long, byte[], - * PageBlobAccessConditions, SourceModifiedAccessConditions, Duration, Context)} + * PageBlobRequestConditions, BlobRequestConditions, Duration, Context)} */ public void uploadPagesFromURLWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions-Duration-Context PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); InputStream dataStream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8)); byte[] sourceContentMD5 = new byte[512]; - PageBlobAccessConditions pageBlobAccessConditions = new PageBlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); - SourceModifiedAccessConditions sourceAccessConditions = new SourceModifiedAccessConditions() - .setSourceIfModifiedSince(OffsetDateTime.now()); + PageBlobRequestConditions pageBlobRequestConditions = new PageBlobRequestConditions().setLeaseId(leaseId); + BlobRequestConditions sourceAccessConditions = new BlobRequestConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); Context context = new Context(key, value); PageBlobItem pageBlob = client - .uploadPagesFromURLWithResponse(pageRange, url, sourceOffset, sourceContentMD5, pageBlobAccessConditions, + .uploadPagesFromURLWithResponse(pageRange, url, sourceOffset, sourceContentMD5, pageBlobRequestConditions, sourceAccessConditions, timeout, context).getValue(); System.out.printf("Uploaded page blob from URL with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions-Duration-Context } /** @@ -165,23 +160,22 @@ public void clearPagesCodeSnippet() { } /** - * Code snippets for {@link PageBlobClient#clearPagesWithResponse(PageRange, PageBlobAccessConditions, Duration, + * Code snippets for {@link PageBlobClient#clearPagesWithResponse(PageRange, PageBlobRequestConditions, Duration, * Context)} */ public void clearPagesWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.clearPagesWithResponse#PageRange-PageBlobRequestConditions-Duration-Context PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); - PageBlobAccessConditions pageBlobAccessConditions = new PageBlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + PageBlobRequestConditions pageBlobRequestConditions = new PageBlobRequestConditions().setLeaseId(leaseId); Context context = new Context(key, value); PageBlobItem pageBlob = client - .clearPagesWithResponse(pageRange, pageBlobAccessConditions, timeout, context).getValue(); + .clearPagesWithResponse(pageRange, pageBlobRequestConditions, timeout, context).getValue(); System.out.printf("Cleared page blob with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.specialized.PageBlobClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.clearPagesWithResponse#PageRange-PageBlobRequestConditions-Duration-Context } /** @@ -200,24 +194,23 @@ public void getPageRangesCodeSnippet() { } /** - * Code snippets for {@link PageBlobClient#getPageRangesWithResponse(BlobRange, BlobAccessConditions, Duration, + * Code snippets for {@link PageBlobClient#getPageRangesWithResponse(BlobRange, BlobRequestConditions, Duration, * Context)} */ public void getPageRangesWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesWithResponse#BlobRange-BlobRequestConditions-Duration-Context BlobRange blobRange = new BlobRange(offset); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); Context context = new Context(key, value); PageList pageList = client - .getPageRangesWithResponse(blobRange, blobAccessConditions, timeout, context).getValue(); + .getPageRangesWithResponse(blobRange, blobRequestConditions, timeout, context).getValue(); System.out.println("Valid Page Ranges are:"); for (PageRange pageRange : pageList.getPageRange()) { System.out.printf("Start: %s, End: %s%n", pageRange.getStart(), pageRange.getEnd()); } - // END: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesWithResponse#BlobRange-BlobRequestConditions-Duration-Context } /** @@ -237,25 +230,24 @@ public void getPageRangesDiffCodeSnippet() { } /** - * Code snippets for {@link PageBlobClient#getPageRangesDiffWithResponse(BlobRange, String, BlobAccessConditions, + * Code snippets for {@link PageBlobClient#getPageRangesDiffWithResponse(BlobRange, String, BlobRequestConditions, * Duration, Context)} */ public void getPageRangesDiffWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiffWithResponse#BlobRange-String-BlobRequestConditions-Duration-Context BlobRange blobRange = new BlobRange(offset); final String prevSnapshot = "previous snapshot"; - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); Context context = new Context(key, value); PageList pageList = client - .getPageRangesDiffWithResponse(blobRange, prevSnapshot, blobAccessConditions, timeout, context).getValue(); + .getPageRangesDiffWithResponse(blobRange, prevSnapshot, blobRequestConditions, timeout, context).getValue(); System.out.println("Valid Page Ranges are:"); for (PageRange pageRange : pageList.getPageRange()) { System.out.printf("Start: %s, End: %s%n", pageRange.getStart(), pageRange.getEnd()); } - // END: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiffWithResponse#BlobRange-String-BlobRequestConditions-Duration-Context } /** @@ -269,18 +261,17 @@ public void resizeCodeSnippet() { } /** - * Code snippets for {@link PageBlobClient#resizeWithResponse(long, BlobAccessConditions, Duration, Context)} + * Code snippets for {@link PageBlobClient#resizeWithResponse(long, BlobRequestConditions, Duration, Context)} */ public void resizeWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.resizeWithResponse#long-BlobAccessConditions-Duration-Context - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.resizeWithResponse#long-BlobRequestConditions-Duration-Context + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); Context context = new Context(key, value); PageBlobItem pageBlob = client - .resizeWithResponse(size, blobAccessConditions, timeout, context).getValue(); + .resizeWithResponse(size, blobRequestConditions, timeout, context).getValue(); System.out.printf("Page blob resized with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.specialized.PageBlobClient.resizeWithResponse#long-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.resizeWithResponse#long-BlobRequestConditions-Duration-Context } /** @@ -296,19 +287,18 @@ public void updateSequenceNumberCodeSnippet() { /** * Code snippets for {@link PageBlobClient#updateSequenceNumberWithResponse(SequenceNumberActionType, Long, - * BlobAccessConditions, Duration, Context)} + * BlobRequestConditions, Duration, Context)} */ public void updateSequenceNumberWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions-Duration-Context - BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( - new LeaseAccessConditions().setLeaseId(leaseId)); + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobRequestConditions-Duration-Context + BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); Context context = new Context(key, value); PageBlobItem pageBlob = client.updateSequenceNumberWithResponse( - SequenceNumberActionType.INCREMENT, size, blobAccessConditions, timeout, context).getValue(); + SequenceNumberActionType.INCREMENT, size, blobRequestConditions, timeout, context).getValue(); System.out.printf("Page blob updated to sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.specialized.PageBlobClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobRequestConditions-Duration-Context } /** @@ -332,13 +322,13 @@ public void copyIncrementalCodeSnippet() { } /** - * Code snippets for {@link PageBlobClient#copyIncrementalWithResponse(String, String, ModifiedAccessConditions, + * Code snippets for {@link PageBlobClient#copyIncrementalWithResponse(String, String, RequestConditions, * Duration, Context)} */ public void copyIncrementalWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.copyIncrementalWithResponse#String-String-ModifiedAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.copyIncrementalWithResponse#String-String-RequestConditions-Duration-Context final String snapshot = "copy snapshot"; - ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + RequestConditions modifiedAccessConditions = new RequestConditions() .setIfNoneMatch("snapshotMatch"); Context context = new Context(key, value); @@ -354,7 +344,7 @@ public void copyIncrementalWithResponseCodeSnippet() { } else if (CopyStatusType.PENDING == statusType) { System.out.println("Page blob copied pending"); } - // END: com.azure.storage.blob.specialized.PageBlobClient.copyIncrementalWithResponse#String-String-ModifiedAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.copyIncrementalWithResponse#String-String-RequestConditions-Duration-Context } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy index d2b455aed10d..c4636ffbee33 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy @@ -3,10 +3,11 @@ package com.azure.storage.blob +import com.azure.core.http.RequestConditions import com.azure.core.implementation.util.ImplUtils import com.azure.storage.blob.models.AccessTier import com.azure.storage.blob.models.ArchiveStatus -import com.azure.storage.blob.models.BlobAccessConditions +import com.azure.storage.blob.models.BlobRequestConditions import com.azure.storage.blob.models.BlobErrorCode import com.azure.storage.blob.models.BlobHttpHeaders import com.azure.storage.blob.models.BlobRange @@ -14,10 +15,10 @@ import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.blob.models.BlobType import com.azure.storage.blob.models.CopyStatusType import com.azure.storage.blob.models.DeleteSnapshotsOptionType -import com.azure.storage.blob.models.LeaseAccessConditions + import com.azure.storage.blob.models.LeaseStateType import com.azure.storage.blob.models.LeaseStatusType -import com.azure.storage.blob.models.ModifiedAccessConditions + import com.azure.storage.blob.models.PublicAccessType import com.azure.storage.blob.models.RehydratePriority import com.azure.storage.blob.models.ReliableDownloadOptions @@ -159,12 +160,12 @@ class BlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions().setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: def response = bc.downloadWithResponse(new ByteArrayOutputStream(), null, null, bac, false, null, null) @@ -186,13 +187,12 @@ class BlobAPITest extends APISpec { def "Download AC fail"() { setup: setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch))) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bc.downloadWithResponse(new ByteArrayOutputStream(), null, null, bac, false, null, null).getStatusCode() @@ -327,13 +327,12 @@ class BlobAPITest extends APISpec { @Unroll def "Get properties AC"() { setup: - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(setupBlobMatchCondition(bc, match)) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(setupBlobMatchCondition(bc, match)) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: bc.getPropertiesWithResponse(bac, null, null).getStatusCode() == 200 @@ -351,13 +350,12 @@ class BlobAPITest extends APISpec { @Unroll def "Get properties AC fail"() { setup: - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch))) + def bac = new BlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(match) + .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bc.getPropertiesWithResponse(bac, null, null) @@ -440,13 +438,12 @@ class BlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: bc.setHttpHeadersWithResponse(null, bac, null, null).getStatusCode() == 200 @@ -466,13 +463,12 @@ class BlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bc.setHttpHeadersWithResponse(null, bac, null, null) @@ -549,13 +545,12 @@ class BlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: bc.setMetadataWithResponse(null, bac, null, null).getStatusCode() == 200 @@ -576,13 +571,12 @@ class BlobAPITest extends APISpec { noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bc.setMetadataWithResponse(null, bac, null, null) @@ -652,13 +646,12 @@ class BlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: bc.createSnapshotWithResponse(null, bac, null, null).getStatusCode() == 201 @@ -678,13 +671,12 @@ class BlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: @@ -808,7 +800,7 @@ class BlobAPITest extends APISpec { setup: def copyDestBlob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() match = setupBlobMatchCondition(bc, match) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -831,7 +823,7 @@ class BlobAPITest extends APISpec { setup: def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -858,13 +850,12 @@ class BlobAPITest extends APISpec { bu2.upload(defaultInputStream.get(), defaultDataSize) match = setupBlobMatchCondition(bu2, match) leaseID = setupBlobLeaseCondition(bu2, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: @@ -887,13 +878,12 @@ class BlobAPITest extends APISpec { bu2.upload(defaultInputStream.get(), defaultDataSize) noneMatch = setupBlobMatchCondition(bu2, noneMatch) setupBlobLeaseCondition(bu2, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null) @@ -928,8 +918,8 @@ class BlobAPITest extends APISpec { when: def copyID = bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, - new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)), null, null).getValue() - bu2.abortCopyFromURLWithResponse(copyID, new LeaseAccessConditions().setLeaseId(garbageLeaseID), null, null) + new BlobRequestConditions().setLeaseId(leaseID), null, null).getValue() + bu2.abortCopyFromURLWithResponse(copyID, garbageLeaseID, null, null) then: def e = thrown(BlobStorageException) @@ -1004,10 +994,10 @@ class BlobAPITest extends APISpec { when: def copyID = bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, - new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)), null, null).getValue() + new BlobRequestConditions().setLeaseId(leaseID), null, null).getValue() then: - bu2.abortCopyFromURLWithResponse(copyID, new LeaseAccessConditions().setLeaseId(leaseID), null, null).getStatusCode() == 204 + bu2.abortCopyFromURLWithResponse(copyID, leaseID, null, null).getStatusCode() == 204 // Normal test cleanup will not clean up containers in the alternate account. cu2.delete() } @@ -1089,7 +1079,7 @@ class BlobAPITest extends APISpec { cc.setAccessPolicy(PublicAccessType.CONTAINER, null) def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() match = setupBlobMatchCondition(bc, match) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -1113,7 +1103,7 @@ class BlobAPITest extends APISpec { cc.setAccessPolicy(PublicAccessType.CONTAINER, null) def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -1141,13 +1131,12 @@ class BlobAPITest extends APISpec { bu2.upload(defaultInputStream.get(), defaultDataSize) match = setupBlobMatchCondition(bu2, match) leaseID = setupBlobLeaseCondition(bu2, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null).getStatusCode() == 202 @@ -1170,13 +1159,12 @@ class BlobAPITest extends APISpec { bu2.upload(defaultInputStream.get(), defaultDataSize) noneMatch = setupBlobMatchCondition(bu2, noneMatch) setupBlobLeaseCondition(bu2, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null) @@ -1246,13 +1234,12 @@ class BlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: bc.deleteWithResponse(DeleteSnapshotsOptionType.INCLUDE, bac, null, null).getStatusCode() == 202 @@ -1272,13 +1259,12 @@ class BlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bc.deleteWithResponse(DeleteSnapshotsOptionType.INCLUDE, bac, null, null) @@ -1457,7 +1443,7 @@ class BlobAPITest extends APISpec { def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) when: - bc.setAccessTierWithResponse(AccessTier.HOT, null, new LeaseAccessConditions().setLeaseId(leaseID), null, null) + bc.setAccessTierWithResponse(AccessTier.HOT, null, leaseID, null, null) then: notThrown(BlobStorageException) @@ -1473,7 +1459,7 @@ class BlobAPITest extends APISpec { bc.upload(defaultInputStream.get(), defaultDataSize) when: - bc.setAccessTierWithResponse(AccessTier.HOT, null, new LeaseAccessConditions().setLeaseId("garbage"), null, null) + bc.setAccessTierWithResponse(AccessTier.HOT, null, "garbage", null, null) then: thrown(BlobStorageException) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy index 83f29f5cfe63..63506b865632 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy @@ -4,7 +4,20 @@ package com.azure.storage.blob import com.azure.core.http.rest.Response -import com.azure.storage.blob.models.* +import com.azure.storage.blob.models.AccessTier +import com.azure.storage.blob.models.AppendBlobItem +import com.azure.storage.blob.models.BlobAccessPolicy +import com.azure.storage.blob.models.BlobErrorCode +import com.azure.storage.blob.models.BlobListDetails +import com.azure.storage.blob.models.BlobRequestConditions +import com.azure.storage.blob.models.BlobSignedIdentifier +import com.azure.storage.blob.models.BlobStorageException +import com.azure.storage.blob.models.BlobType +import com.azure.storage.blob.models.CopyStatusType +import com.azure.storage.blob.models.LeaseStateType +import com.azure.storage.blob.models.LeaseStatusType +import com.azure.storage.blob.models.ListBlobsOptions +import com.azure.storage.blob.models.PublicAccessType import com.azure.storage.blob.specialized.AppendBlobClient import com.azure.storage.blob.specialized.BlobClientBase import spock.lang.Unroll @@ -118,12 +131,12 @@ class ContainerAPITest extends APISpec { def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) expect: - cc.getPropertiesWithResponse(new LeaseAccessConditions().setLeaseId(leaseID), null, null).getStatusCode() == 200 + cc.getPropertiesWithResponse(leaseID, null, null).getStatusCode() == 200 } def "Get properties lease fail"() { when: - cc.getPropertiesWithResponse(new LeaseAccessConditions().setLeaseId("garbage"), null, null) + cc.getPropertiesWithResponse("garbage", null, null) then: thrown(BlobStorageException) @@ -193,10 +206,9 @@ class ContainerAPITest extends APISpec { def "Set metadata AC"() { setup: leaseID = setupContainerLeaseCondition(cc, leaseID) - def cac = new BlobContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified)) + def cac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfModifiedSince(modified) expect: cc.setMetadataWithResponse(null, cac, null, null).getStatusCode() == 200 @@ -211,10 +223,9 @@ class ContainerAPITest extends APISpec { @Unroll def "Set metadata AC fail"() { setup: - def cac = new BlobContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified)) + def cac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfModifiedSince(modified) when: cc.setMetadataWithResponse(null, cac, null, null) @@ -231,13 +242,13 @@ class ContainerAPITest extends APISpec { @Unroll def "Set metadata AC illegal"() { setup: - def mac = new ModifiedAccessConditions() + def mac = new BlobRequestConditions() .setIfUnmodifiedSince(unmodified) .setIfMatch(match) .setIfNoneMatch(noneMatch) when: - cc.setMetadataWithResponse(null, new BlobContainerAccessConditions().setModifiedAccessConditions(mac), null, null) + cc.setMetadataWithResponse(null, mac, null, null) then: thrown(UnsupportedOperationException) @@ -338,11 +349,10 @@ class ContainerAPITest extends APISpec { def "Set access policy AC"() { setup: leaseID = setupContainerLeaseCondition(cc, leaseID) - def cac = new BlobContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified)) + def cac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: cc.setAccessPolicyWithResponse(null, null, cac, null, null).getStatusCode() == 200 @@ -358,11 +368,10 @@ class ContainerAPITest extends APISpec { @Unroll def "Set access policy AC fail"() { setup: - def cac = new BlobContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified)) + def cac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: cc.setAccessPolicyWithResponse(null, null, cac, null, null) @@ -380,10 +389,10 @@ class ContainerAPITest extends APISpec { @Unroll def "Set access policy AC illegal"() { setup: - def mac = new ModifiedAccessConditions().setIfMatch(match).setIfNoneMatch(noneMatch) + def mac = new BlobRequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) when: - cc.setAccessPolicyWithResponse(null, null, new BlobContainerAccessConditions().setModifiedAccessConditions(mac), null, null) + cc.setAccessPolicyWithResponse(null, null, mac, null, null) then: thrown(UnsupportedOperationException) @@ -431,12 +440,12 @@ class ContainerAPITest extends APISpec { def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) expect: - cc.getAccessPolicyWithResponse(new LeaseAccessConditions().setLeaseId(leaseID), null, null).getStatusCode() == 200 + cc.getAccessPolicyWithResponse(leaseID, null, null).getStatusCode() == 200 } def "Get access policy lease fail"() { when: - cc.getAccessPolicyWithResponse(new LeaseAccessConditions().setLeaseId(garbageLeaseID), null, null) + cc.getAccessPolicyWithResponse(garbageLeaseID, null, null) then: thrown(BlobStorageException) @@ -476,11 +485,10 @@ class ContainerAPITest extends APISpec { def "Delete AC"() { setup: leaseID = setupContainerLeaseCondition(cc, leaseID) - def cac = new BlobContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified)) + def cac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: cc.deleteWithResponse(cac, null, null).getStatusCode() == 202 @@ -496,11 +504,10 @@ class ContainerAPITest extends APISpec { @Unroll def "Delete AC fail"() { setup: - def cac = new BlobContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified)) + def cac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: cc.deleteWithResponse(cac, null, null) @@ -518,10 +525,10 @@ class ContainerAPITest extends APISpec { @Unroll def "Delete AC illegal"() { setup: - def mac = new ModifiedAccessConditions().setIfMatch(match).setIfNoneMatch(noneMatch) + def mac = new BlobRequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) when: - cc.deleteWithResponse(new BlobContainerAccessConditions().setModifiedAccessConditions(mac), null, null) + cc.deleteWithResponse(mac, null, null) then: thrown(UnsupportedOperationException) @@ -658,7 +665,7 @@ class ContainerAPITest extends APISpec { def copyBlob = cc.getBlobClient(copyName).getPageBlobClient() - def poller = copyBlob.beginCopy(normal.getBlobUrl(), Duration.ofSeconds(2)) + copyBlob.beginCopy(normal.getBlobUrl(), Duration.ofSeconds(2)) def start = OffsetDateTime.now() def status = CopyStatusType.PENDING while (status != CopyStatusType.SUCCESS) { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy index a332bfbc56d0..67ee09570a82 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy @@ -6,16 +6,12 @@ package com.azure.storage.blob.specialized import com.azure.core.exception.UnexpectedLengthException import com.azure.core.util.Context import com.azure.storage.blob.APISpec -import com.azure.storage.blob.models.AppendBlobAccessConditions -import com.azure.storage.blob.models.AppendPositionAccessConditions -import com.azure.storage.blob.models.BlobAccessConditions +import com.azure.storage.blob.models.AppendBlobRequestConditions import com.azure.storage.blob.models.BlobHttpHeaders import com.azure.storage.blob.models.BlobRange -import com.azure.storage.blob.models.LeaseAccessConditions -import com.azure.storage.blob.models.ModifiedAccessConditions -import com.azure.storage.blob.models.PublicAccessType -import com.azure.storage.blob.models.SourceModifiedAccessConditions +import com.azure.storage.blob.models.BlobRequestConditions import com.azure.storage.blob.models.BlobStorageException +import com.azure.storage.blob.models.PublicAccessType import spock.lang.Unroll import java.security.MessageDigest @@ -48,8 +44,7 @@ class AppendBlobAPITest extends APISpec { def "Create error"() { when: - bc.createWithResponse(null, null, new BlobAccessConditions() - .setModifiedAccessConditions(new ModifiedAccessConditions().setIfMatch("garbage")), null, Context.NONE) + bc.createWithResponse(null, null, new BlobRequestConditions().setIfMatch("garbage"), null, Context.NONE) then: thrown(BlobStorageException) @@ -110,13 +105,12 @@ class AppendBlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions().setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) - + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: bc.createWithResponse(null, null, bac, null, null).getStatusCode() == 201 @@ -136,12 +130,12 @@ class AppendBlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions().setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bc.createWithResponse(null, null, bac, null, Context.NONE) @@ -217,16 +211,14 @@ class AppendBlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - def bac = new AppendBlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setAppendPositionAccessConditions(new AppendPositionAccessConditions() - .setAppendPosition(appendPosE) - .setMaxSize(maxSizeLTE)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new AppendBlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setAppendPosition(appendPosE) + .setMaxSize(maxSizeLTE) expect: @@ -250,16 +242,14 @@ class AppendBlobAPITest extends APISpec { noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - def bac = new AppendBlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setAppendPositionAccessConditions(new AppendPositionAccessConditions() - .setAppendPosition(appendPosE) - .setMaxSize(maxSizeLTE)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new AppendBlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setAppendPosition(appendPosE) + .setMaxSize(maxSizeLTE) when: bc.appendBlockWithResponse(defaultInputStream.get(), defaultDataSize, bac, null, null) @@ -370,16 +360,14 @@ class AppendBlobAPITest extends APISpec { cc.setAccessPolicy(PublicAccessType.CONTAINER, null) match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - def bac = new AppendBlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setAppendPositionAccessConditions(new AppendPositionAccessConditions() - .setAppendPosition(appendPosE) - .setMaxSize(maxSizeLTE)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new AppendBlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setAppendPosition(appendPosE) + .setMaxSize(maxSizeLTE) def sourceURL = cc.getBlobClient(generateBlobName()).getAppendBlobClient() sourceURL.create() @@ -407,16 +395,14 @@ class AppendBlobAPITest extends APISpec { noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - def bac = new AppendBlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setAppendPositionAccessConditions(new AppendPositionAccessConditions() - .setAppendPosition(appendPosE) - .setMaxSize(maxSizeLTE)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new AppendBlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setAppendPosition(appendPosE) + .setMaxSize(maxSizeLTE) def sourceURL = cc.getBlobClient(generateBlobName()).getAppendBlobClient() sourceURL.create() @@ -448,11 +434,11 @@ class AppendBlobAPITest extends APISpec { sourceURL.create() sourceURL.appendBlockWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null).getStatusCode() - def smac = new SourceModifiedAccessConditions() - .setSourceIfModifiedSince(sourceIfModifiedSince) - .setSourceIfUnmodifiedSince(sourceIfUnmodifiedSince) - .setSourceIfMatch(setupBlobMatchCondition(sourceURL, sourceIfMatch)) - .setSourceIfNoneMatch(sourceIfNoneMatch) + def smac = new BlobRequestConditions() + .setIfModifiedSince(sourceIfModifiedSince) + .setIfUnmodifiedSince(sourceIfUnmodifiedSince) + .setIfMatch(setupBlobMatchCondition(sourceURL, sourceIfMatch)) + .setIfNoneMatch(sourceIfNoneMatch) expect: bc.appendBlockFromUrlWithResponse(sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 @@ -475,11 +461,11 @@ class AppendBlobAPITest extends APISpec { sourceURL.create() sourceURL.appendBlockWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null).getStatusCode() - def smac = new SourceModifiedAccessConditions() - .setSourceIfModifiedSince(sourceIfModifiedSince) - .setSourceIfUnmodifiedSince(sourceIfUnmodifiedSince) - .setSourceIfMatch(sourceIfMatch) - .setSourceIfNoneMatch(setupBlobMatchCondition(sourceURL, sourceIfNoneMatch)) + def smac = new BlobRequestConditions() + .setIfModifiedSince(sourceIfModifiedSince) + .setIfUnmodifiedSince(sourceIfUnmodifiedSince) + .setIfMatch(sourceIfMatch) + .setIfNoneMatch(setupBlobMatchCondition(sourceURL, sourceIfNoneMatch)) when: bc.appendBlockFromUrlWithResponse(sourceURL.getBlobUrl(), null, null, null, smac, null, Context.NONE) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy index 19dd464a3215..6c8a6d96bb98 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy @@ -17,18 +17,16 @@ import com.azure.storage.blob.BlobAsyncClient import com.azure.storage.blob.BlobClient import com.azure.storage.blob.BlobServiceClientBuilder import com.azure.storage.blob.ProgressReceiver + import com.azure.storage.blob.models.AccessTier -import com.azure.storage.blob.models.BlobAccessConditions import com.azure.storage.blob.models.BlobErrorCode import com.azure.storage.blob.models.BlobHttpHeaders import com.azure.storage.blob.models.BlobRange +import com.azure.storage.blob.models.BlobRequestConditions +import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.blob.models.BlockListType -import com.azure.storage.blob.models.LeaseAccessConditions -import com.azure.storage.blob.models.ModifiedAccessConditions import com.azure.storage.blob.models.ParallelTransferOptions import com.azure.storage.blob.models.PublicAccessType -import com.azure.storage.blob.models.SourceModifiedAccessConditions -import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.common.policy.RequestRetryOptions import reactor.core.publisher.Flux import reactor.core.publisher.Mono @@ -116,8 +114,8 @@ class BlockBlobAPITest extends APISpec { def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) expect: - bc.stageBlockWithResponse(getBlockID(), defaultInputStream.get(), defaultDataSize, new LeaseAccessConditions().setLeaseId(leaseID), - null, null).getStatusCode() == 201 + bc.stageBlockWithResponse(getBlockID(), defaultInputStream.get(), defaultDataSize, leaseID, null, null) + .getStatusCode() == 201 } def "Stage block lease fail"() { @@ -125,8 +123,7 @@ class BlockBlobAPITest extends APISpec { setupBlobLeaseCondition(bc, receivedLeaseID) when: - bc.stageBlockWithResponse(getBlockID(), defaultInputStream.get(), defaultDataSize, new LeaseAccessConditions() - .setLeaseId(garbageLeaseID), null, null) + bc.stageBlockWithResponse(getBlockID(), defaultInputStream.get(), defaultDataSize, garbageLeaseID, null, null) then: def e = thrown(BlobStorageException) @@ -241,10 +238,9 @@ class BlockBlobAPITest extends APISpec { def "Stage block from URL lease"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def lease = new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, receivedLeaseID)) when: - bc.stageBlockFromURLWithResponse(getBlockID(), bc.getBlobUrl(), null, null, lease, null, null, null) + bc.stageBlockFromURLWithResponse(getBlockID(), bc.getBlobUrl(), null, null, setupBlobLeaseCondition(bc, receivedLeaseID), null, null, null) then: notThrown(BlobStorageException) @@ -253,10 +249,9 @@ class BlockBlobAPITest extends APISpec { def "Stage block from URL lease fail"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def lease = new LeaseAccessConditions().setLeaseId("garbage") when: - bc.stageBlockFromURLWithResponse(getBlockID(), bc.getBlobUrl(), null, null, lease, null, null, null) + bc.stageBlockFromURLWithResponse(getBlockID(), bc.getBlobUrl(), null, null, "garbage", null, null, null) then: thrown(BlobStorageException) @@ -285,11 +280,11 @@ class BlockBlobAPITest extends APISpec { sourceURL.upload(defaultInputStream.get(), defaultDataSize) sourceIfMatch = setupBlobMatchCondition(sourceURL, sourceIfMatch) - def smac = new SourceModifiedAccessConditions() - .setSourceIfModifiedSince(sourceIfModifiedSince) - .setSourceIfUnmodifiedSince(sourceIfUnmodifiedSince) - .setSourceIfMatch(sourceIfMatch) - .setSourceIfNoneMatch(sourceIfNoneMatch) + def smac = new BlobRequestConditions() + .setIfModifiedSince(sourceIfModifiedSince) + .setIfUnmodifiedSince(sourceIfUnmodifiedSince) + .setIfMatch(sourceIfMatch) + .setIfNoneMatch(sourceIfNoneMatch) expect: bc.stageBlockFromURLWithResponse(blockID, sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 @@ -312,11 +307,11 @@ class BlockBlobAPITest extends APISpec { def sourceURL = cc.getBlobClient(generateBlobName()).getBlockBlobClient() sourceURL.upload(defaultInputStream.get(), defaultDataSize) - def smac = new SourceModifiedAccessConditions() - .setSourceIfModifiedSince(sourceIfModifiedSince) - .setSourceIfUnmodifiedSince(sourceIfUnmodifiedSince) - .setSourceIfMatch(sourceIfMatch) - .setSourceIfNoneMatch(setupBlobMatchCondition(sourceURL, sourceIfNoneMatch)) + def smac = new BlobRequestConditions() + .setIfModifiedSince(sourceIfModifiedSince) + .setIfUnmodifiedSince(sourceIfUnmodifiedSince) + .setIfMatch(sourceIfMatch) + .setIfNoneMatch(setupBlobMatchCondition(sourceURL, sourceIfNoneMatch)) when: bc.stageBlockFromURLWithResponse(blockID, sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 @@ -423,13 +418,12 @@ class BlockBlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) expect: @@ -450,13 +444,12 @@ class BlockBlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) when: bc.commitBlockListWithResponse(null, null, null, null, bac, null, null) @@ -479,8 +472,7 @@ class BlockBlobAPITest extends APISpec { bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - bc.commitBlockListWithResponse(new ArrayList(), null, null, null, - new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId("garbage")), null, null) + bc.commitBlockListWithResponse(new ArrayList(), null, null, null, new BlobRequestConditions().setLeaseId("garbage"), null, null) then: thrown(BlobStorageException) @@ -552,7 +544,7 @@ class BlockBlobAPITest extends APISpec { def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) when: - bc.listBlocksWithResponse(BlockListType.ALL, new LeaseAccessConditions().setLeaseId(leaseID), null, Context.NONE) + bc.listBlocksWithResponse(BlockListType.ALL, leaseID, null, Context.NONE) then: notThrown(BlobStorageException) @@ -563,7 +555,7 @@ class BlockBlobAPITest extends APISpec { setupBlobLeaseCondition(bc, garbageLeaseID) when: - bc.listBlocksWithResponse(BlockListType.ALL, new LeaseAccessConditions().setLeaseId(garbageLeaseID), null, Context.NONE) + bc.listBlocksWithResponse(BlockListType.ALL, garbageLeaseID, null, Context.NONE) then: def e = thrown(BlobStorageException) @@ -723,13 +715,12 @@ class BlockBlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) expect: @@ -750,13 +741,12 @@ class BlockBlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) when: bc.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null, bac, null, null) @@ -781,8 +771,7 @@ class BlockBlobAPITest extends APISpec { when: bc.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null, - new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId("id")), - null, null) + new BlobRequestConditions().setLeaseId("id"), null, null) then: thrown(BlobStorageException) @@ -1007,10 +996,12 @@ class BlockBlobAPITest extends APISpec { bac.upload(defaultFlux, defaultDataSize).block() match = setupBlobMatchCondition(bac, match) leaseID = setupBlobLeaseCondition(bac, leaseID) - def accessConditions = new BlobAccessConditions().setModifiedAccessConditions( - new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) - .setIfMatch(match).setIfNoneMatch(noneMatch)) - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) + def accessConditions = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() @@ -1035,10 +1026,12 @@ class BlockBlobAPITest extends APISpec { bac.upload(defaultFlux, defaultDataSize).block() noneMatch = setupBlobMatchCondition(bac, noneMatch) leaseID = setupBlobLeaseCondition(bac, leaseID) - def accessConditions = new BlobAccessConditions().setModifiedAccessConditions( - new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) - .setIfMatch(match).setIfNoneMatch(noneMatch)) - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) + def accessConditions = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() @@ -1067,8 +1060,7 @@ class BlockBlobAPITest extends APISpec { setup: bac.upload(defaultFlux, defaultDataSize).block() def leaseID = setupBlobLeaseCondition(bac, garbageLeaseID) - def accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) + def accessConditions = new BlobRequestConditions().setLeaseId(leaseID) when: ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/LeaseAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/LeaseAPITest.groovy index 79a86adc7804..db3e92326af0 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/LeaseAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/LeaseAPITest.groovy @@ -3,10 +3,11 @@ package com.azure.storage.blob.specialized +import com.azure.core.http.RequestConditions import com.azure.storage.blob.APISpec import com.azure.storage.blob.models.LeaseDurationType import com.azure.storage.blob.models.LeaseStateType -import com.azure.storage.blob.models.ModifiedAccessConditions + import com.azure.storage.blob.models.BlobStorageException import spock.lang.Unroll @@ -77,7 +78,7 @@ class LeaseAPITest extends APISpec { setup: def bc = createBlobClient() match = setupBlobMatchCondition(bc, match) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -102,7 +103,7 @@ class LeaseAPITest extends APISpec { setup: def bc = createBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -165,7 +166,7 @@ class LeaseAPITest extends APISpec { def bc = createBlobClient() match = setupBlobMatchCondition(bc, match) def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -191,7 +192,7 @@ class LeaseAPITest extends APISpec { def bc = createBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -248,7 +249,7 @@ class LeaseAPITest extends APISpec { def bc = createBlobClient() match = setupBlobMatchCondition(bc, match) def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -272,7 +273,7 @@ class LeaseAPITest extends APISpec { def bc = createBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -341,7 +342,7 @@ class LeaseAPITest extends APISpec { def bc = createBlobClient() match = setupBlobMatchCondition(bc, match) setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -365,7 +366,7 @@ class LeaseAPITest extends APISpec { def bc = createBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -424,7 +425,7 @@ class LeaseAPITest extends APISpec { def bc = createBlobClient() match = setupBlobMatchCondition(bc, match) String leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -448,7 +449,7 @@ class LeaseAPITest extends APISpec { def bc = createBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) String leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -527,7 +528,7 @@ class LeaseAPITest extends APISpec { @Unroll def "Acquire container lease AC"() { setup: - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -548,7 +549,7 @@ class LeaseAPITest extends APISpec { @Unroll def "Acquire container lease AC fail"() { setup: - def mac = new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) when: createLeaseClient(cc).acquireLeaseWithResponse(-1, mac, null, null) @@ -598,7 +599,7 @@ class LeaseAPITest extends APISpec { def "Renew container lease AC"() { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) expect: createLeaseClient(cc, leaseID).renewLeaseWithResponse(mac, null, null).getStatusCode() == 200 @@ -614,7 +615,7 @@ class LeaseAPITest extends APISpec { def "Renew container lease AC fail"() { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) when: createLeaseClient(cc, leaseID).renewLeaseWithResponse(mac, null, null) @@ -631,7 +632,7 @@ class LeaseAPITest extends APISpec { @Unroll def "Renew container lease AC illegal"() { setup: - def mac = new ModifiedAccessConditions().setIfMatch(match).setIfNoneMatch(noneMatch) + def mac = new RequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) when: createLeaseClient(cc, receivedEtag).renewLeaseWithResponse(mac, null, null) @@ -679,7 +680,7 @@ class LeaseAPITest extends APISpec { def "Release container lease AC"() { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) expect: createLeaseClient(cc, leaseID).releaseLeaseWithResponse(mac, null, null).getStatusCode() == 200 @@ -695,7 +696,7 @@ class LeaseAPITest extends APISpec { def "Release container lease AC fail"() { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) when: createLeaseClient(cc, leaseID).releaseLeaseWithResponse(mac, null, null) @@ -712,7 +713,7 @@ class LeaseAPITest extends APISpec { @Unroll def "Release container lease AC illegal"() { setup: - def mac = new ModifiedAccessConditions().setIfMatch(match).setIfNoneMatch(noneMatch) + def mac = new RequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) when: createLeaseClient(cc, receivedLeaseID).releaseLeaseWithResponse(mac, null, null) @@ -775,7 +776,7 @@ class LeaseAPITest extends APISpec { def "Break container lease AC"() { setup: setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) expect: createLeaseClient(cc).breakLeaseWithResponse(null, mac, null, null).getStatusCode() == 202 @@ -791,7 +792,7 @@ class LeaseAPITest extends APISpec { def "Break container lease AC fail"() { setup: setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) when: createLeaseClient(cc).breakLeaseWithResponse(null, mac, null, null) @@ -808,7 +809,7 @@ class LeaseAPITest extends APISpec { @Unroll def "Break container lease AC illegal"() { setup: - def mac = new ModifiedAccessConditions().setIfMatch(match).setIfNoneMatch(noneMatch) + def mac = new RequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) when: createLeaseClient(cc).breakLeaseWithResponse(null, mac, null, null) @@ -857,7 +858,7 @@ class LeaseAPITest extends APISpec { def "Change container lease AC"() { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) expect: createLeaseClient(cc, leaseID).changeLeaseWithResponse(getRandomUUID(), mac, null, null).getStatusCode() == 200 @@ -873,7 +874,7 @@ class LeaseAPITest extends APISpec { def "Change container lease AC fail"() { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) when: createLeaseClient(cc, leaseID).changeLeaseWithResponse(getRandomUUID(), mac, null, null) @@ -890,7 +891,7 @@ class LeaseAPITest extends APISpec { @Unroll def "Change container lease AC illegal"() { setup: - def mac = new ModifiedAccessConditions().setIfMatch(match).setIfNoneMatch(noneMatch) + def mac = new RequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) when: createLeaseClient(cc, receivedLeaseID).changeLeaseWithResponse(garbageLeaseID, mac, null, null) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy index 27e872f92616..d299c498dd58 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy @@ -4,20 +4,18 @@ package com.azure.storage.blob.specialized import com.azure.core.exception.UnexpectedLengthException +import com.azure.core.http.RequestConditions import com.azure.storage.blob.APISpec -import com.azure.storage.blob.models.BlobAccessConditions + import com.azure.storage.blob.models.BlobHttpHeaders import com.azure.storage.blob.models.BlobRange +import com.azure.storage.blob.models.BlobRequestConditions +import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.blob.models.CopyStatusType -import com.azure.storage.blob.models.LeaseAccessConditions -import com.azure.storage.blob.models.ModifiedAccessConditions -import com.azure.storage.blob.models.PageBlobAccessConditions +import com.azure.storage.blob.models.PageBlobRequestConditions import com.azure.storage.blob.models.PageRange import com.azure.storage.blob.models.PublicAccessType -import com.azure.storage.blob.models.SequenceNumberAccessConditions import com.azure.storage.blob.models.SequenceNumberActionType -import com.azure.storage.blob.models.SourceModifiedAccessConditions -import com.azure.storage.blob.models.BlobStorageException import spock.lang.Unroll import java.security.MessageDigest @@ -118,13 +116,12 @@ class PageBlobAPITest extends APISpec { @Unroll def "Create AC"() { setup: - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(setupBlobMatchCondition(bc, match)) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(setupBlobMatchCondition(bc, match)) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: @@ -143,13 +140,12 @@ class PageBlobAPITest extends APISpec { @Unroll def "Create AC fail"() { setup: - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch))) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bc.createWithResponse(PageBlobClient.PAGE_BYTES, null, null, null, bac, null, null) @@ -168,8 +164,7 @@ class PageBlobAPITest extends APISpec { def "Create error"() { when: - bc.createWithResponse(PageBlobClient.PAGE_BYTES, null, null, null, - new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId("id")), null, null) + bc.createWithResponse(PageBlobClient.PAGE_BYTES, null, null, null, new BlobRequestConditions().setLeaseId("id"), null, null) then: thrown(BlobStorageException) @@ -213,17 +208,15 @@ class PageBlobAPITest extends APISpec { @Unroll def "Upload page AC"() { setup: - def pac = new PageBlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(setupBlobMatchCondition(bc, match)) - .setIfNoneMatch(noneMatch)) - .setSequenceNumberAccessConditions(new SequenceNumberAccessConditions() - .setIfSequenceNumberLessThan(sequenceNumberLT) - .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) - .setIfSequenceNumberEqualTo(sequenceNumberEqual)) + def pac = new PageBlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(setupBlobMatchCondition(bc, match)) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setIfSequenceNumberLessThan(sequenceNumberLT) + .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) + .setIfSequenceNumberEqualTo(sequenceNumberEqual) expect: bc.uploadPagesWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), @@ -247,17 +240,15 @@ class PageBlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - def pac = new PageBlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) - .setSequenceNumberAccessConditions(new SequenceNumberAccessConditions() - .setIfSequenceNumberLessThan(sequenceNumberLT) - .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) - .setIfSequenceNumberEqualTo(sequenceNumberEqual)) + def pac = new PageBlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setIfSequenceNumberLessThan(sequenceNumberLT) + .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) + .setIfSequenceNumberEqualTo(sequenceNumberEqual) when: bc.uploadPagesWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), @@ -285,8 +276,7 @@ class PageBlobAPITest extends APISpec { when: bc.uploadPagesWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES)), - new PageBlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId("id")), - null, null) + new PageBlobRequestConditions().setLeaseId("id"), null, null) then: thrown(BlobStorageException) @@ -383,17 +373,15 @@ class PageBlobAPITest extends APISpec { def pageRange = new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1) sourceURL.uploadPages(pageRange, new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) - def pac = new PageBlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(setupBlobMatchCondition(bc, match)) - .setIfNoneMatch(noneMatch)) - .setSequenceNumberAccessConditions(new SequenceNumberAccessConditions() - .setIfSequenceNumberLessThan(sequenceNumberLT) - .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) - .setIfSequenceNumberEqualTo(sequenceNumberEqual)) + def pac = new PageBlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(setupBlobMatchCondition(bc, match)) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setIfSequenceNumberLessThan(sequenceNumberLT) + .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) + .setIfSequenceNumberEqualTo(sequenceNumberEqual) expect: bc.uploadPagesFromURLWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, pac, null, null, null).getStatusCode() == 201 @@ -422,17 +410,15 @@ class PageBlobAPITest extends APISpec { sourceURL.uploadPages(pageRange, new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) noneMatch = setupBlobMatchCondition(bc, noneMatch) - def pac = new PageBlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) - .setSequenceNumberAccessConditions(new SequenceNumberAccessConditions() - .setIfSequenceNumberLessThan(sequenceNumberLT) - .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) - .setIfSequenceNumberEqualTo(sequenceNumberEqual)) + def pac = new PageBlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setIfSequenceNumberLessThan(sequenceNumberLT) + .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) + .setIfSequenceNumberEqualTo(sequenceNumberEqual) when: bc.uploadPagesFromURLWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, pac, null, null, null) @@ -462,11 +448,11 @@ class PageBlobAPITest extends APISpec { sourceURL.uploadPages(pageRange, new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) sourceIfMatch = setupBlobMatchCondition(sourceURL, sourceIfMatch) - def smac = new SourceModifiedAccessConditions() - .setSourceIfModifiedSince(sourceIfModifiedSince) - .setSourceIfUnmodifiedSince(sourceIfUnmodifiedSince) - .setSourceIfMatch(sourceIfMatch) - .setSourceIfNoneMatch(sourceIfNoneMatch) + def smac = new BlobRequestConditions() + .setIfModifiedSince(sourceIfModifiedSince) + .setIfUnmodifiedSince(sourceIfUnmodifiedSince) + .setIfMatch(sourceIfMatch) + .setIfNoneMatch(sourceIfNoneMatch) expect: bc.uploadPagesFromURLWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 @@ -489,11 +475,11 @@ class PageBlobAPITest extends APISpec { def pageRange = new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1) sourceURL.uploadPages(pageRange, new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) - def smac = new SourceModifiedAccessConditions() - .setSourceIfModifiedSince(sourceIfModifiedSince) - .setSourceIfUnmodifiedSince(sourceIfUnmodifiedSince) - .setSourceIfMatch(sourceIfMatch) - .setSourceIfNoneMatch(setupBlobMatchCondition(sourceURL, sourceIfNoneMatch)) + def smac = new BlobRequestConditions() + .setIfModifiedSince(sourceIfModifiedSince) + .setIfUnmodifiedSince(sourceIfUnmodifiedSince) + .setIfMatch(sourceIfMatch) + .setIfNoneMatch(setupBlobMatchCondition(sourceURL, sourceIfNoneMatch)) when: bc.uploadPagesFromURLWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, null, smac, null, null) @@ -535,17 +521,15 @@ class PageBlobAPITest extends APISpec { new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - def pac = new PageBlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) - .setSequenceNumberAccessConditions(new SequenceNumberAccessConditions() - .setIfSequenceNumberLessThan(sequenceNumberLT) - .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) - .setIfSequenceNumberEqualTo(sequenceNumberEqual)) + def pac = new PageBlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setIfSequenceNumberLessThan(sequenceNumberLT) + .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) + .setIfSequenceNumberEqualTo(sequenceNumberEqual) expect: bc.clearPagesWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), pac, null, null) @@ -571,17 +555,15 @@ class PageBlobAPITest extends APISpec { new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - def pac = new PageBlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) - .setSequenceNumberAccessConditions(new SequenceNumberAccessConditions() - .setIfSequenceNumberLessThan(sequenceNumberLT) - .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) - .setIfSequenceNumberEqualTo(sequenceNumberEqual)) + def pac = new PageBlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setIfSequenceNumberLessThan(sequenceNumberLT) + .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) + .setIfSequenceNumberEqualTo(sequenceNumberEqual) when: @@ -641,13 +623,12 @@ class PageBlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: @@ -669,13 +650,12 @@ class PageBlobAPITest extends APISpec { @Unroll def "Get page ranges AC fail"() { setup: - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch))) + def bac = new BlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(match) + .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bc.getPageRangesWithResponse(new BlobRange(0, PageBlobClient.PAGE_BYTES), bac, null, null) @@ -746,13 +726,12 @@ class PageBlobAPITest extends APISpec { def "Get page ranges diff AC"() { setup: def snapId = bc.createSnapshot().getSnapshotId() - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(setupBlobMatchCondition(bc, match)) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(setupBlobMatchCondition(bc, match)) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bc.getPageRangesDiffWithResponse(new BlobRange(0, PageBlobClient.PAGE_BYTES), snapId, bac, null, null) @@ -775,13 +754,12 @@ class PageBlobAPITest extends APISpec { setup: def snapId = bc.createSnapshot().getSnapshotId() - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch))) + def bac = new BlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(match) + .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bc.getPageRangesDiffWithResponse(new BlobRange(0, PageBlobClient.PAGE_BYTES), snapId, bac, null, null) @@ -848,13 +826,12 @@ class PageBlobAPITest extends APISpec { @Unroll def "Resize AC"() { setup: - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(setupBlobMatchCondition(bc, match)) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(setupBlobMatchCondition(bc, match)) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: bc.resizeWithResponse(PageBlobClient.PAGE_BYTES * 2, bac, null, null).getStatusCode() == 200 @@ -872,13 +849,12 @@ class PageBlobAPITest extends APISpec { @Unroll def "Resize AC fail"() { setup: - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch))) + def bac = new BlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(match) + .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bc.resizeWithResponse(PageBlobClient.PAGE_BYTES * 2, bac, null, null) @@ -931,13 +907,12 @@ class PageBlobAPITest extends APISpec { @Unroll def "Sequence number AC"() { setup: - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(setupBlobMatchCondition(bc, match)) - .setIfNoneMatch(noneMatch)) + def bac = new BlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(setupBlobMatchCondition(bc, match)) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) expect: bc.updateSequenceNumberWithResponse(SequenceNumberActionType.UPDATE, 1, bac, null, null) @@ -956,13 +931,12 @@ class PageBlobAPITest extends APISpec { @Unroll def "Sequence number AC fail"() { setup: - def bac = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfModifiedSince(modified) - .setIfUnmodifiedSince(unmodified) - .setIfMatch(match) - .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch))) + def bac = new BlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(match) + .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) when: bc.updateSequenceNumberWithResponse(SequenceNumberActionType.UPDATE, 1, bac, null, null) @@ -1050,7 +1024,7 @@ class PageBlobAPITest extends APISpec { snapshot = bc.createSnapshot().getSnapshotId() match = setupBlobMatchCondition(bu2, match) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) @@ -1077,7 +1051,7 @@ class PageBlobAPITest extends APISpec { bu2.copyIncremental(bc.getBlobUrl(), snapshot) snapshot = bc.createSnapshot().getSnapshotId() noneMatch = setupBlobMatchCondition(bu2, noneMatch) - def mac = new ModifiedAccessConditions() + def mac = new RequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index 28076bb1f114..9c9361f604c5 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -34,7 +34,7 @@ sync-methods: none license-header: MICROSOFT_MIT_SMALL add-context-parameter: true models-subpackage: implementation.models -custom-types: BlobAccessPolicy,AccessTier,AccountKind,AppendPositionAccessConditions,ArchiveStatus,BlobDownloadHeaders,BlobHttpHeaders,BlobContainerItem,BlobItem,BlobContainerItemProperties,BlobItemProperties,BlobServiceProperties,BlobType,Block,BlockList,BlockListType,BlockLookupList,BlobPrefix,ClearRange,CopyStatusType,BlobCorsRule,CpkInfo,CustomerProvidedKeyInfo,DeleteSnapshotsOptionType,EncryptionAlgorithmType,FilterBlobsItem,GeoReplication,GeoReplicationStatusType,KeyInfo,LeaseAccessConditions,LeaseDurationType,LeaseStateType,LeaseStatusType,ListBlobContainersIncludeType,ListBlobsIncludeItem,BlobAnalyticsLogging,BlobMetrics,ModifiedAccessConditions,PageList,PageRange,PathRenameMode,PublicAccessType,RehydratePriority,BlobRetentionPolicy,SequenceNumberAccessConditions,SequenceNumberActionType,BlobSignedIdentifier,SkuName,SourceModifiedAccessConditions,StaticWebsite,BlobErrorCode,BlobServiceStatistics,SyncCopyStatusType,UserDelegationKey +custom-types: BlobAccessPolicy,AccessTier,AccountKind,ArchiveStatus,BlobDownloadHeaders,BlobHttpHeaders,BlobContainerItem,BlobItem,BlobContainerItemProperties,BlobItemProperties,BlobServiceProperties,BlobType,Block,BlockList,BlockListType,BlockLookupList,BlobPrefix,ClearRange,CopyStatusType,BlobCorsRule,CpkInfo,CustomerProvidedKeyInfo,DeleteSnapshotsOptionType,EncryptionAlgorithmType,FilterBlobsItem,GeoReplication,GeoReplicationStatusType,KeyInfo,LeaseDurationType,LeaseStateType,LeaseStatusType,ListBlobContainersIncludeType,ListBlobsIncludeItem,BlobAnalyticsLogging,BlobMetrics,PageList,PageRange,PathRenameMode,PublicAccessType,RehydratePriority,BlobRetentionPolicy,SequenceNumberActionType,BlobSignedIdentifier,SkuName,StaticWebsite,BlobErrorCode,BlobServiceStatistics,SyncCopyStatusType,UserDelegationKey custom-types-subpackage: models ``` @@ -1208,3 +1208,37 @@ directive: $.BlobContentMD5["x-ms-parameter-grouping"].name = "blob-http-headers"; $.BlobContentType["x-ms-parameter-grouping"].name = "blob-http-headers"; ``` + +### Remove AccessConditions parameter groupings +``` yaml +directive: +- from: swagger-document + where: $.parameters + transform: > + delete $.SourceIfMatch["x-ms-parameter-grouping"]; + delete $.SourceIfModifiedSince["x-ms-parameter-grouping"]; + delete $.SourceIfNoneMatch["x-ms-parameter-grouping"]; + delete $.SourceIfUnmodifiedSince["x-ms-parameter-grouping"]; +- from: swagger-document + where: $.parameters + transform: > + delete $.IfMatch["x-ms-parameter-grouping"]; + delete $.IfModifiedSince["x-ms-parameter-grouping"]; + delete $.IfNoneMatch["x-ms-parameter-grouping"]; + delete $.IfUnmodifiedSince["x-ms-parameter-grouping"]; +- from: swagger-document + where: $.parameters + transform: > + delete $.BlobConditionAppendPos["x-ms-parameter-grouping"]; + delete $.BlobConditionMaxSize["x-ms-parameter-grouping"]; +- from: swagger-document + where: $.parameters + transform: > + delete $.IfSequenceNumberEqualTo["x-ms-parameter-grouping"]; + delete $.IfSequenceNumberLessThan["x-ms-parameter-grouping"]; + delete $.IfSequenceNumberLessThanOrEqualTo["x-ms-parameter-grouping"]; +- from: swagger-document + where: $.parameters + transform: > + delete $.LeaseIdOptional["x-ms-parameter-grouping"]; +``` From f49d347fa856ecd1478e623bca6725cade2cfbc7 Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Mon, 21 Oct 2019 14:42:18 -0700 Subject: [PATCH 30/64] Remove dependency on azure-core-test in code snippets (#5963) --- .../CertificateAsyncClientJavaDocCodeSnippets.java | 7 +------ .../keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java | 7 +------ .../CryptographyAsyncClientJavaDocCodeSnippets.java | 7 +------ .../secrets/SecretAsyncClientJavaDocCodeSnippets.java | 9 ++------- 4 files changed, 5 insertions(+), 25 deletions(-) diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateAsyncClientJavaDocCodeSnippets.java index e6cecad9a9b3..05fc03c76752 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateAsyncClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateAsyncClientJavaDocCodeSnippets.java @@ -10,8 +10,6 @@ import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.test.models.RecordedData; -import com.azure.core.test.policy.RecordNetworkCallPolicy; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.models.Certificate; import com.azure.security.keyvault.certificates.models.CertificatePolicy; @@ -44,14 +42,12 @@ public final class CertificateAsyncClientJavaDocCodeSnippets { */ public CertificateAsyncClient createAsyncClientWithHttpclient() { // BEGIN: com.azure.security.keyvault.certificates.CertificateAsyncClient.withhttpclient.instantiation - RecordedData networkData = new RecordedData(); HttpPipeline pipeline = new HttpPipelineBuilder().policies(new RetryPolicy()).build(); CertificateAsyncClient keyClient = new CertificateClientBuilder() .pipeline(pipeline) .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) .endpoint("https://myvault.azure.net/") .credential(new DefaultAzureCredentialBuilder().build()) - .addPolicy(new RecordNetworkCallPolicy(networkData)) .httpClient(HttpClient.createDefault()) .buildAsyncClient(); // END: com.azure.security.keyvault.certificates.CertificateAsyncClient.withhttpclient.instantiation @@ -79,8 +75,7 @@ private CertificateAsyncClient getCertificateAsyncClient() { */ public CertificateAsyncClient createAsyncClientWithPipeline() { // BEGIN: com.azure.security.keyvault.certificates.CertificateAsyncClient.pipeline.instantiation - RecordedData networkData = new RecordedData(); - HttpPipeline pipeline = new HttpPipelineBuilder().policies(new RecordNetworkCallPolicy(networkData)).build(); + HttpPipeline pipeline = new HttpPipelineBuilder().build(); CertificateAsyncClient secretAsyncClient = new CertificateClientBuilder() .pipeline(pipeline) .endpoint("https://myvault.azure.net/") diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java index 6af4458c4ebd..a31be3596438 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java @@ -9,8 +9,6 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.test.models.RecordedData; -import com.azure.core.test.policy.RecordNetworkCallPolicy; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; import com.azure.security.keyvault.keys.models.KeyProperties; @@ -39,12 +37,10 @@ public final class KeyAsyncClientJavaDocCodeSnippets { */ public KeyAsyncClient createAsyncClientWithHttpClient() { // BEGIN: com.azure.security.keyvault.keys.async.keyclient.withhttpclient.instantiation - RecordedData networkData = new RecordedData(); KeyAsyncClient keyAsyncClient = new KeyClientBuilder() .endpoint("https://myvault.azure.net/") .credential(new DefaultAzureCredentialBuilder().build()) .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) - .addPolicy(new RecordNetworkCallPolicy(networkData)) .httpClient(HttpClient.createDefault()) .buildAsyncClient(); // END: com.azure.security.keyvault.keys.async.keyclient.withhttpclient.instantiation @@ -71,8 +67,7 @@ public KeyAsyncClient createAsyncClient() { */ public KeyAsyncClient createAsyncClientWithPipeline() { // BEGIN: com.azure.security.keyvault.keys.async.keyclient.pipeline.instantiation - RecordedData networkData = new RecordedData(); - HttpPipeline pipeline = new HttpPipelineBuilder().policies(new RecordNetworkCallPolicy(networkData)).build(); + HttpPipeline pipeline = new HttpPipelineBuilder().build(); KeyAsyncClient keyAsyncClient = new KeyClientBuilder() .pipeline(pipeline) .endpoint("https://myvault.azure.net/") diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java index 1bb9703ba3d0..b30ee0690672 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java @@ -9,8 +9,6 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.test.models.RecordedData; -import com.azure.core.test.policy.RecordNetworkCallPolicy; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.KeyAsyncClient; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; @@ -37,12 +35,10 @@ public final class CryptographyAsyncClientJavaDocCodeSnippets { */ public CryptographyAsyncClient createAsyncClientWithHttpClient() { // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.withhttpclient.instantiation - RecordedData networkData = new RecordedData(); CryptographyAsyncClient cryptographyAsyncClient = new CryptographyClientBuilder() .keyIdentifier("") .credential(new DefaultAzureCredentialBuilder().build()) .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) - .addPolicy(new RecordNetworkCallPolicy(networkData)) .httpClient(HttpClient.createDefault()) .buildAsyncClient(); // END: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.withhttpclient.instantiation @@ -69,8 +65,7 @@ public CryptographyAsyncClient createAsyncClient() { */ public CryptographyAsyncClient createAsyncClientWithPipeline() { // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.pipeline.instantiation - RecordedData networkData = new RecordedData(); - HttpPipeline pipeline = new HttpPipelineBuilder().policies(new RecordNetworkCallPolicy(networkData)).build(); + HttpPipeline pipeline = new HttpPipelineBuilder().build(); CryptographyAsyncClient cryptographyAsyncClient = new CryptographyClientBuilder() .pipeline(pipeline) .keyIdentifier(" Date: Mon, 21 Oct 2019 14:54:10 -0700 Subject: [PATCH 31/64] Log more error details in azure core (#5703) * Log more error details in azure core * Update the util pkg * Update sdk/core/azure-core/src/main/java/com/azure/core/implementation/SwaggerMethodParser.java Co-Authored-By: Srikanta <51379715+srnagar@users.noreply.github.com> * Addressed feedback * Update sdk/core/azure-core/src/main/java/com/azure/core/implementation/ResponseConstructorsCache.java Co-Authored-By: Connie Yau * Update sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HostPolicy.java Co-Authored-By: Connie Yau * Added error details for remaining packages and addressed comments. * Fixed tests * Removed unused logging * Fix linting * Update sdk/core/azure-core/src/main/java/com/azure/core/implementation/serializer/HttpResponseHeaderDecoder.java Co-Authored-By: Connie Yau * Update sdk/core/azure-core/src/main/java/com/azure/core/implementation/ResponseConstructorsCache.java Co-Authored-By: Connie Yau * Address Connie's Comments. * Remove unnessary message * Revert changes * Update sdk/core/azure-core/src/main/java/com/azure/core/util/polling/Poller.java Co-Authored-By: Connie Yau * Rename exception variable. * Added placeholder. * Make changes * Remove imports * make changes to message * Update sdk/core/azure-core/src/main/java/com/azure/core/implementation/util/FluxUtil.java Co-Authored-By: Connie Yau * Address Connie's feedback * Fixed linting --- .../com/azure/core/http/policy/HostPolicy.java | 3 ++- .../azure/core/http/policy/HttpLoggingPolicy.java | 10 ++++++---- .../com/azure/core/http/policy/PortPolicy.java | 3 ++- .../com/azure/core/http/policy/ProtocolPolicy.java | 3 ++- .../com/azure/core/http/policy/RetryPolicy.java | 4 +++- .../implementation/ResponseConstructorsCache.java | 13 ++++++++----- .../com/azure/core/implementation/RestProxy.java | 3 +-- .../serializer/HttpResponseBodyDecoder.java | 14 +++++++++----- .../serializer/jackson/JacksonAdapter.java | 1 + .../azure/core/implementation/util/FluxUtil.java | 4 ++-- .../java/com/azure/core/util/polling/Poller.java | 4 ++-- 11 files changed, 38 insertions(+), 24 deletions(-) diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HostPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HostPolicy.java index 25ca980904a5..0d93d809698c 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HostPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HostPolicy.java @@ -39,7 +39,8 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN context.getHttpRequest().setUrl(urlBuilder.setHost(host).toURL()); result = next.process(); } catch (MalformedURLException e) { - result = Mono.error(e); + result = Mono.error(new RuntimeException(String.format("Host URL '%s' is invalid.", + host), e)); } return result; } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java index eacb98b20086..98e74931be83 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java @@ -95,7 +95,7 @@ private Mono logRequest(final ClientLogger logger, final HttpRequest reque } else { boolean isHumanReadableContentType = !"application/octet-stream".equalsIgnoreCase(request.getHeaders().getValue("Content-Type")); - final long contentLength = getContentLength(request.getHeaders()); + final long contentLength = getContentLength(logger, request.getHeaders()); if (contentLength < MAX_BODY_LOG_SIZE && isHumanReadableContentType) { try { @@ -191,7 +191,7 @@ private Function> logResponseDelegate(final Cli } if (httpLogLevel.shouldLogBody()) { - long contentLength = getContentLength(response.getHeaders()); + long contentLength = getContentLength(logger, response.getHeaders()); final String contentTypeHeader = response.getHeaderValue("Content-Type"); if (!"application/octet-stream".equalsIgnoreCase(contentTypeHeader) && contentLength != 0 && contentLength < MAX_BODY_LOG_SIZE) { @@ -227,11 +227,13 @@ private String prettyPrintIfNeeded(ClientLogger logger, String contentType, Stri return result; } - private long getContentLength(HttpHeaders headers) { + private long getContentLength(ClientLogger logger, HttpHeaders headers) { long contentLength = 0; try { contentLength = Long.parseLong(headers.getValue("content-length")); - } catch (NumberFormatException | NullPointerException ignored) { + } catch (NumberFormatException | NullPointerException e) { + logger.warning("Could not parse the HTTP header content-length: '{}'.", + headers.getValue("content-length"), e); } return contentLength; diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/PortPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/PortPolicy.java index 665e29d67662..ff7603a753d8 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/PortPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/PortPolicy.java @@ -40,7 +40,8 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN try { context.getHttpRequest().setUrl(urlBuilder.setPort(port).toURL()); } catch (MalformedURLException e) { - return Mono.error(e); + return Mono.error(new RuntimeException( + String.format("Failed to set the HTTP request port to %d.", port), e)); } } return next.process(); diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/ProtocolPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/ProtocolPolicy.java index 0b618d260287..1def3cb6f53d 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/ProtocolPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/ProtocolPolicy.java @@ -40,7 +40,8 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN try { context.getHttpRequest().setUrl(urlBuilder.setScheme(protocol).toURL()); } catch (MalformedURLException e) { - return Mono.error(e); + return Mono.error(new RuntimeException( + String.format("Failed to set the HTTP request protocol to %d.", protocol), e)); } } return next.process(); diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java index 8bf2418344fe..cc4c5bd939e1 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java @@ -66,7 +66,9 @@ private Mono attemptAsync(final HttpPipelineCallContext context, f return attemptAsync(context, next, originalHttpRequest, tryCount + 1) .delaySubscription(this.delayDuration); } else { - return Mono.error(err); + return Mono.error(new RuntimeException( + String.format("Max retries %d times exceeded. Error Details: %s", maxRetries, err.getMessage()), + err)); } }); } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/ResponseConstructorsCache.java b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/ResponseConstructorsCache.java index f236ebf96fc1..5614236bd990 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/ResponseConstructorsCache.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/ResponseConstructorsCache.java @@ -9,7 +9,6 @@ import com.azure.core.http.rest.Response; import com.azure.core.implementation.serializer.HttpResponseDecoder; import com.azure.core.util.logging.ClientLogger; -import reactor.core.Exceptions; import reactor.core.publisher.Mono; import java.lang.reflect.Constructor; @@ -96,7 +95,8 @@ Mono> invoke(final Constructor> constructor, responseStatusCode, responseHeaders)); } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { - throw logger.logExceptionAsError(Exceptions.propagate(e)); + throw logger.logExceptionAsError(new RuntimeException("Failed to deserialize 3-parameter" + + " response. ", e)); } case 4: try { @@ -105,7 +105,8 @@ Mono> invoke(final Constructor> constructor, responseHeaders, bodyAsObject)); } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { - throw logger.logExceptionAsError(Exceptions.propagate(e)); + throw logger.logExceptionAsError(new RuntimeException("Failed to deserialize 4-parameter" + + " response. ", e)); } case 5: return decodedResponse.getDecodedHeaders() @@ -117,7 +118,8 @@ Mono> invoke(final Constructor> constructor, bodyAsObject, decodedHeaders); } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { - throw logger.logExceptionAsError(Exceptions.propagate(e)); + throw logger.logExceptionAsError(new RuntimeException("Failed to deserialize 5-parameter" + + " response with decoded headers. ", e)); } }) .switchIfEmpty(Mono.defer((Supplier>>) () -> { @@ -128,7 +130,8 @@ Mono> invoke(final Constructor> constructor, bodyAsObject, null)); } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { - throw logger.logExceptionAsError(Exceptions.propagate(e)); + throw logger.logExceptionAsError(new RuntimeException( + "Failed to deserialize 5-parameter response without decoded headers.", e)); } })); default: diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/RestProxy.java b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/RestProxy.java index ba0ddfa22663..6adbd6eda277 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/RestProxy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/RestProxy.java @@ -158,8 +158,7 @@ public Object invoke(Object proxy, final Method method, Object[] args) { return handleHttpResponse(request, asyncDecodedResponse, methodParser, methodParser.getReturnType(), context); } - - } catch (Exception e) { + } catch (IOException e) { throw logger.logExceptionAsError(Exceptions.propagate(e)); } } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/serializer/HttpResponseBodyDecoder.java b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/serializer/HttpResponseBodyDecoder.java index dbc188298b20..5b676481cf8b 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/serializer/HttpResponseBodyDecoder.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/serializer/HttpResponseBodyDecoder.java @@ -17,6 +17,7 @@ import com.azure.core.implementation.http.PagedResponseBase; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.implementation.util.TypeUtil; +import com.azure.core.util.logging.ClientLogger; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -48,6 +49,7 @@ final class HttpResponseBodyDecoder { static Mono decode(HttpResponse httpResponse, SerializerAdapter serializer, HttpResponseDecodeData decodeData) { ensureRequestSet(httpResponse); + final ClientLogger logger = new ClientLogger(HttpResponseBodyDecoder.class); // return Mono.defer(() -> { if (isErrorStatus(httpResponse, decodeData)) { @@ -56,13 +58,12 @@ static Mono decode(HttpResponse httpResponse, SerializerAdapter serializ try { final Object decodedErrorEntity = deserializeBody(bodyString, decodeData.getUnexpectedException(httpResponse.getStatusCode()).getExceptionBodyType(), - null, - serializer, - SerializerEncoding.fromHeaders(httpResponse.getHeaders())); + null, serializer, SerializerEncoding.fromHeaders(httpResponse.getHeaders())); return decodedErrorEntity == null ? Mono.empty() : Mono.just(decodedErrorEntity); - } catch (IOException | MalformedValueException ignored) { + } catch (IOException | MalformedValueException ex) { // This translates in RestProxy as a RestException with no deserialized body. // The response content will still be accessible via the .response() member. + logger.warning("Failed to deserialize the error entity.", ex); } return Mono.empty(); }); @@ -372,6 +373,7 @@ private static Object convertToResultType(Object wireResponse, Type resultType, */ private static Type extractEntityTypeFromReturnType(HttpResponseDecodeData decodeData) { Type token = decodeData.getReturnType(); + final ClientLogger logger = new ClientLogger(HttpResponseBodyDecoder.class); if (token != null) { if (TypeUtil.isTypeOrSubTypeOf(token, Mono.class)) { token = TypeUtil.getTypeArgument(token); @@ -385,6 +387,7 @@ private static Type extractEntityTypeFromReturnType(HttpResponseDecodeData decod token = t; } } catch (ClassNotFoundException ignored) { + logger.warning("Failed to find class 'com.azure.core.management.implementation.OperationStatus'."); } } @@ -399,7 +402,8 @@ private static Type extractEntityTypeFromReturnType(HttpResponseDecodeData decod // Get Type of 'T' from OperationStatus token = TypeUtil.getTypeArgument(token); } - } catch (Exception ignored) { + } catch (ClassNotFoundException ignored) { + logger.warning("Failed to find class 'com.azure.core.management.implementation.OperationStatus'."); } } return token; diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/serializer/jackson/JacksonAdapter.java b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/serializer/jackson/JacksonAdapter.java index b99c8b06e25f..5b232fd8296d 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/serializer/jackson/JacksonAdapter.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/serializer/jackson/JacksonAdapter.java @@ -140,6 +140,7 @@ public String serializeRaw(Object object) { try { return serialize(object, SerializerEncoding.JSON).replaceAll("^\"*", "").replaceAll("\"*$", ""); } catch (IOException ex) { + logger.warning("Failed to serialize {} to JSON.", object.getClass(), ex); return null; } } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/util/FluxUtil.java b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/util/FluxUtil.java index 828d66ca04d2..cbf2bb1134da 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/util/FluxUtil.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/util/FluxUtil.java @@ -64,7 +64,7 @@ private static void accept(ByteArrayOutputStream byteOutputStream, ByteBuffer by try { byteOutputStream.write(byteBufferToArray(byteBuffer)); } catch (IOException e) { - throw new RuntimeException(e); + throw new RuntimeException("Error occurred writing ByteBuffer to ByteArrayOutputStream.", e); } } @@ -300,7 +300,7 @@ public static Flux readFile(AsynchronousFileChannel fileChannel) { long size = fileChannel.size(); return readFile(fileChannel, DEFAULT_CHUNK_SIZE, 0, size); } catch (IOException e) { - return Flux.error(e); + return Flux.error(new RuntimeException("Failed to read the file.", e)); } } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/Poller.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/Poller.java index 98d67a095872..2571741cc421 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/Poller.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/Poller.java @@ -399,8 +399,8 @@ private Mono> asyncPollRequestWithDelay() { return Mono.defer(() -> this.pollOperation.apply(this.pollResponse) .delaySubscription(getCurrentDelay()) .onErrorResume(throwable -> { - // We should never get here and since we want to continue polling - //Log the error + // We should never get here and since we want to continue polling. + logger.warning("Failed to apply delay and call poll operation.", throwable); return Mono.empty(); }) .doOnEach(pollResponseSignal -> { From 69453e72597d13e52396a340956023b527361e9c Mon Sep 17 00:00:00 2001 From: Shawn Fang <45607042+mssfang@users.noreply.github.com> Date: Mon, 21 Oct 2019 15:45:49 -0700 Subject: [PATCH 32/64] Logging on Retry policy and Temporary add AZURE_LOG_LEVEL to 2 for investigating (#5573) * add logging to retry policy and temprary AZURE_LOG_LEVEL to 2 for an debugging 429 code * add duration info in log * remove HTTP request and responds log info * info to verbose --- .../java/com/azure/core/http/policy/RetryPolicy.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java index cc4c5bd939e1..cb2002906592 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java @@ -7,6 +7,7 @@ import com.azure.core.http.HttpPipelineNextPolicy; import com.azure.core.http.HttpRequest; import com.azure.core.http.HttpResponse; +import com.azure.core.util.logging.ClientLogger; import reactor.core.publisher.Mono; import java.net.HttpURLConnection; @@ -22,6 +23,9 @@ public class RetryPolicy implements HttpPipelinePolicy { private static final int HTTP_STATUS_TOO_MANY_REQUESTS = 429; private static final ChronoUnit DEFAULT_TIME_UNIT = ChronoUnit.MILLIS; private static final String RETRY_AFTER_MS_HEADER = "retry-after-ms"; + + private final ClientLogger logger = new ClientLogger(RetryPolicy.class); + private final int maxRetries; private final Duration delayDuration; @@ -55,14 +59,18 @@ private Mono attemptAsync(final HttpPipelineCallContext context, f return next.clone().process() .flatMap(httpResponse -> { if (shouldRetry(httpResponse, tryCount)) { + final Duration delayDuration = determineDelayDuration(httpResponse); + logger.verbose("[Retrying] Try count: {}, Delay duration in seconds: {}", tryCount, + delayDuration.getSeconds()); return attemptAsync(context, next, originalHttpRequest, tryCount + 1) - .delaySubscription(determineDelayDuration(httpResponse)); + .delaySubscription(delayDuration); } else { return Mono.just(httpResponse); } }) .onErrorResume(err -> { if (tryCount < maxRetries) { + logger.verbose("[Error Resume] Try count: {}, Error: {}", tryCount, err); return attemptAsync(context, next, originalHttpRequest, tryCount + 1) .delaySubscription(this.delayDuration); } else { From 10257e58980f5ab3d4ac76e1105e2be29d4d482e Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Mon, 21 Oct 2019 16:23:05 -0700 Subject: [PATCH 33/64] Fixes Swagger Generation Naming and Moves Properties Classes (#5961) * Update Swagger to generate with correct casing, removed blob prefix from BlobHttpHeaders, move properties classes into models * Suppress SpotBug issues with implementation classes --- .../resources/spotbugs/spotbugs-exclude.xml | 8 +- ...tedBlobAsyncClientJavaDocCodeSnippets.java | 12 +- ...ncryptedBlobClientJavaDocCodeSnippets.java | 6 +- .../specialized/cryptography/APISpec.groovy | 2 +- .../cryptography/EncryptedFlux.java | 4 +- .../EncyptedBlockBlobAPITest.groovy | 12 +- .../blob/BlobContainerAsyncClient.java | 10 +- .../storage/blob/BlobContainerClient.java | 1 + .../blob/implementation/AppendBlobsImpl.java | 51 +++---- .../blob/implementation/BlobsImpl.java | 49 +++--- .../blob/implementation/BlockBlobsImpl.java | 100 ++++++------ .../blob/implementation/ContainersImpl.java | 5 +- .../blob/implementation/PageBlobsImpl.java | 51 +++---- .../{ => models}/BlobContainerProperties.java | 31 ++-- .../blob/models/BlobDownloadHeaders.java | 18 +-- .../storage/blob/models/BlobHttpHeaders.java | 144 +++++++++--------- .../blob/models/BlobItemProperties.java | 20 +-- .../storage/blob/models/BlobMetrics.java | 50 +++--- .../blob/{ => models}/BlobProperties.java | 84 +++++----- .../blob/models/UserDelegationKey.java | 44 +++--- .../blob/specialized/BlobAsyncClientBase.java | 19 ++- .../blob/specialized/BlobClientBase.java | 2 +- .../BlobServiceSasQueryParameters.java | 8 +- .../BlobServiceSasSignatureValues.java | 4 +- .../specialized/BlockBlobAsyncClient.java | 4 +- .../BlobAsyncClientJavaDocCodeSnippets.java | 26 ++-- .../blob/BlobClientJavaDocCodeSnippets.java | 15 +- ...lobContainerClientJavaDocCodeSnippets.java | 1 + .../SetMetadataAndHTTPHeadersExample.java | 4 +- ...endBlobAsyncClientJavaDocCodeSnippets.java | 4 +- .../AppendBlobClientJavaDocCodeSnippets.java | 4 +- ...lobAsyncClientBaseJavaDocCodeSnippets.java | 8 +- .../BlobClientBaseJavaDocCodeSnippets.java | 10 +- ...ockBlobAsyncClientJavaDocCodeSnippets.java | 12 +- .../BlockBlobClientJavaDocCodeSnippets.java | 12 +- ...ageBlobAsyncClientJavaDocCodeSnippets.java | 4 +- .../PageBlobClientJavaDocCodeSnippets.java | 4 +- .../com/azure/storage/blob/APISpec.groovy | 1 + .../com/azure/storage/blob/BlobAPITest.groovy | 24 +-- .../storage/blob/ContainerAPITest.groovy | 5 +- .../com/azure/storage/blob/SASTest.groovy | 28 ++-- .../azure/storage/blob/ServiceAPITest.groovy | 16 +- .../blob/specialized/AppendBlobAPITest.groovy | 12 +- .../blob/specialized/BlockBlobAPITest.groovy | 24 +-- .../blob/specialized/HelperTest.groovy | 7 +- .../blob/specialized/PageBlobAPITest.groovy | 12 +- .../azure-storage-blob/swagger/README.md | 22 +++ .../azure/storage/file/ShareAsyncClient.java | 2 +- .../AzureFileStorageBuilder.java | 6 +- .../file/implementation/FilesImpl.java | 88 +++++------ .../storage/file/models/FileHttpHeaders.java | 70 ++++----- .../storage/file/models/FileMetrics.java | 50 +++--- .../storage/file/models/ShareProperties.java | 20 +-- .../com/azure/storage/file/ShareSample.java | 4 +- .../storage/file/DirectoryAPITests.groovy | 2 +- .../file/DirectoryAsyncAPITests.groovy | 2 +- .../storage/file/FileServiceAPITests.groovy | 4 +- .../file/FileServiceAsyncAPITests.groovy | 4 +- .../azure/storage/file/FileTestHelper.groovy | 2 +- .../azure/storage/file/ShareAPITests.groovy | 2 +- .../storage/file/ShareAsyncAPITests.groovy | 2 +- .../azure-storage-file/swagger/README.md | 6 +- .../AzureQueueStorageBuilder.java | 6 +- .../storage/queue/models/QueueMetrics.java | 50 +++--- .../queue/models/QueueServiceProperties.java | 12 +- .../storage/queue/QueueServiceAPITests.groovy | 2 +- .../queue/QueueServiceAsyncAPITests.groovy | 2 +- .../storage/queue/QueueTestHelper.groovy | 2 +- .../azure-storage-queue/swagger/README.md | 3 + 69 files changed, 700 insertions(+), 635 deletions(-) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/{ => models}/BlobContainerProperties.java (64%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/{ => models}/BlobProperties.java (74%) diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml index b3975fd095c8..4e574eacd270 100755 --- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml +++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml @@ -648,9 +648,13 @@ - + - + + + + + diff --git a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java index 6176bff3a175..a8db10ca4cd9 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java @@ -64,9 +64,9 @@ public void upload() { public void upload2() { // BEGIN: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadWithResponse#Flux-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); Map metadata = new HashMap<>(Collections.singletonMap("metadata", "value")); BlobRequestConditions accessConditions = new BlobRequestConditions() @@ -99,9 +99,9 @@ public void uploadFromFile() { public void uploadFromFile2() { // BEGIN: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); Map metadata = new HashMap<>(Collections.singletonMap("metadata", "value")); BlobRequestConditions accessConditions = new BlobRequestConditions() diff --git a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientJavaDocCodeSnippets.java index 1f759bc93917..65752baa7c71 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientJavaDocCodeSnippets.java @@ -64,9 +64,9 @@ public void uploadFromFile() throws IOException { public void uploadFromFile2() throws IOException { // BEGIN: com.azure.storage.blob.specialized.cryptography.EncryptedBlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); Map metadata = new HashMap<>(Collections.singletonMap("metadata", "value")); BlobRequestConditions accessConditions = new BlobRequestConditions() diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy index 8354d14f5386..0351ae60f464 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy @@ -17,7 +17,7 @@ import com.azure.core.util.Configuration import com.azure.core.util.logging.ClientLogger import com.azure.storage.blob.BlobAsyncClient import com.azure.storage.blob.BlobClient -import com.azure.storage.blob.BlobProperties +import com.azure.storage.blob.models.BlobProperties import com.azure.storage.blob.BlobServiceClientBuilder import com.azure.storage.blob.specialized.LeaseClient import com.azure.storage.blob.specialized.LeaseClientBuilder diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedFlux.java b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedFlux.java index 0f87bfa4d1ae..eccf097d8046 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedFlux.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedFlux.java @@ -141,8 +141,8 @@ public EncryptedFlux(int testCase, AsyncKeyEncryptionKey key, APISpec spec) thro this.testCase = testCase; this.plainText = spec.getRandomData(DOWNLOAD_SIZE - 2); // This will yield two bytes of padding... for fun. - EncryptedBlob encryptedBlob = new EncryptedBlobAsyncClient(null, null, BlobServiceVersion.getLatest(), - null, null, null, null, key, "keyWrapAlgorithm") + EncryptedBlob encryptedBlob = new EncryptedBlobAsyncClient( + null, null, BlobServiceVersion.getLatest(), null, null, null, null, key, "keyWrapAlgorithm") .encryptBlob(Flux.just(this.plainText)).block(); this.cipherText = APISpec.collectBytesInBuffer(encryptedBlob.getCiphertextFlux()).block(); this.encryptionData = encryptedBlob.getEncryptionData(); diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy index 19e31b3f370b..783064cc92e5 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy @@ -225,12 +225,12 @@ class EncyptedBlockBlobAPITest extends APISpec { @Requires({ liveMode() }) def "Encryption HTTP headers"() { setup: - BlobHttpHeaders headers = new BlobHttpHeaders().setBlobCacheControl(cacheControl) - .setBlobContentDisposition(contentDisposition) - .setBlobContentEncoding(contentEncoding) - .setBlobContentLanguage(contentLanguage) - .setBlobContentMD5(contentMD5) - .setBlobContentType(contentType) + BlobHttpHeaders headers = new BlobHttpHeaders().setCacheControl(cacheControl) + .setContentDisposition(contentDisposition) + .setContentEncoding(contentEncoding) + .setContentLanguage(contentLanguage) + .setContentMd5(contentMD5) + .setContentType(contentType) when: // Buffered upload diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index 21ac655f05c3..33378df7874e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -16,9 +16,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.models.ContainerGetPropertiesHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentResponse; import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentResponse; import com.azure.storage.blob.models.BlobContainerAccessPolicies; +import com.azure.storage.blob.models.BlobContainerProperties; import com.azure.storage.blob.models.BlobItem; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobSignedIdentifier; @@ -395,7 +397,13 @@ public Mono> getPropertiesWithResponse(String Mono> getPropertiesWithResponse(String leaseId, Context context) { return this.azureBlobStorage.containers() .getPropertiesWithRestResponseAsync(null, null, leaseId, null, context) - .map(rb -> new SimpleResponse<>(rb, new BlobContainerProperties(rb.getDeserializedHeaders()))); + .map(rb -> { + ContainerGetPropertiesHeaders hd = rb.getDeserializedHeaders(); + BlobContainerProperties properties = new BlobContainerProperties(hd.getMetadata(), hd.getETag(), + hd.getLastModified(), hd.getLeaseDuration(), hd.getLeaseState(), hd.getLeaseStatus(), + hd.getBlobPublicAccess(), hd.isHasImmutabilityPolicy(), hd.isHasLegalHold()); + return new SimpleResponse<>(rb, properties); + }); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index d8e5023226d3..5004e1df589e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -9,6 +9,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.storage.blob.models.BlobContainerAccessPolicies; +import com.azure.storage.blob.models.BlobContainerProperties; import com.azure.storage.blob.models.BlobItem; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobSignedIdentifier; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java index 0c083509f716..e7a761c76975 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java @@ -23,17 +23,16 @@ import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockFromUrlResponse; import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockResponse; import com.azure.storage.blob.implementation.models.AppendBlobsCreateResponse; -import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobStorageException; +import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.EncryptionAlgorithmType; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - import java.net.URL; import java.nio.ByteBuffer; import java.time.OffsetDateTime; import java.util.Map; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -70,7 +69,7 @@ private interface AppendBlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); + Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @@ -102,18 +101,18 @@ public Mono createWithRestResponseAsync(String contai final String ifNoneMatch = null; final String requestId = null; final String blobType = "AppendBlob"; - final String blobContentType = null; - final String blobContentEncoding = null; - final String blobContentLanguage = null; - final String blobCacheControl = null; - final String blobContentDisposition = null; + final String contentType = null; + final String contentEncoding = null; + final String contentLanguage = null; + final String cacheControl = null; + final String contentDisposition = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - String blobContentMD5Converted = null; - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); + String contentMd5Converted = null; + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -139,29 +138,29 @@ public Mono createWithRestResponseAsync(String contai @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, Context context) { final String blobType = "AppendBlob"; - String blobContentType = null; + String contentType = null; if (blobHttpHeaders != null) { - blobContentType = blobHttpHeaders.getBlobContentType(); + contentType = blobHttpHeaders.getContentType(); } - String blobContentEncoding = null; + String contentEncoding = null; if (blobHttpHeaders != null) { - blobContentEncoding = blobHttpHeaders.getBlobContentEncoding(); + contentEncoding = blobHttpHeaders.getContentEncoding(); } - String blobContentLanguage = null; + String contentLanguage = null; if (blobHttpHeaders != null) { - blobContentLanguage = blobHttpHeaders.getBlobContentLanguage(); + contentLanguage = blobHttpHeaders.getContentLanguage(); } - byte[] blobContentMD5 = null; + byte[] contentMd5 = null; if (blobHttpHeaders != null) { - blobContentMD5 = blobHttpHeaders.getBlobContentMD5(); + contentMd5 = blobHttpHeaders.getContentMd5(); } - String blobCacheControl = null; + String cacheControl = null; if (blobHttpHeaders != null) { - blobCacheControl = blobHttpHeaders.getBlobCacheControl(); + cacheControl = blobHttpHeaders.getCacheControl(); } - String blobContentDisposition = null; + String contentDisposition = null; if (blobHttpHeaders != null) { - blobContentDisposition = blobHttpHeaders.getBlobContentDisposition(); + contentDisposition = blobHttpHeaders.getContentDisposition(); } String encryptionKey = null; if (cpkInfo != null) { @@ -177,8 +176,8 @@ public Mono createWithRestResponseAsync(String contai } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java index 6a4180ca45a7..483144b6bf14 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java @@ -45,19 +45,18 @@ import com.azure.storage.blob.implementation.models.BlobsUndeleteResponse; import com.azure.storage.blob.implementation.models.DataLakeStorageErrorException; import com.azure.storage.blob.implementation.models.DirectoryHttpHeaders; +import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobHttpHeaders; -import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; import com.azure.storage.blob.models.EncryptionAlgorithmType; import com.azure.storage.blob.models.PathRenameMode; import com.azure.storage.blob.models.RehydratePriority; -import reactor.core.publisher.Mono; - import java.net.URL; import java.time.OffsetDateTime; import java.util.Map; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -129,7 +128,7 @@ private interface BlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono setHTTPHeaders(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, Context context); + Mono setHTTPHeaders(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @@ -605,15 +604,15 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str final String ifNoneMatch = null; final String requestId = null; final String comp = "properties"; - final String blobCacheControl = null; - final String blobContentType = null; - final String blobContentEncoding = null; - final String blobContentLanguage = null; - final String blobContentDisposition = null; + final String cacheControl = null; + final String contentType = null; + final String contentEncoding = null; + final String contentLanguage = null; + final String contentDisposition = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - String blobContentMD5Converted = null; - return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, context); + String contentMd5Converted = null; + return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, contentDisposition, context); } /** @@ -636,34 +635,34 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str @ServiceMethod(returns = ReturnType.SINGLE) public Mono setHTTPHeadersWithRestResponseAsync(String containerName, String blob, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, BlobHttpHeaders blobHttpHeaders, Context context) { final String comp = "properties"; - String blobCacheControl = null; + String cacheControl = null; if (blobHttpHeaders != null) { - blobCacheControl = blobHttpHeaders.getBlobCacheControl(); + cacheControl = blobHttpHeaders.getCacheControl(); } - String blobContentType = null; + String contentType = null; if (blobHttpHeaders != null) { - blobContentType = blobHttpHeaders.getBlobContentType(); + contentType = blobHttpHeaders.getContentType(); } - byte[] blobContentMD5 = null; + byte[] contentMd5 = null; if (blobHttpHeaders != null) { - blobContentMD5 = blobHttpHeaders.getBlobContentMD5(); + contentMd5 = blobHttpHeaders.getContentMd5(); } - String blobContentEncoding = null; + String contentEncoding = null; if (blobHttpHeaders != null) { - blobContentEncoding = blobHttpHeaders.getBlobContentEncoding(); + contentEncoding = blobHttpHeaders.getContentEncoding(); } - String blobContentLanguage = null; + String contentLanguage = null; if (blobHttpHeaders != null) { - blobContentLanguage = blobHttpHeaders.getBlobContentLanguage(); + contentLanguage = blobHttpHeaders.getContentLanguage(); } - String blobContentDisposition = null; + String contentDisposition = null; if (blobHttpHeaders != null) { - blobContentDisposition = blobHttpHeaders.getBlobContentDisposition(); + contentDisposition = blobHttpHeaders.getContentDisposition(); } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); - return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, context); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, contentDisposition, context); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java index 04c7037e98f7..537df2b9ff5b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java @@ -26,20 +26,19 @@ import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromURLResponse; import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockResponse; import com.azure.storage.blob.implementation.models.BlockBlobsUploadResponse; +import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobHttpHeaders; -import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.BlockListType; import com.azure.storage.blob.models.BlockLookupList; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.EncryptionAlgorithmType; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - import java.net.URL; import java.nio.ByteBuffer; import java.time.OffsetDateTime; import java.util.Map; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -76,7 +75,7 @@ private interface BlockBlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono upload(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); + Mono upload(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @@ -91,7 +90,7 @@ private interface BlockBlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono commitBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @BodyParam("application/xml; charset=utf-8") BlockLookupList blocks, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); + Mono commitBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @BodyParam("application/xml; charset=utf-8") BlockLookupList blocks, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Get("{containerName}/{blob}") @ExpectedResponses({200}) @@ -120,18 +119,19 @@ public Mono uploadWithRestResponseAsync(String contain final String ifNoneMatch = null; final String requestId = null; final String blobType = "BlockBlob"; - final String blobContentType = null; - final String blobContentEncoding = null; - final String blobContentLanguage = null; - final String blobCacheControl = null; - final String blobContentDisposition = null; + final String contentType = null; + final String contentEncoding = null; + final String contentLanguage = null; + final String cacheControl = null; + final String contentDisposition = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; + String transactionalContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - String blobContentMD5Converted = null; - return service.upload(containerName, blob, this.client.getUrl(), body, timeout, contentLength, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); + String contentMd5Converted = null; + return service.upload(containerName, blob, this.client.getUrl(), body, timeout, transactionalContentMD5Converted, contentLength, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -142,6 +142,7 @@ public Mono uploadWithRestResponseAsync(String contain * @param body Initial data. * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'. @@ -157,31 +158,31 @@ public Mono uploadWithRestResponseAsync(String contain * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, Context context) { + public Mono uploadWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, Context context) { final String blobType = "BlockBlob"; - String blobContentType = null; + String contentType = null; if (blobHttpHeaders != null) { - blobContentType = blobHttpHeaders.getBlobContentType(); + contentType = blobHttpHeaders.getContentType(); } - String blobContentEncoding = null; + String contentEncoding = null; if (blobHttpHeaders != null) { - blobContentEncoding = blobHttpHeaders.getBlobContentEncoding(); + contentEncoding = blobHttpHeaders.getContentEncoding(); } - String blobContentLanguage = null; + String contentLanguage = null; if (blobHttpHeaders != null) { - blobContentLanguage = blobHttpHeaders.getBlobContentLanguage(); + contentLanguage = blobHttpHeaders.getContentLanguage(); } - byte[] blobContentMD5 = null; + byte[] contentMd5 = null; if (blobHttpHeaders != null) { - blobContentMD5 = blobHttpHeaders.getBlobContentMD5(); + contentMd5 = blobHttpHeaders.getContentMd5(); } - String blobCacheControl = null; + String cacheControl = null; if (blobHttpHeaders != null) { - blobCacheControl = blobHttpHeaders.getBlobCacheControl(); + cacheControl = blobHttpHeaders.getCacheControl(); } - String blobContentDisposition = null; + String contentDisposition = null; if (blobHttpHeaders != null) { - blobContentDisposition = blobHttpHeaders.getBlobContentDisposition(); + contentDisposition = blobHttpHeaders.getContentDisposition(); } String encryptionKey = null; if (cpkInfo != null) { @@ -195,10 +196,11 @@ public Mono uploadWithRestResponseAsync(String contain if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); - return service.upload(containerName, blob, this.client.getUrl(), body, timeout, contentLength, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + return service.upload(containerName, blob, this.client.getUrl(), body, timeout, transactionalContentMD5Converted, contentLength, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -361,11 +363,11 @@ public Mono commitBlockListWithRestResponseAs final String ifNoneMatch = null; final String requestId = null; final String comp = "blocklist"; - final String blobCacheControl = null; - final String blobContentType = null; - final String blobContentEncoding = null; - final String blobContentLanguage = null; - final String blobContentDisposition = null; + final String cacheControl = null; + final String contentType = null; + final String contentEncoding = null; + final String contentLanguage = null; + final String contentDisposition = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; @@ -373,8 +375,8 @@ public Mono commitBlockListWithRestResponseAs String transactionalContentCrc64Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - String blobContentMD5Converted = null; - return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blocks, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); + String contentMd5Converted = null; + return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blocks, this.client.getVersion(), requestId, comp, cacheControl, contentType, contentEncoding, contentLanguage, contentMd5Converted, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -403,29 +405,29 @@ public Mono commitBlockListWithRestResponseAs @ServiceMethod(returns = ReturnType.SINGLE) public Mono commitBlockListWithRestResponseAsync(String containerName, String blob, BlockLookupList blocks, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, Context context) { final String comp = "blocklist"; - String blobCacheControl = null; + String cacheControl = null; if (blobHttpHeaders != null) { - blobCacheControl = blobHttpHeaders.getBlobCacheControl(); + cacheControl = blobHttpHeaders.getCacheControl(); } - String blobContentType = null; + String contentType = null; if (blobHttpHeaders != null) { - blobContentType = blobHttpHeaders.getBlobContentType(); + contentType = blobHttpHeaders.getContentType(); } - String blobContentEncoding = null; + String contentEncoding = null; if (blobHttpHeaders != null) { - blobContentEncoding = blobHttpHeaders.getBlobContentEncoding(); + contentEncoding = blobHttpHeaders.getContentEncoding(); } - String blobContentLanguage = null; + String contentLanguage = null; if (blobHttpHeaders != null) { - blobContentLanguage = blobHttpHeaders.getBlobContentLanguage(); + contentLanguage = blobHttpHeaders.getContentLanguage(); } - byte[] blobContentMD5 = null; + byte[] contentMd5 = null; if (blobHttpHeaders != null) { - blobContentMD5 = blobHttpHeaders.getBlobContentMD5(); + contentMd5 = blobHttpHeaders.getContentMd5(); } - String blobContentDisposition = null; + String contentDisposition = null; if (blobHttpHeaders != null) { - blobContentDisposition = blobHttpHeaders.getBlobContentDisposition(); + contentDisposition = blobHttpHeaders.getContentDisposition(); } String encryptionKey = null; if (cpkInfo != null) { @@ -443,8 +445,8 @@ public Mono commitBlockListWithRestResponseAs String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); - return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blocks, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blocks, this.client.getVersion(), requestId, comp, cacheControl, contentType, contentEncoding, contentLanguage, contentMd5Converted, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java index a62adb3e7998..c66276eac2e0 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -37,15 +37,14 @@ import com.azure.storage.blob.implementation.models.ContainersRenewLeaseResponse; import com.azure.storage.blob.implementation.models.ContainersSetAccessPolicyResponse; import com.azure.storage.blob.implementation.models.ContainersSetMetadataResponse; -import com.azure.storage.blob.models.BlobSignedIdentifier; import com.azure.storage.blob.models.BlobStorageException; +import com.azure.storage.blob.models.BlobSignedIdentifier; import com.azure.storage.blob.models.ListBlobsIncludeItem; import com.azure.storage.blob.models.PublicAccessType; -import reactor.core.publisher.Mono; - import java.time.OffsetDateTime; import java.util.List; import java.util.Map; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java index df03ea323d6b..e4eb93388121 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java @@ -31,18 +31,17 @@ import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromURLResponse; import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesResponse; import com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier; -import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobStorageException; +import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.EncryptionAlgorithmType; import com.azure.storage.blob.models.SequenceNumberActionType; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - import java.net.URL; import java.nio.ByteBuffer; import java.time.OffsetDateTime; import java.util.Map; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -79,7 +78,7 @@ private interface PageBlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); + Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @@ -144,18 +143,18 @@ public Mono createWithRestResponseAsync(String containe final Long blobSequenceNumber = 0L; final String requestId = null; final String blobType = "PageBlob"; - final String blobContentType = null; - final String blobContentEncoding = null; - final String blobContentLanguage = null; - final String blobCacheControl = null; - final String blobContentDisposition = null; + final String contentType = null; + final String contentEncoding = null; + final String contentLanguage = null; + final String cacheControl = null; + final String contentDisposition = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - String blobContentMD5Converted = null; - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); + String contentMd5Converted = null; + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -184,29 +183,29 @@ public Mono createWithRestResponseAsync(String containe @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long blobSequenceNumber, String requestId, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, Context context) { final String blobType = "PageBlob"; - String blobContentType = null; + String contentType = null; if (blobHttpHeaders != null) { - blobContentType = blobHttpHeaders.getBlobContentType(); + contentType = blobHttpHeaders.getContentType(); } - String blobContentEncoding = null; + String contentEncoding = null; if (blobHttpHeaders != null) { - blobContentEncoding = blobHttpHeaders.getBlobContentEncoding(); + contentEncoding = blobHttpHeaders.getContentEncoding(); } - String blobContentLanguage = null; + String contentLanguage = null; if (blobHttpHeaders != null) { - blobContentLanguage = blobHttpHeaders.getBlobContentLanguage(); + contentLanguage = blobHttpHeaders.getContentLanguage(); } - byte[] blobContentMD5 = null; + byte[] contentMd5 = null; if (blobHttpHeaders != null) { - blobContentMD5 = blobHttpHeaders.getBlobContentMD5(); + contentMd5 = blobHttpHeaders.getContentMd5(); } - String blobCacheControl = null; + String cacheControl = null; if (blobHttpHeaders != null) { - blobCacheControl = blobHttpHeaders.getBlobCacheControl(); + cacheControl = blobHttpHeaders.getCacheControl(); } - String blobContentDisposition = null; + String contentDisposition = null; if (blobHttpHeaders != null) { - blobContentDisposition = blobHttpHeaders.getBlobContentDisposition(); + contentDisposition = blobHttpHeaders.getContentDisposition(); } String encryptionKey = null; if (cpkInfo != null) { @@ -222,8 +221,8 @@ public Mono createWithRestResponseAsync(String containe } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java similarity index 64% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerProperties.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java index 129855e14f43..6390abd8cbdd 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java @@ -1,13 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; - -import com.azure.storage.blob.implementation.models.ContainerGetPropertiesHeaders; -import com.azure.storage.blob.models.LeaseDurationType; -import com.azure.storage.blob.models.LeaseStateType; -import com.azure.storage.blob.models.LeaseStatusType; -import com.azure.storage.blob.models.PublicAccessType; +package com.azure.storage.blob.models; import java.time.OffsetDateTime; import java.util.Map; @@ -24,16 +18,19 @@ public final class BlobContainerProperties { private final boolean hasImmutabilityPolicy; private final boolean hasLegalHold; - BlobContainerProperties(ContainerGetPropertiesHeaders generatedResponseHeaders) { - this.metadata = generatedResponseHeaders.getMetadata(); - this.eTag = generatedResponseHeaders.getETag(); - this.lastModified = generatedResponseHeaders.getLastModified(); - this.leaseDuration = generatedResponseHeaders.getLeaseDuration(); - this.leaseState = generatedResponseHeaders.getLeaseState(); - this.leaseStatus = generatedResponseHeaders.getLeaseStatus(); - this.blobPublicAccess = generatedResponseHeaders.getBlobPublicAccess(); - this.hasImmutabilityPolicy = generatedResponseHeaders.isHasImmutabilityPolicy(); - this.hasLegalHold = generatedResponseHeaders.isHasLegalHold(); + public BlobContainerProperties(final Map metadata, final String eTag, + final OffsetDateTime lastModified, final LeaseDurationType leaseDuration, final LeaseStateType leaseState, + final LeaseStatusType leaseStatus, final PublicAccessType blobPublicAccess, final boolean hasImmutabilityPolicy, + final boolean hasLegalHold) { + this.metadata = metadata; + this.eTag = eTag; + this.lastModified = lastModified; + this.leaseDuration = leaseDuration; + this.leaseState = leaseState; + this.leaseStatus = leaseStatus; + this.blobPublicAccess = blobPublicAccess; + this.hasImmutabilityPolicy = hasImmutabilityPolicy; + this.hasLegalHold = hasLegalHold; } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java index 422e3b7e6bd1..a34cbe216c1b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java @@ -67,7 +67,7 @@ public final class BlobDownloadHeaders { * message content integrity. */ @JsonProperty(value = "Content-MD5") - private byte[] contentMD5; + private byte[] contentMd5; /* * This header returns the value that was specified for the @@ -427,26 +427,26 @@ public BlobDownloadHeaders setETag(String eTag) { } /** - * Get the contentMD5 property: If the blob has an MD5 hash and this + * Get the contentMd5 property: If the blob has an MD5 hash and this * operation is to read the full blob, this response header is returned so * that the client can check for message content integrity. * - * @return the contentMD5 value. + * @return the contentMd5 value. */ - public byte[] getContentMD5() { - return ImplUtils.clone(this.contentMD5); + public byte[] getContentMd5() { + return ImplUtils.clone(this.contentMd5); } /** - * Set the contentMD5 property: If the blob has an MD5 hash and this + * Set the contentMd5 property: If the blob has an MD5 hash and this * operation is to read the full blob, this response header is returned so * that the client can check for message content integrity. * - * @param contentMD5 the contentMD5 value to set. + * @param contentMd5 the contentMd5 value to set. * @return the BlobDownloadHeaders object itself. */ - public BlobDownloadHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = ImplUtils.clone(contentMD5); + public BlobDownloadHeaders setContentMd5(byte[] contentMd5) { + this.contentMd5 = ImplUtils.clone(contentMd5); return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java index d49bbbaaef66..37bfc5d2c5d5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java @@ -19,183 +19,183 @@ public final class BlobHttpHeaders { * Optional. Sets the blob's cache control. If specified, this property is * stored with the blob and returned with a read request. */ - @JsonProperty(value = "blobCacheControl") - private String blobCacheControl; + @JsonProperty(value = "cacheControl") + private String cacheControl; /* * Optional. Sets the blob's content type. If specified, this property is * stored with the blob and returned with a read request. */ - @JsonProperty(value = "blobContentType") - private String blobContentType; + @JsonProperty(value = "contentType") + private String contentType; /* * Optional. An MD5 hash of the blob content. Note that this hash is not * validated, as the hashes for the individual blocks were validated when * each was uploaded. */ - @JsonProperty(value = "blobContentMD5") - private byte[] blobContentMD5; + @JsonProperty(value = "contentMd5") + private byte[] contentMd5; /* * Optional. Sets the blob's content encoding. If specified, this property * is stored with the blob and returned with a read request. */ - @JsonProperty(value = "blobContentEncoding") - private String blobContentEncoding; + @JsonProperty(value = "contentEncoding") + private String contentEncoding; /* * Optional. Set the blob's content language. If specified, this property * is stored with the blob and returned with a read request. */ - @JsonProperty(value = "blobContentLanguage") - private String blobContentLanguage; + @JsonProperty(value = "contentLanguage") + private String contentLanguage; /* * Optional. Sets the blob's Content-Disposition header. */ - @JsonProperty(value = "blobContentDisposition") - private String blobContentDisposition; + @JsonProperty(value = "contentDisposition") + private String contentDisposition; /** - * Get the blobCacheControl property: Optional. Sets the blob's cache - * control. If specified, this property is stored with the blob and - * returned with a read request. + * Get the cacheControl property: Optional. Sets the blob's cache control. + * If specified, this property is stored with the blob and returned with a + * read request. * - * @return the blobCacheControl value. + * @return the cacheControl value. */ - public String getBlobCacheControl() { - return this.blobCacheControl; + public String getCacheControl() { + return this.cacheControl; } /** - * Set the blobCacheControl property: Optional. Sets the blob's cache - * control. If specified, this property is stored with the blob and - * returned with a read request. + * Set the cacheControl property: Optional. Sets the blob's cache control. + * If specified, this property is stored with the blob and returned with a + * read request. * - * @param blobCacheControl the blobCacheControl value to set. + * @param cacheControl the cacheControl value to set. * @return the BlobHttpHeaders object itself. */ - public BlobHttpHeaders setBlobCacheControl(String blobCacheControl) { - this.blobCacheControl = blobCacheControl; + public BlobHttpHeaders setCacheControl(String cacheControl) { + this.cacheControl = cacheControl; return this; } /** - * Get the blobContentType property: Optional. Sets the blob's content - * type. If specified, this property is stored with the blob and returned - * with a read request. + * Get the contentType property: Optional. Sets the blob's content type. If + * specified, this property is stored with the blob and returned with a + * read request. * - * @return the blobContentType value. + * @return the contentType value. */ - public String getBlobContentType() { - return this.blobContentType; + public String getContentType() { + return this.contentType; } /** - * Set the blobContentType property: Optional. Sets the blob's content - * type. If specified, this property is stored with the blob and returned - * with a read request. + * Set the contentType property: Optional. Sets the blob's content type. If + * specified, this property is stored with the blob and returned with a + * read request. * - * @param blobContentType the blobContentType value to set. + * @param contentType the contentType value to set. * @return the BlobHttpHeaders object itself. */ - public BlobHttpHeaders setBlobContentType(String blobContentType) { - this.blobContentType = blobContentType; + public BlobHttpHeaders setContentType(String contentType) { + this.contentType = contentType; return this; } /** - * Get the blobContentMD5 property: Optional. An MD5 hash of the blob - * content. Note that this hash is not validated, as the hashes for the - * individual blocks were validated when each was uploaded. + * Get the contentMd5 property: Optional. An MD5 hash of the blob content. + * Note that this hash is not validated, as the hashes for the individual + * blocks were validated when each was uploaded. * - * @return the blobContentMD5 value. + * @return the contentMd5 value. */ - public byte[] getBlobContentMD5() { - return ImplUtils.clone(this.blobContentMD5); + public byte[] getContentMd5() { + return ImplUtils.clone(this.contentMd5); } /** - * Set the blobContentMD5 property: Optional. An MD5 hash of the blob - * content. Note that this hash is not validated, as the hashes for the - * individual blocks were validated when each was uploaded. + * Set the contentMd5 property: Optional. An MD5 hash of the blob content. + * Note that this hash is not validated, as the hashes for the individual + * blocks were validated when each was uploaded. * - * @param blobContentMD5 the blobContentMD5 value to set. + * @param contentMd5 the contentMd5 value to set. * @return the BlobHttpHeaders object itself. */ - public BlobHttpHeaders setBlobContentMD5(byte[] blobContentMD5) { - this.blobContentMD5 = ImplUtils.clone(blobContentMD5); + public BlobHttpHeaders setContentMd5(byte[] contentMd5) { + this.contentMd5 = ImplUtils.clone(contentMd5); return this; } /** - * Get the blobContentEncoding property: Optional. Sets the blob's content + * Get the contentEncoding property: Optional. Sets the blob's content * encoding. If specified, this property is stored with the blob and * returned with a read request. * - * @return the blobContentEncoding value. + * @return the contentEncoding value. */ - public String getBlobContentEncoding() { - return this.blobContentEncoding; + public String getContentEncoding() { + return this.contentEncoding; } /** - * Set the blobContentEncoding property: Optional. Sets the blob's content + * Set the contentEncoding property: Optional. Sets the blob's content * encoding. If specified, this property is stored with the blob and * returned with a read request. * - * @param blobContentEncoding the blobContentEncoding value to set. + * @param contentEncoding the contentEncoding value to set. * @return the BlobHttpHeaders object itself. */ - public BlobHttpHeaders setBlobContentEncoding(String blobContentEncoding) { - this.blobContentEncoding = blobContentEncoding; + public BlobHttpHeaders setContentEncoding(String contentEncoding) { + this.contentEncoding = contentEncoding; return this; } /** - * Get the blobContentLanguage property: Optional. Set the blob's content + * Get the contentLanguage property: Optional. Set the blob's content * language. If specified, this property is stored with the blob and * returned with a read request. * - * @return the blobContentLanguage value. + * @return the contentLanguage value. */ - public String getBlobContentLanguage() { - return this.blobContentLanguage; + public String getContentLanguage() { + return this.contentLanguage; } /** - * Set the blobContentLanguage property: Optional. Set the blob's content + * Set the contentLanguage property: Optional. Set the blob's content * language. If specified, this property is stored with the blob and * returned with a read request. * - * @param blobContentLanguage the blobContentLanguage value to set. + * @param contentLanguage the contentLanguage value to set. * @return the BlobHttpHeaders object itself. */ - public BlobHttpHeaders setBlobContentLanguage(String blobContentLanguage) { - this.blobContentLanguage = blobContentLanguage; + public BlobHttpHeaders setContentLanguage(String contentLanguage) { + this.contentLanguage = contentLanguage; return this; } /** - * Get the blobContentDisposition property: Optional. Sets the blob's + * Get the contentDisposition property: Optional. Sets the blob's * Content-Disposition header. * - * @return the blobContentDisposition value. + * @return the contentDisposition value. */ - public String getBlobContentDisposition() { - return this.blobContentDisposition; + public String getContentDisposition() { + return this.contentDisposition; } /** - * Set the blobContentDisposition property: Optional. Sets the blob's + * Set the contentDisposition property: Optional. Sets the blob's * Content-Disposition header. * - * @param blobContentDisposition the blobContentDisposition value to set. + * @param contentDisposition the contentDisposition value to set. * @return the BlobHttpHeaders object itself. */ - public BlobHttpHeaders setBlobContentDisposition(String blobContentDisposition) { - this.blobContentDisposition = blobContentDisposition; + public BlobHttpHeaders setContentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; return this; } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java index 713e6a7b48d7..1d8fd056cf9e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java @@ -60,10 +60,10 @@ public final class BlobItemProperties { private String contentLanguage; /* - * The contentMD5 property. + * The contentMd5 property. */ @JsonProperty(value = "Content-MD5") - private byte[] contentMD5; + private byte[] contentMd5; /* * The contentDisposition property. @@ -361,22 +361,22 @@ public BlobItemProperties setContentLanguage(String contentLanguage) { } /** - * Get the contentMD5 property: The contentMD5 property. + * Get the contentMd5 property: The contentMd5 property. * - * @return the contentMD5 value. + * @return the contentMd5 value. */ - public byte[] getContentMD5() { - return ImplUtils.clone(this.contentMD5); + public byte[] getContentMd5() { + return ImplUtils.clone(this.contentMd5); } /** - * Set the contentMD5 property: The contentMD5 property. + * Set the contentMd5 property: The contentMd5 property. * - * @param contentMD5 the contentMD5 value to set. + * @param contentMd5 the contentMd5 value to set. * @return the BlobItemProperties object itself. */ - public BlobItemProperties setContentMD5(byte[] contentMD5) { - this.contentMD5 = ImplUtils.clone(contentMD5); + public BlobItemProperties setContentMd5(byte[] contentMd5) { + this.contentMd5 = ImplUtils.clone(contentMd5); return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetrics.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetrics.java index acbd9c84db8d..27d49280b778 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetrics.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetrics.java @@ -27,19 +27,19 @@ public final class BlobMetrics { @JsonProperty(value = "Enabled", required = true) private boolean enabled; - /* - * Indicates whether metrics should generate summary statistics for called - * API operations. - */ - @JsonProperty(value = "IncludeAPIs") - private Boolean includeAPIs; - /* * The retentionPolicy property. */ @JsonProperty(value = "RetentionPolicy") private BlobRetentionPolicy retentionPolicy; + /* + * Indicates whether metrics should generate summary statistics for called + * API operations. + */ + @JsonProperty(value = "IncludeAPIs") + private Boolean includeApis; + /** * Get the version property: The version of Storage Analytics to configure. * @@ -83,44 +83,44 @@ public BlobMetrics setEnabled(boolean enabled) { } /** - * Get the includeAPIs property: Indicates whether metrics should generate - * summary statistics for called API operations. + * Get the retentionPolicy property: The retentionPolicy property. * - * @return the includeAPIs value. + * @return the retentionPolicy value. */ - public Boolean isIncludeAPIs() { - return this.includeAPIs; + public BlobRetentionPolicy getRetentionPolicy() { + return this.retentionPolicy; } /** - * Set the includeAPIs property: Indicates whether metrics should generate - * summary statistics for called API operations. + * Set the retentionPolicy property: The retentionPolicy property. * - * @param includeAPIs the includeAPIs value to set. + * @param retentionPolicy the retentionPolicy value to set. * @return the BlobMetrics object itself. */ - public BlobMetrics setIncludeAPIs(Boolean includeAPIs) { - this.includeAPIs = includeAPIs; + public BlobMetrics setRetentionPolicy(BlobRetentionPolicy retentionPolicy) { + this.retentionPolicy = retentionPolicy; return this; } /** - * Get the retentionPolicy property: The retentionPolicy property. + * Get the includeApis property: Indicates whether metrics should generate + * summary statistics for called API operations. * - * @return the retentionPolicy value. + * @return the includeApis value. */ - public BlobRetentionPolicy getRetentionPolicy() { - return this.retentionPolicy; + public Boolean isIncludeApis() { + return this.includeApis; } /** - * Set the retentionPolicy property: The retentionPolicy property. + * Set the includeApis property: Indicates whether metrics should generate + * summary statistics for called API operations. * - * @param retentionPolicy the retentionPolicy value to set. + * @param includeApis the includeApis value to set. * @return the BlobMetrics object itself. */ - public BlobMetrics setRetentionPolicy(BlobRetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; + public BlobMetrics setIncludeApis(Boolean includeApis) { + this.includeApis = includeApis; return this; } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java similarity index 74% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobProperties.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java index 40ac5ac0fea6..6628b2fd574c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java @@ -1,17 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.models; import com.azure.core.implementation.util.ImplUtils; -import com.azure.storage.blob.implementation.models.BlobGetPropertiesHeaders; -import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.ArchiveStatus; -import com.azure.storage.blob.models.BlobType; -import com.azure.storage.blob.models.CopyStatusType; -import com.azure.storage.blob.models.LeaseDurationType; -import com.azure.storage.blob.models.LeaseStateType; -import com.azure.storage.blob.models.LeaseStatusType; import java.time.OffsetDateTime; import java.util.Map; @@ -49,38 +41,48 @@ public final class BlobProperties { private final Map metadata; private final Integer committedBlockCount; - public BlobProperties(BlobGetPropertiesHeaders generatedHeaders) { - this.creationTime = generatedHeaders.getCreationTime(); - this.lastModified = generatedHeaders.getLastModified(); - this.eTag = generatedHeaders.getETag(); - this.blobSize = generatedHeaders.getContentLength() == null ? 0 : generatedHeaders.getContentLength(); - this.contentType = generatedHeaders.getContentType(); - this.contentMD5 = generatedHeaders.getContentMD5(); - this.contentEncoding = generatedHeaders.getContentEncoding(); - this.contentDisposition = generatedHeaders.getContentDisposition(); - this.contentLanguage = generatedHeaders.getContentLanguage(); - this.cacheControl = generatedHeaders.getCacheControl(); - this.blobSequenceNumber = generatedHeaders.getBlobSequenceNumber(); - this.blobType = generatedHeaders.getBlobType(); - this.leaseStatus = generatedHeaders.getLeaseStatus(); - this.leaseState = generatedHeaders.getLeaseState(); - this.leaseDuration = generatedHeaders.getLeaseDuration(); - this.copyId = generatedHeaders.getCopyId(); - this.copyStatus = generatedHeaders.getCopyStatus(); - this.copySource = generatedHeaders.getCopySource(); - this.copyProgress = generatedHeaders.getCopyProgress(); - this.copyCompletionTime = generatedHeaders.getCopyCompletionTime(); - this.copyStatusDescription = generatedHeaders.getCopyStatusDescription(); - this.isServerEncrypted = generatedHeaders.isServerEncrypted(); - this.isIncrementalCopy = generatedHeaders.isIncrementalCopy(); - this.copyDestinationSnapshot = generatedHeaders.getDestinationSnapshot(); - this.accessTier = AccessTier.fromString(generatedHeaders.getAccessTier()); - this.isAccessTierInferred = generatedHeaders.isAccessTierInferred(); - this.archiveStatus = ArchiveStatus.fromString(generatedHeaders.getArchiveStatus()); - this.encryptionKeySha256 = generatedHeaders.getEncryptionKeySha256(); - this.accessTierChangeTime = generatedHeaders.getAccessTierChangeTime(); - this.metadata = generatedHeaders.getMetadata(); - this.committedBlockCount = generatedHeaders.getBlobCommittedBlockCount(); + public BlobProperties(final OffsetDateTime creationTime, final OffsetDateTime lastModified, final String eTag, + final long blobSize, final String contentType, final byte[] contentMd5, final String contentEncoding, + final String contentDisposition, final String contentLanguage, final String cacheControl, + final Long blobSequenceNumber, final BlobType blobType, final LeaseStatusType leaseStatus, + final LeaseStateType leaseState, final LeaseDurationType leaseDuration, final String copyId, + final CopyStatusType copyStatus, final String copySource, final String copyProgress, + final OffsetDateTime copyCompletionTime, final String copyStatusDescription, final Boolean isServerEncrypted, + final Boolean isIncrementalCopy, final String copyDestinationSnapshot, final AccessTier accessTier, + final Boolean isAccessTierInferred, final ArchiveStatus archiveStatus, final String encryptionKeySha256, + final OffsetDateTime accessTierChangeTime, final Map metadata, + final Integer committedBlockCount) { + this.creationTime = creationTime; + this.lastModified = lastModified; + this.eTag = eTag; + this.blobSize = blobSize; + this.contentType = contentType; + this.contentMD5 = ImplUtils.clone(contentMd5); + this.contentEncoding = contentEncoding; + this.contentDisposition = contentDisposition; + this.contentLanguage = contentLanguage; + this.cacheControl = cacheControl; + this.blobSequenceNumber = blobSequenceNumber; + this.blobType = blobType; + this.leaseStatus = leaseStatus; + this.leaseState = leaseState; + this.leaseDuration = leaseDuration; + this.copyId = copyId; + this.copyStatus = copyStatus; + this.copySource = copySource; + this.copyProgress = copyProgress; + this.copyCompletionTime = copyCompletionTime; + this.copyStatusDescription = copyStatusDescription; + this.isServerEncrypted = isServerEncrypted; + this.isIncrementalCopy = isIncrementalCopy; + this.copyDestinationSnapshot = copyDestinationSnapshot; + this.accessTier = accessTier; + this.isAccessTierInferred = isAccessTierInferred; + this.archiveStatus = archiveStatus; + this.encryptionKeySha256 = encryptionKeySha256; + this.accessTierChangeTime = accessTierChangeTime; + this.metadata = metadata; + this.committedBlockCount = committedBlockCount; } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java index 683aa8c1cd0f..a1059697debe 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java @@ -19,13 +19,13 @@ public final class UserDelegationKey { * The Azure Active Directory object ID in GUID format. */ @JsonProperty(value = "SignedOid", required = true) - private String signedOid; + private String signedObjectId; /* * The Azure Active Directory tenant ID in GUID format */ @JsonProperty(value = "SignedTid", required = true) - private String signedTid; + private String signedTenantId; /* * The date-time the key is active @@ -58,46 +58,46 @@ public final class UserDelegationKey { private String value; /** - * Get the signedOid property: The Azure Active Directory object ID in GUID - * format. + * Get the signedObjectId property: The Azure Active Directory object ID in + * GUID format. * - * @return the signedOid value. + * @return the signedObjectId value. */ - public String getSignedOid() { - return this.signedOid; + public String getSignedObjectId() { + return this.signedObjectId; } /** - * Set the signedOid property: The Azure Active Directory object ID in GUID - * format. + * Set the signedObjectId property: The Azure Active Directory object ID in + * GUID format. * - * @param signedOid the signedOid value to set. + * @param signedObjectId the signedObjectId value to set. * @return the UserDelegationKey object itself. */ - public UserDelegationKey setSignedOid(String signedOid) { - this.signedOid = signedOid; + public UserDelegationKey setSignedObjectId(String signedObjectId) { + this.signedObjectId = signedObjectId; return this; } /** - * Get the signedTid property: The Azure Active Directory tenant ID in GUID - * format. + * Get the signedTenantId property: The Azure Active Directory tenant ID in + * GUID format. * - * @return the signedTid value. + * @return the signedTenantId value. */ - public String getSignedTid() { - return this.signedTid; + public String getSignedTenantId() { + return this.signedTenantId; } /** - * Set the signedTid property: The Azure Active Directory tenant ID in GUID - * format. + * Set the signedTenantId property: The Azure Active Directory tenant ID in + * GUID format. * - * @param signedTid the signedTid value to set. + * @param signedTenantId the signedTenantId value to set. * @return the UserDelegationKey object itself. */ - public UserDelegationKey setSignedTid(String signedTid) { - this.signedTid = signedTid; + public UserDelegationKey setSignedTenantId(String signedTenantId) { + this.signedTenantId = signedTenantId; return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index 67e379d05987..c03729f20121 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -15,15 +15,17 @@ import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.PollResponse.OperationStatus; import com.azure.core.util.polling.Poller; -import com.azure.storage.blob.BlobProperties; +import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.HttpGetterInfo; import com.azure.storage.blob.ProgressReceiver; import com.azure.storage.blob.ProgressReporter; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.models.BlobGetPropertiesHeaders; import com.azure.storage.blob.implementation.models.BlobStartCopyFromURLHeaders; import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.ArchiveStatus; import com.azure.storage.blob.models.BlobCopyInfo; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; @@ -916,7 +918,20 @@ Mono> getPropertiesWithResponse(BlobRequestConditions a null, null, snapshot, null, accessConditions.getLeaseId(), accessConditions.getIfModifiedSince(), accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), null, customerProvidedKey, context) - .map(rb -> new SimpleResponse<>(rb, new BlobProperties(rb.getDeserializedHeaders()))); + .map(rb -> { + BlobGetPropertiesHeaders hd = rb.getDeserializedHeaders(); + BlobProperties properties = new BlobProperties(hd.getCreationTime(), hd.getLastModified(), hd.getETag(), + hd.getContentLength() == null ? 0 : hd.getContentLength(), hd.getContentType(), hd.getContentMD5(), + hd.getContentEncoding(), hd.getContentDisposition(), hd.getContentLanguage(), hd.getCacheControl(), + hd.getBlobSequenceNumber(), hd.getBlobType(), hd.getLeaseStatus(), hd.getLeaseState(), + hd.getLeaseDuration(), hd.getCopyId(), hd.getCopyStatus(), hd.getCopySource(), hd.getCopyProgress(), + hd.getCopyCompletionTime(), hd.getCopyStatusDescription(), hd.isServerEncrypted(), + hd.isIncrementalCopy(), hd.getDestinationSnapshot(), AccessTier.fromString(hd.getAccessTier()), + hd.isAccessTierInferred(), ArchiveStatus.fromString(hd.getArchiveStatus()), + hd.getEncryptionKeySha256(), hd.getAccessTierChangeTime(), hd.getMetadata(), + hd.getBlobCommittedBlockCount()); + return new SimpleResponse<>(rb, properties); + }); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 1b9ec4574939..56a8ce314c22 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -12,7 +12,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.Poller; import com.azure.storage.blob.BlobClient; -import com.azure.storage.blob.BlobProperties; +import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobCopyInfo; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasQueryParameters.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasQueryParameters.java index ee77d27aa1e1..26c9c31015b5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasQueryParameters.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasQueryParameters.java @@ -117,8 +117,8 @@ public BlobServiceSasQueryParameters(Map queryParamsMap, boole this.contentType = contentType; if (key != null) { - this.keyObjectId = key.getSignedOid(); - this.keyTenantId = key.getSignedTid(); + this.keyObjectId = key.getSignedObjectId(); + this.keyTenantId = key.getSignedTenantId(); this.keyStart = key.getSignedStart(); this.keyExpiry = key.getSignedExpiry(); this.keyService = key.getSignedService(); @@ -229,10 +229,10 @@ public String getKeyVersion() { UserDelegationKey userDelegationKey() { return new UserDelegationKey() .setSignedExpiry(this.keyExpiry) - .setSignedOid(this.keyObjectId) + .setSignedObjectId(this.keyObjectId) .setSignedService(this.keyService) .setSignedStart(this.keyStart) - .setSignedTid(this.keyTenantId) + .setSignedTenantId(this.keyTenantId) .setSignedVersion(this.keyVersion); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java index 8d2bb20fc0c1..5a1bf6cfe944 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java @@ -620,8 +620,8 @@ private String stringToSign(final UserDelegationKey key, String canonicalName) { this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), this.expiryTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), canonicalName, - key.getSignedOid() == null ? "" : key.getSignedOid(), - key.getSignedTid() == null ? "" : key.getSignedTid(), + key.getSignedObjectId() == null ? "" : key.getSignedObjectId(), + key.getSignedTenantId() == null ? "" : key.getSignedTenantId(), key.getSignedStart() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedStart()), key.getSignedExpiry() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedExpiry()), key.getSignedService() == null ? "" : key.getSignedService(), diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java index b5bf45e5a772..76a54aab553b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java @@ -157,8 +157,8 @@ Mono> uploadWithResponse(Flux data, long len Map metadata, AccessTier tier, BlobRequestConditions accessConditions, Context context) { accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; - return this.azureBlobStorage.blockBlobs().uploadWithRestResponseAsync(null, null, data, length, null, metadata, - accessConditions.getLeaseId(), tier, accessConditions.getIfModifiedSince(), + return this.azureBlobStorage.blockBlobs().uploadWithRestResponseAsync(null, null, data, length, null, null, + metadata, accessConditions.getLeaseId(), tier, accessConditions.getIfModifiedSince(), accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), null, headers, getCustomerProvidedKey(), context) .map(rb -> { diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java index 8b2ba088b91e..da2babb11e13 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java @@ -153,8 +153,8 @@ public void getPropertiesCodeSnippet() { public void setHTTPHeadersCodeSnippet() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.setHTTPHeaders#BlobHttpHeaders client.setHttpHeaders(new BlobHttpHeaders() - .setBlobContentLanguage("en-US") - .setBlobContentType("binary")); + .setContentLanguage("en-US") + .setContentType("binary")); // END: com.azure.storage.blob.BlobAsyncClient.setHTTPHeaders#BlobHttpHeaders } @@ -302,8 +302,8 @@ public void setHTTPHeadersWithResponseCodeSnippets() { BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); client.setHttpHeadersWithResponse(new BlobHttpHeaders() - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"), accessConditions).subscribe( + .setContentLanguage("en-US") + .setContentType("binary"), accessConditions).subscribe( response -> System.out.printf("Set HTTP headers completed with status %d%n", response.getStatusCode())); @@ -408,9 +408,9 @@ public void upload3() { public void upload4() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.uploadWithResponse#Flux-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); BlobRequestConditions accessConditions = new BlobRequestConditions() @@ -433,9 +433,9 @@ public void upload4() { public void upload5() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.uploadWithResponse#Flux-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions.ProgressReporter BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); BlobRequestConditions accessConditions = new BlobRequestConditions() @@ -471,9 +471,9 @@ public void uploadFromFile() { public void uploadFromFile2() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); BlobRequestConditions accessConditions = new BlobRequestConditions() diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java index 5e9653064306..6fe3030aff5f 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java @@ -7,6 +7,7 @@ import com.azure.core.util.Context; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobHttpHeaders; +import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; @@ -128,8 +129,8 @@ public void getProperties() { public void setHTTPHeaders() { // BEGIN: com.azure.storage.blob.BlobClient.setHTTPHeaders#BlobHttpHeaders client.setHttpHeaders(new BlobHttpHeaders() - .setBlobContentLanguage("en-US") - .setBlobContentType("binary")); + .setContentLanguage("en-US") + .setContentType("binary")); System.out.println("Set HTTP headers completed"); // END: com.azure.storage.blob.BlobClient.setHTTPHeaders#BlobHttpHeaders } @@ -279,8 +280,8 @@ public void setHTTPHeadersWithResponseCodeSnippets() { System.out.printf("Set HTTP headers completed with status %d%n", client.setHttpHeadersWithResponse(new BlobHttpHeaders() - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"), accessConditions, timeout, new Context(key1, value1)) + .setContentLanguage("en-US") + .setContentType("binary"), accessConditions, timeout, new Context(key1, value1)) .getStatusCode()); // END: com.azure.storage.blob.BlobClient.setHTTPHeadersWithResponse#BlobHttpHeaders-BlobAccessConditions-Duration-Context } @@ -389,9 +390,9 @@ public void uploadFromFile() throws IOException { public void uploadFromFile2() throws IOException { // BEGIN: com.azure.storage.blob.BlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); BlobRequestConditions accessConditions = new BlobRequestConditions() diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java index b1b211e97ec0..e8bd3398b8f3 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java @@ -6,6 +6,7 @@ import com.azure.core.util.Context; import com.azure.storage.blob.models.BlobAccessPolicy; import com.azure.storage.blob.models.BlobContainerAccessPolicies; +import com.azure.storage.blob.models.BlobContainerProperties; import com.azure.storage.blob.models.BlobErrorCode; import com.azure.storage.blob.models.BlobListDetails; import com.azure.storage.blob.models.BlobRequestConditions; diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java index 17b9e2530ac2..aa095dd998a5 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java @@ -72,8 +72,8 @@ public static void main(String[] args) throws IOException { * Create a blob with blob's blobMetadata and BlobHttpHeaders. */ Map blobMetadata = Collections.singletonMap("myblobmetadata", "sample"); - BlobHttpHeaders blobHTTPHeaders = new BlobHttpHeaders().setBlobContentDisposition("attachment") - .setBlobContentType("text/html; charset=utf-8"); + BlobHttpHeaders blobHTTPHeaders = new BlobHttpHeaders().setContentDisposition("attachment") + .setContentType("text/html; charset=utf-8"); /* * Data which will upload to block blob. diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java index b046637808a0..70e344362a61 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java @@ -45,8 +45,8 @@ public void create() { public void create2() { // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.createWithResponse#BlobHttpHeaders-Map-BlobRequestConditions BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentType("binary") - .setBlobContentLanguage("en-US"); + .setContentType("binary") + .setContentLanguage("en-US"); Map metadata = Collections.singletonMap("metadata", "value"); BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId) .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java index 04fc30d5f83d..6f54b17ee003 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java @@ -49,8 +49,8 @@ public void create() { public void createWithResponse() { // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.createWithResponse#BlobHttpHeaders-Map-BlobRequestConditions-Duration-Context BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentType("binary") - .setBlobContentLanguage("en-US"); + .setContentType("binary") + .setContentLanguage("en-US"); Map metadata = Collections.singletonMap("metadata", "value"); BlobRequestConditions accessConditions = new BlobRequestConditions() .setLeaseId(leaseId) diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java index c4927261706f..cb4ad456f6ba 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java @@ -159,8 +159,8 @@ public void getPropertiesCodeSnippet() { public void setHTTPHeadersCodeSnippet() { // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeaders#BlobHttpHeaders client.setHttpHeaders(new BlobHttpHeaders() - .setBlobContentLanguage("en-US") - .setBlobContentType("binary")); + .setContentLanguage("en-US") + .setContentType("binary")); // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHttpHeaders#BlobHttpHeaders } @@ -347,8 +347,8 @@ public void setHTTPHeadersWithResponseCodeSnippets() { BlobRequestConditions accessConditions = new BlobRequestConditions().setLeaseId(leaseId); client.setHttpHeadersWithResponse(new BlobHttpHeaders() - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"), accessConditions).subscribe( + .setContentLanguage("en-US") + .setContentType("binary"), accessConditions).subscribe( response -> System.out.printf("Set HTTP headers completed with status %d%n", response.getStatusCode())); diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java index 180556b80107..ae4580e32a92 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java @@ -7,7 +7,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.Poller; -import com.azure.storage.blob.BlobProperties; +import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobCopyInfo; import com.azure.storage.blob.models.BlobHttpHeaders; @@ -141,8 +141,8 @@ public void getProperties() { public void setHTTPHeaders() { // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setHttpHeaders#BlobHttpHeaders client.setHttpHeaders(new BlobHttpHeaders() - .setBlobContentLanguage("en-US") - .setBlobContentType("binary")); + .setContentLanguage("en-US") + .setContentType("binary")); System.out.println("Set HTTP headers completed"); // END: com.azure.storage.blob.specialized.BlobClientBase.setHttpHeaders#BlobHttpHeaders } @@ -310,8 +310,8 @@ public void setHTTPHeadersWithResponseCodeSnippets() { System.out.printf("Set HTTP headers completed with status %d%n", client.setHttpHeadersWithResponse(new BlobHttpHeaders() - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"), accessConditions, timeout, new Context(key1, value1)) + .setContentLanguage("en-US") + .setContentType("binary"), accessConditions, timeout, new Context(key1, value1)) .getStatusCode()); // END: com.azure.storage.blob.specialized.BlobClientBase.setHttpHeadersWithResponse#BlobHttpHeaders-BlobRequestConditions-Duration-Context } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java index a7035fe96eec..91da826d8325 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java @@ -50,9 +50,9 @@ public void upload() { public void upload2() { // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.uploadWithResponse#Flux-long-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); BlobRequestConditions accessConditions = new BlobRequestConditions() @@ -160,9 +160,9 @@ public void commitBlockList() { public void commitBlockList2() { // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); BlobRequestConditions accessConditions = new BlobRequestConditions() diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java index 6d77e4a94c1a..fc4cbb9182bc 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java @@ -55,9 +55,9 @@ public void upload() throws IOException { public void upload2() { // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration-Context BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); BlobRequestConditions accessConditions = new BlobRequestConditions() @@ -164,9 +164,9 @@ public void commitBlockList() { public void commitBlockList2() { // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.uploadFromFile#List-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration-Context BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); Map metadata = Collections.singletonMap("metadata", "value"); BlobRequestConditions accessConditions = new BlobRequestConditions() diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java index dd29b4b64d14..bdbcd06d68c2 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java @@ -57,8 +57,8 @@ public void setCreateCodeSnippet() { public void createWithResponseCodeSnippet() { // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobRequestConditions BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); + .setContentLanguage("en-US") + .setContentType("binary"); BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); client.createWithResponse(size, sequenceNumber, headers, metadata, blobRequestConditions) diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java index 84b93a87edf5..bbcc2322c2b1 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java @@ -57,8 +57,8 @@ public void createCodeSnippet() { public void createWithResponseCodeSnippet() { // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.createWithResponse#long-Long-BlobHttpHeaders-Map-BlobRequestConditions-Duration-Context BlobHttpHeaders headers = new BlobHttpHeaders() - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); + .setContentLanguage("en-US") + .setContentType("binary"); BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); Context context = new Context(key, value); diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index 902137d015e4..1a337cbfd952 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -25,6 +25,7 @@ import com.azure.core.util.Configuration import com.azure.core.util.logging.ClientLogger import com.azure.identity.EnvironmentCredentialBuilder import com.azure.storage.blob.models.BlobContainerItem +import com.azure.storage.blob.models.BlobProperties import com.azure.storage.blob.models.BlobRetentionPolicy import com.azure.storage.blob.models.BlobServiceProperties import com.azure.storage.blob.models.CopyStatusType diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy index c4636ffbee33..4f7ba86820ce 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy @@ -396,12 +396,12 @@ class BlobAPITest extends APISpec { setup: def properties = bc.getProperties() def headers = new BlobHttpHeaders() - .setBlobContentEncoding(properties.getContentEncoding()) - .setBlobContentDisposition(properties.getContentDisposition()) - .setBlobContentType("type") - .setBlobCacheControl(properties.getCacheControl()) - .setBlobContentLanguage(properties.getContentLanguage()) - .setBlobContentMD5(Base64.getEncoder().encode(MessageDigest.getInstance("MD5").digest(defaultData.array()))) + .setContentEncoding(properties.getContentEncoding()) + .setContentDisposition(properties.getContentDisposition()) + .setContentType("type") + .setCacheControl(properties.getCacheControl()) + .setContentLanguage(properties.getContentLanguage()) + .setContentMd5(Base64.getEncoder().encode(MessageDigest.getInstance("MD5").digest(defaultData.array()))) bc.setHttpHeaders(headers) @@ -412,12 +412,12 @@ class BlobAPITest extends APISpec { @Unroll def "Set HTTP headers headers"() { setup: - def putHeaders = new BlobHttpHeaders().setBlobCacheControl(cacheControl) - .setBlobContentDisposition(contentDisposition) - .setBlobContentEncoding(contentEncoding) - .setBlobContentLanguage(contentLanguage) - .setBlobContentMD5(contentMD5) - .setBlobContentType(contentType) + def putHeaders = new BlobHttpHeaders().setCacheControl(cacheControl) + .setContentDisposition(contentDisposition) + .setContentEncoding(contentEncoding) + .setContentLanguage(contentLanguage) + .setContentMd5(contentMD5) + .setContentType(contentType) bc.setHttpHeaders(putHeaders) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy index 63506b865632..b5fe68c69d91 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy @@ -9,6 +9,7 @@ import com.azure.storage.blob.models.AppendBlobItem import com.azure.storage.blob.models.BlobAccessPolicy import com.azure.storage.blob.models.BlobErrorCode import com.azure.storage.blob.models.BlobListDetails +import com.azure.storage.blob.models.BlobProperties import com.azure.storage.blob.models.BlobRequestConditions import com.azure.storage.blob.models.BlobSignedIdentifier import com.azure.storage.blob.models.BlobStorageException @@ -585,7 +586,7 @@ class ContainerAPITest extends APISpec { blob.getProperties().getLeaseStatus() == LeaseStatusType.UNLOCKED blob.getProperties().getContentLength() != null blob.getProperties().getContentType() != null - blob.getProperties().getContentMD5() != null + blob.getProperties().getContentMd5() != null blob.getProperties().getContentEncoding() == null blob.getProperties().getContentDisposition() == null blob.getProperties().getContentLanguage() == null @@ -635,7 +636,7 @@ class ContainerAPITest extends APISpec { blob.getProperties().getLeaseStatus() == LeaseStatusType.UNLOCKED blob.getProperties().getContentLength() != null blob.getProperties().getContentType() != null - blob.getProperties().getContentMD5() == null + blob.getProperties().getContentMd5() == null blob.getProperties().getContentEncoding() == null blob.getProperties().getContentDisposition() == null blob.getProperties().getContentLanguage() == null diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy index d7eeba17db36..28524f1d87ff 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy @@ -287,11 +287,11 @@ class SASTest extends APISpec { def key = getOAuthServiceClient().getUserDelegationKey(null, expiryTime) - def keyOid = getConfigValue(key.getSignedOid()) - key.setSignedOid(keyOid) + def keyOid = getConfigValue(key.getSignedObjectId()) + key.setSignedObjectId(keyOid) - def keyTid = getConfigValue(key.getSignedTid()) - key.setSignedTid(keyTid) + def keyTid = getConfigValue(key.getSignedTenantId()) + key.setSignedTenantId(keyTid) when: def sas = new BlobServiceSasSignatureValues() .setPermissions(permissions) @@ -437,11 +437,11 @@ class SASTest extends APISpec { def key = getOAuthServiceClient().getUserDelegationKey(startTime, expiryTime) - def keyOid = getConfigValue(key.getSignedOid()) - key.setSignedOid(keyOid) + def keyOid = getConfigValue(key.getSignedObjectId()) + key.setSignedObjectId(keyOid) - def keyTid = getConfigValue(key.getSignedTid()) - key.setSignedTid(keyTid) + def keyTid = getConfigValue(key.getSignedTenantId()) + key.setSignedTenantId(keyTid) when: def sas = new BlobServiceSasSignatureValues() .setPermissions(permissions) @@ -503,11 +503,11 @@ class SASTest extends APISpec { def key = getOAuthServiceClient().getUserDelegationKey(null, expiryTime) - def keyOid = getConfigValue(key.getSignedOid()) - key.setSignedOid(keyOid) + def keyOid = getConfigValue(key.getSignedObjectId()) + key.setSignedObjectId(keyOid) - def keyTid = getConfigValue(key.getSignedTid()) - key.setSignedTid(keyTid) + def keyTid = getConfigValue(key.getSignedTenantId()) + key.setSignedTenantId(keyTid) when: def sasWithPermissions = new BlobServiceSasSignatureValues() .setPermissions(permissions) @@ -712,8 +712,8 @@ class SASTest extends APISpec { .setContentLanguage(language) .setContentType(type) def key = new UserDelegationKey() - .setSignedOid(keyOid) - .setSignedTid(keyTid) + .setSignedObjectId(keyOid) + .setSignedTenantId(keyTid) .setSignedStart(keyStart) .setSignedExpiry(keyExpiry) .setSignedService(keyService) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy index 6cef47de45ad..65077d531d23 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy @@ -179,13 +179,13 @@ class ServiceAPITest extends APISpec { received.getDefaultServiceVersion() == sent.getDefaultServiceVersion() && received.getHourMetrics().isEnabled() == sent.getHourMetrics().isEnabled() && - received.getHourMetrics().isIncludeAPIs() == sent.getHourMetrics().isIncludeAPIs() && + received.getHourMetrics().isIncludeApis() == sent.getHourMetrics().isIncludeApis() && received.getHourMetrics().getRetentionPolicy().isEnabled() == sent.getHourMetrics().getRetentionPolicy().isEnabled() && received.getHourMetrics().getRetentionPolicy().getDays() == sent.getHourMetrics().getRetentionPolicy().getDays() && received.getHourMetrics().getVersion() == sent.getHourMetrics().getVersion() && received.getMinuteMetrics().isEnabled() == sent.getMinuteMetrics().isEnabled() && - received.getMinuteMetrics().isIncludeAPIs() == sent.getMinuteMetrics().isIncludeAPIs() && + received.getMinuteMetrics().isIncludeApis() == sent.getMinuteMetrics().isIncludeApis() && received.getMinuteMetrics().getRetentionPolicy().isEnabled() == sent.getMinuteMetrics().getRetentionPolicy().isEnabled() && received.getMinuteMetrics().getRetentionPolicy().getDays() == sent.getMinuteMetrics().getRetentionPolicy().getDays() && received.getMinuteMetrics().getVersion() == sent.getMinuteMetrics().getVersion() && @@ -211,9 +211,9 @@ class ServiceAPITest extends APISpec { .setMaxAgeInSeconds(10)) def defaultServiceVersion = "2016-05-31" def hourMetrics = new BlobMetrics().setEnabled(true).setVersion("1.0") - .setRetentionPolicy(retentionPolicy).setIncludeAPIs(true) + .setRetentionPolicy(retentionPolicy).setIncludeApis(true) def minuteMetrics = new BlobMetrics().setEnabled(true).setVersion("1.0") - .setRetentionPolicy(retentionPolicy).setIncludeAPIs(true) + .setRetentionPolicy(retentionPolicy).setIncludeApis(true) def website = new StaticWebsite().setEnabled(true) .setIndexDocument("myIndex.html") .setErrorDocument404Path("custom/error/path.html") @@ -252,9 +252,9 @@ class ServiceAPITest extends APISpec { .setMaxAgeInSeconds(10)) def defaultServiceVersion = "2016-05-31" def hourMetrics = new BlobMetrics().setEnabled(true).setVersion("1.0") - .setRetentionPolicy(retentionPolicy).setIncludeAPIs(true) + .setRetentionPolicy(retentionPolicy).setIncludeApis(true) def minuteMetrics = new BlobMetrics().setEnabled(true).setVersion("1.0") - .setRetentionPolicy(retentionPolicy).setIncludeAPIs(true) + .setRetentionPolicy(retentionPolicy).setIncludeApis(true) def website = new StaticWebsite().setEnabled(true) .setIndexDocument("myIndex.html") .setErrorDocument404Path("custom/error/path.html") @@ -302,8 +302,8 @@ class ServiceAPITest extends APISpec { expect: response.getStatusCode() == 200 response.getValue() != null - response.getValue().getSignedOid() != null - response.getValue().getSignedTid() != null + response.getValue().getSignedObjectId() != null + response.getValue().getSignedTenantId() != null response.getValue().getSignedStart() != null response.getValue().getSignedExpiry() != null response.getValue().getSignedService() != null diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy index 67ee09570a82..2830e7fae12a 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy @@ -53,12 +53,12 @@ class AppendBlobAPITest extends APISpec { @Unroll def "Create headers"() { setup: - def headers = new BlobHttpHeaders().setBlobCacheControl(cacheControl) - .setBlobContentDisposition(contentDisposition) - .setBlobContentEncoding(contentEncoding) - .setBlobContentLanguage(contentLanguage) - .setBlobContentMD5(contentMD5) - .setBlobContentType(contentType) + def headers = new BlobHttpHeaders().setCacheControl(cacheControl) + .setContentDisposition(contentDisposition) + .setContentEncoding(contentEncoding) + .setContentLanguage(contentLanguage) + .setContentMd5(contentMD5) + .setContentType(contentType) when: bc.createWithResponse(headers, null, null, null, null) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy index 6c8a6d96bb98..2234c71a2761 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy @@ -365,12 +365,12 @@ class BlockBlobAPITest extends APISpec { def blockID = getBlockID() bc.stageBlock(blockID, defaultInputStream.get(), defaultDataSize) def ids = [ blockID ] as List - def headers = new BlobHttpHeaders().setBlobCacheControl(cacheControl) - .setBlobContentDisposition(contentDisposition) - .setBlobContentEncoding(contentEncoding) - .setBlobContentLanguage(contentLanguage) - .setBlobContentMD5(contentMD5) - .setBlobContentType(contentType) + def headers = new BlobHttpHeaders().setCacheControl(cacheControl) + .setContentDisposition(contentDisposition) + .setContentEncoding(contentEncoding) + .setContentLanguage(contentLanguage) + .setContentMd5(contentMD5) + .setContentType(contentType) when: bc.commitBlockListWithResponse(ids, headers, null, null, null, null, null) @@ -661,12 +661,12 @@ class BlockBlobAPITest extends APISpec { @Unroll def "Upload headers"() { setup: - def headers = new BlobHttpHeaders().setBlobCacheControl(cacheControl) - .setBlobContentDisposition(contentDisposition) - .setBlobContentEncoding(contentEncoding) - .setBlobContentLanguage(contentLanguage) - .setBlobContentMD5(contentMD5) - .setBlobContentType(contentType) + def headers = new BlobHttpHeaders().setCacheControl(cacheControl) + .setContentDisposition(contentDisposition) + .setContentEncoding(contentEncoding) + .setContentLanguage(contentLanguage) + .setContentMd5(contentMD5) + .setContentType(contentType) when: bc.uploadWithResponse(defaultInputStream.get(), defaultDataSize, headers, null, null, null, null, null) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy index 329191f71649..5f468f21f755 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy @@ -11,10 +11,9 @@ import com.azure.storage.blob.BlobServiceVersion import com.azure.storage.blob.BlobUrlParts import com.azure.storage.blob.models.BlobRange import com.azure.storage.blob.models.UserDelegationKey -import com.azure.storage.common.implementation.StorageImplUtils -import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.common.Utility import com.azure.storage.common.implementation.Constants +import com.azure.storage.common.implementation.StorageImplUtils import com.azure.storage.common.sas.AccountSasPermission import com.azure.storage.common.sas.AccountSasResourceType import com.azure.storage.common.sas.AccountSasSignatureValues @@ -190,8 +189,8 @@ class HelperTest extends APISpec { .setContentType(type) UserDelegationKey key = new UserDelegationKey() - .setSignedOid(keyOid) - .setSignedTid(keyTid) + .setSignedObjectId(keyOid) + .setSignedTenantId(keyTid) .setSignedStart(keyStart) .setSignedExpiry(keyExpiry) .setSignedService(keyService) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy index d299c498dd58..8b6eb568b76e 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy @@ -63,12 +63,12 @@ class PageBlobAPITest extends APISpec { @Unroll def "Create headers"() { setup: - def headers = new BlobHttpHeaders().setBlobCacheControl(cacheControl) - .setBlobContentDisposition(contentDisposition) - .setBlobContentEncoding(contentEncoding) - .setBlobContentLanguage(contentLanguage) - .setBlobContentMD5(contentMD5) - .setBlobContentType(contentType) + def headers = new BlobHttpHeaders().setCacheControl(cacheControl) + .setContentDisposition(contentDisposition) + .setContentEncoding(contentEncoding) + .setContentLanguage(contentLanguage) + .setContentMd5(contentMD5) + .setContentType(contentType) when: bc.createWithResponse(PageBlobClient.PAGE_BYTES, null, headers, null, null, null, null) diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index 9c9361f604c5..d43ba1da8f80 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -202,6 +202,8 @@ directive: $.delete.parameters.splice(0, 0, { "$ref": path + "ContainerName" }); $.delete.parameters.splice(1, 0, { "$ref": path + "Blob" }); } + $.get.responses["200"].headers["Content-MD5"]["x-ms-client-name"] = "contentMd5"; + $.get.responses["206"].headers["Content-MD5"]["x-ms-client-name"] = "contentMd5"; ``` ### /{containerName}/{blob}?PageBlob @@ -703,6 +705,7 @@ directive: $.BlobItemProperties = $.BlobProperties; delete $.BlobProperties; $.BlobItemProperties.properties.CustomerProvidedKeySha256 = { "type": "string" } + $.BlobItemProperties.properties["Content-MD5"]["x-ms-client-name"] = "contentMd5"; // const etag = $.BlobItemProperties.properties.Etag; if (etag && !etag["x-ms-client-name"]) { @@ -1090,6 +1093,9 @@ directive: $.BlobMetrics = $.Metrics; delete $.Metrics; $.BlobMetrics.xml = {"name": "Metrics"}; + $.BlobMetrics.properties.IncludeApis = $.BlobMetrics.properties.IncludeAPIs; + delete $.BlobMetrics.properties.IncludeAPIs; + $.BlobMetrics.properties.IncludeApis.xml = {"name": "IncludeAPIs"}; $.BlobServiceProperties.properties.HourMetrics["$ref"] = "#/definitions/BlobMetrics"; $.BlobServiceProperties.properties.MinuteMetrics["$ref"] = "#/definitions/BlobMetrics"; } @@ -1202,11 +1208,27 @@ directive: where: $.parameters transform: > $.BlobCacheControl["x-ms-parameter-grouping"].name = "blob-http-headers"; + $.BlobCacheControl["x-ms-client-name"] = "cacheControl"; $.BlobContentDisposition["x-ms-parameter-grouping"].name = "blob-http-headers"; + $.BlobContentDisposition["x-ms-client-name"] = "contentDisposition"; $.BlobContentEncoding["x-ms-parameter-grouping"].name = "blob-http-headers"; + $.BlobContentEncoding["x-ms-client-name"] = "contentEncoding"; $.BlobContentLanguage["x-ms-parameter-grouping"].name = "blob-http-headers"; + $.BlobContentLanguage["x-ms-client-name"] = "contentLanguage"; $.BlobContentMD5["x-ms-parameter-grouping"].name = "blob-http-headers"; + $.BlobContentMD5["x-ms-client-name"] = "contentMd5"; $.BlobContentType["x-ms-parameter-grouping"].name = "blob-http-headers"; + $.BlobContentType["x-ms-client-name"] = "contentType"; +``` + +### Rename UserDelegationKey SignedOid and SignedTid +``` yaml +directive: +- from: swagger-document + where: $.definitions.UserDelegationKey + transform: > + $.properties.SignedOid["x-ms-client-name"] = "signedObjectId"; + $.properties.SignedTid["x-ms-client-name"] = "signedTenantId"; ``` ### Remove AccessConditions parameter groupings diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java index cbd409e939bf..68734184f94c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java @@ -1047,7 +1047,7 @@ private Response mapCreateSnapshotResponse(SharesCreateSnapsh private Response mapGetPropertiesResponse(SharesGetPropertiesResponse response) { ShareGetPropertiesHeaders headers = response.getDeserializedHeaders(); ShareProperties shareProperties = new ShareProperties().setQuota(headers.getQuota()) - .setEtag(headers.getETag()) + .setETag(headers.getETag()) .setLastModified(headers.getLastModified()) .setMetadata(headers.getMetadata()); diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageBuilder.java index 9f042fbc7222..9ad4b6ee6417 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageBuilder.java @@ -71,7 +71,11 @@ public AzureFileStorageImpl build() { this.pipeline = RestProxy.createDefaultPipeline(); } AzureFileStorageImpl client = new AzureFileStorageImpl(pipeline); - client.setVersion(this.version); + if (this.version != null) { + client.setVersion(this.version); + } else { + client.setVersion("2019-02-02"); + } if (this.url != null) { client.setUrl(this.url); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java index dd2bd6916e84..7cb99c4ec213 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java @@ -79,7 +79,7 @@ private interface FilesService { @Put("{shareName}/{filePath}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(FileStorageException.class) - Mono create(@PathParam("shareName") String shareName, @PathParam("filePath") String filePath, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-content-length") long fileContentLength, @HeaderParam("x-ms-type") String fileTypeConstant, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-file-permission") String filePermission, @HeaderParam("x-ms-file-permission-key") String filePermissionKey, @HeaderParam("x-ms-file-attributes") String fileAttributes, @HeaderParam("x-ms-file-creation-time") String fileCreationTime, @HeaderParam("x-ms-file-last-write-time") String fileLastWriteTime, @HeaderParam("x-ms-content-type") String fileContentType, @HeaderParam("x-ms-content-encoding") String fileContentEncoding, @HeaderParam("x-ms-content-language") String fileContentLanguage, @HeaderParam("x-ms-cache-control") String fileCacheControl, @HeaderParam("x-ms-content-md5") String fileContentMD5, @HeaderParam("x-ms-content-disposition") String fileContentDisposition, Context context); + Mono create(@PathParam("shareName") String shareName, @PathParam("filePath") String filePath, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-content-length") long fileContentLength, @HeaderParam("x-ms-type") String fileTypeConstant, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-file-permission") String filePermission, @HeaderParam("x-ms-file-permission-key") String filePermissionKey, @HeaderParam("x-ms-file-attributes") String fileAttributes, @HeaderParam("x-ms-file-creation-time") String fileCreationTime, @HeaderParam("x-ms-file-last-write-time") String fileLastWriteTime, @HeaderParam("x-ms-content-type") String contentType, @HeaderParam("x-ms-content-encoding") String contentEncoding, @HeaderParam("x-ms-content-language") String contentLanguage, @HeaderParam("x-ms-cache-control") String cacheControl, @HeaderParam("x-ms-content-md5") String contentMd5, @HeaderParam("x-ms-content-disposition") String contentDisposition, Context context); @Get("{shareName}/{filePath}") @ExpectedResponses({200, 206}) @@ -98,7 +98,7 @@ private interface FilesService { @Put("{shareName}/{filePath}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(FileStorageException.class) - Mono setHTTPHeaders(@PathParam("shareName") String shareName, @PathParam("filePath") String filePath, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-content-length") Long fileContentLength, @HeaderParam("x-ms-file-permission") String filePermission, @HeaderParam("x-ms-file-permission-key") String filePermissionKey, @HeaderParam("x-ms-file-attributes") String fileAttributes, @HeaderParam("x-ms-file-creation-time") String fileCreationTime, @HeaderParam("x-ms-file-last-write-time") String fileLastWriteTime, @QueryParam("comp") String comp, @HeaderParam("x-ms-content-type") String fileContentType, @HeaderParam("x-ms-content-encoding") String fileContentEncoding, @HeaderParam("x-ms-content-language") String fileContentLanguage, @HeaderParam("x-ms-cache-control") String fileCacheControl, @HeaderParam("x-ms-content-md5") String fileContentMD5, @HeaderParam("x-ms-content-disposition") String fileContentDisposition, Context context); + Mono setHTTPHeaders(@PathParam("shareName") String shareName, @PathParam("filePath") String filePath, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-content-length") Long fileContentLength, @HeaderParam("x-ms-file-permission") String filePermission, @HeaderParam("x-ms-file-permission-key") String filePermissionKey, @HeaderParam("x-ms-file-attributes") String fileAttributes, @HeaderParam("x-ms-file-creation-time") String fileCreationTime, @HeaderParam("x-ms-file-last-write-time") String fileLastWriteTime, @QueryParam("comp") String comp, @HeaderParam("x-ms-content-type") String contentType, @HeaderParam("x-ms-content-encoding") String contentEncoding, @HeaderParam("x-ms-content-language") String contentLanguage, @HeaderParam("x-ms-cache-control") String cacheControl, @HeaderParam("x-ms-content-md5") String contentMd5, @HeaderParam("x-ms-content-disposition") String contentDisposition, Context context); @Put("{shareName}/{filePath}") @ExpectedResponses({200}) @@ -161,13 +161,13 @@ public Mono createWithRestResponseAsync(String shareName, S final Map metadata = null; final String filePermission = null; final String filePermissionKey = null; - final String fileContentType = null; - final String fileContentEncoding = null; - final String fileContentLanguage = null; - final String fileCacheControl = null; - final String fileContentDisposition = null; - String fileContentMD5Converted = null; - return service.create(shareName, filePath, this.client.getUrl(), timeout, this.client.getVersion(), fileContentLength, fileTypeConstant, metadata, filePermission, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, fileContentType, fileContentEncoding, fileContentLanguage, fileCacheControl, fileContentMD5Converted, fileContentDisposition, context); + final String contentType = null; + final String contentEncoding = null; + final String contentLanguage = null; + final String cacheControl = null; + final String contentDisposition = null; + String contentMd5Converted = null; + return service.create(shareName, filePath, this.client.getUrl(), timeout, this.client.getVersion(), fileContentLength, fileTypeConstant, metadata, filePermission, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, contentType, contentEncoding, contentLanguage, cacheControl, contentMd5Converted, contentDisposition, context); } /** @@ -191,32 +191,32 @@ public Mono createWithRestResponseAsync(String shareName, S @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String shareName, String filePath, long fileContentLength, String fileAttributes, String fileCreationTime, String fileLastWriteTime, Integer timeout, Map metadata, String filePermission, String filePermissionKey, FileHttpHeaders fileHttpHeaders, Context context) { final String fileTypeConstant = "file"; - String fileContentType = null; + String contentType = null; if (fileHttpHeaders != null) { - fileContentType = fileHttpHeaders.getContentType(); + contentType = fileHttpHeaders.getContentType(); } - String fileContentEncoding = null; + String contentEncoding = null; if (fileHttpHeaders != null) { - fileContentEncoding = fileHttpHeaders.getContentEncoding(); + contentEncoding = fileHttpHeaders.getContentEncoding(); } - String fileContentLanguage = null; + String contentLanguage = null; if (fileHttpHeaders != null) { - fileContentLanguage = fileHttpHeaders.getContentLanguage(); + contentLanguage = fileHttpHeaders.getContentLanguage(); } - String fileCacheControl = null; + String cacheControl = null; if (fileHttpHeaders != null) { - fileCacheControl = fileHttpHeaders.getCacheControl(); + cacheControl = fileHttpHeaders.getCacheControl(); } - byte[] fileContentMD5 = null; + byte[] contentMd5 = null; if (fileHttpHeaders != null) { - fileContentMD5 = fileHttpHeaders.getContentMD5(); + contentMd5 = fileHttpHeaders.getContentMd5(); } - String fileContentDisposition = null; + String contentDisposition = null; if (fileHttpHeaders != null) { - fileContentDisposition = fileHttpHeaders.getContentDisposition(); + contentDisposition = fileHttpHeaders.getContentDisposition(); } - String fileContentMD5Converted = Base64Util.encodeToString(fileContentMD5); - return service.create(shareName, filePath, this.client.getUrl(), timeout, this.client.getVersion(), fileContentLength, fileTypeConstant, metadata, filePermission, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, fileContentType, fileContentEncoding, fileContentLanguage, fileCacheControl, fileContentMD5Converted, fileContentDisposition, context); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + return service.create(shareName, filePath, this.client.getUrl(), timeout, this.client.getVersion(), fileContentLength, fileTypeConstant, metadata, filePermission, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, contentType, contentEncoding, contentLanguage, cacheControl, contentMd5Converted, contentDisposition, context); } /** @@ -334,13 +334,13 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str final String filePermission = null; final String filePermissionKey = null; final String comp = "properties"; - final String fileContentType = null; - final String fileContentEncoding = null; - final String fileContentLanguage = null; - final String fileCacheControl = null; - final String fileContentDisposition = null; - String fileContentMD5Converted = null; - return service.setHTTPHeaders(shareName, filePath, this.client.getUrl(), timeout, this.client.getVersion(), fileContentLength, filePermission, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, comp, fileContentType, fileContentEncoding, fileContentLanguage, fileCacheControl, fileContentMD5Converted, fileContentDisposition, context); + final String contentType = null; + final String contentEncoding = null; + final String contentLanguage = null; + final String cacheControl = null; + final String contentDisposition = null; + String contentMd5Converted = null; + return service.setHTTPHeaders(shareName, filePath, this.client.getUrl(), timeout, this.client.getVersion(), fileContentLength, filePermission, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, comp, contentType, contentEncoding, contentLanguage, cacheControl, contentMd5Converted, contentDisposition, context); } /** @@ -363,32 +363,32 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str @ServiceMethod(returns = ReturnType.SINGLE) public Mono setHTTPHeadersWithRestResponseAsync(String shareName, String filePath, String fileAttributes, String fileCreationTime, String fileLastWriteTime, Integer timeout, Long fileContentLength, String filePermission, String filePermissionKey, FileHttpHeaders fileHttpHeaders, Context context) { final String comp = "properties"; - String fileContentType = null; + String contentType = null; if (fileHttpHeaders != null) { - fileContentType = fileHttpHeaders.getContentType(); + contentType = fileHttpHeaders.getContentType(); } - String fileContentEncoding = null; + String contentEncoding = null; if (fileHttpHeaders != null) { - fileContentEncoding = fileHttpHeaders.getContentEncoding(); + contentEncoding = fileHttpHeaders.getContentEncoding(); } - String fileContentLanguage = null; + String contentLanguage = null; if (fileHttpHeaders != null) { - fileContentLanguage = fileHttpHeaders.getContentLanguage(); + contentLanguage = fileHttpHeaders.getContentLanguage(); } - String fileCacheControl = null; + String cacheControl = null; if (fileHttpHeaders != null) { - fileCacheControl = fileHttpHeaders.getCacheControl(); + cacheControl = fileHttpHeaders.getCacheControl(); } - byte[] fileContentMD5 = null; + byte[] contentMd5 = null; if (fileHttpHeaders != null) { - fileContentMD5 = fileHttpHeaders.getContentMD5(); + contentMd5 = fileHttpHeaders.getContentMd5(); } - String fileContentDisposition = null; + String contentDisposition = null; if (fileHttpHeaders != null) { - fileContentDisposition = fileHttpHeaders.getContentDisposition(); + contentDisposition = fileHttpHeaders.getContentDisposition(); } - String fileContentMD5Converted = Base64Util.encodeToString(fileContentMD5); - return service.setHTTPHeaders(shareName, filePath, this.client.getUrl(), timeout, this.client.getVersion(), fileContentLength, filePermission, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, comp, fileContentType, fileContentEncoding, fileContentLanguage, fileCacheControl, fileContentMD5Converted, fileContentDisposition, context); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + return service.setHTTPHeaders(shareName, filePath, this.client.getUrl(), timeout, this.client.getVersion(), fileContentLength, filePermission, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, comp, contentType, contentEncoding, contentLanguage, cacheControl, contentMd5Converted, contentDisposition, context); } /** diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileHttpHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileHttpHeaders.java index 2de7bd29da27..351ca2b42192 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileHttpHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileHttpHeaders.java @@ -20,43 +20,43 @@ public final class FileHttpHeaders { * Sets the MIME content type of the file. The default type is * 'application/octet-stream'. */ - @JsonProperty(value = "fileContentType") + @JsonProperty(value = "contentType") private String contentType; /* * Specifies which content encodings have been applied to the file. */ - @JsonProperty(value = "fileContentEncoding") + @JsonProperty(value = "contentEncoding") private String contentEncoding; /* * Specifies the natural languages used by this resource. */ - @JsonProperty(value = "fileContentLanguage") + @JsonProperty(value = "contentLanguage") private String contentLanguage; /* * Sets the file's cache control. The File service stores this value but * does not use or modify it. */ - @JsonProperty(value = "fileCacheControl") + @JsonProperty(value = "cacheControl") private String cacheControl; /* * Sets the file's MD5 hash. */ - @JsonProperty(value = "fileContentMD5") - private byte[] contentMD5; + @JsonProperty(value = "contentMd5") + private byte[] contentMd5; /* * Sets the file's Content-Disposition header. */ - @JsonProperty(value = "fileContentDisposition") + @JsonProperty(value = "contentDisposition") private String contentDisposition; /** - * Get the contentType property: Sets the MIME content type of the - * file. The default type is 'application/octet-stream'. + * Get the contentType property: Sets the MIME content type of the file. + * The default type is 'application/octet-stream'. * * @return the contentType value. */ @@ -65,8 +65,8 @@ public String getContentType() { } /** - * Set the contentType property: Sets the MIME content type of the - * file. The default type is 'application/octet-stream'. + * Set the contentType property: Sets the MIME content type of the file. + * The default type is 'application/octet-stream'. * * @param contentType the contentType value to set. * @return the FileHttpHeaders object itself. @@ -77,8 +77,8 @@ public FileHttpHeaders setContentType(String contentType) { } /** - * Get the contentEncoding property: Specifies which content encodings - * have been applied to the file. + * Get the contentEncoding property: Specifies which content encodings have + * been applied to the file. * * @return the contentEncoding value. */ @@ -87,8 +87,8 @@ public String getContentEncoding() { } /** - * Set the contentEncoding property: Specifies which content encodings - * have been applied to the file. + * Set the contentEncoding property: Specifies which content encodings have + * been applied to the file. * * @param contentEncoding the contentEncoding value to set. * @return the FileHttpHeaders object itself. @@ -99,8 +99,8 @@ public FileHttpHeaders setContentEncoding(String contentEncoding) { } /** - * Get the contentLanguage property: Specifies the natural languages - * used by this resource. + * Get the contentLanguage property: Specifies the natural languages used + * by this resource. * * @return the contentLanguage value. */ @@ -109,8 +109,8 @@ public String getContentLanguage() { } /** - * Set the contentLanguage property: Specifies the natural languages - * used by this resource. + * Set the contentLanguage property: Specifies the natural languages used + * by this resource. * * @param contentLanguage the contentLanguage value to set. * @return the FileHttpHeaders object itself. @@ -121,8 +121,8 @@ public FileHttpHeaders setContentLanguage(String contentLanguage) { } /** - * Get the cacheControl property: Sets the file's cache control. The - * File service stores this value but does not use or modify it. + * Get the cacheControl property: Sets the file's cache control. The File + * service stores this value but does not use or modify it. * * @return the cacheControl value. */ @@ -131,8 +131,8 @@ public String getCacheControl() { } /** - * Set the cacheControl property: Sets the file's cache control. The - * File service stores this value but does not use or modify it. + * Set the cacheControl property: Sets the file's cache control. The File + * service stores this value but does not use or modify it. * * @param cacheControl the cacheControl value to set. * @return the FileHttpHeaders object itself. @@ -143,28 +143,28 @@ public FileHttpHeaders setCacheControl(String cacheControl) { } /** - * Get the contentMD5 property: Sets the file's MD5 hash. + * Get the contentMd5 property: Sets the file's MD5 hash. * - * @return the contentMD5 value. + * @return the contentMd5 value. */ - public byte[] getContentMD5() { - return ImplUtils.clone(this.contentMD5); + public byte[] getContentMd5() { + return ImplUtils.clone(this.contentMd5); } /** - * Set the contentMD5 property: Sets the file's MD5 hash. + * Set the contentMd5 property: Sets the file's MD5 hash. * - * @param contentMD5 the contentMD5 value to set. + * @param contentMd5 the contentMd5 value to set. * @return the FileHttpHeaders object itself. */ - public FileHttpHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = ImplUtils.clone(contentMD5); + public FileHttpHeaders setContentMd5(byte[] contentMd5) { + this.contentMd5 = ImplUtils.clone(contentMd5); return this; } /** - * Get the contentDisposition property: Sets the file's - * Content-Disposition header. + * Get the contentDisposition property: Sets the file's Content-Disposition + * header. * * @return the contentDisposition value. */ @@ -173,8 +173,8 @@ public String getContentDisposition() { } /** - * Set the contentDisposition property: Sets the file's - * Content-Disposition header. + * Set the contentDisposition property: Sets the file's Content-Disposition + * header. * * @param contentDisposition the contentDisposition value to set. * @return the FileHttpHeaders object itself. diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileMetrics.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileMetrics.java index 0ca2f9093ae5..d2a4bb8b1e95 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileMetrics.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileMetrics.java @@ -26,19 +26,19 @@ public final class FileMetrics { @JsonProperty(value = "Enabled", required = true) private boolean enabled; - /* - * Indicates whether metrics should generate summary statistics for called - * API operations. - */ - @JsonProperty(value = "IncludeAPIs") - private Boolean includeAPIs; - /* * The retentionPolicy property. */ @JsonProperty(value = "RetentionPolicy") private FileRetentionPolicy retentionPolicy; + /* + * Indicates whether metrics should generate summary statistics for called + * API operations. + */ + @JsonProperty(value = "IncludeAPIs") + private Boolean includeApis; + /** * Get the version property: The version of Storage Analytics to configure. * @@ -82,44 +82,44 @@ public FileMetrics setEnabled(boolean enabled) { } /** - * Get the includeAPIs property: Indicates whether metrics should generate - * summary statistics for called API operations. + * Get the retentionPolicy property: The retentionPolicy property. * - * @return the includeAPIs value. + * @return the retentionPolicy value. */ - public Boolean isIncludeAPIs() { - return this.includeAPIs; + public FileRetentionPolicy getRetentionPolicy() { + return this.retentionPolicy; } /** - * Set the includeAPIs property: Indicates whether metrics should generate - * summary statistics for called API operations. + * Set the retentionPolicy property: The retentionPolicy property. * - * @param includeAPIs the includeAPIs value to set. + * @param retentionPolicy the retentionPolicy value to set. * @return the FileMetrics object itself. */ - public FileMetrics setIncludeAPIs(Boolean includeAPIs) { - this.includeAPIs = includeAPIs; + public FileMetrics setRetentionPolicy(FileRetentionPolicy retentionPolicy) { + this.retentionPolicy = retentionPolicy; return this; } /** - * Get the retentionPolicy property: The retentionPolicy property. + * Get the includeApis property: Indicates whether metrics should generate + * summary statistics for called API operations. * - * @return the retentionPolicy value. + * @return the includeApis value. */ - public FileRetentionPolicy getRetentionPolicy() { - return this.retentionPolicy; + public Boolean isIncludeApis() { + return this.includeApis; } /** - * Set the retentionPolicy property: The retentionPolicy property. + * Set the includeApis property: Indicates whether metrics should generate + * summary statistics for called API operations. * - * @param retentionPolicy the retentionPolicy value to set. + * @param includeApis the includeApis value to set. * @return the FileMetrics object itself. */ - public FileMetrics setRetentionPolicy(FileRetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; + public FileMetrics setIncludeApis(Boolean includeApis) { + this.includeApis = includeApis; return this; } } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareProperties.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareProperties.java index cd2c5ec73560..ea9e43683159 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareProperties.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareProperties.java @@ -24,10 +24,10 @@ public final class ShareProperties { private DateTimeRfc1123 lastModified; /* - * The etag property. + * The eTag property. */ @JsonProperty(value = "Etag", required = true) - private String etag; + private String eTag; /* * The quota property. @@ -69,22 +69,22 @@ public ShareProperties setLastModified(OffsetDateTime lastModified) { } /** - * Get the etag property: The etag property. + * Get the eTag property: The eTag property. * - * @return the etag value. + * @return the eTag value. */ - public String getEtag() { - return this.etag; + public String getETag() { + return this.eTag; } /** - * Set the etag property: The etag property. + * Set the eTag property: The eTag property. * - * @param etag the etag value to set. + * @param eTag the eTag value to set. * @return the ShareProperties object itself. */ - public ShareProperties setEtag(String etag) { - this.etag = etag; + public ShareProperties setETag(String eTag) { + this.eTag = eTag; return this; } diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareSample.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareSample.java index f74d8edbc98a..0956bd94ae6b 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareSample.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareSample.java @@ -78,7 +78,7 @@ public static void main(String[] args) { try { ShareProperties shareProperties1 = shareClientWithSnapshot1.getProperties(); - System.out.println("This is the first snapshot eTag: " + shareProperties1.getEtag()); + System.out.println("This is the first snapshot eTag: " + shareProperties1.getETag()); } catch (FileStorageException e) { System.out.println("Failed to get properties for the first share snapshot. Reasons: " + e.getMessage()); } @@ -92,7 +92,7 @@ public static void main(String[] args) { try { ShareProperties shareProperties2 = shareClientWithSnapshot2.getProperties(); - System.out.println("This is the second snapshot eTag: " + shareProperties2.getEtag()); + System.out.println("This is the second snapshot eTag: " + shareProperties2.getETag()); } catch (FileStorageException e) { System.out.println("Failed to get properties for the second share snapshot. Reasons: " + e.getMessage()); } diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy index fc09ddee2894..394a01f8a92d 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy @@ -552,7 +552,7 @@ class DirectoryAPITests extends APISpec { fileName | maxSize | httpHeaders | metadata | errMsg "testfile:" | 1024 | null | testMetadata | FileErrorCode.INVALID_RESOURCE_NAME "fileName" | -1 | null | testMetadata | FileErrorCode.OUT_OF_RANGE_INPUT - "fileName" | 1024 | new FileHttpHeaders().setContentMD5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE + "fileName" | 1024 | new FileHttpHeaders().setContentMd5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE "fileName" | 1024 | null | Collections.singletonMap("", "value") | FileErrorCode.EMPTY_METADATA_KEY } diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy index f2f629c48c75..926690b4c4b2 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy @@ -537,7 +537,7 @@ class DirectoryAsyncAPITests extends APISpec { fileName | maxSize | httpHeaders | metadata | errMsg "testfile:" | 1024 | null | testMetadata | FileErrorCode.INVALID_RESOURCE_NAME "fileName" | -1 | null | testMetadata | FileErrorCode.OUT_OF_RANGE_INPUT - "fileName" | 1024 | new FileHttpHeaders().setContentMD5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE + "fileName" | 1024 | new FileHttpHeaders().setContentMd5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE "fileName" | 1024 | null | Collections.singletonMap("", "value") | FileErrorCode.EMPTY_METADATA_KEY } diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAPITests.groovy index 289eb564d388..7922a3cf86a8 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAPITests.groovy @@ -171,7 +171,7 @@ class FileServiceAPITests extends APISpec { given: def originalProperties = primaryFileServiceClient.getProperties() def retentionPolicy = new FileRetentionPolicy().setEnabled(true).setDays(3) - def metrics = new FileMetrics().setEnabled(true).setIncludeAPIs(false) + def metrics = new FileMetrics().setEnabled(true).setIncludeApis(false) .setRetentionPolicy(retentionPolicy).setVersion("1.0") def updatedProperties = new FileServiceProperties().setHourMetrics(metrics) .setMinuteMetrics(metrics).setCors(new ArrayList<>()) @@ -193,7 +193,7 @@ class FileServiceAPITests extends APISpec { def "Set and get properties with invalid args"() { given: def retentionPolicy = new FileRetentionPolicy().setEnabled(true).setDays(3) - def metrics = new FileMetrics().setEnabled(true).setIncludeAPIs(false) + def metrics = new FileMetrics().setEnabled(true).setIncludeApis(false) .setRetentionPolicy(retentionPolicy).setVersion("1.0") when: diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAsyncAPITests.groovy index dd85d1242834..86c8cb79ad57 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAsyncAPITests.groovy @@ -196,7 +196,7 @@ class FileServiceAsyncAPITests extends APISpec { given: def originalProperties = primaryFileServiceAsyncClient.getProperties().block() def retentionPolicy = new FileRetentionPolicy().setEnabled(true).setDays(3) - def metrics = new FileMetrics().setEnabled(true).setIncludeAPIs(false) + def metrics = new FileMetrics().setEnabled(true).setIncludeApis(false) .setRetentionPolicy(retentionPolicy).setVersion("1.0") def updatedProperties = new FileServiceProperties().setHourMetrics(metrics) .setMinuteMetrics(metrics).setCors(new ArrayList<>()) @@ -225,7 +225,7 @@ class FileServiceAsyncAPITests extends APISpec { def "Set and get properties with invalid args"() { given: def retentionPolicy = new FileRetentionPolicy().setEnabled(true).setDays(3) - def metrics = new FileMetrics().setEnabled(true).setIncludeAPIs(false) + def metrics = new FileMetrics().setEnabled(true).setIncludeApis(false) .setRetentionPolicy(retentionPolicy).setVersion("1.0") when: diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileTestHelper.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileTestHelper.groovy index aab47becdb00..ac45af6cbf53 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileTestHelper.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileTestHelper.groovy @@ -42,7 +42,7 @@ class FileTestHelper { return actual == null } else { return Objects.equals(expected.isEnabled(), actual.isEnabled()) && - Objects.equals(expected.isIncludeAPIs(), actual.isIncludeAPIs()) && + Objects.equals(expected.isIncludeApis(), actual.isIncludeApis()) && Objects.equals(expected.getVersion(), actual.getVersion()) && assertRetentionPoliciesAreEqual(expected.getRetentionPolicy(), actual.getRetentionPolicy()) } diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy index bc9f54db8ad0..23e73b388b61 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy @@ -380,7 +380,7 @@ class ShareAPITests extends APISpec { fileName | maxSize | httpHeaders | metadata | errMsg "testfile:" | 1024 | null | testMetadata | FileErrorCode.INVALID_RESOURCE_NAME "fileName" | -1 | null | testMetadata | FileErrorCode.OUT_OF_RANGE_INPUT - "fileName" | 1024 | new FileHttpHeaders().setContentMD5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE + "fileName" | 1024 | new FileHttpHeaders().setContentMd5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE "fileName" | 1024 | null | Collections.singletonMap("", "value") | FileErrorCode.EMPTY_METADATA_KEY } diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy index 90e987c814d6..2b9329761922 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy @@ -390,7 +390,7 @@ class ShareAsyncAPITests extends APISpec { fileName | maxSize | httpHeaders | metadata | errMsg "testfile:" | 1024 | null | testMetadata | FileErrorCode.INVALID_RESOURCE_NAME "fileName" | -1 | null | testMetadata | FileErrorCode.OUT_OF_RANGE_INPUT - "fileName" | 1024 | new FileHttpHeaders().setContentMD5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE + "fileName" | 1024 | new FileHttpHeaders().setContentMd5(new byte[0]) | testMetadata | FileErrorCode.INVALID_HEADER_VALUE "fileName" | 1024 | null | Collections.singletonMap("", "value") | FileErrorCode.EMPTY_METADATA_KEY } diff --git a/sdk/storage/azure-storage-file/swagger/README.md b/sdk/storage/azure-storage-file/swagger/README.md index a958a7151479..d4dc7c54bbb3 100644 --- a/sdk/storage/azure-storage-file/swagger/README.md +++ b/sdk/storage/azure-storage-file/swagger/README.md @@ -463,6 +463,7 @@ directive: const path = $.ShareItem.properties.Metadata.$ref; $.ShareProperties.properties.Metadata = { "$ref": path }; } + $.ShareProperties.properties.Etag["x-ms-client-name"] = "eTag"; ``` ### ShareUsageBytes @@ -547,6 +548,9 @@ directive: $.FileMetrics = $.Metrics; delete $.Metrics; $.FileMetrics.xml = {"name": "Metrics"}; + $.FileMetrics.properties.IncludeApis = $.FileMetrics.properties.IncludeAPIs; + delete $.FileMetrics.properties.IncludeAPIs; + $.FileMetrics.properties.IncludeApis.xml = {"name": "IncludeAPIs"}; $.FileServiceProperties.properties.HourMetrics["$ref"] = "#/definitions/FileMetrics"; $.FileServiceProperties.properties.MinuteMetrics["$ref"] = "#/definitions/FileMetrics"; } @@ -644,7 +648,7 @@ directive: $.FileContentLanguage["x-ms-parameter-grouping"].name = "file-http-headers"; $.FileContentLanguage["x-ms-client-name"] = "contentLanguage"; $.FileContentMD5["x-ms-parameter-grouping"].name = "file-http-headers"; - $.FileContentMD5["x-ms-client-name"] = "contentMD5"; + $.FileContentMD5["x-ms-client-name"] = "contentMd5"; $.FileContentType["x-ms-parameter-grouping"].name = "file-http-headers"; $.FileContentType["x-ms-client-name"] = "contentType"; ``` diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java index 43d286e1c318..48c69937a9bf 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java @@ -74,7 +74,11 @@ public AzureQueueStorageImpl build() { if (this.url != null) { client.setUrl(this.url); } - client.setVersion(this.version); + if (this.version != null) { + client.setVersion(this.version); + } else { + client.setVersion("2018-03-28"); + } return client; } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueMetrics.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueMetrics.java index d031d05b2c52..889b6a37b3b6 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueMetrics.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueMetrics.java @@ -26,19 +26,19 @@ public final class QueueMetrics { @JsonProperty(value = "Enabled", required = true) private boolean enabled; - /* - * Indicates whether metrics should generate summary statistics for called - * API operations. - */ - @JsonProperty(value = "IncludeAPIs") - private Boolean includeAPIs; - /* * The retentionPolicy property. */ @JsonProperty(value = "RetentionPolicy") private QueueRetentionPolicy retentionPolicy; + /* + * Indicates whether metrics should generate summary statistics for called + * API operations. + */ + @JsonProperty(value = "IncludeAPIs") + private Boolean includeApis; + /** * Get the version property: The version of Storage Analytics to configure. * @@ -82,44 +82,44 @@ public QueueMetrics setEnabled(boolean enabled) { } /** - * Get the includeAPIs property: Indicates whether metrics should generate - * summary statistics for called API operations. + * Get the retentionPolicy property: The retentionPolicy property. * - * @return the includeAPIs value. + * @return the retentionPolicy value. */ - public Boolean isIncludeAPIs() { - return this.includeAPIs; + public QueueRetentionPolicy getRetentionPolicy() { + return this.retentionPolicy; } /** - * Set the includeAPIs property: Indicates whether metrics should generate - * summary statistics for called API operations. + * Set the retentionPolicy property: The retentionPolicy property. * - * @param includeAPIs the includeAPIs value to set. + * @param retentionPolicy the retentionPolicy value to set. * @return the QueueMetrics object itself. */ - public QueueMetrics setIncludeAPIs(Boolean includeAPIs) { - this.includeAPIs = includeAPIs; + public QueueMetrics setRetentionPolicy(QueueRetentionPolicy retentionPolicy) { + this.retentionPolicy = retentionPolicy; return this; } /** - * Get the retentionPolicy property: The retentionPolicy property. + * Get the includeApis property: Indicates whether metrics should generate + * summary statistics for called API operations. * - * @return the retentionPolicy value. + * @return the includeApis value. */ - public QueueRetentionPolicy getRetentionPolicy() { - return this.retentionPolicy; + public Boolean isIncludeApis() { + return this.includeApis; } /** - * Set the retentionPolicy property: The retentionPolicy property. + * Set the includeApis property: Indicates whether metrics should generate + * summary statistics for called API operations. * - * @param retentionPolicy the retentionPolicy value to set. + * @param includeApis the includeApis value to set. * @return the QueueMetrics object itself. */ - public QueueMetrics setRetentionPolicy(QueueRetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; + public QueueMetrics setIncludeApis(Boolean includeApis) { + this.includeApis = includeApis; return this; } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceProperties.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceProperties.java index 8a22ff5def48..a2a594dfcba8 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceProperties.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceProperties.java @@ -55,22 +55,22 @@ private CorsWrapper(@JacksonXmlProperty(localName = "CorsRule") List Date: Mon, 21 Oct 2019 16:45:09 -0700 Subject: [PATCH 34/64] Update Account SAS token generation to match languages. (#5952) * Update AccountSasSignatureValues to match the others. Add snippets. * Fix uses in test for removed static method --- .../com/azure/storage/blob/SASTest.groovy | 65 +++++++-- .../blob/specialized/HelperTest.groovy | 13 +- ...perTestaccountsassignaturevaluesia[5].json | 65 --------- ...SASTestaccountsassignaturevaluesia[4].json | 65 --------- ...SASTestaccountsassignaturevaluesia[5].json | 65 --------- .../SASTestaccountsassignaturevaluesnull.json | 65 +++++++++ ...countsassignaturevaluesnullpermission.json | 65 +++++++++ .../common/sas/AccountSasSignatureValues.java | 132 ++++++++---------- ...SasSignatureValuesJavaDocCodeSnippets.java | 35 +++++ .../azure/storage/file/FileSASTests.groovy | 8 +- .../azure/storage/queue/QueueSASTests.groovy | 16 ++- 11 files changed, 304 insertions(+), 290 deletions(-) delete mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[5].json delete mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[4].json delete mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[5].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnull.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnullpermission.json create mode 100644 sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/sas/AccountSasSignatureValuesJavaDocCodeSnippets.java diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy index 28524f1d87ff..a0cba57c40f9 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy @@ -12,9 +12,9 @@ import com.azure.storage.blob.specialized.BlobServiceSasSignatureValues import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder import com.azure.storage.common.Utility import com.azure.storage.common.implementation.StorageImplUtils +import com.azure.storage.common.sas.AccountSasPermission import com.azure.storage.common.sas.AccountSasResourceType import com.azure.storage.common.sas.AccountSasService -import com.azure.storage.common.sas.AccountSasPermission import com.azure.storage.common.sas.AccountSasSignatureValues import com.azure.storage.common.sas.SasProtocol import com.azure.storage.common.StorageSharedKeyCredential @@ -541,8 +541,13 @@ class SASTest extends APISpec { def expiryTime = getUTCNow().plusDays(1) when: - def sas = AccountSasSignatureValues.generateAccountSas(primaryCredential, service, resourceType, permissions, expiryTime, null, null, null, null) - + def sas = new AccountSasSignatureValues() + .setServices(service.toString()) + .setResourceTypes(resourceType.toString()) + .setPermissions(permissions) + .setExpiryTime(expiryTime) + .generateSasQueryParameters(primaryCredential) + .encode() def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() def os = new ByteArrayOutputStream() client.download(os) @@ -569,8 +574,13 @@ class SASTest extends APISpec { def expiryTime = getUTCNow().plusDays(1) when: - def sas = AccountSasSignatureValues.generateAccountSas(primaryCredential, service, resourceType, permissions, expiryTime, null, null, null, null) - + def sas = new AccountSasSignatureValues() + .setServices(service.toString()) + .setResourceTypes(resourceType.toString()) + .setPermissions(permissions) + .setExpiryTime(expiryTime) + .generateSasQueryParameters(primaryCredential) + .encode() def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() client.delete() @@ -592,8 +602,13 @@ class SASTest extends APISpec { def expiryTime = getUTCNow().plusDays(1) when: - def sas = AccountSasSignatureValues.generateAccountSas(primaryCredential, service, resourceType, permissions, expiryTime, null, null, null, null) - + def sas = new AccountSasSignatureValues() + .setServices(service.toString()) + .setResourceTypes(resourceType.toString()) + .setPermissions(permissions) + .setExpiryTime(expiryTime) + .generateSasQueryParameters(primaryCredential) + .encode() def sc = getServiceClient(sas, primaryBlobServiceClient.getAccountUrl()) sc.createBlobContainer(generateContainerName()) @@ -615,7 +630,13 @@ class SASTest extends APISpec { def expiryTime = getUTCNow().plusDays(1) when: - def sas = AccountSasSignatureValues.generateAccountSas(primaryCredential, service, resourceType, permissions, expiryTime, null, null, null, null) + def sas = new AccountSasSignatureValues() + .setServices(service.toString()) + .setResourceTypes(resourceType.toString()) + .setPermissions(permissions) + .setExpiryTime(expiryTime) + .generateSasQueryParameters(primaryCredential) + .encode() def sc = getServiceClient(sas, primaryBlobServiceClient.getAccountUrl()) sc.createBlobContainer(generateContainerName()) @@ -949,7 +970,7 @@ class SASTest extends APISpec { def v = new AccountSasSignatureValues() def p = new AccountSasPermission() .setReadPermission(true) - v.setPermissions(p.toString()) + v.setPermissions(p) .setServices("b") .setResourceTypes("o") .setStartTime(startTime) @@ -977,7 +998,7 @@ class SASTest extends APISpec { def "accountSasSignatureValues IA"() { setup: def v = new AccountSasSignatureValues() - .setPermissions(permissions) + .setPermissions(AccountSasPermission.parse(permissions)) .setServices(service) .setResourceTypes(resourceType) .setExpiryTime(expiryTime) @@ -992,14 +1013,34 @@ class SASTest extends APISpec { where: permissions | service | resourceType | expiryTime | version | creds || parameter - null | "b" | "c" | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | "v" | primaryCredential || "permissions" "c" | null | "c" | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | "v" | primaryCredential || "services" "c" | "b" | null | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | "v" | primaryCredential || "resourceTypes" "c" | "b" | "c" | null | "v" | primaryCredential || "expiryTime" - "c" | "b" | "c" | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | primaryCredential || "version" "c" | "b" | "c" | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | "v" | null || "storageSharedKeyCredentials" } + def "accountSasSignatureValues null"() { + when: + setup: + def v = new AccountSasSignatureValues() + + when: + v.setPermissions(null) + + + then: + def e = thrown(NullPointerException) + e.getMessage().contains("permissions") + } + + def "accountSasSignatureValues null permission"() { + when: + AccountSasPermission.parse(null) + + then: + thrown(NullPointerException) + } + @Unroll def "AccountSASPermissions toString"() { setup: diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy index 5f468f21f755..44cf23c6aa5f 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy @@ -441,7 +441,7 @@ class HelperTest extends APISpec { def "accountSasSignatures string to sign"() { when: AccountSasSignatureValues v = new AccountSasSignatureValues() - .setPermissions(new AccountSasPermission().setReadPermission(true).toString()) + .setPermissions(new AccountSasPermission().setReadPermission(true)) .setServices("b") .setResourceTypes("o") .setStartTime(startTime) @@ -469,13 +469,21 @@ class HelperTest extends APISpec { @Unroll def "accountSasSignatureValues IA"() { setup: + AccountSasPermission sasPermission = null + if (permissions != null) { + sasPermission = AccountSasPermission.parse(permissions) + } + AccountSasSignatureValues v = new AccountSasSignatureValues() - .setPermissions(permissions) .setServices(service) .setResourceTypes(resourceType) .setExpiryTime(expiryTime) .setVersion(version) + if (sasPermission != null) { + v.setPermissions(sasPermission) + } + when: v.generateSasQueryParameters(creds) @@ -489,7 +497,6 @@ class HelperTest extends APISpec { "c" | null | "c" | OffsetDateTime.now() | "v" | primaryCredential || "services" "c" | "b" | null | OffsetDateTime.now() | "v" | primaryCredential || "resourceTypes" "c" | "b" | "c" | null | "v" | primaryCredential || "expiryTime" - "c" | "b" | "c" | OffsetDateTime.now() | null | primaryCredential || "version" "c" | "b" | "c" | OffsetDateTime.now() | "v" | null || "storageSharedKeyCredentials" } diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[5].json deleted file mode 100644 index 3eaeb75d275f..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[5].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccountsassignaturevaluesia03135877b0257297644?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "09b886ac-06c1-44c5-989c-a0cf05e0a133" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AEB2B4F3E3", - "Last-Modified" : "Tue, 15 Oct 2019 20:31:46 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "836841ff-801e-004a-5b97-830011000000", - "Date" : "Tue, 15 Oct 2019 20:31:45 GMT", - "x-ms-client-request-id" : "09b886ac-06c1-44c5-989c-a0cf05e0a133" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c58f72c8-3092-47f3-ab81-a695a985919f" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "87147dbe-401e-011c-7497-83ae34000000", - "Body" : "jtcaccountsassignaturevaluesiajtcaccountsassignaturevaluesia03135877b0257297644Tue, 15 Oct 2019 20:31:46 GMT\"0x8D751AEB2B4F3E3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:31:45 GMT", - "x-ms-client-request-id" : "c58f72c8-3092-47f3-ab81-a695a985919f", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccountsassignaturevaluesia03135877b0257297644?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0bc6cb8e-4706-46bb-8cd5-aefe67206028" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "547c4252-601e-0062-1e97-8377ae000000", - "Date" : "Tue, 15 Oct 2019 20:31:45 GMT", - "x-ms-client-request-id" : "0bc6cb8e-4706-46bb-8cd5-aefe67206028" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesia03135877b0257297644" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[4].json deleted file mode 100644 index 70e6c7471b88..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[4].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccountsassignaturevaluesia0318982497b6dc81f54?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f029c00d-1f4d-4527-846d-881bfdc4cf89" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AE272D6167", - "Last-Modified" : "Tue, 15 Oct 2019 20:27:51 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "69fa5e58-c01e-012f-1397-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:27:51 GMT", - "x-ms-client-request-id" : "f029c00d-1f4d-4527-846d-881bfdc4cf89" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "39d77dcb-f188-4f04-bfe9-4ff35dce251d" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "8074b804-501e-002e-1f97-83b0b1000000", - "Body" : "jtcaccountsassignaturevaluesiajtcaccountsassignaturevaluesia0318982497b6dc81f54Tue, 15 Oct 2019 20:27:51 GMT\"0x8D751AE272D6167\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:27:51 GMT", - "x-ms-client-request-id" : "39d77dcb-f188-4f04-bfe9-4ff35dce251d", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccountsassignaturevaluesia0318982497b6dc81f54?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "07bae44d-5223-42bb-b2b6-984851faae27" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "69fa5f0f-c01e-012f-3897-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:27:51 GMT", - "x-ms-client-request-id" : "07bae44d-5223-42bb-b2b6-984851faae27" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesia0318982497b6dc81f54" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[5].json deleted file mode 100644 index de902b8fca09..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[5].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccountsassignaturevaluesia012790d79b464232ed4?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "505f1e4d-fbdc-45b1-a64a-d619904124fb" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AE2756A656", - "Last-Modified" : "Tue, 15 Oct 2019 20:27:52 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "8074b84a-501e-002e-5697-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:27:51 GMT", - "x-ms-client-request-id" : "505f1e4d-fbdc-45b1-a64a-d619904124fb" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "34bf1a59-bb70-4602-8238-cc175a2e4426" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "69fa600b-c01e-012f-2597-83f719000000", - "Body" : "jtcaccountsassignaturevaluesiajtcaccountsassignaturevaluesia012790d79b464232ed4Tue, 15 Oct 2019 20:27:52 GMT\"0x8D751AE2756A656\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:27:52 GMT", - "x-ms-client-request-id" : "34bf1a59-bb70-4602-8238-cc175a2e4426", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccountsassignaturevaluesia012790d79b464232ed4?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "afccbb04-e36f-4097-92b0-00b5bcbb4a66" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "8074b868-501e-002e-7197-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:27:51 GMT", - "x-ms-client-request-id" : "afccbb04-e36f-4097-92b0-00b5bcbb4a66" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesia012790d79b464232ed4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnull.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnull.json new file mode 100644 index 000000000000..e6f326ad3d48 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnull.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccountsassignaturevaluesnull004710e2364ec39556?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "fb6d82db-fc89-4514-894b-18b10122f077" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75444432792E8", + "Last-Modified" : "Sat, 19 Oct 2019 03:27:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2c9fc439-a01e-0056-092d-86d806000000", + "Date" : "Sat, 19 Oct 2019 03:27:25 GMT", + "x-ms-client-request-id" : "fb6d82db-fc89-4514-894b-18b10122f077" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesnull&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "99016b14-6fb5-46be-95d0-47c59f1704f1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "2c9fc488-a01e-0056-442d-86d806000000", + "Body" : "jtcaccountsassignaturevaluesnulljtcaccountsassignaturevaluesnull004710e2364ec39556Sat, 19 Oct 2019 03:27:25 GMT\"0x8D75444432792E8\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Sat, 19 Oct 2019 03:27:25 GMT", + "x-ms-client-request-id" : "99016b14-6fb5-46be-95d0-47c59f1704f1", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccountsassignaturevaluesnull004710e2364ec39556?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "96ecb0de-5530-4b63-a7b4-837947cb3212" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "2c9fc4e3-a01e-0056-0f2d-86d806000000", + "Date" : "Sat, 19 Oct 2019 03:27:25 GMT", + "x-ms-client-request-id" : "96ecb0de-5530-4b63-a7b4-837947cb3212" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsassignaturevaluesnull004710e2364ec39556" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnullpermission.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnullpermission.json new file mode 100644 index 000000000000..458a39e13dbb --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnullpermission.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccountsassignaturevaluesnullpermission083915d0c142c?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "d2b1ff82-e0e4-41e5-b091-7660bac4e7a2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75444686C06F2", + "Last-Modified" : "Sat, 19 Oct 2019 03:28:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d453b11b-401e-0031-352d-866ba1000000", + "Date" : "Sat, 19 Oct 2019 03:28:28 GMT", + "x-ms-client-request-id" : "d2b1ff82-e0e4-41e5-b091-7660bac4e7a2" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesnullpermission&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "901c4f42-65cf-4f23-b459-967d2a2af06b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d453b16b-401e-0031-7d2d-866ba1000000", + "Body" : "jtcaccountsassignaturevaluesnullpermissionjtcaccountsassignaturevaluesnullpermission083915d0c142cSat, 19 Oct 2019 03:28:28 GMT\"0x8D75444686C06F2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Sat, 19 Oct 2019 03:28:28 GMT", + "x-ms-client-request-id" : "901c4f42-65cf-4f23-b459-967d2a2af06b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcaccountsassignaturevaluesnullpermission083915d0c142c?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f80fa3ad-6b9f-4485-8c3c-8d7770fc4325" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d453b1a1-401e-0031-2c2d-866ba1000000", + "Date" : "Sat, 19 Oct 2019 03:28:28 GMT", + "x-ms-client-request-id" : "f80fa3ad-6b9f-4485-8c3c-8d7770fc4325" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsassignaturevaluesnullpermission083915d0c142c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java index 58efbbe213ac..6cdf547eb580 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java @@ -3,35 +3,30 @@ package com.azure.storage.common.sas; +import com.azure.core.implementation.util.ImplUtils; import com.azure.storage.common.StorageSharedKeyCredential; - import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; + import java.time.OffsetDateTime; /** - * AccountSasSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once all - * the values here are set appropriately, call generateSASQueryParameters to obtain a representation of the SAS which - * can actually be applied to blob urls. Note: that both this class and {@link AccountSasQueryParameters} exist because - * the former is mutable and a logical representation while the latter is immutable and used to generate actual REST - * requests. - *

    - * Please see - * here - * for more conceptual information on SAS: - *

    - *

    - * Please see - * here for further - * descriptions of the parameters, including which are required: + * Used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once all the values are set, call + * {@link + * #generateSasQueryParameters(StorageSharedKeyCredential) generateSASQueryParameters(StorageSharedKeyCredential)} to + * obtain a representation of the SAS which can actually be applied to container, file, queue, and tables. + * + *

    Generating an account SAS

    + *

    The snippet below generates an account SAS that lasts for two days and gives the user read and list access to + * blob containers and file shares.

    * - *

    Please see - * here - * for additional samples.

    + * {@codesnippet com.azure.storage.common.sas.accountSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential} + * + * @see Create an account SAS + * @see Storage SAS overview */ public final class AccountSasSignatureValues { - - private String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; + private String version; private SasProtocol protocol; @@ -48,55 +43,14 @@ public final class AccountSasSignatureValues { private String resourceTypes; /** - * Initializes an {@code AccountSasSignatureValues} object with the version number set to the default and all other - * values empty. + * Initializes a new {@link AccountSasSignatureValues} object. */ public AccountSasSignatureValues() { } /** - * Shared method between service clients to generate an account SAS. * - * @param storageSharedKeyCredential The {@code SharedKeyCredential} shared key credential for the account SAS - * @param accountSasService The {@code AccountSasService} services for the account SAS - * @param accountSasResourceType An optional {@code AccountSasResourceType} resources for the account SAS - * @param accountSasPermission The {@code AccountSasPermission} permission for the account SAS - * @param expiryTime The {@code OffsetDateTime} expiry time for the account SAS - * @param startTime The {@code OffsetDateTime} start time for the account SAS - * @param version The {@code String} version for the account SAS - * @param sasIpRange An optional {@code SasIpRange} ip address range for the SAS - * @param sasProtocol An optional {@code SasProtocol} protocol for the SAS - * @return A string that represents the SAS token - * @throws NullPointerException If any of {@code sharedKeyCredentials}, {@code services}, {@code resourceTypes}, - * {@code expiryTime}, {@code permissions} or {@code versions} is null - */ - public static String generateAccountSas(StorageSharedKeyCredential storageSharedKeyCredential, - AccountSasService accountSasService, AccountSasResourceType accountSasResourceType, - AccountSasPermission accountSasPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, - String version, SasIpRange sasIpRange, SasProtocol sasProtocol) { - - AccountSasSignatureValues values = new AccountSasSignatureValues(); - - values.setServices(accountSasService == null ? null : accountSasService.toString()); - values.setResourceTypes(accountSasResourceType == null ? null : accountSasResourceType.toString()); - values.setPermissions(accountSasPermission == null ? null : accountSasPermission.toString()); - values.setExpiryTime(expiryTime); - values.setStartTime(startTime); - - if (version != null) { - values.setVersion(version); - } - - values.setSasIpRange(sasIpRange); - values.setProtocol(sasProtocol); - - AccountSasQueryParameters sasQueryParameters = values.generateSasQueryParameters(storageSharedKeyCredential); - - return sasQueryParameters.encode(); - } - - /** - * @return the service version that is targeted, if {@code null} or empty the service version targeted by the + * @return the service version that is targeted, if {@code null} or empty the latest service version targeted by the * library will be used. */ public String getVersion() { @@ -170,7 +124,9 @@ public AccountSasSignatureValues setExpiryTime(OffsetDateTime expiryTime) { } /** - * @return the operations the SAS user may perform. Please refer to {@link AccountSasPermission} to help determine + * Gets the operations the SAS user may perform. + * + * @return The operations the SAS user may perform. Please refer to {@link AccountSasPermission} to help determine * which permissions are allowed. */ public String getPermissions() { @@ -178,14 +134,16 @@ public String getPermissions() { } /** - * Sets the operations the SAS user may perform. Please refer to {@link AccountSasPermission} for help constructing - * the permissions string. + * Sets the operations the account SAS user may perform. Please refer to {@link AccountSasPermission} for help + * constructing the permissions string. * - * @param permissions Permissions string to set + * @param permissions Permissions to set. * @return the updated AccountSasSignatureValues object. + * @throws NullPointerException if {@code permissions} is null. */ - public AccountSasSignatureValues setPermissions(String permissions) { - this.permissions = permissions; + public AccountSasSignatureValues setPermissions(AccountSasPermission permissions) { + StorageImplUtils.assertNotNull("permissions", permissions); + this.permissions = permissions.toString(); return this; } @@ -247,16 +205,33 @@ public AccountSasSignatureValues setResourceTypes(String resourceTypes) { } /** - * Generates a {@link AccountSasQueryParameters} object which contains all SAS query parameters needed to make an - * actual REST request. + * Generates a {@link AccountSasQueryParameters} object which contains all SAS query parameters for authenticating + * requests. + * + *

    Notes on SAS generation

    + *

    + *

      + *
    • If {@link #setVersion(String) version} is not set, the latest service version is used.
    • + *
    • The following parameters are required to generate a SAS: + *
        + *
      • {@link #setExpiryTime(OffsetDateTime) expiryTime}
      • + *
      • {@link #setServices(String) services}
      • + *
      • {@link #setPermissions(AccountSasPermission) permissions}
      • + *
      • {@link #setResourceTypes(String) resourceTypes}
      • + *
      + *
    • + *
    + * + *

    For samples, see class level JavaDocs.

    + * + * @see Create an account SAS + * + * @param storageSharedKeyCredentials Credentials for the storage account. + * @return A new {@link AccountSasQueryParameters} used for authenticating requests. * - * @param storageSharedKeyCredentials Credentials for the storage account and corresponding - * primary or secondary key. - * @return {@link AccountSasQueryParameters} * @throws RuntimeException If the HMAC-SHA256 signature for {@code storageSharedKeyCredentials} fails to generate. * @throws NullPointerException If any of {@code storageSharedKeyCredentials}, {@code services}, - * {@code resourceTypes}, - * {@code expiryTime}, {@code permissions} or {@code versions} is null + * {@code resourceTypes}, {@code expiryTime}, or {@code permissions} is null. */ public AccountSasQueryParameters generateSasQueryParameters( StorageSharedKeyCredential storageSharedKeyCredentials) { @@ -265,7 +240,10 @@ public AccountSasQueryParameters generateSasQueryParameters( StorageImplUtils.assertNotNull("resourceTypes", this.resourceTypes); StorageImplUtils.assertNotNull("expiryTime", this.expiryTime); StorageImplUtils.assertNotNull("permissions", this.permissions); - StorageImplUtils.assertNotNull("version", this.version); + + if (ImplUtils.isNullOrEmpty(version)) { + version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; + } // Signature is generated on the un-url-encoded values. String signature = storageSharedKeyCredentials.computeHmac256(stringToSign(storageSharedKeyCredentials)); diff --git a/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/sas/AccountSasSignatureValuesJavaDocCodeSnippets.java b/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/sas/AccountSasSignatureValuesJavaDocCodeSnippets.java new file mode 100644 index 000000000000..af33baca1953 --- /dev/null +++ b/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/sas/AccountSasSignatureValuesJavaDocCodeSnippets.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.sas; + +import com.azure.storage.common.StorageSharedKeyCredential; + +import java.time.Duration; +import java.time.OffsetDateTime; + +/** + * Code snippets for {@link AccountSasSignatureValues}. + */ +public class AccountSasSignatureValuesJavaDocCodeSnippets { + public void generateSas() { + // BEGIN: com.azure.storage.common.sas.accountSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential + StorageSharedKeyCredential credential = new StorageSharedKeyCredential("my-account", "my-key"); + + AccountSasPermission permissions = new AccountSasPermission() + .setListPermission(true) + .setReadPermission(true); + String resourceTypes = new AccountSasResourceType().setContainer(true).toString(); + String services = new AccountSasService().setBlobAccess(true).setFileAccess(true).toString(); + + // Creates an account SAS that can read and list from blob containers and file shares. + // The following are required: permissions, resourceTypes, services, and expiry date. + AccountSasQueryParameters sasQueryParameters = new AccountSasSignatureValues() + .setPermissions(permissions) + .setResourceTypes(resourceTypes) + .setServices(services) + .setExpiryTime(OffsetDateTime.now().plus(Duration.ofDays(2))) + .generateSasQueryParameters(credential); + // END: com.azure.storage.common.sas.accountSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential + } +} diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy index 92e26f08232e..96c7d362ad21 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy @@ -322,7 +322,13 @@ class FileSASTests extends APISpec { when: def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) - def sas = AccountSasSignatureValues.generateAccountSas(credential, service, resourceType, permissions, expiryTime, null, null, null, null) + def sas = new AccountSasSignatureValues() + .setServices(service.toString()) + .setResourceTypes(resourceType.toString()) + .setPermissions(permissions) + .setExpiryTime(expiryTime) + .generateSasQueryParameters(credential) + .encode() then: sas != null diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy index ebe77196b8b4..c4fbc797f25e 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy @@ -252,7 +252,13 @@ class QueueSASTests extends APISpec { when: def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) - def sas = AccountSasSignatureValues.generateAccountSas(credential, service, resourceType, permissions, expiryTime, null, null, null, null) + def sas = new AccountSasSignatureValues() + .setServices(service.toString()) + .setResourceTypes(resourceType.toString()) + .setPermissions(permissions) + .setExpiryTime(expiryTime) + .generateSasQueryParameters(credential) + .encode() def scBuilder = queueServiceBuilderHelper(interceptorManager) scBuilder.endpoint(primaryQueueServiceClient.getQueueServiceUrl()) @@ -284,7 +290,13 @@ class QueueSASTests extends APISpec { when: def credential = StorageSharedKeyCredential.fromConnectionString(connectionString) - def sas = AccountSasSignatureValues.generateAccountSas(credential, service, resourceType, permissions, expiryTime, null, null, null, null) + def sas = new AccountSasSignatureValues() + .setServices(service.toString()) + .setResourceTypes(resourceType.toString()) + .setPermissions(permissions) + .setExpiryTime(expiryTime) + .generateSasQueryParameters(credential) + .encode() def scBuilder = queueServiceBuilderHelper(interceptorManager) scBuilder.endpoint(primaryQueueServiceClient.getQueueServiceUrl()) From b0190036ebd9a12d5e10bf61cd95459ed6d06ac4 Mon Sep 17 00:00:00 2001 From: James Suplizio Date: Mon, 21 Oct 2019 16:57:20 -0700 Subject: [PATCH 35/64] Versions in java files (#5958) * Add the ability to update java files to the version script * Merge with the artifact updates submission. Update Contributing.md * Added links to the two version files * Minor space update to CONTRIBUTING.md * Update for changed cosmos artifact versions * Update contributing for feedback * Update Cosmos version to 3.4.0 * update released version of cosmos to 3.3.1 --- CONTRIBUTING.md | 58 ++++++++++++++----- eng/spotbugs-aggregate-report/pom.xml | 2 +- eng/versioning/update_versions.py | 17 ++++++ eng/versioning/version_client_java_files.txt | 16 +++++ eng/versioning/version_data.txt | 12 ++-- eng/versioning/version_data_java_files.txt | 8 +++ .../appconfiguration/AzureConfiguration.java | 2 + .../README.md | 2 +- .../amqp/implementation/ClientConstants.java | 2 + sdk/cosmos/README.md | 2 +- .../microsoft-azure-cosmos-benchmark/pom.xml | 6 +- .../microsoft-azure-cosmos-examples/pom.xml | 6 +- sdk/cosmos/microsoft-azure-cosmos/pom.xml | 4 +- .../data/cosmos/internal/HttpConstants.java | 4 +- sdk/cosmos/pom.xml | 4 +- .../microsoft-azure-eventgrid/README.md | 2 +- .../azure/eventhubs/impl/ClientConstants.java | 4 +- sdk/keyvault/README.md | 2 +- .../AzureKeyVaultConfiguration.java | 4 +- .../AzureKeyVaultConfiguration.java | 4 +- .../secrets/AzureKeyVaultConfiguration.java | 4 +- .../microsoft-azure-loganalytics/README.md | 2 +- .../azure-storage-blob-cryptography/pom.xml | 4 +- .../BlobCryptographyConfiguration.java | 2 + .../implementation/util/BuilderHelper.java | 2 + .../com/azure/storage/file/BuilderHelper.java | 2 + .../azure/storage/file/FileConfiguration.java | 2 + .../azure/storage/queue/BuilderHelper.java | 2 + .../storage/queue/QueueConfiguration.java | 2 + .../microsoft-azure-storage-blob/README.md | 2 +- .../azure/storage/blob/Constants.java | 4 +- 31 files changed, 143 insertions(+), 46 deletions(-) create mode 100644 eng/versioning/version_client_java_files.txt create mode 100644 eng/versioning/version_data_java_files.txt diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2e97f0850be5..a24d4f359cda 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -79,42 +79,41 @@ mvn -f sdk/{projectForlderDir}/pom.xml -Dgpg.skip clean install ## Versions and versioning -Tooling has been introduced to centralize versioning and help ease the pain of updating artifact versions in POM and README files. Under the eng\versioning directory there version text files, one for client (version_client.txt) and one for data (version_data.txt). The format of the version files is as follows: -groupId:artifactId;dependency-version;current-version -The dependency-version should be set to the most recent released version and the current-version is set to the next version to be released. +Tooling has been introduced to centralize versioning and help ease the pain of updating artifact versions in POM and README files. Under the eng\versioning directory there exists version text files, one for client ([version_client.txt](./eng/versioning/version_client.txt)) and one for data ([version_data.txt](./eng/versioning/version_data.txt)). The format of the version files is as follows: -For example: +`groupId:artifactId;dependency-version;current-version` + +The dependency-version should be set to the most recent released version and the current-version is set to the next version to be released. For example: `com.azure:azure-identity;1.0.0-preview.4;1.0.0-preview.5` Note: In the case of a new or unreleased artifact both versions will be the same. -For more information - ### Libraries vs External Dependencies -Libraries refer to things that are built and released as part of the Azure SDK. Libraries have a current version and a dependency version. +Libraries refer to things that are built and released as part of the Azure SDK. Libraries have a current version and a dependency version. External Dependencies refer to dependencies for things that are not built and released as part of the Azure SDK regardless of the source. External Dependencies will only ever have one version. -### Current version vs Depdendency version +### Current version vs Dependency version Current version - This is the version we should be using when defining a component in its POM file and also when dependent components are built within the same pipeline. The current version is the version currently in development. -Depdendency version - This is the version we should be using when a given library is a dependency outside of a particular area. This should be the latest released version of the package. +Dependency version - This is the version we should be using when a given library is a dependency outside of a particular area. This should be the latest released version of the package. For example: `com.azure:azure-storage-blob-batch` has dependencies on `com.azure:azure-core`, `com.azure:azure-core-http-netty` and `com.azure:azure-storage-blob`. Because `com.azure:azure-core` and `com.azure:azure-core-http-netty` are both built outside of azure-storage pipeline we should be using the released or *Dependency* versions of these when they're dependencies of another library. Similarly, libraries built as part of the same pipeline, that have interdependencies, should be using the Current version. Since `com.azure:azure-storage-blob-batch` and `com.azure:azure-storage-blob` are both built part of the azure-batch pipeline when `com.azure:azure-storage-blob` is declared as a dependency of `com.azure:azure-storage-blob-batch` it should be the *Current* version. This is going to be especially important after GA when releases aren't going to be the entire Azure SDK every time. If we're releasing a patch for a targeted azure-storage fix then we shouldn't need to build and release azure-core, we should be targeting the released versions and only building/releasing that update to azure-storage. It's worth noting that right now, in the version_client.txt, the dependency/current versions are the same. This will change once we GA, at which point the current version should be ahead of the dependency version. -What about README files? Right now the README files in the repro end up getting into an odd state since things like samples and versions can get updated during the development process. We're in the process of versioning documentation with the releases which means that the docs are snapshot at the time of the release and then versioned and stored. This will allow the README files in the repro to have updated samples and versions that are setup for the next release. +What about README files? Right now the README files in the repo end up getting into an odd state since things like samples and versions can get updated during the development process. We're in the process of versioning documentation with the releases which means that the docs are snapshot at the time of the release and then versioned and stored. This will allow the README files in the repo to have updated samples and versions that are setup for the next release. ### Tooling, version files and marker tags All of the tooling lives under the **eng\versioning** directory. + - version_client.txt - Contains the Client library and versions - version_data.txt - Contains Data library and versions -- update_versions.py - This is just a basic python script that will climb through the source tree and update POM and README files. The script utilizies tags within the files to do replacements and the tags are slightly different between the POM and README files. -- set_versions.py - This script should only be used by the build system when we start producing nightly ops builds. +- update_versions.py - This is just a basic python script that will climb through the source tree and update POM and README files. The script utilizes tags within the files to do replacements and the tags are slightly different between the POM and README files. +- set_versions.py - This script should only be used by the build system when we start producing nightly ops builds. In POM files this is done by inserting a specifically formatted comment on the same line as the version element. @@ -126,7 +125,7 @@ In POM files this is done by inserting a specifically formatted comment on the s The last element of the tag would be current or dependency depending on the criteria previously explained. -In README files this ends up being slightly different. Because the version tag is inside an XML element that we've explicitly telling a user to copy/paste into their product the comment tag really didn't make sense here. Instead there are tags before and after the XML element tags which effectively says "there's a version somewhere in between these two tags, when you find the line that matches replace it with the appropriate version of the group:artifact defined in the tag." +In README files this ends up being slightly different. Because the version tag is inside an XML element that we're explicitly telling a user to copy/paste into their product the comment tag really didn't make sense here. Instead there are tags before and after the XML element tags which effectively says "there's a version somewhere in between these two tags, when you find the line that matches replace it with the appropriate version of the group:artifact defined in the tag." [//]: # ({x-version-update-start;MyGroup:MyArtifact;dependency}) ```xml @@ -142,11 +141,11 @@ What if I've got something that, for whatever reason, shoudln't be updated? Ther In theory, absence of an x-version-update tag would do the same thing but the tooling is still being developed and eventually there will be checkin blockers if xml has a version element with no tag. - ### What does the process look like? Let's say we've GA'd and I need to tick up the version of azure-storage libraries how would I do it? Guidelines for incrementing versions after release can be found [here](https://github.com/Azure/azure-sdk/blob/master/docs/policies/releases.md#incrementing-after-release). -1. I'd open up eng\versioning\version_client.txt and update the current-versions of the libraries that are built and released as part of the azure storage pipeline. This list can be found in pom.service.xml under the sdk/storage directory. It's worth noting that any module entry starting with "../" isn't something that's released as part of the pipeline and once we GA these build dependencies for library components outside of a given area should go away and be replaced with downloading the appropriate dependency from Maven like we do for external dependencies. + +1. I'd open up eng\versioning\version_client.txt and update the current-versions of the libraries that are built and released as part of the azure storage pipeline. This list can be found in pom.service.xml under the sdk/storage directory. It's worth noting that any module entry starting with "../" are external module dependencies and not something that's released as part of the pipeline. Once we GA, these build dependencies for library components outside of a given area should go away and be replaced with downloading the appropriate dependency from Maven like we do for external dependencies. 2. Execute the update_versions python script from the root of the enlistment `python eng/versioning/update_versions.py --ut libary --bt client` This will go through the entire source tree and update all of the references in the POM and README files with the updated versions. Git status will show all of the modified files. @@ -157,3 +156,32 @@ This will go through the entire source tree and update all of the references in - External dependencies. Right now there are only version files for client and data (eng\versioning\version_\[client|data\].txt) which only encompass the built binaries for their respective tracks. External dependencies for both client and data are next on the list which should allow modification of the parent/pom.xml to remove the list of version properties and dependency management sections which brings things one step closer to not having to publish the parent pom. - Management plane. Management is in the process of being moved to service pipeline builds. The versioning work needs to wait until that work is finished. - Service pipeline changes. The service pipelines currently have to build not only the libraries that are part of that pipeline but also the Azure SDK libraries that are dependencies. Once we GA and can start targeting the released version of those packages and pulling them from Maven instead of building them. An good example of this would be in sdk/appconfiguration/pom.service.xml where to build azure-data-appconfiguration we end up building azure-core, azure-core-test and azure-core-http-netty along with azure-data-appconfiguration instead of just building azure-data-appconfiguration. + +### How are versioning and dependencies going to impact development after GA? + +As mentioned above, in the service pipeline changes, the plan after we GA is to start targeting the released version of the packages and pulling them from Maven. This is going to fundamentally change some aspects of the development process especially when work needs to be done on given library that requires dependency changes in one or more libraries. + +- **Scenario 1: Making changes to a single library which is not a dependency of any other libraries:** This ends up being the most straightforward scenario and really isn't much different than it is today. + - [ ] Appropriately increase the version + - [ ] Make the code changes + - [ ] Submit the PR + - [ ] Merge the PR + - [ ] Publish the new version + +- **Scenario 2: Making changes to a library that also requires dependency changes:** Right now things are in a state where dependency changes can be made along with libraries that depend on them because of the project dependencies in the service pom files. Local development isn't going to change that much except when changing the version of a library and its dependency or dependencies means that the service poms are going to have to be built, and installed, in the appropriate order. This is because these new versions of the library dependencies won't yet be released and Maven will need to find these in the local cache. The biggest change to the process is going to be around PRs and publishing. Separate PRs are going to have to be submitted in order, with dependencies being submitted first. This is necessary because the dependencies need to be published in order to allow things that depend on them to continue using the published version. Trying to submit everything in one PR would cause build breaks since the dependency being referenced is a version not yet published. An example of this would be making changes to `com.azure:azure-storage-common` that also required dependency changes to `com.azure:azure-identity`. + Changes are going to have to be made to `com.azure:azure-identity` first. + - [ ] Appropriately increase the version of `com.azure:azure-identity` + - [ ] Make the code changes + - [ ] Build and optionally install locally + This isn't completely necessary other than to install the updated version of the dependency into the local cache on the machine. The alternative to this would be to publish (DevOps or otherwise) and reference that version of the dependency after the release. Either one would allow `com.azure:azure-storage-common` to use the updated version of `com.azure:azure-identity` + - [ ] Submit the PR for the `com.azure:azure-identity` + - [ ] Merge the PR for the `com.azure:azure-identity` + - [ ] Publish the `com.azure:azure-identity` with the updated version. + + Only after the dependency `com.azure:azure-identity` has been published can the PR for `com.azure:azure-storage-common` be created. + - [ ] Appropriately increase the version of `com.azure:azure-storage-common` and the dependency version of `com.azure:azure-identity` in its pom file. + - [ ] Make the code changes, if any + - [ ] Build/Test or whatever + - [ ] Submit the PR for `com.azure:azure-storage-common` + - [ ] Merge the PR for `com.azure:azure-storage-common` + - [ ] Publish the PR for `com.azure:azure-storage-common` diff --git a/eng/spotbugs-aggregate-report/pom.xml b/eng/spotbugs-aggregate-report/pom.xml index 0c7744e3a2c6..6f8c7347cc2b 100644 --- a/eng/spotbugs-aggregate-report/pom.xml +++ b/eng/spotbugs-aggregate-report/pom.xml @@ -316,7 +316,7 @@ com.microsoft.azure azure-servicebus - 3.1.0 + 3.1.1 diff --git a/eng/versioning/update_versions.py b/eng/versioning/update_versions.py index a03083b57776..9367f5190782 100644 --- a/eng/versioning/update_versions.py +++ b/eng/versioning/update_versions.py @@ -126,6 +126,23 @@ def update_versions_all(update_type, build_type, target_file): if file_name == 'README.md' or (file_name.startswith('pom.') and file_name.endswith('.xml')): update_versions(version_map, file_path) + # This is a temporary stop gap to deal with versions hard coded in java files. + # Everything within the begin/end tags below can be deleted once + # https://github.com/Azure/azure-sdk-for-java/issues/3141 has been fixed. + # version_*_java_files.txt + # BEGIN:Versions_in_java_files + if not target_file: + # the good thing here is that the java files only contain library versions, not + # external versions + version_java_file = os.path.normpath('eng/versioning/version_' + build_type.name + '_java_files.txt') + with open(version_java_file) as f: + for raw_line in f: + java_file_to_update = raw_line.strip() + if not java_file_to_update or java_file_to_update.startswith('#'): + continue + update_versions(version_map, java_file_to_update) + # END:Versions_in_java_files + def main(): parser = argparse.ArgumentParser(description='Replace version numbers in poms and READMEs.') parser.add_argument('--update-type', '--ut', type=UpdateType, choices=list(UpdateType)) diff --git a/eng/versioning/version_client_java_files.txt b/eng/versioning/version_client_java_files.txt new file mode 100644 index 000000000000..fdea146b1a1d --- /dev/null +++ b/eng/versioning/version_client_java_files.txt @@ -0,0 +1,16 @@ +# This is necessary because there are java files with a hard coded version in them that need to +# get updated when versions get updated. Once https://github.com/Azure/azure-sdk-for-java/issues/3141 +# has been fixed this file and the update logic in update_versions.py should no longer be necessary. + +# The file format here should be the relative path from the root of the azure-sdk-for-java +sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/AzureConfiguration.java +sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ClientConstants.java +sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/AzureKeyVaultConfiguration.java +sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/AzureKeyVaultConfiguration.java +sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/AzureKeyVaultConfiguration.java +sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java +sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyConfiguration.java +sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java +sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileConfiguration.java +sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java +sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueConfiguration.java diff --git a/eng/versioning/version_data.txt b/eng/versioning/version_data.txt index 276c9bbc9ff6..9549a6dfe6af 100644 --- a/eng/versioning/version_data.txt +++ b/eng/versioning/version_data.txt @@ -14,7 +14,7 @@ com.microsoft.azure.cognitiveservices:azure-cognitiveservices-customimagesearch; com.microsoft.azure.cognitiveservices:azure-cognitiveservices-customsearch;1.1.0-preview.1;1.1.0-preview.1 com.microsoft.azure.cognitiveservices:azure-cognitiveservices-entitysearch;1.1.0-preview.1;1.1.0-preview.1 com.microsoft.azure.cognitiveservices:azure-cognitiveservices-imagesearch;1.1.0-preview.1;1.1.0-preview.1 -com.microsoft.azure.cognitiveservices:azure-cognitiveservices-inkrecognizer;1.1.0-preview.1;1.1.0-preview.1 +com.microsoft.azure.cognitiveservices:azure-cognitiveservices-inkrecognizer;1.0.0-preview.1;1.0.0-preview.1 com.microsoft.azure.cognitiveservices:azure-cognitiveservices-newssearch;1.1.0-preview.1;1.1.0-preview.1 com.microsoft.azure.cognitiveservices:azure-cognitiveservices-videosearch;1.1.0-preview.1;1.1.0-preview.1 com.microsoft.azure.cognitiveservices:azure-cognitiveservices-visualsearch;1.1.0-preview.1;1.1.0-preview.1 @@ -24,17 +24,17 @@ com.microsoft.azure.cognitiveservices:azure-cognitiveservices-contentmoderator;1 com.microsoft.azure.cognitiveservices:azure-cognitiveservices-customvision-prediction;1.1.0-preview.3;1.1.0-preview.3 com.microsoft.azure.cognitiveservices:azure-cognitiveservices-customvision-training;1.1.0-preview.3;1.1.0-preview.3 com.microsoft.azure.cognitiveservices:azure-cognitiveservices-faceapi;1.1.0-preview.1;1.1.0-preview.1 -com.microsoft.azure:azure-cosmos-parent;3.3.0;3.3.0 -com.microsoft.azure:azure-cosmos;3.3.0;3.3.0 -com.microsoft.azure:azure-cosmos-benchmark;3.3.0;3.3.0 -com.microsoft.azure:azure-cosmos-examples;3.3.0;3.3.0 +com.microsoft.azure:azure-cosmos-parent;3.3.1;3.4.0 +com.microsoft.azure:azure-cosmos;3.3.1;3.4.0 +com.microsoft.azure:azure-cosmos-benchmark;3.3.1;3.4.0 +com.microsoft.azure:azure-cosmos-examples;3.3.1;3.4.0 com.microsoft.azure:azure-eventhubs;3.1.0;3.1.0 com.microsoft.azure:azure-eventhubs-eph;3.1.0;3.1.0 com.microsoft.azure:azure-eventhubs-extensions;3.1.0;3.1.0 com.microsoft.azure:azure-keyvault;1.2.3;1.2.3 com.microsoft.azure:azure-keyvault-complete;1.2.3;1.2.3 com.microsoft.azure:azure-keyvault-core;1.2.3;1.2.3 -com.microsoft.azure:azure-keyvault-cryptography;1.2.3;1.2.3 +com.microsoft.azure:azure-keyvault-cryptography;1.2.2;1.2.3 com.microsoft.azure:azure-keyvault-extensions;1.2.3;1.2.3 com.microsoft.azure:azure-keyvault-test;1.2.3;1.2.3 com.microsoft.azure:azure-keyvault-webkey;1.2.3;1.2.3 diff --git a/eng/versioning/version_data_java_files.txt b/eng/versioning/version_data_java_files.txt new file mode 100644 index 000000000000..8860211542ae --- /dev/null +++ b/eng/versioning/version_data_java_files.txt @@ -0,0 +1,8 @@ +# This is necessary because there are java files with a hard coded version in them that need to +# get updated when versions get updated. Once https://github.com/Azure/azure-sdk-for-java/issues/3141 +# has been fixed this file and the update logic in update_versions.py should no longer be necessary. + +# The file format here should be the relative path from the root of the azure-sdk-for-java +sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java +sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/ClientConstants.java +sdk/storage/microsoft-azure-storage-blob/src/main/java/com/microsoft/azure/storage/blob/Constants.java diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/AzureConfiguration.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/AzureConfiguration.java index 1805d21c0461..16937d129d1e 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/AzureConfiguration.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/AzureConfiguration.java @@ -9,5 +9,7 @@ class AzureConfiguration { //TODO: Eventually remove these hardcoded strings with https://github.com/Azure/azure-sdk-for-java/issues/3141 static final String NAME = "application-configuration"; + // {x-version-update-start;com.azure:azure-data-appconfiguration;current} static final String VERSION = "1.0.0-preview.6"; + // {x-version-update-end} } diff --git a/sdk/applicationinsights/microsoft-azure-applicationinsights-query/README.md b/sdk/applicationinsights/microsoft-azure-applicationinsights-query/README.md index 1952542fe91c..e0bf95133784 100644 --- a/sdk/applicationinsights/microsoft-azure-applicationinsights-query/README.md +++ b/sdk/applicationinsights/microsoft-azure-applicationinsights-query/README.md @@ -19,7 +19,7 @@ To get the binaries of the official Microsoft Azure Log Analytics SDK as distrib com.microsoft.azure azure-applicationinsights-query - 1.0.0-Preview-1 + 1.0.0-preview-2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ClientConstants.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ClientConstants.java index b28b9c94d6a0..f08895d1e004 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ClientConstants.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ClientConstants.java @@ -6,7 +6,9 @@ public final class ClientConstants { public static final String NOT_APPLICABLE = "n/a"; public static final String PRODUCT_NAME = "azsdk-java-eventhubs"; + // {x-version-update-start;com.azure:azure-messaging-eventhubs;current} public static final String CURRENT_JAVA_CLIENT_VERSION = "5.0.0-preview.5"; + // {x-version-update-end} public static final String PLATFORM_INFO = getOSInformation(); public static final String FRAMEWORK_INFO = getFrameworkInfo(); diff --git a/sdk/cosmos/README.md b/sdk/cosmos/README.md index 338d2e5d7a68..eb92d12b5ca8 100644 --- a/sdk/cosmos/README.md +++ b/sdk/cosmos/README.md @@ -92,7 +92,7 @@ For example, using maven, you can add the following dependency to your maven pom com.microsoft.azure azure-cosmos - 3.3.0 + 3.3.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml b/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml index 7604f27acb91..4c10b94c262b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml +++ b/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml @@ -8,12 +8,12 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos-parent - 3.3.1 + 3.4.0 com.microsoft.azure azure-cosmos-benchmark - 3.3.1 + 3.4.0 Microsoft Azure SDK for SQL API of Azure Cosmos DB Service - Benchmarking tool This package contains Benchmarking tool for Microsoft Azure SDK for SQL API of Azure Cosmos DB Service https://github.com/Azure/azure-sdk-for-java @@ -33,7 +33,7 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos - 3.3.1 + 3.4.0 diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml b/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml index 11662f8db5bc..4a55aa812f07 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml +++ b/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml @@ -8,12 +8,12 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos-parent - 3.3.1 + 3.4.0 com.microsoft.azure azure-cosmos-examples - 3.3.1 + 3.4.0 Microsoft Azure SDK for SQL API of Azure Cosmos DB Service - Examples This package contains examples for Microsoft Azure SDK for SQL API of Azure Cosmos DB Service https://github.com/Azure/azure-sdk-for-java @@ -89,7 +89,7 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos - 3.3.1 + 3.4.0 diff --git a/sdk/cosmos/microsoft-azure-cosmos/pom.xml b/sdk/cosmos/microsoft-azure-cosmos/pom.xml index abe32ef363c3..2660c5b31a7a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/pom.xml +++ b/sdk/cosmos/microsoft-azure-cosmos/pom.xml @@ -7,12 +7,12 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos-parent - 3.3.1 + 3.4.0 com.microsoft.azure azure-cosmos - 3.3.1 + 3.4.0 Microsoft Azure SDK for SQL API of Azure Cosmos DB Service This Package contains Microsoft Azure Cosmos SDK (with Reactive Extension rx support) for Azure Cosmos DB SQL API jar diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java index 76d0f627c6f8..1463693486b9 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java @@ -252,7 +252,9 @@ public static class Versions { // TODO: FIXME we can use maven plugin for generating a version file // @see // https://stackoverflow.com/questions/2469922/generate-a-version-java-file-in-maven - public static final String SDK_VERSION = "3.3.1"; + // {x-version-update-start;com.microsoft.azure:azure-cosmos;current} + public static final String SDK_VERSION = "3.4.0"; + // {x-version-update-end} public static final String SDK_NAME = "cosmosdb-java-sdk"; } diff --git a/sdk/cosmos/pom.xml b/sdk/cosmos/pom.xml index 25e7233d34c7..fb70af8fa2e9 100644 --- a/sdk/cosmos/pom.xml +++ b/sdk/cosmos/pom.xml @@ -13,7 +13,7 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos-parent - 3.3.1 + 3.4.0 pom Microsoft Azure Cosmos DB SQL API @@ -55,7 +55,7 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos - 3.3.1 + 3.4.0 diff --git a/sdk/eventgrid/microsoft-azure-eventgrid/README.md b/sdk/eventgrid/microsoft-azure-eventgrid/README.md index 69e806723cb2..9ba432bb9a74 100644 --- a/sdk/eventgrid/microsoft-azure-eventgrid/README.md +++ b/sdk/eventgrid/microsoft-azure-eventgrid/README.md @@ -21,7 +21,7 @@ To get the binaries of the official Microsoft Azure Event Grid Java SDK as distr com.microsoft.azure azure-eventgrid - 1.3.0 + 1.4.0-preview.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/ClientConstants.java b/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/ClientConstants.java index 786235553fd8..ac1fc7482658 100644 --- a/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/ClientConstants.java +++ b/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/ClientConstants.java @@ -37,7 +37,9 @@ public final class ClientConstants { public static final String NO_RETRY = "NoRetry"; public static final String DEFAULT_RETRY = "Default"; public static final String PRODUCT_NAME = "MSJavaClient"; - public static final String CURRENT_JAVACLIENT_VERSION = "3.0.0"; + // {x-version-update-start;com.microsoft.azure:azure-eventhubs;current} + public static final String CURRENT_JAVACLIENT_VERSION = "3.1.0"; + // {x-version-update-end} public static final String PLATFORM_INFO = getPlatformInfo(); public static final String FRAMEWORK_INFO = getFrameworkInfo(); public static final String CBS_ADDRESS = "$cbs"; diff --git a/sdk/keyvault/README.md b/sdk/keyvault/README.md index 37050b1555c3..8ea29d3cc878 100644 --- a/sdk/keyvault/README.md +++ b/sdk/keyvault/README.md @@ -84,7 +84,7 @@ To get the binaries of this library as distributed by Microsoft, ready for use w com.microsoft.azure azure-keyvault-complete - 1.2.0 + 1.2.3 pom ``` diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/AzureKeyVaultConfiguration.java b/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/AzureKeyVaultConfiguration.java index 794aac57f3b3..a0062ef54c8d 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/AzureKeyVaultConfiguration.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/AzureKeyVaultConfiguration.java @@ -6,5 +6,7 @@ class AzureKeyVaultConfiguration { //TODO: Eventually remove these hardcoded strings with https://github.com/Azure/azure-sdk-for-java/issues/3141 static final String SDK_NAME = "Azure-Keyvault"; - static final String SDK_VERSION = "4.0.0-preview.6"; + // {x-version-update-start;com.azure:azure-security-keyvault-certificates;current} + static final String SDK_VERSION = "4.0.0-preview.5"; + // {x-version-update-end} } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/AzureKeyVaultConfiguration.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/AzureKeyVaultConfiguration.java index 3a2ba249235d..7333e6dfd291 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/AzureKeyVaultConfiguration.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/AzureKeyVaultConfiguration.java @@ -6,5 +6,7 @@ public final class AzureKeyVaultConfiguration { //TODO: Eventually remove these hardcoded strings with https://github.com/Azure/azure-sdk-for-java/issues/3141 public static final String SDK_NAME = "Azure-Keyvault"; - public static final String SDK_VERSION = "4.0.0-preview.6"; + // {x-version-update-start;com.azure:azure-security-keyvault-keys;current} + public static final String SDK_VERSION = "4.0.0-preview.5"; + // {x-version-update-end} } diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/AzureKeyVaultConfiguration.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/AzureKeyVaultConfiguration.java index 3d4fbbd54ca0..5b5924dc4d4a 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/AzureKeyVaultConfiguration.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/AzureKeyVaultConfiguration.java @@ -6,5 +6,7 @@ class AzureKeyVaultConfiguration { //TODO: Eventually remove these hardcoded strings with https://github.com/Azure/azure-sdk-for-java/issues/3141 static final String SDK_NAME = "Azure-Keyvault"; - static final String SDK_VERSION = "4.0.0-preview.6"; + // {x-version-update-start;com.azure:azure-security-keyvault-secrets;current} + static final String SDK_VERSION = "4.0.0-preview.5"; + // {x-version-update-end} } diff --git a/sdk/loganalytics/microsoft-azure-loganalytics/README.md b/sdk/loganalytics/microsoft-azure-loganalytics/README.md index 00b2b8834ceb..8392bc4d2b53 100644 --- a/sdk/loganalytics/microsoft-azure-loganalytics/README.md +++ b/sdk/loganalytics/microsoft-azure-loganalytics/README.md @@ -20,7 +20,7 @@ To get the binaries of the official Microsoft Azure Log Analytics SDK as distrib com.microsoft.azure azure-loganalytics - 1.0.0-Preview-1 + 1.0.0-preview.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/storage/azure-storage-blob-cryptography/pom.xml b/sdk/storage/azure-storage-blob-cryptography/pom.xml index fee8aa3440b8..6ae56eac1dcc 100644 --- a/sdk/storage/azure-storage-blob-cryptography/pom.xml +++ b/sdk/storage/azure-storage-blob-cryptography/pom.xml @@ -70,13 +70,13 @@ cross platform compatibility within SDKs --> com.microsoft.azure azure-storage - 8.3.0 + 8.4.0 test com.microsoft.azure azure-keyvault-cryptography - 1.0.0 + 1.2.2 test diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyConfiguration.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyConfiguration.java index 219f70962b6d..b72ed4c226b2 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyConfiguration.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyConfiguration.java @@ -4,5 +4,7 @@ class BlobCryptographyConfiguration { static final String NAME = "azure-storage-blob-cryptography"; + // {x-version-update-start;com.azure:azure-storage-blob-cryptography;current} static final String VERSION = "12.0.0-preview.5"; + // {x-version-update-end} } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java index d2ef02b5b2ae..84e8c46baf3e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java @@ -32,7 +32,9 @@ */ public final class BuilderHelper { private static final String DEFAULT_USER_AGENT_NAME = "azure-storage-blob"; + // {x-version-update-start;com.azure:azure-storage-blob;current} private static final String DEFAULT_USER_AGENT_VERSION = "12.0.0-preview.5"; + // {x-version-update-end} /** * Constructs a {@link HttpPipeline} from values passed from a builder. diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java index 3b23cfe8bd36..324503a093a6 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BuilderHelper.java @@ -32,7 +32,9 @@ */ final class BuilderHelper { private static final String DEFAULT_USER_AGENT_NAME = "azure-storage-file"; + // {x-version-update-start;com.azure:azure-storage-file;current} private static final String DEFAULT_USER_AGENT_VERSION = "12.0.0-preview.5"; + // {x-version-update-end} private static final Pattern IP_URL_PATTERN = Pattern .compile("(?:\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|(?:localhost)"); diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileConfiguration.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileConfiguration.java index c03017ebf81b..6011f6535175 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileConfiguration.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileConfiguration.java @@ -9,5 +9,7 @@ class FileConfiguration { //TODO: Eventually remove these hardcoded strings with https://github.com/Azure/azure-sdk-for-java/issues/3141 static final String NAME = "azure-storage-file"; + // {x-version-update-start;com.azure:azure-storage-file;current} static final String VERSION = "12.0.0-preview.5"; + // {x-version-update-end} } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java index 3a0b1147db75..6644596323ce 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/BuilderHelper.java @@ -36,7 +36,9 @@ */ final class BuilderHelper { private static final String DEFAULT_USER_AGENT_NAME = "azure-storage-queue"; + // {x-version-update-start;com.azure:azure-storage-queue;current} private static final String DEFAULT_USER_AGENT_VERSION = "12.0.0-preview.5"; + // {x-version-update-end} private static final Pattern IP_URL_PATTERN = Pattern .compile("(?:\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|(?:localhost)"); diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueConfiguration.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueConfiguration.java index a3bf602b6b15..338283c79301 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueConfiguration.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueConfiguration.java @@ -9,5 +9,7 @@ class QueueConfiguration { //TODO: Eventually remove these hardcoded strings with https://github.com/Azure/azure-sdk-for-java/issues/3141 static final String NAME = "azure-storage-queue"; + // {x-version-update-start;com.azure:azure-storage-queue;current} static final String VERSION = "12.0.0-preview.5"; + // {x-version-update-end} } diff --git a/sdk/storage/microsoft-azure-storage-blob/README.md b/sdk/storage/microsoft-azure-storage-blob/README.md index 0ca916b0419d..90dfe55685e3 100644 --- a/sdk/storage/microsoft-azure-storage-blob/README.md +++ b/sdk/storage/microsoft-azure-storage-blob/README.md @@ -38,7 +38,7 @@ To get the binaries of this library as distributed by Microsoft, ready for use w com.microsoft.azure azure-storage-blob - 11.0.1 + 11.0.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/storage/microsoft-azure-storage-blob/src/main/java/com/microsoft/azure/storage/blob/Constants.java b/sdk/storage/microsoft-azure-storage-blob/src/main/java/com/microsoft/azure/storage/blob/Constants.java index 9b44c8aeb451..8a3e486afd1a 100644 --- a/sdk/storage/microsoft-azure-storage-blob/src/main/java/com/microsoft/azure/storage/blob/Constants.java +++ b/sdk/storage/microsoft-azure-storage-blob/src/main/java/com/microsoft/azure/storage/blob/Constants.java @@ -173,7 +173,9 @@ static final class HeaderConstants { /** * Specifies the value to use for UserAgent header. */ - static final String USER_AGENT_VERSION = "11.0.1"; + // {x-version-update-start;com.microsoft.azure:azure-storage-blob;current} + static final String USER_AGENT_VERSION = "11.0.2"; + // {x-version-update-end} private HeaderConstants() { // Private to prevent construction. From 4182667cc19c18d9b2d954154313b7a118bfa67d Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Mon, 21 Oct 2019 18:27:43 -0700 Subject: [PATCH 36/64] Version update to fix CVE (#5977) --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index d4557be782f7..fad1f49e87c4 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -100,7 +100,7 @@ 2.10.0 - 2.9.9.3 + 2.10.0 1.6.12 1.13 4.0.0-beta3 From 4289ec91bdc67217fdb0926be560d67181825439 Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Mon, 21 Oct 2019 19:13:50 -0700 Subject: [PATCH 37/64] AppPlatform: regenerate package-2019-05-01-preview (#5916) --- appplatform/resource-manager/v2019_05_01_preview/pom.xml | 2 +- .../DeploymentResourceProperties.java | 5 +++-- .../v2019_05_01_preview/DeploymentResourceStatus.java | 9 +++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/appplatform/resource-manager/v2019_05_01_preview/pom.xml b/appplatform/resource-manager/v2019_05_01_preview/pom.xml index 6d091c6304ef..cf4889532688 100644 --- a/appplatform/resource-manager/v2019_05_01_preview/pom.xml +++ b/appplatform/resource-manager/v2019_05_01_preview/pom.xml @@ -15,7 +15,7 @@ ../../../pom.management.xml azure-mgmt-appplatform - 1.0.0-beta + 1.0.0-beta-1 jar Microsoft Azure SDK for AppPlatform Management This package contains Microsoft AppPlatform Management SDK. diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceProperties.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceProperties.java index 1b8a41f69695..b042e3fa267b 100644 --- a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceProperties.java +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceProperties.java @@ -43,7 +43,8 @@ public class DeploymentResourceProperties { /** * Status of the Deployment. Possible values include: 'Unknown', 'Stopped', - * 'Running', 'Failed', 'Processing'. + * 'Running', 'Failed', 'Processing', 'Allocating', 'Upgrading', + * 'Compiling'. */ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private DeploymentResourceStatus status; @@ -125,7 +126,7 @@ public DeploymentResourceProvisioningState provisioningState() { } /** - * Get status of the Deployment. Possible values include: 'Unknown', 'Stopped', 'Running', 'Failed', 'Processing'. + * Get status of the Deployment. Possible values include: 'Unknown', 'Stopped', 'Running', 'Failed', 'Processing', 'Allocating', 'Upgrading', 'Compiling'. * * @return the status value */ diff --git a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceStatus.java b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceStatus.java index 08bf57917183..76836afdffb3 100644 --- a/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceStatus.java +++ b/appplatform/resource-manager/v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/DeploymentResourceStatus.java @@ -31,6 +31,15 @@ public final class DeploymentResourceStatus extends ExpandableStringEnum Date: Mon, 21 Oct 2019 21:54:25 -0700 Subject: [PATCH 38/64] Fix storage live tests and bug in Poller (#5964) * Fix broken copy tests. * Swap delaySubscription with share(), to fix activationOperation being invoked twice. * Fix copy tests to use asynchronous copy. * Fix Abort copy lease. * Fixing copy tests with new test records.. * Fix container tests. --- .../com/azure/core/util/polling/Poller.java | 4 +- .../com/azure/storage/blob/BlobAPITest.groovy | 135 +++++----- .../storage/blob/ContainerAPITest.groovy | 13 +- .../BlobAPITestabortcopylease.json | 222 +++++++++------- .../BlobAPITestabortcopyleasefail.json | 247 +++++++++++------- .../BlobAPITestabortcopymin.json | 200 -------------- .../session-records/BlobAPITestcopy.json | 124 ++++----- .../BlobAPITestcopydestac[0].json | 128 +++++---- .../BlobAPITestcopydestac[1].json | 128 +++++---- .../BlobAPITestcopydestac[2].json | 128 +++++---- .../BlobAPITestcopydestac[3].json | 146 +++++++---- .../BlobAPITestcopydestac[4].json | 128 +++++---- .../BlobAPITestcopydestac[5].json | 147 +++++++---- .../BlobAPITestcopymetadata[0].json | 136 ++++++---- .../BlobAPITestcopymetadata[1].json | 138 ++++++---- .../session-records/BlobAPITestcopymin.json | 112 +++++--- .../BlobAPITestcopypoller.json | 137 ++++------ .../BlobAPITestcopysourceac[0].json | 112 +++++--- .../BlobAPITestcopysourceac[1].json | 112 +++++--- .../BlobAPITestcopysourceac[2].json | 112 +++++--- .../BlobAPITestcopysourceac[3].json | 130 +++++---- .../BlobAPITestcopysourceac[4].json | 112 +++++--- .../BlobAPITestcopysourceacfail[0].json | 78 +++--- .../BlobAPITestcopysourceacfail[1].json | 78 +++--- .../BlobAPITestcopysourceacfail[2].json | 72 ++--- .../BlobAPITestcopysourceacfail[3].json | 96 +++---- .../ContainerAPITestlistblobshierarchy.json | 72 ++--- ...ContainerAPITestlistblobshierarchymin.json | 56 ++-- .../ContainerAPITestlistblobshierdelim.json | 168 ++++++------ .../ContainerAPITestlistblobshiererror.json | 56 ++-- .../ContainerAPITestlistblobshiermarker.json | 244 ++++++++--------- ...tainerAPITestlistblobshieroptionscopy.json | 160 ++++++------ ...nerAPITestlistblobshieroptionsdeleted.json | 104 ++++---- ...nerAPITestlistblobshieroptionsfail[0].json | 42 +-- ...nerAPITestlistblobshieroptionsfail[1].json | 42 +-- ...APITestlistblobshieroptionsmaxresults.json | 160 ++++++------ ...erAPITestlistblobshieroptionsmetadata.json | 160 ++++++------ ...inerAPITestlistblobshieroptionsprefix.json | 160 ++++++------ .../ContainerAPITestlistblockblobsflat.json | 72 ++--- .../ContainerAPITestlistpageblobsflat.json | 100 +++---- 40 files changed, 2578 insertions(+), 2193 deletions(-) delete mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestabortcopymin.json diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/Poller.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/Poller.java index 2571741cc421..a5267789be9c 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/Poller.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/Poller.java @@ -193,8 +193,8 @@ public Poller(Duration pollInterval, Function, Mono isComplete()) - .share() - .delaySubscription(onActivation); + .delaySubscription(onActivation) + .share(); // auto polling start here this.fluxDisposable = fluxHandle.subscribe(); diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy index 4f7ba86820ce..c92a97d26322 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy @@ -5,6 +5,7 @@ package com.azure.storage.blob import com.azure.core.http.RequestConditions import com.azure.core.implementation.util.ImplUtils +import com.azure.core.util.polling.PollResponse import com.azure.storage.blob.models.AccessTier import com.azure.storage.blob.models.ArchiveStatus import com.azure.storage.blob.models.BlobRequestConditions @@ -32,6 +33,7 @@ import spock.lang.Unroll import java.nio.ByteBuffer import java.nio.file.FileAlreadyExistsException import java.security.MessageDigest +import java.time.Duration import java.time.OffsetDateTime class BlobAPITest extends APISpec { @@ -708,33 +710,48 @@ class BlobAPITest extends APISpec { def "Copy"() { setup: def copyDestBlob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() - def headers = - copyDestBlob.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null).getHeaders() + def poller = copyDestBlob.beginCopy(bc.getBlobUrl(), Duration.ofSeconds(1)) when: - while (copyDestBlob.getProperties().getCopyStatus() == CopyStatusType.PENDING) { - sleepIfRecord(1000) - } + poller.block() def properties = copyDestBlob.getProperties() + def response = poller.getLastPollResponse() then: properties.getCopyStatus() == CopyStatusType.SUCCESS properties.getCopyCompletionTime() != null properties.getCopyProgress() != null properties.getCopySource() != null - validateBasicHeaders(headers) - headers.getValue("x-ms-copy-id") != null + + response != null + response.getStatus() == PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED + + def blobInfo = response.getValue() + blobInfo != null + blobInfo.getCopyId() == properties.getCopyId() } def "Copy min"() { - expect: - bc.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null).getStatusCode() == 202 + setup: + def copyDestBlob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() + + when: + def poller = copyDestBlob.beginCopy(bc.getBlobUrl(), Duration.ofSeconds(1)) + def verifier = StepVerifier.create(poller.getObserver().take(1)) + + then: + verifier.assertNext({ + assert it.getValue() != null + assert it.getValue().getCopyId() != null + assert it.getValue().getCopySourceUrl() == bc.getBlobUrl() + assert it.getStatus() == PollResponse.OperationStatus.IN_PROGRESS || it.getStatus() == PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED + }).verifyComplete() } def "Copy poller"() { setup: def copyDestBlob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() - def poller = copyDestBlob.beginCopy(bc.getBlobUrl(), null, null, null, null, null, null); + def poller = copyDestBlob.beginCopy(bc.getBlobUrl(), null, null, null, null, null, null) when: def verifier = StepVerifier.create(poller.getObserver()) @@ -773,20 +790,11 @@ class BlobAPITest extends APISpec { metadata.put(key2, value2) } - def status = bu2.copyFromURLWithResponse(bc.getBlobUrl(), metadata, null, null, null, null, null) - .getHeaders().getValue("x-ms-copy-status") - - def start = OffsetDateTime.now() - while (status != CopyStatusType.SUCCESS.toString()) { - sleepIfRecord(1000) - status = bu2.getPropertiesWithResponse(null, null, null).getHeaders().getValue("x-ms-copy-status") - def currentTime = OffsetDateTime.now() - if (status == CopyStatusType.FAILED.toString() || currentTime.minusMinutes(1) == start) { - throw new Exception("Copy failed or took too long") - } - } + when: + def poller = bu2.beginCopy(bc.getBlobUrl(), metadata, null, null, null, null, Duration.ofSeconds(1)) + poller.block() - expect: + then: bu2.getProperties().getMetadata() == metadata where: @@ -806,8 +814,13 @@ class BlobAPITest extends APISpec { .setIfMatch(match) .setIfNoneMatch(noneMatch) - expect: - copyDestBlob.copyFromURLWithResponse(bc.getBlobUrl(), null, null, mac, null, null, null).getStatusCode() == 202 + when: + def poller = copyDestBlob.beginCopy(bc.getBlobUrl(), null, null, null, mac, null, null) + poller.block() + + then: + def response = poller.getLastPollResponse() + response.getStatus() == PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED where: modified | unmodified | match | noneMatch @@ -857,9 +870,13 @@ class BlobAPITest extends APISpec { .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + when: + def poller = bu2.beginCopy(bc.getBlobUrl(), null, null, null, null, bac, Duration.ofSeconds(1)) + poller.block() - expect: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null).getStatusCode() == 202 + then: + def response = poller.getLastPollResponse() + response.getStatus() == PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED where: modified | unmodified | match | noneMatch | leaseID @@ -914,12 +931,18 @@ class BlobAPITest extends APISpec { cu2.create() def bu2 = cu2.getBlobClient(generateBlobName()).getBlockBlobClient() bu2.upload(defaultInputStream.get(), defaultDataSize) - def leaseID = setupBlobLeaseCondition(bu2, receivedLeaseID) + + def leaseId = setupBlobLeaseCondition(bu2, receivedLeaseID) + def blobAccessConditions = new BlobRequestConditions().setLeaseId(leaseId) when: - def copyID = bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, - new BlobRequestConditions().setLeaseId(leaseID), null, null).getValue() - bu2.abortCopyFromURLWithResponse(copyID, garbageLeaseID, null, null) + def poller = bu2.beginCopy(bc.getBlobUrl(), null, null, null, null, blobAccessConditions, Duration.ofMillis(500)) + def response = poller.getObserver().blockFirst() + + assert response.getStatus() != PollResponse.OperationStatus.FAILED + + def blobCopyInfo = response.getValue() + bu2.abortCopyFromURLWithResponse(blobCopyInfo.getCopyId(), garbageLeaseID, null, null) then: def e = thrown(BlobStorageException) @@ -932,7 +955,8 @@ class BlobAPITest extends APISpec { def "Abort copy"() { setup: // Data has to be large enough and copied between accounts to give us enough time to abort - new SpecializedBlobClientBuilder().blobClient(bc) + new SpecializedBlobClientBuilder() + .blobClient(bc) .buildBlockBlobClient() .upload(new ByteArrayInputStream(getRandomByteArray(8 * 1024 * 1024)), 8 * 1024 * 1024) // So we don't have to create a SAS. @@ -943,8 +967,13 @@ class BlobAPITest extends APISpec { def bu2 = cu2.getBlobClient(generateBlobName()) when: - def copyID = bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null).getValue() - def response = bu2.abortCopyFromURLWithResponse(copyID, null, null, null) + def poller = bu2.beginCopy(bc.getBlobUrl(), null, null, null, null, null, Duration.ofSeconds(1)) + def lastResponse = poller.getObserver().blockFirst() + + assert lastResponse != null + assert lastResponse.getValue() != null + + def response = bu2.abortCopyFromURLWithResponse(lastResponse.getValue().getCopyId(), null, null, null) def headers = response.getHeaders() then: @@ -952,30 +981,12 @@ class BlobAPITest extends APISpec { headers.getValue("x-ms-request-id") != null headers.getValue("x-ms-version") != null headers.getValue("Date") != null + + cleanup: // Normal test cleanup will not clean up containers in the alternate account. cu2.deleteWithResponse(null, null, null).getStatusCode() == 202 } - def "Abort copy min"() { - setup: - // Data has to be large enough and copied between accounts to give us enough time to abort - new SpecializedBlobClientBuilder().blobClient(bc) - .buildBlockBlobClient() - .upload(new ByteArrayInputStream(getRandomByteArray(8 * 1024 * 1024)), 8 * 1024 * 1024) - // So we don't have to create a SAS. - cc.setAccessPolicy(PublicAccessType.BLOB, null) - - def cu2 = alternateBlobServiceClient.getBlobContainerClient(generateBlobName()) - cu2.create() - def bu2 = cu2.getBlobClient(generateBlobName()) - - when: - def copyID = bu2.copyFromURL(bc.getBlobUrl()) - - then: - bu2.abortCopyFromURLWithResponse(copyID, null, null, null).getStatusCode() == 204 - } - def "Abort copy lease"() { setup: // Data has to be large enough and copied between accounts to give us enough time to abort @@ -989,15 +1000,21 @@ class BlobAPITest extends APISpec { cu2.create() def bu2 = cu2.getBlobClient(generateBlobName()).getBlockBlobClient() bu2.upload(defaultInputStream.get(), defaultDataSize) - def leaseID = setupBlobLeaseCondition(bu2, receivedLeaseID) + def leaseId = setupBlobLeaseCondition(bu2, receivedLeaseID) + def blobAccess = new BlobRequestConditions().setLeaseId(leaseId) when: - def copyID = - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, - new BlobRequestConditions().setLeaseId(leaseID), null, null).getValue() + def poller = bu2.beginCopy(bc.getBlobUrl(), null, null, null, null, blobAccess, Duration.ofSeconds(1)) + def lastResponse = poller.getObserver().blockFirst() then: - bu2.abortCopyFromURLWithResponse(copyID, leaseID, null, null).getStatusCode() == 204 + lastResponse != null + lastResponse.getValue() != null + + def copyId = lastResponse.getValue().getCopyId() + bu2.abortCopyFromURLWithResponse(copyId, leaseId, null, null).getStatusCode() == 204 + + cleanup: // Normal test cleanup will not clean up containers in the alternate account. cu2.delete() } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy index b5fe68c69d91..2bacd54e754a 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy @@ -666,17 +666,8 @@ class ContainerAPITest extends APISpec { def copyBlob = cc.getBlobClient(copyName).getPageBlobClient() - copyBlob.beginCopy(normal.getBlobUrl(), Duration.ofSeconds(2)) - def start = OffsetDateTime.now() - def status = CopyStatusType.PENDING - while (status != CopyStatusType.SUCCESS) { - status = copyBlob.getProperties().getCopyStatus() - OffsetDateTime currentTime = OffsetDateTime.now() - if (status == CopyStatusType.FAILED || currentTime.minusMinutes(1) == start) { - throw new Exception("Copy failed or took too long") - } - sleepIfRecord(1000) - } + def poller = copyBlob.beginCopy(normal.getBlobUrl(), Duration.ofSeconds(1)) + poller.block() def metadataBlob = cc.getBlobClient(metadataName).getPageBlobClient() def metadata = new HashMap() diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestabortcopylease.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestabortcopylease.json index 506dc41d20e3..7ac7b22417c0 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestabortcopylease.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestabortcopylease.json @@ -1,195 +1,231 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopylease0blobapitestabortcopylease12575885f2fa06?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopylease0blobapitestabortcopyleasee7c6058356489e?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cb2f0e73-c60b-4bcc-aace-5a3443dfbdce" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "0e4c39f9-e416-4b9e-a065-b5f8d20f9090" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD4A88141E", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:41 GMT", + "ETag" : "0x8D7565273403CF1", + "Last-Modified" : "Mon, 21 Oct 2019 18:14:01 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6f537c3d-801e-0123-3396-8319e8000000", - "Date" : "Tue, 15 Oct 2019 20:21:41 GMT", - "x-ms-client-request-id" : "cb2f0e73-c60b-4bcc-aace-5a3443dfbdce" + "x-ms-request-id" : "089dcce4-101e-000b-4d3b-882802000000", + "Date" : "Mon, 21 Oct 2019 18:14:01 GMT", + "x-ms-client-request-id" : "0e4c39f9-e416-4b9e-a065-b5f8d20f9090" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopylease0blobapitestabortcopylease12575885f2fa06/javablobabortcopylease1blobapitestabortcopylease12530052c3a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopylease0blobapitestabortcopyleasee7c6058356489e/javablobabortcopylease1blobapitestabortcopyleasee7c36022f95", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4068e464-aebb-4d1a-83ba-98f9a81b5dec", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "bf78ae67-7b98-4122-8bb9-e75bc46f334c", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:41 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 18:14:02 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:41 GMT", + "Date" : "Mon, 21 Oct 2019 18:14:02 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD4A8EF96E", + "ETag" : "0x8D75652739F81BE", "Content-Length" : "0", - "x-ms-request-id" : "6f537c4d-801e-0123-4096-8319e8000000", - "x-ms-client-request-id" : "4068e464-aebb-4d1a-83ba-98f9a81b5dec" + "x-ms-request-id" : "089dcdbb-101e-000b-073b-882802000000", + "x-ms-client-request-id" : "bf78ae67-7b98-4122-8bb9-e75bc46f334c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopylease0blobapitestabortcopylease12575885f2fa06/javablobabortcopylease1blobapitestabortcopylease12530052c3a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopylease0blobapitestabortcopyleasee7c6058356489e/javablobabortcopylease1blobapitestabortcopyleasee7c36022f95", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9a2b81d5-20eb-4182-bc6d-f50e2e6050c7", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "e32002ea-cc0e-475d-847a-9b3239e21536", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "ESOtPaOVdtI=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:42 GMT", + "x-ms-content-crc64" : "45XvuUIlkTI=", + "Last-Modified" : "Mon, 21 Oct 2019 18:14:03 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:42 GMT", - "Content-MD5" : "RsMRvgZMax6aLLskrdQ9UA==", - "ETag" : "0x8D751AD4B178508", + "Date" : "Mon, 21 Oct 2019 18:14:03 GMT", + "Content-MD5" : "80woxbDZb3slP/1BDZvfaA==", + "ETag" : "0x8D7565274643A77", "Content-Length" : "0", - "x-ms-request-id" : "6f537c67-801e-0123-5796-8319e8000000", - "x-ms-client-request-id" : "9a2b81d5-20eb-4182-bc6d-f50e2e6050c7" + "x-ms-request-id" : "089dcdfa-101e-000b-423b-882802000000", + "x-ms-client-request-id" : "e32002ea-cc0e-475d-847a-9b3239e21536" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopylease0blobapitestabortcopylease12575885f2fa06?restype=container&comp=acl", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopylease0blobapitestabortcopyleasee7c6058356489e?restype=container&comp=acl", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4f0fd4bb-0565-4641-81d0-9d98de39a484", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "30274beb-7c0e-460b-bc19-83a97a3a6aff", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD4B2D3489", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:42 GMT", + "ETag" : "0x8D75652747BA119", + "Last-Modified" : "Mon, 21 Oct 2019 18:14:03 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6f537db2-801e-0123-7796-8319e8000000", - "Date" : "Tue, 15 Oct 2019 20:21:42 GMT", - "x-ms-client-request-id" : "4f0fd4bb-0565-4641-81d0-9d98de39a484" + "x-ms-request-id" : "089dcf1d-101e-000b-3a3b-882802000000", + "Date" : "Mon, 21 Oct 2019 18:14:03 GMT", + "x-ms-client-request-id" : "30274beb-7c0e-460b-bc19-83a97a3a6aff" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/jtcabortcopylease2blobapitestabortcopylease12583876ec4789?restype=container", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/jtcabortcopylease2blobapitestabortcopyleasee7c93603774d6e?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "66ff2b38-ce70-45d1-b50a-4b3d28298336" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "7fb8ac48-7f64-433f-bb8b-848dc4b4969f" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD4B32FE73", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:42 GMT", + "ETag" : "0x8D7565274A7513D", + "Last-Modified" : "Mon, 21 Oct 2019 18:14:04 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "58867b3c-201e-0032-4296-8397fb000000", - "Date" : "Tue, 15 Oct 2019 20:21:42 GMT", - "x-ms-client-request-id" : "66ff2b38-ce70-45d1-b50a-4b3d28298336" + "x-ms-request-id" : "c624c99d-601e-0058-793b-88cb50000000", + "Date" : "Mon, 21 Oct 2019 18:14:03 GMT", + "x-ms-client-request-id" : "7fb8ac48-7f64-433f-bb8b-848dc4b4969f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/jtcabortcopylease2blobapitestabortcopylease12583876ec4789/javablobabortcopylease3blobapitestabortcopylease12528649c1d", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/jtcabortcopylease2blobapitestabortcopyleasee7c93603774d6e/javablobabortcopylease3blobapitestabortcopyleasee7c81343dc0", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "57d11e0a-1ee8-49c7-91b7-53d77e5d5ab1", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "9bb9526f-270c-4cf6-961c-2a063dc1ce4f", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:42 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 18:14:04 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:42 GMT", + "Date" : "Mon, 21 Oct 2019 18:14:03 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD4B384794", + "ETag" : "0x8D7565274BDFB09", "Content-Length" : "0", - "x-ms-request-id" : "58867b5e-201e-0032-6096-8397fb000000", - "x-ms-client-request-id" : "57d11e0a-1ee8-49c7-91b7-53d77e5d5ab1" + "x-ms-request-id" : "c624ca02-601e-0058-543b-88cb50000000", + "x-ms-client-request-id" : "9bb9526f-270c-4cf6-961c-2a063dc1ce4f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/jtcabortcopylease2blobapitestabortcopylease12583876ec4789/javablobabortcopylease3blobapitestabortcopylease12528649c1d?comp=lease", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/jtcabortcopylease2blobapitestabortcopyleasee7c93603774d6e/javablobabortcopylease3blobapitestabortcopyleasee7c81343dc0?comp=lease", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "305f69aa-0bc0-4acc-a6bf-b593ecf144bd" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "ae164674-81ad-4728-bb4b-62cf7f9c1696" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD4B384794", - "x-ms-lease-id" : "551a46f5-486c-4d1d-af63-ed9d06226407", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:42 GMT", + "ETag" : "0x8D7565274BDFB09", + "x-ms-lease-id" : "abaeb474-ede1-4f51-8657-eaa4afadc2b7", + "Last-Modified" : "Mon, 21 Oct 2019 18:14:04 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "58867b7e-201e-0032-7e96-8397fb000000", - "Date" : "Tue, 15 Oct 2019 20:21:42 GMT", - "x-ms-client-request-id" : "305f69aa-0bc0-4acc-a6bf-b593ecf144bd" + "x-ms-request-id" : "c624ca5f-601e-0058-243b-88cb50000000", + "Date" : "Mon, 21 Oct 2019 18:14:03 GMT", + "x-ms-client-request-id" : "ae164674-81ad-4728-bb4b-62cf7f9c1696" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/jtcabortcopylease2blobapitestabortcopylease12583876ec4789/javablobabortcopylease3blobapitestabortcopylease12528649c1d", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/jtcabortcopylease2blobapitestabortcopyleasee7c93603774d6e/javablobabortcopylease3blobapitestabortcopyleasee7c81343dc0", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ab62ad87-2c8a-4013-8684-a6252f863eb3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "d550827c-36a6-4145-b46d-f5e629d99799" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "324851aa-ec62-4b67-a0da-5e337b8a1c39", - "ETag" : "0x8D751AD4B456A1E", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:43 GMT", + "x-ms-copy-id" : "e7f80386-155d-4963-af5c-dd2a9f3383ab", + "ETag" : "0x8D7565274F0890C", + "Last-Modified" : "Mon, 21 Oct 2019 18:14:04 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "pending", "StatusCode" : "202", - "x-ms-request-id" : "58867bab-201e-0032-2496-8397fb000000", - "Date" : "Tue, 15 Oct 2019 20:21:42 GMT", - "x-ms-client-request-id" : "ab62ad87-2c8a-4013-8684-a6252f863eb3" + "x-ms-request-id" : "c624cab9-601e-0058-723b-88cb50000000", + "Date" : "Mon, 21 Oct 2019 18:14:03 GMT", + "x-ms-client-request-id" : "d550827c-36a6-4145-b46d-f5e629d99799" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/jtcabortcopylease2blobapitestabortcopyleasee7c93603774d6e/javablobabortcopylease3blobapitestabortcopyleasee7c81343dc0", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1e393c6b-1153-4288-9b1d-f8d33c9fb25b" + }, + "Response" : { + "x-ms-lease-status" : "locked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "leased", + "Last-Modified" : "Mon, 21 Oct 2019 18:14:04 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 18:14:04 GMT", + "x-ms-lease-duration" : "infinite", + "Content-Length" : "0", + "x-ms-request-id" : "c624ce05-601e-0058-6d3b-88cb50000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "e7f80386-155d-4963-af5c-dd2a9f3383ab", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopylease0blobapitestabortcopyleasee7c6058356489e/javablobabortcopylease1blobapitestabortcopyleasee7c36022f95", + "x-ms-copy-progress" : "0/8388608", + "Date" : "Mon, 21 Oct 2019 18:14:04 GMT", + "Content-MD5" : "80woxbDZb3slP/1BDZvfaA==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D7565274F0890C", + "x-ms-copy-status" : "pending", + "x-ms-client-request-id" : "1e393c6b-1153-4288-9b1d-f8d33c9fb25b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/jtcabortcopylease2blobapitestabortcopylease12583876ec4789/javablobabortcopylease3blobapitestabortcopylease12528649c1d?copyid=324851aa-ec62-4b67-a0da-5e337b8a1c39&comp=copy", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/jtcabortcopylease2blobapitestabortcopyleasee7c93603774d6e/javablobabortcopylease3blobapitestabortcopyleasee7c81343dc0?copyid=e7f80386-155d-4963-af5c-dd2a9f3383ab&comp=copy", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8a44d022-e5af-401e-9dce-b0139d0df2be" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "952b15b9-f6af-464d-8b4d-f4335ae3ebab" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -197,18 +233,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "58867bcf-201e-0032-4496-8397fb000000", - "Date" : "Tue, 15 Oct 2019 20:21:43 GMT", - "x-ms-client-request-id" : "8a44d022-e5af-401e-9dce-b0139d0df2be" + "x-ms-request-id" : "c624ce4f-601e-0058-2d3b-88cb50000000", + "Date" : "Mon, 21 Oct 2019 18:14:05 GMT", + "x-ms-client-request-id" : "952b15b9-f6af-464d-8b4d-f4335ae3ebab" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/jtcabortcopylease2blobapitestabortcopylease12583876ec4789?restype=container", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/jtcabortcopylease2blobapitestabortcopyleasee7c93603774d6e?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "11415175-bb98-457f-ab1b-ec0a12b0700f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1f1de92b-349c-41a4-834c-ce42af5f041a" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -216,9 +252,9 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "58867bfb-201e-0032-6d96-8397fb000000", - "Date" : "Tue, 15 Oct 2019 20:21:43 GMT", - "x-ms-client-request-id" : "11415175-bb98-457f-ab1b-ec0a12b0700f" + "x-ms-request-id" : "c624ce7c-601e-0058-553b-88cb50000000", + "Date" : "Mon, 21 Oct 2019 18:14:05 GMT", + "x-ms-client-request-id" : "1f1de92b-349c-41a4-834c-ce42af5f041a" }, "Exception" : null }, { @@ -226,8 +262,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcabortcopylease&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cd17acff-2e3e-467e-8cc6-a788f3bf3460" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c3138049-6317-4726-840c-879e42c8e824" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -235,20 +271,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6f537e05-801e-0123-3e96-8319e8000000", - "Body" : "jtcabortcopyleasejtcabortcopylease0blobapitestabortcopylease12575885f2fa06Tue, 15 Oct 2019 20:21:42 GMT\"0x8D751AD4B2D3489\"unlockedavailableblob$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:42 GMT", - "x-ms-client-request-id" : "cd17acff-2e3e-467e-8cc6-a788f3bf3460", + "x-ms-request-id" : "089dd1fa-101e-000b-203b-882802000000", + "Body" : "jtcabortcopyleasejtcabortcopylease0blobapitestabortcopyleasee7c6058356489eMon, 21 Oct 2019 18:14:03 GMT\"0x8D75652747BA119\"unlockedavailableblob$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 18:14:05 GMT", + "x-ms-client-request-id" : "c3138049-6317-4726-840c-879e42c8e824", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopylease0blobapitestabortcopylease12575885f2fa06?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopylease0blobapitestabortcopyleasee7c6058356489e?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c3549718-7517-483f-a9e6-5a5940555490" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "def80783-1669-4866-97b1-c24b63917d30" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -256,11 +292,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6f537e15-801e-0123-4d96-8319e8000000", - "Date" : "Tue, 15 Oct 2019 20:21:42 GMT", - "x-ms-client-request-id" : "c3549718-7517-483f-a9e6-5a5940555490" + "x-ms-request-id" : "089dd258-101e-000b-6a3b-882802000000", + "Date" : "Mon, 21 Oct 2019 18:14:05 GMT", + "x-ms-client-request-id" : "def80783-1669-4866-97b1-c24b63917d30" }, "Exception" : null } ], - "variables" : [ "jtcabortcopylease0blobapitestabortcopylease12575885f2fa06", "javablobabortcopylease1blobapitestabortcopylease12530052c3a", "1f20504d-dc03-4aa7-b673-37f9835520bb", "jtcabortcopylease2blobapitestabortcopylease12583876ec4789", "javablobabortcopylease3blobapitestabortcopylease12528649c1d" ] + "variables" : [ "jtcabortcopylease0blobapitestabortcopyleasee7c6058356489e", "javablobabortcopylease1blobapitestabortcopyleasee7c36022f95", "59688c87-f2ef-4eda-99de-ac9c728a00c5", "jtcabortcopylease2blobapitestabortcopyleasee7c93603774d6e", "javablobabortcopylease3blobapitestabortcopyleasee7c81343dc0" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestabortcopyleasefail.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestabortcopyleasefail.json index e02c4dcf8dd1..35c3a24f8e6f 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestabortcopyleasefail.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestabortcopyleasefail.json @@ -1,196 +1,231 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopyleasefail0blobapitestabortcopyleasefailfb36443629?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopyleasefail0blobapitestabortcopyleasefailded75097f2?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6c484c46-4ff3-46a8-ac5f-24271a756c84" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "654bc1d8-f207-4993-82de-88ab714f9d66" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD46F1EDC7", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:35 GMT", + "ETag" : "0x8D756412DF878F7", + "Last-Modified" : "Mon, 21 Oct 2019 16:10:24 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed844-401e-013e-0196-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:35 GMT", - "x-ms-client-request-id" : "6c484c46-4ff3-46a8-ac5f-24271a756c84" + "x-ms-request-id" : "bf3a5435-601e-008c-412a-887d2d000000", + "Date" : "Mon, 21 Oct 2019 16:10:23 GMT", + "x-ms-client-request-id" : "654bc1d8-f207-4993-82de-88ab714f9d66" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopyleasefail0blobapitestabortcopyleasefailfb36443629/javablobabortcopyleasefail185753c2565c61020244a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopyleasefail0blobapitestabortcopyleasefailded75097f2/javablobabortcopyleasefail1055481c236fa563f3498", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f419f96f-2b5a-4da9-b282-f9a294d2195e", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "2bfeb418-2b6b-4119-a3a6-d3f2e0968f23", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:35 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 16:10:24 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:35 GMT", + "Date" : "Mon, 21 Oct 2019 16:10:24 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD46F893E6", + "ETag" : "0x8D756412E294368", "Content-Length" : "0", - "x-ms-request-id" : "16eed856-401e-013e-0c96-83c002000000", - "x-ms-client-request-id" : "f419f96f-2b5a-4da9-b282-f9a294d2195e" + "x-ms-request-id" : "bf3a54e2-601e-008c-4f2a-887d2d000000", + "x-ms-client-request-id" : "2bfeb418-2b6b-4119-a3a6-d3f2e0968f23" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopyleasefail0blobapitestabortcopyleasefailfb36443629/javablobabortcopyleasefail185753c2565c61020244a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopyleasefail0blobapitestabortcopyleasefailded75097f2/javablobabortcopyleasefail1055481c236fa563f3498", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "81f52580-f99c-49fc-a119-aad6b36a8d4b", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "bb8c3e86-770d-482b-83f3-b0c77acd65cb", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "N8AYcK1Qtgg=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:36 GMT", + "x-ms-content-crc64" : "2s6Y6Eq4+xM=", + "Last-Modified" : "Mon, 21 Oct 2019 16:10:25 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:35 GMT", - "Content-MD5" : "7DCZa8VLcsil20gaWFx7lg==", - "ETag" : "0x8D751AD476048F0", + "Date" : "Mon, 21 Oct 2019 16:10:25 GMT", + "Content-MD5" : "OVgrK+ul+gniDYRaeeGGfw==", + "ETag" : "0x8D756412EC336B1", "Content-Length" : "0", - "x-ms-request-id" : "16eed865-401e-013e-1596-83c002000000", - "x-ms-client-request-id" : "81f52580-f99c-49fc-a119-aad6b36a8d4b" + "x-ms-request-id" : "bf3a550f-601e-008c-7b2a-887d2d000000", + "x-ms-client-request-id" : "bb8c3e86-770d-482b-83f3-b0c77acd65cb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopyleasefail0blobapitestabortcopyleasefailfb36443629?restype=container&comp=acl", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopyleasefail0blobapitestabortcopyleasefailded75097f2?restype=container&comp=acl", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c79ed2e0-69b6-450f-af8a-b09077e8681e", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "2414ab4d-2dd1-4913-a5eb-0ec4ac8b5bbc", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD476A65A9", - "Connection" : "close", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:36 GMT", + "ETag" : "0x8D756412EECFD9D", + "Last-Modified" : "Mon, 21 Oct 2019 16:10:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed930-401e-013e-3496-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:36 GMT", - "x-ms-client-request-id" : "c79ed2e0-69b6-450f-af8a-b09077e8681e" + "x-ms-request-id" : "bf3a5726-601e-008c-602a-887d2d000000", + "Date" : "Mon, 21 Oct 2019 16:10:25 GMT", + "x-ms-client-request-id" : "2414ab4d-2dd1-4913-a5eb-0ec4ac8b5bbc" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail26247363ed862a1dac417?restype=container", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail2245233e20f50fe73d4ab?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "47b7f2de-ebc5-4692-af5f-1c0031dcd372" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "6f4b89d2-aa42-4211-8b9c-8f17af67369a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD483444A2", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:37 GMT", + "ETag" : "0x8D756412F0CDD55", + "Last-Modified" : "Mon, 21 Oct 2019 16:10:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5886669c-201e-0032-5296-8397fb000000", - "Date" : "Tue, 15 Oct 2019 20:21:37 GMT", - "x-ms-client-request-id" : "47b7f2de-ebc5-4692-af5f-1c0031dcd372" + "x-ms-request-id" : "0e8ad74c-b01e-0015-542a-880db2000000", + "Date" : "Mon, 21 Oct 2019 16:10:25 GMT", + "x-ms-client-request-id" : "6f4b89d2-aa42-4211-8b9c-8f17af67369a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail26247363ed862a1dac417/javablobabortcopyleasefail3845810807e56aef4042c", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail2245233e20f50fe73d4ab/javablobabortcopyleasefail3944429d605ca542e44ad", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "13983b7b-498a-4752-807e-12543b4f895f", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "47ac7f5b-f5c9-4875-b59f-482e966e048b", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:37 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 16:10:25 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:37 GMT", + "Date" : "Mon, 21 Oct 2019 16:10:25 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD484441B0", + "ETag" : "0x8D756412F1623B5", "Content-Length" : "0", - "x-ms-request-id" : "58866718-201e-0032-3f96-8397fb000000", - "x-ms-client-request-id" : "13983b7b-498a-4752-807e-12543b4f895f" + "x-ms-request-id" : "0e8ad75a-b01e-0015-5e2a-880db2000000", + "x-ms-client-request-id" : "47ac7f5b-f5c9-4875-b59f-482e966e048b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail26247363ed862a1dac417/javablobabortcopyleasefail3845810807e56aef4042c?comp=lease", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail2245233e20f50fe73d4ab/javablobabortcopyleasefail3944429d605ca542e44ad?comp=lease", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "df220a5a-f8f1-42d7-9756-d2bddacd4f32" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "2c45a8db-6f83-46db-a800-ae7c439e1740" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD484441B0", - "x-ms-lease-id" : "751a24f1-ea8b-4c83-b08f-5df122499139", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:37 GMT", + "ETag" : "0x8D756412F1623B5", + "x-ms-lease-id" : "e12977fe-67dd-44c0-accf-8594f118024d", + "Last-Modified" : "Mon, 21 Oct 2019 16:10:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "588667f2-201e-0032-0d96-8397fb000000", - "Date" : "Tue, 15 Oct 2019 20:21:38 GMT", - "x-ms-client-request-id" : "df220a5a-f8f1-42d7-9756-d2bddacd4f32" + "x-ms-request-id" : "0e8ad771-b01e-0015-722a-880db2000000", + "Date" : "Mon, 21 Oct 2019 16:10:25 GMT", + "x-ms-client-request-id" : "2c45a8db-6f83-46db-a800-ae7c439e1740" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail26247363ed862a1dac417/javablobabortcopyleasefail3845810807e56aef4042c", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail2245233e20f50fe73d4ab/javablobabortcopyleasefail3944429d605ca542e44ad", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "74fc7e26-7d2f-43b0-8071-8be06062cd1d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "69668814-ae05-4c7d-8567-560bc020fd3a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "4cba8e02-f4c8-412e-bd92-e714a31c6c4c", - "ETag" : "0x8D751AD4872138E", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:38 GMT", + "x-ms-copy-id" : "b76dc8a5-ed9d-42ab-ab94-45f5ed03e37d", + "ETag" : "0x8D756412F544D4D", + "Last-Modified" : "Mon, 21 Oct 2019 16:10:26 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "pending", "StatusCode" : "202", - "x-ms-request-id" : "58866816-201e-0032-2d96-8397fb000000", - "Date" : "Tue, 15 Oct 2019 20:21:38 GMT", - "x-ms-client-request-id" : "74fc7e26-7d2f-43b0-8071-8be06062cd1d" + "x-ms-request-id" : "10394c19-101e-0013-102a-88faca000000", + "Date" : "Mon, 21 Oct 2019 16:10:25 GMT", + "x-ms-client-request-id" : "69668814-ae05-4c7d-8567-560bc020fd3a" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail2245233e20f50fe73d4ab/javablobabortcopyleasefail3944429d605ca542e44ad", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "45783d39-8981-4c2e-8bf6-62e8cf3f424f" + }, + "Response" : { + "x-ms-lease-status" : "locked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "leased", + "Last-Modified" : "Mon, 21 Oct 2019 16:10:26 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 16:10:25 GMT", + "x-ms-lease-duration" : "infinite", + "Content-Length" : "0", + "x-ms-request-id" : "10394d7e-101e-0013-632a-88faca000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "b76dc8a5-ed9d-42ab-ab94-45f5ed03e37d", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopyleasefail0blobapitestabortcopyleasefailded75097f2/javablobabortcopyleasefail1055481c236fa563f3498", + "x-ms-copy-progress" : "0/8388608", + "Date" : "Mon, 21 Oct 2019 16:10:26 GMT", + "Content-MD5" : "OVgrK+ul+gniDYRaeeGGfw==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D756412F544D4D", + "x-ms-copy-status" : "pending", + "x-ms-client-request-id" : "45783d39-8981-4c2e-8bf6-62e8cf3f424f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail26247363ed862a1dac417/javablobabortcopyleasefail3845810807e56aef4042c?copyid=4cba8e02-f4c8-412e-bd92-e714a31c6c4c&comp=copy", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail2245233e20f50fe73d4ab/javablobabortcopyleasefail3944429d605ca542e44ad?copyid=b76dc8a5-ed9d-42ab-ab94-45f5ed03e37d&comp=copy", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "05718067-82f2-4877-a347-72b93a58fc9e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "36fcdb88-5660-4e4f-bc65-ccfd4fc64be6" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -199,20 +234,42 @@ "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "588668d0-201e-0032-5996-8397fb000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:588668d0-201e-0032-5996-8397fb000000\nTime:2019-10-15T20:21:38.3996584Z", - "Date" : "Tue, 15 Oct 2019 20:21:38 GMT", - "x-ms-client-request-id" : "05718067-82f2-4877-a347-72b93a58fc9e", + "x-ms-request-id" : "10394de8-101e-0013-462a-88faca000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:10394de8-101e-0013-462a-88faca000000\nTime:2019-10-21T16:10:27.1321673Z", + "Date" : "Mon, 21 Oct 2019 16:10:26 GMT", + "x-ms-client-request-id" : "36fcdb88-5660-4e4f-bc65-ccfd4fc64be6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail2245233e20f50fe73d4ab/javablobabortcopyleasefail3944429d605ca542e44ad", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "27ecb47f-7b31-47a6-a53f-0a94df011ca5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "PendingCopyOperation", + "retry-after" : "0", + "Content-Length" : "233", + "StatusCode" : "409", + "x-ms-request-id" : "0e8ad7ae-b01e-0015-232a-880db2000000", + "Body" : "PendingCopyOperationThere is currently a pending copy operation.\nRequestId:0e8ad7ae-b01e-0015-232a-880db2000000\nTime:2019-10-21T16:10:27.2242978Z", + "Date" : "Mon, 21 Oct 2019 16:10:26 GMT", + "x-ms-client-request-id" : "27ecb47f-7b31-47a6-a53f-0a94df011ca5", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail26247363ed862a1dac417?restype=container", + "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopyleasefail2245233e20f50fe73d4ab?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "387b8516-e6f6-485d-b373-149156c4ef58" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "637354fa-2154-41ba-bb32-66fb1a67c0fb" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -220,9 +277,9 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "58866945-201e-0032-4596-8397fb000000", - "Date" : "Tue, 15 Oct 2019 20:21:38 GMT", - "x-ms-client-request-id" : "387b8516-e6f6-485d-b373-149156c4ef58" + "x-ms-request-id" : "10394e35-101e-0013-0e2a-88faca000000", + "Date" : "Mon, 21 Oct 2019 16:10:26 GMT", + "x-ms-client-request-id" : "637354fa-2154-41ba-bb32-66fb1a67c0fb" }, "Exception" : null }, { @@ -230,8 +287,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcabortcopyleasefail&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d35ec4ed-b510-4bb8-9710-a8b0240e9b20" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b292f856-5ec9-4b20-82f4-7e3eda14af78" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -239,20 +296,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6f537806-801e-0123-3096-8319e8000000", - "Body" : "jtcabortcopyleasefailjtcabortcopyleasefail0blobapitestabortcopyleasefailfb36443629Tue, 15 Oct 2019 20:21:36 GMT\"0x8D751AD476A65A9\"unlockedavailableblob$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:38 GMT", - "x-ms-client-request-id" : "d35ec4ed-b510-4bb8-9710-a8b0240e9b20", + "x-ms-request-id" : "bf3a5a42-601e-008c-552a-887d2d000000", + "Body" : "jtcabortcopyleasefailjtcabortcopyleasefail0blobapitestabortcopyleasefailded75097f2Mon, 21 Oct 2019 16:10:25 GMT\"0x8D756412EECFD9D\"unlockedavailableblob$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 16:10:27 GMT", + "x-ms-client-request-id" : "b292f856-5ec9-4b20-82f4-7e3eda14af78", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopyleasefail0blobapitestabortcopyleasefailfb36443629?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopyleasefail0blobapitestabortcopyleasefailded75097f2?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c2477ba6-9993-4862-a7b8-22a86b3daf55" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "6fdc26e9-8f4a-4b78-a8eb-8d3feff7dcb0" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -260,11 +317,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6f53780e-801e-0123-3796-8319e8000000", - "Date" : "Tue, 15 Oct 2019 20:21:38 GMT", - "x-ms-client-request-id" : "c2477ba6-9993-4862-a7b8-22a86b3daf55" + "x-ms-request-id" : "bf3a5a94-601e-008c-1b2a-887d2d000000", + "Date" : "Mon, 21 Oct 2019 16:10:27 GMT", + "x-ms-client-request-id" : "6fdc26e9-8f4a-4b78-a8eb-8d3feff7dcb0" }, "Exception" : null } ], - "variables" : [ "jtcabortcopyleasefail0blobapitestabortcopyleasefailfb36443629", "javablobabortcopyleasefail185753c2565c61020244a", "111d0d30-3e9a-48f7-b0f9-83e34001d375", "javablobabortcopyleasefail26247363ed862a1dac417", "javablobabortcopyleasefail3845810807e56aef4042c" ] + "variables" : [ "jtcabortcopyleasefail0blobapitestabortcopyleasefailded75097f2", "javablobabortcopyleasefail1055481c236fa563f3498", "661ec63c-9d26-4d8b-91d8-7f90ef411b05", "javablobabortcopyleasefail2245233e20f50fe73d4ab", "javablobabortcopyleasefail3944429d605ca542e44ad" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestabortcopymin.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestabortcopymin.json deleted file mode 100644 index f2c0f7634c81..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestabortcopymin.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopymin0blobapitestabortcopymin8c751304d99d803f?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c51ac4bb-ce8f-42a4-ae78-5a438dee7c66" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD49B32D7F", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:40 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "6f537a45-801e-0123-0c96-8319e8000000", - "Date" : "Tue, 15 Oct 2019 20:21:39 GMT", - "x-ms-client-request-id" : "c51ac4bb-ce8f-42a4-ae78-5a438dee7c66" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopymin0blobapitestabortcopymin8c751304d99d803f/javablobabortcopymin1blobapitestabortcopymin8c784743b42e1", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f09d7f2c-fac7-4933-b40a-16fe69c0474d", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:40 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:39 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD49BA0FA8", - "Content-Length" : "0", - "x-ms-request-id" : "6f537a55-801e-0123-1796-8319e8000000", - "x-ms-client-request-id" : "f09d7f2c-fac7-4933-b40a-16fe69c0474d" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopymin0blobapitestabortcopymin8c751304d99d803f/javablobabortcopymin1blobapitestabortcopymin8c784743b42e1", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3c78c4ae-eea4-40f4-9764-b6bd8e030b02", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "ILhWlyLQWmA=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:40 GMT", - "Content-MD5" : "XtOodiScnbUO6EgErUr6KA==", - "ETag" : "0x8D751AD4A3A0DA3", - "Content-Length" : "0", - "x-ms-request-id" : "6f537a75-801e-0123-3296-8319e8000000", - "x-ms-client-request-id" : "3c78c4ae-eea4-40f4-9764-b6bd8e030b02" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopymin0blobapitestabortcopymin8c751304d99d803f?restype=container&comp=acl", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "adeb2b81-d226-43e7-a488-8f6ffd96b599", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD4A402B29", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:41 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "6f537b88-801e-0123-1296-8319e8000000", - "Date" : "Tue, 15 Oct 2019 20:21:40 GMT", - "x-ms-client-request-id" : "adeb2b81-d226-43e7-a488-8f6ffd96b599" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopymin2blobapitestabortcopymin8c71945906f2d?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ec966a73-f451-42f7-993a-09ada6911c57" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD4A4AAF82", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:41 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "58867551-201e-0032-5996-8397fb000000", - "Date" : "Tue, 15 Oct 2019 20:21:41 GMT", - "x-ms-client-request-id" : "ec966a73-f451-42f7-993a-09ada6911c57" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopymin2blobapitestabortcopymin8c71945906f2d/javablobabortcopymin3blobapitestabortcopymin8c742648a7c3c", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b2d9ba86-f0b5-429f-ae58-bf2a5d288675" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "e1c333ec-64fa-4f99-b10d-bb929bf6518a", - "ETag" : "0x8D751AD4A6D7382", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:41 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "x-ms-copy-status" : "pending", - "StatusCode" : "202", - "x-ms-request-id" : "588675f9-201e-0032-7396-8397fb000000", - "Date" : "Tue, 15 Oct 2019 20:21:41 GMT", - "x-ms-client-request-id" : "b2d9ba86-f0b5-429f-ae58-bf2a5d288675" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://azstoragesdkblobaccount.blob.core.windows.net/javablobabortcopymin2blobapitestabortcopymin8c71945906f2d/javablobabortcopymin3blobapitestabortcopymin8c742648a7c3c?copyid=e1c333ec-64fa-4f99-b10d-bb929bf6518a&comp=copy", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cabb2a59-a7e2-4ab1-9183-153f19bfbc00" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "58867688-201e-0032-7996-8397fb000000", - "Date" : "Tue, 15 Oct 2019 20:21:41 GMT", - "x-ms-client-request-id" : "cabb2a59-a7e2-4ab1-9183-153f19bfbc00" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcabortcopymin&comp=list", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "78c7a23d-908d-4c20-ac89-9c1580c84bf3" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "6f537c2b-801e-0123-2396-8319e8000000", - "Body" : "jtcabortcopyminjtcabortcopymin0blobapitestabortcopymin8c751304d99d803fTue, 15 Oct 2019 20:21:41 GMT\"0x8D751AD4A402B29\"unlockedavailableblob$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:41 GMT", - "x-ms-client-request-id" : "78c7a23d-908d-4c20-ac89-9c1580c84bf3", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcabortcopymin0blobapitestabortcopymin8c751304d99d803f?restype=container", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4e206dd7-af5f-486a-b995-fa2aeb39be9f" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "6f537c37-801e-0123-2d96-8319e8000000", - "Date" : "Tue, 15 Oct 2019 20:21:41 GMT", - "x-ms-client-request-id" : "4e206dd7-af5f-486a-b995-fa2aeb39be9f" - }, - "Exception" : null - } ], - "variables" : [ "jtcabortcopymin0blobapitestabortcopymin8c751304d99d803f", "javablobabortcopymin1blobapitestabortcopymin8c784743b42e1", "a6014dbd-41ba-443b-8894-c0d8d9c2d0e4", "javablobabortcopymin2blobapitestabortcopymin8c71945906f2d", "javablobabortcopymin3blobapitestabortcopymin8c742648a7c3c" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopy.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopy.json index 3cffe43e18a0..cf5316e9cf11 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopy.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopy.json @@ -1,143 +1,143 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopyaa81273348bb50e4c645479e?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopybd535657340800f39cae49a3?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5702cd06-6ff0-4a72-995a-f3ed327404ba" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "dc2976bd-92db-4a9d-855a-a1828138559d" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD41163DA3", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:25 GMT", + "ETag" : "0x8D75648A9C100A3", + "Last-Modified" : "Mon, 21 Oct 2019 17:03:58 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eece0d-401e-013e-0496-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:25 GMT", - "x-ms-client-request-id" : "5702cd06-6ff0-4a72-995a-f3ed327404ba" + "x-ms-request-id" : "0a100ff3-f01e-012c-4431-88f41e000000", + "Date" : "Mon, 21 Oct 2019 17:03:57 GMT", + "x-ms-client-request-id" : "dc2976bd-92db-4a9d-855a-a1828138559d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopyaa81273348bb50e4c645479e/javablobcopy1blobapitestcopyaa819756cde3f6ae32f14", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopybd535657340800f39cae49a3/javablobcopy1blobapitestcopybd5560939f2e395ed61b4", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6d06b739-0823-49d0-ae66-331dcc396d1f", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f3b41129-266a-4fc2-9dd2-07cf4bccfe12", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:25 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 17:03:58 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:25 GMT", + "Date" : "Mon, 21 Oct 2019 17:03:57 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD411EDB6B", + "ETag" : "0x8D75648A9D113FB", "Content-Length" : "0", - "x-ms-request-id" : "16eece24-401e-013e-1596-83c002000000", - "x-ms-client-request-id" : "6d06b739-0823-49d0-ae66-331dcc396d1f" + "x-ms-request-id" : "0a10101a-f01e-012c-6531-88f41e000000", + "x-ms-client-request-id" : "f3b41129-266a-4fc2-9dd2-07cf4bccfe12" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopyaa81273348bb50e4c645479e/javablobcopy2blobapitestcopyaa854768e80a7a7a9ec74", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopybd535657340800f39cae49a3/javablobcopy2blobapitestcopybd551914ce16502b834d4", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d77877b9-2aec-4ca0-b053-cb6db14027d9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "519ed49b-427b-4570-bcd7-76e103fb4af6" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "84de39e3-0886-4d93-8c3e-49f9581230c3", - "ETag" : "0x8D751AD41271AD4", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:26 GMT", + "x-ms-copy-id" : "cb3de5b7-da39-4152-a655-85314b14f3c0", + "ETag" : "0x8D75648A9E3DD1A", + "Last-Modified" : "Mon, 21 Oct 2019 17:03:58 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eece39-401e-013e-2696-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:25 GMT", - "x-ms-client-request-id" : "d77877b9-2aec-4ca0-b053-cb6db14027d9" + "x-ms-request-id" : "0a101053-f01e-012c-1831-88f41e000000", + "Date" : "Mon, 21 Oct 2019 17:03:58 GMT", + "x-ms-client-request-id" : "519ed49b-427b-4570-bcd7-76e103fb4af6" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopyaa81273348bb50e4c645479e/javablobcopy2blobapitestcopyaa854768e80a7a7a9ec74", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopybd535657340800f39cae49a3/javablobcopy2blobapitestcopybd551914ce16502b834d4", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1b51c595-d4f3-424f-bc5c-2947381f4acc" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c29b6352-d824-46e7-8554-fa060390253b" }, "Response" : { "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:26 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 17:03:58 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-blob-type" : "BlockBlob", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:21:26 GMT", + "x-ms-creation-time" : "Mon, 21 Oct 2019 17:03:58 GMT", "Content-Length" : "7", - "x-ms-request-id" : "16eece62-401e-013e-4a96-83c002000000", + "x-ms-request-id" : "0a10126f-f01e-012c-7531-88f41e000000", "Content-Type" : "application/octet-stream", "x-ms-version" : "2019-02-02", - "x-ms-copy-id" : "84de39e3-0886-4d93-8c3e-49f9581230c3", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopyaa81273348bb50e4c645479e/javablobcopy1blobapitestcopyaa819756cde3f6ae32f14", + "x-ms-copy-id" : "cb3de5b7-da39-4152-a655-85314b14f3c0", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopybd535657340800f39cae49a3/javablobcopy1blobapitestcopybd5560939f2e395ed61b4", "x-ms-copy-progress" : "7/7", - "Date" : "Tue, 15 Oct 2019 20:21:25 GMT", + "Date" : "Mon, 21 Oct 2019 17:03:59 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "x-ms-copy-completion-time" : "Tue, 15 Oct 2019 20:21:26 GMT", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 17:03:58 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D751AD41271AD4", + "ETag" : "0x8D75648A9E3DD1A", "x-ms-copy-status" : "success", - "x-ms-client-request-id" : "1b51c595-d4f3-424f-bc5c-2947381f4acc" + "x-ms-client-request-id" : "c29b6352-d824-46e7-8554-fa060390253b" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopyaa81273348bb50e4c645479e/javablobcopy2blobapitestcopyaa854768e80a7a7a9ec74", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopybd535657340800f39cae49a3/javablobcopy2blobapitestcopybd551914ce16502b834d4", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ada8f95b-2f46-481b-be91-ad4ee61e4357" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "a25f5691-8502-4e68-adfa-d7a13d5766a6" }, "Response" : { "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:26 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 17:03:58 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-blob-type" : "BlockBlob", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:21:26 GMT", + "x-ms-creation-time" : "Mon, 21 Oct 2019 17:03:58 GMT", "Content-Length" : "7", - "x-ms-request-id" : "16eece72-401e-013e-5a96-83c002000000", + "x-ms-request-id" : "0a10128e-f01e-012c-1031-88f41e000000", "Content-Type" : "application/octet-stream", "x-ms-version" : "2019-02-02", - "x-ms-copy-id" : "84de39e3-0886-4d93-8c3e-49f9581230c3", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopyaa81273348bb50e4c645479e/javablobcopy1blobapitestcopyaa819756cde3f6ae32f14", + "x-ms-copy-id" : "cb3de5b7-da39-4152-a655-85314b14f3c0", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopybd535657340800f39cae49a3/javablobcopy1blobapitestcopybd5560939f2e395ed61b4", "x-ms-copy-progress" : "7/7", - "Date" : "Tue, 15 Oct 2019 20:21:25 GMT", + "Date" : "Mon, 21 Oct 2019 17:03:59 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "x-ms-copy-completion-time" : "Tue, 15 Oct 2019 20:21:26 GMT", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 17:03:58 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D751AD41271AD4", + "ETag" : "0x8D75648A9E3DD1A", "x-ms-copy-status" : "success", - "x-ms-client-request-id" : "ada8f95b-2f46-481b-be91-ad4ee61e4357" + "x-ms-client-request-id" : "a25f5691-8502-4e68-adfa-d7a13d5766a6" }, "Exception" : null }, { @@ -145,8 +145,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopy&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d8434f87-bf98-40b9-a816-dd22d26f6c93" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "eb4e2b54-5f01-43f7-b333-1042019d9859" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -154,20 +154,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eece7b-401e-013e-6296-83c002000000", - "Body" : "jtccopyjtccopy0blobapitestcopyaa81273348bb50e4c645479eTue, 15 Oct 2019 20:21:25 GMT\"0x8D751AD41163DA3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:25 GMT", - "x-ms-client-request-id" : "d8434f87-bf98-40b9-a816-dd22d26f6c93", + "x-ms-request-id" : "0a1012ad-f01e-012c-2b31-88f41e000000", + "Body" : "jtccopyjtccopy0blobapitestcopybd535657340800f39cae49a3Mon, 21 Oct 2019 17:03:58 GMT\"0x8D75648A9C100A3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 17:03:59 GMT", + "x-ms-client-request-id" : "eb4e2b54-5f01-43f7-b333-1042019d9859", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopyaa81273348bb50e4c645479e?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopy0blobapitestcopybd535657340800f39cae49a3?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e16083c0-7077-4a14-b809-106c0f0d4798" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "47663e22-3f6c-4777-952e-f0931a4d1319" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -175,11 +175,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eeceb5-401e-013e-1096-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:26 GMT", - "x-ms-client-request-id" : "e16083c0-7077-4a14-b809-106c0f0d4798" + "x-ms-request-id" : "0a1012be-f01e-012c-3931-88f41e000000", + "Date" : "Mon, 21 Oct 2019 17:03:59 GMT", + "x-ms-client-request-id" : "47663e22-3f6c-4777-952e-f0931a4d1319" }, "Exception" : null } ], - "variables" : [ "jtccopy0blobapitestcopyaa81273348bb50e4c645479e", "javablobcopy1blobapitestcopyaa819756cde3f6ae32f14", "javablobcopy2blobapitestcopyaa854768e80a7a7a9ec74" ] + "variables" : [ "jtccopy0blobapitestcopybd535657340800f39cae49a3", "javablobcopy1blobapitestcopybd5560939f2e395ed61b4", "javablobcopy2blobapitestcopybd551914ce16502b834d4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[0].json index eb04a728bfb3..0fe9da2cac15 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[0].json @@ -1,96 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacc1010308813308da71?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac96015834ce2b21ccb1?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "72bc57b4-4fc9-4330-b2bb-fc1249c58ad3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "a482abdc-b776-4b13-b60a-5d147f8aee11" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD44D60444", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:32 GMT", + "ETag" : "0x8D7565921ED66AF", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:51 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed4c0-401e-013e-3296-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "72bc57b4-4fc9-4330-b2bb-fc1249c58ad3" + "x-ms-request-id" : "de491edd-c01e-004d-7a41-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", + "x-ms-client-request-id" : "a482abdc-b776-4b13-b60a-5d147f8aee11" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacc1010308813308da71/javablobcopydestac1blobapitestcopydestacc10147904b434a9", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac96015834ce2b21ccb1/javablobcopydestac1blobapitestcopydestac9603662347f3667", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5c723050-a0c8-4551-a934-d924042633bb", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f0937e79-3e92-4211-830c-195e6049c3a9", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:51 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD44DCCFDE", + "ETag" : "0x8D7565921F57728", "Content-Length" : "0", - "x-ms-request-id" : "16eed4c8-401e-013e-3996-83c002000000", - "x-ms-client-request-id" : "5c723050-a0c8-4551-a934-d924042633bb" + "x-ms-request-id" : "de491efd-c01e-004d-1541-88f694000000", + "x-ms-client-request-id" : "f0937e79-3e92-4211-830c-195e6049c3a9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacc1010308813308da71/javablobcopydestac2blobapitestcopydestacc1039536e274629", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac96015834ce2b21ccb1/javablobcopydestac2blobapitestcopydestac96023795299c484", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "53cc9c19-a9fe-435c-a44d-7e9ca7f2f034", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "dfecf579-009a-45ce-8855-4cf0fc8f3659", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:51 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD44E3D676", + "ETag" : "0x8D7565921FF8BC1", "Content-Length" : "0", - "x-ms-request-id" : "16eed4d4-401e-013e-4496-83c002000000", - "x-ms-client-request-id" : "53cc9c19-a9fe-435c-a44d-7e9ca7f2f034" + "x-ms-request-id" : "de491f07-c01e-004d-1f41-88f694000000", + "x-ms-client-request-id" : "dfecf579-009a-45ce-8855-4cf0fc8f3659" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacc1010308813308da71/javablobcopydestac2blobapitestcopydestacc1039536e274629", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac96015834ce2b21ccb1/javablobcopydestac2blobapitestcopydestac96023795299c484", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "637c314d-8315-49d6-88a3-c85e078e9c21" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c191d9f4-ddda-4ca2-9dfb-5e5dc9310df3" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "0b164e14-0369-4b4a-af64-344b27d02cb9", - "ETag" : "0x8D751AD44EB526F", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:32 GMT", + "x-ms-copy-id" : "0cc77142-ca03-438f-b7ae-bb7906e4346e", + "ETag" : "0x8D7565922069268", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:51 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eed4dd-401e-013e-4d96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "637c314d-8315-49d6-88a3-c85e078e9c21" + "x-ms-request-id" : "de491f10-c01e-004d-2841-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", + "x-ms-client-request-id" : "c191d9f4-ddda-4ca2-9dfb-5e5dc9310df3" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac96015834ce2b21ccb1/javablobcopydestac2blobapitestcopydestac96023795299c484", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "89180b46-4bed-46d6-af5e-77832a47171f" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:51 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:51 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "de492077-c01e-004d-5a42-88f694000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "0cc77142-ca03-438f-b7ae-bb7906e4346e", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac96015834ce2b21ccb1/javablobcopydestac1blobapitestcopydestac9603662347f3667", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 19:01:52 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:51 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D7565922069268", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "89180b46-4bed-46d6-af5e-77832a47171f" }, "Exception" : null }, { @@ -98,8 +134,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopydestac&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1132925f-26a4-4e18-8836-04646d435193" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "4b470c1e-19fb-42bf-984a-bf2cfae2b086" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -107,20 +143,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed4e8-401e-013e-5796-83c002000000", - "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestacc1010308813308da71Tue, 15 Oct 2019 20:21:32 GMT\"0x8D751AD44D60444\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "1132925f-26a4-4e18-8836-04646d435193", + "x-ms-request-id" : "de492081-c01e-004d-6442-88f694000000", + "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestac96015834ce2b21ccb1Mon, 21 Oct 2019 19:01:51 GMT\"0x8D7565921ED66AF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:52 GMT", + "x-ms-client-request-id" : "4b470c1e-19fb-42bf-984a-bf2cfae2b086", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacc1010308813308da71?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac96015834ce2b21ccb1?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e9c61d62-d68e-4d84-961f-628e95fa0fbe" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "d1c974ff-53e5-4f5a-87c3-03743a0acef6" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -128,11 +164,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed4ec-401e-013e-5b96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "e9c61d62-d68e-4d84-961f-628e95fa0fbe" + "x-ms-request-id" : "de492089-c01e-004d-6c42-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:52 GMT", + "x-ms-client-request-id" : "d1c974ff-53e5-4f5a-87c3-03743a0acef6" }, "Exception" : null } ], - "variables" : [ "jtccopydestac0blobapitestcopydestacc1010308813308da71", "javablobcopydestac1blobapitestcopydestacc10147904b434a9", "javablobcopydestac2blobapitestcopydestacc1039536e274629" ] + "variables" : [ "jtccopydestac0blobapitestcopydestac96015834ce2b21ccb1", "javablobcopydestac1blobapitestcopydestac9603662347f3667", "javablobcopydestac2blobapitestcopydestac96023795299c484" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[1].json index ed3d93259d52..568a08eb4ca6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[1].json @@ -1,96 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac8bc69339fb60d8ca7f?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacb24256707f4acbf858?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ccb4bcf7-f1ed-4f6a-bb25-b0e34aba51b4" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "31d5b22a-05db-41fa-8efd-8e08c7d29562" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD44FD6BFE", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:32 GMT", + "ETag" : "0x8D7565922B6DBC5", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:53 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed4fe-401e-013e-6896-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "ccb4bcf7-f1ed-4f6a-bb25-b0e34aba51b4" + "x-ms-request-id" : "de492098-c01e-004d-7942-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:52 GMT", + "x-ms-client-request-id" : "31d5b22a-05db-41fa-8efd-8e08c7d29562" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac8bc69339fb60d8ca7f/javablobcopydestac1blobapitestcopydestac8bc64762227aff2", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacb24256707f4acbf858/javablobcopydestac1blobapitestcopydestacb2413567ec496c4", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0b264965-734b-4f80-9517-1b245e6cadcc", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "a690930a-99df-407d-94d2-b4bfdd173e7d", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:53 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:52 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD45045ECD", + "ETag" : "0x8D7565922BF3A35", "Content-Length" : "0", - "x-ms-request-id" : "16eed514-401e-013e-7c96-83c002000000", - "x-ms-client-request-id" : "0b264965-734b-4f80-9517-1b245e6cadcc" + "x-ms-request-id" : "de4920ac-c01e-004d-0b42-88f694000000", + "x-ms-client-request-id" : "a690930a-99df-407d-94d2-b4bfdd173e7d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac8bc69339fb60d8ca7f/javablobcopydestac2blobapitestcopydestac8bc6230505f5450", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacb24256707f4acbf858/javablobcopydestac2blobapitestcopydestacb2457690eca27b6", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "776b8943-cacb-4909-ac5e-4ffb862e0adf", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "3cca62da-7fff-414a-8b45-9fc5cb91a20e", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:53 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:52 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD450B1733", + "ETag" : "0x8D7565922C667E5", "Content-Length" : "0", - "x-ms-request-id" : "16eed521-401e-013e-0696-83c002000000", - "x-ms-client-request-id" : "776b8943-cacb-4909-ac5e-4ffb862e0adf" + "x-ms-request-id" : "de4920c6-c01e-004d-2242-88f694000000", + "x-ms-client-request-id" : "3cca62da-7fff-414a-8b45-9fc5cb91a20e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac8bc69339fb60d8ca7f/javablobcopydestac2blobapitestcopydestac8bc6230505f5450", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacb24256707f4acbf858/javablobcopydestac2blobapitestcopydestacb2457690eca27b6", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7e710ca8-bd7a-4836-a8e3-1c843a977be9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "e4ac6550-9651-4725-97d5-68cc0b956265" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "81e690d2-8c2b-441f-bbe2-e8cecc7c1524", - "ETag" : "0x8D751AD451E55CC", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:32 GMT", + "x-ms-copy-id" : "9dd3e5b1-f9a3-4079-977b-c6dcce89f960", + "ETag" : "0x8D7565922CE5913", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:53 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eed52f-401e-013e-1196-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", - "x-ms-client-request-id" : "7e710ca8-bd7a-4836-a8e3-1c843a977be9" + "x-ms-request-id" : "de4920db-c01e-004d-3542-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:52 GMT", + "x-ms-client-request-id" : "e4ac6550-9651-4725-97d5-68cc0b956265" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacb24256707f4acbf858/javablobcopydestac2blobapitestcopydestacb2457690eca27b6", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "3d5f8474-858b-4b0b-8d38-28a1fd26d40b" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:53 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:53 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "de49229f-c01e-004d-5742-88f694000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "9dd3e5b1-f9a3-4079-977b-c6dcce89f960", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacb24256707f4acbf858/javablobcopydestac1blobapitestcopydestacb2413567ec496c4", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 19:01:53 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:53 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D7565922CE5913", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "3d5f8474-858b-4b0b-8d38-28a1fd26d40b" }, "Exception" : null }, { @@ -98,8 +134,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopydestac&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a4b28eb0-4983-4bfa-8461-cb783b14feec" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "32227899-4e9d-4039-b52f-a769c0753387" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -107,20 +143,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed56e-401e-013e-4396-83c002000000", - "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestac8bc69339fb60d8ca7fTue, 15 Oct 2019 20:21:32 GMT\"0x8D751AD44FD6BFE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", - "x-ms-client-request-id" : "a4b28eb0-4983-4bfa-8461-cb783b14feec", + "x-ms-request-id" : "de4922b0-c01e-004d-6542-88f694000000", + "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestacb24256707f4acbf858Mon, 21 Oct 2019 19:01:53 GMT\"0x8D7565922B6DBC5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:54 GMT", + "x-ms-client-request-id" : "32227899-4e9d-4039-b52f-a769c0753387", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac8bc69339fb60d8ca7f?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacb24256707f4acbf858?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7a6c89ac-4c5b-4b38-9659-ab088ac3903b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b9c5dbcb-86fd-4416-ba01-c8ebffa6e99f" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -128,11 +164,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed57c-401e-013e-4d96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", - "x-ms-client-request-id" : "7a6c89ac-4c5b-4b38-9659-ab088ac3903b" + "x-ms-request-id" : "de4922bd-c01e-004d-7142-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:54 GMT", + "x-ms-client-request-id" : "b9c5dbcb-86fd-4416-ba01-c8ebffa6e99f" }, "Exception" : null } ], - "variables" : [ "jtccopydestac0blobapitestcopydestac8bc69339fb60d8ca7f", "javablobcopydestac1blobapitestcopydestac8bc64762227aff2", "javablobcopydestac2blobapitestcopydestac8bc6230505f5450" ] + "variables" : [ "jtccopydestac0blobapitestcopydestacb24256707f4acbf858", "javablobcopydestac1blobapitestcopydestacb2413567ec496c4", "javablobcopydestac2blobapitestcopydestacb2457690eca27b6" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[2].json index 6b7a14088d88..a46de321d43f 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[2].json @@ -1,96 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacf2a1688306b55c8cf8?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfaf893864ee36fb71b?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "467f9185-842f-4208-904f-889f6810b83a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "53ebcc8b-ae66-4427-8323-40cea87d85af" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD453FB541", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:32 GMT", + "ETag" : "0x8D756592381FF05", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:54 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed589-401e-013e-5996-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", - "x-ms-client-request-id" : "467f9185-842f-4208-904f-889f6810b83a" + "x-ms-request-id" : "de4922d4-c01e-004d-0742-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:54 GMT", + "x-ms-client-request-id" : "53ebcc8b-ae66-4427-8323-40cea87d85af" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacf2a1688306b55c8cf8/javablobcopydestac1blobapitestcopydestacf2a90021521e941", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfaf893864ee36fb71b/javablobcopydestac1blobapitestcopydestacfaf897449b5e3b2", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "855d4318-1d02-4b87-95a8-3a482c4f4868", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "4fb88be8-535b-4309-8b48-53ddf44ad0a6", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:54 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:54 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD45471D7C", + "ETag" : "0x8D75659238A5D20", "Content-Length" : "0", - "x-ms-request-id" : "16eed593-401e-013e-6296-83c002000000", - "x-ms-client-request-id" : "855d4318-1d02-4b87-95a8-3a482c4f4868" + "x-ms-request-id" : "de4922e0-c01e-004d-1242-88f694000000", + "x-ms-client-request-id" : "4fb88be8-535b-4309-8b48-53ddf44ad0a6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacf2a1688306b55c8cf8/javablobcopydestac2blobapitestcopydestacf2a133102b7cb69", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfaf893864ee36fb71b/javablobcopydestac2blobapitestcopydestacfaf664036811c0b", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "bcdce681-21c0-4c48-9c31-f0194c17bab5", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "0ca265f1-e197-4b41-80c7-3f2edabaedf1", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:33 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:54 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:54 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD454F35CB", + "ETag" : "0x8D756592390A04A", "Content-Length" : "0", - "x-ms-request-id" : "16eed598-401e-013e-6796-83c002000000", - "x-ms-client-request-id" : "bcdce681-21c0-4c48-9c31-f0194c17bab5" + "x-ms-request-id" : "de4922fc-c01e-004d-2c42-88f694000000", + "x-ms-client-request-id" : "0ca265f1-e197-4b41-80c7-3f2edabaedf1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacf2a1688306b55c8cf8/javablobcopydestac2blobapitestcopydestacf2a133102b7cb69", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfaf893864ee36fb71b/javablobcopydestac2blobapitestcopydestacfaf664036811c0b", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "926b85bd-b793-44ce-a2fe-f2f4333747c5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "22323e9b-7737-4996-ae6c-e6f47d6012a4" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "a0e93447-734f-4b34-a4f2-174268d043f5", - "ETag" : "0x8D751AD455BE31A", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:33 GMT", + "x-ms-copy-id" : "9b8478cc-6a30-44e6-9063-669634838a11", + "ETag" : "0x8D756592397A6DA", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:54 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eed59e-401e-013e-6d96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", - "x-ms-client-request-id" : "926b85bd-b793-44ce-a2fe-f2f4333747c5" + "x-ms-request-id" : "de492310-c01e-004d-3e42-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:54 GMT", + "x-ms-client-request-id" : "22323e9b-7737-4996-ae6c-e6f47d6012a4" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfaf893864ee36fb71b/javablobcopydestac2blobapitestcopydestacfaf664036811c0b", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "54a55a15-099a-4c66-8e98-4d73bc6087ed" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:54 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:54 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "de4924cf-c01e-004d-4742-88f694000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "9b8478cc-6a30-44e6-9063-669634838a11", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfaf893864ee36fb71b/javablobcopydestac1blobapitestcopydestacfaf897449b5e3b2", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 19:01:55 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:54 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D756592397A6DA", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "54a55a15-099a-4c66-8e98-4d73bc6087ed" }, "Exception" : null }, { @@ -98,8 +134,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopydestac&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0838c789-db55-4fdc-8157-4f877dda5da7" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "fdc5b7ca-b81b-45f6-90f3-e057f730f41b" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -107,20 +143,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed5c6-401e-013e-0f96-83c002000000", - "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestacf2a1688306b55c8cf8Tue, 15 Oct 2019 20:21:32 GMT\"0x8D751AD453FB541\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", - "x-ms-client-request-id" : "0838c789-db55-4fdc-8157-4f877dda5da7", + "x-ms-request-id" : "de4924df-c01e-004d-5642-88f694000000", + "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestacfaf893864ee36fb71bMon, 21 Oct 2019 19:01:54 GMT\"0x8D756592381FF05\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:55 GMT", + "x-ms-client-request-id" : "fdc5b7ca-b81b-45f6-90f3-e057f730f41b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacf2a1688306b55c8cf8?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfaf893864ee36fb71b?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cb0d39a9-10dc-4521-beeb-9fe2dadaf934" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "97dd5854-481e-4b30-8424-72b922665c91" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -128,11 +164,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed5cb-401e-013e-1496-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", - "x-ms-client-request-id" : "cb0d39a9-10dc-4521-beeb-9fe2dadaf934" + "x-ms-request-id" : "de4924ec-c01e-004d-6142-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:55 GMT", + "x-ms-client-request-id" : "97dd5854-481e-4b30-8424-72b922665c91" }, "Exception" : null } ], - "variables" : [ "jtccopydestac0blobapitestcopydestacf2a1688306b55c8cf8", "javablobcopydestac1blobapitestcopydestacf2a90021521e941", "javablobcopydestac2blobapitestcopydestacf2a133102b7cb69" ] + "variables" : [ "jtccopydestac0blobapitestcopydestacfaf893864ee36fb71b", "javablobcopydestac1blobapitestcopydestacfaf897449b5e3b2", "javablobcopydestac2blobapitestcopydestacfaf664036811c0b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[3].json index 5dddeb148d91..0ab754b4deaf 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[3].json @@ -1,127 +1,163 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacbb713285f82105e1a3?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac22197411f736793db3?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "351feba3-1299-4506-9da0-213404defbdb" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "57efaeef-fdd4-48dd-a4c8-e1742acbccf1" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD457D4277", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:33 GMT", + "ETag" : "0x8D756592449ED3A", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:55 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed5d4-401e-013e-1c96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", - "x-ms-client-request-id" : "351feba3-1299-4506-9da0-213404defbdb" + "x-ms-request-id" : "de492507-c01e-004d-7942-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:55 GMT", + "x-ms-client-request-id" : "57efaeef-fdd4-48dd-a4c8-e1742acbccf1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacbb713285f82105e1a3/javablobcopydestac1blobapitestcopydestacbb7355034ee55ad", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac22197411f736793db3/javablobcopydestac1blobapitestcopydestac221005806d32172", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "bc5a27f4-aba9-455d-b00c-5446fabac759", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "5b9016c3-2fa6-4b0e-a098-e67f659aed51", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:33 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:55 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:55 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD45845C9C", + "ETag" : "0x8D75659245383C7", "Content-Length" : "0", - "x-ms-request-id" : "16eed5e0-401e-013e-2596-83c002000000", - "x-ms-client-request-id" : "bc5a27f4-aba9-455d-b00c-5446fabac759" + "x-ms-request-id" : "de492521-c01e-004d-1042-88f694000000", + "x-ms-client-request-id" : "5b9016c3-2fa6-4b0e-a098-e67f659aed51" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacbb713285f82105e1a3/javablobcopydestac2blobapitestcopydestacbb748024fe05fa9", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac22197411f736793db3/javablobcopydestac2blobapitestcopydestac221277636667489", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ef878c33-ded5-41b0-96a6-630cca2cc8ad", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "dca1615b-6937-4a48-8454-d79412cac184", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:33 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:55 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:55 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD458C74EB", + "ETag" : "0x8D75659245A1515", "Content-Length" : "0", - "x-ms-request-id" : "16eed5e8-401e-013e-2d96-83c002000000", - "x-ms-client-request-id" : "ef878c33-ded5-41b0-96a6-630cca2cc8ad" + "x-ms-request-id" : "de492540-c01e-004d-2442-88f694000000", + "x-ms-client-request-id" : "dca1615b-6937-4a48-8454-d79412cac184" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacbb713285f82105e1a3/javablobcopydestac2blobapitestcopydestacbb748024fe05fa9", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac22197411f736793db3/javablobcopydestac2blobapitestcopydestac221277636667489", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "15af8015-011b-4615-9ba9-52b9a9defabd" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "38b9d948-1d08-4fa5-8fe6-2519929ee448" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:33 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:55 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D751AD458C74EB", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:21:33 GMT", + "ETag" : "0x8D75659245A1515", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:55 GMT", "Content-Length" : "7", - "x-ms-request-id" : "16eed5f1-401e-013e-3196-83c002000000", - "x-ms-client-request-id" : "15af8015-011b-4615-9ba9-52b9a9defabd", + "x-ms-request-id" : "de492558-c01e-004d-3542-88f694000000", + "x-ms-client-request-id" : "38b9d948-1d08-4fa5-8fe6-2519929ee448", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacbb713285f82105e1a3/javablobcopydestac2blobapitestcopydestacbb748024fe05fa9", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac22197411f736793db3/javablobcopydestac2blobapitestcopydestac221277636667489", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "645ae475-573d-498c-a405-567c0950241c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f761c432-a91b-4508-9017-bc34445b7a49" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "49ff4748-1edd-4c47-a26e-cefdb07e9bcb", - "ETag" : "0x8D751AD459BE202", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:33 GMT", + "x-ms-copy-id" : "2baf9051-c78a-435f-9e7c-9144b4941dd3", + "ETag" : "0x8D756592466C25F", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:55 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eed5f9-401e-013e-3896-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", - "x-ms-client-request-id" : "645ae475-573d-498c-a405-567c0950241c" + "x-ms-request-id" : "de492570-c01e-004d-4742-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:55 GMT", + "x-ms-client-request-id" : "f761c432-a91b-4508-9017-bc34445b7a49" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac22197411f736793db3/javablobcopydestac2blobapitestcopydestac221277636667489", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "75ad3f47-d5d4-4cf2-86f9-847579f77260" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:55 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:55 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "de49273f-c01e-004d-2e42-88f694000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "2baf9051-c78a-435f-9e7c-9144b4941dd3", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac22197411f736793db3/javablobcopydestac1blobapitestcopydestac221005806d32172", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 19:01:56 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:55 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D756592466C25F", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "75ad3f47-d5d4-4cf2-86f9-847579f77260" }, "Exception" : null }, { @@ -129,8 +165,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopydestac&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "fe298601-32c8-4efc-b051-3515d213ba98" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b98c442d-868f-4f82-a5ed-9d006e13dfad" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -138,20 +174,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed612-401e-013e-4d96-83c002000000", - "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestacbb713285f82105e1a3Tue, 15 Oct 2019 20:21:33 GMT\"0x8D751AD457D4277\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", - "x-ms-client-request-id" : "fe298601-32c8-4efc-b051-3515d213ba98", + "x-ms-request-id" : "de492757-c01e-004d-3f42-88f694000000", + "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestac22197411f736793db3Mon, 21 Oct 2019 19:01:55 GMT\"0x8D756592449ED3A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:56 GMT", + "x-ms-client-request-id" : "b98c442d-868f-4f82-a5ed-9d006e13dfad", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacbb713285f82105e1a3?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac22197411f736793db3?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "21a57d08-43a8-47db-b84a-2e6e93b4886d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c43ee5e5-eeac-4308-83ab-ff1e5b4d0ef0" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -159,11 +195,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed61b-401e-013e-5396-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", - "x-ms-client-request-id" : "21a57d08-43a8-47db-b84a-2e6e93b4886d" + "x-ms-request-id" : "de49276d-c01e-004d-5042-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:56 GMT", + "x-ms-client-request-id" : "c43ee5e5-eeac-4308-83ab-ff1e5b4d0ef0" }, "Exception" : null } ], - "variables" : [ "jtccopydestac0blobapitestcopydestacbb713285f82105e1a3", "javablobcopydestac1blobapitestcopydestacbb7355034ee55ad", "javablobcopydestac2blobapitestcopydestacbb748024fe05fa9" ] + "variables" : [ "jtccopydestac0blobapitestcopydestac22197411f736793db3", "javablobcopydestac1blobapitestcopydestac221005806d32172", "javablobcopydestac2blobapitestcopydestac221277636667489" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[4].json index 65bd473f18b1..ee833831f8c1 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[4].json @@ -1,96 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac589228905042f79667?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac0ba31509f5998232ac?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1b89b62f-3c63-42d8-a249-afbd558dc5ec" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "24597ed7-1181-4f9b-80be-062308ef5a13" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD45B2420A", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:33 GMT", + "ETag" : "0x8D75659251D4FF1", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:57 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed629-401e-013e-5f96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", - "x-ms-client-request-id" : "1b89b62f-3c63-42d8-a249-afbd558dc5ec" + "x-ms-request-id" : "de4927a9-c01e-004d-7d42-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:56 GMT", + "x-ms-client-request-id" : "24597ed7-1181-4f9b-80be-062308ef5a13" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac589228905042f79667/javablobcopydestac1blobapitestcopydestac58975178aa84c26", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac0ba31509f5998232ac/javablobcopydestac1blobapitestcopydestac0ba286660fda546", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "40f0f418-9854-47bd-9717-71525d5ec1a8", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c9ec41dd-eb44-482b-9874-fa0b96fbf99e", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:33 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:57 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:56 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD45BABC50", + "ETag" : "0x8D75659252649B2", "Content-Length" : "0", - "x-ms-request-id" : "16eed62e-401e-013e-6396-83c002000000", - "x-ms-client-request-id" : "40f0f418-9854-47bd-9717-71525d5ec1a8" + "x-ms-request-id" : "de4927c1-c01e-004d-0f42-88f694000000", + "x-ms-client-request-id" : "c9ec41dd-eb44-482b-9874-fa0b96fbf99e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac589228905042f79667/javablobcopydestac2blobapitestcopydestac58995271800d535", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac0ba31509f5998232ac/javablobcopydestac2blobapitestcopydestac0ba430454cfcab4", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "074a9014-8c5c-44d1-9752-a1592f8aafa4", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "23035360-d589-4cc7-b327-268a244f7aeb", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:33 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:57 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:56 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD45C0FF58", + "ETag" : "0x8D75659252F73B6", "Content-Length" : "0", - "x-ms-request-id" : "16eed634-401e-013e-6896-83c002000000", - "x-ms-client-request-id" : "074a9014-8c5c-44d1-9752-a1592f8aafa4" + "x-ms-request-id" : "de4927db-c01e-004d-2342-88f694000000", + "x-ms-client-request-id" : "23035360-d589-4cc7-b327-268a244f7aeb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac589228905042f79667/javablobcopydestac2blobapitestcopydestac58995271800d535", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac0ba31509f5998232ac/javablobcopydestac2blobapitestcopydestac0ba430454cfcab4", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7340c084-f157-4b59-be8e-a37ab6a5cc4e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b721cce2-f223-4cd5-bdfa-f83f22fc6a60" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "aa1323a4-a0ba-493c-b721-8f17729339c6", - "ETag" : "0x8D751AD45C8A25F", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:33 GMT", + "x-ms-copy-id" : "85659b17-6468-4e38-853a-0f34a7783779", + "ETag" : "0x8D756592538C4D1", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:57 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eed63d-401e-013e-6f96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", - "x-ms-client-request-id" : "7340c084-f157-4b59-be8e-a37ab6a5cc4e" + "x-ms-request-id" : "de4927fa-c01e-004d-3c42-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:56 GMT", + "x-ms-client-request-id" : "b721cce2-f223-4cd5-bdfa-f83f22fc6a60" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac0ba31509f5998232ac/javablobcopydestac2blobapitestcopydestac0ba430454cfcab4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "d752bc1c-c5f9-4bc1-bd03-153d85115908" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:57 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "de4929a8-c01e-004d-3042-88f694000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "85659b17-6468-4e38-853a-0f34a7783779", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac0ba31509f5998232ac/javablobcopydestac1blobapitestcopydestac0ba286660fda546", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 19:01:58 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:57 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D756592538C4D1", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "d752bc1c-c5f9-4bc1-bd03-153d85115908" }, "Exception" : null }, { @@ -98,8 +134,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopydestac&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "aa4e66b3-ddb6-4330-b7a4-fa88f991a308" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "cf5cd160-ec8d-423a-b932-a3e4b726f9fd" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -107,20 +143,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed646-401e-013e-7796-83c002000000", - "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestac589228905042f79667Tue, 15 Oct 2019 20:21:33 GMT\"0x8D751AD45B2420A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", - "x-ms-client-request-id" : "aa4e66b3-ddb6-4330-b7a4-fa88f991a308", + "x-ms-request-id" : "de4929b4-c01e-004d-3a42-88f694000000", + "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestac0ba31509f5998232acMon, 21 Oct 2019 19:01:57 GMT\"0x8D75659251D4FF1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:58 GMT", + "x-ms-client-request-id" : "cf5cd160-ec8d-423a-b932-a3e4b726f9fd", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac589228905042f79667?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac0ba31509f5998232ac?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "920508ad-d1c9-435b-a36a-60a23d826e7e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "78bca28d-a1b3-4b50-8524-6ef1287f2bd0" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -128,11 +164,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed651-401e-013e-8096-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", - "x-ms-client-request-id" : "920508ad-d1c9-435b-a36a-60a23d826e7e" + "x-ms-request-id" : "de4929c6-c01e-004d-4842-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:58 GMT", + "x-ms-client-request-id" : "78bca28d-a1b3-4b50-8524-6ef1287f2bd0" }, "Exception" : null } ], - "variables" : [ "jtccopydestac0blobapitestcopydestac589228905042f79667", "javablobcopydestac1blobapitestcopydestac58975178aa84c26", "javablobcopydestac2blobapitestcopydestac58995271800d535" ] + "variables" : [ "jtccopydestac0blobapitestcopydestac0ba31509f5998232ac", "javablobcopydestac1blobapitestcopydestac0ba286660fda546", "javablobcopydestac2blobapitestcopydestac0ba430454cfcab4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[5].json index e729a85ea82b..f10191f0fcca 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[5].json @@ -1,118 +1,155 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac02f57191633cc3e1b3?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfe91831437e5cca311?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "66d97c92-d98a-4de9-bc48-14257fd1707f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "301170e8-b6ca-44e2-9755-ade119f21664" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD45DA6D47", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:33 GMT", + "ETag" : "0x8D7565925EDA4A6", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:58 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed654-401e-013e-0396-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", - "x-ms-client-request-id" : "66d97c92-d98a-4de9-bc48-14257fd1707f" + "x-ms-request-id" : "de4929e9-c01e-004d-6642-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:58 GMT", + "x-ms-client-request-id" : "301170e8-b6ca-44e2-9755-ade119f21664" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac02f57191633cc3e1b3/javablobcopydestac1blobapitestcopydestac02f334981cbb3f8", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfe91831437e5cca311/javablobcopydestac1blobapitestcopydestacfe9387107e7e914", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "72ff2bdf-ad87-490e-879d-18eb71aeefe2", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "02c30ff4-66d2-4914-a494-c3dec24f4a21", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:33 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:58 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:58 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD45E13985", + "ETag" : "0x8D7565925F4EFF1", "Content-Length" : "0", - "x-ms-request-id" : "16eed661-401e-013e-0f96-83c002000000", - "x-ms-client-request-id" : "72ff2bdf-ad87-490e-879d-18eb71aeefe2" + "x-ms-request-id" : "de4929fc-c01e-004d-7442-88f694000000", + "x-ms-client-request-id" : "02c30ff4-66d2-4914-a494-c3dec24f4a21" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac02f57191633cc3e1b3/javablobcopydestac2blobapitestcopydestac02f118431378b9d", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfe91831437e5cca311/javablobcopydestac2blobapitestcopydestacfe900488962c9d4", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ec9c6084-a508-41d3-bd52-e65f48d32b3b", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "5f2d1265-32b0-4f85-a0c3-97faef3f5114", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:34 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:58 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:58 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD45E7CAD7", + "ETag" : "0x8D7565925FBF68A", "Content-Length" : "0", - "x-ms-request-id" : "16eed672-401e-013e-1f96-83c002000000", - "x-ms-client-request-id" : "ec9c6084-a508-41d3-bd52-e65f48d32b3b" + "x-ms-request-id" : "de492a0e-c01e-004d-0642-88f694000000", + "x-ms-client-request-id" : "5f2d1265-32b0-4f85-a0c3-97faef3f5114" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac02f57191633cc3e1b3/javablobcopydestac2blobapitestcopydestac02f118431378b9d?comp=lease", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfe91831437e5cca311/javablobcopydestac2blobapitestcopydestacfe900488962c9d4?comp=lease", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5f27c8f7-1c99-432a-b609-05ab143dedaf" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "ebf2faaf-2f44-45be-ad35-28ea29a3a6d9" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD45E7CAD7", - "x-ms-lease-id" : "1375e416-8c94-40a5-8e83-9bbc1e9fa334", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:34 GMT", + "ETag" : "0x8D7565925FBF68A", + "x-ms-lease-id" : "921bd585-fe92-4a88-b797-ca179802d9d3", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:58 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed685-401e-013e-2f96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", - "x-ms-client-request-id" : "5f27c8f7-1c99-432a-b609-05ab143dedaf" + "x-ms-request-id" : "de492a22-c01e-004d-1842-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:58 GMT", + "x-ms-client-request-id" : "ebf2faaf-2f44-45be-ad35-28ea29a3a6d9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac02f57191633cc3e1b3/javablobcopydestac2blobapitestcopydestac02f118431378b9d", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfe91831437e5cca311/javablobcopydestac2blobapitestcopydestacfe900488962c9d4", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "dc313b5e-c5ca-4d0c-ad8c-565d21fd1758" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "88137e90-ea0d-412a-a1c5-667cbac0942c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "2c3d4b24-4eb9-46fe-b0a2-74d7e19a83af", - "ETag" : "0x8D751AD45F6E9D0", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:34 GMT", + "x-ms-copy-id" : "19134786-0697-4fc3-b62f-0910bc6e65a0", + "ETag" : "0x8D756592609B589", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:58 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eed697-401e-013e-3e96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", - "x-ms-client-request-id" : "dc313b5e-c5ca-4d0c-ad8c-565d21fd1758" + "x-ms-request-id" : "de492a31-c01e-004d-2642-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:58 GMT", + "x-ms-client-request-id" : "88137e90-ea0d-412a-a1c5-667cbac0942c" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfe91831437e5cca311/javablobcopydestac2blobapitestcopydestacfe900488962c9d4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "8a236e2f-519e-44bd-b738-63b85c990a6a" + }, + "Response" : { + "x-ms-lease-status" : "locked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "leased", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:58 GMT", + "x-ms-lease-duration" : "infinite", + "Content-Length" : "7", + "x-ms-request-id" : "de492bfe-c01e-004d-3542-88f694000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "19134786-0697-4fc3-b62f-0910bc6e65a0", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfe91831437e5cca311/javablobcopydestac1blobapitestcopydestacfe9387107e7e914", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 19:01:59 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:58 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D756592609B589", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "8a236e2f-519e-44bd-b738-63b85c990a6a" }, "Exception" : null }, { @@ -120,8 +157,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopydestac&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3db2b2ea-19b8-4b29-9243-7b033a0ab486" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "11ecbb5e-554e-4e7d-8689-bdf03ca2453b" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -129,20 +166,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed6a1-401e-013e-4796-83c002000000", - "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestac02f57191633cc3e1b3Tue, 15 Oct 2019 20:21:33 GMT\"0x8D751AD45DA6D47\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", - "x-ms-client-request-id" : "3db2b2ea-19b8-4b29-9243-7b033a0ab486", + "x-ms-request-id" : "de492c0b-c01e-004d-4242-88f694000000", + "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestacfe91831437e5cca311Mon, 21 Oct 2019 19:01:58 GMT\"0x8D7565925EDA4A6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:59 GMT", + "x-ms-client-request-id" : "11ecbb5e-554e-4e7d-8689-bdf03ca2453b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac02f57191633cc3e1b3?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacfe91831437e5cca311?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0bcdff12-f875-4558-a2ae-ed18c9274618" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "d8beea4f-ea13-4365-833e-9a55b0aa2628" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -150,11 +187,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed6ab-401e-013e-5096-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:33 GMT", - "x-ms-client-request-id" : "0bcdff12-f875-4558-a2ae-ed18c9274618" + "x-ms-request-id" : "de492c17-c01e-004d-4a42-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:59 GMT", + "x-ms-client-request-id" : "d8beea4f-ea13-4365-833e-9a55b0aa2628" }, "Exception" : null } ], - "variables" : [ "jtccopydestac0blobapitestcopydestac02f57191633cc3e1b3", "javablobcopydestac1blobapitestcopydestac02f334981cbb3f8", "javablobcopydestac2blobapitestcopydestac02f118431378b9d" ] + "variables" : [ "jtccopydestac0blobapitestcopydestacfe91831437e5cca311", "javablobcopydestac1blobapitestcopydestacfe9387107e7e914", "javablobcopydestac2blobapitestcopydestacfe900488962c9d4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymetadata[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymetadata[0].json index c97c92b1ec4f..df885427580c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymetadata[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymetadata[0].json @@ -1,107 +1,143 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9cb38080f9ec8781?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadatab08024283066dbab?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "53a49224-0e15-4f1f-b63a-604edaa199de" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "9975eb8b-208f-4f5f-b838-c50f455daa91" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD41DA80C4", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:27 GMT", + "ETag" : "0x8D756591B66A1D0", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eecf7b-401e-013e-3596-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:26 GMT", - "x-ms-client-request-id" : "53a49224-0e15-4f1f-b63a-604edaa199de" + "x-ms-request-id" : "de490d0e-c01e-004d-1841-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:40 GMT", + "x-ms-client-request-id" : "9975eb8b-208f-4f5f-b838-c50f455daa91" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9cb38080f9ec8781/javablobcopymetadata1blobapitestcopymetadata9cb15088a5bdf", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadatab08024283066dbab/javablobcopymetadata1blobapitestcopymetadatab0860407a829a", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f724fd3e-c99e-4f98-ba90-94b8ec051d35", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "2ce9426c-2596-493c-b8c9-a88642f7b474", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:27 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:40 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:26 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:40 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD41E2345F", + "ETag" : "0x8D756591B6F9F58", "Content-Length" : "0", - "x-ms-request-id" : "16eecf96-401e-013e-4d96-83c002000000", - "x-ms-client-request-id" : "f724fd3e-c99e-4f98-ba90-94b8ec051d35" + "x-ms-request-id" : "de490d2e-c01e-004d-3041-88f694000000", + "x-ms-client-request-id" : "2ce9426c-2596-493c-b8c9-a88642f7b474" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9cb38080f9ec8781/javablobcopymetadata2blobapitestcopymetadata9cb333856cc0a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadatab08024283066dbab/javablobcopymetadata2blobapitestcopymetadatab0879889c9b85", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "fe0628c4-9b59-4576-8ba3-f4fe2f7dcf1b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "3648d3eb-af51-41f2-bbf2-d5b89811b483" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "1e7d2ab0-9b06-4718-a8cf-c75b8c2b3ab3", - "ETag" : "0x8D751AD41EA9AE6", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:27 GMT", + "x-ms-copy-id" : "63e7e55d-08e5-4a28-a1f2-94b078391904", + "ETag" : "0x8D756591B92993E", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:41 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eecfa2-401e-013e-5896-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:26 GMT", - "x-ms-client-request-id" : "fe0628c4-9b59-4576-8ba3-f4fe2f7dcf1b" + "x-ms-request-id" : "de490d3c-c01e-004d-3a41-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:40 GMT", + "x-ms-client-request-id" : "3648d3eb-af51-41f2-bbf2-d5b89811b483" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9cb38080f9ec8781/javablobcopymetadata2blobapitestcopymetadata9cb333856cc0a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadatab08024283066dbab/javablobcopymetadata2blobapitestcopymetadatab0879889c9b85", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3458de68-5635-444a-8695-7e8e4ef188da" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "52983de2-474e-41bf-8adb-30b22eb32737" }, "Response" : { "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:27 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:41 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-blob-type" : "BlockBlob", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:21:27 GMT", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:41 GMT", "Content-Length" : "7", - "x-ms-request-id" : "16eecfe6-401e-013e-1596-83c002000000", + "x-ms-request-id" : "de490f27-c01e-004d-4541-88f694000000", "Content-Type" : "application/octet-stream", "x-ms-version" : "2019-02-02", - "x-ms-copy-id" : "1e7d2ab0-9b06-4718-a8cf-c75b8c2b3ab3", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9cb38080f9ec8781/javablobcopymetadata1blobapitestcopymetadata9cb15088a5bdf", + "x-ms-copy-id" : "63e7e55d-08e5-4a28-a1f2-94b078391904", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadatab08024283066dbab/javablobcopymetadata1blobapitestcopymetadatab0860407a829a", "x-ms-copy-progress" : "7/7", - "Date" : "Tue, 15 Oct 2019 20:21:27 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:41 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "x-ms-copy-completion-time" : "Tue, 15 Oct 2019 20:21:27 GMT", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:41 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D751AD41EA9AE6", + "ETag" : "0x8D756591B92993E", "x-ms-copy-status" : "success", - "x-ms-client-request-id" : "3458de68-5635-444a-8695-7e8e4ef188da" + "x-ms-client-request-id" : "52983de2-474e-41bf-8adb-30b22eb32737" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadatab08024283066dbab/javablobcopymetadata2blobapitestcopymetadatab0879889c9b85", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "986cfd85-af5b-40a4-bbdd-cb60887eb735" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:41 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:41 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "de490f31-c01e-004d-4e41-88f694000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "63e7e55d-08e5-4a28-a1f2-94b078391904", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadatab08024283066dbab/javablobcopymetadata1blobapitestcopymetadatab0860407a829a", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 19:01:41 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:41 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D756591B92993E", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "986cfd85-af5b-40a4-bbdd-cb60887eb735" }, "Exception" : null }, { @@ -109,8 +145,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopymetadata&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7e1a6798-42f5-49ef-8e90-811bf6e12895" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "6eef281b-2aa1-492a-beb2-daccffdd2ef6" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -118,20 +154,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eecff0-401e-013e-1c96-83c002000000", - "Body" : "jtccopymetadatajtccopymetadata0blobapitestcopymetadata9cb38080f9ec8781Tue, 15 Oct 2019 20:21:27 GMT\"0x8D751AD41DA80C4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:27 GMT", - "x-ms-client-request-id" : "7e1a6798-42f5-49ef-8e90-811bf6e12895", + "x-ms-request-id" : "de490f37-c01e-004d-5441-88f694000000", + "Body" : "jtccopymetadatajtccopymetadata0blobapitestcopymetadatab08024283066dbabMon, 21 Oct 2019 19:01:40 GMT\"0x8D756591B66A1D0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:41 GMT", + "x-ms-client-request-id" : "6eef281b-2aa1-492a-beb2-daccffdd2ef6", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9cb38080f9ec8781?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadatab08024283066dbab?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5ca3285a-d6f1-4af0-903c-f09e1649989c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "47aa3413-7f84-4a36-af63-5ade166580bb" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -139,11 +175,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eecff9-401e-013e-2296-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:27 GMT", - "x-ms-client-request-id" : "5ca3285a-d6f1-4af0-903c-f09e1649989c" + "x-ms-request-id" : "de490f3e-c01e-004d-5a41-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:41 GMT", + "x-ms-client-request-id" : "47aa3413-7f84-4a36-af63-5ade166580bb" }, "Exception" : null } ], - "variables" : [ "jtccopymetadata0blobapitestcopymetadata9cb38080f9ec8781", "javablobcopymetadata1blobapitestcopymetadata9cb15088a5bdf", "javablobcopymetadata2blobapitestcopymetadata9cb333856cc0a" ] + "variables" : [ "jtccopymetadata0blobapitestcopymetadatab08024283066dbab", "javablobcopymetadata1blobapitestcopymetadatab0860407a829a", "javablobcopymetadata2blobapitestcopymetadatab0879889c9b85" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymetadata[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymetadata[1].json index 61fa5672714a..586dac8760b6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymetadata[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymetadata[1].json @@ -1,109 +1,147 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata65d86513ed83d5b7?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9a587910a432133c?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9669c536-bbe0-4c5e-8630-1d9a04c0de6c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "88699bd3-ad61-49f1-9415-411f90ac1497" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD42630BEA", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:28 GMT", + "ETag" : "0x8D756591C474E9D", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed07a-401e-013e-1696-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:27 GMT", - "x-ms-client-request-id" : "9669c536-bbe0-4c5e-8630-1d9a04c0de6c" + "x-ms-request-id" : "de490f4d-c01e-004d-6341-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:41 GMT", + "x-ms-client-request-id" : "88699bd3-ad61-49f1-9415-411f90ac1497" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata65d86513ed83d5b7/javablobcopymetadata1blobapitestcopymetadata65d83892f23ef", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9a587910a432133c/javablobcopymetadata1blobapitestcopymetadata9a593742efd57", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0726f55d-76c6-48f0-9877-069b3ada9591", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "cbb180e3-0ed1-4173-8e29-92cb84fb7991", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:28 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:42 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:27 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:42 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD426AE719", + "ETag" : "0x8D756591C4E7635", "Content-Length" : "0", - "x-ms-request-id" : "16eed08c-401e-013e-2496-83c002000000", - "x-ms-client-request-id" : "0726f55d-76c6-48f0-9877-069b3ada9591" + "x-ms-request-id" : "de490f62-c01e-004d-7541-88f694000000", + "x-ms-client-request-id" : "cbb180e3-0ed1-4173-8e29-92cb84fb7991" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata65d86513ed83d5b7/javablobcopymetadata2blobapitestcopymetadata65d551329910c", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9a587910a432133c/javablobcopymetadata2blobapitestcopymetadata9a528558fb702", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7ae29f51-6b0f-40f1-ae39-5a169f8e5608" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "013b3908-7f36-4cfe-99d2-a835f5d185e8" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "cdb2ad15-616a-40e6-a10d-18ecbc6e6607", - "ETag" : "0x8D751AD4274111C", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:28 GMT", + "x-ms-copy-id" : "a28b4edb-cbce-4ac0-abdd-10e504df3fd5", + "ETag" : "0x8D756591C552E96", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:42 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eed091-401e-013e-2896-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:27 GMT", - "x-ms-client-request-id" : "7ae29f51-6b0f-40f1-ae39-5a169f8e5608" + "x-ms-request-id" : "de490f78-c01e-004d-0941-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:42 GMT", + "x-ms-client-request-id" : "013b3908-7f36-4cfe-99d2-a835f5d185e8" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata65d86513ed83d5b7/javablobcopymetadata2blobapitestcopymetadata65d551329910c", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9a587910a432133c/javablobcopymetadata2blobapitestcopymetadata9a528558fb702", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d8a04d8a-723b-4ce1-9be5-50b7a01ff703" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "5d4b6a1c-25ee-4f09-89be-a602f57a99cc" }, "Response" : { "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:28 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:42 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-blob-type" : "BlockBlob", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:21:28 GMT", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:42 GMT", "Content-Length" : "7", - "x-ms-request-id" : "16eed107-401e-013e-0b96-83c002000000", + "x-ms-request-id" : "de4910fd-c01e-004d-5341-88f694000000", "x-ms-meta-fizz" : "buzz", "Content-Type" : "application/octet-stream", "x-ms-version" : "2019-02-02", - "x-ms-copy-id" : "cdb2ad15-616a-40e6-a10d-18ecbc6e6607", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata65d86513ed83d5b7/javablobcopymetadata1blobapitestcopymetadata65d83892f23ef", + "x-ms-copy-id" : "a28b4edb-cbce-4ac0-abdd-10e504df3fd5", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9a587910a432133c/javablobcopymetadata1blobapitestcopymetadata9a593742efd57", "x-ms-copy-progress" : "7/7", - "Date" : "Tue, 15 Oct 2019 20:21:28 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:43 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "x-ms-meta-foo" : "bar", - "x-ms-copy-completion-time" : "Tue, 15 Oct 2019 20:21:28 GMT", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:42 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D751AD4274111C", + "ETag" : "0x8D756591C552E96", "x-ms-copy-status" : "success", - "x-ms-client-request-id" : "d8a04d8a-723b-4ce1-9be5-50b7a01ff703" + "x-ms-client-request-id" : "5d4b6a1c-25ee-4f09-89be-a602f57a99cc" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9a587910a432133c/javablobcopymetadata2blobapitestcopymetadata9a528558fb702", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1674ea68-18be-4fd2-937f-611841ae5ac9" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:42 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:42 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "de491109-c01e-004d-5f41-88f694000000", + "x-ms-meta-fizz" : "buzz", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "a28b4edb-cbce-4ac0-abdd-10e504df3fd5", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9a587910a432133c/javablobcopymetadata1blobapitestcopymetadata9a593742efd57", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 19:01:43 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-meta-foo" : "bar", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:42 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D756591C552E96", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "1674ea68-18be-4fd2-937f-611841ae5ac9" }, "Exception" : null }, { @@ -111,8 +149,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopymetadata&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d4de84d3-21f7-44b5-b409-a5796a108da3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f0715b54-325a-4958-9274-927e0e062035" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -120,20 +158,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed10e-401e-013e-1296-83c002000000", - "Body" : "jtccopymetadatajtccopymetadata0blobapitestcopymetadata65d86513ed83d5b7Tue, 15 Oct 2019 20:21:28 GMT\"0x8D751AD42630BEA\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:28 GMT", - "x-ms-client-request-id" : "d4de84d3-21f7-44b5-b409-a5796a108da3", + "x-ms-request-id" : "de491114-c01e-004d-6741-88f694000000", + "Body" : "jtccopymetadatajtccopymetadata0blobapitestcopymetadata9a587910a432133cMon, 21 Oct 2019 19:01:42 GMT\"0x8D756591C474E9D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:43 GMT", + "x-ms-client-request-id" : "f0715b54-325a-4958-9274-927e0e062035", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata65d86513ed83d5b7?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymetadata0blobapitestcopymetadata9a587910a432133c?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1abc5d5c-bfa7-4ab1-9864-d48af3905fb8" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "9b1814b3-477e-44e0-bc88-adebe8513c21" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -141,11 +179,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed119-401e-013e-1d96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:28 GMT", - "x-ms-client-request-id" : "1abc5d5c-bfa7-4ab1-9864-d48af3905fb8" + "x-ms-request-id" : "de491124-c01e-004d-7441-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:43 GMT", + "x-ms-client-request-id" : "9b1814b3-477e-44e0-bc88-adebe8513c21" }, "Exception" : null } ], - "variables" : [ "jtccopymetadata0blobapitestcopymetadata65d86513ed83d5b7", "javablobcopymetadata1blobapitestcopymetadata65d83892f23ef", "javablobcopymetadata2blobapitestcopymetadata65d551329910c" ] + "variables" : [ "jtccopymetadata0blobapitestcopymetadata9a587910a432133c", "javablobcopymetadata1blobapitestcopymetadata9a593742efd57", "javablobcopymetadata2blobapitestcopymetadata9a528558fb702" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymin.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymin.json index 3f3efd55e9b1..ee43e429b769 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymin.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymin.json @@ -1,71 +1,107 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin40a24445af0403376a904?restype=container", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c0917ae3-74fe-4944-aa4b-61bafa069271" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "a8b9b215-eff4-4750-ba1f-c0bae92dfc5c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD417A6F12", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:26 GMT", + "ETag" : "0x8D75648AAB11901", + "Last-Modified" : "Mon, 21 Oct 2019 17:03:59 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eecec2-401e-013e-1b96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:26 GMT", - "x-ms-client-request-id" : "c0917ae3-74fe-4944-aa4b-61bafa069271" + "x-ms-request-id" : "0a1012e0-f01e-012c-5531-88f41e000000", + "Date" : "Mon, 21 Oct 2019 17:03:59 GMT", + "x-ms-client-request-id" : "a8b9b215-eff4-4750-ba1f-c0bae92dfc5c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin40a24445af0403376a904/javablobcopymin1blobapitestcopymin40a1633638ca0044c3", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674/javablobcopymin1blobapitestcopymin2d369168cc897f8e91", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e1285fbc-f557-41b5-a5e5-5b3c747f9026", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "51f2c017-9330-4aef-a90d-4c44f38de1a2", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:26 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 17:03:59 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:26 GMT", + "Date" : "Mon, 21 Oct 2019 17:03:59 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD41A34732", + "ETag" : "0x8D75648AAC01918", "Content-Length" : "0", - "x-ms-request-id" : "16eecf04-401e-013e-5096-83c002000000", - "x-ms-client-request-id" : "e1285fbc-f557-41b5-a5e5-5b3c747f9026" + "x-ms-request-id" : "0a101325-f01e-012c-7e31-88f41e000000", + "x-ms-client-request-id" : "51f2c017-9330-4aef-a90d-4c44f38de1a2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin40a24445af0403376a904/javablobcopymin1blobapitestcopymin40a1633638ca0044c3", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674/javablobcopymin2blobapitestcopymin2d374351eee8a25358", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "163b93b1-9497-4288-a8c1-f199a61e41e2" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c062486b-d044-4ce7-a0cd-4737ae4eb0d9" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "a9b04278-ebfd-4240-9494-19cd97f84c07", - "ETag" : "0x8D751AD41A9FF9D", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:26 GMT", + "x-ms-copy-id" : "4f0c2a5d-549e-4f4a-bc4b-cd8cac86c16a", + "ETag" : "0x8D75648AAD245CD", + "Last-Modified" : "Mon, 21 Oct 2019 17:03:59 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eecf0a-401e-013e-5696-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:26 GMT", - "x-ms-client-request-id" : "163b93b1-9497-4288-a8c1-f199a61e41e2" + "x-ms-request-id" : "0a101369-f01e-012c-2f31-88f41e000000", + "Date" : "Mon, 21 Oct 2019 17:03:59 GMT", + "x-ms-client-request-id" : "c062486b-d044-4ce7-a0cd-4737ae4eb0d9" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674/javablobcopymin2blobapitestcopymin2d374351eee8a25358", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "876e96c8-d476-4273-91b3-15c4ee82c037" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 21 Oct 2019 17:03:59 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 17:03:59 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "0a1015ab-f01e-012c-7d31-88f41e000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "4f0c2a5d-549e-4f4a-bc4b-cd8cac86c16a", + "x-ms-copy-source" : "https://storageaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674/javablobcopymin1blobapitestcopymin2d369168cc897f8e91", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 17:04:00 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 17:03:59 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D75648AAD245CD", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "876e96c8-d476-4273-91b3-15c4ee82c037" }, "Exception" : null }, { @@ -73,8 +109,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopymin&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5d34a843-b5c5-489a-9f10-4131be3decf9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "ff978f7a-403e-4ac1-bc71-606104da21ee" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -82,20 +118,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eecf1f-401e-013e-6996-83c002000000", - "Body" : "jtccopyminjtccopymin0blobapitestcopymin40a24445af0403376a904Tue, 15 Oct 2019 20:21:26 GMT\"0x8D751AD417A6F12\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:26 GMT", - "x-ms-client-request-id" : "5d34a843-b5c5-489a-9f10-4131be3decf9", + "x-ms-request-id" : "0a1015d3-f01e-012c-1931-88f41e000000", + "Body" : "jtccopyminjtccopymin0blobapitestcopymin2d384169a9b8e78655674Mon, 21 Oct 2019 17:03:59 GMT\"0x8D75648AAB11901\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 17:04:00 GMT", + "x-ms-client-request-id" : "ff978f7a-403e-4ac1-bc71-606104da21ee", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin40a24445af0403376a904?restype=container", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a77d3e99-63a6-453f-9d8f-c49694dd8a88" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "395ea0d7-425e-4e93-aea0-1d0f7c15ef40" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -103,11 +139,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eecf29-401e-013e-7096-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:26 GMT", - "x-ms-client-request-id" : "a77d3e99-63a6-453f-9d8f-c49694dd8a88" + "x-ms-request-id" : "0a1015ee-f01e-012c-2d31-88f41e000000", + "Date" : "Mon, 21 Oct 2019 17:04:00 GMT", + "x-ms-client-request-id" : "395ea0d7-425e-4e93-aea0-1d0f7c15ef40" }, "Exception" : null } ], - "variables" : [ "jtccopymin0blobapitestcopymin40a24445af0403376a904", "javablobcopymin1blobapitestcopymin40a1633638ca0044c3" ] + "variables" : [ "jtccopymin0blobapitestcopymin2d384169a9b8e78655674", "javablobcopymin1blobapitestcopymin2d369168cc897f8e91", "javablobcopymin2blobapitestcopymin2d374351eee8a25358" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopypoller.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopypoller.json index 8d539e5bb526..d5aeeb5ce8fd 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopypoller.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopypoller.json @@ -1,175 +1,152 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff?restype=container", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "38ffc126-a960-4422-9483-6f15c7ff63ca" + "x-ms-client-request-id" : "bdfb2c02-63b4-4a48-a849-68caac56c97e" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7529B4D6F2811", - "Last-Modified" : "Thu, 17 Oct 2019 00:45:26 GMT", + "ETag" : "0x8D75648AB963243", + "Last-Modified" : "Mon, 21 Oct 2019 17:04:01 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "9d9971cb-001e-00d8-1584-8497a7000000", - "Date" : "Thu, 17 Oct 2019 00:45:26 GMT", - "x-ms-client-request-id" : "38ffc126-a960-4422-9483-6f15c7ff63ca" + "x-ms-request-id" : "0a101620-f01e-012c-5531-88f41e000000", + "Date" : "Mon, 21 Oct 2019 17:04:00 GMT", + "x-ms-client-request-id" : "bdfb2c02-63b4-4a48-a849-68caac56c97e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller1blobapitestcopypoller3a1499542089c08", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller1blobapitestcopypoller4c77708991b060a", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "4dd7bbaa-e59d-43bf-9c76-8fe4f705884d", + "x-ms-client-request-id" : "b354d5b2-74dd-43d7-8664-fc43158645d9", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Thu, 17 Oct 2019 00:45:27 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 17:04:01 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 17 Oct 2019 00:45:27 GMT", + "Date" : "Mon, 21 Oct 2019 17:04:00 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7529B4D9EECFA", + "ETag" : "0x8D75648AB9D8DE4", "Content-Length" : "0", - "x-ms-request-id" : "9d997217-001e-00d8-5784-8497a7000000", - "x-ms-client-request-id" : "4dd7bbaa-e59d-43bf-9c76-8fe4f705884d" + "x-ms-request-id" : "0a10163f-f01e-012c-6d31-88f41e000000", + "x-ms-client-request-id" : "b354d5b2-74dd-43d7-8664-fc43158645d9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller2blobapitestcopypoller3a137183fc57c48", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller2blobapitestcopypoller4c7989982b85210", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "e7726eda-b242-46cd-9dda-f4717e8b9144" + "x-ms-client-request-id" : "c860ad6e-4bb8-447f-98fe-fb934910a9b9" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "5bd8fac4-9277-45a2-9e4e-495043105346", - "ETag" : "0x8D7529B4DAEA831", - "Last-Modified" : "Thu, 17 Oct 2019 00:45:27 GMT", + "x-ms-copy-id" : "96961cc0-f791-4c6f-91e0-1d6fc92f1cf3", + "ETag" : "0x8D75648ABA6699A", + "Last-Modified" : "Mon, 21 Oct 2019 17:04:01 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "9d997232-001e-00d8-6f84-8497a7000000", - "Date" : "Thu, 17 Oct 2019 00:45:27 GMT", - "x-ms-client-request-id" : "e7726eda-b242-46cd-9dda-f4717e8b9144" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller2blobapitestcopypoller3a137183fc57c48", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "0ce2657b-3890-4106-b561-82f78511b8ab" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "faa83f4c-3538-404e-86fe-0c7524c9b883", - "ETag" : "0x8D7529B4DBD0386", - "Last-Modified" : "Thu, 17 Oct 2019 00:45:27 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "x-ms-copy-status" : "success", - "StatusCode" : "202", - "x-ms-request-id" : "9d99724c-001e-00d8-0484-8497a7000000", - "Date" : "Thu, 17 Oct 2019 00:45:27 GMT", - "x-ms-client-request-id" : "0ce2657b-3890-4106-b561-82f78511b8ab" + "x-ms-request-id" : "0a101655-f01e-012c-8031-88f41e000000", + "Date" : "Mon, 21 Oct 2019 17:04:00 GMT", + "x-ms-client-request-id" : "c860ad6e-4bb8-447f-98fe-fb934910a9b9" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller2blobapitestcopypoller3a137183fc57c48", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller2blobapitestcopypoller4c7989982b85210", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "640b28be-b3b1-498d-8e1f-7dc8f8040dbb" + "x-ms-client-request-id" : "5f96adcc-b8d6-4515-9cbf-6a206eba835c" }, "Response" : { "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 17 Oct 2019 00:45:27 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 17:04:01 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-blob-type" : "BlockBlob", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "x-ms-creation-time" : "Thu, 17 Oct 2019 00:45:27 GMT", + "x-ms-creation-time" : "Mon, 21 Oct 2019 17:04:01 GMT", "Content-Length" : "7", - "x-ms-request-id" : "9d99735e-001e-00d8-6684-8497a7000000", + "x-ms-request-id" : "0a10184b-f01e-012c-1c31-88f41e000000", "Content-Type" : "application/octet-stream", "x-ms-version" : "2019-02-02", - "x-ms-copy-id" : "faa83f4c-3538-404e-86fe-0c7524c9b883", - "x-ms-copy-source" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller1blobapitestcopypoller3a1499542089c08", + "x-ms-copy-id" : "96961cc0-f791-4c6f-91e0-1d6fc92f1cf3", + "x-ms-copy-source" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller1blobapitestcopypoller4c77708991b060a", "x-ms-copy-progress" : "7/7", - "Date" : "Thu, 17 Oct 2019 00:45:28 GMT", + "Date" : "Mon, 21 Oct 2019 17:04:02 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "x-ms-copy-completion-time" : "Thu, 17 Oct 2019 00:45:27 GMT", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 17:04:01 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7529B4DBD0386", + "ETag" : "0x8D75648ABA6699A", "x-ms-copy-status" : "success", - "x-ms-client-request-id" : "640b28be-b3b1-498d-8e1f-7dc8f8040dbb" + "x-ms-client-request-id" : "5f96adcc-b8d6-4515-9cbf-6a206eba835c" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller2blobapitestcopypoller3a137183fc57c48", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller2blobapitestcopypoller4c7989982b85210", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "cea082d8-c4bb-47a0-9e15-bd7ee73365c6" + "x-ms-client-request-id" : "0fae8b27-0c52-44cb-989a-b964b3ed384d" }, "Response" : { "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 17 Oct 2019 00:45:27 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 17:04:01 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-blob-type" : "BlockBlob", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "x-ms-creation-time" : "Thu, 17 Oct 2019 00:45:27 GMT", + "x-ms-creation-time" : "Mon, 21 Oct 2019 17:04:01 GMT", "Content-Length" : "7", - "x-ms-request-id" : "9d99811e-001e-00d8-6184-8497a7000000", + "x-ms-request-id" : "0a101860-f01e-012c-2c31-88f41e000000", "Content-Type" : "application/octet-stream", "x-ms-version" : "2019-02-02", - "x-ms-copy-id" : "faa83f4c-3538-404e-86fe-0c7524c9b883", - "x-ms-copy-source" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff/javablobcopypoller1blobapitestcopypoller3a1499542089c08", + "x-ms-copy-id" : "96961cc0-f791-4c6f-91e0-1d6fc92f1cf3", + "x-ms-copy-source" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller1blobapitestcopypoller4c77708991b060a", "x-ms-copy-progress" : "7/7", - "Date" : "Thu, 17 Oct 2019 00:45:40 GMT", + "Date" : "Mon, 21 Oct 2019 17:04:02 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "x-ms-copy-completion-time" : "Thu, 17 Oct 2019 00:45:27 GMT", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 17:04:01 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7529B4DBD0386", + "ETag" : "0x8D75648ABA6699A", "x-ms-copy-status" : "success", - "x-ms-client-request-id" : "cea082d8-c4bb-47a0-9e15-bd7ee73365c6" + "x-ms-client-request-id" : "0fae8b27-0c52-44cb-989a-b964b3ed384d" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://storageaccount.blob.core.windows.net?prefix=jtccopypoller&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopypoller&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "ff18891a-417d-4460-9d83-c21beb73f8e9" + "x-ms-client-request-id" : "395ea55c-19ac-4c21-b8d8-87309a6d952a" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -177,20 +154,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "9d99812a-001e-00d8-6d84-8497a7000000", - "Body" : "jtccopypollerjtccopypoller0blobapitestcopypoller3a1062384d8832d2ffThu, 17 Oct 2019 00:45:26 GMT\"0x8D7529B4D6F2811\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 17 Oct 2019 00:45:40 GMT", - "x-ms-client-request-id" : "ff18891a-417d-4460-9d83-c21beb73f8e9", + "x-ms-request-id" : "0a101878-f01e-012c-4031-88f41e000000", + "Body" : "jtccopypollerjtccopypoller0blobapitestcopypoller4c77667741fdc13040Mon, 21 Oct 2019 17:04:01 GMT\"0x8D75648AB963243\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 17:04:02 GMT", + "x-ms-client-request-id" : "395ea55c-19ac-4c21-b8d8-87309a6d952a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff?restype=container", + "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "225a2053-ecbf-4ebd-a7b7-e18509848f2a" + "x-ms-client-request-id" : "49e6411f-e05f-44a6-aa1c-6baa18dbc10a" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -198,11 +175,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "9d998150-001e-00d8-0c84-8497a7000000", - "Date" : "Thu, 17 Oct 2019 00:45:40 GMT", - "x-ms-client-request-id" : "225a2053-ecbf-4ebd-a7b7-e18509848f2a" + "x-ms-request-id" : "0a101885-f01e-012c-4a31-88f41e000000", + "Date" : "Mon, 21 Oct 2019 17:04:02 GMT", + "x-ms-client-request-id" : "49e6411f-e05f-44a6-aa1c-6baa18dbc10a" }, "Exception" : null } ], - "variables" : [ "jtccopypoller0blobapitestcopypoller3a1062384d8832d2ff", "javablobcopypoller1blobapitestcopypoller3a1499542089c08", "javablobcopypoller2blobapitestcopypoller3a137183fc57c48" ] -} + "variables" : [ "jtccopypoller0blobapitestcopypoller4c77667741fdc13040", "javablobcopypoller1blobapitestcopypoller4c77708991b060a", "javablobcopypoller2blobapitestcopypoller4c7989982b85210" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[0].json index f840e93de0ca..2468201befc8 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[0].json @@ -1,71 +1,107 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac64314302f63816e5?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceace8e764119dc878ab?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "bf72b772-7253-4a10-b518-f480660402fd" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "d20dd17a-dd1c-4d90-bf0a-19160b060a6a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD431CC531", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:29 GMT", + "ETag" : "0x8D756591D1A6323", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed19f-401e-013e-1596-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:28 GMT", - "x-ms-client-request-id" : "bf72b772-7253-4a10-b518-f480660402fd" + "x-ms-request-id" : "de49114d-c01e-004d-1941-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:43 GMT", + "x-ms-client-request-id" : "d20dd17a-dd1c-4d90-bf0a-19160b060a6a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac64314302f63816e5/javablobcopysourceac1blobapitestcopysourceac64339101ed3ac", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceace8e764119dc878ab/javablobcopysourceac1blobapitestcopysourceace8e352807c00f", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6f7895fd-9971-4512-a8e5-15029cb32f14", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "e408ea64-916d-44bb-b0e2-c88214af8080", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:29 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:43 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:28 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:43 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD4325D9C3", + "ETag" : "0x8D756591D21B16F", "Content-Length" : "0", - "x-ms-request-id" : "16eed1b1-401e-013e-2496-83c002000000", - "x-ms-client-request-id" : "6f7895fd-9971-4512-a8e5-15029cb32f14" + "x-ms-request-id" : "de491159-c01e-004d-2441-88f694000000", + "x-ms-client-request-id" : "e408ea64-916d-44bb-b0e2-c88214af8080" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac64314302f63816e5/javablobcopysourceac2blobapitestcopysourceac64303935382e4", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceace8e764119dc878ab/javablobcopysourceac2blobapitestcopysourceace8e004456f864", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5776fa4f-5e39-4f73-89c8-127228351b3c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "748efbad-6e2c-4662-a358-0e2517fabd61" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "a300472c-3148-4c3e-b669-abe510616d89", - "ETag" : "0x8D751AD432F2ADE", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:29 GMT", + "x-ms-copy-id" : "ecc7848f-f621-4c7e-8267-a4801c821fca", + "ETag" : "0x8D756591D29A29D", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:43 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eed1b9-401e-013e-2c96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:29 GMT", - "x-ms-client-request-id" : "5776fa4f-5e39-4f73-89c8-127228351b3c" + "x-ms-request-id" : "de49116d-c01e-004d-3641-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:43 GMT", + "x-ms-client-request-id" : "748efbad-6e2c-4662-a358-0e2517fabd61" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceace8e764119dc878ab/javablobcopysourceac2blobapitestcopysourceace8e004456f864", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "d0493dc6-3f29-4b73-b138-b3c04719e54b" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:43 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:43 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "de491314-c01e-004d-2041-88f694000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "ecc7848f-f621-4c7e-8267-a4801c821fca", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceace8e764119dc878ab/javablobcopysourceac1blobapitestcopysourceace8e352807c00f", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 19:01:44 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:43 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D756591D29A29D", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "d0493dc6-3f29-4b73-b138-b3c04719e54b" }, "Exception" : null }, { @@ -73,8 +109,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopysourceac&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "684778c9-fefb-452a-ba45-e48884659ea5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "906196ed-cd59-4643-a0c8-a0b2e0852714" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -82,20 +118,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed210-401e-013e-7596-83c002000000", - "Body" : "jtccopysourceacjtccopysourceac0blobapitestcopysourceac64314302f63816e5Tue, 15 Oct 2019 20:21:29 GMT\"0x8D751AD431CC531\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:29 GMT", - "x-ms-client-request-id" : "684778c9-fefb-452a-ba45-e48884659ea5", + "x-ms-request-id" : "de491329-c01e-004d-3341-88f694000000", + "Body" : "jtccopysourceacjtccopysourceac0blobapitestcopysourceace8e764119dc878abMon, 21 Oct 2019 19:01:43 GMT\"0x8D756591D1A6323\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:44 GMT", + "x-ms-client-request-id" : "906196ed-cd59-4643-a0c8-a0b2e0852714", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac64314302f63816e5?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceace8e764119dc878ab?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1d5111e1-1fd0-47ef-bd8a-656ec69a6604" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "5907542b-d475-4b4b-a333-d7f3a4d9cf4e" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -103,11 +139,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed218-401e-013e-7c96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:29 GMT", - "x-ms-client-request-id" : "1d5111e1-1fd0-47ef-bd8a-656ec69a6604" + "x-ms-request-id" : "de491333-c01e-004d-3c41-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:44 GMT", + "x-ms-client-request-id" : "5907542b-d475-4b4b-a333-d7f3a4d9cf4e" }, "Exception" : null } ], - "variables" : [ "jtccopysourceac0blobapitestcopysourceac64314302f63816e5", "javablobcopysourceac1blobapitestcopysourceac64339101ed3ac", "javablobcopysourceac2blobapitestcopysourceac64303935382e4" ] + "variables" : [ "jtccopysourceac0blobapitestcopysourceace8e764119dc878ab", "javablobcopysourceac1blobapitestcopysourceace8e352807c00f", "javablobcopysourceac2blobapitestcopysourceace8e004456f864" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[1].json index e6b592d02a24..fb2601c4120a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[1].json @@ -1,71 +1,107 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac858713545e96e134?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac2b721837c6e62e66?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "63713639-ce6c-46fb-9add-5a7b8a5b6929" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "83f12d63-66d3-4177-bf82-939049387117" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD43858B94", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:30 GMT", + "ETag" : "0x8D756591DD8B205", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:44 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed22b-401e-013e-0d96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:29 GMT", - "x-ms-client-request-id" : "63713639-ce6c-46fb-9add-5a7b8a5b6929" + "x-ms-request-id" : "de491348-c01e-004d-5141-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:44 GMT", + "x-ms-client-request-id" : "83f12d63-66d3-4177-bf82-939049387117" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac858713545e96e134/javablobcopysourceac1blobapitestcopysourceac8588203737e89", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac2b721837c6e62e66/javablobcopysourceac1blobapitestcopysourceac2b7209052b8cd", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cb697b09-9d4f-405f-9b6b-ebcf7e5d7c50", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c7af2c5a-b34b-4020-92c0-65e07414ed6f", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:30 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:44 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:29 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:44 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD439223CF", + "ETag" : "0x8D756591DDF8AAB", "Content-Length" : "0", - "x-ms-request-id" : "16eed241-401e-013e-2096-83c002000000", - "x-ms-client-request-id" : "cb697b09-9d4f-405f-9b6b-ebcf7e5d7c50" + "x-ms-request-id" : "de491366-c01e-004d-6c41-88f694000000", + "x-ms-client-request-id" : "c7af2c5a-b34b-4020-92c0-65e07414ed6f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac858713545e96e134/javablobcopysourceac2blobapitestcopysourceac85832466518d9", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac2b721837c6e62e66/javablobcopysourceac2blobapitestcopysourceac2b794341adfa4", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ddb86825-16f8-41fe-a964-4c541286c440" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c2e6870b-f1a3-42e8-a19a-0b1fd06597e2" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "c679688c-4614-484c-b6e5-1c571e7c41fb", - "ETag" : "0x8D751AD43B0137E", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:30 GMT", + "x-ms-copy-id" : "f6cb133b-642e-4d98-8d51-e624889782df", + "ETag" : "0x8D756591DE97828", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:45 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eed27c-401e-013e-4f96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:29 GMT", - "x-ms-client-request-id" : "ddb86825-16f8-41fe-a964-4c541286c440" + "x-ms-request-id" : "de491376-c01e-004d-7a41-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:44 GMT", + "x-ms-client-request-id" : "c2e6870b-f1a3-42e8-a19a-0b1fd06597e2" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac2b721837c6e62e66/javablobcopysourceac2blobapitestcopysourceac2b794341adfa4", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "2d9cda64-1597-4263-982a-b02e689941a7" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:45 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:45 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "de49153b-c01e-004d-0741-88f694000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "f6cb133b-642e-4d98-8d51-e624889782df", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac2b721837c6e62e66/javablobcopysourceac1blobapitestcopysourceac2b7209052b8cd", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 19:01:45 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:45 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D756591DE97828", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "2d9cda64-1597-4263-982a-b02e689941a7" }, "Exception" : null }, { @@ -73,8 +109,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopysourceac&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4acd7094-ae8a-44aa-8060-f9970814caa9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b51222d6-aaa0-4037-834a-68d64b004b77" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -82,20 +118,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed290-401e-013e-6096-83c002000000", - "Body" : "jtccopysourceacjtccopysourceac0blobapitestcopysourceac858713545e96e134Tue, 15 Oct 2019 20:21:30 GMT\"0x8D751AD43858B94\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:29 GMT", - "x-ms-client-request-id" : "4acd7094-ae8a-44aa-8060-f9970814caa9", + "x-ms-request-id" : "de491555-c01e-004d-1f41-88f694000000", + "Body" : "jtccopysourceacjtccopysourceac0blobapitestcopysourceac2b721837c6e62e66Mon, 21 Oct 2019 19:01:44 GMT\"0x8D756591DD8B205\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:45 GMT", + "x-ms-client-request-id" : "b51222d6-aaa0-4037-834a-68d64b004b77", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac858713545e96e134?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac2b721837c6e62e66?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "853bd3c0-2b6a-4298-8dd3-d686f66112e1" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "87ff8b12-4d97-4c91-b79b-78cce581ca99" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -103,11 +139,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed29a-401e-013e-6896-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:29 GMT", - "x-ms-client-request-id" : "853bd3c0-2b6a-4298-8dd3-d686f66112e1" + "x-ms-request-id" : "de491566-c01e-004d-2e41-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:45 GMT", + "x-ms-client-request-id" : "87ff8b12-4d97-4c91-b79b-78cce581ca99" }, "Exception" : null } ], - "variables" : [ "jtccopysourceac0blobapitestcopysourceac858713545e96e134", "javablobcopysourceac1blobapitestcopysourceac8588203737e89", "javablobcopysourceac2blobapitestcopysourceac85832466518d9" ] + "variables" : [ "jtccopysourceac0blobapitestcopysourceac2b721837c6e62e66", "javablobcopysourceac1blobapitestcopysourceac2b7209052b8cd", "javablobcopysourceac2blobapitestcopysourceac2b794341adfa4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[2].json index a5c99184a76e..e322c53f6595 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[2].json @@ -1,71 +1,107 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac82c60169ca606c65?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac6269606094fb05d6?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7d211432-719f-4805-8379-de5a4068c3e0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "90c607e0-93f9-45a0-bf2a-1b548428edac" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD43C318C6", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:30 GMT", + "ETag" : "0x8D756591EA29C81", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:46 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed2a5-401e-013e-7096-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:29 GMT", - "x-ms-client-request-id" : "7d211432-719f-4805-8379-de5a4068c3e0" + "x-ms-request-id" : "de491595-c01e-004d-5a41-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:45 GMT", + "x-ms-client-request-id" : "90c607e0-93f9-45a0-bf2a-1b548428edac" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac82c60169ca606c65/javablobcopysourceac1blobapitestcopysourceac82c70890c08af", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac6269606094fb05d6/javablobcopysourceac1blobapitestcopysourceac626468246b86a", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1664c814-1bb2-4849-9c28-5ec96c014219", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "a7706113-6698-4579-a148-c4ab16e7e37b", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:30 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:46 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:29 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:45 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD43CDDC03", + "ETag" : "0x8D756591EAA1130", "Content-Length" : "0", - "x-ms-request-id" : "16eed2be-401e-013e-0496-83c002000000", - "x-ms-client-request-id" : "1664c814-1bb2-4849-9c28-5ec96c014219" + "x-ms-request-id" : "de4915af-c01e-004d-7041-88f694000000", + "x-ms-client-request-id" : "a7706113-6698-4579-a148-c4ab16e7e37b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac82c60169ca606c65/javablobcopysourceac2blobapitestcopysourceac82c72115b2258", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac6269606094fb05d6/javablobcopysourceac2blobapitestcopysourceac626847457baa2", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8365a990-c358-4c66-97bd-9a1662c9b75d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "08132fc6-d4ee-4fdd-a39a-ffba71904d97" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "47a804a1-c10a-4d94-bf1d-d291c1824b01", - "ETag" : "0x8D751AD43D5A622", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:30 GMT", + "x-ms-copy-id" : "f5fa78bc-5086-4f3d-bd80-fdf3affcd264", + "ETag" : "0x8D756591EB2297F", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:46 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eed2c7-401e-013e-0b96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "8365a990-c358-4c66-97bd-9a1662c9b75d" + "x-ms-request-id" : "de4915c8-c01e-004d-0341-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:46 GMT", + "x-ms-client-request-id" : "08132fc6-d4ee-4fdd-a39a-ffba71904d97" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac6269606094fb05d6/javablobcopysourceac2blobapitestcopysourceac626847457baa2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "38d3d173-40d9-48d6-a1cb-e2c1987376a2" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:46 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:46 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "de49174f-c01e-004d-5d41-88f694000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "f5fa78bc-5086-4f3d-bd80-fdf3affcd264", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac6269606094fb05d6/javablobcopysourceac1blobapitestcopysourceac626468246b86a", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 19:01:47 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:46 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D756591EB2297F", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "38d3d173-40d9-48d6-a1cb-e2c1987376a2" }, "Exception" : null }, { @@ -73,8 +109,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopysourceac&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "38eba91e-5371-4ed2-95cc-0b55b7b3676d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "4efad094-8563-4245-a0f6-10adf47bd6cc" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -82,20 +118,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed2cf-401e-013e-1396-83c002000000", - "Body" : "jtccopysourceacjtccopysourceac0blobapitestcopysourceac82c60169ca606c65Tue, 15 Oct 2019 20:21:30 GMT\"0x8D751AD43C318C6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "38eba91e-5371-4ed2-95cc-0b55b7b3676d", + "x-ms-request-id" : "de491760-c01e-004d-6a41-88f694000000", + "Body" : "jtccopysourceacjtccopysourceac0blobapitestcopysourceac6269606094fb05d6Mon, 21 Oct 2019 19:01:46 GMT\"0x8D756591EA29C81\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:47 GMT", + "x-ms-client-request-id" : "4efad094-8563-4245-a0f6-10adf47bd6cc", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac82c60169ca606c65?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac6269606094fb05d6?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a3102b0e-f665-4d05-b0fd-97fb7b77164e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "17aced44-179f-4813-aba7-d94b5153b690" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -103,11 +139,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed2d5-401e-013e-1896-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "a3102b0e-f665-4d05-b0fd-97fb7b77164e" + "x-ms-request-id" : "de49176c-c01e-004d-7641-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:47 GMT", + "x-ms-client-request-id" : "17aced44-179f-4813-aba7-d94b5153b690" }, "Exception" : null } ], - "variables" : [ "jtccopysourceac0blobapitestcopysourceac82c60169ca606c65", "javablobcopysourceac1blobapitestcopysourceac82c70890c08af", "javablobcopysourceac2blobapitestcopysourceac82c72115b2258" ] + "variables" : [ "jtccopysourceac0blobapitestcopysourceac6269606094fb05d6", "javablobcopysourceac1blobapitestcopysourceac626468246b86a", "javablobcopysourceac2blobapitestcopysourceac626847457baa2" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[3].json index bd7bba3bf7ab..6b3758a31fbe 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[3].json @@ -1,102 +1,138 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac2374454540929a1b?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac9314740874cf9944?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4267b79d-4c81-4f56-8061-1d10ad4599de" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "18be25da-b971-47b7-8546-34e267d3763f" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD43E7E7D0", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:30 GMT", + "ETag" : "0x8D756591F69C738", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed2df-401e-013e-2196-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "4267b79d-4c81-4f56-8061-1d10ad4599de" + "x-ms-request-id" : "de49178a-c01e-004d-1141-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:47 GMT", + "x-ms-client-request-id" : "18be25da-b971-47b7-8546-34e267d3763f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac2374454540929a1b/javablobcopysourceac1blobapitestcopysourceac237774850d738", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac9314740874cf9944/javablobcopysourceac1blobapitestcopysourceac93108204cd10b", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e950853c-3b7f-49b8-a64f-ac12f4dc67e2", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "10f14be4-7b77-4fa0-8a25-2edffda5bf77", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:30 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:47 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:47 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD43F03998", + "ETag" : "0x8D756591F777EA3", "Content-Length" : "0", - "x-ms-request-id" : "16eed2ec-401e-013e-2a96-83c002000000", - "x-ms-client-request-id" : "e950853c-3b7f-49b8-a64f-ac12f4dc67e2" + "x-ms-request-id" : "de4917a4-c01e-004d-2841-88f694000000", + "x-ms-client-request-id" : "10f14be4-7b77-4fa0-8a25-2edffda5bf77" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac2374454540929a1b/javablobcopysourceac1blobapitestcopysourceac237774850d738", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac9314740874cf9944/javablobcopysourceac1blobapitestcopysourceac93108204cd10b", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4616275b-237c-405e-b0b2-f8b153ebc109" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "aeb5ee90-7558-411c-b326-ea5f7a3614a6" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:30 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:47 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:47 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D751AD43F03998", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:21:30 GMT", + "ETag" : "0x8D756591F777EA3", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:47 GMT", "Content-Length" : "7", - "x-ms-request-id" : "16eed2fb-401e-013e-3396-83c002000000", - "x-ms-client-request-id" : "4616275b-237c-405e-b0b2-f8b153ebc109", + "x-ms-request-id" : "de4917bd-c01e-004d-3d41-88f694000000", + "x-ms-client-request-id" : "aeb5ee90-7558-411c-b326-ea5f7a3614a6", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac2374454540929a1b/javablobcopysourceac2blobapitestcopysourceac2378387936115", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac9314740874cf9944/javablobcopysourceac2blobapitestcopysourceac9311738125a66", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b0c49d66-b790-4a09-ba07-43a0e93e3129" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "7c446029-d54f-48dd-a6cf-2b59290f6cc7" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "b1b9b883-6f82-4952-8a73-74c41d2f67e6", - "ETag" : "0x8D751AD43FD834F", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:30 GMT", + "x-ms-copy-id" : "99fe26ad-6c34-4db2-a3f1-5ee25d8b9d43", + "ETag" : "0x8D756591F884BA7", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:47 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eed301-401e-013e-3b96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "b0c49d66-b790-4a09-ba07-43a0e93e3129" + "x-ms-request-id" : "de4917d1-c01e-004d-4d41-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:47 GMT", + "x-ms-client-request-id" : "7c446029-d54f-48dd-a6cf-2b59290f6cc7" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac9314740874cf9944/javablobcopysourceac2blobapitestcopysourceac9311738125a66", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "fe9e8f4f-2f2a-46a2-90fd-91a3c9eaf1be" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:47 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:47 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "de49199f-c01e-004d-6041-88f694000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "99fe26ad-6c34-4db2-a3f1-5ee25d8b9d43", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac9314740874cf9944/javablobcopysourceac1blobapitestcopysourceac93108204cd10b", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 19:01:48 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:47 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D756591F884BA7", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "fe9e8f4f-2f2a-46a2-90fd-91a3c9eaf1be" }, "Exception" : null }, { @@ -104,8 +140,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopysourceac&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a9c7edb8-df38-4035-b7a4-11544f216a06" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "3666c930-2f06-4585-9453-83c2f3dca877" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -113,20 +149,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed311-401e-013e-4896-83c002000000", - "Body" : "jtccopysourceacjtccopysourceac0blobapitestcopysourceac2374454540929a1bTue, 15 Oct 2019 20:21:30 GMT\"0x8D751AD43E7E7D0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "a9c7edb8-df38-4035-b7a4-11544f216a06", + "x-ms-request-id" : "de4919ae-c01e-004d-6d41-88f694000000", + "Body" : "jtccopysourceacjtccopysourceac0blobapitestcopysourceac9314740874cf9944Mon, 21 Oct 2019 19:01:47 GMT\"0x8D756591F69C738\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:48 GMT", + "x-ms-client-request-id" : "3666c930-2f06-4585-9453-83c2f3dca877", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac2374454540929a1b?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac9314740874cf9944?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "95bed01e-5700-45e2-b898-e0d76decc497" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1396ae9d-1578-436f-98e6-bcee27a7c08a" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -134,11 +170,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed319-401e-013e-5096-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "95bed01e-5700-45e2-b898-e0d76decc497" + "x-ms-request-id" : "de4919b7-c01e-004d-7641-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:48 GMT", + "x-ms-client-request-id" : "1396ae9d-1578-436f-98e6-bcee27a7c08a" }, "Exception" : null } ], - "variables" : [ "jtccopysourceac0blobapitestcopysourceac2374454540929a1b", "javablobcopysourceac1blobapitestcopysourceac237774850d738", "javablobcopysourceac2blobapitestcopysourceac2378387936115" ] + "variables" : [ "jtccopysourceac0blobapitestcopysourceac9314740874cf9944", "javablobcopysourceac1blobapitestcopysourceac93108204cd10b", "javablobcopysourceac2blobapitestcopysourceac9311738125a66" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[4].json index 31a4a9263fa8..a1e1c228b5c1 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceac[4].json @@ -1,71 +1,107 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac7a59224684914eca?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceaccb571590216130ad?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4fbb77da-6ada-4d3d-86ce-1bc6ee8ccad0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "94c74104-c025-4487-a892-2b646e1bf858" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD4413481E", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:30 GMT", + "ETag" : "0x8D7565920447E94", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed328-401e-013e-5e96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "4fbb77da-6ada-4d3d-86ce-1bc6ee8ccad0" + "x-ms-request-id" : "de4919f0-c01e-004d-2741-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:48 GMT", + "x-ms-client-request-id" : "94c74104-c025-4487-a892-2b646e1bf858" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac7a59224684914eca/javablobcopysourceac1blobapitestcopysourceac7a508203fc49e", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceaccb571590216130ad/javablobcopysourceac1blobapitestcopysourceaccb56500810b25", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c98c66ac-b59d-4968-bb7a-c1a7d1901ae5", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "36873701-5f9f-48eb-a26c-c72a471acba4", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:30 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:49 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:48 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD441A130B", + "ETag" : "0x8D75659204EB27B", "Content-Length" : "0", - "x-ms-request-id" : "16eed339-401e-013e-6c96-83c002000000", - "x-ms-client-request-id" : "c98c66ac-b59d-4968-bb7a-c1a7d1901ae5" + "x-ms-request-id" : "de491a09-c01e-004d-3e41-88f694000000", + "x-ms-client-request-id" : "36873701-5f9f-48eb-a26c-c72a471acba4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac7a59224684914eca/javablobcopysourceac2blobapitestcopysourceac7a5074684a4e7", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceaccb571590216130ad/javablobcopysourceac2blobapitestcopysourceaccb5363383b85d", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7cfb9725-b62c-46fd-aa74-b468e44f2614" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "bfe6375d-cb33-4f02-bd42-4663add02c32" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "b10c37cd-004b-4a6b-9712-758abc9bb2ab", - "ETag" : "0x8D751AD4423B25A", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:31 GMT", + "x-ms-copy-id" : "46d4421e-f8dc-413e-84d9-6849551d855c", + "ETag" : "0x8D75659205878DC", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:49 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "16eed342-401e-013e-7296-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "7cfb9725-b62c-46fd-aa74-b468e44f2614" + "x-ms-request-id" : "de491a20-c01e-004d-5041-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:48 GMT", + "x-ms-client-request-id" : "bfe6375d-cb33-4f02-bd42-4663add02c32" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceaccb571590216130ad/javablobcopysourceac2blobapitestcopysourceaccb5363383b85d", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "d148c5a0-8e3f-48a7-80e8-69753cacd67e" + }, + "Response" : { + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:49 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:49 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "de491c0f-c01e-004d-7e41-88f694000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-02-02", + "x-ms-copy-id" : "46d4421e-f8dc-413e-84d9-6849551d855c", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceaccb571590216130ad/javablobcopysourceac1blobapitestcopysourceaccb56500810b25", + "x-ms-copy-progress" : "7/7", + "Date" : "Mon, 21 Oct 2019 19:01:49 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:01:49 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D75659205878DC", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "d148c5a0-8e3f-48a7-80e8-69753cacd67e" }, "Exception" : null }, { @@ -73,8 +109,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopysourceac&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "921ef0f5-b3bd-46f9-a517-8e0e76f0e06d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "e0f53298-ed8e-48f1-91f3-b2a626b5e694" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -82,20 +118,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed362-401e-013e-0f96-83c002000000", - "Body" : "jtccopysourceacjtccopysourceac0blobapitestcopysourceac7a59224684914ecaTue, 15 Oct 2019 20:21:30 GMT\"0x8D751AD4413481E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "921ef0f5-b3bd-46f9-a517-8e0e76f0e06d", + "x-ms-request-id" : "de491c19-c01e-004d-0641-88f694000000", + "Body" : "jtccopysourceacjtccopysourceac0blobapitestcopysourceaccb571590216130adMon, 21 Oct 2019 19:01:48 GMT\"0x8D7565920447E94\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:49 GMT", + "x-ms-client-request-id" : "e0f53298-ed8e-48f1-91f3-b2a626b5e694", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceac7a59224684914eca?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceac0blobapitestcopysourceaccb571590216130ad?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f569d95f-4e70-4030-81d0-190c4069a09f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "8bd4e410-a819-4f45-82c9-41aee1da16b3" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -103,11 +139,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed377-401e-013e-1c96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "f569d95f-4e70-4030-81d0-190c4069a09f" + "x-ms-request-id" : "de491c22-c01e-004d-0f41-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:49 GMT", + "x-ms-client-request-id" : "8bd4e410-a819-4f45-82c9-41aee1da16b3" }, "Exception" : null } ], - "variables" : [ "jtccopysourceac0blobapitestcopysourceac7a59224684914eca", "javablobcopysourceac1blobapitestcopysourceac7a508203fc49e", "javablobcopysourceac2blobapitestcopysourceac7a5074684a4e7" ] + "variables" : [ "jtccopysourceac0blobapitestcopysourceaccb571590216130ad", "javablobcopysourceac1blobapitestcopysourceaccb56500810b25", "javablobcopysourceac2blobapitestcopysourceaccb5363383b85d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[0].json index 7fc997d25050..63c1b13a8363 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[0].json @@ -1,69 +1,69 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfaila92309362126?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail93518368f955?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "04c36cfd-b742-4b74-b1bb-1ca8497d101e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "4dce6938-8e4d-4361-a5ed-0b5b9bac0abf" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD443CAC26", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:31 GMT", + "ETag" : "0x8D756592108E925", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:50 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed385-401e-013e-2996-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "04c36cfd-b742-4b74-b1bb-1ca8497d101e" + "x-ms-request-id" : "de491c2f-c01e-004d-1b41-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:49 GMT", + "x-ms-client-request-id" : "4dce6938-8e4d-4361-a5ed-0b5b9bac0abf" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfaila92309362126/javablobcopysourceacfail1blobapitestcopysourceacfaila9243610b", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail93518368f955/javablobcopysourceacfail1blobapitestcopysourceacfail93591912a", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "be1e945c-69bd-46e1-8649-9b0ade564d88", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "9245a69e-37a1-4c0f-84dc-efa86456ca4c", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:31 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:50 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:49 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD44437738", + "ETag" : "0x8D7565921100F06", "Content-Length" : "0", - "x-ms-request-id" : "16eed390-401e-013e-3396-83c002000000", - "x-ms-client-request-id" : "be1e945c-69bd-46e1-8649-9b0ade564d88" + "x-ms-request-id" : "de491c44-c01e-004d-2c41-88f694000000", + "x-ms-client-request-id" : "9245a69e-37a1-4c0f-84dc-efa86456ca4c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfaila92309362126/javablobcopysourceacfail2blobapitestcopysourceacfaila92238779", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail93518368f955/javablobcopysourceacfail2blobapitestcopysourceacfail935563602", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0f4af68e-35dc-4ad2-a748-a8881d8de462" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c9c54ad9-cf06-40fb-9b0d-76c7363e5c97" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "SourceConditionNotMet", + "x-ms-error-code" : "CannotVerifyCopySource", "retry-after" : "0", - "Content-Length" : "265", - "StatusCode" : "412", - "x-ms-request-id" : "16eed39b-401e-013e-3d96-83c002000000", - "Body" : "SourceConditionNotMetThe source condition specified using HTTP conditional header(s) is not met.\nRequestId:16eed39b-401e-013e-3d96-83c002000000\nTime:2019-10-15T20:21:31.3124360Z", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "0f4af68e-35dc-4ad2-a748-a8881d8de462", + "Content-Length" : "229", + "StatusCode" : "404", + "x-ms-request-id" : "de491c64-c01e-004d-4a41-88f694000000", + "Body" : "CannotVerifyCopySourceThe specified resource does not exist.\nRequestId:de491c64-c01e-004d-4a41-88f694000000\nTime:2019-10-21T19:01:50.9111025Z", + "Date" : "Mon, 21 Oct 2019 19:01:50 GMT", + "x-ms-client-request-id" : "c9c54ad9-cf06-40fb-9b0d-76c7363e5c97", "Content-Type" : "application/xml" }, "Exception" : null @@ -72,8 +72,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopysourceacfail&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "96f5f17e-b5d4-42b6-9baf-b576b5f0a25c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c9043d78-8756-436c-b176-630b2b23384a" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -81,20 +81,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed3ae-401e-013e-4a96-83c002000000", - "Body" : "jtccopysourceacfailjtccopysourceacfail0blobapitestcopysourceacfaila92309362126Tue, 15 Oct 2019 20:21:31 GMT\"0x8D751AD443CAC26\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "96f5f17e-b5d4-42b6-9baf-b576b5f0a25c", + "x-ms-request-id" : "de491d63-c01e-004d-3041-88f694000000", + "Body" : "jtccopysourceacfailjtccopysourceacfail0blobapitestcopysourceacfail93518368f955Mon, 21 Oct 2019 19:01:50 GMT\"0x8D756592108E925\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:50 GMT", + "x-ms-client-request-id" : "c9043d78-8756-436c-b176-630b2b23384a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfaila92309362126?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail93518368f955?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ebff46c2-4c86-44ad-89ec-1d1858582a14" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "3fddd8c1-0253-4203-b8b1-3163b4c9f0c7" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -102,11 +102,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed3b4-401e-013e-5096-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "ebff46c2-4c86-44ad-89ec-1d1858582a14" + "x-ms-request-id" : "de491d70-c01e-004d-3c41-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:50 GMT", + "x-ms-client-request-id" : "3fddd8c1-0253-4203-b8b1-3163b4c9f0c7" }, "Exception" : null } ], - "variables" : [ "jtccopysourceacfail0blobapitestcopysourceacfaila92309362126", "javablobcopysourceacfail1blobapitestcopysourceacfaila9243610b", "javablobcopysourceacfail2blobapitestcopysourceacfaila92238779" ] + "variables" : [ "jtccopysourceacfail0blobapitestcopysourceacfail93518368f955", "javablobcopysourceacfail1blobapitestcopysourceacfail93591912a", "javablobcopysourceacfail2blobapitestcopysourceacfail935563602" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[1].json index 88cef337ac7b..476602574bfc 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[1].json @@ -1,69 +1,69 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail0a759181bf27?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail5585534736af?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "06fc1ecf-8447-48d5-9802-e7a7270fee25" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "48b5ebf0-5dc6-4730-939a-ac898b05cde3" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD445C70E4", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:31 GMT", + "ETag" : "0x8D7565921816B03", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:51 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed3be-401e-013e-5a96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", - "x-ms-client-request-id" : "06fc1ecf-8447-48d5-9802-e7a7270fee25" + "x-ms-request-id" : "de491d87-c01e-004d-5241-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:50 GMT", + "x-ms-client-request-id" : "48b5ebf0-5dc6-4730-939a-ac898b05cde3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail0a759181bf27/javablobcopysourceacfail1blobapitestcopysourceacfail0a744039c", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail5585534736af/javablobcopysourceacfail1blobapitestcopysourceacfail558225265", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9601425a-c336-4db9-9cd0-4ce99f79ed31", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "bed743bb-988e-4999-a203-f7db5a84f313", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:31 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:51 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:30 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:50 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD446426A7", + "ETag" : "0x8D75659218E5EAE", "Content-Length" : "0", - "x-ms-request-id" : "16eed3cb-401e-013e-6596-83c002000000", - "x-ms-client-request-id" : "9601425a-c336-4db9-9cd0-4ce99f79ed31" + "x-ms-request-id" : "de491daf-c01e-004d-7641-88f694000000", + "x-ms-client-request-id" : "bed743bb-988e-4999-a203-f7db5a84f313" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail0a759181bf27/javablobcopysourceacfail2blobapitestcopysourceacfail0a7240161", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail5585534736af/javablobcopysourceacfail2blobapitestcopysourceacfail558181770", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1d7ab0f1-646e-4667-a9bd-cbb1e1b5d888" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f5d8ba1f-6b11-4d10-b998-d05043ba7dc5" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "SourceConditionNotMet", + "x-ms-error-code" : "CannotVerifyCopySource", "retry-after" : "0", - "Content-Length" : "265", - "StatusCode" : "412", - "x-ms-request-id" : "16eed3da-401e-013e-7396-83c002000000", - "Body" : "SourceConditionNotMetThe source condition specified using HTTP conditional header(s) is not met.\nRequestId:16eed3da-401e-013e-7396-83c002000000\nTime:2019-10-15T20:21:31.5296426Z", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "1d7ab0f1-646e-4667-a9bd-cbb1e1b5d888", + "Content-Length" : "229", + "StatusCode" : "404", + "x-ms-request-id" : "de491dc2-c01e-004d-0741-88f694000000", + "Body" : "CannotVerifyCopySourceThe specified resource does not exist.\nRequestId:de491dc2-c01e-004d-0741-88f694000000\nTime:2019-10-21T19:01:51.1713520Z", + "Date" : "Mon, 21 Oct 2019 19:01:50 GMT", + "x-ms-client-request-id" : "f5d8ba1f-6b11-4d10-b998-d05043ba7dc5", "Content-Type" : "application/xml" }, "Exception" : null @@ -72,8 +72,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopysourceacfail&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ed5eef86-7e5d-44db-aa25-c551dbc28019" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1f24fbdb-62fa-4de5-8710-2db69bcbb0f4" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -81,20 +81,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed3eb-401e-013e-0396-83c002000000", - "Body" : "jtccopysourceacfailjtccopysourceacfail0blobapitestcopysourceacfail0a759181bf27Tue, 15 Oct 2019 20:21:31 GMT\"0x8D751AD445C70E4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "ed5eef86-7e5d-44db-aa25-c551dbc28019", + "x-ms-request-id" : "de491ddc-c01e-004d-1b41-88f694000000", + "Body" : "jtccopysourceacfailjtccopysourceacfail0blobapitestcopysourceacfail5585534736afMon, 21 Oct 2019 19:01:51 GMT\"0x8D7565921816B03\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:50 GMT", + "x-ms-client-request-id" : "1f24fbdb-62fa-4de5-8710-2db69bcbb0f4", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail0a759181bf27?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail5585534736af?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "37dce21d-2fb4-4ac7-a7d9-1d7c2f6fa25b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "8dda7d42-960d-4e0a-8d71-7b2e951529cd" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -102,11 +102,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed41a-401e-013e-2a96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "37dce21d-2fb4-4ac7-a7d9-1d7c2f6fa25b" + "x-ms-request-id" : "de491dee-c01e-004d-2a41-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:50 GMT", + "x-ms-client-request-id" : "8dda7d42-960d-4e0a-8d71-7b2e951529cd" }, "Exception" : null } ], - "variables" : [ "jtccopysourceacfail0blobapitestcopysourceacfail0a759181bf27", "javablobcopysourceacfail1blobapitestcopysourceacfail0a744039c", "javablobcopysourceacfail2blobapitestcopysourceacfail0a7240161" ] + "variables" : [ "jtccopysourceacfail0blobapitestcopysourceacfail5585534736af", "javablobcopysourceacfail1blobapitestcopysourceacfail558225265", "javablobcopysourceacfail2blobapitestcopysourceacfail558181770" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[2].json index 094f626a1450..02792aebea14 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[2].json @@ -1,57 +1,57 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfailc6d970768c9a?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail81c920230513?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c65fe065-9e70-41a9-8064-64ac2ea015a8" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "74d53a33-9177-4c21-b1f7-ac93388ab569" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD448E627D", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:31 GMT", + "ETag" : "0x8D7565921A7E835", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:51 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed42a-401e-013e-3896-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "c65fe065-9e70-41a9-8064-64ac2ea015a8" + "x-ms-request-id" : "de491dfd-c01e-004d-3941-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:50 GMT", + "x-ms-client-request-id" : "74d53a33-9177-4c21-b1f7-ac93388ab569" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfailc6d970768c9a/javablobcopysourceacfail1blobapitestcopysourceacfailc6d73456d", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail81c920230513/javablobcopysourceacfail1blobapitestcopysourceacfail81c58396b", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1c434748-1aa1-418b-86fd-3ca2e7a04bc6", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "4d98bb3c-e86d-4ec8-88eb-82afc4d55e30", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:31 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:51 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD44952DD8", + "ETag" : "0x8D7565921AF5C49", "Content-Length" : "0", - "x-ms-request-id" : "16eed437-401e-013e-4396-83c002000000", - "x-ms-client-request-id" : "1c434748-1aa1-418b-86fd-3ca2e7a04bc6" + "x-ms-request-id" : "de491e15-c01e-004d-4b41-88f694000000", + "x-ms-client-request-id" : "4d98bb3c-e86d-4ec8-88eb-82afc4d55e30" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfailc6d970768c9a/javablobcopysourceacfail2blobapitestcopysourceacfailc6d69737a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail81c920230513/javablobcopysourceacfail2blobapitestcopysourceacfail81c94169a", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b2ab27ea-f464-406d-92ba-6e81efcaac08" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "33ccfc31-9e2c-47b4-a392-d032d9f28e14" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -60,10 +60,10 @@ "retry-after" : "0", "Content-Length" : "265", "StatusCode" : "412", - "x-ms-request-id" : "16eed443-401e-013e-4d96-83c002000000", - "Body" : "SourceConditionNotMetThe source condition specified using HTTP conditional header(s) is not met.\nRequestId:16eed443-401e-013e-4d96-83c002000000\nTime:2019-10-15T20:21:31.8399375Z", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "b2ab27ea-f464-406d-92ba-6e81efcaac08", + "x-ms-request-id" : "de491e20-c01e-004d-5541-88f694000000", + "Body" : "SourceConditionNotMetThe source condition specified using HTTP conditional header(s) is not met.\nRequestId:de491e20-c01e-004d-5541-88f694000000\nTime:2019-10-21T19:01:51.3765479Z", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", + "x-ms-client-request-id" : "33ccfc31-9e2c-47b4-a392-d032d9f28e14", "Content-Type" : "application/xml" }, "Exception" : null @@ -72,8 +72,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopysourceacfail&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "83f9425b-b0b5-4278-a274-06d242b743fc" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "66e2b5b8-5c29-4b92-add4-7abccd15f454" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -81,20 +81,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed44a-401e-013e-5496-83c002000000", - "Body" : "jtccopysourceacfailjtccopysourceacfail0blobapitestcopysourceacfailc6d970768c9aTue, 15 Oct 2019 20:21:31 GMT\"0x8D751AD448E627D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "83f9425b-b0b5-4278-a274-06d242b743fc", + "x-ms-request-id" : "de491e30-c01e-004d-6441-88f694000000", + "Body" : "jtccopysourceacfailjtccopysourceacfail0blobapitestcopysourceacfail81c920230513Mon, 21 Oct 2019 19:01:51 GMT\"0x8D7565921A7E835\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", + "x-ms-client-request-id" : "66e2b5b8-5c29-4b92-add4-7abccd15f454", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfailc6d970768c9a?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail81c920230513?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6a9cdafc-b8b3-48c2-b9dd-9fa838afdf50" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "6cea3907-6315-41ac-86d1-d66ba31db831" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -102,11 +102,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed453-401e-013e-5c96-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "6a9cdafc-b8b3-48c2-b9dd-9fa838afdf50" + "x-ms-request-id" : "de491e3d-c01e-004d-7141-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", + "x-ms-client-request-id" : "6cea3907-6315-41ac-86d1-d66ba31db831" }, "Exception" : null } ], - "variables" : [ "jtccopysourceacfail0blobapitestcopysourceacfailc6d970768c9a", "javablobcopysourceacfail1blobapitestcopysourceacfailc6d73456d", "javablobcopysourceacfail2blobapitestcopysourceacfailc6d69737a" ] + "variables" : [ "jtccopysourceacfail0blobapitestcopysourceacfail81c920230513", "javablobcopysourceacfail1blobapitestcopysourceacfail81c58396b", "javablobcopysourceacfail2blobapitestcopysourceacfail81c94169a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[3].json index aec38d7a3966..f7bb6ed384fa 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopysourceacfail[3].json @@ -1,100 +1,100 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail205688332032?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail973883526d34?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0a030a62-cf5f-4f63-9746-98fa1972f010" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "ba7b6a88-cdde-48d0-b0ea-694ba2dab0c1" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AD44ACA03C", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:31 GMT", + "ETag" : "0x8D7565921C5FEE4", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:51 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "16eed460-401e-013e-6696-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "0a030a62-cf5f-4f63-9746-98fa1972f010" + "x-ms-request-id" : "de491e57-c01e-004d-0541-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", + "x-ms-client-request-id" : "ba7b6a88-cdde-48d0-b0ea-694ba2dab0c1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail205688332032/javablobcopysourceacfail1blobapitestcopysourceacfail205668760", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail973883526d34/javablobcopysourceacfail1blobapitestcopysourceacfail973955362", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a5cd477f-93cc-4461-838d-789768dedb9e", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "8874d5c4-88de-461f-afb5-3657188c58a8", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:51 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AD44B4A47E", + "ETag" : "0x8D7565921CCD692", "Content-Length" : "0", - "x-ms-request-id" : "16eed474-401e-013e-7596-83c002000000", - "x-ms-client-request-id" : "a5cd477f-93cc-4461-838d-789768dedb9e" + "x-ms-request-id" : "de491e65-c01e-004d-1241-88f694000000", + "x-ms-client-request-id" : "8874d5c4-88de-461f-afb5-3657188c58a8" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail205688332032/javablobcopysourceacfail1blobapitestcopysourceacfail205668760", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail973883526d34/javablobcopysourceacfail1blobapitestcopysourceacfail973955362", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "73623259-3a7a-4a75-b40f-fa18a1d03189" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "cdbe0779-e104-4fd2-9f66-b05a84a4e9bd" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Tue, 15 Oct 2019 20:21:32 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:01:51 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D751AD44B4A47E", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:21:32 GMT", + "ETag" : "0x8D7565921CCD692", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:01:51 GMT", "Content-Length" : "7", - "x-ms-request-id" : "16eed480-401e-013e-7c96-83c002000000", - "x-ms-client-request-id" : "73623259-3a7a-4a75-b40f-fa18a1d03189", + "x-ms-request-id" : "de491e7b-c01e-004d-2441-88f694000000", + "x-ms-client-request-id" : "cdbe0779-e104-4fd2-9f66-b05a84a4e9bd", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail205688332032/javablobcopysourceacfail2blobapitestcopysourceacfail205318579", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail973883526d34/javablobcopysourceacfail2blobapitestcopysourceacfail973868520", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f4bae26c-4345-444c-9a43-5eb7667fb46d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b7bd2fe3-4efa-422c-9898-be40fe58fb1f" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "SourceConditionNotMet", + "x-ms-error-code" : "CannotVerifyCopySource", "retry-after" : "0", - "Content-Length" : "265", - "StatusCode" : "412", - "x-ms-request-id" : "16eed490-401e-013e-0b96-83c002000000", - "Body" : "SourceConditionNotMetThe source condition specified using HTTP conditional header(s) is not met.\nRequestId:16eed490-401e-013e-0b96-83c002000000\nTime:2019-10-15T20:21:32.0941799Z", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "f4bae26c-4345-444c-9a43-5eb7667fb46d", + "Content-Length" : "229", + "StatusCode" : "404", + "x-ms-request-id" : "de491e89-c01e-004d-3141-88f694000000", + "Body" : "CannotVerifyCopySourceThe specified resource does not exist.\nRequestId:de491e89-c01e-004d-3141-88f694000000\nTime:2019-10-21T19:01:51.6077702Z", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", + "x-ms-client-request-id" : "b7bd2fe3-4efa-422c-9898-be40fe58fb1f", "Content-Type" : "application/xml" }, "Exception" : null @@ -103,8 +103,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccopysourceacfail&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0f5095c0-8ee9-4564-9450-e99fba49b795" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "0838de75-d85a-4726-aaab-b249afdb4ff2" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -112,20 +112,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "16eed49d-401e-013e-1796-83c002000000", - "Body" : "jtccopysourceacfailjtccopysourceacfail0blobapitestcopysourceacfail205688332032Tue, 15 Oct 2019 20:21:31 GMT\"0x8D751AD44ACA03C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "0f5095c0-8ee9-4564-9450-e99fba49b795", + "x-ms-request-id" : "de491e9f-c01e-004d-4341-88f694000000", + "Body" : "jtccopysourceacfailjtccopysourceacfail0blobapitestcopysourceacfail973883526d34Mon, 21 Oct 2019 19:01:51 GMT\"0x8D7565921C5FEE4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", + "x-ms-client-request-id" : "0838de75-d85a-4726-aaab-b249afdb4ff2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail205688332032?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopysourceacfail0blobapitestcopysourceacfail973883526d34?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3a33f9c8-4c20-4600-ae27-2658403eb4da" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "0c31364b-18ff-4b8b-963b-6441fa753651" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -133,11 +133,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "16eed4a9-401e-013e-2096-83c002000000", - "Date" : "Tue, 15 Oct 2019 20:21:31 GMT", - "x-ms-client-request-id" : "3a33f9c8-4c20-4600-ae27-2658403eb4da" + "x-ms-request-id" : "de491eb6-c01e-004d-5941-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:01:51 GMT", + "x-ms-client-request-id" : "0c31364b-18ff-4b8b-963b-6441fa753651" }, "Exception" : null } ], - "variables" : [ "jtccopysourceacfail0blobapitestcopysourceacfail205688332032", "javablobcopysourceacfail1blobapitestcopysourceacfail205668760", "javablobcopysourceacfail2blobapitestcopysourceacfail205318579" ] + "variables" : [ "jtccopysourceacfail0blobapitestcopysourceacfail973883526d34", "javablobcopysourceacfail1blobapitestcopysourceacfail973955362", "javablobcopysourceacfail2blobapitestcopysourceacfail973868520" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierarchy.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierarchy.json index 4cd9c8e13bdc..702991640c4d 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierarchy.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierarchy.json @@ -1,54 +1,54 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchy09815681a7ad323b3d440cb9?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchy0778693f21edbb14c4448991?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "885742bc-5ed9-4f5f-b97a-8d236a860c2a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1c8c5ef5-1959-4ad2-a559-9068f5709776" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADD3EF2CA0", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:32 GMT", + "ETag" : "0x8D7565C4A3E8B3C", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:27 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f8572a-c01e-012f-4296-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:25:32 GMT", - "x-ms-client-request-id" : "885742bc-5ed9-4f5f-b97a-8d236a860c2a" + "x-ms-request-id" : "5f2e4d57-f01e-0045-2f45-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:24:26 GMT", + "x-ms-client-request-id" : "1c8c5ef5-1959-4ad2-a559-9068f5709776" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchy09815681a7ad323b3d440cb9/javabloblistblobshierarchy111173018cffe4db614c7", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchy0778693f21edbb14c4448991/javabloblistblobshierarchy15565641f3b980884046e", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a9092e09-1c7d-44ca-bca7-7a342a2d8398" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "23a5ffad-4fd6-4ee3-83a9-7c563b33b5da" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADD3F594F8", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:32 GMT", + "ETag" : "0x8D7565C4A447C9E", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:27 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8073eac7-501e-002e-0596-83b0b1000000", + "x-ms-request-id" : "de51fa71-c01e-004d-0945-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:25:31 GMT", - "x-ms-client-request-id" : "a9092e09-1c7d-44ca-bca7-7a342a2d8398" + "Date" : "Mon, 21 Oct 2019 19:24:27 GMT", + "x-ms-client-request-id" : "23a5ffad-4fd6-4ee3-83a9-7c563b33b5da" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchy09815681a7ad323b3d440cb9?delimiter=/&include=&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchy0778693f21edbb14c4448991?delimiter=/&include=&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "523dfbab-5284-4efb-97b1-0f0ae288a569" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b24da46d-dfc7-47e7-851a-856425f8aaad" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -56,10 +56,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f8576e-c01e-012f-0396-83f719000000", - "Body" : "/javabloblistblobshierarchy111173018cffe4db614c7Tue, 15 Oct 2019 20:25:32 GMTTue, 15 Oct 2019 20:25:32 GMT0x8D751ADD3F594F8512application/octet-stream0PageBlobunlockedavailabletrue", - "Date" : "Tue, 15 Oct 2019 20:25:32 GMT", - "x-ms-client-request-id" : "523dfbab-5284-4efb-97b1-0f0ae288a569", + "x-ms-request-id" : "5f2e4d69-f01e-0045-3f45-88ede7000000", + "Body" : "/javabloblistblobshierarchy15565641f3b980884046eMon, 21 Oct 2019 19:24:27 GMTMon, 21 Oct 2019 19:24:27 GMT0x8D7565C4A447C9E512application/octet-stream0PageBlobunlockedavailabletrue", + "Date" : "Mon, 21 Oct 2019 19:24:26 GMT", + "x-ms-client-request-id" : "b24da46d-dfc7-47e7-851a-856425f8aaad", "Content-Type" : "application/xml" }, "Exception" : null @@ -68,8 +68,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistblobshierarchy&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "dd2f3cec-1aad-4ba5-b7f6-7b1424cb19f4" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "933895f8-ab1a-48c1-87a0-de834e85080d" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -77,20 +77,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8073eadd-501e-002e-1996-83b0b1000000", - "Body" : "jtclistblobshierarchyjtclistblobshierarchy09815681a7ad323b3d440cb9Tue, 15 Oct 2019 20:25:32 GMT\"0x8D751ADD3EF2CA0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:25:31 GMT", - "x-ms-client-request-id" : "dd2f3cec-1aad-4ba5-b7f6-7b1424cb19f4", + "x-ms-request-id" : "de51fa81-c01e-004d-1845-88f694000000", + "Body" : "jtclistblobshierarchyjtclistblobshierarchy0778693f21edbb14c4448991Mon, 21 Oct 2019 19:24:27 GMT\"0x8D7565C4A3E8B3C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:24:27 GMT", + "x-ms-client-request-id" : "933895f8-ab1a-48c1-87a0-de834e85080d", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchy09815681a7ad323b3d440cb9?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchy0778693f21edbb14c4448991?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9ec2beaa-a4ce-4f50-a8a9-1690f5be57a2" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "290de3d9-3e37-47d2-9996-43b926f2f9fe" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -98,11 +98,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f857b5-c01e-012f-4496-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:25:32 GMT", - "x-ms-client-request-id" : "9ec2beaa-a4ce-4f50-a8a9-1690f5be57a2" + "x-ms-request-id" : "5f2e4d76-f01e-0045-4945-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:24:27 GMT", + "x-ms-client-request-id" : "290de3d9-3e37-47d2-9996-43b926f2f9fe" }, "Exception" : null } ], - "variables" : [ "jtclistblobshierarchy09815681a7ad323b3d440cb9", "javabloblistblobshierarchy111173018cffe4db614c7" ] + "variables" : [ "jtclistblobshierarchy0778693f21edbb14c4448991", "javabloblistblobshierarchy15565641f3b980884046e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierarchymin.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierarchymin.json index 3c7df6dc494e..a5e374869201 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierarchymin.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierarchymin.json @@ -1,32 +1,32 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchymin0710082886f9724e94484a?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchymin022304e741d7a8db574c9e?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "176be5b5-b422-49e2-ad7d-b4c53a17e076" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "4af0d7cc-f4be-432c-9329-3c26f6082292" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADD40C3602", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:32 GMT", + "ETag" : "0x8D7565C4A57C0B2", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8073eaf2-501e-002e-2d96-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:25:32 GMT", - "x-ms-client-request-id" : "176be5b5-b422-49e2-ad7d-b4c53a17e076" + "x-ms-request-id" : "de51fa98-c01e-004d-2945-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:24:27 GMT", + "x-ms-client-request-id" : "4af0d7cc-f4be-432c-9329-3c26f6082292" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchymin0710082886f9724e94484a?prefix=/&delimiter=/&include=&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchymin022304e741d7a8db574c9e?prefix=/&delimiter=/&include=&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5a7d0a91-45c7-4ac0-8325-4155d51af6ca" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "ed12ddae-8738-4497-bd51-55b1ddad681f" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,10 +34,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f8581c-c01e-012f-2596-83f719000000", - "Body" : "//", - "Date" : "Tue, 15 Oct 2019 20:25:32 GMT", - "x-ms-client-request-id" : "5a7d0a91-45c7-4ac0-8325-4155d51af6ca", + "x-ms-request-id" : "5f2e4d94-f01e-0045-6045-88ede7000000", + "Body" : "//", + "Date" : "Mon, 21 Oct 2019 19:24:27 GMT", + "x-ms-client-request-id" : "ed12ddae-8738-4497-bd51-55b1ddad681f", "Content-Type" : "application/xml" }, "Exception" : null @@ -46,8 +46,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistblobshierarchymin&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3acb0ef3-ea1d-493a-a4f2-2b3393e7298f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "367bf28c-d4d9-48bb-be42-f7b8cb0a558c" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -55,20 +55,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8073eb13-501e-002e-4a96-83b0b1000000", - "Body" : "jtclistblobshierarchyminjtclistblobshierarchymin0710082886f9724e94484aTue, 15 Oct 2019 20:25:32 GMT\"0x8D751ADD40C3602\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:25:32 GMT", - "x-ms-client-request-id" : "3acb0ef3-ea1d-493a-a4f2-2b3393e7298f", + "x-ms-request-id" : "de51fabb-c01e-004d-4245-88f694000000", + "Body" : "jtclistblobshierarchyminjtclistblobshierarchymin022304e741d7a8db574c9eMon, 21 Oct 2019 19:24:28 GMT\"0x8D7565C4A57C0B2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:24:27 GMT", + "x-ms-client-request-id" : "367bf28c-d4d9-48bb-be42-f7b8cb0a558c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchymin0710082886f9724e94484a?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierarchymin022304e741d7a8db574c9e?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8cbe841b-b9ac-4b51-ab49-da2acf64359a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1698d142-b773-40e9-96ac-b88da87ee600" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -76,11 +76,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f85867-c01e-012f-6a96-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:25:32 GMT", - "x-ms-client-request-id" : "8cbe841b-b9ac-4b51-ab49-da2acf64359a" + "x-ms-request-id" : "5f2e4da7-f01e-0045-6c45-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:24:27 GMT", + "x-ms-client-request-id" : "1698d142-b773-40e9-96ac-b88da87ee600" }, "Exception" : null } ], - "variables" : [ "jtclistblobshierarchymin0710082886f9724e94484a" ] + "variables" : [ "jtclistblobshierarchymin022304e741d7a8db574c9e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierdelim.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierdelim.json index 46ba0ea8f2ed..a99e1fbb99ee 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierdelim.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierdelim.json @@ -1,186 +1,186 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim0035927cc5509b2b374c9596?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2ef693a6-c8c5-4795-bb87-21203a87ed7f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "a255a64f-e297-45b7-a0f5-65c943d5b87a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFD7DA72D", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C73139827", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744e29-501e-002e-5c96-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "2ef693a6-c8c5-4795-bb87-21203a87ed7f" + "x-ms-request-id" : "de52712c-c01e-004d-0f45-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "a255a64f-e297-45b7-a0f5-65c943d5b87a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim0035927cc5509b2b374c9596/a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81/a", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2b2a71aa-2c52-43ba-b8d2-020a836832a3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "79f9b818-732e-4226-af75-1ba014e7c91d" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFD86070A", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C731D47D9", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f94ea0-c01e-012f-7396-83f719000000", + "x-ms-request-id" : "5f2e8af7-f01e-0045-0a45-88ede7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "2b2a71aa-2c52-43ba-b8d2-020a836832a3" + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "79f9b818-732e-4226-af75-1ba014e7c91d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim0035927cc5509b2b374c9596/b/a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81/b/a", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "11dca7b8-9655-4057-814c-1983ae4861c9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "cf580bbe-305b-4e57-a21c-801be52d9bf6" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFD8C4A26", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C73258743", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744e52-501e-002e-7e96-83b0b1000000", + "x-ms-request-id" : "de527154-c01e-004d-3145-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "11dca7b8-9655-4057-814c-1983ae4861c9" + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "cf580bbe-305b-4e57-a21c-801be52d9bf6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim0035927cc5509b2b374c9596/c", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81/c", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f5800043-d4e1-45eb-82fe-43007297bc90" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "6d75b34d-f4c0-4fc2-813f-980887997725" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFD9377DC", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C732D032B", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f94f03-c01e-012f-4d96-83f719000000", + "x-ms-request-id" : "5f2e8b18-f01e-0045-2145-88ede7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "f5800043-d4e1-45eb-82fe-43007297bc90" + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "6d75b34d-f4c0-4fc2-813f-980887997725" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim0035927cc5509b2b374c9596/d/a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81/d/a", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5dbe3d9b-3471-4457-94cb-86a40d980502" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "bbfa1d14-c8e7-41f4-a661-8a3cb181ca95" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFD9C53A4", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C7333BB91", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744e7c-501e-002e-1c96-83b0b1000000", + "x-ms-request-id" : "de527181-c01e-004d-5745-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "5dbe3d9b-3471-4457-94cb-86a40d980502" + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "bbfa1d14-c8e7-41f4-a661-8a3cb181ca95" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim0035927cc5509b2b374c9596/e", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81/e", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "017ed890-48cb-428f-b390-ffbb4f1a1282" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "eb8c8fe1-f8c3-41d3-9fe1-c1f77ea0079d" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFDA33326", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C733C7041", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f94f68-c01e-012f-2996-83f719000000", + "x-ms-request-id" : "5f2e8b36-f01e-0045-3a45-88ede7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "017ed890-48cb-428f-b390-ffbb4f1a1282" + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "eb8c8fe1-f8c3-41d3-9fe1-c1f77ea0079d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim0035927cc5509b2b374c9596/f", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81/f", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0888f50d-4a5d-479d-a9ed-1cd18cc18774" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "8f4cb10d-f5ed-46d6-baed-b53fe40be4de" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFDA9763D", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C73439DF6", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744e8e-501e-002e-2d96-83b0b1000000", + "x-ms-request-id" : "de5271ad-c01e-004d-7e45-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "0888f50d-4a5d-479d-a9ed-1cd18cc18774" + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "8f4cb10d-f5ed-46d6-baed-b53fe40be4de" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim0035927cc5509b2b374c9596/g/a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81/g/a", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "28213640-9562-4039-a985-660d77854e84" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "84731cd6-e30e-4bb1-9d50-2fcb6418281a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFDB02EA8", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C734AF2BE", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f94fb9-c01e-012f-7896-83f719000000", + "x-ms-request-id" : "5f2e8b55-f01e-0045-5745-88ede7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "28213640-9562-4039-a985-660d77854e84" + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "84731cd6-e30e-4bb1-9d50-2fcb6418281a" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim0035927cc5509b2b374c9596?delimiter=/&include=&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81?delimiter=/&include=&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b7dc6f10-e4f2-4574-a584-914b2fffa71d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "760d4bfc-4edb-4fb8-a895-efccf0fd773c" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -188,10 +188,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "80744e99-501e-002e-3896-83b0b1000000", - "Body" : "/aTue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFD86070A0application/octet-streamAppendBlobunlockedavailabletrueb/cTue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFD9377DC0application/octet-streamAppendBlobunlockedavailabletrued/eTue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFDA333260application/octet-streamAppendBlobunlockedavailabletruefTue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFDA9763D0application/octet-streamAppendBlobunlockedavailabletrueg/", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "b7dc6f10-e4f2-4574-a584-914b2fffa71d", + "x-ms-request-id" : "de5271d3-c01e-004d-2045-88f694000000", + "Body" : "/aMon, 21 Oct 2019 19:25:36 GMTMon, 21 Oct 2019 19:25:36 GMT0x8D7565C731D47D90application/octet-streamAppendBlobunlockedavailabletrueb/cMon, 21 Oct 2019 19:25:36 GMTMon, 21 Oct 2019 19:25:36 GMT0x8D7565C732D032B0application/octet-streamAppendBlobunlockedavailabletrued/eMon, 21 Oct 2019 19:25:36 GMTMon, 21 Oct 2019 19:25:36 GMT0x8D7565C733C70410application/octet-streamAppendBlobunlockedavailabletruefMon, 21 Oct 2019 19:25:36 GMTMon, 21 Oct 2019 19:25:36 GMT0x8D7565C73439DF60application/octet-streamAppendBlobunlockedavailabletrueg/", + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "760d4bfc-4edb-4fb8-a895-efccf0fd773c", "Content-Type" : "application/xml" }, "Exception" : null @@ -200,8 +200,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistblobshierdelim&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b8acec3c-63b2-4da1-83ba-7055973f07d3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "5c4a394e-b0b3-49b0-ab4e-924511ad9a56" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -209,20 +209,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f95040-c01e-012f-7496-83f719000000", - "Body" : "jtclistblobshierdelimjtclistblobshierdelim0035927cc5509b2b374c9596Tue, 15 Oct 2019 20:26:42 GMT\"0x8D751ADFD7DA72D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "b8acec3c-63b2-4da1-83ba-7055973f07d3", + "x-ms-request-id" : "5f2e8b70-f01e-0045-6e45-88ede7000000", + "Body" : "jtclistblobshierdelimjtclistblobshierdelim054357d768cc943e724d6f81Mon, 21 Oct 2019 19:25:36 GMT\"0x8D7565C73139827\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "5c4a394e-b0b3-49b0-ab4e-924511ad9a56", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim0035927cc5509b2b374c9596?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4eccb520-6bd2-4d41-bc2d-325655c6672d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "ae2db69c-eb95-433e-a252-f970a5bbc69b" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -230,11 +230,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "80744eba-501e-002e-5596-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "4eccb520-6bd2-4d41-bc2d-325655c6672d" + "x-ms-request-id" : "de52720e-c01e-004d-5745-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "ae2db69c-eb95-433e-a252-f970a5bbc69b" }, "Exception" : null } ], - "variables" : [ "jtclistblobshierdelim0035927cc5509b2b374c9596" ] + "variables" : [ "jtclistblobshierdelim054357d768cc943e724d6f81" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshiererror.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshiererror.json index 0849486990e5..660d98b24e71 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshiererror.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshiererror.json @@ -1,32 +1,32 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiererror052904ea5c1cf642104fbb89?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiererror017613a96ad973c3b44e1fbb?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "473250dd-c6a6-4849-a3fe-bc8013a33f0f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "81c6f80b-46db-410b-8e59-3a0764138756" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFED0928B", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:44 GMT", + "ETag" : "0x8D7565C745D43D2", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "807451ba-501e-002e-0b96-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:26:43 GMT", - "x-ms-client-request-id" : "473250dd-c6a6-4849-a3fe-bc8013a33f0f" + "x-ms-request-id" : "5f2e8d1d-f01e-0045-5b45-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:25:38 GMT", + "x-ms-client-request-id" : "81c6f80b-46db-410b-8e59-3a0764138756" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiererror1133681f94ca01630547af83?prefix=.&delimiter=/&include=&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiererror150990bffc2983f99f455d8f?prefix=.&delimiter=/&include=&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2c805ae4-562b-42ae-8a35-74cac78195d5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "5d14e4aa-8dc4-46db-84df-2b3c29f8a495" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -35,10 +35,10 @@ "retry-after" : "0", "Content-Length" : "225", "StatusCode" : "404", - "x-ms-request-id" : "69f95667-c01e-012f-1f96-83f719000000", - "Body" : "ContainerNotFoundThe specified container does not exist.\nRequestId:69f95667-c01e-012f-1f96-83f719000000\nTime:2019-10-15T20:26:44.2892390Z", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "2c805ae4-562b-42ae-8a35-74cac78195d5", + "x-ms-request-id" : "de527482-c01e-004d-0f45-88f694000000", + "Body" : "ContainerNotFoundThe specified container does not exist.\nRequestId:de527482-c01e-004d-0f45-88f694000000\nTime:2019-10-21T19:25:38.5899594Z", + "Date" : "Mon, 21 Oct 2019 19:25:38 GMT", + "x-ms-client-request-id" : "5d14e4aa-8dc4-46db-84df-2b3c29f8a495", "Content-Type" : "application/xml" }, "Exception" : null @@ -47,8 +47,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistblobshiererror&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1d93efb0-f6b9-42a3-888b-a66b5e53b0e0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "a2b0784c-7f4c-422f-a648-6d9d44d7b270" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -56,20 +56,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "807451d6-501e-002e-2496-83b0b1000000", - "Body" : "jtclistblobshiererrorjtclistblobshiererror052904ea5c1cf642104fbb89Tue, 15 Oct 2019 20:26:44 GMT\"0x8D751ADFED0928B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:26:43 GMT", - "x-ms-client-request-id" : "1d93efb0-f6b9-42a3-888b-a66b5e53b0e0", + "x-ms-request-id" : "5f2e8d3a-f01e-0045-7345-88ede7000000", + "Body" : "jtclistblobshiererrorjtclistblobshiererror017613a96ad973c3b44e1fbbMon, 21 Oct 2019 19:25:38 GMT\"0x8D7565C745D43D2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:25:38 GMT", + "x-ms-client-request-id" : "a2b0784c-7f4c-422f-a648-6d9d44d7b270", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiererror052904ea5c1cf642104fbb89?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiererror017613a96ad973c3b44e1fbb?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "83f9751b-ddc6-4099-b6cb-a2470b082593" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "415c1b03-209f-4fb7-9b66-0b9313c28ad4" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -77,11 +77,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f9569d-c01e-012f-4f96-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "83f9751b-ddc6-4099-b6cb-a2470b082593" + "x-ms-request-id" : "de5274a6-c01e-004d-2945-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:25:38 GMT", + "x-ms-client-request-id" : "415c1b03-209f-4fb7-9b66-0b9313c28ad4" }, "Exception" : null } ], - "variables" : [ "jtclistblobshiererror052904ea5c1cf642104fbb89", "jtclistblobshiererror1133681f94ca01630547af83" ] + "variables" : [ "jtclistblobshiererror017613a96ad973c3b44e1fbb", "jtclistblobshiererror150990bffc2983f99f455d8f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshiermarker.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshiermarker.json index f7ac39252ef4..66d11b3b12ae 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshiermarker.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshiermarker.json @@ -1,252 +1,252 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2b469320-07f2-46a5-9c81-46c2bfeb4800" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "be3f1ea2-3ad1-44c4-bb49-fecce9b8ea48" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFDD5FC8B", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C736EDAAB", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f95096-c01e-012f-4796-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "2b469320-07f2-46a5-9c81-46c2bfeb4800" + "x-ms-request-id" : "5f2e8b8b-f01e-0045-0445-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "be3f1ea2-3ad1-44c4-bb49-fecce9b8ea48" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8/javabloblistblobshiermarker101258435d4fad72fd4eb", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8/javabloblistblobshiermarker194592b8fdbe4416634c9", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "56e20919-4ca9-4e1e-b463-071e646a20af" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "3434b469-77d8-4f24-9157-327791561038" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFDDCA0C3", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C737604EE", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744edc-501e-002e-7296-83b0b1000000", + "x-ms-request-id" : "de52722c-c01e-004d-7445-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "56e20919-4ca9-4e1e-b463-071e646a20af" + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "3434b469-77d8-4f24-9157-327791561038" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8/javabloblistblobshiermarker22131341d7d9e813e24b1", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8/javabloblistblobshiermarker26680076ea765852084ee", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "51a85305-9cc0-4ef4-ab53-f2fc2c8e0d0e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "6c726c26-9751-4e08-9b19-776ce02bde2c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFDE2BCC8", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C737D32AC", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f950d1-c01e-012f-8096-83f719000000", + "x-ms-request-id" : "5f2e8ba1-f01e-0045-1745-88ede7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "51a85305-9cc0-4ef4-ab53-f2fc2c8e0d0e" + "Date" : "Mon, 21 Oct 2019 19:25:37 GMT", + "x-ms-client-request-id" : "6c726c26-9751-4e08-9b19-776ce02bde2c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8/javabloblistblobshiermarker345024eac3cdecfeed408", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8/javabloblistblobshiermarker322954ec48cc2314d74fb", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9f8e65c9-75f8-4eae-8136-ca5bd573a18e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "bc34430a-0fc0-4d1d-bb51-9bcbbea8dc0a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFDE83C5D", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C7384605C", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744f05-501e-002e-1396-83b0b1000000", + "x-ms-request-id" : "de52725a-c01e-004d-1d45-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "9f8e65c9-75f8-4eae-8136-ca5bd573a18e" + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "bc34430a-0fc0-4d1d-bb51-9bcbbea8dc0a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8/javabloblistblobshiermarker458166f130a8d4a2f04d8", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8/javabloblistblobshiermarker487706e8e284e1407a483", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f58a5b0b-254a-44ae-b4bc-829da3c06bef" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1e683d68-4cf1-430d-b5cf-85efc22c88e0" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFDEE7F74", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C738F1152", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f95107-c01e-012f-3596-83f719000000", + "x-ms-request-id" : "5f2e8bd4-f01e-0045-4145-88ede7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "f58a5b0b-254a-44ae-b4bc-829da3c06bef" + "Date" : "Mon, 21 Oct 2019 19:25:37 GMT", + "x-ms-client-request-id" : "1e683d68-4cf1-430d-b5cf-85efc22c88e0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8/javabloblistblobshiermarker5131103236c8165626440", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8/javabloblistblobshiermarker522655adccd41d0e10483", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e3669af3-f505-4da1-97dd-b155cf5ae3a0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "34a24b9f-5c47-4f09-9f29-c2461f509c31" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFDF5860D", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C7397029C", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744f2c-501e-002e-3796-83b0b1000000", + "x-ms-request-id" : "de52728d-c01e-004d-4c45-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "e3669af3-f505-4da1-97dd-b155cf5ae3a0" + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "34a24b9f-5c47-4f09-9f29-c2461f509c31" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8/javabloblistblobshiermarker6266116dd557170fd1446", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8/javabloblistblobshiermarker681116ba05a5f869a4453", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "110ef873-db33-4fe0-9dfe-56ddc7f23cad" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "14c3bb29-4a73-4993-a822-a8cd9569de78" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFDFC3E74", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C739F6906", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f95154-c01e-012f-7896-83f719000000", + "x-ms-request-id" : "5f2e8be9-f01e-0045-5545-88ede7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "110ef873-db33-4fe0-9dfe-56ddc7f23cad" + "Date" : "Mon, 21 Oct 2019 19:25:37 GMT", + "x-ms-client-request-id" : "14c3bb29-4a73-4993-a822-a8cd9569de78" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8/javabloblistblobshiermarker783608fc7fcd7c1c9e48e", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8/javabloblistblobshiermarker77137788a688e0dc8745c", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8eb9e241-32c3-4550-8eba-8852488f588c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f0bfbaff-6977-4404-881b-d61de8b81ba7" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFE023358", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C73A696C0", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744f51-501e-002e-5996-83b0b1000000", + "x-ms-request-id" : "de5272b4-c01e-004d-6c45-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "8eb9e241-32c3-4550-8eba-8852488f588c" + "Date" : "Mon, 21 Oct 2019 19:25:37 GMT", + "x-ms-client-request-id" : "f0bfbaff-6977-4404-881b-d61de8b81ba7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8/javabloblistblobshiermarker814224454c3741ee514b4", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8/javabloblistblobshiermarker8601726d9f790cca8e404", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "100a0af4-9891-4469-8ed7-b48fb0f5b221" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1e25cbed-3cc4-441e-a193-9491515f7ee6" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFE0BAB8F", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C73AD7634", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f9519c-c01e-012f-3b96-83f719000000", + "x-ms-request-id" : "5f2e8bfa-f01e-0045-6445-88ede7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "100a0af4-9891-4469-8ed7-b48fb0f5b221" + "Date" : "Mon, 21 Oct 2019 19:25:37 GMT", + "x-ms-client-request-id" : "1e25cbed-3cc4-441e-a193-9491515f7ee6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8/javabloblistblobshiermarker999133c5436e40c75041c", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8/javabloblistblobshiermarker905390aed426d126534c6", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9478645d-b664-4091-b081-1561923e24ee" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "5c81ff1f-1e48-4e11-a205-6389e328b8fc" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFE112B29", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:42 GMT", + "ETag" : "0x8D7565C73B455BF", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744f6a-501e-002e-7096-83b0b1000000", + "x-ms-request-id" : "de5272d6-c01e-004d-0c45-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "9478645d-b664-4091-b081-1561923e24ee" + "Date" : "Mon, 21 Oct 2019 19:25:37 GMT", + "x-ms-client-request-id" : "5c81ff1f-1e48-4e11-a205-6389e328b8fc" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8/javabloblistblobshiermarker1095290df7d596e05bf4d", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8/javabloblistblobshiermarker1014873ba99780bdd3e47", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "99256a98-60c6-4ac8-867a-027bc2dc53e0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "a63230dd-f742-4ce8-a55d-8abfd89d7ddb" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFE172008", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:43 GMT", + "ETag" : "0x8D7565C73BD58A2", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f951df-c01e-012f-7c96-83f719000000", + "x-ms-request-id" : "5f2e8c0f-f01e-0045-7545-88ede7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "99256a98-60c6-4ac8-867a-027bc2dc53e0" + "Date" : "Mon, 21 Oct 2019 19:25:37 GMT", + "x-ms-client-request-id" : "a63230dd-f742-4ce8-a55d-8abfd89d7ddb" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8?delimiter=/&maxresults=6&include=&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8?delimiter=/&maxresults=6&include=&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "40d470a0-46f2-4ad8-bddd-424d1ede5ac2" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "37ba6d1a-f1be-44ac-be97-5d9bf0ae01ab" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -254,20 +254,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "80744f89-501e-002e-0b96-83b0b1000000", - "Body" : "6/javabloblistblobshiermarker101258435d4fad72fd4ebTue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFDDCA0C3512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker1095290df7d596e05bf4dTue, 15 Oct 2019 20:26:43 GMTTue, 15 Oct 2019 20:26:43 GMT0x8D751ADFE172008512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker22131341d7d9e813e24b1Tue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFDE2BCC8512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker345024eac3cdecfeed408Tue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFDE83C5D512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker458166f130a8d4a2f04d8Tue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFDEE7F74512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker5131103236c8165626440Tue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFDF5860D512application/octet-stream0PageBlobunlockedavailabletrue2!124!MDAwMDQ4IWphdmFibG9ibGlzdGJsb2JzaGllcm1hcmtlcjYyNjYxMTZkZDU1NzE3MGZkMTQ0NiEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "40d470a0-46f2-4ad8-bddd-424d1ede5ac2", + "x-ms-request-id" : "de5272f4-c01e-004d-2845-88f694000000", + "Body" : "6/javabloblistblobshiermarker1014873ba99780bdd3e47Mon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C73BD58A2512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker194592b8fdbe4416634c9Mon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C737604EE512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker26680076ea765852084eeMon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C737D32AC512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker322954ec48cc2314d74fbMon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C7384605C512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker487706e8e284e1407a483Mon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C738F1152512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker522655adccd41d0e10483Mon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C7397029C512application/octet-stream0PageBlobunlockedavailabletrue2!124!MDAwMDQ4IWphdmFibG9ibGlzdGJsb2JzaGllcm1hcmtlcjY4MTExNmJhMDVhNWY4NjlhNDQ1MyEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-", + "Date" : "Mon, 21 Oct 2019 19:25:37 GMT", + "x-ms-client-request-id" : "37ba6d1a-f1be-44ac-be97-5d9bf0ae01ab", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8?delimiter=/&marker=2%21124%21MDAwMDQ4IWphdmFibG9ibGlzdGJsb2JzaGllcm1hcmtlcjYyNjYxMTZkZDU1NzE3MGZkMTQ0NiEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-&maxresults=6&include=&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8?delimiter=/&marker=2%21124%21MDAwMDQ4IWphdmFibG9ibGlzdGJsb2JzaGllcm1hcmtlcjY4MTExNmJhMDVhNWY4NjlhNDQ1MyEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-&maxresults=6&include=&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "995a968d-f05a-4902-ae63-00cd1211aef5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "baa8a005-7c15-470d-a184-267cb9617fdd" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -275,20 +275,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f95254-c01e-012f-6596-83f719000000", - "Body" : "2!124!MDAwMDQ4IWphdmFibG9ibGlzdGJsb2JzaGllcm1hcmtlcjYyNjYxMTZkZDU1NzE3MGZkMTQ0NiEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-6/javabloblistblobshiermarker6266116dd557170fd1446Tue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFDFC3E74512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker783608fc7fcd7c1c9e48eTue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFE023358512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker814224454c3741ee514b4Tue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFE0BAB8F512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker999133c5436e40c75041cTue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFE112B29512application/octet-stream0PageBlobunlockedavailabletrue", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "995a968d-f05a-4902-ae63-00cd1211aef5", + "x-ms-request-id" : "de527312-c01e-004d-4245-88f694000000", + "Body" : "2!124!MDAwMDQ4IWphdmFibG9ibGlzdGJsb2JzaGllcm1hcmtlcjY4MTExNmJhMDVhNWY4NjlhNDQ1MyEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-6/javabloblistblobshiermarker681116ba05a5f869a4453Mon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C739F6906512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker77137788a688e0dc8745cMon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C73A696C0512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker8601726d9f790cca8e404Mon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C73AD7634512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker905390aed426d126534c6Mon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C73B455BF512application/octet-stream0PageBlobunlockedavailabletrue", + "Date" : "Mon, 21 Oct 2019 19:25:37 GMT", + "x-ms-client-request-id" : "baa8a005-7c15-470d-a184-267cb9617fdd", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8?delimiter=/&marker=2%21124%21MDAwMDQ4IWphdmFibG9ibGlzdGJsb2JzaGllcm1hcmtlcjYyNjYxMTZkZDU1NzE3MGZkMTQ0NiEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-&maxresults=6&include=&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8?delimiter=/&marker=2%21124%21MDAwMDQ4IWphdmFibG9ibGlzdGJsb2JzaGllcm1hcmtlcjY4MTExNmJhMDVhNWY4NjlhNDQ1MyEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-&maxresults=6&include=&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ac8e017d-1eb1-4c17-a1d6-0f1d53f7edf0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "16a7e3a6-b6d2-4a9d-9f3c-9044938c3430" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -296,10 +296,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "80744fa7-501e-002e-2796-83b0b1000000", - "Body" : "2!124!MDAwMDQ4IWphdmFibG9ibGlzdGJsb2JzaGllcm1hcmtlcjYyNjYxMTZkZDU1NzE3MGZkMTQ0NiEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-6/javabloblistblobshiermarker6266116dd557170fd1446Tue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFDFC3E74512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker783608fc7fcd7c1c9e48eTue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFE023358512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker814224454c3741ee514b4Tue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFE0BAB8F512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker999133c5436e40c75041cTue, 15 Oct 2019 20:26:42 GMTTue, 15 Oct 2019 20:26:42 GMT0x8D751ADFE112B29512application/octet-stream0PageBlobunlockedavailabletrue", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "ac8e017d-1eb1-4c17-a1d6-0f1d53f7edf0", + "x-ms-request-id" : "5f2e8c1f-f01e-0045-0245-88ede7000000", + "Body" : "2!124!MDAwMDQ4IWphdmFibG9ibGlzdGJsb2JzaGllcm1hcmtlcjY4MTExNmJhMDVhNWY4NjlhNDQ1MyEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-6/javabloblistblobshiermarker681116ba05a5f869a4453Mon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C739F6906512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker77137788a688e0dc8745cMon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C73A696C0512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker8601726d9f790cca8e404Mon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C73AD7634512application/octet-stream0PageBlobunlockedavailabletruejavabloblistblobshiermarker905390aed426d126534c6Mon, 21 Oct 2019 19:25:37 GMTMon, 21 Oct 2019 19:25:37 GMT0x8D7565C73B455BF512application/octet-stream0PageBlobunlockedavailabletrue", + "Date" : "Mon, 21 Oct 2019 19:25:37 GMT", + "x-ms-client-request-id" : "16a7e3a6-b6d2-4a9d-9f3c-9044938c3430", "Content-Type" : "application/xml" }, "Exception" : null @@ -308,8 +308,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistblobshiermarker&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "41191e2d-0e77-4bb9-8903-05a2b01fd124" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1608945f-4f37-414d-8507-2ab7f0216f52" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -317,20 +317,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f952b8-c01e-012f-3b96-83f719000000", - "Body" : "jtclistblobshiermarkerjtclistblobshiermarker01930664406cac828148da8Tue, 15 Oct 2019 20:26:42 GMT\"0x8D751ADFDD5FC8B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:26:43 GMT", - "x-ms-client-request-id" : "41191e2d-0e77-4bb9-8903-05a2b01fd124", + "x-ms-request-id" : "de52732f-c01e-004d-5c45-88f694000000", + "Body" : "jtclistblobshiermarkerjtclistblobshiermarker004390f332a5b8e6064c0e8Mon, 21 Oct 2019 19:25:36 GMT\"0x8D7565C736EDAAB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:25:37 GMT", + "x-ms-client-request-id" : "1608945f-4f37-414d-8507-2ab7f0216f52", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker01930664406cac828148da8?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshiermarker004390f332a5b8e6064c0e8?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8a7452d4-0c31-424e-bfed-150f431be885" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "ec7f8259-7541-418b-b370-98669a106450" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -338,11 +338,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "80744fdd-501e-002e-5796-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:26:42 GMT", - "x-ms-client-request-id" : "8a7452d4-0c31-424e-bfed-150f431be885" + "x-ms-request-id" : "5f2e8c35-f01e-0045-1745-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:25:37 GMT", + "x-ms-client-request-id" : "ec7f8259-7541-418b-b370-98669a106450" }, "Exception" : null } ], - "variables" : [ "jtclistblobshiermarker01930664406cac828148da8", "javabloblistblobshiermarker101258435d4fad72fd4eb", "javabloblistblobshiermarker22131341d7d9e813e24b1", "javabloblistblobshiermarker345024eac3cdecfeed408", "javabloblistblobshiermarker458166f130a8d4a2f04d8", "javabloblistblobshiermarker5131103236c8165626440", "javabloblistblobshiermarker6266116dd557170fd1446", "javabloblistblobshiermarker783608fc7fcd7c1c9e48e", "javabloblistblobshiermarker814224454c3741ee514b4", "javabloblistblobshiermarker999133c5436e40c75041c", "javabloblistblobshiermarker1095290df7d596e05bf4d" ] + "variables" : [ "jtclistblobshiermarker004390f332a5b8e6064c0e8", "javabloblistblobshiermarker194592b8fdbe4416634c9", "javabloblistblobshiermarker26680076ea765852084ee", "javabloblistblobshiermarker322954ec48cc2314d74fb", "javabloblistblobshiermarker487706e8e284e1407a483", "javabloblistblobshiermarker522655adccd41d0e10483", "javabloblistblobshiermarker681116ba05a5f869a4453", "javabloblistblobshiermarker77137788a688e0dc8745c", "javabloblistblobshiermarker8601726d9f790cca8e404", "javabloblistblobshiermarker905390aed426d126534c6", "javabloblistblobshiermarker1014873ba99780bdd3e47" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionscopy.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionscopy.json index 3bc3cdd91fdb..e0be1882f82b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionscopy.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionscopy.json @@ -1,156 +1,156 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy074183487eb827748a4ab?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy087313595e6a1fe34a4c2?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ac91a1fe-ded7-4b4b-ab41-ab1b56f63628" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "9cb539e9-d3a8-4f37-b3b8-38f38fc4c908" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADD42913F2", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:32 GMT", + "ETag" : "0x8D7565C4A719080", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8073eb25-501e-002e-5996-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:25:32 GMT", - "x-ms-client-request-id" : "ac91a1fe-ded7-4b4b-ab41-ab1b56f63628" + "x-ms-request-id" : "de51fada-c01e-004d-6045-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:24:28 GMT", + "x-ms-client-request-id" : "9cb539e9-d3a8-4f37-b3b8-38f38fc4c908" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy074183487eb827748a4ab/ajavabloblistblobshieroptionscopy177424bb9f5cf7c642", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy087313595e6a1fe34a4c2/ajavabloblistblobshieroptionscopy103892a589905a1a68", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ddf0d592-e55f-400f-918b-43d0eb603cc1" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c2e0e78b-df53-4518-b8ad-136bc9f83230" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADD42F77E0", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:32 GMT", + "ETag" : "0x8D7565C4A7906FB", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f858bc-c01e-012f-3796-83f719000000", + "x-ms-request-id" : "5f2e4dbc-f01e-0045-7f45-88ede7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:25:32 GMT", - "x-ms-client-request-id" : "ddf0d592-e55f-400f-918b-43d0eb603cc1" + "Date" : "Mon, 21 Oct 2019 19:24:27 GMT", + "x-ms-client-request-id" : "c2e0e78b-df53-4518-b8ad-136bc9f83230" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy074183487eb827748a4ab/cjavabloblistblobshieroptionscopy285428ad02a86048ee", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy087313595e6a1fe34a4c2/cjavabloblistblobshieroptionscopy2112530898aecba1ac", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a8fbfdb8-43ae-4395-a8b0-ba9ef28b87b4" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "af3daf5a-f83a-4902-9a01-eb5963466624" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "937bd931-6c78-4c18-860a-8ce3ba6f8683", - "ETag" : "0x8D751ADD453F8CF", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:32 GMT", + "x-ms-copy-id" : "58dc794f-4f54-4447-8bf4-8b3bdea31c3f", + "ETag" : "0x8D7565C4A8D7E65", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:28 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "8073eb3e-501e-002e-6f96-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:25:32 GMT", - "x-ms-client-request-id" : "a8fbfdb8-43ae-4395-a8b0-ba9ef28b87b4" + "x-ms-request-id" : "de51fb03-c01e-004d-0145-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:24:28 GMT", + "x-ms-client-request-id" : "af3daf5a-f83a-4902-9a01-eb5963466624" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy074183487eb827748a4ab/cjavabloblistblobshieroptionscopy285428ad02a86048ee", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy087313595e6a1fe34a4c2/cjavabloblistblobshieroptionscopy2112530898aecba1ac", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "98691c87-202e-44e9-96ed-8d5f86b554d3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "9fbad5ef-b1a5-497f-a9e1-4b2ba40ae395" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "937bd931-6c78-4c18-860a-8ce3ba6f8683", + "x-ms-copy-id" : "58dc794f-4f54-4447-8bf4-8b3bdea31c3f", "x-ms-lease-state" : "available", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy074183487eb827748a4ab/ajavabloblistblobshieroptionscopy177424bb9f5cf7c642", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy087313595e6a1fe34a4c2/ajavabloblistblobshieroptionscopy103892a589905a1a68", "x-ms-blob-sequence-number" : "0", "x-ms-copy-progress" : "512/512", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:32 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:28 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 15 Oct 2019 20:25:32 GMT", + "Date" : "Mon, 21 Oct 2019 19:24:28 GMT", "x-ms-blob-type" : "PageBlob", - "x-ms-copy-completion-time" : "Tue, 15 Oct 2019 20:25:32 GMT", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:24:28 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D751ADD453F8CF", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:25:32 GMT", + "ETag" : "0x8D7565C4A8D7E65", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:24:28 GMT", "Content-Length" : "512", "x-ms-copy-status" : "success", - "x-ms-request-id" : "69f859ec-c01e-012f-4696-83f719000000", - "x-ms-client-request-id" : "98691c87-202e-44e9-96ed-8d5f86b554d3", + "x-ms-request-id" : "5f2e4f02-f01e-0045-0e45-88ede7000000", + "x-ms-client-request-id" : "9fbad5ef-b1a5-497f-a9e1-4b2ba40ae395", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy074183487eb827748a4ab/mjavabloblistblobshieroptionscopy329852bb125c4b6bc2", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy087313595e6a1fe34a4c2/mjavabloblistblobshieroptionscopy3882249d0a1212ecda", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7eda30e1-909e-455b-b3d0-fa92c3ccee52" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "302a875c-71d6-498f-9680-e43de0af6aed" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADD504619A", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:34 GMT", + "ETag" : "0x8D7565C4B33D233", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:29 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8073ed03-501e-002e-7c96-83b0b1000000", + "x-ms-request-id" : "de51fc9e-c01e-004d-5f45-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:25:33 GMT", - "x-ms-client-request-id" : "7eda30e1-909e-455b-b3d0-fa92c3ccee52" + "Date" : "Mon, 21 Oct 2019 19:24:29 GMT", + "x-ms-client-request-id" : "302a875c-71d6-498f-9680-e43de0af6aed" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy074183487eb827748a4ab/ajavabloblistblobshieroptionscopy177424bb9f5cf7c642?comp=snapshot", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy087313595e6a1fe34a4c2/ajavabloblistblobshieroptionscopy103892a589905a1a68?comp=snapshot", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4ac77b2e-edd1-44fb-b19a-938152b3dfca" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1bc4d1fb-6b9f-4505-b978-aebd9d3d0622" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-snapshot" : "2019-10-15T20:25:34.1701170Z", + "x-ms-snapshot" : "2019-10-21T19:24:29.5392334Z", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADD42F77E0", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:32 GMT", + "ETag" : "0x8D7565C4A7906FB", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f85e46-c01e-012f-3a96-83f719000000", + "x-ms-request-id" : "5f2e4f17-f01e-0045-1e45-88ede7000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Tue, 15 Oct 2019 20:25:34 GMT", - "x-ms-client-request-id" : "4ac77b2e-edd1-44fb-b19a-938152b3dfca" + "Date" : "Mon, 21 Oct 2019 19:24:28 GMT", + "x-ms-client-request-id" : "1bc4d1fb-6b9f-4505-b978-aebd9d3d0622" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy074183487eb827748a4ab/ujavabloblistblobshieroptionscopy4087474ca0a12c845e?blockid=0000&comp=block", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy087313595e6a1fe34a4c2/ujavabloblistblobshieroptionscopy42256760d3666fcc42?blockid=0000&comp=block", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2281bab7-1efc-4ac1-8162-2d486d07df0d", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "6c76db92-ac98-488e-8a73-00e647ba4e66", "Content-Type" : "application/octet-stream" }, "Response" : { @@ -160,19 +160,19 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8073ed22-501e-002e-1796-83b0b1000000", + "x-ms-request-id" : "de51fcb9-c01e-004d-7345-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:25:33 GMT", - "x-ms-client-request-id" : "2281bab7-1efc-4ac1-8162-2d486d07df0d" + "Date" : "Mon, 21 Oct 2019 19:24:29 GMT", + "x-ms-client-request-id" : "6c76db92-ac98-488e-8a73-00e647ba4e66" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy074183487eb827748a4ab?delimiter=&include=copy&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy087313595e6a1fe34a4c2?delimiter=&include=copy&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "09d177ca-4af8-404f-b49b-955dd63cf7a3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "8875e5b3-0a9d-4bdc-9b7c-6efc740eb788" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -180,10 +180,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f85ea8-c01e-012f-1696-83f719000000", - "Body" : "ajavabloblistblobshieroptionscopy177424bb9f5cf7c642Tue, 15 Oct 2019 20:25:32 GMTTue, 15 Oct 2019 20:25:32 GMT0x8D751ADD42F77E0512application/octet-stream0PageBlobunlockedavailabletruecjavabloblistblobshieroptionscopy285428ad02a86048eeTue, 15 Oct 2019 20:25:32 GMTTue, 15 Oct 2019 20:25:32 GMT0x8D751ADD453F8CF512application/octet-stream0PageBlobunlockedavailable937bd931-6c78-4c18-860a-8ce3ba6f8683https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy074183487eb827748a4ab/ajavabloblistblobshieroptionscopy177424bb9f5cf7c642success512/512Tue, 15 Oct 2019 20:25:32 GMTtruemjavabloblistblobshieroptionscopy329852bb125c4b6bc2Tue, 15 Oct 2019 20:25:34 GMTTue, 15 Oct 2019 20:25:34 GMT0x8D751ADD504619A512application/octet-stream0PageBlobunlockedavailabletrue", - "Date" : "Tue, 15 Oct 2019 20:25:34 GMT", - "x-ms-client-request-id" : "09d177ca-4af8-404f-b49b-955dd63cf7a3", + "x-ms-request-id" : "5f2e4f36-f01e-0045-3b45-88ede7000000", + "Body" : "ajavabloblistblobshieroptionscopy103892a589905a1a68Mon, 21 Oct 2019 19:24:28 GMTMon, 21 Oct 2019 19:24:28 GMT0x8D7565C4A7906FB512application/octet-stream0PageBlobunlockedavailabletruecjavabloblistblobshieroptionscopy2112530898aecba1acMon, 21 Oct 2019 19:24:28 GMTMon, 21 Oct 2019 19:24:28 GMT0x8D7565C4A8D7E65512application/octet-stream0PageBlobunlockedavailable58dc794f-4f54-4447-8bf4-8b3bdea31c3fhttps://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy087313595e6a1fe34a4c2/ajavabloblistblobshieroptionscopy103892a589905a1a68success512/512Mon, 21 Oct 2019 19:24:28 GMTtruemjavabloblistblobshieroptionscopy3882249d0a1212ecdaMon, 21 Oct 2019 19:24:29 GMTMon, 21 Oct 2019 19:24:29 GMT0x8D7565C4B33D233512application/octet-stream0PageBlobunlockedavailabletrue", + "Date" : "Mon, 21 Oct 2019 19:24:28 GMT", + "x-ms-client-request-id" : "8875e5b3-0a9d-4bdc-9b7c-6efc740eb788", "Content-Type" : "application/xml" }, "Exception" : null @@ -192,8 +192,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistblobshieroptionscopy&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cdc69723-ec6d-414c-ab2a-c7df8504d9c8" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "e97744da-3629-4f1a-80c8-e6cb2cc84279" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -201,20 +201,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8073ed3e-501e-002e-3196-83b0b1000000", - "Body" : "jtclistblobshieroptionscopyjtclistblobshieroptionscopy074183487eb827748a4abTue, 15 Oct 2019 20:25:32 GMT\"0x8D751ADD42913F2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:25:33 GMT", - "x-ms-client-request-id" : "cdc69723-ec6d-414c-ab2a-c7df8504d9c8", + "x-ms-request-id" : "de51fcde-c01e-004d-1145-88f694000000", + "Body" : "jtclistblobshieroptionscopyjtclistblobshieroptionscopy087313595e6a1fe34a4c2Mon, 21 Oct 2019 19:24:28 GMT\"0x8D7565C4A719080\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:24:29 GMT", + "x-ms-client-request-id" : "e97744da-3629-4f1a-80c8-e6cb2cc84279", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy074183487eb827748a4ab?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionscopy087313595e6a1fe34a4c2?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "dca4e88c-cad0-4a72-ae25-f1b2f6a98da5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b95235ad-55ec-466c-96fe-8d125d55692a" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -222,11 +222,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f85f01-c01e-012f-6496-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:25:34 GMT", - "x-ms-client-request-id" : "dca4e88c-cad0-4a72-ae25-f1b2f6a98da5" + "x-ms-request-id" : "5f2e4f4b-f01e-0045-5045-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:24:28 GMT", + "x-ms-client-request-id" : "b95235ad-55ec-466c-96fe-8d125d55692a" }, "Exception" : null } ], - "variables" : [ "jtclistblobshieroptionscopy074183487eb827748a4ab", "javabloblistblobshieroptionscopy177424bb9f5cf7c642", "javabloblistblobshieroptionscopy285428ad02a86048ee", "javabloblistblobshieroptionscopy329852bb125c4b6bc2", "javabloblistblobshieroptionscopy4087474ca0a12c845e" ] + "variables" : [ "jtclistblobshieroptionscopy087313595e6a1fe34a4c2", "javabloblistblobshieroptionscopy103892a589905a1a68", "javabloblistblobshieroptionscopy2112530898aecba1ac", "javabloblistblobshieroptionscopy3882249d0a1212ecda", "javabloblistblobshieroptionscopy42256760d3666fcc42" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsdeleted.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsdeleted.json index ca9dbd7750ea..f2751a0a5583 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsdeleted.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsdeleted.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted036242cfc2a02f8eb34?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted089761d6b5647887364?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5576e196-5b67-491d-9dc1-eb8256a18e02" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "a9dde92a-68d6-4ee4-8e3f-d3c9ccf8de19" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D753EAB6EA5E6A", - "Last-Modified" : "Fri, 18 Oct 2019 16:46:25 GMT", + "ETag" : "0x8D7565C4D212B62", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:32 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "1a313f85-f01e-00c6-58d3-854d4a000000", - "Date" : "Fri, 18 Oct 2019 16:46:25 GMT", - "x-ms-client-request-id" : "5576e196-5b67-491d-9dc1-eb8256a18e02" + "x-ms-request-id" : "de520171-c01e-004d-6445-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:24:32 GMT", + "x-ms-client-request-id" : "a9dde92a-68d6-4ee4-8e3f-d3c9ccf8de19" }, "Exception" : null }, { @@ -25,8 +25,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?restype=service&comp=properties", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9520e03a-af7b-49fa-b567-6a8797103216", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "484d97d1-7d77-49e4-aade-1bc4c06cf6fd", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { @@ -35,40 +35,40 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "1a313fdb-f01e-00c6-22d3-854d4a000000", - "Date" : "Fri, 18 Oct 2019 16:46:25 GMT", - "x-ms-client-request-id" : "9520e03a-af7b-49fa-b567-6a8797103216" + "x-ms-request-id" : "5f2e5268-f01e-0045-6b45-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:24:31 GMT", + "x-ms-client-request-id" : "484d97d1-7d77-49e4-aade-1bc4c06cf6fd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted036242cfc2a02f8eb34/javabloblistblobshieroptionsdeleted187023e466a08e9a2", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted089761d6b5647887364/javabloblistblobshieroptionsdeleted1699156e6912e338f", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9fb4938e-57dd-427f-b981-b32b81474212" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "8f9c8392-f56f-4e91-9e31-bb99da575598" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D753EAC919A573", - "Last-Modified" : "Fri, 18 Oct 2019 16:46:55 GMT", + "ETag" : "0x8D7565C5F122CF0", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:02 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "1a316837-f01e-00c6-3ed3-854d4a000000", + "x-ms-request-id" : "de523682-c01e-004d-2945-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 18 Oct 2019 16:46:55 GMT", - "x-ms-client-request-id" : "9fb4938e-57dd-427f-b981-b32b81474212" + "Date" : "Mon, 21 Oct 2019 19:25:02 GMT", + "x-ms-client-request-id" : "8f9c8392-f56f-4e91-9e31-bb99da575598" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted036242cfc2a02f8eb34/javabloblistblobshieroptionsdeleted187023e466a08e9a2", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted089761d6b5647887364/javabloblistblobshieroptionsdeleted1699156e6912e338f", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1498401d-781e-4a7e-83c0-9df1bbc6aeb6" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "de720081-3216-4b6e-875c-586b37464104" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -77,18 +77,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "1a316847-f01e-00c6-4cd3-854d4a000000", - "Date" : "Fri, 18 Oct 2019 16:46:56 GMT", - "x-ms-client-request-id" : "1498401d-781e-4a7e-83c0-9df1bbc6aeb6" + "x-ms-request-id" : "5f2e6b94-f01e-0045-2f45-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:25:02 GMT", + "x-ms-client-request-id" : "de720081-3216-4b6e-875c-586b37464104" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted036242cfc2a02f8eb34?delimiter=&include=deleted&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted089761d6b5647887364?delimiter=&include=deleted&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "12d338aa-c5ac-40ef-aef8-21b7eef27fd8" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b7c13ffb-8e2c-43f2-8c7e-a223c68f1951" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -96,10 +96,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "1a3168f3-f01e-00c6-5dd3-854d4a000000", - "Body" : "javabloblistblobshieroptionsdeleted187023e466a08e9a2trueFri, 18 Oct 2019 16:46:55 GMTFri, 18 Oct 2019 16:46:55 GMT0x8D753EAC919A5730application/octet-streamAppendBlobtrueFri, 18 Oct 2019 16:46:55 GMT1", - "Date" : "Fri, 18 Oct 2019 16:46:56 GMT", - "x-ms-client-request-id" : "12d338aa-c5ac-40ef-aef8-21b7eef27fd8", + "x-ms-request-id" : "de5236ac-c01e-004d-4d45-88f694000000", + "Body" : "javabloblistblobshieroptionsdeleted1699156e6912e338ftrueMon, 21 Oct 2019 19:25:02 GMTMon, 21 Oct 2019 19:25:02 GMT0x8D7565C5F122CF00application/octet-streamAppendBlobtrueMon, 21 Oct 2019 19:25:02 GMT1", + "Date" : "Mon, 21 Oct 2019 19:25:02 GMT", + "x-ms-client-request-id" : "b7c13ffb-8e2c-43f2-8c7e-a223c68f1951", "Content-Type" : "application/xml" }, "Exception" : null @@ -108,8 +108,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?restype=service&comp=properties", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e82998f1-52e1-41b7-92b0-e5f5129dad2d", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f9e96b6d-e3ac-4547-87f3-09f1958b046f", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { @@ -118,9 +118,9 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "1a316910-f01e-00c6-75d3-854d4a000000", - "Date" : "Fri, 18 Oct 2019 16:46:56 GMT", - "x-ms-client-request-id" : "e82998f1-52e1-41b7-92b0-e5f5129dad2d" + "x-ms-request-id" : "5f2e6ba9-f01e-0045-3c45-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:25:02 GMT", + "x-ms-client-request-id" : "f9e96b6d-e3ac-4547-87f3-09f1958b046f" }, "Exception" : null }, { @@ -128,8 +128,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistblobshieroptionsdeleted&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b81aa94a-392f-4e8d-966a-15345da68dc3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "80cd52ff-9c87-4f42-aed4-5a083b8d1f92" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -137,20 +137,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "1a31904e-f01e-00c6-80d3-854d4a000000", - "Body" : "jtclistblobshieroptionsdeletedjtclistblobshieroptionsdeleted036242cfc2a02f8eb34Fri, 18 Oct 2019 16:46:25 GMT\"0x8D753EAB6EA5E6A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 18 Oct 2019 16:47:26 GMT", - "x-ms-client-request-id" : "b81aa94a-392f-4e8d-966a-15345da68dc3", + "x-ms-request-id" : "de526b37-c01e-004d-4a45-88f694000000", + "Body" : "jtclistblobshieroptionsdeletedjtclistblobshieroptionsdeleted089761d6b5647887364Mon, 21 Oct 2019 19:24:32 GMT\"0x8D7565C4D212B62\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:25:32 GMT", + "x-ms-client-request-id" : "80cd52ff-9c87-4f42-aed4-5a083b8d1f92", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted036242cfc2a02f8eb34?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsdeleted089761d6b5647887364?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "28fe657b-55e3-400d-a279-898ac0007ff4" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1f3f56c7-2f30-4610-acc9-09d99d1e0676" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -158,11 +158,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "1a31905d-f01e-00c6-0ed3-854d4a000000", - "Date" : "Fri, 18 Oct 2019 16:47:26 GMT", - "x-ms-client-request-id" : "28fe657b-55e3-400d-a279-898ac0007ff4" + "x-ms-request-id" : "5f2e8718-f01e-0045-5345-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:25:32 GMT", + "x-ms-client-request-id" : "1f3f56c7-2f30-4610-acc9-09d99d1e0676" }, "Exception" : null } ], - "variables" : [ "jtclistblobshieroptionsdeleted036242cfc2a02f8eb34", "javabloblistblobshieroptionsdeleted187023e466a08e9a2" ] + "variables" : [ "jtclistblobshieroptionsdeleted089761d6b5647887364", "javabloblistblobshieroptionsdeleted1699156e6912e338f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsfail[0].json index 13d493c6109e..4c826edbbdfd 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsfail[0].json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsfail080585cb406ca7df38426?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsfail0874919fa8780e3f9940c?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f31f4edc-af2f-4f7a-92e2-c36080c73aae" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "a7da8ae5-98db-433b-90cd-7657403b8d42" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFD476EB0", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:41 GMT", + "ETag" : "0x8D7565C72ECA5BB", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744db1-501e-002e-7c96-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "f31f4edc-af2f-4f7a-92e2-c36080c73aae" + "x-ms-request-id" : "de5270d8-c01e-004d-4545-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:25:35 GMT", + "x-ms-client-request-id" : "a7da8ae5-98db-433b-90cd-7657403b8d42" }, "Exception" : null }, { @@ -25,8 +25,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistblobshieroptionsfail&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c81d82c4-fa12-413f-b9ca-a6fec4336c44" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "db8304ad-1de5-4930-8fd3-0e3b385550ea" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f94d4b-c01e-012f-3d96-83f719000000", - "Body" : "jtclistblobshieroptionsfailjtclistblobshieroptionsfail080585cb406ca7df38426Tue, 15 Oct 2019 20:26:41 GMT\"0x8D751ADFD476EB0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "c81d82c4-fa12-413f-b9ca-a6fec4336c44", + "x-ms-request-id" : "5f2e8aa8-f01e-0045-4845-88ede7000000", + "Body" : "jtclistblobshieroptionsfailjtclistblobshieroptionsfail0874919fa8780e3f9940cMon, 21 Oct 2019 19:25:36 GMT\"0x8D7565C72ECA5BB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "db8304ad-1de5-4930-8fd3-0e3b385550ea", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsfail080585cb406ca7df38426?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsfail0874919fa8780e3f9940c?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7824e9e1-9797-4fc6-b60b-3bf223efbe83" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f156a6a4-b351-45f7-a20f-e02389338a29" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "80744dd7-501e-002e-1996-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "7824e9e1-9797-4fc6-b60b-3bf223efbe83" + "x-ms-request-id" : "de5270f8-c01e-004d-6145-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:25:35 GMT", + "x-ms-client-request-id" : "f156a6a4-b351-45f7-a20f-e02389338a29" }, "Exception" : null } ], - "variables" : [ "jtclistblobshieroptionsfail080585cb406ca7df38426" ] + "variables" : [ "jtclistblobshieroptionsfail0874919fa8780e3f9940c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsfail[1].json index a2a9a1b0b63b..3310d98941fc 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsfail[1].json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsfail04575624f0ac3a838f4e7?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsfail028849876ee94eda6a456?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5fa4137d-4038-4b14-a0d0-187bfdb8d3f3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "ca7621a7-c2e2-47a2-b8e7-73cd43b4d536" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFD59337C", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:41 GMT", + "ETag" : "0x8D7565C72FFF8CB", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f94d91-c01e-012f-7c96-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "5fa4137d-4038-4b14-a0d0-187bfdb8d3f3" + "x-ms-request-id" : "5f2e8ac4-f01e-0045-5f45-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "ca7621a7-c2e2-47a2-b8e7-73cd43b4d536" }, "Exception" : null }, { @@ -25,8 +25,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistblobshieroptionsfail&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e62ff72c-c2b2-4b68-9f73-e701a6c032b5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "978586a7-4953-43d3-a446-2c368d01a651" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "80744df1-501e-002e-2e96-83b0b1000000", - "Body" : "jtclistblobshieroptionsfailjtclistblobshieroptionsfail04575624f0ac3a838f4e7Tue, 15 Oct 2019 20:26:41 GMT\"0x8D751ADFD59337C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "e62ff72c-c2b2-4b68-9f73-e701a6c032b5", + "x-ms-request-id" : "de527111-c01e-004d-7645-88f694000000", + "Body" : "jtclistblobshieroptionsfailjtclistblobshieroptionsfail028849876ee94eda6a456Mon, 21 Oct 2019 19:25:36 GMT\"0x8D7565C72FFF8CB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "978586a7-4953-43d3-a446-2c368d01a651", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsfail04575624f0ac3a838f4e7?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsfail028849876ee94eda6a456?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3edc5ead-8fba-46fa-9068-81eccdeaba8b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "67fd8c41-1877-4690-b9f2-227f39dc6d00" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f94dd1-c01e-012f-3596-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "3edc5ead-8fba-46fa-9068-81eccdeaba8b" + "x-ms-request-id" : "5f2e8adf-f01e-0045-7345-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "67fd8c41-1877-4690-b9f2-227f39dc6d00" }, "Exception" : null } ], - "variables" : [ "jtclistblobshieroptionsfail04575624f0ac3a838f4e7" ] + "variables" : [ "jtclistblobshieroptionsfail028849876ee94eda6a456" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsmaxresults.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsmaxresults.json index 761bcc8ad472..ea7735c08a6e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsmaxresults.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsmaxresults.json @@ -1,156 +1,156 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults020606b6fa8bcdcc85?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults0334675412e9a4cafa?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9a49765f-fe6c-4f44-b913-f54aefdfe39c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "543439c6-234e-46c4-8542-50b0d85a1399" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFC3AEC7F", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:39 GMT", + "ETag" : "0x8D7565C72078C82", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744abc-501e-002e-7296-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:26:39 GMT", - "x-ms-client-request-id" : "9a49765f-fe6c-4f44-b913-f54aefdfe39c" + "x-ms-request-id" : "de526e18-c01e-004d-5645-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:25:34 GMT", + "x-ms-client-request-id" : "543439c6-234e-46c4-8542-50b0d85a1399" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults020606b6fa8bcdcc85/ajavabloblistblobshieroptionsmaxresults106637c57c3c1ed", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults0334675412e9a4cafa/ajavabloblistblobshieroptionsmaxresults166610426db7e24", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "69e0b9ee-92ab-4083-87e3-d051c4cd9231" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c2788e5d-2325-465f-9e06-c0af21d9aa54" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFC4EC147", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:40 GMT", + "ETag" : "0x8D7565C721077FB", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f94799-c01e-012f-0796-83f719000000", + "x-ms-request-id" : "5f2e891d-f01e-0045-0245-88ede7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:39 GMT", - "x-ms-client-request-id" : "69e0b9ee-92ab-4083-87e3-d051c4cd9231" + "Date" : "Mon, 21 Oct 2019 19:25:34 GMT", + "x-ms-client-request-id" : "c2788e5d-2325-465f-9e06-c0af21d9aa54" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults020606b6fa8bcdcc85/cjavabloblistblobshieroptionsmaxresults264763ae2b842a0", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults0334675412e9a4cafa/cjavabloblistblobshieroptionsmaxresults28348690a2d9a5f", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "eaab46e9-8596-49ab-a419-5dbdabf7a240" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "621fe36e-7f25-409d-a559-25c64e0860d1" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "5aac1131-24b5-4ab3-9cc6-479ae6e8fcf0", - "ETag" : "0x8D751ADFC69F118", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:40 GMT", + "x-ms-copy-id" : "1afce9be-db47-4f23-a601-1090564dcca3", + "ETag" : "0x8D7565C721DC1A2", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:34 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "80744af7-501e-002e-2196-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:26:39 GMT", - "x-ms-client-request-id" : "eaab46e9-8596-49ab-a419-5dbdabf7a240" + "x-ms-request-id" : "de526e33-c01e-004d-6b45-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:25:34 GMT", + "x-ms-client-request-id" : "621fe36e-7f25-409d-a559-25c64e0860d1" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults020606b6fa8bcdcc85/cjavabloblistblobshieroptionsmaxresults264763ae2b842a0", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults0334675412e9a4cafa/cjavabloblistblobshieroptionsmaxresults28348690a2d9a5f", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e9bf4075-a2ec-4740-aac9-a4b66126161b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1a130397-be68-4a41-9921-1601ca926089" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "5aac1131-24b5-4ab3-9cc6-479ae6e8fcf0", + "x-ms-copy-id" : "1afce9be-db47-4f23-a601-1090564dcca3", "x-ms-lease-state" : "available", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults020606b6fa8bcdcc85/ajavabloblistblobshieroptionsmaxresults106637c57c3c1ed", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults0334675412e9a4cafa/ajavabloblistblobshieroptionsmaxresults166610426db7e24", "x-ms-blob-sequence-number" : "0", "x-ms-copy-progress" : "512/512", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:40 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:34 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 15 Oct 2019 20:26:40 GMT", + "Date" : "Mon, 21 Oct 2019 19:25:35 GMT", "x-ms-blob-type" : "PageBlob", - "x-ms-copy-completion-time" : "Tue, 15 Oct 2019 20:26:40 GMT", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:25:34 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D751ADFC69F118", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:26:40 GMT", + "ETag" : "0x8D7565C721DC1A2", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:25:34 GMT", "Content-Length" : "512", "x-ms-copy-status" : "success", - "x-ms-request-id" : "69f948e7-c01e-012f-3596-83f719000000", - "x-ms-client-request-id" : "e9bf4075-a2ec-4740-aac9-a4b66126161b", + "x-ms-request-id" : "5f2e8a27-f01e-0045-6245-88ede7000000", + "x-ms-client-request-id" : "1a130397-be68-4a41-9921-1601ca926089", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults020606b6fa8bcdcc85/mjavabloblistblobshieroptionsmaxresults39622695820c9ba", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults0334675412e9a4cafa/mjavabloblistblobshieroptionsmaxresults317938edaccb61b", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "240d97c9-4017-42c8-a2a7-da5e0bd45e03" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "6c5e0d71-c633-44cc-a975-450050796398" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFD1C7CF5", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:41 GMT", + "ETag" : "0x8D7565C72C37917", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:35 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744d44-501e-002e-1a96-83b0b1000000", + "x-ms-request-id" : "de527026-c01e-004d-2045-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:40 GMT", - "x-ms-client-request-id" : "240d97c9-4017-42c8-a2a7-da5e0bd45e03" + "Date" : "Mon, 21 Oct 2019 19:25:35 GMT", + "x-ms-client-request-id" : "6c5e0d71-c633-44cc-a975-450050796398" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults020606b6fa8bcdcc85/ajavabloblistblobshieroptionsmaxresults106637c57c3c1ed?comp=snapshot", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults0334675412e9a4cafa/ajavabloblistblobshieroptionsmaxresults166610426db7e24?comp=snapshot", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ff66533c-5a08-4148-8f60-a73fc0c03622" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c8dedfd4-dc03-4929-a021-18a8aaea0e8c" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-snapshot" : "2019-10-15T20:26:41.4289606Z", + "x-ms-snapshot" : "2019-10-21T19:25:35.9018030Z", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFC4EC147", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:40 GMT", + "ETag" : "0x8D7565C721077FB", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f94c5d-c01e-012f-6096-83f719000000", + "x-ms-request-id" : "5f2e8a3f-f01e-0045-7845-88ede7000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "ff66533c-5a08-4148-8f60-a73fc0c03622" + "Date" : "Mon, 21 Oct 2019 19:25:35 GMT", + "x-ms-client-request-id" : "c8dedfd4-dc03-4929-a021-18a8aaea0e8c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults020606b6fa8bcdcc85/ujavabloblistblobshieroptionsmaxresults415695f2f489ee7?blockid=0000&comp=block", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults0334675412e9a4cafa/ujavabloblistblobshieroptionsmaxresults44420249bae63cb?blockid=0000&comp=block", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "614cbf9c-6319-45de-b160-3301705ffaf7", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c5cb4150-babb-4c93-bf1e-458f455da79f", "Content-Type" : "application/octet-stream" }, "Response" : { @@ -160,19 +160,19 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744d6c-501e-002e-3f96-83b0b1000000", + "x-ms-request-id" : "de527068-c01e-004d-5d45-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:40 GMT", - "x-ms-client-request-id" : "614cbf9c-6319-45de-b160-3301705ffaf7" + "Date" : "Mon, 21 Oct 2019 19:25:35 GMT", + "x-ms-client-request-id" : "c5cb4150-babb-4c93-bf1e-458f455da79f" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults020606b6fa8bcdcc85?delimiter=&maxresults=1&include=copy%2cuncommittedblobs&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults0334675412e9a4cafa?delimiter=&maxresults=1&include=copy%2cuncommittedblobs&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d545c1ad-bbfb-44e9-9b77-a36c8086bfe8" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "e08f1745-97f9-4c67-ba50-790f69d2cfa4" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -180,10 +180,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f94cc4-c01e-012f-3d96-83f719000000", - "Body" : "1ajavabloblistblobshieroptionsmaxresults106637c57c3c1edTue, 15 Oct 2019 20:26:40 GMTTue, 15 Oct 2019 20:26:40 GMT0x8D751ADFC4EC147512application/octet-stream0PageBlobunlockedavailabletrue2!132!MDAwMDU0IWNqYXZhYmxvYmxpc3RibG9ic2hpZXJvcHRpb25zbWF4cmVzdWx0czI2NDc2M2FlMmI4NDJhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "d545c1ad-bbfb-44e9-9b77-a36c8086bfe8", + "x-ms-request-id" : "5f2e8a4e-f01e-0045-0545-88ede7000000", + "Body" : "1ajavabloblistblobshieroptionsmaxresults166610426db7e24Mon, 21 Oct 2019 19:25:34 GMTMon, 21 Oct 2019 19:25:34 GMT0x8D7565C721077FB512application/octet-stream0PageBlobunlockedavailabletrue2!132!MDAwMDU0IWNqYXZhYmxvYmxpc3RibG9ic2hpZXJvcHRpb25zbWF4cmVzdWx0czI4MzQ4NjkwYTJkOWE1ZiEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-", + "Date" : "Mon, 21 Oct 2019 19:25:35 GMT", + "x-ms-client-request-id" : "e08f1745-97f9-4c67-ba50-790f69d2cfa4", "Content-Type" : "application/xml" }, "Exception" : null @@ -192,8 +192,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistblobshieroptionsmaxresults&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e8636390-3b7a-4389-bf99-2453c3302d46" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b24f4bb5-dc57-4271-b7f2-cdc92887b445" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -201,20 +201,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "80744d81-501e-002e-5396-83b0b1000000", - "Body" : "jtclistblobshieroptionsmaxresultsjtclistblobshieroptionsmaxresults020606b6fa8bcdcc85Tue, 15 Oct 2019 20:26:39 GMT\"0x8D751ADFC3AEC7F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "e8636390-3b7a-4389-bf99-2453c3302d46", + "x-ms-request-id" : "de527091-c01e-004d-0345-88f694000000", + "Body" : "jtclistblobshieroptionsmaxresultsjtclistblobshieroptionsmaxresults0334675412e9a4cafaMon, 21 Oct 2019 19:25:34 GMT\"0x8D7565C72078C82\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:25:35 GMT", + "x-ms-client-request-id" : "b24f4bb5-dc57-4271-b7f2-cdc92887b445", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults020606b6fa8bcdcc85?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmaxresults0334675412e9a4cafa?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "03333137-05b3-467c-8adf-e2bc75c72035" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "e87a0e75-2461-4109-aa41-59d2fd55eab1" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -222,11 +222,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f94cf1-c01e-012f-6896-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:26:41 GMT", - "x-ms-client-request-id" : "03333137-05b3-467c-8adf-e2bc75c72035" + "x-ms-request-id" : "5f2e8a67-f01e-0045-1745-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:25:36 GMT", + "x-ms-client-request-id" : "e87a0e75-2461-4109-aa41-59d2fd55eab1" }, "Exception" : null } ], - "variables" : [ "jtclistblobshieroptionsmaxresults020606b6fa8bcdcc85", "javabloblistblobshieroptionsmaxresults106637c57c3c1ed", "javabloblistblobshieroptionsmaxresults264763ae2b842a0", "javabloblistblobshieroptionsmaxresults39622695820c9ba", "javabloblistblobshieroptionsmaxresults415695f2f489ee7" ] + "variables" : [ "jtclistblobshieroptionsmaxresults0334675412e9a4cafa", "javabloblistblobshieroptionsmaxresults166610426db7e24", "javabloblistblobshieroptionsmaxresults28348690a2d9a5f", "javabloblistblobshieroptionsmaxresults317938edaccb61b", "javabloblistblobshieroptionsmaxresults44420249bae63cb" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsmetadata.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsmetadata.json index eb628ce04039..354cf9d547bc 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsmetadata.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsmetadata.json @@ -1,156 +1,156 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata059297eb0f9a8d583d4?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata005570a535f8081e034?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e58745c0-4d0a-45b7-8ab0-9baf5ee2a5a5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "192f3287-26e2-4d21-92fc-0eb859095f24" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADD529D377", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:34 GMT", + "ETag" : "0x8D7565C4B5D8976", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:29 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8073ed57-501e-002e-4996-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:25:33 GMT", - "x-ms-client-request-id" : "e58745c0-4d0a-45b7-8ab0-9baf5ee2a5a5" + "x-ms-request-id" : "de51fd04-c01e-004d-2f45-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:24:29 GMT", + "x-ms-client-request-id" : "192f3287-26e2-4d21-92fc-0eb859095f24" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata059297eb0f9a8d583d4/ajavabloblistblobshieroptionsmetadata165250ef8931d55e", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata005570a535f8081e034/ajavabloblistblobshieroptionsmetadata197261b5a50aebe5", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1e6fb228-c594-4fd3-bc97-14da45cdd340" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b77c1f5c-570e-417a-86fa-c6276032d688" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADD5303761", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:34 GMT", + "ETag" : "0x8D7565C4B650062", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:29 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f85f54-c01e-012f-3196-83f719000000", + "x-ms-request-id" : "5f2e4f69-f01e-0045-6c45-88ede7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:25:34 GMT", - "x-ms-client-request-id" : "1e6fb228-c594-4fd3-bc97-14da45cdd340" + "Date" : "Mon, 21 Oct 2019 19:24:28 GMT", + "x-ms-client-request-id" : "b77c1f5c-570e-417a-86fa-c6276032d688" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata059297eb0f9a8d583d4/cjavabloblistblobshieroptionsmetadata2490394c60631d59", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata005570a535f8081e034/cjavabloblistblobshieroptionsmetadata222980473d678355", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4cd5d3ec-4580-409d-961d-282013e1b9ac" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "818397a9-a1aa-45f6-b995-d62b868bacad" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "1759deb9-3d71-4730-a803-08eb2f40fd23", - "ETag" : "0x8D751ADD53C212E", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:34 GMT", + "x-ms-copy-id" : "0314460a-ccd5-4126-98ad-b9bec4e747f7", + "ETag" : "0x8D7565C4B744666", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:29 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "8073ed71-501e-002e-5f96-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:25:34 GMT", - "x-ms-client-request-id" : "4cd5d3ec-4580-409d-961d-282013e1b9ac" + "x-ms-request-id" : "de51fd26-c01e-004d-4b45-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:24:29 GMT", + "x-ms-client-request-id" : "818397a9-a1aa-45f6-b995-d62b868bacad" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata059297eb0f9a8d583d4/cjavabloblistblobshieroptionsmetadata2490394c60631d59", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata005570a535f8081e034/cjavabloblistblobshieroptionsmetadata222980473d678355", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2d923fdc-ea18-48af-af74-2279f4d0f360" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "dee8be67-c1ee-4073-a667-05039f247002" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "1759deb9-3d71-4730-a803-08eb2f40fd23", + "x-ms-copy-id" : "0314460a-ccd5-4126-98ad-b9bec4e747f7", "x-ms-lease-state" : "available", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata059297eb0f9a8d583d4/ajavabloblistblobshieroptionsmetadata165250ef8931d55e", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata005570a535f8081e034/ajavabloblistblobshieroptionsmetadata197261b5a50aebe5", "x-ms-blob-sequence-number" : "0", "x-ms-copy-progress" : "512/512", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:34 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:29 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 15 Oct 2019 20:25:34 GMT", + "Date" : "Mon, 21 Oct 2019 19:24:29 GMT", "x-ms-blob-type" : "PageBlob", - "x-ms-copy-completion-time" : "Tue, 15 Oct 2019 20:25:34 GMT", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:24:29 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D751ADD53C212E", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:25:34 GMT", + "ETag" : "0x8D7565C4B744666", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:24:29 GMT", "Content-Length" : "512", "x-ms-copy-status" : "success", - "x-ms-request-id" : "69f85fef-c01e-012f-4196-83f719000000", - "x-ms-client-request-id" : "2d923fdc-ea18-48af-af74-2279f4d0f360", + "x-ms-request-id" : "5f2e5093-f01e-0045-6345-88ede7000000", + "x-ms-client-request-id" : "dee8be67-c1ee-4073-a667-05039f247002", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata059297eb0f9a8d583d4/mjavabloblistblobshieroptionsmetadata329789c0a9e8be3f", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata005570a535f8081e034/mjavabloblistblobshieroptionsmetadata375866799a8561eb", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e4cfe8d5-2d86-4bb0-8b41-75283bf9a9aa" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "61bc0303-3d7b-4d87-941d-1dcfa4760eb6" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADD5E5AA82", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:35 GMT", + "ETag" : "0x8D7565C4C176526", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:30 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8073eef4-501e-002e-4496-83b0b1000000", + "x-ms-request-id" : "de51fe99-c01e-004d-7f45-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:25:35 GMT", - "x-ms-client-request-id" : "e4cfe8d5-2d86-4bb0-8b41-75283bf9a9aa" + "Date" : "Mon, 21 Oct 2019 19:24:30 GMT", + "x-ms-client-request-id" : "61bc0303-3d7b-4d87-941d-1dcfa4760eb6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata059297eb0f9a8d583d4/ajavabloblistblobshieroptionsmetadata165250ef8931d55e?comp=snapshot", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata005570a535f8081e034/ajavabloblistblobshieroptionsmetadata197261b5a50aebe5?comp=snapshot", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "54d64e0a-da09-4ed7-ae9b-de06948cda21" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "38fe98ca-5cb7-4057-aee8-a892b04f63d9" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-snapshot" : "2019-10-15T20:25:35.6405381Z", + "x-ms-snapshot" : "2019-10-21T19:24:31.0156484Z", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADD5303761", - "Last-Modified" : "Tue, 15 Oct 2019 20:25:34 GMT", + "ETag" : "0x8D7565C4B650062", + "Last-Modified" : "Mon, 21 Oct 2019 19:24:29 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f86387-c01e-012f-0596-83f719000000", + "x-ms-request-id" : "5f2e50a0-f01e-0045-6f45-88ede7000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Tue, 15 Oct 2019 20:25:35 GMT", - "x-ms-client-request-id" : "54d64e0a-da09-4ed7-ae9b-de06948cda21" + "Date" : "Mon, 21 Oct 2019 19:24:30 GMT", + "x-ms-client-request-id" : "38fe98ca-5cb7-4057-aee8-a892b04f63d9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata059297eb0f9a8d583d4/ujavabloblistblobshieroptionsmetadata416177f318b7450f?blockid=0000&comp=block", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata005570a535f8081e034/ujavabloblistblobshieroptionsmetadata4417641da945010d?blockid=0000&comp=block", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2c7c9339-4176-4577-852b-44ed0b2c7712", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "e021e937-384b-440e-8588-87e1778cc973", "Content-Type" : "application/octet-stream" }, "Response" : { @@ -160,19 +160,19 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8073eeff-501e-002e-4f96-83b0b1000000", + "x-ms-request-id" : "de51feb3-c01e-004d-1645-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:25:35 GMT", - "x-ms-client-request-id" : "2c7c9339-4176-4577-852b-44ed0b2c7712" + "Date" : "Mon, 21 Oct 2019 19:24:30 GMT", + "x-ms-client-request-id" : "e021e937-384b-440e-8588-87e1778cc973" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata059297eb0f9a8d583d4?delimiter=&include=metadata&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata005570a535f8081e034?delimiter=&include=metadata&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "aaee586e-481c-47ab-b63f-7cd190e23841" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "51cc0409-71fb-4c6a-bf2a-408012771886" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -180,10 +180,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f863f2-c01e-012f-6696-83f719000000", - "Body" : "ajavabloblistblobshieroptionsmetadata165250ef8931d55eTue, 15 Oct 2019 20:25:34 GMTTue, 15 Oct 2019 20:25:34 GMT0x8D751ADD5303761512application/octet-stream0PageBlobunlockedavailabletruecjavabloblistblobshieroptionsmetadata2490394c60631d59Tue, 15 Oct 2019 20:25:34 GMTTue, 15 Oct 2019 20:25:34 GMT0x8D751ADD53C212E512application/octet-stream0PageBlobunlockedavailabletruemjavabloblistblobshieroptionsmetadata329789c0a9e8be3fTue, 15 Oct 2019 20:25:35 GMTTue, 15 Oct 2019 20:25:35 GMT0x8D751ADD5E5AA82512application/octet-stream0PageBlobunlockedavailabletruebar", - "Date" : "Tue, 15 Oct 2019 20:25:35 GMT", - "x-ms-client-request-id" : "aaee586e-481c-47ab-b63f-7cd190e23841", + "x-ms-request-id" : "5f2e50c2-f01e-0045-0545-88ede7000000", + "Body" : "ajavabloblistblobshieroptionsmetadata197261b5a50aebe5Mon, 21 Oct 2019 19:24:29 GMTMon, 21 Oct 2019 19:24:29 GMT0x8D7565C4B650062512application/octet-stream0PageBlobunlockedavailabletruecjavabloblistblobshieroptionsmetadata222980473d678355Mon, 21 Oct 2019 19:24:29 GMTMon, 21 Oct 2019 19:24:29 GMT0x8D7565C4B744666512application/octet-stream0PageBlobunlockedavailabletruemjavabloblistblobshieroptionsmetadata375866799a8561ebMon, 21 Oct 2019 19:24:30 GMTMon, 21 Oct 2019 19:24:30 GMT0x8D7565C4C176526512application/octet-stream0PageBlobunlockedavailabletruebar", + "Date" : "Mon, 21 Oct 2019 19:24:30 GMT", + "x-ms-client-request-id" : "51cc0409-71fb-4c6a-bf2a-408012771886", "Content-Type" : "application/xml" }, "Exception" : null @@ -192,8 +192,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistblobshieroptionsmetadata&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0eb5388b-35da-4789-b783-90f1e694fe12" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c51f948c-6b01-4454-8567-e3c906a34f63" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -201,20 +201,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8073ef1d-501e-002e-6996-83b0b1000000", - "Body" : "jtclistblobshieroptionsmetadatajtclistblobshieroptionsmetadata059297eb0f9a8d583d4Tue, 15 Oct 2019 20:25:34 GMT\"0x8D751ADD529D377\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:25:35 GMT", - "x-ms-client-request-id" : "0eb5388b-35da-4789-b783-90f1e694fe12", + "x-ms-request-id" : "de51fed9-c01e-004d-3745-88f694000000", + "Body" : "jtclistblobshieroptionsmetadatajtclistblobshieroptionsmetadata005570a535f8081e034Mon, 21 Oct 2019 19:24:29 GMT\"0x8D7565C4B5D8976\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:24:30 GMT", + "x-ms-client-request-id" : "c51f948c-6b01-4454-8567-e3c906a34f63", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata059297eb0f9a8d583d4?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsmetadata005570a535f8081e034?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b306772c-f1b1-4c6a-b700-f9a1c847225f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "8a245d4e-ec6a-4b6f-b441-7e3f495c3354" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -222,11 +222,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f86444-c01e-012f-3496-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:25:35 GMT", - "x-ms-client-request-id" : "b306772c-f1b1-4c6a-b700-f9a1c847225f" + "x-ms-request-id" : "5f2e50cc-f01e-0045-0d45-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:24:30 GMT", + "x-ms-client-request-id" : "8a245d4e-ec6a-4b6f-b441-7e3f495c3354" }, "Exception" : null } ], - "variables" : [ "jtclistblobshieroptionsmetadata059297eb0f9a8d583d4", "javabloblistblobshieroptionsmetadata165250ef8931d55e", "javabloblistblobshieroptionsmetadata2490394c60631d59", "javabloblistblobshieroptionsmetadata329789c0a9e8be3f", "javabloblistblobshieroptionsmetadata416177f318b7450f" ] + "variables" : [ "jtclistblobshieroptionsmetadata005570a535f8081e034", "javabloblistblobshieroptionsmetadata197261b5a50aebe5", "javabloblistblobshieroptionsmetadata222980473d678355", "javabloblistblobshieroptionsmetadata375866799a8561eb", "javabloblistblobshieroptionsmetadata4417641da945010d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsprefix.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsprefix.json index 8606da52db94..e0518e63f5c9 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsprefix.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshieroptionsprefix.json @@ -1,156 +1,156 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix034937e191011d5a7e4d?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix0786459df17078f69a47?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9dfe3023-fbf3-4ac9-b0d1-374a46d3e555" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "12499549-1ddf-4574-bbd8-02b6045f24f3" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFB3BDB1B", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:38 GMT", + "ETag" : "0x8D7565C7119E5B7", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "807447be-501e-002e-5796-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:26:37 GMT", - "x-ms-client-request-id" : "9dfe3023-fbf3-4ac9-b0d1-374a46d3e555" + "x-ms-request-id" : "de526b6f-c01e-004d-7845-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:25:32 GMT", + "x-ms-client-request-id" : "12499549-1ddf-4574-bbd8-02b6045f24f3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix034937e191011d5a7e4d/ajavabloblistblobshieroptionsprefix177614be0ecd138d3", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix0786459df17078f69a47/ajavabloblistblobshieroptionsprefix12895995efb2a1912", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "fa5e5d86-37be-497b-88c0-45fc06c621bb" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "7e424bb3-b20d-4e56-b5f5-d0b01a07ee9c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFB432A26", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:38 GMT", + "ETag" : "0x8D7565C7121BEB9", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f94141-c01e-012f-2996-83f719000000", + "x-ms-request-id" : "5f2e8736-f01e-0045-6a45-88ede7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:38 GMT", - "x-ms-client-request-id" : "fa5e5d86-37be-497b-88c0-45fc06c621bb" + "Date" : "Mon, 21 Oct 2019 19:25:33 GMT", + "x-ms-client-request-id" : "7e424bb3-b20d-4e56-b5f5-d0b01a07ee9c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix034937e191011d5a7e4d/cjavabloblistblobshieroptionsprefix25394471d03a6271f", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix0786459df17078f69a47/cjavabloblistblobshieroptionsprefix2285081a8ea2874c2", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "f8f19c46-c144-4d9b-bd7d-244fbedc1a56" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "467541e7-732c-4fe4-99b7-342d0dc8e69a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "4932a9c2-fa02-4205-952f-92f004e3a59c", - "ETag" : "0x8D751ADFB5668BB", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:38 GMT", + "x-ms-copy-id" : "22ee6951-7ce0-4a48-904d-2ee42793e3f1", + "ETag" : "0x8D7565C71396B35", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:33 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "807447f2-501e-002e-0396-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:26:37 GMT", - "x-ms-client-request-id" : "f8f19c46-c144-4d9b-bd7d-244fbedc1a56" + "x-ms-request-id" : "de526b9c-c01e-004d-1c45-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:25:33 GMT", + "x-ms-client-request-id" : "467541e7-732c-4fe4-99b7-342d0dc8e69a" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix034937e191011d5a7e4d/cjavabloblistblobshieroptionsprefix25394471d03a6271f", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix0786459df17078f69a47/cjavabloblistblobshieroptionsprefix2285081a8ea2874c2", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "743d6575-2a0d-4f98-8d0b-09be38d94cb9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "9bc0e62c-900b-4bd5-9a19-29247c7c991b" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "4932a9c2-fa02-4205-952f-92f004e3a59c", + "x-ms-copy-id" : "22ee6951-7ce0-4a48-904d-2ee42793e3f1", "x-ms-lease-state" : "available", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix034937e191011d5a7e4d/ajavabloblistblobshieroptionsprefix177614be0ecd138d3", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix0786459df17078f69a47/ajavabloblistblobshieroptionsprefix12895995efb2a1912", "x-ms-blob-sequence-number" : "0", "x-ms-copy-progress" : "512/512", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:38 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:33 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 15 Oct 2019 20:26:38 GMT", + "Date" : "Mon, 21 Oct 2019 19:25:34 GMT", "x-ms-blob-type" : "PageBlob", - "x-ms-copy-completion-time" : "Tue, 15 Oct 2019 20:26:38 GMT", + "x-ms-copy-completion-time" : "Mon, 21 Oct 2019 19:25:33 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D751ADFB5668BB", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:26:38 GMT", + "ETag" : "0x8D7565C71396B35", + "x-ms-creation-time" : "Mon, 21 Oct 2019 19:25:33 GMT", "Content-Length" : "512", "x-ms-copy-status" : "success", - "x-ms-request-id" : "69f941e3-c01e-012f-3b96-83f719000000", - "x-ms-client-request-id" : "743d6575-2a0d-4f98-8d0b-09be38d94cb9", + "x-ms-request-id" : "5f2e8899-f01e-0045-1245-88ede7000000", + "x-ms-client-request-id" : "9bc0e62c-900b-4bd5-9a19-29247c7c991b", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix034937e191011d5a7e4d/mjavabloblistblobshieroptionsprefix3902543a96a009a6d", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix0786459df17078f69a47/mjavabloblistblobshieroptionsprefix39435564f665d775e", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "072da8b1-39c1-4e9b-aa44-ced644c48a65" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "ed5a479c-ea6b-41f0-b9bb-711061103f15" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFBF96060", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:39 GMT", + "ETag" : "0x8D7565C71E05B78", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744a01-501e-002e-5396-83b0b1000000", + "x-ms-request-id" : "de526db3-c01e-004d-7a45-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:39 GMT", - "x-ms-client-request-id" : "072da8b1-39c1-4e9b-aa44-ced644c48a65" + "Date" : "Mon, 21 Oct 2019 19:25:34 GMT", + "x-ms-client-request-id" : "ed5a479c-ea6b-41f0-b9bb-711061103f15" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix034937e191011d5a7e4d/ajavabloblistblobshieroptionsprefix177614be0ecd138d3?comp=snapshot", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix0786459df17078f69a47/ajavabloblistblobshieroptionsprefix12895995efb2a1912?comp=snapshot", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "462b55c8-516d-4af3-a1f6-9ed92139f083" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "43d7e591-cde6-4c20-8685-0e420b44fcb9" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-snapshot" : "2019-10-15T20:26:39.6422472Z", + "x-ms-snapshot" : "2019-10-21T19:25:34.4163820Z", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFB432A26", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:38 GMT", + "ETag" : "0x8D7565C7121BEB9", + "Last-Modified" : "Mon, 21 Oct 2019 19:25:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f9463e-c01e-012f-3d96-83f719000000", + "x-ms-request-id" : "5f2e88d2-f01e-0045-4245-88ede7000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Tue, 15 Oct 2019 20:26:39 GMT", - "x-ms-client-request-id" : "462b55c8-516d-4af3-a1f6-9ed92139f083" + "Date" : "Mon, 21 Oct 2019 19:25:34 GMT", + "x-ms-client-request-id" : "43d7e591-cde6-4c20-8685-0e420b44fcb9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix034937e191011d5a7e4d/ujavabloblistblobshieroptionsprefix490352ea38d8e07b1?blockid=0000&comp=block", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix0786459df17078f69a47/ujavabloblistblobshieroptionsprefix46817957ed739d654?blockid=0000&comp=block", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "e209cc08-bc5a-4bd9-ac2c-8034c9c30df1", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "4a8e6704-e45f-4d5e-af9b-6d377ee68819", "Content-Type" : "application/octet-stream" }, "Response" : { @@ -160,19 +160,19 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80744a55-501e-002e-1e96-83b0b1000000", + "x-ms-request-id" : "de526ddd-c01e-004d-1d45-88f694000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:39 GMT", - "x-ms-client-request-id" : "e209cc08-bc5a-4bd9-ac2c-8034c9c30df1" + "Date" : "Mon, 21 Oct 2019 19:25:34 GMT", + "x-ms-client-request-id" : "4a8e6704-e45f-4d5e-af9b-6d377ee68819" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix034937e191011d5a7e4d?prefix=a&delimiter=&include=&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix0786459df17078f69a47?prefix=a&delimiter=&include=&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d0dd6514-8325-48be-98c3-6f4213a733d1" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "61358f01-5a96-4c0c-a78a-89b114fdf725" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -180,10 +180,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f9469d-c01e-012f-1996-83f719000000", - "Body" : "aajavabloblistblobshieroptionsprefix177614be0ecd138d3Tue, 15 Oct 2019 20:26:38 GMTTue, 15 Oct 2019 20:26:38 GMT0x8D751ADFB432A26512application/octet-stream0PageBlobunlockedavailabletrue", - "Date" : "Tue, 15 Oct 2019 20:26:39 GMT", - "x-ms-client-request-id" : "d0dd6514-8325-48be-98c3-6f4213a733d1", + "x-ms-request-id" : "5f2e88ed-f01e-0045-5845-88ede7000000", + "Body" : "aajavabloblistblobshieroptionsprefix12895995efb2a1912Mon, 21 Oct 2019 19:25:33 GMTMon, 21 Oct 2019 19:25:33 GMT0x8D7565C7121BEB9512application/octet-stream0PageBlobunlockedavailabletrue", + "Date" : "Mon, 21 Oct 2019 19:25:34 GMT", + "x-ms-client-request-id" : "61358f01-5a96-4c0c-a78a-89b114fdf725", "Content-Type" : "application/xml" }, "Exception" : null @@ -192,8 +192,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistblobshieroptionsprefix&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c35bd8d5-e93b-425c-84ba-59e509239889" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "be6f9891-878a-4a0c-9359-45af0fa90502" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -201,20 +201,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "80744a8d-501e-002e-4d96-83b0b1000000", - "Body" : "jtclistblobshieroptionsprefixjtclistblobshieroptionsprefix034937e191011d5a7e4dTue, 15 Oct 2019 20:26:38 GMT\"0x8D751ADFB3BDB1B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:26:39 GMT", - "x-ms-client-request-id" : "c35bd8d5-e93b-425c-84ba-59e509239889", + "x-ms-request-id" : "de526df0-c01e-004d-2f45-88f694000000", + "Body" : "jtclistblobshieroptionsprefixjtclistblobshieroptionsprefix0786459df17078f69a47Mon, 21 Oct 2019 19:25:33 GMT\"0x8D7565C7119E5B7\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:25:34 GMT", + "x-ms-client-request-id" : "be6f9891-878a-4a0c-9359-45af0fa90502", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix034937e191011d5a7e4d?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshieroptionsprefix0786459df17078f69a47?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c028bd17-5a5d-40a8-95e2-b70bc2ddf97f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "d9593bdc-e21d-4a95-ba1c-33c3679a461e" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -222,11 +222,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f946da-c01e-012f-5696-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:26:39 GMT", - "x-ms-client-request-id" : "c028bd17-5a5d-40a8-95e2-b70bc2ddf97f" + "x-ms-request-id" : "5f2e88fa-f01e-0045-6445-88ede7000000", + "Date" : "Mon, 21 Oct 2019 19:25:34 GMT", + "x-ms-client-request-id" : "d9593bdc-e21d-4a95-ba1c-33c3679a461e" }, "Exception" : null } ], - "variables" : [ "jtclistblobshieroptionsprefix034937e191011d5a7e4d", "javabloblistblobshieroptionsprefix177614be0ecd138d3", "javabloblistblobshieroptionsprefix25394471d03a6271f", "javabloblistblobshieroptionsprefix3902543a96a009a6d", "javabloblistblobshieroptionsprefix490352ea38d8e07b1" ] + "variables" : [ "jtclistblobshieroptionsprefix0786459df17078f69a47", "javabloblistblobshieroptionsprefix12895995efb2a1912", "javabloblistblobshieroptionsprefix2285081a8ea2874c2", "javabloblistblobshieroptionsprefix39435564f665d775e", "javabloblistblobshieroptionsprefix46817957ed739d654" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblockblobsflat.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblockblobsflat.json index 60ad638788bd..4686b5f1ccc4 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblockblobsflat.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblockblobsflat.json @@ -1,57 +1,57 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblockblobsflat070791cb3549691b7d4e23ac?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblockblobsflat069227f67f1d9afeba47cd99?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "66ea1f90-0fa0-46ae-b3b0-58fa8da98d6d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "5525a6a0-2fc3-4934-8aa7-8edafd208ce7" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADA87BA486", - "Last-Modified" : "Tue, 15 Oct 2019 20:24:19 GMT", + "ETag" : "0x8D7565C1E8BF194", + "Last-Modified" : "Mon, 21 Oct 2019 19:23:14 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "807388c9-501e-002e-1c96-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:24:19 GMT", - "x-ms-client-request-id" : "66ea1f90-0fa0-46ae-b3b0-58fa8da98d6d" + "x-ms-request-id" : "de519685-c01e-004d-6a44-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:23:14 GMT", + "x-ms-client-request-id" : "5525a6a0-2fc3-4934-8aa7-8edafd208ce7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblockblobsflat070791cb3549691b7d4e23ac/javabloblistblockblobsflat177471dceae169480b4fd", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblockblobsflat069227f67f1d9afeba47cd99/javabloblistblockblobsflat1422098738265aa1364ea", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "667621a4-d67e-4071-bcc9-a56039c62345", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b267a7e2-6ef1-49fe-b871-f3471e33e29a", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:24:19 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 19:23:14 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:24:19 GMT", + "Date" : "Mon, 21 Oct 2019 19:23:14 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751ADA882CB77", + "ETag" : "0x8D7565C1E9BB41C", "Content-Length" : "0", - "x-ms-request-id" : "807388d4-501e-002e-2596-83b0b1000000", - "x-ms-client-request-id" : "667621a4-d67e-4071-bcc9-a56039c62345" + "x-ms-request-id" : "de5196ab-c01e-004d-0844-88f694000000", + "x-ms-client-request-id" : "b267a7e2-6ef1-49fe-b871-f3471e33e29a" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblockblobsflat070791cb3549691b7d4e23ac?prefix=javablob&include=&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblockblobsflat069227f67f1d9afeba47cd99?prefix=javablob&include=&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c2a873f0-0dcd-4df4-858f-34c4a98848f5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "70c6b2ff-563a-4506-bdf8-3d1b4a813039" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -59,10 +59,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "807388e2-501e-002e-3196-83b0b1000000", - "Body" : "javablobjavabloblistblockblobsflat177471dceae169480b4fdTue, 15 Oct 2019 20:24:19 GMTTue, 15 Oct 2019 20:24:19 GMT0x8D751ADA882CB777application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", - "Date" : "Tue, 15 Oct 2019 20:24:19 GMT", - "x-ms-client-request-id" : "c2a873f0-0dcd-4df4-858f-34c4a98848f5", + "x-ms-request-id" : "de5196d3-c01e-004d-2944-88f694000000", + "Body" : "javablobjavabloblistblockblobsflat1422098738265aa1364eaMon, 21 Oct 2019 19:23:14 GMTMon, 21 Oct 2019 19:23:14 GMT0x8D7565C1E9BB41C7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Mon, 21 Oct 2019 19:23:14 GMT", + "x-ms-client-request-id" : "70c6b2ff-563a-4506-bdf8-3d1b4a813039", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,8 +71,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistblockblobsflat&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "653ebad2-0dde-4b70-8434-8b30a562f7b0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1180b209-1d79-4d8c-811b-4b5d57e7d250" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -80,20 +80,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "807388eb-501e-002e-3996-83b0b1000000", - "Body" : "jtclistblockblobsflatjtclistblockblobsflat070791cb3549691b7d4e23acTue, 15 Oct 2019 20:24:19 GMT\"0x8D751ADA87BA486\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:24:19 GMT", - "x-ms-client-request-id" : "653ebad2-0dde-4b70-8434-8b30a562f7b0", + "x-ms-request-id" : "de519700-c01e-004d-4f44-88f694000000", + "Body" : "jtclistblockblobsflatjtclistblockblobsflat069227f67f1d9afeba47cd99Mon, 21 Oct 2019 19:23:14 GMT\"0x8D7565C1E8BF194\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:23:14 GMT", + "x-ms-client-request-id" : "1180b209-1d79-4d8c-811b-4b5d57e7d250", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblockblobsflat070791cb3549691b7d4e23ac?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblockblobsflat069227f67f1d9afeba47cd99?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ea33c4f5-d858-4b20-8da1-2ff553d182bc" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "7d92f8a3-8d43-4d53-b254-07a9fd49dc9c" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -101,11 +101,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "807388f4-501e-002e-4296-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:24:19 GMT", - "x-ms-client-request-id" : "ea33c4f5-d858-4b20-8da1-2ff553d182bc" + "x-ms-request-id" : "de51970e-c01e-004d-5b44-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:23:14 GMT", + "x-ms-client-request-id" : "7d92f8a3-8d43-4d53-b254-07a9fd49dc9c" }, "Exception" : null } ], - "variables" : [ "jtclistblockblobsflat070791cb3549691b7d4e23ac", "javabloblistblockblobsflat177471dceae169480b4fd" ] + "variables" : [ "jtclistblockblobsflat069227f67f1d9afeba47cd99", "javabloblistblockblobsflat1422098738265aa1364ea" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistpageblobsflat.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistpageblobsflat.json index 2f0400416553..edda1d70aed4 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistpageblobsflat.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistpageblobsflat.json @@ -1,75 +1,75 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistpageblobsflat0containerapitestlistpageblobsflat1bc34768?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistpageblobsflat0containerapitestlistpageblobsflat2e144625?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a8a01754-2d39-4cf7-afda-71cc2ba24e0d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "9f2beef8-f413-480a-83b6-5f1b9616cc1e" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADA89ACCEB", - "Last-Modified" : "Tue, 15 Oct 2019 20:24:19 GMT", + "ETag" : "0x8D7565C1EC75B40", + "Last-Modified" : "Mon, 21 Oct 2019 19:23:14 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80738900-501e-002e-4d96-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:24:19 GMT", - "x-ms-client-request-id" : "a8a01754-2d39-4cf7-afda-71cc2ba24e0d" + "x-ms-request-id" : "de51972a-c01e-004d-7644-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:23:14 GMT", + "x-ms-client-request-id" : "9f2beef8-f413-480a-83b6-5f1b9616cc1e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkpremium.blob.core.windows.net/jtclistpageblobsflat0containerapitestlistpageblobsflat1bc34768?restype=container", + "Uri" : "https://azstoragesdkpremium.blob.core.windows.net/jtclistpageblobsflat0containerapitestlistpageblobsflat2e144625?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "41806368-d02d-4014-938d-0115f49a312c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c76ab370-dfe0-4452-9af1-e270d9b2465a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADA8A09E83", - "Last-Modified" : "Tue, 15 Oct 2019 20:24:19 GMT", + "ETag" : "0x8D7565C1EFA07F6", + "Last-Modified" : "Mon, 21 Oct 2019 19:23:15 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "1a87a909-701c-007d-3896-83a728000000", - "Date" : "Tue, 15 Oct 2019 20:24:18 GMT", - "x-ms-client-request-id" : "41806368-d02d-4014-938d-0115f49a312c" + "x-ms-request-id" : "be3a8191-301c-0071-6944-8849d9000000", + "Date" : "Mon, 21 Oct 2019 19:23:14 GMT", + "x-ms-client-request-id" : "c76ab370-dfe0-4452-9af1-e270d9b2465a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkpremium.blob.core.windows.net/jtclistpageblobsflat0containerapitestlistpageblobsflat1bc34768/javabloblistpageblobsflat1278014bbf05b8638b4775", + "Uri" : "https://azstoragesdkpremium.blob.core.windows.net/jtclistpageblobsflat0containerapitestlistpageblobsflat2e144625/javabloblistpageblobsflat1690730f87d4e33cd44f71", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "31b07553-d2e7-4898-819a-d5fd8e45c56b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "3468b285-8b7e-41a8-9e4c-912a4c37f77c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADA8A673A5", - "Last-Modified" : "Tue, 15 Oct 2019 20:24:19 GMT", + "ETag" : "0x8D7565C1F0830F3", + "Last-Modified" : "Mon, 21 Oct 2019 19:23:15 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "x-ms-request-id" : "1a87a90f-701c-007d-3e96-83a728000000", - "Date" : "Tue, 15 Oct 2019 20:24:18 GMT", - "x-ms-client-request-id" : "31b07553-d2e7-4898-819a-d5fd8e45c56b" + "x-ms-request-id" : "be3a81b5-301c-0071-0d44-8849d9000000", + "Date" : "Mon, 21 Oct 2019 19:23:14 GMT", + "x-ms-client-request-id" : "3468b285-8b7e-41a8-9e4c-912a4c37f77c" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkpremium.blob.core.windows.net/jtclistpageblobsflat0containerapitestlistpageblobsflat1bc34768?prefix=javablob&include=&restype=container&comp=list", + "Uri" : "https://azstoragesdkpremium.blob.core.windows.net/jtclistpageblobsflat0containerapitestlistpageblobsflat2e144625?prefix=javablob&include=&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "419c49f7-5438-4855-84e9-dfc1c3705cfe" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "73d55be0-2712-433d-b58c-304580895471" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -77,20 +77,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "1a87a91b-701c-007d-4a96-83a728000000", - "Body" : "\njavablobjavabloblistpageblobsflat1278014bbf05b8638b4775Tue, 15 Oct 2019 20:24:19 GMTTue, 15 Oct 2019 20:24:19 GMT0x8D751ADA8A673A5512application/octet-stream0PageBlobP10trueunlockedavailabletrue", - "Date" : "Tue, 15 Oct 2019 20:24:18 GMT", - "x-ms-client-request-id" : "419c49f7-5438-4855-84e9-dfc1c3705cfe", + "x-ms-request-id" : "be3a81cc-301c-0071-2444-8849d9000000", + "Body" : "\njavablobjavabloblistpageblobsflat1690730f87d4e33cd44f71Mon, 21 Oct 2019 19:23:15 GMTMon, 21 Oct 2019 19:23:15 GMT0x8D7565C1F0830F3512application/octet-stream0PageBlobP10trueunlockedavailabletrue", + "Date" : "Mon, 21 Oct 2019 19:23:14 GMT", + "x-ms-client-request-id" : "73d55be0-2712-433d-b58c-304580895471", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkpremium.blob.core.windows.net/jtclistpageblobsflat0containerapitestlistpageblobsflat1bc34768?restype=container", + "Uri" : "https://azstoragesdkpremium.blob.core.windows.net/jtclistpageblobsflat0containerapitestlistpageblobsflat2e144625?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a926359f-0c2f-44a0-975d-64c7256dbc6a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "057c7792-11ef-4dc9-911c-452558261a8e" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -98,9 +98,9 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "1a87a929-701c-007d-5896-83a728000000", - "Date" : "Tue, 15 Oct 2019 20:24:18 GMT", - "x-ms-client-request-id" : "a926359f-0c2f-44a0-975d-64c7256dbc6a" + "x-ms-request-id" : "be3a81d9-301c-0071-3144-8849d9000000", + "Date" : "Mon, 21 Oct 2019 19:23:14 GMT", + "x-ms-client-request-id" : "057c7792-11ef-4dc9-911c-452558261a8e" }, "Exception" : null }, { @@ -108,8 +108,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtclistpageblobsflat&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1ab1cc09-81b3-4a8c-ae97-2c152ed789e9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "14dc4763-7b34-4e7c-ae30-6224840be878" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -117,20 +117,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "80738934-501e-002e-7796-83b0b1000000", - "Body" : "jtclistpageblobsflatjtclistpageblobsflat0containerapitestlistpageblobsflat1bc34768Tue, 15 Oct 2019 20:24:19 GMT\"0x8D751ADA89ACCEB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:24:19 GMT", - "x-ms-client-request-id" : "1ab1cc09-81b3-4a8c-ae97-2c152ed789e9", + "x-ms-request-id" : "de51984f-c01e-004d-6a44-88f694000000", + "Body" : "jtclistpageblobsflatjtclistpageblobsflat0containerapitestlistpageblobsflat2e144625Mon, 21 Oct 2019 19:23:14 GMT\"0x8D7565C1EC75B40\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 19:23:15 GMT", + "x-ms-client-request-id" : "14dc4763-7b34-4e7c-ae30-6224840be878", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistpageblobsflat0containerapitestlistpageblobsflat1bc34768?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistpageblobsflat0containerapitestlistpageblobsflat2e144625?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a1a0bae2-8205-41f9-9011-857842a7f94e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "6ff162f1-36fb-4340-9328-f445ce71ef4a" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -138,11 +138,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "8073893e-501e-002e-7f96-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:24:19 GMT", - "x-ms-client-request-id" : "a1a0bae2-8205-41f9-9011-857842a7f94e" + "x-ms-request-id" : "de51985f-c01e-004d-7944-88f694000000", + "Date" : "Mon, 21 Oct 2019 19:23:15 GMT", + "x-ms-client-request-id" : "6ff162f1-36fb-4340-9328-f445ce71ef4a" }, "Exception" : null } ], - "variables" : [ "jtclistpageblobsflat0containerapitestlistpageblobsflat1bc34768", "javabloblistpageblobsflat1278014bbf05b8638b4775" ] + "variables" : [ "jtclistpageblobsflat0containerapitestlistpageblobsflat2e144625", "javabloblistpageblobsflat1690730f87d4e33cd44f71" ] } \ No newline at end of file From 9d09af95f06731ba6e2d4cbb70f10ace965b507f Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Tue, 22 Oct 2019 09:32:40 -0700 Subject: [PATCH 39/64] Handle Empty Buffers in Size Agnostic Upload (#5979) * Added test for empty parallel upload * Handle empty buffers * Use hasReamining instead of greater than 0 --- .../azure/storage/blob/BlobAsyncClient.java | 54 ++++++------ .../blob/specialized/BlockBlobAPITest.groovy | 83 ++++++++++++++----- 2 files changed, 89 insertions(+), 48 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java index 5c20bf97c96b..1db1debd2558 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java @@ -49,19 +49,18 @@ import static java.nio.charset.StandardCharsets.UTF_8; /** - * This class provides a client that contains generic blob operations for Azure Storage Blobs. Operations allowed by - * the client are downloading and copying a blob, retrieving and setting metadata, retrieving and setting HTTP headers, - * and deleting and un-deleting a blob. + * This class provides a client that contains generic blob operations for Azure Storage Blobs. Operations allowed by the + * client are downloading and copying a blob, retrieving and setting metadata, retrieving and setting HTTP headers, and + * deleting and un-deleting a blob. * *

    - * This client is instantiated through {@link BlobClientBuilder} or retrieved via - * {@link BlobContainerAsyncClient#getBlobAsyncClient(String) getBlobAsyncClient}. + * This client is instantiated through {@link BlobClientBuilder} or retrieved via {@link + * BlobContainerAsyncClient#getBlobAsyncClient(String) getBlobAsyncClient}. * *

    - * For operations on a specific blob type (i.e append, block, or page) use - * {@link #getAppendBlobAsyncClient() getAppendBlobAsyncClient}, {@link #getBlockBlobAsyncClient() - * getBlockBlobAsyncClient}, or {@link #getPageBlobAsyncClient() getPageBlobAsyncClient} to construct a client that - * allows blob specific operations. + * For operations on a specific blob type (i.e append, block, or page) use {@link #getAppendBlobAsyncClient() + * getAppendBlobAsyncClient}, {@link #getBlockBlobAsyncClient() getBlockBlobAsyncClient}, or {@link + * #getPageBlobAsyncClient() getPageBlobAsyncClient} to construct a client that allows blob specific operations. * *

    * Please refer to the Azure @@ -191,9 +190,8 @@ public Mono upload(Flux data, ParallelTransferOptions * the existing blob is overwritten with the new content. To perform a partial update of a block blob's, use {@link * BlockBlobAsyncClient#stageBlock(String, Flux, long) stageBlock} and * {@link BlockBlobAsyncClient#commitBlockList(List)}, which this method uses internally. For more information, - * see the Azure - * Docs for Put Block and the Azure - * Docs for Put Block List. + * see the Azure Docs for Put Block and + * the Azure Docs for Put Block List. *

    * The data passed need not support multiple subscriptions/be replayable as is required in other upload methods when * retries are enabled, and the length of the data need not be known in advance. Therefore, this method should @@ -253,19 +251,21 @@ as we can guarantee we only need at most two buffers for any call to write (two buffer filling up with more data to write). We use flatMapSequential because we need to guarantee we preserve the ordering of the buffers, but we don't really care if one is split before another. */ - Flux chunkedSource = data.flatMapSequential(buffer -> { - if (buffer.remaining() <= blockSize) { - return Flux.just(buffer); - } - int numSplits = (int) Math.ceil(buffer.remaining() / (double) blockSize); - return Flux.range(0, numSplits) - .map(i -> { - ByteBuffer duplicate = buffer.duplicate().asReadOnlyBuffer(); - duplicate.position(i * blockSize); - duplicate.limit(Math.min(duplicate.limit(), (i + 1) * blockSize)); - return duplicate; - }); - }); + Flux chunkedSource = data + .filter(ByteBuffer::hasRemaining) + .flatMapSequential(buffer -> { + if (buffer.remaining() <= blockSize) { + return Flux.just(buffer); + } + int numSplits = (int) Math.ceil(buffer.remaining() / (double) blockSize); + return Flux.range(0, numSplits) + .map(i -> { + ByteBuffer duplicate = buffer.duplicate().asReadOnlyBuffer(); + duplicate.position(i * blockSize); + duplicate.limit(Math.min(duplicate.limit(), (i + 1) * blockSize)); + return duplicate; + }); + }); /* Write to the pool and upload the output. @@ -288,7 +288,6 @@ as we can guarantee we only need at most two buffers for any call to write (two .map(x -> blockId) .doFinally(x -> pool.returnBuffer(buffer)) .flux(); - }) // TODO: parallelism? .collect(Collectors.toList()) .flatMap(ids -> @@ -329,7 +328,7 @@ public Mono uploadFromFile(String filePath) { * * @param filePath Path to the upload file * @param parallelTransferOptions {@link ParallelTransferOptions} to use to upload from file. Number of parallel - * transfers parameter is ignored. + * transfers parameter is ignored. * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. @@ -385,6 +384,7 @@ public Mono uploadFromFile(String filePath, ParallelTransferOptions parall /** * Resource Supplier for UploadFile + * * @param filePath The path for the file * @return {@code AsynchronousFileChannel} * @throws UncheckedIOException an input output exception. diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy index 2234c71a2761..657b448b1b60 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy @@ -11,13 +11,13 @@ import com.azure.core.http.HttpRequest import com.azure.core.http.policy.HttpLogDetailLevel import com.azure.core.http.policy.HttpLogOptions import com.azure.core.http.policy.HttpPipelinePolicy +import com.azure.core.implementation.util.FluxUtil import com.azure.core.util.Context import com.azure.storage.blob.APISpec import com.azure.storage.blob.BlobAsyncClient import com.azure.storage.blob.BlobClient import com.azure.storage.blob.BlobServiceClientBuilder import com.azure.storage.blob.ProgressReceiver - import com.azure.storage.blob.models.AccessTier import com.azure.storage.blob.models.BlobErrorCode import com.azure.storage.blob.models.BlobHttpHeaders @@ -30,6 +30,7 @@ import com.azure.storage.blob.models.PublicAccessType import com.azure.storage.common.policy.RequestRetryOptions import reactor.core.publisher.Flux import reactor.core.publisher.Mono +import reactor.test.StepVerifier import spock.lang.Requires import spock.lang.Unroll @@ -86,11 +87,11 @@ class BlockBlobAPITest extends APISpec { thrown(exceptionType) where: - getBlockId | data | dataSize | exceptionType - false | defaultInputStream | defaultDataSize | BlobStorageException - true | null | defaultDataSize | NullPointerException - true | defaultInputStream | defaultDataSize + 1 | UnexpectedLengthException - true | defaultInputStream | defaultDataSize - 1 | UnexpectedLengthException + getBlockId | data | dataSize | exceptionType + false | defaultInputStream | defaultDataSize | BlobStorageException + true | null | defaultDataSize | NullPointerException + true | defaultInputStream | defaultDataSize + 1 | UnexpectedLengthException + true | defaultInputStream | defaultDataSize - 1 | UnexpectedLengthException } def "Stage block empty body"() { @@ -331,7 +332,7 @@ class BlockBlobAPITest extends APISpec { setup: def blockID = getBlockID() bc.stageBlock(blockID, defaultInputStream.get(), defaultDataSize) - def ids = [ blockID ] as List + def ids = [blockID] as List when: def response = bc.commitBlockListWithResponse(ids, null, null, null, null, null, null) @@ -348,7 +349,7 @@ class BlockBlobAPITest extends APISpec { setup: def blockID = getBlockID() bc.stageBlock(blockID, defaultInputStream.get(), defaultDataSize) - def ids = [ blockID ] as List + def ids = [blockID] as List expect: bc.commitBlockList(ids) != null @@ -364,7 +365,7 @@ class BlockBlobAPITest extends APISpec { setup: def blockID = getBlockID() bc.stageBlock(blockID, defaultInputStream.get(), defaultDataSize) - def ids = [ blockID ] as List + def ids = [blockID] as List def headers = new BlobHttpHeaders().setCacheControl(cacheControl) .setContentDisposition(contentDisposition) .setContentEncoding(contentEncoding) @@ -590,6 +591,7 @@ class BlockBlobAPITest extends APISpec { /* Upload From File Tests: Need to run on liveMode only since blockBlob wil generate a `UUID.randomUUID()` for getBlockID that will change every time test is run */ + @Requires({ liveMode() }) def "Upload from file"() { given: @@ -788,6 +790,44 @@ class BlockBlobAPITest extends APISpec { bc.getProperties().getAccessTier() == AccessTier.COOL } + @Requires({ liveMode() }) + def "Async buffered upload empty"() { + when: + def emptyUploadVerifier = StepVerifier.create(blobac.upload(Flux.just(ByteBuffer.wrap(new byte[0])), new ParallelTransferOptions())) + + then: + emptyUploadVerifier.assertNext({ + assert it.getETag() != null + }).verifyComplete() + + StepVerifier.create(blobac.download()).assertNext({ + assert it.remaining() == 0 + }).verifyComplete() + } + + @Unroll + @Requires({ liveMode() }) + def "Async buffered upload empty buffers"() { + when: + def uploadVerifier = StepVerifier.create(blobac.upload(Flux.fromIterable([buffer1, buffer2, buffer3]), new ParallelTransferOptions())) + + then: + uploadVerifier.assertNext({ + assert it.getETag() != null + }).verifyComplete() + + StepVerifier.create(FluxUtil.collectBytesInByteBufferStream(blobac.download())).assertNext({ + assert it == expectedDownload + }).verifyComplete() + + where: + buffer1 | buffer2 | buffer3 || expectedDownload + ByteBuffer.wrap("Hello".getBytes(StandardCharsets.UTF_8)) | ByteBuffer.wrap(" ".getBytes(StandardCharsets.UTF_8)) | ByteBuffer.wrap("world!".getBytes(StandardCharsets.UTF_8)) || "Hello world!".getBytes(StandardCharsets.UTF_8) + ByteBuffer.wrap("Hello".getBytes(StandardCharsets.UTF_8)) | ByteBuffer.wrap(" ".getBytes(StandardCharsets.UTF_8)) | ByteBuffer.wrap(new byte[0]) || "Hello ".getBytes(StandardCharsets.UTF_8) + ByteBuffer.wrap("Hello".getBytes(StandardCharsets.UTF_8)) | ByteBuffer.wrap(new byte[0]) | ByteBuffer.wrap("world!".getBytes(StandardCharsets.UTF_8)) || "Helloworld!".getBytes(StandardCharsets.UTF_8) + ByteBuffer.wrap(new byte[0]) | ByteBuffer.wrap(" ".getBytes(StandardCharsets.UTF_8)) | ByteBuffer.wrap("world!".getBytes(StandardCharsets.UTF_8)) || " world!".getBytes(StandardCharsets.UTF_8) + } + // Only run these tests in live mode as they use variables that can't be captured. @Unroll @Requires({ liveMode() }) @@ -833,6 +873,7 @@ class BlockBlobAPITest extends APISpec { /* Reporter for testing Progress Receiver * Will count the number of reports that are triggered */ + class Reporter implements ProgressReceiver { private final long blockSize private long reportingCount @@ -871,10 +912,10 @@ class BlockBlobAPITest extends APISpec { where: size | blockSize | bufferCount - 10 | 10 | 8 - 20 | 1 | 5 - 100 | 50 | 2 - 1024 * 1024 | 1024 | 100 + 10 | 10 | 8 + 20 | 1 | 5 + 100 | 50 | 2 + 1024 * 1024 | 1024 | 100 } // Only run these tests in live mode as they use variables that can't be captured. @@ -1055,7 +1096,7 @@ class BlockBlobAPITest extends APISpec { // UploadBufferPool used to lock when the number of failed stageblocks exceeded the maximum number of buffers // (discovered when a leaseId was invalid) @Unroll - @Requires({liveMode()}) + @Requires({ liveMode() }) def "UploadBufferPool lock three or more buffers"() { setup: bac.upload(defaultFlux, defaultDataSize).block() @@ -1130,14 +1171,14 @@ class BlockBlobAPITest extends APISpec { process(*_) >> { HttpPipelineCallContext context, HttpPipelineNextPolicy next -> return collectBytesInBuffer(context.getHttpRequest().getBody()) .map { b -> - return b == defaultData - } - .flatMap { b -> - if (b) { - return Mono.just(mockHttpResponse) + return b == defaultData + } + .flatMap { b -> + if (b) { + return Mono.just(mockHttpResponse) + } + return Mono.error(new IllegalArgumentException()) } - return Mono.error(new IllegalArgumentException()) - } } } From 97bbe57ae6f7d5a3191e89665f15b37eb30636a0 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Tue, 22 Oct 2019 10:39:27 -0700 Subject: [PATCH 40/64] Update Linting Supressions and Documentation Cleanup (#5974) * Removed linting suppressions, added documentation, and annotated fluent and immutable classes * Fix typo and few naming casings --- .../checkstyle/checkstyle-suppressions.xml | 16 +++---- .../resources/spotbugs/spotbugs-exclude.xml | 15 ------- .../blob/BlobContainerAsyncClient.java | 6 ++- .../storage/blob/BlobServiceAsyncClient.java | 8 +++- .../storage/blob/models/AppendBlobItem.java | 4 +- .../models/AppendBlobRequestConditions.java | 3 ++ .../models/BlobContainerAccessPolicies.java | 11 ++++- .../blob/models/BlobContainerListDetails.java | 7 ++- .../blob/models/BlobContainerProperties.java | 23 ++++++++-- .../storage/blob/models/BlobListDetails.java | 30 ++++++------- .../storage/blob/models/BlobProperties.java | 43 +++++++++++++++++++ .../azure/storage/blob/models/BlobRange.java | 3 ++ .../blob/models/BlobRequestConditions.java | 2 + .../storage/blob/models/BlockBlobItem.java | 2 + .../blob/models/CustomerProvidedKey.java | 5 +++ .../models/ListBlobContainersOptions.java | 5 +++ .../storage/blob/models/ListBlobsOptions.java | 9 +++- .../storage/blob/models/PageBlobItem.java | 2 + .../models/PageBlobRequestConditions.java | 3 ++ .../blob/models/ParallelTransferOptions.java | 5 +++ .../blob/models/ReliableDownloadOptions.java | 2 + .../blob/models/StorageAccountInfo.java | 30 ++++++------- .../blob/specialized/BlobAsyncClientBase.java | 6 ++- .../storage/file/models/DirectoryInfo.java | 2 + .../file/models/DirectoryProperties.java | 2 + .../file/models/DirectorySetMetadataInfo.java | 9 +++- .../azure/storage/file/models/FileInfo.java | 11 +++-- .../storage/file/models/FileMetadataInfo.java | 18 ++++++++ .../storage/file/models/FileProperties.java | 14 +++--- .../azure/storage/file/models/FileRange.java | 2 + .../storage/file/models/FileUploadInfo.java | 23 +++++++--- .../models/FileUploadRangeFromUrlInfo.java | 6 ++- .../file/models/ListSharesOptions.java | 20 +++++---- .../azure/storage/file/models/ShareInfo.java | 3 ++ .../file/models/ShareSnapshotInfo.java | 3 ++ .../storage/queue/models/QueueProperties.java | 3 ++ .../queue/models/QueuesSegmentOptions.java | 11 +++-- .../queue/models/UpdateMessageResult.java | 3 ++ 38 files changed, 271 insertions(+), 99 deletions(-) diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml index 7bf100478e9d..1a777142cd67 100755 --- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml +++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml @@ -156,12 +156,6 @@ - - - - - - @@ -202,8 +196,14 @@ - - + + + + + + + + diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml index 4e574eacd270..4f6c9b11de96 100755 --- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml +++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml @@ -69,9 +69,6 @@ - - - @@ -257,7 +254,6 @@ - @@ -381,8 +377,6 @@ - - @@ -585,15 +579,6 @@ - - - - - - - - - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index 33378df7874e..4b16e1d5615b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -16,6 +16,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.models.ContainerGetAccountInfoHeaders; import com.azure.storage.blob.implementation.models.ContainerGetPropertiesHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentResponse; import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentResponse; @@ -891,7 +892,10 @@ public Mono> getAccountInfoWithResponse() { Mono> getAccountInfoWithResponse(Context context) { return this.azureBlobStorage.containers().getAccountInfoWithRestResponseAsync(null, context) - .map(rb -> new SimpleResponse<>(rb, new StorageAccountInfo(rb.getDeserializedHeaders()))); + .map(rb -> { + ContainerGetAccountInfoHeaders hd = rb.getDeserializedHeaders(); + return new SimpleResponse<>(rb, new StorageAccountInfo(hd.getSkuName(), hd.getAccountKind())); + }); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java index effa314ed434..e408692e5f48 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java @@ -17,6 +17,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.models.ServiceGetAccountInfoHeaders; import com.azure.storage.blob.implementation.models.ServicesListBlobContainersSegmentResponse; import com.azure.storage.blob.models.BlobContainerItem; import com.azure.storage.blob.models.BlobServiceProperties; @@ -112,7 +113,7 @@ public BlobContainerAsyncClient getBlobContainerAsyncClient(String containerName } return new BlobContainerAsyncClient(getHttpPipeline(), - StorageImplUtils.appendToUrlPath(getAccountUrl(), containerName).toString(), getServiceVersion(), + StorageImplUtils.appendToUrlPath(getAccountUrl(), containerName).toString(), getServiceVersion(), getAccountName(), containerName, customerProvidedKey); } @@ -536,7 +537,10 @@ public Mono> getAccountInfoWithResponse() { Mono> getAccountInfoWithResponse(Context context) { return this.azureBlobStorage.services().getAccountInfoWithRestResponseAsync(context) - .map(rb -> new SimpleResponse<>(rb, new StorageAccountInfo(rb.getDeserializedHeaders()))); + .map(rb -> { + ServiceGetAccountInfoHeaders hd = rb.getDeserializedHeaders(); + return new SimpleResponse<>(rb, new StorageAccountInfo(hd.getSkuName(), hd.getAccountKind())); + }); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java index 0a5b1330ae6a..22d34a702a62 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java @@ -3,6 +3,7 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Immutable; import com.azure.core.implementation.util.ImplUtils; import java.time.OffsetDateTime; @@ -10,6 +11,7 @@ /** * This class contains the properties about an append blob. */ +@Immutable public class AppendBlobItem { private final String eTag; private final OffsetDateTime lastModified; @@ -20,7 +22,7 @@ public class AppendBlobItem { private final Integer blobCommittedBlockCount; /** - * Constructs a {@link AppendBlobItem}. + * Constructs an {@link AppendBlobItem}. * * @param eTag ETag of the append blob. * @param lastModified Last modified time of the append blob. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobRequestConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobRequestConditions.java index 55333aef1f5d..948bb597d231 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobRequestConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobRequestConditions.java @@ -3,6 +3,8 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Fluent; + import java.time.OffsetDateTime; /** @@ -13,6 +15,7 @@ * here for more conceptual * information. */ +@Fluent public final class AppendBlobRequestConditions extends BlobRequestConditions { private Long maxSize; private Long appendPosition; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessPolicies.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessPolicies.java index cf0d80f67a74..0e07274bc6c6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessPolicies.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessPolicies.java @@ -3,15 +3,24 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Immutable; + import java.util.List; /** * This class contains values which correlate to the access polices set on a specific container. */ +@Immutable public class BlobContainerAccessPolicies { private final PublicAccessType blobAccessType; private final List identifiers; + /** + * Constructs a {@link BlobContainerAccessPolicies}. + * + * @param blobAccessType Level of public access the container allows. + * @param identifiers {@link BlobSignedIdentifier BlobSignedIdentifiers} associated with the container. + */ public BlobContainerAccessPolicies(PublicAccessType blobAccessType, List identifiers) { this.blobAccessType = blobAccessType; this.identifiers = identifiers; @@ -25,7 +34,7 @@ public PublicAccessType getBlobAccessType() { } /** - * @return the {@link BlobSignedIdentifier BlobSignedIdentifiers} associates with the container. + * @return the {@link BlobSignedIdentifier BlobSignedIdentifiers} associated with the container. */ public List getIdentifiers() { return this.identifiers; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerListDetails.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerListDetails.java index 6f6511698c10..2496dc9c19ab 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerListDetails.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerListDetails.java @@ -3,6 +3,7 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Fluent; import com.azure.storage.blob.BlobServiceClient; /** @@ -11,12 +12,14 @@ * requests, so changing the details for a different listing operation requires construction of a new object. Null may * be passed if none of the options are desirable. */ +@Fluent public final class BlobContainerListDetails { - private boolean retrieveMetadata; + /** + * Constructs an unpopulated {@link BlobContainerListDetails}. + */ public BlobContainerListDetails() { - } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java index 6390abd8cbdd..957f16842bff 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java @@ -3,9 +3,15 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Immutable; + import java.time.OffsetDateTime; import java.util.Map; +/** + * This class contains the response information returned from the service when getting container properties. + */ +@Immutable public final class BlobContainerProperties { private final Map metadata; @@ -18,6 +24,19 @@ public final class BlobContainerProperties { private final boolean hasImmutabilityPolicy; private final boolean hasLegalHold; + /** + * Constructs a {@link BlobContainerProperties}. + * + * @param metadata Metadata associated with the container. + * @param eTag ETag of the container. + * @param lastModified Datetime when the container was last modified. + * @param leaseDuration Type of the lease on the container. + * @param leaseState State of the lease on the container. + * @param leaseStatus Status of the lease on the container. + * @param blobPublicAccess Public access status for the container. + * @param hasImmutabilityPolicy Flag indicating if the container has an immutability policy set on it. + * @param hasLegalHold Flag indicating if the container has a legal hold. + */ public BlobContainerProperties(final Map metadata, final String eTag, final OffsetDateTime lastModified, final LeaseDurationType leaseDuration, final LeaseStateType leaseState, final LeaseStatusType leaseStatus, final PublicAccessType blobPublicAccess, final boolean hasImmutabilityPolicy, @@ -95,8 +114,4 @@ public boolean hasImmutabilityPolicy() { public boolean hasLegalHold() { return hasLegalHold; } - - - - } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java index 12c92d5994fb..431bcfe0b09f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java @@ -3,34 +3,33 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Fluent; import com.azure.storage.blob.BlobContainerClient; import java.util.ArrayList; /** * This type allows users to specify additional information the service should return with each blob when listing blobs - * in a container (via a {@link BlobContainerClient} object). This type is immutable to ensure thread-safety of requests, so - * changing the details for a different listing operation requires construction of a new object. Null may be passed if - * none of the options are desirable. + * in a container (via a {@link BlobContainerClient} object). This type is immutable to ensure thread-safety of + * requests, so changing the details for a different listing operation requires construction of a new object. Null may + * be passed if none of the options are desirable. */ +@Fluent public final class BlobListDetails { - private boolean retrieveCopy; - private boolean retrieveMetadata; - private boolean retrieveSnapshots; - private boolean retrieveUncommittedBlobs; - private boolean retrieveDeletedBlobs; + /** + * Constructs an unpopulated {@link BlobListDetails}. + */ public BlobListDetails() { } /** - * Whether blob metadata related to any current or previous Copy Blob operation should be included in the - * response. + * Whether blob metadata related to any current or previous Copy Blob operation should be included in the response. * * @return a flag indicating if copy information will be returned in the listing */ @@ -39,8 +38,7 @@ public boolean getRetrieveCopy() { } /** - * Whether blob metadata related to any current or previous Copy Blob operation should be included in the - * response. + * Whether blob metadata related to any current or previous Copy Blob operation should be included in the response. * * @param retrieveCopy Flag indicating whether copy information should be returned * @return the updated BlobListDetails object @@ -91,8 +89,8 @@ public BlobListDetails setRetrieveSnapshots(boolean retrieveSnapshots) { } /** - * Whether blobs for which blocks have been uploaded, but which have not been committed using Put Block List, - * should be included in the response. + * Whether blobs for which blocks have been uploaded, but which have not been committed using Put Block List, should + * be included in the response. * * @return a flag indicating if uncommitted blobs will be returned in the listing */ @@ -101,8 +99,8 @@ public boolean getRetrieveUncommittedBlobs() { } /** - * Whether blobs for which blocks have been uploaded, but which have not been committed using Put Block List, - * should be included in the response. + * Whether blobs for which blocks have been uploaded, but which have not been committed using Put Block List, should + * be included in the response. * * @param retrieveUncommittedBlobs Flag indicating whether uncommitted blobs should be returned * @return the updated BlobListDetails object diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java index 6628b2fd574c..22ccff5b123a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java @@ -3,11 +3,16 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Immutable; import com.azure.core.implementation.util.ImplUtils; import java.time.OffsetDateTime; import java.util.Map; +/** + * This class contains the response information returned from the service when getting blob properties. + */ +@Immutable public final class BlobProperties { private final OffsetDateTime creationTime; private final OffsetDateTime lastModified; @@ -41,6 +46,44 @@ public final class BlobProperties { private final Map metadata; private final Integer committedBlockCount; + /** + * Constructs a {@link BlobProperties}. + * + * @param creationTime Creation time of the blob. + * @param lastModified Datetime when the blob was last modified. + * @param eTag ETag of the blob. + * @param blobSize Size of the blob. + * @param contentType Content type specified for the blob. + * @param contentMd5 Content MD5 specified for the blob. + * @param contentEncoding Content encoding specified for the blob. + * @param contentDisposition Content disposition specified for the blob. + * @param contentLanguage Content language specified for the blob. + * @param cacheControl Cache control specified for the blob. + * @param blobSequenceNumber The current sequence number for a page blob, if the blob is an append or block blob + * pass {@code null}. + * @param blobType Type of the blob. + * @param leaseStatus Status of the lease on the blob. + * @param leaseState State of the lease on the blob. + * @param leaseDuration Type of lease on the blob. + * @param copyId Identifier of the last copy operation performed on the blob. + * @param copyStatus Status of the last copy operation performed on the blob. + * @param copySource Source of the last copy operation performed on the blob. + * @param copyProgress Progress of the last copy operation performed on the blob. + * @param copyCompletionTime Datetime when the last copy operation on the blob completed. + * @param copyStatusDescription Description of the last copy operation on the blob. + * @param isServerEncrypted Flag indicating if the blob's content is encrypted on the server. + * @param isIncrementalCopy Flag indicating if the blob was incrementally copied. + * @param copyDestinationSnapshot Snapshot identifier of the last incremental copy snapshot for the blob. + * @param accessTier Access tier of the blob. + * @param isAccessTierInferred Flag indicating if the access tier of the blob was inferred from properties of the + * blob. + * @param archiveStatus Archive status of the blob. + * @param encryptionKeySha256 SHA256 of the customer provided encryption key used to encrypt the blob on the server. + * @param accessTierChangeTime Datetime when the access tier of the blob last changed. + * @param metadata Metadata associated with the blob. + * @param committedBlockCount Number of blocks committed to an append blob, if the blob is a block or page blob + * pass {@code null}. + */ public BlobProperties(final OffsetDateTime creationTime, final OffsetDateTime lastModified, final String eTag, final long blobSize, final String contentType, final byte[] contentMd5, final String contentEncoding, final String contentDisposition, final String contentLanguage, final String cacheControl, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRange.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRange.java index 70ff8001ee67..1dea6f29e252 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRange.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRange.java @@ -3,6 +3,8 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Immutable; + import java.util.Locale; /** @@ -10,6 +12,7 @@ * immutable to ensure thread-safety of requests, so changing the values for a different operation requires construction * of a new object. Passing null as a BlobRange value will default to the entire range of the blob. */ +@Immutable public final class BlobRange { private static final String RANGE_HEADER_FORMAT = "bytes=%d-%d"; private static final String BEGIN_RANGE_HEADER_FORMAT = "bytes=%d-"; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRequestConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRequestConditions.java index 5f48513a1bab..0508e81d5919 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRequestConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRequestConditions.java @@ -3,6 +3,7 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Fluent; import com.azure.core.http.RequestConditions; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * passed to a method to indicate that those conditions are not desired. Please refer to the type of each field for more * information on those particular access conditions. */ +@Fluent public class BlobRequestConditions extends RequestConditions { private String leaseId; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java index ffcb3f841802..2b6db80985b3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java @@ -3,6 +3,7 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Immutable; import com.azure.core.implementation.util.ImplUtils; import java.time.OffsetDateTime; @@ -10,6 +11,7 @@ /** * This class contains the properties about a block blob. */ +@Immutable public class BlockBlobItem { private final String eTag; private final OffsetDateTime lastModified; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKey.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKey.java index d29b0bbb65ca..398e976c95c1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKey.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKey.java @@ -3,12 +3,17 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Base64; +/** + * Contains the customer provided key information used to encrypt a blob's content on the server. + */ +@Immutable public class CustomerProvidedKey { private final ClientLogger logger = new ClientLogger(CustomerProvidedKey.class); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersOptions.java index 59d57d9f8ee9..b78e3034f787 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersOptions.java @@ -3,6 +3,7 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobServiceClient; @@ -11,6 +12,7 @@ * object. See the constructor for details on each of the options. Null may be passed in place of an object of this type * if no options are desirable. */ +@Fluent public final class ListBlobContainersOptions { private final ClientLogger logger = new ClientLogger(ListBlobContainersOptions.class); @@ -20,6 +22,9 @@ public final class ListBlobContainersOptions { private Integer maxResultsPerPage; + /** + * Constructs an unpopulated {@link ListBlobContainersOptions}. + */ public ListBlobContainersOptions() { this.details = new BlobContainerListDetails(); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java index d3ff1b7a3db0..66cf831d3729 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java @@ -3,13 +3,15 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobContainerClient; /** - * Defines options available to configure the behavior of a call to listBlobsFlatSegment on a {@link BlobContainerClient} - * object. See the constructor for details on each of the options. + * Defines options available to configure the behavior of a call to listBlobsFlatSegment on a {@link + * BlobContainerClient} object. See the constructor for details on each of the options. */ +@Fluent public final class ListBlobsOptions { private final ClientLogger logger = new ClientLogger(ListBlobsOptions.class); @@ -19,6 +21,9 @@ public final class ListBlobsOptions { private Integer maxResultsPerPage; + /** + * Constructs an unpopulated {@link ListBlobsOptions}. + */ public ListBlobsOptions() { this.details = new BlobListDetails(); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java index ffc09dc241d4..69342e634c7e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java @@ -3,6 +3,7 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Immutable; import com.azure.core.implementation.util.ImplUtils; import java.time.OffsetDateTime; @@ -10,6 +11,7 @@ /** * This class contains the properties about a page blob. */ +@Immutable public class PageBlobItem { private final String eTag; private final OffsetDateTime lastModified; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobRequestConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobRequestConditions.java index d1d00465e78a..7e82132da9c7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobRequestConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobRequestConditions.java @@ -3,6 +3,8 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Fluent; + import java.time.OffsetDateTime; /** @@ -12,6 +14,7 @@ * Please refer to the request header section * here for more conceptual information. */ +@Fluent public final class PageBlobRequestConditions extends BlobRequestConditions { private Long ifSequenceNumberLessThanOrEqualTo; private Long ifSequenceNumberLessThan; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java index 20da1dccd513..9bce7e90712d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java @@ -3,10 +3,15 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Fluent; import com.azure.storage.blob.ProgressReceiver; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; +/** + * This class contains configuration used to parallelize data transfer operations. + */ +@Fluent public class ParallelTransferOptions { private static final int BLOB_DEFAULT_UPLOAD_BLOCK_SIZE = 4 * Constants.MB; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java index 20171492b04b..3d2b58d4ee95 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java @@ -3,6 +3,7 @@ package com.azure.storage.blob.models; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.specialized.DownloadAsyncResponse; @@ -12,6 +13,7 @@ * {@code ReliableDownloadOptions} contains properties which help the {@code Flux} returned from {@link * DownloadAsyncResponse#body(ReliableDownloadOptions)} determine when to retry. */ +@Fluent public final class ReliableDownloadOptions { private static final String PARAMETER_NOT_IN_RANGE = "The value of the parameter '%s' should be between %s and %s."; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageAccountInfo.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageAccountInfo.java index 33f8479ecadc..c46f00165990 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageAccountInfo.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageAccountInfo.java @@ -2,27 +2,25 @@ // Licensed under the MIT License. package com.azure.storage.blob.models; -import com.azure.storage.blob.implementation.models.BlobGetAccountInfoHeaders; -import com.azure.storage.blob.implementation.models.ContainerGetAccountInfoHeaders; -import com.azure.storage.blob.implementation.models.ServiceGetAccountInfoHeaders; +import com.azure.core.annotation.Immutable; +/** + * This class contains information about the storage account. + */ +@Immutable public class StorageAccountInfo { private final SkuName skuName; private final AccountKind accountKind; - public StorageAccountInfo(BlobGetAccountInfoHeaders generatedResponseHeaders) { - this.skuName = generatedResponseHeaders.getSkuName(); - this.accountKind = generatedResponseHeaders.getAccountKind(); - } - - public StorageAccountInfo(ContainerGetAccountInfoHeaders generatedResponseHeaders) { - this.skuName = generatedResponseHeaders.getSkuName(); - this.accountKind = generatedResponseHeaders.getAccountKind(); - } - - public StorageAccountInfo(ServiceGetAccountInfoHeaders generatedResponseHeaders) { - this.skuName = generatedResponseHeaders.getSkuName(); - this.accountKind = generatedResponseHeaders.getAccountKind(); + /** + * Constructs a {@link StorageAccountInfo}. + * + * @param skuName SKU of the account. + * @param accountKind Type of the account. + */ + public StorageAccountInfo(final SkuName skuName, final AccountKind accountKind) { + this.skuName = skuName; + this.accountKind = accountKind; } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index c03729f20121..cafcc7dc5197 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -22,6 +22,7 @@ import com.azure.storage.blob.ProgressReporter; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.models.BlobGetAccountInfoHeaders; import com.azure.storage.blob.implementation.models.BlobGetPropertiesHeaders; import com.azure.storage.blob.implementation.models.BlobStartCopyFromURLHeaders; import com.azure.storage.blob.models.AccessTier; @@ -1252,6 +1253,9 @@ public Mono> getAccountInfoWithResponse() { Mono> getAccountInfoWithResponse(Context context) { return this.azureBlobStorage.blobs().getAccountInfoWithRestResponseAsync(null, null, context) - .map(rb -> new SimpleResponse<>(rb, new StorageAccountInfo(rb.getDeserializedHeaders()))); + .map(rb -> { + BlobGetAccountInfoHeaders hd = rb.getDeserializedHeaders(); + return new SimpleResponse<>(rb, new StorageAccountInfo(hd.getSkuName(), hd.getAccountKind())); + }); } } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryInfo.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryInfo.java index 1fb34d77cf68..e6905da1e2c9 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryInfo.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryInfo.java @@ -3,6 +3,7 @@ package com.azure.storage.file.models; +import com.azure.core.annotation.Immutable; import com.azure.storage.file.FileSmbProperties; import java.time.OffsetDateTime; @@ -10,6 +11,7 @@ /** * Contains information about a Directory in the storage File service. */ +@Immutable public final class DirectoryInfo { private final String eTag; private final OffsetDateTime lastModified; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryProperties.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryProperties.java index 5951b2dac2f3..c744d7be8e91 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryProperties.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryProperties.java @@ -3,6 +3,7 @@ package com.azure.storage.file.models; +import com.azure.core.annotation.Immutable; import com.azure.storage.file.FileSmbProperties; import java.time.OffsetDateTime; @@ -11,6 +12,7 @@ /** * Contains properties information about a Directory in the storage File service. */ +@Immutable public final class DirectoryProperties { private final Map metadata; private final String eTag; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorySetMetadataInfo.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorySetMetadataInfo.java index 0acd6a10454e..b3a409a7f2d0 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorySetMetadataInfo.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorySetMetadataInfo.java @@ -3,9 +3,12 @@ package com.azure.storage.file.models; +import com.azure.core.annotation.Immutable; + /** * Contains metadata information about a Directory in the storage File service. */ +@Immutable public class DirectorySetMetadataInfo { private final String eTag; private final boolean isServerEncrypted; @@ -14,7 +17,8 @@ public class DirectorySetMetadataInfo { * Creates an instance of information about a specific Directory. * * @param eTag Entity tag that corresponds to the share - * @param isServerEncrypted The value of this header is set to true if the directory metadata is completely encrypted using the specified algorithm. Otherwise, the value is set to false. + * @param isServerEncrypted The value of this header is set to true if the directory metadata is completely + * encrypted using the specified algorithm. Otherwise, the value is set to false. */ public DirectorySetMetadataInfo(final String eTag, final boolean isServerEncrypted) { this.eTag = eTag; @@ -29,7 +33,8 @@ public String getETag() { } /** - * @return The value of this header is true if the directory metadata is completely encrypted using the specified algorithm. Otherwise, the value is false. + * @return The value of this header is true if the directory metadata is completely encrypted using the specified + * algorithm. Otherwise, the value is false. */ public boolean isServerEncrypted() { return isServerEncrypted; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileInfo.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileInfo.java index 6faef3e7dbf0..dd44e857cbfd 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileInfo.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileInfo.java @@ -3,6 +3,7 @@ package com.azure.storage.file.models; +import com.azure.core.annotation.Immutable; import com.azure.storage.file.FileSmbProperties; import java.time.OffsetDateTime; @@ -10,6 +11,7 @@ /** * Contains information about a File in the storage File service. */ +@Immutable public final class FileInfo { private final String eTag; private final OffsetDateTime lastModified; @@ -21,10 +23,12 @@ public final class FileInfo { * * @param eTag Entity tag that corresponds to the directory. * @param lastModified Last time the directory was modified. - * @param isServerEncrypted The value of this header is set to true if the directory metadata is completely encrypted using the specified algorithm. Otherwise, the value is set to false. + * @param isServerEncrypted The value of this header is set to true if the directory metadata is completely + * encrypted using the specified algorithm. Otherwise, the value is set to false. * @param smbProperties The SMB properties of the file. */ - public FileInfo(final String eTag, final OffsetDateTime lastModified, final Boolean isServerEncrypted, final FileSmbProperties smbProperties) { + public FileInfo(final String eTag, final OffsetDateTime lastModified, final Boolean isServerEncrypted, + final FileSmbProperties smbProperties) { this.eTag = eTag; this.lastModified = lastModified; this.isServerEncrypted = isServerEncrypted; @@ -46,7 +50,8 @@ public OffsetDateTime getLastModified() { } /** - * @return The value of this header is true if the directory metadata is completely encrypted using the specified algorithm. Otherwise, the value is false. + * @return The value of this header is true if the directory metadata is completely encrypted using the specified + * algorithm. Otherwise, the value is false. */ public Boolean isServerEncrypted() { return isServerEncrypted; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileMetadataInfo.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileMetadataInfo.java index 943c01712d5f..f642fbd2fa2c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileMetadataInfo.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileMetadataInfo.java @@ -3,19 +3,37 @@ package com.azure.storage.file.models; +import com.azure.core.annotation.Immutable; + +/** + * This class contains the response information returned from the service when metadata is set on a file. + */ +@Immutable public class FileMetadataInfo { private final String eTag; private final Boolean isServerEncrypted; + /** + * Constructs a {@link FileMetadataInfo}. + * + * @param eTag ETag of the file. + * @param isServerEncrypted Flag indicating if the file's content is encrypted on the server. + */ public FileMetadataInfo(final String eTag, final Boolean isServerEncrypted) { this.eTag = eTag; this.isServerEncrypted = isServerEncrypted; } + /** + * @return the ETag of the file. + */ public String getETag() { return eTag; } + /** + * @return the encryption status of the file's content on the server. + */ public Boolean isServerEncrypted() { return isServerEncrypted; } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileProperties.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileProperties.java index b98ecf237243..7f0730b5da7e 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileProperties.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileProperties.java @@ -3,6 +3,7 @@ package com.azure.storage.file.models; +import com.azure.core.annotation.Immutable; import com.azure.core.implementation.util.ImplUtils; import com.azure.storage.file.FileSmbProperties; @@ -12,6 +13,7 @@ /** * Contains property information about a File in the storage File service. */ +@Immutable public final class FileProperties { private final String eTag; private final OffsetDateTime lastModified; @@ -19,7 +21,7 @@ public final class FileProperties { private final String fileType; private final Long contentLength; private final String contentType; - private final byte[] contentMD5; + private final byte[] contentMd5; private final String contentEncoding; private final String cacheControl; private final String contentDisposition; @@ -42,7 +44,7 @@ public final class FileProperties { * @param contentLength The number of bytes present in the response body. * @param contentType The content type specified for the file. The default content type is * application/octet-stream. - * @param contentMD5 The MD5 hash of the file to check the message content integrity. + * @param contentMd5 The MD5 hash of the file to check the message content integrity. * @param contentEncoding This header returns the value that was specified for the Content-Encoding request header. * @param cacheControl This header is returned if it was previously specified for the file. * @param contentDisposition The value that was specified for the x-ms-content-disposition header and specifies how @@ -70,7 +72,7 @@ public final class FileProperties { * @param smbProperties The SMB properties of the file. */ public FileProperties(final String eTag, final OffsetDateTime lastModified, final Map metadata, - final String fileType, final Long contentLength, final String contentType, final byte[] contentMD5, + final String fileType, final Long contentLength, final String contentType, final byte[] contentMd5, final String contentEncoding, final String cacheControl, final String contentDisposition, final OffsetDateTime copyCompletionTime, final String copyStatusDescription, final String copyId, final String copyProgress, final String copySource, final CopyStatusType copyStatus, @@ -81,7 +83,7 @@ public FileProperties(final String eTag, final OffsetDateTime lastModified, fina this.fileType = fileType; this.contentLength = contentLength; this.contentType = contentType; - this.contentMD5 = ImplUtils.clone(contentMD5); + this.contentMd5 = ImplUtils.clone(contentMd5); this.contentEncoding = contentEncoding; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; @@ -140,8 +142,8 @@ public String getContentType() { /** * @return The MD5 hash of the file. */ - public byte[] getContentMD5() { - return ImplUtils.clone(contentMD5); + public byte[] getContentMd5() { + return ImplUtils.clone(contentMd5); } /** diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileRange.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileRange.java index 9d60485acf3c..3fdb2e96d79e 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileRange.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileRange.java @@ -3,12 +3,14 @@ package com.azure.storage.file.models; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import java.util.Locale; /** * The range of a file in the storage file service. */ +@Immutable public final class FileRange { final ClientLogger logger = new ClientLogger(FileRange.class); private static final String RANGE_HEADER_FORMAT = "bytes=%d-%d"; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadInfo.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadInfo.java index 4c77355edc98..47a089832e67 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadInfo.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadInfo.java @@ -3,21 +3,34 @@ package com.azure.storage.file.models; +import com.azure.core.annotation.Immutable; import com.azure.core.implementation.util.ImplUtils; import java.time.OffsetDateTime; +/** + * This class contains the response information returned from the service when the file is uploaded. + */ +@Immutable public final class FileUploadInfo { private final String eTag; private final OffsetDateTime lastModified; - private final byte[] contentMD5; + private final byte[] contentMd5; private final Boolean isServerEncrypted; - public FileUploadInfo(final String eTag, final OffsetDateTime lastModified, final byte[] contentMD5, + /** + * Constructs a {@link FileUploadInfo}. + * + * @param eTag ETag of the file. + * @param lastModified Datetime when the file was last modified. + * @param contentMd5 MD5 of the file's content. + * @param isServerEncrypted Flag indicating the encryption status of the file's content on the server. + */ + public FileUploadInfo(final String eTag, final OffsetDateTime lastModified, final byte[] contentMd5, final Boolean isServerEncrypted) { this.eTag = eTag; this.lastModified = lastModified; - this.contentMD5 = ImplUtils.clone(contentMD5); + this.contentMd5 = ImplUtils.clone(contentMd5); this.isServerEncrypted = isServerEncrypted; } @@ -38,8 +51,8 @@ public OffsetDateTime getLastModified() { /** * @return the MD5 of the file's content. */ - public byte[] getContentMD5() { - return ImplUtils.clone(contentMD5); + public byte[] getContentMd5() { + return ImplUtils.clone(contentMd5); } /** diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeFromUrlInfo.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeFromUrlInfo.java index 3ff58363ade0..06c47699b9d8 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeFromUrlInfo.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeFromUrlInfo.java @@ -5,12 +5,16 @@ import java.time.OffsetDateTime; +/** + * Response from uploading a range from a URL source. + */ public final class FileUploadRangeFromUrlInfo { private final String eTag; private final OffsetDateTime lastModified; private final Boolean isServerEncrypted; - public FileUploadRangeFromUrlInfo(final String eTag, final OffsetDateTime lastModified, final Boolean isServerEncrypted) { + public FileUploadRangeFromUrlInfo(final String eTag, final OffsetDateTime lastModified, + final Boolean isServerEncrypted) { this.eTag = eTag; this.lastModified = lastModified; this.isServerEncrypted = isServerEncrypted; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListSharesOptions.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListSharesOptions.java index f500f6317bc4..7bc0391f23ea 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListSharesOptions.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListSharesOptions.java @@ -8,22 +8,23 @@ * *

      *
    • - * Providing {@link ListSharesOptions#setPrefix(String) prefix} will filter selections to {@link ShareItem shares} - * that that begin with the prefix. + * Providing {@link ListSharesOptions#setPrefix(String) prefix} will filter selections to + * {@link ShareItem shares} that that begin with the prefix. *
    • *
    • * Providing {@link ListSharesOptions#setMaxResultsPerPage(Integer) maxResultsPerPage} will limit the number of * {@link ShareItem shares} returned in a single page. *
    • *
    • - * Setting {@link ListSharesOptions#setIncludeMetadata(boolean) includeMetadata} to true will include the metadata - * of each {@link ShareItem share}, if false {@link ShareItem#getMetadata()} metadata} for each share will be {@code null}. + * Setting {@link ListSharesOptions#setIncludeMetadata(boolean) includeMetadata} to true will include the + * metadata of each {@link ShareItem share}, if false {@link ShareItem#getMetadata()} metadata} for each share + * will be {@code null}. *
    • *
    • - * Setting {@link ListSharesOptions#setIncludeSnapshots(boolean) includeSnapshots} to true will include snapshots - * of each {@link ShareItem share}, the snapshot will be included as separate items in the response and will be - * identifiable by {@link ShareItem#getSnapshot()} snapshot} having a value. The base share will contain {@code null} - * for the snapshot. + * Setting {@link ListSharesOptions#setIncludeSnapshots(boolean) includeSnapshots} to true will include + * snapshots of each {@link ShareItem share}, the snapshot will be included as separate items in the response + * and will be identifiable by {@link ShareItem#getSnapshot()} snapshot} having a value. The base share will + * contain {@code null} for the snapshot. *
    • *
    */ @@ -54,7 +55,8 @@ public String getPrefix() { /** * Sets the maximum number of shares to include in a single response. * - * @param maxResultsPerPage Maximum number of shares to include in a single response. This value must be between 1 and 5000. + * @param maxResultsPerPage Maximum number of shares to include in a single response. This value must be between 1 + * and 5000. * @return An updated ListSharesOptions object */ public ListSharesOptions setMaxResultsPerPage(Integer maxResultsPerPage) { diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareInfo.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareInfo.java index fc451434c3bb..a491379b073d 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareInfo.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareInfo.java @@ -3,11 +3,14 @@ package com.azure.storage.file.models; +import com.azure.core.annotation.Immutable; + import java.time.OffsetDateTime; /** * Contains information about a Share in the storage File service. */ +@Immutable public final class ShareInfo { private final String eTag; private final OffsetDateTime lastModified; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareSnapshotInfo.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareSnapshotInfo.java index 09b0bb529232..7acafe0977db 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareSnapshotInfo.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareSnapshotInfo.java @@ -3,11 +3,14 @@ package com.azure.storage.file.models; +import com.azure.core.annotation.Immutable; + import java.time.OffsetDateTime; /** * Contains information about a snapshot of a Share in the storage File service. */ +@Immutable public final class ShareSnapshotInfo { private final String snapshot; private final String eTag; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueProperties.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueProperties.java index f6d131846bc9..06d118083012 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueProperties.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueProperties.java @@ -3,11 +3,14 @@ package com.azure.storage.queue.models; +import com.azure.core.annotation.Immutable; + import java.util.Map; /** * Model class containing properties of a specific queue in the storage Queue service. */ +@Immutable public final class QueueProperties { private final Map metadata; private final int approximateMessagesCount; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesSegmentOptions.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesSegmentOptions.java index f7cecafb8231..e5070185c2f6 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesSegmentOptions.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesSegmentOptions.java @@ -3,6 +3,7 @@ package com.azure.storage.queue.models; +import com.azure.core.annotation.Fluent; import com.azure.storage.queue.QueueServiceAsyncClient; import com.azure.storage.queue.QueueServiceClient; @@ -15,18 +16,20 @@ * with the prefix. * *
  • - * Providing {@link QueuesSegmentOptions#getMaxResultsPerPage() maxResultsPerPage} will limit the number of {@link QueueItem queues} - * returned in a single page. + * Providing {@link QueuesSegmentOptions#getMaxResultsPerPage() maxResultsPerPage} will limit the number of + * {@link QueueItem queues} returned in a single page. *
  • *
  • - * Setting {@link QueuesSegmentOptions#isIncludeMetadata() includeMetadata} to true will include the metadata of - * each {@link QueueItem queue}, if false {@link QueueItem#getMetadata()} metadata} for each queue will be {@code null}. + * Setting {@link QueuesSegmentOptions#isIncludeMetadata() includeMetadata} to true will include the metadata + * of each {@link QueueItem queue}, if false {@link QueueItem#getMetadata()} metadata} for each queue will be + * {@code null}. *
  • * * * @see QueueServiceClient * @see QueueServiceAsyncClient */ +@Fluent public final class QueuesSegmentOptions { private boolean includeMetadata; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/UpdateMessageResult.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/UpdateMessageResult.java index f65888be3a70..47d9960618db 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/UpdateMessageResult.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/UpdateMessageResult.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. package com.azure.storage.queue.models; +import com.azure.core.annotation.Immutable; + import java.time.OffsetDateTime; /** * Response from the service when updating a message. Contains the information needed to continue working with * the specific message. */ +@Immutable public final class UpdateMessageResult { private final String popReceipt; private final OffsetDateTime timeNextVisible; From e3d16c61def0976d9352fe789f792a9da615050d Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Tue, 22 Oct 2019 11:17:36 -0700 Subject: [PATCH 41/64] Renamed LeaseClient to BlobLeaseClient (#5988) --- .../checkstyle/checkstyle-suppressions.xml | 4 +- .../azure/storage/blob/batch/APISpec.groovy | 8 +-- .../specialized/cryptography/APISpec.groovy | 12 ++-- ...cClient.java => BlobLeaseAsyncClient.java} | 38 ++++++------ ...{LeaseClient.java => BlobLeaseClient.java} | 34 +++++----- ...ilder.java => BlobLeaseClientBuilder.java} | 54 ++++++++-------- .../LeaseAsyncClientJavaDocCodeSnippets.java | 62 +++++++++---------- ...LeaseClientBuilderJavaDocCodeSnippets.java | 56 ++++++++--------- .../LeaseClientJavaDocCodeSnippets.java | 62 +++++++++---------- .../com/azure/storage/blob/APISpec.groovy | 18 +++--- 10 files changed, 174 insertions(+), 174 deletions(-) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/{LeaseAsyncClient.java => BlobLeaseAsyncClient.java} (90%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/{LeaseClient.java => BlobLeaseClient.java} (87%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/{LeaseClientBuilder.java => BlobLeaseClientBuilder.java} (69%) diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml index 1a777142cd67..ae280583bdcb 100755 --- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml +++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml @@ -206,8 +206,8 @@ - - + + diff --git a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy index ee0ff8fdd304..acee3d36a6c3 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy +++ b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy @@ -23,8 +23,8 @@ import com.azure.storage.blob.BlobServiceClientBuilder import com.azure.storage.blob.models.BlobContainerItem import com.azure.storage.blob.models.LeaseStateType import com.azure.storage.blob.models.ListBlobContainersOptions -import com.azure.storage.blob.specialized.LeaseClient -import com.azure.storage.blob.specialized.LeaseClientBuilder +import com.azure.storage.blob.specialized.BlobLeaseClient +import com.azure.storage.blob.specialized.BlobLeaseClientBuilder import com.azure.storage.common.StorageSharedKeyCredential import spock.lang.Requires import spock.lang.Shared @@ -254,8 +254,8 @@ class APISpec extends Specification { } } - static LeaseClient createLeaseClient(BlobContainerClient containerClient) { - return new LeaseClientBuilder() + static BlobLeaseClient createLeaseClient(BlobContainerClient containerClient) { + return new BlobLeaseClientBuilder() .containerClient(containerClient) .buildClient() } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy index 0351ae60f464..8a9e14bb1ca3 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy @@ -19,8 +19,8 @@ import com.azure.storage.blob.BlobAsyncClient import com.azure.storage.blob.BlobClient import com.azure.storage.blob.models.BlobProperties import com.azure.storage.blob.BlobServiceClientBuilder -import com.azure.storage.blob.specialized.LeaseClient -import com.azure.storage.blob.specialized.LeaseClientBuilder +import com.azure.storage.blob.specialized.BlobLeaseClient +import com.azure.storage.blob.specialized.BlobLeaseClientBuilder import com.azure.storage.common.StorageSharedKeyCredential import reactor.core.publisher.Flux import reactor.core.publisher.Mono @@ -339,7 +339,7 @@ class APISpec extends Specification { def setupBlobLeaseCondition(BlobAsyncClient bac, String leaseID) { String responseLeaseId = null if (leaseID == receivedLeaseID || leaseID == garbageLeaseID) { - responseLeaseId = new LeaseClientBuilder() + responseLeaseId = new BlobLeaseClientBuilder() .blobAsyncClient(bac) .buildAsyncClient() .acquireLease(-1) @@ -352,12 +352,12 @@ class APISpec extends Specification { } } - static LeaseClient createLeaseClient(BlobClient blobClient) { + static BlobLeaseClient createLeaseClient(BlobClient blobClient) { return createLeaseClient(blobClient, null) } - static LeaseClient createLeaseClient(BlobClient blobClient, String leaseId) { - return new LeaseClientBuilder() + static BlobLeaseClient createLeaseClient(BlobClient blobClient, String leaseId) { + return new BlobLeaseClientBuilder() .blobClient(blobClient) .leaseId(leaseId) .buildClient() diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java similarity index 90% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java index 7953a307c24e..78333ff3528a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java @@ -29,30 +29,30 @@ * and {@link BlobAsyncClient blobs}. This client acts as a supplement to those clients and only handles leasing * operations. * - *

    Instantiating a LeaseAsyncClient

    + *

    Instantiating a BlobLeaseAsyncClient

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithBlob} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClientBuilder.asyncInstantiationWithBlob} * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithContainer} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClientBuilder.asyncInstantiationWithContainer} * - *

    View {@link LeaseClientBuilder this} for additional ways to construct the client.

    + *

    View {@link BlobLeaseClientBuilder this} for additional ways to construct the client.

    * *

    For more information about leasing see the * container leasing or * blob leasing documentation.

    * - * @see LeaseClientBuilder + * @see BlobLeaseClientBuilder */ -@ServiceClient(builder = LeaseClientBuilder.class, isAsync = true) -public final class LeaseAsyncClient { - private final ClientLogger logger = new ClientLogger(LeaseAsyncClient.class); +@ServiceClient(builder = BlobLeaseClientBuilder.class, isAsync = true) +public final class BlobLeaseAsyncClient { + private final ClientLogger logger = new ClientLogger(BlobLeaseAsyncClient.class); private final boolean isBlob; private final String leaseId; private final AzureBlobStorageImpl client; private final String accountName; - LeaseAsyncClient(HttpPipeline pipeline, String url, String leaseId, boolean isBlob, String accountName, + BlobLeaseAsyncClient(HttpPipeline pipeline, String url, String leaseId, boolean isBlob, String accountName, String serviceVersion) { this.isBlob = isBlob; this.leaseId = leaseId; @@ -90,7 +90,7 @@ public String getLeaseId() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.acquireLease#int} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.acquireLease#int} * * @param duration The duration of the lease between 15 to 60 seconds or -1 for an infinite duration. * @return A reactive response containing the lease ID. @@ -110,7 +110,7 @@ public Mono acquireLease(int duration) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.acquireLeaseWithResponse#int-RequestConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.acquireLeaseWithResponse#int-RequestConditions} * * @param duration The duration of the lease between 15 to 60 seconds or -1 for an infinite duration. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and @@ -149,7 +149,7 @@ Mono> acquireLeaseWithResponse(int duration, RequestConditions * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.renewLease} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.renewLease} * * @return A reactive response containing the renewed lease ID. */ @@ -167,7 +167,7 @@ public Mono renewLease() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.renewLeaseWithResponse#RequestConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.renewLeaseWithResponse#RequestConditions} * * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the resource was changed relative to the given @@ -204,7 +204,7 @@ Mono> renewLeaseWithResponse(RequestConditions modifiedAccessCo * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.releaseLease} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.releaseLease} * * @return A reactive response signalling completion. */ @@ -222,7 +222,7 @@ public Mono releaseLease() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.releaseLeaseWithResponse#RequestConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.releaseLeaseWithResponse#RequestConditions} * * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the resource was changed relative to the given @@ -259,7 +259,7 @@ Mono> releaseLeaseWithResponse(RequestConditions modifiedAccessCo * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.breakLease} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.breakLease} * * @return A reactive response containing the remaining time in the broken lease in seconds. */ @@ -280,7 +280,7 @@ public Mono breakLease() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.breakLeaseWithResponse#Integer-RequestConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.breakLeaseWithResponse#Integer-RequestConditions} * * @param breakPeriodInSeconds An optional duration, between 0 and 60 seconds, that the lease should continue before * it is broken. If the break period is longer than the time remaining on the lease the remaining time on the lease @@ -324,7 +324,7 @@ Mono> breakLeaseWithResponse(Integer breakPeriodInSeconds, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.changeLease#String} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.changeLease#String} * * @param proposedId A new lease ID in a valid GUID format. * @return A reactive response containing the new lease ID. @@ -343,7 +343,7 @@ public Mono changeLease(String proposedId) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseAsyncClient.changeLeaseWithResponse#String-RequestConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.changeLeaseWithResponse#String-RequestConditions} * * @param proposedId A new lease ID in a valid GUID format. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java similarity index 87% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java index 63751a49ace8..6ae2fe0e30e9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java @@ -20,25 +20,25 @@ * This class provides a client that contains all the leasing operations for {@link BlobContainerClient containers} and * {@link BlobClient blobs}. This client acts as a supplement to those clients and only handles leasing operations. * - *

    Instantiating a LeaseClient

    + *

    Instantiating a BlobLeaseClient

    * * {@codesnippet com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithBlob} * * {@codesnippet com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithContainer} * - *

    View {@link LeaseClientBuilder this} for additional ways to construct the client.

    + *

    View {@link BlobLeaseClientBuilder this} for additional ways to construct the client.

    * *

    For more information about leasing see the * container leasing or * blob leasing documentation.

    * - * @see LeaseClientBuilder + * @see BlobLeaseClientBuilder */ -@ServiceClient(builder = LeaseClientBuilder.class) -public final class LeaseClient { - private final LeaseAsyncClient client; +@ServiceClient(builder = BlobLeaseClientBuilder.class) +public final class BlobLeaseClient { + private final BlobLeaseAsyncClient client; - LeaseClient(LeaseAsyncClient client) { + BlobLeaseClient(BlobLeaseAsyncClient client) { this.client = client; } @@ -68,7 +68,7 @@ public String getLeaseId() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.acquireLease#int} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.acquireLease#int} * * @param duration The duration of the lease between 15 to 60 seconds or -1 for an infinite duration. * @return The lease ID. @@ -84,7 +84,7 @@ public String acquireLease(int duration) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.acquireLeaseWithResponse#int-RequestConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.acquireLeaseWithResponse#int-RequestConditions-Duration-Context} * * @param duration The duration of the lease between 15 to 60 seconds or -1 for an infinite duration. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and @@ -106,7 +106,7 @@ public Response acquireLeaseWithResponse(int duration, RequestConditions * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.renewLease} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.renewLease} * * @return The renewed lease ID. */ @@ -120,7 +120,7 @@ public String renewLease() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.renewLeaseWithResponse#RequestConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.renewLeaseWithResponse#RequestConditions-Duration-Context} * * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the resource was changed relative to the given @@ -141,7 +141,7 @@ public Response renewLeaseWithResponse(RequestConditions modifiedAccessC * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.releaseLease} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.releaseLease} */ @ServiceMethod(returns = ReturnType.SINGLE) public void releaseLease() { @@ -153,7 +153,7 @@ public void releaseLease() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.releaseLeaseWithResponse#RequestConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.releaseLeaseWithResponse#RequestConditions-Duration-Context} * * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the resource was changed relative to the given @@ -174,7 +174,7 @@ public Response releaseLeaseWithResponse(RequestConditions modifiedAccessC * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.breakLease} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.breakLease} * * @return The remaining time in the broken lease in seconds. */ @@ -191,7 +191,7 @@ public Integer breakLease() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.breakLeaseWithResponse#Integer-RequestConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.breakLeaseWithResponse#Integer-RequestConditions-Duration-Context} * * @param breakPeriodInSeconds An optional duration, between 0 and 60 seconds, that the lease should continue before * it is broken. If the break period is longer than the time remaining on the lease the remaining time on the lease @@ -216,7 +216,7 @@ public Response breakLeaseWithResponse(Integer breakPeriodInSeconds, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.changeLease#String} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.changeLease#String} * * @param proposedId A new lease ID in a valid GUID format. * @return The new lease ID. @@ -231,7 +231,7 @@ public String changeLease(String proposedId) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClient.changeLeaseWithResponse#String-RequestConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.changeLeaseWithResponse#String-RequestConditions-Duration-Context} * * @param proposedId A new lease ID in a valid GUID format. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClientBuilder.java similarity index 69% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClientBuilder.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClientBuilder.java index ac13ce940a00..61b1eed591d9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClientBuilder.java @@ -18,7 +18,7 @@ /** * This class provides a fluent builder API to help aid the configuration and instantiation of Storage Lease * clients. Lease clients are able to interact with both container and blob clients and act as a supplement client. A - * new instance of {@link LeaseClient} and {@link LeaseAsyncClient} are constructed every time + * new instance of {@link BlobLeaseClient} and {@link BlobLeaseAsyncClient} are constructed every time * {@link #buildClient() buildClient} and {@link #buildAsyncClient() buildAsyncClient} are called * respectively. * @@ -27,21 +27,21 @@ * *

    Instantiating LeaseClients

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithBlobAndLeaseId} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClientBuilder.syncInstantiationWithBlobAndLeaseId} * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithContainerAndLeaseId} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClientBuilder.syncInstantiationWithContainerAndLeaseId} * *

    Instantiating LeaseAsyncClients

    * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithBlobAndLeaseId} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClientBuilder.asyncInstantiationWithBlobAndLeaseId} * - * {@codesnippet com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithContainerAndLeaseId} + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClientBuilder.asyncInstantiationWithContainerAndLeaseId} * - * @see LeaseClient - * @see LeaseAsyncClient + * @see BlobLeaseClient + * @see BlobLeaseAsyncClient */ -@ServiceClientBuilder(serviceClients = { LeaseClient.class, LeaseAsyncClient.class }) -public final class LeaseClientBuilder { +@ServiceClientBuilder(serviceClients = { BlobLeaseClient.class, BlobLeaseAsyncClient.class }) +public final class BlobLeaseClientBuilder { private HttpPipeline pipeline; private String url; private String leaseId; @@ -50,22 +50,22 @@ public final class LeaseClientBuilder { private BlobServiceVersion serviceVersion; /** - * Creates a {@link LeaseClient} based on the configurations set in the builder. + * Creates a {@link BlobLeaseClient} based on the configurations set in the builder. * - * @return a {@link LeaseClient} based on the configurations in this builder. + * @return a {@link BlobLeaseClient} based on the configurations in this builder. */ - public LeaseClient buildClient() { - return new LeaseClient(buildAsyncClient()); + public BlobLeaseClient buildClient() { + return new BlobLeaseClient(buildAsyncClient()); } /** - * Creates a {@link LeaseAsyncClient} based on the configurations set in the builder. + * Creates a {@link BlobLeaseAsyncClient} based on the configurations set in the builder. * - * @return a {@link LeaseAsyncClient} based on the configurations in this builder. + * @return a {@link BlobLeaseAsyncClient} based on the configurations in this builder. */ - public LeaseAsyncClient buildAsyncClient() { + public BlobLeaseAsyncClient buildAsyncClient() { BlobServiceVersion version = (serviceVersion == null) ? BlobServiceVersion.getLatest() : serviceVersion; - return new LeaseAsyncClient(pipeline, url, getLeaseId(), isBlob, accountName, version.getVersion()); + return new BlobLeaseAsyncClient(pipeline, url, getLeaseId(), isBlob, accountName, version.getVersion()); } /** @@ -73,10 +73,10 @@ public LeaseAsyncClient buildAsyncClient() { * {@link URL} that are used to interact with the service. * * @param blobClient BlobClient used to configure the builder. - * @return the updated LeaseClientBuilder object + * @return the updated BlobLeaseClientBuilder object * @throws NullPointerException If {@code blobClient} is {@code null}. */ - public LeaseClientBuilder blobClient(BlobClientBase blobClient) { + public BlobLeaseClientBuilder blobClient(BlobClientBase blobClient) { Objects.requireNonNull(blobClient); this.pipeline = blobClient.getHttpPipeline(); this.url = blobClient.getBlobUrl(); @@ -91,10 +91,10 @@ public LeaseClientBuilder blobClient(BlobClientBase blobClient) { * {@link URL} that are used to interact with the service. * * @param blobAsyncClient BlobAsyncClient used to configure the builder. - * @return the updated LeaseClientBuilder object + * @return the updated BlobLeaseClientBuilder object * @throws NullPointerException If {@code blobAsyncClient} is {@code null}. */ - public LeaseClientBuilder blobAsyncClient(BlobAsyncClientBase blobAsyncClient) { + public BlobLeaseClientBuilder blobAsyncClient(BlobAsyncClientBase blobAsyncClient) { Objects.requireNonNull(blobAsyncClient); this.pipeline = blobAsyncClient.getHttpPipeline(); this.url = blobAsyncClient.getBlobUrl(); @@ -109,10 +109,10 @@ public LeaseClientBuilder blobAsyncClient(BlobAsyncClientBase blobAsyncClient) { * and {@link URL} that are used to interact with the service. * * @param blobContainerClient ContainerClient used to configure the builder. - * @return the updated LeaseClientBuilder object + * @return the updated BlobLeaseClientBuilder object * @throws NullPointerException If {@code containerClient} is {@code null}. */ - public LeaseClientBuilder containerClient(BlobContainerClient blobContainerClient) { + public BlobLeaseClientBuilder containerClient(BlobContainerClient blobContainerClient) { Objects.requireNonNull(blobContainerClient); this.pipeline = blobContainerClient.getHttpPipeline(); this.url = blobContainerClient.getBlobContainerUrl(); @@ -127,10 +127,10 @@ public LeaseClientBuilder containerClient(BlobContainerClient blobContainerClien * HttpPipeline} and {@link URL} that are used to interact with the service. * * @param blobContainerAsyncClient ContainerAsyncClient used to configure the builder. - * @return the updated LeaseClientBuilder object + * @return the updated BlobLeaseClientBuilder object * @throws NullPointerException If {@code containerAsyncClient} is {@code null}. */ - public LeaseClientBuilder containerAsyncClient(BlobContainerAsyncClient blobContainerAsyncClient) { + public BlobLeaseClientBuilder containerAsyncClient(BlobContainerAsyncClient blobContainerAsyncClient) { Objects.requireNonNull(blobContainerAsyncClient); this.pipeline = blobContainerAsyncClient.getHttpPipeline(); this.url = blobContainerAsyncClient.getBlobContainerUrl(); @@ -146,9 +146,9 @@ public LeaseClientBuilder containerAsyncClient(BlobContainerAsyncClient blobCont *

    If a lease ID isn't set then a {@link UUID} will be used.

    * * @param leaseId Identifier for the lease. - * @return the updated LeaseClientBuilder object + * @return the updated BlobLeaseClientBuilder object */ - public LeaseClientBuilder leaseId(String leaseId) { + public BlobLeaseClientBuilder leaseId(String leaseId) { this.leaseId = leaseId; return this; } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java index 00f4f0d6298d..92e4d3a02c5d 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java @@ -10,119 +10,119 @@ public class LeaseAsyncClientJavaDocCodeSnippets { - private LeaseAsyncClient client = new LeaseClientBuilder() + private BlobLeaseAsyncClient client = new BlobLeaseClientBuilder() .blobAsyncClient(new BlobClientBuilder().blobName("blob").buildAsyncClient()) .buildAsyncClient(); /** - * Code snippets for {@link LeaseAsyncClient#acquireLease(int)} + * Code snippets for {@link BlobLeaseAsyncClient#acquireLease(int)} */ public void acquireLeaseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.acquireLease#int + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.acquireLease#int client.acquireLease(60).subscribe(response -> System.out.printf("Lease ID is %s%n", response)); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.acquireLease#int + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.acquireLease#int } /** - * Code snippets for {@link LeaseAsyncClient#renewLease()} + * Code snippets for {@link BlobLeaseAsyncClient#renewLease()} */ public void renewLeaseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.renewLease + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.renewLease client.renewLease().subscribe(response -> System.out.printf("Renewed lease ID is %s%n", response)); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.renewLease + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.renewLease } /** - * Code snippets for {@link LeaseAsyncClient#releaseLease()} + * Code snippets for {@link BlobLeaseAsyncClient#releaseLease()} */ public void releaseLeaseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.releaseLease + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.releaseLease client.releaseLease().subscribe(response -> System.out.println("Completed release lease")); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.releaseLease + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.releaseLease } /** - * Code snippets for {@link LeaseAsyncClient#breakLease()} + * Code snippets for {@link BlobLeaseAsyncClient#breakLease()} */ public void breakLeaseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.breakLease + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.breakLease client.breakLease().subscribe(response -> System.out.printf("The broken lease has %d seconds remaining on the lease", response)); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.breakLease + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.breakLease } /** - * Code snippets for {@link LeaseAsyncClient#changeLease(String)} + * Code snippets for {@link BlobLeaseAsyncClient#changeLease(String)} */ public void changeLeaseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.changeLease#String + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.changeLease#String client.changeLease("proposedId").subscribe(response -> System.out.printf("Changed lease ID is %s%n", response)); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.changeLease#String + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.changeLease#String } /** - * Code snippets for {@link LeaseAsyncClient#acquireLeaseWithResponse(int, RequestConditions)} + * Code snippets for {@link BlobLeaseAsyncClient#acquireLeaseWithResponse(int, RequestConditions)} */ public void acquireLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.acquireLeaseWithResponse#int-RequestConditions + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.acquireLeaseWithResponse#int-RequestConditions RequestConditions modifiedAccessConditions = new RequestConditions() .setIfModifiedSince(OffsetDateTime.now().minusDays(3)); client.acquireLeaseWithResponse(60, modifiedAccessConditions).subscribe(response -> System.out.printf("Lease ID is %s%n", response.getValue())); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.acquireLeaseWithResponse#int-RequestConditions + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.acquireLeaseWithResponse#int-RequestConditions } /** - * Code snippets for {@link LeaseAsyncClient#renewLeaseWithResponse(RequestConditions)} + * Code snippets for {@link BlobLeaseAsyncClient#renewLeaseWithResponse(RequestConditions)} */ public void renewLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.renewLeaseWithResponse#RequestConditions + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.renewLeaseWithResponse#RequestConditions RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.renewLeaseWithResponse(modifiedAccessConditions).subscribe(response -> System.out.printf("Renewed lease ID is %s%n", response.getValue())); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.renewLeaseWithResponse#RequestConditions + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.renewLeaseWithResponse#RequestConditions } /** - * Code snippets for {@link LeaseAsyncClient#releaseLeaseWithResponse(RequestConditions)} + * Code snippets for {@link BlobLeaseAsyncClient#releaseLeaseWithResponse(RequestConditions)} */ public void releaseLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.releaseLeaseWithResponse#RequestConditions + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.releaseLeaseWithResponse#RequestConditions RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.releaseLeaseWithResponse(modifiedAccessConditions).subscribe(response -> System.out.printf("Release lease completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.releaseLeaseWithResponse#RequestConditions + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.releaseLeaseWithResponse#RequestConditions } /** - * Code snippets for {@link LeaseAsyncClient#breakLeaseWithResponse(Integer, RequestConditions)} + * Code snippets for {@link BlobLeaseAsyncClient#breakLeaseWithResponse(Integer, RequestConditions)} */ public void breakLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.breakLeaseWithResponse#Integer-RequestConditions + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.breakLeaseWithResponse#Integer-RequestConditions Integer retainLeaseInSeconds = 5; RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.breakLeaseWithResponse(retainLeaseInSeconds, modifiedAccessConditions).subscribe(response -> System.out.printf("The broken lease has %d seconds remaining on the lease", response.getValue())); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.breakLeaseWithResponse#Integer-RequestConditions + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.breakLeaseWithResponse#Integer-RequestConditions } /** - * Code snippets for {@link LeaseAsyncClient#changeLeaseWithResponse(String, RequestConditions)} + * Code snippets for {@link BlobLeaseAsyncClient#changeLeaseWithResponse(String, RequestConditions)} */ public void changeLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseAsyncClient.changeLeaseWithResponse#String-RequestConditions + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.changeLeaseWithResponse#String-RequestConditions RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); client.changeLeaseWithResponse("proposedId", modifiedAccessConditions).subscribe(response -> System.out.printf("Changed lease ID is %s%n", response.getValue())); - // END: com.azure.storage.blob.specialized.LeaseAsyncClient.changeLeaseWithResponse#String-RequestConditions + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.changeLeaseWithResponse#String-RequestConditions } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientBuilderJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientBuilderJavaDocCodeSnippets.java index 709243279497..d80100c47789 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientBuilderJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientBuilderJavaDocCodeSnippets.java @@ -24,94 +24,94 @@ public class LeaseClientBuilderJavaDocCodeSnippets { private String leaseId = "leaseId"; /** - * Code snippets for {@link LeaseClientBuilder#buildClient()}. + * Code snippets for {@link BlobLeaseClientBuilder#buildClient()}. */ public void syncInstantiationWithBlob() { // BEGIN: com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithBlob - LeaseClient leaseClient = new LeaseClientBuilder() + BlobLeaseClient blobLeaseClient = new BlobLeaseClientBuilder() .blobClient(blobClient) .buildClient(); // END: com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithBlob } /** - * Code snippets for {@link LeaseClientBuilder#buildClient()}. + * Code snippets for {@link BlobLeaseClientBuilder#buildClient()}. */ public void syncInstantiationWithBlobAndLeaseId() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithBlobAndLeaseId - LeaseClient leaseClient = new LeaseClientBuilder() + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClientBuilder.syncInstantiationWithBlobAndLeaseId + BlobLeaseClient blobLeaseClient = new BlobLeaseClientBuilder() .blobClient(blobClient) .leaseId(leaseId) .buildClient(); - // END: com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithBlobAndLeaseId + // END: com.azure.storage.blob.specialized.BlobLeaseClientBuilder.syncInstantiationWithBlobAndLeaseId } /** - * Code snippets for {@link LeaseClientBuilder#buildClient()}. + * Code snippets for {@link BlobLeaseClientBuilder#buildClient()}. */ public void syncInstantiationWithContainer() { // BEGIN: com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithContainer - LeaseClient leaseClient = new LeaseClientBuilder() + BlobLeaseClient blobLeaseClient = new BlobLeaseClientBuilder() .containerClient(blobContainerClient) .buildClient(); // END: com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithContainer } /** - * Code snippets for {@link LeaseClientBuilder#buildClient()}. + * Code snippets for {@link BlobLeaseClientBuilder#buildClient()}. */ public void syncInstantiationWithContainerAndLeaseId() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithContainerAndLeaseId - LeaseClient leaseClient = new LeaseClientBuilder() + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClientBuilder.syncInstantiationWithContainerAndLeaseId + BlobLeaseClient blobLeaseClient = new BlobLeaseClientBuilder() .containerClient(blobContainerClient) .leaseId(leaseId) .buildClient(); - // END: com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithContainerAndLeaseId + // END: com.azure.storage.blob.specialized.BlobLeaseClientBuilder.syncInstantiationWithContainerAndLeaseId } /** - * Code snippets for {@link LeaseClientBuilder#buildAsyncClient()}. + * Code snippets for {@link BlobLeaseClientBuilder#buildAsyncClient()}. */ public void asyncInstantiationWithBlob() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithBlob - LeaseAsyncClient leaseAsyncClient = new LeaseClientBuilder() + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClientBuilder.asyncInstantiationWithBlob + BlobLeaseAsyncClient blobLeaseAsyncClient = new BlobLeaseClientBuilder() .blobAsyncClient(blobAsyncClient) .buildAsyncClient(); - // END: com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithBlob + // END: com.azure.storage.blob.specialized.BlobLeaseClientBuilder.asyncInstantiationWithBlob } /** - * Code snippets for {@link LeaseClientBuilder#buildAsyncClient()}. + * Code snippets for {@link BlobLeaseClientBuilder#buildAsyncClient()}. */ public void asyncInstantiationWithBlobAndLeaseId() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithBlobAndLeaseId - LeaseAsyncClient leaseAsyncClient = new LeaseClientBuilder() + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClientBuilder.asyncInstantiationWithBlobAndLeaseId + BlobLeaseAsyncClient blobLeaseAsyncClient = new BlobLeaseClientBuilder() .blobAsyncClient(blobAsyncClient) .leaseId(leaseId) .buildAsyncClient(); - // END: com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithBlobAndLeaseId + // END: com.azure.storage.blob.specialized.BlobLeaseClientBuilder.asyncInstantiationWithBlobAndLeaseId } /** - * Code snippets for {@link LeaseClientBuilder#buildAsyncClient()}. + * Code snippets for {@link BlobLeaseClientBuilder#buildAsyncClient()}. */ public void asyncInstantiationWithContainer() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithContainer - LeaseAsyncClient leaseAsyncClient = new LeaseClientBuilder() + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClientBuilder.asyncInstantiationWithContainer + BlobLeaseAsyncClient blobLeaseAsyncClient = new BlobLeaseClientBuilder() .containerAsyncClient(blobContainerAsyncClient) .buildAsyncClient(); - // END: com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithContainer + // END: com.azure.storage.blob.specialized.BlobLeaseClientBuilder.asyncInstantiationWithContainer } /** - * Code snippets for {@link LeaseClientBuilder#buildAsyncClient()}. + * Code snippets for {@link BlobLeaseClientBuilder#buildAsyncClient()}. */ public void asyncInstantiationWithContainerAndLeaseId() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithContainerAndLeaseId - LeaseAsyncClient leaseAsyncClient = new LeaseClientBuilder() + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClientBuilder.asyncInstantiationWithContainerAndLeaseId + BlobLeaseAsyncClient blobLeaseAsyncClient = new BlobLeaseClientBuilder() .containerAsyncClient(blobContainerAsyncClient) .leaseId(leaseId) .buildAsyncClient(); - // END: com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithContainerAndLeaseId + // END: com.azure.storage.blob.specialized.BlobLeaseClientBuilder.asyncInstantiationWithContainerAndLeaseId } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java index 8bee366da02c..556268991aec 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java @@ -11,7 +11,7 @@ import java.time.OffsetDateTime; public class LeaseClientJavaDocCodeSnippets { - private LeaseClient client = new LeaseClientBuilder() + private BlobLeaseClient client = new BlobLeaseClientBuilder() .blobClient(new BlobClientBuilder().blobName("blob").buildClient()) .buildClient(); private Duration timeout = Duration.ofSeconds(30); @@ -19,98 +19,98 @@ public class LeaseClientJavaDocCodeSnippets { private String value = "value"; /** - * Code snippets for {@link LeaseClient#acquireLease(int)} + * Code snippets for {@link BlobLeaseClient#acquireLease(int)} */ public void acquireLease() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.acquireLease#int + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.acquireLease#int System.out.printf("Lease ID is %s%n", client.acquireLease(60)); - // END: com.azure.storage.blob.specialized.LeaseClient.acquireLease#int + // END: com.azure.storage.blob.specialized.BlobLeaseClient.acquireLease#int } /** - * Code snippets for {@link LeaseClient#renewLease()} + * Code snippets for {@link BlobLeaseClient#renewLease()} */ public void renewLease() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.renewLease + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.renewLease System.out.printf("Renewed lease ID is %s%n", client.renewLease()); - // END: com.azure.storage.blob.specialized.LeaseClient.renewLease + // END: com.azure.storage.blob.specialized.BlobLeaseClient.renewLease } /** - * Code snippets for {@link LeaseClient#releaseLease()} + * Code snippets for {@link BlobLeaseClient#releaseLease()} */ public void releaseLease() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.releaseLease + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.releaseLease client.releaseLease(); System.out.println("Release lease completed"); - // END: com.azure.storage.blob.specialized.LeaseClient.releaseLease + // END: com.azure.storage.blob.specialized.BlobLeaseClient.releaseLease } /** - * Code snippets for {@link LeaseClient#breakLease()} + * Code snippets for {@link BlobLeaseClient#breakLease()} */ public void breakLease() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.breakLease + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.breakLease System.out.printf("The broken lease has %d seconds remaining on the lease", client.breakLease()); - // END: com.azure.storage.blob.specialized.LeaseClient.breakLease + // END: com.azure.storage.blob.specialized.BlobLeaseClient.breakLease } /** - * Code snippets for {@link LeaseClient#changeLease(String)} + * Code snippets for {@link BlobLeaseClient#changeLease(String)} */ public void changeLease() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.changeLease#String + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.changeLease#String System.out.printf("Changed lease ID is %s%n", client.changeLease("proposedId")); - // END: com.azure.storage.blob.specialized.LeaseClient.changeLease#String + // END: com.azure.storage.blob.specialized.BlobLeaseClient.changeLease#String } /** - * Code snippets for {@link LeaseClient#acquireLeaseWithResponse(int, com.azure.core.http.RequestConditions, Duration, Context)} + * Code snippets for {@link BlobLeaseClient#acquireLeaseWithResponse(int, com.azure.core.http.RequestConditions, Duration, Context)} */ public void acquireLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.acquireLeaseWithResponse#int-RequestConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.acquireLeaseWithResponse#int-RequestConditions-Duration-Context RequestConditions modifiedAccessConditions = new RequestConditions() .setIfModifiedSince(OffsetDateTime.now().minusDays(3)); System.out.printf("Lease ID is %s%n", client .acquireLeaseWithResponse(60, modifiedAccessConditions, timeout, new Context(key, value)) .getValue()); - // END: com.azure.storage.blob.specialized.LeaseClient.acquireLeaseWithResponse#int-RequestConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobLeaseClient.acquireLeaseWithResponse#int-RequestConditions-Duration-Context } /** - * Code snippets for {@link LeaseClient#renewLeaseWithResponse(RequestConditions, Duration, Context)} + * Code snippets for {@link BlobLeaseClient#renewLeaseWithResponse(RequestConditions, Duration, Context)} */ public void renewLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.renewLeaseWithResponse#RequestConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.renewLeaseWithResponse#RequestConditions-Duration-Context RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); System.out.printf("Renewed lease ID is %s%n", client.renewLeaseWithResponse(modifiedAccessConditions, timeout, new Context(key, value)) .getValue()); - // END: com.azure.storage.blob.specialized.LeaseClient.renewLeaseWithResponse#RequestConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobLeaseClient.renewLeaseWithResponse#RequestConditions-Duration-Context } /** - * Code snippets for {@link LeaseClient#releaseLeaseWithResponse(RequestConditions, Duration, Context)} + * Code snippets for {@link BlobLeaseClient#releaseLeaseWithResponse(RequestConditions, Duration, Context)} */ public void releaseLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.releaseLeaseWithResponse#RequestConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.releaseLeaseWithResponse#RequestConditions-Duration-Context RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); System.out.printf("Release lease completed with status %d%n", client.releaseLeaseWithResponse(modifiedAccessConditions, timeout, new Context(key, value)) .getStatusCode()); - // END: com.azure.storage.blob.specialized.LeaseClient.releaseLeaseWithResponse#RequestConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobLeaseClient.releaseLeaseWithResponse#RequestConditions-Duration-Context } /** - * Code snippets for {@link LeaseClient#breakLeaseWithResponse(Integer, RequestConditions, Duration, Context)} + * Code snippets for {@link BlobLeaseClient#breakLeaseWithResponse(Integer, RequestConditions, Duration, Context)} */ public void breakLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.breakLeaseWithResponse#Integer-RequestConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.breakLeaseWithResponse#Integer-RequestConditions-Duration-Context Integer retainLeaseInSeconds = 5; RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); @@ -118,20 +118,20 @@ public void breakLeaseWithResponseCodeSnippets() { System.out.printf("The broken lease has %d seconds remaining on the lease", client .breakLeaseWithResponse(retainLeaseInSeconds, modifiedAccessConditions, timeout, new Context(key, value)) .getValue()); - // END: com.azure.storage.blob.specialized.LeaseClient.breakLeaseWithResponse#Integer-RequestConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobLeaseClient.breakLeaseWithResponse#Integer-RequestConditions-Duration-Context } /** - * Code snippets for {@link LeaseClient#changeLeaseWithResponse(String, RequestConditions, Duration, Context)} + * Code snippets for {@link BlobLeaseClient#changeLeaseWithResponse(String, RequestConditions, Duration, Context)} */ public void changeLeaseWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.LeaseClient.changeLeaseWithResponse#String-RequestConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.changeLeaseWithResponse#String-RequestConditions-Duration-Context RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); System.out.printf("Changed lease ID is %s%n", client.changeLeaseWithResponse("proposedId", modifiedAccessConditions, timeout, new Context(key, value)) .getValue()); - // END: com.azure.storage.blob.specialized.LeaseClient.changeLeaseWithResponse#String-RequestConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobLeaseClient.changeLeaseWithResponse#String-RequestConditions-Duration-Context } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index 1a337cbfd952..9e4e66cbeb9d 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -33,8 +33,8 @@ import com.azure.storage.blob.models.LeaseStateType import com.azure.storage.blob.models.ListBlobContainersOptions import com.azure.storage.blob.specialized.BlobAsyncClientBase import com.azure.storage.blob.specialized.BlobClientBase -import com.azure.storage.blob.specialized.LeaseClient -import com.azure.storage.blob.specialized.LeaseClientBuilder +import com.azure.storage.blob.specialized.BlobLeaseClient +import com.azure.storage.blob.specialized.BlobLeaseClientBuilder import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.common.implementation.Constants import reactor.core.publisher.Flux @@ -409,23 +409,23 @@ class APISpec extends Specification { } } - static LeaseClient createLeaseClient(BlobClientBase blobClient) { + static BlobLeaseClient createLeaseClient(BlobClientBase blobClient) { return createLeaseClient(blobClient, null) } - static LeaseClient createLeaseClient(BlobClientBase blobClient, String leaseId) { - return new LeaseClientBuilder() + static BlobLeaseClient createLeaseClient(BlobClientBase blobClient, String leaseId) { + return new BlobLeaseClientBuilder() .blobClient(blobClient) .leaseId(leaseId) .buildClient() } - static LeaseClient createLeaseClient(BlobContainerClient containerClient) { + static BlobLeaseClient createLeaseClient(BlobContainerClient containerClient) { return createLeaseClient(containerClient, null) } - static LeaseClient createLeaseClient(BlobContainerClient containerClient, String leaseId) { - return new LeaseClientBuilder() + static BlobLeaseClient createLeaseClient(BlobContainerClient containerClient, String leaseId) { + return new BlobLeaseClientBuilder() .containerClient(containerClient) .leaseId(leaseId) .buildClient() @@ -532,7 +532,7 @@ class APISpec extends Specification { def setupBlobLeaseCondition(BlobAsyncClientBase bac, String leaseID) { String responseLeaseId = null if (leaseID == receivedLeaseID || leaseID == garbageLeaseID) { - responseLeaseId = new LeaseClientBuilder() + responseLeaseId = new BlobLeaseClientBuilder() .blobAsyncClient(bac) .buildAsyncClient() .acquireLease(-1) From 9057a66f3a8f29536aab5fac9a5c83db457040ba Mon Sep 17 00:00:00 2001 From: Connie Yau Date: Tue, 22 Oct 2019 12:26:15 -0700 Subject: [PATCH 42/64] Azure Storage Blob: Fix method and parameter name casing (#5954) * Change from contentMD5 -> contentMd5. * Change from toURL -> toUrl. Change from checked exception to unchecked. * Change from getKeySHA256 -> getKeySha256. * Fix casing for URL. * Fix parameter names. * change from MD5 to Md5. * Ignoring broken tests and adding a maximum duration. --- ...tedBlobAsyncClientJavaDocCodeSnippets.java | 4 +- .../specialized/cryptography/APISpec.groovy | 2 +- .../azure/storage/blob/BlobClientBuilder.java | 2 +- .../blob/BlobContainerClientBuilder.java | 2 +- .../blob/BlobServiceClientBuilder.java | 2 +- .../com/azure/storage/blob/BlobUrlParts.java | 2 +- .../storage/blob/models/AppendBlobItem.java | 12 ++-- .../storage/blob/models/BlobProperties.java | 8 +-- .../storage/blob/models/BlockBlobItem.java | 12 ++-- .../blob/models/CustomerProvidedKey.java | 12 ++-- .../storage/blob/models/PageBlobItem.java | 12 ++-- .../blob/specialized/AppendBlobClient.java | 6 +- .../blob/specialized/BlobAsyncClientBase.java | 58 +++++++-------- .../blob/specialized/BlobClientBase.java | 30 ++++---- .../specialized/BlockBlobAsyncClient.java | 72 +++++++++---------- .../blob/specialized/BlockBlobClient.java | 54 +++++++------- .../blob/specialized/PageBlobAsyncClient.java | 38 +++++----- .../blob/specialized/PageBlobClient.java | 30 ++++---- .../SpecializedBlobClientBuilder.java | 2 +- .../BlobAsyncClientJavaDocCodeSnippets.java | 38 +++++----- .../blob/BlobClientJavaDocCodeSnippets.java | 40 +++++------ ...lobAsyncClientBaseJavaDocCodeSnippets.java | 38 +++++----- .../BlobClientBaseJavaDocCodeSnippets.java | 40 +++++------ ...ockBlobAsyncClientJavaDocCodeSnippets.java | 24 +++---- .../BlockBlobClientJavaDocCodeSnippets.java | 34 ++++----- ...ageBlobAsyncClientJavaDocCodeSnippets.java | 18 ++--- .../PageBlobClientJavaDocCodeSnippets.java | 18 ++--- .../com/azure/storage/blob/APISpec.groovy | 2 +- .../com/azure/storage/blob/BlobAPITest.groovy | 34 ++++----- .../com/azure/storage/blob/CPKTest.groovy | 20 +++--- .../blob/specialized/AppendBlobAPITest.groovy | 2 +- .../blob/specialized/BlockBlobAPITest.groovy | 22 +++--- .../blob/specialized/PageBlobAPITest.groovy | 22 +++--- .../azure/storage/file/FileAPITests.groovy | 13 ++-- .../storage/file/FileAsyncAPITests.groovy | 11 +-- 35 files changed, 369 insertions(+), 367 deletions(-) diff --git a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java index a8db10ca4cd9..3bad656c124b 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java @@ -54,7 +54,7 @@ public void upload() { .setNumBuffers(numBuffers); client.upload(data, parallelTransferOptions).subscribe(response -> System.out.printf("Uploaded BlockBlob MD5 is %s%n", - Base64.getEncoder().encodeToString(response.getContentMD5()))); + Base64.getEncoder().encodeToString(response.getContentMd5()))); // END: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.upload#Flux-ParallelTransferOptions } @@ -78,7 +78,7 @@ public void upload2() { client.uploadWithResponse(data, parallelTransferOptions, headers, metadata, AccessTier.HOT, accessConditions) .subscribe(response -> System.out.printf("Uploaded BlockBlob MD5 is %s%n", - Base64.getEncoder().encodeToString(response.getValue().getContentMD5()))); + Base64.getEncoder().encodeToString(response.getValue().getContentMd5()))); // END: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadWithResponse#Flux-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy index 8a9e14bb1ca3..ba4b76194a1c 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy @@ -277,7 +277,7 @@ class APISpec extends Specification { response.getHeaders().getValue("Content-Type") == contentType if (checkContentMD5) { - return propertiesEqual && response.getValue().getContentMD5() == contentMD5 + return propertiesEqual && response.getValue().getContentMd5() == contentMD5 } return propertiesEqual } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java index 01dc6c840831..2c0c03a2072c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java @@ -148,7 +148,7 @@ public BlobClientBuilder customerProvidedKey(CustomerProvidedKey customerProvide } else { this.customerProvidedKey = new CpkInfo() .setEncryptionKey(customerProvidedKey.getKey()) - .setEncryptionKeySha256(customerProvidedKey.getKeySHA256()) + .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) .setEncryptionAlgorithm(customerProvidedKey.getEncryptionAlgorithm()); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java index cba87f231fb1..cf8c924b1066 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java @@ -161,7 +161,7 @@ public BlobContainerClientBuilder customerProvidedKey(CustomerProvidedKey custom } else { this.customerProvidedKey = new CpkInfo() .setEncryptionKey(customerProvidedKey.getKey()) - .setEncryptionKeySha256(customerProvidedKey.getKeySHA256()) + .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) .setEncryptionAlgorithm(customerProvidedKey.getEncryptionAlgorithm()); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java index b8d16c1f4087..cf5dbf808d88 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java @@ -140,7 +140,7 @@ public BlobServiceClientBuilder customerProvidedKey(CustomerProvidedKey customer } else { this.customerProvidedKey = new CpkInfo() .setEncryptionKey(customerProvidedKey.getKey()) - .setEncryptionKeySha256(customerProvidedKey.getKeySHA256()) + .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) .setEncryptionAlgorithm(customerProvidedKey.getEncryptionAlgorithm()); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java index acbb8d8dc325..ac0225a68d0d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java @@ -252,7 +252,7 @@ public URL toUrl() { try { return url.toURL(); } catch (MalformedURLException ex) { - throw logger.logExceptionAsError(new IllegalStateException("The URL parts created a malformed URL.")); + throw logger.logExceptionAsError(new IllegalStateException("The URL parts created a malformed URL.", ex)); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java index 22d34a702a62..cedd21751feb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java @@ -15,7 +15,7 @@ public class AppendBlobItem { private final String eTag; private final OffsetDateTime lastModified; - private final byte[] contentMD5; + private final byte[] contentMd5; private final boolean isServerEncrypted; private final String encryptionKeySha256; private final String blobAppendOffset; @@ -26,18 +26,18 @@ public class AppendBlobItem { * * @param eTag ETag of the append blob. * @param lastModified Last modified time of the append blob. - * @param contentMD5 Content MD5 of the append blob. + * @param contentMd5 Content MD5 of the append blob. * @param isServerEncrypted Flag indicating if the page blob is encrypted on the server. * @param encryptionKeySha256 The encryption key used to encrypt the page blob. * @param blobAppendOffset The offset at which the block was committed to the block blob. * @param blobCommittedBlockCount The number of committed blocks in the block blob. */ - public AppendBlobItem(final String eTag, final OffsetDateTime lastModified, final byte[] contentMD5, + public AppendBlobItem(final String eTag, final OffsetDateTime lastModified, final byte[] contentMd5, final boolean isServerEncrypted, final String encryptionKeySha256, final String blobAppendOffset, final Integer blobCommittedBlockCount) { this.eTag = eTag; this.lastModified = lastModified; - this.contentMD5 = ImplUtils.clone(contentMD5); + this.contentMd5 = ImplUtils.clone(contentMd5); this.isServerEncrypted = isServerEncrypted; this.encryptionKeySha256 = encryptionKeySha256; this.blobAppendOffset = blobAppendOffset; @@ -75,8 +75,8 @@ public String getEncryptionKeySha256() { /** * @return the calculated MD5 of the append blob */ - public byte[] getContentMD5() { - return ImplUtils.clone(contentMD5); + public byte[] getContentMd5() { + return ImplUtils.clone(contentMd5); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java index 22ccff5b123a..c25f5c439903 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java @@ -19,7 +19,7 @@ public final class BlobProperties { private final String eTag; private final long blobSize; private final String contentType; - private final byte[] contentMD5; + private final byte[] contentMd5; private final String contentEncoding; private final String contentDisposition; private final String contentLanguage; @@ -100,7 +100,7 @@ public BlobProperties(final OffsetDateTime creationTime, final OffsetDateTime la this.eTag = eTag; this.blobSize = blobSize; this.contentType = contentType; - this.contentMD5 = ImplUtils.clone(contentMd5); + this.contentMd5 = ImplUtils.clone(contentMd5); this.contentEncoding = contentEncoding; this.contentDisposition = contentDisposition; this.contentLanguage = contentLanguage; @@ -166,8 +166,8 @@ public String getContentType() { /** * @return the MD5 of the blob's content */ - public byte[] getContentMD5() { - return ImplUtils.clone(contentMD5); + public byte[] getContentMd5() { + return ImplUtils.clone(contentMd5); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java index 2b6db80985b3..b7f1378fca4a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java @@ -15,7 +15,7 @@ public class BlockBlobItem { private final String eTag; private final OffsetDateTime lastModified; - private final byte[] contentMD5; + private final byte[] contentMd5; private final Boolean isServerEncrypted; private final String encryptionKeySha256; @@ -24,15 +24,15 @@ public class BlockBlobItem { * * @param eTag ETag of the block blob. * @param lastModified Last modified time of the block blob. - * @param contentMD5 Content MD5 of the block blob. + * @param contentMd5 Content MD5 of the block blob. * @param isServerEncrypted Flag indicating if the page blob is encrypted on the server. * @param encryptionKeySha256 The encryption key used to encrypt the page blob. */ - public BlockBlobItem(final String eTag, final OffsetDateTime lastModified, final byte[] contentMD5, + public BlockBlobItem(final String eTag, final OffsetDateTime lastModified, final byte[] contentMd5, final boolean isServerEncrypted, final String encryptionKeySha256) { this.eTag = eTag; this.lastModified = lastModified; - this.contentMD5 = ImplUtils.clone(contentMD5); + this.contentMd5 = ImplUtils.clone(contentMd5); this.isServerEncrypted = isServerEncrypted; this.encryptionKeySha256 = encryptionKeySha256; } @@ -68,7 +68,7 @@ public String getEncryptionKeySha256() { /** * @return the MD5 of the block blob's comment */ - public byte[] getContentMD5() { - return ImplUtils.clone(contentMD5); + public byte[] getContentMd5() { + return ImplUtils.clone(contentMd5); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKey.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKey.java index 398e976c95c1..c77249173262 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKey.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKey.java @@ -25,7 +25,7 @@ public class CustomerProvidedKey { /** * Base64 encoded string of the encryption key's SHA256 hash. */ - private final String keySHA256; + private final String keySha256; /** * The algorithm for Azure Blob Storage to encrypt with. @@ -33,7 +33,6 @@ public class CustomerProvidedKey { */ private final EncryptionAlgorithmType encryptionAlgorithm = EncryptionAlgorithmType.AES256; - /** * Creates a new wrapper for a client provided key. * @@ -51,7 +50,7 @@ public CustomerProvidedKey(String key) { throw logger.logExceptionAsError(new RuntimeException(e)); } byte[] keyhash = sha256.digest(Base64.getDecoder().decode(key)); - this.keySHA256 = Base64.getEncoder().encodeToString(keyhash); + this.keySha256 = Base64.getEncoder().encodeToString(keyhash); } /** @@ -72,10 +71,9 @@ public CustomerProvidedKey(byte[] key) { throw logger.logExceptionAsError(new RuntimeException(e)); } byte[] keyhash = sha256.digest(key); - this.keySHA256 = Base64.getEncoder().encodeToString(keyhash); + this.keySha256 = Base64.getEncoder().encodeToString(keyhash); } - /** * Gets the encryption key. * @@ -90,8 +88,8 @@ public String getKey() { * * @return A base64 encoded string of the encryption key hash. */ - public String getKeySHA256() { - return keySHA256; + public String getKeySha256() { + return keySha256; } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java index 69342e634c7e..13323e886e1f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java @@ -15,7 +15,7 @@ public class PageBlobItem { private final String eTag; private final OffsetDateTime lastModified; - private final byte[] contentMD5; + private final byte[] contentMd5; private final Boolean isServerEncrypted; private final String encryptionKeySha256; private final Long blobSequenceNumber; @@ -25,16 +25,16 @@ public class PageBlobItem { * * @param eTag ETag of the page blob. * @param lastModified Last modified time of the page blob. - * @param contentMD5 Content MD5 of the page blob. + * @param contentMd5 Content MD5 of the page blob. * @param isServerEncrypted Flag indicating if the page blob is encrypted on the server. * @param encryptionKeySha256 The encryption key used to encrypt the page blob. * @param blobSequenceNumber The current sequence number for the page blob. */ - public PageBlobItem(final String eTag, final OffsetDateTime lastModified, final byte[] contentMD5, + public PageBlobItem(final String eTag, final OffsetDateTime lastModified, final byte[] contentMd5, final Boolean isServerEncrypted, final String encryptionKeySha256, final Long blobSequenceNumber) { this.eTag = eTag; this.lastModified = lastModified; - this.contentMD5 = ImplUtils.clone(contentMD5); + this.contentMd5 = ImplUtils.clone(contentMd5); this.isServerEncrypted = isServerEncrypted; this.encryptionKeySha256 = encryptionKeySha256; this.blobSequenceNumber = blobSequenceNumber; @@ -71,8 +71,8 @@ public String getEncryptionKeySha256() { /** * @return the MD5 of the page blob's content */ - public byte[] getContentMD5() { - return ImplUtils.clone(contentMD5); + public byte[] getContentMd5() { + return ImplUtils.clone(contentMd5); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 50c28122fde8..983c2c474c97 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -202,7 +202,7 @@ public AppendBlobItem appendBlockFromUrl(String sourceUrl, BlobRange sourceRange * must either be public or must be authenticated via a shared access signature. If the source blob is public, no * authentication is required to perform the operation. * @param sourceRange {@link BlobRange} - * @param sourceContentMD5 An MD5 hash of the block content from the source blob. If specified, the service will + * @param sourceContentMd5 An MD5 hash of the block content from the source blob. If specified, the service will * calculate the MD5 of the received data and fail the request if it does not match the provided MD5. * @param destAccessConditions {@link AppendBlobRequestConditions} * @param sourceAccessConditions {@link BlobRequestConditions} @@ -211,10 +211,10 @@ public AppendBlobItem appendBlockFromUrl(String sourceUrl, BlobRange sourceRange * @return The information of the append blob operation. */ public Response appendBlockFromUrlWithResponse(String sourceUrl, BlobRange sourceRange, - byte[] sourceContentMD5, AppendBlobRequestConditions destAccessConditions, + byte[] sourceContentMd5, AppendBlobRequestConditions destAccessConditions, BlobRequestConditions sourceAccessConditions, Duration timeout, Context context) { Mono> response = appendBlobAsyncClient.appendBlockFromUrlWithResponse(sourceUrl, - sourceRange, sourceContentMD5, destAccessConditions, sourceAccessConditions, context); + sourceRange, sourceContentMd5, destAccessConditions, sourceAccessConditions, context); return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index cafcc7dc5197..fa0ee80e33fb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -368,7 +368,7 @@ public Poller beginCopy(String sourceUrl, Map> onPoll(PollResponse pollR * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURL#String} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromUrl#String} * *

    For more information, see the * Azure Docs

    * - * @see #copyFromURL(String) + * @see #copyFromUrl(String) * @see #beginCopy(String, Duration) * @see #beginCopy(String, Map, AccessTier, RehydratePriority, RequestConditions, BlobRequestConditions, Duration) * @param copyId The id of the copy operation to abort. * @return A reactive response signalling completion. */ - public Mono abortCopyFromURL(String copyId) { + public Mono abortCopyFromUrl(String copyId) { try { - return abortCopyFromURLWithResponse(copyId, null).flatMap(FluxUtil::toMono); + return abortCopyFromUrlWithResponse(copyId, null).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -471,27 +471,27 @@ public Mono abortCopyFromURL(String copyId) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURLWithResponse#String-String} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromUrlWithResponse#String-String} * *

    For more information, see the * Azure Docs

    * - * @see #copyFromURL(String) + * @see #copyFromUrl(String) * @see #beginCopy(String, Duration) * @see #beginCopy(String, Map, AccessTier, RehydratePriority, RequestConditions, BlobRequestConditions, Duration) * @param copyId The id of the copy operation to abort. * @param leaseId The lease ID the active lease on the blob must match. * @return A reactive response signalling completion. */ - public Mono> abortCopyFromURLWithResponse(String copyId, String leaseId) { + public Mono> abortCopyFromUrlWithResponse(String copyId, String leaseId) { try { - return withContext(context -> abortCopyFromURLWithResponse(copyId, leaseId, context)); + return withContext(context -> abortCopyFromUrlWithResponse(copyId, leaseId, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> abortCopyFromURLWithResponse(String copyId, String leaseId, Context context) { + Mono> abortCopyFromUrlWithResponse(String copyId, String leaseId, Context context) { return this.azureBlobStorage.blobs().abortCopyFromURLWithRestResponseAsync( null, null, copyId, null, leaseId, null, context) .map(response -> new SimpleResponse<>(response, null)); @@ -502,7 +502,7 @@ Mono> abortCopyFromURLWithResponse(String copyId, String leaseId, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURL#String} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromUrl#String} * *

    For more information, see the * Azure Docs

    @@ -510,9 +510,9 @@ Mono> abortCopyFromURLWithResponse(String copyId, String leaseId, * @param copySource The source URL to copy from. * @return A reactive response containing the copy ID for the long running operation. */ - public Mono copyFromURL(String copySource) { + public Mono copyFromUrl(String copySource) { try { - return copyFromURLWithResponse(copySource, null, null, null, null).flatMap(FluxUtil::toMono); + return copyFromUrlWithResponse(copySource, null, null, null, null).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -523,7 +523,7 @@ public Mono copyFromURL(String copySource) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURLWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromUrlWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions} * *

    For more information, see the * Azure Docs

    @@ -538,18 +538,20 @@ public Mono copyFromURL(String copySource) { * @param destAccessConditions {@link BlobRequestConditions} against the destination. * @return A reactive response containing the copy ID for the long running operation. */ - public Mono> copyFromURLWithResponse(String copySource, Map metadata, - AccessTier tier, RequestConditions sourceModifiedAccessConditions, BlobRequestConditions destAccessConditions) { + public Mono> copyFromUrlWithResponse(String copySource, Map metadata, + AccessTier tier, RequestConditions sourceModifiedAccessConditions, + BlobRequestConditions destAccessConditions) { try { - return withContext(context -> copyFromURLWithResponse(copySource, metadata, tier, + return withContext(context -> copyFromUrlWithResponse(copySource, metadata, tier, sourceModifiedAccessConditions, destAccessConditions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> copyFromURLWithResponse(String copySource, Map metadata, AccessTier tier, - RequestConditions sourceModifiedAccessConditions, BlobRequestConditions destAccessConditions, Context context) { + Mono> copyFromUrlWithResponse(String copySource, Map metadata, AccessTier tier, + RequestConditions sourceModifiedAccessConditions, BlobRequestConditions destAccessConditions, + Context context) { sourceModifiedAccessConditions = sourceModifiedAccessConditions == null ? new RequestConditions() : sourceModifiedAccessConditions; destAccessConditions = destAccessConditions == null ? new BlobRequestConditions() : destAccessConditions; @@ -636,18 +638,18 @@ Mono>> downloadWithResponse(BlobRange range, ReliableD * * @param range {@link BlobRange} * @param accessConditions {@link BlobRequestConditions} - * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. + * @param rangeGetContentMd5 Whether the content MD5 for the specified blob range should be returned. * @return Emits the successful response. */ Mono download(BlobRange range, BlobRequestConditions accessConditions, - boolean rangeGetContentMD5) { - return withContext(context -> download(range, accessConditions, rangeGetContentMD5, context)); + boolean rangeGetContentMd5) { + return withContext(context -> download(range, accessConditions, rangeGetContentMd5, context)); } Mono download(BlobRange range, BlobRequestConditions accessConditions, - boolean rangeGetContentMD5, Context context) { + boolean rangeGetContentMd5, Context context) { range = range == null ? new BlobRange(0) : range; - Boolean getMD5 = rangeGetContentMD5 ? rangeGetContentMD5 : null; + Boolean getMD5 = rangeGetContentMd5 ? rangeGetContentMd5 : null; accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; HttpGetterInfo info = new HttpGetterInfo() .setOffset(range.getOffset()) @@ -745,7 +747,7 @@ public Mono> downloadToFileWithResponse(String filePath // TODO (gapra) : Investigate if this is can be parallelized, and include the parallelTransfers parameter. Mono> downloadToFileWithResponse(String filePath, BlobRange range, ParallelTransferOptions parallelTransferOptions, ReliableDownloadOptions options, - BlobRequestConditions accessConditions, boolean rangeGetContentMD5, Context context) { + BlobRequestConditions accessConditions, boolean rangeGetContentMd5, Context context) { final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null ? new ParallelTransferOptions() : parallelTransferOptions; @@ -758,19 +760,19 @@ Mono> downloadToFileWithResponse(String filePath, BlobR return Mono.using(() -> downloadToFileResourceSupplier(filePath), channel -> getPropertiesWithResponse(accessConditions) .flatMap(response -> processInRange(channel, response, - range, finalParallelTransferOptions.getBlockSize(), options, accessConditions, rangeGetContentMD5, + range, finalParallelTransferOptions.getBlockSize(), options, accessConditions, rangeGetContentMd5, context, totalProgress, progressLock, progressReceiver)), this::downloadToFileCleanup); } private Mono> processInRange(AsynchronousFileChannel channel, Response blobPropertiesResponse, BlobRange range, Integer blockSize, - ReliableDownloadOptions options, BlobRequestConditions accessConditions, boolean rangeGetContentMD5, + ReliableDownloadOptions options, BlobRequestConditions accessConditions, boolean rangeGetContentMd5, Context context, AtomicLong totalProgress, Lock progressLock, ProgressReceiver progressReceiver) { return Mono.justOrEmpty(range).switchIfEmpty(Mono.just(new BlobRange(0, blobPropertiesResponse.getValue().getBlobSize()))).flatMapMany(rg -> Flux.fromIterable(sliceBlobRange(rg, blockSize))) - .flatMap(chunk -> this.download(chunk, accessConditions, rangeGetContentMD5, context) + .flatMap(chunk -> this.download(chunk, accessConditions, rangeGetContentMd5, context) .subscribeOn(Schedulers.elastic()) .flatMap(dar -> { Flux progressData = ProgressReporter.addParallelProgressReporting( diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 56a8ce314c22..babd7a826b1a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -272,15 +272,15 @@ public Poller beginCopy(String sourceUrl, MapCode Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURL#String} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromUrl#String} * *

    For more information, see the * Azure Docs

    * * @param copyId The id of the copy operation to abort. */ - public void abortCopyFromURL(String copyId) { - abortCopyFromURLWithResponse(copyId, null, null, Context.NONE); + public void abortCopyFromUrl(String copyId) { + abortCopyFromUrlWithResponse(copyId, null, null, Context.NONE); } /** @@ -288,7 +288,7 @@ public void abortCopyFromURL(String copyId) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURLWithResponse#String-String-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromUrlWithResponse#String-String-Duration-Context} * *

    For more information, see the * Azure Docs

    @@ -299,9 +299,9 @@ public void abortCopyFromURL(String copyId) { * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers. */ - public Response abortCopyFromURLWithResponse(String copyId, String leaseId, Duration timeout, - Context context) { - return blockWithOptionalTimeout(client.abortCopyFromURLWithResponse(copyId, leaseId, context), timeout); + public Response abortCopyFromUrlWithResponse(String copyId, String leaseId, Duration timeout, + Context context) { + return blockWithOptionalTimeout(client.abortCopyFromUrlWithResponse(copyId, leaseId, context), timeout); } /** @@ -309,7 +309,7 @@ public Response abortCopyFromURLWithResponse(String copyId, String leaseId * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.copyFromURL#String} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.copyFromUrl#String} * *

    For more information, see the * Azure Docs

    @@ -318,8 +318,8 @@ public Response abortCopyFromURLWithResponse(String copyId, String leaseId * @return The copy ID for the long running operation. * @throws IllegalArgumentException If {@code copySource} is a malformed {@link URL}. */ - public String copyFromURL(String copySource) { - return copyFromURLWithResponse(copySource, null, null, null, null, null, Context.NONE).getValue(); + public String copyFromUrl(String copySource) { + return copyFromUrlWithResponse(copySource, null, null, null, null, null, Context.NONE).getValue(); } /** @@ -327,7 +327,7 @@ public String copyFromURL(String copySource) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.copyFromURLWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.copyFromUrlWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context} * *

    For more information, see the * Azure Docs

    @@ -345,11 +345,11 @@ public String copyFromURL(String copySource) { * @return The copy ID for the long running operation. * @throws IllegalArgumentException If {@code copySource} is a malformed {@link URL}. */ - public Response copyFromURLWithResponse(String copySource, Map metadata, AccessTier tier, - RequestConditions sourceModifiedAccessConditions, BlobRequestConditions destAccessConditions, - Duration timeout, Context context) { + public Response copyFromUrlWithResponse(String copySource, Map metadata, AccessTier tier, + RequestConditions sourceModifiedAccessConditions, BlobRequestConditions destAccessConditions, + Duration timeout, Context context) { Mono> response = client - .copyFromURLWithResponse(copySource, metadata, tier, sourceModifiedAccessConditions, destAccessConditions, + .copyFromUrlWithResponse(copySource, metadata, tier, sourceModifiedAccessConditions, destAccessConditions, context); return blockWithOptionalTimeout(response, timeout); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java index 76a54aab553b..d5dc02b4767d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java @@ -176,7 +176,7 @@ null, headers, getCustomerProvidedKey(), context) *

    * Note that the data passed must be replayable if retries are enabled (the default). In other words, the * - * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block + * @param base64BlockId A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. * @param data The data to write to the block. Note that this {@code Flux} must be replayable if retries are enabled * (the default). In other words, the Flux must produce the same data each time it is subscribed to. @@ -189,9 +189,9 @@ null, headers, getCustomerProvidedKey(), context) * * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlock#String-Flux-long} */ - public Mono stageBlock(String base64BlockID, Flux data, long length) { + public Mono stageBlock(String base64BlockId, Flux data, long length) { try { - return stageBlockWithResponse(base64BlockID, data, length, null).flatMap(FluxUtil::toMono); + return stageBlockWithResponse(base64BlockId, data, length, null).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -209,7 +209,7 @@ public Mono stageBlock(String base64BlockID, Flux data, long l * * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockWithResponse#String-Flux-long-String} * - * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block + * @param base64BlockId A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. * @param data The data to write to the block. Note that this {@code Flux} must be replayable if retries are enabled * (the default). In other words, the Flux must produce the same data each time it is subscribed to. @@ -218,19 +218,19 @@ public Mono stageBlock(String base64BlockID, Flux data, long l * @param leaseId The lease ID the active lease on the blob must match. * @return A reactive response signalling completion. */ - public Mono> stageBlockWithResponse(String base64BlockID, Flux data, long length, + public Mono> stageBlockWithResponse(String base64BlockId, Flux data, long length, String leaseId) { try { - return withContext(context -> stageBlockWithResponse(base64BlockID, data, length, leaseId, context)); + return withContext(context -> stageBlockWithResponse(base64BlockId, data, length, leaseId, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> stageBlockWithResponse(String base64BlockID, Flux data, long length, + Mono> stageBlockWithResponse(String base64BlockId, Flux data, long length, String leaseId, Context context) { return this.azureBlobStorage.blockBlobs().stageBlockWithRestResponseAsync(null, null, - base64BlockID, length, data, null, null, null, leaseId, null, getCustomerProvidedKey(), context) + base64BlockId, length, data, null, null, null, leaseId, null, getCustomerProvidedKey(), context) .map(response -> new SimpleResponse<>(response, null)); } @@ -241,9 +241,9 @@ base64BlockID, length, data, null, null, null, leaseId, null, getCustomerProvide * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURL#String-String-BlobRange} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromUrl#String-String-BlobRange} * - * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block + * @param base64BlockId A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. * @param sourceUrl The url to the blob that will be the source of the copy. A source blob in the same storage * account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob @@ -252,9 +252,9 @@ base64BlockID, length, data, null, null, null, leaseId, null, getCustomerProvide * @param sourceRange {@link BlobRange} * @return A reactive response signalling completion. */ - public Mono stageBlockFromURL(String base64BlockID, String sourceUrl, BlobRange sourceRange) { + public Mono stageBlockFromUrl(String base64BlockId, String sourceUrl, BlobRange sourceRange) { try { - return this.stageBlockFromURLWithResponse(base64BlockID, sourceUrl, sourceRange, null, null, null) + return this.stageBlockFromUrlWithResponse(base64BlockId, sourceUrl, sourceRange, null, null, null) .flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); @@ -263,38 +263,38 @@ public Mono stageBlockFromURL(String base64BlockID, String sourceUrl, Blob /** * Creates a new block to be committed as part of a blob where the contents are read from a URL. For more - * information, see the Azure + * information, see the Azure * Docs. * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromUrlWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions} * - * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block + * @param base64BlockId A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. * @param sourceUrl The url to the blob that will be the source of the copy. A source blob in the same storage * account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob * must either be public or must be authenticated via a shared access signature. If the source blob is public, no * authentication is required to perform the operation. * @param sourceRange {@link BlobRange} - * @param sourceContentMD5 An MD5 hash of the block content from the source blob. If specified, the service will + * @param sourceContentMd5 An MD5 hash of the block content from the source blob. If specified, the service will * calculate the MD5 of the received data and fail the request if it does not match the provided MD5. * @param leaseId The lease ID that the active lease on the blob must match. * @param sourceRequestConditions {@link BlobRequestConditions} * @return A reactive response signalling completion. */ - public Mono> stageBlockFromURLWithResponse(String base64BlockID, String sourceUrl, - BlobRange sourceRange, byte[] sourceContentMD5, String leaseId, BlobRequestConditions sourceRequestConditions) { + public Mono> stageBlockFromUrlWithResponse(String base64BlockId, String sourceUrl, + BlobRange sourceRange, byte[] sourceContentMd5, String leaseId, BlobRequestConditions sourceRequestConditions) { try { - return withContext(context -> stageBlockFromURLWithResponse(base64BlockID, sourceUrl, sourceRange, - sourceContentMD5, leaseId, sourceRequestConditions)); + return withContext(context -> stageBlockFromUrlWithResponse(base64BlockId, sourceUrl, sourceRange, + sourceContentMd5, leaseId, sourceRequestConditions)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> stageBlockFromURLWithResponse(String base64BlockID, String sourceUrl, BlobRange sourceRange, - byte[] sourceContentMD5, String leaseId, BlobRequestConditions sourceRequestConditions, Context context) { + Mono> stageBlockFromUrlWithResponse(String base64BlockId, String sourceUrl, BlobRange sourceRange, + byte[] sourceContentMd5, String leaseId, BlobRequestConditions sourceRequestConditions, Context context) { sourceRange = (sourceRange == null) ? new BlobRange(0) : sourceRange; sourceRequestConditions = (sourceRequestConditions == null) ? new BlobRequestConditions() : sourceRequestConditions; @@ -306,8 +306,8 @@ Mono> stageBlockFromURLWithResponse(String base64BlockID, String throw logger.logExceptionAsError(new IllegalArgumentException("'sourceUrl' is not a valid url.")); } - return this.azureBlobStorage.blockBlobs().stageBlockFromURLWithRestResponseAsync(null, null, base64BlockID, 0, - url, sourceRange.toHeaderValue(), sourceContentMD5, null, null, leaseId, + return this.azureBlobStorage.blockBlobs().stageBlockFromURLWithRestResponseAsync(null, null, base64BlockId, 0, + url, sourceRange.toHeaderValue(), sourceContentMd5, null, null, leaseId, sourceRequestConditions.getIfModifiedSince(), sourceRequestConditions.getIfUnmodifiedSince(), sourceRequestConditions.getIfMatch(), sourceRequestConditions.getIfNoneMatch(), null, getCustomerProvidedKey(), context) @@ -374,12 +374,12 @@ null, null, listType, getSnapshotId(), null, leaseId, null, context) * * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockList#List} * - * @param base64BlockIDs A list of base64 encode {@code String}s that specifies the block IDs to be committed. + * @param base64BlockIds A list of base64 encode {@code String}s that specifies the block IDs to be committed. * @return A reactive response containing the information of the block blob. */ - public Mono commitBlockList(List base64BlockIDs) { + public Mono commitBlockList(List base64BlockIds) { try { - return commitBlockListWithResponse(base64BlockIDs, null, null, null, null).flatMap(FluxUtil::toMono); + return commitBlockListWithResponse(base64BlockIds, null, null, null, null).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -397,31 +397,31 @@ public Mono commitBlockList(List base64BlockIDs) { * * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions} * - * @param base64BlockIDs A list of base64 encode {@code String}s that specifies the block IDs to be committed. + * @param base64BlockIds A list of base64 encode {@code String}s that specifies the block IDs to be committed. * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. * @param accessConditions {@link BlobRequestConditions} * @return A reactive response containing the information of the block blob. */ - public Mono> commitBlockListWithResponse(List base64BlockIDs, - BlobHttpHeaders headers, Map metadata, AccessTier tier, - BlobRequestConditions accessConditions) { + public Mono> commitBlockListWithResponse(List base64BlockIds, + BlobHttpHeaders headers, Map metadata, AccessTier tier, + BlobRequestConditions accessConditions) { try { - return withContext(context -> commitBlockListWithResponse(base64BlockIDs, headers, metadata, tier, + return withContext(context -> commitBlockListWithResponse(base64BlockIds, headers, metadata, tier, accessConditions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> commitBlockListWithResponse(List base64BlockIDs, - BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobRequestConditions accessConditions, - Context context) { + Mono> commitBlockListWithResponse(List base64BlockIds, + BlobHttpHeaders headers, Map metadata, AccessTier tier, + BlobRequestConditions accessConditions, Context context) { accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; return this.azureBlobStorage.blockBlobs().commitBlockListWithRestResponseAsync(null, null, - new BlockLookupList().setLatest(base64BlockIDs), null, null, null, metadata, accessConditions.getLeaseId(), + new BlockLookupList().setLatest(base64BlockIds), null, null, null, metadata, accessConditions.getLeaseId(), tier, accessConditions.getIfModifiedSince(), accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), null, headers, getCustomerProvidedKey(), context) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java index 0ec7f06dcde9..7c6f70f9cead 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java @@ -170,14 +170,14 @@ public Response uploadWithResponse(InputStream data, long length, * * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlock#String-InputStream-long} * - * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block + * @param base64BlockId A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. * @param data The data to write to the block. * @param length The exact length of the data. It is important that this value match precisely the length of the * data provided in the {@link InputStream}. */ - public void stageBlock(String base64BlockID, InputStream data, long length) { - stageBlockWithResponse(base64BlockID, data, length, null, null, Context.NONE); + public void stageBlock(String base64BlockId, InputStream data, long length) { + stageBlockWithResponse(base64BlockId, data, length, null, null, Context.NONE); } /** @@ -189,7 +189,7 @@ public void stageBlock(String base64BlockID, InputStream data, long length) { * * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-String-Duration-Context} * - * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block + * @param base64BlockId A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. * @param data The data to write to the block. * @param length The exact length of the data. It is important that this value match precisely the length of the @@ -201,14 +201,14 @@ public void stageBlock(String base64BlockID, InputStream data, long length) { * @throws UnexpectedLengthException when the length of data does not match the input {@code length}. * @throws NullPointerException if the input data is null. */ - public Response stageBlockWithResponse(String base64BlockID, InputStream data, long length, String leaseId, - Duration timeout, Context context) { + public Response stageBlockWithResponse(String base64BlockId, InputStream data, long length, String leaseId, + Duration timeout, Context context) { Objects.requireNonNull(data); Flux fbb = Utility.convertStreamToByteBuffer(data, length, BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE); Mono> response = client.stageBlockWithResponse( - base64BlockID, fbb.subscribeOn(Schedulers.elastic()), length, leaseId, context); + base64BlockId, fbb.subscribeOn(Schedulers.elastic()), length, leaseId, context); return blockWithOptionalTimeout(response, timeout); } @@ -219,9 +219,9 @@ public Response stageBlockWithResponse(String base64BlockID, InputStream d * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURL#String-String-BlobRange} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromUrl#String-String-BlobRange} * - * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block + * @param base64BlockId A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. * @param sourceUrl The url to the blob that will be the source of the copy. A source blob in the same storage * account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob @@ -230,8 +230,8 @@ public Response stageBlockWithResponse(String base64BlockID, InputStream d * @param sourceRange {@link BlobRange} * @throws IllegalArgumentException If {@code sourceUrl} is a malformed {@link URL}. */ - public void stageBlockFromURL(String base64BlockID, String sourceUrl, BlobRange sourceRange) { - stageBlockFromURLWithResponse(base64BlockID, sourceUrl, sourceRange, null, null, null, null, Context.NONE); + public void stageBlockFromUrl(String base64BlockId, String sourceUrl, BlobRange sourceRange) { + stageBlockFromUrlWithResponse(base64BlockId, sourceUrl, sourceRange, null, null, null, null, Context.NONE); } /** @@ -241,16 +241,16 @@ public void stageBlockFromURL(String base64BlockID, String sourceUrl, BlobRange * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromUrlWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions-Duration-Context} * - * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block + * @param base64BlockId A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. * @param sourceUrl The url to the blob that will be the source of the copy. A source blob in the same storage * account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob * must either be public or must be authenticated via a shared access signature. If the source blob is public, no * authentication is required to perform the operation. * @param sourceRange {@link BlobRange} - * @param sourceContentMD5 An MD5 hash of the block content from the source blob. If specified, the service will + * @param sourceContentMd5 An MD5 hash of the block content from the source blob. If specified, the service will * calculate the MD5 of the received data and fail the request if it does not match the provided MD5. * @param leaseId The lease ID that the active lease on the blob must match. * @param sourceRequestConditions {@link BlobRequestConditions} @@ -259,11 +259,11 @@ public void stageBlockFromURL(String base64BlockID, String sourceUrl, BlobRange * @return A response containing status code and HTTP headers * @throws IllegalArgumentException If {@code sourceUrl} is a malformed {@link URL}. */ - public Response stageBlockFromURLWithResponse(String base64BlockID, String sourceUrl, BlobRange sourceRange, - byte[] sourceContentMD5, String leaseId, - BlobRequestConditions sourceRequestConditions, Duration timeout, Context context) { - Mono> response = client.stageBlockFromURLWithResponse(base64BlockID, sourceUrl, - sourceRange, sourceContentMD5, leaseId, sourceRequestConditions, context); + public Response stageBlockFromUrlWithResponse(String base64BlockId, String sourceUrl, BlobRange sourceRange, + byte[] sourceContentMd5, String leaseId, BlobRequestConditions sourceRequestConditions, Duration timeout, + Context context) { + Mono> response = client.stageBlockFromUrlWithResponse(base64BlockId, sourceUrl, + sourceRange, sourceContentMd5, leaseId, sourceRequestConditions, context); return blockWithOptionalTimeout(response, timeout); } @@ -315,11 +315,11 @@ public Response listBlocksWithResponse(BlockListType listType, String * * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.commitBlockList#List} * - * @param base64BlockIDs A list of base64 encode {@code String}s that specifies the block IDs to be committed. + * @param base64BlockIds A list of base64 encode {@code String}s that specifies the block IDs to be committed. * @return The information of the block blob. */ - public BlockBlobItem commitBlockList(List base64BlockIDs) { - return commitBlockListWithResponse(base64BlockIDs, null, null, null, null, null, Context.NONE).getValue(); + public BlockBlobItem commitBlockList(List base64BlockIds) { + return commitBlockListWithResponse(base64BlockIds, null, null, null, null, null, Context.NONE).getValue(); } /** @@ -334,7 +334,7 @@ public BlockBlobItem commitBlockList(List base64BlockIDs) { * * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.uploadFromFile#List-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration-Context} * - * @param base64BlockIDs A list of base64 encode {@code String}s that specifies the block IDs to be committed. + * @param base64BlockIds A list of base64 encode {@code String}s that specifies the block IDs to be committed. * @param headers {@link BlobHttpHeaders} * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. @@ -343,11 +343,11 @@ public BlockBlobItem commitBlockList(List base64BlockIDs) { * @param context Additional context that is passed through the Http pipeline during the service call. * @return The information of the block blob. */ - public Response commitBlockListWithResponse(List base64BlockIDs, - BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobRequestConditions accessConditions, - Duration timeout, Context context) { + public Response commitBlockListWithResponse(List base64BlockIds, BlobHttpHeaders headers, + Map metadata, AccessTier tier, BlobRequestConditions accessConditions, Duration timeout, + Context context) { Mono> response = client.commitBlockListWithResponse( - base64BlockIDs, headers, metadata, tier, accessConditions, context); + base64BlockIds, headers, metadata, tier, accessConditions, context); return blockWithOptionalTimeout(response, timeout); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java index 762d5b92e29d..4e1ec64ff878 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java @@ -170,7 +170,7 @@ sequenceNumber, null, headers, getCustomerProvidedKey(), context) } /** - * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. For more + * Writes one or more pages to the page blob. The start and end offsets must be a multiple of 512. For more * information, see the * Azure Docs. *

    @@ -197,7 +197,7 @@ public Mono uploadPages(PageRange pageRange, Flux body } /** - * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. For more + * Writes one or more pages to the page blob. The start and end offsets must be a multiple of 512. For more * information, see the * Azure Docs. *

    @@ -256,13 +256,13 @@ Mono> uploadPagesWithResponse(PageRange pageRange, FluxAzure Docs. * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURL#PageRange-String-Long} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromUrl#PageRange-String-Long} * * @param range A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges @@ -275,9 +275,9 @@ Mono> uploadPagesWithResponse(PageRange pageRange, Flux uploadPagesFromURL(PageRange range, String sourceUrl, Long sourceOffset) { + public Mono uploadPagesFromUrl(PageRange range, String sourceUrl, Long sourceOffset) { try { - return uploadPagesFromURLWithResponse(range, sourceUrl, sourceOffset, null, null, null) + return uploadPagesFromUrlWithResponse(range, sourceUrl, sourceOffset, null, null, null) .flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); @@ -285,13 +285,13 @@ public Mono uploadPagesFromURL(PageRange range, String sourceUrl, } /** - * Writes 1 or more pages from the source page blob to this page blob. The start and end offsets must be a multiple - * of 512. For more information, see the + * Writes one or more pages from the source page blob to this page blob. The start and end offsets must be a + * multiple of 512. For more information, see the * Azure Docs. * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromUrlWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions} * * @param range The destination {@link PageRange} range. Given that pages must be aligned with 512-byte boundaries, * the start offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte @@ -301,28 +301,28 @@ public Mono uploadPagesFromURL(PageRange range, String sourceUrl, * must either be public or must be authenticated via a shared access signature. If the source blob is public, no * authentication is required to perform the operation. * @param sourceOffset The source offset to copy from. Pass null or 0 to copy from the beginning of source blob. - * @param sourceContentMD5 An MD5 hash of the block content from the source blob. If specified, the service will + * @param sourceContentMd5 An MD5 hash of the block content from the source blob. If specified, the service will * calculate the MD5 of the received data and fail the request if it does not match the provided MD5. * @param destAccessConditions {@link PageBlobRequestConditions} * @param sourceRequestConditions {@link BlobRequestConditions} * @return A reactive response containing the information of the uploaded pages. * @throws IllegalArgumentException If {@code range} is {@code null} */ - public Mono> uploadPagesFromURLWithResponse(PageRange range, String sourceUrl, - Long sourceOffset, byte[] sourceContentMD5, PageBlobRequestConditions destAccessConditions, - BlobRequestConditions sourceRequestConditions) { + public Mono> uploadPagesFromUrlWithResponse(PageRange range, String sourceUrl, + Long sourceOffset, byte[] sourceContentMd5, PageBlobRequestConditions destAccessConditions, + BlobRequestConditions sourceRequestConditions) { try { return withContext( - context -> uploadPagesFromURLWithResponse(range, sourceUrl, sourceOffset, sourceContentMD5, + context -> uploadPagesFromUrlWithResponse(range, sourceUrl, sourceOffset, sourceContentMd5, destAccessConditions, sourceRequestConditions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> uploadPagesFromURLWithResponse(PageRange range, String sourceUrl, Long sourceOffset, - byte[] sourceContentMD5, PageBlobRequestConditions destAccessConditions, - BlobRequestConditions sourceRequestConditions, Context context) { + Mono> uploadPagesFromUrlWithResponse(PageRange range, String sourceUrl, Long sourceOffset, + byte[] sourceContentMd5, PageBlobRequestConditions destAccessConditions, + BlobRequestConditions sourceRequestConditions, Context context) { if (range == null) { // Throwing is preferred to Single.error because this will error out immediately instead of waiting until // subscription. @@ -351,7 +351,7 @@ Mono> uploadPagesFromURLWithResponse(PageRange range, Str } return this.azureBlobStorage.pageBlobs().uploadPagesFromURLWithRestResponseAsync( - null, null, url, sourceRangeString, 0, rangeString, sourceContentMD5, null, null, + null, null, url, sourceRangeString, 0, rangeString, sourceContentMd5, null, null, destAccessConditions.getLeaseId(), destAccessConditions.getIfSequenceNumberLessThanOrEqualTo(), destAccessConditions.getIfSequenceNumberLessThan(), destAccessConditions.getIfSequenceNumberEqualTo(), destAccessConditions.getIfModifiedSince(), destAccessConditions.getIfUnmodifiedSince(), diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index 661c89c6199d..61ca21eb7503 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -141,7 +141,7 @@ public Response createWithResponse(long size, Long sequenceNumber, } /** - * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. For more + * Writes one or more pages to the page blob. The start and end offsets must be a multiple of 512. For more * information, see the * Azure Docs. *

    @@ -163,7 +163,7 @@ public PageBlobItem uploadPages(PageRange pageRange, InputStream body) { } /** - * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. For more + * Writes one or more pages to the page blob. The start and end offsets must be a multiple of 512. For more * information, see the * Azure Docs. *

    @@ -198,13 +198,13 @@ public Response uploadPagesWithResponse(PageRange pageRange, Input } /** - * Writes 1 or more pages from the source page blob to this page blob. The start and end offsets must be a multiple - * of 512. For more information, see the + * Writes one or more pages from the source page blob to this page blob. The start and end offsets must be a + * multiple of 512. For more information, see the * Azure Docs. * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURL#PageRange-String-Long} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromUrl#PageRange-String-Long} * * @param range A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges @@ -218,19 +218,19 @@ public Response uploadPagesWithResponse(PageRange pageRange, Input * @return The information of the uploaded pages. * @throws IllegalArgumentException If {@code sourceUrl} is a malformed {@link URL}. */ - public PageBlobItem uploadPagesFromURL(PageRange range, String sourceUrl, Long sourceOffset) { - return uploadPagesFromURLWithResponse(range, sourceUrl, sourceOffset, null, null, null, null, Context.NONE) + public PageBlobItem uploadPagesFromUrl(PageRange range, String sourceUrl, Long sourceOffset) { + return uploadPagesFromUrlWithResponse(range, sourceUrl, sourceOffset, null, null, null, null, Context.NONE) .getValue(); } /** - * Writes 1 or more pages from the source page blob to this page blob. The start and end offsets must be a multiple - * of 512. For more information, see the + * Writes one or more pages from the source page blob to this page blob. The start and end offsets must be a + * multiple of 512. For more information, see the * Azure Docs. * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromUrlWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions-Duration-Context} * * @param range The destination {@link PageRange} range. Given that pages must be aligned with 512-byte boundaries, * the start offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte @@ -240,7 +240,7 @@ public PageBlobItem uploadPagesFromURL(PageRange range, String sourceUrl, Long s * must either be public or must be authenticated via a shared access signature. If the source blob is public, no * authentication is required to perform the operation. * @param sourceOffset The source offset to copy from. Pass null or 0 to copy from the beginning of source blob. - * @param sourceContentMD5 An MD5 hash of the block content from the source blob. If specified, the service will + * @param sourceContentMd5 An MD5 hash of the block content from the source blob. If specified, the service will * calculate the MD5 of the received data and fail the request if it does not match the provided MD5. * @param destAccessConditions {@link PageBlobRequestConditions} * @param sourceRequestConditions {@link BlobRequestConditions} @@ -249,12 +249,12 @@ public PageBlobItem uploadPagesFromURL(PageRange range, String sourceUrl, Long s * @return The information of the uploaded pages. * @throws IllegalArgumentException If {@code sourceUrl} is a malformed {@link URL}. */ - public Response uploadPagesFromURLWithResponse(PageRange range, String sourceUrl, Long sourceOffset, - byte[] sourceContentMD5, PageBlobRequestConditions destAccessConditions, + public Response uploadPagesFromUrlWithResponse(PageRange range, String sourceUrl, Long sourceOffset, + byte[] sourceContentMd5, PageBlobRequestConditions destAccessConditions, BlobRequestConditions sourceRequestConditions, Duration timeout, Context context) { - Mono> response = pageBlobAsyncClient.uploadPagesFromURLWithResponse(range, sourceUrl, - sourceOffset, sourceContentMD5, destAccessConditions, sourceRequestConditions, context); + Mono> response = pageBlobAsyncClient.uploadPagesFromUrlWithResponse(range, sourceUrl, + sourceOffset, sourceContentMd5, destAccessConditions, sourceRequestConditions, context); return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java index beae1e024a68..43adc25583f8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java @@ -317,7 +317,7 @@ public SpecializedBlobClientBuilder customerProvidedKey(CustomerProvidedKey cust } else { this.customerProvidedKey = new CpkInfo() .setEncryptionKey(customerProvidedKey.getKey()) - .setEncryptionKeySha256(customerProvidedKey.getKeySHA256()) + .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) .setEncryptionAlgorithm(customerProvidedKey.getEncryptionAlgorithm()); } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java index da2babb11e13..7b5651fb8df6 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java @@ -51,20 +51,20 @@ public void existsCodeSnippet() { } /** - * Code snippets for {@link BlobAsyncClient#abortCopyFromURL(String)} + * Code snippets for {@link BlobAsyncClient#abortCopyFromUrl(String)} */ - public void abortCopyFromURLCodeSnippet() { + public void abortCopyFromUrlCodeSnippet() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURL#String - client.abortCopyFromURL(copyId).doOnSuccess(response -> System.out.println("Aborted copy from URL")); + client.abortCopyFromUrl(copyId).doOnSuccess(response -> System.out.println("Aborted copy from URL")); // END: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURL#String } /** - * Code snippets for {@link BlobAsyncClient#copyFromURL(String)} + * Code snippets for {@link BlobAsyncClient#copyFromUrl(String)} */ - public void copyFromURLCodeSnippet() { + public void copyFromUrlCodeSnippet() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.copyFromURL#String - client.copyFromURL(url).subscribe(response -> System.out.printf("Copy identifier: %s%n", response)); + client.copyFromUrl(url).subscribe(response -> System.out.printf("Copy identifier: %s%n", response)); // END: com.azure.storage.blob.BlobAsyncClient.copyFromURL#String } @@ -216,32 +216,32 @@ public void existsWithResponseCodeSnippet() { } /** - * Code snippets for {@link BlobAsyncClient#abortCopyFromURLWithResponse(String, String)} + * Code snippets for {@link BlobAsyncClient#abortCopyFromUrlWithResponse(String, String)} */ - public void abortCopyFromURLWithResponseCodeSnippets() { + public void abortCopyFromUrlWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURLWithResponse#String-String - client.abortCopyFromURLWithResponse(copyId, leaseId) + // BEGIN: com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrlWithResponse#String-String + client.abortCopyFromUrlWithResponse(copyId, leaseId) .subscribe( response -> System.out.printf("Aborted copy completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURLWithResponse#String-String + // END: com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrlWithResponse#String-String } /** - * Code snippets for {@link BlobAsyncClient#copyFromURLWithResponse(String, Map, AccessTier, + * Code snippets for {@link BlobAsyncClient#copyFromUrlWithResponse(String, Map, AccessTier, * RequestConditions, BlobRequestConditions)} */ - public void copyFromURLWithResponseCodeSnippets() { + public void copyFromUrlWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobAsyncClient.copyFromURLWithResponse#String-Metadata-AccessTier-RequestConditions-BlobRequestConditions + // BEGIN: com.azure.storage.blob.BlobAsyncClient.copyFromUrlWithResponse#String-Metadata-AccessTier-RequestConditions-BlobRequestConditions Map metadata = Collections.singletonMap("metadata", "value"); RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); - client.copyFromURLWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, blobRequestConditions) + client.copyFromUrlWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, blobRequestConditions) .subscribe(response -> System.out.printf("Copy identifier: %s%n", response)); - // END: com.azure.storage.blob.BlobAsyncClient.copyFromURLWithResponse#String-Metadata-AccessTier-RequestConditions-BlobRequestConditions + // END: com.azure.storage.blob.BlobAsyncClient.copyFromUrlWithResponse#String-Metadata-AccessTier-RequestConditions-BlobRequestConditions } /** @@ -398,7 +398,7 @@ public void upload3() { .setNumBuffers(numBuffers); client.upload(data, parallelTransferOptions).subscribe(response -> System.out.printf("Uploaded BlockBlob MD5 is %s%n", - Base64.getEncoder().encodeToString(response.getContentMD5()))); + Base64.getEncoder().encodeToString(response.getContentMd5()))); // END: com.azure.storage.blob.BlobAsyncClient.upload#Flux-ParallelTransferOptions } @@ -423,7 +423,7 @@ public void upload4() { client.uploadWithResponse(data, parallelTransferOptions, headers, metadata, AccessTier.HOT, accessConditions) .subscribe(response -> System.out.printf("Uploaded BlockBlob MD5 is %s%n", - Base64.getEncoder().encodeToString(response.getValue().getContentMD5()))); + Base64.getEncoder().encodeToString(response.getValue().getContentMd5()))); // END: com.azure.storage.blob.BlobAsyncClient.uploadWithResponse#Flux-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions } @@ -450,7 +450,7 @@ public void upload5() { client.uploadWithResponse(data, parallelTransferOptions, headers, metadata, AccessTier.HOT, accessConditions) .subscribe(response -> System.out.printf("Uploaded BlockBlob MD5 is %s%n", - Base64.getEncoder().encodeToString(response.getValue().getContentMD5()))); + Base64.getEncoder().encodeToString(response.getValue().getContentMd5()))); // END: com.azure.storage.blob.BlobAsyncClient.uploadWithResponse#Flux-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions.ProgressReporter } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java index 6fe3030aff5f..17547007949e 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java @@ -55,22 +55,22 @@ public void existsCodeSnippet() { } /** - * Code snippets for {@link BlobClient#abortCopyFromURL(String)} + * Code snippets for {@link BlobClient#abortCopyFromUrl(String)} */ - public void abortCopyFromURL() { - // BEGIN: com.azure.storage.blob.BlobClient.abortCopyFromURL#String - client.abortCopyFromURL(copyId); + public void abortCopyFromUrl() { + // BEGIN: com.azure.storage.blob.BlobClient.abortCopyFromUrl#String + client.abortCopyFromUrl(copyId); System.out.println("Aborted copy completed."); - // END: com.azure.storage.blob.BlobClient.abortCopyFromURL#String + // END: com.azure.storage.blob.BlobClient.abortCopyFromUrl#String } /** - * Code snippets for {@link BlobClient#copyFromURL(String)} + * Code snippets for {@link BlobClient#copyFromUrl(String)} */ - public void copyFromURL() { - // BEGIN: com.azure.storage.blob.BlobClient.copyFromURL#String - System.out.printf("Copy identifier: %s%n", client.copyFromURL(url)); - // END: com.azure.storage.blob.BlobClient.copyFromURL#String + public void copyFromUrl() { + // BEGIN: com.azure.storage.blob.BlobClient.copyFromUrl#String + System.out.printf("Copy identifier: %s%n", client.copyFromUrl(url)); + // END: com.azure.storage.blob.BlobClient.copyFromUrl#String } /** @@ -196,34 +196,34 @@ public void existsWithResponseCodeSnippet() { } /** - * Code snippets for {@link BlobClient#abortCopyFromURLWithResponse(String, String, Duration, Context)} + * Code snippets for {@link BlobClient#abortCopyFromUrlWithResponse(String, String, Duration, Context)} */ - public void abortCopyFromURLWithResponseCodeSnippets() { + public void abortCopyFromUrlWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobClient.abortCopyFromURLWithResponse#String-String-Duration-Context + // BEGIN: com.azure.storage.blob.BlobClient.abortCopyFromUrlWithResponse#String-String-Duration-Context System.out.printf("Aborted copy completed with status %d%n", - client.abortCopyFromURLWithResponse(copyId, leaseId, timeout, + client.abortCopyFromUrlWithResponse(copyId, leaseId, timeout, new Context(key2, value2)).getStatusCode()); - // END: com.azure.storage.blob.BlobClient.abortCopyFromURLWithResponse#String-String-Duration-Context + // END: com.azure.storage.blob.BlobClient.abortCopyFromUrlWithResponse#String-String-Duration-Context } /** - * Code snippets for {@link BlobClient#copyFromURLWithResponse(String, Map, AccessTier, RequestConditions, + * Code snippets for {@link BlobClient#copyFromUrlWithResponse(String, Map, AccessTier, RequestConditions, * BlobRequestConditions, Duration, Context)} */ - public void copyFromURLWithResponseCodeSnippets() { + public void copyFromUrlWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobClient.copyFromURLWithResponse#String-Metadata-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context + // BEGIN: com.azure.storage.blob.BlobClient.copyFromUrlWithResponse#String-Metadata-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context Map metadata = Collections.singletonMap("metadata", "value"); RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); System.out.printf("Copy identifier: %s%n", - client.copyFromURLWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, + client.copyFromUrlWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, blobRequestConditions, timeout, new Context(key1, value1)).getValue()); - // END: com.azure.storage.blob.BlobClient.copyFromURLWithResponse#String-Metadata-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context + // END: com.azure.storage.blob.BlobClient.copyFromUrlWithResponse#String-Metadata-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java index cb4ad456f6ba..fe0c808741e3 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java @@ -56,21 +56,21 @@ public void beginCopyCodeSnippet() { } /** - * Code snippets for {@link BlobAsyncClientBase#abortCopyFromURL(String)} + * Code snippets for {@link BlobAsyncClientBase#abortCopyFromUrl(String)} */ - public void abortCopyFromURLCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURL#String - client.abortCopyFromURL(copyId).doOnSuccess(response -> System.out.println("Aborted copy from URL")); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURL#String + public void abortCopyFromUrlCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromUrl#String + client.abortCopyFromUrl(copyId).doOnSuccess(response -> System.out.println("Aborted copy from URL")); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromUrl#String } /** - * Code snippets for {@link BlobAsyncClientBase#copyFromURL(String)} + * Code snippets for {@link BlobAsyncClientBase#copyFromUrl(String)} */ - public void copyFromURLCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURL#String - client.copyFromURL(url).subscribe(response -> System.out.printf("Copy identifier: %s%n", response)); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURL#String + public void copyFromUrlCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromUrl#String + client.copyFromUrl(url).subscribe(response -> System.out.printf("Copy identifier: %s%n", response)); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromUrl#String } /** @@ -262,31 +262,31 @@ public void beginCopyFromUrlCancelCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClientBase#abortCopyFromURLWithResponse(String, String)} + * Code snippets for {@link BlobAsyncClientBase#abortCopyFromUrlWithResponse(String, String)} */ - public void abortCopyFromURLWithResponseCodeSnippets() { + public void abortCopyFromUrlWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURLWithResponse#String-String - client.abortCopyFromURLWithResponse(copyId, leaseId) + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromUrlWithResponse#String-String + client.abortCopyFromUrlWithResponse(copyId, leaseId) .subscribe(response -> System.out.printf("Aborted copy completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURLWithResponse#String-String + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromUrlWithResponse#String-String } /** * Code snippets for {@link BlobAsyncClientBase#copyFromURLWithResponse(String, Map, AccessTier, * RequestConditions, BlobRequestConditions)} */ - public void copyFromURLWithResponseCodeSnippets() { + public void copyFromUrlWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURLWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromUrlWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions Map metadata = Collections.singletonMap("metadata", "value"); RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); - client.copyFromURLWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, blobRequestConditions) + client.copyFromUrlWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, blobRequestConditions) .subscribe(response -> System.out.printf("Copy identifier: %s%n", response)); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURLWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromUrlWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java index ae4580e32a92..e80235c1d322 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java @@ -56,7 +56,7 @@ public void existsCodeSnippet() { /** * Code snippets for {@link BlobClientBase#beginCopy(String, Duration)} */ - public void startCopyFromURL() { + public void beginCopy() { // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.beginCopy#String-Duration final Poller poller = client.beginCopy(url, Duration.ofSeconds(2)); poller.getObserver().subscribe(response -> { @@ -66,22 +66,22 @@ public void startCopyFromURL() { } /** - * Code snippets for {@link BlobClientBase#abortCopyFromURL(String)} + * Code snippets for {@link BlobClientBase#abortCopyFromUrl(String)} */ - public void abortCopyFromURL() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURL#String - client.abortCopyFromURL(copyId); + public void abortCopyFromUrl() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromUrl#String + client.abortCopyFromUrl(copyId); System.out.println("Aborted copy completed."); - // END: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURL#String + // END: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromUrl#String } /** - * Code snippets for {@link BlobClientBase#copyFromURL(String)} + * Code snippets for {@link BlobClientBase#copyFromUrl(String)} */ - public void copyFromURL() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.copyFromURL#String - System.out.printf("Copy identifier: %s%n", client.copyFromURL(url)); - // END: com.azure.storage.blob.specialized.BlobClientBase.copyFromURL#String + public void copyFromUrl() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.copyFromUrl#String + System.out.printf("Copy identifier: %s%n", client.copyFromUrl(url)); + // END: com.azure.storage.blob.specialized.BlobClientBase.copyFromUrl#String } /** @@ -226,34 +226,34 @@ public void beginCopyFromUrl() { } /** - * Code snippets for {@link BlobClientBase#abortCopyFromURLWithResponse(String, String, Duration, Context)} + * Code snippets for {@link BlobClientBase#abortCopyFromUrlWithResponse(String, String, Duration, Context)} */ - public void abortCopyFromURLWithResponseCodeSnippets() { + public void abortCopyFromUrlWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURLWithResponse#String-String-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromUrlWithResponse#String-String-Duration-Context System.out.printf("Aborted copy completed with status %d%n", - client.abortCopyFromURLWithResponse(copyId, leaseId, timeout, + client.abortCopyFromUrlWithResponse(copyId, leaseId, timeout, new Context(key2, value2)).getStatusCode()); - // END: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURLWithResponse#String-String-Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromUrlWithResponse#String-String-Duration-Context } /** * Code snippets for {@link BlobClientBase#copyFromURLWithResponse(String, Map, AccessTier, RequestConditions, * BlobRequestConditions, Duration, Context)} */ - public void copyFromURLWithResponseCodeSnippets() { + public void copyFromUrlWithResponseCodeSnippets() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.copyFromURLWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.copyFromUrlWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context Map metadata = Collections.singletonMap("metadata", "value"); RequestConditions modifiedAccessConditions = new RequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId); System.out.printf("Copy identifier: %s%n", - client.copyFromURLWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, + client.copyFromUrlWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, blobRequestConditions, timeout, new Context(key1, value1)).getValue()); - // END: com.azure.storage.blob.specialized.BlobClientBase.copyFromURLWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.copyFromUrlWithResponse#String-Map-AccessTier-RequestConditions-BlobRequestConditions-Duration-Context } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java index 91da826d8325..a9dbe2e84c87 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java @@ -40,7 +40,7 @@ public void upload() { // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.upload#Flux-long client.upload(data, length).subscribe(response -> System.out.printf("Uploaded BlockBlob MD5 is %s%n", - Base64.getEncoder().encodeToString(response.getContentMD5()))); + Base64.getEncoder().encodeToString(response.getContentMd5()))); // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.upload#Flux-long } @@ -61,7 +61,7 @@ public void upload2() { client.uploadWithResponse(data, length, headers, metadata, AccessTier.HOT, accessConditions) .subscribe(response -> System.out.printf("Uploaded BlockBlob MD5 is %s%n", - Base64.getEncoder().encodeToString(response.getValue().getContentMD5()))); + Base64.getEncoder().encodeToString(response.getValue().getContentMd5()))); // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.uploadWithResponse#Flux-long-BlobHttpHeaders-Map-AccessTier-BlobAccessConditions } @@ -88,29 +88,29 @@ public void stageBlock2() { } /** - * Code snippet for {@link BlockBlobAsyncClient#stageBlockFromURL(String, String, BlobRange)} + * Code snippet for {@link BlockBlobAsyncClient#stageBlockFromUrl(String, String, BlobRange)} */ - public void stageBlockFromURL() { - // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURL#String-String-BlobRange - client.stageBlockFromURL(base64BlockID, sourceUrl, new BlobRange(offset, count)) + public void stageBlockFromUrlCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromUrl#String-String-BlobRange + client.stageBlockFromUrl(base64BlockID, sourceUrl, new BlobRange(offset, count)) .subscribe( response -> System.out.println("Staging block completed"), error -> System.out.printf("Error when calling stage Block: %s", error)); - // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURL#String-String-BlobRange + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromUrl#String-String-BlobRange } /** - * Code snippet for {@link BlockBlobAsyncClient#stageBlockFromURLWithResponse(String, String, BlobRange, byte[], String, BlobRequestConditions)} + * Code snippet for {@link BlockBlobAsyncClient#stageBlockFromUrlWithResponse(String, String, BlobRange, byte[], String, BlobRequestConditions)} */ - public void stageBlockFromURL2() { - // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions + public void stageBlockFromUrl2() { + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromUrlWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions BlobRequestConditions sourceRequestConditions = new BlobRequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); - client.stageBlockFromURLWithResponse(base64BlockID, sourceUrl, new BlobRange(offset, count), null, + client.stageBlockFromUrlWithResponse(base64BlockID, sourceUrl, new BlobRange(offset, count), null, leaseId, sourceRequestConditions).subscribe(response -> System.out.printf("Staging block from URL completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromUrlWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java index fc4cbb9182bc..f08226e1b8dd 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java @@ -32,7 +32,7 @@ public class BlockBlobClientJavaDocCodeSnippets { private long length = 4L; private Duration timeout = Duration.ofSeconds(30); private String leaseId = "leaseId"; - private String base64BlockID = "base64BlockID"; + private String base64BlockId = "base64BlockID"; private String sourceUrl = "https://example.com"; private long offset = 1024L; private long count = length; @@ -45,7 +45,7 @@ public class BlockBlobClientJavaDocCodeSnippets { public void upload() throws IOException { // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.upload#InputStream-long System.out.printf("Uploaded BlockBlob MD5 is %s%n", - Base64.getEncoder().encodeToString(client.upload(data, length).getContentMD5())); + Base64.getEncoder().encodeToString(client.upload(data, length).getContentMd5())); // END: com.azure.storage.blob.specialized.BlockBlobClient.upload#InputStream-long } @@ -69,7 +69,7 @@ public void upload2() { .encodeToString(client.uploadWithResponse(data, length, headers, metadata, AccessTier.HOT, accessConditions, timeout, context) .getValue() - .getContentMD5())); + .getContentMd5())); // END: com.azure.storage.blob.specialized.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration-Context } @@ -78,7 +78,7 @@ public void upload2() { */ public void stageBlock() { // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlock#String-InputStream-long - client.stageBlock(base64BlockID, data, length); + client.stageBlock(base64BlockId, data, length); // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlock#String-InputStream-long } @@ -89,32 +89,32 @@ public void stageBlock2() { // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-String-Duration-Context Context context = new Context("key", "value"); System.out.printf("Staging block completed with status %d%n", - client.stageBlockWithResponse(base64BlockID, data, length, leaseId, timeout, context).getStatusCode()); + client.stageBlockWithResponse(base64BlockId, data, length, leaseId, timeout, context).getStatusCode()); // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-String-Duration-Context } /** - * Code snippet for {@link BlockBlobClient#stageBlockFromURL(String, String, BlobRange)} + * Code snippet for {@link BlockBlobClient#stageBlockFromUrl(String, String, BlobRange)} */ - public void stageBlockFromURL() { - // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURL#String-String-BlobRange - client.stageBlockFromURL(base64BlockID, sourceUrl, new BlobRange(offset, count)); - // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURL#String-String-BlobRange + public void stageBlockFromUrl() { + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromUrl#String-String-BlobRange + client.stageBlockFromUrl(base64BlockId, sourceUrl, new BlobRange(offset, count)); + // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromUrl#String-String-BlobRange } /** - * Code snippet for {@link BlockBlobClient#stageBlockFromURLWithResponse(String, String, BlobRange, byte[], String, BlobRequestConditions, Duration, Context)} + * Code snippet for {@link BlockBlobClient#stageBlockFromUrlWithResponse(String, String, BlobRange, byte[], String, BlobRequestConditions, Duration, Context)} */ - public void stageBlockFromURL2() { - // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions-Duration-Context + public void stageBlockFromUrl2() { + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromUrlWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions-Duration-Context BlobRequestConditions sourceRequestConditions = new BlobRequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); Context context = new Context("key", "value"); System.out.printf("Staging block from URL completed with status %d%n", - client.stageBlockFromURLWithResponse(base64BlockID, sourceUrl, new BlobRange(offset, count), null, + client.stageBlockFromUrlWithResponse(base64BlockId, sourceUrl, new BlobRange(offset, count), null, leaseId, sourceRequestConditions, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURLWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromUrlWithResponse#String-String-BlobRange-byte-String-BlobRequestConditions-Duration-Context } /** @@ -154,7 +154,7 @@ public void listBlocks2() { public void commitBlockList() { // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.commitBlockList#List System.out.printf("Committing block list completed. Last modified: %s%n", - client.commitBlockList(Collections.singletonList(base64BlockID)).getLastModified()); + client.commitBlockList(Collections.singletonList(base64BlockId)).getLastModified()); // END: com.azure.storage.blob.specialized.BlockBlobClient.commitBlockList#List } @@ -175,7 +175,7 @@ public void commitBlockList2() { Context context = new Context("key", "value"); System.out.printf("Committing block list completed with status %d%n", - client.commitBlockListWithResponse(Collections.singletonList(base64BlockID), headers, metadata, + client.commitBlockListWithResponse(Collections.singletonList(base64BlockId), headers, metadata, AccessTier.HOT, accessConditions, timeout, context).getStatusCode()); // END: com.azure.storage.blob.specialized.BlockBlobClient.uploadFromFile#List-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions-Duration-Context } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java index bdbcd06d68c2..b5d6e21c9f38 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java @@ -99,26 +99,26 @@ public void uploadPagesWithResponseCodeSnippet() { } /** - * Code snippets for {@link PageBlobAsyncClient#uploadPagesFromURL(PageRange, String, Long)} + * Code snippets for {@link PageBlobAsyncClient#uploadPagesFromUrl(PageRange, String, Long)} */ - public void uploadPagesFromURLCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURL#PageRange-String-Long + public void uploadPagesFromUrl() { + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromUrl#PageRange-String-Long PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); - client.uploadPagesFromURL(pageRange, url, sourceOffset) + client.uploadPagesFromUrl(pageRange, url, sourceOffset) .subscribe(response -> System.out.printf( "Uploaded page blob from URL with sequence number %s%n", response.getBlobSequenceNumber())); - // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURL#PageRange-String-Long + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromUrl#PageRange-String-Long } /** * Code snippets for {@link PageBlobAsyncClient#uploadPagesFromURLWithResponse(PageRange, String, Long, byte[], * PageBlobRequestConditions, BlobRequestConditions)} */ - public void uploadPagesFromURLWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions + public void uploadPagesFromUrlWithResponseCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromUrlWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); @@ -128,11 +128,11 @@ public void uploadPagesFromURLWithResponseCodeSnippet() { BlobRequestConditions sourceAccessConditions = new BlobRequestConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); - client.uploadPagesFromURLWithResponse(pageRange, url, sourceOffset, sourceContentMD5, pageBlobRequestConditions, + client.uploadPagesFromUrlWithResponse(pageRange, url, sourceOffset, sourceContentMD5, pageBlobRequestConditions, sourceAccessConditions) .subscribe(response -> System.out.printf( "Uploaded page blob from URL with sequence number %s%n", response.getValue().getBlobSequenceNumber())); - // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromUrlWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java index bbcc2322c2b1..ef60b7ee3b8d 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java @@ -106,26 +106,26 @@ public void uploadPagesWithResponseCodeSnippet() { } /** - * Code snippets for {@link PageBlobClient#uploadPagesFromURL(PageRange, String, Long)} + * Code snippets for {@link PageBlobClient#uploadPagesFromUrl(PageRange, String, Long)} */ public void uploadPagesFromURLCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURL#PageRange-String-Long + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromUrl#PageRange-String-Long PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); - PageBlobItem pageBlob = client.uploadPagesFromURL(pageRange, url, sourceOffset); + PageBlobItem pageBlob = client.uploadPagesFromUrl(pageRange, url, sourceOffset); System.out.printf("Uploaded page blob from URL with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURL#PageRange-String-Long + // END: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromUrl#PageRange-String-Long } /** - * Code snippets for {@link PageBlobClient#uploadPagesFromURLWithResponse(PageRange, String, Long, byte[], + * Code snippets for {@link PageBlobClient#uploadPagesFromUrlWithResponse(PageRange, String, Long, byte[], * PageBlobRequestConditions, BlobRequestConditions, Duration, Context)} */ - public void uploadPagesFromURLWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions-Duration-Context + public void uploadPagesFromUrlWithResponseCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromUrlWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions-Duration-Context PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); @@ -137,11 +137,11 @@ public void uploadPagesFromURLWithResponseCodeSnippet() { Context context = new Context(key, value); PageBlobItem pageBlob = client - .uploadPagesFromURLWithResponse(pageRange, url, sourceOffset, sourceContentMD5, pageBlobRequestConditions, + .uploadPagesFromUrlWithResponse(pageRange, url, sourceOffset, sourceContentMD5, pageBlobRequestConditions, sourceAccessConditions, timeout, context).getValue(); System.out.printf("Uploaded page blob from URL with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromUrlWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions-Duration-Context } /** diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index 9e4e66cbeb9d..c99dc35509d9 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -651,7 +651,7 @@ class APISpec extends Specification { response.getValue().getContentDisposition() == contentDisposition && response.getValue().getContentEncoding() == contentEncoding && response.getValue().getContentLanguage() == contentLanguage && - response.getValue().getContentMD5() == contentMD5 && + response.getValue().getContentMd5() == contentMD5 && response.getHeaders().getValue("Content-Type") == contentType } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy index c92a97d26322..c2277dfcf436 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy @@ -306,7 +306,7 @@ class BlobAPITest extends APISpec { properties.getLeaseStatus() == LeaseStatusType.UNLOCKED properties.getBlobSize() >= 0 properties.getContentType() != null - properties.getContentMD5() != null + properties.getContentMd5() != null properties.getContentEncoding() == null // tested in "set HTTP headers" properties.getContentDisposition() == null // tested in "set HTTP headers" properties.getContentLanguage() == null // tested in "set HTTP headers" @@ -843,7 +843,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) when: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, mac, null, null, null) + bu2.copyFromUrlWithResponse(bc.getBlobUrl(), null, null, mac, null, null, null) then: thrown(BlobStorageException) @@ -903,7 +903,7 @@ class BlobAPITest extends APISpec { .setIfUnmodifiedSince(unmodified) when: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null) + bu2.copyFromUrlWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null) then: thrown(BlobStorageException) @@ -942,7 +942,7 @@ class BlobAPITest extends APISpec { assert response.getStatus() != PollResponse.OperationStatus.FAILED def blobCopyInfo = response.getValue() - bu2.abortCopyFromURLWithResponse(blobCopyInfo.getCopyId(), garbageLeaseID, null, null) + bu2.abortCopyFromUrlWithResponse(blobCopyInfo.getCopyId(), garbageLeaseID, null, null) then: def e = thrown(BlobStorageException) @@ -973,7 +973,7 @@ class BlobAPITest extends APISpec { assert lastResponse != null assert lastResponse.getValue() != null - def response = bu2.abortCopyFromURLWithResponse(lastResponse.getValue().getCopyId(), null, null, null) + def response = bu2.abortCopyFromUrlWithResponse(lastResponse.getValue().getCopyId(), null, null, null) def headers = response.getHeaders() then: @@ -1012,7 +1012,7 @@ class BlobAPITest extends APISpec { lastResponse.getValue() != null def copyId = lastResponse.getValue().getCopyId() - bu2.abortCopyFromURLWithResponse(copyId, leaseId, null, null).getStatusCode() == 204 + bu2.abortCopyFromUrlWithResponse(copyId, leaseId, null, null).getStatusCode() == 204 cleanup: // Normal test cleanup will not clean up containers in the alternate account. @@ -1024,7 +1024,7 @@ class BlobAPITest extends APISpec { bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - bc.copyFromURL("http://www.error.com") + bc.copyFromUrl("http://www.error.com") then: thrown(BlobStorageException) @@ -1035,7 +1035,7 @@ class BlobAPITest extends APISpec { bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - bc.abortCopyFromURL("id") + bc.abortCopyFromUrl("id") then: thrown(BlobStorageException) @@ -1048,7 +1048,7 @@ class BlobAPITest extends APISpec { def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - def headers = bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null).getHeaders() + def headers = bu2.copyFromUrlWithResponse(bc.getBlobUrl(), null, null, null, null, null, null).getHeaders() then: headers.getValue("x-ms-copy-status") == SyncCopyStatusType.SUCCESS.toString() @@ -1062,7 +1062,7 @@ class BlobAPITest extends APISpec { def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() expect: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null).getStatusCode() == 202 + bu2.copyFromUrlWithResponse(bc.getBlobUrl(), null, null, null, null, null, null).getStatusCode() == 202 } @Unroll @@ -1079,7 +1079,7 @@ class BlobAPITest extends APISpec { } when: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), metadata, null, null, null, null, null) + bu2.copyFromUrlWithResponse(bc.getBlobUrl(), metadata, null, null, null, null, null) then: bu2.getProperties().getMetadata() == metadata @@ -1103,7 +1103,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) expect: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, mac, null, null, null).getStatusCode() == 202 + bu2.copyFromUrlWithResponse(bc.getBlobUrl(), null, null, mac, null, null, null).getStatusCode() == 202 where: modified | unmodified | match | noneMatch @@ -1127,7 +1127,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) when: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, mac, null, null, null) + bu2.copyFromUrlWithResponse(bc.getBlobUrl(), null, null, mac, null, null, null) then: thrown(BlobStorageException) @@ -1156,7 +1156,7 @@ class BlobAPITest extends APISpec { .setIfUnmodifiedSince(unmodified) expect: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null).getStatusCode() == 202 + bu2.copyFromUrlWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null).getStatusCode() == 202 where: modified | unmodified | match | noneMatch | leaseID @@ -1184,7 +1184,7 @@ class BlobAPITest extends APISpec { .setIfUnmodifiedSince(unmodified) when: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null) + bu2.copyFromUrlWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null) then: thrown(BlobStorageException) @@ -1203,7 +1203,7 @@ class BlobAPITest extends APISpec { def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - bu2.copyFromURL(bc.getBlobUrl()) + bu2.copyFromUrl(bc.getBlobUrl()) then: thrown(BlobStorageException) @@ -1498,7 +1498,7 @@ class BlobAPITest extends APISpec { .setBlobName(blobName) .generateSasQueryParameters(primaryCredential) .encode() - bcCopy.copyFromURLWithResponse(bc.getBlobUrl().toString() + "?" + sas, null, tier2, null, null, null, null) + bcCopy.copyFromUrlWithResponse(bc.getBlobUrl().toString() + "?" + sas, null, tier2, null, null, null, null) then: bcCopy.getProperties().getAccessTier() == tier2 diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy index 84213c074cc1..24a5a11e11c7 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy @@ -64,7 +64,7 @@ class CPKTest extends APISpec { then: response.getStatusCode() == 201 response.getValue().isServerEncrypted() - response.getValue().getEncryptionKeySha256() == key.getKeySHA256() + response.getValue().getEncryptionKeySha256() == key.getKeySha256() } def "Get blob with CPK"() { @@ -105,7 +105,7 @@ class CPKTest extends APISpec { .generateSasQueryParameters(primaryCredential) .encode() - def response = cpkBlockBlob.stageBlockFromURLWithResponse(getBlockID(), sourceBlob.getBlobUrl().toString() + "?" + sas, + def response = cpkBlockBlob.stageBlockFromUrlWithResponse(getBlockID(), sourceBlob.getBlobUrl().toString() + "?" + sas, null, null, null, null, null, null) then: @@ -126,7 +126,7 @@ class CPKTest extends APISpec { then: response.getStatusCode() == 201 response.getValue().isServerEncrypted() - response.getValue().getEncryptionKeySha256() == key.getKeySHA256() + response.getValue().getEncryptionKeySha256() == key.getKeySha256() } def "Put page with CPK"() { @@ -140,7 +140,7 @@ class CPKTest extends APISpec { then: response.getStatusCode() == 201 response.getValue().isServerEncrypted() - response.getValue().getEncryptionKeySha256() == key.getKeySHA256() + response.getValue().getEncryptionKeySha256() == key.getKeySha256() } def "Put page from URL wih CPK"() { @@ -162,7 +162,7 @@ class CPKTest extends APISpec { .generateSasQueryParameters(primaryCredential) .encode() - def response = cpkPageBlob.uploadPagesFromURLWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), + def response = cpkPageBlob.uploadPagesFromUrlWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), sourceBlob.getBlobUrl().toString() + "?" + sas, null, null, null, null, null, null) then: @@ -183,7 +183,7 @@ class CPKTest extends APISpec { then: response.getStatusCode() == 201 response.getValue().isServerEncrypted() - response.getValue().getEncryptionKeySha256() == key.getKeySHA256() + response.getValue().getEncryptionKeySha256() == key.getKeySha256() } def "Append block with CPK"() { @@ -196,7 +196,7 @@ class CPKTest extends APISpec { then: response.getStatusCode() == 201 response.getValue().isServerEncrypted() - response.getValue().getEncryptionKeySha256() == key.getKeySHA256() + response.getValue().getEncryptionKeySha256() == key.getKeySha256() } def "Append block from URL with CPK"() { @@ -221,7 +221,7 @@ class CPKTest extends APISpec { response.getStatusCode() == 201 //TODO uncomment when swagger is fixed so AppendBlobAppendBLockFromURLHeaders contains isrequestserverencrypted //response.getValue().isServerEncrypted() - response.getValue().getEncryptionKeySha256() == key.getKeySHA256() + response.getValue().getEncryptionKeySha256() == key.getKeySha256() } def "Set blob metadata with CPK"() { @@ -235,7 +235,7 @@ class CPKTest extends APISpec { then: response.getStatusCode() == 200 Boolean.parseBoolean(response.getHeaders().getValue(Constants.HeaderConstants.REQUEST_SERVER_ENCRYPTED)) - response.getHeaders().getValue(Constants.HeaderConstants.ENCRYPTION_KEY_SHA256) == key.getKeySHA256() + response.getHeaders().getValue(Constants.HeaderConstants.ENCRYPTION_KEY_SHA256) == key.getKeySha256() } def "Get blob properties and metadata with CPK"() { @@ -245,7 +245,7 @@ class CPKTest extends APISpec { then: response.getStatusCode() == 200 Boolean.parseBoolean(response.getHeaders().getValue(Constants.HeaderConstants.SERVER_ENCRYPTED)) - response.getHeaders().getValue(Constants.HeaderConstants.ENCRYPTION_KEY_SHA256) == key.getKeySHA256() + response.getHeaders().getValue(Constants.HeaderConstants.ENCRYPTION_KEY_SHA256) == key.getKeySha256() } // TODO unignore when swagger is resolved with service team diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy index 2830e7fae12a..5c1ad45365d9 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy @@ -33,7 +33,7 @@ class AppendBlobAPITest extends APISpec { then: createResponse.getStatusCode() == 201 validateBasicHeaders(createResponse.getHeaders()) - createResponse.getValue().getContentMD5() == null + createResponse.getValue().getContentMd5() == null createResponse.getValue().isServerEncrypted() } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy index 657b448b1b60..53340ca41b55 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy @@ -149,7 +149,7 @@ class BlockBlobAPITest extends APISpec { def blockID = getBlockID() when: - def headers = bu2.stageBlockFromURLWithResponse(blockID, bc.getBlobUrl(), null, null, null, null, null, null).getHeaders() + def headers = bu2.stageBlockFromUrlWithResponse(blockID, bc.getBlobUrl(), null, null, null, null, null, null).getHeaders() then: headers.getValue("x-ms-request-id") != null @@ -178,14 +178,14 @@ class BlockBlobAPITest extends APISpec { def blockID = getBlockID() expect: - bu2.stageBlockFromURLWithResponse(blockID, bc.getBlobUrl(), null, null, null, null, null, null).getStatusCode() == 201 + bu2.stageBlockFromUrlWithResponse(blockID, bc.getBlobUrl(), null, null, null, null, null, null).getStatusCode() == 201 } @Unroll def "Stage block from URL IA"() { when: def blockID = (getBlockId) ? getBlockID() : null - bc.stageBlockFromURL(blockID, sourceURL, null) + bc.stageBlockFromUrl(blockID, sourceURL, null) then: thrown(exceptionType) @@ -202,7 +202,7 @@ class BlockBlobAPITest extends APISpec { def destURL = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - destURL.stageBlockFromURL(getBlockID(), bc.getBlobUrl(), new BlobRange(2, 3)) + destURL.stageBlockFromUrl(getBlockID(), bc.getBlobUrl(), new BlobRange(2, 3)) def blockList = destURL.listBlocks(BlockListType.UNCOMMITTED) then: @@ -216,7 +216,7 @@ class BlockBlobAPITest extends APISpec { def destURL = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - destURL.stageBlockFromURLWithResponse(getBlockID(), bc.getBlobUrl(), null, + destURL.stageBlockFromUrlWithResponse(getBlockID(), bc.getBlobUrl(), null, MessageDigest.getInstance("MD5").digest(defaultData.array()), null, null, null, null) then: @@ -229,7 +229,7 @@ class BlockBlobAPITest extends APISpec { def destURL = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - destURL.stageBlockFromURLWithResponse(getBlockID(), bc.getBlobUrl(), null, "garbage".getBytes(), + destURL.stageBlockFromUrlWithResponse(getBlockID(), bc.getBlobUrl(), null, "garbage".getBytes(), null, null, null, null) then: @@ -241,7 +241,7 @@ class BlockBlobAPITest extends APISpec { cc.setAccessPolicy(PublicAccessType.CONTAINER, null) when: - bc.stageBlockFromURLWithResponse(getBlockID(), bc.getBlobUrl(), null, null, setupBlobLeaseCondition(bc, receivedLeaseID), null, null, null) + bc.stageBlockFromUrlWithResponse(getBlockID(), bc.getBlobUrl(), null, null, setupBlobLeaseCondition(bc, receivedLeaseID), null, null, null) then: notThrown(BlobStorageException) @@ -252,7 +252,7 @@ class BlockBlobAPITest extends APISpec { cc.setAccessPolicy(PublicAccessType.CONTAINER, null) when: - bc.stageBlockFromURLWithResponse(getBlockID(), bc.getBlobUrl(), null, null, "garbage", null, null, null) + bc.stageBlockFromUrlWithResponse(getBlockID(), bc.getBlobUrl(), null, null, "garbage", null, null, null) then: thrown(BlobStorageException) @@ -265,7 +265,7 @@ class BlockBlobAPITest extends APISpec { .getBlockBlobClient() when: - bc.stageBlockFromURL(getBlockID(), bc.getBlobUrl(), null) + bc.stageBlockFromUrl(getBlockID(), bc.getBlobUrl(), null) then: thrown(BlobStorageException) @@ -288,7 +288,7 @@ class BlockBlobAPITest extends APISpec { .setIfNoneMatch(sourceIfNoneMatch) expect: - bc.stageBlockFromURLWithResponse(blockID, sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 + bc.stageBlockFromUrlWithResponse(blockID, sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 where: sourceIfModifiedSince | sourceIfUnmodifiedSince | sourceIfMatch | sourceIfNoneMatch @@ -315,7 +315,7 @@ class BlockBlobAPITest extends APISpec { .setIfNoneMatch(setupBlobMatchCondition(sourceURL, sourceIfNoneMatch)) when: - bc.stageBlockFromURLWithResponse(blockID, sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 + bc.stageBlockFromUrlWithResponse(blockID, sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 then: thrown(BlobStorageException) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy index 8b6eb568b76e..28fedb906ff7 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy @@ -43,7 +43,7 @@ class PageBlobAPITest extends APISpec { then: response.getStatusCode() == 201 validateBasicHeaders(response.getHeaders()) - response.getValue().getContentMD5() == null + response.getValue().getContentMd5() == null response.getValue().isServerEncrypted() } @@ -292,7 +292,7 @@ class PageBlobAPITest extends APISpec { def pageRange = new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1) when: - def response = bc.uploadPagesFromURLWithResponse(pageRange, destURL.getBlobUrl(), null, null, null, null, null, null) + def response = bc.uploadPagesFromUrlWithResponse(pageRange, destURL.getBlobUrl(), null, null, null, null, null, null) then: response.getStatusCode() == 201 @@ -314,7 +314,7 @@ class PageBlobAPITest extends APISpec { destURL.create(PageBlobClient.PAGE_BYTES * 2) when: - destURL.uploadPagesFromURL(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES * 2 - 1), + destURL.uploadPagesFromUrl(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES * 2 - 1), sourceURL.getBlobUrl(), PageBlobClient.PAGE_BYTES * 2) then: @@ -325,7 +325,7 @@ class PageBlobAPITest extends APISpec { def "Upload page from URL IA"() { when: - bc.uploadPagesFromURL(null, bc.getBlobUrl(), (Long) PageBlobClient.PAGE_BYTES) + bc.uploadPagesFromUrl(null, bc.getBlobUrl(), (Long) PageBlobClient.PAGE_BYTES) then: thrown(IllegalArgumentException) @@ -341,7 +341,7 @@ class PageBlobAPITest extends APISpec { bc.uploadPages(pageRange, new ByteArrayInputStream(data)) when: - destURL.uploadPagesFromURLWithResponse(pageRange, bc.getBlobUrl(), null, MessageDigest.getInstance("MD5").digest(data), + destURL.uploadPagesFromUrlWithResponse(pageRange, bc.getBlobUrl(), null, MessageDigest.getInstance("MD5").digest(data), null, null, null, null) then: @@ -357,7 +357,7 @@ class PageBlobAPITest extends APISpec { bc.uploadPages(pageRange, new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) when: - destURL.uploadPagesFromURLWithResponse(pageRange, bc.getBlobUrl(), null, + destURL.uploadPagesFromUrlWithResponse(pageRange, bc.getBlobUrl(), null, MessageDigest.getInstance("MD5").digest("garbage".getBytes()), null, null, null, null) then: @@ -384,7 +384,7 @@ class PageBlobAPITest extends APISpec { .setIfSequenceNumberEqualTo(sequenceNumberEqual) expect: - bc.uploadPagesFromURLWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, pac, null, null, null).getStatusCode() == 201 + bc.uploadPagesFromUrlWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, pac, null, null, null).getStatusCode() == 201 where: modified | unmodified | match | noneMatch | leaseID | sequenceNumberLT | sequenceNumberLTE | sequenceNumberEqual @@ -421,7 +421,7 @@ class PageBlobAPITest extends APISpec { .setIfSequenceNumberEqualTo(sequenceNumberEqual) when: - bc.uploadPagesFromURLWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, pac, null, null, null) + bc.uploadPagesFromUrlWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, pac, null, null, null) then: thrown(BlobStorageException) @@ -455,7 +455,7 @@ class PageBlobAPITest extends APISpec { .setIfNoneMatch(sourceIfNoneMatch) expect: - bc.uploadPagesFromURLWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 + bc.uploadPagesFromUrlWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 where: sourceIfModifiedSince | sourceIfUnmodifiedSince | sourceIfMatch | sourceIfNoneMatch @@ -482,7 +482,7 @@ class PageBlobAPITest extends APISpec { .setIfNoneMatch(setupBlobMatchCondition(sourceURL, sourceIfNoneMatch)) when: - bc.uploadPagesFromURLWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, null, smac, null, null) + bc.uploadPagesFromUrlWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, null, smac, null, null) then: thrown(BlobStorageException) @@ -505,7 +505,7 @@ class PageBlobAPITest extends APISpec { then: bc.getPageRanges(new BlobRange(0)).getPageRange().size() == 0 validateBasicHeaders(response.getHeaders()) - response.getValue().getContentMD5() == null + response.getValue().getContentMd5() == null response.getValue().getBlobSequenceNumber() == 0 } diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy index b6f854f0dd7c..bd2eb3cfbb2d 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy @@ -7,7 +7,6 @@ import com.azure.core.exception.HttpResponseException import com.azure.core.exception.UnexpectedLengthException import com.azure.core.util.Context import com.azure.core.util.polling.Poller -import com.azure.storage.common.implementation.Constants import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.common.implementation.Constants import com.azure.storage.file.models.FileCopyInfo @@ -24,6 +23,7 @@ import spock.lang.Unroll import java.nio.charset.StandardCharsets import java.nio.file.FileAlreadyExistsException import java.nio.file.NoSuchFileException +import java.time.Duration import java.time.LocalDateTime import java.time.OffsetDateTime import java.time.ZoneOffset @@ -420,9 +420,10 @@ class FileAPITests extends APISpec { then: verifier.assertNext({ assert it.getValue().getCopyId() != null - }).thenCancel().verify() + }).thenCancel().verify(Duration.ofMinutes(1)) } + @Ignore("There is a race condition in Poller where it misses the first observed event if there is a gap between the time subscribed and the time we start observing events.") def "Start copy error"() { given: primaryFileClient.create(1024) @@ -432,10 +433,10 @@ class FileAPITests extends APISpec { def verifier = StepVerifier.create(copyInfoPoller.getObserver()) then: - verifier.verifyErrorSatisfies{ - assert it instanceof FileStorageException - assert FileTestHelper.assertExceptionStatusCodeAndMessage(it, 400, FileErrorCode.INVALID_HEADER_VALUE) - } + verifier.expectErrorSatisfies({ + assert it instanceof FileStorageException + assert FileTestHelper.assertExceptionStatusCodeAndMessage(it, 400, FileErrorCode.INVALID_HEADER_VALUE) + }).verify(Duration.ofSeconds(30)) } @Ignore diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy index 2f27e7d8a429..dd84609df0f7 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy @@ -443,27 +443,28 @@ class FileAsyncAPITests extends APISpec { def sourceURL = primaryFileAsyncClient.getFileUrl() when: - Poller poller = primaryFileAsyncClient.beginCopy(sourceURL, null, Duration.ofSeconds(2)) + Poller poller = primaryFileAsyncClient.beginCopy(sourceURL, null, Duration.ofSeconds(1)) def copyInfoVerifier = StepVerifier.create(poller.getObserver()) then: copyInfoVerifier.assertNext { assert it.getValue().getCopyId() != null - }.verifyComplete() + }.expectComplete().verify(Duration.ofMinutes(1)) } + @Ignore("There is a race condition in Poller where it misses the first observed event if there is a gap between the time subscribed and the time we start observing events.") def "Start copy error"() { given: primaryFileAsyncClient.create(1024).block() when: - Poller poller = primaryFileAsyncClient.beginCopy("some url", testMetadata, Duration.ofSeconds(2)) + Poller poller = primaryFileAsyncClient.beginCopy("some url", testMetadata, Duration.ofSeconds(1)) def startCopyErrorVerifier = StepVerifier.create(poller.getObserver()) then: - startCopyErrorVerifier.verifyErrorSatisfies { + startCopyErrorVerifier.expectErrorSatisfies({ assert FileTestHelper.assertExceptionStatusCodeAndMessage(it, 400, FileErrorCode.INVALID_HEADER_VALUE) - } + }).verify(Duration.ofSeconds(30)) } @Ignore From 9fedee1b97646750a82c441273052d3ad2f47a7d Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Tue, 22 Oct 2019 12:55:16 -0700 Subject: [PATCH 43/64] Support for mapping paged iterable from one type to another (#5982) --- .../azure/core/http/rest/PagedIterable.java | 69 ++----- .../core/http/rest/PagedIterableBase.java | 85 ++++++++ .../PagedIterableBaseJavaDocCodeSnippets.java | 111 +++++++++++ .../PagedIterableJavaDocCodeSnippets.java | 83 ++------ .../core/http/rest/PagedIterableTest.java | 183 ++++++++++++++++++ 5 files changed, 406 insertions(+), 125 deletions(-) create mode 100644 sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterableBase.java create mode 100644 sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedIterableBaseJavaDocCodeSnippets.java create mode 100644 sdk/core/azure-core/src/test/java/com/azure/core/http/rest/PagedIterableTest.java diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterable.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterable.java index 0900c3d2204f..8482cd6f1e13 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterable.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterable.java @@ -5,6 +5,7 @@ import com.azure.core.util.IterableStream; +import java.util.function.Function; import java.util.stream.Stream; /** @@ -27,68 +28,26 @@ * @see PagedResponse * @see IterableStream */ -public class PagedIterable extends IterableStream { - private final PagedFluxBase> pagedFluxBase; +public class PagedIterable extends PagedIterableBase> { + private final PagedFlux pagedFlux; /** - * Creates instance given {@link PagedFluxBase}. - * @param pagedFluxBase to use as iterable - * @param

    The response extending from {@link PagedResponse} + * Creates instance given {@link PagedFlux}. + * @param pagedFlux to use as iterable */ - public

    > PagedIterable(PagedFluxBase pagedFluxBase) { - super(pagedFluxBase); - this.pagedFluxBase = pagedFluxBase; + public PagedIterable(PagedFlux pagedFlux) { + super(pagedFlux); + this.pagedFlux = pagedFlux; } /** - * Retrieve the {@link Stream}, one page at a time. - * It will provide same {@link Stream} of T values from starting if called multiple times. + * Maps this PagedIterable instance of T to a PagedIterable instance of type S as per the provided mapper function. * - * @param

    The response extending from {@link PagedResponse} - * @return {@link Stream} of a Response that extends {@link PagedResponse} + * @param mapper The mapper function to convert from type T to type S. + * @param The mapped type. + * @return A PagedIterable of type S. */ - @SuppressWarnings("unchecked") - public

    > Stream

    streamByPage() { - return (Stream

    ) pagedFluxBase.byPage().toStream(); - } - - /** - * Retrieve the {@link Stream}, one page at a time, starting from the next page associated with the given - * continuation token. To start from first page, use {@link #streamByPage()} instead. - * - * @param continuationToken The continuation token used to fetch the next page - * @param

    The response extending from {@link PagedResponse} - * @return {@link Stream} of a Response that extends {@link PagedResponse}, starting from the page associated - * with the continuation token - */ - @SuppressWarnings("unchecked") - public

    > Stream

    streamByPage(String continuationToken) { - return (Stream

    ) pagedFluxBase.byPage(continuationToken).toStream(); - } - - /** - * Provides {@link Iterable} API for{ @link PagedResponse} - * It will provide same collection of {@code T} values from starting if called multiple times. - * - * @param

    The response extending from {@link PagedResponse} - * @return {@link Iterable} interface - */ - @SuppressWarnings("unchecked") - public

    > Iterable

    iterableByPage() { - return (Iterable

    ) pagedFluxBase.byPage().toIterable(); - } - - /** - * Provides {@link Iterable} API for {@link PagedResponse}, starting from the next page associated with the given - * continuation token. To start from first page, use {@link #streamByPage()} instead. - * It will provide same collection of T values from starting if called multiple times. - * - * @param continuationToken The continuation token used to fetch the next page - * @param

    The response extending from {@link PagedResponse} - * @return {@link Iterable} interface - */ - @SuppressWarnings("unchecked") - public

    > Iterable

    iterableByPage(String continuationToken) { - return (Iterable

    ) pagedFluxBase.byPage(continuationToken).toIterable(); + public PagedIterable mapPage(Function mapper) { + return new PagedIterable<>(pagedFlux.mapPage(mapper)); } } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterableBase.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterableBase.java new file mode 100644 index 000000000000..c9eaaeba30f5 --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterableBase.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.rest; + +import com.azure.core.util.IterableStream; +import java.util.stream.Stream; + +/** + * This class provides utility to iterate over responses that extend {@link PagedResponse} using {@link Stream} and + * {@link Iterable} interfaces. + * + *

    Code sample using {@link Stream} by page

    + * + * {@codesnippet com.azure.core.http.rest.pagedIterableBase.streamByPage} + * + *

    Code sample using {@link Iterable} by page

    + * + * {@codesnippet com.azure.core.http.rest.pagedIterableBase.iterableByPage} + * + *

    Code sample using {@link Iterable} by page and while loop

    + * + * {@codesnippet com.azure.core.http.rest.pagedIterableBase.iterableByPage.while} + * + * @param The type of value contained in this {@link IterableStream}. + * @param

    The response extending from {@link PagedResponse} + * @see PagedResponse + * @see IterableStream + */ +public class PagedIterableBase> extends IterableStream { + private final PagedFluxBase pagedFluxBase; + + /** + * Creates instance given {@link PagedFluxBase}. + * @param pagedFluxBase to use as iterable + */ + public PagedIterableBase(PagedFluxBase pagedFluxBase) { + super(pagedFluxBase); + this.pagedFluxBase = pagedFluxBase; + } + + /** + * Retrieve the {@link Stream}, one page at a time. + * It will provide same {@link Stream} of T values from starting if called multiple times. + * + * @return {@link Stream} of a Response that extends {@link PagedResponse} + */ + public Stream

    streamByPage() { + return pagedFluxBase.byPage().toStream(); + } + + /** + * Retrieve the {@link Stream}, one page at a time, starting from the next page associated with the given + * continuation token. To start from first page, use {@link #streamByPage()} instead. + * + * @param continuationToken The continuation token used to fetch the next page + * @return {@link Stream} of a Response that extends {@link PagedResponse}, starting from the page associated + * with the continuation token + */ + public Stream

    streamByPage(String continuationToken) { + return pagedFluxBase.byPage(continuationToken).toStream(); + } + + /** + * Provides {@link Iterable} API for{ @link PagedResponse} + * It will provide same collection of {@code T} values from starting if called multiple times. + * + * @return {@link Iterable} interface + */ + public Iterable

    iterableByPage() { + return pagedFluxBase.byPage().toIterable(); + } + + /** + * Provides {@link Iterable} API for {@link PagedResponse}, starting from the next page associated with the given + * continuation token. To start from first page, use {@link #streamByPage()} instead. + * It will provide same collection of T values from starting if called multiple times. + * + * @param continuationToken The continuation token used to fetch the next page + * @return {@link Iterable} interface + */ + public Iterable

    iterableByPage(String continuationToken) { + return pagedFluxBase.byPage(continuationToken).toIterable(); + } +} diff --git a/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedIterableBaseJavaDocCodeSnippets.java b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedIterableBaseJavaDocCodeSnippets.java new file mode 100644 index 000000000000..0f34dc44af2a --- /dev/null +++ b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedIterableBaseJavaDocCodeSnippets.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.rest; + +import java.util.Iterator; +import java.util.function.Function; +import java.util.function.Supplier; +import reactor.core.publisher.Mono; + +/** + * Code snippets for {@link PagedIterableBase} + */ +public class PagedIterableBaseJavaDocCodeSnippets { + + static class CustomPagedFlux extends PagedFluxBase> { + CustomPagedFlux(Supplier>> firstPageRetriever) { + super(firstPageRetriever); + } + + CustomPagedFlux(Supplier>> firstPageRetriever, + Function>> nextPageRetriever) { + super(firstPageRetriever, nextPageRetriever); + } + } + + /** + * Provides an example for iterate over each response using streamByPage function. + **/ + public void streamByPageSnippet() { + // BEGIN: com.azure.core.http.rest.pagedIterableBase.streamByPage + // process the streamByPage + CustomPagedFlux customPagedFlux = createCustomInstance(); + PagedIterableBase> customPagedIterableResponse = + new PagedIterableBase<>(customPagedFlux); + customPagedIterableResponse.streamByPage().forEach(resp -> { + System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.getHeaders(), + resp.getRequest().getUrl(), resp.getStatusCode()); + resp.getItems().forEach(value -> { + System.out.printf("Response value is %s %n", value); + }); + }); + // END: com.azure.core.http.rest.pagedIterableBase.streamByPage + } + + + /** + * Provides an example for iterate over each response using iterableByPage function. + **/ + public void iterateByPageSnippet() { + + CustomPagedFlux customPagedFlux = createCustomInstance(); + PagedIterableBase> customPagedIterableResponse = + new PagedIterableBase<>(customPagedFlux); + + // BEGIN: com.azure.core.http.rest.pagedIterableBase.iterableByPage + // process the iterableByPage + customPagedIterableResponse.iterableByPage().forEach(resp -> { + System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.getHeaders(), + resp.getRequest().getUrl(), resp.getStatusCode()); + resp.getItems().forEach(value -> { + System.out.printf("Response value is %s %n", value); + }); + }); + // END: com.azure.core.http.rest.pagedIterableBase.iterableByPage + } + + /** + * Provides an example for iterate over each response using iterableByPage function and while loop. + **/ + public void iterableByPageWhileSnippet() { + + CustomPagedFlux customPagedFlux = createCustomInstance(); + PagedIterableBase> customPagedIterableResponse = + new PagedIterableBase<>(customPagedFlux); + + // BEGIN: com.azure.core.http.rest.pagedIterableBase.iterableByPage.while + // iterate over each page + Iterator> iterator = customPagedIterableResponse.iterableByPage().iterator(); + while (iterator.hasNext()) { + PagedResponse resp = iterator.next(); + System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.getHeaders(), + resp.getRequest().getUrl(), resp.getStatusCode()); + resp.getItems().forEach(value -> { + System.out.printf("Response value is %s %n", value); + }); + } + // END: com.azure.core.http.rest.pagedIterableBase.iterableByPage.while + } + + + /** + * Code snippets for creating an instance of {@link PagedFlux} + * + * @return An instance of {@link PagedFlux} + */ + public CustomPagedFlux createCustomInstance() { + + // A supplier that fetches the first page of data from source/service + Supplier>> firstPageRetriever = () -> null; + + // A function that fetches subsequent pages of data from source/service given a continuation token + Function>> nextPageRetriever = + continuationToken -> null; + + CustomPagedFlux pagedFlux = new CustomPagedFlux<>(firstPageRetriever, + nextPageRetriever); + return pagedFlux; + } + +} diff --git a/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedIterableJavaDocCodeSnippets.java b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedIterableJavaDocCodeSnippets.java index bc6235df88a1..e48828cb4e0a 100644 --- a/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedIterableJavaDocCodeSnippets.java +++ b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedIterableJavaDocCodeSnippets.java @@ -14,25 +14,13 @@ */ public class PagedIterableJavaDocCodeSnippets { - static class CustomPagedFlux extends PagedFluxBase> { - CustomPagedFlux(Supplier>> firstPageRetriever) { - super(firstPageRetriever); - } - - CustomPagedFlux(Supplier>> firstPageRetriever, - Function>> nextPageRetriever) { - super(firstPageRetriever, nextPageRetriever); - } - } - - - /**Provides an example for iterate over each response using streamByPage function.**/ + /** + * Provides an example for iterate over each response using streamByPage function. + **/ public void streamByPageSnippet() { PagedFlux pagedFlux = createAnInstance(); - CustomPagedFlux customPagedFlux = createCustomInstance(); - PagedIterable pagedIterableResponse = new PagedIterable<>(pagedFlux); - PagedIterable customPagedIterableResponse = new PagedIterable<>(customPagedFlux); + PagedIterable pagedIterableResponse = new PagedIterable<>(pagedFlux); // BEGIN: com.azure.core.http.rest.pagedIterable.streamByPage // process the streamByPage @@ -44,23 +32,16 @@ public void streamByPageSnippet() { }); }); - customPagedIterableResponse.streamByPage().forEach(resp -> { - System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.getHeaders(), - resp.getRequest().getUrl(), resp.getStatusCode()); - resp.getItems().forEach(value -> { - System.out.printf("Response value is %s %n", value); - }); - }); // END: com.azure.core.http.rest.pagedIterable.streamByPage } - /**Provides an example for iterate over each response using iterableByPage function.**/ + /** + * Provides an example for iterate over each response using iterableByPage function. + **/ public void iterateByPageSnippet() { PagedFlux pagedFlux = createAnInstance(); - CustomPagedFlux customPagedFlux = createCustomInstance(); - PagedIterable pagedIterableResponse = new PagedIterable<>(pagedFlux); - PagedIterable customPagedIterableResponse = new PagedIterable<>(customPagedFlux); + PagedIterable pagedIterableResponse = new PagedIterable<>(pagedFlux); // BEGIN: com.azure.core.http.rest.pagedIterable.iterableByPage // process the iterableByPage @@ -71,24 +52,16 @@ public void iterateByPageSnippet() { System.out.printf("Response value is %d %n", value); }); }); - - customPagedIterableResponse.iterableByPage().forEach(resp -> { - System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.getHeaders(), - resp.getRequest().getUrl(), resp.getStatusCode()); - resp.getItems().forEach(value -> { - System.out.printf("Response value is %s %n", value); - }); - }); // END: com.azure.core.http.rest.pagedIterable.iterableByPage } - /**Provides an example for iterate over each response using iterableByPage function and while loop.**/ + /** + * Provides an example for iterate over each response using iterableByPage function and while loop. + **/ public void iterableByPageWhileSnippet() { PagedFlux pagedFlux = createAnInstance(); - CustomPagedFlux customPagedFlux = createCustomInstance(); - PagedIterable pagedIterableResponse = new PagedIterable<>(pagedFlux); - PagedIterable customPagedIterableResponse = new PagedIterable<>(customPagedFlux); + PagedIterable pagedIterableResponse = new PagedIterable<>(pagedFlux); // BEGIN: com.azure.core.http.rest.pagedIterable.iterableByPage.while // iterate over each page @@ -101,26 +74,16 @@ public void iterableByPageWhileSnippet() { System.out.printf("Response value is %d %n", value); }); } - - Iterator> iterator = customPagedIterableResponse.iterableByPage().iterator(); - while (iterator.hasNext()) { - PagedResponse resp = ite.next(); - System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.getHeaders(), - resp.getRequest().getUrl(), resp.getStatusCode()); - resp.getItems().forEach(value -> { - System.out.printf("Response value is %s %n", value); - }); - } // END: com.azure.core.http.rest.pagedIterable.iterableByPage.while } /** * Code snippets for creating an instance of {@link PagedFlux} + * * @return An instance of {@link PagedFlux} */ public PagedFlux createAnInstance() { - // BEGIN: com.azure.core.http.rest.pagedflux.instantiation // A supplier that fetches the first page of data from source/service Supplier>> firstPageRetriever = () -> getFirstPage(); @@ -130,29 +93,9 @@ public PagedFlux createAnInstance() { PagedFlux pagedFlux = new PagedFlux<>(firstPageRetriever, nextPageRetriever); - // END: com.azure.core.http.rest.pagedflux.instantiation return pagedFlux; } - /** - * Code snippets for creating an instance of {@link PagedFlux} - * @return An instance of {@link PagedFlux} - */ - public CustomPagedFlux createCustomInstance() { - - // BEGIN: com.azure.core.http.rest.custompagedflux.instantiation - // A supplier that fetches the first page of data from source/service - Supplier>> firstPageRetriever = () -> null; - - // A function that fetches subsequent pages of data from source/service given a continuation token - Function>> nextPageRetriever = - continuationToken -> null; - - CustomPagedFlux pagedFlux = new CustomPagedFlux<>(firstPageRetriever, - nextPageRetriever); - // END: com.azure.core.http.rest.custompagedflux.instantiation - return pagedFlux; - } /** * Implementation not provided diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/http/rest/PagedIterableTest.java b/sdk/core/azure-core/src/test/java/com/azure/core/http/rest/PagedIterableTest.java new file mode 100644 index 000000000000..1f662ce51ea4 --- /dev/null +++ b/sdk/core/azure-core/src/test/java/com/azure/core/http/rest/PagedIterableTest.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.rest; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpMethod; +import com.azure.core.http.HttpRequest; +import com.azure.core.implementation.http.PagedResponseBase; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Iterator; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.IntStream; +import java.util.stream.Stream; +import org.junit.Test; +import reactor.core.publisher.Mono; + +/** + * Unit tests for {@link PagedIterable}. + */ +public class PagedIterableTest { + + private List> pagedResponses; + private List> pagedStringResponses; + + @Test + public void testEmptyResults() { + PagedFlux pagedFlux = getIntegerPagedFlux(0); + PagedIterable pagedIterable = new PagedIterable<>(pagedFlux); + assertEquals(0, pagedIterable.streamByPage().count()); + } + + @Test + public void testPageStream() { + PagedFlux pagedFlux = getIntegerPagedFlux(5); + PagedIterable pagedIterable = new PagedIterable<>(pagedFlux); + assertEquals(5, pagedIterable.streamByPage().count()); + assertEquals(pagedResponses, pagedIterable.streamByPage().collect(Collectors.toList())); + } + + @Test + public void testPageIterable() { + PagedFlux pagedFlux = getIntegerPagedFlux(5); + PagedIterable pagedIterable = new PagedIterable<>(pagedFlux); + Iterator> iter = pagedIterable.iterableByPage().iterator(); + + int index = 0; + while (iter.hasNext()) { + PagedResponse pagedResponse = iter.next(); + assertEquals(pagedResponses.get(index++), pagedResponse); + } + } + + @Test + public void testStream() { + PagedFlux pagedFlux = getIntegerPagedFlux(5); + PagedIterable pagedIterable = new PagedIterable<>(pagedFlux); + + assertEquals(15, pagedIterable.stream().count()); + List ints = Stream.iterate(0, i -> i + 1).limit(15).collect(Collectors.toList()); + assertEquals(ints, pagedIterable.stream().collect(Collectors.toList())); + } + + @Test + public void testIterable() { + PagedFlux pagedFlux = getIntegerPagedFlux(5); + PagedIterable pagedIterable = new PagedIterable<>(pagedFlux); + Iterator iter = pagedIterable.iterator(); + + int index = 0; + while (iter.hasNext()) { + int val = iter.next(); + assertEquals(index++, val); + } + } + + @Test + public void testMap() { + PagedFlux pagedFlux = getIntegerPagedFlux(5); + PagedIterable pagedIterable = new PagedIterable<>(pagedFlux); + List intStrs = + Stream.iterate(0, i -> i + 1).map(String::valueOf).limit(15).collect(Collectors.toList()); + assertEquals(intStrs, pagedIterable.mapPage(String::valueOf).stream().collect(Collectors.toList())); + } + + @Test + public void testPageMap() { + PagedFlux pagedFlux = getIntegerPagedFlux(5); + PagedIterable pagedIterable = new PagedIterable<>(pagedFlux); + int[] index = new int[1]; + assertTrue(pagedIterable.mapPage(String::valueOf).streamByPage().allMatch(pagedResponse -> + pagedStringResponses.get(index[0]++).getValue().equals(pagedResponse.getValue()))); + } + + private PagedFlux getIntegerPagedFlux(int noOfPages) { + try { + HttpHeaders httpHeaders = new HttpHeaders().put("header1", "value1") + .put("header2", "value2"); + + HttpRequest httpRequest = new HttpRequest(HttpMethod.GET, new URL("http://localhost")); + + String deserializedHeaders = "header1,value1,header2,value2"; + pagedResponses = IntStream.range(0, noOfPages) + .boxed() + .map(i -> createPagedResponse(httpRequest, httpHeaders, deserializedHeaders, i, noOfPages)) + .collect(Collectors.toList()); + + pagedStringResponses = IntStream.range(0, noOfPages) + .boxed() + .map(i -> createPagedResponseWithString(httpRequest, httpHeaders, deserializedHeaders, i, noOfPages)) + .collect(Collectors.toList()); + + return new PagedFlux<>(() -> pagedResponses.isEmpty() ? Mono.empty() : Mono.just(pagedResponses.get(0)), + continuationToken -> getNextPage(continuationToken, pagedResponses)); + } catch (MalformedURLException e) { + return null; + } + } + + private PagedFlux getIntegerPagedFluxSinglePage() { + try { + HttpHeaders httpHeaders = new HttpHeaders().put("header1", "value1") + .put("header2", "value2"); + HttpRequest httpRequest = new HttpRequest(HttpMethod.GET, new URL("http://localhost")); + + String deserializedHeaders = "header1,value1,header2,value2"; + pagedResponses = IntStream.range(0, 1) + .boxed() + .map(i -> createPagedResponse(httpRequest, httpHeaders, deserializedHeaders, i, 1)) + .collect(Collectors.toList()); + + pagedStringResponses = IntStream.range(0, 1) + .boxed() + .map(i -> createPagedResponseWithString(httpRequest, httpHeaders, deserializedHeaders, i, 1)) + .collect(Collectors.toList()); + return new PagedFlux<>(() -> pagedResponses.isEmpty() ? Mono.empty() : Mono.just(pagedResponses.get(0))); + } catch (MalformedURLException e) { + return null; + } + } + + private PagedResponseBase createPagedResponse(HttpRequest httpRequest, + HttpHeaders httpHeaders, String deserializedHeaders, int i, int noOfPages) { + return new PagedResponseBase<>(httpRequest, 200, + httpHeaders, + getItems(i), + i < noOfPages - 1 ? String.valueOf(i + 1) : null, + deserializedHeaders); + } + + private PagedResponseBase createPagedResponseWithString(HttpRequest httpRequest, + HttpHeaders httpHeaders, String deserializedHeaders, int i, int noOfPages) { + return new PagedResponseBase<>(httpRequest, 200, + httpHeaders, + getStringItems(i), + i < noOfPages - 1 ? String.valueOf(i + 1) : null, + deserializedHeaders); + } + + private Mono> getNextPage(String continuationToken, + List> pagedResponses) { + + if (continuationToken == null || continuationToken.isEmpty()) { + return Mono.empty(); + } + + return Mono.just(pagedResponses.get(Integer.valueOf(continuationToken))); + } + + private List getItems(Integer i) { + return IntStream.range(i * 3, i * 3 + 3).boxed().collect(Collectors.toList()); + } + + private List getStringItems(Integer i) { + return IntStream.range(i * 3, i * 3 + 3).boxed().map(val -> String.valueOf(val)).collect(Collectors.toList()); + } + +} From b8206459115c469fae4a34a12d68213e31c260d9 Mon Sep 17 00:00:00 2001 From: Rick Ley Date: Tue, 22 Oct 2019 14:12:28 -0700 Subject: [PATCH 44/64] Optimizations for default block size on HTBB --- .../azure/storage/blob/BlobAsyncClient.java | 71 +++++++++++-------- .../blob/models/ParallelTransferOptions.java | 60 +++++++++++----- .../blob/specialized/BlobAsyncClientBase.java | 16 ++--- .../com/azure/storage/blob/APISpec.groovy | 12 ++++ .../blob/specialized/BlockBlobAPITest.groovy | 55 ++++++++++++-- 5 files changed, 150 insertions(+), 64 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java index 1db1debd2558..873969b6d9e8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java @@ -63,13 +63,20 @@ * #getPageBlobAsyncClient() getPageBlobAsyncClient} to construct a client that allows blob specific operations. * *

    - * Please refer to the Azure + * Please refer to the + * Azure * Docs for more information. */ public class BlobAsyncClient extends BlobAsyncClientBase { public static final int BLOB_DEFAULT_UPLOAD_BLOCK_SIZE = 4 * Constants.MB; + public static final int BLOB_DEFAULT_NUMBER_OF_BUFFERS = 8; + /** + * If a blob is known to be greater than 100MB, using a larger block size will trigger some server-side + * optimizations. If the block size is not set and the size of the blob is known to be greater than 100MB, this + * value will be used. + */ + public static final int BLOB_DEFAULT_HTBB_UPLOAD_BLOCK_SIZE = 8 * Constants.MB; static final int BLOB_MAX_UPLOAD_BLOCK_SIZE = 100 * Constants.MB; - private final ClientLogger logger = new ClientLogger(BlobAsyncClient.class); /** @@ -94,6 +101,7 @@ protected BlobAsyncClient(HttpPipeline pipeline, String url, BlobServiceVersion * Creates a new {@link BlobAsyncClient} linked to the {@code snapshot} of this blob resource. * * @param snapshot the identifier for a specific snapshot of this blob + * * @return a {@link BlobAsyncClient} used to interact with the specific snapshot. */ @Override @@ -174,6 +182,7 @@ private SpecializedBlobClientBuilder prepareBuilder() { * {@code Flux} be replayable. In other words, it does not have to support multiple subscribers and is not expected * to produce the same values across subscriptions. * @param parallelTransferOptions {@link ParallelTransferOptions} used to configure buffered uploading. + * * @return A reactive response containing the information of the uploaded block blob. */ public Mono upload(Flux data, ParallelTransferOptions parallelTransferOptions) { @@ -193,8 +202,8 @@ public Mono upload(Flux data, ParallelTransferOptions * see the Azure Docs for Put Block and * the Azure Docs for Put Block List. *

    - * The data passed need not support multiple subscriptions/be replayable as is required in other upload methods when - * retries are enabled, and the length of the data need not be known in advance. Therefore, this method should + * The data passed need not support multiple subscriptions/be replayable as is required in other upload methods + * when retries are enabled, and the length of the data need not be known in advance. Therefore, this method should * support uploading any arbitrary data source, including network streams. This behavior is possible because this * method will perform some internal buffering as configured by the blockSize and numBuffers parameters, so while * this method may offer additional convenience, it will not be as performant as other options, which should be @@ -202,8 +211,8 @@ public Mono upload(Flux data, ParallelTransferOptions *

    * Typically, the greater the number of buffers used, the greater the possible parallelism when transferring the * data. Larger buffers means we will have to stage fewer blocks and therefore require fewer IO operations. The - * trade-offs between these values are context-dependent, so some experimentation may be required to optimize inputs - * for a given scenario. + * trade-offs between these values are context-dependent, so some experimentation may be required to optimize + * inputs for a given scenario. * *

    Code Samples

    * @@ -232,18 +241,16 @@ public Mono> uploadWithResponse(Flux data, Objects.requireNonNull(data, "'data' must not be null"); BlobRequestConditions accessConditionsFinal = accessConditions == null ? new BlobRequestConditions() : accessConditions; - final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null - ? new ParallelTransferOptions() : parallelTransferOptions; - int blockSize = finalParallelTransferOptions.getBlockSize(); - int numBuffers = finalParallelTransferOptions.getNumBuffers(); - ProgressReceiver progressReceiver = finalParallelTransferOptions.getProgressReceiver(); + final ParallelTransferOptions finalParallelTransferOptions = new ParallelTransferOptions(); + finalParallelTransferOptions.populateAndApplyDefaults(parallelTransferOptions); // See ProgressReporter for an explanation on why this lock is necessary and why we use AtomicLong. AtomicLong totalProgress = new AtomicLong(0); Lock progressLock = new ReentrantLock(); // Validation done in the constructor. - UploadBufferPool pool = new UploadBufferPool(numBuffers, blockSize); + UploadBufferPool pool = new UploadBufferPool(finalParallelTransferOptions.getNumBuffers(), + finalParallelTransferOptions.getBlockSize()); /* Break the source Flux into chunks that are <= chunk size. This makes filling the pooled buffers much easier @@ -254,29 +261,30 @@ as we can guarantee we only need at most two buffers for any call to write (two Flux chunkedSource = data .filter(ByteBuffer::hasRemaining) .flatMapSequential(buffer -> { - if (buffer.remaining() <= blockSize) { + if (buffer.remaining() <= finalParallelTransferOptions.getBlockSize()) { return Flux.just(buffer); } - int numSplits = (int) Math.ceil(buffer.remaining() / (double) blockSize); + int numSplits = + (int) Math.ceil(buffer.remaining() / (double) finalParallelTransferOptions.getBlockSize()); return Flux.range(0, numSplits) .map(i -> { ByteBuffer duplicate = buffer.duplicate().asReadOnlyBuffer(); - duplicate.position(i * blockSize); - duplicate.limit(Math.min(duplicate.limit(), (i + 1) * blockSize)); + duplicate.position(i * finalParallelTransferOptions.getBlockSize()); + duplicate.limit(Math.min(duplicate.limit(), + (i + 1) * finalParallelTransferOptions.getBlockSize())); return duplicate; }); }); - /* - Write to the pool and upload the output. - */ + /* + Write to the pool and upload the output. + */ return chunkedSource.concatMap(pool::write) .concatWith(Flux.defer(pool::flush)) .flatMapSequential(buffer -> { // Report progress as necessary. Flux progressData = ProgressReporter.addParallelProgressReporting(Flux.just(buffer), - progressReceiver, progressLock, totalProgress); - + finalParallelTransferOptions.getProgressReceiver(), progressLock, totalProgress); final String blockId = Base64.getEncoder().encodeToString( UUID.randomUUID().toString().getBytes(UTF_8)); @@ -296,7 +304,6 @@ as we can guarantee we only need at most two buffers for any call to write (two } catch (RuntimeException ex) { return monoError(logger, ex); } - } /** @@ -308,6 +315,7 @@ as we can guarantee we only need at most two buffers for any call to write (two * {@codesnippet com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String} * * @param filePath Path to the upload file + * * @return An empty response */ public Mono uploadFromFile(String filePath) { @@ -334,6 +342,7 @@ public Mono uploadFromFile(String filePath) { * @param tier {@link AccessTier} for the destination blob. * @param accessConditions {@link BlobRequestConditions} * @return An empty response + * * @throws IllegalArgumentException If {@code blockSize} is less than 0 or greater than 100MB * @throws UncheckedIOException If an I/O error occurs */ @@ -342,10 +351,8 @@ public Mono uploadFromFile(String filePath, ParallelTransferOptions parall BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobRequestConditions accessConditions) { try { - final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null - ? new ParallelTransferOptions() - : parallelTransferOptions; - ProgressReceiver progressReceiver = finalParallelTransferOptions.getProgressReceiver(); + ParallelTransferOptions finalParallelTransferOptions = new ParallelTransferOptions(); + finalParallelTransferOptions.populateAndApplyDefaults(parallelTransferOptions); // See ProgressReporter for an explanation on why this lock is necessary and why we use AtomicLong. AtomicLong totalProgress = new AtomicLong(0); @@ -354,14 +361,15 @@ public Mono uploadFromFile(String filePath, ParallelTransferOptions parall return Mono.using(() -> uploadFileResourceSupplier(filePath), channel -> { final SortedMap blockIds = new TreeMap<>(); - return Flux.fromIterable(sliceFile(filePath, finalParallelTransferOptions.getBlockSize())) + return Flux.fromIterable(sliceFile(filePath, finalParallelTransferOptions.getBlockSize(), + parallelTransferOptions == null || parallelTransferOptions.getBlockSize() == null)) .doOnNext(chunk -> blockIds.put(chunk.getOffset(), getBlockID())) .flatMap(chunk -> { String blockId = blockIds.get(chunk.getOffset()); Flux progressData = ProgressReporter.addParallelProgressReporting( FluxUtil.readFile(channel, chunk.getOffset(), chunk.getCount()), - progressReceiver, progressLock, totalProgress); + finalParallelTransferOptions.getProgressReceiver(), progressLock, totalProgress); return getBlockBlobAsyncClient() .stageBlockWithResponse(blockId, progressData, chunk.getCount(), null); @@ -386,7 +394,9 @@ public Mono uploadFromFile(String filePath, ParallelTransferOptions parall * Resource Supplier for UploadFile * * @param filePath The path for the file + * * @return {@code AsynchronousFileChannel} + * * @throws UncheckedIOException an input output exception. */ protected AsynchronousFileChannel uploadFileResourceSupplier(String filePath) { @@ -409,9 +419,12 @@ private String getBlockID() { return Base64.getEncoder().encodeToString(UUID.randomUUID().toString().getBytes(StandardCharsets.UTF_8)); } - private List sliceFile(String path, int blockSize) { + private List sliceFile(String path, int blockSize, boolean enableHtbbOptimizations) { File file = new File(path); assert file.exists(); + if (file.length() > 100 * Constants.MB && enableHtbbOptimizations) { + blockSize = BLOB_DEFAULT_HTBB_UPLOAD_BLOCK_SIZE; + } List ranges = new ArrayList<>(); for (long pos = 0; pos < file.length(); pos += blockSize) { long count = blockSize; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java index 9bce7e90712d..c4eae55a8e45 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java @@ -5,40 +5,36 @@ import com.azure.core.annotation.Fluent; import com.azure.storage.blob.ProgressReceiver; +import com.azure.storage.blob.specialized.BlockBlobAsyncClient; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; +import static com.azure.storage.blob.BlobAsyncClient.BLOB_DEFAULT_NUMBER_OF_BUFFERS; +import static com.azure.storage.blob.BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE; + /** * This class contains configuration used to parallelize data transfer operations. */ @Fluent -public class ParallelTransferOptions { - - private static final int BLOB_DEFAULT_UPLOAD_BLOCK_SIZE = 4 * Constants.MB; - private static final int BLOB_MAX_BLOCK_SIZE = 100 * Constants.MB; +public final class ParallelTransferOptions { - private static final int BLOB_DEFAULT_NUMBER_OF_PARALLEL_TRANSFERS = 8; + private static final int BLOB_MAX_UPLOAD_BLOCK_SIZE = 100 * Constants.MB; - private int blockSize; - private int numBuffers; + private Integer blockSize; + private Integer numBuffers; private ProgressReceiver progressReceiver; /** * Creates a new {@link ParallelTransferOptions} with default parameters applied. - * blockSize = 4MB - * numBuffers = 8 */ public ParallelTransferOptions() { - this.blockSize = BLOB_DEFAULT_UPLOAD_BLOCK_SIZE; - this.numBuffers = BLOB_DEFAULT_NUMBER_OF_PARALLEL_TRANSFERS; - this.progressReceiver = null; } /** * Gets the block size (chunk size) to transfer at a time. * @return The block size. */ - public int getBlockSize() { + public Integer getBlockSize() { return this.blockSize; } @@ -46,7 +42,7 @@ public int getBlockSize() { * Gets the number of buffers being used for a transfer operation. * @return The number of buffers. */ - public int getNumBuffers() { + public Integer getNumBuffers() { return this.numBuffers; } @@ -68,8 +64,10 @@ public ProgressReceiver getProgressReceiver() { * @return The updated ParallelTransferOptions object. * @throws IllegalArgumentException when block size is less than 0 or greater than max blob block size (10MB). */ - public ParallelTransferOptions setBlockSize(int blockSize) { - StorageImplUtils.assertInBounds("blockSize", blockSize, 0, BLOB_MAX_BLOCK_SIZE); + public ParallelTransferOptions setBlockSize(Integer blockSize) { + if (blockSize != null) { + StorageImplUtils.assertInBounds("blockSize", blockSize, 0, BlockBlobAsyncClient.MAX_STAGE_BLOCK_BYTES); + } this.blockSize = blockSize; return this; } @@ -77,21 +75,45 @@ public ParallelTransferOptions setBlockSize(int blockSize) { /** * Sets the number of buffers being used for an upload/download operation. * @param numBuffers The number of buffers. - * For upload, The number of buffers is the maximum number of buffers this method should allocate. + * For buffered upload only, the number of buffers is the maximum number of buffers this method should allocate. * Must be at least two. Typically, the larger the number of buffers, the more parallel, and thus faster, the * upload portion of this operation will be. The amount of memory consumed by this method may be up to * blockSize * numBuffers. * @return The updated ParallelTransferOptions object. * @throws IllegalArgumentException when numBuffers is less than 2. */ - public ParallelTransferOptions setNumBuffers(int numBuffers) { - StorageImplUtils.assertInBounds("numBuffers", numBuffers, 2, Integer.MAX_VALUE); + public ParallelTransferOptions setNumBuffers(Integer numBuffers) { + if (numBuffers != null) { + StorageImplUtils.assertInBounds("numBuffers", numBuffers, 2, Integer.MAX_VALUE); + } this.numBuffers = numBuffers; return this; } + /** + * Sets the progress receiver for parallel reporting. + * @param progressReceiver The progress receiver. + * @return The updated ParallelTransferOptions object. + */ public ParallelTransferOptions setProgressReceiver(ProgressReceiver progressReceiver) { this.progressReceiver = progressReceiver; return this; } + + /** + * RESERVED FOR INTERNAL USE. + * + * @param other The customer provided transfer options. If it has non-null values, they will be used, otherwise + * defaults will be set. + */ + public void populateAndApplyDefaults(ParallelTransferOptions other) { + if (other == null) { + other = new ParallelTransferOptions(); + } + this.setBlockSize(other.getBlockSize() == null + ? Integer.valueOf(BLOB_DEFAULT_UPLOAD_BLOCK_SIZE) : other.getBlockSize()); + this.setNumBuffers(other.getNumBuffers() == null + ? Integer.valueOf(BLOB_DEFAULT_NUMBER_OF_BUFFERS) : other.getNumBuffers()); + this.setProgressReceiver(other.getProgressReceiver()); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index fa0ee80e33fb..2e094145e6e7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -3,6 +3,7 @@ package com.azure.storage.blob.specialized; +import static com.azure.core.implementation.util.FluxUtil.withContext; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; import com.azure.core.http.RequestConditions; @@ -65,7 +66,6 @@ import static com.azure.core.implementation.util.FluxUtil.fluxError; import static com.azure.core.implementation.util.FluxUtil.monoError; -import static com.azure.core.implementation.util.FluxUtil.withContext; /** * This class provides a client that contains all operations that apply to any blob type. @@ -747,11 +747,9 @@ public Mono> downloadToFileWithResponse(String filePath // TODO (gapra) : Investigate if this is can be parallelized, and include the parallelTransfers parameter. Mono> downloadToFileWithResponse(String filePath, BlobRange range, ParallelTransferOptions parallelTransferOptions, ReliableDownloadOptions options, - BlobRequestConditions accessConditions, boolean rangeGetContentMd5, Context context) { - final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null - ? new ParallelTransferOptions() - : parallelTransferOptions; - ProgressReceiver progressReceiver = finalParallelTransferOptions.getProgressReceiver(); + BlobRequestConditions accessConditions, boolean rangeGetContentMD5, Context context) { + ParallelTransferOptions finalParallelTransferOptions = new ParallelTransferOptions(); + finalParallelTransferOptions.populateAndApplyDefaults(parallelTransferOptions); // See ProgressReporter for an explanation on why this lock is necessary and why we use AtomicLong. AtomicLong totalProgress = new AtomicLong(0); @@ -760,9 +758,9 @@ Mono> downloadToFileWithResponse(String filePath, BlobR return Mono.using(() -> downloadToFileResourceSupplier(filePath), channel -> getPropertiesWithResponse(accessConditions) .flatMap(response -> processInRange(channel, response, - range, finalParallelTransferOptions.getBlockSize(), options, accessConditions, rangeGetContentMd5, - context, totalProgress, progressLock, progressReceiver)), this::downloadToFileCleanup); - + range, finalParallelTransferOptions.getBlockSize(), options, accessConditions, rangeGetContentMD5, + context, totalProgress, progressLock, finalParallelTransferOptions.getProgressReceiver())), + this::downloadToFileCleanup); } private Mono> processInRange(AsynchronousFileChannel channel, diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index c99dc35509d9..096f2cc49810 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -475,6 +475,18 @@ class APISpec extends Specification { return ByteBuffer.wrap(getRandomByteArray(size)) } + /* + We only allow int because anything larger than 2GB (which would require a long) is left to stress/perf. + */ + File getRandomFile(int size) { + File file = File.createTempFile(UUID.randomUUID().toString(), ".txt") + file.deleteOnExit() + FileOutputStream fos = new FileOutputStream(file) + fos.write(getRandomData(size).array()) + fos.close() + return file + } + /** * This will retrieve the etag to be used in testing match conditions. The result will typically be assigned to * the ifMatch condition when testing success and the ifNoneMatch condition when testing failure. diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy index 53340ca41b55..7cb4f3c44d25 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy @@ -35,7 +35,10 @@ import spock.lang.Requires import spock.lang.Unroll import java.nio.ByteBuffer +import java.nio.channels.AsynchronousFileChannel import java.nio.charset.StandardCharsets +import java.nio.file.Paths +import java.nio.file.StandardOpenOption import java.security.MessageDigest class BlockBlobAPITest extends APISpec { @@ -593,17 +596,56 @@ class BlockBlobAPITest extends APISpec { */ @Requires({ liveMode() }) + @Unroll def "Upload from file"() { - given: - def file = new File(this.getClass().getResource("/testfiles/uploadFromFileTestData.txt").getPath()) - def outStream = new ByteArrayOutputStream() + setup: + def file = getRandomFile(fileSize) + def channel = AsynchronousFileChannel.open(file.toPath()) when: - blobClient.uploadFromFile(file.getAbsolutePath()) + // Block length will be ignored for single shot. + blobac.uploadFromFile(file.toPath().toString(), new ParallelTransferOptions().setBlockSize(blockSize), + null, null, null, null).block() then: - bc.download(outStream) - outStream.toByteArray() == new Scanner(file).useDelimiter("\\z").next().getBytes(StandardCharsets.UTF_8) + def outFile = file.getPath().toString() + "result" + def outChannel = AsynchronousFileChannel.open(Paths.get(outFile), StandardOpenOption.CREATE, StandardOpenOption.WRITE) + FluxUtil.writeFile(blobac.download(), outChannel).block() == null + + compareFiles(file, new File(outFile)) + blobac.getBlockBlobAsyncClient().listBlocks(BlockListType.COMMITTED).block().getCommittedBlocks().size() == + commitedBlockCount + + cleanup: + channel.close() + + where: + fileSize | blockSize || commitedBlockCount + 0 | null || 0 + 10 | null || 1 + 10 * 1024 | null || 1 + 50 * 1024 * 1024 | null || Math.ceil((50 * 1024 * 1024) / BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE) + BlockBlobAsyncClient.MAX_UPLOAD_BLOB_BYTES + 1 | null || Math.ceil((BlockBlobClient.MAX_UPLOAD_BLOB_BYTES + 1) / BlobAsyncClient.BLOB_DEFAULT_HTBB_UPLOAD_BLOCK_SIZE) // HTBB optimizations should trigger when file size is >100MB and defaults are used. + 101 * 1024 * 1024 | 4 * 1024 * 1024 || 26 // Making the block size explicit should cancel the optimization + } + + def compareFiles(File file1, File file2) { + FileInputStream fis1 = new FileInputStream(file1) + FileInputStream fis2 = new FileInputStream(file2) + + byte b1 = fis1.read() + byte b2 = fis2.read() + + while (b1 != -1 && b2 != -1) { + if (b1 != b2) { + return false + } + b1 = fis1.read() + b2 = fis2.read() + } + fis1.close() + fis2.close() + return b1 == b2 } @Requires({ liveMode() }) @@ -724,7 +766,6 @@ class BlockBlobAPITest extends APISpec { .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) - expect: bc.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null, bac, null, null).getStatusCode() == 201 From b37096f95d33b13ee0c4b30ea9dad932434a6ee8 Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Tue, 22 Oct 2019 22:16:01 -0700 Subject: [PATCH 45/64] Network: generate package-2019-09 (#5984) --- network/resource-manager/v2019_09_01/pom.xml | 135 + .../AadAuthenticationParameters.java | 95 + .../network/v2019_09_01/Access.java | 41 + .../network/v2019_09_01/AddressSpace.java | 46 + .../v2019_09_01/ApplicationGateway.java | 786 +++ ...ationGatewayAuthenticationCertificate.java | 119 + ...licationGatewayAutoscaleConfiguration.java | 69 + ...ApplicationGatewayAvailableSslOptions.java | 68 + ...tionGatewayAvailableWafRuleSetsResult.java | 26 + .../ApplicationGatewayBackendAddress.java | 69 + .../ApplicationGatewayBackendAddressPool.java | 136 + .../ApplicationGatewayBackendHealth.java | 26 + ...ationGatewayBackendHealthHttpSettings.java | 70 + ...plicationGatewayBackendHealthOnDemand.java | 30 + .../ApplicationGatewayBackendHealthPool.java | 70 + ...ApplicationGatewayBackendHealthServer.java | 123 + ...ationGatewayBackendHealthServerHealth.java | 50 + ...ApplicationGatewayBackendHttpSettings.java | 437 ++ .../ApplicationGatewayConnectionDraining.java | 72 + ...ApplicationGatewayCookieBasedAffinity.java | 41 + .../ApplicationGatewayCustomError.java | 70 + ...plicationGatewayCustomErrorStatusCode.java | 41 + ...ationGatewayFirewallDisabledRuleGroup.java | 71 + .../ApplicationGatewayFirewallExclusion.java | 97 + .../ApplicationGatewayFirewallMode.java | 41 + .../ApplicationGatewayFirewallRule.java | 69 + .../ApplicationGatewayFirewallRuleGroup.java | 96 + .../ApplicationGatewayFirewallRuleSet.java | 143 + ...icationGatewayFrontendIPConfiguration.java | 198 + .../ApplicationGatewayFrontendPort.java | 118 + ...ApplicationGatewayHeaderConfiguration.java | 69 + .../ApplicationGatewayHttpListener.java | 328 ++ .../ApplicationGatewayIPConfiguration.java | 122 + .../ApplicationGatewayOnDemandProbe.java | 233 + .../ApplicationGatewayOperationalState.java | 47 + .../ApplicationGatewayPathRule.java | 249 + .../v2019_09_01/ApplicationGatewayProbe.java | 365 ++ ...cationGatewayProbeHealthResponseMatch.java | 72 + .../ApplicationGatewayProtocol.java | 41 + ...plicationGatewayRedirectConfiguration.java | 287 ++ .../ApplicationGatewayRedirectType.java | 47 + .../ApplicationGatewayRequestRoutingRule.java | 301 ++ ...licationGatewayRequestRoutingRuleType.java | 41 + .../ApplicationGatewayRewriteRule.java | 123 + ...pplicationGatewayRewriteRuleActionSet.java | 70 + ...pplicationGatewayRewriteRuleCondition.java | 124 + .../ApplicationGatewayRewriteRuleSet.java | 105 + .../v2019_09_01/ApplicationGatewaySku.java | 98 + .../ApplicationGatewaySkuName.java | 56 + .../ApplicationGatewaySslCertificate.java | 189 + .../ApplicationGatewaySslCipherSuite.java | 119 + .../ApplicationGatewaySslPolicy.java | 152 + .../ApplicationGatewaySslPolicyName.java | 44 + .../ApplicationGatewaySslPolicyType.java | 41 + ...ApplicationGatewaySslPredefinedPolicy.java | 41 + .../ApplicationGatewaySslProtocol.java | 44 + .../v2019_09_01/ApplicationGatewayTier.java | 47 + ...licationGatewayTrustedRootCertificate.java | 146 + .../ApplicationGatewayUrlPathMap.java | 224 + ...ayWebApplicationFirewallConfiguration.java | 280 ++ .../v2019_09_01/ApplicationGateways.java | 124 + .../v2019_09_01/ApplicationRuleCondition.java | 152 + .../v2019_09_01/ApplicationSecurityGroup.java | 83 + .../ApplicationSecurityGroups.java | 25 + .../network/v2019_09_01/AssociationType.java | 41 + .../v2019_09_01/AuthenticationMethod.java | 41 + .../v2019_09_01/AuthorizationUseStatus.java | 41 + .../AutoApprovedPrivateLinkService.java | 25 + .../network/v2019_09_01/Availability.java | 95 + .../v2019_09_01/AvailableDelegations.java | 28 + .../AvailableEndpointServices.java | 28 + .../AvailablePrivateEndpointType.java | 40 + .../AvailablePrivateEndpointTypes.java | 38 + .../v2019_09_01/AvailableProvidersList.java | 26 + .../AvailableProvidersListCity.java | 70 + .../AvailableProvidersListCountry.java | 96 + .../AvailableProvidersListParameters.java | 122 + .../AvailableProvidersListState.java | 96 + .../AvailableResourceGroupDelegations.java | 29 + .../v2019_09_01/AvailableServiceAlias.java | 40 + .../v2019_09_01/AvailableServiceAliases.java | 38 + .../AzureAsyncOperationResult.java | 77 + .../network/v2019_09_01/AzureFirewall.java | 376 ++ .../AzureFirewallApplicationRule.java | 200 + ...zureFirewallApplicationRuleCollection.java | 157 + .../AzureFirewallApplicationRuleProtocol.java | 70 + ...reFirewallApplicationRuleProtocolType.java | 44 + .../v2019_09_01/AzureFirewallFqdnTag.java | 38 + .../v2019_09_01/AzureFirewallFqdnTags.java | 19 + .../AzureFirewallIPConfiguration.java | 148 + .../v2019_09_01/AzureFirewallNatRCAction.java | 43 + .../AzureFirewallNatRCActionType.java | 41 + .../v2019_09_01/AzureFirewallNatRule.java | 279 ++ .../AzureFirewallNatRuleCollection.java | 157 + .../v2019_09_01/AzureFirewallNetworkRule.java | 252 + .../AzureFirewallNetworkRuleCollection.java | 157 + .../AzureFirewallNetworkRuleProtocol.java | 47 + .../AzureFirewallPublicIPAddress.java | 43 + .../v2019_09_01/AzureFirewallRCAction.java | 43 + .../AzureFirewallRCActionType.java | 41 + .../network/v2019_09_01/AzureFirewallSku.java | 70 + .../v2019_09_01/AzureFirewallSkuName.java | 41 + .../v2019_09_01/AzureFirewallSkuTier.java | 38 + .../AzureFirewallThreatIntelMode.java | 44 + .../network/v2019_09_01/AzureFirewalls.java | 25 + .../v2019_09_01/AzureReachabilityReport.java | 36 + .../AzureReachabilityReportItem.java | 96 + .../AzureReachabilityReportLatencyInfo.java | 71 + .../AzureReachabilityReportLocation.java | 95 + .../AzureReachabilityReportParameters.java | 149 + .../network/v2019_09_01/BGPCommunity.java | 175 + .../v2019_09_01/BackendAddressPool.java | 69 + .../network/v2019_09_01/BastionHost.java | 137 + .../BastionHostIPConfiguration.java | 172 + .../network/v2019_09_01/BastionHosts.java | 25 + .../network/v2019_09_01/BgpPeerState.java | 50 + .../network/v2019_09_01/BgpPeerStatus.java | 138 + .../v2019_09_01/BgpPeerStatusListResult.java | 26 + .../v2019_09_01/BgpServiceCommunities.java | 19 + .../v2019_09_01/BgpServiceCommunity.java | 34 + .../network/v2019_09_01/BgpSettings.java | 95 + ...ckPrivateLinkServiceVisibilityRequest.java | 43 + .../v2019_09_01/CircuitConnectionStatus.java | 44 + .../ConnectionMonitorDestination.java | 95 + .../ConnectionMonitorParameters.java | 122 + .../ConnectionMonitorQueryResult.java | 31 + .../v2019_09_01/ConnectionMonitorResult.java | 260 + .../v2019_09_01/ConnectionMonitorSource.java | 69 + .../ConnectionMonitorSourceStatus.java | 44 + .../v2019_09_01/ConnectionMonitors.java | 86 + .../v2019_09_01/ConnectionResetSharedKey.java | 25 + .../v2019_09_01/ConnectionSharedKey.java | 30 + .../network/v2019_09_01/ConnectionState.java | 44 + .../v2019_09_01/ConnectionStateSnapshot.java | 270 ++ .../network/v2019_09_01/ConnectionStatus.java | 47 + .../v2019_09_01/ConnectivityDestination.java | 96 + .../network/v2019_09_01/ConnectivityHop.java | 108 + .../v2019_09_01/ConnectivityInformation.java | 56 + .../v2019_09_01/ConnectivityIssue.java | 83 + .../v2019_09_01/ConnectivityParameters.java | 122 + .../v2019_09_01/ConnectivitySource.java | 70 + .../network/v2019_09_01/Container.java | 17 + .../ContainerNetworkInterface.java | 151 + ...ontainerNetworkInterfaceConfiguration.java | 148 + ...tainerNetworkInterfaceIpConfiguration.java | 92 + .../v2019_09_01/DdosCustomPolicies.java | 23 + .../network/v2019_09_01/DdosCustomPolicy.java | 119 + .../v2019_09_01/DdosCustomPolicyProtocol.java | 44 + ...ustomPolicyTriggerSensitivityOverride.java | 47 + .../v2019_09_01/DdosProtectionPlan.java | 90 + .../v2019_09_01/DdosProtectionPlans.java | 25 + .../network/v2019_09_01/DdosSettings.java | 72 + .../DdosSettingsProtectionCoverage.java | 41 + .../v2019_09_01/DefaultSecurityRules.java | 40 + .../network/v2019_09_01/Delegation.java | 121 + .../network/v2019_09_01/DeviceProperties.java | 95 + .../network/v2019_09_01/DhGroup.java | 59 + .../network/v2019_09_01/DhcpOptions.java | 46 + .../network/v2019_09_01/Dimension.java | 95 + .../network/v2019_09_01/Direction.java | 41 + .../EffectiveNetworkSecurityGroup.java | 124 + ...ectiveNetworkSecurityGroupAssociation.java | 70 + ...fectiveNetworkSecurityGroupListResult.java | 31 + .../EffectiveNetworkSecurityRule.java | 420 ++ .../network/v2019_09_01/EffectiveRoute.java | 205 + .../v2019_09_01/EffectiveRouteListResult.java | 31 + .../v2019_09_01/EffectiveRouteSource.java | 47 + .../v2019_09_01/EffectiveRouteState.java | 41 + .../EffectiveSecurityRuleProtocol.java | 44 + .../v2019_09_01/EndpointServiceResult.java | 35 + .../management/network/v2019_09_01/Error.java | 148 + .../network/v2019_09_01/ErrorDetails.java | 95 + .../network/v2019_09_01/ErrorException.java | 44 + .../network/v2019_09_01/ErrorResponse.java | 44 + .../v2019_09_01/ErrorResponseException.java | 44 + .../EvaluatedNetworkSecurityGroup.java | 111 + .../network/v2019_09_01/EvaluationState.java | 44 + .../v2019_09_01/ExpressRouteCircuit.java | 368 ++ .../ExpressRouteCircuitArpTable.java | 121 + .../ExpressRouteCircuitAuthorization.java | 156 + .../ExpressRouteCircuitAuthorizations.java | 53 + .../ExpressRouteCircuitConnection.java | 269 ++ .../ExpressRouteCircuitConnections.java | 56 + .../ExpressRouteCircuitPeering.java | 556 +++ ...uitPeeringAdvertisedPublicPrefixState.java | 47 + .../ExpressRouteCircuitPeeringConfig.java | 165 + .../ExpressRouteCircuitPeeringId.java | 43 + .../ExpressRouteCircuitPeeringState.java | 41 + .../ExpressRouteCircuitPeerings.java | 53 + .../ExpressRouteCircuitReference.java | 43 + .../ExpressRouteCircuitRoutesTable.java | 148 + ...ExpressRouteCircuitRoutesTableSummary.java | 149 + ...RouteCircuitServiceProviderProperties.java | 95 + .../v2019_09_01/ExpressRouteCircuitSku.java | 97 + .../ExpressRouteCircuitSkuFamily.java | 41 + .../ExpressRouteCircuitSkuTier.java | 47 + .../v2019_09_01/ExpressRouteCircuitStats.java | 40 + .../v2019_09_01/ExpressRouteCircuits.java | 82 + ...xpressRouteCircuitsArpTableListResult.java | 31 + ...essRouteCircuitsRoutesTableListResult.java | 31 + ...eCircuitsRoutesTableSummaryListResult.java | 31 + .../v2019_09_01/ExpressRouteConnection.java | 228 + .../v2019_09_01/ExpressRouteConnectionId.java | 32 + .../ExpressRouteConnectionList.java | 27 + .../v2019_09_01/ExpressRouteConnections.java | 53 + .../ExpressRouteCrossConnection.java | 269 ++ .../ExpressRouteCrossConnectionPeering.java | 451 ++ .../ExpressRouteCrossConnectionPeerings.java | 53 + ...outeCrossConnectionRoutesTableSummary.java | 123 + .../ExpressRouteCrossConnections.java | 59 + ...nnectionsRoutesTableSummaryListResult.java | 31 + .../v2019_09_01/ExpressRouteGateway.java | 130 + ...tewayPropertiesAutoScaleConfiguration.java | 43 + ...ropertiesAutoScaleConfigurationBounds.java | 69 + .../v2019_09_01/ExpressRouteGateways.java | 25 + .../network/v2019_09_01/ExpressRouteLink.java | 77 + .../ExpressRouteLinkAdminState.java | 41 + .../ExpressRouteLinkConnectorType.java | 41 + .../ExpressRouteLinkMacSecCipher.java | 41 + .../ExpressRouteLinkMacSecConfig.java | 97 + .../v2019_09_01/ExpressRouteLinks.java | 40 + .../v2019_09_01/ExpressRoutePeeringState.java | 41 + .../v2019_09_01/ExpressRoutePeeringType.java | 44 + .../network/v2019_09_01/ExpressRoutePort.java | 256 + .../v2019_09_01/ExpressRoutePorts.java | 25 + .../ExpressRoutePortsEncapsulation.java | 41 + .../ExpressRoutePortsLocation.java | 44 + .../ExpressRoutePortsLocationBandwidths.java | 48 + .../ExpressRoutePortsLocations.java | 29 + .../ExpressRouteServiceProvider.java | 39 + ...RouteServiceProviderBandwidthsOffered.java | 69 + .../ExpressRouteServiceProviders.java | 19 + .../network/v2019_09_01/FirewallPolicies.java | 25 + .../network/v2019_09_01/FirewallPolicy.java | 153 + .../v2019_09_01/FirewallPolicyFilterRule.java | 74 + .../FirewallPolicyFilterRuleAction.java | 43 + .../FirewallPolicyFilterRuleActionType.java | 41 + .../v2019_09_01/FirewallPolicyNatRule.java | 125 + .../FirewallPolicyNatRuleAction.java | 43 + .../FirewallPolicyNatRuleActionType.java | 38 + .../v2019_09_01/FirewallPolicyRule.java | 78 + .../FirewallPolicyRuleCondition.java | 78 + ...olicyRuleConditionApplicationProtocol.java | 69 + ...yRuleConditionApplicationProtocolType.java | 41 + ...allPolicyRuleConditionNetworkProtocol.java | 47 + .../v2019_09_01/FirewallPolicyRuleGroup.java | 205 + .../v2019_09_01/FirewallPolicyRuleGroups.java | 53 + .../v2019_09_01/FlowLogFormatParameters.java | 69 + .../v2019_09_01/FlowLogFormatType.java | 38 + .../v2019_09_01/FlowLogInformation.java | 50 + .../v2019_09_01/FlowLogStatusParameters.java | 45 + .../v2019_09_01/FrontendIPConfiguration.java | 104 + .../network/v2019_09_01/GatewayRoute.java | 122 + .../v2019_09_01/GatewayRouteListResult.java | 26 + .../GetVpnSitesConfigurationRequest.java | 71 + .../v2019_09_01/HTTPConfiguration.java | 96 + .../network/v2019_09_01/HTTPHeader.java | 69 + .../network/v2019_09_01/HTTPMethod.java | 38 + .../network/v2019_09_01/HubIPAddresses.java | 70 + .../HubVirtualNetworkConnection.java | 63 + .../HubVirtualNetworkConnectionStatus.java | 47 + .../HubVirtualNetworkConnections.java | 40 + .../IPAddressAvailabilityResult.java | 31 + .../v2019_09_01/IPAllocationMethod.java | 41 + .../network/v2019_09_01/IPConfiguration.java | 185 + .../v2019_09_01/IPConfigurationProfile.java | 120 + .../network/v2019_09_01/IPVersion.java | 41 + .../network/v2019_09_01/IkeEncryption.java | 56 + .../network/v2019_09_01/IkeIntegrity.java | 53 + .../network/v2019_09_01/InboundNatPool.java | 315 ++ .../network/v2019_09_01/InboundNatRule.java | 355 ++ .../network/v2019_09_01/InboundNatRules.java | 53 + .../network/v2019_09_01/IpFlowProtocol.java | 41 + .../network/v2019_09_01/IpGroup.java | 114 + .../network/v2019_09_01/IpGroups.java | 25 + .../management/network/v2019_09_01/IpTag.java | 69 + .../network/v2019_09_01/IpsecEncryption.java | 62 + .../network/v2019_09_01/IpsecIntegrity.java | 53 + .../network/v2019_09_01/IpsecPolicy.java | 236 + .../Ipv6ExpressRouteCircuitPeeringConfig.java | 148 + .../network/v2019_09_01/IssueType.java | 62 + .../network/v2019_09_01/LoadBalancer.java | 322 ++ .../LoadBalancerBackendAddressPools.java | 40 + .../LoadBalancerFrontendIPConfigurations.java | 40 + .../LoadBalancerLoadBalancingRules.java | 40 + .../LoadBalancerNetworkInterface.java | 118 + .../LoadBalancerNetworkInterfaces.java | 29 + .../LoadBalancerOutboundRuleProtocol.java | 44 + .../LoadBalancerOutboundRules.java | 40 + .../v2019_09_01/LoadBalancerProbes.java | 40 + .../network/v2019_09_01/LoadBalancerSku.java | 44 + .../v2019_09_01/LoadBalancerSkuName.java | 41 + .../network/v2019_09_01/LoadBalancers.java | 25 + .../v2019_09_01/LoadBalancingRule.java | 103 + .../network/v2019_09_01/LoadDistribution.java | 44 + .../v2019_09_01/LocalNetworkGateway.java | 170 + .../v2019_09_01/LocalNetworkGateways.java | 24 + .../LocationAvailableDelegation.java | 46 + .../LocationAvailableDelegationModel.java | 46 + .../network/v2019_09_01/LogSpecification.java | 95 + .../v2019_09_01/ManagedRuleEnabledState.java | 38 + .../v2019_09_01/ManagedRuleGroupOverride.java | 71 + .../v2019_09_01/ManagedRuleOverride.java | 70 + .../network/v2019_09_01/ManagedRuleSet.java | 96 + .../v2019_09_01/ManagedRulesDefinition.java | 70 + .../v2019_09_01/ManagedServiceIdentity.java | 108 + ...ceIdentityUserAssignedIdentitiesValue.java | 47 + .../network/v2019_09_01/MatchCondition.java | 150 + .../network/v2019_09_01/MatchVariable.java | 71 + .../network/v2019_09_01/MatchedRule.java | 70 + .../v2019_09_01/MetricSpecification.java | 382 ++ .../network/v2019_09_01/NatGateway.java | 235 + .../network/v2019_09_01/NatGatewaySku.java | 43 + .../v2019_09_01/NatGatewaySkuName.java | 38 + .../network/v2019_09_01/NatGateways.java | 25 + ...workConfigurationDiagnosticParameters.java | 98 + ...NetworkConfigurationDiagnosticProfile.java | 150 + ...etworkConfigurationDiagnosticResponse.java | 26 + .../NetworkConfigurationDiagnosticResult.java | 70 + .../v2019_09_01/NetworkIntentPolicy.java | 61 + .../NetworkIntentPolicyConfiguration.java | 71 + .../network/v2019_09_01/NetworkInterface.java | 262 + .../NetworkInterfaceAssociation.java | 60 + .../NetworkInterfaceDnsSettings.java | 125 + ...rationPrivateLinkConnectionProperties.java | 63 + .../NetworkInterfaceIPConfigurations.java | 40 + .../NetworkInterfaceLoadBalancer.java | 102 + .../NetworkInterfaceLoadBalancers.java | 29 + ...erfaceNetworkInterfaceIPConfiguration.java | 103 + .../NetworkInterfaceTapConfiguration.java | 176 + .../NetworkInterfaceTapConfigurations.java | 53 + .../v2019_09_01/NetworkInterfaces.java | 142 + .../v2019_09_01/NetworkOperationStatus.java | 44 + .../network/v2019_09_01/NetworkProfile.java | 118 + .../network/v2019_09_01/NetworkProfiles.java | 25 + .../v2019_09_01/NetworkRuleCondition.java | 126 + .../v2019_09_01/NetworkSecurityGroup.java | 129 + .../NetworkSecurityGroupResult.java | 60 + .../NetworkSecurityGroupSecurityRule.java | 542 +++ ...NetworkSecurityGroupSecurityRuleModel.java | 118 + .../v2019_09_01/NetworkSecurityGroups.java | 25 + .../NetworkSecurityRulesEvaluationResult.java | 173 + .../network/v2019_09_01/NetworkWatcher.java | 78 + .../network/v2019_09_01/NetworkWatchers.java | 158 + .../v2019_09_01/NextHopParameters.java | 123 + .../network/v2019_09_01/NextHopResult.java | 35 + .../network/v2019_09_01/NextHopType.java | 53 + .../v2019_09_01/OfficeTrafficCategory.java | 47 + .../network/v2019_09_01/Operation.java | 40 + .../network/v2019_09_01/OperationDisplay.java | 121 + ...nPropertiesFormatServiceSpecification.java | 70 + .../network/v2019_09_01/Operations.java | 27 + .../network/v2019_09_01/Origin.java | 44 + .../network/v2019_09_01/OutboundRule.java | 79 + .../v2019_09_01/OwaspCrsExclusionEntry.java | 100 + .../OwaspCrsExclusionEntryMatchVariable.java | 44 + ...rsExclusionEntrySelectorMatchOperator.java | 50 + .../P2SConnectionConfiguration.java | 105 + .../v2019_09_01/P2SVpnConnectionHealth.java | 25 + .../P2SVpnConnectionHealthRequest.java | 71 + .../network/v2019_09_01/P2SVpnGateway.java | 201 + .../v2019_09_01/P2SVpnProfileParameters.java | 44 + .../network/v2019_09_01/P2sVpnGateways.java | 56 + .../v2019_09_01/PacketCaptureFilter.java | 161 + .../v2019_09_01/PacketCaptureParameters.java | 174 + .../PacketCaptureQueryStatusResult.java | 52 + .../v2019_09_01/PacketCaptureResult.java | 244 + .../PacketCaptureStorageLocation.java | 100 + .../network/v2019_09_01/PacketCaptures.java | 75 + .../network/v2019_09_01/PatchRouteFilter.java | 168 + .../v2019_09_01/PatchRouteFilterRule.java | 156 + .../network/v2019_09_01/PcError.java | 50 + .../network/v2019_09_01/PcProtocol.java | 44 + .../network/v2019_09_01/PcStatus.java | 50 + .../PeerExpressRouteCircuitConnection.java | 78 + .../PeerExpressRouteCircuitConnections.java | 42 + .../network/v2019_09_01/PfsGroup.java | 62 + .../network/v2019_09_01/PolicySettings.java | 149 + .../PrepareNetworkPoliciesRequest.java | 70 + .../network/v2019_09_01/PrivateEndpoint.java | 172 + .../PrivateEndpointConnection.java | 111 + .../network/v2019_09_01/PrivateEndpoints.java | 25 + .../v2019_09_01/PrivateLinkService.java | 269 ++ .../PrivateLinkServiceConnection.java | 201 + .../PrivateLinkServiceConnectionState.java | 98 + .../PrivateLinkServiceIpConfiguration.java | 226 + ...vateLinkServicePropertiesAutoApproval.java | 16 + ...rivateLinkServicePropertiesVisibility.java | 16 + .../PrivateLinkServiceVisibility.java | 25 + .../v2019_09_01/PrivateLinkServices.java | 98 + .../management/network/v2019_09_01/Probe.java | 79 + .../network/v2019_09_01/ProbeProtocol.java | 44 + .../v2019_09_01/ProcessorArchitecture.java | 41 + .../network/v2019_09_01/Protocol.java | 47 + .../v2019_09_01/ProtocolConfiguration.java | 43 + .../ProtocolCustomSettingsFormat.java | 127 + .../v2019_09_01/ProvisioningState.java | 47 + .../network/v2019_09_01/PublicIPAddress.java | 380 ++ .../PublicIPAddressDnsSettings.java | 104 + .../v2019_09_01/PublicIPAddressSku.java | 44 + .../v2019_09_01/PublicIPAddressSkuName.java | 41 + .../v2019_09_01/PublicIPAddresses.java | 62 + .../network/v2019_09_01/PublicIPPrefix.java | 245 + .../v2019_09_01/PublicIPPrefixSku.java | 43 + .../v2019_09_01/PublicIPPrefixSkuName.java | 38 + .../network/v2019_09_01/PublicIPPrefixes.java | 25 + .../QueryTroubleshootingParameters.java | 43 + .../ReferencedPublicIpAddress.java | 43 + .../v2019_09_01/ResourceIdentityType.java | 59 + .../v2019_09_01/ResourceNavigationLinks.java | 30 + .../ResourceNavigationLinksListResult.java | 32 + .../network/v2019_09_01/ResourceSet.java | 44 + .../RetentionPolicyParameters.java | 69 + .../management/network/v2019_09_01/Route.java | 216 + .../network/v2019_09_01/RouteFilter.java | 119 + .../network/v2019_09_01/RouteFilterRule.java | 222 + .../network/v2019_09_01/RouteFilterRules.java | 53 + .../network/v2019_09_01/RouteFilters.java | 25 + .../network/v2019_09_01/RouteNextHopType.java | 50 + .../network/v2019_09_01/RouteTable.java | 143 + .../network/v2019_09_01/RouteTables.java | 25 + .../network/v2019_09_01/Routes.java | 53 + .../SecurityGroupNetworkInterface.java | 69 + .../SecurityGroupViewParameters.java | 43 + .../v2019_09_01/SecurityGroupViewResult.java | 26 + .../v2019_09_01/SecurityRuleAccess.java | 41 + .../v2019_09_01/SecurityRuleAssociations.java | 123 + .../v2019_09_01/SecurityRuleDirection.java | 41 + .../v2019_09_01/SecurityRuleProtocol.java | 53 + .../network/v2019_09_01/SecurityRules.java | 53 + .../v2019_09_01/ServiceAssociationLinks.java | 30 + .../ServiceAssociationLinksListResult.java | 32 + .../v2019_09_01/ServiceEndpointPolicies.java | 25 + .../v2019_09_01/ServiceEndpointPolicy.java | 119 + .../ServiceEndpointPolicyDefinition.java | 229 + .../ServiceEndpointPolicyDefinitions.java | 53 + .../ServiceEndpointPropertiesFormat.java | 86 + .../ServiceProviderProvisioningState.java | 47 + .../v2019_09_01/ServiceTagInformation.java | 62 + ...ServiceTagInformationPropertiesFormat.java | 78 + .../network/v2019_09_01/ServiceTags.java | 28 + .../v2019_09_01/ServiceTagsListResult.java | 51 + .../network/v2019_09_01/Severity.java | 41 + .../network/v2019_09_01/Subnet.java | 468 ++ .../v2019_09_01/SubnetAssociation.java | 60 + .../network/v2019_09_01/Subnets.java | 76 + .../network/v2019_09_01/TagsObject.java | 44 + .../network/v2019_09_01/Topology.java | 42 + .../v2019_09_01/TopologyAssociation.java | 96 + .../v2019_09_01/TopologyParameters.java | 96 + .../network/v2019_09_01/TopologyResource.java | 123 + ...afficAnalyticsConfigurationProperties.java | 148 + .../TrafficAnalyticsProperties.java | 43 + .../v2019_09_01/TrafficSelectorPolicy.java | 70 + .../v2019_09_01/TransportProtocol.java | 44 + .../v2019_09_01/TroubleshootingDetails.java | 148 + .../TroubleshootingParameters.java | 97 + .../TroubleshootingRecommendedActions.java | 123 + .../v2019_09_01/TroubleshootingResult.java | 42 + .../v2019_09_01/TunnelConnectionHealth.java | 93 + .../v2019_09_01/TunnelConnectionStatus.java | 47 + .../UnprepareNetworkPoliciesRequest.java | 43 + .../management/network/v2019_09_01/Usage.java | 45 + .../network/v2019_09_01/UsageName.java | 69 + .../network/v2019_09_01/Usages.java | 28 + .../network/v2019_09_01/VerbosityLevel.java | 44 + .../VerificationIPFlowParameters.java | 231 + .../v2019_09_01/VerificationIPFlowResult.java | 30 + .../network/v2019_09_01/VirtualHub.java | 401 ++ .../network/v2019_09_01/VirtualHubId.java | 45 + .../network/v2019_09_01/VirtualHubRoute.java | 70 + .../v2019_09_01/VirtualHubRouteTable.java | 44 + .../v2019_09_01/VirtualHubRouteTableV2.java | 200 + .../v2019_09_01/VirtualHubRouteTableV2s.java | 53 + .../v2019_09_01/VirtualHubRouteV2.java | 122 + .../network/v2019_09_01/VirtualHubs.java | 25 + ...aleSetNetworkInterfaceIPConfiguration.java | 103 + .../network/v2019_09_01/VirtualNetwork.java | 319 ++ .../VirtualNetworkBgpCommunities.java | 59 + ...tualNetworkConnectionGatewayReference.java | 43 + .../v2019_09_01/VirtualNetworkGateway.java | 438 ++ .../VirtualNetworkGatewayConnection.java | 489 ++ ...ualNetworkGatewayConnectionListEntity.java | 153 + ...rtualNetworkGatewayConnectionProtocol.java | 41 + ...VirtualNetworkGatewayConnectionStatus.java | 47 + .../VirtualNetworkGatewayConnectionType.java | 47 + .../VirtualNetworkGatewayConnections.java | 77 + .../VirtualNetworkGatewayIPConfiguration.java | 158 + .../v2019_09_01/VirtualNetworkGatewaySku.java | 90 + .../VirtualNetworkGatewaySkuName.java | 86 + .../VirtualNetworkGatewaySkuTier.java | 86 + .../VirtualNetworkGatewayType.java | 41 + .../v2019_09_01/VirtualNetworkGateways.java | 192 + .../v2019_09_01/VirtualNetworkPeering.java | 345 ++ .../VirtualNetworkPeeringState.java | 44 + .../v2019_09_01/VirtualNetworkPeerings.java | 53 + .../v2019_09_01/VirtualNetworkTap.java | 178 + .../v2019_09_01/VirtualNetworkTaps.java | 25 + .../v2019_09_01/VirtualNetworkUsage.java | 45 + .../v2019_09_01/VirtualNetworkUsageName.java | 47 + .../network/v2019_09_01/VirtualNetworks.java | 47 + .../network/v2019_09_01/VirtualRouter.java | 201 + .../v2019_09_01/VirtualRouterPeering.java | 204 + .../v2019_09_01/VirtualRouterPeerings.java | 53 + .../network/v2019_09_01/VirtualRouters.java | 25 + .../network/v2019_09_01/VirtualWAN.java | 235 + .../VirtualWanSecurityProvider.java | 96 + .../VirtualWanSecurityProviderType.java | 41 + .../VirtualWanVpnProfileParameters.java | 71 + .../network/v2019_09_01/VirtualWans.java | 25 + .../v2019_09_01/VpnAuthenticationType.java | 44 + .../v2019_09_01/VpnClientConfiguration.java | 284 ++ .../VpnClientConnectionHealth.java | 101 + .../VpnClientConnectionHealthDetail.java | 197 + ...lientConnectionHealthDetailListResult.java | 26 + .../v2019_09_01/VpnClientIPsecParameters.java | 60 + .../v2019_09_01/VpnClientParameters.java | 128 + .../v2019_09_01/VpnClientProtocol.java | 44 + .../VpnClientRevokedCertificate.java | 104 + .../v2019_09_01/VpnClientRootCertificate.java | 104 + .../network/v2019_09_01/VpnConnection.java | 531 ++ .../v2019_09_01/VpnConnectionStatus.java | 47 + ...ectionVpnGatewayVpnSiteLinkConnection.java | 114 + ...nVpnGatewayVpnSiteLinkConnectionModel.java | 112 + .../network/v2019_09_01/VpnConnections.java | 53 + .../VpnDeviceScriptParameters.java | 95 + .../network/v2019_09_01/VpnGateway.java | 197 + .../v2019_09_01/VpnGatewayGeneration.java | 44 + .../VpnGatewayTunnelingProtocol.java | 41 + .../network/v2019_09_01/VpnGateways.java | 35 + .../v2019_09_01/VpnLinkBgpSettings.java | 69 + .../v2019_09_01/VpnLinkConnections.java | 30 + .../VpnLinkProviderProperties.java | 69 + .../VpnPacketCaptureStartParameters.java | 43 + .../VpnPacketCaptureStopParameters.java | 43 + .../v2019_09_01/VpnProfileResponse.java | 25 + ...rverConfigRadiusClientRootCertificate.java | 69 + ...rverConfigRadiusServerRootCertificate.java | 69 + ...rverConfigVpnClientRevokedCertificate.java | 69 + ...nServerConfigVpnClientRootCertificate.java | 69 + .../v2019_09_01/VpnServerConfiguration.java | 408 ++ .../v2019_09_01/VpnServerConfigurations.java | 25 + ...nfigurationsAssociatedWithVirtualWans.java | 29 + .../VpnServerConfigurationsResponse.java | 26 + .../network/v2019_09_01/VpnSite.java | 313 ++ .../network/v2019_09_01/VpnSiteId.java | 32 + .../network/v2019_09_01/VpnSiteLink.java | 62 + .../v2019_09_01/VpnSiteLinkConnections.java | 31 + .../network/v2019_09_01/VpnSiteLinks.java | 40 + .../network/v2019_09_01/VpnSites.java | 25 + .../v2019_09_01/VpnSitesConfigurations.java | 30 + .../network/v2019_09_01/VpnType.java | 41 + .../WebApplicationFirewallAction.java | 44 + .../WebApplicationFirewallCustomRule.java | 165 + .../WebApplicationFirewallEnabledState.java | 41 + .../WebApplicationFirewallMatchVariable.java | 59 + .../WebApplicationFirewallMode.java | 41 + .../WebApplicationFirewallOperator.java | 68 + .../WebApplicationFirewallPolicies.java | 25 + .../WebApplicationFirewallPolicy.java | 175 + ...pplicationFirewallPolicyResourceState.java | 53 + .../WebApplicationFirewallRuleType.java | 41 + .../WebApplicationFirewallTransform.java | 53 + ...icationGatewayAvailableSslOptionsImpl.java | 77 + ...cationGatewayAvailableSslOptionsInner.java | 159 + ...GatewayAvailableWafRuleSetsResultImpl.java | 33 + ...atewayAvailableWafRuleSetsResultInner.java | 45 + .../ApplicationGatewayBackendHealthImpl.java | 33 + .../ApplicationGatewayBackendHealthInner.java | 45 + ...ationGatewayBackendHealthOnDemandImpl.java | 38 + ...tionGatewayBackendHealthOnDemandInner.java | 71 + .../ApplicationGatewayImpl.java | 354 ++ .../ApplicationGatewayInner.java | 781 +++ ...icationGatewaySslPredefinedPolicyImpl.java | 49 + ...cationGatewaySslPredefinedPolicyInner.java | 103 + .../ApplicationGatewaysImpl.java | 268 ++ .../ApplicationGatewaysInner.java | 2781 +++++++++++ .../ApplicationSecurityGroupImpl.java | 62 + .../ApplicationSecurityGroupInner.java | 97 + .../ApplicationSecurityGroupsImpl.java | 138 + .../ApplicationSecurityGroupsInner.java | 1126 +++++ .../AutoApprovedPrivateLinkServiceImpl.java | 35 + .../AutoApprovedPrivateLinkServiceInner.java | 43 + .../AvailableDelegationInner.java | 149 + .../AvailableDelegationsImpl.java | 53 + .../AvailableDelegationsInner.java | 293 ++ .../AvailableEndpointServicesImpl.java | 53 + .../AvailableEndpointServicesInner.java | 293 ++ .../AvailablePrivateEndpointTypeImpl.java | 50 + .../AvailablePrivateEndpointTypeInner.java | 121 + .../AvailablePrivateEndpointTypesImpl.java | 71 + .../AvailablePrivateEndpointTypesInner.java | 533 +++ .../AvailableProvidersListImpl.java | 33 + .../AvailableProvidersListInner.java | 45 + ...AvailableResourceGroupDelegationsImpl.java | 53 + ...vailableResourceGroupDelegationsInner.java | 301 ++ .../AvailableServiceAliasImpl.java | 50 + .../AvailableServiceAliasInner.java | 121 + .../AvailableServiceAliasesImpl.java | 71 + .../AvailableServiceAliasesInner.java | 533 +++ .../AzureFirewallFqdnTagImpl.java | 56 + .../AzureFirewallFqdnTagInner.java | 95 + .../AzureFirewallFqdnTagsImpl.java | 71 + .../AzureFirewallFqdnTagsInner.java | 285 ++ .../implementation/AzureFirewallImpl.java | 182 + .../implementation/AzureFirewallInner.java | 367 ++ .../implementation/AzureFirewallsImpl.java | 138 + .../implementation/AzureFirewallsInner.java | 1126 +++++ .../AzureReachabilityReportImpl.java | 44 + .../AzureReachabilityReportInner.java | 99 + .../BackendAddressPoolImpl.java | 99 + .../BackendAddressPoolInner.java | 158 + .../implementation/BastionHostImpl.java | 81 + .../implementation/BastionHostInner.java | 134 + .../implementation/BastionHostsImpl.java | 138 + .../implementation/BastionHostsInner.java | 948 ++++ .../BgpPeerStatusListResultImpl.java | 33 + .../BgpPeerStatusListResultInner.java | 45 + .../BgpServiceCommunitiesImpl.java | 71 + .../BgpServiceCommunitiesInner.java | 285 ++ .../BgpServiceCommunityImpl.java | 52 + .../BgpServiceCommunityInner.java | 102 + .../ConnectionMonitorInner.java | 179 + .../ConnectionMonitorQueryResultImpl.java | 39 + .../ConnectionMonitorQueryResultInner.java | 73 + .../ConnectionMonitorResultImpl.java | 206 + .../ConnectionMonitorResultInner.java | 234 + .../ConnectionMonitorsImpl.java | 110 + .../ConnectionMonitorsInner.java | 1326 +++++ .../ConnectionResetSharedKeyImpl.java | 31 + .../ConnectionResetSharedKeyInner.java | 44 + .../ConnectionSharedKeyImpl.java | 36 + .../ConnectionSharedKeyInner.java | 44 + .../ConnectivityInformationImpl.java | 64 + .../ConnectivityInformationInner.java | 126 + .../DdosCustomPoliciesImpl.java | 88 + .../DdosCustomPoliciesInner.java | 663 +++ .../implementation/DdosCustomPolicyImpl.java | 81 + .../implementation/DdosCustomPolicyInner.java | 142 + .../DdosProtectionPlanImpl.java | 69 + .../DdosProtectionPlanInner.java | 87 + .../DdosProtectionPlansImpl.java | 138 + .../DdosProtectionPlansInner.java | 1126 +++++ .../DefaultSecurityRulesImpl.java | 69 + .../DefaultSecurityRulesInner.java | 397 ++ .../DnsNameAvailabilityResultInner.java | 43 + ...iveNetworkSecurityGroupListResultImpl.java | 38 + ...veNetworkSecurityGroupListResultInner.java | 60 + .../EffectiveRouteListResultImpl.java | 38 + .../EffectiveRouteListResultInner.java | 60 + .../EndpointServiceResultImpl.java | 45 + .../EndpointServiceResultInner.java | 48 + .../ExpressRouteCircuitAuthorizationImpl.java | 128 + ...ExpressRouteCircuitAuthorizationInner.java | 126 + ...ExpressRouteCircuitAuthorizationsImpl.java | 85 + ...xpressRouteCircuitAuthorizationsInner.java | 764 +++ .../ExpressRouteCircuitConnectionImpl.java | 171 + .../ExpressRouteCircuitConnectionInner.java | 217 + .../ExpressRouteCircuitConnectionsImpl.java | 85 + .../ExpressRouteCircuitConnectionsInner.java | 807 ++++ .../ExpressRouteCircuitImpl.java | 201 + .../ExpressRouteCircuitInner.java | 398 ++ .../ExpressRouteCircuitPeeringImpl.java | 318 ++ .../ExpressRouteCircuitPeeringInner.java | 531 ++ .../ExpressRouteCircuitPeeringsImpl.java | 85 + .../ExpressRouteCircuitPeeringsInner.java | 764 +++ .../ExpressRouteCircuitStatsImpl.java | 46 + .../ExpressRouteCircuitStatsInner.java | 121 + ...ssRouteCircuitsArpTableListResultImpl.java | 38 + ...sRouteCircuitsArpTableListResultInner.java | 71 + .../ExpressRouteCircuitsImpl.java | 202 + .../ExpressRouteCircuitsInner.java | 1878 ++++++++ ...outeCircuitsRoutesTableListResultImpl.java | 38 + ...uteCircuitsRoutesTableListResultInner.java | 71 + ...cuitsRoutesTableSummaryListResultImpl.java | 38 + ...uitsRoutesTableSummaryListResultInner.java | 71 + .../ExpressRouteConnectionImpl.java | 152 + .../ExpressRouteConnectionInner.java | 168 + .../ExpressRouteConnectionListImpl.java | 32 + .../ExpressRouteConnectionListInner.java | 44 + .../ExpressRouteConnectionsImpl.java | 79 + .../ExpressRouteConnectionsInner.java | 606 +++ .../ExpressRouteCrossConnectionImpl.java | 149 + .../ExpressRouteCrossConnectionInner.java | 286 ++ ...xpressRouteCrossConnectionPeeringImpl.java | 246 + ...pressRouteCrossConnectionPeeringInner.java | 405 ++ ...pressRouteCrossConnectionPeeringsImpl.java | 85 + ...ressRouteCrossConnectionPeeringsInner.java | 764 +++ .../ExpressRouteCrossConnectionsImpl.java | 140 + .../ExpressRouteCrossConnectionsInner.java | 1533 ++++++ ...tionsRoutesTableSummaryListResultImpl.java | 38 + ...ionsRoutesTableSummaryListResultInner.java | 61 + .../ExpressRouteGatewayImpl.java | 95 + .../ExpressRouteGatewayInner.java | 150 + .../ExpressRouteGatewaysImpl.java | 138 + .../ExpressRouteGatewaysInner.java | 662 +++ .../implementation/ExpressRouteLinkImpl.java | 102 + .../implementation/ExpressRouteLinkInner.java | 211 + .../implementation/ExpressRouteLinksImpl.java | 69 + .../ExpressRouteLinksInner.java | 397 ++ .../implementation/ExpressRoutePortImpl.java | 154 + .../implementation/ExpressRoutePortInner.java | 310 ++ .../implementation/ExpressRoutePortsImpl.java | 138 + .../ExpressRoutePortsInner.java | 1126 +++++ .../ExpressRoutePortsLocationImpl.java | 63 + .../ExpressRoutePortsLocationInner.java | 124 + .../ExpressRoutePortsLocationsImpl.java | 83 + .../ExpressRoutePortsLocationsInner.java | 367 ++ .../ExpressRouteServiceProviderImpl.java | 58 + .../ExpressRouteServiceProviderInner.java | 119 + .../ExpressRouteServiceProvidersImpl.java | 71 + .../ExpressRouteServiceProvidersInner.java | 285 ++ .../implementation/FirewallPoliciesImpl.java | 138 + .../implementation/FirewallPoliciesInner.java | 1030 ++++ .../implementation/FirewallPolicyImpl.java | 97 + .../implementation/FirewallPolicyInner.java | 182 + .../FirewallPolicyRuleGroupImpl.java | 141 + .../FirewallPolicyRuleGroupInner.java | 148 + .../FirewallPolicyRuleGroupsImpl.java | 85 + .../FirewallPolicyRuleGroupsInner.java | 764 +++ .../FlowLogInformationImpl.java | 59 + .../FlowLogInformationInner.java | 180 + .../FrontendIPConfigurationImpl.java | 140 + .../FrontendIPConfigurationInner.java | 344 ++ .../GatewayRouteListResultImpl.java | 33 + .../GatewayRouteListResultInner.java | 45 + .../HubVirtualNetworkConnectionImpl.java | 85 + .../HubVirtualNetworkConnectionInner.java | 183 + .../HubVirtualNetworkConnectionsImpl.java | 69 + .../HubVirtualNetworkConnectionsInner.java | 397 ++ .../IPAddressAvailabilityResultImpl.java | 37 + .../IPAddressAvailabilityResultInner.java | 71 + .../implementation/IdParsingUtils.java | 57 + .../implementation/InboundNatRuleImpl.java | 207 + .../implementation/InboundNatRuleInner.java | 306 ++ .../implementation/InboundNatRulesImpl.java | 85 + .../implementation/InboundNatRulesInner.java | 853 ++++ .../implementation/IpGroupImpl.java | 75 + .../implementation/IpGroupInner.java | 124 + .../implementation/IpGroupsImpl.java | 138 + .../implementation/IpGroupsInner.java | 1208 +++++ .../LoadBalancerBackendAddressPoolsImpl.java | 69 + .../LoadBalancerBackendAddressPoolsInner.java | 397 ++ ...dBalancerFrontendIPConfigurationsImpl.java | 69 + ...BalancerFrontendIPConfigurationsInner.java | 397 ++ .../implementation/LoadBalancerImpl.java | 196 + .../implementation/LoadBalancerInner.java | 319 ++ .../LoadBalancerLoadBalancingRulesImpl.java | 69 + .../LoadBalancerLoadBalancingRulesInner.java | 397 ++ .../LoadBalancerNetworkInterfaceImpl.java | 157 + .../LoadBalancerNetworkInterfacesImpl.java | 53 + .../LoadBalancerNetworkInterfacesInner.java | 301 ++ .../LoadBalancerOutboundRulesImpl.java | 69 + .../LoadBalancerOutboundRulesInner.java | 397 ++ .../LoadBalancerProbesImpl.java | 69 + .../LoadBalancerProbesInner.java | 397 ++ .../implementation/LoadBalancersImpl.java | 138 + .../implementation/LoadBalancersInner.java | 1208 +++++ .../implementation/LoadBalancingRuleImpl.java | 127 + .../LoadBalancingRuleInner.java | 398 ++ .../LocalNetworkGatewayImpl.java | 97 + .../LocalNetworkGatewayInner.java | 175 + .../LocalNetworkGatewaysImpl.java | 114 + .../LocalNetworkGatewaysInner.java | 901 ++++ .../LocationAvailableDelegationImpl.java | 56 + .../LocationAvailableDelegationModelImpl.java | 56 + .../implementation/NatGatewayImpl.java | 125 + .../implementation/NatGatewayInner.java | 245 + .../implementation/NatGatewaysImpl.java | 138 + .../implementation/NatGatewaysInner.java | 1209 +++++ ...rkConfigurationDiagnosticResponseImpl.java | 33 + ...kConfigurationDiagnosticResponseInner.java | 34 + .../NetworkInterfaceIPConfigurationInner.java | 387 ++ .../NetworkInterfaceIPConfigurationsImpl.java | 69 + ...NetworkInterfaceIPConfigurationsInner.java | 397 ++ .../implementation/NetworkInterfaceImpl.java | 177 + .../implementation/NetworkInterfaceInner.java | 319 ++ .../NetworkInterfaceLoadBalancerImpl.java | 158 + .../NetworkInterfaceLoadBalancersImpl.java | 53 + .../NetworkInterfaceLoadBalancersInner.java | 301 ++ ...ceNetworkInterfaceIPConfigurationImpl.java | 170 + .../NetworkInterfaceTapConfigurationImpl.java | 134 + ...NetworkInterfaceTapConfigurationInner.java | 121 + ...NetworkInterfaceTapConfigurationsImpl.java | 85 + ...etworkInterfaceTapConfigurationsInner.java | 764 +++ .../implementation/NetworkInterfacesImpl.java | 229 + .../NetworkInterfacesInner.java | 2823 +++++++++++ .../NetworkManagementClientImpl.java | 1802 +++++++ .../implementation/NetworkManager.java | 1143 +++++ .../implementation/NetworkProfileImpl.java | 81 + .../implementation/NetworkProfileInner.java | 139 + .../implementation/NetworkProfilesImpl.java | 138 + .../implementation/NetworkProfilesInner.java | 1111 +++++ .../NetworkSecurityGroupImpl.java | 117 + .../NetworkSecurityGroupInner.java | 167 + .../NetworkSecurityGroupSecurityRuleImpl.java | 295 ++ ...orkSecurityGroupSecurityRuleModelImpl.java | 157 + .../NetworkSecurityGroupsImpl.java | 138 + .../NetworkSecurityGroupsInner.java | 1208 +++++ .../implementation/NetworkWatcherImpl.java | 57 + .../implementation/NetworkWatcherInner.java | 80 + .../implementation/NetworkWatchersImpl.java | 300 ++ .../implementation/NetworkWatchersInner.java | 2814 +++++++++++ .../implementation/NextHopResultImpl.java | 42 + .../implementation/NextHopResultInner.java | 99 + .../implementation/OperationImpl.java | 48 + .../implementation/OperationInner.java | 125 + .../implementation/OperationsImpl.java | 49 + .../implementation/OperationsInner.java | 281 ++ .../implementation/OutboundRuleImpl.java | 102 + .../implementation/OutboundRuleInner.java | 256 + .../P2SVpnConnectionHealthImpl.java | 31 + .../P2SVpnConnectionHealthInner.java | 44 + .../implementation/P2SVpnGatewayImpl.java | 110 + .../implementation/P2SVpnGatewayInner.java | 203 + .../implementation/P2sVpnGatewaysImpl.java | 177 + .../implementation/P2sVpnGatewaysInner.java | 1789 +++++++ .../implementation/PacketCaptureInner.java | 178 + .../PacketCaptureQueryStatusResultImpl.java | 60 + .../PacketCaptureQueryStatusResultInner.java | 178 + .../PacketCaptureResultImpl.java | 190 + .../PacketCaptureResultInner.java | 240 + .../implementation/PacketCapturesImpl.java | 104 + .../implementation/PacketCapturesInner.java | 961 ++++ .../v2019_09_01/implementation/PageImpl.java | 75 + .../v2019_09_01/implementation/PageImpl1.java | 75 + ...PeerExpressRouteCircuitConnectionImpl.java | 103 + ...eerExpressRouteCircuitConnectionInner.java | 257 + ...eerExpressRouteCircuitConnectionsImpl.java | 69 + ...erExpressRouteCircuitConnectionsInner.java | 412 ++ .../PrivateEndpointConnectionImpl.java | 137 + .../PrivateEndpointConnectionInner.java | 152 + .../implementation/PrivateEndpointImpl.java | 111 + .../implementation/PrivateEndpointInner.java | 178 + .../implementation/PrivateEndpointsImpl.java | 138 + .../implementation/PrivateEndpointsInner.java | 1030 ++++ .../PrivateLinkServiceImpl.java | 164 + .../PrivateLinkServiceInner.java | 286 ++ .../PrivateLinkServiceVisibilityImpl.java | 31 + .../PrivateLinkServiceVisibilityInner.java | 43 + .../PrivateLinkServicesImpl.java | 257 + .../PrivateLinkServicesInner.java | 2539 ++++++++++ .../v2019_09_01/implementation/ProbeImpl.java | 102 + .../implementation/ProbeInner.java | 254 + .../implementation/PublicIPAddressImpl.java | 186 + .../implementation/PublicIPAddressInner.java | 381 ++ .../implementation/PublicIPAddressesImpl.java | 186 + .../PublicIPAddressesInner.java | 1938 ++++++++ .../implementation/PublicIPPrefixImpl.java | 138 + .../implementation/PublicIPPrefixInner.java | 278 ++ .../implementation/PublicIPPrefixesImpl.java | 138 + .../implementation/PublicIPPrefixesInner.java | 1208 +++++ .../ResourceNavigationLinkInner.java | 146 + .../ResourceNavigationLinksImpl.java | 42 + .../ResourceNavigationLinksInner.java | 151 + ...ResourceNavigationLinksListResultImpl.java | 37 + ...esourceNavigationLinksListResultInner.java | 59 + .../implementation/RouteFilterImpl.java | 100 + .../implementation/RouteFilterInner.java | 137 + .../implementation/RouteFilterRuleImpl.java | 158 + .../implementation/RouteFilterRuleInner.java | 195 + .../implementation/RouteFilterRulesImpl.java | 85 + .../implementation/RouteFilterRulesInner.java | 764 +++ .../implementation/RouteFiltersImpl.java | 138 + .../implementation/RouteFiltersInner.java | 1208 +++++ .../v2019_09_01/implementation/RouteImpl.java | 146 + .../implementation/RouteInner.java | 161 + .../implementation/RouteTableImpl.java | 100 + .../implementation/RouteTableInner.java | 149 + .../implementation/RouteTablesImpl.java | 138 + .../implementation/RouteTablesInner.java | 1208 +++++ .../implementation/RoutesImpl.java | 85 + .../implementation/RoutesInner.java | 764 +++ .../SecurityGroupViewResultImpl.java | 33 + .../SecurityGroupViewResultInner.java | 45 + .../implementation/SecurityRuleInner.java | 486 ++ .../implementation/SecurityRulesImpl.java | 85 + .../implementation/SecurityRulesInner.java | 764 +++ .../ServiceAssociationLinkInner.java | 199 + .../ServiceAssociationLinksImpl.java | 42 + .../ServiceAssociationLinksInner.java | 151 + ...ServiceAssociationLinksListResultImpl.java | 37 + ...erviceAssociationLinksListResultInner.java | 59 + .../ServiceEndpointPoliciesImpl.java | 138 + .../ServiceEndpointPoliciesInner.java | 1208 +++++ .../ServiceEndpointPolicyDefinitionImpl.java | 146 + .../ServiceEndpointPolicyDefinitionInner.java | 159 + .../ServiceEndpointPolicyDefinitionsImpl.java | 85 + ...ServiceEndpointPolicyDefinitionsInner.java | 764 +++ .../ServiceEndpointPolicyImpl.java | 94 + .../ServiceEndpointPolicyInner.java | 138 + .../implementation/ServiceTagsImpl.java | 42 + .../implementation/ServiceTagsInner.java | 137 + .../ServiceTagsListResultImpl.java | 58 + .../ServiceTagsListResultInner.java | 109 + .../implementation/SubnetImpl.java | 285 ++ .../implementation/SubnetInner.java | 438 ++ .../implementation/SubnetsImpl.java | 98 + .../implementation/SubnetsInner.java | 1393 ++++++ .../implementation/TopologyImpl.java | 49 + .../implementation/TopologyInner.java | 92 + .../TroubleshootingResultImpl.java | 49 + .../TroubleshootingResultInner.java | 124 + .../v2019_09_01/implementation/UsageImpl.java | 56 + .../implementation/UsageInner.java | 147 + .../implementation/UsagesImpl.java | 53 + .../implementation/UsagesInner.java | 293 ++ .../VerificationIPFlowResultImpl.java | 37 + .../VerificationIPFlowResultInner.java | 72 + .../implementation/VirtualHubImpl.java | 196 + .../implementation/VirtualHubInner.java | 369 ++ .../VirtualHubRouteTableV2Impl.java | 136 + .../VirtualHubRouteTableV2Inner.java | 133 + .../VirtualHubRouteTableV2sImpl.java | 85 + .../VirtualHubRouteTableV2sInner.java | 765 +++ .../implementation/VirtualHubsImpl.java | 138 + .../implementation/VirtualHubsInner.java | 1126 +++++ ...etNetworkInterfaceIPConfigurationImpl.java | 174 + .../VirtualNetworkGatewayConnectionImpl.java | 261 + .../VirtualNetworkGatewayConnectionInner.java | 532 +++ ...etworkGatewayConnectionListEntityImpl.java | 171 + ...tworkGatewayConnectionListEntityInner.java | 533 +++ .../VirtualNetworkGatewayConnectionsImpl.java | 164 + ...VirtualNetworkGatewayConnectionsInner.java | 2141 +++++++++ .../VirtualNetworkGatewayImpl.java | 209 + .../VirtualNetworkGatewayInner.java | 443 ++ .../VirtualNetworkGatewaysImpl.java | 275 ++ .../VirtualNetworkGatewaysInner.java | 4256 +++++++++++++++++ .../implementation/VirtualNetworkImpl.java | 170 + .../implementation/VirtualNetworkInner.java | 314 ++ .../VirtualNetworkPeeringImpl.java | 192 + .../VirtualNetworkPeeringInner.java | 274 ++ .../VirtualNetworkPeeringsImpl.java | 85 + .../VirtualNetworkPeeringsInner.java | 764 +++ .../implementation/VirtualNetworkTapImpl.java | 121 + .../VirtualNetworkTapInner.java | 192 + .../VirtualNetworkTapsImpl.java | 138 + .../VirtualNetworkTapsInner.java | 1126 +++++ .../VirtualNetworkUsageImpl.java | 56 + .../VirtualNetworkUsageInner.java | 93 + .../implementation/VirtualNetworksImpl.java | 174 + .../implementation/VirtualNetworksInner.java | 1543 ++++++ .../implementation/VirtualRouterImpl.java | 108 + .../implementation/VirtualRouterInner.java | 202 + .../VirtualRouterPeeringImpl.java | 139 + .../VirtualRouterPeeringInner.java | 147 + .../VirtualRouterPeeringsImpl.java | 85 + .../VirtualRouterPeeringsInner.java | 764 +++ .../implementation/VirtualRoutersImpl.java | 138 + .../implementation/VirtualRoutersInner.java | 1030 ++++ .../implementation/VirtualWANImpl.java | 125 + .../implementation/VirtualWANInner.java | 244 + .../VirtualWanSecurityProvidersInner.java | 45 + .../implementation/VirtualWansImpl.java | 138 + .../implementation/VirtualWansInner.java | 1126 +++++ ...tConnectionHealthDetailListResultImpl.java | 33 + ...ConnectionHealthDetailListResultInner.java | 45 + .../VpnClientIPsecParametersImpl.java | 72 + .../VpnClientIPsecParametersInner.java | 242 + .../implementation/VpnConnectionImpl.java | 278 ++ .../implementation/VpnConnectionInner.java | 453 ++ ...onVpnGatewayVpnSiteLinkConnectionImpl.java | 141 + ...GatewayVpnSiteLinkConnectionModelImpl.java | 126 + .../implementation/VpnConnectionsImpl.java | 85 + .../implementation/VpnConnectionsInner.java | 764 +++ .../implementation/VpnGatewayImpl.java | 112 + .../implementation/VpnGatewayInner.java | 187 + .../implementation/VpnGatewaysImpl.java | 150 + .../implementation/VpnGatewaysInner.java | 1291 +++++ .../VpnLinkConnectionsImpl.java | 53 + .../VpnLinkConnectionsInner.java | 309 ++ .../VpnProfileResponseImpl.java | 31 + .../VpnProfileResponseInner.java | 43 + .../VpnServerConfigurationImpl.java | 204 + .../VpnServerConfigurationInner.java | 408 ++ ...urationsAssociatedWithVirtualWansImpl.java | 42 + ...rationsAssociatedWithVirtualWansInner.java | 220 + .../VpnServerConfigurationsImpl.java | 138 + .../VpnServerConfigurationsInner.java | 1126 +++++ .../VpnServerConfigurationsResponseImpl.java | 32 + .../VpnServerConfigurationsResponseInner.java | 44 + .../implementation/VpnSiteImpl.java | 158 + .../implementation/VpnSiteInner.java | 293 ++ .../VpnSiteLinkConnectionInner.java | 416 ++ .../VpnSiteLinkConnectionsImpl.java | 50 + .../VpnSiteLinkConnectionsInner.java | 158 + .../implementation/VpnSiteLinkImpl.java | 86 + .../implementation/VpnSiteLinkInner.java | 174 + .../implementation/VpnSiteLinksImpl.java | 69 + .../implementation/VpnSiteLinksInner.java | 397 ++ .../VpnSitesConfigurationsImpl.java | 35 + .../VpnSitesConfigurationsInner.java | 237 + .../implementation/VpnSitesImpl.java | 138 + .../implementation/VpnSitesInner.java | 1126 +++++ .../WebApplicationFirewallPoliciesImpl.java | 138 + .../WebApplicationFirewallPoliciesInner.java | 869 ++++ .../WebApplicationFirewallPolicyImpl.java | 124 + .../WebApplicationFirewallPolicyInner.java | 226 + .../implementation/package-info.java | 11 + .../network/v2019_09_01/package-info.java | 11 + 1000 files changed, 184530 insertions(+) create mode 100644 network/resource-manager/v2019_09_01/pom.xml create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AadAuthenticationParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Access.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AddressSpace.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGateway.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAuthenticationCertificate.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAutoscaleConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAvailableSslOptions.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAvailableWafRuleSetsResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendAddress.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendAddressPool.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealth.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthHttpSettings.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthOnDemand.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthPool.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthServer.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthServerHealth.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHttpSettings.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayConnectionDraining.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayCookieBasedAffinity.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayCustomError.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayCustomErrorStatusCode.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallDisabledRuleGroup.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallExclusion.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallMode.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallRuleGroup.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallRuleSet.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFrontendIPConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFrontendPort.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayHeaderConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayHttpListener.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayIPConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayOnDemandProbe.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayOperationalState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayPathRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayProbe.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayProbeHealthResponseMatch.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRedirectConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRedirectType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRequestRoutingRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRequestRoutingRuleType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRuleActionSet.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRuleCondition.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRuleSet.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySku.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySkuName.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslCertificate.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslCipherSuite.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPolicy.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPolicyName.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPolicyType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPredefinedPolicy.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayTier.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayTrustedRootCertificate.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayUrlPathMap.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayWebApplicationFirewallConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGateways.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationRuleCondition.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationSecurityGroup.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationSecurityGroups.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AssociationType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AuthenticationMethod.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AuthorizationUseStatus.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AutoApprovedPrivateLinkService.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Availability.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableDelegations.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableEndpointServices.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailablePrivateEndpointType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailablePrivateEndpointTypes.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersList.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListCity.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListCountry.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableResourceGroupDelegations.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableServiceAlias.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableServiceAliases.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureAsyncOperationResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewall.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRuleCollection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRuleProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRuleProtocolType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallFqdnTag.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallFqdnTags.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallIPConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRCAction.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRCActionType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRuleCollection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNetworkRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNetworkRuleCollection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNetworkRuleProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallPublicIPAddress.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallRCAction.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallRCActionType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallSku.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallSkuName.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallSkuTier.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallThreatIntelMode.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewalls.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReport.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportItem.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportLatencyInfo.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportLocation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BGPCommunity.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BackendAddressPool.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionHost.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionHostIPConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionHosts.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpPeerState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpPeerStatus.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpPeerStatusListResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpServiceCommunities.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpServiceCommunity.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpSettings.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/CheckPrivateLinkServiceVisibilityRequest.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/CircuitConnectionStatus.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorDestination.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorQueryResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorSource.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorSourceStatus.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitors.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionResetSharedKey.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionSharedKey.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionStateSnapshot.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionStatus.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityDestination.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityHop.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityInformation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityIssue.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivitySource.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Container.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ContainerNetworkInterface.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ContainerNetworkInterfaceConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ContainerNetworkInterfaceIpConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicies.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicy.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicyProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicyTriggerSensitivityOverride.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosProtectionPlan.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosProtectionPlans.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosSettings.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosSettingsProtectionCoverage.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DefaultSecurityRules.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Delegation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DeviceProperties.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DhGroup.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DhcpOptions.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Dimension.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Direction.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityGroup.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityGroupAssociation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityGroupListResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRoute.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRouteListResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRouteSource.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRouteState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveSecurityRuleProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EndpointServiceResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Error.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorDetails.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorException.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorResponse.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorResponseException.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EvaluatedNetworkSecurityGroup.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EvaluationState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuit.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitArpTable.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitAuthorization.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitAuthorizations.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitConnection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitConnections.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeering.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringConfig.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringId.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeerings.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitReference.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitRoutesTable.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitRoutesTableSummary.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitServiceProviderProperties.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitSku.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitSkuFamily.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitSkuTier.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitStats.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuits.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitsArpTableListResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitsRoutesTableListResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitsRoutesTableSummaryListResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnectionId.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnectionList.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnections.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionPeering.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionPeerings.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionRoutesTableSummary.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnections.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGateway.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGatewayPropertiesAutoScaleConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGateways.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLink.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkAdminState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkConnectorType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkMacSecCipher.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkMacSecConfig.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinks.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePeeringState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePeeringType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePort.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePorts.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsEncapsulation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsLocation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsLocationBandwidths.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsLocations.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteServiceProvider.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteServiceProviderBandwidthsOffered.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteServiceProviders.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicies.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicy.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyFilterRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyFilterRuleAction.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyFilterRuleActionType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyNatRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyNatRuleAction.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyNatRuleActionType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleCondition.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleConditionApplicationProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleConditionApplicationProtocolType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleConditionNetworkProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleGroup.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleGroups.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogFormatParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogFormatType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogInformation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogStatusParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FrontendIPConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/GatewayRoute.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/GatewayRouteListResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/GetVpnSitesConfigurationRequest.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HTTPConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HTTPHeader.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HTTPMethod.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubIPAddresses.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubVirtualNetworkConnection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubVirtualNetworkConnectionStatus.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubVirtualNetworkConnections.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPAddressAvailabilityResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPAllocationMethod.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPConfigurationProfile.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPVersion.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IkeEncryption.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IkeIntegrity.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/InboundNatPool.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/InboundNatRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/InboundNatRules.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpFlowProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpGroup.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpGroups.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpTag.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpsecEncryption.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpsecIntegrity.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpsecPolicy.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Ipv6ExpressRouteCircuitPeeringConfig.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IssueType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancer.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerBackendAddressPools.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerFrontendIPConfigurations.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerLoadBalancingRules.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerNetworkInterface.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerNetworkInterfaces.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerOutboundRuleProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerOutboundRules.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerProbes.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerSku.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerSkuName.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancers.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancingRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadDistribution.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocalNetworkGateway.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocalNetworkGateways.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocationAvailableDelegation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocationAvailableDelegationModel.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LogSpecification.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleEnabledState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleGroupOverride.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleOverride.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleSet.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRulesDefinition.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedServiceIdentity.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedServiceIdentityUserAssignedIdentitiesValue.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MatchCondition.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MatchVariable.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MatchedRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MetricSpecification.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGateway.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGatewaySku.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGatewaySkuName.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGateways.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticProfile.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticResponse.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkIntentPolicy.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkIntentPolicyConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterface.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceAssociation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceDnsSettings.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceIPConfigurations.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceLoadBalancer.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceLoadBalancers.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceNetworkInterfaceIPConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceTapConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceTapConfigurations.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaces.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkOperationStatus.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkProfile.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkProfiles.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkRuleCondition.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroup.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroupResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroupSecurityRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroupSecurityRuleModel.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroups.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityRulesEvaluationResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkWatcher.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkWatchers.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NextHopParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NextHopResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NextHopType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OfficeTrafficCategory.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Operation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OperationDisplay.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OperationPropertiesFormatServiceSpecification.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Operations.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Origin.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OutboundRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OwaspCrsExclusionEntry.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OwaspCrsExclusionEntryMatchVariable.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OwaspCrsExclusionEntrySelectorMatchOperator.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SConnectionConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnConnectionHealth.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnConnectionHealthRequest.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnGateway.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnProfileParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2sVpnGateways.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureFilter.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureQueryStatusResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureStorageLocation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptures.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PatchRouteFilter.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PatchRouteFilterRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PcError.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PcProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PcStatus.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PeerExpressRouteCircuitConnection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PeerExpressRouteCircuitConnections.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PfsGroup.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PolicySettings.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrepareNetworkPoliciesRequest.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateEndpoint.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateEndpointConnection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateEndpoints.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkService.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceConnection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceConnectionState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceIpConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServicePropertiesAutoApproval.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServicePropertiesVisibility.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceVisibility.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServices.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Probe.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProbeProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProcessorArchitecture.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Protocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProtocolConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProtocolCustomSettingsFormat.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProvisioningState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddress.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddressDnsSettings.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddressSku.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddressSkuName.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddresses.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefix.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefixSku.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefixSkuName.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefixes.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/QueryTroubleshootingParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ReferencedPublicIpAddress.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceIdentityType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceNavigationLinks.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceNavigationLinksListResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceSet.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RetentionPolicyParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Route.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilter.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilterRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilterRules.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteNextHopType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteTable.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteTables.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Routes.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityGroupNetworkInterface.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityGroupViewParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityGroupViewResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleAccess.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleAssociations.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleDirection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRules.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceAssociationLinks.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceAssociationLinksListResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicies.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicy.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicyDefinition.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicyDefinitions.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPropertiesFormat.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceProviderProvisioningState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTagInformation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTagInformationPropertiesFormat.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTags.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTagsListResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Severity.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Subnet.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SubnetAssociation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Subnets.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TagsObject.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Topology.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TopologyAssociation.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TopologyParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TopologyResource.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TrafficAnalyticsConfigurationProperties.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TrafficAnalyticsProperties.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TrafficSelectorPolicy.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TransportProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingDetails.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingRecommendedActions.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TunnelConnectionHealth.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TunnelConnectionStatus.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/UnprepareNetworkPoliciesRequest.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Usage.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/UsageName.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Usages.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VerbosityLevel.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VerificationIPFlowParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VerificationIPFlowResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHub.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubId.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRoute.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteTable.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteTableV2.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteTableV2s.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteV2.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubs.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualMachineScaleSetNetworkInterfaceIPConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetwork.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkBgpCommunities.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkConnectionGatewayReference.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGateway.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionListEntity.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionStatus.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnections.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayIPConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewaySku.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewaySkuName.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewaySkuTier.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGateways.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkPeering.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkPeeringState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkPeerings.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkTap.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkTaps.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkUsage.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkUsageName.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworks.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouter.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouterPeering.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouterPeerings.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWAN.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWanSecurityProvider.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWanSecurityProviderType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWanVpnProfileParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWans.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnAuthenticationType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConnectionHealth.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConnectionHealthDetail.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConnectionHealthDetailListResult.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientIPsecParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientRevokedCertificate.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientRootCertificate.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnectionStatus.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnectionVpnGatewayVpnSiteLinkConnection.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnectionVpnGatewayVpnSiteLinkConnectionModel.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnections.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnDeviceScriptParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGateway.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGatewayGeneration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGatewayTunnelingProtocol.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGateways.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnLinkBgpSettings.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnLinkConnections.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnLinkProviderProperties.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnPacketCaptureStartParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnPacketCaptureStopParameters.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnProfileResponse.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigRadiusClientRootCertificate.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigRadiusServerRootCertificate.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigVpnClientRevokedCertificate.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigVpnClientRootCertificate.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfiguration.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigurations.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigurationsAssociatedWithVirtualWans.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigurationsResponse.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSite.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteId.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteLink.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteLinkConnections.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteLinks.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSites.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSitesConfigurations.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallAction.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallCustomRule.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallEnabledState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallMatchVariable.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallMode.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallOperator.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallPolicies.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallPolicy.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallPolicyResourceState.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallRuleType.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallTransform.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableSslOptionsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableSslOptionsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableWafRuleSetsResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableWafRuleSetsResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthOnDemandImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthOnDemandInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaySslPredefinedPolicyImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaySslPredefinedPolicyInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaysImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaysInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AutoApprovedPrivateLinkServiceImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AutoApprovedPrivateLinkServiceInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableDelegationInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableDelegationsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableDelegationsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableEndpointServicesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableEndpointServicesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypeImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypeInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableProvidersListImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableProvidersListInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableResourceGroupDelegationsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableResourceGroupDelegationsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureReachabilityReportImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureReachabilityReportInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BackendAddressPoolImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BackendAddressPoolInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpPeerStatusListResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpPeerStatusListResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunitiesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunitiesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunityImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunityInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorQueryResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorQueryResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionResetSharedKeyImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionResetSharedKeyInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionSharedKeyImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionSharedKeyInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectivityInformationImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectivityInformationInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPoliciesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPoliciesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPolicyImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPolicyInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlanImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlanInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlansImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlansInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DefaultSecurityRulesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DefaultSecurityRulesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DnsNameAvailabilityResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveNetworkSecurityGroupListResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveNetworkSecurityGroupListResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveRouteListResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveRouteListResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EndpointServiceResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EndpointServiceResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitStatsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitStatsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsArpTableListResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsArpTableListResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableListResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableListResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableSummaryListResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableSummaryListResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionListImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionListInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewayImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewayInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewaysImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewaysInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinkImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinkInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinksImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinksInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProviderImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProviderInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProvidersImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProvidersInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPoliciesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPoliciesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FlowLogInformationImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FlowLogInformationInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FrontendIPConfigurationImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FrontendIPConfigurationInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/GatewayRouteListResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/GatewayRouteListResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IPAddressAvailabilityResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IPAddressAvailabilityResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IdParsingUtils.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRuleImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRuleInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRulesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRulesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerBackendAddressPoolsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerBackendAddressPoolsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerFrontendIPConfigurationsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerFrontendIPConfigurationsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerLoadBalancingRulesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerLoadBalancingRulesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerNetworkInterfaceImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerNetworkInterfacesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerNetworkInterfacesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerOutboundRulesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerOutboundRulesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerProbesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerProbesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancersImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancersInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancingRuleImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancingRuleInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewayImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewayInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewaysImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewaysInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocationAvailableDelegationImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocationAvailableDelegationModelImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewayImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewayInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewaysImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewaysInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkConfigurationDiagnosticResponseImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkConfigurationDiagnosticResponseInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceIPConfigurationInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceIPConfigurationsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceIPConfigurationsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceLoadBalancerImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceLoadBalancersImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceLoadBalancersInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceNetworkInterfaceIPConfigurationImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfacesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfacesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkManagementClientImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkManager.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfileImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfileInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfilesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfilesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupSecurityRuleImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupSecurityRuleModelImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatcherImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatcherInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatchersImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatchersInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NextHopResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NextHopResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OutboundRuleImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OutboundRuleInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnConnectionHealthImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnConnectionHealthInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnGatewayImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnGatewayInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2sVpnGatewaysImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2sVpnGatewaysInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureQueryStatusResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureQueryStatusResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCapturesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCapturesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PageImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PageImpl1.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointConnectionImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointConnectionInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceVisibilityImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceVisibilityInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ProbeImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ProbeInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinkInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksListResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksListResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRuleImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRuleInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRulesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRulesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFiltersImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFiltersInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTableImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTableInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTablesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTablesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RoutesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RoutesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityGroupViewResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityGroupViewResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityRuleInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityRulesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityRulesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinkInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksListResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksListResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPoliciesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPoliciesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsListResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsListResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TopologyImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TopologyInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TroubleshootingResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TroubleshootingResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsageImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsageInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsagesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsagesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VerificationIPFlowResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VerificationIPFlowResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2Impl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2Inner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2sImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2sInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionListEntityImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionListEntityInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewaysImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewaysInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkUsageImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkUsageInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworksImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworksInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRoutersImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRoutersInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWANImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWANInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWanSecurityProvidersInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWansImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWansInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientConnectionHealthDetailListResultImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientConnectionHealthDetailListResultInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientIPsecParametersImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientIPsecParametersInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionVpnGatewayVpnSiteLinkConnectionImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionVpnGatewayVpnSiteLinkConnectionModelImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewayImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewayInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewaysImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewaysInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnLinkConnectionsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnLinkConnectionsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnProfileResponseImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnProfileResponseInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsAssociatedWithVirtualWansImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsAssociatedWithVirtualWansInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsResponseImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsResponseInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkConnectionInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkConnectionsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkConnectionsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinksImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinksInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesConfigurationsImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesConfigurationsInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPoliciesImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPoliciesInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPolicyImpl.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPolicyInner.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/package-info.java create mode 100644 network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/package-info.java diff --git a/network/resource-manager/v2019_09_01/pom.xml b/network/resource-manager/v2019_09_01/pom.xml new file mode 100644 index 000000000000..467b63b9a441 --- /dev/null +++ b/network/resource-manager/v2019_09_01/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.network.v2019_09_01 + + com.microsoft.azure + azure-arm-parent + 1.1.0 + ../../../pom.management.xml + + azure-mgmt-network + 1.0.0-beta + jar + Microsoft Azure SDK for Network Management + This package contains Microsoft Network 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 + + 1.6.5 + + + + + + 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AadAuthenticationParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AadAuthenticationParameters.java new file mode 100644 index 000000000000..b0ef83fb80ef --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AadAuthenticationParameters.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AAD Vpn authentication type related parameters. + */ +public class AadAuthenticationParameters { + /** + * AAD Vpn authentication parameter AAD tenant. + */ + @JsonProperty(value = "aadTenant") + private String aadTenant; + + /** + * AAD Vpn authentication parameter AAD audience. + */ + @JsonProperty(value = "aadAudience") + private String aadAudience; + + /** + * AAD Vpn authentication parameter AAD issuer. + */ + @JsonProperty(value = "aadIssuer") + private String aadIssuer; + + /** + * Get aAD Vpn authentication parameter AAD tenant. + * + * @return the aadTenant value + */ + public String aadTenant() { + return this.aadTenant; + } + + /** + * Set aAD Vpn authentication parameter AAD tenant. + * + * @param aadTenant the aadTenant value to set + * @return the AadAuthenticationParameters object itself. + */ + public AadAuthenticationParameters withAadTenant(String aadTenant) { + this.aadTenant = aadTenant; + return this; + } + + /** + * Get aAD Vpn authentication parameter AAD audience. + * + * @return the aadAudience value + */ + public String aadAudience() { + return this.aadAudience; + } + + /** + * Set aAD Vpn authentication parameter AAD audience. + * + * @param aadAudience the aadAudience value to set + * @return the AadAuthenticationParameters object itself. + */ + public AadAuthenticationParameters withAadAudience(String aadAudience) { + this.aadAudience = aadAudience; + return this; + } + + /** + * Get aAD Vpn authentication parameter AAD issuer. + * + * @return the aadIssuer value + */ + public String aadIssuer() { + return this.aadIssuer; + } + + /** + * Set aAD Vpn authentication parameter AAD issuer. + * + * @param aadIssuer the aadIssuer value to set + * @return the AadAuthenticationParameters object itself. + */ + public AadAuthenticationParameters withAadIssuer(String aadIssuer) { + this.aadIssuer = aadIssuer; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Access.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Access.java new file mode 100644 index 000000000000..41772d83d5c9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Access.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Access. + */ +public final class Access extends ExpandableStringEnum { + /** Static value Allow for Access. */ + public static final Access ALLOW = fromString("Allow"); + + /** Static value Deny for Access. */ + public static final Access DENY = fromString("Deny"); + + /** + * Creates or finds a Access from its string representation. + * @param name a name to look for + * @return the corresponding Access + */ + @JsonCreator + public static Access fromString(String name) { + return fromString(name, Access.class); + } + + /** + * @return known Access values + */ + public static Collection values() { + return values(Access.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AddressSpace.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AddressSpace.java new file mode 100644 index 000000000000..2caac5504e74 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AddressSpace.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AddressSpace contains an array of IP address ranges that can be used by + * subnets of the virtual network. + */ +public class AddressSpace { + /** + * A list of address blocks reserved for this virtual network in CIDR + * notation. + */ + @JsonProperty(value = "addressPrefixes") + private List addressPrefixes; + + /** + * Get a list of address blocks reserved for this virtual network in CIDR notation. + * + * @return the addressPrefixes value + */ + public List addressPrefixes() { + return this.addressPrefixes; + } + + /** + * Set a list of address blocks reserved for this virtual network in CIDR notation. + * + * @param addressPrefixes the addressPrefixes value to set + * @return the AddressSpace object itself. + */ + public AddressSpace withAddressPrefixes(List addressPrefixes) { + this.addressPrefixes = addressPrefixes; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGateway.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGateway.java new file mode 100644 index 000000000000..ac608eb6bc41 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGateway.java @@ -0,0 +1,786 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ApplicationGatewayInner; + +/** + * Type representing ApplicationGateway. + */ +public interface ApplicationGateway extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the authenticationCertificates value. + */ + List authenticationCertificates(); + + /** + * @return the autoscaleConfiguration value. + */ + ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration(); + + /** + * @return the backendAddressPools value. + */ + List backendAddressPools(); + + /** + * @return the backendHttpSettingsCollection value. + */ + List backendHttpSettingsCollection(); + + /** + * @return the customErrorConfigurations value. + */ + List customErrorConfigurations(); + + /** + * @return the enableFips value. + */ + Boolean enableFips(); + + /** + * @return the enableHttp2 value. + */ + Boolean enableHttp2(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the firewallPolicy value. + */ + SubResource firewallPolicy(); + + /** + * @return the frontendIPConfigurations value. + */ + List frontendIPConfigurations(); + + /** + * @return the frontendPorts value. + */ + List frontendPorts(); + + /** + * @return the gatewayIPConfigurations value. + */ + List gatewayIPConfigurations(); + + /** + * @return the httpListeners value. + */ + List httpListeners(); + + /** + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * @return the operationalState value. + */ + ApplicationGatewayOperationalState operationalState(); + + /** + * @return the probes value. + */ + List probes(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the redirectConfigurations value. + */ + List redirectConfigurations(); + + /** + * @return the requestRoutingRules value. + */ + List requestRoutingRules(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the rewriteRuleSets value. + */ + List rewriteRuleSets(); + + /** + * @return the sku value. + */ + ApplicationGatewaySku sku(); + + /** + * @return the sslCertificates value. + */ + List sslCertificates(); + + /** + * @return the sslPolicy value. + */ + ApplicationGatewaySslPolicy sslPolicy(); + + /** + * @return the trustedRootCertificates value. + */ + List trustedRootCertificates(); + + /** + * @return the urlPathMaps value. + */ + List urlPathMaps(); + + /** + * @return the webApplicationFirewallConfiguration value. + */ + ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration(); + + /** + * @return the zones value. + */ + List zones(); + + /** + * The entirety of the ApplicationGateway definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of ApplicationGateway definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ApplicationGateway definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the ApplicationGateway definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the applicationgateway definition allowing to specify AuthenticationCertificates. + */ + interface WithAuthenticationCertificates { + /** + * Specifies authenticationCertificates. + * @param authenticationCertificates Authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next definition stage + */ + WithCreate withAuthenticationCertificates(List authenticationCertificates); + } + + /** + * The stage of the applicationgateway definition allowing to specify AutoscaleConfiguration. + */ + interface WithAutoscaleConfiguration { + /** + * Specifies autoscaleConfiguration. + * @param autoscaleConfiguration Autoscale Configuration + * @return the next definition stage + */ + WithCreate withAutoscaleConfiguration(ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration); + } + + /** + * The stage of the applicationgateway definition allowing to specify BackendAddressPools. + */ + interface WithBackendAddressPools { + /** + * Specifies backendAddressPools. + * @param backendAddressPools Backend address pool of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next definition stage + */ + WithCreate withBackendAddressPools(List backendAddressPools); + } + + /** + * The stage of the applicationgateway definition allowing to specify BackendHttpSettingsCollection. + */ + interface WithBackendHttpSettingsCollection { + /** + * Specifies backendHttpSettingsCollection. + * @param backendHttpSettingsCollection Backend http settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next definition stage + */ + WithCreate withBackendHttpSettingsCollection(List backendHttpSettingsCollection); + } + + /** + * The stage of the applicationgateway definition allowing to specify CustomErrorConfigurations. + */ + interface WithCustomErrorConfigurations { + /** + * Specifies customErrorConfigurations. + * @param customErrorConfigurations Custom error configurations of the application gateway resource + * @return the next definition stage + */ + WithCreate withCustomErrorConfigurations(List customErrorConfigurations); + } + + /** + * The stage of the applicationgateway definition allowing to specify EnableFips. + */ + interface WithEnableFips { + /** + * Specifies enableFips. + * @param enableFips Whether FIPS is enabled on the application gateway resource + * @return the next definition stage + */ + WithCreate withEnableFips(Boolean enableFips); + } + + /** + * The stage of the applicationgateway definition allowing to specify EnableHttp2. + */ + interface WithEnableHttp2 { + /** + * Specifies enableHttp2. + * @param enableHttp2 Whether HTTP2 is enabled on the application gateway resource + * @return the next definition stage + */ + WithCreate withEnableHttp2(Boolean enableHttp2); + } + + /** + * The stage of the applicationgateway definition allowing to specify FirewallPolicy. + */ + interface WithFirewallPolicy { + /** + * Specifies firewallPolicy. + * @param firewallPolicy Reference of the FirewallPolicy resource + * @return the next definition stage + */ + WithCreate withFirewallPolicy(SubResource firewallPolicy); + } + + /** + * The stage of the applicationgateway definition allowing to specify FrontendIPConfigurations. + */ + interface WithFrontendIPConfigurations { + /** + * Specifies frontendIPConfigurations. + * @param frontendIPConfigurations Frontend IP addresses of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next definition stage + */ + WithCreate withFrontendIPConfigurations(List frontendIPConfigurations); + } + + /** + * The stage of the applicationgateway definition allowing to specify FrontendPorts. + */ + interface WithFrontendPorts { + /** + * Specifies frontendPorts. + * @param frontendPorts Frontend ports of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next definition stage + */ + WithCreate withFrontendPorts(List frontendPorts); + } + + /** + * The stage of the applicationgateway definition allowing to specify GatewayIPConfigurations. + */ + interface WithGatewayIPConfigurations { + /** + * Specifies gatewayIPConfigurations. + * @param gatewayIPConfigurations Subnets of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next definition stage + */ + WithCreate withGatewayIPConfigurations(List gatewayIPConfigurations); + } + + /** + * The stage of the applicationgateway definition allowing to specify HttpListeners. + */ + interface WithHttpListeners { + /** + * Specifies httpListeners. + * @param httpListeners Http listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next definition stage + */ + WithCreate withHttpListeners(List httpListeners); + } + + /** + * The stage of the applicationgateway definition allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity The identity of the application gateway, if configured + * @return the next definition stage + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the applicationgateway definition allowing to specify Probes. + */ + interface WithProbes { + /** + * Specifies probes. + * @param probes Probes of the application gateway resource + * @return the next definition stage + */ + WithCreate withProbes(List probes); + } + + /** + * The stage of the applicationgateway definition allowing to specify RedirectConfigurations. + */ + interface WithRedirectConfigurations { + /** + * Specifies redirectConfigurations. + * @param redirectConfigurations Redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next definition stage + */ + WithCreate withRedirectConfigurations(List redirectConfigurations); + } + + /** + * The stage of the applicationgateway definition allowing to specify RequestRoutingRules. + */ + interface WithRequestRoutingRules { + /** + * Specifies requestRoutingRules. + * @param requestRoutingRules Request routing rules of the application gateway resource + * @return the next definition stage + */ + WithCreate withRequestRoutingRules(List requestRoutingRules); + } + + /** + * The stage of the applicationgateway definition allowing to specify RewriteRuleSets. + */ + interface WithRewriteRuleSets { + /** + * Specifies rewriteRuleSets. + * @param rewriteRuleSets Rewrite rules for the application gateway resource + * @return the next definition stage + */ + WithCreate withRewriteRuleSets(List rewriteRuleSets); + } + + /** + * The stage of the applicationgateway definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku SKU of the application gateway resource + * @return the next definition stage + */ + WithCreate withSku(ApplicationGatewaySku sku); + } + + /** + * The stage of the applicationgateway definition allowing to specify SslCertificates. + */ + interface WithSslCertificates { + /** + * Specifies sslCertificates. + * @param sslCertificates SSL certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next definition stage + */ + WithCreate withSslCertificates(List sslCertificates); + } + + /** + * The stage of the applicationgateway definition allowing to specify SslPolicy. + */ + interface WithSslPolicy { + /** + * Specifies sslPolicy. + * @param sslPolicy SSL policy of the application gateway resource + * @return the next definition stage + */ + WithCreate withSslPolicy(ApplicationGatewaySslPolicy sslPolicy); + } + + /** + * The stage of the applicationgateway definition allowing to specify TrustedRootCertificates. + */ + interface WithTrustedRootCertificates { + /** + * Specifies trustedRootCertificates. + * @param trustedRootCertificates Trusted Root certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next definition stage + */ + WithCreate withTrustedRootCertificates(List trustedRootCertificates); + } + + /** + * The stage of the applicationgateway definition allowing to specify UrlPathMaps. + */ + interface WithUrlPathMaps { + /** + * Specifies urlPathMaps. + * @param urlPathMaps URL path map of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next definition stage + */ + WithCreate withUrlPathMaps(List urlPathMaps); + } + + /** + * The stage of the applicationgateway definition allowing to specify WebApplicationFirewallConfiguration. + */ + interface WithWebApplicationFirewallConfiguration { + /** + * Specifies webApplicationFirewallConfiguration. + * @param webApplicationFirewallConfiguration Web application firewall configuration + * @return the next definition stage + */ + WithCreate withWebApplicationFirewallConfiguration(ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration); + } + + /** + * The stage of the applicationgateway definition allowing to specify Zones. + */ + interface WithZones { + /** + * Specifies zones. + * @param zones A list of availability zones denoting where the resource needs to come from + * @return the next definition stage + */ + WithCreate withZones(List zones); + } + + /** + * 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.WithAuthenticationCertificates, DefinitionStages.WithAutoscaleConfiguration, DefinitionStages.WithBackendAddressPools, DefinitionStages.WithBackendHttpSettingsCollection, DefinitionStages.WithCustomErrorConfigurations, DefinitionStages.WithEnableFips, DefinitionStages.WithEnableHttp2, DefinitionStages.WithFirewallPolicy, DefinitionStages.WithFrontendIPConfigurations, DefinitionStages.WithFrontendPorts, DefinitionStages.WithGatewayIPConfigurations, DefinitionStages.WithHttpListeners, DefinitionStages.WithIdentity, DefinitionStages.WithProbes, DefinitionStages.WithRedirectConfigurations, DefinitionStages.WithRequestRoutingRules, DefinitionStages.WithRewriteRuleSets, DefinitionStages.WithSku, DefinitionStages.WithSslCertificates, DefinitionStages.WithSslPolicy, DefinitionStages.WithTrustedRootCertificates, DefinitionStages.WithUrlPathMaps, DefinitionStages.WithWebApplicationFirewallConfiguration, DefinitionStages.WithZones { + } + } + /** + * The template for a ApplicationGateway update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAuthenticationCertificates, UpdateStages.WithAutoscaleConfiguration, UpdateStages.WithBackendAddressPools, UpdateStages.WithBackendHttpSettingsCollection, UpdateStages.WithCustomErrorConfigurations, UpdateStages.WithEnableFips, UpdateStages.WithEnableHttp2, UpdateStages.WithFirewallPolicy, UpdateStages.WithFrontendIPConfigurations, UpdateStages.WithFrontendPorts, UpdateStages.WithGatewayIPConfigurations, UpdateStages.WithHttpListeners, UpdateStages.WithIdentity, UpdateStages.WithProbes, UpdateStages.WithRedirectConfigurations, UpdateStages.WithRequestRoutingRules, UpdateStages.WithRewriteRuleSets, UpdateStages.WithSku, UpdateStages.WithSslCertificates, UpdateStages.WithSslPolicy, UpdateStages.WithTrustedRootCertificates, UpdateStages.WithUrlPathMaps, UpdateStages.WithWebApplicationFirewallConfiguration, UpdateStages.WithZones { + } + + /** + * Grouping of ApplicationGateway update stages. + */ + interface UpdateStages { + /** + * The stage of the applicationgateway update allowing to specify AuthenticationCertificates. + */ + interface WithAuthenticationCertificates { + /** + * Specifies authenticationCertificates. + * @param authenticationCertificates Authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next update stage + */ + Update withAuthenticationCertificates(List authenticationCertificates); + } + + /** + * The stage of the applicationgateway update allowing to specify AutoscaleConfiguration. + */ + interface WithAutoscaleConfiguration { + /** + * Specifies autoscaleConfiguration. + * @param autoscaleConfiguration Autoscale Configuration + * @return the next update stage + */ + Update withAutoscaleConfiguration(ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration); + } + + /** + * The stage of the applicationgateway update allowing to specify BackendAddressPools. + */ + interface WithBackendAddressPools { + /** + * Specifies backendAddressPools. + * @param backendAddressPools Backend address pool of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next update stage + */ + Update withBackendAddressPools(List backendAddressPools); + } + + /** + * The stage of the applicationgateway update allowing to specify BackendHttpSettingsCollection. + */ + interface WithBackendHttpSettingsCollection { + /** + * Specifies backendHttpSettingsCollection. + * @param backendHttpSettingsCollection Backend http settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next update stage + */ + Update withBackendHttpSettingsCollection(List backendHttpSettingsCollection); + } + + /** + * The stage of the applicationgateway update allowing to specify CustomErrorConfigurations. + */ + interface WithCustomErrorConfigurations { + /** + * Specifies customErrorConfigurations. + * @param customErrorConfigurations Custom error configurations of the application gateway resource + * @return the next update stage + */ + Update withCustomErrorConfigurations(List customErrorConfigurations); + } + + /** + * The stage of the applicationgateway update allowing to specify EnableFips. + */ + interface WithEnableFips { + /** + * Specifies enableFips. + * @param enableFips Whether FIPS is enabled on the application gateway resource + * @return the next update stage + */ + Update withEnableFips(Boolean enableFips); + } + + /** + * The stage of the applicationgateway update allowing to specify EnableHttp2. + */ + interface WithEnableHttp2 { + /** + * Specifies enableHttp2. + * @param enableHttp2 Whether HTTP2 is enabled on the application gateway resource + * @return the next update stage + */ + Update withEnableHttp2(Boolean enableHttp2); + } + + /** + * The stage of the applicationgateway update allowing to specify FirewallPolicy. + */ + interface WithFirewallPolicy { + /** + * Specifies firewallPolicy. + * @param firewallPolicy Reference of the FirewallPolicy resource + * @return the next update stage + */ + Update withFirewallPolicy(SubResource firewallPolicy); + } + + /** + * The stage of the applicationgateway update allowing to specify FrontendIPConfigurations. + */ + interface WithFrontendIPConfigurations { + /** + * Specifies frontendIPConfigurations. + * @param frontendIPConfigurations Frontend IP addresses of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next update stage + */ + Update withFrontendIPConfigurations(List frontendIPConfigurations); + } + + /** + * The stage of the applicationgateway update allowing to specify FrontendPorts. + */ + interface WithFrontendPorts { + /** + * Specifies frontendPorts. + * @param frontendPorts Frontend ports of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next update stage + */ + Update withFrontendPorts(List frontendPorts); + } + + /** + * The stage of the applicationgateway update allowing to specify GatewayIPConfigurations. + */ + interface WithGatewayIPConfigurations { + /** + * Specifies gatewayIPConfigurations. + * @param gatewayIPConfigurations Subnets of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next update stage + */ + Update withGatewayIPConfigurations(List gatewayIPConfigurations); + } + + /** + * The stage of the applicationgateway update allowing to specify HttpListeners. + */ + interface WithHttpListeners { + /** + * Specifies httpListeners. + * @param httpListeners Http listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next update stage + */ + Update withHttpListeners(List httpListeners); + } + + /** + * The stage of the applicationgateway update allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity The identity of the application gateway, if configured + * @return the next update stage + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the applicationgateway update allowing to specify Probes. + */ + interface WithProbes { + /** + * Specifies probes. + * @param probes Probes of the application gateway resource + * @return the next update stage + */ + Update withProbes(List probes); + } + + /** + * The stage of the applicationgateway update allowing to specify RedirectConfigurations. + */ + interface WithRedirectConfigurations { + /** + * Specifies redirectConfigurations. + * @param redirectConfigurations Redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next update stage + */ + Update withRedirectConfigurations(List redirectConfigurations); + } + + /** + * The stage of the applicationgateway update allowing to specify RequestRoutingRules. + */ + interface WithRequestRoutingRules { + /** + * Specifies requestRoutingRules. + * @param requestRoutingRules Request routing rules of the application gateway resource + * @return the next update stage + */ + Update withRequestRoutingRules(List requestRoutingRules); + } + + /** + * The stage of the applicationgateway update allowing to specify RewriteRuleSets. + */ + interface WithRewriteRuleSets { + /** + * Specifies rewriteRuleSets. + * @param rewriteRuleSets Rewrite rules for the application gateway resource + * @return the next update stage + */ + Update withRewriteRuleSets(List rewriteRuleSets); + } + + /** + * The stage of the applicationgateway update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku SKU of the application gateway resource + * @return the next update stage + */ + Update withSku(ApplicationGatewaySku sku); + } + + /** + * The stage of the applicationgateway update allowing to specify SslCertificates. + */ + interface WithSslCertificates { + /** + * Specifies sslCertificates. + * @param sslCertificates SSL certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next update stage + */ + Update withSslCertificates(List sslCertificates); + } + + /** + * The stage of the applicationgateway update allowing to specify SslPolicy. + */ + interface WithSslPolicy { + /** + * Specifies sslPolicy. + * @param sslPolicy SSL policy of the application gateway resource + * @return the next update stage + */ + Update withSslPolicy(ApplicationGatewaySslPolicy sslPolicy); + } + + /** + * The stage of the applicationgateway update allowing to specify TrustedRootCertificates. + */ + interface WithTrustedRootCertificates { + /** + * Specifies trustedRootCertificates. + * @param trustedRootCertificates Trusted Root certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next update stage + */ + Update withTrustedRootCertificates(List trustedRootCertificates); + } + + /** + * The stage of the applicationgateway update allowing to specify UrlPathMaps. + */ + interface WithUrlPathMaps { + /** + * Specifies urlPathMaps. + * @param urlPathMaps URL path map of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits) + * @return the next update stage + */ + Update withUrlPathMaps(List urlPathMaps); + } + + /** + * The stage of the applicationgateway update allowing to specify WebApplicationFirewallConfiguration. + */ + interface WithWebApplicationFirewallConfiguration { + /** + * Specifies webApplicationFirewallConfiguration. + * @param webApplicationFirewallConfiguration Web application firewall configuration + * @return the next update stage + */ + Update withWebApplicationFirewallConfiguration(ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration); + } + + /** + * The stage of the applicationgateway update allowing to specify Zones. + */ + interface WithZones { + /** + * Specifies zones. + * @param zones A list of availability zones denoting where the resource needs to come from + * @return the next update stage + */ + Update withZones(List zones); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAuthenticationCertificate.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAuthenticationCertificate.java new file mode 100644 index 000000000000..b786d5f441b1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAuthenticationCertificate.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Authentication certificates of an application gateway. + */ +@JsonFlatten +public class ApplicationGatewayAuthenticationCertificate extends SubResource { + /** + * Certificate public data. + */ + @JsonProperty(value = "properties.data") + private String data; + + /** + * The provisioning state of the authentication certificate resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of the authentication certificate that is unique within an + * Application Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get certificate public data. + * + * @return the data value + */ + public String data() { + return this.data; + } + + /** + * Set certificate public data. + * + * @param data the data value to set + * @return the ApplicationGatewayAuthenticationCertificate object itself. + */ + public ApplicationGatewayAuthenticationCertificate withData(String data) { + this.data = data; + return this; + } + + /** + * Get the provisioning state of the authentication certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the authentication certificate that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the authentication certificate that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayAuthenticationCertificate object itself. + */ + public ApplicationGatewayAuthenticationCertificate withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAutoscaleConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAutoscaleConfiguration.java new file mode 100644 index 000000000000..0ff677f75e65 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAutoscaleConfiguration.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application Gateway autoscale configuration. + */ +public class ApplicationGatewayAutoscaleConfiguration { + /** + * Lower bound on number of Application Gateway capacity. + */ + @JsonProperty(value = "minCapacity", required = true) + private int minCapacity; + + /** + * Upper bound on number of Application Gateway capacity. + */ + @JsonProperty(value = "maxCapacity") + private Integer maxCapacity; + + /** + * Get lower bound on number of Application Gateway capacity. + * + * @return the minCapacity value + */ + public int minCapacity() { + return this.minCapacity; + } + + /** + * Set lower bound on number of Application Gateway capacity. + * + * @param minCapacity the minCapacity value to set + * @return the ApplicationGatewayAutoscaleConfiguration object itself. + */ + public ApplicationGatewayAutoscaleConfiguration withMinCapacity(int minCapacity) { + this.minCapacity = minCapacity; + return this; + } + + /** + * Get upper bound on number of Application Gateway capacity. + * + * @return the maxCapacity value + */ + public Integer maxCapacity() { + return this.maxCapacity; + } + + /** + * Set upper bound on number of Application Gateway capacity. + * + * @param maxCapacity the maxCapacity value to set + * @return the ApplicationGatewayAutoscaleConfiguration object itself. + */ + public ApplicationGatewayAutoscaleConfiguration withMaxCapacity(Integer maxCapacity) { + this.maxCapacity = maxCapacity; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAvailableSslOptions.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAvailableSslOptions.java new file mode 100644 index 000000000000..c1b9fa60a0ac --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAvailableSslOptions.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ApplicationGatewayAvailableSslOptionsInner; +import java.util.List; +import com.microsoft.azure.SubResource; +import java.util.Map; + +/** + * Type representing ApplicationGatewayAvailableSslOptions. + */ +public interface ApplicationGatewayAvailableSslOptions extends HasInner, HasManager { + /** + * @return the availableCipherSuites value. + */ + List availableCipherSuites(); + + /** + * @return the availableProtocols value. + */ + List availableProtocols(); + + /** + * @return the defaultPolicy value. + */ + ApplicationGatewaySslPolicyName defaultPolicy(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the predefinedPolicies value. + */ + List predefinedPolicies(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAvailableWafRuleSetsResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAvailableWafRuleSetsResult.java new file mode 100644 index 000000000000..ee73ef8b29d7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayAvailableWafRuleSetsResult.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ApplicationGatewayAvailableWafRuleSetsResultInner; +import java.util.List; + +/** + * Type representing ApplicationGatewayAvailableWafRuleSetsResult. + */ +public interface ApplicationGatewayAvailableWafRuleSetsResult extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendAddress.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendAddress.java new file mode 100644 index 000000000000..32d1da1b72e4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendAddress.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Backend address of an application gateway. + */ +public class ApplicationGatewayBackendAddress { + /** + * Fully qualified domain name (FQDN). + */ + @JsonProperty(value = "fqdn") + private String fqdn; + + /** + * IP address. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * Get fully qualified domain name (FQDN). + * + * @return the fqdn value + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Set fully qualified domain name (FQDN). + * + * @param fqdn the fqdn value to set + * @return the ApplicationGatewayBackendAddress object itself. + */ + public ApplicationGatewayBackendAddress withFqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * Get iP address. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set iP address. + * + * @param ipAddress the ipAddress value to set + * @return the ApplicationGatewayBackendAddress object itself. + */ + public ApplicationGatewayBackendAddress withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendAddressPool.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendAddressPool.java new file mode 100644 index 000000000000..855f3b6eb22c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendAddressPool.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.network.v2019_09_01; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkInterfaceIPConfigurationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Backend Address Pool of an application gateway. + */ +@JsonFlatten +public class ApplicationGatewayBackendAddressPool extends SubResource { + /** + * Collection of references to IPs defined in network interfaces. + */ + @JsonProperty(value = "properties.backendIPConfigurations", access = JsonProperty.Access.WRITE_ONLY) + private List backendIPConfigurations; + + /** + * Backend addresses. + */ + @JsonProperty(value = "properties.backendAddresses") + private List backendAddresses; + + /** + * The provisioning state of the backend address pool resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of the backend address pool that is unique within an Application + * Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get collection of references to IPs defined in network interfaces. + * + * @return the backendIPConfigurations value + */ + public List backendIPConfigurations() { + return this.backendIPConfigurations; + } + + /** + * Get backend addresses. + * + * @return the backendAddresses value + */ + public List backendAddresses() { + return this.backendAddresses; + } + + /** + * Set backend addresses. + * + * @param backendAddresses the backendAddresses value to set + * @return the ApplicationGatewayBackendAddressPool object itself. + */ + public ApplicationGatewayBackendAddressPool withBackendAddresses(List backendAddresses) { + this.backendAddresses = backendAddresses; + return this; + } + + /** + * Get the provisioning state of the backend address pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the backend address pool that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the backend address pool that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayBackendAddressPool object itself. + */ + public ApplicationGatewayBackendAddressPool withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealth.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealth.java new file mode 100644 index 000000000000..4042b6809b17 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealth.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ApplicationGatewayBackendHealthInner; +import java.util.List; + +/** + * Type representing ApplicationGatewayBackendHealth. + */ +public interface ApplicationGatewayBackendHealth extends HasInner, HasManager { + /** + * @return the backendAddressPools value. + */ + List backendAddressPools(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthHttpSettings.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthHttpSettings.java new file mode 100644 index 000000000000..d4eb37d5c137 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthHttpSettings.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application gateway BackendHealthHttp settings. + */ +public class ApplicationGatewayBackendHealthHttpSettings { + /** + * Reference of an ApplicationGatewayBackendHttpSettings resource. + */ + @JsonProperty(value = "backendHttpSettings") + private ApplicationGatewayBackendHttpSettings backendHttpSettings; + + /** + * List of ApplicationGatewayBackendHealthServer resources. + */ + @JsonProperty(value = "servers") + private List servers; + + /** + * Get reference of an ApplicationGatewayBackendHttpSettings resource. + * + * @return the backendHttpSettings value + */ + public ApplicationGatewayBackendHttpSettings backendHttpSettings() { + return this.backendHttpSettings; + } + + /** + * Set reference of an ApplicationGatewayBackendHttpSettings resource. + * + * @param backendHttpSettings the backendHttpSettings value to set + * @return the ApplicationGatewayBackendHealthHttpSettings object itself. + */ + public ApplicationGatewayBackendHealthHttpSettings withBackendHttpSettings(ApplicationGatewayBackendHttpSettings backendHttpSettings) { + this.backendHttpSettings = backendHttpSettings; + return this; + } + + /** + * Get list of ApplicationGatewayBackendHealthServer resources. + * + * @return the servers value + */ + public List servers() { + return this.servers; + } + + /** + * Set list of ApplicationGatewayBackendHealthServer resources. + * + * @param servers the servers value to set + * @return the ApplicationGatewayBackendHealthHttpSettings object itself. + */ + public ApplicationGatewayBackendHealthHttpSettings withServers(List servers) { + this.servers = servers; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthOnDemand.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthOnDemand.java new file mode 100644 index 000000000000..4a07c5cd6c23 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthOnDemand.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ApplicationGatewayBackendHealthOnDemandInner; + +/** + * Type representing ApplicationGatewayBackendHealthOnDemand. + */ +public interface ApplicationGatewayBackendHealthOnDemand extends HasInner, HasManager { + /** + * @return the backendAddressPool value. + */ + ApplicationGatewayBackendAddressPool backendAddressPool(); + + /** + * @return the backendHealthHttpSettings value. + */ + ApplicationGatewayBackendHealthHttpSettings backendHealthHttpSettings(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthPool.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthPool.java new file mode 100644 index 000000000000..c1726188fb5f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthPool.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application gateway BackendHealth pool. + */ +public class ApplicationGatewayBackendHealthPool { + /** + * Reference of an ApplicationGatewayBackendAddressPool resource. + */ + @JsonProperty(value = "backendAddressPool") + private ApplicationGatewayBackendAddressPool backendAddressPool; + + /** + * List of ApplicationGatewayBackendHealthHttpSettings resources. + */ + @JsonProperty(value = "backendHttpSettingsCollection") + private List backendHttpSettingsCollection; + + /** + * Get reference of an ApplicationGatewayBackendAddressPool resource. + * + * @return the backendAddressPool value + */ + public ApplicationGatewayBackendAddressPool backendAddressPool() { + return this.backendAddressPool; + } + + /** + * Set reference of an ApplicationGatewayBackendAddressPool resource. + * + * @param backendAddressPool the backendAddressPool value to set + * @return the ApplicationGatewayBackendHealthPool object itself. + */ + public ApplicationGatewayBackendHealthPool withBackendAddressPool(ApplicationGatewayBackendAddressPool backendAddressPool) { + this.backendAddressPool = backendAddressPool; + return this; + } + + /** + * Get list of ApplicationGatewayBackendHealthHttpSettings resources. + * + * @return the backendHttpSettingsCollection value + */ + public List backendHttpSettingsCollection() { + return this.backendHttpSettingsCollection; + } + + /** + * Set list of ApplicationGatewayBackendHealthHttpSettings resources. + * + * @param backendHttpSettingsCollection the backendHttpSettingsCollection value to set + * @return the ApplicationGatewayBackendHealthPool object itself. + */ + public ApplicationGatewayBackendHealthPool withBackendHttpSettingsCollection(List backendHttpSettingsCollection) { + this.backendHttpSettingsCollection = backendHttpSettingsCollection; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthServer.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthServer.java new file mode 100644 index 000000000000..e3a5e7c67252 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthServer.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkInterfaceIPConfigurationInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application gateway backendhealth http settings. + */ +public class ApplicationGatewayBackendHealthServer { + /** + * IP address or FQDN of backend server. + */ + @JsonProperty(value = "address") + private String address; + + /** + * Reference of IP configuration of backend server. + */ + @JsonProperty(value = "ipConfiguration") + private NetworkInterfaceIPConfigurationInner ipConfiguration; + + /** + * Health of backend server. Possible values include: 'Unknown', 'Up', + * 'Down', 'Partial', 'Draining'. + */ + @JsonProperty(value = "health") + private ApplicationGatewayBackendHealthServerHealth health; + + /** + * Health Probe Log. + */ + @JsonProperty(value = "healthProbeLog") + private String healthProbeLog; + + /** + * Get iP address or FQDN of backend server. + * + * @return the address value + */ + public String address() { + return this.address; + } + + /** + * Set iP address or FQDN of backend server. + * + * @param address the address value to set + * @return the ApplicationGatewayBackendHealthServer object itself. + */ + public ApplicationGatewayBackendHealthServer withAddress(String address) { + this.address = address; + return this; + } + + /** + * Get reference of IP configuration of backend server. + * + * @return the ipConfiguration value + */ + public NetworkInterfaceIPConfigurationInner ipConfiguration() { + return this.ipConfiguration; + } + + /** + * Set reference of IP configuration of backend server. + * + * @param ipConfiguration the ipConfiguration value to set + * @return the ApplicationGatewayBackendHealthServer object itself. + */ + public ApplicationGatewayBackendHealthServer withIpConfiguration(NetworkInterfaceIPConfigurationInner ipConfiguration) { + this.ipConfiguration = ipConfiguration; + return this; + } + + /** + * Get health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'. + * + * @return the health value + */ + public ApplicationGatewayBackendHealthServerHealth health() { + return this.health; + } + + /** + * Set health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'. + * + * @param health the health value to set + * @return the ApplicationGatewayBackendHealthServer object itself. + */ + public ApplicationGatewayBackendHealthServer withHealth(ApplicationGatewayBackendHealthServerHealth health) { + this.health = health; + return this; + } + + /** + * Get health Probe Log. + * + * @return the healthProbeLog value + */ + public String healthProbeLog() { + return this.healthProbeLog; + } + + /** + * Set health Probe Log. + * + * @param healthProbeLog the healthProbeLog value to set + * @return the ApplicationGatewayBackendHealthServer object itself. + */ + public ApplicationGatewayBackendHealthServer withHealthProbeLog(String healthProbeLog) { + this.healthProbeLog = healthProbeLog; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthServerHealth.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthServerHealth.java new file mode 100644 index 000000000000..3a588166c78f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHealthServerHealth.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewayBackendHealthServerHealth. + */ +public final class ApplicationGatewayBackendHealthServerHealth extends ExpandableStringEnum { + /** Static value Unknown for ApplicationGatewayBackendHealthServerHealth. */ + public static final ApplicationGatewayBackendHealthServerHealth UNKNOWN = fromString("Unknown"); + + /** Static value Up for ApplicationGatewayBackendHealthServerHealth. */ + public static final ApplicationGatewayBackendHealthServerHealth UP = fromString("Up"); + + /** Static value Down for ApplicationGatewayBackendHealthServerHealth. */ + public static final ApplicationGatewayBackendHealthServerHealth DOWN = fromString("Down"); + + /** Static value Partial for ApplicationGatewayBackendHealthServerHealth. */ + public static final ApplicationGatewayBackendHealthServerHealth PARTIAL = fromString("Partial"); + + /** Static value Draining for ApplicationGatewayBackendHealthServerHealth. */ + public static final ApplicationGatewayBackendHealthServerHealth DRAINING = fromString("Draining"); + + /** + * Creates or finds a ApplicationGatewayBackendHealthServerHealth from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayBackendHealthServerHealth + */ + @JsonCreator + public static ApplicationGatewayBackendHealthServerHealth fromString(String name) { + return fromString(name, ApplicationGatewayBackendHealthServerHealth.class); + } + + /** + * @return known ApplicationGatewayBackendHealthServerHealth values + */ + public static Collection values() { + return values(ApplicationGatewayBackendHealthServerHealth.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHttpSettings.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHttpSettings.java new file mode 100644 index 000000000000..616b9c0b2e88 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayBackendHttpSettings.java @@ -0,0 +1,437 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Backend address pool settings of an application gateway. + */ +@JsonFlatten +public class ApplicationGatewayBackendHttpSettings extends SubResource { + /** + * The destination port on the backend. + */ + @JsonProperty(value = "properties.port") + private Integer port; + + /** + * The protocol used to communicate with the backend. Possible values + * include: 'Http', 'Https'. + */ + @JsonProperty(value = "properties.protocol") + private ApplicationGatewayProtocol protocol; + + /** + * Cookie based affinity. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.cookieBasedAffinity") + private ApplicationGatewayCookieBasedAffinity cookieBasedAffinity; + + /** + * Request timeout in seconds. Application Gateway will fail the request if + * response is not received within RequestTimeout. Acceptable values are + * from 1 second to 86400 seconds. + */ + @JsonProperty(value = "properties.requestTimeout") + private Integer requestTimeout; + + /** + * Probe resource of an application gateway. + */ + @JsonProperty(value = "properties.probe") + private SubResource probe; + + /** + * Array of references to application gateway authentication certificates. + */ + @JsonProperty(value = "properties.authenticationCertificates") + private List authenticationCertificates; + + /** + * Array of references to application gateway trusted root certificates. + */ + @JsonProperty(value = "properties.trustedRootCertificates") + private List trustedRootCertificates; + + /** + * Connection draining of the backend http settings resource. + */ + @JsonProperty(value = "properties.connectionDraining") + private ApplicationGatewayConnectionDraining connectionDraining; + + /** + * Host header to be sent to the backend servers. + */ + @JsonProperty(value = "properties.hostName") + private String hostName; + + /** + * Whether to pick host header should be picked from the host name of the + * backend server. Default value is false. + */ + @JsonProperty(value = "properties.pickHostNameFromBackendAddress") + private Boolean pickHostNameFromBackendAddress; + + /** + * Cookie name to use for the affinity cookie. + */ + @JsonProperty(value = "properties.affinityCookieName") + private String affinityCookieName; + + /** + * Whether the probe is enabled. Default value is false. + */ + @JsonProperty(value = "properties.probeEnabled") + private Boolean probeEnabled; + + /** + * Path which should be used as a prefix for all HTTP requests. Null means + * no path will be prefixed. Default value is null. + */ + @JsonProperty(value = "properties.path") + private String path; + + /** + * The provisioning state of the backend HTTP settings resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of the backend http settings that is unique within an Application + * Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the destination port on the backend. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set the destination port on the backend. + * + * @param port the port value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the protocol used to communicate with the backend. Possible values include: 'Http', 'Https'. + * + * @return the protocol value + */ + public ApplicationGatewayProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol used to communicate with the backend. Possible values include: 'Http', 'Https'. + * + * @param protocol the protocol value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withProtocol(ApplicationGatewayProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get cookie based affinity. Possible values include: 'Enabled', 'Disabled'. + * + * @return the cookieBasedAffinity value + */ + public ApplicationGatewayCookieBasedAffinity cookieBasedAffinity() { + return this.cookieBasedAffinity; + } + + /** + * Set cookie based affinity. Possible values include: 'Enabled', 'Disabled'. + * + * @param cookieBasedAffinity the cookieBasedAffinity value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withCookieBasedAffinity(ApplicationGatewayCookieBasedAffinity cookieBasedAffinity) { + this.cookieBasedAffinity = cookieBasedAffinity; + return this; + } + + /** + * Get request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds. + * + * @return the requestTimeout value + */ + public Integer requestTimeout() { + return this.requestTimeout; + } + + /** + * Set request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds. + * + * @param requestTimeout the requestTimeout value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withRequestTimeout(Integer requestTimeout) { + this.requestTimeout = requestTimeout; + return this; + } + + /** + * Get probe resource of an application gateway. + * + * @return the probe value + */ + public SubResource probe() { + return this.probe; + } + + /** + * Set probe resource of an application gateway. + * + * @param probe the probe value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withProbe(SubResource probe) { + this.probe = probe; + return this; + } + + /** + * Get array of references to application gateway authentication certificates. + * + * @return the authenticationCertificates value + */ + public List authenticationCertificates() { + return this.authenticationCertificates; + } + + /** + * Set array of references to application gateway authentication certificates. + * + * @param authenticationCertificates the authenticationCertificates value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withAuthenticationCertificates(List authenticationCertificates) { + this.authenticationCertificates = authenticationCertificates; + return this; + } + + /** + * Get array of references to application gateway trusted root certificates. + * + * @return the trustedRootCertificates value + */ + public List trustedRootCertificates() { + return this.trustedRootCertificates; + } + + /** + * Set array of references to application gateway trusted root certificates. + * + * @param trustedRootCertificates the trustedRootCertificates value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withTrustedRootCertificates(List trustedRootCertificates) { + this.trustedRootCertificates = trustedRootCertificates; + return this; + } + + /** + * Get connection draining of the backend http settings resource. + * + * @return the connectionDraining value + */ + public ApplicationGatewayConnectionDraining connectionDraining() { + return this.connectionDraining; + } + + /** + * Set connection draining of the backend http settings resource. + * + * @param connectionDraining the connectionDraining value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withConnectionDraining(ApplicationGatewayConnectionDraining connectionDraining) { + this.connectionDraining = connectionDraining; + return this; + } + + /** + * Get host header to be sent to the backend servers. + * + * @return the hostName value + */ + public String hostName() { + return this.hostName; + } + + /** + * Set host header to be sent to the backend servers. + * + * @param hostName the hostName value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withHostName(String hostName) { + this.hostName = hostName; + return this; + } + + /** + * Get whether to pick host header should be picked from the host name of the backend server. Default value is false. + * + * @return the pickHostNameFromBackendAddress value + */ + public Boolean pickHostNameFromBackendAddress() { + return this.pickHostNameFromBackendAddress; + } + + /** + * Set whether to pick host header should be picked from the host name of the backend server. Default value is false. + * + * @param pickHostNameFromBackendAddress the pickHostNameFromBackendAddress value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withPickHostNameFromBackendAddress(Boolean pickHostNameFromBackendAddress) { + this.pickHostNameFromBackendAddress = pickHostNameFromBackendAddress; + return this; + } + + /** + * Get cookie name to use for the affinity cookie. + * + * @return the affinityCookieName value + */ + public String affinityCookieName() { + return this.affinityCookieName; + } + + /** + * Set cookie name to use for the affinity cookie. + * + * @param affinityCookieName the affinityCookieName value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withAffinityCookieName(String affinityCookieName) { + this.affinityCookieName = affinityCookieName; + return this; + } + + /** + * Get whether the probe is enabled. Default value is false. + * + * @return the probeEnabled value + */ + public Boolean probeEnabled() { + return this.probeEnabled; + } + + /** + * Set whether the probe is enabled. Default value is false. + * + * @param probeEnabled the probeEnabled value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withProbeEnabled(Boolean probeEnabled) { + this.probeEnabled = probeEnabled; + return this; + } + + /** + * Get path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. + * + * @param path the path value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the provisioning state of the backend HTTP settings resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the backend http settings that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the backend http settings that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayBackendHttpSettings object itself. + */ + public ApplicationGatewayBackendHttpSettings withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayConnectionDraining.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayConnectionDraining.java new file mode 100644 index 000000000000..b6091a9c2269 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayConnectionDraining.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Connection draining allows open connections to a backend server to be active + * for a specified time after the backend server got removed from the + * configuration. + */ +public class ApplicationGatewayConnectionDraining { + /** + * Whether connection draining is enabled or not. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /** + * The number of seconds connection draining is active. Acceptable values + * are from 1 second to 3600 seconds. + */ + @JsonProperty(value = "drainTimeoutInSec", required = true) + private int drainTimeoutInSec; + + /** + * Get whether connection draining is enabled or not. + * + * @return the enabled value + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set whether connection draining is enabled or not. + * + * @param enabled the enabled value to set + * @return the ApplicationGatewayConnectionDraining object itself. + */ + public ApplicationGatewayConnectionDraining withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds. + * + * @return the drainTimeoutInSec value + */ + public int drainTimeoutInSec() { + return this.drainTimeoutInSec; + } + + /** + * Set the number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds. + * + * @param drainTimeoutInSec the drainTimeoutInSec value to set + * @return the ApplicationGatewayConnectionDraining object itself. + */ + public ApplicationGatewayConnectionDraining withDrainTimeoutInSec(int drainTimeoutInSec) { + this.drainTimeoutInSec = drainTimeoutInSec; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayCookieBasedAffinity.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayCookieBasedAffinity.java new file mode 100644 index 000000000000..ad0f74a6764e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayCookieBasedAffinity.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewayCookieBasedAffinity. + */ +public final class ApplicationGatewayCookieBasedAffinity extends ExpandableStringEnum { + /** Static value Enabled for ApplicationGatewayCookieBasedAffinity. */ + public static final ApplicationGatewayCookieBasedAffinity ENABLED = fromString("Enabled"); + + /** Static value Disabled for ApplicationGatewayCookieBasedAffinity. */ + public static final ApplicationGatewayCookieBasedAffinity DISABLED = fromString("Disabled"); + + /** + * Creates or finds a ApplicationGatewayCookieBasedAffinity from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayCookieBasedAffinity + */ + @JsonCreator + public static ApplicationGatewayCookieBasedAffinity fromString(String name) { + return fromString(name, ApplicationGatewayCookieBasedAffinity.class); + } + + /** + * @return known ApplicationGatewayCookieBasedAffinity values + */ + public static Collection values() { + return values(ApplicationGatewayCookieBasedAffinity.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayCustomError.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayCustomError.java new file mode 100644 index 000000000000..ee1e8b4e8a56 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayCustomError.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Customer error of an application gateway. + */ +public class ApplicationGatewayCustomError { + /** + * Status code of the application gateway customer error. Possible values + * include: 'HttpStatus403', 'HttpStatus502'. + */ + @JsonProperty(value = "statusCode") + private ApplicationGatewayCustomErrorStatusCode statusCode; + + /** + * Error page URL of the application gateway customer error. + */ + @JsonProperty(value = "customErrorPageUrl") + private String customErrorPageUrl; + + /** + * Get status code of the application gateway customer error. Possible values include: 'HttpStatus403', 'HttpStatus502'. + * + * @return the statusCode value + */ + public ApplicationGatewayCustomErrorStatusCode statusCode() { + return this.statusCode; + } + + /** + * Set status code of the application gateway customer error. Possible values include: 'HttpStatus403', 'HttpStatus502'. + * + * @param statusCode the statusCode value to set + * @return the ApplicationGatewayCustomError object itself. + */ + public ApplicationGatewayCustomError withStatusCode(ApplicationGatewayCustomErrorStatusCode statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Get error page URL of the application gateway customer error. + * + * @return the customErrorPageUrl value + */ + public String customErrorPageUrl() { + return this.customErrorPageUrl; + } + + /** + * Set error page URL of the application gateway customer error. + * + * @param customErrorPageUrl the customErrorPageUrl value to set + * @return the ApplicationGatewayCustomError object itself. + */ + public ApplicationGatewayCustomError withCustomErrorPageUrl(String customErrorPageUrl) { + this.customErrorPageUrl = customErrorPageUrl; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayCustomErrorStatusCode.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayCustomErrorStatusCode.java new file mode 100644 index 000000000000..ee0b9bad31b7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayCustomErrorStatusCode.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewayCustomErrorStatusCode. + */ +public final class ApplicationGatewayCustomErrorStatusCode extends ExpandableStringEnum { + /** Static value HttpStatus403 for ApplicationGatewayCustomErrorStatusCode. */ + public static final ApplicationGatewayCustomErrorStatusCode HTTP_STATUS403 = fromString("HttpStatus403"); + + /** Static value HttpStatus502 for ApplicationGatewayCustomErrorStatusCode. */ + public static final ApplicationGatewayCustomErrorStatusCode HTTP_STATUS502 = fromString("HttpStatus502"); + + /** + * Creates or finds a ApplicationGatewayCustomErrorStatusCode from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayCustomErrorStatusCode + */ + @JsonCreator + public static ApplicationGatewayCustomErrorStatusCode fromString(String name) { + return fromString(name, ApplicationGatewayCustomErrorStatusCode.class); + } + + /** + * @return known ApplicationGatewayCustomErrorStatusCode values + */ + public static Collection values() { + return values(ApplicationGatewayCustomErrorStatusCode.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallDisabledRuleGroup.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallDisabledRuleGroup.java new file mode 100644 index 000000000000..b4912a6e0f27 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallDisabledRuleGroup.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Allows to disable rules within a rule group or an entire rule group. + */ +public class ApplicationGatewayFirewallDisabledRuleGroup { + /** + * The name of the rule group that will be disabled. + */ + @JsonProperty(value = "ruleGroupName", required = true) + private String ruleGroupName; + + /** + * The list of rules that will be disabled. If null, all rules of the rule + * group will be disabled. + */ + @JsonProperty(value = "rules") + private List rules; + + /** + * Get the name of the rule group that will be disabled. + * + * @return the ruleGroupName value + */ + public String ruleGroupName() { + return this.ruleGroupName; + } + + /** + * Set the name of the rule group that will be disabled. + * + * @param ruleGroupName the ruleGroupName value to set + * @return the ApplicationGatewayFirewallDisabledRuleGroup object itself. + */ + public ApplicationGatewayFirewallDisabledRuleGroup withRuleGroupName(String ruleGroupName) { + this.ruleGroupName = ruleGroupName; + return this; + } + + /** + * Get the list of rules that will be disabled. If null, all rules of the rule group will be disabled. + * + * @return the rules value + */ + public List rules() { + return this.rules; + } + + /** + * Set the list of rules that will be disabled. If null, all rules of the rule group will be disabled. + * + * @param rules the rules value to set + * @return the ApplicationGatewayFirewallDisabledRuleGroup object itself. + */ + public ApplicationGatewayFirewallDisabledRuleGroup withRules(List rules) { + this.rules = rules; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallExclusion.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallExclusion.java new file mode 100644 index 000000000000..7a9966583f98 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallExclusion.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Allow to exclude some variable satisfy the condition for the WAF check. + */ +public class ApplicationGatewayFirewallExclusion { + /** + * The variable to be excluded. + */ + @JsonProperty(value = "matchVariable", required = true) + private String matchVariable; + + /** + * When matchVariable is a collection, operate on the selector to specify + * which elements in the collection this exclusion applies to. + */ + @JsonProperty(value = "selectorMatchOperator", required = true) + private String selectorMatchOperator; + + /** + * When matchVariable is a collection, operator used to specify which + * elements in the collection this exclusion applies to. + */ + @JsonProperty(value = "selector", required = true) + private String selector; + + /** + * Get the variable to be excluded. + * + * @return the matchVariable value + */ + public String matchVariable() { + return this.matchVariable; + } + + /** + * Set the variable to be excluded. + * + * @param matchVariable the matchVariable value to set + * @return the ApplicationGatewayFirewallExclusion object itself. + */ + public ApplicationGatewayFirewallExclusion withMatchVariable(String matchVariable) { + this.matchVariable = matchVariable; + return this; + } + + /** + * Get when matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. + * + * @return the selectorMatchOperator value + */ + public String selectorMatchOperator() { + return this.selectorMatchOperator; + } + + /** + * Set when matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. + * + * @param selectorMatchOperator the selectorMatchOperator value to set + * @return the ApplicationGatewayFirewallExclusion object itself. + */ + public ApplicationGatewayFirewallExclusion withSelectorMatchOperator(String selectorMatchOperator) { + this.selectorMatchOperator = selectorMatchOperator; + return this; + } + + /** + * Get when matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to. + * + * @return the selector value + */ + public String selector() { + return this.selector; + } + + /** + * Set when matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to. + * + * @param selector the selector value to set + * @return the ApplicationGatewayFirewallExclusion object itself. + */ + public ApplicationGatewayFirewallExclusion withSelector(String selector) { + this.selector = selector; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallMode.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallMode.java new file mode 100644 index 000000000000..38ecb29e5324 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallMode.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewayFirewallMode. + */ +public final class ApplicationGatewayFirewallMode extends ExpandableStringEnum { + /** Static value Detection for ApplicationGatewayFirewallMode. */ + public static final ApplicationGatewayFirewallMode DETECTION = fromString("Detection"); + + /** Static value Prevention for ApplicationGatewayFirewallMode. */ + public static final ApplicationGatewayFirewallMode PREVENTION = fromString("Prevention"); + + /** + * Creates or finds a ApplicationGatewayFirewallMode from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayFirewallMode + */ + @JsonCreator + public static ApplicationGatewayFirewallMode fromString(String name) { + return fromString(name, ApplicationGatewayFirewallMode.class); + } + + /** + * @return known ApplicationGatewayFirewallMode values + */ + public static Collection values() { + return values(ApplicationGatewayFirewallMode.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallRule.java new file mode 100644 index 000000000000..f59f8461a07d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallRule.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A web application firewall rule. + */ +public class ApplicationGatewayFirewallRule { + /** + * The identifier of the web application firewall rule. + */ + @JsonProperty(value = "ruleId", required = true) + private int ruleId; + + /** + * The description of the web application firewall rule. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the identifier of the web application firewall rule. + * + * @return the ruleId value + */ + public int ruleId() { + return this.ruleId; + } + + /** + * Set the identifier of the web application firewall rule. + * + * @param ruleId the ruleId value to set + * @return the ApplicationGatewayFirewallRule object itself. + */ + public ApplicationGatewayFirewallRule withRuleId(int ruleId) { + this.ruleId = ruleId; + return this; + } + + /** + * Get the description of the web application firewall rule. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description of the web application firewall rule. + * + * @param description the description value to set + * @return the ApplicationGatewayFirewallRule object itself. + */ + public ApplicationGatewayFirewallRule withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallRuleGroup.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallRuleGroup.java new file mode 100644 index 000000000000..38e3320d026c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallRuleGroup.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A web application firewall rule group. + */ +public class ApplicationGatewayFirewallRuleGroup { + /** + * The name of the web application firewall rule group. + */ + @JsonProperty(value = "ruleGroupName", required = true) + private String ruleGroupName; + + /** + * The description of the web application firewall rule group. + */ + @JsonProperty(value = "description") + private String description; + + /** + * The rules of the web application firewall rule group. + */ + @JsonProperty(value = "rules", required = true) + private List rules; + + /** + * Get the name of the web application firewall rule group. + * + * @return the ruleGroupName value + */ + public String ruleGroupName() { + return this.ruleGroupName; + } + + /** + * Set the name of the web application firewall rule group. + * + * @param ruleGroupName the ruleGroupName value to set + * @return the ApplicationGatewayFirewallRuleGroup object itself. + */ + public ApplicationGatewayFirewallRuleGroup withRuleGroupName(String ruleGroupName) { + this.ruleGroupName = ruleGroupName; + return this; + } + + /** + * Get the description of the web application firewall rule group. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description of the web application firewall rule group. + * + * @param description the description value to set + * @return the ApplicationGatewayFirewallRuleGroup object itself. + */ + public ApplicationGatewayFirewallRuleGroup withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the rules of the web application firewall rule group. + * + * @return the rules value + */ + public List rules() { + return this.rules; + } + + /** + * Set the rules of the web application firewall rule group. + * + * @param rules the rules value to set + * @return the ApplicationGatewayFirewallRuleGroup object itself. + */ + public ApplicationGatewayFirewallRuleGroup withRules(List rules) { + this.rules = rules; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallRuleSet.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallRuleSet.java new file mode 100644 index 000000000000..94c8bb8b12f0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFirewallRuleSet.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * A web application firewall rule set. + */ +@JsonFlatten +@SkipParentValidation +public class ApplicationGatewayFirewallRuleSet extends Resource { + /** + * The provisioning state of the web application firewall rule set. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The type of the web application firewall rule set. + */ + @JsonProperty(value = "properties.ruleSetType", required = true) + private String ruleSetType; + + /** + * The version of the web application firewall rule set type. + */ + @JsonProperty(value = "properties.ruleSetVersion", required = true) + private String ruleSetVersion; + + /** + * The rule groups of the web application firewall rule set. + */ + @JsonProperty(value = "properties.ruleGroups", required = true) + private List ruleGroups; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the provisioning state of the web application firewall rule set. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the type of the web application firewall rule set. + * + * @return the ruleSetType value + */ + public String ruleSetType() { + return this.ruleSetType; + } + + /** + * Set the type of the web application firewall rule set. + * + * @param ruleSetType the ruleSetType value to set + * @return the ApplicationGatewayFirewallRuleSet object itself. + */ + public ApplicationGatewayFirewallRuleSet withRuleSetType(String ruleSetType) { + this.ruleSetType = ruleSetType; + return this; + } + + /** + * Get the version of the web application firewall rule set type. + * + * @return the ruleSetVersion value + */ + public String ruleSetVersion() { + return this.ruleSetVersion; + } + + /** + * Set the version of the web application firewall rule set type. + * + * @param ruleSetVersion the ruleSetVersion value to set + * @return the ApplicationGatewayFirewallRuleSet object itself. + */ + public ApplicationGatewayFirewallRuleSet withRuleSetVersion(String ruleSetVersion) { + this.ruleSetVersion = ruleSetVersion; + return this; + } + + /** + * Get the rule groups of the web application firewall rule set. + * + * @return the ruleGroups value + */ + public List ruleGroups() { + return this.ruleGroups; + } + + /** + * Set the rule groups of the web application firewall rule set. + * + * @param ruleGroups the ruleGroups value to set + * @return the ApplicationGatewayFirewallRuleSet object itself. + */ + public ApplicationGatewayFirewallRuleSet withRuleGroups(List ruleGroups) { + this.ruleGroups = ruleGroups; + return this; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the ApplicationGatewayFirewallRuleSet object itself. + */ + public ApplicationGatewayFirewallRuleSet withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFrontendIPConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFrontendIPConfiguration.java new file mode 100644 index 000000000000..f7f1250cac14 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFrontendIPConfiguration.java @@ -0,0 +1,198 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Frontend IP configuration of an application gateway. + */ +@JsonFlatten +public class ApplicationGatewayFrontendIPConfiguration extends SubResource { + /** + * PrivateIPAddress of the network interface IP Configuration. + */ + @JsonProperty(value = "properties.privateIPAddress") + private String privateIPAddress; + + /** + * The private IP address allocation method. Possible values include: + * 'Static', 'Dynamic'. + */ + @JsonProperty(value = "properties.privateIPAllocationMethod") + private IPAllocationMethod privateIPAllocationMethod; + + /** + * Reference of the subnet resource. + */ + @JsonProperty(value = "properties.subnet") + private SubResource subnet; + + /** + * Reference of the PublicIP resource. + */ + @JsonProperty(value = "properties.publicIPAddress") + private SubResource publicIPAddress; + + /** + * The provisioning state of the frontend IP configuration resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of the frontend IP configuration that is unique within an + * Application Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get privateIPAddress of the network interface IP Configuration. + * + * @return the privateIPAddress value + */ + public String privateIPAddress() { + return this.privateIPAddress; + } + + /** + * Set privateIPAddress of the network interface IP Configuration. + * + * @param privateIPAddress the privateIPAddress value to set + * @return the ApplicationGatewayFrontendIPConfiguration object itself. + */ + public ApplicationGatewayFrontendIPConfiguration withPrivateIPAddress(String privateIPAddress) { + this.privateIPAddress = privateIPAddress; + return this; + } + + /** + * Get the private IP address allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @return the privateIPAllocationMethod value + */ + public IPAllocationMethod privateIPAllocationMethod() { + return this.privateIPAllocationMethod; + } + + /** + * Set the private IP address allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @param privateIPAllocationMethod the privateIPAllocationMethod value to set + * @return the ApplicationGatewayFrontendIPConfiguration object itself. + */ + public ApplicationGatewayFrontendIPConfiguration withPrivateIPAllocationMethod(IPAllocationMethod privateIPAllocationMethod) { + this.privateIPAllocationMethod = privateIPAllocationMethod; + return this; + } + + /** + * Get reference of the subnet resource. + * + * @return the subnet value + */ + public SubResource subnet() { + return this.subnet; + } + + /** + * Set reference of the subnet resource. + * + * @param subnet the subnet value to set + * @return the ApplicationGatewayFrontendIPConfiguration object itself. + */ + public ApplicationGatewayFrontendIPConfiguration withSubnet(SubResource subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get reference of the PublicIP resource. + * + * @return the publicIPAddress value + */ + public SubResource publicIPAddress() { + return this.publicIPAddress; + } + + /** + * Set reference of the PublicIP resource. + * + * @param publicIPAddress the publicIPAddress value to set + * @return the ApplicationGatewayFrontendIPConfiguration object itself. + */ + public ApplicationGatewayFrontendIPConfiguration withPublicIPAddress(SubResource publicIPAddress) { + this.publicIPAddress = publicIPAddress; + return this; + } + + /** + * Get the provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the frontend IP configuration that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the frontend IP configuration that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayFrontendIPConfiguration object itself. + */ + public ApplicationGatewayFrontendIPConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFrontendPort.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFrontendPort.java new file mode 100644 index 000000000000..16d508334e6d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayFrontendPort.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Frontend port of an application gateway. + */ +@JsonFlatten +public class ApplicationGatewayFrontendPort extends SubResource { + /** + * Frontend port. + */ + @JsonProperty(value = "properties.port") + private Integer port; + + /** + * The provisioning state of the frontend port resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of the frontend port that is unique within an Application Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get frontend port. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set frontend port. + * + * @param port the port value to set + * @return the ApplicationGatewayFrontendPort object itself. + */ + public ApplicationGatewayFrontendPort withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the provisioning state of the frontend port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the frontend port that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the frontend port that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayFrontendPort object itself. + */ + public ApplicationGatewayFrontendPort withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayHeaderConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayHeaderConfiguration.java new file mode 100644 index 000000000000..e1d25b1246bd --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayHeaderConfiguration.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Header configuration of the Actions set in Application Gateway. + */ +public class ApplicationGatewayHeaderConfiguration { + /** + * Header name of the header configuration. + */ + @JsonProperty(value = "headerName") + private String headerName; + + /** + * Header value of the header configuration. + */ + @JsonProperty(value = "headerValue") + private String headerValue; + + /** + * Get header name of the header configuration. + * + * @return the headerName value + */ + public String headerName() { + return this.headerName; + } + + /** + * Set header name of the header configuration. + * + * @param headerName the headerName value to set + * @return the ApplicationGatewayHeaderConfiguration object itself. + */ + public ApplicationGatewayHeaderConfiguration withHeaderName(String headerName) { + this.headerName = headerName; + return this; + } + + /** + * Get header value of the header configuration. + * + * @return the headerValue value + */ + public String headerValue() { + return this.headerValue; + } + + /** + * Set header value of the header configuration. + * + * @param headerValue the headerValue value to set + * @return the ApplicationGatewayHeaderConfiguration object itself. + */ + public ApplicationGatewayHeaderConfiguration withHeaderValue(String headerValue) { + this.headerValue = headerValue; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayHttpListener.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayHttpListener.java new file mode 100644 index 000000000000..f201ac373d84 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayHttpListener.java @@ -0,0 +1,328 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Http listener of an application gateway. + */ +@JsonFlatten +public class ApplicationGatewayHttpListener extends SubResource { + /** + * Frontend IP configuration resource of an application gateway. + */ + @JsonProperty(value = "properties.frontendIPConfiguration") + private SubResource frontendIPConfiguration; + + /** + * Frontend port resource of an application gateway. + */ + @JsonProperty(value = "properties.frontendPort") + private SubResource frontendPort; + + /** + * Protocol of the HTTP listener. Possible values include: 'Http', 'Https'. + */ + @JsonProperty(value = "properties.protocol") + private ApplicationGatewayProtocol protocol; + + /** + * Host name of HTTP listener. + */ + @JsonProperty(value = "properties.hostName") + private String hostName; + + /** + * SSL certificate resource of an application gateway. + */ + @JsonProperty(value = "properties.sslCertificate") + private SubResource sslCertificate; + + /** + * Applicable only if protocol is https. Enables SNI for multi-hosting. + */ + @JsonProperty(value = "properties.requireServerNameIndication") + private Boolean requireServerNameIndication; + + /** + * The provisioning state of the HTTP listener resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Custom error configurations of the HTTP listener. + */ + @JsonProperty(value = "properties.customErrorConfigurations") + private List customErrorConfigurations; + + /** + * Reference to the FirewallPolicy resource. + */ + @JsonProperty(value = "properties.firewallPolicy") + private SubResource firewallPolicy; + + /** + * List of Host names for HTTP Listener that allows special wildcard + * characters as well. + */ + @JsonProperty(value = "properties.hostnames") + private List hostnames; + + /** + * Name of the HTTP listener that is unique within an Application Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get frontend IP configuration resource of an application gateway. + * + * @return the frontendIPConfiguration value + */ + public SubResource frontendIPConfiguration() { + return this.frontendIPConfiguration; + } + + /** + * Set frontend IP configuration resource of an application gateway. + * + * @param frontendIPConfiguration the frontendIPConfiguration value to set + * @return the ApplicationGatewayHttpListener object itself. + */ + public ApplicationGatewayHttpListener withFrontendIPConfiguration(SubResource frontendIPConfiguration) { + this.frontendIPConfiguration = frontendIPConfiguration; + return this; + } + + /** + * Get frontend port resource of an application gateway. + * + * @return the frontendPort value + */ + public SubResource frontendPort() { + return this.frontendPort; + } + + /** + * Set frontend port resource of an application gateway. + * + * @param frontendPort the frontendPort value to set + * @return the ApplicationGatewayHttpListener object itself. + */ + public ApplicationGatewayHttpListener withFrontendPort(SubResource frontendPort) { + this.frontendPort = frontendPort; + return this; + } + + /** + * Get protocol of the HTTP listener. Possible values include: 'Http', 'Https'. + * + * @return the protocol value + */ + public ApplicationGatewayProtocol protocol() { + return this.protocol; + } + + /** + * Set protocol of the HTTP listener. Possible values include: 'Http', 'Https'. + * + * @param protocol the protocol value to set + * @return the ApplicationGatewayHttpListener object itself. + */ + public ApplicationGatewayHttpListener withProtocol(ApplicationGatewayProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get host name of HTTP listener. + * + * @return the hostName value + */ + public String hostName() { + return this.hostName; + } + + /** + * Set host name of HTTP listener. + * + * @param hostName the hostName value to set + * @return the ApplicationGatewayHttpListener object itself. + */ + public ApplicationGatewayHttpListener withHostName(String hostName) { + this.hostName = hostName; + return this; + } + + /** + * Get sSL certificate resource of an application gateway. + * + * @return the sslCertificate value + */ + public SubResource sslCertificate() { + return this.sslCertificate; + } + + /** + * Set sSL certificate resource of an application gateway. + * + * @param sslCertificate the sslCertificate value to set + * @return the ApplicationGatewayHttpListener object itself. + */ + public ApplicationGatewayHttpListener withSslCertificate(SubResource sslCertificate) { + this.sslCertificate = sslCertificate; + return this; + } + + /** + * Get applicable only if protocol is https. Enables SNI for multi-hosting. + * + * @return the requireServerNameIndication value + */ + public Boolean requireServerNameIndication() { + return this.requireServerNameIndication; + } + + /** + * Set applicable only if protocol is https. Enables SNI for multi-hosting. + * + * @param requireServerNameIndication the requireServerNameIndication value to set + * @return the ApplicationGatewayHttpListener object itself. + */ + public ApplicationGatewayHttpListener withRequireServerNameIndication(Boolean requireServerNameIndication) { + this.requireServerNameIndication = requireServerNameIndication; + return this; + } + + /** + * Get the provisioning state of the HTTP listener resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get custom error configurations of the HTTP listener. + * + * @return the customErrorConfigurations value + */ + public List customErrorConfigurations() { + return this.customErrorConfigurations; + } + + /** + * Set custom error configurations of the HTTP listener. + * + * @param customErrorConfigurations the customErrorConfigurations value to set + * @return the ApplicationGatewayHttpListener object itself. + */ + public ApplicationGatewayHttpListener withCustomErrorConfigurations(List customErrorConfigurations) { + this.customErrorConfigurations = customErrorConfigurations; + return this; + } + + /** + * Get reference to the FirewallPolicy resource. + * + * @return the firewallPolicy value + */ + public SubResource firewallPolicy() { + return this.firewallPolicy; + } + + /** + * Set reference to the FirewallPolicy resource. + * + * @param firewallPolicy the firewallPolicy value to set + * @return the ApplicationGatewayHttpListener object itself. + */ + public ApplicationGatewayHttpListener withFirewallPolicy(SubResource firewallPolicy) { + this.firewallPolicy = firewallPolicy; + return this; + } + + /** + * Get list of Host names for HTTP Listener that allows special wildcard characters as well. + * + * @return the hostnames value + */ + public List hostnames() { + return this.hostnames; + } + + /** + * Set list of Host names for HTTP Listener that allows special wildcard characters as well. + * + * @param hostnames the hostnames value to set + * @return the ApplicationGatewayHttpListener object itself. + */ + public ApplicationGatewayHttpListener withHostnames(List hostnames) { + this.hostnames = hostnames; + return this; + } + + /** + * Get name of the HTTP listener that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the HTTP listener that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayHttpListener object itself. + */ + public ApplicationGatewayHttpListener withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayIPConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayIPConfiguration.java new file mode 100644 index 000000000000..c0df036ea6fd --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayIPConfiguration.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * IP configuration of an application gateway. Currently 1 public and 1 private + * IP configuration is allowed. + */ +@JsonFlatten +public class ApplicationGatewayIPConfiguration extends SubResource { + /** + * Reference of the subnet resource. A subnet from where application + * gateway gets its private address. + */ + @JsonProperty(value = "properties.subnet") + private SubResource subnet; + + /** + * The provisioning state of the application gateway IP configuration + * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', + * 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of the IP configuration that is unique within an Application + * Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get reference of the subnet resource. A subnet from where application gateway gets its private address. + * + * @return the subnet value + */ + public SubResource subnet() { + return this.subnet; + } + + /** + * Set reference of the subnet resource. A subnet from where application gateway gets its private address. + * + * @param subnet the subnet value to set + * @return the ApplicationGatewayIPConfiguration object itself. + */ + public ApplicationGatewayIPConfiguration withSubnet(SubResource subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get the provisioning state of the application gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the IP configuration that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the IP configuration that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayIPConfiguration object itself. + */ + public ApplicationGatewayIPConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayOnDemandProbe.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayOnDemandProbe.java new file mode 100644 index 000000000000..a63aee9c6b72 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayOnDemandProbe.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of on demand test probe request. + */ +public class ApplicationGatewayOnDemandProbe { + /** + * The protocol used for the probe. Possible values include: 'Http', + * 'Https'. + */ + @JsonProperty(value = "protocol") + private ApplicationGatewayProtocol protocol; + + /** + * Host name to send the probe to. + */ + @JsonProperty(value = "host") + private String host; + + /** + * Relative path of probe. Valid path starts from '/'. Probe is sent to + * <Protocol>://<host>:<port><path>. + */ + @JsonProperty(value = "path") + private String path; + + /** + * The probe timeout in seconds. Probe marked as failed if valid response + * is not received with this timeout period. Acceptable values are from 1 + * second to 86400 seconds. + */ + @JsonProperty(value = "timeout") + private Integer timeout; + + /** + * Whether the host header should be picked from the backend http settings. + * Default value is false. + */ + @JsonProperty(value = "pickHostNameFromBackendHttpSettings") + private Boolean pickHostNameFromBackendHttpSettings; + + /** + * Criterion for classifying a healthy probe response. + */ + @JsonProperty(value = "match") + private ApplicationGatewayProbeHealthResponseMatch match; + + /** + * Reference of backend pool of application gateway to which probe request + * will be sent. + */ + @JsonProperty(value = "backendAddressPool") + private SubResource backendAddressPool; + + /** + * Reference of backend http setting of application gateway to be used for + * test probe. + */ + @JsonProperty(value = "backendHttpSettings") + private SubResource backendHttpSettings; + + /** + * Get the protocol used for the probe. Possible values include: 'Http', 'Https'. + * + * @return the protocol value + */ + public ApplicationGatewayProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol used for the probe. Possible values include: 'Http', 'Https'. + * + * @param protocol the protocol value to set + * @return the ApplicationGatewayOnDemandProbe object itself. + */ + public ApplicationGatewayOnDemandProbe withProtocol(ApplicationGatewayProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get host name to send the probe to. + * + * @return the host value + */ + public String host() { + return this.host; + } + + /** + * Set host name to send the probe to. + * + * @param host the host value to set + * @return the ApplicationGatewayOnDemandProbe object itself. + */ + public ApplicationGatewayOnDemandProbe withHost(String host) { + this.host = host; + return this; + } + + /** + * Get relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>. + * + * @param path the path value to set + * @return the ApplicationGatewayOnDemandProbe object itself. + */ + public ApplicationGatewayOnDemandProbe withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + * + * @return the timeout value + */ + public Integer timeout() { + return this.timeout; + } + + /** + * Set the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + * + * @param timeout the timeout value to set + * @return the ApplicationGatewayOnDemandProbe object itself. + */ + public ApplicationGatewayOnDemandProbe withTimeout(Integer timeout) { + this.timeout = timeout; + return this; + } + + /** + * Get whether the host header should be picked from the backend http settings. Default value is false. + * + * @return the pickHostNameFromBackendHttpSettings value + */ + public Boolean pickHostNameFromBackendHttpSettings() { + return this.pickHostNameFromBackendHttpSettings; + } + + /** + * Set whether the host header should be picked from the backend http settings. Default value is false. + * + * @param pickHostNameFromBackendHttpSettings the pickHostNameFromBackendHttpSettings value to set + * @return the ApplicationGatewayOnDemandProbe object itself. + */ + public ApplicationGatewayOnDemandProbe withPickHostNameFromBackendHttpSettings(Boolean pickHostNameFromBackendHttpSettings) { + this.pickHostNameFromBackendHttpSettings = pickHostNameFromBackendHttpSettings; + return this; + } + + /** + * Get criterion for classifying a healthy probe response. + * + * @return the match value + */ + public ApplicationGatewayProbeHealthResponseMatch match() { + return this.match; + } + + /** + * Set criterion for classifying a healthy probe response. + * + * @param match the match value to set + * @return the ApplicationGatewayOnDemandProbe object itself. + */ + public ApplicationGatewayOnDemandProbe withMatch(ApplicationGatewayProbeHealthResponseMatch match) { + this.match = match; + return this; + } + + /** + * Get reference of backend pool of application gateway to which probe request will be sent. + * + * @return the backendAddressPool value + */ + public SubResource backendAddressPool() { + return this.backendAddressPool; + } + + /** + * Set reference of backend pool of application gateway to which probe request will be sent. + * + * @param backendAddressPool the backendAddressPool value to set + * @return the ApplicationGatewayOnDemandProbe object itself. + */ + public ApplicationGatewayOnDemandProbe withBackendAddressPool(SubResource backendAddressPool) { + this.backendAddressPool = backendAddressPool; + return this; + } + + /** + * Get reference of backend http setting of application gateway to be used for test probe. + * + * @return the backendHttpSettings value + */ + public SubResource backendHttpSettings() { + return this.backendHttpSettings; + } + + /** + * Set reference of backend http setting of application gateway to be used for test probe. + * + * @param backendHttpSettings the backendHttpSettings value to set + * @return the ApplicationGatewayOnDemandProbe object itself. + */ + public ApplicationGatewayOnDemandProbe withBackendHttpSettings(SubResource backendHttpSettings) { + this.backendHttpSettings = backendHttpSettings; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayOperationalState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayOperationalState.java new file mode 100644 index 000000000000..6128cc82fe10 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayOperationalState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewayOperationalState. + */ +public final class ApplicationGatewayOperationalState extends ExpandableStringEnum { + /** Static value Stopped for ApplicationGatewayOperationalState. */ + public static final ApplicationGatewayOperationalState STOPPED = fromString("Stopped"); + + /** Static value Starting for ApplicationGatewayOperationalState. */ + public static final ApplicationGatewayOperationalState STARTING = fromString("Starting"); + + /** Static value Running for ApplicationGatewayOperationalState. */ + public static final ApplicationGatewayOperationalState RUNNING = fromString("Running"); + + /** Static value Stopping for ApplicationGatewayOperationalState. */ + public static final ApplicationGatewayOperationalState STOPPING = fromString("Stopping"); + + /** + * Creates or finds a ApplicationGatewayOperationalState from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayOperationalState + */ + @JsonCreator + public static ApplicationGatewayOperationalState fromString(String name) { + return fromString(name, ApplicationGatewayOperationalState.class); + } + + /** + * @return known ApplicationGatewayOperationalState values + */ + public static Collection values() { + return values(ApplicationGatewayOperationalState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayPathRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayPathRule.java new file mode 100644 index 000000000000..c71d2e86d5f2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayPathRule.java @@ -0,0 +1,249 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Path rule of URL path map of an application gateway. + */ +@JsonFlatten +public class ApplicationGatewayPathRule extends SubResource { + /** + * Path rules of URL path map. + */ + @JsonProperty(value = "properties.paths") + private List paths; + + /** + * Backend address pool resource of URL path map path rule. + */ + @JsonProperty(value = "properties.backendAddressPool") + private SubResource backendAddressPool; + + /** + * Backend http settings resource of URL path map path rule. + */ + @JsonProperty(value = "properties.backendHttpSettings") + private SubResource backendHttpSettings; + + /** + * Redirect configuration resource of URL path map path rule. + */ + @JsonProperty(value = "properties.redirectConfiguration") + private SubResource redirectConfiguration; + + /** + * Rewrite rule set resource of URL path map path rule. + */ + @JsonProperty(value = "properties.rewriteRuleSet") + private SubResource rewriteRuleSet; + + /** + * The provisioning state of the path rule resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Reference to the FirewallPolicy resource. + */ + @JsonProperty(value = "properties.firewallPolicy") + private SubResource firewallPolicy; + + /** + * Name of the path rule that is unique within an Application Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get path rules of URL path map. + * + * @return the paths value + */ + public List paths() { + return this.paths; + } + + /** + * Set path rules of URL path map. + * + * @param paths the paths value to set + * @return the ApplicationGatewayPathRule object itself. + */ + public ApplicationGatewayPathRule withPaths(List paths) { + this.paths = paths; + return this; + } + + /** + * Get backend address pool resource of URL path map path rule. + * + * @return the backendAddressPool value + */ + public SubResource backendAddressPool() { + return this.backendAddressPool; + } + + /** + * Set backend address pool resource of URL path map path rule. + * + * @param backendAddressPool the backendAddressPool value to set + * @return the ApplicationGatewayPathRule object itself. + */ + public ApplicationGatewayPathRule withBackendAddressPool(SubResource backendAddressPool) { + this.backendAddressPool = backendAddressPool; + return this; + } + + /** + * Get backend http settings resource of URL path map path rule. + * + * @return the backendHttpSettings value + */ + public SubResource backendHttpSettings() { + return this.backendHttpSettings; + } + + /** + * Set backend http settings resource of URL path map path rule. + * + * @param backendHttpSettings the backendHttpSettings value to set + * @return the ApplicationGatewayPathRule object itself. + */ + public ApplicationGatewayPathRule withBackendHttpSettings(SubResource backendHttpSettings) { + this.backendHttpSettings = backendHttpSettings; + return this; + } + + /** + * Get redirect configuration resource of URL path map path rule. + * + * @return the redirectConfiguration value + */ + public SubResource redirectConfiguration() { + return this.redirectConfiguration; + } + + /** + * Set redirect configuration resource of URL path map path rule. + * + * @param redirectConfiguration the redirectConfiguration value to set + * @return the ApplicationGatewayPathRule object itself. + */ + public ApplicationGatewayPathRule withRedirectConfiguration(SubResource redirectConfiguration) { + this.redirectConfiguration = redirectConfiguration; + return this; + } + + /** + * Get rewrite rule set resource of URL path map path rule. + * + * @return the rewriteRuleSet value + */ + public SubResource rewriteRuleSet() { + return this.rewriteRuleSet; + } + + /** + * Set rewrite rule set resource of URL path map path rule. + * + * @param rewriteRuleSet the rewriteRuleSet value to set + * @return the ApplicationGatewayPathRule object itself. + */ + public ApplicationGatewayPathRule withRewriteRuleSet(SubResource rewriteRuleSet) { + this.rewriteRuleSet = rewriteRuleSet; + return this; + } + + /** + * Get the provisioning state of the path rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get reference to the FirewallPolicy resource. + * + * @return the firewallPolicy value + */ + public SubResource firewallPolicy() { + return this.firewallPolicy; + } + + /** + * Set reference to the FirewallPolicy resource. + * + * @param firewallPolicy the firewallPolicy value to set + * @return the ApplicationGatewayPathRule object itself. + */ + public ApplicationGatewayPathRule withFirewallPolicy(SubResource firewallPolicy) { + this.firewallPolicy = firewallPolicy; + return this; + } + + /** + * Get name of the path rule that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the path rule that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayPathRule object itself. + */ + public ApplicationGatewayPathRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayProbe.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayProbe.java new file mode 100644 index 000000000000..c05a6233d0d6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayProbe.java @@ -0,0 +1,365 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Probe of the application gateway. + */ +@JsonFlatten +public class ApplicationGatewayProbe extends SubResource { + /** + * The protocol used for the probe. Possible values include: 'Http', + * 'Https'. + */ + @JsonProperty(value = "properties.protocol") + private ApplicationGatewayProtocol protocol; + + /** + * Host name to send the probe to. + */ + @JsonProperty(value = "properties.host") + private String host; + + /** + * Relative path of probe. Valid path starts from '/'. Probe is sent to + * <Protocol>://<host>:<port><path>. + */ + @JsonProperty(value = "properties.path") + private String path; + + /** + * The probing interval in seconds. This is the time interval between two + * consecutive probes. Acceptable values are from 1 second to 86400 + * seconds. + */ + @JsonProperty(value = "properties.interval") + private Integer interval; + + /** + * The probe timeout in seconds. Probe marked as failed if valid response + * is not received with this timeout period. Acceptable values are from 1 + * second to 86400 seconds. + */ + @JsonProperty(value = "properties.timeout") + private Integer timeout; + + /** + * The probe retry count. Backend server is marked down after consecutive + * probe failure count reaches UnhealthyThreshold. Acceptable values are + * from 1 second to 20. + */ + @JsonProperty(value = "properties.unhealthyThreshold") + private Integer unhealthyThreshold; + + /** + * Whether the host header should be picked from the backend http settings. + * Default value is false. + */ + @JsonProperty(value = "properties.pickHostNameFromBackendHttpSettings") + private Boolean pickHostNameFromBackendHttpSettings; + + /** + * Minimum number of servers that are always marked healthy. Default value + * is 0. + */ + @JsonProperty(value = "properties.minServers") + private Integer minServers; + + /** + * Criterion for classifying a healthy probe response. + */ + @JsonProperty(value = "properties.match") + private ApplicationGatewayProbeHealthResponseMatch match; + + /** + * The provisioning state of the probe resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Custom port which will be used for probing the backend servers. The + * valid value ranges from 1 to 65535. In case not set, port from http + * settings will be used. This property is valid for Standard_v2 and WAF_v2 + * only. + */ + @JsonProperty(value = "properties.port") + private Integer port; + + /** + * Name of the probe that is unique within an Application Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the protocol used for the probe. Possible values include: 'Http', 'Https'. + * + * @return the protocol value + */ + public ApplicationGatewayProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol used for the probe. Possible values include: 'Http', 'Https'. + * + * @param protocol the protocol value to set + * @return the ApplicationGatewayProbe object itself. + */ + public ApplicationGatewayProbe withProtocol(ApplicationGatewayProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get host name to send the probe to. + * + * @return the host value + */ + public String host() { + return this.host; + } + + /** + * Set host name to send the probe to. + * + * @param host the host value to set + * @return the ApplicationGatewayProbe object itself. + */ + public ApplicationGatewayProbe withHost(String host) { + this.host = host; + return this; + } + + /** + * Get relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>. + * + * @param path the path value to set + * @return the ApplicationGatewayProbe object itself. + */ + public ApplicationGatewayProbe withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. + * + * @return the interval value + */ + public Integer interval() { + return this.interval; + } + + /** + * Set the probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. + * + * @param interval the interval value to set + * @return the ApplicationGatewayProbe object itself. + */ + public ApplicationGatewayProbe withInterval(Integer interval) { + this.interval = interval; + return this; + } + + /** + * Get the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + * + * @return the timeout value + */ + public Integer timeout() { + return this.timeout; + } + + /** + * Set the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + * + * @param timeout the timeout value to set + * @return the ApplicationGatewayProbe object itself. + */ + public ApplicationGatewayProbe withTimeout(Integer timeout) { + this.timeout = timeout; + return this; + } + + /** + * Get the probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20. + * + * @return the unhealthyThreshold value + */ + public Integer unhealthyThreshold() { + return this.unhealthyThreshold; + } + + /** + * Set the probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20. + * + * @param unhealthyThreshold the unhealthyThreshold value to set + * @return the ApplicationGatewayProbe object itself. + */ + public ApplicationGatewayProbe withUnhealthyThreshold(Integer unhealthyThreshold) { + this.unhealthyThreshold = unhealthyThreshold; + return this; + } + + /** + * Get whether the host header should be picked from the backend http settings. Default value is false. + * + * @return the pickHostNameFromBackendHttpSettings value + */ + public Boolean pickHostNameFromBackendHttpSettings() { + return this.pickHostNameFromBackendHttpSettings; + } + + /** + * Set whether the host header should be picked from the backend http settings. Default value is false. + * + * @param pickHostNameFromBackendHttpSettings the pickHostNameFromBackendHttpSettings value to set + * @return the ApplicationGatewayProbe object itself. + */ + public ApplicationGatewayProbe withPickHostNameFromBackendHttpSettings(Boolean pickHostNameFromBackendHttpSettings) { + this.pickHostNameFromBackendHttpSettings = pickHostNameFromBackendHttpSettings; + return this; + } + + /** + * Get minimum number of servers that are always marked healthy. Default value is 0. + * + * @return the minServers value + */ + public Integer minServers() { + return this.minServers; + } + + /** + * Set minimum number of servers that are always marked healthy. Default value is 0. + * + * @param minServers the minServers value to set + * @return the ApplicationGatewayProbe object itself. + */ + public ApplicationGatewayProbe withMinServers(Integer minServers) { + this.minServers = minServers; + return this; + } + + /** + * Get criterion for classifying a healthy probe response. + * + * @return the match value + */ + public ApplicationGatewayProbeHealthResponseMatch match() { + return this.match; + } + + /** + * Set criterion for classifying a healthy probe response. + * + * @param match the match value to set + * @return the ApplicationGatewayProbe object itself. + */ + public ApplicationGatewayProbe withMatch(ApplicationGatewayProbeHealthResponseMatch match) { + this.match = match; + return this; + } + + /** + * Get the provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from http settings will be used. This property is valid for Standard_v2 and WAF_v2 only. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from http settings will be used. This property is valid for Standard_v2 and WAF_v2 only. + * + * @param port the port value to set + * @return the ApplicationGatewayProbe object itself. + */ + public ApplicationGatewayProbe withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get name of the probe that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the probe that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayProbe object itself. + */ + public ApplicationGatewayProbe withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayProbeHealthResponseMatch.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayProbeHealthResponseMatch.java new file mode 100644 index 000000000000..89cbb59e44c3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayProbeHealthResponseMatch.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application gateway probe health response match. + */ +public class ApplicationGatewayProbeHealthResponseMatch { + /** + * Body that must be contained in the health response. Default value is + * empty. + */ + @JsonProperty(value = "body") + private String body; + + /** + * Allowed ranges of healthy status codes. Default range of healthy status + * codes is 200-399. + */ + @JsonProperty(value = "statusCodes") + private List statusCodes; + + /** + * Get body that must be contained in the health response. Default value is empty. + * + * @return the body value + */ + public String body() { + return this.body; + } + + /** + * Set body that must be contained in the health response. Default value is empty. + * + * @param body the body value to set + * @return the ApplicationGatewayProbeHealthResponseMatch object itself. + */ + public ApplicationGatewayProbeHealthResponseMatch withBody(String body) { + this.body = body; + return this; + } + + /** + * Get allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. + * + * @return the statusCodes value + */ + public List statusCodes() { + return this.statusCodes; + } + + /** + * Set allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. + * + * @param statusCodes the statusCodes value to set + * @return the ApplicationGatewayProbeHealthResponseMatch object itself. + */ + public ApplicationGatewayProbeHealthResponseMatch withStatusCodes(List statusCodes) { + this.statusCodes = statusCodes; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayProtocol.java new file mode 100644 index 000000000000..904eb35a2819 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewayProtocol. + */ +public final class ApplicationGatewayProtocol extends ExpandableStringEnum { + /** Static value Http for ApplicationGatewayProtocol. */ + public static final ApplicationGatewayProtocol HTTP = fromString("Http"); + + /** Static value Https for ApplicationGatewayProtocol. */ + public static final ApplicationGatewayProtocol HTTPS = fromString("Https"); + + /** + * Creates or finds a ApplicationGatewayProtocol from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayProtocol + */ + @JsonCreator + public static ApplicationGatewayProtocol fromString(String name) { + return fromString(name, ApplicationGatewayProtocol.class); + } + + /** + * @return known ApplicationGatewayProtocol values + */ + public static Collection values() { + return values(ApplicationGatewayProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRedirectConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRedirectConfiguration.java new file mode 100644 index 000000000000..236bd80389c4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRedirectConfiguration.java @@ -0,0 +1,287 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Redirect configuration of an application gateway. + */ +@JsonFlatten +public class ApplicationGatewayRedirectConfiguration extends SubResource { + /** + * HTTP redirection type. Possible values include: 'Permanent', 'Found', + * 'SeeOther', 'Temporary'. + */ + @JsonProperty(value = "properties.redirectType") + private ApplicationGatewayRedirectType redirectType; + + /** + * Reference to a listener to redirect the request to. + */ + @JsonProperty(value = "properties.targetListener") + private SubResource targetListener; + + /** + * Url to redirect the request to. + */ + @JsonProperty(value = "properties.targetUrl") + private String targetUrl; + + /** + * Include path in the redirected url. + */ + @JsonProperty(value = "properties.includePath") + private Boolean includePath; + + /** + * Include query string in the redirected url. + */ + @JsonProperty(value = "properties.includeQueryString") + private Boolean includeQueryString; + + /** + * Request routing specifying redirect configuration. + */ + @JsonProperty(value = "properties.requestRoutingRules") + private List requestRoutingRules; + + /** + * Url path maps specifying default redirect configuration. + */ + @JsonProperty(value = "properties.urlPathMaps") + private List urlPathMaps; + + /** + * Path rules specifying redirect configuration. + */ + @JsonProperty(value = "properties.pathRules") + private List pathRules; + + /** + * Name of the redirect configuration that is unique within an Application + * Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get hTTP redirection type. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'. + * + * @return the redirectType value + */ + public ApplicationGatewayRedirectType redirectType() { + return this.redirectType; + } + + /** + * Set hTTP redirection type. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'. + * + * @param redirectType the redirectType value to set + * @return the ApplicationGatewayRedirectConfiguration object itself. + */ + public ApplicationGatewayRedirectConfiguration withRedirectType(ApplicationGatewayRedirectType redirectType) { + this.redirectType = redirectType; + return this; + } + + /** + * Get reference to a listener to redirect the request to. + * + * @return the targetListener value + */ + public SubResource targetListener() { + return this.targetListener; + } + + /** + * Set reference to a listener to redirect the request to. + * + * @param targetListener the targetListener value to set + * @return the ApplicationGatewayRedirectConfiguration object itself. + */ + public ApplicationGatewayRedirectConfiguration withTargetListener(SubResource targetListener) { + this.targetListener = targetListener; + return this; + } + + /** + * Get url to redirect the request to. + * + * @return the targetUrl value + */ + public String targetUrl() { + return this.targetUrl; + } + + /** + * Set url to redirect the request to. + * + * @param targetUrl the targetUrl value to set + * @return the ApplicationGatewayRedirectConfiguration object itself. + */ + public ApplicationGatewayRedirectConfiguration withTargetUrl(String targetUrl) { + this.targetUrl = targetUrl; + return this; + } + + /** + * Get include path in the redirected url. + * + * @return the includePath value + */ + public Boolean includePath() { + return this.includePath; + } + + /** + * Set include path in the redirected url. + * + * @param includePath the includePath value to set + * @return the ApplicationGatewayRedirectConfiguration object itself. + */ + public ApplicationGatewayRedirectConfiguration withIncludePath(Boolean includePath) { + this.includePath = includePath; + return this; + } + + /** + * Get include query string in the redirected url. + * + * @return the includeQueryString value + */ + public Boolean includeQueryString() { + return this.includeQueryString; + } + + /** + * Set include query string in the redirected url. + * + * @param includeQueryString the includeQueryString value to set + * @return the ApplicationGatewayRedirectConfiguration object itself. + */ + public ApplicationGatewayRedirectConfiguration withIncludeQueryString(Boolean includeQueryString) { + this.includeQueryString = includeQueryString; + return this; + } + + /** + * Get request routing specifying redirect configuration. + * + * @return the requestRoutingRules value + */ + public List requestRoutingRules() { + return this.requestRoutingRules; + } + + /** + * Set request routing specifying redirect configuration. + * + * @param requestRoutingRules the requestRoutingRules value to set + * @return the ApplicationGatewayRedirectConfiguration object itself. + */ + public ApplicationGatewayRedirectConfiguration withRequestRoutingRules(List requestRoutingRules) { + this.requestRoutingRules = requestRoutingRules; + return this; + } + + /** + * Get url path maps specifying default redirect configuration. + * + * @return the urlPathMaps value + */ + public List urlPathMaps() { + return this.urlPathMaps; + } + + /** + * Set url path maps specifying default redirect configuration. + * + * @param urlPathMaps the urlPathMaps value to set + * @return the ApplicationGatewayRedirectConfiguration object itself. + */ + public ApplicationGatewayRedirectConfiguration withUrlPathMaps(List urlPathMaps) { + this.urlPathMaps = urlPathMaps; + return this; + } + + /** + * Get path rules specifying redirect configuration. + * + * @return the pathRules value + */ + public List pathRules() { + return this.pathRules; + } + + /** + * Set path rules specifying redirect configuration. + * + * @param pathRules the pathRules value to set + * @return the ApplicationGatewayRedirectConfiguration object itself. + */ + public ApplicationGatewayRedirectConfiguration withPathRules(List pathRules) { + this.pathRules = pathRules; + return this; + } + + /** + * Get name of the redirect configuration that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the redirect configuration that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayRedirectConfiguration object itself. + */ + public ApplicationGatewayRedirectConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRedirectType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRedirectType.java new file mode 100644 index 000000000000..24dd58d909c4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRedirectType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewayRedirectType. + */ +public final class ApplicationGatewayRedirectType extends ExpandableStringEnum { + /** Static value Permanent for ApplicationGatewayRedirectType. */ + public static final ApplicationGatewayRedirectType PERMANENT = fromString("Permanent"); + + /** Static value Found for ApplicationGatewayRedirectType. */ + public static final ApplicationGatewayRedirectType FOUND = fromString("Found"); + + /** Static value SeeOther for ApplicationGatewayRedirectType. */ + public static final ApplicationGatewayRedirectType SEE_OTHER = fromString("SeeOther"); + + /** Static value Temporary for ApplicationGatewayRedirectType. */ + public static final ApplicationGatewayRedirectType TEMPORARY = fromString("Temporary"); + + /** + * Creates or finds a ApplicationGatewayRedirectType from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayRedirectType + */ + @JsonCreator + public static ApplicationGatewayRedirectType fromString(String name) { + return fromString(name, ApplicationGatewayRedirectType.class); + } + + /** + * @return known ApplicationGatewayRedirectType values + */ + public static Collection values() { + return values(ApplicationGatewayRedirectType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRequestRoutingRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRequestRoutingRule.java new file mode 100644 index 000000000000..a5a429f4e9a2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRequestRoutingRule.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Request routing rule of an application gateway. + */ +@JsonFlatten +public class ApplicationGatewayRequestRoutingRule extends SubResource { + /** + * Rule type. Possible values include: 'Basic', 'PathBasedRouting'. + */ + @JsonProperty(value = "properties.ruleType") + private ApplicationGatewayRequestRoutingRuleType ruleType; + + /** + * Priority of the request routing rule. + */ + @JsonProperty(value = "properties.priority") + private Integer priority; + + /** + * Backend address pool resource of the application gateway. + */ + @JsonProperty(value = "properties.backendAddressPool") + private SubResource backendAddressPool; + + /** + * Backend http settings resource of the application gateway. + */ + @JsonProperty(value = "properties.backendHttpSettings") + private SubResource backendHttpSettings; + + /** + * Http listener resource of the application gateway. + */ + @JsonProperty(value = "properties.httpListener") + private SubResource httpListener; + + /** + * URL path map resource of the application gateway. + */ + @JsonProperty(value = "properties.urlPathMap") + private SubResource urlPathMap; + + /** + * Rewrite Rule Set resource in Basic rule of the application gateway. + */ + @JsonProperty(value = "properties.rewriteRuleSet") + private SubResource rewriteRuleSet; + + /** + * Redirect configuration resource of the application gateway. + */ + @JsonProperty(value = "properties.redirectConfiguration") + private SubResource redirectConfiguration; + + /** + * The provisioning state of the request routing rule resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of the request routing rule that is unique within an Application + * Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get rule type. Possible values include: 'Basic', 'PathBasedRouting'. + * + * @return the ruleType value + */ + public ApplicationGatewayRequestRoutingRuleType ruleType() { + return this.ruleType; + } + + /** + * Set rule type. Possible values include: 'Basic', 'PathBasedRouting'. + * + * @param ruleType the ruleType value to set + * @return the ApplicationGatewayRequestRoutingRule object itself. + */ + public ApplicationGatewayRequestRoutingRule withRuleType(ApplicationGatewayRequestRoutingRuleType ruleType) { + this.ruleType = ruleType; + return this; + } + + /** + * Get priority of the request routing rule. + * + * @return the priority value + */ + public Integer priority() { + return this.priority; + } + + /** + * Set priority of the request routing rule. + * + * @param priority the priority value to set + * @return the ApplicationGatewayRequestRoutingRule object itself. + */ + public ApplicationGatewayRequestRoutingRule withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get backend address pool resource of the application gateway. + * + * @return the backendAddressPool value + */ + public SubResource backendAddressPool() { + return this.backendAddressPool; + } + + /** + * Set backend address pool resource of the application gateway. + * + * @param backendAddressPool the backendAddressPool value to set + * @return the ApplicationGatewayRequestRoutingRule object itself. + */ + public ApplicationGatewayRequestRoutingRule withBackendAddressPool(SubResource backendAddressPool) { + this.backendAddressPool = backendAddressPool; + return this; + } + + /** + * Get backend http settings resource of the application gateway. + * + * @return the backendHttpSettings value + */ + public SubResource backendHttpSettings() { + return this.backendHttpSettings; + } + + /** + * Set backend http settings resource of the application gateway. + * + * @param backendHttpSettings the backendHttpSettings value to set + * @return the ApplicationGatewayRequestRoutingRule object itself. + */ + public ApplicationGatewayRequestRoutingRule withBackendHttpSettings(SubResource backendHttpSettings) { + this.backendHttpSettings = backendHttpSettings; + return this; + } + + /** + * Get http listener resource of the application gateway. + * + * @return the httpListener value + */ + public SubResource httpListener() { + return this.httpListener; + } + + /** + * Set http listener resource of the application gateway. + * + * @param httpListener the httpListener value to set + * @return the ApplicationGatewayRequestRoutingRule object itself. + */ + public ApplicationGatewayRequestRoutingRule withHttpListener(SubResource httpListener) { + this.httpListener = httpListener; + return this; + } + + /** + * Get uRL path map resource of the application gateway. + * + * @return the urlPathMap value + */ + public SubResource urlPathMap() { + return this.urlPathMap; + } + + /** + * Set uRL path map resource of the application gateway. + * + * @param urlPathMap the urlPathMap value to set + * @return the ApplicationGatewayRequestRoutingRule object itself. + */ + public ApplicationGatewayRequestRoutingRule withUrlPathMap(SubResource urlPathMap) { + this.urlPathMap = urlPathMap; + return this; + } + + /** + * Get rewrite Rule Set resource in Basic rule of the application gateway. + * + * @return the rewriteRuleSet value + */ + public SubResource rewriteRuleSet() { + return this.rewriteRuleSet; + } + + /** + * Set rewrite Rule Set resource in Basic rule of the application gateway. + * + * @param rewriteRuleSet the rewriteRuleSet value to set + * @return the ApplicationGatewayRequestRoutingRule object itself. + */ + public ApplicationGatewayRequestRoutingRule withRewriteRuleSet(SubResource rewriteRuleSet) { + this.rewriteRuleSet = rewriteRuleSet; + return this; + } + + /** + * Get redirect configuration resource of the application gateway. + * + * @return the redirectConfiguration value + */ + public SubResource redirectConfiguration() { + return this.redirectConfiguration; + } + + /** + * Set redirect configuration resource of the application gateway. + * + * @param redirectConfiguration the redirectConfiguration value to set + * @return the ApplicationGatewayRequestRoutingRule object itself. + */ + public ApplicationGatewayRequestRoutingRule withRedirectConfiguration(SubResource redirectConfiguration) { + this.redirectConfiguration = redirectConfiguration; + return this; + } + + /** + * Get the provisioning state of the request routing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the request routing rule that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the request routing rule that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayRequestRoutingRule object itself. + */ + public ApplicationGatewayRequestRoutingRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRequestRoutingRuleType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRequestRoutingRuleType.java new file mode 100644 index 000000000000..895f34145cec --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRequestRoutingRuleType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewayRequestRoutingRuleType. + */ +public final class ApplicationGatewayRequestRoutingRuleType extends ExpandableStringEnum { + /** Static value Basic for ApplicationGatewayRequestRoutingRuleType. */ + public static final ApplicationGatewayRequestRoutingRuleType BASIC = fromString("Basic"); + + /** Static value PathBasedRouting for ApplicationGatewayRequestRoutingRuleType. */ + public static final ApplicationGatewayRequestRoutingRuleType PATH_BASED_ROUTING = fromString("PathBasedRouting"); + + /** + * Creates or finds a ApplicationGatewayRequestRoutingRuleType from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayRequestRoutingRuleType + */ + @JsonCreator + public static ApplicationGatewayRequestRoutingRuleType fromString(String name) { + return fromString(name, ApplicationGatewayRequestRoutingRuleType.class); + } + + /** + * @return known ApplicationGatewayRequestRoutingRuleType values + */ + public static Collection values() { + return values(ApplicationGatewayRequestRoutingRuleType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRule.java new file mode 100644 index 000000000000..3fd11786a7d2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRule.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Rewrite rule of an application gateway. + */ +public class ApplicationGatewayRewriteRule { + /** + * Name of the rewrite rule that is unique within an Application Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Rule Sequence of the rewrite rule that determines the order of execution + * of a particular rule in a RewriteRuleSet. + */ + @JsonProperty(value = "ruleSequence") + private Integer ruleSequence; + + /** + * Conditions based on which the action set execution will be evaluated. + */ + @JsonProperty(value = "conditions") + private List conditions; + + /** + * Set of actions to be done as part of the rewrite Rule. + */ + @JsonProperty(value = "actionSet") + private ApplicationGatewayRewriteRuleActionSet actionSet; + + /** + * Get name of the rewrite rule that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the rewrite rule that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayRewriteRule object itself. + */ + public ApplicationGatewayRewriteRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet. + * + * @return the ruleSequence value + */ + public Integer ruleSequence() { + return this.ruleSequence; + } + + /** + * Set rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet. + * + * @param ruleSequence the ruleSequence value to set + * @return the ApplicationGatewayRewriteRule object itself. + */ + public ApplicationGatewayRewriteRule withRuleSequence(Integer ruleSequence) { + this.ruleSequence = ruleSequence; + return this; + } + + /** + * Get conditions based on which the action set execution will be evaluated. + * + * @return the conditions value + */ + public List conditions() { + return this.conditions; + } + + /** + * Set conditions based on which the action set execution will be evaluated. + * + * @param conditions the conditions value to set + * @return the ApplicationGatewayRewriteRule object itself. + */ + public ApplicationGatewayRewriteRule withConditions(List conditions) { + this.conditions = conditions; + return this; + } + + /** + * Get set of actions to be done as part of the rewrite Rule. + * + * @return the actionSet value + */ + public ApplicationGatewayRewriteRuleActionSet actionSet() { + return this.actionSet; + } + + /** + * Set set of actions to be done as part of the rewrite Rule. + * + * @param actionSet the actionSet value to set + * @return the ApplicationGatewayRewriteRule object itself. + */ + public ApplicationGatewayRewriteRule withActionSet(ApplicationGatewayRewriteRuleActionSet actionSet) { + this.actionSet = actionSet; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRuleActionSet.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRuleActionSet.java new file mode 100644 index 000000000000..5888e7869716 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRuleActionSet.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Set of actions in the Rewrite Rule in Application Gateway. + */ +public class ApplicationGatewayRewriteRuleActionSet { + /** + * Request Header Actions in the Action Set. + */ + @JsonProperty(value = "requestHeaderConfigurations") + private List requestHeaderConfigurations; + + /** + * Response Header Actions in the Action Set. + */ + @JsonProperty(value = "responseHeaderConfigurations") + private List responseHeaderConfigurations; + + /** + * Get request Header Actions in the Action Set. + * + * @return the requestHeaderConfigurations value + */ + public List requestHeaderConfigurations() { + return this.requestHeaderConfigurations; + } + + /** + * Set request Header Actions in the Action Set. + * + * @param requestHeaderConfigurations the requestHeaderConfigurations value to set + * @return the ApplicationGatewayRewriteRuleActionSet object itself. + */ + public ApplicationGatewayRewriteRuleActionSet withRequestHeaderConfigurations(List requestHeaderConfigurations) { + this.requestHeaderConfigurations = requestHeaderConfigurations; + return this; + } + + /** + * Get response Header Actions in the Action Set. + * + * @return the responseHeaderConfigurations value + */ + public List responseHeaderConfigurations() { + return this.responseHeaderConfigurations; + } + + /** + * Set response Header Actions in the Action Set. + * + * @param responseHeaderConfigurations the responseHeaderConfigurations value to set + * @return the ApplicationGatewayRewriteRuleActionSet object itself. + */ + public ApplicationGatewayRewriteRuleActionSet withResponseHeaderConfigurations(List responseHeaderConfigurations) { + this.responseHeaderConfigurations = responseHeaderConfigurations; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRuleCondition.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRuleCondition.java new file mode 100644 index 000000000000..d735718fce19 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRuleCondition.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Set of conditions in the Rewrite Rule in Application Gateway. + */ +public class ApplicationGatewayRewriteRuleCondition { + /** + * The condition parameter of the RewriteRuleCondition. + */ + @JsonProperty(value = "variable") + private String variable; + + /** + * The pattern, either fixed string or regular expression, that evaluates + * the truthfulness of the condition. + */ + @JsonProperty(value = "pattern") + private String pattern; + + /** + * Setting this paramter to truth value with force the pattern to do a case + * in-sensitive comparison. + */ + @JsonProperty(value = "ignoreCase") + private Boolean ignoreCase; + + /** + * Setting this value as truth will force to check the negation of the + * condition given by the user. + */ + @JsonProperty(value = "negate") + private Boolean negate; + + /** + * Get the condition parameter of the RewriteRuleCondition. + * + * @return the variable value + */ + public String variable() { + return this.variable; + } + + /** + * Set the condition parameter of the RewriteRuleCondition. + * + * @param variable the variable value to set + * @return the ApplicationGatewayRewriteRuleCondition object itself. + */ + public ApplicationGatewayRewriteRuleCondition withVariable(String variable) { + this.variable = variable; + return this; + } + + /** + * Get the pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition. + * + * @return the pattern value + */ + public String pattern() { + return this.pattern; + } + + /** + * Set the pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition. + * + * @param pattern the pattern value to set + * @return the ApplicationGatewayRewriteRuleCondition object itself. + */ + public ApplicationGatewayRewriteRuleCondition withPattern(String pattern) { + this.pattern = pattern; + return this; + } + + /** + * Get setting this paramter to truth value with force the pattern to do a case in-sensitive comparison. + * + * @return the ignoreCase value + */ + public Boolean ignoreCase() { + return this.ignoreCase; + } + + /** + * Set setting this paramter to truth value with force the pattern to do a case in-sensitive comparison. + * + * @param ignoreCase the ignoreCase value to set + * @return the ApplicationGatewayRewriteRuleCondition object itself. + */ + public ApplicationGatewayRewriteRuleCondition withIgnoreCase(Boolean ignoreCase) { + this.ignoreCase = ignoreCase; + return this; + } + + /** + * Get setting this value as truth will force to check the negation of the condition given by the user. + * + * @return the negate value + */ + public Boolean negate() { + return this.negate; + } + + /** + * Set setting this value as truth will force to check the negation of the condition given by the user. + * + * @param negate the negate value to set + * @return the ApplicationGatewayRewriteRuleCondition object itself. + */ + public ApplicationGatewayRewriteRuleCondition withNegate(Boolean negate) { + this.negate = negate; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRuleSet.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRuleSet.java new file mode 100644 index 000000000000..0bf7f5081bbe --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayRewriteRuleSet.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Rewrite rule set of an application gateway. + */ +@JsonFlatten +public class ApplicationGatewayRewriteRuleSet extends SubResource { + /** + * Rewrite rules in the rewrite rule set. + */ + @JsonProperty(value = "properties.rewriteRules") + private List rewriteRules; + + /** + * The provisioning state of the rewrite rule set resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of the rewrite rule set that is unique within an Application + * Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get rewrite rules in the rewrite rule set. + * + * @return the rewriteRules value + */ + public List rewriteRules() { + return this.rewriteRules; + } + + /** + * Set rewrite rules in the rewrite rule set. + * + * @param rewriteRules the rewriteRules value to set + * @return the ApplicationGatewayRewriteRuleSet object itself. + */ + public ApplicationGatewayRewriteRuleSet withRewriteRules(List rewriteRules) { + this.rewriteRules = rewriteRules; + return this; + } + + /** + * Get the provisioning state of the rewrite rule set resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the rewrite rule set that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the rewrite rule set that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayRewriteRuleSet object itself. + */ + public ApplicationGatewayRewriteRuleSet withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySku.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySku.java new file mode 100644 index 000000000000..0aa1b09eab17 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySku.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SKU of an application gateway. + */ +public class ApplicationGatewaySku { + /** + * Name of an application gateway SKU. Possible values include: + * 'Standard_Small', 'Standard_Medium', 'Standard_Large', 'WAF_Medium', + * 'WAF_Large', 'Standard_v2', 'WAF_v2'. + */ + @JsonProperty(value = "name") + private ApplicationGatewaySkuName name; + + /** + * Tier of an application gateway. Possible values include: 'Standard', + * 'WAF', 'Standard_v2', 'WAF_v2'. + */ + @JsonProperty(value = "tier") + private ApplicationGatewayTier tier; + + /** + * Capacity (instance count) of an application gateway. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /** + * Get name of an application gateway SKU. Possible values include: 'Standard_Small', 'Standard_Medium', 'Standard_Large', 'WAF_Medium', 'WAF_Large', 'Standard_v2', 'WAF_v2'. + * + * @return the name value + */ + public ApplicationGatewaySkuName name() { + return this.name; + } + + /** + * Set name of an application gateway SKU. Possible values include: 'Standard_Small', 'Standard_Medium', 'Standard_Large', 'WAF_Medium', 'WAF_Large', 'Standard_v2', 'WAF_v2'. + * + * @param name the name value to set + * @return the ApplicationGatewaySku object itself. + */ + public ApplicationGatewaySku withName(ApplicationGatewaySkuName name) { + this.name = name; + return this; + } + + /** + * Get tier of an application gateway. Possible values include: 'Standard', 'WAF', 'Standard_v2', 'WAF_v2'. + * + * @return the tier value + */ + public ApplicationGatewayTier tier() { + return this.tier; + } + + /** + * Set tier of an application gateway. Possible values include: 'Standard', 'WAF', 'Standard_v2', 'WAF_v2'. + * + * @param tier the tier value to set + * @return the ApplicationGatewaySku object itself. + */ + public ApplicationGatewaySku withTier(ApplicationGatewayTier tier) { + this.tier = tier; + return this; + } + + /** + * Get capacity (instance count) of an application gateway. + * + * @return the capacity value + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set capacity (instance count) of an application gateway. + * + * @param capacity the capacity value to set + * @return the ApplicationGatewaySku object itself. + */ + public ApplicationGatewaySku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySkuName.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySkuName.java new file mode 100644 index 000000000000..0d55b0852ac0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySkuName.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewaySkuName. + */ +public final class ApplicationGatewaySkuName extends ExpandableStringEnum { + /** Static value Standard_Small for ApplicationGatewaySkuName. */ + public static final ApplicationGatewaySkuName STANDARD_SMALL = fromString("Standard_Small"); + + /** Static value Standard_Medium for ApplicationGatewaySkuName. */ + public static final ApplicationGatewaySkuName STANDARD_MEDIUM = fromString("Standard_Medium"); + + /** Static value Standard_Large for ApplicationGatewaySkuName. */ + public static final ApplicationGatewaySkuName STANDARD_LARGE = fromString("Standard_Large"); + + /** Static value WAF_Medium for ApplicationGatewaySkuName. */ + public static final ApplicationGatewaySkuName WAF_MEDIUM = fromString("WAF_Medium"); + + /** Static value WAF_Large for ApplicationGatewaySkuName. */ + public static final ApplicationGatewaySkuName WAF_LARGE = fromString("WAF_Large"); + + /** Static value Standard_v2 for ApplicationGatewaySkuName. */ + public static final ApplicationGatewaySkuName STANDARD_V2 = fromString("Standard_v2"); + + /** Static value WAF_v2 for ApplicationGatewaySkuName. */ + public static final ApplicationGatewaySkuName WAF_V2 = fromString("WAF_v2"); + + /** + * Creates or finds a ApplicationGatewaySkuName from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySkuName + */ + @JsonCreator + public static ApplicationGatewaySkuName fromString(String name) { + return fromString(name, ApplicationGatewaySkuName.class); + } + + /** + * @return known ApplicationGatewaySkuName values + */ + public static Collection values() { + return values(ApplicationGatewaySkuName.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslCertificate.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslCertificate.java new file mode 100644 index 000000000000..68deab7c33fc --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslCertificate.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * SSL certificates of an application gateway. + */ +@JsonFlatten +public class ApplicationGatewaySslCertificate extends SubResource { + /** + * Base-64 encoded pfx certificate. Only applicable in PUT Request. + */ + @JsonProperty(value = "properties.data") + private String data; + + /** + * Password for the pfx file specified in data. Only applicable in PUT + * request. + */ + @JsonProperty(value = "properties.password") + private String password; + + /** + * Base-64 encoded Public cert data corresponding to pfx specified in data. + * Only applicable in GET request. + */ + @JsonProperty(value = "properties.publicCertData", access = JsonProperty.Access.WRITE_ONLY) + private String publicCertData; + + /** + * Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' + * object stored in KeyVault. + */ + @JsonProperty(value = "properties.keyVaultSecretId") + private String keyVaultSecretId; + + /** + * The provisioning state of the SSL certificate resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of the SSL certificate that is unique within an Application + * Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get base-64 encoded pfx certificate. Only applicable in PUT Request. + * + * @return the data value + */ + public String data() { + return this.data; + } + + /** + * Set base-64 encoded pfx certificate. Only applicable in PUT Request. + * + * @param data the data value to set + * @return the ApplicationGatewaySslCertificate object itself. + */ + public ApplicationGatewaySslCertificate withData(String data) { + this.data = data; + return this; + } + + /** + * Get password for the pfx file specified in data. Only applicable in PUT request. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set password for the pfx file specified in data. Only applicable in PUT request. + * + * @param password the password value to set + * @return the ApplicationGatewaySslCertificate object itself. + */ + public ApplicationGatewaySslCertificate withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. + * + * @return the publicCertData value + */ + public String publicCertData() { + return this.publicCertData; + } + + /** + * Get secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + * + * @return the keyVaultSecretId value + */ + public String keyVaultSecretId() { + return this.keyVaultSecretId; + } + + /** + * Set secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + * + * @param keyVaultSecretId the keyVaultSecretId value to set + * @return the ApplicationGatewaySslCertificate object itself. + */ + public ApplicationGatewaySslCertificate withKeyVaultSecretId(String keyVaultSecretId) { + this.keyVaultSecretId = keyVaultSecretId; + return this; + } + + /** + * Get the provisioning state of the SSL certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the SSL certificate that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the SSL certificate that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewaySslCertificate object itself. + */ + public ApplicationGatewaySslCertificate withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslCipherSuite.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslCipherSuite.java new file mode 100644 index 000000000000..67b53d420838 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslCipherSuite.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewaySslCipherSuite. + */ +public final class ApplicationGatewaySslCipherSuite extends ExpandableStringEnum { + /** Static value TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = fromString("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"); + + /** Static value TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = fromString("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"); + + /** Static value TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = fromString("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"); + + /** Static value TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = fromString("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"); + + /** Static value TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = fromString("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"); + + /** Static value TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = fromString("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"); + + /** Static value TLS_DHE_RSA_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_256_CBC_SHA = fromString("TLS_DHE_RSA_WITH_AES_256_CBC_SHA"); + + /** Static value TLS_DHE_RSA_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA = fromString("TLS_DHE_RSA_WITH_AES_128_CBC_SHA"); + + /** Static value TLS_RSA_WITH_AES_256_GCM_SHA384 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_GCM_SHA384 = fromString("TLS_RSA_WITH_AES_256_GCM_SHA384"); + + /** Static value TLS_RSA_WITH_AES_128_GCM_SHA256 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_GCM_SHA256 = fromString("TLS_RSA_WITH_AES_128_GCM_SHA256"); + + /** Static value TLS_RSA_WITH_AES_256_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256 = fromString("TLS_RSA_WITH_AES_256_CBC_SHA256"); + + /** Static value TLS_RSA_WITH_AES_128_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = fromString("TLS_RSA_WITH_AES_128_CBC_SHA256"); + + /** Static value TLS_RSA_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA = fromString("TLS_RSA_WITH_AES_256_CBC_SHA"); + + /** Static value TLS_RSA_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_CBC_SHA = fromString("TLS_RSA_WITH_AES_128_CBC_SHA"); + + /** Static value TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = fromString("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"); + + /** Static value TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = fromString("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"); + + /** Static value TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = fromString("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"); + + /** Static value TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = fromString("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"); + + /** Static value TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = fromString("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"); + + /** Static value TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = fromString("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"); + + /** Static value TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = fromString("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"); + + /** Static value TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = fromString("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"); + + /** Static value TLS_DHE_DSS_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA = fromString("TLS_DHE_DSS_WITH_AES_256_CBC_SHA"); + + /** Static value TLS_DHE_DSS_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA = fromString("TLS_DHE_DSS_WITH_AES_128_CBC_SHA"); + + /** Static value TLS_RSA_WITH_3DES_EDE_CBC_SHA for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_3DES_EDE_CBC_SHA = fromString("TLS_RSA_WITH_3DES_EDE_CBC_SHA"); + + /** Static value TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = fromString("TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA"); + + /** Static value TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = fromString("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"); + + /** Static value TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = fromString("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"); + + /** + * Creates or finds a ApplicationGatewaySslCipherSuite from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySslCipherSuite + */ + @JsonCreator + public static ApplicationGatewaySslCipherSuite fromString(String name) { + return fromString(name, ApplicationGatewaySslCipherSuite.class); + } + + /** + * @return known ApplicationGatewaySslCipherSuite values + */ + public static Collection values() { + return values(ApplicationGatewaySslCipherSuite.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPolicy.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPolicy.java new file mode 100644 index 000000000000..80cfb8d228b2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPolicy.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application Gateway Ssl policy. + */ +public class ApplicationGatewaySslPolicy { + /** + * Ssl protocols to be disabled on application gateway. + */ + @JsonProperty(value = "disabledSslProtocols") + private List disabledSslProtocols; + + /** + * Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'. + */ + @JsonProperty(value = "policyType") + private ApplicationGatewaySslPolicyType policyType; + + /** + * Name of Ssl predefined policy. Possible values include: + * 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', + * 'AppGwSslPolicy20170401S'. + */ + @JsonProperty(value = "policyName") + private ApplicationGatewaySslPolicyName policyName; + + /** + * Ssl cipher suites to be enabled in the specified order to application + * gateway. + */ + @JsonProperty(value = "cipherSuites") + private List cipherSuites; + + /** + * Minimum version of Ssl protocol to be supported on application gateway. + * Possible values include: 'TLSv1_0', 'TLSv1_1', 'TLSv1_2'. + */ + @JsonProperty(value = "minProtocolVersion") + private ApplicationGatewaySslProtocol minProtocolVersion; + + /** + * Get ssl protocols to be disabled on application gateway. + * + * @return the disabledSslProtocols value + */ + public List disabledSslProtocols() { + return this.disabledSslProtocols; + } + + /** + * Set ssl protocols to be disabled on application gateway. + * + * @param disabledSslProtocols the disabledSslProtocols value to set + * @return the ApplicationGatewaySslPolicy object itself. + */ + public ApplicationGatewaySslPolicy withDisabledSslProtocols(List disabledSslProtocols) { + this.disabledSslProtocols = disabledSslProtocols; + return this; + } + + /** + * Get type of Ssl Policy. Possible values include: 'Predefined', 'Custom'. + * + * @return the policyType value + */ + public ApplicationGatewaySslPolicyType policyType() { + return this.policyType; + } + + /** + * Set type of Ssl Policy. Possible values include: 'Predefined', 'Custom'. + * + * @param policyType the policyType value to set + * @return the ApplicationGatewaySslPolicy object itself. + */ + public ApplicationGatewaySslPolicy withPolicyType(ApplicationGatewaySslPolicyType policyType) { + this.policyType = policyType; + return this; + } + + /** + * Get name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'. + * + * @return the policyName value + */ + public ApplicationGatewaySslPolicyName policyName() { + return this.policyName; + } + + /** + * Set name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'. + * + * @param policyName the policyName value to set + * @return the ApplicationGatewaySslPolicy object itself. + */ + public ApplicationGatewaySslPolicy withPolicyName(ApplicationGatewaySslPolicyName policyName) { + this.policyName = policyName; + return this; + } + + /** + * Get ssl cipher suites to be enabled in the specified order to application gateway. + * + * @return the cipherSuites value + */ + public List cipherSuites() { + return this.cipherSuites; + } + + /** + * Set ssl cipher suites to be enabled in the specified order to application gateway. + * + * @param cipherSuites the cipherSuites value to set + * @return the ApplicationGatewaySslPolicy object itself. + */ + public ApplicationGatewaySslPolicy withCipherSuites(List cipherSuites) { + this.cipherSuites = cipherSuites; + return this; + } + + /** + * Get minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv1_0', 'TLSv1_1', 'TLSv1_2'. + * + * @return the minProtocolVersion value + */ + public ApplicationGatewaySslProtocol minProtocolVersion() { + return this.minProtocolVersion; + } + + /** + * Set minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv1_0', 'TLSv1_1', 'TLSv1_2'. + * + * @param minProtocolVersion the minProtocolVersion value to set + * @return the ApplicationGatewaySslPolicy object itself. + */ + public ApplicationGatewaySslPolicy withMinProtocolVersion(ApplicationGatewaySslProtocol minProtocolVersion) { + this.minProtocolVersion = minProtocolVersion; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPolicyName.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPolicyName.java new file mode 100644 index 000000000000..e0234fe1c1b7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPolicyName.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewaySslPolicyName. + */ +public final class ApplicationGatewaySslPolicyName extends ExpandableStringEnum { + /** Static value AppGwSslPolicy20150501 for ApplicationGatewaySslPolicyName. */ + public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20150501 = fromString("AppGwSslPolicy20150501"); + + /** Static value AppGwSslPolicy20170401 for ApplicationGatewaySslPolicyName. */ + public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401 = fromString("AppGwSslPolicy20170401"); + + /** Static value AppGwSslPolicy20170401S for ApplicationGatewaySslPolicyName. */ + public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401S = fromString("AppGwSslPolicy20170401S"); + + /** + * Creates or finds a ApplicationGatewaySslPolicyName from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySslPolicyName + */ + @JsonCreator + public static ApplicationGatewaySslPolicyName fromString(String name) { + return fromString(name, ApplicationGatewaySslPolicyName.class); + } + + /** + * @return known ApplicationGatewaySslPolicyName values + */ + public static Collection values() { + return values(ApplicationGatewaySslPolicyName.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPolicyType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPolicyType.java new file mode 100644 index 000000000000..9482d9fcdb04 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPolicyType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewaySslPolicyType. + */ +public final class ApplicationGatewaySslPolicyType extends ExpandableStringEnum { + /** Static value Predefined for ApplicationGatewaySslPolicyType. */ + public static final ApplicationGatewaySslPolicyType PREDEFINED = fromString("Predefined"); + + /** Static value Custom for ApplicationGatewaySslPolicyType. */ + public static final ApplicationGatewaySslPolicyType CUSTOM = fromString("Custom"); + + /** + * Creates or finds a ApplicationGatewaySslPolicyType from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySslPolicyType + */ + @JsonCreator + public static ApplicationGatewaySslPolicyType fromString(String name) { + return fromString(name, ApplicationGatewaySslPolicyType.class); + } + + /** + * @return known ApplicationGatewaySslPolicyType values + */ + public static Collection values() { + return values(ApplicationGatewaySslPolicyType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPredefinedPolicy.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPredefinedPolicy.java new file mode 100644 index 000000000000..f732db543892 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslPredefinedPolicy.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ApplicationGatewaySslPredefinedPolicyInner; +import java.util.List; + +/** + * Type representing ApplicationGatewaySslPredefinedPolicy. + */ +public interface ApplicationGatewaySslPredefinedPolicy extends HasInner, HasManager { + /** + * @return the cipherSuites value. + */ + List cipherSuites(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the minProtocolVersion value. + */ + ApplicationGatewaySslProtocol minProtocolVersion(); + + /** + * @return the name value. + */ + String name(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslProtocol.java new file mode 100644 index 000000000000..f020451f73fb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewaySslProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewaySslProtocol. + */ +public final class ApplicationGatewaySslProtocol extends ExpandableStringEnum { + /** Static value TLSv1_0 for ApplicationGatewaySslProtocol. */ + public static final ApplicationGatewaySslProtocol TLSV1_0 = fromString("TLSv1_0"); + + /** Static value TLSv1_1 for ApplicationGatewaySslProtocol. */ + public static final ApplicationGatewaySslProtocol TLSV1_1 = fromString("TLSv1_1"); + + /** Static value TLSv1_2 for ApplicationGatewaySslProtocol. */ + public static final ApplicationGatewaySslProtocol TLSV1_2 = fromString("TLSv1_2"); + + /** + * Creates or finds a ApplicationGatewaySslProtocol from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySslProtocol + */ + @JsonCreator + public static ApplicationGatewaySslProtocol fromString(String name) { + return fromString(name, ApplicationGatewaySslProtocol.class); + } + + /** + * @return known ApplicationGatewaySslProtocol values + */ + public static Collection values() { + return values(ApplicationGatewaySslProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayTier.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayTier.java new file mode 100644 index 000000000000..17d65ed5a218 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayTier.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationGatewayTier. + */ +public final class ApplicationGatewayTier extends ExpandableStringEnum { + /** Static value Standard for ApplicationGatewayTier. */ + public static final ApplicationGatewayTier STANDARD = fromString("Standard"); + + /** Static value WAF for ApplicationGatewayTier. */ + public static final ApplicationGatewayTier WAF = fromString("WAF"); + + /** Static value Standard_v2 for ApplicationGatewayTier. */ + public static final ApplicationGatewayTier STANDARD_V2 = fromString("Standard_v2"); + + /** Static value WAF_v2 for ApplicationGatewayTier. */ + public static final ApplicationGatewayTier WAF_V2 = fromString("WAF_v2"); + + /** + * Creates or finds a ApplicationGatewayTier from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayTier + */ + @JsonCreator + public static ApplicationGatewayTier fromString(String name) { + return fromString(name, ApplicationGatewayTier.class); + } + + /** + * @return known ApplicationGatewayTier values + */ + public static Collection values() { + return values(ApplicationGatewayTier.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayTrustedRootCertificate.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayTrustedRootCertificate.java new file mode 100644 index 000000000000..db2628a85dc1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayTrustedRootCertificate.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Trusted Root certificates of an application gateway. + */ +@JsonFlatten +public class ApplicationGatewayTrustedRootCertificate extends SubResource { + /** + * Certificate public data. + */ + @JsonProperty(value = "properties.data") + private String data; + + /** + * Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' + * object stored in KeyVault. + */ + @JsonProperty(value = "properties.keyVaultSecretId") + private String keyVaultSecretId; + + /** + * The provisioning state of the trusted root certificate resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of the trusted root certificate that is unique within an + * Application Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get certificate public data. + * + * @return the data value + */ + public String data() { + return this.data; + } + + /** + * Set certificate public data. + * + * @param data the data value to set + * @return the ApplicationGatewayTrustedRootCertificate object itself. + */ + public ApplicationGatewayTrustedRootCertificate withData(String data) { + this.data = data; + return this; + } + + /** + * Get secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + * + * @return the keyVaultSecretId value + */ + public String keyVaultSecretId() { + return this.keyVaultSecretId; + } + + /** + * Set secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + * + * @param keyVaultSecretId the keyVaultSecretId value to set + * @return the ApplicationGatewayTrustedRootCertificate object itself. + */ + public ApplicationGatewayTrustedRootCertificate withKeyVaultSecretId(String keyVaultSecretId) { + this.keyVaultSecretId = keyVaultSecretId; + return this; + } + + /** + * Get the provisioning state of the trusted root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the trusted root certificate that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the trusted root certificate that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayTrustedRootCertificate object itself. + */ + public ApplicationGatewayTrustedRootCertificate withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayUrlPathMap.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayUrlPathMap.java new file mode 100644 index 000000000000..c2dfe2b15271 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayUrlPathMap.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * UrlPathMaps give a url path to the backend mapping information for + * PathBasedRouting. + */ +@JsonFlatten +public class ApplicationGatewayUrlPathMap extends SubResource { + /** + * Default backend address pool resource of URL path map. + */ + @JsonProperty(value = "properties.defaultBackendAddressPool") + private SubResource defaultBackendAddressPool; + + /** + * Default backend http settings resource of URL path map. + */ + @JsonProperty(value = "properties.defaultBackendHttpSettings") + private SubResource defaultBackendHttpSettings; + + /** + * Default Rewrite rule set resource of URL path map. + */ + @JsonProperty(value = "properties.defaultRewriteRuleSet") + private SubResource defaultRewriteRuleSet; + + /** + * Default redirect configuration resource of URL path map. + */ + @JsonProperty(value = "properties.defaultRedirectConfiguration") + private SubResource defaultRedirectConfiguration; + + /** + * Path rule of URL path map resource. + */ + @JsonProperty(value = "properties.pathRules") + private List pathRules; + + /** + * The provisioning state of the URL path map resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of the URL path map that is unique within an Application Gateway. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get default backend address pool resource of URL path map. + * + * @return the defaultBackendAddressPool value + */ + public SubResource defaultBackendAddressPool() { + return this.defaultBackendAddressPool; + } + + /** + * Set default backend address pool resource of URL path map. + * + * @param defaultBackendAddressPool the defaultBackendAddressPool value to set + * @return the ApplicationGatewayUrlPathMap object itself. + */ + public ApplicationGatewayUrlPathMap withDefaultBackendAddressPool(SubResource defaultBackendAddressPool) { + this.defaultBackendAddressPool = defaultBackendAddressPool; + return this; + } + + /** + * Get default backend http settings resource of URL path map. + * + * @return the defaultBackendHttpSettings value + */ + public SubResource defaultBackendHttpSettings() { + return this.defaultBackendHttpSettings; + } + + /** + * Set default backend http settings resource of URL path map. + * + * @param defaultBackendHttpSettings the defaultBackendHttpSettings value to set + * @return the ApplicationGatewayUrlPathMap object itself. + */ + public ApplicationGatewayUrlPathMap withDefaultBackendHttpSettings(SubResource defaultBackendHttpSettings) { + this.defaultBackendHttpSettings = defaultBackendHttpSettings; + return this; + } + + /** + * Get default Rewrite rule set resource of URL path map. + * + * @return the defaultRewriteRuleSet value + */ + public SubResource defaultRewriteRuleSet() { + return this.defaultRewriteRuleSet; + } + + /** + * Set default Rewrite rule set resource of URL path map. + * + * @param defaultRewriteRuleSet the defaultRewriteRuleSet value to set + * @return the ApplicationGatewayUrlPathMap object itself. + */ + public ApplicationGatewayUrlPathMap withDefaultRewriteRuleSet(SubResource defaultRewriteRuleSet) { + this.defaultRewriteRuleSet = defaultRewriteRuleSet; + return this; + } + + /** + * Get default redirect configuration resource of URL path map. + * + * @return the defaultRedirectConfiguration value + */ + public SubResource defaultRedirectConfiguration() { + return this.defaultRedirectConfiguration; + } + + /** + * Set default redirect configuration resource of URL path map. + * + * @param defaultRedirectConfiguration the defaultRedirectConfiguration value to set + * @return the ApplicationGatewayUrlPathMap object itself. + */ + public ApplicationGatewayUrlPathMap withDefaultRedirectConfiguration(SubResource defaultRedirectConfiguration) { + this.defaultRedirectConfiguration = defaultRedirectConfiguration; + return this; + } + + /** + * Get path rule of URL path map resource. + * + * @return the pathRules value + */ + public List pathRules() { + return this.pathRules; + } + + /** + * Set path rule of URL path map resource. + * + * @param pathRules the pathRules value to set + * @return the ApplicationGatewayUrlPathMap object itself. + */ + public ApplicationGatewayUrlPathMap withPathRules(List pathRules) { + this.pathRules = pathRules; + return this; + } + + /** + * Get the provisioning state of the URL path map resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the URL path map that is unique within an Application Gateway. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the URL path map that is unique within an Application Gateway. + * + * @param name the name value to set + * @return the ApplicationGatewayUrlPathMap object itself. + */ + public ApplicationGatewayUrlPathMap withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayWebApplicationFirewallConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayWebApplicationFirewallConfiguration.java new file mode 100644 index 000000000000..6a136c2e7ef6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGatewayWebApplicationFirewallConfiguration.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application gateway web application firewall configuration. + */ +public class ApplicationGatewayWebApplicationFirewallConfiguration { + /** + * Whether the web application firewall is enabled or not. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /** + * Web application firewall mode. Possible values include: 'Detection', + * 'Prevention'. + */ + @JsonProperty(value = "firewallMode", required = true) + private ApplicationGatewayFirewallMode firewallMode; + + /** + * The type of the web application firewall rule set. Possible values are: + * 'OWASP'. + */ + @JsonProperty(value = "ruleSetType", required = true) + private String ruleSetType; + + /** + * The version of the rule set type. + */ + @JsonProperty(value = "ruleSetVersion", required = true) + private String ruleSetVersion; + + /** + * The disabled rule groups. + */ + @JsonProperty(value = "disabledRuleGroups") + private List disabledRuleGroups; + + /** + * Whether allow WAF to check request Body. + */ + @JsonProperty(value = "requestBodyCheck") + private Boolean requestBodyCheck; + + /** + * Maximum request body size for WAF. + */ + @JsonProperty(value = "maxRequestBodySize") + private Integer maxRequestBodySize; + + /** + * Maximum request body size in Kb for WAF. + */ + @JsonProperty(value = "maxRequestBodySizeInKb") + private Integer maxRequestBodySizeInKb; + + /** + * Maximum file upload size in Mb for WAF. + */ + @JsonProperty(value = "fileUploadLimitInMb") + private Integer fileUploadLimitInMb; + + /** + * The exclusion list. + */ + @JsonProperty(value = "exclusions") + private List exclusions; + + /** + * Get whether the web application firewall is enabled or not. + * + * @return the enabled value + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set whether the web application firewall is enabled or not. + * + * @param enabled the enabled value to set + * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. + */ + public ApplicationGatewayWebApplicationFirewallConfiguration withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get web application firewall mode. Possible values include: 'Detection', 'Prevention'. + * + * @return the firewallMode value + */ + public ApplicationGatewayFirewallMode firewallMode() { + return this.firewallMode; + } + + /** + * Set web application firewall mode. Possible values include: 'Detection', 'Prevention'. + * + * @param firewallMode the firewallMode value to set + * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. + */ + public ApplicationGatewayWebApplicationFirewallConfiguration withFirewallMode(ApplicationGatewayFirewallMode firewallMode) { + this.firewallMode = firewallMode; + return this; + } + + /** + * Get the type of the web application firewall rule set. Possible values are: 'OWASP'. + * + * @return the ruleSetType value + */ + public String ruleSetType() { + return this.ruleSetType; + } + + /** + * Set the type of the web application firewall rule set. Possible values are: 'OWASP'. + * + * @param ruleSetType the ruleSetType value to set + * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. + */ + public ApplicationGatewayWebApplicationFirewallConfiguration withRuleSetType(String ruleSetType) { + this.ruleSetType = ruleSetType; + return this; + } + + /** + * Get the version of the rule set type. + * + * @return the ruleSetVersion value + */ + public String ruleSetVersion() { + return this.ruleSetVersion; + } + + /** + * Set the version of the rule set type. + * + * @param ruleSetVersion the ruleSetVersion value to set + * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. + */ + public ApplicationGatewayWebApplicationFirewallConfiguration withRuleSetVersion(String ruleSetVersion) { + this.ruleSetVersion = ruleSetVersion; + return this; + } + + /** + * Get the disabled rule groups. + * + * @return the disabledRuleGroups value + */ + public List disabledRuleGroups() { + return this.disabledRuleGroups; + } + + /** + * Set the disabled rule groups. + * + * @param disabledRuleGroups the disabledRuleGroups value to set + * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. + */ + public ApplicationGatewayWebApplicationFirewallConfiguration withDisabledRuleGroups(List disabledRuleGroups) { + this.disabledRuleGroups = disabledRuleGroups; + return this; + } + + /** + * Get whether allow WAF to check request Body. + * + * @return the requestBodyCheck value + */ + public Boolean requestBodyCheck() { + return this.requestBodyCheck; + } + + /** + * Set whether allow WAF to check request Body. + * + * @param requestBodyCheck the requestBodyCheck value to set + * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. + */ + public ApplicationGatewayWebApplicationFirewallConfiguration withRequestBodyCheck(Boolean requestBodyCheck) { + this.requestBodyCheck = requestBodyCheck; + return this; + } + + /** + * Get maximum request body size for WAF. + * + * @return the maxRequestBodySize value + */ + public Integer maxRequestBodySize() { + return this.maxRequestBodySize; + } + + /** + * Set maximum request body size for WAF. + * + * @param maxRequestBodySize the maxRequestBodySize value to set + * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. + */ + public ApplicationGatewayWebApplicationFirewallConfiguration withMaxRequestBodySize(Integer maxRequestBodySize) { + this.maxRequestBodySize = maxRequestBodySize; + return this; + } + + /** + * Get maximum request body size in Kb for WAF. + * + * @return the maxRequestBodySizeInKb value + */ + public Integer maxRequestBodySizeInKb() { + return this.maxRequestBodySizeInKb; + } + + /** + * Set maximum request body size in Kb for WAF. + * + * @param maxRequestBodySizeInKb the maxRequestBodySizeInKb value to set + * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. + */ + public ApplicationGatewayWebApplicationFirewallConfiguration withMaxRequestBodySizeInKb(Integer maxRequestBodySizeInKb) { + this.maxRequestBodySizeInKb = maxRequestBodySizeInKb; + return this; + } + + /** + * Get maximum file upload size in Mb for WAF. + * + * @return the fileUploadLimitInMb value + */ + public Integer fileUploadLimitInMb() { + return this.fileUploadLimitInMb; + } + + /** + * Set maximum file upload size in Mb for WAF. + * + * @param fileUploadLimitInMb the fileUploadLimitInMb value to set + * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. + */ + public ApplicationGatewayWebApplicationFirewallConfiguration withFileUploadLimitInMb(Integer fileUploadLimitInMb) { + this.fileUploadLimitInMb = fileUploadLimitInMb; + return this; + } + + /** + * Get the exclusion list. + * + * @return the exclusions value + */ + public List exclusions() { + return this.exclusions; + } + + /** + * Set the exclusion list. + * + * @param exclusions the exclusions value to set + * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. + */ + public ApplicationGatewayWebApplicationFirewallConfiguration withExclusions(List exclusions) { + this.exclusions = exclusions; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGateways.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGateways.java new file mode 100644 index 000000000000..4ddb40a3962e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationGateways.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.ApplicationGatewaysInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ApplicationGateways. + */ +public interface ApplicationGateways extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Starts the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable startAsync(String resourceGroupName, String applicationGatewayName); + + /** + * Stops the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable stopAsync(String resourceGroupName, String applicationGatewayName); + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable backendHealthAsync(String resourceGroupName, String applicationGatewayName); + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable backendHealthOnDemandAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest); + + /** + * Lists all available server variables. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAvailableServerVariablesAsync(); + + /** + * Lists all available request headers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAvailableRequestHeadersAsync(); + + /** + * Lists all available response headers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAvailableResponseHeadersAsync(); + + /** + * Lists all available web application firewall rule sets. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAvailableWafRuleSetsAsync(); + + /** + * Lists available Ssl options for configuring Ssl policy. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAvailableSslOptionsAsync(); + + /** + * Lists all SSL predefined policies for configuring Ssl policy. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAvailableSslPredefinedPoliciesAsync(); + + /** + * Gets Ssl predefined policy with the specified policy name. + * + * @param predefinedPolicyName Name of Ssl predefined policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getSslPredefinedPolicyAsync(String predefinedPolicyName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationRuleCondition.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationRuleCondition.java new file mode 100644 index 000000000000..eb5b088a4a0d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationRuleCondition.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Rule condition of type application. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleConditionType") +@JsonTypeName("ApplicationRuleCondition") +public class ApplicationRuleCondition extends FirewallPolicyRuleCondition { + /** + * List of source IP addresses for this rule. + */ + @JsonProperty(value = "sourceAddresses") + private List sourceAddresses; + + /** + * List of destination IP addresses or Service Tags. + */ + @JsonProperty(value = "destinationAddresses") + private List destinationAddresses; + + /** + * Array of Application Protocols. + */ + @JsonProperty(value = "protocols") + private List protocols; + + /** + * List of FQDNs for this rule condition. + */ + @JsonProperty(value = "targetFqdns") + private List targetFqdns; + + /** + * List of FQDN Tags for this rule condition. + */ + @JsonProperty(value = "fqdnTags") + private List fqdnTags; + + /** + * Get list of source IP addresses for this rule. + * + * @return the sourceAddresses value + */ + public List sourceAddresses() { + return this.sourceAddresses; + } + + /** + * Set list of source IP addresses for this rule. + * + * @param sourceAddresses the sourceAddresses value to set + * @return the ApplicationRuleCondition object itself. + */ + public ApplicationRuleCondition withSourceAddresses(List sourceAddresses) { + this.sourceAddresses = sourceAddresses; + return this; + } + + /** + * Get list of destination IP addresses or Service Tags. + * + * @return the destinationAddresses value + */ + public List destinationAddresses() { + return this.destinationAddresses; + } + + /** + * Set list of destination IP addresses or Service Tags. + * + * @param destinationAddresses the destinationAddresses value to set + * @return the ApplicationRuleCondition object itself. + */ + public ApplicationRuleCondition withDestinationAddresses(List destinationAddresses) { + this.destinationAddresses = destinationAddresses; + return this; + } + + /** + * Get array of Application Protocols. + * + * @return the protocols value + */ + public List protocols() { + return this.protocols; + } + + /** + * Set array of Application Protocols. + * + * @param protocols the protocols value to set + * @return the ApplicationRuleCondition object itself. + */ + public ApplicationRuleCondition withProtocols(List protocols) { + this.protocols = protocols; + return this; + } + + /** + * Get list of FQDNs for this rule condition. + * + * @return the targetFqdns value + */ + public List targetFqdns() { + return this.targetFqdns; + } + + /** + * Set list of FQDNs for this rule condition. + * + * @param targetFqdns the targetFqdns value to set + * @return the ApplicationRuleCondition object itself. + */ + public ApplicationRuleCondition withTargetFqdns(List targetFqdns) { + this.targetFqdns = targetFqdns; + return this; + } + + /** + * Get list of FQDN Tags for this rule condition. + * + * @return the fqdnTags value + */ + public List fqdnTags() { + return this.fqdnTags; + } + + /** + * Set list of FQDN Tags for this rule condition. + * + * @param fqdnTags the fqdnTags value to set + * @return the ApplicationRuleCondition object itself. + */ + public ApplicationRuleCondition withFqdnTags(List fqdnTags) { + this.fqdnTags = fqdnTags; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationSecurityGroup.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationSecurityGroup.java new file mode 100644 index 000000000000..d095a7799bc5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationSecurityGroup.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ApplicationSecurityGroupInner; + +/** + * Type representing ApplicationSecurityGroup. + */ +public interface ApplicationSecurityGroup extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * The entirety of the ApplicationSecurityGroup definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of ApplicationSecurityGroup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ApplicationSecurityGroup definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the ApplicationSecurityGroup definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * 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 { + } + } + /** + * The template for a ApplicationSecurityGroup update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags { + } + + /** + * Grouping of ApplicationSecurityGroup update stages. + */ + interface UpdateStages { + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationSecurityGroups.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationSecurityGroups.java new file mode 100644 index 000000000000..60e34b78dcc9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ApplicationSecurityGroups.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.network.v2019_09_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.network.v2019_09_01.implementation.ApplicationSecurityGroupsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ApplicationSecurityGroups. + */ +public interface ApplicationSecurityGroups extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AssociationType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AssociationType.java new file mode 100644 index 000000000000..702f4f6c80d7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AssociationType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AssociationType. + */ +public final class AssociationType extends ExpandableStringEnum { + /** Static value Associated for AssociationType. */ + public static final AssociationType ASSOCIATED = fromString("Associated"); + + /** Static value Contains for AssociationType. */ + public static final AssociationType CONTAINS = fromString("Contains"); + + /** + * Creates or finds a AssociationType from its string representation. + * @param name a name to look for + * @return the corresponding AssociationType + */ + @JsonCreator + public static AssociationType fromString(String name) { + return fromString(name, AssociationType.class); + } + + /** + * @return known AssociationType values + */ + public static Collection values() { + return values(AssociationType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AuthenticationMethod.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AuthenticationMethod.java new file mode 100644 index 000000000000..6c66c9d26933 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AuthenticationMethod.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AuthenticationMethod. + */ +public final class AuthenticationMethod extends ExpandableStringEnum { + /** Static value EAPTLS for AuthenticationMethod. */ + public static final AuthenticationMethod EAPTLS = fromString("EAPTLS"); + + /** Static value EAPMSCHAPv2 for AuthenticationMethod. */ + public static final AuthenticationMethod EAPMSCHAPV2 = fromString("EAPMSCHAPv2"); + + /** + * Creates or finds a AuthenticationMethod from its string representation. + * @param name a name to look for + * @return the corresponding AuthenticationMethod + */ + @JsonCreator + public static AuthenticationMethod fromString(String name) { + return fromString(name, AuthenticationMethod.class); + } + + /** + * @return known AuthenticationMethod values + */ + public static Collection values() { + return values(AuthenticationMethod.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AuthorizationUseStatus.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AuthorizationUseStatus.java new file mode 100644 index 000000000000..8fbf9767030c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AuthorizationUseStatus.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AuthorizationUseStatus. + */ +public final class AuthorizationUseStatus extends ExpandableStringEnum { + /** Static value Available for AuthorizationUseStatus. */ + public static final AuthorizationUseStatus AVAILABLE = fromString("Available"); + + /** Static value InUse for AuthorizationUseStatus. */ + public static final AuthorizationUseStatus IN_USE = fromString("InUse"); + + /** + * Creates or finds a AuthorizationUseStatus from its string representation. + * @param name a name to look for + * @return the corresponding AuthorizationUseStatus + */ + @JsonCreator + public static AuthorizationUseStatus fromString(String name) { + return fromString(name, AuthorizationUseStatus.class); + } + + /** + * @return known AuthorizationUseStatus values + */ + public static Collection values() { + return values(AuthorizationUseStatus.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AutoApprovedPrivateLinkService.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AutoApprovedPrivateLinkService.java new file mode 100644 index 000000000000..574688a15be4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AutoApprovedPrivateLinkService.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AutoApprovedPrivateLinkServiceInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing AutoApprovedPrivateLinkService. + */ +public interface AutoApprovedPrivateLinkService extends HasInner, HasManager { + /** + * @return the privateLinkService value. + */ + String privateLinkService(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Availability.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Availability.java new file mode 100644 index 000000000000..445899c3ae12 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Availability.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Availability of the metric. + */ +public class Availability { + /** + * The time grain of the availability. + */ + @JsonProperty(value = "timeGrain") + private String timeGrain; + + /** + * The retention of the availability. + */ + @JsonProperty(value = "retention") + private String retention; + + /** + * Duration of the availability blob. + */ + @JsonProperty(value = "blobDuration") + private String blobDuration; + + /** + * Get the time grain of the availability. + * + * @return the timeGrain value + */ + public String timeGrain() { + return this.timeGrain; + } + + /** + * Set the time grain of the availability. + * + * @param timeGrain the timeGrain value to set + * @return the Availability object itself. + */ + public Availability withTimeGrain(String timeGrain) { + this.timeGrain = timeGrain; + return this; + } + + /** + * Get the retention of the availability. + * + * @return the retention value + */ + public String retention() { + return this.retention; + } + + /** + * Set the retention of the availability. + * + * @param retention the retention value to set + * @return the Availability object itself. + */ + public Availability withRetention(String retention) { + this.retention = retention; + return this; + } + + /** + * Get duration of the availability blob. + * + * @return the blobDuration value + */ + public String blobDuration() { + return this.blobDuration; + } + + /** + * Set duration of the availability blob. + * + * @param blobDuration the blobDuration value to set + * @return the Availability object itself. + */ + public Availability withBlobDuration(String blobDuration) { + this.blobDuration = blobDuration; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableDelegations.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableDelegations.java new file mode 100644 index 000000000000..f93715ce2ec8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableDelegations.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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AvailableDelegationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AvailableDelegations. + */ +public interface AvailableDelegations extends HasInner { + /** + * Gets all of the available subnet delegations for this subscription in this region. + * + * @param location The location of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String location); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableEndpointServices.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableEndpointServices.java new file mode 100644 index 000000000000..d98ee7c7fc90 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableEndpointServices.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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AvailableEndpointServicesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AvailableEndpointServices. + */ +public interface AvailableEndpointServices extends HasInner { + /** + * List what values of endpoint services are available for use. + * + * @param location The location to check available endpoint services. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String location); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailablePrivateEndpointType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailablePrivateEndpointType.java new file mode 100644 index 000000000000..74af5435c95f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailablePrivateEndpointType.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AvailablePrivateEndpointTypeInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing AvailablePrivateEndpointType. + */ +public interface AvailablePrivateEndpointType extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the resourceName value. + */ + String resourceName(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailablePrivateEndpointTypes.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailablePrivateEndpointTypes.java new file mode 100644 index 000000000000..6ab9758fa6a3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailablePrivateEndpointTypes.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AvailablePrivateEndpointTypesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AvailablePrivateEndpointTypes. + */ +public interface AvailablePrivateEndpointTypes extends HasInner { + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(final String location, final String resourceGroupName); + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String location); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersList.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersList.java new file mode 100644 index 000000000000..73384094adda --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersList.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AvailableProvidersListInner; +import java.util.List; + +/** + * Type representing AvailableProvidersList. + */ +public interface AvailableProvidersList extends HasInner, HasManager { + /** + * @return the countries value. + */ + List countries(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListCity.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListCity.java new file mode 100644 index 000000000000..287c1c38949b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListCity.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * City or town details. + */ +public class AvailableProvidersListCity { + /** + * The city or town name. + */ + @JsonProperty(value = "cityName") + private String cityName; + + /** + * A list of Internet service providers. + */ + @JsonProperty(value = "providers") + private List providers; + + /** + * Get the city or town name. + * + * @return the cityName value + */ + public String cityName() { + return this.cityName; + } + + /** + * Set the city or town name. + * + * @param cityName the cityName value to set + * @return the AvailableProvidersListCity object itself. + */ + public AvailableProvidersListCity withCityName(String cityName) { + this.cityName = cityName; + return this; + } + + /** + * Get a list of Internet service providers. + * + * @return the providers value + */ + public List providers() { + return this.providers; + } + + /** + * Set a list of Internet service providers. + * + * @param providers the providers value to set + * @return the AvailableProvidersListCity object itself. + */ + public AvailableProvidersListCity withProviders(List providers) { + this.providers = providers; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListCountry.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListCountry.java new file mode 100644 index 000000000000..15eb3c68ffba --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListCountry.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Country details. + */ +public class AvailableProvidersListCountry { + /** + * The country name. + */ + @JsonProperty(value = "countryName") + private String countryName; + + /** + * A list of Internet service providers. + */ + @JsonProperty(value = "providers") + private List providers; + + /** + * List of available states in the country. + */ + @JsonProperty(value = "states") + private List states; + + /** + * Get the country name. + * + * @return the countryName value + */ + public String countryName() { + return this.countryName; + } + + /** + * Set the country name. + * + * @param countryName the countryName value to set + * @return the AvailableProvidersListCountry object itself. + */ + public AvailableProvidersListCountry withCountryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Get a list of Internet service providers. + * + * @return the providers value + */ + public List providers() { + return this.providers; + } + + /** + * Set a list of Internet service providers. + * + * @param providers the providers value to set + * @return the AvailableProvidersListCountry object itself. + */ + public AvailableProvidersListCountry withProviders(List providers) { + this.providers = providers; + return this; + } + + /** + * Get list of available states in the country. + * + * @return the states value + */ + public List states() { + return this.states; + } + + /** + * Set list of available states in the country. + * + * @param states the states value to set + * @return the AvailableProvidersListCountry object itself. + */ + public AvailableProvidersListCountry withStates(List states) { + this.states = states; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListParameters.java new file mode 100644 index 000000000000..e50e648ebfa7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListParameters.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Constraints that determine the list of available Internet service providers. + */ +public class AvailableProvidersListParameters { + /** + * A list of Azure regions. + */ + @JsonProperty(value = "azureLocations") + private List azureLocations; + + /** + * The country for available providers list. + */ + @JsonProperty(value = "country") + private String country; + + /** + * The state for available providers list. + */ + @JsonProperty(value = "state") + private String state; + + /** + * The city or town for available providers list. + */ + @JsonProperty(value = "city") + private String city; + + /** + * Get a list of Azure regions. + * + * @return the azureLocations value + */ + public List azureLocations() { + return this.azureLocations; + } + + /** + * Set a list of Azure regions. + * + * @param azureLocations the azureLocations value to set + * @return the AvailableProvidersListParameters object itself. + */ + public AvailableProvidersListParameters withAzureLocations(List azureLocations) { + this.azureLocations = azureLocations; + return this; + } + + /** + * Get the country for available providers list. + * + * @return the country value + */ + public String country() { + return this.country; + } + + /** + * Set the country for available providers list. + * + * @param country the country value to set + * @return the AvailableProvidersListParameters object itself. + */ + public AvailableProvidersListParameters withCountry(String country) { + this.country = country; + return this; + } + + /** + * Get the state for available providers list. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set the state for available providers list. + * + * @param state the state value to set + * @return the AvailableProvidersListParameters object itself. + */ + public AvailableProvidersListParameters withState(String state) { + this.state = state; + return this; + } + + /** + * Get the city or town for available providers list. + * + * @return the city value + */ + public String city() { + return this.city; + } + + /** + * Set the city or town for available providers list. + * + * @param city the city value to set + * @return the AvailableProvidersListParameters object itself. + */ + public AvailableProvidersListParameters withCity(String city) { + this.city = city; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListState.java new file mode 100644 index 000000000000..098d6e8a5294 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableProvidersListState.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * State details. + */ +public class AvailableProvidersListState { + /** + * The state name. + */ + @JsonProperty(value = "stateName") + private String stateName; + + /** + * A list of Internet service providers. + */ + @JsonProperty(value = "providers") + private List providers; + + /** + * List of available cities or towns in the state. + */ + @JsonProperty(value = "cities") + private List cities; + + /** + * Get the state name. + * + * @return the stateName value + */ + public String stateName() { + return this.stateName; + } + + /** + * Set the state name. + * + * @param stateName the stateName value to set + * @return the AvailableProvidersListState object itself. + */ + public AvailableProvidersListState withStateName(String stateName) { + this.stateName = stateName; + return this; + } + + /** + * Get a list of Internet service providers. + * + * @return the providers value + */ + public List providers() { + return this.providers; + } + + /** + * Set a list of Internet service providers. + * + * @param providers the providers value to set + * @return the AvailableProvidersListState object itself. + */ + public AvailableProvidersListState withProviders(List providers) { + this.providers = providers; + return this; + } + + /** + * Get list of available cities or towns in the state. + * + * @return the cities value + */ + public List cities() { + return this.cities; + } + + /** + * Set list of available cities or towns in the state. + * + * @param cities the cities value to set + * @return the AvailableProvidersListState object itself. + */ + public AvailableProvidersListState withCities(List cities) { + this.cities = cities; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableResourceGroupDelegations.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableResourceGroupDelegations.java new file mode 100644 index 000000000000..16a3245e7126 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableResourceGroupDelegations.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AvailableResourceGroupDelegationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AvailableResourceGroupDelegations. + */ +public interface AvailableResourceGroupDelegations extends HasInner { + /** + * Gets all of the available subnet delegations for this resource group in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String location, final String resourceGroupName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableServiceAlias.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableServiceAlias.java new file mode 100644 index 000000000000..81cbdf832610 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableServiceAlias.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AvailableServiceAliasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing AvailableServiceAlias. + */ +public interface AvailableServiceAlias extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the resourceName value. + */ + String resourceName(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableServiceAliases.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableServiceAliases.java new file mode 100644 index 000000000000..9d2164004545 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AvailableServiceAliases.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AvailableServiceAliasesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AvailableServiceAliases. + */ +public interface AvailableServiceAliases extends HasInner { + /** + * Gets all available service aliases for this resource group in this region. + * + * @param resourceGroupName The name of the resource group. + * @param location The location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(final String resourceGroupName, final String location); + + /** + * Gets all available service aliases for this subscription in this region. + * + * @param location The location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String location); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureAsyncOperationResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureAsyncOperationResult.java new file mode 100644 index 000000000000..dd47cb1aee38 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureAsyncOperationResult.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.network.v2019_09_01; + +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 { + /** + * Status of the Azure async operation. Possible values include: + * 'InProgress', 'Succeeded', 'Failed'. + */ + @JsonProperty(value = "status") + private NetworkOperationStatus status; + + /** + * Details of the error occurred during specified asynchronous operation. + */ + @JsonProperty(value = "error") + private Error error; + + /** + * Get status of the Azure async operation. Possible values include: 'InProgress', 'Succeeded', 'Failed'. + * + * @return the status value + */ + public NetworkOperationStatus status() { + return this.status; + } + + /** + * Set status of the Azure async operation. Possible values include: 'InProgress', 'Succeeded', 'Failed'. + * + * @param status the status value to set + * @return the AzureAsyncOperationResult object itself. + */ + public AzureAsyncOperationResult withStatus(NetworkOperationStatus status) { + this.status = status; + return this; + } + + /** + * Get details of the error occurred during specified asynchronous operation. + * + * @return the error value + */ + public Error error() { + return this.error; + } + + /** + * Set details of the error occurred during specified asynchronous operation. + * + * @param error the error value to set + * @return the AzureAsyncOperationResult object itself. + */ + public AzureAsyncOperationResult withError(Error error) { + this.error = error; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewall.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewall.java new file mode 100644 index 000000000000..78d1437c658e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewall.java @@ -0,0 +1,376 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import java.util.Map; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AzureFirewallInner; + +/** + * Type representing AzureFirewall. + */ +public interface AzureFirewall extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the additionalProperties value. + */ + Map additionalProperties(); + + /** + * @return the applicationRuleCollections value. + */ + List applicationRuleCollections(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the firewallPolicy value. + */ + SubResource firewallPolicy(); + + /** + * @return the hubIpAddresses value. + */ + HubIPAddresses hubIpAddresses(); + + /** + * @return the ipConfigurations value. + */ + List ipConfigurations(); + + /** + * @return the natRuleCollections value. + */ + List natRuleCollections(); + + /** + * @return the networkRuleCollections value. + */ + List networkRuleCollections(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the sku value. + */ + AzureFirewallSku sku(); + + /** + * @return the threatIntelMode value. + */ + AzureFirewallThreatIntelMode threatIntelMode(); + + /** + * @return the virtualHub value. + */ + SubResource virtualHub(); + + /** + * @return the zones value. + */ + List zones(); + + /** + * The entirety of the AzureFirewall definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of AzureFirewall definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a AzureFirewall definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the AzureFirewall definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the azurefirewall definition allowing to specify AdditionalProperties. + */ + interface WithAdditionalProperties { + /** + * Specifies additionalProperties. + * @param additionalProperties The additional properties used to further config this azure firewall + * @return the next definition stage + */ + WithCreate withAdditionalProperties(Map additionalProperties); + } + + /** + * The stage of the azurefirewall definition allowing to specify ApplicationRuleCollections. + */ + interface WithApplicationRuleCollections { + /** + * Specifies applicationRuleCollections. + * @param applicationRuleCollections Collection of application rule collections used by Azure Firewall + * @return the next definition stage + */ + WithCreate withApplicationRuleCollections(List applicationRuleCollections); + } + + /** + * The stage of the azurefirewall definition allowing to specify FirewallPolicy. + */ + interface WithFirewallPolicy { + /** + * Specifies firewallPolicy. + * @param firewallPolicy The firewallPolicy associated with this azure firewall + * @return the next definition stage + */ + WithCreate withFirewallPolicy(SubResource firewallPolicy); + } + + /** + * The stage of the azurefirewall definition allowing to specify IpConfigurations. + */ + interface WithIpConfigurations { + /** + * Specifies ipConfigurations. + * @param ipConfigurations IP configuration of the Azure Firewall resource + * @return the next definition stage + */ + WithCreate withIpConfigurations(List ipConfigurations); + } + + /** + * The stage of the azurefirewall definition allowing to specify NatRuleCollections. + */ + interface WithNatRuleCollections { + /** + * Specifies natRuleCollections. + * @param natRuleCollections Collection of NAT rule collections used by Azure Firewall + * @return the next definition stage + */ + WithCreate withNatRuleCollections(List natRuleCollections); + } + + /** + * The stage of the azurefirewall definition allowing to specify NetworkRuleCollections. + */ + interface WithNetworkRuleCollections { + /** + * Specifies networkRuleCollections. + * @param networkRuleCollections Collection of network rule collections used by Azure Firewall + * @return the next definition stage + */ + WithCreate withNetworkRuleCollections(List networkRuleCollections); + } + + /** + * The stage of the azurefirewall definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The Azure Firewall Resource SKU + * @return the next definition stage + */ + WithCreate withSku(AzureFirewallSku sku); + } + + /** + * The stage of the azurefirewall definition allowing to specify ThreatIntelMode. + */ + interface WithThreatIntelMode { + /** + * Specifies threatIntelMode. + * @param threatIntelMode The operation mode for Threat Intelligence. Possible values include: 'Alert', 'Deny', 'Off' + * @return the next definition stage + */ + WithCreate withThreatIntelMode(AzureFirewallThreatIntelMode threatIntelMode); + } + + /** + * The stage of the azurefirewall definition allowing to specify VirtualHub. + */ + interface WithVirtualHub { + /** + * Specifies virtualHub. + * @param virtualHub The virtualHub to which the firewall belongs + * @return the next definition stage + */ + WithCreate withVirtualHub(SubResource virtualHub); + } + + /** + * The stage of the azurefirewall definition allowing to specify Zones. + */ + interface WithZones { + /** + * Specifies zones. + * @param zones A list of availability zones denoting where the resource needs to come from + * @return the next definition stage + */ + WithCreate withZones(List zones); + } + + /** + * 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.WithAdditionalProperties, DefinitionStages.WithApplicationRuleCollections, DefinitionStages.WithFirewallPolicy, DefinitionStages.WithIpConfigurations, DefinitionStages.WithNatRuleCollections, DefinitionStages.WithNetworkRuleCollections, DefinitionStages.WithSku, DefinitionStages.WithThreatIntelMode, DefinitionStages.WithVirtualHub, DefinitionStages.WithZones { + } + } + /** + * The template for a AzureFirewall update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAdditionalProperties, UpdateStages.WithApplicationRuleCollections, UpdateStages.WithFirewallPolicy, UpdateStages.WithIpConfigurations, UpdateStages.WithNatRuleCollections, UpdateStages.WithNetworkRuleCollections, UpdateStages.WithSku, UpdateStages.WithThreatIntelMode, UpdateStages.WithVirtualHub, UpdateStages.WithZones { + } + + /** + * Grouping of AzureFirewall update stages. + */ + interface UpdateStages { + /** + * The stage of the azurefirewall update allowing to specify AdditionalProperties. + */ + interface WithAdditionalProperties { + /** + * Specifies additionalProperties. + * @param additionalProperties The additional properties used to further config this azure firewall + * @return the next update stage + */ + Update withAdditionalProperties(Map additionalProperties); + } + + /** + * The stage of the azurefirewall update allowing to specify ApplicationRuleCollections. + */ + interface WithApplicationRuleCollections { + /** + * Specifies applicationRuleCollections. + * @param applicationRuleCollections Collection of application rule collections used by Azure Firewall + * @return the next update stage + */ + Update withApplicationRuleCollections(List applicationRuleCollections); + } + + /** + * The stage of the azurefirewall update allowing to specify FirewallPolicy. + */ + interface WithFirewallPolicy { + /** + * Specifies firewallPolicy. + * @param firewallPolicy The firewallPolicy associated with this azure firewall + * @return the next update stage + */ + Update withFirewallPolicy(SubResource firewallPolicy); + } + + /** + * The stage of the azurefirewall update allowing to specify IpConfigurations. + */ + interface WithIpConfigurations { + /** + * Specifies ipConfigurations. + * @param ipConfigurations IP configuration of the Azure Firewall resource + * @return the next update stage + */ + Update withIpConfigurations(List ipConfigurations); + } + + /** + * The stage of the azurefirewall update allowing to specify NatRuleCollections. + */ + interface WithNatRuleCollections { + /** + * Specifies natRuleCollections. + * @param natRuleCollections Collection of NAT rule collections used by Azure Firewall + * @return the next update stage + */ + Update withNatRuleCollections(List natRuleCollections); + } + + /** + * The stage of the azurefirewall update allowing to specify NetworkRuleCollections. + */ + interface WithNetworkRuleCollections { + /** + * Specifies networkRuleCollections. + * @param networkRuleCollections Collection of network rule collections used by Azure Firewall + * @return the next update stage + */ + Update withNetworkRuleCollections(List networkRuleCollections); + } + + /** + * The stage of the azurefirewall update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The Azure Firewall Resource SKU + * @return the next update stage + */ + Update withSku(AzureFirewallSku sku); + } + + /** + * The stage of the azurefirewall update allowing to specify ThreatIntelMode. + */ + interface WithThreatIntelMode { + /** + * Specifies threatIntelMode. + * @param threatIntelMode The operation mode for Threat Intelligence. Possible values include: 'Alert', 'Deny', 'Off' + * @return the next update stage + */ + Update withThreatIntelMode(AzureFirewallThreatIntelMode threatIntelMode); + } + + /** + * The stage of the azurefirewall update allowing to specify VirtualHub. + */ + interface WithVirtualHub { + /** + * Specifies virtualHub. + * @param virtualHub The virtualHub to which the firewall belongs + * @return the next update stage + */ + Update withVirtualHub(SubResource virtualHub); + } + + /** + * The stage of the azurefirewall update allowing to specify Zones. + */ + interface WithZones { + /** + * Specifies zones. + * @param zones A list of availability zones denoting where the resource needs to come from + * @return the next update stage + */ + Update withZones(List zones); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRule.java new file mode 100644 index 000000000000..6781e0c34801 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRule.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of an application rule. + */ +public class AzureFirewallApplicationRule { + /** + * Name of the application rule. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Description of the rule. + */ + @JsonProperty(value = "description") + private String description; + + /** + * List of source IP addresses for this rule. + */ + @JsonProperty(value = "sourceAddresses") + private List sourceAddresses; + + /** + * Array of ApplicationRuleProtocols. + */ + @JsonProperty(value = "protocols") + private List protocols; + + /** + * List of FQDNs for this rule. + */ + @JsonProperty(value = "targetFqdns") + private List targetFqdns; + + /** + * List of FQDN Tags for this rule. + */ + @JsonProperty(value = "fqdnTags") + private List fqdnTags; + + /** + * List of source IpGroups for this rule. + */ + @JsonProperty(value = "sourceIpGroups") + private List sourceIpGroups; + + /** + * Get name of the application rule. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the application rule. + * + * @param name the name value to set + * @return the AzureFirewallApplicationRule object itself. + */ + public AzureFirewallApplicationRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get description of the rule. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the rule. + * + * @param description the description value to set + * @return the AzureFirewallApplicationRule object itself. + */ + public AzureFirewallApplicationRule withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get list of source IP addresses for this rule. + * + * @return the sourceAddresses value + */ + public List sourceAddresses() { + return this.sourceAddresses; + } + + /** + * Set list of source IP addresses for this rule. + * + * @param sourceAddresses the sourceAddresses value to set + * @return the AzureFirewallApplicationRule object itself. + */ + public AzureFirewallApplicationRule withSourceAddresses(List sourceAddresses) { + this.sourceAddresses = sourceAddresses; + return this; + } + + /** + * Get array of ApplicationRuleProtocols. + * + * @return the protocols value + */ + public List protocols() { + return this.protocols; + } + + /** + * Set array of ApplicationRuleProtocols. + * + * @param protocols the protocols value to set + * @return the AzureFirewallApplicationRule object itself. + */ + public AzureFirewallApplicationRule withProtocols(List protocols) { + this.protocols = protocols; + return this; + } + + /** + * Get list of FQDNs for this rule. + * + * @return the targetFqdns value + */ + public List targetFqdns() { + return this.targetFqdns; + } + + /** + * Set list of FQDNs for this rule. + * + * @param targetFqdns the targetFqdns value to set + * @return the AzureFirewallApplicationRule object itself. + */ + public AzureFirewallApplicationRule withTargetFqdns(List targetFqdns) { + this.targetFqdns = targetFqdns; + return this; + } + + /** + * Get list of FQDN Tags for this rule. + * + * @return the fqdnTags value + */ + public List fqdnTags() { + return this.fqdnTags; + } + + /** + * Set list of FQDN Tags for this rule. + * + * @param fqdnTags the fqdnTags value to set + * @return the AzureFirewallApplicationRule object itself. + */ + public AzureFirewallApplicationRule withFqdnTags(List fqdnTags) { + this.fqdnTags = fqdnTags; + return this; + } + + /** + * Get list of source IpGroups for this rule. + * + * @return the sourceIpGroups value + */ + public List sourceIpGroups() { + return this.sourceIpGroups; + } + + /** + * Set list of source IpGroups for this rule. + * + * @param sourceIpGroups the sourceIpGroups value to set + * @return the AzureFirewallApplicationRule object itself. + */ + public AzureFirewallApplicationRule withSourceIpGroups(List sourceIpGroups) { + this.sourceIpGroups = sourceIpGroups; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRuleCollection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRuleCollection.java new file mode 100644 index 000000000000..a2b27afb20cb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRuleCollection.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Application rule collection resource. + */ +@JsonFlatten +public class AzureFirewallApplicationRuleCollection extends SubResource { + /** + * Priority of the application rule collection resource. + */ + @JsonProperty(value = "properties.priority") + private Integer priority; + + /** + * The action type of a rule collection. + */ + @JsonProperty(value = "properties.action") + private AzureFirewallRCAction action; + + /** + * Collection of rules used by a application rule collection. + */ + @JsonProperty(value = "properties.rules") + private List rules; + + /** + * The provisioning state of the application rule collection resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within the Azure firewall. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get priority of the application rule collection resource. + * + * @return the priority value + */ + public Integer priority() { + return this.priority; + } + + /** + * Set priority of the application rule collection resource. + * + * @param priority the priority value to set + * @return the AzureFirewallApplicationRuleCollection object itself. + */ + public AzureFirewallApplicationRuleCollection withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get the action type of a rule collection. + * + * @return the action value + */ + public AzureFirewallRCAction action() { + return this.action; + } + + /** + * Set the action type of a rule collection. + * + * @param action the action value to set + * @return the AzureFirewallApplicationRuleCollection object itself. + */ + public AzureFirewallApplicationRuleCollection withAction(AzureFirewallRCAction action) { + this.action = action; + return this; + } + + /** + * Get collection of rules used by a application rule collection. + * + * @return the rules value + */ + public List rules() { + return this.rules; + } + + /** + * Set collection of rules used by a application rule collection. + * + * @param rules the rules value to set + * @return the AzureFirewallApplicationRuleCollection object itself. + */ + public AzureFirewallApplicationRuleCollection withRules(List rules) { + this.rules = rules; + return this; + } + + /** + * Get the provisioning state of the application rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within the Azure firewall. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within the Azure firewall. This name can be used to access the resource. + * + * @param name the name value to set + * @return the AzureFirewallApplicationRuleCollection object itself. + */ + public AzureFirewallApplicationRuleCollection withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRuleProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRuleProtocol.java new file mode 100644 index 000000000000..de05dc24a1fb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRuleProtocol.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the application rule protocol. + */ +public class AzureFirewallApplicationRuleProtocol { + /** + * Protocol type. Possible values include: 'Http', 'Https', 'Mssql'. + */ + @JsonProperty(value = "protocolType") + private AzureFirewallApplicationRuleProtocolType protocolType; + + /** + * Port number for the protocol, cannot be greater than 64000. This field + * is optional. + */ + @JsonProperty(value = "port") + private Integer port; + + /** + * Get protocol type. Possible values include: 'Http', 'Https', 'Mssql'. + * + * @return the protocolType value + */ + public AzureFirewallApplicationRuleProtocolType protocolType() { + return this.protocolType; + } + + /** + * Set protocol type. Possible values include: 'Http', 'Https', 'Mssql'. + * + * @param protocolType the protocolType value to set + * @return the AzureFirewallApplicationRuleProtocol object itself. + */ + public AzureFirewallApplicationRuleProtocol withProtocolType(AzureFirewallApplicationRuleProtocolType protocolType) { + this.protocolType = protocolType; + return this; + } + + /** + * Get port number for the protocol, cannot be greater than 64000. This field is optional. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set port number for the protocol, cannot be greater than 64000. This field is optional. + * + * @param port the port value to set + * @return the AzureFirewallApplicationRuleProtocol object itself. + */ + public AzureFirewallApplicationRuleProtocol withPort(Integer port) { + this.port = port; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRuleProtocolType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRuleProtocolType.java new file mode 100644 index 000000000000..b9763b1b7c9e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallApplicationRuleProtocolType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AzureFirewallApplicationRuleProtocolType. + */ +public final class AzureFirewallApplicationRuleProtocolType extends ExpandableStringEnum { + /** Static value Http for AzureFirewallApplicationRuleProtocolType. */ + public static final AzureFirewallApplicationRuleProtocolType HTTP = fromString("Http"); + + /** Static value Https for AzureFirewallApplicationRuleProtocolType. */ + public static final AzureFirewallApplicationRuleProtocolType HTTPS = fromString("Https"); + + /** Static value Mssql for AzureFirewallApplicationRuleProtocolType. */ + public static final AzureFirewallApplicationRuleProtocolType MSSQL = fromString("Mssql"); + + /** + * Creates or finds a AzureFirewallApplicationRuleProtocolType from its string representation. + * @param name a name to look for + * @return the corresponding AzureFirewallApplicationRuleProtocolType + */ + @JsonCreator + public static AzureFirewallApplicationRuleProtocolType fromString(String name) { + return fromString(name, AzureFirewallApplicationRuleProtocolType.class); + } + + /** + * @return known AzureFirewallApplicationRuleProtocolType values + */ + public static Collection values() { + return values(AzureFirewallApplicationRuleProtocolType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallFqdnTag.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallFqdnTag.java new file mode 100644 index 000000000000..d19703a88348 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallFqdnTag.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AzureFirewallFqdnTagInner; + +/** + * Type representing AzureFirewallFqdnTag. + */ +public interface AzureFirewallFqdnTag extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the fqdnTagName value. + */ + String fqdnTagName(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallFqdnTags.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallFqdnTags.java new file mode 100644 index 000000000000..34d562e93da4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallFqdnTags.java @@ -0,0 +1,19 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AzureFirewallFqdnTagsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AzureFirewallFqdnTags. + */ +public interface AzureFirewallFqdnTags extends SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallIPConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallIPConfiguration.java new file mode 100644 index 000000000000..7985d7f22411 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallIPConfiguration.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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * IP configuration of an Azure Firewall. + */ +@JsonFlatten +public class AzureFirewallIPConfiguration extends SubResource { + /** + * The Firewall Internal Load Balancer IP to be used as the next hop in + * User Defined Routes. + */ + @JsonProperty(value = "properties.privateIPAddress", access = JsonProperty.Access.WRITE_ONLY) + private String privateIPAddress; + + /** + * Reference of the subnet resource. This resource must be named + * 'AzureFirewallSubnet'. + */ + @JsonProperty(value = "properties.subnet") + private SubResource subnet; + + /** + * Reference of the PublicIP resource. This field is a mandatory input if + * subnet is not null. + */ + @JsonProperty(value = "properties.publicIPAddress") + private SubResource publicIPAddress; + + /** + * The provisioning state of the Azure firewall IP configuration resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of the resource that is unique within a resource group. This name + * can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes. + * + * @return the privateIPAddress value + */ + public String privateIPAddress() { + return this.privateIPAddress; + } + + /** + * Get reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'. + * + * @return the subnet value + */ + public SubResource subnet() { + return this.subnet; + } + + /** + * Set reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'. + * + * @param subnet the subnet value to set + * @return the AzureFirewallIPConfiguration object itself. + */ + public AzureFirewallIPConfiguration withSubnet(SubResource subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get reference of the PublicIP resource. This field is a mandatory input if subnet is not null. + * + * @return the publicIPAddress value + */ + public SubResource publicIPAddress() { + return this.publicIPAddress; + } + + /** + * Set reference of the PublicIP resource. This field is a mandatory input if subnet is not null. + * + * @param publicIPAddress the publicIPAddress value to set + * @return the AzureFirewallIPConfiguration object itself. + */ + public AzureFirewallIPConfiguration withPublicIPAddress(SubResource publicIPAddress) { + this.publicIPAddress = publicIPAddress; + return this; + } + + /** + * Get the provisioning state of the Azure firewall IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the AzureFirewallIPConfiguration object itself. + */ + public AzureFirewallIPConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRCAction.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRCAction.java new file mode 100644 index 000000000000..777f51bd63d2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRCAction.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AzureFirewall NAT Rule Collection Action. + */ +public class AzureFirewallNatRCAction { + /** + * The type of action. Possible values include: 'Snat', 'Dnat'. + */ + @JsonProperty(value = "type") + private AzureFirewallNatRCActionType type; + + /** + * Get the type of action. Possible values include: 'Snat', 'Dnat'. + * + * @return the type value + */ + public AzureFirewallNatRCActionType type() { + return this.type; + } + + /** + * Set the type of action. Possible values include: 'Snat', 'Dnat'. + * + * @param type the type value to set + * @return the AzureFirewallNatRCAction object itself. + */ + public AzureFirewallNatRCAction withType(AzureFirewallNatRCActionType type) { + this.type = type; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRCActionType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRCActionType.java new file mode 100644 index 000000000000..8c8a961bece2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRCActionType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AzureFirewallNatRCActionType. + */ +public final class AzureFirewallNatRCActionType extends ExpandableStringEnum { + /** Static value Snat for AzureFirewallNatRCActionType. */ + public static final AzureFirewallNatRCActionType SNAT = fromString("Snat"); + + /** Static value Dnat for AzureFirewallNatRCActionType. */ + public static final AzureFirewallNatRCActionType DNAT = fromString("Dnat"); + + /** + * Creates or finds a AzureFirewallNatRCActionType from its string representation. + * @param name a name to look for + * @return the corresponding AzureFirewallNatRCActionType + */ + @JsonCreator + public static AzureFirewallNatRCActionType fromString(String name) { + return fromString(name, AzureFirewallNatRCActionType.class); + } + + /** + * @return known AzureFirewallNatRCActionType values + */ + public static Collection values() { + return values(AzureFirewallNatRCActionType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRule.java new file mode 100644 index 000000000000..b093830e0965 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRule.java @@ -0,0 +1,279 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of a NAT rule. + */ +public class AzureFirewallNatRule { + /** + * Name of the NAT rule. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Description of the rule. + */ + @JsonProperty(value = "description") + private String description; + + /** + * List of source IP addresses for this rule. + */ + @JsonProperty(value = "sourceAddresses") + private List sourceAddresses; + + /** + * List of destination IP addresses for this rule. Supports IP ranges, + * prefixes, and service tags. + */ + @JsonProperty(value = "destinationAddresses") + private List destinationAddresses; + + /** + * List of destination ports. + */ + @JsonProperty(value = "destinationPorts") + private List destinationPorts; + + /** + * Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule. + */ + @JsonProperty(value = "protocols") + private List protocols; + + /** + * The translated address for this NAT rule. + */ + @JsonProperty(value = "translatedAddress") + private String translatedAddress; + + /** + * The translated port for this NAT rule. + */ + @JsonProperty(value = "translatedPort") + private String translatedPort; + + /** + * The translated FQDN for this NAT rule. + */ + @JsonProperty(value = "translatedFqdn") + private String translatedFqdn; + + /** + * List of source IpGroups for this rule. + */ + @JsonProperty(value = "sourceIpGroups") + private List sourceIpGroups; + + /** + * Get name of the NAT rule. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the NAT rule. + * + * @param name the name value to set + * @return the AzureFirewallNatRule object itself. + */ + public AzureFirewallNatRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get description of the rule. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the rule. + * + * @param description the description value to set + * @return the AzureFirewallNatRule object itself. + */ + public AzureFirewallNatRule withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get list of source IP addresses for this rule. + * + * @return the sourceAddresses value + */ + public List sourceAddresses() { + return this.sourceAddresses; + } + + /** + * Set list of source IP addresses for this rule. + * + * @param sourceAddresses the sourceAddresses value to set + * @return the AzureFirewallNatRule object itself. + */ + public AzureFirewallNatRule withSourceAddresses(List sourceAddresses) { + this.sourceAddresses = sourceAddresses; + return this; + } + + /** + * Get list of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags. + * + * @return the destinationAddresses value + */ + public List destinationAddresses() { + return this.destinationAddresses; + } + + /** + * Set list of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags. + * + * @param destinationAddresses the destinationAddresses value to set + * @return the AzureFirewallNatRule object itself. + */ + public AzureFirewallNatRule withDestinationAddresses(List destinationAddresses) { + this.destinationAddresses = destinationAddresses; + return this; + } + + /** + * Get list of destination ports. + * + * @return the destinationPorts value + */ + public List destinationPorts() { + return this.destinationPorts; + } + + /** + * Set list of destination ports. + * + * @param destinationPorts the destinationPorts value to set + * @return the AzureFirewallNatRule object itself. + */ + public AzureFirewallNatRule withDestinationPorts(List destinationPorts) { + this.destinationPorts = destinationPorts; + return this; + } + + /** + * Get array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule. + * + * @return the protocols value + */ + public List protocols() { + return this.protocols; + } + + /** + * Set array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule. + * + * @param protocols the protocols value to set + * @return the AzureFirewallNatRule object itself. + */ + public AzureFirewallNatRule withProtocols(List protocols) { + this.protocols = protocols; + return this; + } + + /** + * Get the translated address for this NAT rule. + * + * @return the translatedAddress value + */ + public String translatedAddress() { + return this.translatedAddress; + } + + /** + * Set the translated address for this NAT rule. + * + * @param translatedAddress the translatedAddress value to set + * @return the AzureFirewallNatRule object itself. + */ + public AzureFirewallNatRule withTranslatedAddress(String translatedAddress) { + this.translatedAddress = translatedAddress; + return this; + } + + /** + * Get the translated port for this NAT rule. + * + * @return the translatedPort value + */ + public String translatedPort() { + return this.translatedPort; + } + + /** + * Set the translated port for this NAT rule. + * + * @param translatedPort the translatedPort value to set + * @return the AzureFirewallNatRule object itself. + */ + public AzureFirewallNatRule withTranslatedPort(String translatedPort) { + this.translatedPort = translatedPort; + return this; + } + + /** + * Get the translated FQDN for this NAT rule. + * + * @return the translatedFqdn value + */ + public String translatedFqdn() { + return this.translatedFqdn; + } + + /** + * Set the translated FQDN for this NAT rule. + * + * @param translatedFqdn the translatedFqdn value to set + * @return the AzureFirewallNatRule object itself. + */ + public AzureFirewallNatRule withTranslatedFqdn(String translatedFqdn) { + this.translatedFqdn = translatedFqdn; + return this; + } + + /** + * Get list of source IpGroups for this rule. + * + * @return the sourceIpGroups value + */ + public List sourceIpGroups() { + return this.sourceIpGroups; + } + + /** + * Set list of source IpGroups for this rule. + * + * @param sourceIpGroups the sourceIpGroups value to set + * @return the AzureFirewallNatRule object itself. + */ + public AzureFirewallNatRule withSourceIpGroups(List sourceIpGroups) { + this.sourceIpGroups = sourceIpGroups; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRuleCollection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRuleCollection.java new file mode 100644 index 000000000000..2fa2d6b23a14 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNatRuleCollection.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * NAT rule collection resource. + */ +@JsonFlatten +public class AzureFirewallNatRuleCollection extends SubResource { + /** + * Priority of the NAT rule collection resource. + */ + @JsonProperty(value = "properties.priority") + private Integer priority; + + /** + * The action type of a NAT rule collection. + */ + @JsonProperty(value = "properties.action") + private AzureFirewallNatRCAction action; + + /** + * Collection of rules used by a NAT rule collection. + */ + @JsonProperty(value = "properties.rules") + private List rules; + + /** + * The provisioning state of the NAT rule collection resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within the Azure firewall. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get priority of the NAT rule collection resource. + * + * @return the priority value + */ + public Integer priority() { + return this.priority; + } + + /** + * Set priority of the NAT rule collection resource. + * + * @param priority the priority value to set + * @return the AzureFirewallNatRuleCollection object itself. + */ + public AzureFirewallNatRuleCollection withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get the action type of a NAT rule collection. + * + * @return the action value + */ + public AzureFirewallNatRCAction action() { + return this.action; + } + + /** + * Set the action type of a NAT rule collection. + * + * @param action the action value to set + * @return the AzureFirewallNatRuleCollection object itself. + */ + public AzureFirewallNatRuleCollection withAction(AzureFirewallNatRCAction action) { + this.action = action; + return this; + } + + /** + * Get collection of rules used by a NAT rule collection. + * + * @return the rules value + */ + public List rules() { + return this.rules; + } + + /** + * Set collection of rules used by a NAT rule collection. + * + * @param rules the rules value to set + * @return the AzureFirewallNatRuleCollection object itself. + */ + public AzureFirewallNatRuleCollection withRules(List rules) { + this.rules = rules; + return this; + } + + /** + * Get the provisioning state of the NAT rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within the Azure firewall. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within the Azure firewall. This name can be used to access the resource. + * + * @param name the name value to set + * @return the AzureFirewallNatRuleCollection object itself. + */ + public AzureFirewallNatRuleCollection withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNetworkRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNetworkRule.java new file mode 100644 index 000000000000..61a07e37cb4e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNetworkRule.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the network rule. + */ +public class AzureFirewallNetworkRule { + /** + * Name of the network rule. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Description of the rule. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Array of AzureFirewallNetworkRuleProtocols. + */ + @JsonProperty(value = "protocols") + private List protocols; + + /** + * List of source IP addresses for this rule. + */ + @JsonProperty(value = "sourceAddresses") + private List sourceAddresses; + + /** + * List of destination IP addresses. + */ + @JsonProperty(value = "destinationAddresses") + private List destinationAddresses; + + /** + * List of destination ports. + */ + @JsonProperty(value = "destinationPorts") + private List destinationPorts; + + /** + * List of destination FQDNs. + */ + @JsonProperty(value = "destinationFqdns") + private List destinationFqdns; + + /** + * List of source IpGroups for this rule. + */ + @JsonProperty(value = "sourceIpGroups") + private List sourceIpGroups; + + /** + * List of destination IpGroups for this rule. + */ + @JsonProperty(value = "destinationIpGroups") + private List destinationIpGroups; + + /** + * Get name of the network rule. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the network rule. + * + * @param name the name value to set + * @return the AzureFirewallNetworkRule object itself. + */ + public AzureFirewallNetworkRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get description of the rule. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the rule. + * + * @param description the description value to set + * @return the AzureFirewallNetworkRule object itself. + */ + public AzureFirewallNetworkRule withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get array of AzureFirewallNetworkRuleProtocols. + * + * @return the protocols value + */ + public List protocols() { + return this.protocols; + } + + /** + * Set array of AzureFirewallNetworkRuleProtocols. + * + * @param protocols the protocols value to set + * @return the AzureFirewallNetworkRule object itself. + */ + public AzureFirewallNetworkRule withProtocols(List protocols) { + this.protocols = protocols; + return this; + } + + /** + * Get list of source IP addresses for this rule. + * + * @return the sourceAddresses value + */ + public List sourceAddresses() { + return this.sourceAddresses; + } + + /** + * Set list of source IP addresses for this rule. + * + * @param sourceAddresses the sourceAddresses value to set + * @return the AzureFirewallNetworkRule object itself. + */ + public AzureFirewallNetworkRule withSourceAddresses(List sourceAddresses) { + this.sourceAddresses = sourceAddresses; + return this; + } + + /** + * Get list of destination IP addresses. + * + * @return the destinationAddresses value + */ + public List destinationAddresses() { + return this.destinationAddresses; + } + + /** + * Set list of destination IP addresses. + * + * @param destinationAddresses the destinationAddresses value to set + * @return the AzureFirewallNetworkRule object itself. + */ + public AzureFirewallNetworkRule withDestinationAddresses(List destinationAddresses) { + this.destinationAddresses = destinationAddresses; + return this; + } + + /** + * Get list of destination ports. + * + * @return the destinationPorts value + */ + public List destinationPorts() { + return this.destinationPorts; + } + + /** + * Set list of destination ports. + * + * @param destinationPorts the destinationPorts value to set + * @return the AzureFirewallNetworkRule object itself. + */ + public AzureFirewallNetworkRule withDestinationPorts(List destinationPorts) { + this.destinationPorts = destinationPorts; + return this; + } + + /** + * Get list of destination FQDNs. + * + * @return the destinationFqdns value + */ + public List destinationFqdns() { + return this.destinationFqdns; + } + + /** + * Set list of destination FQDNs. + * + * @param destinationFqdns the destinationFqdns value to set + * @return the AzureFirewallNetworkRule object itself. + */ + public AzureFirewallNetworkRule withDestinationFqdns(List destinationFqdns) { + this.destinationFqdns = destinationFqdns; + return this; + } + + /** + * Get list of source IpGroups for this rule. + * + * @return the sourceIpGroups value + */ + public List sourceIpGroups() { + return this.sourceIpGroups; + } + + /** + * Set list of source IpGroups for this rule. + * + * @param sourceIpGroups the sourceIpGroups value to set + * @return the AzureFirewallNetworkRule object itself. + */ + public AzureFirewallNetworkRule withSourceIpGroups(List sourceIpGroups) { + this.sourceIpGroups = sourceIpGroups; + return this; + } + + /** + * Get list of destination IpGroups for this rule. + * + * @return the destinationIpGroups value + */ + public List destinationIpGroups() { + return this.destinationIpGroups; + } + + /** + * Set list of destination IpGroups for this rule. + * + * @param destinationIpGroups the destinationIpGroups value to set + * @return the AzureFirewallNetworkRule object itself. + */ + public AzureFirewallNetworkRule withDestinationIpGroups(List destinationIpGroups) { + this.destinationIpGroups = destinationIpGroups; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNetworkRuleCollection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNetworkRuleCollection.java new file mode 100644 index 000000000000..e174b2fae2d6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNetworkRuleCollection.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Network rule collection resource. + */ +@JsonFlatten +public class AzureFirewallNetworkRuleCollection extends SubResource { + /** + * Priority of the network rule collection resource. + */ + @JsonProperty(value = "properties.priority") + private Integer priority; + + /** + * The action type of a rule collection. + */ + @JsonProperty(value = "properties.action") + private AzureFirewallRCAction action; + + /** + * Collection of rules used by a network rule collection. + */ + @JsonProperty(value = "properties.rules") + private List rules; + + /** + * The provisioning state of the network rule collection resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within the Azure firewall. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get priority of the network rule collection resource. + * + * @return the priority value + */ + public Integer priority() { + return this.priority; + } + + /** + * Set priority of the network rule collection resource. + * + * @param priority the priority value to set + * @return the AzureFirewallNetworkRuleCollection object itself. + */ + public AzureFirewallNetworkRuleCollection withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get the action type of a rule collection. + * + * @return the action value + */ + public AzureFirewallRCAction action() { + return this.action; + } + + /** + * Set the action type of a rule collection. + * + * @param action the action value to set + * @return the AzureFirewallNetworkRuleCollection object itself. + */ + public AzureFirewallNetworkRuleCollection withAction(AzureFirewallRCAction action) { + this.action = action; + return this; + } + + /** + * Get collection of rules used by a network rule collection. + * + * @return the rules value + */ + public List rules() { + return this.rules; + } + + /** + * Set collection of rules used by a network rule collection. + * + * @param rules the rules value to set + * @return the AzureFirewallNetworkRuleCollection object itself. + */ + public AzureFirewallNetworkRuleCollection withRules(List rules) { + this.rules = rules; + return this; + } + + /** + * Get the provisioning state of the network rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within the Azure firewall. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within the Azure firewall. This name can be used to access the resource. + * + * @param name the name value to set + * @return the AzureFirewallNetworkRuleCollection object itself. + */ + public AzureFirewallNetworkRuleCollection withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNetworkRuleProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNetworkRuleProtocol.java new file mode 100644 index 000000000000..82f21b1e0ee3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallNetworkRuleProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AzureFirewallNetworkRuleProtocol. + */ +public final class AzureFirewallNetworkRuleProtocol extends ExpandableStringEnum { + /** Static value TCP for AzureFirewallNetworkRuleProtocol. */ + public static final AzureFirewallNetworkRuleProtocol TCP = fromString("TCP"); + + /** Static value UDP for AzureFirewallNetworkRuleProtocol. */ + public static final AzureFirewallNetworkRuleProtocol UDP = fromString("UDP"); + + /** Static value Any for AzureFirewallNetworkRuleProtocol. */ + public static final AzureFirewallNetworkRuleProtocol ANY = fromString("Any"); + + /** Static value ICMP for AzureFirewallNetworkRuleProtocol. */ + public static final AzureFirewallNetworkRuleProtocol ICMP = fromString("ICMP"); + + /** + * Creates or finds a AzureFirewallNetworkRuleProtocol from its string representation. + * @param name a name to look for + * @return the corresponding AzureFirewallNetworkRuleProtocol + */ + @JsonCreator + public static AzureFirewallNetworkRuleProtocol fromString(String name) { + return fromString(name, AzureFirewallNetworkRuleProtocol.class); + } + + /** + * @return known AzureFirewallNetworkRuleProtocol values + */ + public static Collection values() { + return values(AzureFirewallNetworkRuleProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallPublicIPAddress.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallPublicIPAddress.java new file mode 100644 index 000000000000..441af00fd08b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallPublicIPAddress.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Public IP Address associated with azure firewall. + */ +public class AzureFirewallPublicIPAddress { + /** + * Public IP Address value. + */ + @JsonProperty(value = "address") + private String address; + + /** + * Get public IP Address value. + * + * @return the address value + */ + public String address() { + return this.address; + } + + /** + * Set public IP Address value. + * + * @param address the address value to set + * @return the AzureFirewallPublicIPAddress object itself. + */ + public AzureFirewallPublicIPAddress withAddress(String address) { + this.address = address; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallRCAction.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallRCAction.java new file mode 100644 index 000000000000..54fabc037a0d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallRCAction.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the AzureFirewallRCAction. + */ +public class AzureFirewallRCAction { + /** + * The type of action. Possible values include: 'Allow', 'Deny'. + */ + @JsonProperty(value = "type") + private AzureFirewallRCActionType type; + + /** + * Get the type of action. Possible values include: 'Allow', 'Deny'. + * + * @return the type value + */ + public AzureFirewallRCActionType type() { + return this.type; + } + + /** + * Set the type of action. Possible values include: 'Allow', 'Deny'. + * + * @param type the type value to set + * @return the AzureFirewallRCAction object itself. + */ + public AzureFirewallRCAction withType(AzureFirewallRCActionType type) { + this.type = type; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallRCActionType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallRCActionType.java new file mode 100644 index 000000000000..097d17d94553 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallRCActionType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AzureFirewallRCActionType. + */ +public final class AzureFirewallRCActionType extends ExpandableStringEnum { + /** Static value Allow for AzureFirewallRCActionType. */ + public static final AzureFirewallRCActionType ALLOW = fromString("Allow"); + + /** Static value Deny for AzureFirewallRCActionType. */ + public static final AzureFirewallRCActionType DENY = fromString("Deny"); + + /** + * Creates or finds a AzureFirewallRCActionType from its string representation. + * @param name a name to look for + * @return the corresponding AzureFirewallRCActionType + */ + @JsonCreator + public static AzureFirewallRCActionType fromString(String name) { + return fromString(name, AzureFirewallRCActionType.class); + } + + /** + * @return known AzureFirewallRCActionType values + */ + public static Collection values() { + return values(AzureFirewallRCActionType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallSku.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallSku.java new file mode 100644 index 000000000000..f3177f19588b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallSku.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SKU of an Azure Firewall. + */ +public class AzureFirewallSku { + /** + * Name of an Azure Firewall SKU. Possible values include: 'AZFW_VNet', + * 'AZFW_Hub'. + */ + @JsonProperty(value = "name") + private AzureFirewallSkuName name; + + /** + * Tier of an Azure Firewall. Possible values include: 'Standard'. + */ + @JsonProperty(value = "tier") + private AzureFirewallSkuTier tier; + + /** + * Get name of an Azure Firewall SKU. Possible values include: 'AZFW_VNet', 'AZFW_Hub'. + * + * @return the name value + */ + public AzureFirewallSkuName name() { + return this.name; + } + + /** + * Set name of an Azure Firewall SKU. Possible values include: 'AZFW_VNet', 'AZFW_Hub'. + * + * @param name the name value to set + * @return the AzureFirewallSku object itself. + */ + public AzureFirewallSku withName(AzureFirewallSkuName name) { + this.name = name; + return this; + } + + /** + * Get tier of an Azure Firewall. Possible values include: 'Standard'. + * + * @return the tier value + */ + public AzureFirewallSkuTier tier() { + return this.tier; + } + + /** + * Set tier of an Azure Firewall. Possible values include: 'Standard'. + * + * @param tier the tier value to set + * @return the AzureFirewallSku object itself. + */ + public AzureFirewallSku withTier(AzureFirewallSkuTier tier) { + this.tier = tier; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallSkuName.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallSkuName.java new file mode 100644 index 000000000000..aa6ca511bb6e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallSkuName.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AzureFirewallSkuName. + */ +public final class AzureFirewallSkuName extends ExpandableStringEnum { + /** Static value AZFW_VNet for AzureFirewallSkuName. */ + public static final AzureFirewallSkuName AZFW_VNET = fromString("AZFW_VNet"); + + /** Static value AZFW_Hub for AzureFirewallSkuName. */ + public static final AzureFirewallSkuName AZFW_HUB = fromString("AZFW_Hub"); + + /** + * Creates or finds a AzureFirewallSkuName from its string representation. + * @param name a name to look for + * @return the corresponding AzureFirewallSkuName + */ + @JsonCreator + public static AzureFirewallSkuName fromString(String name) { + return fromString(name, AzureFirewallSkuName.class); + } + + /** + * @return known AzureFirewallSkuName values + */ + public static Collection values() { + return values(AzureFirewallSkuName.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallSkuTier.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallSkuTier.java new file mode 100644 index 000000000000..b2fb5ae45626 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallSkuTier.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AzureFirewallSkuTier. + */ +public final class AzureFirewallSkuTier extends ExpandableStringEnum { + /** Static value Standard for AzureFirewallSkuTier. */ + public static final AzureFirewallSkuTier STANDARD = fromString("Standard"); + + /** + * Creates or finds a AzureFirewallSkuTier from its string representation. + * @param name a name to look for + * @return the corresponding AzureFirewallSkuTier + */ + @JsonCreator + public static AzureFirewallSkuTier fromString(String name) { + return fromString(name, AzureFirewallSkuTier.class); + } + + /** + * @return known AzureFirewallSkuTier values + */ + public static Collection values() { + return values(AzureFirewallSkuTier.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallThreatIntelMode.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallThreatIntelMode.java new file mode 100644 index 000000000000..d961f09da9e3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewallThreatIntelMode.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AzureFirewallThreatIntelMode. + */ +public final class AzureFirewallThreatIntelMode extends ExpandableStringEnum { + /** Static value Alert for AzureFirewallThreatIntelMode. */ + public static final AzureFirewallThreatIntelMode ALERT = fromString("Alert"); + + /** Static value Deny for AzureFirewallThreatIntelMode. */ + public static final AzureFirewallThreatIntelMode DENY = fromString("Deny"); + + /** Static value Off for AzureFirewallThreatIntelMode. */ + public static final AzureFirewallThreatIntelMode OFF = fromString("Off"); + + /** + * Creates or finds a AzureFirewallThreatIntelMode from its string representation. + * @param name a name to look for + * @return the corresponding AzureFirewallThreatIntelMode + */ + @JsonCreator + public static AzureFirewallThreatIntelMode fromString(String name) { + return fromString(name, AzureFirewallThreatIntelMode.class); + } + + /** + * @return known AzureFirewallThreatIntelMode values + */ + public static Collection values() { + return values(AzureFirewallThreatIntelMode.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewalls.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewalls.java new file mode 100644 index 000000000000..d5e34ccd073e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureFirewalls.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.network.v2019_09_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.network.v2019_09_01.implementation.AzureFirewallsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AzureFirewalls. + */ +public interface AzureFirewalls extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReport.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReport.java new file mode 100644 index 000000000000..c58682125d65 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReport.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AzureReachabilityReportInner; +import java.util.List; + +/** + * Type representing AzureReachabilityReport. + */ +public interface AzureReachabilityReport extends HasInner, HasManager { + /** + * @return the aggregationLevel value. + */ + String aggregationLevel(); + + /** + * @return the providerLocation value. + */ + AzureReachabilityReportLocation providerLocation(); + + /** + * @return the reachabilityReport value. + */ + List reachabilityReport(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportItem.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportItem.java new file mode 100644 index 000000000000..8b7a8881a30f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportItem.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure reachability report details for a given provider location. + */ +public class AzureReachabilityReportItem { + /** + * The Internet service provider. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * The Azure region. + */ + @JsonProperty(value = "azureLocation") + private String azureLocation; + + /** + * List of latency details for each of the time series. + */ + @JsonProperty(value = "latencies") + private List latencies; + + /** + * Get the Internet service provider. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the Internet service provider. + * + * @param provider the provider value to set + * @return the AzureReachabilityReportItem object itself. + */ + public AzureReachabilityReportItem withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the Azure region. + * + * @return the azureLocation value + */ + public String azureLocation() { + return this.azureLocation; + } + + /** + * Set the Azure region. + * + * @param azureLocation the azureLocation value to set + * @return the AzureReachabilityReportItem object itself. + */ + public AzureReachabilityReportItem withAzureLocation(String azureLocation) { + this.azureLocation = azureLocation; + return this; + } + + /** + * Get list of latency details for each of the time series. + * + * @return the latencies value + */ + public List latencies() { + return this.latencies; + } + + /** + * Set list of latency details for each of the time series. + * + * @param latencies the latencies value to set + * @return the AzureReachabilityReportItem object itself. + */ + public AzureReachabilityReportItem withLatencies(List latencies) { + this.latencies = latencies; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportLatencyInfo.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportLatencyInfo.java new file mode 100644 index 000000000000..f08df97e847d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportLatencyInfo.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details on latency for a time series. + */ +public class AzureReachabilityReportLatencyInfo { + /** + * The time stamp. + */ + @JsonProperty(value = "timeStamp") + private DateTime timeStamp; + + /** + * The relative latency score between 1 and 100, higher values indicating a + * faster connection. + */ + @JsonProperty(value = "score") + private Integer score; + + /** + * Get the time stamp. + * + * @return the timeStamp value + */ + public DateTime timeStamp() { + return this.timeStamp; + } + + /** + * Set the time stamp. + * + * @param timeStamp the timeStamp value to set + * @return the AzureReachabilityReportLatencyInfo object itself. + */ + public AzureReachabilityReportLatencyInfo withTimeStamp(DateTime timeStamp) { + this.timeStamp = timeStamp; + return this; + } + + /** + * Get the relative latency score between 1 and 100, higher values indicating a faster connection. + * + * @return the score value + */ + public Integer score() { + return this.score; + } + + /** + * Set the relative latency score between 1 and 100, higher values indicating a faster connection. + * + * @param score the score value to set + * @return the AzureReachabilityReportLatencyInfo object itself. + */ + public AzureReachabilityReportLatencyInfo withScore(Integer score) { + this.score = score; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportLocation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportLocation.java new file mode 100644 index 000000000000..86399c6005fd --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportLocation.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define a geographic location. + */ +public class AzureReachabilityReportLocation { + /** + * The name of the country. + */ + @JsonProperty(value = "country", required = true) + private String country; + + /** + * The name of the state. + */ + @JsonProperty(value = "state") + private String state; + + /** + * The name of the city or town. + */ + @JsonProperty(value = "city") + private String city; + + /** + * Get the name of the country. + * + * @return the country value + */ + public String country() { + return this.country; + } + + /** + * Set the name of the country. + * + * @param country the country value to set + * @return the AzureReachabilityReportLocation object itself. + */ + public AzureReachabilityReportLocation withCountry(String country) { + this.country = country; + return this; + } + + /** + * Get the name of the state. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set the name of the state. + * + * @param state the state value to set + * @return the AzureReachabilityReportLocation object itself. + */ + public AzureReachabilityReportLocation withState(String state) { + this.state = state; + return this; + } + + /** + * Get the name of the city or town. + * + * @return the city value + */ + public String city() { + return this.city; + } + + /** + * Set the name of the city or town. + * + * @param city the city value to set + * @return the AzureReachabilityReportLocation object itself. + */ + public AzureReachabilityReportLocation withCity(String city) { + this.city = city; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportParameters.java new file mode 100644 index 000000000000..77c8107490d9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/AzureReachabilityReportParameters.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Geographic and time constraints for Azure reachability report. + */ +public class AzureReachabilityReportParameters { + /** + * Parameters that define a geographic location. + */ + @JsonProperty(value = "providerLocation", required = true) + private AzureReachabilityReportLocation providerLocation; + + /** + * List of Internet service providers. + */ + @JsonProperty(value = "providers") + private List providers; + + /** + * Optional Azure regions to scope the query to. + */ + @JsonProperty(value = "azureLocations") + private List azureLocations; + + /** + * The start time for the Azure reachability report. + */ + @JsonProperty(value = "startTime", required = true) + private DateTime startTime; + + /** + * The end time for the Azure reachability report. + */ + @JsonProperty(value = "endTime", required = true) + private DateTime endTime; + + /** + * Get parameters that define a geographic location. + * + * @return the providerLocation value + */ + public AzureReachabilityReportLocation providerLocation() { + return this.providerLocation; + } + + /** + * Set parameters that define a geographic location. + * + * @param providerLocation the providerLocation value to set + * @return the AzureReachabilityReportParameters object itself. + */ + public AzureReachabilityReportParameters withProviderLocation(AzureReachabilityReportLocation providerLocation) { + this.providerLocation = providerLocation; + return this; + } + + /** + * Get list of Internet service providers. + * + * @return the providers value + */ + public List providers() { + return this.providers; + } + + /** + * Set list of Internet service providers. + * + * @param providers the providers value to set + * @return the AzureReachabilityReportParameters object itself. + */ + public AzureReachabilityReportParameters withProviders(List providers) { + this.providers = providers; + return this; + } + + /** + * Get optional Azure regions to scope the query to. + * + * @return the azureLocations value + */ + public List azureLocations() { + return this.azureLocations; + } + + /** + * Set optional Azure regions to scope the query to. + * + * @param azureLocations the azureLocations value to set + * @return the AzureReachabilityReportParameters object itself. + */ + public AzureReachabilityReportParameters withAzureLocations(List azureLocations) { + this.azureLocations = azureLocations; + return this; + } + + /** + * Get the start time for the Azure reachability report. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the start time for the Azure reachability report. + * + * @param startTime the startTime value to set + * @return the AzureReachabilityReportParameters object itself. + */ + public AzureReachabilityReportParameters withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the end time for the Azure reachability report. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the end time for the Azure reachability report. + * + * @param endTime the endTime value to set + * @return the AzureReachabilityReportParameters object itself. + */ + public AzureReachabilityReportParameters withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BGPCommunity.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BGPCommunity.java new file mode 100644 index 000000000000..c7e92bee11d6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BGPCommunity.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains bgp community information offered in Service Community resources. + */ +public class BGPCommunity { + /** + * The region which the service support. e.g. For O365, region is Global. + */ + @JsonProperty(value = "serviceSupportedRegion") + private String serviceSupportedRegion; + + /** + * The name of the bgp community. e.g. Skype. + */ + @JsonProperty(value = "communityName") + private String communityName; + + /** + * The value of the bgp community. For more information: + * https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. + */ + @JsonProperty(value = "communityValue") + private String communityValue; + + /** + * The prefixes that the bgp community contains. + */ + @JsonProperty(value = "communityPrefixes") + private List communityPrefixes; + + /** + * Customer is authorized to use bgp community or not. + */ + @JsonProperty(value = "isAuthorizedToUse") + private Boolean isAuthorizedToUse; + + /** + * The service group of the bgp community contains. + */ + @JsonProperty(value = "serviceGroup") + private String serviceGroup; + + /** + * Get the region which the service support. e.g. For O365, region is Global. + * + * @return the serviceSupportedRegion value + */ + public String serviceSupportedRegion() { + return this.serviceSupportedRegion; + } + + /** + * Set the region which the service support. e.g. For O365, region is Global. + * + * @param serviceSupportedRegion the serviceSupportedRegion value to set + * @return the BGPCommunity object itself. + */ + public BGPCommunity withServiceSupportedRegion(String serviceSupportedRegion) { + this.serviceSupportedRegion = serviceSupportedRegion; + return this; + } + + /** + * Get the name of the bgp community. e.g. Skype. + * + * @return the communityName value + */ + public String communityName() { + return this.communityName; + } + + /** + * Set the name of the bgp community. e.g. Skype. + * + * @param communityName the communityName value to set + * @return the BGPCommunity object itself. + */ + public BGPCommunity withCommunityName(String communityName) { + this.communityName = communityName; + return this; + } + + /** + * Get the value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. + * + * @return the communityValue value + */ + public String communityValue() { + return this.communityValue; + } + + /** + * Set the value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. + * + * @param communityValue the communityValue value to set + * @return the BGPCommunity object itself. + */ + public BGPCommunity withCommunityValue(String communityValue) { + this.communityValue = communityValue; + return this; + } + + /** + * Get the prefixes that the bgp community contains. + * + * @return the communityPrefixes value + */ + public List communityPrefixes() { + return this.communityPrefixes; + } + + /** + * Set the prefixes that the bgp community contains. + * + * @param communityPrefixes the communityPrefixes value to set + * @return the BGPCommunity object itself. + */ + public BGPCommunity withCommunityPrefixes(List communityPrefixes) { + this.communityPrefixes = communityPrefixes; + return this; + } + + /** + * Get customer is authorized to use bgp community or not. + * + * @return the isAuthorizedToUse value + */ + public Boolean isAuthorizedToUse() { + return this.isAuthorizedToUse; + } + + /** + * Set customer is authorized to use bgp community or not. + * + * @param isAuthorizedToUse the isAuthorizedToUse value to set + * @return the BGPCommunity object itself. + */ + public BGPCommunity withIsAuthorizedToUse(Boolean isAuthorizedToUse) { + this.isAuthorizedToUse = isAuthorizedToUse; + return this; + } + + /** + * Get the service group of the bgp community contains. + * + * @return the serviceGroup value + */ + public String serviceGroup() { + return this.serviceGroup; + } + + /** + * Set the service group of the bgp community contains. + * + * @param serviceGroup the serviceGroup value to set + * @return the BGPCommunity object itself. + */ + public BGPCommunity withServiceGroup(String serviceGroup) { + this.serviceGroup = serviceGroup; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BackendAddressPool.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BackendAddressPool.java new file mode 100644 index 000000000000..fd62a05116ae --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BackendAddressPool.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.BackendAddressPoolInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; + +/** + * Type representing BackendAddressPool. + */ +public interface BackendAddressPool extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the backendIPConfigurations value. + */ + List backendIPConfigurations(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the loadBalancingRules value. + */ + List loadBalancingRules(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the outboundRule value. + */ + SubResource outboundRule(); + + /** + * @return the outboundRules value. + */ + List outboundRules(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionHost.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionHost.java new file mode 100644 index 000000000000..ca1c66b6e4dd --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionHost.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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.BastionHostInner; + +/** + * Type representing BastionHost. + */ +public interface BastionHost extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the dnsName value. + */ + String dnsName(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the ipConfigurations value. + */ + List ipConfigurations(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * The entirety of the BastionHost definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of BastionHost definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a BastionHost definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the BastionHost definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the bastionhost definition allowing to specify DnsName. + */ + interface WithDnsName { + /** + * Specifies dnsName. + * @param dnsName FQDN for the endpoint on which bastion host is accessible + * @return the next definition stage + */ + WithCreate withDnsName(String dnsName); + } + + /** + * The stage of the bastionhost definition allowing to specify IpConfigurations. + */ + interface WithIpConfigurations { + /** + * Specifies ipConfigurations. + * @param ipConfigurations IP configuration of the Bastion Host resource + * @return the next definition stage + */ + WithCreate withIpConfigurations(List ipConfigurations); + } + + /** + * 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.WithDnsName, DefinitionStages.WithIpConfigurations { + } + } + /** + * The template for a BastionHost update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithDnsName, UpdateStages.WithIpConfigurations { + } + + /** + * Grouping of BastionHost update stages. + */ + interface UpdateStages { + /** + * The stage of the bastionhost update allowing to specify DnsName. + */ + interface WithDnsName { + /** + * Specifies dnsName. + * @param dnsName FQDN for the endpoint on which bastion host is accessible + * @return the next update stage + */ + Update withDnsName(String dnsName); + } + + /** + * The stage of the bastionhost update allowing to specify IpConfigurations. + */ + interface WithIpConfigurations { + /** + * Specifies ipConfigurations. + * @param ipConfigurations IP configuration of the Bastion Host resource + * @return the next update stage + */ + Update withIpConfigurations(List ipConfigurations); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionHostIPConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionHostIPConfiguration.java new file mode 100644 index 000000000000..e4fe3172eb56 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionHostIPConfiguration.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * IP configuration of an Bastion Host. + */ +@JsonFlatten +public class BastionHostIPConfiguration extends SubResource { + /** + * Reference of the subnet resource. + */ + @JsonProperty(value = "properties.subnet", required = true) + private SubResource subnet; + + /** + * Reference of the PublicIP resource. + */ + @JsonProperty(value = "properties.publicIPAddress", required = true) + private SubResource publicIPAddress; + + /** + * The provisioning state of the bastion host IP configuration resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Private IP allocation method. Possible values include: 'Static', + * 'Dynamic'. + */ + @JsonProperty(value = "properties.privateIPAllocationMethod") + private IPAllocationMethod privateIPAllocationMethod; + + /** + * Name of the resource that is unique within a resource group. This name + * can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Ip configuration type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get reference of the subnet resource. + * + * @return the subnet value + */ + public SubResource subnet() { + return this.subnet; + } + + /** + * Set reference of the subnet resource. + * + * @param subnet the subnet value to set + * @return the BastionHostIPConfiguration object itself. + */ + public BastionHostIPConfiguration withSubnet(SubResource subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get reference of the PublicIP resource. + * + * @return the publicIPAddress value + */ + public SubResource publicIPAddress() { + return this.publicIPAddress; + } + + /** + * Set reference of the PublicIP resource. + * + * @param publicIPAddress the publicIPAddress value to set + * @return the BastionHostIPConfiguration object itself. + */ + public BastionHostIPConfiguration withPublicIPAddress(SubResource publicIPAddress) { + this.publicIPAddress = publicIPAddress; + return this; + } + + /** + * Get the provisioning state of the bastion host IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get private IP allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @return the privateIPAllocationMethod value + */ + public IPAllocationMethod privateIPAllocationMethod() { + return this.privateIPAllocationMethod; + } + + /** + * Set private IP allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @param privateIPAllocationMethod the privateIPAllocationMethod value to set + * @return the BastionHostIPConfiguration object itself. + */ + public BastionHostIPConfiguration withPrivateIPAllocationMethod(IPAllocationMethod privateIPAllocationMethod) { + this.privateIPAllocationMethod = privateIPAllocationMethod; + return this; + } + + /** + * Get name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the BastionHostIPConfiguration object itself. + */ + public BastionHostIPConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get ip configuration type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionHosts.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionHosts.java new file mode 100644 index 000000000000..9ecf0d91349e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionHosts.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.network.v2019_09_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.network.v2019_09_01.implementation.BastionHostsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing BastionHosts. + */ +public interface BastionHosts extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpPeerState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpPeerState.java new file mode 100644 index 000000000000..bf8d89e4bee8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpPeerState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for BgpPeerState. + */ +public final class BgpPeerState extends ExpandableStringEnum { + /** Static value Unknown for BgpPeerState. */ + public static final BgpPeerState UNKNOWN = fromString("Unknown"); + + /** Static value Stopped for BgpPeerState. */ + public static final BgpPeerState STOPPED = fromString("Stopped"); + + /** Static value Idle for BgpPeerState. */ + public static final BgpPeerState IDLE = fromString("Idle"); + + /** Static value Connecting for BgpPeerState. */ + public static final BgpPeerState CONNECTING = fromString("Connecting"); + + /** Static value Connected for BgpPeerState. */ + public static final BgpPeerState CONNECTED = fromString("Connected"); + + /** + * Creates or finds a BgpPeerState from its string representation. + * @param name a name to look for + * @return the corresponding BgpPeerState + */ + @JsonCreator + public static BgpPeerState fromString(String name) { + return fromString(name, BgpPeerState.class); + } + + /** + * @return known BgpPeerState values + */ + public static Collection values() { + return values(BgpPeerState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpPeerStatus.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpPeerStatus.java new file mode 100644 index 000000000000..3f4f2f74983f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpPeerStatus.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * BGP peer status details. + */ +public class BgpPeerStatus { + /** + * The virtual network gateway's local address. + */ + @JsonProperty(value = "localAddress", access = JsonProperty.Access.WRITE_ONLY) + private String localAddress; + + /** + * The remote BGP peer. + */ + @JsonProperty(value = "neighbor", access = JsonProperty.Access.WRITE_ONLY) + private String neighbor; + + /** + * The autonomous system number of the remote BGP peer. + */ + @JsonProperty(value = "asn", access = JsonProperty.Access.WRITE_ONLY) + private Integer asn; + + /** + * The BGP peer state. Possible values include: 'Unknown', 'Stopped', + * 'Idle', 'Connecting', 'Connected'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private BgpPeerState state; + + /** + * For how long the peering has been up. + */ + @JsonProperty(value = "connectedDuration", access = JsonProperty.Access.WRITE_ONLY) + private String connectedDuration; + + /** + * The number of routes learned from this peer. + */ + @JsonProperty(value = "routesReceived", access = JsonProperty.Access.WRITE_ONLY) + private Long routesReceived; + + /** + * The number of BGP messages sent. + */ + @JsonProperty(value = "messagesSent", access = JsonProperty.Access.WRITE_ONLY) + private Long messagesSent; + + /** + * The number of BGP messages received. + */ + @JsonProperty(value = "messagesReceived", access = JsonProperty.Access.WRITE_ONLY) + private Long messagesReceived; + + /** + * Get the virtual network gateway's local address. + * + * @return the localAddress value + */ + public String localAddress() { + return this.localAddress; + } + + /** + * Get the remote BGP peer. + * + * @return the neighbor value + */ + public String neighbor() { + return this.neighbor; + } + + /** + * Get the autonomous system number of the remote BGP peer. + * + * @return the asn value + */ + public Integer asn() { + return this.asn; + } + + /** + * Get the BGP peer state. Possible values include: 'Unknown', 'Stopped', 'Idle', 'Connecting', 'Connected'. + * + * @return the state value + */ + public BgpPeerState state() { + return this.state; + } + + /** + * Get for how long the peering has been up. + * + * @return the connectedDuration value + */ + public String connectedDuration() { + return this.connectedDuration; + } + + /** + * Get the number of routes learned from this peer. + * + * @return the routesReceived value + */ + public Long routesReceived() { + return this.routesReceived; + } + + /** + * Get the number of BGP messages sent. + * + * @return the messagesSent value + */ + public Long messagesSent() { + return this.messagesSent; + } + + /** + * Get the number of BGP messages received. + * + * @return the messagesReceived value + */ + public Long messagesReceived() { + return this.messagesReceived; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpPeerStatusListResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpPeerStatusListResult.java new file mode 100644 index 000000000000..62ad502fa600 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpPeerStatusListResult.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.BgpPeerStatusListResultInner; +import java.util.List; + +/** + * Type representing BgpPeerStatusListResult. + */ +public interface BgpPeerStatusListResult extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpServiceCommunities.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpServiceCommunities.java new file mode 100644 index 000000000000..a2df59713c29 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpServiceCommunities.java @@ -0,0 +1,19 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.network.v2019_09_01.implementation.BgpServiceCommunitiesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing BgpServiceCommunities. + */ +public interface BgpServiceCommunities extends SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpServiceCommunity.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpServiceCommunity.java new file mode 100644 index 000000000000..94da08e88a23 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpServiceCommunity.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.BgpServiceCommunityInner; + +/** + * Type representing BgpServiceCommunity. + */ +public interface BgpServiceCommunity extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, HasManager { + /** + * @return the bgpCommunities value. + */ + List bgpCommunities(); + + /** + * @return the serviceName value. + */ + String serviceName(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpSettings.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpSettings.java new file mode 100644 index 000000000000..5d939a7b9032 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BgpSettings.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * BGP settings details. + */ +public class BgpSettings { + /** + * The BGP speaker's ASN. + */ + @JsonProperty(value = "asn") + private Long asn; + + /** + * The BGP peering address and BGP identifier of this BGP speaker. + */ + @JsonProperty(value = "bgpPeeringAddress") + private String bgpPeeringAddress; + + /** + * The weight added to routes learned from this BGP speaker. + */ + @JsonProperty(value = "peerWeight") + private Integer peerWeight; + + /** + * Get the BGP speaker's ASN. + * + * @return the asn value + */ + public Long asn() { + return this.asn; + } + + /** + * Set the BGP speaker's ASN. + * + * @param asn the asn value to set + * @return the BgpSettings object itself. + */ + public BgpSettings withAsn(Long asn) { + this.asn = asn; + return this; + } + + /** + * Get the BGP peering address and BGP identifier of this BGP speaker. + * + * @return the bgpPeeringAddress value + */ + public String bgpPeeringAddress() { + return this.bgpPeeringAddress; + } + + /** + * Set the BGP peering address and BGP identifier of this BGP speaker. + * + * @param bgpPeeringAddress the bgpPeeringAddress value to set + * @return the BgpSettings object itself. + */ + public BgpSettings withBgpPeeringAddress(String bgpPeeringAddress) { + this.bgpPeeringAddress = bgpPeeringAddress; + return this; + } + + /** + * Get the weight added to routes learned from this BGP speaker. + * + * @return the peerWeight value + */ + public Integer peerWeight() { + return this.peerWeight; + } + + /** + * Set the weight added to routes learned from this BGP speaker. + * + * @param peerWeight the peerWeight value to set + * @return the BgpSettings object itself. + */ + public BgpSettings withPeerWeight(Integer peerWeight) { + this.peerWeight = peerWeight; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/CheckPrivateLinkServiceVisibilityRequest.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/CheckPrivateLinkServiceVisibilityRequest.java new file mode 100644 index 000000000000..37d0155c8946 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/CheckPrivateLinkServiceVisibilityRequest.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Request body of the CheckPrivateLinkServiceVisibility API service call. + */ +public class CheckPrivateLinkServiceVisibilityRequest { + /** + * The alias of the private link service. + */ + @JsonProperty(value = "privateLinkServiceAlias") + private String privateLinkServiceAlias; + + /** + * Get the alias of the private link service. + * + * @return the privateLinkServiceAlias value + */ + public String privateLinkServiceAlias() { + return this.privateLinkServiceAlias; + } + + /** + * Set the alias of the private link service. + * + * @param privateLinkServiceAlias the privateLinkServiceAlias value to set + * @return the CheckPrivateLinkServiceVisibilityRequest object itself. + */ + public CheckPrivateLinkServiceVisibilityRequest withPrivateLinkServiceAlias(String privateLinkServiceAlias) { + this.privateLinkServiceAlias = privateLinkServiceAlias; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/CircuitConnectionStatus.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/CircuitConnectionStatus.java new file mode 100644 index 000000000000..5a1fe701c556 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/CircuitConnectionStatus.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for CircuitConnectionStatus. + */ +public final class CircuitConnectionStatus extends ExpandableStringEnum { + /** Static value Connected for CircuitConnectionStatus. */ + public static final CircuitConnectionStatus CONNECTED = fromString("Connected"); + + /** Static value Connecting for CircuitConnectionStatus. */ + public static final CircuitConnectionStatus CONNECTING = fromString("Connecting"); + + /** Static value Disconnected for CircuitConnectionStatus. */ + public static final CircuitConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Creates or finds a CircuitConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding CircuitConnectionStatus + */ + @JsonCreator + public static CircuitConnectionStatus fromString(String name) { + return fromString(name, CircuitConnectionStatus.class); + } + + /** + * @return known CircuitConnectionStatus values + */ + public static Collection values() { + return values(CircuitConnectionStatus.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorDestination.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorDestination.java new file mode 100644 index 000000000000..36ec56b8808e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorDestination.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the destination of connection monitor. + */ +public class ConnectionMonitorDestination { + /** + * The ID of the resource used as the destination by connection monitor. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Address of the connection monitor destination (IP or domain name). + */ + @JsonProperty(value = "address") + private String address; + + /** + * The destination port used by connection monitor. + */ + @JsonProperty(value = "port") + private Integer port; + + /** + * Get the ID of the resource used as the destination by connection monitor. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the ID of the resource used as the destination by connection monitor. + * + * @param resourceId the resourceId value to set + * @return the ConnectionMonitorDestination object itself. + */ + public ConnectionMonitorDestination withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get address of the connection monitor destination (IP or domain name). + * + * @return the address value + */ + public String address() { + return this.address; + } + + /** + * Set address of the connection monitor destination (IP or domain name). + * + * @param address the address value to set + * @return the ConnectionMonitorDestination object itself. + */ + public ConnectionMonitorDestination withAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the destination port used by connection monitor. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set the destination port used by connection monitor. + * + * @param port the port value to set + * @return the ConnectionMonitorDestination object itself. + */ + public ConnectionMonitorDestination withPort(Integer port) { + this.port = port; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorParameters.java new file mode 100644 index 000000000000..90b7130e35ff --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorParameters.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the operation to create a connection monitor. + */ +public class ConnectionMonitorParameters { + /** + * Describes the source of connection monitor. + */ + @JsonProperty(value = "source", required = true) + private ConnectionMonitorSource source; + + /** + * Describes the destination of connection monitor. + */ + @JsonProperty(value = "destination", required = true) + private ConnectionMonitorDestination destination; + + /** + * Determines if the connection monitor will start automatically once + * created. + */ + @JsonProperty(value = "autoStart") + private Boolean autoStart; + + /** + * Monitoring interval in seconds. + */ + @JsonProperty(value = "monitoringIntervalInSeconds") + private Integer monitoringIntervalInSeconds; + + /** + * Get describes the source of connection monitor. + * + * @return the source value + */ + public ConnectionMonitorSource source() { + return this.source; + } + + /** + * Set describes the source of connection monitor. + * + * @param source the source value to set + * @return the ConnectionMonitorParameters object itself. + */ + public ConnectionMonitorParameters withSource(ConnectionMonitorSource source) { + this.source = source; + return this; + } + + /** + * Get describes the destination of connection monitor. + * + * @return the destination value + */ + public ConnectionMonitorDestination destination() { + return this.destination; + } + + /** + * Set describes the destination of connection monitor. + * + * @param destination the destination value to set + * @return the ConnectionMonitorParameters object itself. + */ + public ConnectionMonitorParameters withDestination(ConnectionMonitorDestination destination) { + this.destination = destination; + return this; + } + + /** + * Get determines if the connection monitor will start automatically once created. + * + * @return the autoStart value + */ + public Boolean autoStart() { + return this.autoStart; + } + + /** + * Set determines if the connection monitor will start automatically once created. + * + * @param autoStart the autoStart value to set + * @return the ConnectionMonitorParameters object itself. + */ + public ConnectionMonitorParameters withAutoStart(Boolean autoStart) { + this.autoStart = autoStart; + return this; + } + + /** + * Get monitoring interval in seconds. + * + * @return the monitoringIntervalInSeconds value + */ + public Integer monitoringIntervalInSeconds() { + return this.monitoringIntervalInSeconds; + } + + /** + * Set monitoring interval in seconds. + * + * @param monitoringIntervalInSeconds the monitoringIntervalInSeconds value to set + * @return the ConnectionMonitorParameters object itself. + */ + public ConnectionMonitorParameters withMonitoringIntervalInSeconds(Integer monitoringIntervalInSeconds) { + this.monitoringIntervalInSeconds = monitoringIntervalInSeconds; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorQueryResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorQueryResult.java new file mode 100644 index 000000000000..371bc1eb3b69 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorQueryResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ConnectionMonitorQueryResultInner; +import java.util.List; + +/** + * Type representing ConnectionMonitorQueryResult. + */ +public interface ConnectionMonitorQueryResult extends HasInner, HasManager { + /** + * @return the sourceStatus value. + */ + ConnectionMonitorSourceStatus sourceStatus(); + + /** + * @return the states value. + */ + List states(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorResult.java new file mode 100644 index 000000000000..cd0c3fe23d78 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorResult.java @@ -0,0 +1,260 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ConnectionMonitorResultInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.Map; +import org.joda.time.DateTime; + +/** + * Type representing ConnectionMonitorResult. + */ +public interface ConnectionMonitorResult extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the autoStart value. + */ + Boolean autoStart(); + + /** + * @return the destination value. + */ + ConnectionMonitorDestination destination(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the monitoringIntervalInSeconds value. + */ + Integer monitoringIntervalInSeconds(); + + /** + * @return the monitoringStatus value. + */ + String monitoringStatus(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the source value. + */ + ConnectionMonitorSource source(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ConnectionMonitorResult definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNetworkWatcher, DefinitionStages.WithDestination, DefinitionStages.WithSource, DefinitionStages.WithCreate { + } + + /** + * Grouping of ConnectionMonitorResult definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ConnectionMonitorResult definition. + */ + interface Blank extends WithNetworkWatcher { + } + + /** + * The stage of the connectionmonitorresult definition allowing to specify NetworkWatcher. + */ + interface WithNetworkWatcher { + /** + * Specifies resourceGroupName, networkWatcherName. + * @param resourceGroupName The name of the resource group containing Network Watcher + * @param networkWatcherName The name of the Network Watcher resource + * @return the next definition stage + */ + WithDestination withExistingNetworkWatcher(String resourceGroupName, String networkWatcherName); + } + + /** + * The stage of the connectionmonitorresult definition allowing to specify Destination. + */ + interface WithDestination { + /** + * Specifies destination. + * @param destination Describes the destination of connection monitor + * @return the next definition stage + */ + WithSource withDestination(ConnectionMonitorDestination destination); + } + + /** + * The stage of the connectionmonitorresult definition allowing to specify Source. + */ + interface WithSource { + /** + * Specifies source. + * @param source Describes the source of connection monitor + * @return the next definition stage + */ + WithCreate withSource(ConnectionMonitorSource source); + } + + /** + * The stage of the connectionmonitorresult definition allowing to specify AutoStart. + */ + interface WithAutoStart { + /** + * Specifies autoStart. + * @param autoStart Determines if the connection monitor will start automatically once created + * @return the next definition stage + */ + WithCreate withAutoStart(Boolean autoStart); + } + + /** + * The stage of the connectionmonitorresult definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Connection monitor location + * @return the next definition stage + */ + WithCreate withLocation(String location); + } + + /** + * The stage of the connectionmonitorresult definition allowing to specify MonitoringIntervalInSeconds. + */ + interface WithMonitoringIntervalInSeconds { + /** + * Specifies monitoringIntervalInSeconds. + * @param monitoringIntervalInSeconds Monitoring interval in seconds + * @return the next definition stage + */ + WithCreate withMonitoringIntervalInSeconds(Integer monitoringIntervalInSeconds); + } + + /** + * The stage of the connectionmonitorresult definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Connection monitor tags + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * 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.WithAutoStart, DefinitionStages.WithLocation, DefinitionStages.WithMonitoringIntervalInSeconds, DefinitionStages.WithTags { + } + } + /** + * The template for a ConnectionMonitorResult update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAutoStart, UpdateStages.WithLocation, UpdateStages.WithMonitoringIntervalInSeconds, UpdateStages.WithTags { + } + + /** + * Grouping of ConnectionMonitorResult update stages. + */ + interface UpdateStages { + /** + * The stage of the connectionmonitorresult update allowing to specify AutoStart. + */ + interface WithAutoStart { + /** + * Specifies autoStart. + * @param autoStart Determines if the connection monitor will start automatically once created + * @return the next update stage + */ + Update withAutoStart(Boolean autoStart); + } + + /** + * The stage of the connectionmonitorresult update allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Connection monitor location + * @return the next update stage + */ + Update withLocation(String location); + } + + /** + * The stage of the connectionmonitorresult update allowing to specify MonitoringIntervalInSeconds. + */ + interface WithMonitoringIntervalInSeconds { + /** + * Specifies monitoringIntervalInSeconds. + * @param monitoringIntervalInSeconds Monitoring interval in seconds + * @return the next update stage + */ + Update withMonitoringIntervalInSeconds(Integer monitoringIntervalInSeconds); + } + + /** + * The stage of the connectionmonitorresult update allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Connection monitor tags + * @return the next update stage + */ + Update withTags(Map tags); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorSource.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorSource.java new file mode 100644 index 000000000000..4a90606e2c43 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorSource.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the source of connection monitor. + */ +public class ConnectionMonitorSource { + /** + * The ID of the resource used as the source by connection monitor. + */ + @JsonProperty(value = "resourceId", required = true) + private String resourceId; + + /** + * The source port used by connection monitor. + */ + @JsonProperty(value = "port") + private Integer port; + + /** + * Get the ID of the resource used as the source by connection monitor. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the ID of the resource used as the source by connection monitor. + * + * @param resourceId the resourceId value to set + * @return the ConnectionMonitorSource object itself. + */ + public ConnectionMonitorSource withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the source port used by connection monitor. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set the source port used by connection monitor. + * + * @param port the port value to set + * @return the ConnectionMonitorSource object itself. + */ + public ConnectionMonitorSource withPort(Integer port) { + this.port = port; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorSourceStatus.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorSourceStatus.java new file mode 100644 index 000000000000..f05bb15d367f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitorSourceStatus.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ConnectionMonitorSourceStatus. + */ +public final class ConnectionMonitorSourceStatus extends ExpandableStringEnum { + /** Static value Unknown for ConnectionMonitorSourceStatus. */ + public static final ConnectionMonitorSourceStatus UNKNOWN = fromString("Unknown"); + + /** Static value Active for ConnectionMonitorSourceStatus. */ + public static final ConnectionMonitorSourceStatus ACTIVE = fromString("Active"); + + /** Static value Inactive for ConnectionMonitorSourceStatus. */ + public static final ConnectionMonitorSourceStatus INACTIVE = fromString("Inactive"); + + /** + * Creates or finds a ConnectionMonitorSourceStatus from its string representation. + * @param name a name to look for + * @return the corresponding ConnectionMonitorSourceStatus + */ + @JsonCreator + public static ConnectionMonitorSourceStatus fromString(String name) { + return fromString(name, ConnectionMonitorSourceStatus.class); + } + + /** + * @return known ConnectionMonitorSourceStatus values + */ + public static Collection values() { + return values(ConnectionMonitorSourceStatus.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitors.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitors.java new file mode 100644 index 000000000000..80faf4b361bf --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionMonitors.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ConnectionMonitorsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ConnectionMonitors. + */ +public interface ConnectionMonitors extends SupportsCreating, HasInner { + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable stopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName); + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable startAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName); + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable queryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName); + + /** + * Gets a connection monitor by name. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName); + + /** + * Lists all connection monitors for the specified Network Watcher. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String networkWatcherName); + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionResetSharedKey.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionResetSharedKey.java new file mode 100644 index 000000000000..f42989cba171 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionResetSharedKey.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ConnectionResetSharedKeyInner; + +/** + * Type representing ConnectionResetSharedKey. + */ +public interface ConnectionResetSharedKey extends HasInner, HasManager { + /** + * @return the keyLength value. + */ + int keyLength(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionSharedKey.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionSharedKey.java new file mode 100644 index 000000000000..e0e606959b52 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionSharedKey.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ConnectionSharedKeyInner; + +/** + * Type representing ConnectionSharedKey. + */ +public interface ConnectionSharedKey extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the value value. + */ + String value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionState.java new file mode 100644 index 000000000000..84bb35c20d09 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ConnectionState. + */ +public final class ConnectionState extends ExpandableStringEnum { + /** Static value Reachable for ConnectionState. */ + public static final ConnectionState REACHABLE = fromString("Reachable"); + + /** Static value Unreachable for ConnectionState. */ + public static final ConnectionState UNREACHABLE = fromString("Unreachable"); + + /** Static value Unknown for ConnectionState. */ + public static final ConnectionState UNKNOWN = fromString("Unknown"); + + /** + * Creates or finds a ConnectionState from its string representation. + * @param name a name to look for + * @return the corresponding ConnectionState + */ + @JsonCreator + public static ConnectionState fromString(String name) { + return fromString(name, ConnectionState.class); + } + + /** + * @return known ConnectionState values + */ + public static Collection values() { + return values(ConnectionState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionStateSnapshot.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionStateSnapshot.java new file mode 100644 index 000000000000..bcb45fcadc62 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionStateSnapshot.java @@ -0,0 +1,270 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Connection state snapshot. + */ +public class ConnectionStateSnapshot { + /** + * The connection state. Possible values include: 'Reachable', + * 'Unreachable', 'Unknown'. + */ + @JsonProperty(value = "connectionState") + private ConnectionState connectionState; + + /** + * The start time of the connection snapshot. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * The end time of the connection snapshot. + */ + @JsonProperty(value = "endTime") + private DateTime endTime; + + /** + * Connectivity analysis evaluation state. Possible values include: + * 'NotStarted', 'InProgress', 'Completed'. + */ + @JsonProperty(value = "evaluationState") + private EvaluationState evaluationState; + + /** + * Average latency in ms. + */ + @JsonProperty(value = "avgLatencyInMs") + private Integer avgLatencyInMs; + + /** + * Minimum latency in ms. + */ + @JsonProperty(value = "minLatencyInMs") + private Integer minLatencyInMs; + + /** + * Maximum latency in ms. + */ + @JsonProperty(value = "maxLatencyInMs") + private Integer maxLatencyInMs; + + /** + * The number of sent probes. + */ + @JsonProperty(value = "probesSent") + private Integer probesSent; + + /** + * The number of failed probes. + */ + @JsonProperty(value = "probesFailed") + private Integer probesFailed; + + /** + * List of hops between the source and the destination. + */ + @JsonProperty(value = "hops", access = JsonProperty.Access.WRITE_ONLY) + private List hops; + + /** + * Get the connection state. Possible values include: 'Reachable', 'Unreachable', 'Unknown'. + * + * @return the connectionState value + */ + public ConnectionState connectionState() { + return this.connectionState; + } + + /** + * Set the connection state. Possible values include: 'Reachable', 'Unreachable', 'Unknown'. + * + * @param connectionState the connectionState value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withConnectionState(ConnectionState connectionState) { + this.connectionState = connectionState; + return this; + } + + /** + * Get the start time of the connection snapshot. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the start time of the connection snapshot. + * + * @param startTime the startTime value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the end time of the connection snapshot. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the end time of the connection snapshot. + * + * @param endTime the endTime value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'. + * + * @return the evaluationState value + */ + public EvaluationState evaluationState() { + return this.evaluationState; + } + + /** + * Set connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'. + * + * @param evaluationState the evaluationState value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withEvaluationState(EvaluationState evaluationState) { + this.evaluationState = evaluationState; + return this; + } + + /** + * Get average latency in ms. + * + * @return the avgLatencyInMs value + */ + public Integer avgLatencyInMs() { + return this.avgLatencyInMs; + } + + /** + * Set average latency in ms. + * + * @param avgLatencyInMs the avgLatencyInMs value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withAvgLatencyInMs(Integer avgLatencyInMs) { + this.avgLatencyInMs = avgLatencyInMs; + return this; + } + + /** + * Get minimum latency in ms. + * + * @return the minLatencyInMs value + */ + public Integer minLatencyInMs() { + return this.minLatencyInMs; + } + + /** + * Set minimum latency in ms. + * + * @param minLatencyInMs the minLatencyInMs value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withMinLatencyInMs(Integer minLatencyInMs) { + this.minLatencyInMs = minLatencyInMs; + return this; + } + + /** + * Get maximum latency in ms. + * + * @return the maxLatencyInMs value + */ + public Integer maxLatencyInMs() { + return this.maxLatencyInMs; + } + + /** + * Set maximum latency in ms. + * + * @param maxLatencyInMs the maxLatencyInMs value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withMaxLatencyInMs(Integer maxLatencyInMs) { + this.maxLatencyInMs = maxLatencyInMs; + return this; + } + + /** + * Get the number of sent probes. + * + * @return the probesSent value + */ + public Integer probesSent() { + return this.probesSent; + } + + /** + * Set the number of sent probes. + * + * @param probesSent the probesSent value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withProbesSent(Integer probesSent) { + this.probesSent = probesSent; + return this; + } + + /** + * Get the number of failed probes. + * + * @return the probesFailed value + */ + public Integer probesFailed() { + return this.probesFailed; + } + + /** + * Set the number of failed probes. + * + * @param probesFailed the probesFailed value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withProbesFailed(Integer probesFailed) { + this.probesFailed = probesFailed; + return this; + } + + /** + * Get list of hops between the source and the destination. + * + * @return the hops value + */ + public List hops() { + return this.hops; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionStatus.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionStatus.java new file mode 100644 index 000000000000..526fb65248b7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectionStatus.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ConnectionStatus. + */ +public final class ConnectionStatus extends ExpandableStringEnum { + /** Static value Unknown for ConnectionStatus. */ + public static final ConnectionStatus UNKNOWN = fromString("Unknown"); + + /** Static value Connected for ConnectionStatus. */ + public static final ConnectionStatus CONNECTED = fromString("Connected"); + + /** Static value Disconnected for ConnectionStatus. */ + public static final ConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** Static value Degraded for ConnectionStatus. */ + public static final ConnectionStatus DEGRADED = fromString("Degraded"); + + /** + * Creates or finds a ConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding ConnectionStatus + */ + @JsonCreator + public static ConnectionStatus fromString(String name) { + return fromString(name, ConnectionStatus.class); + } + + /** + * @return known ConnectionStatus values + */ + public static Collection values() { + return values(ConnectionStatus.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityDestination.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityDestination.java new file mode 100644 index 000000000000..280164970e0c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityDestination.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define destination of connection. + */ +public class ConnectivityDestination { + /** + * The ID of the resource to which a connection attempt will be made. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * The IP address or URI the resource to which a connection attempt will be + * made. + */ + @JsonProperty(value = "address") + private String address; + + /** + * Port on which check connectivity will be performed. + */ + @JsonProperty(value = "port") + private Integer port; + + /** + * Get the ID of the resource to which a connection attempt will be made. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the ID of the resource to which a connection attempt will be made. + * + * @param resourceId the resourceId value to set + * @return the ConnectivityDestination object itself. + */ + public ConnectivityDestination withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the IP address or URI the resource to which a connection attempt will be made. + * + * @return the address value + */ + public String address() { + return this.address; + } + + /** + * Set the IP address or URI the resource to which a connection attempt will be made. + * + * @param address the address value to set + * @return the ConnectivityDestination object itself. + */ + public ConnectivityDestination withAddress(String address) { + this.address = address; + return this; + } + + /** + * Get port on which check connectivity will be performed. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set port on which check connectivity will be performed. + * + * @param port the port value to set + * @return the ConnectivityDestination object itself. + */ + public ConnectivityDestination withPort(Integer port) { + this.port = port; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityHop.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityHop.java new file mode 100644 index 000000000000..2b5b7011c575 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityHop.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about a hop between the source and the destination. + */ +public class ConnectivityHop { + /** + * The type of the hop. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * The ID of the hop. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * The IP address of the hop. + */ + @JsonProperty(value = "address", access = JsonProperty.Access.WRITE_ONLY) + private String address; + + /** + * The ID of the resource corresponding to this hop. + */ + @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY) + private String resourceId; + + /** + * List of next hop identifiers. + */ + @JsonProperty(value = "nextHopIds", access = JsonProperty.Access.WRITE_ONLY) + private List nextHopIds; + + /** + * List of issues. + */ + @JsonProperty(value = "issues", access = JsonProperty.Access.WRITE_ONLY) + private List issues; + + /** + * Get the type of the hop. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get the ID of the hop. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get the IP address of the hop. + * + * @return the address value + */ + public String address() { + return this.address; + } + + /** + * Get the ID of the resource corresponding to this hop. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get list of next hop identifiers. + * + * @return the nextHopIds value + */ + public List nextHopIds() { + return this.nextHopIds; + } + + /** + * Get list of issues. + * + * @return the issues value + */ + public List issues() { + return this.issues; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityInformation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityInformation.java new file mode 100644 index 000000000000..96b0f12d8f2f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityInformation.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ConnectivityInformationInner; +import java.util.List; + +/** + * Type representing ConnectivityInformation. + */ +public interface ConnectivityInformation extends HasInner, HasManager { + /** + * @return the avgLatencyInMs value. + */ + Integer avgLatencyInMs(); + + /** + * @return the connectionStatus value. + */ + ConnectionStatus connectionStatus(); + + /** + * @return the hops value. + */ + List hops(); + + /** + * @return the maxLatencyInMs value. + */ + Integer maxLatencyInMs(); + + /** + * @return the minLatencyInMs value. + */ + Integer minLatencyInMs(); + + /** + * @return the probesFailed value. + */ + Integer probesFailed(); + + /** + * @return the probesSent value. + */ + Integer probesSent(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityIssue.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityIssue.java new file mode 100644 index 000000000000..fb6ac195e75e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityIssue.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about an issue encountered in the process of checking for + * connectivity. + */ +public class ConnectivityIssue { + /** + * The origin of the issue. Possible values include: 'Local', 'Inbound', + * 'Outbound'. + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private Origin origin; + + /** + * The severity of the issue. Possible values include: 'Error', 'Warning'. + */ + @JsonProperty(value = "severity", access = JsonProperty.Access.WRITE_ONLY) + private Severity severity; + + /** + * The type of issue. Possible values include: 'Unknown', 'AgentStopped', + * 'GuestFirewall', 'DnsResolution', 'SocketBind', 'NetworkSecurityRule', + * 'UserDefinedRoute', 'PortThrottled', 'Platform'. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private IssueType type; + + /** + * Provides additional context on the issue. + */ + @JsonProperty(value = "context", access = JsonProperty.Access.WRITE_ONLY) + private List> context; + + /** + * Get the origin of the issue. Possible values include: 'Local', 'Inbound', 'Outbound'. + * + * @return the origin value + */ + public Origin origin() { + return this.origin; + } + + /** + * Get the severity of the issue. Possible values include: 'Error', 'Warning'. + * + * @return the severity value + */ + public Severity severity() { + return this.severity; + } + + /** + * Get the type of issue. Possible values include: 'Unknown', 'AgentStopped', 'GuestFirewall', 'DnsResolution', 'SocketBind', 'NetworkSecurityRule', 'UserDefinedRoute', 'PortThrottled', 'Platform'. + * + * @return the type value + */ + public IssueType type() { + return this.type; + } + + /** + * Get provides additional context on the issue. + * + * @return the context value + */ + public List> context() { + return this.context; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityParameters.java new file mode 100644 index 000000000000..f1d30ab1919b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityParameters.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that determine how the connectivity check will be performed. + */ +public class ConnectivityParameters { + /** + * Describes the source of the connection. + */ + @JsonProperty(value = "source", required = true) + private ConnectivitySource source; + + /** + * Describes the destination of connection. + */ + @JsonProperty(value = "destination", required = true) + private ConnectivityDestination destination; + + /** + * Network protocol. Possible values include: 'Tcp', 'Http', 'Https', + * 'Icmp'. + */ + @JsonProperty(value = "protocol") + private Protocol protocol; + + /** + * Configuration of the protocol. + */ + @JsonProperty(value = "protocolConfiguration") + private ProtocolConfiguration protocolConfiguration; + + /** + * Get describes the source of the connection. + * + * @return the source value + */ + public ConnectivitySource source() { + return this.source; + } + + /** + * Set describes the source of the connection. + * + * @param source the source value to set + * @return the ConnectivityParameters object itself. + */ + public ConnectivityParameters withSource(ConnectivitySource source) { + this.source = source; + return this; + } + + /** + * Get describes the destination of connection. + * + * @return the destination value + */ + public ConnectivityDestination destination() { + return this.destination; + } + + /** + * Set describes the destination of connection. + * + * @param destination the destination value to set + * @return the ConnectivityParameters object itself. + */ + public ConnectivityParameters withDestination(ConnectivityDestination destination) { + this.destination = destination; + return this; + } + + /** + * Get network protocol. Possible values include: 'Tcp', 'Http', 'Https', 'Icmp'. + * + * @return the protocol value + */ + public Protocol protocol() { + return this.protocol; + } + + /** + * Set network protocol. Possible values include: 'Tcp', 'Http', 'Https', 'Icmp'. + * + * @param protocol the protocol value to set + * @return the ConnectivityParameters object itself. + */ + public ConnectivityParameters withProtocol(Protocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get configuration of the protocol. + * + * @return the protocolConfiguration value + */ + public ProtocolConfiguration protocolConfiguration() { + return this.protocolConfiguration; + } + + /** + * Set configuration of the protocol. + * + * @param protocolConfiguration the protocolConfiguration value to set + * @return the ConnectivityParameters object itself. + */ + public ConnectivityParameters withProtocolConfiguration(ProtocolConfiguration protocolConfiguration) { + this.protocolConfiguration = protocolConfiguration; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivitySource.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivitySource.java new file mode 100644 index 000000000000..6969884c2ccb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivitySource.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the source of the connection. + */ +public class ConnectivitySource { + /** + * The ID of the resource from which a connectivity check will be + * initiated. + */ + @JsonProperty(value = "resourceId", required = true) + private String resourceId; + + /** + * The source port from which a connectivity check will be performed. + */ + @JsonProperty(value = "port") + private Integer port; + + /** + * Get the ID of the resource from which a connectivity check will be initiated. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the ID of the resource from which a connectivity check will be initiated. + * + * @param resourceId the resourceId value to set + * @return the ConnectivitySource object itself. + */ + public ConnectivitySource withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the source port from which a connectivity check will be performed. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set the source port from which a connectivity check will be performed. + * + * @param port the port value to set + * @return the ConnectivitySource object itself. + */ + public ConnectivitySource withPort(Integer port) { + this.port = port; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Container.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Container.java new file mode 100644 index 000000000000..ddb220b1c6ed --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Container.java @@ -0,0 +1,17 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; + +/** + * Reference to container resource in remote resource provider. + */ +public class Container extends SubResource { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ContainerNetworkInterface.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ContainerNetworkInterface.java new file mode 100644 index 000000000000..acc427f89473 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ContainerNetworkInterface.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Container network interface child resource. + */ +@JsonFlatten +public class ContainerNetworkInterface extends SubResource { + /** + * Container network interface configuration from which this container + * network interface is created. + */ + @JsonProperty(value = "properties.containerNetworkInterfaceConfiguration", access = JsonProperty.Access.WRITE_ONLY) + private ContainerNetworkInterfaceConfiguration containerNetworkInterfaceConfiguration; + + /** + * Reference to the container to which this container network interface is + * attached. + */ + @JsonProperty(value = "properties.container") + private Container container; + + /** + * Reference to the ip configuration on this container nic. + */ + @JsonProperty(value = "properties.ipConfigurations", access = JsonProperty.Access.WRITE_ONLY) + private List ipConfigurations; + + /** + * The provisioning state of the container network interface resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource. This name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Sub Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get container network interface configuration from which this container network interface is created. + * + * @return the containerNetworkInterfaceConfiguration value + */ + public ContainerNetworkInterfaceConfiguration containerNetworkInterfaceConfiguration() { + return this.containerNetworkInterfaceConfiguration; + } + + /** + * Get reference to the container to which this container network interface is attached. + * + * @return the container value + */ + public Container container() { + return this.container; + } + + /** + * Set reference to the container to which this container network interface is attached. + * + * @param container the container value to set + * @return the ContainerNetworkInterface object itself. + */ + public ContainerNetworkInterface withContainer(Container container) { + this.container = container; + return this; + } + + /** + * Get reference to the ip configuration on this container nic. + * + * @return the ipConfigurations value + */ + public List ipConfigurations() { + return this.ipConfigurations; + } + + /** + * Get the provisioning state of the container network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource. This name can be used to access the resource. + * + * @param name the name value to set + * @return the ContainerNetworkInterface object itself. + */ + public ContainerNetworkInterface withName(String name) { + this.name = name; + return this; + } + + /** + * Get sub Resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ContainerNetworkInterfaceConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ContainerNetworkInterfaceConfiguration.java new file mode 100644 index 000000000000..c802a99b0453 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ContainerNetworkInterfaceConfiguration.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.network.v2019_09_01; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Container network interface configuration child resource. + */ +@JsonFlatten +public class ContainerNetworkInterfaceConfiguration extends SubResource { + /** + * A list of ip configurations of the container network interface + * configuration. + */ + @JsonProperty(value = "properties.ipConfigurations") + private List ipConfigurations; + + /** + * A list of container network interfaces created from this container + * network interface configuration. + */ + @JsonProperty(value = "properties.containerNetworkInterfaces") + private List containerNetworkInterfaces; + + /** + * The provisioning state of the container network interface configuration + * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', + * 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource. This name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Sub Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get a list of ip configurations of the container network interface configuration. + * + * @return the ipConfigurations value + */ + public List ipConfigurations() { + return this.ipConfigurations; + } + + /** + * Set a list of ip configurations of the container network interface configuration. + * + * @param ipConfigurations the ipConfigurations value to set + * @return the ContainerNetworkInterfaceConfiguration object itself. + */ + public ContainerNetworkInterfaceConfiguration withIpConfigurations(List ipConfigurations) { + this.ipConfigurations = ipConfigurations; + return this; + } + + /** + * Get a list of container network interfaces created from this container network interface configuration. + * + * @return the containerNetworkInterfaces value + */ + public List containerNetworkInterfaces() { + return this.containerNetworkInterfaces; + } + + /** + * Set a list of container network interfaces created from this container network interface configuration. + * + * @param containerNetworkInterfaces the containerNetworkInterfaces value to set + * @return the ContainerNetworkInterfaceConfiguration object itself. + */ + public ContainerNetworkInterfaceConfiguration withContainerNetworkInterfaces(List containerNetworkInterfaces) { + this.containerNetworkInterfaces = containerNetworkInterfaces; + return this; + } + + /** + * Get the provisioning state of the container network interface configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource. This name can be used to access the resource. + * + * @param name the name value to set + * @return the ContainerNetworkInterfaceConfiguration object itself. + */ + public ContainerNetworkInterfaceConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get sub Resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ContainerNetworkInterfaceIpConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ContainerNetworkInterfaceIpConfiguration.java new file mode 100644 index 000000000000..62179f0699f4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ContainerNetworkInterfaceIpConfiguration.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The ip configuration for a container network interface. + */ +@JsonFlatten +public class ContainerNetworkInterfaceIpConfiguration { + /** + * The provisioning state of the container network interface IP + * configuration resource. Possible values include: 'Succeeded', + * 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource. This name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Sub Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the provisioning state of the container network interface IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource. This name can be used to access the resource. + * + * @param name the name value to set + * @return the ContainerNetworkInterfaceIpConfiguration object itself. + */ + public ContainerNetworkInterfaceIpConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get sub Resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicies.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicies.java new file mode 100644 index 000000000000..fa196e615734 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicies.java @@ -0,0 +1,23 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.management.network.v2019_09_01.implementation.DdosCustomPoliciesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DdosCustomPolicies. + */ +public interface DdosCustomPolicies extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicy.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicy.java new file mode 100644 index 000000000000..8ada79434a4d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicy.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.DdosCustomPolicyInner; + +/** + * Type representing DdosCustomPolicy. + */ +public interface DdosCustomPolicy extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the protocolCustomSettings value. + */ + List protocolCustomSettings(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the publicIPAddresses value. + */ + List publicIPAddresses(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * The entirety of the DdosCustomPolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of DdosCustomPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DdosCustomPolicy definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the DdosCustomPolicy definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the ddoscustompolicy definition allowing to specify ProtocolCustomSettings. + */ + interface WithProtocolCustomSettings { + /** + * Specifies protocolCustomSettings. + * @param protocolCustomSettings The protocol-specific DDoS policy customization parameters + * @return the next definition stage + */ + WithCreate withProtocolCustomSettings(List protocolCustomSettings); + } + + /** + * 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.WithProtocolCustomSettings { + } + } + /** + * The template for a DdosCustomPolicy update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithProtocolCustomSettings { + } + + /** + * Grouping of DdosCustomPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the ddoscustompolicy update allowing to specify ProtocolCustomSettings. + */ + interface WithProtocolCustomSettings { + /** + * Specifies protocolCustomSettings. + * @param protocolCustomSettings The protocol-specific DDoS policy customization parameters + * @return the next update stage + */ + Update withProtocolCustomSettings(List protocolCustomSettings); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicyProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicyProtocol.java new file mode 100644 index 000000000000..d7981f2b474c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicyProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DdosCustomPolicyProtocol. + */ +public final class DdosCustomPolicyProtocol extends ExpandableStringEnum { + /** Static value Tcp for DdosCustomPolicyProtocol. */ + public static final DdosCustomPolicyProtocol TCP = fromString("Tcp"); + + /** Static value Udp for DdosCustomPolicyProtocol. */ + public static final DdosCustomPolicyProtocol UDP = fromString("Udp"); + + /** Static value Syn for DdosCustomPolicyProtocol. */ + public static final DdosCustomPolicyProtocol SYN = fromString("Syn"); + + /** + * Creates or finds a DdosCustomPolicyProtocol from its string representation. + * @param name a name to look for + * @return the corresponding DdosCustomPolicyProtocol + */ + @JsonCreator + public static DdosCustomPolicyProtocol fromString(String name) { + return fromString(name, DdosCustomPolicyProtocol.class); + } + + /** + * @return known DdosCustomPolicyProtocol values + */ + public static Collection values() { + return values(DdosCustomPolicyProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicyTriggerSensitivityOverride.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicyTriggerSensitivityOverride.java new file mode 100644 index 000000000000..df2a873f8c4d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosCustomPolicyTriggerSensitivityOverride.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DdosCustomPolicyTriggerSensitivityOverride. + */ +public final class DdosCustomPolicyTriggerSensitivityOverride extends ExpandableStringEnum { + /** Static value Relaxed for DdosCustomPolicyTriggerSensitivityOverride. */ + public static final DdosCustomPolicyTriggerSensitivityOverride RELAXED = fromString("Relaxed"); + + /** Static value Low for DdosCustomPolicyTriggerSensitivityOverride. */ + public static final DdosCustomPolicyTriggerSensitivityOverride LOW = fromString("Low"); + + /** Static value Default for DdosCustomPolicyTriggerSensitivityOverride. */ + public static final DdosCustomPolicyTriggerSensitivityOverride DEFAULT = fromString("Default"); + + /** Static value High for DdosCustomPolicyTriggerSensitivityOverride. */ + public static final DdosCustomPolicyTriggerSensitivityOverride HIGH = fromString("High"); + + /** + * Creates or finds a DdosCustomPolicyTriggerSensitivityOverride from its string representation. + * @param name a name to look for + * @return the corresponding DdosCustomPolicyTriggerSensitivityOverride + */ + @JsonCreator + public static DdosCustomPolicyTriggerSensitivityOverride fromString(String name) { + return fromString(name, DdosCustomPolicyTriggerSensitivityOverride.class); + } + + /** + * @return known DdosCustomPolicyTriggerSensitivityOverride values + */ + public static Collection values() { + return values(DdosCustomPolicyTriggerSensitivityOverride.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosProtectionPlan.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosProtectionPlan.java new file mode 100644 index 000000000000..e3beb22b035d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosProtectionPlan.java @@ -0,0 +1,90 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.DdosProtectionPlanInner; + +/** + * Type representing DdosProtectionPlan. + */ +public interface DdosProtectionPlan extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the virtualNetworks value. + */ + List virtualNetworks(); + + /** + * The entirety of the DdosProtectionPlan definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of DdosProtectionPlan definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DdosProtectionPlan definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the DdosProtectionPlan definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * 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 { + } + } + /** + * The template for a DdosProtectionPlan update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags { + } + + /** + * Grouping of DdosProtectionPlan update stages. + */ + interface UpdateStages { + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosProtectionPlans.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosProtectionPlans.java new file mode 100644 index 000000000000..f5fb50c0d285 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosProtectionPlans.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.network.v2019_09_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.network.v2019_09_01.implementation.DdosProtectionPlansInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DdosProtectionPlans. + */ +public interface DdosProtectionPlans extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosSettings.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosSettings.java new file mode 100644 index 000000000000..0e3f13b62152 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosSettings.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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains the DDoS protection settings of the public IP. + */ +public class DdosSettings { + /** + * The DDoS custom policy associated with the public IP. + */ + @JsonProperty(value = "ddosCustomPolicy") + private SubResource ddosCustomPolicy; + + /** + * The DDoS protection policy customizability of the public IP. Only + * standard coverage will have the ability to be customized. Possible + * values include: 'Basic', 'Standard'. + */ + @JsonProperty(value = "protectionCoverage") + private DdosSettingsProtectionCoverage protectionCoverage; + + /** + * Get the DDoS custom policy associated with the public IP. + * + * @return the ddosCustomPolicy value + */ + public SubResource ddosCustomPolicy() { + return this.ddosCustomPolicy; + } + + /** + * Set the DDoS custom policy associated with the public IP. + * + * @param ddosCustomPolicy the ddosCustomPolicy value to set + * @return the DdosSettings object itself. + */ + public DdosSettings withDdosCustomPolicy(SubResource ddosCustomPolicy) { + this.ddosCustomPolicy = ddosCustomPolicy; + return this; + } + + /** + * Get the DDoS protection policy customizability of the public IP. Only standard coverage will have the ability to be customized. Possible values include: 'Basic', 'Standard'. + * + * @return the protectionCoverage value + */ + public DdosSettingsProtectionCoverage protectionCoverage() { + return this.protectionCoverage; + } + + /** + * Set the DDoS protection policy customizability of the public IP. Only standard coverage will have the ability to be customized. Possible values include: 'Basic', 'Standard'. + * + * @param protectionCoverage the protectionCoverage value to set + * @return the DdosSettings object itself. + */ + public DdosSettings withProtectionCoverage(DdosSettingsProtectionCoverage protectionCoverage) { + this.protectionCoverage = protectionCoverage; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosSettingsProtectionCoverage.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosSettingsProtectionCoverage.java new file mode 100644 index 000000000000..9b837617d404 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DdosSettingsProtectionCoverage.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DdosSettingsProtectionCoverage. + */ +public final class DdosSettingsProtectionCoverage extends ExpandableStringEnum { + /** Static value Basic for DdosSettingsProtectionCoverage. */ + public static final DdosSettingsProtectionCoverage BASIC = fromString("Basic"); + + /** Static value Standard for DdosSettingsProtectionCoverage. */ + public static final DdosSettingsProtectionCoverage STANDARD = fromString("Standard"); + + /** + * Creates or finds a DdosSettingsProtectionCoverage from its string representation. + * @param name a name to look for + * @return the corresponding DdosSettingsProtectionCoverage + */ + @JsonCreator + public static DdosSettingsProtectionCoverage fromString(String name) { + return fromString(name, DdosSettingsProtectionCoverage.class); + } + + /** + * @return known DdosSettingsProtectionCoverage values + */ + public static Collection values() { + return values(DdosSettingsProtectionCoverage.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DefaultSecurityRules.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DefaultSecurityRules.java new file mode 100644 index 000000000000..8bc9b25e2852 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DefaultSecurityRules.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.DefaultSecurityRulesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DefaultSecurityRules. + */ +public interface DefaultSecurityRules extends HasInner { + /** + * Get the specified default network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param defaultSecurityRuleName The name of the default security rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String networkSecurityGroupName, String defaultSecurityRuleName); + + /** + * Gets all default security rules in a network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String networkSecurityGroupName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Delegation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Delegation.java new file mode 100644 index 000000000000..6958fbbee204 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Delegation.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Details the service to which the subnet is delegated. + */ +@JsonFlatten +public class Delegation extends SubResource { + /** + * The name of the service to whom the subnet should be delegated (e.g. + * Microsoft.Sql/servers). + */ + @JsonProperty(value = "properties.serviceName") + private String serviceName; + + /** + * Describes the actions permitted to the service upon delegation. + */ + @JsonProperty(value = "properties.actions", access = JsonProperty.Access.WRITE_ONLY) + private List actions; + + /** + * The provisioning state of the service delegation resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a subnet. This name can + * be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers). + * + * @return the serviceName value + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set the name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers). + * + * @param serviceName the serviceName value to set + * @return the Delegation object itself. + */ + public Delegation withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get describes the actions permitted to the service upon delegation. + * + * @return the actions value + */ + public List actions() { + return this.actions; + } + + /** + * Get the provisioning state of the service delegation resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a subnet. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a subnet. This name can be used to access the resource. + * + * @param name the name value to set + * @return the Delegation object itself. + */ + public Delegation withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DeviceProperties.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DeviceProperties.java new file mode 100644 index 000000000000..ecb018f9cce5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DeviceProperties.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of properties of the device. + */ +public class DeviceProperties { + /** + * Name of the device Vendor. + */ + @JsonProperty(value = "deviceVendor") + private String deviceVendor; + + /** + * Model of the device. + */ + @JsonProperty(value = "deviceModel") + private String deviceModel; + + /** + * Link speed. + */ + @JsonProperty(value = "linkSpeedInMbps") + private Integer linkSpeedInMbps; + + /** + * Get name of the device Vendor. + * + * @return the deviceVendor value + */ + public String deviceVendor() { + return this.deviceVendor; + } + + /** + * Set name of the device Vendor. + * + * @param deviceVendor the deviceVendor value to set + * @return the DeviceProperties object itself. + */ + public DeviceProperties withDeviceVendor(String deviceVendor) { + this.deviceVendor = deviceVendor; + return this; + } + + /** + * Get model of the device. + * + * @return the deviceModel value + */ + public String deviceModel() { + return this.deviceModel; + } + + /** + * Set model of the device. + * + * @param deviceModel the deviceModel value to set + * @return the DeviceProperties object itself. + */ + public DeviceProperties withDeviceModel(String deviceModel) { + this.deviceModel = deviceModel; + return this; + } + + /** + * Get link speed. + * + * @return the linkSpeedInMbps value + */ + public Integer linkSpeedInMbps() { + return this.linkSpeedInMbps; + } + + /** + * Set link speed. + * + * @param linkSpeedInMbps the linkSpeedInMbps value to set + * @return the DeviceProperties object itself. + */ + public DeviceProperties withLinkSpeedInMbps(Integer linkSpeedInMbps) { + this.linkSpeedInMbps = linkSpeedInMbps; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DhGroup.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DhGroup.java new file mode 100644 index 000000000000..d1b0b86a7ca9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DhGroup.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DhGroup. + */ +public final class DhGroup extends ExpandableStringEnum { + /** Static value None for DhGroup. */ + public static final DhGroup NONE = fromString("None"); + + /** Static value DHGroup1 for DhGroup. */ + public static final DhGroup DHGROUP1 = fromString("DHGroup1"); + + /** Static value DHGroup2 for DhGroup. */ + public static final DhGroup DHGROUP2 = fromString("DHGroup2"); + + /** Static value DHGroup14 for DhGroup. */ + public static final DhGroup DHGROUP14 = fromString("DHGroup14"); + + /** Static value DHGroup2048 for DhGroup. */ + public static final DhGroup DHGROUP2048 = fromString("DHGroup2048"); + + /** Static value ECP256 for DhGroup. */ + public static final DhGroup ECP256 = fromString("ECP256"); + + /** Static value ECP384 for DhGroup. */ + public static final DhGroup ECP384 = fromString("ECP384"); + + /** Static value DHGroup24 for DhGroup. */ + public static final DhGroup DHGROUP24 = fromString("DHGroup24"); + + /** + * Creates or finds a DhGroup from its string representation. + * @param name a name to look for + * @return the corresponding DhGroup + */ + @JsonCreator + public static DhGroup fromString(String name) { + return fromString(name, DhGroup.class); + } + + /** + * @return known DhGroup values + */ + public static Collection values() { + return values(DhGroup.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DhcpOptions.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DhcpOptions.java new file mode 100644 index 000000000000..db027ba3efea --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/DhcpOptions.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DhcpOptions contains an array of DNS servers available to VMs deployed in + * the virtual network. Standard DHCP option for a subnet overrides VNET DHCP + * options. + */ +public class DhcpOptions { + /** + * The list of DNS servers IP addresses. + */ + @JsonProperty(value = "dnsServers") + private List dnsServers; + + /** + * Get the list of DNS servers IP addresses. + * + * @return the dnsServers value + */ + public List dnsServers() { + return this.dnsServers; + } + + /** + * Set the list of DNS servers IP addresses. + * + * @param dnsServers the dnsServers value to set + * @return the DhcpOptions object itself. + */ + public DhcpOptions withDnsServers(List dnsServers) { + this.dnsServers = dnsServers; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Dimension.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Dimension.java new file mode 100644 index 000000000000..7afc093a0c36 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Dimension.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dimension of the metric. + */ +public class Dimension { + /** + * The name of the dimension. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The display name of the dimension. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The internal name of the dimension. + */ + @JsonProperty(value = "internalName") + private String internalName; + + /** + * Get the name of the dimension. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the dimension. + * + * @param name the name value to set + * @return the Dimension object itself. + */ + public Dimension withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display name of the dimension. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name of the dimension. + * + * @param displayName the displayName value to set + * @return the Dimension object itself. + */ + public Dimension withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the internal name of the dimension. + * + * @return the internalName value + */ + public String internalName() { + return this.internalName; + } + + /** + * Set the internal name of the dimension. + * + * @param internalName the internalName value to set + * @return the Dimension object itself. + */ + public Dimension withInternalName(String internalName) { + this.internalName = internalName; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Direction.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Direction.java new file mode 100644 index 000000000000..dff9206842fd --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Direction.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Direction. + */ +public final class Direction extends ExpandableStringEnum { + /** Static value Inbound for Direction. */ + public static final Direction INBOUND = fromString("Inbound"); + + /** Static value Outbound for Direction. */ + public static final Direction OUTBOUND = fromString("Outbound"); + + /** + * Creates or finds a Direction from its string representation. + * @param name a name to look for + * @return the corresponding Direction + */ + @JsonCreator + public static Direction fromString(String name) { + return fromString(name, Direction.class); + } + + /** + * @return known Direction values + */ + public static Collection values() { + return values(Direction.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityGroup.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityGroup.java new file mode 100644 index 000000000000..08c786969a40 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityGroup.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Effective network security group. + */ +public class EffectiveNetworkSecurityGroup { + /** + * The ID of network security group that is applied. + */ + @JsonProperty(value = "networkSecurityGroup") + private SubResource networkSecurityGroup; + + /** + * Associated resources. + */ + @JsonProperty(value = "association") + private EffectiveNetworkSecurityGroupAssociation association; + + /** + * A collection of effective security rules. + */ + @JsonProperty(value = "effectiveSecurityRules") + private List effectiveSecurityRules; + + /** + * Mapping of tags to list of IP Addresses included within the tag. + */ + @JsonProperty(value = "tagMap") + private Map> tagMap; + + /** + * Get the ID of network security group that is applied. + * + * @return the networkSecurityGroup value + */ + public SubResource networkSecurityGroup() { + return this.networkSecurityGroup; + } + + /** + * Set the ID of network security group that is applied. + * + * @param networkSecurityGroup the networkSecurityGroup value to set + * @return the EffectiveNetworkSecurityGroup object itself. + */ + public EffectiveNetworkSecurityGroup withNetworkSecurityGroup(SubResource networkSecurityGroup) { + this.networkSecurityGroup = networkSecurityGroup; + return this; + } + + /** + * Get associated resources. + * + * @return the association value + */ + public EffectiveNetworkSecurityGroupAssociation association() { + return this.association; + } + + /** + * Set associated resources. + * + * @param association the association value to set + * @return the EffectiveNetworkSecurityGroup object itself. + */ + public EffectiveNetworkSecurityGroup withAssociation(EffectiveNetworkSecurityGroupAssociation association) { + this.association = association; + return this; + } + + /** + * Get a collection of effective security rules. + * + * @return the effectiveSecurityRules value + */ + public List effectiveSecurityRules() { + return this.effectiveSecurityRules; + } + + /** + * Set a collection of effective security rules. + * + * @param effectiveSecurityRules the effectiveSecurityRules value to set + * @return the EffectiveNetworkSecurityGroup object itself. + */ + public EffectiveNetworkSecurityGroup withEffectiveSecurityRules(List effectiveSecurityRules) { + this.effectiveSecurityRules = effectiveSecurityRules; + return this; + } + + /** + * Get mapping of tags to list of IP Addresses included within the tag. + * + * @return the tagMap value + */ + public Map> tagMap() { + return this.tagMap; + } + + /** + * Set mapping of tags to list of IP Addresses included within the tag. + * + * @param tagMap the tagMap value to set + * @return the EffectiveNetworkSecurityGroup object itself. + */ + public EffectiveNetworkSecurityGroup withTagMap(Map> tagMap) { + this.tagMap = tagMap; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityGroupAssociation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityGroupAssociation.java new file mode 100644 index 000000000000..a7daa094b666 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityGroupAssociation.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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The effective network security group association. + */ +public class EffectiveNetworkSecurityGroupAssociation { + /** + * The ID of the subnet if assigned. + */ + @JsonProperty(value = "subnet") + private SubResource subnet; + + /** + * The ID of the network interface if assigned. + */ + @JsonProperty(value = "networkInterface") + private SubResource networkInterface; + + /** + * Get the ID of the subnet if assigned. + * + * @return the subnet value + */ + public SubResource subnet() { + return this.subnet; + } + + /** + * Set the ID of the subnet if assigned. + * + * @param subnet the subnet value to set + * @return the EffectiveNetworkSecurityGroupAssociation object itself. + */ + public EffectiveNetworkSecurityGroupAssociation withSubnet(SubResource subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get the ID of the network interface if assigned. + * + * @return the networkInterface value + */ + public SubResource networkInterface() { + return this.networkInterface; + } + + /** + * Set the ID of the network interface if assigned. + * + * @param networkInterface the networkInterface value to set + * @return the EffectiveNetworkSecurityGroupAssociation object itself. + */ + public EffectiveNetworkSecurityGroupAssociation withNetworkInterface(SubResource networkInterface) { + this.networkInterface = networkInterface; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityGroupListResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityGroupListResult.java new file mode 100644 index 000000000000..020c7f6753f8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityGroupListResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.EffectiveNetworkSecurityGroupListResultInner; +import java.util.List; + +/** + * Type representing EffectiveNetworkSecurityGroupListResult. + */ +public interface EffectiveNetworkSecurityGroupListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityRule.java new file mode 100644 index 000000000000..596fdd504a4f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveNetworkSecurityRule.java @@ -0,0 +1,420 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Effective network security rules. + */ +public class EffectiveNetworkSecurityRule { + /** + * The name of the security rule specified by the user (if created by the + * user). + */ + @JsonProperty(value = "name") + private String name; + + /** + * The network protocol this rule applies to. Possible values include: + * 'Tcp', 'Udp', 'All'. + */ + @JsonProperty(value = "protocol") + private EffectiveSecurityRuleProtocol protocol; + + /** + * The source port or range. + */ + @JsonProperty(value = "sourcePortRange") + private String sourcePortRange; + + /** + * The destination port or range. + */ + @JsonProperty(value = "destinationPortRange") + private String destinationPortRange; + + /** + * The source port ranges. Expected values include a single integer between + * 0 and 65535, a range using '-' as separator (e.g. 100-400), or an + * asterisk (*). + */ + @JsonProperty(value = "sourcePortRanges") + private List sourcePortRanges; + + /** + * The destination port ranges. Expected values include a single integer + * between 0 and 65535, a range using '-' as separator (e.g. 100-400), or + * an asterisk (*). + */ + @JsonProperty(value = "destinationPortRanges") + private List destinationPortRanges; + + /** + * The source address prefix. + */ + @JsonProperty(value = "sourceAddressPrefix") + private String sourceAddressPrefix; + + /** + * The destination address prefix. + */ + @JsonProperty(value = "destinationAddressPrefix") + private String destinationAddressPrefix; + + /** + * The source address prefixes. Expected values include CIDR IP ranges, + * Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, + * and the asterisk (*). + */ + @JsonProperty(value = "sourceAddressPrefixes") + private List sourceAddressPrefixes; + + /** + * The destination address prefixes. Expected values include CIDR IP + * ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), + * System Tags, and the asterisk (*). + */ + @JsonProperty(value = "destinationAddressPrefixes") + private List destinationAddressPrefixes; + + /** + * The expanded source address prefix. + */ + @JsonProperty(value = "expandedSourceAddressPrefix") + private List expandedSourceAddressPrefix; + + /** + * Expanded destination address prefix. + */ + @JsonProperty(value = "expandedDestinationAddressPrefix") + private List expandedDestinationAddressPrefix; + + /** + * Whether network traffic is allowed or denied. Possible values include: + * 'Allow', 'Deny'. + */ + @JsonProperty(value = "access") + private SecurityRuleAccess access; + + /** + * The priority of the rule. + */ + @JsonProperty(value = "priority") + private Integer priority; + + /** + * The direction of the rule. Possible values include: 'Inbound', + * 'Outbound'. + */ + @JsonProperty(value = "direction") + private SecurityRuleDirection direction; + + /** + * Get the name of the security rule specified by the user (if created by the user). + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the security rule specified by the user (if created by the user). + * + * @param name the name value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get the network protocol this rule applies to. Possible values include: 'Tcp', 'Udp', 'All'. + * + * @return the protocol value + */ + public EffectiveSecurityRuleProtocol protocol() { + return this.protocol; + } + + /** + * Set the network protocol this rule applies to. Possible values include: 'Tcp', 'Udp', 'All'. + * + * @param protocol the protocol value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withProtocol(EffectiveSecurityRuleProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the source port or range. + * + * @return the sourcePortRange value + */ + public String sourcePortRange() { + return this.sourcePortRange; + } + + /** + * Set the source port or range. + * + * @param sourcePortRange the sourcePortRange value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withSourcePortRange(String sourcePortRange) { + this.sourcePortRange = sourcePortRange; + return this; + } + + /** + * Get the destination port or range. + * + * @return the destinationPortRange value + */ + public String destinationPortRange() { + return this.destinationPortRange; + } + + /** + * Set the destination port or range. + * + * @param destinationPortRange the destinationPortRange value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withDestinationPortRange(String destinationPortRange) { + this.destinationPortRange = destinationPortRange; + return this; + } + + /** + * Get the source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + * + * @return the sourcePortRanges value + */ + public List sourcePortRanges() { + return this.sourcePortRanges; + } + + /** + * Set the source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + * + * @param sourcePortRanges the sourcePortRanges value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withSourcePortRanges(List sourcePortRanges) { + this.sourcePortRanges = sourcePortRanges; + return this; + } + + /** + * Get the destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + * + * @return the destinationPortRanges value + */ + public List destinationPortRanges() { + return this.destinationPortRanges; + } + + /** + * Set the destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + * + * @param destinationPortRanges the destinationPortRanges value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withDestinationPortRanges(List destinationPortRanges) { + this.destinationPortRanges = destinationPortRanges; + return this; + } + + /** + * Get the source address prefix. + * + * @return the sourceAddressPrefix value + */ + public String sourceAddressPrefix() { + return this.sourceAddressPrefix; + } + + /** + * Set the source address prefix. + * + * @param sourceAddressPrefix the sourceAddressPrefix value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withSourceAddressPrefix(String sourceAddressPrefix) { + this.sourceAddressPrefix = sourceAddressPrefix; + return this; + } + + /** + * Get the destination address prefix. + * + * @return the destinationAddressPrefix value + */ + public String destinationAddressPrefix() { + return this.destinationAddressPrefix; + } + + /** + * Set the destination address prefix. + * + * @param destinationAddressPrefix the destinationAddressPrefix value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withDestinationAddressPrefix(String destinationAddressPrefix) { + this.destinationAddressPrefix = destinationAddressPrefix; + return this; + } + + /** + * Get the source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). + * + * @return the sourceAddressPrefixes value + */ + public List sourceAddressPrefixes() { + return this.sourceAddressPrefixes; + } + + /** + * Set the source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). + * + * @param sourceAddressPrefixes the sourceAddressPrefixes value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withSourceAddressPrefixes(List sourceAddressPrefixes) { + this.sourceAddressPrefixes = sourceAddressPrefixes; + return this; + } + + /** + * Get the destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). + * + * @return the destinationAddressPrefixes value + */ + public List destinationAddressPrefixes() { + return this.destinationAddressPrefixes; + } + + /** + * Set the destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). + * + * @param destinationAddressPrefixes the destinationAddressPrefixes value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withDestinationAddressPrefixes(List destinationAddressPrefixes) { + this.destinationAddressPrefixes = destinationAddressPrefixes; + return this; + } + + /** + * Get the expanded source address prefix. + * + * @return the expandedSourceAddressPrefix value + */ + public List expandedSourceAddressPrefix() { + return this.expandedSourceAddressPrefix; + } + + /** + * Set the expanded source address prefix. + * + * @param expandedSourceAddressPrefix the expandedSourceAddressPrefix value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withExpandedSourceAddressPrefix(List expandedSourceAddressPrefix) { + this.expandedSourceAddressPrefix = expandedSourceAddressPrefix; + return this; + } + + /** + * Get expanded destination address prefix. + * + * @return the expandedDestinationAddressPrefix value + */ + public List expandedDestinationAddressPrefix() { + return this.expandedDestinationAddressPrefix; + } + + /** + * Set expanded destination address prefix. + * + * @param expandedDestinationAddressPrefix the expandedDestinationAddressPrefix value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withExpandedDestinationAddressPrefix(List expandedDestinationAddressPrefix) { + this.expandedDestinationAddressPrefix = expandedDestinationAddressPrefix; + return this; + } + + /** + * Get whether network traffic is allowed or denied. Possible values include: 'Allow', 'Deny'. + * + * @return the access value + */ + public SecurityRuleAccess access() { + return this.access; + } + + /** + * Set whether network traffic is allowed or denied. Possible values include: 'Allow', 'Deny'. + * + * @param access the access value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withAccess(SecurityRuleAccess access) { + this.access = access; + return this; + } + + /** + * Get the priority of the rule. + * + * @return the priority value + */ + public Integer priority() { + return this.priority; + } + + /** + * Set the priority of the rule. + * + * @param priority the priority value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get the direction of the rule. Possible values include: 'Inbound', 'Outbound'. + * + * @return the direction value + */ + public SecurityRuleDirection direction() { + return this.direction; + } + + /** + * Set the direction of the rule. Possible values include: 'Inbound', 'Outbound'. + * + * @param direction the direction value to set + * @return the EffectiveNetworkSecurityRule object itself. + */ + public EffectiveNetworkSecurityRule withDirection(SecurityRuleDirection direction) { + this.direction = direction; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRoute.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRoute.java new file mode 100644 index 000000000000..a88e1d4a77bc --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRoute.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Effective Route. + */ +public class EffectiveRoute { + /** + * The name of the user defined route. This is optional. + */ + @JsonProperty(value = "name") + private String name; + + /** + * If true, on-premises routes are not propagated to the network interfaces + * in the subnet. + */ + @JsonProperty(value = "disableBgpRoutePropagation") + private Boolean disableBgpRoutePropagation; + + /** + * Who created the route. Possible values include: 'Unknown', 'User', + * 'VirtualNetworkGateway', 'Default'. + */ + @JsonProperty(value = "source") + private EffectiveRouteSource source; + + /** + * The value of effective route. Possible values include: 'Active', + * 'Invalid'. + */ + @JsonProperty(value = "state") + private EffectiveRouteState state; + + /** + * The address prefixes of the effective routes in CIDR notation. + */ + @JsonProperty(value = "addressPrefix") + private List addressPrefix; + + /** + * The IP address of the next hop of the effective route. + */ + @JsonProperty(value = "nextHopIpAddress") + private List nextHopIpAddress; + + /** + * The type of Azure hop the packet should be sent to. Possible values + * include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', + * 'VirtualAppliance', 'None'. + */ + @JsonProperty(value = "nextHopType") + private RouteNextHopType nextHopType; + + /** + * Get the name of the user defined route. This is optional. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the user defined route. This is optional. + * + * @param name the name value to set + * @return the EffectiveRoute object itself. + */ + public EffectiveRoute withName(String name) { + this.name = name; + return this; + } + + /** + * Get if true, on-premises routes are not propagated to the network interfaces in the subnet. + * + * @return the disableBgpRoutePropagation value + */ + public Boolean disableBgpRoutePropagation() { + return this.disableBgpRoutePropagation; + } + + /** + * Set if true, on-premises routes are not propagated to the network interfaces in the subnet. + * + * @param disableBgpRoutePropagation the disableBgpRoutePropagation value to set + * @return the EffectiveRoute object itself. + */ + public EffectiveRoute withDisableBgpRoutePropagation(Boolean disableBgpRoutePropagation) { + this.disableBgpRoutePropagation = disableBgpRoutePropagation; + return this; + } + + /** + * Get who created the route. Possible values include: 'Unknown', 'User', 'VirtualNetworkGateway', 'Default'. + * + * @return the source value + */ + public EffectiveRouteSource source() { + return this.source; + } + + /** + * Set who created the route. Possible values include: 'Unknown', 'User', 'VirtualNetworkGateway', 'Default'. + * + * @param source the source value to set + * @return the EffectiveRoute object itself. + */ + public EffectiveRoute withSource(EffectiveRouteSource source) { + this.source = source; + return this; + } + + /** + * Get the value of effective route. Possible values include: 'Active', 'Invalid'. + * + * @return the state value + */ + public EffectiveRouteState state() { + return this.state; + } + + /** + * Set the value of effective route. Possible values include: 'Active', 'Invalid'. + * + * @param state the state value to set + * @return the EffectiveRoute object itself. + */ + public EffectiveRoute withState(EffectiveRouteState state) { + this.state = state; + return this; + } + + /** + * Get the address prefixes of the effective routes in CIDR notation. + * + * @return the addressPrefix value + */ + public List addressPrefix() { + return this.addressPrefix; + } + + /** + * Set the address prefixes of the effective routes in CIDR notation. + * + * @param addressPrefix the addressPrefix value to set + * @return the EffectiveRoute object itself. + */ + public EffectiveRoute withAddressPrefix(List addressPrefix) { + this.addressPrefix = addressPrefix; + return this; + } + + /** + * Get the IP address of the next hop of the effective route. + * + * @return the nextHopIpAddress value + */ + public List nextHopIpAddress() { + return this.nextHopIpAddress; + } + + /** + * Set the IP address of the next hop of the effective route. + * + * @param nextHopIpAddress the nextHopIpAddress value to set + * @return the EffectiveRoute object itself. + */ + public EffectiveRoute withNextHopIpAddress(List nextHopIpAddress) { + this.nextHopIpAddress = nextHopIpAddress; + return this; + } + + /** + * Get the type of Azure hop the packet should be sent to. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'. + * + * @return the nextHopType value + */ + public RouteNextHopType nextHopType() { + return this.nextHopType; + } + + /** + * Set the type of Azure hop the packet should be sent to. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'. + * + * @param nextHopType the nextHopType value to set + * @return the EffectiveRoute object itself. + */ + public EffectiveRoute withNextHopType(RouteNextHopType nextHopType) { + this.nextHopType = nextHopType; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRouteListResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRouteListResult.java new file mode 100644 index 000000000000..90b467a7564c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRouteListResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.EffectiveRouteListResultInner; +import java.util.List; + +/** + * Type representing EffectiveRouteListResult. + */ +public interface EffectiveRouteListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRouteSource.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRouteSource.java new file mode 100644 index 000000000000..6fc79542117d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRouteSource.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for EffectiveRouteSource. + */ +public final class EffectiveRouteSource extends ExpandableStringEnum { + /** Static value Unknown for EffectiveRouteSource. */ + public static final EffectiveRouteSource UNKNOWN = fromString("Unknown"); + + /** Static value User for EffectiveRouteSource. */ + public static final EffectiveRouteSource USER = fromString("User"); + + /** Static value VirtualNetworkGateway for EffectiveRouteSource. */ + public static final EffectiveRouteSource VIRTUAL_NETWORK_GATEWAY = fromString("VirtualNetworkGateway"); + + /** Static value Default for EffectiveRouteSource. */ + public static final EffectiveRouteSource DEFAULT = fromString("Default"); + + /** + * Creates or finds a EffectiveRouteSource from its string representation. + * @param name a name to look for + * @return the corresponding EffectiveRouteSource + */ + @JsonCreator + public static EffectiveRouteSource fromString(String name) { + return fromString(name, EffectiveRouteSource.class); + } + + /** + * @return known EffectiveRouteSource values + */ + public static Collection values() { + return values(EffectiveRouteSource.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRouteState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRouteState.java new file mode 100644 index 000000000000..8051a020a029 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveRouteState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for EffectiveRouteState. + */ +public final class EffectiveRouteState extends ExpandableStringEnum { + /** Static value Active for EffectiveRouteState. */ + public static final EffectiveRouteState ACTIVE = fromString("Active"); + + /** Static value Invalid for EffectiveRouteState. */ + public static final EffectiveRouteState INVALID = fromString("Invalid"); + + /** + * Creates or finds a EffectiveRouteState from its string representation. + * @param name a name to look for + * @return the corresponding EffectiveRouteState + */ + @JsonCreator + public static EffectiveRouteState fromString(String name) { + return fromString(name, EffectiveRouteState.class); + } + + /** + * @return known EffectiveRouteState values + */ + public static Collection values() { + return values(EffectiveRouteState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveSecurityRuleProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveSecurityRuleProtocol.java new file mode 100644 index 000000000000..899e7ee51c4e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EffectiveSecurityRuleProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for EffectiveSecurityRuleProtocol. + */ +public final class EffectiveSecurityRuleProtocol extends ExpandableStringEnum { + /** Static value Tcp for EffectiveSecurityRuleProtocol. */ + public static final EffectiveSecurityRuleProtocol TCP = fromString("Tcp"); + + /** Static value Udp for EffectiveSecurityRuleProtocol. */ + public static final EffectiveSecurityRuleProtocol UDP = fromString("Udp"); + + /** Static value All for EffectiveSecurityRuleProtocol. */ + public static final EffectiveSecurityRuleProtocol ALL = fromString("All"); + + /** + * Creates or finds a EffectiveSecurityRuleProtocol from its string representation. + * @param name a name to look for + * @return the corresponding EffectiveSecurityRuleProtocol + */ + @JsonCreator + public static EffectiveSecurityRuleProtocol fromString(String name) { + return fromString(name, EffectiveSecurityRuleProtocol.class); + } + + /** + * @return known EffectiveSecurityRuleProtocol values + */ + public static Collection values() { + return values(EffectiveSecurityRuleProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EndpointServiceResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EndpointServiceResult.java new file mode 100644 index 000000000000..5a26f5103a10 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EndpointServiceResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.EndpointServiceResultInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing EndpointServiceResult. + */ +public interface EndpointServiceResult extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Error.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Error.java new file mode 100644 index 000000000000..047117582976 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Error.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Common error representation. + */ +public class Error { + /** + * Error code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Error message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Error target. + */ + @JsonProperty(value = "target") + private String target; + + /** + * Error details. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Inner error message. + */ + @JsonProperty(value = "innerError") + private String innerError; + + /** + * Get error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set error code. + * + * @param code the code value to set + * @return the Error object itself. + */ + public Error withCode(String code) { + this.code = code; + return this; + } + + /** + * Get error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set error message. + * + * @param message the message value to set + * @return the Error object itself. + */ + public Error withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get error target. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set error target. + * + * @param target the target value to set + * @return the Error object itself. + */ + public Error withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get error details. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set error details. + * + * @param details the details value to set + * @return the Error object itself. + */ + public Error withDetails(List details) { + this.details = details; + return this; + } + + /** + * Get inner error message. + * + * @return the innerError value + */ + public String innerError() { + return this.innerError; + } + + /** + * Set inner error message. + * + * @param innerError the innerError value to set + * @return the Error object itself. + */ + public Error withInnerError(String innerError) { + this.innerError = innerError; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorDetails.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorDetails.java new file mode 100644 index 000000000000..70251c36b323 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorDetails.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Common error details representation. + */ +public class ErrorDetails { + /** + * Error code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Error target. + */ + @JsonProperty(value = "target") + private String target; + + /** + * Error message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set error code. + * + * @param code the code value to set + * @return the ErrorDetails object itself. + */ + public ErrorDetails withCode(String code) { + this.code = code; + return this; + } + + /** + * Get error target. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set error target. + * + * @param target the target value to set + * @return the ErrorDetails object itself. + */ + public ErrorDetails withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set error message. + * + * @param message the message value to set + * @return the ErrorDetails object itself. + */ + public ErrorDetails withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorException.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorException.java new file mode 100644 index 000000000000..25dd4615499a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorException.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.network.v2019_09_01; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with Error information. + */ +public class ErrorException extends RestException { + /** + * Initializes a new instance of the ErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ErrorException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ErrorException(final String message, final Response response, final Error body) { + super(message, response, body); + } + + @Override + public Error body() { + return (Error) super.body(); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorResponse.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorResponse.java new file mode 100644 index 000000000000..b8dbff0b66ba --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorResponse.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The error object. + */ +public class ErrorResponse { + /** + * Error. + * The error details object. + */ + @JsonProperty(value = "error") + private ErrorDetails error; + + /** + * Get the error details object. + * + * @return the error value + */ + public ErrorDetails error() { + return this.error; + } + + /** + * Set the error details object. + * + * @param error the error value to set + * @return the ErrorResponse object itself. + */ + public ErrorResponse withError(ErrorDetails error) { + this.error = error; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorResponseException.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorResponseException.java new file mode 100644 index 000000000000..855c24c3d8e0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ErrorResponseException.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.network.v2019_09_01; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ErrorResponse information. + */ +public class ErrorResponseException extends RestException { + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ErrorResponseException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { + super(message, response, body); + } + + @Override + public ErrorResponse body() { + return (ErrorResponse) super.body(); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EvaluatedNetworkSecurityGroup.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EvaluatedNetworkSecurityGroup.java new file mode 100644 index 000000000000..8eb06d03479f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EvaluatedNetworkSecurityGroup.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results of network security group evaluation. + */ +public class EvaluatedNetworkSecurityGroup { + /** + * Network security group ID. + */ + @JsonProperty(value = "networkSecurityGroupId") + private String networkSecurityGroupId; + + /** + * Resource ID of nic or subnet to which network security group is applied. + */ + @JsonProperty(value = "appliedTo") + private String appliedTo; + + /** + * Matched network security rule. + */ + @JsonProperty(value = "matchedRule") + private MatchedRule matchedRule; + + /** + * List of network security rules evaluation results. + */ + @JsonProperty(value = "rulesEvaluationResult", access = JsonProperty.Access.WRITE_ONLY) + private List rulesEvaluationResult; + + /** + * Get network security group ID. + * + * @return the networkSecurityGroupId value + */ + public String networkSecurityGroupId() { + return this.networkSecurityGroupId; + } + + /** + * Set network security group ID. + * + * @param networkSecurityGroupId the networkSecurityGroupId value to set + * @return the EvaluatedNetworkSecurityGroup object itself. + */ + public EvaluatedNetworkSecurityGroup withNetworkSecurityGroupId(String networkSecurityGroupId) { + this.networkSecurityGroupId = networkSecurityGroupId; + return this; + } + + /** + * Get resource ID of nic or subnet to which network security group is applied. + * + * @return the appliedTo value + */ + public String appliedTo() { + return this.appliedTo; + } + + /** + * Set resource ID of nic or subnet to which network security group is applied. + * + * @param appliedTo the appliedTo value to set + * @return the EvaluatedNetworkSecurityGroup object itself. + */ + public EvaluatedNetworkSecurityGroup withAppliedTo(String appliedTo) { + this.appliedTo = appliedTo; + return this; + } + + /** + * Get matched network security rule. + * + * @return the matchedRule value + */ + public MatchedRule matchedRule() { + return this.matchedRule; + } + + /** + * Set matched network security rule. + * + * @param matchedRule the matchedRule value to set + * @return the EvaluatedNetworkSecurityGroup object itself. + */ + public EvaluatedNetworkSecurityGroup withMatchedRule(MatchedRule matchedRule) { + this.matchedRule = matchedRule; + return this; + } + + /** + * Get list of network security rules evaluation results. + * + * @return the rulesEvaluationResult value + */ + public List rulesEvaluationResult() { + return this.rulesEvaluationResult; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EvaluationState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EvaluationState.java new file mode 100644 index 000000000000..f864a407be21 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/EvaluationState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for EvaluationState. + */ +public final class EvaluationState extends ExpandableStringEnum { + /** Static value NotStarted for EvaluationState. */ + public static final EvaluationState NOT_STARTED = fromString("NotStarted"); + + /** Static value InProgress for EvaluationState. */ + public static final EvaluationState IN_PROGRESS = fromString("InProgress"); + + /** Static value Completed for EvaluationState. */ + public static final EvaluationState COMPLETED = fromString("Completed"); + + /** + * Creates or finds a EvaluationState from its string representation. + * @param name a name to look for + * @return the corresponding EvaluationState + */ + @JsonCreator + public static EvaluationState fromString(String name) { + return fromString(name, EvaluationState.class); + } + + /** + * @return known EvaluationState values + */ + public static Collection values() { + return values(EvaluationState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuit.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuit.java new file mode 100644 index 000000000000..05cf62524e6a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuit.java @@ -0,0 +1,368 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitAuthorizationInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitPeeringInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitInner; + +/** + * Type representing ExpressRouteCircuit. + */ +public interface ExpressRouteCircuit extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the allowClassicOperations value. + */ + Boolean allowClassicOperations(); + + /** + * @return the authorizations value. + */ + List authorizations(); + + /** + * @return the bandwidthInGbps value. + */ + Double bandwidthInGbps(); + + /** + * @return the circuitProvisioningState value. + */ + String circuitProvisioningState(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the expressRoutePort value. + */ + SubResource expressRoutePort(); + + /** + * @return the gatewayManagerEtag value. + */ + String gatewayManagerEtag(); + + /** + * @return the globalReachEnabled value. + */ + Boolean globalReachEnabled(); + + /** + * @return the peerings value. + */ + List peerings(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the serviceKey value. + */ + String serviceKey(); + + /** + * @return the serviceProviderNotes value. + */ + String serviceProviderNotes(); + + /** + * @return the serviceProviderProperties value. + */ + ExpressRouteCircuitServiceProviderProperties serviceProviderProperties(); + + /** + * @return the serviceProviderProvisioningState value. + */ + ServiceProviderProvisioningState serviceProviderProvisioningState(); + + /** + * @return the sku value. + */ + ExpressRouteCircuitSku sku(); + + /** + * @return the stag value. + */ + Integer stag(); + + /** + * The entirety of the ExpressRouteCircuit definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of ExpressRouteCircuit definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ExpressRouteCircuit definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the ExpressRouteCircuit definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the expressroutecircuit definition allowing to specify AllowClassicOperations. + */ + interface WithAllowClassicOperations { + /** + * Specifies allowClassicOperations. + * @param allowClassicOperations Allow classic operations + * @return the next definition stage + */ + WithCreate withAllowClassicOperations(Boolean allowClassicOperations); + } + + /** + * The stage of the expressroutecircuit definition allowing to specify Authorizations. + */ + interface WithAuthorizations { + /** + * Specifies authorizations. + * @param authorizations The list of authorizations + * @return the next definition stage + */ + WithCreate withAuthorizations(List authorizations); + } + + /** + * The stage of the expressroutecircuit definition allowing to specify BandwidthInGbps. + */ + interface WithBandwidthInGbps { + /** + * Specifies bandwidthInGbps. + * @param bandwidthInGbps The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource + * @return the next definition stage + */ + WithCreate withBandwidthInGbps(Double bandwidthInGbps); + } + + /** + * The stage of the expressroutecircuit definition allowing to specify ExpressRoutePort. + */ + interface WithExpressRoutePort { + /** + * Specifies expressRoutePort. + * @param expressRoutePort The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource + * @return the next definition stage + */ + WithCreate withExpressRoutePort(SubResource expressRoutePort); + } + + /** + * The stage of the expressroutecircuit definition allowing to specify GatewayManagerEtag. + */ + interface WithGatewayManagerEtag { + /** + * Specifies gatewayManagerEtag. + * @param gatewayManagerEtag The GatewayManager Etag + * @return the next definition stage + */ + WithCreate withGatewayManagerEtag(String gatewayManagerEtag); + } + + /** + * The stage of the expressroutecircuit definition allowing to specify Peerings. + */ + interface WithPeerings { + /** + * Specifies peerings. + * @param peerings The list of peerings + * @return the next definition stage + */ + WithCreate withPeerings(List peerings); + } + + /** + * The stage of the expressroutecircuit definition allowing to specify ServiceProviderNotes. + */ + interface WithServiceProviderNotes { + /** + * Specifies serviceProviderNotes. + * @param serviceProviderNotes The ServiceProviderNotes + * @return the next definition stage + */ + WithCreate withServiceProviderNotes(String serviceProviderNotes); + } + + /** + * The stage of the expressroutecircuit definition allowing to specify ServiceProviderProperties. + */ + interface WithServiceProviderProperties { + /** + * Specifies serviceProviderProperties. + * @param serviceProviderProperties The ServiceProviderProperties + * @return the next definition stage + */ + WithCreate withServiceProviderProperties(ExpressRouteCircuitServiceProviderProperties serviceProviderProperties); + } + + /** + * The stage of the expressroutecircuit definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The SKU + * @return the next definition stage + */ + WithCreate withSku(ExpressRouteCircuitSku sku); + } + + /** + * 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.WithAllowClassicOperations, DefinitionStages.WithAuthorizations, DefinitionStages.WithBandwidthInGbps, DefinitionStages.WithExpressRoutePort, DefinitionStages.WithGatewayManagerEtag, DefinitionStages.WithPeerings, DefinitionStages.WithServiceProviderNotes, DefinitionStages.WithServiceProviderProperties, DefinitionStages.WithSku { + } + } + /** + * The template for a ExpressRouteCircuit update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAllowClassicOperations, UpdateStages.WithAuthorizations, UpdateStages.WithBandwidthInGbps, UpdateStages.WithExpressRoutePort, UpdateStages.WithGatewayManagerEtag, UpdateStages.WithPeerings, UpdateStages.WithServiceProviderNotes, UpdateStages.WithServiceProviderProperties, UpdateStages.WithSku { + } + + /** + * Grouping of ExpressRouteCircuit update stages. + */ + interface UpdateStages { + /** + * The stage of the expressroutecircuit update allowing to specify AllowClassicOperations. + */ + interface WithAllowClassicOperations { + /** + * Specifies allowClassicOperations. + * @param allowClassicOperations Allow classic operations + * @return the next update stage + */ + Update withAllowClassicOperations(Boolean allowClassicOperations); + } + + /** + * The stage of the expressroutecircuit update allowing to specify Authorizations. + */ + interface WithAuthorizations { + /** + * Specifies authorizations. + * @param authorizations The list of authorizations + * @return the next update stage + */ + Update withAuthorizations(List authorizations); + } + + /** + * The stage of the expressroutecircuit update allowing to specify BandwidthInGbps. + */ + interface WithBandwidthInGbps { + /** + * Specifies bandwidthInGbps. + * @param bandwidthInGbps The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource + * @return the next update stage + */ + Update withBandwidthInGbps(Double bandwidthInGbps); + } + + /** + * The stage of the expressroutecircuit update allowing to specify ExpressRoutePort. + */ + interface WithExpressRoutePort { + /** + * Specifies expressRoutePort. + * @param expressRoutePort The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource + * @return the next update stage + */ + Update withExpressRoutePort(SubResource expressRoutePort); + } + + /** + * The stage of the expressroutecircuit update allowing to specify GatewayManagerEtag. + */ + interface WithGatewayManagerEtag { + /** + * Specifies gatewayManagerEtag. + * @param gatewayManagerEtag The GatewayManager Etag + * @return the next update stage + */ + Update withGatewayManagerEtag(String gatewayManagerEtag); + } + + /** + * The stage of the expressroutecircuit update allowing to specify Peerings. + */ + interface WithPeerings { + /** + * Specifies peerings. + * @param peerings The list of peerings + * @return the next update stage + */ + Update withPeerings(List peerings); + } + + /** + * The stage of the expressroutecircuit update allowing to specify ServiceProviderNotes. + */ + interface WithServiceProviderNotes { + /** + * Specifies serviceProviderNotes. + * @param serviceProviderNotes The ServiceProviderNotes + * @return the next update stage + */ + Update withServiceProviderNotes(String serviceProviderNotes); + } + + /** + * The stage of the expressroutecircuit update allowing to specify ServiceProviderProperties. + */ + interface WithServiceProviderProperties { + /** + * Specifies serviceProviderProperties. + * @param serviceProviderProperties The ServiceProviderProperties + * @return the next update stage + */ + Update withServiceProviderProperties(ExpressRouteCircuitServiceProviderProperties serviceProviderProperties); + } + + /** + * The stage of the expressroutecircuit update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The SKU + * @return the next update stage + */ + Update withSku(ExpressRouteCircuitSku sku); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitArpTable.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitArpTable.java new file mode 100644 index 000000000000..242a6060f397 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitArpTable.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ARP table associated with the ExpressRouteCircuit. + */ +public class ExpressRouteCircuitArpTable { + /** + * Entry age in minutes. + */ + @JsonProperty(value = "age") + private Integer age; + + /** + * Interface address. + */ + @JsonProperty(value = "interface") + private String interfaceProperty; + + /** + * The IP address. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * The MAC address. + */ + @JsonProperty(value = "macAddress") + private String macAddress; + + /** + * Get entry age in minutes. + * + * @return the age value + */ + public Integer age() { + return this.age; + } + + /** + * Set entry age in minutes. + * + * @param age the age value to set + * @return the ExpressRouteCircuitArpTable object itself. + */ + public ExpressRouteCircuitArpTable withAge(Integer age) { + this.age = age; + return this; + } + + /** + * Get interface address. + * + * @return the interfaceProperty value + */ + public String interfaceProperty() { + return this.interfaceProperty; + } + + /** + * Set interface address. + * + * @param interfaceProperty the interfaceProperty value to set + * @return the ExpressRouteCircuitArpTable object itself. + */ + public ExpressRouteCircuitArpTable withInterfaceProperty(String interfaceProperty) { + this.interfaceProperty = interfaceProperty; + return this; + } + + /** + * Get the IP address. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the IP address. + * + * @param ipAddress the ipAddress value to set + * @return the ExpressRouteCircuitArpTable object itself. + */ + public ExpressRouteCircuitArpTable withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the MAC address. + * + * @return the macAddress value + */ + public String macAddress() { + return this.macAddress; + } + + /** + * Set the MAC address. + * + * @param macAddress the macAddress value to set + * @return the ExpressRouteCircuitArpTable object itself. + */ + public ExpressRouteCircuitArpTable withMacAddress(String macAddress) { + this.macAddress = macAddress; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitAuthorization.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitAuthorization.java new file mode 100644 index 000000000000..19cb2d26ba6e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitAuthorization.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitAuthorizationInner; +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.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing ExpressRouteCircuitAuthorization. + */ +public interface ExpressRouteCircuitAuthorization extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the authorizationKey value. + */ + String authorizationKey(); + + /** + * @return the authorizationUseStatus value. + */ + AuthorizationUseStatus authorizationUseStatus(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ExpressRouteCircuitAuthorization definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithExpressRouteCircuit, DefinitionStages.WithCreate { + } + + /** + * Grouping of ExpressRouteCircuitAuthorization definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ExpressRouteCircuitAuthorization definition. + */ + interface Blank extends WithExpressRouteCircuit { + } + + /** + * The stage of the expressroutecircuitauthorization definition allowing to specify ExpressRouteCircuit. + */ + interface WithExpressRouteCircuit { + /** + * Specifies resourceGroupName, circuitName. + * @param resourceGroupName The name of the resource group + * @param circuitName The name of the express route circuit + * @return the next definition stage + */ + WithCreate withExistingExpressRouteCircuit(String resourceGroupName, String circuitName); + } + + /** + * The stage of the expressroutecircuitauthorization definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the expressroutecircuitauthorization definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * 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.WithName { + } + } + /** + * The template for a ExpressRouteCircuitAuthorization update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithId, UpdateStages.WithName { + } + + /** + * Grouping of ExpressRouteCircuitAuthorization update stages. + */ + interface UpdateStages { + /** + * The stage of the expressroutecircuitauthorization update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the expressroutecircuitauthorization update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitAuthorizations.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitAuthorizations.java new file mode 100644 index 000000000000..5c4c885a3b5b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitAuthorizations.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitAuthorizationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ExpressRouteCircuitAuthorizations. + */ +public interface ExpressRouteCircuitAuthorizations extends SupportsCreating, HasInner { + /** + * Gets the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String circuitName, String authorizationName); + + /** + * Gets all authorizations in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String circuitName); + + /** + * Deletes the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String circuitName, String authorizationName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitConnection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitConnection.java new file mode 100644 index 000000000000..63f06bd0115f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitConnection.java @@ -0,0 +1,269 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitConnectionInner; +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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; + +/** + * Type representing ExpressRouteCircuitConnection. + */ +public interface ExpressRouteCircuitConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the addressPrefix value. + */ + String addressPrefix(); + + /** + * @return the authorizationKey value. + */ + String authorizationKey(); + + /** + * @return the circuitConnectionStatus value. + */ + CircuitConnectionStatus circuitConnectionStatus(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the expressRouteCircuitPeering value. + */ + SubResource expressRouteCircuitPeering(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the peerExpressRouteCircuitPeering value. + */ + SubResource peerExpressRouteCircuitPeering(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ExpressRouteCircuitConnection definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithPeering, DefinitionStages.WithCreate { + } + + /** + * Grouping of ExpressRouteCircuitConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ExpressRouteCircuitConnection definition. + */ + interface Blank extends WithPeering { + } + + /** + * The stage of the expressroutecircuitconnection definition allowing to specify Peering. + */ + interface WithPeering { + /** + * Specifies resourceGroupName, circuitName, peeringName. + * @param resourceGroupName The name of the resource group + * @param circuitName The name of the express route circuit + * @param peeringName The name of the peering + * @return the next definition stage + */ + WithCreate withExistingPeering(String resourceGroupName, String circuitName, String peeringName); + } + + /** + * The stage of the expressroutecircuitconnection definition allowing to specify AddressPrefix. + */ + interface WithAddressPrefix { + /** + * Specifies addressPrefix. + * @param addressPrefix /29 IP address space to carve out Customer addresses for tunnels + * @return the next definition stage + */ + WithCreate withAddressPrefix(String addressPrefix); + } + + /** + * The stage of the expressroutecircuitconnection definition allowing to specify AuthorizationKey. + */ + interface WithAuthorizationKey { + /** + * Specifies authorizationKey. + * @param authorizationKey The authorization key + * @return the next definition stage + */ + WithCreate withAuthorizationKey(String authorizationKey); + } + + /** + * The stage of the expressroutecircuitconnection definition allowing to specify ExpressRouteCircuitPeering. + */ + interface WithExpressRouteCircuitPeering { + /** + * Specifies expressRouteCircuitPeering. + * @param expressRouteCircuitPeering Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection + * @return the next definition stage + */ + WithCreate withExpressRouteCircuitPeering(SubResource expressRouteCircuitPeering); + } + + /** + * The stage of the expressroutecircuitconnection definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the expressroutecircuitconnection definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the expressroutecircuitconnection definition allowing to specify PeerExpressRouteCircuitPeering. + */ + interface WithPeerExpressRouteCircuitPeering { + /** + * Specifies peerExpressRouteCircuitPeering. + * @param peerExpressRouteCircuitPeering Reference to Express Route Circuit Private Peering Resource of the peered circuit + * @return the next definition stage + */ + WithCreate withPeerExpressRouteCircuitPeering(SubResource peerExpressRouteCircuitPeering); + } + + /** + * 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.WithAddressPrefix, DefinitionStages.WithAuthorizationKey, DefinitionStages.WithExpressRouteCircuitPeering, DefinitionStages.WithId, DefinitionStages.WithName, DefinitionStages.WithPeerExpressRouteCircuitPeering { + } + } + /** + * The template for a ExpressRouteCircuitConnection update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAddressPrefix, UpdateStages.WithAuthorizationKey, UpdateStages.WithExpressRouteCircuitPeering, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithPeerExpressRouteCircuitPeering { + } + + /** + * Grouping of ExpressRouteCircuitConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the expressroutecircuitconnection update allowing to specify AddressPrefix. + */ + interface WithAddressPrefix { + /** + * Specifies addressPrefix. + * @param addressPrefix /29 IP address space to carve out Customer addresses for tunnels + * @return the next update stage + */ + Update withAddressPrefix(String addressPrefix); + } + + /** + * The stage of the expressroutecircuitconnection update allowing to specify AuthorizationKey. + */ + interface WithAuthorizationKey { + /** + * Specifies authorizationKey. + * @param authorizationKey The authorization key + * @return the next update stage + */ + Update withAuthorizationKey(String authorizationKey); + } + + /** + * The stage of the expressroutecircuitconnection update allowing to specify ExpressRouteCircuitPeering. + */ + interface WithExpressRouteCircuitPeering { + /** + * Specifies expressRouteCircuitPeering. + * @param expressRouteCircuitPeering Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection + * @return the next update stage + */ + Update withExpressRouteCircuitPeering(SubResource expressRouteCircuitPeering); + } + + /** + * The stage of the expressroutecircuitconnection update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the expressroutecircuitconnection update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the expressroutecircuitconnection update allowing to specify PeerExpressRouteCircuitPeering. + */ + interface WithPeerExpressRouteCircuitPeering { + /** + * Specifies peerExpressRouteCircuitPeering. + * @param peerExpressRouteCircuitPeering Reference to Express Route Circuit Private Peering Resource of the peered circuit + * @return the next update stage + */ + Update withPeerExpressRouteCircuitPeering(SubResource peerExpressRouteCircuitPeering); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitConnections.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitConnections.java new file mode 100644 index 000000000000..f883493b8074 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitConnections.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ExpressRouteCircuitConnections. + */ +public interface ExpressRouteCircuitConnections extends SupportsCreating, HasInner { + /** + * Gets the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName); + + /** + * Gets all global reach connections associated with a private peering in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String circuitName, final String peeringName); + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeering.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeering.java new file mode 100644 index 000000000000..4ea8dbe21476 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeering.java @@ -0,0 +1,556 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitPeeringInner; +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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitStatsInner; + +/** + * Type representing ExpressRouteCircuitPeering. + */ +public interface ExpressRouteCircuitPeering extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the azureASN value. + */ + Integer azureASN(); + + /** + * @return the connections value. + */ + List connections(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the expressRouteConnection value. + */ + ExpressRouteConnectionId expressRouteConnection(); + + /** + * @return the gatewayManagerEtag value. + */ + String gatewayManagerEtag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the ipv6PeeringConfig value. + */ + Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig(); + + /** + * @return the lastModifiedBy value. + */ + String lastModifiedBy(); + + /** + * @return the microsoftPeeringConfig value. + */ + ExpressRouteCircuitPeeringConfig microsoftPeeringConfig(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the peerASN value. + */ + Long peerASN(); + + /** + * @return the peeredConnections value. + */ + List peeredConnections(); + + /** + * @return the peeringType value. + */ + ExpressRoutePeeringType peeringType(); + + /** + * @return the primaryAzurePort value. + */ + String primaryAzurePort(); + + /** + * @return the primaryPeerAddressPrefix value. + */ + String primaryPeerAddressPrefix(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the routeFilter value. + */ + SubResource routeFilter(); + + /** + * @return the secondaryAzurePort value. + */ + String secondaryAzurePort(); + + /** + * @return the secondaryPeerAddressPrefix value. + */ + String secondaryPeerAddressPrefix(); + + /** + * @return the sharedKey value. + */ + String sharedKey(); + + /** + * @return the state value. + */ + ExpressRoutePeeringState state(); + + /** + * @return the stats value. + */ + ExpressRouteCircuitStats stats(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the vlanId value. + */ + Integer vlanId(); + + /** + * The entirety of the ExpressRouteCircuitPeering definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithExpressRouteCircuit, DefinitionStages.WithCreate { + } + + /** + * Grouping of ExpressRouteCircuitPeering definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ExpressRouteCircuitPeering definition. + */ + interface Blank extends WithExpressRouteCircuit { + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify ExpressRouteCircuit. + */ + interface WithExpressRouteCircuit { + /** + * Specifies resourceGroupName, circuitName. + * @param resourceGroupName The name of the resource group + * @param circuitName The name of the express route circuit + * @return the next definition stage + */ + WithCreate withExistingExpressRouteCircuit(String resourceGroupName, String circuitName); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify ExpressRouteConnection. + */ + interface WithExpressRouteConnection { + /** + * Specifies expressRouteConnection. + * @param expressRouteConnection The ExpressRoute connection + * @return the next definition stage + */ + WithCreate withExpressRouteConnection(ExpressRouteConnectionId expressRouteConnection); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify GatewayManagerEtag. + */ + interface WithGatewayManagerEtag { + /** + * Specifies gatewayManagerEtag. + * @param gatewayManagerEtag The GatewayManager Etag + * @return the next definition stage + */ + WithCreate withGatewayManagerEtag(String gatewayManagerEtag); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify Ipv6PeeringConfig. + */ + interface WithIpv6PeeringConfig { + /** + * Specifies ipv6PeeringConfig. + * @param ipv6PeeringConfig The IPv6 peering configuration + * @return the next definition stage + */ + WithCreate withIpv6PeeringConfig(Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify MicrosoftPeeringConfig. + */ + interface WithMicrosoftPeeringConfig { + /** + * Specifies microsoftPeeringConfig. + * @param microsoftPeeringConfig The Microsoft peering configuration + * @return the next definition stage + */ + WithCreate withMicrosoftPeeringConfig(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify PeerASN. + */ + interface WithPeerASN { + /** + * Specifies peerASN. + * @param peerASN The peer ASN + * @return the next definition stage + */ + WithCreate withPeerASN(Long peerASN); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify PeeringType. + */ + interface WithPeeringType { + /** + * Specifies peeringType. + * @param peeringType The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + * @return the next definition stage + */ + WithCreate withPeeringType(ExpressRoutePeeringType peeringType); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify PrimaryPeerAddressPrefix. + */ + interface WithPrimaryPeerAddressPrefix { + /** + * Specifies primaryPeerAddressPrefix. + * @param primaryPeerAddressPrefix The primary address prefix + * @return the next definition stage + */ + WithCreate withPrimaryPeerAddressPrefix(String primaryPeerAddressPrefix); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify RouteFilter. + */ + interface WithRouteFilter { + /** + * Specifies routeFilter. + * @param routeFilter The reference of the RouteFilter resource + * @return the next definition stage + */ + WithCreate withRouteFilter(SubResource routeFilter); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify SecondaryPeerAddressPrefix. + */ + interface WithSecondaryPeerAddressPrefix { + /** + * Specifies secondaryPeerAddressPrefix. + * @param secondaryPeerAddressPrefix The secondary address prefix + * @return the next definition stage + */ + WithCreate withSecondaryPeerAddressPrefix(String secondaryPeerAddressPrefix); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify SharedKey. + */ + interface WithSharedKey { + /** + * Specifies sharedKey. + * @param sharedKey The shared key + * @return the next definition stage + */ + WithCreate withSharedKey(String sharedKey); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify State. + */ + interface WithState { + /** + * Specifies state. + * @param state The peering state. Possible values include: 'Disabled', 'Enabled' + * @return the next definition stage + */ + WithCreate withState(ExpressRoutePeeringState state); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify Stats. + */ + interface WithStats { + /** + * Specifies stats. + * @param stats The peering stats of express route circuit + * @return the next definition stage + */ + WithCreate withStats(ExpressRouteCircuitStatsInner stats); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify VlanId. + */ + interface WithVlanId { + /** + * Specifies vlanId. + * @param vlanId The VLAN ID + * @return the next definition stage + */ + WithCreate withVlanId(Integer vlanId); + } + + /** + * 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.WithExpressRouteConnection, DefinitionStages.WithGatewayManagerEtag, DefinitionStages.WithId, DefinitionStages.WithIpv6PeeringConfig, DefinitionStages.WithMicrosoftPeeringConfig, DefinitionStages.WithName, DefinitionStages.WithPeerASN, DefinitionStages.WithPeeringType, DefinitionStages.WithPrimaryPeerAddressPrefix, DefinitionStages.WithRouteFilter, DefinitionStages.WithSecondaryPeerAddressPrefix, DefinitionStages.WithSharedKey, DefinitionStages.WithState, DefinitionStages.WithStats, DefinitionStages.WithVlanId { + } + } + /** + * The template for a ExpressRouteCircuitPeering update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithExpressRouteConnection, UpdateStages.WithGatewayManagerEtag, UpdateStages.WithId, UpdateStages.WithIpv6PeeringConfig, UpdateStages.WithMicrosoftPeeringConfig, UpdateStages.WithName, UpdateStages.WithPeerASN, UpdateStages.WithPeeringType, UpdateStages.WithPrimaryPeerAddressPrefix, UpdateStages.WithRouteFilter, UpdateStages.WithSecondaryPeerAddressPrefix, UpdateStages.WithSharedKey, UpdateStages.WithState, UpdateStages.WithStats, UpdateStages.WithVlanId { + } + + /** + * Grouping of ExpressRouteCircuitPeering update stages. + */ + interface UpdateStages { + /** + * The stage of the expressroutecircuitpeering update allowing to specify ExpressRouteConnection. + */ + interface WithExpressRouteConnection { + /** + * Specifies expressRouteConnection. + * @param expressRouteConnection The ExpressRoute connection + * @return the next update stage + */ + Update withExpressRouteConnection(ExpressRouteConnectionId expressRouteConnection); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify GatewayManagerEtag. + */ + interface WithGatewayManagerEtag { + /** + * Specifies gatewayManagerEtag. + * @param gatewayManagerEtag The GatewayManager Etag + * @return the next update stage + */ + Update withGatewayManagerEtag(String gatewayManagerEtag); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify Ipv6PeeringConfig. + */ + interface WithIpv6PeeringConfig { + /** + * Specifies ipv6PeeringConfig. + * @param ipv6PeeringConfig The IPv6 peering configuration + * @return the next update stage + */ + Update withIpv6PeeringConfig(Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify MicrosoftPeeringConfig. + */ + interface WithMicrosoftPeeringConfig { + /** + * Specifies microsoftPeeringConfig. + * @param microsoftPeeringConfig The Microsoft peering configuration + * @return the next update stage + */ + Update withMicrosoftPeeringConfig(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify PeerASN. + */ + interface WithPeerASN { + /** + * Specifies peerASN. + * @param peerASN The peer ASN + * @return the next update stage + */ + Update withPeerASN(Long peerASN); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify PeeringType. + */ + interface WithPeeringType { + /** + * Specifies peeringType. + * @param peeringType The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + * @return the next update stage + */ + Update withPeeringType(ExpressRoutePeeringType peeringType); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify PrimaryPeerAddressPrefix. + */ + interface WithPrimaryPeerAddressPrefix { + /** + * Specifies primaryPeerAddressPrefix. + * @param primaryPeerAddressPrefix The primary address prefix + * @return the next update stage + */ + Update withPrimaryPeerAddressPrefix(String primaryPeerAddressPrefix); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify RouteFilter. + */ + interface WithRouteFilter { + /** + * Specifies routeFilter. + * @param routeFilter The reference of the RouteFilter resource + * @return the next update stage + */ + Update withRouteFilter(SubResource routeFilter); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify SecondaryPeerAddressPrefix. + */ + interface WithSecondaryPeerAddressPrefix { + /** + * Specifies secondaryPeerAddressPrefix. + * @param secondaryPeerAddressPrefix The secondary address prefix + * @return the next update stage + */ + Update withSecondaryPeerAddressPrefix(String secondaryPeerAddressPrefix); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify SharedKey. + */ + interface WithSharedKey { + /** + * Specifies sharedKey. + * @param sharedKey The shared key + * @return the next update stage + */ + Update withSharedKey(String sharedKey); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify State. + */ + interface WithState { + /** + * Specifies state. + * @param state The peering state. Possible values include: 'Disabled', 'Enabled' + * @return the next update stage + */ + Update withState(ExpressRoutePeeringState state); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify Stats. + */ + interface WithStats { + /** + * Specifies stats. + * @param stats The peering stats of express route circuit + * @return the next update stage + */ + Update withStats(ExpressRouteCircuitStatsInner stats); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify VlanId. + */ + interface WithVlanId { + /** + * Specifies vlanId. + * @param vlanId The VLAN ID + * @return the next update stage + */ + Update withVlanId(Integer vlanId); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.java new file mode 100644 index 000000000000..1455b65e4e89 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. + */ +public final class ExpressRouteCircuitPeeringAdvertisedPublicPrefixState extends ExpandableStringEnum { + /** Static value NotConfigured for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState NOT_CONFIGURED = fromString("NotConfigured"); + + /** Static value Configuring for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURING = fromString("Configuring"); + + /** Static value Configured for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURED = fromString("Configured"); + + /** Static value ValidationNeeded for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState VALIDATION_NEEDED = fromString("ValidationNeeded"); + + /** + * Creates or finds a ExpressRouteCircuitPeeringAdvertisedPublicPrefixState from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteCircuitPeeringAdvertisedPublicPrefixState + */ + @JsonCreator + public static ExpressRouteCircuitPeeringAdvertisedPublicPrefixState fromString(String name) { + return fromString(name, ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.class); + } + + /** + * @return known ExpressRouteCircuitPeeringAdvertisedPublicPrefixState values + */ + public static Collection values() { + return values(ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringConfig.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringConfig.java new file mode 100644 index 000000000000..04bd1b8894a9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringConfig.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifies the peering configuration. + */ +public class ExpressRouteCircuitPeeringConfig { + /** + * The reference of AdvertisedPublicPrefixes. + */ + @JsonProperty(value = "advertisedPublicPrefixes") + private List advertisedPublicPrefixes; + + /** + * The communities of bgp peering. Specified for microsoft peering. + */ + @JsonProperty(value = "advertisedCommunities") + private List advertisedCommunities; + + /** + * The advertised public prefix state of the Peering resource. Possible + * values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded'. + */ + @JsonProperty(value = "advertisedPublicPrefixesState", access = JsonProperty.Access.WRITE_ONLY) + private ExpressRouteCircuitPeeringAdvertisedPublicPrefixState advertisedPublicPrefixesState; + + /** + * The legacy mode of the peering. + */ + @JsonProperty(value = "legacyMode") + private Integer legacyMode; + + /** + * The CustomerASN of the peering. + */ + @JsonProperty(value = "customerASN") + private Integer customerASN; + + /** + * The RoutingRegistryName of the configuration. + */ + @JsonProperty(value = "routingRegistryName") + private String routingRegistryName; + + /** + * Get the reference of AdvertisedPublicPrefixes. + * + * @return the advertisedPublicPrefixes value + */ + public List advertisedPublicPrefixes() { + return this.advertisedPublicPrefixes; + } + + /** + * Set the reference of AdvertisedPublicPrefixes. + * + * @param advertisedPublicPrefixes the advertisedPublicPrefixes value to set + * @return the ExpressRouteCircuitPeeringConfig object itself. + */ + public ExpressRouteCircuitPeeringConfig withAdvertisedPublicPrefixes(List advertisedPublicPrefixes) { + this.advertisedPublicPrefixes = advertisedPublicPrefixes; + return this; + } + + /** + * Get the communities of bgp peering. Specified for microsoft peering. + * + * @return the advertisedCommunities value + */ + public List advertisedCommunities() { + return this.advertisedCommunities; + } + + /** + * Set the communities of bgp peering. Specified for microsoft peering. + * + * @param advertisedCommunities the advertisedCommunities value to set + * @return the ExpressRouteCircuitPeeringConfig object itself. + */ + public ExpressRouteCircuitPeeringConfig withAdvertisedCommunities(List advertisedCommunities) { + this.advertisedCommunities = advertisedCommunities; + return this; + } + + /** + * Get the advertised public prefix state of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'. + * + * @return the advertisedPublicPrefixesState value + */ + public ExpressRouteCircuitPeeringAdvertisedPublicPrefixState advertisedPublicPrefixesState() { + return this.advertisedPublicPrefixesState; + } + + /** + * Get the legacy mode of the peering. + * + * @return the legacyMode value + */ + public Integer legacyMode() { + return this.legacyMode; + } + + /** + * Set the legacy mode of the peering. + * + * @param legacyMode the legacyMode value to set + * @return the ExpressRouteCircuitPeeringConfig object itself. + */ + public ExpressRouteCircuitPeeringConfig withLegacyMode(Integer legacyMode) { + this.legacyMode = legacyMode; + return this; + } + + /** + * Get the CustomerASN of the peering. + * + * @return the customerASN value + */ + public Integer customerASN() { + return this.customerASN; + } + + /** + * Set the CustomerASN of the peering. + * + * @param customerASN the customerASN value to set + * @return the ExpressRouteCircuitPeeringConfig object itself. + */ + public ExpressRouteCircuitPeeringConfig withCustomerASN(Integer customerASN) { + this.customerASN = customerASN; + return this; + } + + /** + * Get the RoutingRegistryName of the configuration. + * + * @return the routingRegistryName value + */ + public String routingRegistryName() { + return this.routingRegistryName; + } + + /** + * Set the RoutingRegistryName of the configuration. + * + * @param routingRegistryName the routingRegistryName value to set + * @return the ExpressRouteCircuitPeeringConfig object itself. + */ + public ExpressRouteCircuitPeeringConfig withRoutingRegistryName(String routingRegistryName) { + this.routingRegistryName = routingRegistryName; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringId.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringId.java new file mode 100644 index 000000000000..b24afd459759 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringId.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * ExpressRoute circuit peering identifier. + */ +public class ExpressRouteCircuitPeeringId { + /** + * The ID of the ExpressRoute circuit peering. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the ID of the ExpressRoute circuit peering. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the ID of the ExpressRoute circuit peering. + * + * @param id the id value to set + * @return the ExpressRouteCircuitPeeringId object itself. + */ + public ExpressRouteCircuitPeeringId withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringState.java new file mode 100644 index 000000000000..686fcfc0a7ca --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeeringState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRouteCircuitPeeringState. + */ +public final class ExpressRouteCircuitPeeringState extends ExpandableStringEnum { + /** Static value Disabled for ExpressRouteCircuitPeeringState. */ + public static final ExpressRouteCircuitPeeringState DISABLED = fromString("Disabled"); + + /** Static value Enabled for ExpressRouteCircuitPeeringState. */ + public static final ExpressRouteCircuitPeeringState ENABLED = fromString("Enabled"); + + /** + * Creates or finds a ExpressRouteCircuitPeeringState from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteCircuitPeeringState + */ + @JsonCreator + public static ExpressRouteCircuitPeeringState fromString(String name) { + return fromString(name, ExpressRouteCircuitPeeringState.class); + } + + /** + * @return known ExpressRouteCircuitPeeringState values + */ + public static Collection values() { + return values(ExpressRouteCircuitPeeringState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeerings.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeerings.java new file mode 100644 index 000000000000..91a75b7b2ccf --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeerings.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitPeeringsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ExpressRouteCircuitPeerings. + */ +public interface ExpressRouteCircuitPeerings extends SupportsCreating, HasInner { + /** + * Gets the specified peering for the express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String circuitName, String peeringName); + + /** + * Gets all peerings in a specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String circuitName); + + /** + * Deletes the specified peering from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String circuitName, String peeringName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitReference.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitReference.java new file mode 100644 index 000000000000..360cc51eb694 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitReference.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Reference to an express route circuit. + */ +public class ExpressRouteCircuitReference { + /** + * Corresponding Express Route Circuit Id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get corresponding Express Route Circuit Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set corresponding Express Route Circuit Id. + * + * @param id the id value to set + * @return the ExpressRouteCircuitReference object itself. + */ + public ExpressRouteCircuitReference withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitRoutesTable.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitRoutesTable.java new file mode 100644 index 000000000000..a9c078b66fd8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitRoutesTable.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The routes table associated with the ExpressRouteCircuit. + */ +public class ExpressRouteCircuitRoutesTable { + /** + * IP address of a network entity. + */ + @JsonProperty(value = "network") + private String network; + + /** + * NextHop address. + */ + @JsonProperty(value = "nextHop") + private String nextHop; + + /** + * Local preference value as set with the set local-preference route-map + * configuration command. + */ + @JsonProperty(value = "locPrf") + private String locPrf; + + /** + * Route Weight. + */ + @JsonProperty(value = "weight") + private Integer weight; + + /** + * Autonomous system paths to the destination network. + */ + @JsonProperty(value = "path") + private String path; + + /** + * Get iP address of a network entity. + * + * @return the network value + */ + public String network() { + return this.network; + } + + /** + * Set iP address of a network entity. + * + * @param network the network value to set + * @return the ExpressRouteCircuitRoutesTable object itself. + */ + public ExpressRouteCircuitRoutesTable withNetwork(String network) { + this.network = network; + return this; + } + + /** + * Get nextHop address. + * + * @return the nextHop value + */ + public String nextHop() { + return this.nextHop; + } + + /** + * Set nextHop address. + * + * @param nextHop the nextHop value to set + * @return the ExpressRouteCircuitRoutesTable object itself. + */ + public ExpressRouteCircuitRoutesTable withNextHop(String nextHop) { + this.nextHop = nextHop; + return this; + } + + /** + * Get local preference value as set with the set local-preference route-map configuration command. + * + * @return the locPrf value + */ + public String locPrf() { + return this.locPrf; + } + + /** + * Set local preference value as set with the set local-preference route-map configuration command. + * + * @param locPrf the locPrf value to set + * @return the ExpressRouteCircuitRoutesTable object itself. + */ + public ExpressRouteCircuitRoutesTable withLocPrf(String locPrf) { + this.locPrf = locPrf; + return this; + } + + /** + * Get route Weight. + * + * @return the weight value + */ + public Integer weight() { + return this.weight; + } + + /** + * Set route Weight. + * + * @param weight the weight value to set + * @return the ExpressRouteCircuitRoutesTable object itself. + */ + public ExpressRouteCircuitRoutesTable withWeight(Integer weight) { + this.weight = weight; + return this; + } + + /** + * Get autonomous system paths to the destination network. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set autonomous system paths to the destination network. + * + * @param path the path value to set + * @return the ExpressRouteCircuitRoutesTable object itself. + */ + public ExpressRouteCircuitRoutesTable withPath(String path) { + this.path = path; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitRoutesTableSummary.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitRoutesTableSummary.java new file mode 100644 index 000000000000..d14483a57461 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitRoutesTableSummary.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The routes table associated with the ExpressRouteCircuit. + */ +public class ExpressRouteCircuitRoutesTableSummary { + /** + * IP address of the neighbor. + */ + @JsonProperty(value = "neighbor") + private String neighbor; + + /** + * BGP version number spoken to the neighbor. + */ + @JsonProperty(value = "v") + private Integer v; + + /** + * Autonomous system number. + */ + @JsonProperty(value = "as") + private Integer as; + + /** + * The length of time that the BGP session has been in the Established + * state, or the current status if not in the Established state. + */ + @JsonProperty(value = "upDown") + private String upDown; + + /** + * Current state of the BGP session, and the number of prefixes that have + * been received from a neighbor or peer group. + */ + @JsonProperty(value = "statePfxRcd") + private String statePfxRcd; + + /** + * Get iP address of the neighbor. + * + * @return the neighbor value + */ + public String neighbor() { + return this.neighbor; + } + + /** + * Set iP address of the neighbor. + * + * @param neighbor the neighbor value to set + * @return the ExpressRouteCircuitRoutesTableSummary object itself. + */ + public ExpressRouteCircuitRoutesTableSummary withNeighbor(String neighbor) { + this.neighbor = neighbor; + return this; + } + + /** + * Get bGP version number spoken to the neighbor. + * + * @return the v value + */ + public Integer v() { + return this.v; + } + + /** + * Set bGP version number spoken to the neighbor. + * + * @param v the v value to set + * @return the ExpressRouteCircuitRoutesTableSummary object itself. + */ + public ExpressRouteCircuitRoutesTableSummary withV(Integer v) { + this.v = v; + return this; + } + + /** + * Get autonomous system number. + * + * @return the as value + */ + public Integer as() { + return this.as; + } + + /** + * Set autonomous system number. + * + * @param as the as value to set + * @return the ExpressRouteCircuitRoutesTableSummary object itself. + */ + public ExpressRouteCircuitRoutesTableSummary withAs(Integer as) { + this.as = as; + return this; + } + + /** + * Get the length of time that the BGP session has been in the Established state, or the current status if not in the Established state. + * + * @return the upDown value + */ + public String upDown() { + return this.upDown; + } + + /** + * Set the length of time that the BGP session has been in the Established state, or the current status if not in the Established state. + * + * @param upDown the upDown value to set + * @return the ExpressRouteCircuitRoutesTableSummary object itself. + */ + public ExpressRouteCircuitRoutesTableSummary withUpDown(String upDown) { + this.upDown = upDown; + return this; + } + + /** + * Get current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + * + * @return the statePfxRcd value + */ + public String statePfxRcd() { + return this.statePfxRcd; + } + + /** + * Set current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + * + * @param statePfxRcd the statePfxRcd value to set + * @return the ExpressRouteCircuitRoutesTableSummary object itself. + */ + public ExpressRouteCircuitRoutesTableSummary withStatePfxRcd(String statePfxRcd) { + this.statePfxRcd = statePfxRcd; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitServiceProviderProperties.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitServiceProviderProperties.java new file mode 100644 index 000000000000..f2f9495ac296 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitServiceProviderProperties.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains ServiceProviderProperties in an ExpressRouteCircuit. + */ +public class ExpressRouteCircuitServiceProviderProperties { + /** + * The serviceProviderName. + */ + @JsonProperty(value = "serviceProviderName") + private String serviceProviderName; + + /** + * The peering location. + */ + @JsonProperty(value = "peeringLocation") + private String peeringLocation; + + /** + * The BandwidthInMbps. + */ + @JsonProperty(value = "bandwidthInMbps") + private Integer bandwidthInMbps; + + /** + * Get the serviceProviderName. + * + * @return the serviceProviderName value + */ + public String serviceProviderName() { + return this.serviceProviderName; + } + + /** + * Set the serviceProviderName. + * + * @param serviceProviderName the serviceProviderName value to set + * @return the ExpressRouteCircuitServiceProviderProperties object itself. + */ + public ExpressRouteCircuitServiceProviderProperties withServiceProviderName(String serviceProviderName) { + this.serviceProviderName = serviceProviderName; + return this; + } + + /** + * Get the peering location. + * + * @return the peeringLocation value + */ + public String peeringLocation() { + return this.peeringLocation; + } + + /** + * Set the peering location. + * + * @param peeringLocation the peeringLocation value to set + * @return the ExpressRouteCircuitServiceProviderProperties object itself. + */ + public ExpressRouteCircuitServiceProviderProperties withPeeringLocation(String peeringLocation) { + this.peeringLocation = peeringLocation; + return this; + } + + /** + * Get the BandwidthInMbps. + * + * @return the bandwidthInMbps value + */ + public Integer bandwidthInMbps() { + return this.bandwidthInMbps; + } + + /** + * Set the BandwidthInMbps. + * + * @param bandwidthInMbps the bandwidthInMbps value to set + * @return the ExpressRouteCircuitServiceProviderProperties object itself. + */ + public ExpressRouteCircuitServiceProviderProperties withBandwidthInMbps(Integer bandwidthInMbps) { + this.bandwidthInMbps = bandwidthInMbps; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitSku.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitSku.java new file mode 100644 index 000000000000..9afc9abf1926 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitSku.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains SKU in an ExpressRouteCircuit. + */ +public class ExpressRouteCircuitSku { + /** + * The name of the SKU. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The tier of the SKU. Possible values include: 'Standard', 'Premium', + * 'Basic', 'Local'. + */ + @JsonProperty(value = "tier") + private ExpressRouteCircuitSkuTier tier; + + /** + * The family of the SKU. Possible values include: 'UnlimitedData', + * 'MeteredData'. + */ + @JsonProperty(value = "family") + private ExpressRouteCircuitSkuFamily family; + + /** + * Get the name of the SKU. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the SKU. + * + * @param name the name value to set + * @return the ExpressRouteCircuitSku object itself. + */ + public ExpressRouteCircuitSku withName(String name) { + this.name = name; + return this; + } + + /** + * Get the tier of the SKU. Possible values include: 'Standard', 'Premium', 'Basic', 'Local'. + * + * @return the tier value + */ + public ExpressRouteCircuitSkuTier tier() { + return this.tier; + } + + /** + * Set the tier of the SKU. Possible values include: 'Standard', 'Premium', 'Basic', 'Local'. + * + * @param tier the tier value to set + * @return the ExpressRouteCircuitSku object itself. + */ + public ExpressRouteCircuitSku withTier(ExpressRouteCircuitSkuTier tier) { + this.tier = tier; + return this; + } + + /** + * Get the family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData'. + * + * @return the family value + */ + public ExpressRouteCircuitSkuFamily family() { + return this.family; + } + + /** + * Set the family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData'. + * + * @param family the family value to set + * @return the ExpressRouteCircuitSku object itself. + */ + public ExpressRouteCircuitSku withFamily(ExpressRouteCircuitSkuFamily family) { + this.family = family; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitSkuFamily.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitSkuFamily.java new file mode 100644 index 000000000000..37a881279a04 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitSkuFamily.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRouteCircuitSkuFamily. + */ +public final class ExpressRouteCircuitSkuFamily extends ExpandableStringEnum { + /** Static value UnlimitedData for ExpressRouteCircuitSkuFamily. */ + public static final ExpressRouteCircuitSkuFamily UNLIMITED_DATA = fromString("UnlimitedData"); + + /** Static value MeteredData for ExpressRouteCircuitSkuFamily. */ + public static final ExpressRouteCircuitSkuFamily METERED_DATA = fromString("MeteredData"); + + /** + * Creates or finds a ExpressRouteCircuitSkuFamily from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteCircuitSkuFamily + */ + @JsonCreator + public static ExpressRouteCircuitSkuFamily fromString(String name) { + return fromString(name, ExpressRouteCircuitSkuFamily.class); + } + + /** + * @return known ExpressRouteCircuitSkuFamily values + */ + public static Collection values() { + return values(ExpressRouteCircuitSkuFamily.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitSkuTier.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitSkuTier.java new file mode 100644 index 000000000000..5baee489c5b1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitSkuTier.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRouteCircuitSkuTier. + */ +public final class ExpressRouteCircuitSkuTier extends ExpandableStringEnum { + /** Static value Standard for ExpressRouteCircuitSkuTier. */ + public static final ExpressRouteCircuitSkuTier STANDARD = fromString("Standard"); + + /** Static value Premium for ExpressRouteCircuitSkuTier. */ + public static final ExpressRouteCircuitSkuTier PREMIUM = fromString("Premium"); + + /** Static value Basic for ExpressRouteCircuitSkuTier. */ + public static final ExpressRouteCircuitSkuTier BASIC = fromString("Basic"); + + /** Static value Local for ExpressRouteCircuitSkuTier. */ + public static final ExpressRouteCircuitSkuTier LOCAL = fromString("Local"); + + /** + * Creates or finds a ExpressRouteCircuitSkuTier from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteCircuitSkuTier + */ + @JsonCreator + public static ExpressRouteCircuitSkuTier fromString(String name) { + return fromString(name, ExpressRouteCircuitSkuTier.class); + } + + /** + * @return known ExpressRouteCircuitSkuTier values + */ + public static Collection values() { + return values(ExpressRouteCircuitSkuTier.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitStats.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitStats.java new file mode 100644 index 000000000000..daa26ca4bcc6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitStats.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitStatsInner; + +/** + * Type representing ExpressRouteCircuitStats. + */ +public interface ExpressRouteCircuitStats extends HasInner, HasManager { + /** + * @return the primarybytesIn value. + */ + Long primarybytesIn(); + + /** + * @return the primarybytesOut value. + */ + Long primarybytesOut(); + + /** + * @return the secondarybytesIn value. + */ + Long secondarybytesIn(); + + /** + * @return the secondarybytesOut value. + */ + Long secondarybytesOut(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuits.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuits.java new file mode 100644 index 000000000000..a0037f10ba22 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuits.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.network.v2019_09_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.network.v2019_09_01.implementation.ExpressRouteCircuitsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ExpressRouteCircuits. + */ +public interface ExpressRouteCircuits extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Gets the currently advertised ARP table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listArpTableAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath); + + /** + * Gets the currently advertised routes table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listRoutesTableAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath); + + /** + * Gets the currently advertised routes table summary associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listRoutesTableSummaryAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath); + + /** + * Gets all the stats from an express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getStatsAsync(String resourceGroupName, String circuitName); + + /** + * Gets all stats from an express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getPeeringStatsAsync(String resourceGroupName, String circuitName, String peeringName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitsArpTableListResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitsArpTableListResult.java new file mode 100644 index 000000000000..e9c683e2b0ea --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitsArpTableListResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitsArpTableListResultInner; +import java.util.List; + +/** + * Type representing ExpressRouteCircuitsArpTableListResult. + */ +public interface ExpressRouteCircuitsArpTableListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitsRoutesTableListResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitsRoutesTableListResult.java new file mode 100644 index 000000000000..3aecfb1bf5d8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitsRoutesTableListResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitsRoutesTableListResultInner; +import java.util.List; + +/** + * Type representing ExpressRouteCircuitsRoutesTableListResult. + */ +public interface ExpressRouteCircuitsRoutesTableListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitsRoutesTableSummaryListResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitsRoutesTableSummaryListResult.java new file mode 100644 index 000000000000..d24cf361d315 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitsRoutesTableSummaryListResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitsRoutesTableSummaryListResultInner; +import java.util.List; + +/** + * Type representing ExpressRouteCircuitsRoutesTableSummaryListResult. + */ +public interface ExpressRouteCircuitsRoutesTableSummaryListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnection.java new file mode 100644 index 000000000000..bbf94dcc4a40 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnection.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteConnectionInner; +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.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing ExpressRouteConnection. + */ +public interface ExpressRouteConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the authorizationKey value. + */ + String authorizationKey(); + + /** + * @return the enableInternetSecurity value. + */ + Boolean enableInternetSecurity(); + + /** + * @return the expressRouteCircuitPeering value. + */ + ExpressRouteCircuitPeeringId expressRouteCircuitPeering(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the routingWeight value. + */ + Integer routingWeight(); + + /** + * The entirety of the ExpressRouteConnection definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithExpressRouteGateway, DefinitionStages.WithExpressRouteCircuitPeering, DefinitionStages.WithName, DefinitionStages.WithCreate { + } + + /** + * Grouping of ExpressRouteConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ExpressRouteConnection definition. + */ + interface Blank extends WithExpressRouteGateway { + } + + /** + * The stage of the expressrouteconnection definition allowing to specify ExpressRouteGateway. + */ + interface WithExpressRouteGateway { + /** + * Specifies resourceGroupName, expressRouteGatewayName. + * @param resourceGroupName The name of the resource group + * @param expressRouteGatewayName The name of the ExpressRoute gateway + * @return the next definition stage + */ + WithExpressRouteCircuitPeering withExistingExpressRouteGateway(String resourceGroupName, String expressRouteGatewayName); + } + + /** + * The stage of the expressrouteconnection definition allowing to specify ExpressRouteCircuitPeering. + */ + interface WithExpressRouteCircuitPeering { + /** + * Specifies expressRouteCircuitPeering. + * @param expressRouteCircuitPeering The ExpressRoute circuit peering + * @return the next definition stage + */ + WithName withExpressRouteCircuitPeering(ExpressRouteCircuitPeeringId expressRouteCircuitPeering); + } + + /** + * The stage of the expressrouteconnection definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the expressrouteconnection definition allowing to specify AuthorizationKey. + */ + interface WithAuthorizationKey { + /** + * Specifies authorizationKey. + * @param authorizationKey Authorization key to establish the connection + * @return the next definition stage + */ + WithCreate withAuthorizationKey(String authorizationKey); + } + + /** + * The stage of the expressrouteconnection definition allowing to specify EnableInternetSecurity. + */ + interface WithEnableInternetSecurity { + /** + * Specifies enableInternetSecurity. + * @param enableInternetSecurity Enable internet security + * @return the next definition stage + */ + WithCreate withEnableInternetSecurity(Boolean enableInternetSecurity); + } + + /** + * The stage of the expressrouteconnection definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the expressrouteconnection definition allowing to specify RoutingWeight. + */ + interface WithRoutingWeight { + /** + * Specifies routingWeight. + * @param routingWeight The routing weight associated to the connection + * @return the next definition stage + */ + WithCreate withRoutingWeight(Integer routingWeight); + } + + /** + * 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.WithAuthorizationKey, DefinitionStages.WithEnableInternetSecurity, DefinitionStages.WithId, DefinitionStages.WithRoutingWeight { + } + } + /** + * The template for a ExpressRouteConnection update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAuthorizationKey, UpdateStages.WithEnableInternetSecurity, UpdateStages.WithId, UpdateStages.WithRoutingWeight { + } + + /** + * Grouping of ExpressRouteConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the expressrouteconnection update allowing to specify AuthorizationKey. + */ + interface WithAuthorizationKey { + /** + * Specifies authorizationKey. + * @param authorizationKey Authorization key to establish the connection + * @return the next update stage + */ + Update withAuthorizationKey(String authorizationKey); + } + + /** + * The stage of the expressrouteconnection update allowing to specify EnableInternetSecurity. + */ + interface WithEnableInternetSecurity { + /** + * Specifies enableInternetSecurity. + * @param enableInternetSecurity Enable internet security + * @return the next update stage + */ + Update withEnableInternetSecurity(Boolean enableInternetSecurity); + } + + /** + * The stage of the expressrouteconnection update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the expressrouteconnection update allowing to specify RoutingWeight. + */ + interface WithRoutingWeight { + /** + * Specifies routingWeight. + * @param routingWeight The routing weight associated to the connection + * @return the next update stage + */ + Update withRoutingWeight(Integer routingWeight); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnectionId.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnectionId.java new file mode 100644 index 000000000000..1cb1ca0f3701 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnectionId.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ID of the ExpressRouteConnection. + */ +public class ExpressRouteConnectionId { + /** + * The ID of the ExpressRouteConnection. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Get the ID of the ExpressRouteConnection. + * + * @return the id value + */ + public String id() { + return this.id; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnectionList.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnectionList.java new file mode 100644 index 000000000000..0e5c6e6374b9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnectionList.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteConnectionListInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteConnectionInner; +import java.util.List; + +/** + * Type representing ExpressRouteConnectionList. + */ +public interface ExpressRouteConnectionList extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnections.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnections.java new file mode 100644 index 000000000000..4a72077fc9da --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteConnections.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ExpressRouteConnections. + */ +public interface ExpressRouteConnections extends SupportsCreating, HasInner { + /** + * Lists ExpressRouteConnections. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String expressRouteGatewayName); + + /** + * Gets the specified ExpressRouteConnection. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the ExpressRoute connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName); + + /** + * Deletes a connection to a ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnection.java new file mode 100644 index 000000000000..fd38f94c75c0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnection.java @@ -0,0 +1,269 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCrossConnectionPeeringInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCrossConnectionInner; + +/** + * Type representing ExpressRouteCrossConnection. + */ +public interface ExpressRouteCrossConnection extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the bandwidthInMbps value. + */ + Integer bandwidthInMbps(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the expressRouteCircuit value. + */ + ExpressRouteCircuitReference expressRouteCircuit(); + + /** + * @return the peeringLocation value. + */ + String peeringLocation(); + + /** + * @return the peerings value. + */ + List peerings(); + + /** + * @return the primaryAzurePort value. + */ + String primaryAzurePort(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the secondaryAzurePort value. + */ + String secondaryAzurePort(); + + /** + * @return the serviceProviderNotes value. + */ + String serviceProviderNotes(); + + /** + * @return the serviceProviderProvisioningState value. + */ + ServiceProviderProvisioningState serviceProviderProvisioningState(); + + /** + * @return the sTag value. + */ + Integer sTag(); + + /** + * The entirety of the ExpressRouteCrossConnection definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of ExpressRouteCrossConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ExpressRouteCrossConnection definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the ExpressRouteCrossConnection definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the expressroutecrossconnection definition allowing to specify BandwidthInMbps. + */ + interface WithBandwidthInMbps { + /** + * Specifies bandwidthInMbps. + * @param bandwidthInMbps The circuit bandwidth In Mbps + * @return the next definition stage + */ + WithCreate withBandwidthInMbps(Integer bandwidthInMbps); + } + + /** + * The stage of the expressroutecrossconnection definition allowing to specify ExpressRouteCircuit. + */ + interface WithExpressRouteCircuit { + /** + * Specifies expressRouteCircuit. + * @param expressRouteCircuit The ExpressRouteCircuit + * @return the next definition stage + */ + WithCreate withExpressRouteCircuit(ExpressRouteCircuitReference expressRouteCircuit); + } + + /** + * The stage of the expressroutecrossconnection definition allowing to specify PeeringLocation. + */ + interface WithPeeringLocation { + /** + * Specifies peeringLocation. + * @param peeringLocation The peering location of the ExpressRoute circuit + * @return the next definition stage + */ + WithCreate withPeeringLocation(String peeringLocation); + } + + /** + * The stage of the expressroutecrossconnection definition allowing to specify Peerings. + */ + interface WithPeerings { + /** + * Specifies peerings. + * @param peerings The list of peerings + * @return the next definition stage + */ + WithCreate withPeerings(List peerings); + } + + /** + * The stage of the expressroutecrossconnection definition allowing to specify ServiceProviderNotes. + */ + interface WithServiceProviderNotes { + /** + * Specifies serviceProviderNotes. + * @param serviceProviderNotes Additional read only notes set by the connectivity provider + * @return the next definition stage + */ + WithCreate withServiceProviderNotes(String serviceProviderNotes); + } + + /** + * The stage of the expressroutecrossconnection definition allowing to specify ServiceProviderProvisioningState. + */ + interface WithServiceProviderProvisioningState { + /** + * Specifies serviceProviderProvisioningState. + * @param serviceProviderProvisioningState The provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + * @return the next definition stage + */ + WithCreate withServiceProviderProvisioningState(ServiceProviderProvisioningState serviceProviderProvisioningState); + } + + /** + * 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.WithBandwidthInMbps, DefinitionStages.WithExpressRouteCircuit, DefinitionStages.WithPeeringLocation, DefinitionStages.WithPeerings, DefinitionStages.WithServiceProviderNotes, DefinitionStages.WithServiceProviderProvisioningState { + } + } + /** + * The template for a ExpressRouteCrossConnection update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithBandwidthInMbps, UpdateStages.WithExpressRouteCircuit, UpdateStages.WithPeeringLocation, UpdateStages.WithPeerings, UpdateStages.WithServiceProviderNotes, UpdateStages.WithServiceProviderProvisioningState { + } + + /** + * Grouping of ExpressRouteCrossConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the expressroutecrossconnection update allowing to specify BandwidthInMbps. + */ + interface WithBandwidthInMbps { + /** + * Specifies bandwidthInMbps. + * @param bandwidthInMbps The circuit bandwidth In Mbps + * @return the next update stage + */ + Update withBandwidthInMbps(Integer bandwidthInMbps); + } + + /** + * The stage of the expressroutecrossconnection update allowing to specify ExpressRouteCircuit. + */ + interface WithExpressRouteCircuit { + /** + * Specifies expressRouteCircuit. + * @param expressRouteCircuit The ExpressRouteCircuit + * @return the next update stage + */ + Update withExpressRouteCircuit(ExpressRouteCircuitReference expressRouteCircuit); + } + + /** + * The stage of the expressroutecrossconnection update allowing to specify PeeringLocation. + */ + interface WithPeeringLocation { + /** + * Specifies peeringLocation. + * @param peeringLocation The peering location of the ExpressRoute circuit + * @return the next update stage + */ + Update withPeeringLocation(String peeringLocation); + } + + /** + * The stage of the expressroutecrossconnection update allowing to specify Peerings. + */ + interface WithPeerings { + /** + * Specifies peerings. + * @param peerings The list of peerings + * @return the next update stage + */ + Update withPeerings(List peerings); + } + + /** + * The stage of the expressroutecrossconnection update allowing to specify ServiceProviderNotes. + */ + interface WithServiceProviderNotes { + /** + * Specifies serviceProviderNotes. + * @param serviceProviderNotes Additional read only notes set by the connectivity provider + * @return the next update stage + */ + Update withServiceProviderNotes(String serviceProviderNotes); + } + + /** + * The stage of the expressroutecrossconnection update allowing to specify ServiceProviderProvisioningState. + */ + interface WithServiceProviderProvisioningState { + /** + * Specifies serviceProviderProvisioningState. + * @param serviceProviderProvisioningState The provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + * @return the next update stage + */ + Update withServiceProviderProvisioningState(ServiceProviderProvisioningState serviceProviderProvisioningState); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionPeering.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionPeering.java new file mode 100644 index 000000000000..0d17d76dab2e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionPeering.java @@ -0,0 +1,451 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCrossConnectionPeeringInner; +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.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing ExpressRouteCrossConnectionPeering. + */ +public interface ExpressRouteCrossConnectionPeering extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the azureASN value. + */ + Integer azureASN(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the gatewayManagerEtag value. + */ + String gatewayManagerEtag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the ipv6PeeringConfig value. + */ + Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig(); + + /** + * @return the lastModifiedBy value. + */ + String lastModifiedBy(); + + /** + * @return the microsoftPeeringConfig value. + */ + ExpressRouteCircuitPeeringConfig microsoftPeeringConfig(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the peerASN value. + */ + Long peerASN(); + + /** + * @return the peeringType value. + */ + ExpressRoutePeeringType peeringType(); + + /** + * @return the primaryAzurePort value. + */ + String primaryAzurePort(); + + /** + * @return the primaryPeerAddressPrefix value. + */ + String primaryPeerAddressPrefix(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the secondaryAzurePort value. + */ + String secondaryAzurePort(); + + /** + * @return the secondaryPeerAddressPrefix value. + */ + String secondaryPeerAddressPrefix(); + + /** + * @return the sharedKey value. + */ + String sharedKey(); + + /** + * @return the state value. + */ + ExpressRoutePeeringState state(); + + /** + * @return the vlanId value. + */ + Integer vlanId(); + + /** + * The entirety of the ExpressRouteCrossConnectionPeering definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithExpressRouteCrossConnection, DefinitionStages.WithCreate { + } + + /** + * Grouping of ExpressRouteCrossConnectionPeering definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ExpressRouteCrossConnectionPeering definition. + */ + interface Blank extends WithExpressRouteCrossConnection { + } + + /** + * The stage of the expressroutecrossconnectionpeering definition allowing to specify ExpressRouteCrossConnection. + */ + interface WithExpressRouteCrossConnection { + /** + * Specifies resourceGroupName, crossConnectionName. + * @param resourceGroupName The name of the resource group + * @param crossConnectionName The name of the ExpressRouteCrossConnection + * @return the next definition stage + */ + WithCreate withExistingExpressRouteCrossConnection(String resourceGroupName, String crossConnectionName); + } + + /** + * The stage of the expressroutecrossconnectionpeering definition allowing to specify GatewayManagerEtag. + */ + interface WithGatewayManagerEtag { + /** + * Specifies gatewayManagerEtag. + * @param gatewayManagerEtag The GatewayManager Etag + * @return the next definition stage + */ + WithCreate withGatewayManagerEtag(String gatewayManagerEtag); + } + + /** + * The stage of the expressroutecrossconnectionpeering definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the expressroutecrossconnectionpeering definition allowing to specify Ipv6PeeringConfig. + */ + interface WithIpv6PeeringConfig { + /** + * Specifies ipv6PeeringConfig. + * @param ipv6PeeringConfig The IPv6 peering configuration + * @return the next definition stage + */ + WithCreate withIpv6PeeringConfig(Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig); + } + + /** + * The stage of the expressroutecrossconnectionpeering definition allowing to specify MicrosoftPeeringConfig. + */ + interface WithMicrosoftPeeringConfig { + /** + * Specifies microsoftPeeringConfig. + * @param microsoftPeeringConfig The Microsoft peering configuration + * @return the next definition stage + */ + WithCreate withMicrosoftPeeringConfig(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig); + } + + /** + * The stage of the expressroutecrossconnectionpeering definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the expressroutecrossconnectionpeering definition allowing to specify PeerASN. + */ + interface WithPeerASN { + /** + * Specifies peerASN. + * @param peerASN The peer ASN + * @return the next definition stage + */ + WithCreate withPeerASN(Long peerASN); + } + + /** + * The stage of the expressroutecrossconnectionpeering definition allowing to specify PeeringType. + */ + interface WithPeeringType { + /** + * Specifies peeringType. + * @param peeringType The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + * @return the next definition stage + */ + WithCreate withPeeringType(ExpressRoutePeeringType peeringType); + } + + /** + * The stage of the expressroutecrossconnectionpeering definition allowing to specify PrimaryPeerAddressPrefix. + */ + interface WithPrimaryPeerAddressPrefix { + /** + * Specifies primaryPeerAddressPrefix. + * @param primaryPeerAddressPrefix The primary address prefix + * @return the next definition stage + */ + WithCreate withPrimaryPeerAddressPrefix(String primaryPeerAddressPrefix); + } + + /** + * The stage of the expressroutecrossconnectionpeering definition allowing to specify SecondaryPeerAddressPrefix. + */ + interface WithSecondaryPeerAddressPrefix { + /** + * Specifies secondaryPeerAddressPrefix. + * @param secondaryPeerAddressPrefix The secondary address prefix + * @return the next definition stage + */ + WithCreate withSecondaryPeerAddressPrefix(String secondaryPeerAddressPrefix); + } + + /** + * The stage of the expressroutecrossconnectionpeering definition allowing to specify SharedKey. + */ + interface WithSharedKey { + /** + * Specifies sharedKey. + * @param sharedKey The shared key + * @return the next definition stage + */ + WithCreate withSharedKey(String sharedKey); + } + + /** + * The stage of the expressroutecrossconnectionpeering definition allowing to specify State. + */ + interface WithState { + /** + * Specifies state. + * @param state The peering state. Possible values include: 'Disabled', 'Enabled' + * @return the next definition stage + */ + WithCreate withState(ExpressRoutePeeringState state); + } + + /** + * The stage of the expressroutecrossconnectionpeering definition allowing to specify VlanId. + */ + interface WithVlanId { + /** + * Specifies vlanId. + * @param vlanId The VLAN ID + * @return the next definition stage + */ + WithCreate withVlanId(Integer vlanId); + } + + /** + * 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.WithGatewayManagerEtag, DefinitionStages.WithId, DefinitionStages.WithIpv6PeeringConfig, DefinitionStages.WithMicrosoftPeeringConfig, DefinitionStages.WithName, DefinitionStages.WithPeerASN, DefinitionStages.WithPeeringType, DefinitionStages.WithPrimaryPeerAddressPrefix, DefinitionStages.WithSecondaryPeerAddressPrefix, DefinitionStages.WithSharedKey, DefinitionStages.WithState, DefinitionStages.WithVlanId { + } + } + /** + * The template for a ExpressRouteCrossConnectionPeering update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithGatewayManagerEtag, UpdateStages.WithId, UpdateStages.WithIpv6PeeringConfig, UpdateStages.WithMicrosoftPeeringConfig, UpdateStages.WithName, UpdateStages.WithPeerASN, UpdateStages.WithPeeringType, UpdateStages.WithPrimaryPeerAddressPrefix, UpdateStages.WithSecondaryPeerAddressPrefix, UpdateStages.WithSharedKey, UpdateStages.WithState, UpdateStages.WithVlanId { + } + + /** + * Grouping of ExpressRouteCrossConnectionPeering update stages. + */ + interface UpdateStages { + /** + * The stage of the expressroutecrossconnectionpeering update allowing to specify GatewayManagerEtag. + */ + interface WithGatewayManagerEtag { + /** + * Specifies gatewayManagerEtag. + * @param gatewayManagerEtag The GatewayManager Etag + * @return the next update stage + */ + Update withGatewayManagerEtag(String gatewayManagerEtag); + } + + /** + * The stage of the expressroutecrossconnectionpeering update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the expressroutecrossconnectionpeering update allowing to specify Ipv6PeeringConfig. + */ + interface WithIpv6PeeringConfig { + /** + * Specifies ipv6PeeringConfig. + * @param ipv6PeeringConfig The IPv6 peering configuration + * @return the next update stage + */ + Update withIpv6PeeringConfig(Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig); + } + + /** + * The stage of the expressroutecrossconnectionpeering update allowing to specify MicrosoftPeeringConfig. + */ + interface WithMicrosoftPeeringConfig { + /** + * Specifies microsoftPeeringConfig. + * @param microsoftPeeringConfig The Microsoft peering configuration + * @return the next update stage + */ + Update withMicrosoftPeeringConfig(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig); + } + + /** + * The stage of the expressroutecrossconnectionpeering update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the expressroutecrossconnectionpeering update allowing to specify PeerASN. + */ + interface WithPeerASN { + /** + * Specifies peerASN. + * @param peerASN The peer ASN + * @return the next update stage + */ + Update withPeerASN(Long peerASN); + } + + /** + * The stage of the expressroutecrossconnectionpeering update allowing to specify PeeringType. + */ + interface WithPeeringType { + /** + * Specifies peeringType. + * @param peeringType The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + * @return the next update stage + */ + Update withPeeringType(ExpressRoutePeeringType peeringType); + } + + /** + * The stage of the expressroutecrossconnectionpeering update allowing to specify PrimaryPeerAddressPrefix. + */ + interface WithPrimaryPeerAddressPrefix { + /** + * Specifies primaryPeerAddressPrefix. + * @param primaryPeerAddressPrefix The primary address prefix + * @return the next update stage + */ + Update withPrimaryPeerAddressPrefix(String primaryPeerAddressPrefix); + } + + /** + * The stage of the expressroutecrossconnectionpeering update allowing to specify SecondaryPeerAddressPrefix. + */ + interface WithSecondaryPeerAddressPrefix { + /** + * Specifies secondaryPeerAddressPrefix. + * @param secondaryPeerAddressPrefix The secondary address prefix + * @return the next update stage + */ + Update withSecondaryPeerAddressPrefix(String secondaryPeerAddressPrefix); + } + + /** + * The stage of the expressroutecrossconnectionpeering update allowing to specify SharedKey. + */ + interface WithSharedKey { + /** + * Specifies sharedKey. + * @param sharedKey The shared key + * @return the next update stage + */ + Update withSharedKey(String sharedKey); + } + + /** + * The stage of the expressroutecrossconnectionpeering update allowing to specify State. + */ + interface WithState { + /** + * Specifies state. + * @param state The peering state. Possible values include: 'Disabled', 'Enabled' + * @return the next update stage + */ + Update withState(ExpressRoutePeeringState state); + } + + /** + * The stage of the expressroutecrossconnectionpeering update allowing to specify VlanId. + */ + interface WithVlanId { + /** + * Specifies vlanId. + * @param vlanId The VLAN ID + * @return the next update stage + */ + Update withVlanId(Integer vlanId); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionPeerings.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionPeerings.java new file mode 100644 index 000000000000..0f666f71e2f9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionPeerings.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCrossConnectionPeeringsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ExpressRouteCrossConnectionPeerings. + */ +public interface ExpressRouteCrossConnectionPeerings extends SupportsCreating, HasInner { + /** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String crossConnectionName, String peeringName); + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String crossConnectionName); + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String crossConnectionName, String peeringName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionRoutesTableSummary.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionRoutesTableSummary.java new file mode 100644 index 000000000000..d95af5844c38 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionRoutesTableSummary.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The routes table associated with the ExpressRouteCircuit. + */ +public class ExpressRouteCrossConnectionRoutesTableSummary { + /** + * IP address of Neighbor router. + */ + @JsonProperty(value = "neighbor") + private String neighbor; + + /** + * Autonomous system number. + */ + @JsonProperty(value = "asn") + private Integer asn; + + /** + * The length of time that the BGP session has been in the Established + * state, or the current status if not in the Established state. + */ + @JsonProperty(value = "upDown") + private String upDown; + + /** + * Current state of the BGP session, and the number of prefixes that have + * been received from a neighbor or peer group. + */ + @JsonProperty(value = "stateOrPrefixesReceived") + private String stateOrPrefixesReceived; + + /** + * Get iP address of Neighbor router. + * + * @return the neighbor value + */ + public String neighbor() { + return this.neighbor; + } + + /** + * Set iP address of Neighbor router. + * + * @param neighbor the neighbor value to set + * @return the ExpressRouteCrossConnectionRoutesTableSummary object itself. + */ + public ExpressRouteCrossConnectionRoutesTableSummary withNeighbor(String neighbor) { + this.neighbor = neighbor; + return this; + } + + /** + * Get autonomous system number. + * + * @return the asn value + */ + public Integer asn() { + return this.asn; + } + + /** + * Set autonomous system number. + * + * @param asn the asn value to set + * @return the ExpressRouteCrossConnectionRoutesTableSummary object itself. + */ + public ExpressRouteCrossConnectionRoutesTableSummary withAsn(Integer asn) { + this.asn = asn; + return this; + } + + /** + * Get the length of time that the BGP session has been in the Established state, or the current status if not in the Established state. + * + * @return the upDown value + */ + public String upDown() { + return this.upDown; + } + + /** + * Set the length of time that the BGP session has been in the Established state, or the current status if not in the Established state. + * + * @param upDown the upDown value to set + * @return the ExpressRouteCrossConnectionRoutesTableSummary object itself. + */ + public ExpressRouteCrossConnectionRoutesTableSummary withUpDown(String upDown) { + this.upDown = upDown; + return this; + } + + /** + * Get current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + * + * @return the stateOrPrefixesReceived value + */ + public String stateOrPrefixesReceived() { + return this.stateOrPrefixesReceived; + } + + /** + * Set current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + * + * @param stateOrPrefixesReceived the stateOrPrefixesReceived value to set + * @return the ExpressRouteCrossConnectionRoutesTableSummary object itself. + */ + public ExpressRouteCrossConnectionRoutesTableSummary withStateOrPrefixesReceived(String stateOrPrefixesReceived) { + this.stateOrPrefixesReceived = stateOrPrefixesReceived; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnections.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnections.java new file mode 100644 index 000000000000..fd4eccc9aded --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnections.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +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.network.v2019_09_01.implementation.ExpressRouteCrossConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ExpressRouteCrossConnections. + */ +public interface ExpressRouteCrossConnections extends SupportsCreating, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath); + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath); + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.java new file mode 100644 index 000000000000..e82d2f7a1711 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner; +import java.util.List; + +/** + * Type representing ExpressRouteCrossConnectionsRoutesTableSummaryListResult. + */ +public interface ExpressRouteCrossConnectionsRoutesTableSummaryListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGateway.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGateway.java new file mode 100644 index 000000000000..ffff1af3a18e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGateway.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteGatewayInner; + +/** + * Type representing ExpressRouteGateway. + */ +public interface ExpressRouteGateway extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the autoScaleConfiguration value. + */ + ExpressRouteGatewayPropertiesAutoScaleConfiguration autoScaleConfiguration(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the expressRouteConnections value. + */ + List expressRouteConnections(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the virtualHub value. + */ + VirtualHubId virtualHub(); + + /** + * The entirety of the ExpressRouteGateway definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithVirtualHub, DefinitionStages.WithCreate { + } + + /** + * Grouping of ExpressRouteGateway definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ExpressRouteGateway definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the ExpressRouteGateway definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the expressroutegateway definition allowing to specify VirtualHub. + */ + interface WithVirtualHub { + /** + * Specifies virtualHub. + * @param virtualHub The Virtual Hub where the ExpressRoute gateway is or will be deployed + * @return the next definition stage +*/ + WithCreate withVirtualHub(VirtualHubId virtualHub); + } + + /** + * The stage of the expressroutegateway definition allowing to specify AutoScaleConfiguration. + */ + interface WithAutoScaleConfiguration { + /** + * Specifies autoScaleConfiguration. + * @param autoScaleConfiguration Configuration for auto scaling + * @return the next definition stage + */ + WithCreate withAutoScaleConfiguration(ExpressRouteGatewayPropertiesAutoScaleConfiguration autoScaleConfiguration); + } + + /** + * 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.WithAutoScaleConfiguration { + } + } + /** + * The template for a ExpressRouteGateway update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAutoScaleConfiguration { + } + + /** + * Grouping of ExpressRouteGateway update stages. + */ + interface UpdateStages { + /** + * The stage of the expressroutegateway update allowing to specify AutoScaleConfiguration. + */ + interface WithAutoScaleConfiguration { + /** + * Specifies autoScaleConfiguration. + * @param autoScaleConfiguration Configuration for auto scaling + * @return the next update stage + */ + Update withAutoScaleConfiguration(ExpressRouteGatewayPropertiesAutoScaleConfiguration autoScaleConfiguration); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGatewayPropertiesAutoScaleConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGatewayPropertiesAutoScaleConfiguration.java new file mode 100644 index 000000000000..f82d99b07ec8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGatewayPropertiesAutoScaleConfiguration.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration for auto scaling. + */ +public class ExpressRouteGatewayPropertiesAutoScaleConfiguration { + /** + * Minimum and maximum number of scale units to deploy. + */ + @JsonProperty(value = "bounds") + private ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds bounds; + + /** + * Get minimum and maximum number of scale units to deploy. + * + * @return the bounds value + */ + public ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds bounds() { + return this.bounds; + } + + /** + * Set minimum and maximum number of scale units to deploy. + * + * @param bounds the bounds value to set + * @return the ExpressRouteGatewayPropertiesAutoScaleConfiguration object itself. + */ + public ExpressRouteGatewayPropertiesAutoScaleConfiguration withBounds(ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds bounds) { + this.bounds = bounds; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.java new file mode 100644 index 000000000000..2d23c28272b0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Minimum and maximum number of scale units to deploy. + */ +public class ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds { + /** + * Minimum number of scale units deployed for ExpressRoute gateway. + */ + @JsonProperty(value = "min") + private Integer min; + + /** + * Maximum number of scale units deployed for ExpressRoute gateway. + */ + @JsonProperty(value = "max") + private Integer max; + + /** + * Get minimum number of scale units deployed for ExpressRoute gateway. + * + * @return the min value + */ + public Integer min() { + return this.min; + } + + /** + * Set minimum number of scale units deployed for ExpressRoute gateway. + * + * @param min the min value to set + * @return the ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds object itself. + */ + public ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds withMin(Integer min) { + this.min = min; + return this; + } + + /** + * Get maximum number of scale units deployed for ExpressRoute gateway. + * + * @return the max value + */ + public Integer max() { + return this.max; + } + + /** + * Set maximum number of scale units deployed for ExpressRoute gateway. + * + * @param max the max value to set + * @return the ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds object itself. + */ + public ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds withMax(Integer max) { + this.max = max; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGateways.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGateways.java new file mode 100644 index 000000000000..3daf0cb9878d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteGateways.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.network.v2019_09_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.network.v2019_09_01.implementation.ExpressRouteGatewaysInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ExpressRouteGateways. + */ +public interface ExpressRouteGateways extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLink.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLink.java new file mode 100644 index 000000000000..ac2b6563cd75 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLink.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteLinkInner; +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.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing ExpressRouteLink. + */ +public interface ExpressRouteLink extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the adminState value. + */ + ExpressRouteLinkAdminState adminState(); + + /** + * @return the connectorType value. + */ + ExpressRouteLinkConnectorType connectorType(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the interfaceName value. + */ + String interfaceName(); + + /** + * @return the macSecConfig value. + */ + ExpressRouteLinkMacSecConfig macSecConfig(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the patchPanelId value. + */ + String patchPanelId(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the rackId value. + */ + String rackId(); + + /** + * @return the routerName value. + */ + String routerName(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkAdminState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkAdminState.java new file mode 100644 index 000000000000..c052a63034b3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkAdminState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRouteLinkAdminState. + */ +public final class ExpressRouteLinkAdminState extends ExpandableStringEnum { + /** Static value Enabled for ExpressRouteLinkAdminState. */ + public static final ExpressRouteLinkAdminState ENABLED = fromString("Enabled"); + + /** Static value Disabled for ExpressRouteLinkAdminState. */ + public static final ExpressRouteLinkAdminState DISABLED = fromString("Disabled"); + + /** + * Creates or finds a ExpressRouteLinkAdminState from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteLinkAdminState + */ + @JsonCreator + public static ExpressRouteLinkAdminState fromString(String name) { + return fromString(name, ExpressRouteLinkAdminState.class); + } + + /** + * @return known ExpressRouteLinkAdminState values + */ + public static Collection values() { + return values(ExpressRouteLinkAdminState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkConnectorType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkConnectorType.java new file mode 100644 index 000000000000..b9437457c829 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkConnectorType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRouteLinkConnectorType. + */ +public final class ExpressRouteLinkConnectorType extends ExpandableStringEnum { + /** Static value LC for ExpressRouteLinkConnectorType. */ + public static final ExpressRouteLinkConnectorType LC = fromString("LC"); + + /** Static value SC for ExpressRouteLinkConnectorType. */ + public static final ExpressRouteLinkConnectorType SC = fromString("SC"); + + /** + * Creates or finds a ExpressRouteLinkConnectorType from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteLinkConnectorType + */ + @JsonCreator + public static ExpressRouteLinkConnectorType fromString(String name) { + return fromString(name, ExpressRouteLinkConnectorType.class); + } + + /** + * @return known ExpressRouteLinkConnectorType values + */ + public static Collection values() { + return values(ExpressRouteLinkConnectorType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkMacSecCipher.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkMacSecCipher.java new file mode 100644 index 000000000000..e9e9afa6ff77 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkMacSecCipher.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRouteLinkMacSecCipher. + */ +public final class ExpressRouteLinkMacSecCipher extends ExpandableStringEnum { + /** Static value gcm-aes-128 for ExpressRouteLinkMacSecCipher. */ + public static final ExpressRouteLinkMacSecCipher GCM_AES_128 = fromString("gcm-aes-128"); + + /** Static value gcm-aes-256 for ExpressRouteLinkMacSecCipher. */ + public static final ExpressRouteLinkMacSecCipher GCM_AES_256 = fromString("gcm-aes-256"); + + /** + * Creates or finds a ExpressRouteLinkMacSecCipher from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteLinkMacSecCipher + */ + @JsonCreator + public static ExpressRouteLinkMacSecCipher fromString(String name) { + return fromString(name, ExpressRouteLinkMacSecCipher.class); + } + + /** + * @return known ExpressRouteLinkMacSecCipher values + */ + public static Collection values() { + return values(ExpressRouteLinkMacSecCipher.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkMacSecConfig.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkMacSecConfig.java new file mode 100644 index 000000000000..9b5a0f85ba1e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinkMacSecConfig.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Definition of ExpressRouteLink Mac Security configuration. + * ExpressRouteLink Mac Security Configuration. + */ +public class ExpressRouteLinkMacSecConfig { + /** + * Keyvault Secret Identifier URL containing Mac security CKN key. + */ + @JsonProperty(value = "cknSecretIdentifier") + private String cknSecretIdentifier; + + /** + * Keyvault Secret Identifier URL containing Mac security CAK key. + */ + @JsonProperty(value = "cakSecretIdentifier") + private String cakSecretIdentifier; + + /** + * Mac security cipher. Possible values include: 'gcm-aes-128', + * 'gcm-aes-256'. + */ + @JsonProperty(value = "cipher") + private ExpressRouteLinkMacSecCipher cipher; + + /** + * Get keyvault Secret Identifier URL containing Mac security CKN key. + * + * @return the cknSecretIdentifier value + */ + public String cknSecretIdentifier() { + return this.cknSecretIdentifier; + } + + /** + * Set keyvault Secret Identifier URL containing Mac security CKN key. + * + * @param cknSecretIdentifier the cknSecretIdentifier value to set + * @return the ExpressRouteLinkMacSecConfig object itself. + */ + public ExpressRouteLinkMacSecConfig withCknSecretIdentifier(String cknSecretIdentifier) { + this.cknSecretIdentifier = cknSecretIdentifier; + return this; + } + + /** + * Get keyvault Secret Identifier URL containing Mac security CAK key. + * + * @return the cakSecretIdentifier value + */ + public String cakSecretIdentifier() { + return this.cakSecretIdentifier; + } + + /** + * Set keyvault Secret Identifier URL containing Mac security CAK key. + * + * @param cakSecretIdentifier the cakSecretIdentifier value to set + * @return the ExpressRouteLinkMacSecConfig object itself. + */ + public ExpressRouteLinkMacSecConfig withCakSecretIdentifier(String cakSecretIdentifier) { + this.cakSecretIdentifier = cakSecretIdentifier; + return this; + } + + /** + * Get mac security cipher. Possible values include: 'gcm-aes-128', 'gcm-aes-256'. + * + * @return the cipher value + */ + public ExpressRouteLinkMacSecCipher cipher() { + return this.cipher; + } + + /** + * Set mac security cipher. Possible values include: 'gcm-aes-128', 'gcm-aes-256'. + * + * @param cipher the cipher value to set + * @return the ExpressRouteLinkMacSecConfig object itself. + */ + public ExpressRouteLinkMacSecConfig withCipher(ExpressRouteLinkMacSecCipher cipher) { + this.cipher = cipher; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinks.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinks.java new file mode 100644 index 000000000000..ebf920f597a7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteLinks.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteLinksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ExpressRouteLinks. + */ +public interface ExpressRouteLinks extends HasInner { + /** + * Retrieves the specified ExpressRouteLink resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param linkName The name of the ExpressRouteLink resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String expressRoutePortName, String linkName); + + /** + * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String expressRoutePortName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePeeringState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePeeringState.java new file mode 100644 index 000000000000..5c24014c029e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePeeringState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRoutePeeringState. + */ +public final class ExpressRoutePeeringState extends ExpandableStringEnum { + /** Static value Disabled for ExpressRoutePeeringState. */ + public static final ExpressRoutePeeringState DISABLED = fromString("Disabled"); + + /** Static value Enabled for ExpressRoutePeeringState. */ + public static final ExpressRoutePeeringState ENABLED = fromString("Enabled"); + + /** + * Creates or finds a ExpressRoutePeeringState from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRoutePeeringState + */ + @JsonCreator + public static ExpressRoutePeeringState fromString(String name) { + return fromString(name, ExpressRoutePeeringState.class); + } + + /** + * @return known ExpressRoutePeeringState values + */ + public static Collection values() { + return values(ExpressRoutePeeringState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePeeringType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePeeringType.java new file mode 100644 index 000000000000..c5c4c1061a37 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePeeringType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRoutePeeringType. + */ +public final class ExpressRoutePeeringType extends ExpandableStringEnum { + /** Static value AzurePublicPeering for ExpressRoutePeeringType. */ + public static final ExpressRoutePeeringType AZURE_PUBLIC_PEERING = fromString("AzurePublicPeering"); + + /** Static value AzurePrivatePeering for ExpressRoutePeeringType. */ + public static final ExpressRoutePeeringType AZURE_PRIVATE_PEERING = fromString("AzurePrivatePeering"); + + /** Static value MicrosoftPeering for ExpressRoutePeeringType. */ + public static final ExpressRoutePeeringType MICROSOFT_PEERING = fromString("MicrosoftPeering"); + + /** + * Creates or finds a ExpressRoutePeeringType from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRoutePeeringType + */ + @JsonCreator + public static ExpressRoutePeeringType fromString(String name) { + return fromString(name, ExpressRoutePeeringType.class); + } + + /** + * @return known ExpressRoutePeeringType values + */ + public static Collection values() { + return values(ExpressRoutePeeringType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePort.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePort.java new file mode 100644 index 000000000000..9a63e5597686 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePort.java @@ -0,0 +1,256 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteLinkInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRoutePortInner; + +/** + * Type representing ExpressRoutePort. + */ +public interface ExpressRoutePort extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the allocationDate value. + */ + String allocationDate(); + + /** + * @return the bandwidthInGbps value. + */ + Integer bandwidthInGbps(); + + /** + * @return the circuits value. + */ + List circuits(); + + /** + * @return the encapsulation value. + */ + ExpressRoutePortsEncapsulation encapsulation(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the etherType value. + */ + String etherType(); + + /** + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * @return the links value. + */ + List links(); + + /** + * @return the mtu value. + */ + String mtu(); + + /** + * @return the peeringLocation value. + */ + String peeringLocation(); + + /** + * @return the provisionedBandwidthInGbps value. + */ + Double provisionedBandwidthInGbps(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * The entirety of the ExpressRoutePort definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of ExpressRoutePort definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ExpressRoutePort definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the ExpressRoutePort definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the expressrouteport definition allowing to specify BandwidthInGbps. + */ + interface WithBandwidthInGbps { + /** + * Specifies bandwidthInGbps. + * @param bandwidthInGbps Bandwidth of procured ports in Gbps + * @return the next definition stage + */ + WithCreate withBandwidthInGbps(Integer bandwidthInGbps); + } + + /** + * The stage of the expressrouteport definition allowing to specify Encapsulation. + */ + interface WithEncapsulation { + /** + * Specifies encapsulation. + * @param encapsulation Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ' + * @return the next definition stage + */ + WithCreate withEncapsulation(ExpressRoutePortsEncapsulation encapsulation); + } + + /** + * The stage of the expressrouteport definition allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity The identity of ExpressRoutePort, if configured + * @return the next definition stage + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the expressrouteport definition allowing to specify Links. + */ + interface WithLinks { + /** + * Specifies links. + * @param links The set of physical links of the ExpressRoutePort resource + * @return the next definition stage + */ + WithCreate withLinks(List links); + } + + /** + * The stage of the expressrouteport definition allowing to specify PeeringLocation. + */ + interface WithPeeringLocation { + /** + * Specifies peeringLocation. + * @param peeringLocation The name of the peering location that the ExpressRoutePort is mapped to physically + * @return the next definition stage + */ + WithCreate withPeeringLocation(String peeringLocation); + } + + /** + * 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.WithBandwidthInGbps, DefinitionStages.WithEncapsulation, DefinitionStages.WithIdentity, DefinitionStages.WithLinks, DefinitionStages.WithPeeringLocation { + } + } + /** + * The template for a ExpressRoutePort update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithBandwidthInGbps, UpdateStages.WithEncapsulation, UpdateStages.WithIdentity, UpdateStages.WithLinks, UpdateStages.WithPeeringLocation { + } + + /** + * Grouping of ExpressRoutePort update stages. + */ + interface UpdateStages { + /** + * The stage of the expressrouteport update allowing to specify BandwidthInGbps. + */ + interface WithBandwidthInGbps { + /** + * Specifies bandwidthInGbps. + * @param bandwidthInGbps Bandwidth of procured ports in Gbps + * @return the next update stage + */ + Update withBandwidthInGbps(Integer bandwidthInGbps); + } + + /** + * The stage of the expressrouteport update allowing to specify Encapsulation. + */ + interface WithEncapsulation { + /** + * Specifies encapsulation. + * @param encapsulation Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ' + * @return the next update stage + */ + Update withEncapsulation(ExpressRoutePortsEncapsulation encapsulation); + } + + /** + * The stage of the expressrouteport update allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity The identity of ExpressRoutePort, if configured + * @return the next update stage + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the expressrouteport update allowing to specify Links. + */ + interface WithLinks { + /** + * Specifies links. + * @param links The set of physical links of the ExpressRoutePort resource + * @return the next update stage + */ + Update withLinks(List links); + } + + /** + * The stage of the expressrouteport update allowing to specify PeeringLocation. + */ + interface WithPeeringLocation { + /** + * Specifies peeringLocation. + * @param peeringLocation The name of the peering location that the ExpressRoutePort is mapped to physically + * @return the next update stage + */ + Update withPeeringLocation(String peeringLocation); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePorts.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePorts.java new file mode 100644 index 000000000000..581efe4be60c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePorts.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.network.v2019_09_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.network.v2019_09_01.implementation.ExpressRoutePortsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ExpressRoutePorts. + */ +public interface ExpressRoutePorts extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsEncapsulation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsEncapsulation.java new file mode 100644 index 000000000000..3de416788c9e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsEncapsulation.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRoutePortsEncapsulation. + */ +public final class ExpressRoutePortsEncapsulation extends ExpandableStringEnum { + /** Static value Dot1Q for ExpressRoutePortsEncapsulation. */ + public static final ExpressRoutePortsEncapsulation DOT1Q = fromString("Dot1Q"); + + /** Static value QinQ for ExpressRoutePortsEncapsulation. */ + public static final ExpressRoutePortsEncapsulation QINQ = fromString("QinQ"); + + /** + * Creates or finds a ExpressRoutePortsEncapsulation from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRoutePortsEncapsulation + */ + @JsonCreator + public static ExpressRoutePortsEncapsulation fromString(String name) { + return fromString(name, ExpressRoutePortsEncapsulation.class); + } + + /** + * @return known ExpressRoutePortsEncapsulation values + */ + public static Collection values() { + return values(ExpressRoutePortsEncapsulation.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsLocation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsLocation.java new file mode 100644 index 000000000000..e30e99fec502 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsLocation.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.network.v2019_09_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.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRoutePortsLocationInner; + +/** + * Type representing ExpressRoutePortsLocation. + */ +public interface ExpressRoutePortsLocation extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, HasManager { + /** + * @return the address value. + */ + String address(); + + /** + * @return the availableBandwidths value. + */ + List availableBandwidths(); + + /** + * @return the contact value. + */ + String contact(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsLocationBandwidths.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsLocationBandwidths.java new file mode 100644 index 000000000000..1caac124095c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsLocationBandwidths.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * ExpressRoutePorts Location Bandwidths. + * Real-time inventory of available ExpressRoute port bandwidths. + */ +public class ExpressRoutePortsLocationBandwidths { + /** + * Bandwidth descriptive name. + */ + @JsonProperty(value = "offerName", access = JsonProperty.Access.WRITE_ONLY) + private String offerName; + + /** + * Bandwidth value in Gbps. + */ + @JsonProperty(value = "valueInGbps", access = JsonProperty.Access.WRITE_ONLY) + private Integer valueInGbps; + + /** + * Get bandwidth descriptive name. + * + * @return the offerName value + */ + public String offerName() { + return this.offerName; + } + + /** + * Get bandwidth value in Gbps. + * + * @return the valueInGbps value + */ + public Integer valueInGbps() { + return this.valueInGbps; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsLocations.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsLocations.java new file mode 100644 index 000000000000..c9e9043be489 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRoutePortsLocations.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRoutePortsLocationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ExpressRoutePortsLocations. + */ +public interface ExpressRoutePortsLocations extends SupportsListing, HasInner { + /** + * Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. + * + * @param locationName Name of the requested ExpressRoutePort peering location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String locationName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteServiceProvider.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteServiceProvider.java new file mode 100644 index 000000000000..7fcf13586fd7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteServiceProvider.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteServiceProviderInner; + +/** + * Type representing ExpressRouteServiceProvider. + */ +public interface ExpressRouteServiceProvider extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, HasManager { + /** + * @return the bandwidthsOffered value. + */ + List bandwidthsOffered(); + + /** + * @return the peeringLocations value. + */ + List peeringLocations(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteServiceProviderBandwidthsOffered.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteServiceProviderBandwidthsOffered.java new file mode 100644 index 000000000000..5578330700d0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteServiceProviderBandwidthsOffered.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains bandwidths offered in ExpressRouteServiceProvider resources. + */ +public class ExpressRouteServiceProviderBandwidthsOffered { + /** + * The OfferName. + */ + @JsonProperty(value = "offerName") + private String offerName; + + /** + * The ValueInMbps. + */ + @JsonProperty(value = "valueInMbps") + private Integer valueInMbps; + + /** + * Get the OfferName. + * + * @return the offerName value + */ + public String offerName() { + return this.offerName; + } + + /** + * Set the OfferName. + * + * @param offerName the offerName value to set + * @return the ExpressRouteServiceProviderBandwidthsOffered object itself. + */ + public ExpressRouteServiceProviderBandwidthsOffered withOfferName(String offerName) { + this.offerName = offerName; + return this; + } + + /** + * Get the ValueInMbps. + * + * @return the valueInMbps value + */ + public Integer valueInMbps() { + return this.valueInMbps; + } + + /** + * Set the ValueInMbps. + * + * @param valueInMbps the valueInMbps value to set + * @return the ExpressRouteServiceProviderBandwidthsOffered object itself. + */ + public ExpressRouteServiceProviderBandwidthsOffered withValueInMbps(Integer valueInMbps) { + this.valueInMbps = valueInMbps; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteServiceProviders.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteServiceProviders.java new file mode 100644 index 000000000000..b2c1382549a4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteServiceProviders.java @@ -0,0 +1,19 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteServiceProvidersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ExpressRouteServiceProviders. + */ +public interface ExpressRouteServiceProviders extends SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicies.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicies.java new file mode 100644 index 000000000000..6cb7ec374ef4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicies.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.network.v2019_09_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.network.v2019_09_01.implementation.FirewallPoliciesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing FirewallPolicies. + */ +public interface FirewallPolicies extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicy.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicy.java new file mode 100644 index 000000000000..f05f6a987a51 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicy.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.FirewallPolicyInner; + +/** + * Type representing FirewallPolicy. + */ +public interface FirewallPolicy extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the basePolicy value. + */ + SubResource basePolicy(); + + /** + * @return the childPolicies value. + */ + List childPolicies(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the firewalls value. + */ + List firewalls(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the ruleGroups value. + */ + List ruleGroups(); + + /** + * @return the threatIntelMode value. + */ + AzureFirewallThreatIntelMode threatIntelMode(); + + /** + * The entirety of the FirewallPolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of FirewallPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a FirewallPolicy definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the FirewallPolicy definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the firewallpolicy definition allowing to specify BasePolicy. + */ + interface WithBasePolicy { + /** + * Specifies basePolicy. + * @param basePolicy The parent firewall policy from which rules are inherited + * @return the next definition stage + */ + WithCreate withBasePolicy(SubResource basePolicy); + } + + /** + * The stage of the firewallpolicy definition allowing to specify ThreatIntelMode. + */ + interface WithThreatIntelMode { + /** + * Specifies threatIntelMode. + * @param threatIntelMode The operation mode for Threat Intelligence. Possible values include: 'Alert', 'Deny', 'Off' + * @return the next definition stage + */ + WithCreate withThreatIntelMode(AzureFirewallThreatIntelMode threatIntelMode); + } + + /** + * 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.WithBasePolicy, DefinitionStages.WithThreatIntelMode { + } + } + /** + * The template for a FirewallPolicy update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithBasePolicy, UpdateStages.WithThreatIntelMode { + } + + /** + * Grouping of FirewallPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the firewallpolicy update allowing to specify BasePolicy. + */ + interface WithBasePolicy { + /** + * Specifies basePolicy. + * @param basePolicy The parent firewall policy from which rules are inherited + * @return the next update stage + */ + Update withBasePolicy(SubResource basePolicy); + } + + /** + * The stage of the firewallpolicy update allowing to specify ThreatIntelMode. + */ + interface WithThreatIntelMode { + /** + * Specifies threatIntelMode. + * @param threatIntelMode The operation mode for Threat Intelligence. Possible values include: 'Alert', 'Deny', 'Off' + * @return the next update stage + */ + Update withThreatIntelMode(AzureFirewallThreatIntelMode threatIntelMode); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyFilterRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyFilterRule.java new file mode 100644 index 000000000000..62008e13d5b3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyFilterRule.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Firewall Policy Filter Rule. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType") +@JsonTypeName("FirewallPolicyFilterRule") +public class FirewallPolicyFilterRule extends FirewallPolicyRule { + /** + * The action type of a Filter rule. + */ + @JsonProperty(value = "action") + private FirewallPolicyFilterRuleAction action; + + /** + * Collection of rule conditions used by a rule. + */ + @JsonProperty(value = "ruleConditions") + private List ruleConditions; + + /** + * Get the action type of a Filter rule. + * + * @return the action value + */ + public FirewallPolicyFilterRuleAction action() { + return this.action; + } + + /** + * Set the action type of a Filter rule. + * + * @param action the action value to set + * @return the FirewallPolicyFilterRule object itself. + */ + public FirewallPolicyFilterRule withAction(FirewallPolicyFilterRuleAction action) { + this.action = action; + return this; + } + + /** + * Get collection of rule conditions used by a rule. + * + * @return the ruleConditions value + */ + public List ruleConditions() { + return this.ruleConditions; + } + + /** + * Set collection of rule conditions used by a rule. + * + * @param ruleConditions the ruleConditions value to set + * @return the FirewallPolicyFilterRule object itself. + */ + public FirewallPolicyFilterRule withRuleConditions(List ruleConditions) { + this.ruleConditions = ruleConditions; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyFilterRuleAction.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyFilterRuleAction.java new file mode 100644 index 000000000000..08838f62b457 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyFilterRuleAction.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the FirewallPolicyFilterRuleAction. + */ +public class FirewallPolicyFilterRuleAction { + /** + * The type of action. Possible values include: 'Allow', 'Deny'. + */ + @JsonProperty(value = "type") + private FirewallPolicyFilterRuleActionType type; + + /** + * Get the type of action. Possible values include: 'Allow', 'Deny'. + * + * @return the type value + */ + public FirewallPolicyFilterRuleActionType type() { + return this.type; + } + + /** + * Set the type of action. Possible values include: 'Allow', 'Deny'. + * + * @param type the type value to set + * @return the FirewallPolicyFilterRuleAction object itself. + */ + public FirewallPolicyFilterRuleAction withType(FirewallPolicyFilterRuleActionType type) { + this.type = type; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyFilterRuleActionType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyFilterRuleActionType.java new file mode 100644 index 000000000000..d0bfc70d0b42 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyFilterRuleActionType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for FirewallPolicyFilterRuleActionType. + */ +public final class FirewallPolicyFilterRuleActionType extends ExpandableStringEnum { + /** Static value Allow for FirewallPolicyFilterRuleActionType. */ + public static final FirewallPolicyFilterRuleActionType ALLOW = fromString("Allow"); + + /** Static value Deny for FirewallPolicyFilterRuleActionType. */ + public static final FirewallPolicyFilterRuleActionType DENY = fromString("Deny"); + + /** + * Creates or finds a FirewallPolicyFilterRuleActionType from its string representation. + * @param name a name to look for + * @return the corresponding FirewallPolicyFilterRuleActionType + */ + @JsonCreator + public static FirewallPolicyFilterRuleActionType fromString(String name) { + return fromString(name, FirewallPolicyFilterRuleActionType.class); + } + + /** + * @return known FirewallPolicyFilterRuleActionType values + */ + public static Collection values() { + return values(FirewallPolicyFilterRuleActionType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyNatRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyNatRule.java new file mode 100644 index 000000000000..f05c97e9f5fb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyNatRule.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Firewall Policy NAT Rule. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType") +@JsonTypeName("FirewallPolicyNatRule") +public class FirewallPolicyNatRule extends FirewallPolicyRule { + /** + * The action type of a Nat rule. + */ + @JsonProperty(value = "action") + private FirewallPolicyNatRuleAction action; + + /** + * The translated address for this NAT rule. + */ + @JsonProperty(value = "translatedAddress") + private String translatedAddress; + + /** + * The translated port for this NAT rule. + */ + @JsonProperty(value = "translatedPort") + private String translatedPort; + + /** + * The match conditions for incoming traffic. + */ + @JsonProperty(value = "ruleCondition") + private FirewallPolicyRuleCondition ruleCondition; + + /** + * Get the action type of a Nat rule. + * + * @return the action value + */ + public FirewallPolicyNatRuleAction action() { + return this.action; + } + + /** + * Set the action type of a Nat rule. + * + * @param action the action value to set + * @return the FirewallPolicyNatRule object itself. + */ + public FirewallPolicyNatRule withAction(FirewallPolicyNatRuleAction action) { + this.action = action; + return this; + } + + /** + * Get the translated address for this NAT rule. + * + * @return the translatedAddress value + */ + public String translatedAddress() { + return this.translatedAddress; + } + + /** + * Set the translated address for this NAT rule. + * + * @param translatedAddress the translatedAddress value to set + * @return the FirewallPolicyNatRule object itself. + */ + public FirewallPolicyNatRule withTranslatedAddress(String translatedAddress) { + this.translatedAddress = translatedAddress; + return this; + } + + /** + * Get the translated port for this NAT rule. + * + * @return the translatedPort value + */ + public String translatedPort() { + return this.translatedPort; + } + + /** + * Set the translated port for this NAT rule. + * + * @param translatedPort the translatedPort value to set + * @return the FirewallPolicyNatRule object itself. + */ + public FirewallPolicyNatRule withTranslatedPort(String translatedPort) { + this.translatedPort = translatedPort; + return this; + } + + /** + * Get the match conditions for incoming traffic. + * + * @return the ruleCondition value + */ + public FirewallPolicyRuleCondition ruleCondition() { + return this.ruleCondition; + } + + /** + * Set the match conditions for incoming traffic. + * + * @param ruleCondition the ruleCondition value to set + * @return the FirewallPolicyNatRule object itself. + */ + public FirewallPolicyNatRule withRuleCondition(FirewallPolicyRuleCondition ruleCondition) { + this.ruleCondition = ruleCondition; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyNatRuleAction.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyNatRuleAction.java new file mode 100644 index 000000000000..464925043cba --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyNatRuleAction.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the FirewallPolicyNatRuleAction. + */ +public class FirewallPolicyNatRuleAction { + /** + * The type of action. Possible values include: 'DNAT'. + */ + @JsonProperty(value = "type") + private FirewallPolicyNatRuleActionType type; + + /** + * Get the type of action. Possible values include: 'DNAT'. + * + * @return the type value + */ + public FirewallPolicyNatRuleActionType type() { + return this.type; + } + + /** + * Set the type of action. Possible values include: 'DNAT'. + * + * @param type the type value to set + * @return the FirewallPolicyNatRuleAction object itself. + */ + public FirewallPolicyNatRuleAction withType(FirewallPolicyNatRuleActionType type) { + this.type = type; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyNatRuleActionType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyNatRuleActionType.java new file mode 100644 index 000000000000..5fd31aade706 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyNatRuleActionType.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for FirewallPolicyNatRuleActionType. + */ +public final class FirewallPolicyNatRuleActionType extends ExpandableStringEnum { + /** Static value DNAT for FirewallPolicyNatRuleActionType. */ + public static final FirewallPolicyNatRuleActionType DNAT = fromString("DNAT"); + + /** + * Creates or finds a FirewallPolicyNatRuleActionType from its string representation. + * @param name a name to look for + * @return the corresponding FirewallPolicyNatRuleActionType + */ + @JsonCreator + public static FirewallPolicyNatRuleActionType fromString(String name) { + return fromString(name, FirewallPolicyNatRuleActionType.class); + } + + /** + * @return known FirewallPolicyNatRuleActionType values + */ + public static Collection values() { + return values(FirewallPolicyNatRuleActionType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRule.java new file mode 100644 index 000000000000..d9a3b0f1b536 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRule.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Properties of the rule. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType") +@JsonTypeName("FirewallPolicyRule") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "FirewallPolicyNatRule", value = FirewallPolicyNatRule.class), + @JsonSubTypes.Type(name = "FirewallPolicyFilterRule", value = FirewallPolicyFilterRule.class) +}) +public class FirewallPolicyRule { + /** + * The name of the rule. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Priority of the Firewall Policy Rule resource. + */ + @JsonProperty(value = "priority") + private Integer priority; + + /** + * Get the name of the rule. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the rule. + * + * @param name the name value to set + * @return the FirewallPolicyRule object itself. + */ + public FirewallPolicyRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get priority of the Firewall Policy Rule resource. + * + * @return the priority value + */ + public Integer priority() { + return this.priority; + } + + /** + * Set priority of the Firewall Policy Rule resource. + * + * @param priority the priority value to set + * @return the FirewallPolicyRule object itself. + */ + public FirewallPolicyRule withPriority(Integer priority) { + this.priority = priority; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleCondition.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleCondition.java new file mode 100644 index 000000000000..ee4b32428af6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleCondition.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Properties of a rule. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleConditionType") +@JsonTypeName("FirewallPolicyRuleCondition") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "ApplicationRuleCondition", value = ApplicationRuleCondition.class), + @JsonSubTypes.Type(name = "NetworkRuleCondition", value = NetworkRuleCondition.class) +}) +public class FirewallPolicyRuleCondition { + /** + * Name of the rule condition. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Description of the rule condition. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get name of the rule condition. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the rule condition. + * + * @param name the name value to set + * @return the FirewallPolicyRuleCondition object itself. + */ + public FirewallPolicyRuleCondition withName(String name) { + this.name = name; + return this; + } + + /** + * Get description of the rule condition. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the rule condition. + * + * @param description the description value to set + * @return the FirewallPolicyRuleCondition object itself. + */ + public FirewallPolicyRuleCondition withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleConditionApplicationProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleConditionApplicationProtocol.java new file mode 100644 index 000000000000..e72767de0093 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleConditionApplicationProtocol.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the application rule protocol. + */ +public class FirewallPolicyRuleConditionApplicationProtocol { + /** + * Protocol type. Possible values include: 'Http', 'Https'. + */ + @JsonProperty(value = "protocolType") + private FirewallPolicyRuleConditionApplicationProtocolType protocolType; + + /** + * Port number for the protocol, cannot be greater than 64000. + */ + @JsonProperty(value = "port") + private Integer port; + + /** + * Get protocol type. Possible values include: 'Http', 'Https'. + * + * @return the protocolType value + */ + public FirewallPolicyRuleConditionApplicationProtocolType protocolType() { + return this.protocolType; + } + + /** + * Set protocol type. Possible values include: 'Http', 'Https'. + * + * @param protocolType the protocolType value to set + * @return the FirewallPolicyRuleConditionApplicationProtocol object itself. + */ + public FirewallPolicyRuleConditionApplicationProtocol withProtocolType(FirewallPolicyRuleConditionApplicationProtocolType protocolType) { + this.protocolType = protocolType; + return this; + } + + /** + * Get port number for the protocol, cannot be greater than 64000. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set port number for the protocol, cannot be greater than 64000. + * + * @param port the port value to set + * @return the FirewallPolicyRuleConditionApplicationProtocol object itself. + */ + public FirewallPolicyRuleConditionApplicationProtocol withPort(Integer port) { + this.port = port; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleConditionApplicationProtocolType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleConditionApplicationProtocolType.java new file mode 100644 index 000000000000..8a00916ded15 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleConditionApplicationProtocolType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for FirewallPolicyRuleConditionApplicationProtocolType. + */ +public final class FirewallPolicyRuleConditionApplicationProtocolType extends ExpandableStringEnum { + /** Static value Http for FirewallPolicyRuleConditionApplicationProtocolType. */ + public static final FirewallPolicyRuleConditionApplicationProtocolType HTTP = fromString("Http"); + + /** Static value Https for FirewallPolicyRuleConditionApplicationProtocolType. */ + public static final FirewallPolicyRuleConditionApplicationProtocolType HTTPS = fromString("Https"); + + /** + * Creates or finds a FirewallPolicyRuleConditionApplicationProtocolType from its string representation. + * @param name a name to look for + * @return the corresponding FirewallPolicyRuleConditionApplicationProtocolType + */ + @JsonCreator + public static FirewallPolicyRuleConditionApplicationProtocolType fromString(String name) { + return fromString(name, FirewallPolicyRuleConditionApplicationProtocolType.class); + } + + /** + * @return known FirewallPolicyRuleConditionApplicationProtocolType values + */ + public static Collection values() { + return values(FirewallPolicyRuleConditionApplicationProtocolType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleConditionNetworkProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleConditionNetworkProtocol.java new file mode 100644 index 000000000000..9bd81ce7a11a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleConditionNetworkProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for FirewallPolicyRuleConditionNetworkProtocol. + */ +public final class FirewallPolicyRuleConditionNetworkProtocol extends ExpandableStringEnum { + /** Static value TCP for FirewallPolicyRuleConditionNetworkProtocol. */ + public static final FirewallPolicyRuleConditionNetworkProtocol TCP = fromString("TCP"); + + /** Static value UDP for FirewallPolicyRuleConditionNetworkProtocol. */ + public static final FirewallPolicyRuleConditionNetworkProtocol UDP = fromString("UDP"); + + /** Static value Any for FirewallPolicyRuleConditionNetworkProtocol. */ + public static final FirewallPolicyRuleConditionNetworkProtocol ANY = fromString("Any"); + + /** Static value ICMP for FirewallPolicyRuleConditionNetworkProtocol. */ + public static final FirewallPolicyRuleConditionNetworkProtocol ICMP = fromString("ICMP"); + + /** + * Creates or finds a FirewallPolicyRuleConditionNetworkProtocol from its string representation. + * @param name a name to look for + * @return the corresponding FirewallPolicyRuleConditionNetworkProtocol + */ + @JsonCreator + public static FirewallPolicyRuleConditionNetworkProtocol fromString(String name) { + return fromString(name, FirewallPolicyRuleConditionNetworkProtocol.class); + } + + /** + * @return known FirewallPolicyRuleConditionNetworkProtocol values + */ + public static Collection values() { + return values(FirewallPolicyRuleConditionNetworkProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleGroup.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleGroup.java new file mode 100644 index 000000000000..1696345c8ebf --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleGroup.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.FirewallPolicyRuleGroupInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; + +/** + * Type representing FirewallPolicyRuleGroup. + */ +public interface FirewallPolicyRuleGroup extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the priority value. + */ + Integer priority(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the rules value. + */ + List rules(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the FirewallPolicyRuleGroup definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithFirewallPolicy, DefinitionStages.WithCreate { + } + + /** + * Grouping of FirewallPolicyRuleGroup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a FirewallPolicyRuleGroup definition. + */ + interface Blank extends WithFirewallPolicy { + } + + /** + * The stage of the firewallpolicyrulegroup definition allowing to specify FirewallPolicy. + */ + interface WithFirewallPolicy { + /** + * Specifies resourceGroupName, firewallPolicyName. + * @param resourceGroupName The name of the resource group + * @param firewallPolicyName The name of the Firewall Policy + * @return the next definition stage + */ + WithCreate withExistingFirewallPolicy(String resourceGroupName, String firewallPolicyName); + } + + /** + * The stage of the firewallpolicyrulegroup definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the firewallpolicyrulegroup definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the firewallpolicyrulegroup definition allowing to specify Priority. + */ + interface WithPriority { + /** + * Specifies priority. + * @param priority Priority of the Firewall Policy Rule Group resource + * @return the next definition stage + */ + WithCreate withPriority(Integer priority); + } + + /** + * The stage of the firewallpolicyrulegroup definition allowing to specify Rules. + */ + interface WithRules { + /** + * Specifies rules. + * @param rules Group of Firewall Policy rules + * @return the next definition stage + */ + WithCreate withRules(List rules); + } + + /** + * 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.WithName, DefinitionStages.WithPriority, DefinitionStages.WithRules { + } + } + /** + * The template for a FirewallPolicyRuleGroup update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithPriority, UpdateStages.WithRules { + } + + /** + * Grouping of FirewallPolicyRuleGroup update stages. + */ + interface UpdateStages { + /** + * The stage of the firewallpolicyrulegroup update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the firewallpolicyrulegroup update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the firewallpolicyrulegroup update allowing to specify Priority. + */ + interface WithPriority { + /** + * Specifies priority. + * @param priority Priority of the Firewall Policy Rule Group resource + * @return the next update stage + */ + Update withPriority(Integer priority); + } + + /** + * The stage of the firewallpolicyrulegroup update allowing to specify Rules. + */ + interface WithRules { + /** + * Specifies rules. + * @param rules Group of Firewall Policy rules + * @return the next update stage + */ + Update withRules(List rules); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleGroups.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleGroups.java new file mode 100644 index 000000000000..6fef890ed01e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FirewallPolicyRuleGroups.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.FirewallPolicyRuleGroupsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing FirewallPolicyRuleGroups. + */ +public interface FirewallPolicyRuleGroups extends SupportsCreating, HasInner { + /** + * Gets the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName); + + /** + * Lists all FirewallPolicyRuleGroups in a FirewallPolicy resource. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String firewallPolicyName); + + /** + * Deletes the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogFormatParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogFormatParameters.java new file mode 100644 index 000000000000..2f2f55c10ef1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogFormatParameters.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the flow log format. + */ +public class FlowLogFormatParameters { + /** + * The file type of flow log. Possible values include: 'JSON'. + */ + @JsonProperty(value = "type") + private FlowLogFormatType type; + + /** + * The version (revision) of the flow log. + */ + @JsonProperty(value = "version") + private Integer version; + + /** + * Get the file type of flow log. Possible values include: 'JSON'. + * + * @return the type value + */ + public FlowLogFormatType type() { + return this.type; + } + + /** + * Set the file type of flow log. Possible values include: 'JSON'. + * + * @param type the type value to set + * @return the FlowLogFormatParameters object itself. + */ + public FlowLogFormatParameters withType(FlowLogFormatType type) { + this.type = type; + return this; + } + + /** + * Get the version (revision) of the flow log. + * + * @return the version value + */ + public Integer version() { + return this.version; + } + + /** + * Set the version (revision) of the flow log. + * + * @param version the version value to set + * @return the FlowLogFormatParameters object itself. + */ + public FlowLogFormatParameters withVersion(Integer version) { + this.version = version; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogFormatType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogFormatType.java new file mode 100644 index 000000000000..1ac9d2c34758 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogFormatType.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for FlowLogFormatType. + */ +public final class FlowLogFormatType extends ExpandableStringEnum { + /** Static value JSON for FlowLogFormatType. */ + public static final FlowLogFormatType JSON = fromString("JSON"); + + /** + * Creates or finds a FlowLogFormatType from its string representation. + * @param name a name to look for + * @return the corresponding FlowLogFormatType + */ + @JsonCreator + public static FlowLogFormatType fromString(String name) { + return fromString(name, FlowLogFormatType.class); + } + + /** + * @return known FlowLogFormatType values + */ + public static Collection values() { + return values(FlowLogFormatType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogInformation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogInformation.java new file mode 100644 index 000000000000..d8890b4380d6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogInformation.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.FlowLogInformationInner; + +/** + * Type representing FlowLogInformation. + */ +public interface FlowLogInformation extends HasInner, HasManager { + /** + * @return the enabled value. + */ + boolean enabled(); + + /** + * @return the flowAnalyticsConfiguration value. + */ + TrafficAnalyticsProperties flowAnalyticsConfiguration(); + + /** + * @return the format value. + */ + FlowLogFormatParameters format(); + + /** + * @return the retentionPolicy value. + */ + RetentionPolicyParameters retentionPolicy(); + + /** + * @return the storageId value. + */ + String storageId(); + + /** + * @return the targetResourceId value. + */ + String targetResourceId(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogStatusParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogStatusParameters.java new file mode 100644 index 000000000000..e6754fb066fe --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FlowLogStatusParameters.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define a resource to query flow log and traffic analytics + * (optional) status. + */ +public class FlowLogStatusParameters { + /** + * The target resource where getting the flow log and traffic analytics + * (optional) status. + */ + @JsonProperty(value = "targetResourceId", required = true) + private String targetResourceId; + + /** + * Get the target resource where getting the flow log and traffic analytics (optional) status. + * + * @return the targetResourceId value + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the target resource where getting the flow log and traffic analytics (optional) status. + * + * @param targetResourceId the targetResourceId value to set + * @return the FlowLogStatusParameters object itself. + */ + public FlowLogStatusParameters withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FrontendIPConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FrontendIPConfiguration.java new file mode 100644 index 000000000000..d0beb2c49f02 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/FrontendIPConfiguration.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.FrontendIPConfigurationInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; + +/** + * Type representing FrontendIPConfiguration. + */ +public interface FrontendIPConfiguration extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the inboundNatPools value. + */ + List inboundNatPools(); + + /** + * @return the inboundNatRules value. + */ + List inboundNatRules(); + + /** + * @return the loadBalancingRules value. + */ + List loadBalancingRules(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the outboundRules value. + */ + List outboundRules(); + + /** + * @return the privateIPAddress value. + */ + String privateIPAddress(); + + /** + * @return the privateIPAddressVersion value. + */ + IPVersion privateIPAddressVersion(); + + /** + * @return the privateIPAllocationMethod value. + */ + IPAllocationMethod privateIPAllocationMethod(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the publicIPAddress value. + */ + PublicIPAddress publicIPAddress(); + + /** + * @return the publicIPPrefix value. + */ + SubResource publicIPPrefix(); + + /** + * @return the subnet value. + */ + Subnet subnet(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the zones value. + */ + List zones(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/GatewayRoute.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/GatewayRoute.java new file mode 100644 index 000000000000..7597882eccc4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/GatewayRoute.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Gateway routing details. + */ +public class GatewayRoute { + /** + * The gateway's local address. + */ + @JsonProperty(value = "localAddress", access = JsonProperty.Access.WRITE_ONLY) + private String localAddress; + + /** + * The route's network prefix. + */ + @JsonProperty(value = "network", access = JsonProperty.Access.WRITE_ONLY) + private String network; + + /** + * The route's next hop. + */ + @JsonProperty(value = "nextHop", access = JsonProperty.Access.WRITE_ONLY) + private String nextHop; + + /** + * The peer this route was learned from. + */ + @JsonProperty(value = "sourcePeer", access = JsonProperty.Access.WRITE_ONLY) + private String sourcePeer; + + /** + * The source this route was learned from. + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private String origin; + + /** + * The route's AS path sequence. + */ + @JsonProperty(value = "asPath", access = JsonProperty.Access.WRITE_ONLY) + private String asPath; + + /** + * The route's weight. + */ + @JsonProperty(value = "weight", access = JsonProperty.Access.WRITE_ONLY) + private Integer weight; + + /** + * Get the gateway's local address. + * + * @return the localAddress value + */ + public String localAddress() { + return this.localAddress; + } + + /** + * Get the route's network prefix. + * + * @return the network value + */ + public String network() { + return this.network; + } + + /** + * Get the route's next hop. + * + * @return the nextHop value + */ + public String nextHop() { + return this.nextHop; + } + + /** + * Get the peer this route was learned from. + * + * @return the sourcePeer value + */ + public String sourcePeer() { + return this.sourcePeer; + } + + /** + * Get the source this route was learned from. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Get the route's AS path sequence. + * + * @return the asPath value + */ + public String asPath() { + return this.asPath; + } + + /** + * Get the route's weight. + * + * @return the weight value + */ + public Integer weight() { + return this.weight; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/GatewayRouteListResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/GatewayRouteListResult.java new file mode 100644 index 000000000000..d605214d1092 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/GatewayRouteListResult.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.GatewayRouteListResultInner; +import java.util.List; + +/** + * Type representing GatewayRouteListResult. + */ +public interface GatewayRouteListResult extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/GetVpnSitesConfigurationRequest.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/GetVpnSitesConfigurationRequest.java new file mode 100644 index 000000000000..190a53e8c08e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/GetVpnSitesConfigurationRequest.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of Vpn-Sites. + */ +public class GetVpnSitesConfigurationRequest { + /** + * List of resource-ids of the vpn-sites for which config is to be + * downloaded. + */ + @JsonProperty(value = "vpnSites") + private List vpnSites; + + /** + * The sas-url to download the configurations for vpn-sites. + */ + @JsonProperty(value = "outputBlobSasUrl", required = true) + private String outputBlobSasUrl; + + /** + * Get list of resource-ids of the vpn-sites for which config is to be downloaded. + * + * @return the vpnSites value + */ + public List vpnSites() { + return this.vpnSites; + } + + /** + * Set list of resource-ids of the vpn-sites for which config is to be downloaded. + * + * @param vpnSites the vpnSites value to set + * @return the GetVpnSitesConfigurationRequest object itself. + */ + public GetVpnSitesConfigurationRequest withVpnSites(List vpnSites) { + this.vpnSites = vpnSites; + return this; + } + + /** + * Get the sas-url to download the configurations for vpn-sites. + * + * @return the outputBlobSasUrl value + */ + public String outputBlobSasUrl() { + return this.outputBlobSasUrl; + } + + /** + * Set the sas-url to download the configurations for vpn-sites. + * + * @param outputBlobSasUrl the outputBlobSasUrl value to set + * @return the GetVpnSitesConfigurationRequest object itself. + */ + public GetVpnSitesConfigurationRequest withOutputBlobSasUrl(String outputBlobSasUrl) { + this.outputBlobSasUrl = outputBlobSasUrl; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HTTPConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HTTPConfiguration.java new file mode 100644 index 000000000000..f5c11b1563d1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HTTPConfiguration.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * HTTP configuration of the connectivity check. + */ +public class HTTPConfiguration { + /** + * HTTP method. Possible values include: 'Get'. + */ + @JsonProperty(value = "method") + private HTTPMethod method; + + /** + * List of HTTP headers. + */ + @JsonProperty(value = "headers") + private List headers; + + /** + * Valid status codes. + */ + @JsonProperty(value = "validStatusCodes") + private List validStatusCodes; + + /** + * Get hTTP method. Possible values include: 'Get'. + * + * @return the method value + */ + public HTTPMethod method() { + return this.method; + } + + /** + * Set hTTP method. Possible values include: 'Get'. + * + * @param method the method value to set + * @return the HTTPConfiguration object itself. + */ + public HTTPConfiguration withMethod(HTTPMethod method) { + this.method = method; + return this; + } + + /** + * Get list of HTTP headers. + * + * @return the headers value + */ + public List headers() { + return this.headers; + } + + /** + * Set list of HTTP headers. + * + * @param headers the headers value to set + * @return the HTTPConfiguration object itself. + */ + public HTTPConfiguration withHeaders(List headers) { + this.headers = headers; + return this; + } + + /** + * Get valid status codes. + * + * @return the validStatusCodes value + */ + public List validStatusCodes() { + return this.validStatusCodes; + } + + /** + * Set valid status codes. + * + * @param validStatusCodes the validStatusCodes value to set + * @return the HTTPConfiguration object itself. + */ + public HTTPConfiguration withValidStatusCodes(List validStatusCodes) { + this.validStatusCodes = validStatusCodes; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HTTPHeader.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HTTPHeader.java new file mode 100644 index 000000000000..db05000e706d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HTTPHeader.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the HTTP header. + */ +public class HTTPHeader { + /** + * The name in HTTP header. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The value in HTTP header. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the name in HTTP header. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name in HTTP header. + * + * @param name the name value to set + * @return the HTTPHeader object itself. + */ + public HTTPHeader withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value in HTTP header. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the value in HTTP header. + * + * @param value the value value to set + * @return the HTTPHeader object itself. + */ + public HTTPHeader withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HTTPMethod.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HTTPMethod.java new file mode 100644 index 000000000000..ee12e93c7fff --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HTTPMethod.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for HTTPMethod. + */ +public final class HTTPMethod extends ExpandableStringEnum { + /** Static value Get for HTTPMethod. */ + public static final HTTPMethod GET = fromString("Get"); + + /** + * Creates or finds a HTTPMethod from its string representation. + * @param name a name to look for + * @return the corresponding HTTPMethod + */ + @JsonCreator + public static HTTPMethod fromString(String name) { + return fromString(name, HTTPMethod.class); + } + + /** + * @return known HTTPMethod values + */ + public static Collection values() { + return values(HTTPMethod.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubIPAddresses.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubIPAddresses.java new file mode 100644 index 000000000000..e5b5c0c7f75d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubIPAddresses.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * IP addresses associated with azure firewall. + */ +public class HubIPAddresses { + /** + * List of Public IP addresses associated with azure firewall. + */ + @JsonProperty(value = "publicIPAddresses") + private List publicIPAddresses; + + /** + * Private IP Address associated with azure firewall. + */ + @JsonProperty(value = "privateIPAddress") + private String privateIPAddress; + + /** + * Get list of Public IP addresses associated with azure firewall. + * + * @return the publicIPAddresses value + */ + public List publicIPAddresses() { + return this.publicIPAddresses; + } + + /** + * Set list of Public IP addresses associated with azure firewall. + * + * @param publicIPAddresses the publicIPAddresses value to set + * @return the HubIPAddresses object itself. + */ + public HubIPAddresses withPublicIPAddresses(List publicIPAddresses) { + this.publicIPAddresses = publicIPAddresses; + return this; + } + + /** + * Get private IP Address associated with azure firewall. + * + * @return the privateIPAddress value + */ + public String privateIPAddress() { + return this.privateIPAddress; + } + + /** + * Set private IP Address associated with azure firewall. + * + * @param privateIPAddress the privateIPAddress value to set + * @return the HubIPAddresses object itself. + */ + public HubIPAddresses withPrivateIPAddress(String privateIPAddress) { + this.privateIPAddress = privateIPAddress; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubVirtualNetworkConnection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubVirtualNetworkConnection.java new file mode 100644 index 000000000000..40a8f2a7f730 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubVirtualNetworkConnection.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.HubVirtualNetworkConnectionInner; +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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; + +/** + * Type representing HubVirtualNetworkConnection. + */ +public interface HubVirtualNetworkConnection extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the allowHubToRemoteVnetTransit value. + */ + Boolean allowHubToRemoteVnetTransit(); + + /** + * @return the allowRemoteVnetToUseHubVnetGateways value. + */ + Boolean allowRemoteVnetToUseHubVnetGateways(); + + /** + * @return the enableInternetSecurity value. + */ + Boolean enableInternetSecurity(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the remoteVirtualNetwork value. + */ + SubResource remoteVirtualNetwork(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubVirtualNetworkConnectionStatus.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubVirtualNetworkConnectionStatus.java new file mode 100644 index 000000000000..b8c2217a0efe --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubVirtualNetworkConnectionStatus.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for HubVirtualNetworkConnectionStatus. + */ +public final class HubVirtualNetworkConnectionStatus extends ExpandableStringEnum { + /** Static value Unknown for HubVirtualNetworkConnectionStatus. */ + public static final HubVirtualNetworkConnectionStatus UNKNOWN = fromString("Unknown"); + + /** Static value Connecting for HubVirtualNetworkConnectionStatus. */ + public static final HubVirtualNetworkConnectionStatus CONNECTING = fromString("Connecting"); + + /** Static value Connected for HubVirtualNetworkConnectionStatus. */ + public static final HubVirtualNetworkConnectionStatus CONNECTED = fromString("Connected"); + + /** Static value NotConnected for HubVirtualNetworkConnectionStatus. */ + public static final HubVirtualNetworkConnectionStatus NOT_CONNECTED = fromString("NotConnected"); + + /** + * Creates or finds a HubVirtualNetworkConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding HubVirtualNetworkConnectionStatus + */ + @JsonCreator + public static HubVirtualNetworkConnectionStatus fromString(String name) { + return fromString(name, HubVirtualNetworkConnectionStatus.class); + } + + /** + * @return known HubVirtualNetworkConnectionStatus values + */ + public static Collection values() { + return values(HubVirtualNetworkConnectionStatus.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubVirtualNetworkConnections.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubVirtualNetworkConnections.java new file mode 100644 index 000000000000..45869fe613d8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/HubVirtualNetworkConnections.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.HubVirtualNetworkConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing HubVirtualNetworkConnections. + */ +public interface HubVirtualNetworkConnections extends HasInner { + /** + * Retrieves the details of a HubVirtualNetworkConnection. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param connectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String virtualHubName, String connectionName); + + /** + * Retrieves the details of all HubVirtualNetworkConnections. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String virtualHubName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPAddressAvailabilityResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPAddressAvailabilityResult.java new file mode 100644 index 000000000000..7d30b3bdbd04 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPAddressAvailabilityResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.IPAddressAvailabilityResultInner; +import java.util.List; + +/** + * Type representing IPAddressAvailabilityResult. + */ +public interface IPAddressAvailabilityResult extends HasInner, HasManager { + /** + * @return the available value. + */ + Boolean available(); + + /** + * @return the availableIPAddresses value. + */ + List availableIPAddresses(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPAllocationMethod.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPAllocationMethod.java new file mode 100644 index 000000000000..a7bb6bb05a3c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPAllocationMethod.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for IPAllocationMethod. + */ +public final class IPAllocationMethod extends ExpandableStringEnum { + /** Static value Static for IPAllocationMethod. */ + public static final IPAllocationMethod STATIC = fromString("Static"); + + /** Static value Dynamic for IPAllocationMethod. */ + public static final IPAllocationMethod DYNAMIC = fromString("Dynamic"); + + /** + * Creates or finds a IPAllocationMethod from its string representation. + * @param name a name to look for + * @return the corresponding IPAllocationMethod + */ + @JsonCreator + public static IPAllocationMethod fromString(String name) { + return fromString(name, IPAllocationMethod.class); + } + + /** + * @return known IPAllocationMethod values + */ + public static Collection values() { + return values(IPAllocationMethod.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPConfiguration.java new file mode 100644 index 000000000000..a864b8384c59 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPConfiguration.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.management.network.v2019_09_01.implementation.SubnetInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.PublicIPAddressInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * IP configuration. + */ +@JsonFlatten +public class IPConfiguration extends SubResource { + /** + * The private IP address of the IP configuration. + */ + @JsonProperty(value = "properties.privateIPAddress") + private String privateIPAddress; + + /** + * The private IP address allocation method. Possible values include: + * 'Static', 'Dynamic'. + */ + @JsonProperty(value = "properties.privateIPAllocationMethod") + private IPAllocationMethod privateIPAllocationMethod; + + /** + * The reference of the subnet resource. + */ + @JsonProperty(value = "properties.subnet") + private SubnetInner subnet; + + /** + * The reference of the public IP resource. + */ + @JsonProperty(value = "properties.publicIPAddress") + private PublicIPAddressInner publicIPAddress; + + /** + * The provisioning state of the IP configuration resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the private IP address of the IP configuration. + * + * @return the privateIPAddress value + */ + public String privateIPAddress() { + return this.privateIPAddress; + } + + /** + * Set the private IP address of the IP configuration. + * + * @param privateIPAddress the privateIPAddress value to set + * @return the IPConfiguration object itself. + */ + public IPConfiguration withPrivateIPAddress(String privateIPAddress) { + this.privateIPAddress = privateIPAddress; + return this; + } + + /** + * Get the private IP address allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @return the privateIPAllocationMethod value + */ + public IPAllocationMethod privateIPAllocationMethod() { + return this.privateIPAllocationMethod; + } + + /** + * Set the private IP address allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @param privateIPAllocationMethod the privateIPAllocationMethod value to set + * @return the IPConfiguration object itself. + */ + public IPConfiguration withPrivateIPAllocationMethod(IPAllocationMethod privateIPAllocationMethod) { + this.privateIPAllocationMethod = privateIPAllocationMethod; + return this; + } + + /** + * Get the reference of the subnet resource. + * + * @return the subnet value + */ + public SubnetInner subnet() { + return this.subnet; + } + + /** + * Set the reference of the subnet resource. + * + * @param subnet the subnet value to set + * @return the IPConfiguration object itself. + */ + public IPConfiguration withSubnet(SubnetInner subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get the reference of the public IP resource. + * + * @return the publicIPAddress value + */ + public PublicIPAddressInner publicIPAddress() { + return this.publicIPAddress; + } + + /** + * Set the reference of the public IP resource. + * + * @param publicIPAddress the publicIPAddress value to set + * @return the IPConfiguration object itself. + */ + public IPConfiguration withPublicIPAddress(PublicIPAddressInner publicIPAddress) { + this.publicIPAddress = publicIPAddress; + return this; + } + + /** + * Get the provisioning state of the IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the IPConfiguration object itself. + */ + public IPConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPConfigurationProfile.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPConfigurationProfile.java new file mode 100644 index 000000000000..9c6c16b14650 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPConfigurationProfile.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.network.v2019_09_01; + +import com.microsoft.azure.management.network.v2019_09_01.implementation.SubnetInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * IP configuration profile child resource. + */ +@JsonFlatten +public class IPConfigurationProfile extends SubResource { + /** + * The reference of the subnet resource to create a container network + * interface ip configuration. + */ + @JsonProperty(value = "properties.subnet") + private SubnetInner subnet; + + /** + * The provisioning state of the IP configuration profile resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource. This name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Sub Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the reference of the subnet resource to create a container network interface ip configuration. + * + * @return the subnet value + */ + public SubnetInner subnet() { + return this.subnet; + } + + /** + * Set the reference of the subnet resource to create a container network interface ip configuration. + * + * @param subnet the subnet value to set + * @return the IPConfigurationProfile object itself. + */ + public IPConfigurationProfile withSubnet(SubnetInner subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get the provisioning state of the IP configuration profile resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource. This name can be used to access the resource. + * + * @param name the name value to set + * @return the IPConfigurationProfile object itself. + */ + public IPConfigurationProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get sub Resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPVersion.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPVersion.java new file mode 100644 index 000000000000..f2d410ba4fcd --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IPVersion.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for IPVersion. + */ +public final class IPVersion extends ExpandableStringEnum { + /** Static value IPv4 for IPVersion. */ + public static final IPVersion IPV4 = fromString("IPv4"); + + /** Static value IPv6 for IPVersion. */ + public static final IPVersion IPV6 = fromString("IPv6"); + + /** + * Creates or finds a IPVersion from its string representation. + * @param name a name to look for + * @return the corresponding IPVersion + */ + @JsonCreator + public static IPVersion fromString(String name) { + return fromString(name, IPVersion.class); + } + + /** + * @return known IPVersion values + */ + public static Collection values() { + return values(IPVersion.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IkeEncryption.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IkeEncryption.java new file mode 100644 index 000000000000..ec3294e73bfa --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IkeEncryption.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for IkeEncryption. + */ +public final class IkeEncryption extends ExpandableStringEnum { + /** Static value DES for IkeEncryption. */ + public static final IkeEncryption DES = fromString("DES"); + + /** Static value DES3 for IkeEncryption. */ + public static final IkeEncryption DES3 = fromString("DES3"); + + /** Static value AES128 for IkeEncryption. */ + public static final IkeEncryption AES128 = fromString("AES128"); + + /** Static value AES192 for IkeEncryption. */ + public static final IkeEncryption AES192 = fromString("AES192"); + + /** Static value AES256 for IkeEncryption. */ + public static final IkeEncryption AES256 = fromString("AES256"); + + /** Static value GCMAES256 for IkeEncryption. */ + public static final IkeEncryption GCMAES256 = fromString("GCMAES256"); + + /** Static value GCMAES128 for IkeEncryption. */ + public static final IkeEncryption GCMAES128 = fromString("GCMAES128"); + + /** + * Creates or finds a IkeEncryption from its string representation. + * @param name a name to look for + * @return the corresponding IkeEncryption + */ + @JsonCreator + public static IkeEncryption fromString(String name) { + return fromString(name, IkeEncryption.class); + } + + /** + * @return known IkeEncryption values + */ + public static Collection values() { + return values(IkeEncryption.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IkeIntegrity.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IkeIntegrity.java new file mode 100644 index 000000000000..14a0a15d752d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IkeIntegrity.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for IkeIntegrity. + */ +public final class IkeIntegrity extends ExpandableStringEnum { + /** Static value MD5 for IkeIntegrity. */ + public static final IkeIntegrity MD5 = fromString("MD5"); + + /** Static value SHA1 for IkeIntegrity. */ + public static final IkeIntegrity SHA1 = fromString("SHA1"); + + /** Static value SHA256 for IkeIntegrity. */ + public static final IkeIntegrity SHA256 = fromString("SHA256"); + + /** Static value SHA384 for IkeIntegrity. */ + public static final IkeIntegrity SHA384 = fromString("SHA384"); + + /** Static value GCMAES256 for IkeIntegrity. */ + public static final IkeIntegrity GCMAES256 = fromString("GCMAES256"); + + /** Static value GCMAES128 for IkeIntegrity. */ + public static final IkeIntegrity GCMAES128 = fromString("GCMAES128"); + + /** + * Creates or finds a IkeIntegrity from its string representation. + * @param name a name to look for + * @return the corresponding IkeIntegrity + */ + @JsonCreator + public static IkeIntegrity fromString(String name) { + return fromString(name, IkeIntegrity.class); + } + + /** + * @return known IkeIntegrity values + */ + public static Collection values() { + return values(IkeIntegrity.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/InboundNatPool.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/InboundNatPool.java new file mode 100644 index 000000000000..88c0af2165d9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/InboundNatPool.java @@ -0,0 +1,315 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Inbound NAT pool of the load balancer. + */ +@JsonFlatten +public class InboundNatPool extends SubResource { + /** + * A reference to frontend IP addresses. + */ + @JsonProperty(value = "properties.frontendIPConfiguration") + private SubResource frontendIPConfiguration; + + /** + * The reference to the transport protocol used by the inbound NAT pool. + * Possible values include: 'Udp', 'Tcp', 'All'. + */ + @JsonProperty(value = "properties.protocol", required = true) + private TransportProtocol protocol; + + /** + * The first port number in the range of external ports that will be used + * to provide Inbound Nat to NICs associated with a load balancer. + * Acceptable values range between 1 and 65534. + */ + @JsonProperty(value = "properties.frontendPortRangeStart", required = true) + private int frontendPortRangeStart; + + /** + * The last port number in the range of external ports that will be used to + * provide Inbound Nat to NICs associated with a load balancer. Acceptable + * values range between 1 and 65535. + */ + @JsonProperty(value = "properties.frontendPortRangeEnd", required = true) + private int frontendPortRangeEnd; + + /** + * The port used for internal connections on the endpoint. Acceptable + * values are between 1 and 65535. + */ + @JsonProperty(value = "properties.backendPort", required = true) + private int backendPort; + + /** + * The timeout for the TCP idle connection. The value can be set between 4 + * and 30 minutes. The default value is 4 minutes. This element is only + * used when the protocol is set to TCP. + */ + @JsonProperty(value = "properties.idleTimeoutInMinutes") + private Integer idleTimeoutInMinutes; + + /** + * Configures a virtual machine's endpoint for the floating IP capability + * required to configure a SQL AlwaysOn Availability Group. This setting is + * required when using the SQL AlwaysOn Availability Groups in SQL server. + * This setting can't be changed after you create the endpoint. + */ + @JsonProperty(value = "properties.enableFloatingIP") + private Boolean enableFloatingIP; + + /** + * Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + * connection termination. This element is only used when the protocol is + * set to TCP. + */ + @JsonProperty(value = "properties.enableTcpReset") + private Boolean enableTcpReset; + + /** + * The provisioning state of the inbound NAT pool resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within the set of inbound NAT + * pools used by the load balancer. This name can be used to access the + * resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get a reference to frontend IP addresses. + * + * @return the frontendIPConfiguration value + */ + public SubResource frontendIPConfiguration() { + return this.frontendIPConfiguration; + } + + /** + * Set a reference to frontend IP addresses. + * + * @param frontendIPConfiguration the frontendIPConfiguration value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withFrontendIPConfiguration(SubResource frontendIPConfiguration) { + this.frontendIPConfiguration = frontendIPConfiguration; + return this; + } + + /** + * Get the reference to the transport protocol used by the inbound NAT pool. Possible values include: 'Udp', 'Tcp', 'All'. + * + * @return the protocol value + */ + public TransportProtocol protocol() { + return this.protocol; + } + + /** + * Set the reference to the transport protocol used by the inbound NAT pool. Possible values include: 'Udp', 'Tcp', 'All'. + * + * @param protocol the protocol value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withProtocol(TransportProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. + * + * @return the frontendPortRangeStart value + */ + public int frontendPortRangeStart() { + return this.frontendPortRangeStart; + } + + /** + * Set the first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. + * + * @param frontendPortRangeStart the frontendPortRangeStart value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withFrontendPortRangeStart(int frontendPortRangeStart) { + this.frontendPortRangeStart = frontendPortRangeStart; + return this; + } + + /** + * Get the last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. + * + * @return the frontendPortRangeEnd value + */ + public int frontendPortRangeEnd() { + return this.frontendPortRangeEnd; + } + + /** + * Set the last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. + * + * @param frontendPortRangeEnd the frontendPortRangeEnd value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withFrontendPortRangeEnd(int frontendPortRangeEnd) { + this.frontendPortRangeEnd = frontendPortRangeEnd; + return this; + } + + /** + * Get the port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. + * + * @return the backendPort value + */ + public int backendPort() { + return this.backendPort; + } + + /** + * Set the port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. + * + * @param backendPort the backendPort value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withBackendPort(int backendPort) { + this.backendPort = backendPort; + return this; + } + + /** + * Get the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + * + * @return the idleTimeoutInMinutes value + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + + /** + * Get configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + * + * @return the enableFloatingIP value + */ + public Boolean enableFloatingIP() { + return this.enableFloatingIP; + } + + /** + * Set configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + * + * @param enableFloatingIP the enableFloatingIP value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withEnableFloatingIP(Boolean enableFloatingIP) { + this.enableFloatingIP = enableFloatingIP; + return this; + } + + /** + * Get receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + * + * @return the enableTcpReset value + */ + public Boolean enableTcpReset() { + return this.enableTcpReset; + } + + /** + * Set receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + * + * @param enableTcpReset the enableTcpReset value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withEnableTcpReset(Boolean enableTcpReset) { + this.enableTcpReset = enableTcpReset; + return this; + } + + /** + * Get the provisioning state of the inbound NAT pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within the set of inbound NAT pools used by the load balancer. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within the set of inbound NAT pools used by the load balancer. This name can be used to access the resource. + * + * @param name the name value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/InboundNatRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/InboundNatRule.java new file mode 100644 index 000000000000..4e6dd0f63ee9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/InboundNatRule.java @@ -0,0 +1,355 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.InboundNatRuleInner; +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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; + +/** + * Type representing InboundNatRule. + */ +public interface InboundNatRule extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the backendIPConfiguration value. + */ + VirtualMachineScaleSetNetworkInterfaceIPConfiguration backendIPConfiguration(); + + /** + * @return the backendPort value. + */ + Integer backendPort(); + + /** + * @return the enableFloatingIP value. + */ + Boolean enableFloatingIP(); + + /** + * @return the enableTcpReset value. + */ + Boolean enableTcpReset(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the frontendIPConfiguration value. + */ + SubResource frontendIPConfiguration(); + + /** + * @return the frontendPort value. + */ + Integer frontendPort(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the idleTimeoutInMinutes value. + */ + Integer idleTimeoutInMinutes(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the protocol value. + */ + TransportProtocol protocol(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the InboundNatRule definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLoadBalancer, DefinitionStages.WithCreate { + } + + /** + * Grouping of InboundNatRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a InboundNatRule definition. + */ + interface Blank extends WithLoadBalancer { + } + + /** + * The stage of the inboundnatrule definition allowing to specify LoadBalancer. + */ + interface WithLoadBalancer { + /** + * Specifies resourceGroupName, loadBalancerName. + * @param resourceGroupName The name of the resource group + * @param loadBalancerName The name of the load balancer + * @return the next definition stage + */ + WithCreate withExistingLoadBalancer(String resourceGroupName, String loadBalancerName); + } + + /** + * The stage of the inboundnatrule definition allowing to specify BackendPort. + */ + interface WithBackendPort { + /** + * Specifies backendPort. + * @param backendPort The port used for the internal endpoint. Acceptable values range from 1 to 65535 + * @return the next definition stage + */ + WithCreate withBackendPort(Integer backendPort); + } + + /** + * The stage of the inboundnatrule definition allowing to specify EnableFloatingIP. + */ + interface WithEnableFloatingIP { + /** + * Specifies enableFloatingIP. + * @param enableFloatingIP Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint + * @return the next definition stage + */ + WithCreate withEnableFloatingIP(Boolean enableFloatingIP); + } + + /** + * The stage of the inboundnatrule definition allowing to specify EnableTcpReset. + */ + interface WithEnableTcpReset { + /** + * Specifies enableTcpReset. + * @param enableTcpReset Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP + * @return the next definition stage + */ + WithCreate withEnableTcpReset(Boolean enableTcpReset); + } + + /** + * The stage of the inboundnatrule definition allowing to specify FrontendIPConfiguration. + */ + interface WithFrontendIPConfiguration { + /** + * Specifies frontendIPConfiguration. + * @param frontendIPConfiguration A reference to frontend IP addresses + * @return the next definition stage + */ + WithCreate withFrontendIPConfiguration(SubResource frontendIPConfiguration); + } + + /** + * The stage of the inboundnatrule definition allowing to specify FrontendPort. + */ + interface WithFrontendPort { + /** + * Specifies frontendPort. + * @param frontendPort The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534 + * @return the next definition stage + */ + WithCreate withFrontendPort(Integer frontendPort); + } + + /** + * The stage of the inboundnatrule definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the inboundnatrule definition allowing to specify IdleTimeoutInMinutes. + */ + interface WithIdleTimeoutInMinutes { + /** + * Specifies idleTimeoutInMinutes. + * @param idleTimeoutInMinutes The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP + * @return the next definition stage + */ + WithCreate withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes); + } + + /** + * The stage of the inboundnatrule definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the inboundnatrule definition allowing to specify Protocol. + */ + interface WithProtocol { + /** + * Specifies protocol. + * @param protocol The reference to the transport protocol used by the load balancing rule. Possible values include: 'Udp', 'Tcp', 'All' + * @return the next definition stage + */ + WithCreate withProtocol(TransportProtocol protocol); + } + + /** + * 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.WithBackendPort, DefinitionStages.WithEnableFloatingIP, DefinitionStages.WithEnableTcpReset, DefinitionStages.WithFrontendIPConfiguration, DefinitionStages.WithFrontendPort, DefinitionStages.WithId, DefinitionStages.WithIdleTimeoutInMinutes, DefinitionStages.WithName, DefinitionStages.WithProtocol { + } + } + /** + * The template for a InboundNatRule update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithBackendPort, UpdateStages.WithEnableFloatingIP, UpdateStages.WithEnableTcpReset, UpdateStages.WithFrontendIPConfiguration, UpdateStages.WithFrontendPort, UpdateStages.WithId, UpdateStages.WithIdleTimeoutInMinutes, UpdateStages.WithName, UpdateStages.WithProtocol { + } + + /** + * Grouping of InboundNatRule update stages. + */ + interface UpdateStages { + /** + * The stage of the inboundnatrule update allowing to specify BackendPort. + */ + interface WithBackendPort { + /** + * Specifies backendPort. + * @param backendPort The port used for the internal endpoint. Acceptable values range from 1 to 65535 + * @return the next update stage + */ + Update withBackendPort(Integer backendPort); + } + + /** + * The stage of the inboundnatrule update allowing to specify EnableFloatingIP. + */ + interface WithEnableFloatingIP { + /** + * Specifies enableFloatingIP. + * @param enableFloatingIP Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint + * @return the next update stage + */ + Update withEnableFloatingIP(Boolean enableFloatingIP); + } + + /** + * The stage of the inboundnatrule update allowing to specify EnableTcpReset. + */ + interface WithEnableTcpReset { + /** + * Specifies enableTcpReset. + * @param enableTcpReset Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP + * @return the next update stage + */ + Update withEnableTcpReset(Boolean enableTcpReset); + } + + /** + * The stage of the inboundnatrule update allowing to specify FrontendIPConfiguration. + */ + interface WithFrontendIPConfiguration { + /** + * Specifies frontendIPConfiguration. + * @param frontendIPConfiguration A reference to frontend IP addresses + * @return the next update stage + */ + Update withFrontendIPConfiguration(SubResource frontendIPConfiguration); + } + + /** + * The stage of the inboundnatrule update allowing to specify FrontendPort. + */ + interface WithFrontendPort { + /** + * Specifies frontendPort. + * @param frontendPort The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534 + * @return the next update stage + */ + Update withFrontendPort(Integer frontendPort); + } + + /** + * The stage of the inboundnatrule update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the inboundnatrule update allowing to specify IdleTimeoutInMinutes. + */ + interface WithIdleTimeoutInMinutes { + /** + * Specifies idleTimeoutInMinutes. + * @param idleTimeoutInMinutes The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP + * @return the next update stage + */ + Update withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes); + } + + /** + * The stage of the inboundnatrule update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the inboundnatrule update allowing to specify Protocol. + */ + interface WithProtocol { + /** + * Specifies protocol. + * @param protocol The reference to the transport protocol used by the load balancing rule. Possible values include: 'Udp', 'Tcp', 'All' + * @return the next update stage + */ + Update withProtocol(TransportProtocol protocol); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/InboundNatRules.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/InboundNatRules.java new file mode 100644 index 000000000000..cb87af6b875e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/InboundNatRules.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.InboundNatRulesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing InboundNatRules. + */ +public interface InboundNatRules extends SupportsCreating, HasInner { + /** + * Gets the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName); + + /** + * Gets all the inbound nat rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String loadBalancerName); + + /** + * Deletes the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpFlowProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpFlowProtocol.java new file mode 100644 index 000000000000..037d82c4f8de --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpFlowProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for IpFlowProtocol. + */ +public final class IpFlowProtocol extends ExpandableStringEnum { + /** Static value TCP for IpFlowProtocol. */ + public static final IpFlowProtocol TCP = fromString("TCP"); + + /** Static value UDP for IpFlowProtocol. */ + public static final IpFlowProtocol UDP = fromString("UDP"); + + /** + * Creates or finds a IpFlowProtocol from its string representation. + * @param name a name to look for + * @return the corresponding IpFlowProtocol + */ + @JsonCreator + public static IpFlowProtocol fromString(String name) { + return fromString(name, IpFlowProtocol.class); + } + + /** + * @return known IpFlowProtocol values + */ + public static Collection values() { + return values(IpFlowProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpGroup.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpGroup.java new file mode 100644 index 000000000000..d262df562870 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpGroup.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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.IpGroupInner; + +/** + * Type representing IpGroup. + */ +public interface IpGroup extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the firewalls value. + */ + List firewalls(); + + /** + * @return the ipAddresses value. + */ + List ipAddresses(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * The entirety of the IpGroup definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of IpGroup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a IpGroup definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the IpGroup definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the ipgroup definition allowing to specify IpAddresses. + */ + interface WithIpAddresses { + /** + * Specifies ipAddresses. + * @param ipAddresses IpAddresses/IpAddressPrefixes in the IpGroups resource + * @return the next definition stage + */ + WithCreate withIpAddresses(List ipAddresses); + } + + /** + * 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.WithIpAddresses { + } + } + /** + * The template for a IpGroup update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithIpAddresses { + } + + /** + * Grouping of IpGroup update stages. + */ + interface UpdateStages { + /** + * The stage of the ipgroup update allowing to specify IpAddresses. + */ + interface WithIpAddresses { + /** + * Specifies ipAddresses. + * @param ipAddresses IpAddresses/IpAddressPrefixes in the IpGroups resource + * @return the next update stage + */ + Update withIpAddresses(List ipAddresses); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpGroups.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpGroups.java new file mode 100644 index 000000000000..36ac97181375 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpGroups.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.network.v2019_09_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.network.v2019_09_01.implementation.IpGroupsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing IpGroups. + */ +public interface IpGroups extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpTag.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpTag.java new file mode 100644 index 000000000000..cc331c6081f3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpTag.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains the IpTag associated with the object. + */ +public class IpTag { + /** + * The IP tag type. Example: FirstPartyUsage. + */ + @JsonProperty(value = "ipTagType") + private String ipTagType; + + /** + * The value of the IP tag associated with the public IP. Example: SQL. + */ + @JsonProperty(value = "tag") + private String tag; + + /** + * Get the IP tag type. Example: FirstPartyUsage. + * + * @return the ipTagType value + */ + public String ipTagType() { + return this.ipTagType; + } + + /** + * Set the IP tag type. Example: FirstPartyUsage. + * + * @param ipTagType the ipTagType value to set + * @return the IpTag object itself. + */ + public IpTag withIpTagType(String ipTagType) { + this.ipTagType = ipTagType; + return this; + } + + /** + * Get the value of the IP tag associated with the public IP. Example: SQL. + * + * @return the tag value + */ + public String tag() { + return this.tag; + } + + /** + * Set the value of the IP tag associated with the public IP. Example: SQL. + * + * @param tag the tag value to set + * @return the IpTag object itself. + */ + public IpTag withTag(String tag) { + this.tag = tag; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpsecEncryption.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpsecEncryption.java new file mode 100644 index 000000000000..43399762e15c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpsecEncryption.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for IpsecEncryption. + */ +public final class IpsecEncryption extends ExpandableStringEnum { + /** Static value None for IpsecEncryption. */ + public static final IpsecEncryption NONE = fromString("None"); + + /** Static value DES for IpsecEncryption. */ + public static final IpsecEncryption DES = fromString("DES"); + + /** Static value DES3 for IpsecEncryption. */ + public static final IpsecEncryption DES3 = fromString("DES3"); + + /** Static value AES128 for IpsecEncryption. */ + public static final IpsecEncryption AES128 = fromString("AES128"); + + /** Static value AES192 for IpsecEncryption. */ + public static final IpsecEncryption AES192 = fromString("AES192"); + + /** Static value AES256 for IpsecEncryption. */ + public static final IpsecEncryption AES256 = fromString("AES256"); + + /** Static value GCMAES128 for IpsecEncryption. */ + public static final IpsecEncryption GCMAES128 = fromString("GCMAES128"); + + /** Static value GCMAES192 for IpsecEncryption. */ + public static final IpsecEncryption GCMAES192 = fromString("GCMAES192"); + + /** Static value GCMAES256 for IpsecEncryption. */ + public static final IpsecEncryption GCMAES256 = fromString("GCMAES256"); + + /** + * Creates or finds a IpsecEncryption from its string representation. + * @param name a name to look for + * @return the corresponding IpsecEncryption + */ + @JsonCreator + public static IpsecEncryption fromString(String name) { + return fromString(name, IpsecEncryption.class); + } + + /** + * @return known IpsecEncryption values + */ + public static Collection values() { + return values(IpsecEncryption.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpsecIntegrity.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpsecIntegrity.java new file mode 100644 index 000000000000..247282a1f47e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpsecIntegrity.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for IpsecIntegrity. + */ +public final class IpsecIntegrity extends ExpandableStringEnum { + /** Static value MD5 for IpsecIntegrity. */ + public static final IpsecIntegrity MD5 = fromString("MD5"); + + /** Static value SHA1 for IpsecIntegrity. */ + public static final IpsecIntegrity SHA1 = fromString("SHA1"); + + /** Static value SHA256 for IpsecIntegrity. */ + public static final IpsecIntegrity SHA256 = fromString("SHA256"); + + /** Static value GCMAES128 for IpsecIntegrity. */ + public static final IpsecIntegrity GCMAES128 = fromString("GCMAES128"); + + /** Static value GCMAES192 for IpsecIntegrity. */ + public static final IpsecIntegrity GCMAES192 = fromString("GCMAES192"); + + /** Static value GCMAES256 for IpsecIntegrity. */ + public static final IpsecIntegrity GCMAES256 = fromString("GCMAES256"); + + /** + * Creates or finds a IpsecIntegrity from its string representation. + * @param name a name to look for + * @return the corresponding IpsecIntegrity + */ + @JsonCreator + public static IpsecIntegrity fromString(String name) { + return fromString(name, IpsecIntegrity.class); + } + + /** + * @return known IpsecIntegrity values + */ + public static Collection values() { + return values(IpsecIntegrity.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpsecPolicy.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpsecPolicy.java new file mode 100644 index 000000000000..fbafa982026a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IpsecPolicy.java @@ -0,0 +1,236 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An IPSec Policy configuration for a virtual network gateway connection. + */ +public class IpsecPolicy { + /** + * The IPSec Security Association (also called Quick Mode or Phase 2 SA) + * lifetime in seconds for a site to site VPN tunnel. + */ + @JsonProperty(value = "saLifeTimeSeconds", required = true) + private int saLifeTimeSeconds; + + /** + * The IPSec Security Association (also called Quick Mode or Phase 2 SA) + * payload size in KB for a site to site VPN tunnel. + */ + @JsonProperty(value = "saDataSizeKilobytes", required = true) + private int saDataSizeKilobytes; + + /** + * The IPSec encryption algorithm (IKE phase 1). Possible values include: + * 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', + * 'GCMAES192', 'GCMAES256'. + */ + @JsonProperty(value = "ipsecEncryption", required = true) + private IpsecEncryption ipsecEncryption; + + /** + * The IPSec integrity algorithm (IKE phase 1). Possible values include: + * 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + */ + @JsonProperty(value = "ipsecIntegrity", required = true) + private IpsecIntegrity ipsecIntegrity; + + /** + * The IKE encryption algorithm (IKE phase 2). Possible values include: + * 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. + */ + @JsonProperty(value = "ikeEncryption", required = true) + private IkeEncryption ikeEncryption; + + /** + * The IKE integrity algorithm (IKE phase 2). Possible values include: + * 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. + */ + @JsonProperty(value = "ikeIntegrity", required = true) + private IkeIntegrity ikeIntegrity; + + /** + * The DH Group used in IKE Phase 1 for initial SA. Possible values + * include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', + * 'ECP256', 'ECP384', 'DHGroup24'. + */ + @JsonProperty(value = "dhGroup", required = true) + private DhGroup dhGroup; + + /** + * The Pfs Group used in IKE Phase 2 for new child SA. Possible values + * include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', + * 'PFS14', 'PFSMM'. + */ + @JsonProperty(value = "pfsGroup", required = true) + private PfsGroup pfsGroup; + + /** + * Get the IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. + * + * @return the saLifeTimeSeconds value + */ + public int saLifeTimeSeconds() { + return this.saLifeTimeSeconds; + } + + /** + * Set the IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. + * + * @param saLifeTimeSeconds the saLifeTimeSeconds value to set + * @return the IpsecPolicy object itself. + */ + public IpsecPolicy withSaLifeTimeSeconds(int saLifeTimeSeconds) { + this.saLifeTimeSeconds = saLifeTimeSeconds; + return this; + } + + /** + * Get the IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. + * + * @return the saDataSizeKilobytes value + */ + public int saDataSizeKilobytes() { + return this.saDataSizeKilobytes; + } + + /** + * Set the IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. + * + * @param saDataSizeKilobytes the saDataSizeKilobytes value to set + * @return the IpsecPolicy object itself. + */ + public IpsecPolicy withSaDataSizeKilobytes(int saDataSizeKilobytes) { + this.saDataSizeKilobytes = saDataSizeKilobytes; + return this; + } + + /** + * Get the IPSec encryption algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @return the ipsecEncryption value + */ + public IpsecEncryption ipsecEncryption() { + return this.ipsecEncryption; + } + + /** + * Set the IPSec encryption algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @param ipsecEncryption the ipsecEncryption value to set + * @return the IpsecPolicy object itself. + */ + public IpsecPolicy withIpsecEncryption(IpsecEncryption ipsecEncryption) { + this.ipsecEncryption = ipsecEncryption; + return this; + } + + /** + * Get the IPSec integrity algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @return the ipsecIntegrity value + */ + public IpsecIntegrity ipsecIntegrity() { + return this.ipsecIntegrity; + } + + /** + * Set the IPSec integrity algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @param ipsecIntegrity the ipsecIntegrity value to set + * @return the IpsecPolicy object itself. + */ + public IpsecPolicy withIpsecIntegrity(IpsecIntegrity ipsecIntegrity) { + this.ipsecIntegrity = ipsecIntegrity; + return this; + } + + /** + * Get the IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. + * + * @return the ikeEncryption value + */ + public IkeEncryption ikeEncryption() { + return this.ikeEncryption; + } + + /** + * Set the IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. + * + * @param ikeEncryption the ikeEncryption value to set + * @return the IpsecPolicy object itself. + */ + public IpsecPolicy withIkeEncryption(IkeEncryption ikeEncryption) { + this.ikeEncryption = ikeEncryption; + return this; + } + + /** + * Get the IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. + * + * @return the ikeIntegrity value + */ + public IkeIntegrity ikeIntegrity() { + return this.ikeIntegrity; + } + + /** + * Set the IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. + * + * @param ikeIntegrity the ikeIntegrity value to set + * @return the IpsecPolicy object itself. + */ + public IpsecPolicy withIkeIntegrity(IkeIntegrity ikeIntegrity) { + this.ikeIntegrity = ikeIntegrity; + return this; + } + + /** + * Get the DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'. + * + * @return the dhGroup value + */ + public DhGroup dhGroup() { + return this.dhGroup; + } + + /** + * Set the DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'. + * + * @param dhGroup the dhGroup value to set + * @return the IpsecPolicy object itself. + */ + public IpsecPolicy withDhGroup(DhGroup dhGroup) { + this.dhGroup = dhGroup; + return this; + } + + /** + * Get the Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM'. + * + * @return the pfsGroup value + */ + public PfsGroup pfsGroup() { + return this.pfsGroup; + } + + /** + * Set the Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM'. + * + * @param pfsGroup the pfsGroup value to set + * @return the IpsecPolicy object itself. + */ + public IpsecPolicy withPfsGroup(PfsGroup pfsGroup) { + this.pfsGroup = pfsGroup; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Ipv6ExpressRouteCircuitPeeringConfig.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Ipv6ExpressRouteCircuitPeeringConfig.java new file mode 100644 index 000000000000..5681041da4a3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Ipv6ExpressRouteCircuitPeeringConfig.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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains IPv6 peering config. + */ +public class Ipv6ExpressRouteCircuitPeeringConfig { + /** + * The primary address prefix. + */ + @JsonProperty(value = "primaryPeerAddressPrefix") + private String primaryPeerAddressPrefix; + + /** + * The secondary address prefix. + */ + @JsonProperty(value = "secondaryPeerAddressPrefix") + private String secondaryPeerAddressPrefix; + + /** + * The Microsoft peering configuration. + */ + @JsonProperty(value = "microsoftPeeringConfig") + private ExpressRouteCircuitPeeringConfig microsoftPeeringConfig; + + /** + * The reference of the RouteFilter resource. + */ + @JsonProperty(value = "routeFilter") + private SubResource routeFilter; + + /** + * The state of peering. Possible values include: 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "state") + private ExpressRouteCircuitPeeringState state; + + /** + * Get the primary address prefix. + * + * @return the primaryPeerAddressPrefix value + */ + public String primaryPeerAddressPrefix() { + return this.primaryPeerAddressPrefix; + } + + /** + * Set the primary address prefix. + * + * @param primaryPeerAddressPrefix the primaryPeerAddressPrefix value to set + * @return the Ipv6ExpressRouteCircuitPeeringConfig object itself. + */ + public Ipv6ExpressRouteCircuitPeeringConfig withPrimaryPeerAddressPrefix(String primaryPeerAddressPrefix) { + this.primaryPeerAddressPrefix = primaryPeerAddressPrefix; + return this; + } + + /** + * Get the secondary address prefix. + * + * @return the secondaryPeerAddressPrefix value + */ + public String secondaryPeerAddressPrefix() { + return this.secondaryPeerAddressPrefix; + } + + /** + * Set the secondary address prefix. + * + * @param secondaryPeerAddressPrefix the secondaryPeerAddressPrefix value to set + * @return the Ipv6ExpressRouteCircuitPeeringConfig object itself. + */ + public Ipv6ExpressRouteCircuitPeeringConfig withSecondaryPeerAddressPrefix(String secondaryPeerAddressPrefix) { + this.secondaryPeerAddressPrefix = secondaryPeerAddressPrefix; + return this; + } + + /** + * Get the Microsoft peering configuration. + * + * @return the microsoftPeeringConfig value + */ + public ExpressRouteCircuitPeeringConfig microsoftPeeringConfig() { + return this.microsoftPeeringConfig; + } + + /** + * Set the Microsoft peering configuration. + * + * @param microsoftPeeringConfig the microsoftPeeringConfig value to set + * @return the Ipv6ExpressRouteCircuitPeeringConfig object itself. + */ + public Ipv6ExpressRouteCircuitPeeringConfig withMicrosoftPeeringConfig(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig) { + this.microsoftPeeringConfig = microsoftPeeringConfig; + return this; + } + + /** + * Get the reference of the RouteFilter resource. + * + * @return the routeFilter value + */ + public SubResource routeFilter() { + return this.routeFilter; + } + + /** + * Set the reference of the RouteFilter resource. + * + * @param routeFilter the routeFilter value to set + * @return the Ipv6ExpressRouteCircuitPeeringConfig object itself. + */ + public Ipv6ExpressRouteCircuitPeeringConfig withRouteFilter(SubResource routeFilter) { + this.routeFilter = routeFilter; + return this; + } + + /** + * Get the state of peering. Possible values include: 'Disabled', 'Enabled'. + * + * @return the state value + */ + public ExpressRouteCircuitPeeringState state() { + return this.state; + } + + /** + * Set the state of peering. Possible values include: 'Disabled', 'Enabled'. + * + * @param state the state value to set + * @return the Ipv6ExpressRouteCircuitPeeringConfig object itself. + */ + public Ipv6ExpressRouteCircuitPeeringConfig withState(ExpressRouteCircuitPeeringState state) { + this.state = state; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IssueType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IssueType.java new file mode 100644 index 000000000000..7914945c8ce0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/IssueType.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for IssueType. + */ +public final class IssueType extends ExpandableStringEnum { + /** Static value Unknown for IssueType. */ + public static final IssueType UNKNOWN = fromString("Unknown"); + + /** Static value AgentStopped for IssueType. */ + public static final IssueType AGENT_STOPPED = fromString("AgentStopped"); + + /** Static value GuestFirewall for IssueType. */ + public static final IssueType GUEST_FIREWALL = fromString("GuestFirewall"); + + /** Static value DnsResolution for IssueType. */ + public static final IssueType DNS_RESOLUTION = fromString("DnsResolution"); + + /** Static value SocketBind for IssueType. */ + public static final IssueType SOCKET_BIND = fromString("SocketBind"); + + /** Static value NetworkSecurityRule for IssueType. */ + public static final IssueType NETWORK_SECURITY_RULE = fromString("NetworkSecurityRule"); + + /** Static value UserDefinedRoute for IssueType. */ + public static final IssueType USER_DEFINED_ROUTE = fromString("UserDefinedRoute"); + + /** Static value PortThrottled for IssueType. */ + public static final IssueType PORT_THROTTLED = fromString("PortThrottled"); + + /** Static value Platform for IssueType. */ + public static final IssueType PLATFORM = fromString("Platform"); + + /** + * Creates or finds a IssueType from its string representation. + * @param name a name to look for + * @return the corresponding IssueType + */ + @JsonCreator + public static IssueType fromString(String name) { + return fromString(name, IssueType.class); + } + + /** + * @return known IssueType values + */ + public static Collection values() { + return values(IssueType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancer.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancer.java new file mode 100644 index 000000000000..6ccc4a2ba147 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancer.java @@ -0,0 +1,322 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.BackendAddressPoolInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.FrontendIPConfigurationInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.InboundNatRuleInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.LoadBalancingRuleInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.OutboundRuleInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ProbeInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.LoadBalancerInner; + +/** + * Type representing LoadBalancer. + */ +public interface LoadBalancer extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the backendAddressPools value. + */ + List backendAddressPools(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the frontendIPConfigurations value. + */ + List frontendIPConfigurations(); + + /** + * @return the inboundNatPools value. + */ + List inboundNatPools(); + + /** + * @return the inboundNatRules value. + */ + List inboundNatRules(); + + /** + * @return the loadBalancingRules value. + */ + List loadBalancingRules(); + + /** + * @return the outboundRules value. + */ + List outboundRules(); + + /** + * @return the probes value. + */ + List probes(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the sku value. + */ + LoadBalancerSku sku(); + + /** + * The entirety of the LoadBalancer definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of LoadBalancer definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a LoadBalancer definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the LoadBalancer definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the loadbalancer definition allowing to specify BackendAddressPools. + */ + interface WithBackendAddressPools { + /** + * Specifies backendAddressPools. + * @param backendAddressPools Collection of backend address pools used by a load balancer + * @return the next definition stage + */ + WithCreate withBackendAddressPools(List backendAddressPools); + } + + /** + * The stage of the loadbalancer definition allowing to specify FrontendIPConfigurations. + */ + interface WithFrontendIPConfigurations { + /** + * Specifies frontendIPConfigurations. + * @param frontendIPConfigurations Object representing the frontend IPs to be used for the load balancer + * @return the next definition stage + */ + WithCreate withFrontendIPConfigurations(List frontendIPConfigurations); + } + + /** + * The stage of the loadbalancer definition allowing to specify InboundNatPools. + */ + interface WithInboundNatPools { + /** + * Specifies inboundNatPools. + * @param inboundNatPools Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules + * @return the next definition stage + */ + WithCreate withInboundNatPools(List inboundNatPools); + } + + /** + * The stage of the loadbalancer definition allowing to specify InboundNatRules. + */ + interface WithInboundNatRules { + /** + * Specifies inboundNatRules. + * @param inboundNatRules Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules + * @return the next definition stage + */ + WithCreate withInboundNatRules(List inboundNatRules); + } + + /** + * The stage of the loadbalancer definition allowing to specify LoadBalancingRules. + */ + interface WithLoadBalancingRules { + /** + * Specifies loadBalancingRules. + * @param loadBalancingRules Object collection representing the load balancing rules Gets the provisioning + * @return the next definition stage + */ + WithCreate withLoadBalancingRules(List loadBalancingRules); + } + + /** + * The stage of the loadbalancer definition allowing to specify OutboundRules. + */ + interface WithOutboundRules { + /** + * Specifies outboundRules. + * @param outboundRules The outbound rules + * @return the next definition stage + */ + WithCreate withOutboundRules(List outboundRules); + } + + /** + * The stage of the loadbalancer definition allowing to specify Probes. + */ + interface WithProbes { + /** + * Specifies probes. + * @param probes Collection of probe objects used in the load balancer + * @return the next definition stage + */ + WithCreate withProbes(List probes); + } + + /** + * The stage of the loadbalancer definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The load balancer SKU + * @return the next definition stage + */ + WithCreate withSku(LoadBalancerSku sku); + } + + /** + * 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.WithBackendAddressPools, DefinitionStages.WithFrontendIPConfigurations, DefinitionStages.WithInboundNatPools, DefinitionStages.WithInboundNatRules, DefinitionStages.WithLoadBalancingRules, DefinitionStages.WithOutboundRules, DefinitionStages.WithProbes, DefinitionStages.WithSku { + } + } + /** + * The template for a LoadBalancer update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithBackendAddressPools, UpdateStages.WithFrontendIPConfigurations, UpdateStages.WithInboundNatPools, UpdateStages.WithInboundNatRules, UpdateStages.WithLoadBalancingRules, UpdateStages.WithOutboundRules, UpdateStages.WithProbes, UpdateStages.WithSku { + } + + /** + * Grouping of LoadBalancer update stages. + */ + interface UpdateStages { + /** + * The stage of the loadbalancer update allowing to specify BackendAddressPools. + */ + interface WithBackendAddressPools { + /** + * Specifies backendAddressPools. + * @param backendAddressPools Collection of backend address pools used by a load balancer + * @return the next update stage + */ + Update withBackendAddressPools(List backendAddressPools); + } + + /** + * The stage of the loadbalancer update allowing to specify FrontendIPConfigurations. + */ + interface WithFrontendIPConfigurations { + /** + * Specifies frontendIPConfigurations. + * @param frontendIPConfigurations Object representing the frontend IPs to be used for the load balancer + * @return the next update stage + */ + Update withFrontendIPConfigurations(List frontendIPConfigurations); + } + + /** + * The stage of the loadbalancer update allowing to specify InboundNatPools. + */ + interface WithInboundNatPools { + /** + * Specifies inboundNatPools. + * @param inboundNatPools Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules + * @return the next update stage + */ + Update withInboundNatPools(List inboundNatPools); + } + + /** + * The stage of the loadbalancer update allowing to specify InboundNatRules. + */ + interface WithInboundNatRules { + /** + * Specifies inboundNatRules. + * @param inboundNatRules Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules + * @return the next update stage + */ + Update withInboundNatRules(List inboundNatRules); + } + + /** + * The stage of the loadbalancer update allowing to specify LoadBalancingRules. + */ + interface WithLoadBalancingRules { + /** + * Specifies loadBalancingRules. + * @param loadBalancingRules Object collection representing the load balancing rules Gets the provisioning + * @return the next update stage + */ + Update withLoadBalancingRules(List loadBalancingRules); + } + + /** + * The stage of the loadbalancer update allowing to specify OutboundRules. + */ + interface WithOutboundRules { + /** + * Specifies outboundRules. + * @param outboundRules The outbound rules + * @return the next update stage + */ + Update withOutboundRules(List outboundRules); + } + + /** + * The stage of the loadbalancer update allowing to specify Probes. + */ + interface WithProbes { + /** + * Specifies probes. + * @param probes Collection of probe objects used in the load balancer + * @return the next update stage + */ + Update withProbes(List probes); + } + + /** + * The stage of the loadbalancer update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The load balancer SKU + * @return the next update stage + */ + Update withSku(LoadBalancerSku sku); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerBackendAddressPools.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerBackendAddressPools.java new file mode 100644 index 000000000000..40075ddb7095 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerBackendAddressPools.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.LoadBalancerBackendAddressPoolsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing LoadBalancerBackendAddressPools. + */ +public interface LoadBalancerBackendAddressPools extends HasInner { + /** + * Gets load balancer backend address pool. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param backendAddressPoolName The name of the backend address pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String loadBalancerName, String backendAddressPoolName); + + /** + * Gets all the load balancer backed address pools. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String loadBalancerName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerFrontendIPConfigurations.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerFrontendIPConfigurations.java new file mode 100644 index 000000000000..43c772ff82a4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerFrontendIPConfigurations.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.LoadBalancerFrontendIPConfigurationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing LoadBalancerFrontendIPConfigurations. + */ +public interface LoadBalancerFrontendIPConfigurations extends HasInner { + /** + * Gets load balancer frontend IP configuration. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param frontendIPConfigurationName The name of the frontend IP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String loadBalancerName, String frontendIPConfigurationName); + + /** + * Gets all the load balancer frontend IP configurations. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String loadBalancerName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerLoadBalancingRules.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerLoadBalancingRules.java new file mode 100644 index 000000000000..05bd0a2898c6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerLoadBalancingRules.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.LoadBalancerLoadBalancingRulesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing LoadBalancerLoadBalancingRules. + */ +public interface LoadBalancerLoadBalancingRules extends HasInner { + /** + * Gets the specified load balancer load balancing rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param loadBalancingRuleName The name of the load balancing rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String loadBalancerName, String loadBalancingRuleName); + + /** + * Gets all the load balancing rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String loadBalancerName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerNetworkInterface.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerNetworkInterface.java new file mode 100644 index 000000000000..603ee59ab683 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerNetworkInterface.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkInterfaceInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import java.util.Map; +import com.microsoft.azure.SubResource; + +/** + * Type representing LoadBalancerNetworkInterface. + */ +public interface LoadBalancerNetworkInterface extends HasInner, HasManager { + /** + * @return the dnsSettings value. + */ + NetworkInterfaceDnsSettings dnsSettings(); + + /** + * @return the enableAcceleratedNetworking value. + */ + Boolean enableAcceleratedNetworking(); + + /** + * @return the enableIPForwarding value. + */ + Boolean enableIPForwarding(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the hostedWorkloads value. + */ + List hostedWorkloads(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the ipConfigurations value. + */ + List ipConfigurations(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the macAddress value. + */ + String macAddress(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the networkSecurityGroup value. + */ + NetworkSecurityGroup networkSecurityGroup(); + + /** + * @return the primary value. + */ + Boolean primary(); + + /** + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the tapConfigurations value. + */ + List tapConfigurations(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the virtualMachine value. + */ + SubResource virtualMachine(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerNetworkInterfaces.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerNetworkInterfaces.java new file mode 100644 index 000000000000..e6f0486ed2ab --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerNetworkInterfaces.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.LoadBalancerNetworkInterfacesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing LoadBalancerNetworkInterfaces. + */ +public interface LoadBalancerNetworkInterfaces extends HasInner { + /** + * Gets associated load balancer network interfaces. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String loadBalancerName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerOutboundRuleProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerOutboundRuleProtocol.java new file mode 100644 index 000000000000..f9ab9218468a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerOutboundRuleProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LoadBalancerOutboundRuleProtocol. + */ +public final class LoadBalancerOutboundRuleProtocol extends ExpandableStringEnum { + /** Static value Tcp for LoadBalancerOutboundRuleProtocol. */ + public static final LoadBalancerOutboundRuleProtocol TCP = fromString("Tcp"); + + /** Static value Udp for LoadBalancerOutboundRuleProtocol. */ + public static final LoadBalancerOutboundRuleProtocol UDP = fromString("Udp"); + + /** Static value All for LoadBalancerOutboundRuleProtocol. */ + public static final LoadBalancerOutboundRuleProtocol ALL = fromString("All"); + + /** + * Creates or finds a LoadBalancerOutboundRuleProtocol from its string representation. + * @param name a name to look for + * @return the corresponding LoadBalancerOutboundRuleProtocol + */ + @JsonCreator + public static LoadBalancerOutboundRuleProtocol fromString(String name) { + return fromString(name, LoadBalancerOutboundRuleProtocol.class); + } + + /** + * @return known LoadBalancerOutboundRuleProtocol values + */ + public static Collection values() { + return values(LoadBalancerOutboundRuleProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerOutboundRules.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerOutboundRules.java new file mode 100644 index 000000000000..ab90ee777c44 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerOutboundRules.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.LoadBalancerOutboundRulesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing LoadBalancerOutboundRules. + */ +public interface LoadBalancerOutboundRules extends HasInner { + /** + * Gets the specified load balancer outbound rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param outboundRuleName The name of the outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String loadBalancerName, String outboundRuleName); + + /** + * Gets all the outbound rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String loadBalancerName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerProbes.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerProbes.java new file mode 100644 index 000000000000..65abbbf2780d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerProbes.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.LoadBalancerProbesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing LoadBalancerProbes. + */ +public interface LoadBalancerProbes extends HasInner { + /** + * Gets load balancer probe. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param probeName The name of the probe. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String loadBalancerName, String probeName); + + /** + * Gets all the load balancer probes. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String loadBalancerName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerSku.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerSku.java new file mode 100644 index 000000000000..be72cc8a8528 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerSku.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SKU of a load balancer. + */ +public class LoadBalancerSku { + /** + * Name of a load balancer SKU. Possible values include: 'Basic', + * 'Standard'. + */ + @JsonProperty(value = "name") + private LoadBalancerSkuName name; + + /** + * Get name of a load balancer SKU. Possible values include: 'Basic', 'Standard'. + * + * @return the name value + */ + public LoadBalancerSkuName name() { + return this.name; + } + + /** + * Set name of a load balancer SKU. Possible values include: 'Basic', 'Standard'. + * + * @param name the name value to set + * @return the LoadBalancerSku object itself. + */ + public LoadBalancerSku withName(LoadBalancerSkuName name) { + this.name = name; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerSkuName.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerSkuName.java new file mode 100644 index 000000000000..0ba0553d751b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancerSkuName.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LoadBalancerSkuName. + */ +public final class LoadBalancerSkuName extends ExpandableStringEnum { + /** Static value Basic for LoadBalancerSkuName. */ + public static final LoadBalancerSkuName BASIC = fromString("Basic"); + + /** Static value Standard for LoadBalancerSkuName. */ + public static final LoadBalancerSkuName STANDARD = fromString("Standard"); + + /** + * Creates or finds a LoadBalancerSkuName from its string representation. + * @param name a name to look for + * @return the corresponding LoadBalancerSkuName + */ + @JsonCreator + public static LoadBalancerSkuName fromString(String name) { + return fromString(name, LoadBalancerSkuName.class); + } + + /** + * @return known LoadBalancerSkuName values + */ + public static Collection values() { + return values(LoadBalancerSkuName.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancers.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancers.java new file mode 100644 index 000000000000..b06942694f1a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancers.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.network.v2019_09_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.network.v2019_09_01.implementation.LoadBalancersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing LoadBalancers. + */ +public interface LoadBalancers extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancingRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancingRule.java new file mode 100644 index 000000000000..30b4b95c3414 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadBalancingRule.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.LoadBalancingRuleInner; +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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; + +/** + * Type representing LoadBalancingRule. + */ +public interface LoadBalancingRule extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the backendAddressPool value. + */ + SubResource backendAddressPool(); + + /** + * @return the backendPort value. + */ + Integer backendPort(); + + /** + * @return the disableOutboundSnat value. + */ + Boolean disableOutboundSnat(); + + /** + * @return the enableFloatingIP value. + */ + Boolean enableFloatingIP(); + + /** + * @return the enableTcpReset value. + */ + Boolean enableTcpReset(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the frontendIPConfiguration value. + */ + SubResource frontendIPConfiguration(); + + /** + * @return the frontendPort value. + */ + int frontendPort(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the idleTimeoutInMinutes value. + */ + Integer idleTimeoutInMinutes(); + + /** + * @return the loadDistribution value. + */ + LoadDistribution loadDistribution(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the probe value. + */ + SubResource probe(); + + /** + * @return the protocol value. + */ + TransportProtocol protocol(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadDistribution.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadDistribution.java new file mode 100644 index 000000000000..23748797d64c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LoadDistribution.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LoadDistribution. + */ +public final class LoadDistribution extends ExpandableStringEnum { + /** Static value Default for LoadDistribution. */ + public static final LoadDistribution DEFAULT = fromString("Default"); + + /** Static value SourceIP for LoadDistribution. */ + public static final LoadDistribution SOURCE_IP = fromString("SourceIP"); + + /** Static value SourceIPProtocol for LoadDistribution. */ + public static final LoadDistribution SOURCE_IPPROTOCOL = fromString("SourceIPProtocol"); + + /** + * Creates or finds a LoadDistribution from its string representation. + * @param name a name to look for + * @return the corresponding LoadDistribution + */ + @JsonCreator + public static LoadDistribution fromString(String name) { + return fromString(name, LoadDistribution.class); + } + + /** + * @return known LoadDistribution values + */ + public static Collection values() { + return values(LoadDistribution.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocalNetworkGateway.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocalNetworkGateway.java new file mode 100644 index 000000000000..fbd5d5e5d60f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocalNetworkGateway.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.LocalNetworkGatewayInner; + +/** + * Type representing LocalNetworkGateway. + */ +public interface LocalNetworkGateway extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the bgpSettings value. + */ + BgpSettings bgpSettings(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the gatewayIpAddress value. + */ + String gatewayIpAddress(); + + /** + * @return the localNetworkAddressSpace value. + */ + AddressSpace localNetworkAddressSpace(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * The entirety of the LocalNetworkGateway definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of LocalNetworkGateway definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a LocalNetworkGateway definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the LocalNetworkGateway definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the localnetworkgateway definition allowing to specify BgpSettings. + */ + interface WithBgpSettings { + /** + * Specifies bgpSettings. + * @param bgpSettings Local network gateway's BGP speaker settings + * @return the next definition stage + */ + WithCreate withBgpSettings(BgpSettings bgpSettings); + } + + /** + * The stage of the localnetworkgateway definition allowing to specify GatewayIpAddress. + */ + interface WithGatewayIpAddress { + /** + * Specifies gatewayIpAddress. + * @param gatewayIpAddress IP address of local network gateway + * @return the next definition stage + */ + WithCreate withGatewayIpAddress(String gatewayIpAddress); + } + + /** + * The stage of the localnetworkgateway definition allowing to specify LocalNetworkAddressSpace. + */ + interface WithLocalNetworkAddressSpace { + /** + * Specifies localNetworkAddressSpace. + * @param localNetworkAddressSpace Local network site address space + * @return the next definition stage + */ + WithCreate withLocalNetworkAddressSpace(AddressSpace localNetworkAddressSpace); + } + + /** + * 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.WithBgpSettings, DefinitionStages.WithGatewayIpAddress, DefinitionStages.WithLocalNetworkAddressSpace { + } + } + /** + * The template for a LocalNetworkGateway update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithBgpSettings, UpdateStages.WithGatewayIpAddress, UpdateStages.WithLocalNetworkAddressSpace { + } + + /** + * Grouping of LocalNetworkGateway update stages. + */ + interface UpdateStages { + /** + * The stage of the localnetworkgateway update allowing to specify BgpSettings. + */ + interface WithBgpSettings { + /** + * Specifies bgpSettings. + * @param bgpSettings Local network gateway's BGP speaker settings + * @return the next update stage + */ + Update withBgpSettings(BgpSettings bgpSettings); + } + + /** + * The stage of the localnetworkgateway update allowing to specify GatewayIpAddress. + */ + interface WithGatewayIpAddress { + /** + * Specifies gatewayIpAddress. + * @param gatewayIpAddress IP address of local network gateway + * @return the next update stage + */ + Update withGatewayIpAddress(String gatewayIpAddress); + } + + /** + * The stage of the localnetworkgateway update allowing to specify LocalNetworkAddressSpace. + */ + interface WithLocalNetworkAddressSpace { + /** + * Specifies localNetworkAddressSpace. + * @param localNetworkAddressSpace Local network site address space + * @return the next update stage + */ + Update withLocalNetworkAddressSpace(AddressSpace localNetworkAddressSpace); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocalNetworkGateways.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocalNetworkGateways.java new file mode 100644 index 000000000000..57428592f593 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocalNetworkGateways.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.management.network.v2019_09_01.implementation.LocalNetworkGatewaysInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing LocalNetworkGateways. + */ +public interface LocalNetworkGateways extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocationAvailableDelegation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocationAvailableDelegation.java new file mode 100644 index 000000000000..f329864a244b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocationAvailableDelegation.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AvailableDelegationInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; + +/** + * Type representing LocationAvailableDelegation. + */ +public interface LocationAvailableDelegation extends HasInner, HasManager { + /** + * @return the actions value. + */ + List actions(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the serviceName value. + */ + String serviceName(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocationAvailableDelegationModel.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocationAvailableDelegationModel.java new file mode 100644 index 000000000000..17a14e80442a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LocationAvailableDelegationModel.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.AvailableDelegationInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; + +/** + * Type representing LocationAvailableDelegationModel. + */ +public interface LocationAvailableDelegationModel extends HasInner, HasManager { + /** + * @return the actions value. + */ + List actions(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the serviceName value. + */ + String serviceName(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LogSpecification.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LogSpecification.java new file mode 100644 index 000000000000..43127c1397b4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/LogSpecification.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of logging specification. + */ +public class LogSpecification { + /** + * The name of the specification. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The display name of the specification. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Duration of the blob. + */ + @JsonProperty(value = "blobDuration") + private String blobDuration; + + /** + * Get the name of the specification. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the specification. + * + * @param name the name value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display name of the specification. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name of the specification. + * + * @param displayName the displayName value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get duration of the blob. + * + * @return the blobDuration value + */ + public String blobDuration() { + return this.blobDuration; + } + + /** + * Set duration of the blob. + * + * @param blobDuration the blobDuration value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withBlobDuration(String blobDuration) { + this.blobDuration = blobDuration; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleEnabledState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleEnabledState.java new file mode 100644 index 000000000000..7336d4ca7d06 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleEnabledState.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ManagedRuleEnabledState. + */ +public final class ManagedRuleEnabledState extends ExpandableStringEnum { + /** Static value Disabled for ManagedRuleEnabledState. */ + public static final ManagedRuleEnabledState DISABLED = fromString("Disabled"); + + /** + * Creates or finds a ManagedRuleEnabledState from its string representation. + * @param name a name to look for + * @return the corresponding ManagedRuleEnabledState + */ + @JsonCreator + public static ManagedRuleEnabledState fromString(String name) { + return fromString(name, ManagedRuleEnabledState.class); + } + + /** + * @return known ManagedRuleEnabledState values + */ + public static Collection values() { + return values(ManagedRuleEnabledState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleGroupOverride.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleGroupOverride.java new file mode 100644 index 000000000000..6b814a91c2a7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleGroupOverride.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines a managed rule group override setting. + */ +public class ManagedRuleGroupOverride { + /** + * Describes the managed rule group to override. + */ + @JsonProperty(value = "ruleGroupName", required = true) + private String ruleGroupName; + + /** + * List of rules that will be disabled. If none specified, all rules in the + * group will be disabled. + */ + @JsonProperty(value = "rules") + private List rules; + + /** + * Get describes the managed rule group to override. + * + * @return the ruleGroupName value + */ + public String ruleGroupName() { + return this.ruleGroupName; + } + + /** + * Set describes the managed rule group to override. + * + * @param ruleGroupName the ruleGroupName value to set + * @return the ManagedRuleGroupOverride object itself. + */ + public ManagedRuleGroupOverride withRuleGroupName(String ruleGroupName) { + this.ruleGroupName = ruleGroupName; + return this; + } + + /** + * Get list of rules that will be disabled. If none specified, all rules in the group will be disabled. + * + * @return the rules value + */ + public List rules() { + return this.rules; + } + + /** + * Set list of rules that will be disabled. If none specified, all rules in the group will be disabled. + * + * @param rules the rules value to set + * @return the ManagedRuleGroupOverride object itself. + */ + public ManagedRuleGroupOverride withRules(List rules) { + this.rules = rules; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleOverride.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleOverride.java new file mode 100644 index 000000000000..3e17212afe73 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleOverride.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines a managed rule group override setting. + */ +public class ManagedRuleOverride { + /** + * Identifier for the managed rule. + */ + @JsonProperty(value = "ruleId", required = true) + private String ruleId; + + /** + * Describes the state of the managed rule. Defaults to Disabled if not + * specified. Possible values include: 'Disabled'. + */ + @JsonProperty(value = "state") + private ManagedRuleEnabledState state; + + /** + * Get identifier for the managed rule. + * + * @return the ruleId value + */ + public String ruleId() { + return this.ruleId; + } + + /** + * Set identifier for the managed rule. + * + * @param ruleId the ruleId value to set + * @return the ManagedRuleOverride object itself. + */ + public ManagedRuleOverride withRuleId(String ruleId) { + this.ruleId = ruleId; + return this; + } + + /** + * Get describes the state of the managed rule. Defaults to Disabled if not specified. Possible values include: 'Disabled'. + * + * @return the state value + */ + public ManagedRuleEnabledState state() { + return this.state; + } + + /** + * Set describes the state of the managed rule. Defaults to Disabled if not specified. Possible values include: 'Disabled'. + * + * @param state the state value to set + * @return the ManagedRuleOverride object itself. + */ + public ManagedRuleOverride withState(ManagedRuleEnabledState state) { + this.state = state; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleSet.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleSet.java new file mode 100644 index 000000000000..8a5b85f7e901 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRuleSet.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines a managed rule set. + */ +public class ManagedRuleSet { + /** + * Defines the rule set type to use. + */ + @JsonProperty(value = "ruleSetType", required = true) + private String ruleSetType; + + /** + * Defines the version of the rule set to use. + */ + @JsonProperty(value = "ruleSetVersion", required = true) + private String ruleSetVersion; + + /** + * Defines the rule group overrides to apply to the rule set. + */ + @JsonProperty(value = "ruleGroupOverrides") + private List ruleGroupOverrides; + + /** + * Get defines the rule set type to use. + * + * @return the ruleSetType value + */ + public String ruleSetType() { + return this.ruleSetType; + } + + /** + * Set defines the rule set type to use. + * + * @param ruleSetType the ruleSetType value to set + * @return the ManagedRuleSet object itself. + */ + public ManagedRuleSet withRuleSetType(String ruleSetType) { + this.ruleSetType = ruleSetType; + return this; + } + + /** + * Get defines the version of the rule set to use. + * + * @return the ruleSetVersion value + */ + public String ruleSetVersion() { + return this.ruleSetVersion; + } + + /** + * Set defines the version of the rule set to use. + * + * @param ruleSetVersion the ruleSetVersion value to set + * @return the ManagedRuleSet object itself. + */ + public ManagedRuleSet withRuleSetVersion(String ruleSetVersion) { + this.ruleSetVersion = ruleSetVersion; + return this; + } + + /** + * Get defines the rule group overrides to apply to the rule set. + * + * @return the ruleGroupOverrides value + */ + public List ruleGroupOverrides() { + return this.ruleGroupOverrides; + } + + /** + * Set defines the rule group overrides to apply to the rule set. + * + * @param ruleGroupOverrides the ruleGroupOverrides value to set + * @return the ManagedRuleSet object itself. + */ + public ManagedRuleSet withRuleGroupOverrides(List ruleGroupOverrides) { + this.ruleGroupOverrides = ruleGroupOverrides; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRulesDefinition.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRulesDefinition.java new file mode 100644 index 000000000000..9df295e4b91d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedRulesDefinition.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Allow to exclude some variable satisfy the condition for the WAF check. + */ +public class ManagedRulesDefinition { + /** + * Describes the Exclusions that are applied on the policy. + */ + @JsonProperty(value = "exclusions") + private List exclusions; + + /** + * Describes the ruleSets that are associated with the policy. + */ + @JsonProperty(value = "managedRuleSets", required = true) + private List managedRuleSets; + + /** + * Get describes the Exclusions that are applied on the policy. + * + * @return the exclusions value + */ + public List exclusions() { + return this.exclusions; + } + + /** + * Set describes the Exclusions that are applied on the policy. + * + * @param exclusions the exclusions value to set + * @return the ManagedRulesDefinition object itself. + */ + public ManagedRulesDefinition withExclusions(List exclusions) { + this.exclusions = exclusions; + return this; + } + + /** + * Get describes the ruleSets that are associated with the policy. + * + * @return the managedRuleSets value + */ + public List managedRuleSets() { + return this.managedRuleSets; + } + + /** + * Set describes the ruleSets that are associated with the policy. + * + * @param managedRuleSets the managedRuleSets value to set + * @return the ManagedRulesDefinition object itself. + */ + public ManagedRulesDefinition withManagedRuleSets(List managedRuleSets) { + this.managedRuleSets = managedRuleSets; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedServiceIdentity.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedServiceIdentity.java new file mode 100644 index 000000000000..6909b1b7409a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedServiceIdentity.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Identity for the resource. + */ +public class ManagedServiceIdentity { + /** + * The principal id of the system assigned identity. This property will + * only be provided for a system assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * The tenant id of the system assigned identity. This property will only + * be provided for a system assigned identity. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /** + * The type of identity used for the resource. The type 'SystemAssigned, + * UserAssigned' includes both an implicitly created identity and a set of + * user assigned identities. The type 'None' will remove any identities + * from the virtual machine. Possible values include: 'SystemAssigned', + * 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. + */ + @JsonProperty(value = "type") + private ResourceIdentityType type; + + /** + * The list of user identities associated with resource. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + @JsonProperty(value = "userAssignedIdentities") + private Map userAssignedIdentities; + + /** + * Get the principal id of the system assigned identity. This property will only be provided for a system assigned identity. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenant id of the system assigned identity. This property will only be provided for a system assigned identity. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. + * + * @return the type value + */ + public ResourceIdentityType type() { + return this.type; + } + + /** + * Set the type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. + * + * @param type the type value to set + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withType(ResourceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @return the userAssignedIdentities value + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @param userAssignedIdentities the userAssignedIdentities value to set + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedServiceIdentityUserAssignedIdentitiesValue.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedServiceIdentityUserAssignedIdentitiesValue.java new file mode 100644 index 000000000000..c704eb7ae556 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ManagedServiceIdentityUserAssignedIdentitiesValue.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedServiceIdentityUserAssignedIdentitiesValue model. + */ +public class ManagedServiceIdentityUserAssignedIdentitiesValue { + /** + * The principal id of user assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * The client id of user assigned identity. + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private String clientId; + + /** + * Get the principal id of user assigned identity. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the client id of user assigned identity. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MatchCondition.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MatchCondition.java new file mode 100644 index 000000000000..0992d009e4d5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MatchCondition.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Define match conditions. + */ +public class MatchCondition { + /** + * List of match variables. + */ + @JsonProperty(value = "matchVariables", required = true) + private List matchVariables; + + /** + * Describes operator to be matched. Possible values include: 'IPMatch', + * 'Equal', 'Contains', 'LessThan', 'GreaterThan', 'LessThanOrEqual', + * 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith', 'Regex', 'GeoMatch'. + */ + @JsonProperty(value = "operator", required = true) + private WebApplicationFirewallOperator operator; + + /** + * Describes if this is negate condition or not. + */ + @JsonProperty(value = "negationConditon") + private Boolean negationConditon; + + /** + * Match value. + */ + @JsonProperty(value = "matchValues", required = true) + private List matchValues; + + /** + * List of transforms. + */ + @JsonProperty(value = "transforms") + private List transforms; + + /** + * Get list of match variables. + * + * @return the matchVariables value + */ + public List matchVariables() { + return this.matchVariables; + } + + /** + * Set list of match variables. + * + * @param matchVariables the matchVariables value to set + * @return the MatchCondition object itself. + */ + public MatchCondition withMatchVariables(List matchVariables) { + this.matchVariables = matchVariables; + return this; + } + + /** + * Get describes operator to be matched. Possible values include: 'IPMatch', 'Equal', 'Contains', 'LessThan', 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith', 'Regex', 'GeoMatch'. + * + * @return the operator value + */ + public WebApplicationFirewallOperator operator() { + return this.operator; + } + + /** + * Set describes operator to be matched. Possible values include: 'IPMatch', 'Equal', 'Contains', 'LessThan', 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith', 'Regex', 'GeoMatch'. + * + * @param operator the operator value to set + * @return the MatchCondition object itself. + */ + public MatchCondition withOperator(WebApplicationFirewallOperator operator) { + this.operator = operator; + return this; + } + + /** + * Get describes if this is negate condition or not. + * + * @return the negationConditon value + */ + public Boolean negationConditon() { + return this.negationConditon; + } + + /** + * Set describes if this is negate condition or not. + * + * @param negationConditon the negationConditon value to set + * @return the MatchCondition object itself. + */ + public MatchCondition withNegationConditon(Boolean negationConditon) { + this.negationConditon = negationConditon; + return this; + } + + /** + * Get match value. + * + * @return the matchValues value + */ + public List matchValues() { + return this.matchValues; + } + + /** + * Set match value. + * + * @param matchValues the matchValues value to set + * @return the MatchCondition object itself. + */ + public MatchCondition withMatchValues(List matchValues) { + this.matchValues = matchValues; + return this; + } + + /** + * Get list of transforms. + * + * @return the transforms value + */ + public List transforms() { + return this.transforms; + } + + /** + * Set list of transforms. + * + * @param transforms the transforms value to set + * @return the MatchCondition object itself. + */ + public MatchCondition withTransforms(List transforms) { + this.transforms = transforms; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MatchVariable.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MatchVariable.java new file mode 100644 index 000000000000..017d67d8d38f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MatchVariable.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Define match variables. + */ +public class MatchVariable { + /** + * Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', + * 'QueryString', 'PostArgs', 'RequestUri', 'RequestHeaders', + * 'RequestBody', 'RequestCookies'. + */ + @JsonProperty(value = "variableName", required = true) + private WebApplicationFirewallMatchVariable variableName; + + /** + * Describes field of the matchVariable collection. + */ + @JsonProperty(value = "selector") + private String selector; + + /** + * Get match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestUri', 'RequestHeaders', 'RequestBody', 'RequestCookies'. + * + * @return the variableName value + */ + public WebApplicationFirewallMatchVariable variableName() { + return this.variableName; + } + + /** + * Set match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestUri', 'RequestHeaders', 'RequestBody', 'RequestCookies'. + * + * @param variableName the variableName value to set + * @return the MatchVariable object itself. + */ + public MatchVariable withVariableName(WebApplicationFirewallMatchVariable variableName) { + this.variableName = variableName; + return this; + } + + /** + * Get describes field of the matchVariable collection. + * + * @return the selector value + */ + public String selector() { + return this.selector; + } + + /** + * Set describes field of the matchVariable collection. + * + * @param selector the selector value to set + * @return the MatchVariable object itself. + */ + public MatchVariable withSelector(String selector) { + this.selector = selector; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MatchedRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MatchedRule.java new file mode 100644 index 000000000000..d8ca53a7a982 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MatchedRule.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Matched rule. + */ +public class MatchedRule { + /** + * Name of the matched network security rule. + */ + @JsonProperty(value = "ruleName") + private String ruleName; + + /** + * The network traffic is allowed or denied. Possible values are 'Allow' + * and 'Deny'. + */ + @JsonProperty(value = "action") + private String action; + + /** + * Get name of the matched network security rule. + * + * @return the ruleName value + */ + public String ruleName() { + return this.ruleName; + } + + /** + * Set name of the matched network security rule. + * + * @param ruleName the ruleName value to set + * @return the MatchedRule object itself. + */ + public MatchedRule withRuleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Get the network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. + * + * @return the action value + */ + public String action() { + return this.action; + } + + /** + * Set the network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. + * + * @param action the action value to set + * @return the MatchedRule object itself. + */ + public MatchedRule withAction(String action) { + this.action = action; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MetricSpecification.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MetricSpecification.java new file mode 100644 index 000000000000..dc7bd90453f9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/MetricSpecification.java @@ -0,0 +1,382 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of metrics specification. + */ +public class MetricSpecification { + /** + * The name of the metric. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The display name of the metric. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The description of the metric. + */ + @JsonProperty(value = "displayDescription") + private String displayDescription; + + /** + * Units the metric to be displayed in. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * The aggregation type. + */ + @JsonProperty(value = "aggregationType") + private String aggregationType; + + /** + * List of availability. + */ + @JsonProperty(value = "availabilities") + private List availabilities; + + /** + * Whether regional MDM account enabled. + */ + @JsonProperty(value = "enableRegionalMdmAccount") + private Boolean enableRegionalMdmAccount; + + /** + * Whether gaps would be filled with zeros. + */ + @JsonProperty(value = "fillGapWithZero") + private Boolean fillGapWithZero; + + /** + * Pattern for the filter of the metric. + */ + @JsonProperty(value = "metricFilterPattern") + private String metricFilterPattern; + + /** + * List of dimensions. + */ + @JsonProperty(value = "dimensions") + private List dimensions; + + /** + * Whether the metric is internal. + */ + @JsonProperty(value = "isInternal") + private Boolean isInternal; + + /** + * The source MDM account. + */ + @JsonProperty(value = "sourceMdmAccount") + private String sourceMdmAccount; + + /** + * The source MDM namespace. + */ + @JsonProperty(value = "sourceMdmNamespace") + private String sourceMdmNamespace; + + /** + * The resource Id dimension name override. + */ + @JsonProperty(value = "resourceIdDimensionNameOverride") + private String resourceIdDimensionNameOverride; + + /** + * Get the name of the metric. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the metric. + * + * @param name the name value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display name of the metric. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name of the metric. + * + * @param displayName the displayName value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the description of the metric. + * + * @return the displayDescription value + */ + public String displayDescription() { + return this.displayDescription; + } + + /** + * Set the description of the metric. + * + * @param displayDescription the displayDescription value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayDescription(String displayDescription) { + this.displayDescription = displayDescription; + return this; + } + + /** + * Get units the metric to be displayed in. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set units the metric to be displayed in. + * + * @param unit the unit value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the aggregation type. + * + * @return the aggregationType value + */ + public String aggregationType() { + return this.aggregationType; + } + + /** + * Set the aggregation type. + * + * @param aggregationType the aggregationType value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withAggregationType(String aggregationType) { + this.aggregationType = aggregationType; + return this; + } + + /** + * Get list of availability. + * + * @return the availabilities value + */ + public List availabilities() { + return this.availabilities; + } + + /** + * Set list of availability. + * + * @param availabilities the availabilities value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withAvailabilities(List availabilities) { + this.availabilities = availabilities; + return this; + } + + /** + * Get whether regional MDM account enabled. + * + * @return the enableRegionalMdmAccount value + */ + public Boolean enableRegionalMdmAccount() { + return this.enableRegionalMdmAccount; + } + + /** + * Set whether regional MDM account enabled. + * + * @param enableRegionalMdmAccount the enableRegionalMdmAccount value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withEnableRegionalMdmAccount(Boolean enableRegionalMdmAccount) { + this.enableRegionalMdmAccount = enableRegionalMdmAccount; + return this; + } + + /** + * Get whether gaps would be filled with zeros. + * + * @return the fillGapWithZero value + */ + public Boolean fillGapWithZero() { + return this.fillGapWithZero; + } + + /** + * Set whether gaps would be filled with zeros. + * + * @param fillGapWithZero the fillGapWithZero value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { + this.fillGapWithZero = fillGapWithZero; + return this; + } + + /** + * Get pattern for the filter of the metric. + * + * @return the metricFilterPattern value + */ + public String metricFilterPattern() { + return this.metricFilterPattern; + } + + /** + * Set pattern for the filter of the metric. + * + * @param metricFilterPattern the metricFilterPattern value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withMetricFilterPattern(String metricFilterPattern) { + this.metricFilterPattern = metricFilterPattern; + return this; + } + + /** + * Get list of dimensions. + * + * @return the dimensions value + */ + public List dimensions() { + return this.dimensions; + } + + /** + * Set list of dimensions. + * + * @param dimensions the dimensions value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDimensions(List dimensions) { + this.dimensions = dimensions; + return this; + } + + /** + * Get whether the metric is internal. + * + * @return the isInternal value + */ + public Boolean isInternal() { + return this.isInternal; + } + + /** + * Set whether the metric is internal. + * + * @param isInternal the isInternal value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withIsInternal(Boolean isInternal) { + this.isInternal = isInternal; + return this; + } + + /** + * Get the source MDM account. + * + * @return the sourceMdmAccount value + */ + public String sourceMdmAccount() { + return this.sourceMdmAccount; + } + + /** + * Set the source MDM account. + * + * @param sourceMdmAccount the sourceMdmAccount value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmAccount(String sourceMdmAccount) { + this.sourceMdmAccount = sourceMdmAccount; + return this; + } + + /** + * Get the source MDM namespace. + * + * @return the sourceMdmNamespace value + */ + public String sourceMdmNamespace() { + return this.sourceMdmNamespace; + } + + /** + * Set the source MDM namespace. + * + * @param sourceMdmNamespace the sourceMdmNamespace value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmNamespace(String sourceMdmNamespace) { + this.sourceMdmNamespace = sourceMdmNamespace; + return this; + } + + /** + * Get the resource Id dimension name override. + * + * @return the resourceIdDimensionNameOverride value + */ + public String resourceIdDimensionNameOverride() { + return this.resourceIdDimensionNameOverride; + } + + /** + * Set the resource Id dimension name override. + * + * @param resourceIdDimensionNameOverride the resourceIdDimensionNameOverride value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withResourceIdDimensionNameOverride(String resourceIdDimensionNameOverride) { + this.resourceIdDimensionNameOverride = resourceIdDimensionNameOverride; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGateway.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGateway.java new file mode 100644 index 000000000000..07f3343cd699 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGateway.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NatGatewayInner; + +/** + * Type representing NatGateway. + */ +public interface NatGateway extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the idleTimeoutInMinutes value. + */ + Integer idleTimeoutInMinutes(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the publicIpAddresses value. + */ + List publicIpAddresses(); + + /** + * @return the publicIpPrefixes value. + */ + List publicIpPrefixes(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the sku value. + */ + NatGatewaySku sku(); + + /** + * @return the subnets value. + */ + List subnets(); + + /** + * @return the zones value. + */ + List zones(); + + /** + * The entirety of the NatGateway definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of NatGateway definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a NatGateway definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the NatGateway definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the natgateway definition allowing to specify IdleTimeoutInMinutes. + */ + interface WithIdleTimeoutInMinutes { + /** + * Specifies idleTimeoutInMinutes. + * @param idleTimeoutInMinutes The idle timeout of the nat gateway + * @return the next definition stage + */ + WithCreate withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes); + } + + /** + * The stage of the natgateway definition allowing to specify PublicIpAddresses. + */ + interface WithPublicIpAddresses { + /** + * Specifies publicIpAddresses. + * @param publicIpAddresses An array of public ip addresses associated with the nat gateway resource + * @return the next definition stage + */ + WithCreate withPublicIpAddresses(List publicIpAddresses); + } + + /** + * The stage of the natgateway definition allowing to specify PublicIpPrefixes. + */ + interface WithPublicIpPrefixes { + /** + * Specifies publicIpPrefixes. + * @param publicIpPrefixes An array of public ip prefixes associated with the nat gateway resource + * @return the next definition stage + */ + WithCreate withPublicIpPrefixes(List publicIpPrefixes); + } + + /** + * The stage of the natgateway definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The nat gateway SKU + * @return the next definition stage + */ + WithCreate withSku(NatGatewaySku sku); + } + + /** + * The stage of the natgateway definition allowing to specify Zones. + */ + interface WithZones { + /** + * Specifies zones. + * @param zones A list of availability zones denoting the zone in which Nat Gateway should be deployed + * @return the next definition stage + */ + WithCreate withZones(List zones); + } + + /** + * 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.WithIdleTimeoutInMinutes, DefinitionStages.WithPublicIpAddresses, DefinitionStages.WithPublicIpPrefixes, DefinitionStages.WithSku, DefinitionStages.WithZones { + } + } + /** + * The template for a NatGateway update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithIdleTimeoutInMinutes, UpdateStages.WithPublicIpAddresses, UpdateStages.WithPublicIpPrefixes, UpdateStages.WithSku, UpdateStages.WithZones { + } + + /** + * Grouping of NatGateway update stages. + */ + interface UpdateStages { + /** + * The stage of the natgateway update allowing to specify IdleTimeoutInMinutes. + */ + interface WithIdleTimeoutInMinutes { + /** + * Specifies idleTimeoutInMinutes. + * @param idleTimeoutInMinutes The idle timeout of the nat gateway + * @return the next update stage + */ + Update withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes); + } + + /** + * The stage of the natgateway update allowing to specify PublicIpAddresses. + */ + interface WithPublicIpAddresses { + /** + * Specifies publicIpAddresses. + * @param publicIpAddresses An array of public ip addresses associated with the nat gateway resource + * @return the next update stage + */ + Update withPublicIpAddresses(List publicIpAddresses); + } + + /** + * The stage of the natgateway update allowing to specify PublicIpPrefixes. + */ + interface WithPublicIpPrefixes { + /** + * Specifies publicIpPrefixes. + * @param publicIpPrefixes An array of public ip prefixes associated with the nat gateway resource + * @return the next update stage + */ + Update withPublicIpPrefixes(List publicIpPrefixes); + } + + /** + * The stage of the natgateway update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The nat gateway SKU + * @return the next update stage + */ + Update withSku(NatGatewaySku sku); + } + + /** + * The stage of the natgateway update allowing to specify Zones. + */ + interface WithZones { + /** + * Specifies zones. + * @param zones A list of availability zones denoting the zone in which Nat Gateway should be deployed + * @return the next update stage + */ + Update withZones(List zones); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGatewaySku.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGatewaySku.java new file mode 100644 index 000000000000..1155cbc439e0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGatewaySku.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SKU of nat gateway. + */ +public class NatGatewaySku { + /** + * Name of Nat Gateway SKU. Possible values include: 'Standard'. + */ + @JsonProperty(value = "name") + private NatGatewaySkuName name; + + /** + * Get name of Nat Gateway SKU. Possible values include: 'Standard'. + * + * @return the name value + */ + public NatGatewaySkuName name() { + return this.name; + } + + /** + * Set name of Nat Gateway SKU. Possible values include: 'Standard'. + * + * @param name the name value to set + * @return the NatGatewaySku object itself. + */ + public NatGatewaySku withName(NatGatewaySkuName name) { + this.name = name; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGatewaySkuName.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGatewaySkuName.java new file mode 100644 index 000000000000..1a0dc5ee27de --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGatewaySkuName.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for NatGatewaySkuName. + */ +public final class NatGatewaySkuName extends ExpandableStringEnum { + /** Static value Standard for NatGatewaySkuName. */ + public static final NatGatewaySkuName STANDARD = fromString("Standard"); + + /** + * Creates or finds a NatGatewaySkuName from its string representation. + * @param name a name to look for + * @return the corresponding NatGatewaySkuName + */ + @JsonCreator + public static NatGatewaySkuName fromString(String name) { + return fromString(name, NatGatewaySkuName.class); + } + + /** + * @return known NatGatewaySkuName values + */ + public static Collection values() { + return values(NatGatewaySkuName.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGateways.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGateways.java new file mode 100644 index 000000000000..d3ffc62c5d26 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NatGateways.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.network.v2019_09_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.network.v2019_09_01.implementation.NatGatewaysInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing NatGateways. + */ +public interface NatGateways extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticParameters.java new file mode 100644 index 000000000000..5409af4f807e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticParameters.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters to get network configuration diagnostic. + */ +public class NetworkConfigurationDiagnosticParameters { + /** + * The ID of the target resource to perform network configuration + * diagnostic. Valid options are VM, NetworkInterface, + * VMSS/NetworkInterface and Application Gateway. + */ + @JsonProperty(value = "targetResourceId", required = true) + private String targetResourceId; + + /** + * Verbosity level. Possible values include: 'Normal', 'Minimum', 'Full'. + */ + @JsonProperty(value = "verbosityLevel") + private VerbosityLevel verbosityLevel; + + /** + * List of network configuration diagnostic profiles. + */ + @JsonProperty(value = "profiles", required = true) + private List profiles; + + /** + * Get the ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway. + * + * @return the targetResourceId value + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway. + * + * @param targetResourceId the targetResourceId value to set + * @return the NetworkConfigurationDiagnosticParameters object itself. + */ + public NetworkConfigurationDiagnosticParameters withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + + /** + * Get verbosity level. Possible values include: 'Normal', 'Minimum', 'Full'. + * + * @return the verbosityLevel value + */ + public VerbosityLevel verbosityLevel() { + return this.verbosityLevel; + } + + /** + * Set verbosity level. Possible values include: 'Normal', 'Minimum', 'Full'. + * + * @param verbosityLevel the verbosityLevel value to set + * @return the NetworkConfigurationDiagnosticParameters object itself. + */ + public NetworkConfigurationDiagnosticParameters withVerbosityLevel(VerbosityLevel verbosityLevel) { + this.verbosityLevel = verbosityLevel; + return this; + } + + /** + * Get list of network configuration diagnostic profiles. + * + * @return the profiles value + */ + public List profiles() { + return this.profiles; + } + + /** + * Set list of network configuration diagnostic profiles. + * + * @param profiles the profiles value to set + * @return the NetworkConfigurationDiagnosticParameters object itself. + */ + public NetworkConfigurationDiagnosticParameters withProfiles(List profiles) { + this.profiles = profiles; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticProfile.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticProfile.java new file mode 100644 index 000000000000..dc81cc8174d4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticProfile.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters to compare with network configuration. + */ +public class NetworkConfigurationDiagnosticProfile { + /** + * The direction of the traffic. Possible values include: 'Inbound', + * 'Outbound'. + */ + @JsonProperty(value = "direction", required = true) + private Direction direction; + + /** + * Protocol to be verified on. Accepted values are '*', TCP, UDP. + */ + @JsonProperty(value = "protocol", required = true) + private String protocol; + + /** + * Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. + */ + @JsonProperty(value = "source", required = true) + private String source; + + /** + * Traffic destination. Accepted values are: '*', IP Address/CIDR, Service + * Tag. + */ + @JsonProperty(value = "destination", required = true) + private String destination; + + /** + * Traffic destination port. Accepted values are '*' and a single port in + * the range (0 - 65535). + */ + @JsonProperty(value = "destinationPort", required = true) + private String destinationPort; + + /** + * Get the direction of the traffic. Possible values include: 'Inbound', 'Outbound'. + * + * @return the direction value + */ + public Direction direction() { + return this.direction; + } + + /** + * Set the direction of the traffic. Possible values include: 'Inbound', 'Outbound'. + * + * @param direction the direction value to set + * @return the NetworkConfigurationDiagnosticProfile object itself. + */ + public NetworkConfigurationDiagnosticProfile withDirection(Direction direction) { + this.direction = direction; + return this; + } + + /** + * Get protocol to be verified on. Accepted values are '*', TCP, UDP. + * + * @return the protocol value + */ + public String protocol() { + return this.protocol; + } + + /** + * Set protocol to be verified on. Accepted values are '*', TCP, UDP. + * + * @param protocol the protocol value to set + * @return the NetworkConfigurationDiagnosticProfile object itself. + */ + public NetworkConfigurationDiagnosticProfile withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. + * + * @return the source value + */ + public String source() { + return this.source; + } + + /** + * Set traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. + * + * @param source the source value to set + * @return the NetworkConfigurationDiagnosticProfile object itself. + */ + public NetworkConfigurationDiagnosticProfile withSource(String source) { + this.source = source; + return this; + } + + /** + * Get traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. + * + * @return the destination value + */ + public String destination() { + return this.destination; + } + + /** + * Set traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. + * + * @param destination the destination value to set + * @return the NetworkConfigurationDiagnosticProfile object itself. + */ + public NetworkConfigurationDiagnosticProfile withDestination(String destination) { + this.destination = destination; + return this; + } + + /** + * Get traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535). + * + * @return the destinationPort value + */ + public String destinationPort() { + return this.destinationPort; + } + + /** + * Set traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535). + * + * @param destinationPort the destinationPort value to set + * @return the NetworkConfigurationDiagnosticProfile object itself. + */ + public NetworkConfigurationDiagnosticProfile withDestinationPort(String destinationPort) { + this.destinationPort = destinationPort; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticResponse.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticResponse.java new file mode 100644 index 000000000000..7002002046a2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkConfigurationDiagnosticResponseInner; +import java.util.List; + +/** + * Type representing NetworkConfigurationDiagnosticResponse. + */ +public interface NetworkConfigurationDiagnosticResponse extends HasInner, HasManager { + /** + * @return the results value. + */ + List results(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticResult.java new file mode 100644 index 000000000000..876f75ca257f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkConfigurationDiagnosticResult.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network configuration diagnostic result corresponded to provided traffic + * query. + */ +public class NetworkConfigurationDiagnosticResult { + /** + * Network configuration diagnostic profile. + */ + @JsonProperty(value = "profile") + private NetworkConfigurationDiagnosticProfile profile; + + /** + * Network security group result. + */ + @JsonProperty(value = "networkSecurityGroupResult") + private NetworkSecurityGroupResult networkSecurityGroupResult; + + /** + * Get network configuration diagnostic profile. + * + * @return the profile value + */ + public NetworkConfigurationDiagnosticProfile profile() { + return this.profile; + } + + /** + * Set network configuration diagnostic profile. + * + * @param profile the profile value to set + * @return the NetworkConfigurationDiagnosticResult object itself. + */ + public NetworkConfigurationDiagnosticResult withProfile(NetworkConfigurationDiagnosticProfile profile) { + this.profile = profile; + return this; + } + + /** + * Get network security group result. + * + * @return the networkSecurityGroupResult value + */ + public NetworkSecurityGroupResult networkSecurityGroupResult() { + return this.networkSecurityGroupResult; + } + + /** + * Set network security group result. + * + * @param networkSecurityGroupResult the networkSecurityGroupResult value to set + * @return the NetworkConfigurationDiagnosticResult object itself. + */ + public NetworkConfigurationDiagnosticResult withNetworkSecurityGroupResult(NetworkSecurityGroupResult networkSecurityGroupResult) { + this.networkSecurityGroupResult = networkSecurityGroupResult; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkIntentPolicy.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkIntentPolicy.java new file mode 100644 index 000000000000..846540f544ee --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkIntentPolicy.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Network Intent Policy resource. + */ +@SkipParentValidation +public class NetworkIntentPolicy extends Resource { + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the NetworkIntentPolicy object itself. + */ + public NetworkIntentPolicy withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkIntentPolicyConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkIntentPolicyConfiguration.java new file mode 100644 index 000000000000..6b326b8bfff8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkIntentPolicyConfiguration.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of NetworkIntentPolicyConfiguration for + * PrepareNetworkPoliciesRequest. + */ +public class NetworkIntentPolicyConfiguration { + /** + * The name of the Network Intent Policy for storing in target + * subscription. + */ + @JsonProperty(value = "networkIntentPolicyName") + private String networkIntentPolicyName; + + /** + * Source network intent policy. + */ + @JsonProperty(value = "sourceNetworkIntentPolicy") + private NetworkIntentPolicy sourceNetworkIntentPolicy; + + /** + * Get the name of the Network Intent Policy for storing in target subscription. + * + * @return the networkIntentPolicyName value + */ + public String networkIntentPolicyName() { + return this.networkIntentPolicyName; + } + + /** + * Set the name of the Network Intent Policy for storing in target subscription. + * + * @param networkIntentPolicyName the networkIntentPolicyName value to set + * @return the NetworkIntentPolicyConfiguration object itself. + */ + public NetworkIntentPolicyConfiguration withNetworkIntentPolicyName(String networkIntentPolicyName) { + this.networkIntentPolicyName = networkIntentPolicyName; + return this; + } + + /** + * Get source network intent policy. + * + * @return the sourceNetworkIntentPolicy value + */ + public NetworkIntentPolicy sourceNetworkIntentPolicy() { + return this.sourceNetworkIntentPolicy; + } + + /** + * Set source network intent policy. + * + * @param sourceNetworkIntentPolicy the sourceNetworkIntentPolicy value to set + * @return the NetworkIntentPolicyConfiguration object itself. + */ + public NetworkIntentPolicyConfiguration withSourceNetworkIntentPolicy(NetworkIntentPolicy sourceNetworkIntentPolicy) { + this.sourceNetworkIntentPolicy = sourceNetworkIntentPolicy; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterface.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterface.java new file mode 100644 index 000000000000..ccd2c3ede052 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterface.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkInterfaceIPConfigurationInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkSecurityGroupInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkInterfaceInner; + +/** + * Type representing NetworkInterface. + */ +public interface NetworkInterface extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the dnsSettings value. + */ + NetworkInterfaceDnsSettings dnsSettings(); + + /** + * @return the enableAcceleratedNetworking value. + */ + Boolean enableAcceleratedNetworking(); + + /** + * @return the enableIPForwarding value. + */ + Boolean enableIPForwarding(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the hostedWorkloads value. + */ + List hostedWorkloads(); + + /** + * @return the ipConfigurations value. + */ + List ipConfigurations(); + + /** + * @return the macAddress value. + */ + String macAddress(); + + /** + * @return the networkSecurityGroup value. + */ + NetworkSecurityGroup networkSecurityGroup(); + + /** + * @return the primary value. + */ + Boolean primary(); + + /** + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the tapConfigurations value. + */ + List tapConfigurations(); + + /** + * @return the virtualMachine value. + */ + SubResource virtualMachine(); + + /** + * The entirety of the NetworkInterface definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of NetworkInterface definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a NetworkInterface definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the NetworkInterface definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the networkinterface definition allowing to specify DnsSettings. + */ + interface WithDnsSettings { + /** + * Specifies dnsSettings. + * @param dnsSettings The DNS settings in network interface + * @return the next definition stage + */ + WithCreate withDnsSettings(NetworkInterfaceDnsSettings dnsSettings); + } + + /** + * The stage of the networkinterface definition allowing to specify EnableAcceleratedNetworking. + */ + interface WithEnableAcceleratedNetworking { + /** + * Specifies enableAcceleratedNetworking. + * @param enableAcceleratedNetworking If the network interface is accelerated networking enabled + * @return the next definition stage + */ + WithCreate withEnableAcceleratedNetworking(Boolean enableAcceleratedNetworking); + } + + /** + * The stage of the networkinterface definition allowing to specify EnableIPForwarding. + */ + interface WithEnableIPForwarding { + /** + * Specifies enableIPForwarding. + * @param enableIPForwarding Indicates whether IP forwarding is enabled on this network interface + * @return the next definition stage + */ + WithCreate withEnableIPForwarding(Boolean enableIPForwarding); + } + + /** + * The stage of the networkinterface definition allowing to specify IpConfigurations. + */ + interface WithIpConfigurations { + /** + * Specifies ipConfigurations. + * @param ipConfigurations A list of IPConfigurations of the network interface + * @return the next definition stage + */ + WithCreate withIpConfigurations(List ipConfigurations); + } + + /** + * The stage of the networkinterface definition allowing to specify NetworkSecurityGroup. + */ + interface WithNetworkSecurityGroup { + /** + * Specifies networkSecurityGroup. + * @param networkSecurityGroup The reference of the NetworkSecurityGroup resource + * @return the next definition stage + */ + WithCreate withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup); + } + + /** + * 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.WithDnsSettings, DefinitionStages.WithEnableAcceleratedNetworking, DefinitionStages.WithEnableIPForwarding, DefinitionStages.WithIpConfigurations, DefinitionStages.WithNetworkSecurityGroup { + } + } + /** + * The template for a NetworkInterface update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithDnsSettings, UpdateStages.WithEnableAcceleratedNetworking, UpdateStages.WithEnableIPForwarding, UpdateStages.WithIpConfigurations, UpdateStages.WithNetworkSecurityGroup { + } + + /** + * Grouping of NetworkInterface update stages. + */ + interface UpdateStages { + /** + * The stage of the networkinterface update allowing to specify DnsSettings. + */ + interface WithDnsSettings { + /** + * Specifies dnsSettings. + * @param dnsSettings The DNS settings in network interface + * @return the next update stage + */ + Update withDnsSettings(NetworkInterfaceDnsSettings dnsSettings); + } + + /** + * The stage of the networkinterface update allowing to specify EnableAcceleratedNetworking. + */ + interface WithEnableAcceleratedNetworking { + /** + * Specifies enableAcceleratedNetworking. + * @param enableAcceleratedNetworking If the network interface is accelerated networking enabled + * @return the next update stage + */ + Update withEnableAcceleratedNetworking(Boolean enableAcceleratedNetworking); + } + + /** + * The stage of the networkinterface update allowing to specify EnableIPForwarding. + */ + interface WithEnableIPForwarding { + /** + * Specifies enableIPForwarding. + * @param enableIPForwarding Indicates whether IP forwarding is enabled on this network interface + * @return the next update stage + */ + Update withEnableIPForwarding(Boolean enableIPForwarding); + } + + /** + * The stage of the networkinterface update allowing to specify IpConfigurations. + */ + interface WithIpConfigurations { + /** + * Specifies ipConfigurations. + * @param ipConfigurations A list of IPConfigurations of the network interface + * @return the next update stage + */ + Update withIpConfigurations(List ipConfigurations); + } + + /** + * The stage of the networkinterface update allowing to specify NetworkSecurityGroup. + */ + interface WithNetworkSecurityGroup { + /** + * Specifies networkSecurityGroup. + * @param networkSecurityGroup The reference of the NetworkSecurityGroup resource + * @return the next update stage + */ + Update withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceAssociation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceAssociation.java new file mode 100644 index 000000000000..7120c4062a34 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceAssociation.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.SecurityRuleInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network interface and its custom security rules. + */ +public class NetworkInterfaceAssociation { + /** + * Network interface ID. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Collection of custom security rules. + */ + @JsonProperty(value = "securityRules") + private List securityRules; + + /** + * Get network interface ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get collection of custom security rules. + * + * @return the securityRules value + */ + public List securityRules() { + return this.securityRules; + } + + /** + * Set collection of custom security rules. + * + * @param securityRules the securityRules value to set + * @return the NetworkInterfaceAssociation object itself. + */ + public NetworkInterfaceAssociation withSecurityRules(List securityRules) { + this.securityRules = securityRules; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceDnsSettings.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceDnsSettings.java new file mode 100644 index 000000000000..acd2dbbe4f1a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceDnsSettings.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DNS settings of a network interface. + */ +public class NetworkInterfaceDnsSettings { + /** + * List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to + * azure provided DNS resolution. 'AzureProvidedDNS' value cannot be + * combined with other IPs, it must be the only value in dnsServers + * collection. + */ + @JsonProperty(value = "dnsServers") + private List dnsServers; + + /** + * If the VM that uses this NIC is part of an Availability Set, then this + * list will have the union of all DNS servers from all NICs that are part + * of the Availability Set. This property is what is configured on each of + * those VMs. + */ + @JsonProperty(value = "appliedDnsServers", access = JsonProperty.Access.WRITE_ONLY) + private List appliedDnsServers; + + /** + * Relative DNS name for this NIC used for internal communications between + * VMs in the same virtual network. + */ + @JsonProperty(value = "internalDnsNameLabel") + private String internalDnsNameLabel; + + /** + * Fully qualified DNS name supporting internal communications between VMs + * in the same virtual network. + */ + @JsonProperty(value = "internalFqdn", access = JsonProperty.Access.WRITE_ONLY) + private String internalFqdn; + + /** + * Even if internalDnsNameLabel is not specified, a DNS entry is created + * for the primary NIC of the VM. This DNS name can be constructed by + * concatenating the VM name with the value of internalDomainNameSuffix. + */ + @JsonProperty(value = "internalDomainNameSuffix", access = JsonProperty.Access.WRITE_ONLY) + private String internalDomainNameSuffix; + + /** + * Get list of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. + * + * @return the dnsServers value + */ + public List dnsServers() { + return this.dnsServers; + } + + /** + * Set list of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. + * + * @param dnsServers the dnsServers value to set + * @return the NetworkInterfaceDnsSettings object itself. + */ + public NetworkInterfaceDnsSettings withDnsServers(List dnsServers) { + this.dnsServers = dnsServers; + return this; + } + + /** + * Get if the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. + * + * @return the appliedDnsServers value + */ + public List appliedDnsServers() { + return this.appliedDnsServers; + } + + /** + * Get relative DNS name for this NIC used for internal communications between VMs in the same virtual network. + * + * @return the internalDnsNameLabel value + */ + public String internalDnsNameLabel() { + return this.internalDnsNameLabel; + } + + /** + * Set relative DNS name for this NIC used for internal communications between VMs in the same virtual network. + * + * @param internalDnsNameLabel the internalDnsNameLabel value to set + * @return the NetworkInterfaceDnsSettings object itself. + */ + public NetworkInterfaceDnsSettings withInternalDnsNameLabel(String internalDnsNameLabel) { + this.internalDnsNameLabel = internalDnsNameLabel; + return this; + } + + /** + * Get fully qualified DNS name supporting internal communications between VMs in the same virtual network. + * + * @return the internalFqdn value + */ + public String internalFqdn() { + return this.internalFqdn; + } + + /** + * Get even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. + * + * @return the internalDomainNameSuffix value + */ + public String internalDomainNameSuffix() { + return this.internalDomainNameSuffix; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.java new file mode 100644 index 000000000000..26ffee9eabb0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * PrivateLinkConnection properties for the network interface. + */ +public class NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties { + /** + * The group ID for current private link connection. + */ + @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) + private String groupId; + + /** + * The required member name for current private link connection. + */ + @JsonProperty(value = "requiredMemberName", access = JsonProperty.Access.WRITE_ONLY) + private String requiredMemberName; + + /** + * List of FQDNs for current private link connection. + */ + @JsonProperty(value = "fqdns", access = JsonProperty.Access.WRITE_ONLY) + private List fqdns; + + /** + * Get the group ID for current private link connection. + * + * @return the groupId value + */ + public String groupId() { + return this.groupId; + } + + /** + * Get the required member name for current private link connection. + * + * @return the requiredMemberName value + */ + public String requiredMemberName() { + return this.requiredMemberName; + } + + /** + * Get list of FQDNs for current private link connection. + * + * @return the fqdns value + */ + public List fqdns() { + return this.fqdns; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceIPConfigurations.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceIPConfigurations.java new file mode 100644 index 000000000000..3d5b839a8b72 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceIPConfigurations.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkInterfaceIPConfigurationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing NetworkInterfaceIPConfigurations. + */ +public interface NetworkInterfaceIPConfigurations extends HasInner { + /** + * Gets the specified network interface ip configuration. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String networkInterfaceName, String ipConfigurationName); + + /** + * Get all ip configurations in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String networkInterfaceName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceLoadBalancer.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceLoadBalancer.java new file mode 100644 index 000000000000..1961d8034df2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceLoadBalancer.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.LoadBalancerInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import java.util.Map; + +/** + * Type representing NetworkInterfaceLoadBalancer. + */ +public interface NetworkInterfaceLoadBalancer extends HasInner, HasManager { + /** + * @return the backendAddressPools value. + */ + List backendAddressPools(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the frontendIPConfigurations value. + */ + List frontendIPConfigurations(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the inboundNatPools value. + */ + List inboundNatPools(); + + /** + * @return the inboundNatRules value. + */ + List inboundNatRules(); + + /** + * @return the loadBalancingRules value. + */ + List loadBalancingRules(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the outboundRules value. + */ + List outboundRules(); + + /** + * @return the probes value. + */ + List probes(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the sku value. + */ + LoadBalancerSku sku(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceLoadBalancers.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceLoadBalancers.java new file mode 100644 index 000000000000..b899f360f78c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceLoadBalancers.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkInterfaceLoadBalancersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing NetworkInterfaceLoadBalancers. + */ +public interface NetworkInterfaceLoadBalancers extends HasInner { + /** + * List all load balancers in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String networkInterfaceName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceNetworkInterfaceIPConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceNetworkInterfaceIPConfiguration.java new file mode 100644 index 000000000000..edfb34e35db7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceNetworkInterfaceIPConfiguration.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkInterfaceIPConfigurationInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; + +/** + * Type representing NetworkInterfaceNetworkInterfaceIPConfiguration. + */ +public interface NetworkInterfaceNetworkInterfaceIPConfiguration extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the applicationGatewayBackendAddressPools value. + */ + List applicationGatewayBackendAddressPools(); + + /** + * @return the applicationSecurityGroups value. + */ + List applicationSecurityGroups(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the loadBalancerBackendAddressPools value. + */ + List loadBalancerBackendAddressPools(); + + /** + * @return the loadBalancerInboundNatRules value. + */ + List loadBalancerInboundNatRules(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the primary value. + */ + Boolean primary(); + + /** + * @return the privateIPAddress value. + */ + String privateIPAddress(); + + /** + * @return the privateIPAddressVersion value. + */ + IPVersion privateIPAddressVersion(); + + /** + * @return the privateIPAllocationMethod value. + */ + IPAllocationMethod privateIPAllocationMethod(); + + /** + * @return the privateLinkConnectionProperties value. + */ + NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnectionProperties(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the publicIPAddress value. + */ + PublicIPAddress publicIPAddress(); + + /** + * @return the subnet value. + */ + Subnet subnet(); + + /** + * @return the virtualNetworkTaps value. + */ + List virtualNetworkTaps(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceTapConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceTapConfiguration.java new file mode 100644 index 000000000000..b9b4c2412a6b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceTapConfiguration.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkInterfaceTapConfigurationInner; +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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualNetworkTapInner; + +/** + * Type representing NetworkInterfaceTapConfiguration. + */ +public interface NetworkInterfaceTapConfiguration extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the virtualNetworkTap value. + */ + VirtualNetworkTap virtualNetworkTap(); + + /** + * The entirety of the NetworkInterfaceTapConfiguration definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNetworkInterface, DefinitionStages.WithCreate { + } + + /** + * Grouping of NetworkInterfaceTapConfiguration definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a NetworkInterfaceTapConfiguration definition. + */ + interface Blank extends WithNetworkInterface { + } + + /** + * The stage of the networkinterfacetapconfiguration definition allowing to specify NetworkInterface. + */ + interface WithNetworkInterface { + /** + * Specifies resourceGroupName, networkInterfaceName. + * @param resourceGroupName The name of the resource group + * @param networkInterfaceName The name of the network interface + * @return the next definition stage + */ + WithCreate withExistingNetworkInterface(String resourceGroupName, String networkInterfaceName); + } + + /** + * The stage of the networkinterfacetapconfiguration definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the networkinterfacetapconfiguration definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the networkinterfacetapconfiguration definition allowing to specify VirtualNetworkTap. + */ + interface WithVirtualNetworkTap { + /** + * Specifies virtualNetworkTap. + * @param virtualNetworkTap The reference of the Virtual Network Tap resource + * @return the next definition stage + */ + WithCreate withVirtualNetworkTap(VirtualNetworkTapInner virtualNetworkTap); + } + + /** + * 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.WithName, DefinitionStages.WithVirtualNetworkTap { + } + } + /** + * The template for a NetworkInterfaceTapConfiguration update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithVirtualNetworkTap { + } + + /** + * Grouping of NetworkInterfaceTapConfiguration update stages. + */ + interface UpdateStages { + /** + * The stage of the networkinterfacetapconfiguration update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the networkinterfacetapconfiguration update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the networkinterfacetapconfiguration update allowing to specify VirtualNetworkTap. + */ + interface WithVirtualNetworkTap { + /** + * Specifies virtualNetworkTap. + * @param virtualNetworkTap The reference of the Virtual Network Tap resource + * @return the next update stage + */ + Update withVirtualNetworkTap(VirtualNetworkTapInner virtualNetworkTap); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceTapConfigurations.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceTapConfigurations.java new file mode 100644 index 000000000000..c6ebccb256b8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaceTapConfigurations.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkInterfaceTapConfigurationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing NetworkInterfaceTapConfigurations. + */ +public interface NetworkInterfaceTapConfigurations extends SupportsCreating, HasInner { + /** + * Get the specified tap configuration on a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName); + + /** + * Get all Tap configurations in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String networkInterfaceName); + + /** + * Deletes the specified tap configuration from the NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaces.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaces.java new file mode 100644 index 000000000000..763e09b67a4c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkInterfaces.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterface; +import rx.Completable; +import com.microsoft.azure.management.network.v2019_09_01.VirtualMachineScaleSetNetworkInterfaceIPConfiguration; + +/** + * Type representing NetworkInterfaces. + */ +public interface NetworkInterfaces { + /** + * Begins definition for a new NetworkInterface resource. + * @param name resource name. + * @return the first stage of the new NetworkInterface definition. + */ + NetworkInterface.DefinitionStages.Blank defineNetworkInterface(String name); + + /** + * Gets information about the specified network interface. + * + * @param resourceGroupName resource group name + * @param name resource name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getByResourceGroupAsync(String resourceGroupName, String name); + + /** + * Gets all network interfaces in a resource group. + * + * @param resourceGroupName resource group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(String resourceGroupName); + + /** + * Gets all network interfaces in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Deletes the specified network interface. + * + * @param resourceGroupName resource group name + * @param name resource name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String name); + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName); + + /** + * Gets all network security groups applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName); + + /** + * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listVirtualMachineScaleSetVMNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex); + + /** + * Gets all network interfaces in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listVirtualMachineScaleSetNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName); + + /** + * Get the specified network interface in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getVirtualMachineScaleSetNetworkInterfaceAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName); + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName); + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkOperationStatus.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkOperationStatus.java new file mode 100644 index 000000000000..8e69f94c01ed --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkOperationStatus.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for NetworkOperationStatus. + */ +public final class NetworkOperationStatus extends ExpandableStringEnum { + /** Static value InProgress for NetworkOperationStatus. */ + public static final NetworkOperationStatus IN_PROGRESS = fromString("InProgress"); + + /** Static value Succeeded for NetworkOperationStatus. */ + public static final NetworkOperationStatus SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for NetworkOperationStatus. */ + public static final NetworkOperationStatus FAILED = fromString("Failed"); + + /** + * Creates or finds a NetworkOperationStatus from its string representation. + * @param name a name to look for + * @return the corresponding NetworkOperationStatus + */ + @JsonCreator + public static NetworkOperationStatus fromString(String name) { + return fromString(name, NetworkOperationStatus.class); + } + + /** + * @return known NetworkOperationStatus values + */ + public static Collection values() { + return values(NetworkOperationStatus.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkProfile.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkProfile.java new file mode 100644 index 000000000000..b49450708656 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkProfile.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkProfileInner; + +/** + * Type representing NetworkProfile. + */ +public interface NetworkProfile extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the containerNetworkInterfaceConfigurations value. + */ + List containerNetworkInterfaceConfigurations(); + + /** + * @return the containerNetworkInterfaces value. + */ + List containerNetworkInterfaces(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * The entirety of the NetworkProfile definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of NetworkProfile definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a NetworkProfile definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the NetworkProfile definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the networkprofile definition allowing to specify ContainerNetworkInterfaceConfigurations. + */ + interface WithContainerNetworkInterfaceConfigurations { + /** + * Specifies containerNetworkInterfaceConfigurations. + * @param containerNetworkInterfaceConfigurations List of chid container network interface configurations + * @return the next definition stage + */ + WithCreate withContainerNetworkInterfaceConfigurations(List containerNetworkInterfaceConfigurations); + } + + /** + * 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.WithContainerNetworkInterfaceConfigurations { + } + } + /** + * The template for a NetworkProfile update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithContainerNetworkInterfaceConfigurations { + } + + /** + * Grouping of NetworkProfile update stages. + */ + interface UpdateStages { + /** + * The stage of the networkprofile update allowing to specify ContainerNetworkInterfaceConfigurations. + */ + interface WithContainerNetworkInterfaceConfigurations { + /** + * Specifies containerNetworkInterfaceConfigurations. + * @param containerNetworkInterfaceConfigurations List of chid container network interface configurations + * @return the next update stage + */ + Update withContainerNetworkInterfaceConfigurations(List containerNetworkInterfaceConfigurations); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkProfiles.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkProfiles.java new file mode 100644 index 000000000000..0e1378b0c1a3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkProfiles.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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkProfilesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing NetworkProfiles. + */ +public interface NetworkProfiles extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkRuleCondition.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkRuleCondition.java new file mode 100644 index 000000000000..5fa1a5bb7db4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkRuleCondition.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Rule condition of type network. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleConditionType") +@JsonTypeName("NetworkRuleCondition") +public class NetworkRuleCondition extends FirewallPolicyRuleCondition { + /** + * Array of FirewallPolicyRuleConditionNetworkProtocols. + */ + @JsonProperty(value = "ipProtocols") + private List ipProtocols; + + /** + * List of source IP addresses for this rule. + */ + @JsonProperty(value = "sourceAddresses") + private List sourceAddresses; + + /** + * List of destination IP addresses or Service Tags. + */ + @JsonProperty(value = "destinationAddresses") + private List destinationAddresses; + + /** + * List of destination ports. + */ + @JsonProperty(value = "destinationPorts") + private List destinationPorts; + + /** + * Get array of FirewallPolicyRuleConditionNetworkProtocols. + * + * @return the ipProtocols value + */ + public List ipProtocols() { + return this.ipProtocols; + } + + /** + * Set array of FirewallPolicyRuleConditionNetworkProtocols. + * + * @param ipProtocols the ipProtocols value to set + * @return the NetworkRuleCondition object itself. + */ + public NetworkRuleCondition withIpProtocols(List ipProtocols) { + this.ipProtocols = ipProtocols; + return this; + } + + /** + * Get list of source IP addresses for this rule. + * + * @return the sourceAddresses value + */ + public List sourceAddresses() { + return this.sourceAddresses; + } + + /** + * Set list of source IP addresses for this rule. + * + * @param sourceAddresses the sourceAddresses value to set + * @return the NetworkRuleCondition object itself. + */ + public NetworkRuleCondition withSourceAddresses(List sourceAddresses) { + this.sourceAddresses = sourceAddresses; + return this; + } + + /** + * Get list of destination IP addresses or Service Tags. + * + * @return the destinationAddresses value + */ + public List destinationAddresses() { + return this.destinationAddresses; + } + + /** + * Set list of destination IP addresses or Service Tags. + * + * @param destinationAddresses the destinationAddresses value to set + * @return the NetworkRuleCondition object itself. + */ + public NetworkRuleCondition withDestinationAddresses(List destinationAddresses) { + this.destinationAddresses = destinationAddresses; + return this; + } + + /** + * Get list of destination ports. + * + * @return the destinationPorts value + */ + public List destinationPorts() { + return this.destinationPorts; + } + + /** + * Set list of destination ports. + * + * @param destinationPorts the destinationPorts value to set + * @return the NetworkRuleCondition object itself. + */ + public NetworkRuleCondition withDestinationPorts(List destinationPorts) { + this.destinationPorts = destinationPorts; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroup.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroup.java new file mode 100644 index 000000000000..8dc3aafcf4f6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroup.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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.SecurityRuleInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkSecurityGroupInner; + +/** + * Type representing NetworkSecurityGroup. + */ +public interface NetworkSecurityGroup extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the defaultSecurityRules value. + */ + List defaultSecurityRules(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the networkInterfaces value. + */ + List networkInterfaces(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the securityRules value. + */ + List securityRules(); + + /** + * @return the subnets value. + */ + List subnets(); + + /** + * The entirety of the NetworkSecurityGroup definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of NetworkSecurityGroup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a NetworkSecurityGroup definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the NetworkSecurityGroup definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the networksecuritygroup definition allowing to specify SecurityRules. + */ + interface WithSecurityRules { + /** + * Specifies securityRules. + * @param securityRules A collection of security rules of the network security group + * @return the next definition stage + */ + WithCreate withSecurityRules(List securityRules); + } + + /** + * 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.WithSecurityRules { + } + } + /** + * The template for a NetworkSecurityGroup update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithSecurityRules { + } + + /** + * Grouping of NetworkSecurityGroup update stages. + */ + interface UpdateStages { + /** + * The stage of the networksecuritygroup update allowing to specify SecurityRules. + */ + interface WithSecurityRules { + /** + * Specifies securityRules. + * @param securityRules A collection of security rules of the network security group + * @return the next update stage + */ + Update withSecurityRules(List securityRules); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroupResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroupResult.java new file mode 100644 index 000000000000..c3fc1105eadb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroupResult.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network configuration diagnostic result corresponded provided traffic query. + */ +public class NetworkSecurityGroupResult { + /** + * The network traffic is allowed or denied. Possible values include: + * 'Allow', 'Deny'. + */ + @JsonProperty(value = "securityRuleAccessResult") + private SecurityRuleAccess securityRuleAccessResult; + + /** + * List of results network security groups diagnostic. + */ + @JsonProperty(value = "evaluatedNetworkSecurityGroups", access = JsonProperty.Access.WRITE_ONLY) + private List evaluatedNetworkSecurityGroups; + + /** + * Get the network traffic is allowed or denied. Possible values include: 'Allow', 'Deny'. + * + * @return the securityRuleAccessResult value + */ + public SecurityRuleAccess securityRuleAccessResult() { + return this.securityRuleAccessResult; + } + + /** + * Set the network traffic is allowed or denied. Possible values include: 'Allow', 'Deny'. + * + * @param securityRuleAccessResult the securityRuleAccessResult value to set + * @return the NetworkSecurityGroupResult object itself. + */ + public NetworkSecurityGroupResult withSecurityRuleAccessResult(SecurityRuleAccess securityRuleAccessResult) { + this.securityRuleAccessResult = securityRuleAccessResult; + return this; + } + + /** + * Get list of results network security groups diagnostic. + * + * @return the evaluatedNetworkSecurityGroups value + */ + public List evaluatedNetworkSecurityGroups() { + return this.evaluatedNetworkSecurityGroups; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroupSecurityRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroupSecurityRule.java new file mode 100644 index 000000000000..7b2ca311e57f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroupSecurityRule.java @@ -0,0 +1,542 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.SecurityRuleInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ApplicationSecurityGroupInner; + +/** + * Type representing NetworkSecurityGroupSecurityRule. + */ +public interface NetworkSecurityGroupSecurityRule extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the access value. + */ + SecurityRuleAccess access(); + + /** + * @return the description value. + */ + String description(); + + /** + * @return the destinationAddressPrefix value. + */ + String destinationAddressPrefix(); + + /** + * @return the destinationAddressPrefixes value. + */ + List destinationAddressPrefixes(); + + /** + * @return the destinationApplicationSecurityGroups value. + */ + List destinationApplicationSecurityGroups(); + + /** + * @return the destinationPortRange value. + */ + String destinationPortRange(); + + /** + * @return the destinationPortRanges value. + */ + List destinationPortRanges(); + + /** + * @return the direction value. + */ + SecurityRuleDirection direction(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the priority value. + */ + Integer priority(); + + /** + * @return the protocol value. + */ + SecurityRuleProtocol protocol(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the sourceAddressPrefix value. + */ + String sourceAddressPrefix(); + + /** + * @return the sourceAddressPrefixes value. + */ + List sourceAddressPrefixes(); + + /** + * @return the sourceApplicationSecurityGroups value. + */ + List sourceApplicationSecurityGroups(); + + /** + * @return the sourcePortRange value. + */ + String sourcePortRange(); + + /** + * @return the sourcePortRanges value. + */ + List sourcePortRanges(); + + /** + * The entirety of the NetworkSecurityGroupSecurityRule definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNetworkSecurityGroup, DefinitionStages.WithAccess, DefinitionStages.WithDirection, DefinitionStages.WithProtocol, DefinitionStages.WithCreate { + } + + /** + * Grouping of NetworkSecurityGroupSecurityRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a NetworkSecurityGroupSecurityRule definition. + */ + interface Blank extends WithNetworkSecurityGroup { + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify NetworkSecurityGroup. + */ + interface WithNetworkSecurityGroup { + /** + * Specifies resourceGroupName, networkSecurityGroupName. + * @param resourceGroupName The name of the resource group + * @param networkSecurityGroupName The name of the network security group + * @return the next definition stage + */ + WithAccess withExistingNetworkSecurityGroup(String resourceGroupName, String networkSecurityGroupName); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify Access. + */ + interface WithAccess { + /** + * Specifies access. + * @param access The network traffic is allowed or denied. Possible values include: 'Allow', 'Deny' + * @return the next definition stage + */ + WithDirection withAccess(SecurityRuleAccess access); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify Direction. + */ + interface WithDirection { + /** + * Specifies direction. + * @param direction The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'Inbound', 'Outbound' + * @return the next definition stage + */ + WithProtocol withDirection(SecurityRuleDirection direction); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify Protocol. + */ + interface WithProtocol { + /** + * Specifies protocol. + * @param protocol Network protocol this rule applies to. Possible values include: 'Tcp', 'Udp', 'Icmp', 'Esp', '*', 'Ah' + * @return the next definition stage + */ + WithCreate withProtocol(SecurityRuleProtocol protocol); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify Description. + */ + interface WithDescription { + /** + * Specifies description. + * @param description A description for this rule. Restricted to 140 chars + * @return the next definition stage + */ + WithCreate withDescription(String description); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify DestinationAddressPrefix. + */ + interface WithDestinationAddressPrefix { + /** + * Specifies destinationAddressPrefix. + * @param destinationAddressPrefix The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used + * @return the next definition stage + */ + WithCreate withDestinationAddressPrefix(String destinationAddressPrefix); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify DestinationAddressPrefixes. + */ + interface WithDestinationAddressPrefixes { + /** + * Specifies destinationAddressPrefixes. + * @param destinationAddressPrefixes The destination address prefixes. CIDR or destination IP ranges + * @return the next definition stage + */ + WithCreate withDestinationAddressPrefixes(List destinationAddressPrefixes); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify DestinationApplicationSecurityGroups. + */ + interface WithDestinationApplicationSecurityGroups { + /** + * Specifies destinationApplicationSecurityGroups. + * @param destinationApplicationSecurityGroups The application security group specified as destination + * @return the next definition stage + */ + WithCreate withDestinationApplicationSecurityGroups(List destinationApplicationSecurityGroups); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify DestinationPortRange. + */ + interface WithDestinationPortRange { + /** + * Specifies destinationPortRange. + * @param destinationPortRange The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports + * @return the next definition stage + */ + WithCreate withDestinationPortRange(String destinationPortRange); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify DestinationPortRanges. + */ + interface WithDestinationPortRanges { + /** + * Specifies destinationPortRanges. + * @param destinationPortRanges The destination port ranges + * @return the next definition stage + */ + WithCreate withDestinationPortRanges(List destinationPortRanges); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify Priority. + */ + interface WithPriority { + /** + * Specifies priority. + * @param priority The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule + * @return the next definition stage + */ + WithCreate withPriority(Integer priority); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify SourceAddressPrefix. + */ + interface WithSourceAddressPrefix { + /** + * Specifies sourceAddressPrefix. + * @param sourceAddressPrefix The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from + * @return the next definition stage + */ + WithCreate withSourceAddressPrefix(String sourceAddressPrefix); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify SourceAddressPrefixes. + */ + interface WithSourceAddressPrefixes { + /** + * Specifies sourceAddressPrefixes. + * @param sourceAddressPrefixes The CIDR or source IP ranges + * @return the next definition stage + */ + WithCreate withSourceAddressPrefixes(List sourceAddressPrefixes); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify SourceApplicationSecurityGroups. + */ + interface WithSourceApplicationSecurityGroups { + /** + * Specifies sourceApplicationSecurityGroups. + * @param sourceApplicationSecurityGroups The application security group specified as source + * @return the next definition stage + */ + WithCreate withSourceApplicationSecurityGroups(List sourceApplicationSecurityGroups); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify SourcePortRange. + */ + interface WithSourcePortRange { + /** + * Specifies sourcePortRange. + * @param sourcePortRange The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports + * @return the next definition stage + */ + WithCreate withSourcePortRange(String sourcePortRange); + } + + /** + * The stage of the networksecuritygroupsecurityrule definition allowing to specify SourcePortRanges. + */ + interface WithSourcePortRanges { + /** + * Specifies sourcePortRanges. + * @param sourcePortRanges The source port ranges + * @return the next definition stage + */ + WithCreate withSourcePortRanges(List sourcePortRanges); + } + + /** + * 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.WithDescription, DefinitionStages.WithDestinationAddressPrefix, DefinitionStages.WithDestinationAddressPrefixes, DefinitionStages.WithDestinationApplicationSecurityGroups, DefinitionStages.WithDestinationPortRange, DefinitionStages.WithDestinationPortRanges, DefinitionStages.WithId, DefinitionStages.WithName, DefinitionStages.WithPriority, DefinitionStages.WithSourceAddressPrefix, DefinitionStages.WithSourceAddressPrefixes, DefinitionStages.WithSourceApplicationSecurityGroups, DefinitionStages.WithSourcePortRange, DefinitionStages.WithSourcePortRanges { + } + } + /** + * The template for a NetworkSecurityGroupSecurityRule update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithDescription, UpdateStages.WithDestinationAddressPrefix, UpdateStages.WithDestinationAddressPrefixes, UpdateStages.WithDestinationApplicationSecurityGroups, UpdateStages.WithDestinationPortRange, UpdateStages.WithDestinationPortRanges, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithPriority, UpdateStages.WithSourceAddressPrefix, UpdateStages.WithSourceAddressPrefixes, UpdateStages.WithSourceApplicationSecurityGroups, UpdateStages.WithSourcePortRange, UpdateStages.WithSourcePortRanges { + } + + /** + * Grouping of NetworkSecurityGroupSecurityRule update stages. + */ + interface UpdateStages { + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify Description. + */ + interface WithDescription { + /** + * Specifies description. + * @param description A description for this rule. Restricted to 140 chars + * @return the next update stage + */ + Update withDescription(String description); + } + + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify DestinationAddressPrefix. + */ + interface WithDestinationAddressPrefix { + /** + * Specifies destinationAddressPrefix. + * @param destinationAddressPrefix The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used + * @return the next update stage + */ + Update withDestinationAddressPrefix(String destinationAddressPrefix); + } + + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify DestinationAddressPrefixes. + */ + interface WithDestinationAddressPrefixes { + /** + * Specifies destinationAddressPrefixes. + * @param destinationAddressPrefixes The destination address prefixes. CIDR or destination IP ranges + * @return the next update stage + */ + Update withDestinationAddressPrefixes(List destinationAddressPrefixes); + } + + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify DestinationApplicationSecurityGroups. + */ + interface WithDestinationApplicationSecurityGroups { + /** + * Specifies destinationApplicationSecurityGroups. + * @param destinationApplicationSecurityGroups The application security group specified as destination + * @return the next update stage + */ + Update withDestinationApplicationSecurityGroups(List destinationApplicationSecurityGroups); + } + + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify DestinationPortRange. + */ + interface WithDestinationPortRange { + /** + * Specifies destinationPortRange. + * @param destinationPortRange The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports + * @return the next update stage + */ + Update withDestinationPortRange(String destinationPortRange); + } + + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify DestinationPortRanges. + */ + interface WithDestinationPortRanges { + /** + * Specifies destinationPortRanges. + * @param destinationPortRanges The destination port ranges + * @return the next update stage + */ + Update withDestinationPortRanges(List destinationPortRanges); + } + + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify Priority. + */ + interface WithPriority { + /** + * Specifies priority. + * @param priority The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule + * @return the next update stage + */ + Update withPriority(Integer priority); + } + + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify SourceAddressPrefix. + */ + interface WithSourceAddressPrefix { + /** + * Specifies sourceAddressPrefix. + * @param sourceAddressPrefix The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from + * @return the next update stage + */ + Update withSourceAddressPrefix(String sourceAddressPrefix); + } + + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify SourceAddressPrefixes. + */ + interface WithSourceAddressPrefixes { + /** + * Specifies sourceAddressPrefixes. + * @param sourceAddressPrefixes The CIDR or source IP ranges + * @return the next update stage + */ + Update withSourceAddressPrefixes(List sourceAddressPrefixes); + } + + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify SourceApplicationSecurityGroups. + */ + interface WithSourceApplicationSecurityGroups { + /** + * Specifies sourceApplicationSecurityGroups. + * @param sourceApplicationSecurityGroups The application security group specified as source + * @return the next update stage + */ + Update withSourceApplicationSecurityGroups(List sourceApplicationSecurityGroups); + } + + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify SourcePortRange. + */ + interface WithSourcePortRange { + /** + * Specifies sourcePortRange. + * @param sourcePortRange The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports + * @return the next update stage + */ + Update withSourcePortRange(String sourcePortRange); + } + + /** + * The stage of the networksecuritygroupsecurityrule update allowing to specify SourcePortRanges. + */ + interface WithSourcePortRanges { + /** + * Specifies sourcePortRanges. + * @param sourcePortRanges The source port ranges + * @return the next update stage + */ + Update withSourcePortRanges(List sourcePortRanges); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroupSecurityRuleModel.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroupSecurityRuleModel.java new file mode 100644 index 000000000000..c40fea45520b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroupSecurityRuleModel.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.SecurityRuleInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; + +/** + * Type representing NetworkSecurityGroupSecurityRuleModel. + */ +public interface NetworkSecurityGroupSecurityRuleModel extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the access value. + */ + SecurityRuleAccess access(); + + /** + * @return the description value. + */ + String description(); + + /** + * @return the destinationAddressPrefix value. + */ + String destinationAddressPrefix(); + + /** + * @return the destinationAddressPrefixes value. + */ + List destinationAddressPrefixes(); + + /** + * @return the destinationApplicationSecurityGroups value. + */ + List destinationApplicationSecurityGroups(); + + /** + * @return the destinationPortRange value. + */ + String destinationPortRange(); + + /** + * @return the destinationPortRanges value. + */ + List destinationPortRanges(); + + /** + * @return the direction value. + */ + SecurityRuleDirection direction(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the priority value. + */ + Integer priority(); + + /** + * @return the protocol value. + */ + SecurityRuleProtocol protocol(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the sourceAddressPrefix value. + */ + String sourceAddressPrefix(); + + /** + * @return the sourceAddressPrefixes value. + */ + List sourceAddressPrefixes(); + + /** + * @return the sourceApplicationSecurityGroups value. + */ + List sourceApplicationSecurityGroups(); + + /** + * @return the sourcePortRange value. + */ + String sourcePortRange(); + + /** + * @return the sourcePortRanges value. + */ + List sourcePortRanges(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroups.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroups.java new file mode 100644 index 000000000000..059df6632e22 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityGroups.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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkSecurityGroupsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing NetworkSecurityGroups. + */ +public interface NetworkSecurityGroups extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityRulesEvaluationResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityRulesEvaluationResult.java new file mode 100644 index 000000000000..60acfc641d7c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkSecurityRulesEvaluationResult.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network security rules evaluation result. + */ +public class NetworkSecurityRulesEvaluationResult { + /** + * Name of the network security rule. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Value indicating whether protocol is matched. + */ + @JsonProperty(value = "protocolMatched") + private Boolean protocolMatched; + + /** + * Value indicating whether source is matched. + */ + @JsonProperty(value = "sourceMatched") + private Boolean sourceMatched; + + /** + * Value indicating whether source port is matched. + */ + @JsonProperty(value = "sourcePortMatched") + private Boolean sourcePortMatched; + + /** + * Value indicating whether destination is matched. + */ + @JsonProperty(value = "destinationMatched") + private Boolean destinationMatched; + + /** + * Value indicating whether destination port is matched. + */ + @JsonProperty(value = "destinationPortMatched") + private Boolean destinationPortMatched; + + /** + * Get name of the network security rule. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the network security rule. + * + * @param name the name value to set + * @return the NetworkSecurityRulesEvaluationResult object itself. + */ + public NetworkSecurityRulesEvaluationResult withName(String name) { + this.name = name; + return this; + } + + /** + * Get value indicating whether protocol is matched. + * + * @return the protocolMatched value + */ + public Boolean protocolMatched() { + return this.protocolMatched; + } + + /** + * Set value indicating whether protocol is matched. + * + * @param protocolMatched the protocolMatched value to set + * @return the NetworkSecurityRulesEvaluationResult object itself. + */ + public NetworkSecurityRulesEvaluationResult withProtocolMatched(Boolean protocolMatched) { + this.protocolMatched = protocolMatched; + return this; + } + + /** + * Get value indicating whether source is matched. + * + * @return the sourceMatched value + */ + public Boolean sourceMatched() { + return this.sourceMatched; + } + + /** + * Set value indicating whether source is matched. + * + * @param sourceMatched the sourceMatched value to set + * @return the NetworkSecurityRulesEvaluationResult object itself. + */ + public NetworkSecurityRulesEvaluationResult withSourceMatched(Boolean sourceMatched) { + this.sourceMatched = sourceMatched; + return this; + } + + /** + * Get value indicating whether source port is matched. + * + * @return the sourcePortMatched value + */ + public Boolean sourcePortMatched() { + return this.sourcePortMatched; + } + + /** + * Set value indicating whether source port is matched. + * + * @param sourcePortMatched the sourcePortMatched value to set + * @return the NetworkSecurityRulesEvaluationResult object itself. + */ + public NetworkSecurityRulesEvaluationResult withSourcePortMatched(Boolean sourcePortMatched) { + this.sourcePortMatched = sourcePortMatched; + return this; + } + + /** + * Get value indicating whether destination is matched. + * + * @return the destinationMatched value + */ + public Boolean destinationMatched() { + return this.destinationMatched; + } + + /** + * Set value indicating whether destination is matched. + * + * @param destinationMatched the destinationMatched value to set + * @return the NetworkSecurityRulesEvaluationResult object itself. + */ + public NetworkSecurityRulesEvaluationResult withDestinationMatched(Boolean destinationMatched) { + this.destinationMatched = destinationMatched; + return this; + } + + /** + * Get value indicating whether destination port is matched. + * + * @return the destinationPortMatched value + */ + public Boolean destinationPortMatched() { + return this.destinationPortMatched; + } + + /** + * Set value indicating whether destination port is matched. + * + * @param destinationPortMatched the destinationPortMatched value to set + * @return the NetworkSecurityRulesEvaluationResult object itself. + */ + public NetworkSecurityRulesEvaluationResult withDestinationPortMatched(Boolean destinationPortMatched) { + this.destinationPortMatched = destinationPortMatched; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkWatcher.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkWatcher.java new file mode 100644 index 000000000000..f04bd36b3715 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkWatcher.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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkWatcherInner; + +/** + * Type representing NetworkWatcher. + */ +public interface NetworkWatcher extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * The entirety of the NetworkWatcher definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of NetworkWatcher definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a NetworkWatcher definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the NetworkWatcher definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * 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 { + } + } + /** + * The template for a NetworkWatcher update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags { + } + + /** + * Grouping of NetworkWatcher update stages. + */ + interface UpdateStages { + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkWatchers.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkWatchers.java new file mode 100644 index 000000000000..38f08448b12b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NetworkWatchers.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.FlowLogInformationInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkWatchersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing NetworkWatchers. + */ +public interface NetworkWatchers extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Gets the current network topology by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the representation of topology. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getTopologyAsync(String resourceGroupName, String networkWatcherName, TopologyParameters parameters); + + /** + * Verify IP flow from the specified VM to a location given the currently configured NSG rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the IP flow to be verified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable verifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters); + + /** + * Gets the next hop from the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the source and destination endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters); + + /** + * Gets the configured and effective security group rules on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param targetResourceId ID of the target VM. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getVMSecurityRulesAsync(String resourceGroupName, String networkWatcherName, String targetResourceId); + + /** + * Initiate troubleshooting on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the resource to troubleshoot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters); + + /** + * Get the last completed troubleshooting result on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource ID to query the troubleshooting result. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getTroubleshootingResultAsync(String resourceGroupName, String networkWatcherName, String targetResourceId); + + /** + * Configures flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the configuration of flow log. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable setFlowLogConfigurationAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters); + + /** + * Queries status of flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getFlowLogStatusAsync(String resourceGroupName, String networkWatcherName, String targetResourceId); + + /** + * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine how the connectivity check will be performed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters); + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters); + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters); + + /** + * Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NextHopParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NextHopParameters.java new file mode 100644 index 000000000000..587ba2110d84 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NextHopParameters.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the source and destination endpoint. + */ +public class NextHopParameters { + /** + * The resource identifier of the target resource against which the action + * is to be performed. + */ + @JsonProperty(value = "targetResourceId", required = true) + private String targetResourceId; + + /** + * The source IP address. + */ + @JsonProperty(value = "sourceIPAddress", required = true) + private String sourceIPAddress; + + /** + * The destination IP address. + */ + @JsonProperty(value = "destinationIPAddress", required = true) + private String destinationIPAddress; + + /** + * The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any + * of the nics, then this parameter must be specified. Otherwise optional). + */ + @JsonProperty(value = "targetNicResourceId") + private String targetNicResourceId; + + /** + * Get the resource identifier of the target resource against which the action is to be performed. + * + * @return the targetResourceId value + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the resource identifier of the target resource against which the action is to be performed. + * + * @param targetResourceId the targetResourceId value to set + * @return the NextHopParameters object itself. + */ + public NextHopParameters withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + + /** + * Get the source IP address. + * + * @return the sourceIPAddress value + */ + public String sourceIPAddress() { + return this.sourceIPAddress; + } + + /** + * Set the source IP address. + * + * @param sourceIPAddress the sourceIPAddress value to set + * @return the NextHopParameters object itself. + */ + public NextHopParameters withSourceIPAddress(String sourceIPAddress) { + this.sourceIPAddress = sourceIPAddress; + return this; + } + + /** + * Get the destination IP address. + * + * @return the destinationIPAddress value + */ + public String destinationIPAddress() { + return this.destinationIPAddress; + } + + /** + * Set the destination IP address. + * + * @param destinationIPAddress the destinationIPAddress value to set + * @return the NextHopParameters object itself. + */ + public NextHopParameters withDestinationIPAddress(String destinationIPAddress) { + this.destinationIPAddress = destinationIPAddress; + return this; + } + + /** + * Get the NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). + * + * @return the targetNicResourceId value + */ + public String targetNicResourceId() { + return this.targetNicResourceId; + } + + /** + * Set the NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). + * + * @param targetNicResourceId the targetNicResourceId value to set + * @return the NextHopParameters object itself. + */ + public NextHopParameters withTargetNicResourceId(String targetNicResourceId) { + this.targetNicResourceId = targetNicResourceId; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NextHopResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NextHopResult.java new file mode 100644 index 000000000000..d947fe19c890 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NextHopResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NextHopResultInner; + +/** + * Type representing NextHopResult. + */ +public interface NextHopResult extends HasInner, HasManager { + /** + * @return the nextHopIpAddress value. + */ + String nextHopIpAddress(); + + /** + * @return the nextHopType value. + */ + NextHopType nextHopType(); + + /** + * @return the routeTableId value. + */ + String routeTableId(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NextHopType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NextHopType.java new file mode 100644 index 000000000000..47bb03fe7704 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/NextHopType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for NextHopType. + */ +public final class NextHopType extends ExpandableStringEnum { + /** Static value Internet for NextHopType. */ + public static final NextHopType INTERNET = fromString("Internet"); + + /** Static value VirtualAppliance for NextHopType. */ + public static final NextHopType VIRTUAL_APPLIANCE = fromString("VirtualAppliance"); + + /** Static value VirtualNetworkGateway for NextHopType. */ + public static final NextHopType VIRTUAL_NETWORK_GATEWAY = fromString("VirtualNetworkGateway"); + + /** Static value VnetLocal for NextHopType. */ + public static final NextHopType VNET_LOCAL = fromString("VnetLocal"); + + /** Static value HyperNetGateway for NextHopType. */ + public static final NextHopType HYPER_NET_GATEWAY = fromString("HyperNetGateway"); + + /** Static value None for NextHopType. */ + public static final NextHopType NONE = fromString("None"); + + /** + * Creates or finds a NextHopType from its string representation. + * @param name a name to look for + * @return the corresponding NextHopType + */ + @JsonCreator + public static NextHopType fromString(String name) { + return fromString(name, NextHopType.class); + } + + /** + * @return known NextHopType values + */ + public static Collection values() { + return values(NextHopType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OfficeTrafficCategory.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OfficeTrafficCategory.java new file mode 100644 index 000000000000..cb1ced346e82 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OfficeTrafficCategory.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for OfficeTrafficCategory. + */ +public final class OfficeTrafficCategory extends ExpandableStringEnum { + /** Static value Optimize for OfficeTrafficCategory. */ + public static final OfficeTrafficCategory OPTIMIZE = fromString("Optimize"); + + /** Static value OptimizeAndAllow for OfficeTrafficCategory. */ + public static final OfficeTrafficCategory OPTIMIZE_AND_ALLOW = fromString("OptimizeAndAllow"); + + /** Static value All for OfficeTrafficCategory. */ + public static final OfficeTrafficCategory ALL = fromString("All"); + + /** Static value None for OfficeTrafficCategory. */ + public static final OfficeTrafficCategory NONE = fromString("None"); + + /** + * Creates or finds a OfficeTrafficCategory from its string representation. + * @param name a name to look for + * @return the corresponding OfficeTrafficCategory + */ + @JsonCreator + public static OfficeTrafficCategory fromString(String name) { + return fromString(name, OfficeTrafficCategory.class); + } + + /** + * @return known OfficeTrafficCategory values + */ + public static Collection values() { + return values(OfficeTrafficCategory.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Operation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Operation.java new file mode 100644 index 000000000000..8bf0946e265a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Operation.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.OperationInner; + +/** + * Type representing Operation. + */ +public interface Operation extends HasInner, HasManager { + /** + * @return the display value. + */ + OperationDisplay display(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the origin value. + */ + String origin(); + + /** + * @return the serviceSpecification value. + */ + OperationPropertiesFormatServiceSpecification serviceSpecification(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OperationDisplay.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OperationDisplay.java new file mode 100644 index 000000000000..2549662cc889 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OperationDisplay.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Display metadata associated with the operation. + */ +public class OperationDisplay { + /** + * Service provider: Microsoft Network. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * Resource on which the operation is performed. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * Type of the operation: get, read, delete, etc. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * Description of the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get service provider: Microsoft Network. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set service provider: Microsoft Network. + * + * @param provider the provider value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get resource on which the operation is performed. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set resource on which the operation is performed. + * + * @param resource the resource value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get type of the operation: get, read, delete, etc. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set type of the operation: get, read, delete, etc. + * + * @param operation the operation value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the operation. + * + * @param description the description value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OperationPropertiesFormatServiceSpecification.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OperationPropertiesFormatServiceSpecification.java new file mode 100644 index 000000000000..382625175c10 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OperationPropertiesFormatServiceSpecification.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specification of the service. + */ +public class OperationPropertiesFormatServiceSpecification { + /** + * Operation service specification. + */ + @JsonProperty(value = "metricSpecifications") + private List metricSpecifications; + + /** + * Operation log specification. + */ + @JsonProperty(value = "logSpecifications") + private List logSpecifications; + + /** + * Get operation service specification. + * + * @return the metricSpecifications value + */ + public List metricSpecifications() { + return this.metricSpecifications; + } + + /** + * Set operation service specification. + * + * @param metricSpecifications the metricSpecifications value to set + * @return the OperationPropertiesFormatServiceSpecification object itself. + */ + public OperationPropertiesFormatServiceSpecification withMetricSpecifications(List metricSpecifications) { + this.metricSpecifications = metricSpecifications; + return this; + } + + /** + * Get operation log specification. + * + * @return the logSpecifications value + */ + public List logSpecifications() { + return this.logSpecifications; + } + + /** + * Set operation log specification. + * + * @param logSpecifications the logSpecifications value to set + * @return the OperationPropertiesFormatServiceSpecification object itself. + */ + public OperationPropertiesFormatServiceSpecification withLogSpecifications(List logSpecifications) { + this.logSpecifications = logSpecifications; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Operations.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Operations.java new file mode 100644 index 000000000000..0e65f7b36041 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Lists all of the available Network Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Origin.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Origin.java new file mode 100644 index 000000000000..792364897e8d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Origin.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Origin. + */ +public final class Origin extends ExpandableStringEnum { + /** Static value Local for Origin. */ + public static final Origin LOCAL = fromString("Local"); + + /** Static value Inbound for Origin. */ + public static final Origin INBOUND = fromString("Inbound"); + + /** Static value Outbound for Origin. */ + public static final Origin OUTBOUND = fromString("Outbound"); + + /** + * Creates or finds a Origin from its string representation. + * @param name a name to look for + * @return the corresponding Origin + */ + @JsonCreator + public static Origin fromString(String name) { + return fromString(name, Origin.class); + } + + /** + * @return known Origin values + */ + public static Collection values() { + return values(Origin.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OutboundRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OutboundRule.java new file mode 100644 index 000000000000..a9594e0f7852 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OutboundRule.java @@ -0,0 +1,79 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.OutboundRuleInner; +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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; +import java.util.List; + +/** + * Type representing OutboundRule. + */ +public interface OutboundRule extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the allocatedOutboundPorts value. + */ + Integer allocatedOutboundPorts(); + + /** + * @return the backendAddressPool value. + */ + SubResource backendAddressPool(); + + /** + * @return the enableTcpReset value. + */ + Boolean enableTcpReset(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the frontendIPConfigurations value. + */ + List frontendIPConfigurations(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the idleTimeoutInMinutes value. + */ + Integer idleTimeoutInMinutes(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the protocol value. + */ + LoadBalancerOutboundRuleProtocol protocol(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OwaspCrsExclusionEntry.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OwaspCrsExclusionEntry.java new file mode 100644 index 000000000000..02170589fae6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OwaspCrsExclusionEntry.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Allow to exclude some variable satisfy the condition for the WAF check. + */ +public class OwaspCrsExclusionEntry { + /** + * The variable to be excluded. Possible values include: + * 'RequestHeaderNames', 'RequestCookieNames', 'RequestArgNames'. + */ + @JsonProperty(value = "matchVariable", required = true) + private OwaspCrsExclusionEntryMatchVariable matchVariable; + + /** + * When matchVariable is a collection, operate on the selector to specify + * which elements in the collection this exclusion applies to. Possible + * values include: 'Equals', 'Contains', 'StartsWith', 'EndsWith', + * 'EqualsAny'. + */ + @JsonProperty(value = "selectorMatchOperator", required = true) + private OwaspCrsExclusionEntrySelectorMatchOperator selectorMatchOperator; + + /** + * When matchVariable is a collection, operator used to specify which + * elements in the collection this exclusion applies to. + */ + @JsonProperty(value = "selector", required = true) + private String selector; + + /** + * Get the variable to be excluded. Possible values include: 'RequestHeaderNames', 'RequestCookieNames', 'RequestArgNames'. + * + * @return the matchVariable value + */ + public OwaspCrsExclusionEntryMatchVariable matchVariable() { + return this.matchVariable; + } + + /** + * Set the variable to be excluded. Possible values include: 'RequestHeaderNames', 'RequestCookieNames', 'RequestArgNames'. + * + * @param matchVariable the matchVariable value to set + * @return the OwaspCrsExclusionEntry object itself. + */ + public OwaspCrsExclusionEntry withMatchVariable(OwaspCrsExclusionEntryMatchVariable matchVariable) { + this.matchVariable = matchVariable; + return this; + } + + /** + * Get when matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. Possible values include: 'Equals', 'Contains', 'StartsWith', 'EndsWith', 'EqualsAny'. + * + * @return the selectorMatchOperator value + */ + public OwaspCrsExclusionEntrySelectorMatchOperator selectorMatchOperator() { + return this.selectorMatchOperator; + } + + /** + * Set when matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. Possible values include: 'Equals', 'Contains', 'StartsWith', 'EndsWith', 'EqualsAny'. + * + * @param selectorMatchOperator the selectorMatchOperator value to set + * @return the OwaspCrsExclusionEntry object itself. + */ + public OwaspCrsExclusionEntry withSelectorMatchOperator(OwaspCrsExclusionEntrySelectorMatchOperator selectorMatchOperator) { + this.selectorMatchOperator = selectorMatchOperator; + return this; + } + + /** + * Get when matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to. + * + * @return the selector value + */ + public String selector() { + return this.selector; + } + + /** + * Set when matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to. + * + * @param selector the selector value to set + * @return the OwaspCrsExclusionEntry object itself. + */ + public OwaspCrsExclusionEntry withSelector(String selector) { + this.selector = selector; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OwaspCrsExclusionEntryMatchVariable.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OwaspCrsExclusionEntryMatchVariable.java new file mode 100644 index 000000000000..3f8fa6f94e2f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OwaspCrsExclusionEntryMatchVariable.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for OwaspCrsExclusionEntryMatchVariable. + */ +public final class OwaspCrsExclusionEntryMatchVariable extends ExpandableStringEnum { + /** Static value RequestHeaderNames for OwaspCrsExclusionEntryMatchVariable. */ + public static final OwaspCrsExclusionEntryMatchVariable REQUEST_HEADER_NAMES = fromString("RequestHeaderNames"); + + /** Static value RequestCookieNames for OwaspCrsExclusionEntryMatchVariable. */ + public static final OwaspCrsExclusionEntryMatchVariable REQUEST_COOKIE_NAMES = fromString("RequestCookieNames"); + + /** Static value RequestArgNames for OwaspCrsExclusionEntryMatchVariable. */ + public static final OwaspCrsExclusionEntryMatchVariable REQUEST_ARG_NAMES = fromString("RequestArgNames"); + + /** + * Creates or finds a OwaspCrsExclusionEntryMatchVariable from its string representation. + * @param name a name to look for + * @return the corresponding OwaspCrsExclusionEntryMatchVariable + */ + @JsonCreator + public static OwaspCrsExclusionEntryMatchVariable fromString(String name) { + return fromString(name, OwaspCrsExclusionEntryMatchVariable.class); + } + + /** + * @return known OwaspCrsExclusionEntryMatchVariable values + */ + public static Collection values() { + return values(OwaspCrsExclusionEntryMatchVariable.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OwaspCrsExclusionEntrySelectorMatchOperator.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OwaspCrsExclusionEntrySelectorMatchOperator.java new file mode 100644 index 000000000000..067234171888 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/OwaspCrsExclusionEntrySelectorMatchOperator.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for OwaspCrsExclusionEntrySelectorMatchOperator. + */ +public final class OwaspCrsExclusionEntrySelectorMatchOperator extends ExpandableStringEnum { + /** Static value Equals for OwaspCrsExclusionEntrySelectorMatchOperator. */ + public static final OwaspCrsExclusionEntrySelectorMatchOperator EQUALS = fromString("Equals"); + + /** Static value Contains for OwaspCrsExclusionEntrySelectorMatchOperator. */ + public static final OwaspCrsExclusionEntrySelectorMatchOperator CONTAINS = fromString("Contains"); + + /** Static value StartsWith for OwaspCrsExclusionEntrySelectorMatchOperator. */ + public static final OwaspCrsExclusionEntrySelectorMatchOperator STARTS_WITH = fromString("StartsWith"); + + /** Static value EndsWith for OwaspCrsExclusionEntrySelectorMatchOperator. */ + public static final OwaspCrsExclusionEntrySelectorMatchOperator ENDS_WITH = fromString("EndsWith"); + + /** Static value EqualsAny for OwaspCrsExclusionEntrySelectorMatchOperator. */ + public static final OwaspCrsExclusionEntrySelectorMatchOperator EQUALS_ANY = fromString("EqualsAny"); + + /** + * Creates or finds a OwaspCrsExclusionEntrySelectorMatchOperator from its string representation. + * @param name a name to look for + * @return the corresponding OwaspCrsExclusionEntrySelectorMatchOperator + */ + @JsonCreator + public static OwaspCrsExclusionEntrySelectorMatchOperator fromString(String name) { + return fromString(name, OwaspCrsExclusionEntrySelectorMatchOperator.class); + } + + /** + * @return known OwaspCrsExclusionEntrySelectorMatchOperator values + */ + public static Collection values() { + return values(OwaspCrsExclusionEntrySelectorMatchOperator.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SConnectionConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SConnectionConfiguration.java new file mode 100644 index 000000000000..d0df5265769e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SConnectionConfiguration.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * P2SConnectionConfiguration Resource. + */ +@JsonFlatten +public class P2SConnectionConfiguration extends SubResource { + /** + * The reference of the address space resource which represents Address + * space for P2S VpnClient. + */ + @JsonProperty(value = "properties.vpnClientAddressPool") + private AddressSpace vpnClientAddressPool; + + /** + * The provisioning state of the P2SConnectionConfiguration resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the reference of the address space resource which represents Address space for P2S VpnClient. + * + * @return the vpnClientAddressPool value + */ + public AddressSpace vpnClientAddressPool() { + return this.vpnClientAddressPool; + } + + /** + * Set the reference of the address space resource which represents Address space for P2S VpnClient. + * + * @param vpnClientAddressPool the vpnClientAddressPool value to set + * @return the P2SConnectionConfiguration object itself. + */ + public P2SConnectionConfiguration withVpnClientAddressPool(AddressSpace vpnClientAddressPool) { + this.vpnClientAddressPool = vpnClientAddressPool; + return this; + } + + /** + * Get the provisioning state of the P2SConnectionConfiguration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the P2SConnectionConfiguration object itself. + */ + public P2SConnectionConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnConnectionHealth.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnConnectionHealth.java new file mode 100644 index 000000000000..a4598ec0e64f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnConnectionHealth.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.P2SVpnConnectionHealthInner; + +/** + * Type representing P2SVpnConnectionHealth. + */ +public interface P2SVpnConnectionHealth extends HasInner, HasManager { + /** + * @return the sasUrl value. + */ + String sasUrl(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnConnectionHealthRequest.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnConnectionHealthRequest.java new file mode 100644 index 000000000000..5e2d5f1af0b9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnConnectionHealthRequest.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of P2S Vpn connection health request. + */ +public class P2SVpnConnectionHealthRequest { + /** + * The list of p2s vpn user names whose p2s vpn connection detailed health + * to retrieve for. + */ + @JsonProperty(value = "vpnUserNamesFilter") + private List vpnUserNamesFilter; + + /** + * The sas-url to download the P2S Vpn connection health detail. + */ + @JsonProperty(value = "outputBlobSasUrl") + private String outputBlobSasUrl; + + /** + * Get the list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for. + * + * @return the vpnUserNamesFilter value + */ + public List vpnUserNamesFilter() { + return this.vpnUserNamesFilter; + } + + /** + * Set the list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for. + * + * @param vpnUserNamesFilter the vpnUserNamesFilter value to set + * @return the P2SVpnConnectionHealthRequest object itself. + */ + public P2SVpnConnectionHealthRequest withVpnUserNamesFilter(List vpnUserNamesFilter) { + this.vpnUserNamesFilter = vpnUserNamesFilter; + return this; + } + + /** + * Get the sas-url to download the P2S Vpn connection health detail. + * + * @return the outputBlobSasUrl value + */ + public String outputBlobSasUrl() { + return this.outputBlobSasUrl; + } + + /** + * Set the sas-url to download the P2S Vpn connection health detail. + * + * @param outputBlobSasUrl the outputBlobSasUrl value to set + * @return the P2SVpnConnectionHealthRequest object itself. + */ + public P2SVpnConnectionHealthRequest withOutputBlobSasUrl(String outputBlobSasUrl) { + this.outputBlobSasUrl = outputBlobSasUrl; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnGateway.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnGateway.java new file mode 100644 index 000000000000..267ce9098fc1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnGateway.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.P2SVpnGatewayInner; + +/** + * Type representing P2SVpnGateway. + */ +public interface P2SVpnGateway extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the p2SConnectionConfigurations value. + */ + List p2SConnectionConfigurations(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the virtualHub value. + */ + SubResource virtualHub(); + + /** + * @return the vpnClientConnectionHealth value. + */ + VpnClientConnectionHealth vpnClientConnectionHealth(); + + /** + * @return the vpnGatewayScaleUnit value. + */ + Integer vpnGatewayScaleUnit(); + + /** + * @return the vpnServerConfiguration value. + */ + SubResource vpnServerConfiguration(); + + /** + * The entirety of the P2SVpnGateway definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of P2SVpnGateway definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a P2SVpnGateway definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the P2SVpnGateway definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the p2svpngateway definition allowing to specify P2SConnectionConfigurations. + */ + interface WithP2SConnectionConfigurations { + /** + * Specifies p2SConnectionConfigurations. + * @param p2SConnectionConfigurations List of all p2s connection configurations of the gateway + * @return the next definition stage + */ + WithCreate withP2SConnectionConfigurations(List p2SConnectionConfigurations); + } + + /** + * The stage of the p2svpngateway definition allowing to specify VirtualHub. + */ + interface WithVirtualHub { + /** + * Specifies virtualHub. + * @param virtualHub The VirtualHub to which the gateway belongs + * @return the next definition stage + */ + WithCreate withVirtualHub(SubResource virtualHub); + } + + /** + * The stage of the p2svpngateway definition allowing to specify VpnGatewayScaleUnit. + */ + interface WithVpnGatewayScaleUnit { + /** + * Specifies vpnGatewayScaleUnit. + * @param vpnGatewayScaleUnit The scale unit for this p2s vpn gateway + * @return the next definition stage + */ + WithCreate withVpnGatewayScaleUnit(Integer vpnGatewayScaleUnit); + } + + /** + * The stage of the p2svpngateway definition allowing to specify VpnServerConfiguration. + */ + interface WithVpnServerConfiguration { + /** + * Specifies vpnServerConfiguration. + * @param vpnServerConfiguration The VpnServerConfiguration to which the p2sVpnGateway is attached to + * @return the next definition stage + */ + WithCreate withVpnServerConfiguration(SubResource vpnServerConfiguration); + } + + /** + * 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.WithP2SConnectionConfigurations, DefinitionStages.WithVirtualHub, DefinitionStages.WithVpnGatewayScaleUnit, DefinitionStages.WithVpnServerConfiguration { + } + } + /** + * The template for a P2SVpnGateway update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithP2SConnectionConfigurations, UpdateStages.WithVirtualHub, UpdateStages.WithVpnGatewayScaleUnit, UpdateStages.WithVpnServerConfiguration { + } + + /** + * Grouping of P2SVpnGateway update stages. + */ + interface UpdateStages { + /** + * The stage of the p2svpngateway update allowing to specify P2SConnectionConfigurations. + */ + interface WithP2SConnectionConfigurations { + /** + * Specifies p2SConnectionConfigurations. + * @param p2SConnectionConfigurations List of all p2s connection configurations of the gateway + * @return the next update stage + */ + Update withP2SConnectionConfigurations(List p2SConnectionConfigurations); + } + + /** + * The stage of the p2svpngateway update allowing to specify VirtualHub. + */ + interface WithVirtualHub { + /** + * Specifies virtualHub. + * @param virtualHub The VirtualHub to which the gateway belongs + * @return the next update stage + */ + Update withVirtualHub(SubResource virtualHub); + } + + /** + * The stage of the p2svpngateway update allowing to specify VpnGatewayScaleUnit. + */ + interface WithVpnGatewayScaleUnit { + /** + * Specifies vpnGatewayScaleUnit. + * @param vpnGatewayScaleUnit The scale unit for this p2s vpn gateway + * @return the next update stage + */ + Update withVpnGatewayScaleUnit(Integer vpnGatewayScaleUnit); + } + + /** + * The stage of the p2svpngateway update allowing to specify VpnServerConfiguration. + */ + interface WithVpnServerConfiguration { + /** + * Specifies vpnServerConfiguration. + * @param vpnServerConfiguration The VpnServerConfiguration to which the p2sVpnGateway is attached to + * @return the next update stage + */ + Update withVpnServerConfiguration(SubResource vpnServerConfiguration); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnProfileParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnProfileParameters.java new file mode 100644 index 000000000000..1e52c134c614 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2SVpnProfileParameters.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Vpn Client Parameters for package generation. + */ +public class P2SVpnProfileParameters { + /** + * VPN client authentication method. Possible values include: 'EAPTLS', + * 'EAPMSCHAPv2'. + */ + @JsonProperty(value = "authenticationMethod") + private AuthenticationMethod authenticationMethod; + + /** + * Get vPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'. + * + * @return the authenticationMethod value + */ + public AuthenticationMethod authenticationMethod() { + return this.authenticationMethod; + } + + /** + * Set vPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'. + * + * @param authenticationMethod the authenticationMethod value to set + * @return the P2SVpnProfileParameters object itself. + */ + public P2SVpnProfileParameters withAuthenticationMethod(AuthenticationMethod authenticationMethod) { + this.authenticationMethod = authenticationMethod; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2sVpnGateways.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2sVpnGateways.java new file mode 100644 index 000000000000..bcd2adb830d3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/P2sVpnGateways.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.network.v2019_09_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.network.v2019_09_01.implementation.P2sVpnGatewaysInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing P2sVpnGateways. + */ +public interface P2sVpnGateways extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable generateVpnProfileAsync(String resourceGroupName, String gatewayName); + + /** + * Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getP2sVpnConnectionHealthAsync(String resourceGroupName, String gatewayName); + + /** + * Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param request Request parameters supplied to get p2s vpn connections detailed health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getP2sVpnConnectionHealthDetailedAsync(String resourceGroupName, String gatewayName, P2SVpnConnectionHealthRequest request); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureFilter.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureFilter.java new file mode 100644 index 000000000000..0697a58f13b8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureFilter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Filter that is applied to packet capture request. Multiple filters can be + * applied. + */ +public class PacketCaptureFilter { + /** + * Protocol to be filtered on. Possible values include: 'TCP', 'UDP', + * 'Any'. + */ + @JsonProperty(value = "protocol") + private PcProtocol protocol; + + /** + * Local IP Address to be filtered on. Notation: "127.0.0.1" for single + * address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? + * for multiple entries. Multiple ranges not currently supported. Mixing + * ranges with multiple entries not currently supported. Default = null. + */ + @JsonProperty(value = "localIPAddress") + private String localIPAddress; + + /** + * Local IP Address to be filtered on. Notation: "127.0.0.1" for single + * address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" + * for multiple entries. Multiple ranges not currently supported. Mixing + * ranges with multiple entries not currently supported. Default = null. + */ + @JsonProperty(value = "remoteIPAddress") + private String remoteIPAddress; + + /** + * Local port to be filtered on. Notation: "80" for single port + * entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges + * not currently supported. Mixing ranges with multiple entries not + * currently supported. Default = null. + */ + @JsonProperty(value = "localPort") + private String localPort; + + /** + * Remote port to be filtered on. Notation: "80" for single port + * entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges + * not currently supported. Mixing ranges with multiple entries not + * currently supported. Default = null. + */ + @JsonProperty(value = "remotePort") + private String remotePort; + + /** + * Get protocol to be filtered on. Possible values include: 'TCP', 'UDP', 'Any'. + * + * @return the protocol value + */ + public PcProtocol protocol() { + return this.protocol; + } + + /** + * Set protocol to be filtered on. Possible values include: 'TCP', 'UDP', 'Any'. + * + * @param protocol the protocol value to set + * @return the PacketCaptureFilter object itself. + */ + public PacketCaptureFilter withProtocol(PcProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + * + * @return the localIPAddress value + */ + public String localIPAddress() { + return this.localIPAddress; + } + + /** + * Set local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + * + * @param localIPAddress the localIPAddress value to set + * @return the PacketCaptureFilter object itself. + */ + public PacketCaptureFilter withLocalIPAddress(String localIPAddress) { + this.localIPAddress = localIPAddress; + return this; + } + + /** + * Get local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + * + * @return the remoteIPAddress value + */ + public String remoteIPAddress() { + return this.remoteIPAddress; + } + + /** + * Set local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + * + * @param remoteIPAddress the remoteIPAddress value to set + * @return the PacketCaptureFilter object itself. + */ + public PacketCaptureFilter withRemoteIPAddress(String remoteIPAddress) { + this.remoteIPAddress = remoteIPAddress; + return this; + } + + /** + * Get local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + * + * @return the localPort value + */ + public String localPort() { + return this.localPort; + } + + /** + * Set local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + * + * @param localPort the localPort value to set + * @return the PacketCaptureFilter object itself. + */ + public PacketCaptureFilter withLocalPort(String localPort) { + this.localPort = localPort; + return this; + } + + /** + * Get remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + * + * @return the remotePort value + */ + public String remotePort() { + return this.remotePort; + } + + /** + * Set remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + * + * @param remotePort the remotePort value to set + * @return the PacketCaptureFilter object itself. + */ + public PacketCaptureFilter withRemotePort(String remotePort) { + this.remotePort = remotePort; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureParameters.java new file mode 100644 index 000000000000..49e3f39f092b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureParameters.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the create packet capture operation. + */ +public class PacketCaptureParameters { + /** + * The ID of the targeted resource, only VM is currently supported. + */ + @JsonProperty(value = "target", required = true) + private String target; + + /** + * Number of bytes captured per packet, the remaining bytes are truncated. + */ + @JsonProperty(value = "bytesToCapturePerPacket") + private Integer bytesToCapturePerPacket; + + /** + * Maximum size of the capture output. + */ + @JsonProperty(value = "totalBytesPerSession") + private Integer totalBytesPerSession; + + /** + * Maximum duration of the capture session in seconds. + */ + @JsonProperty(value = "timeLimitInSeconds") + private Integer timeLimitInSeconds; + + /** + * Describes the storage location for a packet capture session. + */ + @JsonProperty(value = "storageLocation", required = true) + private PacketCaptureStorageLocation storageLocation; + + /** + * A list of packet capture filters. + */ + @JsonProperty(value = "filters") + private List filters; + + /** + * Get the ID of the targeted resource, only VM is currently supported. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set the ID of the targeted resource, only VM is currently supported. + * + * @param target the target value to set + * @return the PacketCaptureParameters object itself. + */ + public PacketCaptureParameters withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get number of bytes captured per packet, the remaining bytes are truncated. + * + * @return the bytesToCapturePerPacket value + */ + public Integer bytesToCapturePerPacket() { + return this.bytesToCapturePerPacket; + } + + /** + * Set number of bytes captured per packet, the remaining bytes are truncated. + * + * @param bytesToCapturePerPacket the bytesToCapturePerPacket value to set + * @return the PacketCaptureParameters object itself. + */ + public PacketCaptureParameters withBytesToCapturePerPacket(Integer bytesToCapturePerPacket) { + this.bytesToCapturePerPacket = bytesToCapturePerPacket; + return this; + } + + /** + * Get maximum size of the capture output. + * + * @return the totalBytesPerSession value + */ + public Integer totalBytesPerSession() { + return this.totalBytesPerSession; + } + + /** + * Set maximum size of the capture output. + * + * @param totalBytesPerSession the totalBytesPerSession value to set + * @return the PacketCaptureParameters object itself. + */ + public PacketCaptureParameters withTotalBytesPerSession(Integer totalBytesPerSession) { + this.totalBytesPerSession = totalBytesPerSession; + return this; + } + + /** + * Get maximum duration of the capture session in seconds. + * + * @return the timeLimitInSeconds value + */ + public Integer timeLimitInSeconds() { + return this.timeLimitInSeconds; + } + + /** + * Set maximum duration of the capture session in seconds. + * + * @param timeLimitInSeconds the timeLimitInSeconds value to set + * @return the PacketCaptureParameters object itself. + */ + public PacketCaptureParameters withTimeLimitInSeconds(Integer timeLimitInSeconds) { + this.timeLimitInSeconds = timeLimitInSeconds; + return this; + } + + /** + * Get describes the storage location for a packet capture session. + * + * @return the storageLocation value + */ + public PacketCaptureStorageLocation storageLocation() { + return this.storageLocation; + } + + /** + * Set describes the storage location for a packet capture session. + * + * @param storageLocation the storageLocation value to set + * @return the PacketCaptureParameters object itself. + */ + public PacketCaptureParameters withStorageLocation(PacketCaptureStorageLocation storageLocation) { + this.storageLocation = storageLocation; + return this; + } + + /** + * Get a list of packet capture filters. + * + * @return the filters value + */ + public List filters() { + return this.filters; + } + + /** + * Set a list of packet capture filters. + * + * @param filters the filters value to set + * @return the PacketCaptureParameters object itself. + */ + public PacketCaptureParameters withFilters(List filters) { + this.filters = filters; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureQueryStatusResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureQueryStatusResult.java new file mode 100644 index 000000000000..db367b95ee05 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureQueryStatusResult.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.PacketCaptureQueryStatusResultInner; +import org.joda.time.DateTime; +import java.util.List; + +/** + * Type representing PacketCaptureQueryStatusResult. + */ +public interface PacketCaptureQueryStatusResult extends HasInner, HasManager { + /** + * @return the captureStartTime value. + */ + DateTime captureStartTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the packetCaptureError value. + */ + List packetCaptureError(); + + /** + * @return the packetCaptureStatus value. + */ + PcStatus packetCaptureStatus(); + + /** + * @return the stopReason value. + */ + String stopReason(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureResult.java new file mode 100644 index 000000000000..0d36fb509bb5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureResult.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.PacketCaptureResultInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; + +/** + * Type representing PacketCaptureResult. + */ +public interface PacketCaptureResult extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the bytesToCapturePerPacket value. + */ + Integer bytesToCapturePerPacket(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the filters value. + */ + List filters(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the storageLocation value. + */ + PacketCaptureStorageLocation storageLocation(); + + /** + * @return the target value. + */ + String target(); + + /** + * @return the timeLimitInSeconds value. + */ + Integer timeLimitInSeconds(); + + /** + * @return the totalBytesPerSession value. + */ + Integer totalBytesPerSession(); + + /** + * The entirety of the PacketCaptureResult definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNetworkWatcher, DefinitionStages.WithStorageLocation, DefinitionStages.WithTarget, DefinitionStages.WithCreate { + } + + /** + * Grouping of PacketCaptureResult definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PacketCaptureResult definition. + */ + interface Blank extends WithNetworkWatcher { + } + + /** + * The stage of the packetcaptureresult definition allowing to specify NetworkWatcher. + */ + interface WithNetworkWatcher { + /** + * Specifies resourceGroupName, networkWatcherName. + * @param resourceGroupName The name of the resource group + * @param networkWatcherName The name of the network watcher + * @return the next definition stage + */ + WithStorageLocation withExistingNetworkWatcher(String resourceGroupName, String networkWatcherName); + } + + /** + * The stage of the packetcaptureresult definition allowing to specify StorageLocation. + */ + interface WithStorageLocation { + /** + * Specifies storageLocation. + * @param storageLocation Describes the storage location for a packet capture session + * @return the next definition stage + */ + WithTarget withStorageLocation(PacketCaptureStorageLocation storageLocation); + } + + /** + * The stage of the packetcaptureresult definition allowing to specify Target. + */ + interface WithTarget { + /** + * Specifies target. + * @param target The ID of the targeted resource, only VM is currently supported + * @return the next definition stage + */ + WithCreate withTarget(String target); + } + + /** + * The stage of the packetcaptureresult definition allowing to specify BytesToCapturePerPacket. + */ + interface WithBytesToCapturePerPacket { + /** + * Specifies bytesToCapturePerPacket. + * @param bytesToCapturePerPacket Number of bytes captured per packet, the remaining bytes are truncated + * @return the next definition stage + */ + WithCreate withBytesToCapturePerPacket(Integer bytesToCapturePerPacket); + } + + /** + * The stage of the packetcaptureresult definition allowing to specify Filters. + */ + interface WithFilters { + /** + * Specifies filters. + * @param filters A list of packet capture filters + * @return the next definition stage + */ + WithCreate withFilters(List filters); + } + + /** + * The stage of the packetcaptureresult definition allowing to specify TimeLimitInSeconds. + */ + interface WithTimeLimitInSeconds { + /** + * Specifies timeLimitInSeconds. + * @param timeLimitInSeconds Maximum duration of the capture session in seconds + * @return the next definition stage + */ + WithCreate withTimeLimitInSeconds(Integer timeLimitInSeconds); + } + + /** + * The stage of the packetcaptureresult definition allowing to specify TotalBytesPerSession. + */ + interface WithTotalBytesPerSession { + /** + * Specifies totalBytesPerSession. + * @param totalBytesPerSession Maximum size of the capture output + * @return the next definition stage + */ + WithCreate withTotalBytesPerSession(Integer totalBytesPerSession); + } + + /** + * 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.WithBytesToCapturePerPacket, DefinitionStages.WithFilters, DefinitionStages.WithTimeLimitInSeconds, DefinitionStages.WithTotalBytesPerSession { + } + } + /** + * The template for a PacketCaptureResult update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithBytesToCapturePerPacket, UpdateStages.WithFilters, UpdateStages.WithTimeLimitInSeconds, UpdateStages.WithTotalBytesPerSession { + } + + /** + * Grouping of PacketCaptureResult update stages. + */ + interface UpdateStages { + /** + * The stage of the packetcaptureresult update allowing to specify BytesToCapturePerPacket. + */ + interface WithBytesToCapturePerPacket { + /** + * Specifies bytesToCapturePerPacket. + * @param bytesToCapturePerPacket Number of bytes captured per packet, the remaining bytes are truncated + * @return the next update stage + */ + Update withBytesToCapturePerPacket(Integer bytesToCapturePerPacket); + } + + /** + * The stage of the packetcaptureresult update allowing to specify Filters. + */ + interface WithFilters { + /** + * Specifies filters. + * @param filters A list of packet capture filters + * @return the next update stage + */ + Update withFilters(List filters); + } + + /** + * The stage of the packetcaptureresult update allowing to specify TimeLimitInSeconds. + */ + interface WithTimeLimitInSeconds { + /** + * Specifies timeLimitInSeconds. + * @param timeLimitInSeconds Maximum duration of the capture session in seconds + * @return the next update stage + */ + Update withTimeLimitInSeconds(Integer timeLimitInSeconds); + } + + /** + * The stage of the packetcaptureresult update allowing to specify TotalBytesPerSession. + */ + interface WithTotalBytesPerSession { + /** + * Specifies totalBytesPerSession. + * @param totalBytesPerSession Maximum size of the capture output + * @return the next update stage + */ + Update withTotalBytesPerSession(Integer totalBytesPerSession); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureStorageLocation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureStorageLocation.java new file mode 100644 index 000000000000..ebc8c77fbd70 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptureStorageLocation.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the storage location for a packet capture session. + */ +public class PacketCaptureStorageLocation { + /** + * The ID of the storage account to save the packet capture session. + * Required if no local file path is provided. + */ + @JsonProperty(value = "storageId") + private String storageId; + + /** + * The URI of the storage path to save the packet capture. Must be a + * well-formed URI describing the location to save the packet capture. + */ + @JsonProperty(value = "storagePath") + private String storagePath; + + /** + * A valid local path on the targeting VM. Must include the name of the + * capture file (*.cap). For linux virtual machine it must start with + * /var/captures. Required if no storage ID is provided, otherwise + * optional. + */ + @JsonProperty(value = "filePath") + private String filePath; + + /** + * Get the ID of the storage account to save the packet capture session. Required if no local file path is provided. + * + * @return the storageId value + */ + public String storageId() { + return this.storageId; + } + + /** + * Set the ID of the storage account to save the packet capture session. Required if no local file path is provided. + * + * @param storageId the storageId value to set + * @return the PacketCaptureStorageLocation object itself. + */ + public PacketCaptureStorageLocation withStorageId(String storageId) { + this.storageId = storageId; + return this; + } + + /** + * Get the URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. + * + * @return the storagePath value + */ + public String storagePath() { + return this.storagePath; + } + + /** + * Set the URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. + * + * @param storagePath the storagePath value to set + * @return the PacketCaptureStorageLocation object itself. + */ + public PacketCaptureStorageLocation withStoragePath(String storagePath) { + this.storagePath = storagePath; + return this; + } + + /** + * Get a valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. + * + * @return the filePath value + */ + public String filePath() { + return this.filePath; + } + + /** + * Set a valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. + * + * @param filePath the filePath value to set + * @return the PacketCaptureStorageLocation object itself. + */ + public PacketCaptureStorageLocation withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptures.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptures.java new file mode 100644 index 000000000000..c9eb7f7d8302 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PacketCaptures.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.PacketCapturesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PacketCaptures. + */ +public interface PacketCaptures extends SupportsCreating, HasInner { + /** + * Stops a specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable stopAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName); + + /** + * Query the status of a running packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @param packetCaptureName The name given to the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getStatusAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName); + + /** + * Gets a packet capture session by name. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName); + + /** + * Lists all packet capture sessions within the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String networkWatcherName); + + /** + * Deletes the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PatchRouteFilter.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PatchRouteFilter.java new file mode 100644 index 000000000000..561a44032a54 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PatchRouteFilter.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.RouteFilterRuleInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitPeeringInner; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Route Filter Resource. + */ +@JsonFlatten +public class PatchRouteFilter extends SubResource { + /** + * Collection of RouteFilterRules contained within a route filter. + */ + @JsonProperty(value = "properties.rules") + private List rules; + + /** + * A collection of references to express route circuit peerings. + */ + @JsonProperty(value = "properties.peerings", access = JsonProperty.Access.WRITE_ONLY) + private List peerings; + + /** + * A collection of references to express route circuit ipv6 peerings. + */ + @JsonProperty(value = "properties.ipv6Peerings", access = JsonProperty.Access.WRITE_ONLY) + private List ipv6Peerings; + + /** + * The provisioning state of the route filter resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get collection of RouteFilterRules contained within a route filter. + * + * @return the rules value + */ + public List rules() { + return this.rules; + } + + /** + * Set collection of RouteFilterRules contained within a route filter. + * + * @param rules the rules value to set + * @return the PatchRouteFilter object itself. + */ + public PatchRouteFilter withRules(List rules) { + this.rules = rules; + return this; + } + + /** + * Get a collection of references to express route circuit peerings. + * + * @return the peerings value + */ + public List peerings() { + return this.peerings; + } + + /** + * Get a collection of references to express route circuit ipv6 peerings. + * + * @return the ipv6Peerings value + */ + public List ipv6Peerings() { + return this.ipv6Peerings; + } + + /** + * Get the provisioning state of the route filter resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * 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 PatchRouteFilter object itself. + */ + public PatchRouteFilter withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PatchRouteFilterRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PatchRouteFilterRule.java new file mode 100644 index 000000000000..0cc4a998b906 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PatchRouteFilterRule.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Route Filter Rule Resource. + */ +@JsonFlatten +public class PatchRouteFilterRule extends SubResource { + /** + * The access type of the rule. Possible values include: 'Allow', 'Deny'. + */ + @JsonProperty(value = "properties.access", required = true) + private Access access; + + /** + * The rule type of the rule. + */ + @JsonProperty(value = "properties.routeFilterRuleType", required = true) + private String routeFilterRuleType; + + /** + * The collection for bgp community values to filter on. e.g. + * ['12076:5010','12076:5020']. + */ + @JsonProperty(value = "properties.communities", required = true) + private List communities; + + /** + * The provisioning state of the route filter rule resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Creates an instance of PatchRouteFilterRule class. + * @param access the access type of the rule. Possible values include: 'Allow', 'Deny'. + * @param communities the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. + */ + public PatchRouteFilterRule() { + routeFilterRuleType = "Community"; + } + + /** + * Get the access type of the rule. Possible values include: 'Allow', 'Deny'. + * + * @return the access value + */ + public Access access() { + return this.access; + } + + /** + * Set the access type of the rule. Possible values include: 'Allow', 'Deny'. + * + * @param access the access value to set + * @return the PatchRouteFilterRule object itself. + */ + public PatchRouteFilterRule withAccess(Access access) { + this.access = access; + return this; + } + + /** + * Get the rule type of the rule. + * + * @return the routeFilterRuleType value + */ + public String routeFilterRuleType() { + return this.routeFilterRuleType; + } + + /** + * Set the rule type of the rule. + * + * @param routeFilterRuleType the routeFilterRuleType value to set + * @return the PatchRouteFilterRule object itself. + */ + public PatchRouteFilterRule withRouteFilterRuleType(String routeFilterRuleType) { + this.routeFilterRuleType = routeFilterRuleType; + return this; + } + + /** + * Get the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. + * + * @return the communities value + */ + public List communities() { + return this.communities; + } + + /** + * Set the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. + * + * @param communities the communities value to set + * @return the PatchRouteFilterRule object itself. + */ + public PatchRouteFilterRule withCommunities(List communities) { + this.communities = communities; + return this; + } + + /** + * Get the provisioning state of the route filter rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PcError.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PcError.java new file mode 100644 index 000000000000..8925c6dfe07c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PcError.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PcError. + */ +public final class PcError extends ExpandableStringEnum { + /** Static value InternalError for PcError. */ + public static final PcError INTERNAL_ERROR = fromString("InternalError"); + + /** Static value AgentStopped for PcError. */ + public static final PcError AGENT_STOPPED = fromString("AgentStopped"); + + /** Static value CaptureFailed for PcError. */ + public static final PcError CAPTURE_FAILED = fromString("CaptureFailed"); + + /** Static value LocalFileFailed for PcError. */ + public static final PcError LOCAL_FILE_FAILED = fromString("LocalFileFailed"); + + /** Static value StorageFailed for PcError. */ + public static final PcError STORAGE_FAILED = fromString("StorageFailed"); + + /** + * Creates or finds a PcError from its string representation. + * @param name a name to look for + * @return the corresponding PcError + */ + @JsonCreator + public static PcError fromString(String name) { + return fromString(name, PcError.class); + } + + /** + * @return known PcError values + */ + public static Collection values() { + return values(PcError.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PcProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PcProtocol.java new file mode 100644 index 000000000000..e92d662aa232 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PcProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PcProtocol. + */ +public final class PcProtocol extends ExpandableStringEnum { + /** Static value TCP for PcProtocol. */ + public static final PcProtocol TCP = fromString("TCP"); + + /** Static value UDP for PcProtocol. */ + public static final PcProtocol UDP = fromString("UDP"); + + /** Static value Any for PcProtocol. */ + public static final PcProtocol ANY = fromString("Any"); + + /** + * Creates or finds a PcProtocol from its string representation. + * @param name a name to look for + * @return the corresponding PcProtocol + */ + @JsonCreator + public static PcProtocol fromString(String name) { + return fromString(name, PcProtocol.class); + } + + /** + * @return known PcProtocol values + */ + public static Collection values() { + return values(PcProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PcStatus.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PcStatus.java new file mode 100644 index 000000000000..2065acf5f58d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PcStatus.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PcStatus. + */ +public final class PcStatus extends ExpandableStringEnum { + /** Static value NotStarted for PcStatus. */ + public static final PcStatus NOT_STARTED = fromString("NotStarted"); + + /** Static value Running for PcStatus. */ + public static final PcStatus RUNNING = fromString("Running"); + + /** Static value Stopped for PcStatus. */ + public static final PcStatus STOPPED = fromString("Stopped"); + + /** Static value Error for PcStatus. */ + public static final PcStatus ERROR = fromString("Error"); + + /** Static value Unknown for PcStatus. */ + public static final PcStatus UNKNOWN = fromString("Unknown"); + + /** + * Creates or finds a PcStatus from its string representation. + * @param name a name to look for + * @return the corresponding PcStatus + */ + @JsonCreator + public static PcStatus fromString(String name) { + return fromString(name, PcStatus.class); + } + + /** + * @return known PcStatus values + */ + public static Collection values() { + return values(PcStatus.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PeerExpressRouteCircuitConnection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PeerExpressRouteCircuitConnection.java new file mode 100644 index 000000000000..4158c865e0c1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PeerExpressRouteCircuitConnection.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.PeerExpressRouteCircuitConnectionInner; +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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; + +/** + * Type representing PeerExpressRouteCircuitConnection. + */ +public interface PeerExpressRouteCircuitConnection extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the addressPrefix value. + */ + String addressPrefix(); + + /** + * @return the authResourceGuid value. + */ + String authResourceGuid(); + + /** + * @return the circuitConnectionStatus value. + */ + CircuitConnectionStatus circuitConnectionStatus(); + + /** + * @return the connectionName value. + */ + String connectionName(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the expressRouteCircuitPeering value. + */ + SubResource expressRouteCircuitPeering(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the peerExpressRouteCircuitPeering value. + */ + SubResource peerExpressRouteCircuitPeering(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PeerExpressRouteCircuitConnections.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PeerExpressRouteCircuitConnections.java new file mode 100644 index 000000000000..9e50f0e43e0d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PeerExpressRouteCircuitConnections.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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.PeerExpressRouteCircuitConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PeerExpressRouteCircuitConnections. + */ +public interface PeerExpressRouteCircuitConnections extends HasInner { + /** + * Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the peer express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName); + + /** + * Gets all global reach peer connections associated with a private peering in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String circuitName, final String peeringName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PfsGroup.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PfsGroup.java new file mode 100644 index 000000000000..9f9fcbc5f65a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PfsGroup.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PfsGroup. + */ +public final class PfsGroup extends ExpandableStringEnum { + /** Static value None for PfsGroup. */ + public static final PfsGroup NONE = fromString("None"); + + /** Static value PFS1 for PfsGroup. */ + public static final PfsGroup PFS1 = fromString("PFS1"); + + /** Static value PFS2 for PfsGroup. */ + public static final PfsGroup PFS2 = fromString("PFS2"); + + /** Static value PFS2048 for PfsGroup. */ + public static final PfsGroup PFS2048 = fromString("PFS2048"); + + /** Static value ECP256 for PfsGroup. */ + public static final PfsGroup ECP256 = fromString("ECP256"); + + /** Static value ECP384 for PfsGroup. */ + public static final PfsGroup ECP384 = fromString("ECP384"); + + /** Static value PFS24 for PfsGroup. */ + public static final PfsGroup PFS24 = fromString("PFS24"); + + /** Static value PFS14 for PfsGroup. */ + public static final PfsGroup PFS14 = fromString("PFS14"); + + /** Static value PFSMM for PfsGroup. */ + public static final PfsGroup PFSMM = fromString("PFSMM"); + + /** + * Creates or finds a PfsGroup from its string representation. + * @param name a name to look for + * @return the corresponding PfsGroup + */ + @JsonCreator + public static PfsGroup fromString(String name) { + return fromString(name, PfsGroup.class); + } + + /** + * @return known PfsGroup values + */ + public static Collection values() { + return values(PfsGroup.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PolicySettings.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PolicySettings.java new file mode 100644 index 000000000000..00124af9470e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PolicySettings.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines contents of a web application firewall global configuration. + */ +public class PolicySettings { + /** + * Describes if the policy is in enabled state or disabled state. Possible + * values include: 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "state") + private WebApplicationFirewallEnabledState state; + + /** + * Describes if it is in detection mode or prevention mode at policy level. + * Possible values include: 'Prevention', 'Detection'. + */ + @JsonProperty(value = "mode") + private WebApplicationFirewallMode mode; + + /** + * Whether to allow WAF to check request Body. + */ + @JsonProperty(value = "requestBodyCheck") + private Boolean requestBodyCheck; + + /** + * Maximum request body size in Kb for WAF. + */ + @JsonProperty(value = "maxRequestBodySizeInKb") + private Integer maxRequestBodySizeInKb; + + /** + * Maximum file upload size in Mb for WAF. + */ + @JsonProperty(value = "fileUploadLimitInMb") + private Integer fileUploadLimitInMb; + + /** + * Get describes if the policy is in enabled state or disabled state. Possible values include: 'Disabled', 'Enabled'. + * + * @return the state value + */ + public WebApplicationFirewallEnabledState state() { + return this.state; + } + + /** + * Set describes if the policy is in enabled state or disabled state. Possible values include: 'Disabled', 'Enabled'. + * + * @param state the state value to set + * @return the PolicySettings object itself. + */ + public PolicySettings withState(WebApplicationFirewallEnabledState state) { + this.state = state; + return this; + } + + /** + * Get describes if it is in detection mode or prevention mode at policy level. Possible values include: 'Prevention', 'Detection'. + * + * @return the mode value + */ + public WebApplicationFirewallMode mode() { + return this.mode; + } + + /** + * Set describes if it is in detection mode or prevention mode at policy level. Possible values include: 'Prevention', 'Detection'. + * + * @param mode the mode value to set + * @return the PolicySettings object itself. + */ + public PolicySettings withMode(WebApplicationFirewallMode mode) { + this.mode = mode; + return this; + } + + /** + * Get whether to allow WAF to check request Body. + * + * @return the requestBodyCheck value + */ + public Boolean requestBodyCheck() { + return this.requestBodyCheck; + } + + /** + * Set whether to allow WAF to check request Body. + * + * @param requestBodyCheck the requestBodyCheck value to set + * @return the PolicySettings object itself. + */ + public PolicySettings withRequestBodyCheck(Boolean requestBodyCheck) { + this.requestBodyCheck = requestBodyCheck; + return this; + } + + /** + * Get maximum request body size in Kb for WAF. + * + * @return the maxRequestBodySizeInKb value + */ + public Integer maxRequestBodySizeInKb() { + return this.maxRequestBodySizeInKb; + } + + /** + * Set maximum request body size in Kb for WAF. + * + * @param maxRequestBodySizeInKb the maxRequestBodySizeInKb value to set + * @return the PolicySettings object itself. + */ + public PolicySettings withMaxRequestBodySizeInKb(Integer maxRequestBodySizeInKb) { + this.maxRequestBodySizeInKb = maxRequestBodySizeInKb; + return this; + } + + /** + * Get maximum file upload size in Mb for WAF. + * + * @return the fileUploadLimitInMb value + */ + public Integer fileUploadLimitInMb() { + return this.fileUploadLimitInMb; + } + + /** + * Set maximum file upload size in Mb for WAF. + * + * @param fileUploadLimitInMb the fileUploadLimitInMb value to set + * @return the PolicySettings object itself. + */ + public PolicySettings withFileUploadLimitInMb(Integer fileUploadLimitInMb) { + this.fileUploadLimitInMb = fileUploadLimitInMb; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrepareNetworkPoliciesRequest.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrepareNetworkPoliciesRequest.java new file mode 100644 index 000000000000..2518dd706d23 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrepareNetworkPoliciesRequest.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of PrepareNetworkPolicies for Subnet. + */ +public class PrepareNetworkPoliciesRequest { + /** + * The name of the service for which subnet is being prepared for. + */ + @JsonProperty(value = "serviceName") + private String serviceName; + + /** + * A list of NetworkIntentPolicyConfiguration. + */ + @JsonProperty(value = "networkIntentPolicyConfigurations") + private List networkIntentPolicyConfigurations; + + /** + * Get the name of the service for which subnet is being prepared for. + * + * @return the serviceName value + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set the name of the service for which subnet is being prepared for. + * + * @param serviceName the serviceName value to set + * @return the PrepareNetworkPoliciesRequest object itself. + */ + public PrepareNetworkPoliciesRequest withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get a list of NetworkIntentPolicyConfiguration. + * + * @return the networkIntentPolicyConfigurations value + */ + public List networkIntentPolicyConfigurations() { + return this.networkIntentPolicyConfigurations; + } + + /** + * Set a list of NetworkIntentPolicyConfiguration. + * + * @param networkIntentPolicyConfigurations the networkIntentPolicyConfigurations value to set + * @return the PrepareNetworkPoliciesRequest object itself. + */ + public PrepareNetworkPoliciesRequest withNetworkIntentPolicyConfigurations(List networkIntentPolicyConfigurations) { + this.networkIntentPolicyConfigurations = networkIntentPolicyConfigurations; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateEndpoint.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateEndpoint.java new file mode 100644 index 000000000000..e96e4d86db63 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateEndpoint.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.SubnetInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.PrivateEndpointInner; + +/** + * Type representing PrivateEndpoint. + */ +public interface PrivateEndpoint extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the manualPrivateLinkServiceConnections value. + */ + List manualPrivateLinkServiceConnections(); + + /** + * @return the networkInterfaces value. + */ + List networkInterfaces(); + + /** + * @return the privateLinkServiceConnections value. + */ + List privateLinkServiceConnections(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the subnet value. + */ + Subnet subnet(); + + /** + * The entirety of the PrivateEndpoint definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of PrivateEndpoint definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PrivateEndpoint definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the PrivateEndpoint definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the privateendpoint definition allowing to specify ManualPrivateLinkServiceConnections. + */ + interface WithManualPrivateLinkServiceConnections { + /** + * Specifies manualPrivateLinkServiceConnections. + * @param manualPrivateLinkServiceConnections A grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource + * @return the next definition stage + */ + WithCreate withManualPrivateLinkServiceConnections(List manualPrivateLinkServiceConnections); + } + + /** + * The stage of the privateendpoint definition allowing to specify PrivateLinkServiceConnections. + */ + interface WithPrivateLinkServiceConnections { + /** + * Specifies privateLinkServiceConnections. + * @param privateLinkServiceConnections A grouping of information about the connection to the remote resource + * @return the next definition stage + */ + WithCreate withPrivateLinkServiceConnections(List privateLinkServiceConnections); + } + + /** + * The stage of the privateendpoint definition allowing to specify Subnet. + */ + interface WithSubnet { + /** + * Specifies subnet. + * @param subnet The ID of the subnet from which the private IP will be allocated + * @return the next definition stage + */ + WithCreate withSubnet(SubnetInner subnet); + } + + /** + * 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.WithManualPrivateLinkServiceConnections, DefinitionStages.WithPrivateLinkServiceConnections, DefinitionStages.WithSubnet { + } + } + /** + * The template for a PrivateEndpoint update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithManualPrivateLinkServiceConnections, UpdateStages.WithPrivateLinkServiceConnections, UpdateStages.WithSubnet { + } + + /** + * Grouping of PrivateEndpoint update stages. + */ + interface UpdateStages { + /** + * The stage of the privateendpoint update allowing to specify ManualPrivateLinkServiceConnections. + */ + interface WithManualPrivateLinkServiceConnections { + /** + * Specifies manualPrivateLinkServiceConnections. + * @param manualPrivateLinkServiceConnections A grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource + * @return the next update stage + */ + Update withManualPrivateLinkServiceConnections(List manualPrivateLinkServiceConnections); + } + + /** + * The stage of the privateendpoint update allowing to specify PrivateLinkServiceConnections. + */ + interface WithPrivateLinkServiceConnections { + /** + * Specifies privateLinkServiceConnections. + * @param privateLinkServiceConnections A grouping of information about the connection to the remote resource + * @return the next update stage + */ + Update withPrivateLinkServiceConnections(List privateLinkServiceConnections); + } + + /** + * The stage of the privateendpoint update allowing to specify Subnet. + */ + interface WithSubnet { + /** + * Specifies subnet. + * @param subnet The ID of the subnet from which the private IP will be allocated + * @return the next update stage + */ + Update withSubnet(SubnetInner subnet); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateEndpointConnection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateEndpointConnection.java new file mode 100644 index 000000000000..942ec61496b1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateEndpointConnection.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.PrivateEndpointConnectionInner; +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.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing PrivateEndpointConnection. + */ +public interface PrivateEndpointConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the linkIdentifier value. + */ + String linkIdentifier(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * @return the privateLinkServiceConnectionState value. + */ + PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * The template for a PrivateEndpointConnection update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithPrivateLinkServiceConnectionState { + } + + /** + * Grouping of PrivateEndpointConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the privateendpointconnection update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the privateendpointconnection update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the privateendpointconnection update allowing to specify PrivateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies privateLinkServiceConnectionState. + * @param privateLinkServiceConnectionState A collection of information about the state of the connection between service consumer and provider + * @return the next update stage + */ + Update withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateEndpoints.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateEndpoints.java new file mode 100644 index 000000000000..40e0cfc6373b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateEndpoints.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.network.v2019_09_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.network.v2019_09_01.implementation.PrivateEndpointsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PrivateEndpoints. + */ +public interface PrivateEndpoints extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkService.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkService.java new file mode 100644 index 000000000000..8c8a867491b7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkService.java @@ -0,0 +1,269 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.FrontendIPConfigurationInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.PrivateLinkServiceInner; + +/** + * Type representing PrivateLinkService. + */ +public interface PrivateLinkService extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the alias value. + */ + String alias(); + + /** + * @return the autoApproval value. + */ + PrivateLinkServicePropertiesAutoApproval autoApproval(); + + /** + * @return the enableProxyProtocol value. + */ + Boolean enableProxyProtocol(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the fqdns value. + */ + List fqdns(); + + /** + * @return the ipConfigurations value. + */ + List ipConfigurations(); + + /** + * @return the loadBalancerFrontendIpConfigurations value. + */ + List loadBalancerFrontendIpConfigurations(); + + /** + * @return the networkInterfaces value. + */ + List networkInterfaces(); + + /** + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the visibility value. + */ + PrivateLinkServicePropertiesVisibility visibility(); + + /** + * The entirety of the PrivateLinkService definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of PrivateLinkService definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PrivateLinkService definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the PrivateLinkService definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the privatelinkservice definition allowing to specify AutoApproval. + */ + interface WithAutoApproval { + /** + * Specifies autoApproval. + * @param autoApproval The auto-approval list of the private link service + * @return the next definition stage + */ + WithCreate withAutoApproval(PrivateLinkServicePropertiesAutoApproval autoApproval); + } + + /** + * The stage of the privatelinkservice definition allowing to specify EnableProxyProtocol. + */ + interface WithEnableProxyProtocol { + /** + * Specifies enableProxyProtocol. + * @param enableProxyProtocol Whether the private link service is enabled for proxy protocol or not + * @return the next definition stage + */ + WithCreate withEnableProxyProtocol(Boolean enableProxyProtocol); + } + + /** + * The stage of the privatelinkservice definition allowing to specify Fqdns. + */ + interface WithFqdns { + /** + * Specifies fqdns. + * @param fqdns The list of Fqdn + * @return the next definition stage + */ + WithCreate withFqdns(List fqdns); + } + + /** + * The stage of the privatelinkservice definition allowing to specify IpConfigurations. + */ + interface WithIpConfigurations { + /** + * Specifies ipConfigurations. + * @param ipConfigurations An array of private link service IP configurations + * @return the next definition stage + */ + WithCreate withIpConfigurations(List ipConfigurations); + } + + /** + * The stage of the privatelinkservice definition allowing to specify LoadBalancerFrontendIpConfigurations. + */ + interface WithLoadBalancerFrontendIpConfigurations { + /** + * Specifies loadBalancerFrontendIpConfigurations. + * @param loadBalancerFrontendIpConfigurations An array of references to the load balancer IP configurations + * @return the next definition stage + */ + WithCreate withLoadBalancerFrontendIpConfigurations(List loadBalancerFrontendIpConfigurations); + } + + /** + * The stage of the privatelinkservice definition allowing to specify Visibility. + */ + interface WithVisibility { + /** + * Specifies visibility. + * @param visibility The visibility list of the private link service + * @return the next definition stage + */ + WithCreate withVisibility(PrivateLinkServicePropertiesVisibility visibility); + } + + /** + * 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.WithAutoApproval, DefinitionStages.WithEnableProxyProtocol, DefinitionStages.WithFqdns, DefinitionStages.WithIpConfigurations, DefinitionStages.WithLoadBalancerFrontendIpConfigurations, DefinitionStages.WithVisibility { + } + } + /** + * The template for a PrivateLinkService update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAutoApproval, UpdateStages.WithEnableProxyProtocol, UpdateStages.WithFqdns, UpdateStages.WithIpConfigurations, UpdateStages.WithLoadBalancerFrontendIpConfigurations, UpdateStages.WithVisibility { + } + + /** + * Grouping of PrivateLinkService update stages. + */ + interface UpdateStages { + /** + * The stage of the privatelinkservice update allowing to specify AutoApproval. + */ + interface WithAutoApproval { + /** + * Specifies autoApproval. + * @param autoApproval The auto-approval list of the private link service + * @return the next update stage + */ + Update withAutoApproval(PrivateLinkServicePropertiesAutoApproval autoApproval); + } + + /** + * The stage of the privatelinkservice update allowing to specify EnableProxyProtocol. + */ + interface WithEnableProxyProtocol { + /** + * Specifies enableProxyProtocol. + * @param enableProxyProtocol Whether the private link service is enabled for proxy protocol or not + * @return the next update stage + */ + Update withEnableProxyProtocol(Boolean enableProxyProtocol); + } + + /** + * The stage of the privatelinkservice update allowing to specify Fqdns. + */ + interface WithFqdns { + /** + * Specifies fqdns. + * @param fqdns The list of Fqdn + * @return the next update stage + */ + Update withFqdns(List fqdns); + } + + /** + * The stage of the privatelinkservice update allowing to specify IpConfigurations. + */ + interface WithIpConfigurations { + /** + * Specifies ipConfigurations. + * @param ipConfigurations An array of private link service IP configurations + * @return the next update stage + */ + Update withIpConfigurations(List ipConfigurations); + } + + /** + * The stage of the privatelinkservice update allowing to specify LoadBalancerFrontendIpConfigurations. + */ + interface WithLoadBalancerFrontendIpConfigurations { + /** + * Specifies loadBalancerFrontendIpConfigurations. + * @param loadBalancerFrontendIpConfigurations An array of references to the load balancer IP configurations + * @return the next update stage + */ + Update withLoadBalancerFrontendIpConfigurations(List loadBalancerFrontendIpConfigurations); + } + + /** + * The stage of the privatelinkservice update allowing to specify Visibility. + */ + interface WithVisibility { + /** + * Specifies visibility. + * @param visibility The visibility list of the private link service + * @return the next update stage + */ + Update withVisibility(PrivateLinkServicePropertiesVisibility visibility); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceConnection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceConnection.java new file mode 100644 index 000000000000..e1195a19dc67 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceConnection.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * PrivateLinkServiceConnection resource. + */ +@JsonFlatten +public class PrivateLinkServiceConnection extends SubResource { + /** + * The provisioning state of the private link service connection resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The resource id of private link service. + */ + @JsonProperty(value = "properties.privateLinkServiceId") + private String privateLinkServiceId; + + /** + * The ID(s) of the group(s) obtained from the remote resource that this + * private endpoint should connect to. + */ + @JsonProperty(value = "properties.groupIds") + private List groupIds; + + /** + * A message passed to the owner of the remote resource with this + * connection request. Restricted to 140 chars. + */ + @JsonProperty(value = "properties.requestMessage") + private String requestMessage; + + /** + * A collection of read-only information about the state of the connection + * to the remote resource. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the provisioning state of the private link service connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the resource id of private link service. + * + * @return the privateLinkServiceId value + */ + public String privateLinkServiceId() { + return this.privateLinkServiceId; + } + + /** + * Set the resource id of private link service. + * + * @param privateLinkServiceId the privateLinkServiceId value to set + * @return the PrivateLinkServiceConnection object itself. + */ + public PrivateLinkServiceConnection withPrivateLinkServiceId(String privateLinkServiceId) { + this.privateLinkServiceId = privateLinkServiceId; + return this; + } + + /** + * Get the ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to. + * + * @return the groupIds value + */ + public List groupIds() { + return this.groupIds; + } + + /** + * Set the ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to. + * + * @param groupIds the groupIds value to set + * @return the PrivateLinkServiceConnection object itself. + */ + public PrivateLinkServiceConnection withGroupIds(List groupIds) { + this.groupIds = groupIds; + return this; + } + + /** + * Get a message passed to the owner of the remote resource with this connection request. Restricted to 140 chars. + * + * @return the requestMessage value + */ + public String requestMessage() { + return this.requestMessage; + } + + /** + * Set a message passed to the owner of the remote resource with this connection request. Restricted to 140 chars. + * + * @param requestMessage the requestMessage value to set + * @return the PrivateLinkServiceConnection object itself. + */ + public PrivateLinkServiceConnection withRequestMessage(String requestMessage) { + this.requestMessage = requestMessage; + return this; + } + + /** + * Get a collection of read-only information about the state of the connection to the remote resource. + * + * @return the privateLinkServiceConnectionState value + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set a collection of read-only information about the state of the connection to the remote resource. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set + * @return the PrivateLinkServiceConnection object itself. + */ + public PrivateLinkServiceConnection withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the PrivateLinkServiceConnection object itself. + */ + public PrivateLinkServiceConnection withName(String name) { + this.name = name; + return this; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceConnectionState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceConnectionState.java new file mode 100644 index 000000000000..32a80d87d9be --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceConnectionState.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A collection of information about the state of the connection between + * service consumer and provider. + */ +public class PrivateLinkServiceConnectionState { + /** + * Indicates whether the connection has been Approved/Rejected/Removed by + * the owner of the service. + */ + @JsonProperty(value = "status") + private String status; + + /** + * The reason for approval/rejection of the connection. + */ + @JsonProperty(value = "description") + private String description; + + /** + * A message indicating if changes on the service provider require any + * updates on the consumer. + */ + @JsonProperty(value = "actionRequired") + private String actionRequired; + + /** + * Get indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + * + * @param status the status value to set + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the reason for approval/rejection of the connection. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the reason for approval/rejection of the connection. + * + * @param description the description value to set + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get a message indicating if changes on the service provider require any updates on the consumer. + * + * @return the actionRequired value + */ + public String actionRequired() { + return this.actionRequired; + } + + /** + * Set a message indicating if changes on the service provider require any updates on the consumer. + * + * @param actionRequired the actionRequired value to set + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withActionRequired(String actionRequired) { + this.actionRequired = actionRequired; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceIpConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceIpConfiguration.java new file mode 100644 index 000000000000..dfd48af0e6a9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceIpConfiguration.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.microsoft.azure.management.network.v2019_09_01.implementation.SubnetInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * The private link service ip configuration. + */ +@JsonFlatten +public class PrivateLinkServiceIpConfiguration extends SubResource { + /** + * The private IP address of the IP configuration. + */ + @JsonProperty(value = "properties.privateIPAddress") + private String privateIPAddress; + + /** + * The private IP address allocation method. Possible values include: + * 'Static', 'Dynamic'. + */ + @JsonProperty(value = "properties.privateIPAllocationMethod") + private IPAllocationMethod privateIPAllocationMethod; + + /** + * The reference to the subnet resource. + */ + @JsonProperty(value = "properties.subnet") + private SubnetInner subnet; + + /** + * Whether the ip configuration is primary or not. + */ + @JsonProperty(value = "properties.primary") + private Boolean primary; + + /** + * The provisioning state of the private link service IP configuration + * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', + * 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. + * Possible values include: 'IPv4', 'IPv6'. + */ + @JsonProperty(value = "properties.privateIPAddressVersion") + private IPVersion privateIPAddressVersion; + + /** + * The name of private link service ip configuration. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the private IP address of the IP configuration. + * + * @return the privateIPAddress value + */ + public String privateIPAddress() { + return this.privateIPAddress; + } + + /** + * Set the private IP address of the IP configuration. + * + * @param privateIPAddress the privateIPAddress value to set + * @return the PrivateLinkServiceIpConfiguration object itself. + */ + public PrivateLinkServiceIpConfiguration withPrivateIPAddress(String privateIPAddress) { + this.privateIPAddress = privateIPAddress; + return this; + } + + /** + * Get the private IP address allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @return the privateIPAllocationMethod value + */ + public IPAllocationMethod privateIPAllocationMethod() { + return this.privateIPAllocationMethod; + } + + /** + * Set the private IP address allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @param privateIPAllocationMethod the privateIPAllocationMethod value to set + * @return the PrivateLinkServiceIpConfiguration object itself. + */ + public PrivateLinkServiceIpConfiguration withPrivateIPAllocationMethod(IPAllocationMethod privateIPAllocationMethod) { + this.privateIPAllocationMethod = privateIPAllocationMethod; + return this; + } + + /** + * Get the reference to the subnet resource. + * + * @return the subnet value + */ + public SubnetInner subnet() { + return this.subnet; + } + + /** + * Set the reference to the subnet resource. + * + * @param subnet the subnet value to set + * @return the PrivateLinkServiceIpConfiguration object itself. + */ + public PrivateLinkServiceIpConfiguration withSubnet(SubnetInner subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get whether the ip configuration is primary or not. + * + * @return the primary value + */ + public Boolean primary() { + return this.primary; + } + + /** + * Set whether the ip configuration is primary or not. + * + * @param primary the primary value to set + * @return the PrivateLinkServiceIpConfiguration object itself. + */ + public PrivateLinkServiceIpConfiguration withPrimary(Boolean primary) { + this.primary = primary; + return this; + } + + /** + * Get the provisioning state of the private link service IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'. + * + * @return the privateIPAddressVersion value + */ + public IPVersion privateIPAddressVersion() { + return this.privateIPAddressVersion; + } + + /** + * Set whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'. + * + * @param privateIPAddressVersion the privateIPAddressVersion value to set + * @return the PrivateLinkServiceIpConfiguration object itself. + */ + public PrivateLinkServiceIpConfiguration withPrivateIPAddressVersion(IPVersion privateIPAddressVersion) { + this.privateIPAddressVersion = privateIPAddressVersion; + return this; + } + + /** + * Get the name of private link service ip configuration. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of private link service ip configuration. + * + * @param name the name value to set + * @return the PrivateLinkServiceIpConfiguration object itself. + */ + public PrivateLinkServiceIpConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServicePropertiesAutoApproval.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServicePropertiesAutoApproval.java new file mode 100644 index 000000000000..4998d165d0f5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServicePropertiesAutoApproval.java @@ -0,0 +1,16 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + + +/** + * The auto-approval list of the private link service. + */ +public class PrivateLinkServicePropertiesAutoApproval extends ResourceSet { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServicePropertiesVisibility.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServicePropertiesVisibility.java new file mode 100644 index 000000000000..1ef23decbf31 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServicePropertiesVisibility.java @@ -0,0 +1,16 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + + +/** + * The visibility list of the private link service. + */ +public class PrivateLinkServicePropertiesVisibility extends ResourceSet { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceVisibility.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceVisibility.java new file mode 100644 index 000000000000..956004fe9237 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServiceVisibility.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.PrivateLinkServiceVisibilityInner; + +/** + * Type representing PrivateLinkServiceVisibility. + */ +public interface PrivateLinkServiceVisibility extends HasInner, HasManager { + /** + * @return the visible value. + */ + Boolean visible(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServices.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServices.java new file mode 100644 index 000000000000..516b0500496b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PrivateLinkServices.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.PrivateLinkServicesInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.PrivateEndpointConnection; +import rx.Completable; +import com.microsoft.azure.management.network.v2019_09_01.AutoApprovedPrivateLinkService; + +/** + * Type representing PrivateLinkServices. + */ +public interface PrivateLinkServices extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Get the specific private end point connection by specific private link service in the resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getPrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName); + + /** + * Gets all private end point connections for a specific private link service. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listPrivateEndpointConnectionsAsync(final String resourceGroupName, final String serviceName); + + /** + * Delete private end point connection for a private link service in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deletePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName); + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkPrivateLinkServiceVisibilityAsync(String location); + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName); + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAutoApprovedPrivateLinkServicesAsync(final String location); + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAutoApprovedPrivateLinkServicesByResourceGroupAsync(final String location, final String resourceGroupName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Probe.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Probe.java new file mode 100644 index 000000000000..993f555872e7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Probe.java @@ -0,0 +1,79 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ProbeInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; + +/** + * Type representing Probe. + */ +public interface Probe extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the intervalInSeconds value. + */ + Integer intervalInSeconds(); + + /** + * @return the loadBalancingRules value. + */ + List loadBalancingRules(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the numberOfProbes value. + */ + Integer numberOfProbes(); + + /** + * @return the port value. + */ + int port(); + + /** + * @return the protocol value. + */ + ProbeProtocol protocol(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the requestPath value. + */ + String requestPath(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProbeProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProbeProtocol.java new file mode 100644 index 000000000000..fd2dbc8661e4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProbeProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProbeProtocol. + */ +public final class ProbeProtocol extends ExpandableStringEnum { + /** Static value Http for ProbeProtocol. */ + public static final ProbeProtocol HTTP = fromString("Http"); + + /** Static value Tcp for ProbeProtocol. */ + public static final ProbeProtocol TCP = fromString("Tcp"); + + /** Static value Https for ProbeProtocol. */ + public static final ProbeProtocol HTTPS = fromString("Https"); + + /** + * Creates or finds a ProbeProtocol from its string representation. + * @param name a name to look for + * @return the corresponding ProbeProtocol + */ + @JsonCreator + public static ProbeProtocol fromString(String name) { + return fromString(name, ProbeProtocol.class); + } + + /** + * @return known ProbeProtocol values + */ + public static Collection values() { + return values(ProbeProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProcessorArchitecture.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProcessorArchitecture.java new file mode 100644 index 000000000000..3652e32f7549 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProcessorArchitecture.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProcessorArchitecture. + */ +public final class ProcessorArchitecture extends ExpandableStringEnum { + /** Static value Amd64 for ProcessorArchitecture. */ + public static final ProcessorArchitecture AMD64 = fromString("Amd64"); + + /** Static value X86 for ProcessorArchitecture. */ + public static final ProcessorArchitecture X86 = fromString("X86"); + + /** + * Creates or finds a ProcessorArchitecture from its string representation. + * @param name a name to look for + * @return the corresponding ProcessorArchitecture + */ + @JsonCreator + public static ProcessorArchitecture fromString(String name) { + return fromString(name, ProcessorArchitecture.class); + } + + /** + * @return known ProcessorArchitecture values + */ + public static Collection values() { + return values(ProcessorArchitecture.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Protocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Protocol.java new file mode 100644 index 000000000000..dfe96650a650 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Protocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Protocol. + */ +public final class Protocol extends ExpandableStringEnum { + /** Static value Tcp for Protocol. */ + public static final Protocol TCP = fromString("Tcp"); + + /** Static value Http for Protocol. */ + public static final Protocol HTTP = fromString("Http"); + + /** Static value Https for Protocol. */ + public static final Protocol HTTPS = fromString("Https"); + + /** Static value Icmp for Protocol. */ + public static final Protocol ICMP = fromString("Icmp"); + + /** + * Creates or finds a Protocol from its string representation. + * @param name a name to look for + * @return the corresponding Protocol + */ + @JsonCreator + public static Protocol fromString(String name) { + return fromString(name, Protocol.class); + } + + /** + * @return known Protocol values + */ + public static Collection values() { + return values(Protocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProtocolConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProtocolConfiguration.java new file mode 100644 index 000000000000..1465c64eee05 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProtocolConfiguration.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration of the protocol. + */ +public class ProtocolConfiguration { + /** + * HTTP configuration of the connectivity check. + */ + @JsonProperty(value = "HTTPConfiguration") + private HTTPConfiguration hTTPConfiguration; + + /** + * Get hTTP configuration of the connectivity check. + * + * @return the hTTPConfiguration value + */ + public HTTPConfiguration hTTPConfiguration() { + return this.hTTPConfiguration; + } + + /** + * Set hTTP configuration of the connectivity check. + * + * @param hTTPConfiguration the hTTPConfiguration value to set + * @return the ProtocolConfiguration object itself. + */ + public ProtocolConfiguration withHTTPConfiguration(HTTPConfiguration hTTPConfiguration) { + this.hTTPConfiguration = hTTPConfiguration; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProtocolCustomSettingsFormat.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProtocolCustomSettingsFormat.java new file mode 100644 index 000000000000..ef6c58e86a1a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProtocolCustomSettingsFormat.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DDoS custom policy properties. + */ +public class ProtocolCustomSettingsFormat { + /** + * The protocol for which the DDoS protection policy is being customized. + * Possible values include: 'Tcp', 'Udp', 'Syn'. + */ + @JsonProperty(value = "protocol") + private DdosCustomPolicyProtocol protocol; + + /** + * The customized DDoS protection trigger rate. + */ + @JsonProperty(value = "triggerRateOverride") + private String triggerRateOverride; + + /** + * The customized DDoS protection source rate. + */ + @JsonProperty(value = "sourceRateOverride") + private String sourceRateOverride; + + /** + * The customized DDoS protection trigger rate sensitivity degrees. High: + * Trigger rate set with most sensitivity w.r.t. normal traffic. Default: + * Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: + * Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: + * Trigger rate set with least sensitivity w.r.t. normal traffic. Possible + * values include: 'Relaxed', 'Low', 'Default', 'High'. + */ + @JsonProperty(value = "triggerSensitivityOverride") + private DdosCustomPolicyTriggerSensitivityOverride triggerSensitivityOverride; + + /** + * Get the protocol for which the DDoS protection policy is being customized. Possible values include: 'Tcp', 'Udp', 'Syn'. + * + * @return the protocol value + */ + public DdosCustomPolicyProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol for which the DDoS protection policy is being customized. Possible values include: 'Tcp', 'Udp', 'Syn'. + * + * @param protocol the protocol value to set + * @return the ProtocolCustomSettingsFormat object itself. + */ + public ProtocolCustomSettingsFormat withProtocol(DdosCustomPolicyProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the customized DDoS protection trigger rate. + * + * @return the triggerRateOverride value + */ + public String triggerRateOverride() { + return this.triggerRateOverride; + } + + /** + * Set the customized DDoS protection trigger rate. + * + * @param triggerRateOverride the triggerRateOverride value to set + * @return the ProtocolCustomSettingsFormat object itself. + */ + public ProtocolCustomSettingsFormat withTriggerRateOverride(String triggerRateOverride) { + this.triggerRateOverride = triggerRateOverride; + return this; + } + + /** + * Get the customized DDoS protection source rate. + * + * @return the sourceRateOverride value + */ + public String sourceRateOverride() { + return this.sourceRateOverride; + } + + /** + * Set the customized DDoS protection source rate. + * + * @param sourceRateOverride the sourceRateOverride value to set + * @return the ProtocolCustomSettingsFormat object itself. + */ + public ProtocolCustomSettingsFormat withSourceRateOverride(String sourceRateOverride) { + this.sourceRateOverride = sourceRateOverride; + return this; + } + + /** + * Get the customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. Possible values include: 'Relaxed', 'Low', 'Default', 'High'. + * + * @return the triggerSensitivityOverride value + */ + public DdosCustomPolicyTriggerSensitivityOverride triggerSensitivityOverride() { + return this.triggerSensitivityOverride; + } + + /** + * Set the customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. Possible values include: 'Relaxed', 'Low', 'Default', 'High'. + * + * @param triggerSensitivityOverride the triggerSensitivityOverride value to set + * @return the ProtocolCustomSettingsFormat object itself. + */ + public ProtocolCustomSettingsFormat withTriggerSensitivityOverride(DdosCustomPolicyTriggerSensitivityOverride triggerSensitivityOverride) { + this.triggerSensitivityOverride = triggerSensitivityOverride; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProvisioningState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProvisioningState.java new file mode 100644 index 000000000000..116a1272736f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ProvisioningState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProvisioningState. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Updating for ProvisioningState. */ + public static final ProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for ProvisioningState. */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a ProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ProvisioningState + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * @return known ProvisioningState values + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddress.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddress.java new file mode 100644 index 000000000000..67ba96f1c9bf --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddress.java @@ -0,0 +1,380 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.PublicIPAddressInner; + +/** + * Type representing PublicIPAddress. + */ +public interface PublicIPAddress extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the ddosSettings value. + */ + DdosSettings ddosSettings(); + + /** + * @return the dnsSettings value. + */ + PublicIPAddressDnsSettings dnsSettings(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the idleTimeoutInMinutes value. + */ + Integer idleTimeoutInMinutes(); + + /** + * @return the ipAddress value. + */ + String ipAddress(); + + /** + * @return the ipConfiguration value. + */ + IPConfiguration ipConfiguration(); + + /** + * @return the ipTags value. + */ + List ipTags(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the publicIPAddressVersion value. + */ + IPVersion publicIPAddressVersion(); + + /** + * @return the publicIPAllocationMethod value. + */ + IPAllocationMethod publicIPAllocationMethod(); + + /** + * @return the publicIPPrefix value. + */ + SubResource publicIPPrefix(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the sku value. + */ + PublicIPAddressSku sku(); + + /** + * @return the zones value. + */ + List zones(); + + /** + * The entirety of the PublicIPAddress definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of PublicIPAddress definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PublicIPAddress definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the PublicIPAddress definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the publicipaddress definition allowing to specify DdosSettings. + */ + interface WithDdosSettings { + /** + * Specifies ddosSettings. + * @param ddosSettings The DDoS protection custom policy associated with the public IP address + * @return the next definition stage + */ + WithCreate withDdosSettings(DdosSettings ddosSettings); + } + + /** + * The stage of the publicipaddress definition allowing to specify DnsSettings. + */ + interface WithDnsSettings { + /** + * Specifies dnsSettings. + * @param dnsSettings The FQDN of the DNS record associated with the public IP address + * @return the next definition stage + */ + WithCreate withDnsSettings(PublicIPAddressDnsSettings dnsSettings); + } + + /** + * The stage of the publicipaddress definition allowing to specify IdleTimeoutInMinutes. + */ + interface WithIdleTimeoutInMinutes { + /** + * Specifies idleTimeoutInMinutes. + * @param idleTimeoutInMinutes The idle timeout of the public IP address + * @return the next definition stage + */ + WithCreate withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes); + } + + /** + * The stage of the publicipaddress definition allowing to specify IpAddress. + */ + interface WithIpAddress { + /** + * Specifies ipAddress. + * @param ipAddress The IP address associated with the public IP address resource + * @return the next definition stage + */ + WithCreate withIpAddress(String ipAddress); + } + + /** + * The stage of the publicipaddress definition allowing to specify IpTags. + */ + interface WithIpTags { + /** + * Specifies ipTags. + * @param ipTags The list of tags associated with the public IP address + * @return the next definition stage + */ + WithCreate withIpTags(List ipTags); + } + + /** + * The stage of the publicipaddress definition allowing to specify PublicIPAddressVersion. + */ + interface WithPublicIPAddressVersion { + /** + * Specifies publicIPAddressVersion. + * @param publicIPAddressVersion The public IP address version. Possible values include: 'IPv4', 'IPv6' + * @return the next definition stage + */ + WithCreate withPublicIPAddressVersion(IPVersion publicIPAddressVersion); + } + + /** + * The stage of the publicipaddress definition allowing to specify PublicIPAllocationMethod. + */ + interface WithPublicIPAllocationMethod { + /** + * Specifies publicIPAllocationMethod. + * @param publicIPAllocationMethod The public IP address allocation method. Possible values include: 'Static', 'Dynamic' + * @return the next definition stage + */ + WithCreate withPublicIPAllocationMethod(IPAllocationMethod publicIPAllocationMethod); + } + + /** + * The stage of the publicipaddress definition allowing to specify PublicIPPrefix. + */ + interface WithPublicIPPrefix { + /** + * Specifies publicIPPrefix. + * @param publicIPPrefix The Public IP Prefix this Public IP Address should be allocated from + * @return the next definition stage + */ + WithCreate withPublicIPPrefix(SubResource publicIPPrefix); + } + + /** + * The stage of the publicipaddress definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The public IP address SKU + * @return the next definition stage + */ + WithCreate withSku(PublicIPAddressSku sku); + } + + /** + * The stage of the publicipaddress definition allowing to specify Zones. + */ + interface WithZones { + /** + * Specifies zones. + * @param zones A list of availability zones denoting the IP allocated for the resource needs to come from + * @return the next definition stage + */ + WithCreate withZones(List zones); + } + + /** + * 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.WithDdosSettings, DefinitionStages.WithDnsSettings, DefinitionStages.WithIdleTimeoutInMinutes, DefinitionStages.WithIpAddress, DefinitionStages.WithIpTags, DefinitionStages.WithPublicIPAddressVersion, DefinitionStages.WithPublicIPAllocationMethod, DefinitionStages.WithPublicIPPrefix, DefinitionStages.WithSku, DefinitionStages.WithZones { + } + } + /** + * The template for a PublicIPAddress update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithDdosSettings, UpdateStages.WithDnsSettings, UpdateStages.WithIdleTimeoutInMinutes, UpdateStages.WithIpAddress, UpdateStages.WithIpTags, UpdateStages.WithPublicIPAddressVersion, UpdateStages.WithPublicIPAllocationMethod, UpdateStages.WithPublicIPPrefix, UpdateStages.WithSku, UpdateStages.WithZones { + } + + /** + * Grouping of PublicIPAddress update stages. + */ + interface UpdateStages { + /** + * The stage of the publicipaddress update allowing to specify DdosSettings. + */ + interface WithDdosSettings { + /** + * Specifies ddosSettings. + * @param ddosSettings The DDoS protection custom policy associated with the public IP address + * @return the next update stage + */ + Update withDdosSettings(DdosSettings ddosSettings); + } + + /** + * The stage of the publicipaddress update allowing to specify DnsSettings. + */ + interface WithDnsSettings { + /** + * Specifies dnsSettings. + * @param dnsSettings The FQDN of the DNS record associated with the public IP address + * @return the next update stage + */ + Update withDnsSettings(PublicIPAddressDnsSettings dnsSettings); + } + + /** + * The stage of the publicipaddress update allowing to specify IdleTimeoutInMinutes. + */ + interface WithIdleTimeoutInMinutes { + /** + * Specifies idleTimeoutInMinutes. + * @param idleTimeoutInMinutes The idle timeout of the public IP address + * @return the next update stage + */ + Update withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes); + } + + /** + * The stage of the publicipaddress update allowing to specify IpAddress. + */ + interface WithIpAddress { + /** + * Specifies ipAddress. + * @param ipAddress The IP address associated with the public IP address resource + * @return the next update stage + */ + Update withIpAddress(String ipAddress); + } + + /** + * The stage of the publicipaddress update allowing to specify IpTags. + */ + interface WithIpTags { + /** + * Specifies ipTags. + * @param ipTags The list of tags associated with the public IP address + * @return the next update stage + */ + Update withIpTags(List ipTags); + } + + /** + * The stage of the publicipaddress update allowing to specify PublicIPAddressVersion. + */ + interface WithPublicIPAddressVersion { + /** + * Specifies publicIPAddressVersion. + * @param publicIPAddressVersion The public IP address version. Possible values include: 'IPv4', 'IPv6' + * @return the next update stage + */ + Update withPublicIPAddressVersion(IPVersion publicIPAddressVersion); + } + + /** + * The stage of the publicipaddress update allowing to specify PublicIPAllocationMethod. + */ + interface WithPublicIPAllocationMethod { + /** + * Specifies publicIPAllocationMethod. + * @param publicIPAllocationMethod The public IP address allocation method. Possible values include: 'Static', 'Dynamic' + * @return the next update stage + */ + Update withPublicIPAllocationMethod(IPAllocationMethod publicIPAllocationMethod); + } + + /** + * The stage of the publicipaddress update allowing to specify PublicIPPrefix. + */ + interface WithPublicIPPrefix { + /** + * Specifies publicIPPrefix. + * @param publicIPPrefix The Public IP Prefix this Public IP Address should be allocated from + * @return the next update stage + */ + Update withPublicIPPrefix(SubResource publicIPPrefix); + } + + /** + * The stage of the publicipaddress update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The public IP address SKU + * @return the next update stage + */ + Update withSku(PublicIPAddressSku sku); + } + + /** + * The stage of the publicipaddress update allowing to specify Zones. + */ + interface WithZones { + /** + * Specifies zones. + * @param zones A list of availability zones denoting the IP allocated for the resource needs to come from + * @return the next update stage + */ + Update withZones(List zones); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddressDnsSettings.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddressDnsSettings.java new file mode 100644 index 000000000000..0c4dfe0447f8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddressDnsSettings.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains FQDN of the DNS record associated with the public IP address. + */ +public class PublicIPAddressDnsSettings { + /** + * The domain name label. The concatenation of the domain name label and + * the regionalized DNS zone make up the fully qualified domain name + * associated with the public IP address. If a domain name label is + * specified, an A DNS record is created for the public IP in the Microsoft + * Azure DNS system. + */ + @JsonProperty(value = "domainNameLabel") + private String domainNameLabel; + + /** + * The Fully Qualified Domain Name of the A DNS record associated with the + * public IP. This is the concatenation of the domainNameLabel and the + * regionalized DNS zone. + */ + @JsonProperty(value = "fqdn") + private String fqdn; + + /** + * The reverse FQDN. A user-visible, fully qualified domain name that + * resolves to this public IP address. If the reverseFqdn is specified, + * then a PTR DNS record is created pointing from the IP address in the + * in-addr.arpa domain to the reverse FQDN. + */ + @JsonProperty(value = "reverseFqdn") + private String reverseFqdn; + + /** + * Get the domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. + * + * @return the domainNameLabel value + */ + public String domainNameLabel() { + return this.domainNameLabel; + } + + /** + * Set the domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. + * + * @param domainNameLabel the domainNameLabel value to set + * @return the PublicIPAddressDnsSettings object itself. + */ + public PublicIPAddressDnsSettings withDomainNameLabel(String domainNameLabel) { + this.domainNameLabel = domainNameLabel; + return this; + } + + /** + * Get the Fully Qualified Domain Name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. + * + * @return the fqdn value + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Set the Fully Qualified Domain Name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. + * + * @param fqdn the fqdn value to set + * @return the PublicIPAddressDnsSettings object itself. + */ + public PublicIPAddressDnsSettings withFqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * Get the reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. + * + * @return the reverseFqdn value + */ + public String reverseFqdn() { + return this.reverseFqdn; + } + + /** + * Set the reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. + * + * @param reverseFqdn the reverseFqdn value to set + * @return the PublicIPAddressDnsSettings object itself. + */ + public PublicIPAddressDnsSettings withReverseFqdn(String reverseFqdn) { + this.reverseFqdn = reverseFqdn; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddressSku.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddressSku.java new file mode 100644 index 000000000000..22444ebcd5a2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddressSku.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SKU of a public IP address. + */ +public class PublicIPAddressSku { + /** + * Name of a public IP address SKU. Possible values include: 'Basic', + * 'Standard'. + */ + @JsonProperty(value = "name") + private PublicIPAddressSkuName name; + + /** + * Get name of a public IP address SKU. Possible values include: 'Basic', 'Standard'. + * + * @return the name value + */ + public PublicIPAddressSkuName name() { + return this.name; + } + + /** + * Set name of a public IP address SKU. Possible values include: 'Basic', 'Standard'. + * + * @param name the name value to set + * @return the PublicIPAddressSku object itself. + */ + public PublicIPAddressSku withName(PublicIPAddressSkuName name) { + this.name = name; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddressSkuName.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddressSkuName.java new file mode 100644 index 000000000000..eaa4ec049fc8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddressSkuName.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PublicIPAddressSkuName. + */ +public final class PublicIPAddressSkuName extends ExpandableStringEnum { + /** Static value Basic for PublicIPAddressSkuName. */ + public static final PublicIPAddressSkuName BASIC = fromString("Basic"); + + /** Static value Standard for PublicIPAddressSkuName. */ + public static final PublicIPAddressSkuName STANDARD = fromString("Standard"); + + /** + * Creates or finds a PublicIPAddressSkuName from its string representation. + * @param name a name to look for + * @return the corresponding PublicIPAddressSkuName + */ + @JsonCreator + public static PublicIPAddressSkuName fromString(String name) { + return fromString(name, PublicIPAddressSkuName.class); + } + + /** + * @return known PublicIPAddressSkuName values + */ + public static Collection values() { + return values(PublicIPAddressSkuName.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddresses.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddresses.java new file mode 100644 index 000000000000..f0bc1e1ef43c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPAddresses.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_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.network.v2019_09_01.implementation.PublicIPAddressesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PublicIPAddresses. + */ +public interface PublicIPAddresses extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Gets information about all public IP addresses on a virtual machine scale set level. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listVirtualMachineScaleSetPublicIPAddressesAsync(final String resourceGroupName, final String virtualMachineScaleSetName); + + /** + * Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The network interface name. + * @param ipConfigurationName The IP configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listVirtualMachineScaleSetVMPublicIPAddressesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String ipConfigurationName); + + /** + * Get the specified public IP address in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the IP configuration. + * @param publicIpAddressName The name of the public IP Address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getVirtualMachineScaleSetPublicIPAddressAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefix.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefix.java new file mode 100644 index 000000000000..77d6a05cd2d4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefix.java @@ -0,0 +1,245 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.PublicIPPrefixInner; + +/** + * Type representing PublicIPPrefix. + */ +public interface PublicIPPrefix extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the ipPrefix value. + */ + String ipPrefix(); + + /** + * @return the ipTags value. + */ + List ipTags(); + + /** + * @return the loadBalancerFrontendIpConfiguration value. + */ + SubResource loadBalancerFrontendIpConfiguration(); + + /** + * @return the prefixLength value. + */ + Integer prefixLength(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the publicIPAddresses value. + */ + List publicIPAddresses(); + + /** + * @return the publicIPAddressVersion value. + */ + IPVersion publicIPAddressVersion(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the sku value. + */ + PublicIPPrefixSku sku(); + + /** + * @return the zones value. + */ + List zones(); + + /** + * The entirety of the PublicIPPrefix definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of PublicIPPrefix definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PublicIPPrefix definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the PublicIPPrefix definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the publicipprefix definition allowing to specify IpTags. + */ + interface WithIpTags { + /** + * Specifies ipTags. + * @param ipTags The list of tags associated with the public IP prefix + * @return the next definition stage + */ + WithCreate withIpTags(List ipTags); + } + + /** + * The stage of the publicipprefix definition allowing to specify PrefixLength. + */ + interface WithPrefixLength { + /** + * Specifies prefixLength. + * @param prefixLength The Length of the Public IP Prefix + * @return the next definition stage + */ + WithCreate withPrefixLength(Integer prefixLength); + } + + /** + * The stage of the publicipprefix definition allowing to specify PublicIPAddressVersion. + */ + interface WithPublicIPAddressVersion { + /** + * Specifies publicIPAddressVersion. + * @param publicIPAddressVersion The public IP address version. Possible values include: 'IPv4', 'IPv6' + * @return the next definition stage + */ + WithCreate withPublicIPAddressVersion(IPVersion publicIPAddressVersion); + } + + /** + * The stage of the publicipprefix definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The public IP prefix SKU + * @return the next definition stage + */ + WithCreate withSku(PublicIPPrefixSku sku); + } + + /** + * The stage of the publicipprefix definition allowing to specify Zones. + */ + interface WithZones { + /** + * Specifies zones. + * @param zones A list of availability zones denoting the IP allocated for the resource needs to come from + * @return the next definition stage + */ + WithCreate withZones(List zones); + } + + /** + * 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.WithIpTags, DefinitionStages.WithPrefixLength, DefinitionStages.WithPublicIPAddressVersion, DefinitionStages.WithSku, DefinitionStages.WithZones { + } + } + /** + * The template for a PublicIPPrefix update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithIpTags, UpdateStages.WithPrefixLength, UpdateStages.WithPublicIPAddressVersion, UpdateStages.WithSku, UpdateStages.WithZones { + } + + /** + * Grouping of PublicIPPrefix update stages. + */ + interface UpdateStages { + /** + * The stage of the publicipprefix update allowing to specify IpTags. + */ + interface WithIpTags { + /** + * Specifies ipTags. + * @param ipTags The list of tags associated with the public IP prefix + * @return the next update stage + */ + Update withIpTags(List ipTags); + } + + /** + * The stage of the publicipprefix update allowing to specify PrefixLength. + */ + interface WithPrefixLength { + /** + * Specifies prefixLength. + * @param prefixLength The Length of the Public IP Prefix + * @return the next update stage + */ + Update withPrefixLength(Integer prefixLength); + } + + /** + * The stage of the publicipprefix update allowing to specify PublicIPAddressVersion. + */ + interface WithPublicIPAddressVersion { + /** + * Specifies publicIPAddressVersion. + * @param publicIPAddressVersion The public IP address version. Possible values include: 'IPv4', 'IPv6' + * @return the next update stage + */ + Update withPublicIPAddressVersion(IPVersion publicIPAddressVersion); + } + + /** + * The stage of the publicipprefix update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The public IP prefix SKU + * @return the next update stage + */ + Update withSku(PublicIPPrefixSku sku); + } + + /** + * The stage of the publicipprefix update allowing to specify Zones. + */ + interface WithZones { + /** + * Specifies zones. + * @param zones A list of availability zones denoting the IP allocated for the resource needs to come from + * @return the next update stage + */ + Update withZones(List zones); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefixSku.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefixSku.java new file mode 100644 index 000000000000..16ff1b44748f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefixSku.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SKU of a public IP prefix. + */ +public class PublicIPPrefixSku { + /** + * Name of a public IP prefix SKU. Possible values include: 'Standard'. + */ + @JsonProperty(value = "name") + private PublicIPPrefixSkuName name; + + /** + * Get name of a public IP prefix SKU. Possible values include: 'Standard'. + * + * @return the name value + */ + public PublicIPPrefixSkuName name() { + return this.name; + } + + /** + * Set name of a public IP prefix SKU. Possible values include: 'Standard'. + * + * @param name the name value to set + * @return the PublicIPPrefixSku object itself. + */ + public PublicIPPrefixSku withName(PublicIPPrefixSkuName name) { + this.name = name; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefixSkuName.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefixSkuName.java new file mode 100644 index 000000000000..3ad1eb3377be --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefixSkuName.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PublicIPPrefixSkuName. + */ +public final class PublicIPPrefixSkuName extends ExpandableStringEnum { + /** Static value Standard for PublicIPPrefixSkuName. */ + public static final PublicIPPrefixSkuName STANDARD = fromString("Standard"); + + /** + * Creates or finds a PublicIPPrefixSkuName from its string representation. + * @param name a name to look for + * @return the corresponding PublicIPPrefixSkuName + */ + @JsonCreator + public static PublicIPPrefixSkuName fromString(String name) { + return fromString(name, PublicIPPrefixSkuName.class); + } + + /** + * @return known PublicIPPrefixSkuName values + */ + public static Collection values() { + return values(PublicIPPrefixSkuName.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefixes.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefixes.java new file mode 100644 index 000000000000..ec8656e7b834 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/PublicIPPrefixes.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.network.v2019_09_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.network.v2019_09_01.implementation.PublicIPPrefixesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PublicIPPrefixes. + */ +public interface PublicIPPrefixes extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/QueryTroubleshootingParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/QueryTroubleshootingParameters.java new file mode 100644 index 000000000000..4835c6a3098c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/QueryTroubleshootingParameters.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the resource to query the troubleshooting result. + */ +public class QueryTroubleshootingParameters { + /** + * The target resource ID to query the troubleshooting result. + */ + @JsonProperty(value = "targetResourceId", required = true) + private String targetResourceId; + + /** + * Get the target resource ID to query the troubleshooting result. + * + * @return the targetResourceId value + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the target resource ID to query the troubleshooting result. + * + * @param targetResourceId the targetResourceId value to set + * @return the QueryTroubleshootingParameters object itself. + */ + public QueryTroubleshootingParameters withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ReferencedPublicIpAddress.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ReferencedPublicIpAddress.java new file mode 100644 index 000000000000..8ee3045fdc5b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ReferencedPublicIpAddress.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Reference to a public IP address. + */ +public class ReferencedPublicIpAddress { + /** + * The PublicIPAddress Reference. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the PublicIPAddress Reference. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the PublicIPAddress Reference. + * + * @param id the id value to set + * @return the ReferencedPublicIpAddress object itself. + */ + public ReferencedPublicIpAddress withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceIdentityType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceIdentityType.java new file mode 100644 index 000000000000..0ef4580effdb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceIdentityType.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ResourceIdentityType. + */ +public enum ResourceIdentityType { + /** Enum value SystemAssigned. */ + SYSTEM_ASSIGNED("SystemAssigned"), + + /** Enum value UserAssigned. */ + USER_ASSIGNED("UserAssigned"), + + /** Enum value SystemAssigned, UserAssigned. */ + SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"), + + /** Enum value None. */ + NONE("None"); + + /** The actual serialized value for a ResourceIdentityType instance. */ + private String value; + + ResourceIdentityType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ResourceIdentityType instance. + * + * @param value the serialized value to parse. + * @return the parsed ResourceIdentityType object, or null if unable to parse. + */ + @JsonCreator + public static ResourceIdentityType fromString(String value) { + ResourceIdentityType[] items = ResourceIdentityType.values(); + for (ResourceIdentityType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceNavigationLinks.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceNavigationLinks.java new file mode 100644 index 000000000000..495fb6be1ad7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceNavigationLinks.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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ResourceNavigationLinksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ResourceNavigationLinks. + */ +public interface ResourceNavigationLinks extends HasInner { + /** + * Gets a list of resource navigation links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String virtualNetworkName, String subnetName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceNavigationLinksListResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceNavigationLinksListResult.java new file mode 100644 index 000000000000..373110b607ab --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceNavigationLinksListResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ResourceNavigationLinksListResultInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ResourceNavigationLinkInner; +import java.util.List; + +/** + * Type representing ResourceNavigationLinksListResult. + */ +public interface ResourceNavigationLinksListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceSet.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceSet.java new file mode 100644 index 000000000000..2297b39b8a54 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ResourceSet.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The base resource set for visibility and auto-approval. + */ +public class ResourceSet { + /** + * The list of subscriptions. + */ + @JsonProperty(value = "subscriptions") + private List subscriptions; + + /** + * Get the list of subscriptions. + * + * @return the subscriptions value + */ + public List subscriptions() { + return this.subscriptions; + } + + /** + * Set the list of subscriptions. + * + * @param subscriptions the subscriptions value to set + * @return the ResourceSet object itself. + */ + public ResourceSet withSubscriptions(List subscriptions) { + this.subscriptions = subscriptions; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RetentionPolicyParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RetentionPolicyParameters.java new file mode 100644 index 000000000000..a60067a93748 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RetentionPolicyParameters.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the retention policy for flow log. + */ +public class RetentionPolicyParameters { + /** + * Number of days to retain flow log records. + */ + @JsonProperty(value = "days") + private Integer days; + + /** + * Flag to enable/disable retention. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Get number of days to retain flow log records. + * + * @return the days value + */ + public Integer days() { + return this.days; + } + + /** + * Set number of days to retain flow log records. + * + * @param days the days value to set + * @return the RetentionPolicyParameters object itself. + */ + public RetentionPolicyParameters withDays(Integer days) { + this.days = days; + return this; + } + + /** + * Get flag to enable/disable retention. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set flag to enable/disable retention. + * + * @param enabled the enabled value to set + * @return the RetentionPolicyParameters object itself. + */ + public RetentionPolicyParameters withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Route.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Route.java new file mode 100644 index 000000000000..37a6756fdf1c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Route.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.RouteInner; +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.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing Route. + */ +public interface Route extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the addressPrefix value. + */ + String addressPrefix(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the nextHopIpAddress value. + */ + String nextHopIpAddress(); + + /** + * @return the nextHopType value. + */ + RouteNextHopType nextHopType(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * The entirety of the Route definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithRouteTable, DefinitionStages.WithNextHopType, DefinitionStages.WithCreate { + } + + /** + * Grouping of Route definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Route definition. + */ + interface Blank extends WithRouteTable { + } + + /** + * The stage of the route definition allowing to specify RouteTable. + */ + interface WithRouteTable { + /** + * Specifies resourceGroupName, routeTableName. + * @param resourceGroupName The name of the resource group + * @param routeTableName The name of the route table + * @return the next definition stage + */ + WithNextHopType withExistingRouteTable(String resourceGroupName, String routeTableName); + } + + /** + * The stage of the route definition allowing to specify NextHopType. + */ + interface WithNextHopType { + /** + * Specifies nextHopType. + * @param nextHopType The type of Azure hop the packet should be sent to. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None' + * @return the next definition stage + */ + WithCreate withNextHopType(RouteNextHopType nextHopType); + } + + /** + * The stage of the route definition allowing to specify AddressPrefix. + */ + interface WithAddressPrefix { + /** + * Specifies addressPrefix. + * @param addressPrefix The destination CIDR to which the route applies + * @return the next definition stage + */ + WithCreate withAddressPrefix(String addressPrefix); + } + + /** + * The stage of the route definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the route definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the route definition allowing to specify NextHopIpAddress. + */ + interface WithNextHopIpAddress { + /** + * Specifies nextHopIpAddress. + * @param nextHopIpAddress The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance + * @return the next definition stage + */ + WithCreate withNextHopIpAddress(String nextHopIpAddress); + } + + /** + * 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.WithAddressPrefix, DefinitionStages.WithId, DefinitionStages.WithName, DefinitionStages.WithNextHopIpAddress { + } + } + /** + * The template for a Route update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAddressPrefix, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithNextHopIpAddress { + } + + /** + * Grouping of Route update stages. + */ + interface UpdateStages { + /** + * The stage of the route update allowing to specify AddressPrefix. + */ + interface WithAddressPrefix { + /** + * Specifies addressPrefix. + * @param addressPrefix The destination CIDR to which the route applies + * @return the next update stage + */ + Update withAddressPrefix(String addressPrefix); + } + + /** + * The stage of the route update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the route update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the route update allowing to specify NextHopIpAddress. + */ + interface WithNextHopIpAddress { + /** + * Specifies nextHopIpAddress. + * @param nextHopIpAddress The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance + * @return the next update stage + */ + Update withNextHopIpAddress(String nextHopIpAddress); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilter.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilter.java new file mode 100644 index 000000000000..0a063d7dcafd --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilter.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.RouteFilterRuleInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.RouteFilterInner; + +/** + * Type representing RouteFilter. + */ +public interface RouteFilter extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the ipv6Peerings value. + */ + List ipv6Peerings(); + + /** + * @return the peerings value. + */ + List peerings(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the rules value. + */ + List rules(); + + /** + * The entirety of the RouteFilter definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of RouteFilter definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a RouteFilter definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the RouteFilter definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the routefilter definition allowing to specify Rules. + */ + interface WithRules { + /** + * Specifies rules. + * @param rules Collection of RouteFilterRules contained within a route filter + * @return the next definition stage + */ + WithCreate withRules(List rules); + } + + /** + * 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.WithRules { + } + } + /** + * The template for a RouteFilter update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithRules { + } + + /** + * Grouping of RouteFilter update stages. + */ + interface UpdateStages { + /** + * The stage of the routefilter update allowing to specify Rules. + */ + interface WithRules { + /** + * Specifies rules. + * @param rules Collection of RouteFilterRules contained within a route filter + * @return the next update stage + */ + Update withRules(List rules); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilterRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilterRule.java new file mode 100644 index 000000000000..b7a47a2c815a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilterRule.java @@ -0,0 +1,222 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.RouteFilterRuleInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; + +/** + * Type representing RouteFilterRule. + */ +public interface RouteFilterRule extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the access value. + */ + Access access(); + + /** + * @return the communities value. + */ + List communities(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the routeFilterRuleType value. + */ + String routeFilterRuleType(); + + /** + * The entirety of the RouteFilterRule definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithRouteFilter, DefinitionStages.WithAccess, DefinitionStages.WithCommunities, DefinitionStages.WithRouteFilterRuleType, DefinitionStages.WithCreate { + } + + /** + * Grouping of RouteFilterRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a RouteFilterRule definition. + */ + interface Blank extends WithRouteFilter { + } + + /** + * The stage of the routefilterrule definition allowing to specify RouteFilter. + */ + interface WithRouteFilter { + /** + * Specifies resourceGroupName, routeFilterName. + * @param resourceGroupName The name of the resource group + * @param routeFilterName The name of the route filter + * @return the next definition stage + */ + WithAccess withExistingRouteFilter(String resourceGroupName, String routeFilterName); + } + + /** + * The stage of the routefilterrule definition allowing to specify Access. + */ + interface WithAccess { + /** + * Specifies access. + * @param access The access type of the rule. Possible values include: 'Allow', 'Deny' + * @return the next definition stage + */ + WithCommunities withAccess(Access access); + } + + /** + * The stage of the routefilterrule definition allowing to specify Communities. + */ + interface WithCommunities { + /** + * Specifies communities. + * @param communities The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'] + * @return the next definition stage + */ + WithRouteFilterRuleType withCommunities(List communities); + } + + /** + * The stage of the routefilterrule definition allowing to specify RouteFilterRuleType. + */ + interface WithRouteFilterRuleType { + /** + * Specifies routeFilterRuleType. + * @param routeFilterRuleType The rule type of the rule + * @return the next definition stage + */ + WithCreate withRouteFilterRuleType(String routeFilterRuleType); + } + + /** + * The stage of the routefilterrule definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the routefilterrule definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource location + * @return the next definition stage + */ + WithCreate withLocation(String location); + } + + /** + * The stage of the routefilterrule definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * 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 { + } + } + /** + * The template for a RouteFilterRule update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithId, UpdateStages.WithLocation, UpdateStages.WithName { + } + + /** + * Grouping of RouteFilterRule update stages. + */ + interface UpdateStages { + /** + * The stage of the routefilterrule update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the routefilterrule update allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource location + * @return the next update stage + */ + Update withLocation(String location); + } + + /** + * The stage of the routefilterrule update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilterRules.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilterRules.java new file mode 100644 index 000000000000..edaa6c8e8113 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilterRules.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.RouteFilterRulesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing RouteFilterRules. + */ +public interface RouteFilterRules extends SupportsCreating, HasInner { + /** + * Gets the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String routeFilterName, String ruleName); + + /** + * Gets all RouteFilterRules in a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByRouteFilterAsync(final String resourceGroupName, final String routeFilterName); + + /** + * Deletes the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String routeFilterName, String ruleName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilters.java new file mode 100644 index 000000000000..42a7fac07ac3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteFilters.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.network.v2019_09_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.network.v2019_09_01.implementation.RouteFiltersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing RouteFilters. + */ +public interface RouteFilters extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteNextHopType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteNextHopType.java new file mode 100644 index 000000000000..06369ba08b97 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteNextHopType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for RouteNextHopType. + */ +public final class RouteNextHopType extends ExpandableStringEnum { + /** Static value VirtualNetworkGateway for RouteNextHopType. */ + public static final RouteNextHopType VIRTUAL_NETWORK_GATEWAY = fromString("VirtualNetworkGateway"); + + /** Static value VnetLocal for RouteNextHopType. */ + public static final RouteNextHopType VNET_LOCAL = fromString("VnetLocal"); + + /** Static value Internet for RouteNextHopType. */ + public static final RouteNextHopType INTERNET = fromString("Internet"); + + /** Static value VirtualAppliance for RouteNextHopType. */ + public static final RouteNextHopType VIRTUAL_APPLIANCE = fromString("VirtualAppliance"); + + /** Static value None for RouteNextHopType. */ + public static final RouteNextHopType NONE = fromString("None"); + + /** + * Creates or finds a RouteNextHopType from its string representation. + * @param name a name to look for + * @return the corresponding RouteNextHopType + */ + @JsonCreator + public static RouteNextHopType fromString(String name) { + return fromString(name, RouteNextHopType.class); + } + + /** + * @return known RouteNextHopType values + */ + public static Collection values() { + return values(RouteNextHopType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteTable.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteTable.java new file mode 100644 index 000000000000..739281e33619 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteTable.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.RouteInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.RouteTableInner; + +/** + * Type representing RouteTable. + */ +public interface RouteTable extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the disableBgpRoutePropagation value. + */ + Boolean disableBgpRoutePropagation(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the routes value. + */ + List routes(); + + /** + * @return the subnets value. + */ + List subnets(); + + /** + * The entirety of the RouteTable definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of RouteTable definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a RouteTable definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the RouteTable definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the routetable definition allowing to specify DisableBgpRoutePropagation. + */ + interface WithDisableBgpRoutePropagation { + /** + * Specifies disableBgpRoutePropagation. + * @param disableBgpRoutePropagation Whether to disable the routes learned by BGP on that route table. True means disable + * @return the next definition stage + */ + WithCreate withDisableBgpRoutePropagation(Boolean disableBgpRoutePropagation); + } + + /** + * The stage of the routetable definition allowing to specify Routes. + */ + interface WithRoutes { + /** + * Specifies routes. + * @param routes Collection of routes contained within a route table + * @return the next definition stage + */ + WithCreate withRoutes(List routes); + } + + /** + * 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.WithDisableBgpRoutePropagation, DefinitionStages.WithRoutes { + } + } + /** + * The template for a RouteTable update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithDisableBgpRoutePropagation, UpdateStages.WithRoutes { + } + + /** + * Grouping of RouteTable update stages. + */ + interface UpdateStages { + /** + * The stage of the routetable update allowing to specify DisableBgpRoutePropagation. + */ + interface WithDisableBgpRoutePropagation { + /** + * Specifies disableBgpRoutePropagation. + * @param disableBgpRoutePropagation Whether to disable the routes learned by BGP on that route table. True means disable + * @return the next update stage + */ + Update withDisableBgpRoutePropagation(Boolean disableBgpRoutePropagation); + } + + /** + * The stage of the routetable update allowing to specify Routes. + */ + interface WithRoutes { + /** + * Specifies routes. + * @param routes Collection of routes contained within a route table + * @return the next update stage + */ + Update withRoutes(List routes); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteTables.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteTables.java new file mode 100644 index 000000000000..c9e509369219 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/RouteTables.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.network.v2019_09_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.network.v2019_09_01.implementation.RouteTablesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing RouteTables. + */ +public interface RouteTables extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Routes.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Routes.java new file mode 100644 index 000000000000..2dc65880e47e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Routes.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.RoutesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Routes. + */ +public interface Routes extends SupportsCreating, HasInner { + /** + * Gets the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String routeTableName, String routeName); + + /** + * Gets all routes in a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String routeTableName); + + /** + * Deletes the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String routeTableName, String routeName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityGroupNetworkInterface.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityGroupNetworkInterface.java new file mode 100644 index 000000000000..880bf313b34d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityGroupNetworkInterface.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network interface and all its associated security rules. + */ +public class SecurityGroupNetworkInterface { + /** + * ID of the network interface. + */ + @JsonProperty(value = "id") + private String id; + + /** + * All security rules associated with the network interface. + */ + @JsonProperty(value = "securityRuleAssociations") + private SecurityRuleAssociations securityRuleAssociations; + + /** + * Get iD of the network interface. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set iD of the network interface. + * + * @param id the id value to set + * @return the SecurityGroupNetworkInterface object itself. + */ + public SecurityGroupNetworkInterface withId(String id) { + this.id = id; + return this; + } + + /** + * Get all security rules associated with the network interface. + * + * @return the securityRuleAssociations value + */ + public SecurityRuleAssociations securityRuleAssociations() { + return this.securityRuleAssociations; + } + + /** + * Set all security rules associated with the network interface. + * + * @param securityRuleAssociations the securityRuleAssociations value to set + * @return the SecurityGroupNetworkInterface object itself. + */ + public SecurityGroupNetworkInterface withSecurityRuleAssociations(SecurityRuleAssociations securityRuleAssociations) { + this.securityRuleAssociations = securityRuleAssociations; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityGroupViewParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityGroupViewParameters.java new file mode 100644 index 000000000000..c00c998cc4e1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityGroupViewParameters.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the VM to check security groups for. + */ +public class SecurityGroupViewParameters { + /** + * ID of the target VM. + */ + @JsonProperty(value = "targetResourceId", required = true) + private String targetResourceId; + + /** + * Get iD of the target VM. + * + * @return the targetResourceId value + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set iD of the target VM. + * + * @param targetResourceId the targetResourceId value to set + * @return the SecurityGroupViewParameters object itself. + */ + public SecurityGroupViewParameters withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityGroupViewResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityGroupViewResult.java new file mode 100644 index 000000000000..9de173c57949 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityGroupViewResult.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.SecurityGroupViewResultInner; +import java.util.List; + +/** + * Type representing SecurityGroupViewResult. + */ +public interface SecurityGroupViewResult extends HasInner, HasManager { + /** + * @return the networkInterfaces value. + */ + List networkInterfaces(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleAccess.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleAccess.java new file mode 100644 index 000000000000..946b8948abe1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleAccess.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SecurityRuleAccess. + */ +public final class SecurityRuleAccess extends ExpandableStringEnum { + /** Static value Allow for SecurityRuleAccess. */ + public static final SecurityRuleAccess ALLOW = fromString("Allow"); + + /** Static value Deny for SecurityRuleAccess. */ + public static final SecurityRuleAccess DENY = fromString("Deny"); + + /** + * Creates or finds a SecurityRuleAccess from its string representation. + * @param name a name to look for + * @return the corresponding SecurityRuleAccess + */ + @JsonCreator + public static SecurityRuleAccess fromString(String name) { + return fromString(name, SecurityRuleAccess.class); + } + + /** + * @return known SecurityRuleAccess values + */ + public static Collection values() { + return values(SecurityRuleAccess.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleAssociations.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleAssociations.java new file mode 100644 index 000000000000..216799b24c7e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleAssociations.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.SecurityRuleInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * All security rules associated with the network interface. + */ +public class SecurityRuleAssociations { + /** + * Network interface and it's custom security rules. + */ + @JsonProperty(value = "networkInterfaceAssociation") + private NetworkInterfaceAssociation networkInterfaceAssociation; + + /** + * Subnet and it's custom security rules. + */ + @JsonProperty(value = "subnetAssociation") + private SubnetAssociation subnetAssociation; + + /** + * Collection of default security rules of the network security group. + */ + @JsonProperty(value = "defaultSecurityRules") + private List defaultSecurityRules; + + /** + * Collection of effective security rules. + */ + @JsonProperty(value = "effectiveSecurityRules") + private List effectiveSecurityRules; + + /** + * Get network interface and it's custom security rules. + * + * @return the networkInterfaceAssociation value + */ + public NetworkInterfaceAssociation networkInterfaceAssociation() { + return this.networkInterfaceAssociation; + } + + /** + * Set network interface and it's custom security rules. + * + * @param networkInterfaceAssociation the networkInterfaceAssociation value to set + * @return the SecurityRuleAssociations object itself. + */ + public SecurityRuleAssociations withNetworkInterfaceAssociation(NetworkInterfaceAssociation networkInterfaceAssociation) { + this.networkInterfaceAssociation = networkInterfaceAssociation; + return this; + } + + /** + * Get subnet and it's custom security rules. + * + * @return the subnetAssociation value + */ + public SubnetAssociation subnetAssociation() { + return this.subnetAssociation; + } + + /** + * Set subnet and it's custom security rules. + * + * @param subnetAssociation the subnetAssociation value to set + * @return the SecurityRuleAssociations object itself. + */ + public SecurityRuleAssociations withSubnetAssociation(SubnetAssociation subnetAssociation) { + this.subnetAssociation = subnetAssociation; + return this; + } + + /** + * Get collection of default security rules of the network security group. + * + * @return the defaultSecurityRules value + */ + public List defaultSecurityRules() { + return this.defaultSecurityRules; + } + + /** + * Set collection of default security rules of the network security group. + * + * @param defaultSecurityRules the defaultSecurityRules value to set + * @return the SecurityRuleAssociations object itself. + */ + public SecurityRuleAssociations withDefaultSecurityRules(List defaultSecurityRules) { + this.defaultSecurityRules = defaultSecurityRules; + return this; + } + + /** + * Get collection of effective security rules. + * + * @return the effectiveSecurityRules value + */ + public List effectiveSecurityRules() { + return this.effectiveSecurityRules; + } + + /** + * Set collection of effective security rules. + * + * @param effectiveSecurityRules the effectiveSecurityRules value to set + * @return the SecurityRuleAssociations object itself. + */ + public SecurityRuleAssociations withEffectiveSecurityRules(List effectiveSecurityRules) { + this.effectiveSecurityRules = effectiveSecurityRules; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleDirection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleDirection.java new file mode 100644 index 000000000000..bfb0d218a946 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleDirection.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SecurityRuleDirection. + */ +public final class SecurityRuleDirection extends ExpandableStringEnum { + /** Static value Inbound for SecurityRuleDirection. */ + public static final SecurityRuleDirection INBOUND = fromString("Inbound"); + + /** Static value Outbound for SecurityRuleDirection. */ + public static final SecurityRuleDirection OUTBOUND = fromString("Outbound"); + + /** + * Creates or finds a SecurityRuleDirection from its string representation. + * @param name a name to look for + * @return the corresponding SecurityRuleDirection + */ + @JsonCreator + public static SecurityRuleDirection fromString(String name) { + return fromString(name, SecurityRuleDirection.class); + } + + /** + * @return known SecurityRuleDirection values + */ + public static Collection values() { + return values(SecurityRuleDirection.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleProtocol.java new file mode 100644 index 000000000000..73701f0c0986 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRuleProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SecurityRuleProtocol. + */ +public final class SecurityRuleProtocol extends ExpandableStringEnum { + /** Static value Tcp for SecurityRuleProtocol. */ + public static final SecurityRuleProtocol TCP = fromString("Tcp"); + + /** Static value Udp for SecurityRuleProtocol. */ + public static final SecurityRuleProtocol UDP = fromString("Udp"); + + /** Static value Icmp for SecurityRuleProtocol. */ + public static final SecurityRuleProtocol ICMP = fromString("Icmp"); + + /** Static value Esp for SecurityRuleProtocol. */ + public static final SecurityRuleProtocol ESP = fromString("Esp"); + + /** Static value * for SecurityRuleProtocol. */ + public static final SecurityRuleProtocol ASTERISK = fromString("*"); + + /** Static value Ah for SecurityRuleProtocol. */ + public static final SecurityRuleProtocol AH = fromString("Ah"); + + /** + * Creates or finds a SecurityRuleProtocol from its string representation. + * @param name a name to look for + * @return the corresponding SecurityRuleProtocol + */ + @JsonCreator + public static SecurityRuleProtocol fromString(String name) { + return fromString(name, SecurityRuleProtocol.class); + } + + /** + * @return known SecurityRuleProtocol values + */ + public static Collection values() { + return values(SecurityRuleProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRules.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRules.java new file mode 100644 index 000000000000..9aefe97ac0e9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SecurityRules.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.SecurityRulesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing SecurityRules. + */ +public interface SecurityRules extends SupportsCreating, HasInner { + /** + * Get the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName); + + /** + * Gets all security rules in a network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String networkSecurityGroupName); + + /** + * Deletes the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceAssociationLinks.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceAssociationLinks.java new file mode 100644 index 000000000000..288aa0742a74 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceAssociationLinks.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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ServiceAssociationLinksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ServiceAssociationLinks. + */ +public interface ServiceAssociationLinks extends HasInner { + /** + * Gets a list of service association links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String virtualNetworkName, String subnetName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceAssociationLinksListResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceAssociationLinksListResult.java new file mode 100644 index 000000000000..034de569c285 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceAssociationLinksListResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ServiceAssociationLinksListResultInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ServiceAssociationLinkInner; +import java.util.List; + +/** + * Type representing ServiceAssociationLinksListResult. + */ +public interface ServiceAssociationLinksListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicies.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicies.java new file mode 100644 index 000000000000..acf4f4fd55a6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicies.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.network.v2019_09_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.network.v2019_09_01.implementation.ServiceEndpointPoliciesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ServiceEndpointPolicies. + */ +public interface ServiceEndpointPolicies extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicy.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicy.java new file mode 100644 index 000000000000..83c94e17c462 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicy.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ServiceEndpointPolicyDefinitionInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ServiceEndpointPolicyInner; + +/** + * Type representing ServiceEndpointPolicy. + */ +public interface ServiceEndpointPolicy extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the serviceEndpointPolicyDefinitions value. + */ + List serviceEndpointPolicyDefinitions(); + + /** + * @return the subnets value. + */ + List subnets(); + + /** + * The entirety of the ServiceEndpointPolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of ServiceEndpointPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ServiceEndpointPolicy definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the ServiceEndpointPolicy definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the serviceendpointpolicy definition allowing to specify ServiceEndpointPolicyDefinitions. + */ + interface WithServiceEndpointPolicyDefinitions { + /** + * Specifies serviceEndpointPolicyDefinitions. + * @param serviceEndpointPolicyDefinitions A collection of service endpoint policy definitions of the service endpoint policy + * @return the next definition stage + */ + WithCreate withServiceEndpointPolicyDefinitions(List serviceEndpointPolicyDefinitions); + } + + /** + * 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.WithServiceEndpointPolicyDefinitions { + } + } + /** + * The template for a ServiceEndpointPolicy update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithServiceEndpointPolicyDefinitions { + } + + /** + * Grouping of ServiceEndpointPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the serviceendpointpolicy update allowing to specify ServiceEndpointPolicyDefinitions. + */ + interface WithServiceEndpointPolicyDefinitions { + /** + * Specifies serviceEndpointPolicyDefinitions. + * @param serviceEndpointPolicyDefinitions A collection of service endpoint policy definitions of the service endpoint policy + * @return the next update stage + */ + Update withServiceEndpointPolicyDefinitions(List serviceEndpointPolicyDefinitions); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicyDefinition.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicyDefinition.java new file mode 100644 index 000000000000..df83eb6edaaf --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicyDefinition.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ServiceEndpointPolicyDefinitionInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; + +/** + * Type representing ServiceEndpointPolicyDefinition. + */ +public interface ServiceEndpointPolicyDefinition extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the description value. + */ + String description(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the service value. + */ + String service(); + + /** + * @return the serviceResources value. + */ + List serviceResources(); + + /** + * The entirety of the ServiceEndpointPolicyDefinition definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithServiceEndpointPolicy, DefinitionStages.WithCreate { + } + + /** + * Grouping of ServiceEndpointPolicyDefinition definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ServiceEndpointPolicyDefinition definition. + */ + interface Blank extends WithServiceEndpointPolicy { + } + + /** + * The stage of the serviceendpointpolicydefinition definition allowing to specify ServiceEndpointPolicy. + */ + interface WithServiceEndpointPolicy { + /** + * Specifies resourceGroupName, serviceEndpointPolicyName. + * @param resourceGroupName The name of the resource group + * @param serviceEndpointPolicyName The name of the service endpoint policy + * @return the next definition stage + */ + WithCreate withExistingServiceEndpointPolicy(String resourceGroupName, String serviceEndpointPolicyName); + } + + /** + * The stage of the serviceendpointpolicydefinition definition allowing to specify Description. + */ + interface WithDescription { + /** + * Specifies description. + * @param description A description for this rule. Restricted to 140 chars + * @return the next definition stage + */ + WithCreate withDescription(String description); + } + + /** + * The stage of the serviceendpointpolicydefinition definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the serviceendpointpolicydefinition definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the serviceendpointpolicydefinition definition allowing to specify Service. + */ + interface WithService { + /** + * Specifies service. + * @param service Service endpoint name + * @return the next definition stage + */ + WithCreate withService(String service); + } + + /** + * The stage of the serviceendpointpolicydefinition definition allowing to specify ServiceResources. + */ + interface WithServiceResources { + /** + * Specifies serviceResources. + * @param serviceResources A list of service resources + * @return the next definition stage + */ + WithCreate withServiceResources(List serviceResources); + } + + /** + * 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.WithDescription, DefinitionStages.WithId, DefinitionStages.WithName, DefinitionStages.WithService, DefinitionStages.WithServiceResources { + } + } + /** + * The template for a ServiceEndpointPolicyDefinition update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithDescription, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithService, UpdateStages.WithServiceResources { + } + + /** + * Grouping of ServiceEndpointPolicyDefinition update stages. + */ + interface UpdateStages { + /** + * The stage of the serviceendpointpolicydefinition update allowing to specify Description. + */ + interface WithDescription { + /** + * Specifies description. + * @param description A description for this rule. Restricted to 140 chars + * @return the next update stage + */ + Update withDescription(String description); + } + + /** + * The stage of the serviceendpointpolicydefinition update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the serviceendpointpolicydefinition update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the serviceendpointpolicydefinition update allowing to specify Service. + */ + interface WithService { + /** + * Specifies service. + * @param service Service endpoint name + * @return the next update stage + */ + Update withService(String service); + } + + /** + * The stage of the serviceendpointpolicydefinition update allowing to specify ServiceResources. + */ + interface WithServiceResources { + /** + * Specifies serviceResources. + * @param serviceResources A list of service resources + * @return the next update stage + */ + Update withServiceResources(List serviceResources); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicyDefinitions.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicyDefinitions.java new file mode 100644 index 000000000000..e19a2276ab9d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPolicyDefinitions.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ServiceEndpointPolicyDefinitionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ServiceEndpointPolicyDefinitions. + */ +public interface ServiceEndpointPolicyDefinitions extends SupportsCreating, HasInner { + /** + * Get the specified service endpoint policy definitions from service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy name. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName); + + /** + * Gets all service endpoint policy definitions in a service end point policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(final String resourceGroupName, final String serviceEndpointPolicyName); + + /** + * Deletes the specified ServiceEndpoint policy definitions. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the Service Endpoint Policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPropertiesFormat.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPropertiesFormat.java new file mode 100644 index 000000000000..4b5a045bd7d7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceEndpointPropertiesFormat.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The service endpoint properties. + */ +public class ServiceEndpointPropertiesFormat { + /** + * The type of the endpoint service. + */ + @JsonProperty(value = "service") + private String service; + + /** + * A list of locations. + */ + @JsonProperty(value = "locations") + private List locations; + + /** + * The provisioning state of the service endpoint resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Get the type of the endpoint service. + * + * @return the service value + */ + public String service() { + return this.service; + } + + /** + * Set the type of the endpoint service. + * + * @param service the service value to set + * @return the ServiceEndpointPropertiesFormat object itself. + */ + public ServiceEndpointPropertiesFormat withService(String service) { + this.service = service; + return this; + } + + /** + * Get a list of locations. + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Set a list of locations. + * + * @param locations the locations value to set + * @return the ServiceEndpointPropertiesFormat object itself. + */ + public ServiceEndpointPropertiesFormat withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get the provisioning state of the service endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceProviderProvisioningState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceProviderProvisioningState.java new file mode 100644 index 000000000000..4906d0e36d9b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceProviderProvisioningState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ServiceProviderProvisioningState. + */ +public final class ServiceProviderProvisioningState extends ExpandableStringEnum { + /** Static value NotProvisioned for ServiceProviderProvisioningState. */ + public static final ServiceProviderProvisioningState NOT_PROVISIONED = fromString("NotProvisioned"); + + /** Static value Provisioning for ServiceProviderProvisioningState. */ + public static final ServiceProviderProvisioningState PROVISIONING = fromString("Provisioning"); + + /** Static value Provisioned for ServiceProviderProvisioningState. */ + public static final ServiceProviderProvisioningState PROVISIONED = fromString("Provisioned"); + + /** Static value Deprovisioning for ServiceProviderProvisioningState. */ + public static final ServiceProviderProvisioningState DEPROVISIONING = fromString("Deprovisioning"); + + /** + * Creates or finds a ServiceProviderProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ServiceProviderProvisioningState + */ + @JsonCreator + public static ServiceProviderProvisioningState fromString(String name) { + return fromString(name, ServiceProviderProvisioningState.class); + } + + /** + * @return known ServiceProviderProvisioningState values + */ + public static Collection values() { + return values(ServiceProviderProvisioningState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTagInformation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTagInformation.java new file mode 100644 index 000000000000..e11f7c8ac02f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTagInformation.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The service tag information. + */ +public class ServiceTagInformation { + /** + * Properties of the service tag information. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private ServiceTagInformationPropertiesFormat properties; + + /** + * The name of service tag. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The ID of service tag. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Get properties of the service tag information. + * + * @return the properties value + */ + public ServiceTagInformationPropertiesFormat properties() { + return this.properties; + } + + /** + * Get the name of service tag. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the ID of service tag. + * + * @return the id value + */ + public String id() { + return this.id; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTagInformationPropertiesFormat.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTagInformationPropertiesFormat.java new file mode 100644 index 000000000000..57bbdc9ba265 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTagInformationPropertiesFormat.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the service tag information. + */ +public class ServiceTagInformationPropertiesFormat { + /** + * The iteration number of service tag. + */ + @JsonProperty(value = "changeNumber", access = JsonProperty.Access.WRITE_ONLY) + private String changeNumber; + + /** + * The region of service tag. + */ + @JsonProperty(value = "region", access = JsonProperty.Access.WRITE_ONLY) + private String region; + + /** + * The name of system service. + */ + @JsonProperty(value = "systemService", access = JsonProperty.Access.WRITE_ONLY) + private String systemService; + + /** + * The list of IP address prefixes. + */ + @JsonProperty(value = "addressPrefixes", access = JsonProperty.Access.WRITE_ONLY) + private List addressPrefixes; + + /** + * Get the iteration number of service tag. + * + * @return the changeNumber value + */ + public String changeNumber() { + return this.changeNumber; + } + + /** + * Get the region of service tag. + * + * @return the region value + */ + public String region() { + return this.region; + } + + /** + * Get the name of system service. + * + * @return the systemService value + */ + public String systemService() { + return this.systemService; + } + + /** + * Get the list of IP address prefixes. + * + * @return the addressPrefixes value + */ + public List addressPrefixes() { + return this.addressPrefixes; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTags.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTags.java new file mode 100644 index 000000000000..4e1fa72e8fef --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTags.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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ServiceTagsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ServiceTags. + */ +public interface ServiceTags extends HasInner { + /** + * Gets a list of service tag information resources. + * + * @param location The location that will be used as a reference for version (not as a filter based on location, you will get the list of service tags with prefix details across all regions but limited to the cloud that your subscription belongs to). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String location); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTagsListResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTagsListResult.java new file mode 100644 index 000000000000..01d87a50870f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ServiceTagsListResult.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ServiceTagsListResultInner; +import java.util.List; + +/** + * Type representing ServiceTagsListResult. + */ +public interface ServiceTagsListResult extends HasInner, HasManager { + /** + * @return the changeNumber value. + */ + String changeNumber(); + + /** + * @return the cloud value. + */ + String cloud(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the values value. + */ + List values(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Severity.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Severity.java new file mode 100644 index 000000000000..483d21f27c59 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Severity.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Severity. + */ +public final class Severity extends ExpandableStringEnum { + /** Static value Error for Severity. */ + public static final Severity ERROR = fromString("Error"); + + /** Static value Warning for Severity. */ + public static final Severity WARNING = fromString("Warning"); + + /** + * Creates or finds a Severity from its string representation. + * @param name a name to look for + * @return the corresponding Severity + */ + @JsonCreator + public static Severity fromString(String name) { + return fromString(name, Severity.class); + } + + /** + * @return known Severity values + */ + public static Collection values() { + return values(Severity.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Subnet.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Subnet.java new file mode 100644 index 000000000000..ed3c56716213 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Subnet.java @@ -0,0 +1,468 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.SubnetInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkSecurityGroupInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ResourceNavigationLinkInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.RouteTableInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ServiceAssociationLinkInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ServiceEndpointPolicyInner; + +/** + * Type representing Subnet. + */ +public interface Subnet extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the addressPrefix value. + */ + String addressPrefix(); + + /** + * @return the addressPrefixes value. + */ + List addressPrefixes(); + + /** + * @return the delegations value. + */ + List delegations(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the ipConfigurationProfiles value. + */ + List ipConfigurationProfiles(); + + /** + * @return the ipConfigurations value. + */ + List ipConfigurations(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the natGateway value. + */ + SubResource natGateway(); + + /** + * @return the networkSecurityGroup value. + */ + NetworkSecurityGroup networkSecurityGroup(); + + /** + * @return the privateEndpointNetworkPolicies value. + */ + String privateEndpointNetworkPolicies(); + + /** + * @return the privateEndpoints value. + */ + List privateEndpoints(); + + /** + * @return the privateLinkServiceNetworkPolicies value. + */ + String privateLinkServiceNetworkPolicies(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the purpose value. + */ + String purpose(); + + /** + * @return the resourceNavigationLinks value. + */ + List resourceNavigationLinks(); + + /** + * @return the routeTable value. + */ + RouteTable routeTable(); + + /** + * @return the serviceAssociationLinks value. + */ + List serviceAssociationLinks(); + + /** + * @return the serviceEndpointPolicies value. + */ + List serviceEndpointPolicies(); + + /** + * @return the serviceEndpoints value. + */ + List serviceEndpoints(); + + /** + * The entirety of the Subnet definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithVirtualNetwork, DefinitionStages.WithCreate { + } + + /** + * Grouping of Subnet definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Subnet definition. + */ + interface Blank extends WithVirtualNetwork { + } + + /** + * The stage of the subnet definition allowing to specify VirtualNetwork. + */ + interface WithVirtualNetwork { + /** + * Specifies resourceGroupName, virtualNetworkName. + * @param resourceGroupName The name of the resource group + * @param virtualNetworkName The name of the virtual network + * @return the next definition stage + */ + WithCreate withExistingVirtualNetwork(String resourceGroupName, String virtualNetworkName); + } + + /** + * The stage of the subnet definition allowing to specify AddressPrefix. + */ + interface WithAddressPrefix { + /** + * Specifies addressPrefix. + * @param addressPrefix The address prefix for the subnet + * @return the next definition stage + */ + WithCreate withAddressPrefix(String addressPrefix); + } + + /** + * The stage of the subnet definition allowing to specify AddressPrefixes. + */ + interface WithAddressPrefixes { + /** + * Specifies addressPrefixes. + * @param addressPrefixes List of address prefixes for the subnet + * @return the next definition stage + */ + WithCreate withAddressPrefixes(List addressPrefixes); + } + + /** + * The stage of the subnet definition allowing to specify Delegations. + */ + interface WithDelegations { + /** + * Specifies delegations. + * @param delegations An array of references to the delegations on the subnet + * @return the next definition stage + */ + WithCreate withDelegations(List delegations); + } + + /** + * The stage of the subnet definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the subnet definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the subnet definition allowing to specify NatGateway. + */ + interface WithNatGateway { + /** + * Specifies natGateway. + * @param natGateway Nat gateway associated with this subnet + * @return the next definition stage + */ + WithCreate withNatGateway(SubResource natGateway); + } + + /** + * The stage of the subnet definition allowing to specify NetworkSecurityGroup. + */ + interface WithNetworkSecurityGroup { + /** + * Specifies networkSecurityGroup. + * @param networkSecurityGroup The reference of the NetworkSecurityGroup resource + * @return the next definition stage + */ + WithCreate withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup); + } + + /** + * The stage of the subnet definition allowing to specify PrivateEndpointNetworkPolicies. + */ + interface WithPrivateEndpointNetworkPolicies { + /** + * Specifies privateEndpointNetworkPolicies. + * @param privateEndpointNetworkPolicies Enable or Disable apply network policies on private end point in the subnet + * @return the next definition stage + */ + WithCreate withPrivateEndpointNetworkPolicies(String privateEndpointNetworkPolicies); + } + + /** + * The stage of the subnet definition allowing to specify PrivateLinkServiceNetworkPolicies. + */ + interface WithPrivateLinkServiceNetworkPolicies { + /** + * Specifies privateLinkServiceNetworkPolicies. + * @param privateLinkServiceNetworkPolicies Enable or Disable apply network policies on private link service in the subnet + * @return the next definition stage + */ + WithCreate withPrivateLinkServiceNetworkPolicies(String privateLinkServiceNetworkPolicies); + } + + /** + * The stage of the subnet definition allowing to specify RouteTable. + */ + interface WithRouteTable { + /** + * Specifies routeTable. + * @param routeTable The reference of the RouteTable resource + * @return the next definition stage + */ + WithCreate withRouteTable(RouteTableInner routeTable); + } + + /** + * The stage of the subnet definition allowing to specify ServiceEndpointPolicies. + */ + interface WithServiceEndpointPolicies { + /** + * Specifies serviceEndpointPolicies. + * @param serviceEndpointPolicies An array of service endpoint policies + * @return the next definition stage + */ + WithCreate withServiceEndpointPolicies(List serviceEndpointPolicies); + } + + /** + * The stage of the subnet definition allowing to specify ServiceEndpoints. + */ + interface WithServiceEndpoints { + /** + * Specifies serviceEndpoints. + * @param serviceEndpoints An array of service endpoints + * @return the next definition stage + */ + WithCreate withServiceEndpoints(List serviceEndpoints); + } + + /** + * 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.WithAddressPrefix, DefinitionStages.WithAddressPrefixes, DefinitionStages.WithDelegations, DefinitionStages.WithId, DefinitionStages.WithName, DefinitionStages.WithNatGateway, DefinitionStages.WithNetworkSecurityGroup, DefinitionStages.WithPrivateEndpointNetworkPolicies, DefinitionStages.WithPrivateLinkServiceNetworkPolicies, DefinitionStages.WithRouteTable, DefinitionStages.WithServiceEndpointPolicies, DefinitionStages.WithServiceEndpoints { + } + } + /** + * The template for a Subnet update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAddressPrefix, UpdateStages.WithAddressPrefixes, UpdateStages.WithDelegations, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithNatGateway, UpdateStages.WithNetworkSecurityGroup, UpdateStages.WithPrivateEndpointNetworkPolicies, UpdateStages.WithPrivateLinkServiceNetworkPolicies, UpdateStages.WithRouteTable, UpdateStages.WithServiceEndpointPolicies, UpdateStages.WithServiceEndpoints { + } + + /** + * Grouping of Subnet update stages. + */ + interface UpdateStages { + /** + * The stage of the subnet update allowing to specify AddressPrefix. + */ + interface WithAddressPrefix { + /** + * Specifies addressPrefix. + * @param addressPrefix The address prefix for the subnet + * @return the next update stage + */ + Update withAddressPrefix(String addressPrefix); + } + + /** + * The stage of the subnet update allowing to specify AddressPrefixes. + */ + interface WithAddressPrefixes { + /** + * Specifies addressPrefixes. + * @param addressPrefixes List of address prefixes for the subnet + * @return the next update stage + */ + Update withAddressPrefixes(List addressPrefixes); + } + + /** + * The stage of the subnet update allowing to specify Delegations. + */ + interface WithDelegations { + /** + * Specifies delegations. + * @param delegations An array of references to the delegations on the subnet + * @return the next update stage + */ + Update withDelegations(List delegations); + } + + /** + * The stage of the subnet update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the subnet update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the subnet update allowing to specify NatGateway. + */ + interface WithNatGateway { + /** + * Specifies natGateway. + * @param natGateway Nat gateway associated with this subnet + * @return the next update stage + */ + Update withNatGateway(SubResource natGateway); + } + + /** + * The stage of the subnet update allowing to specify NetworkSecurityGroup. + */ + interface WithNetworkSecurityGroup { + /** + * Specifies networkSecurityGroup. + * @param networkSecurityGroup The reference of the NetworkSecurityGroup resource + * @return the next update stage + */ + Update withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup); + } + + /** + * The stage of the subnet update allowing to specify PrivateEndpointNetworkPolicies. + */ + interface WithPrivateEndpointNetworkPolicies { + /** + * Specifies privateEndpointNetworkPolicies. + * @param privateEndpointNetworkPolicies Enable or Disable apply network policies on private end point in the subnet + * @return the next update stage + */ + Update withPrivateEndpointNetworkPolicies(String privateEndpointNetworkPolicies); + } + + /** + * The stage of the subnet update allowing to specify PrivateLinkServiceNetworkPolicies. + */ + interface WithPrivateLinkServiceNetworkPolicies { + /** + * Specifies privateLinkServiceNetworkPolicies. + * @param privateLinkServiceNetworkPolicies Enable or Disable apply network policies on private link service in the subnet + * @return the next update stage + */ + Update withPrivateLinkServiceNetworkPolicies(String privateLinkServiceNetworkPolicies); + } + + /** + * The stage of the subnet update allowing to specify RouteTable. + */ + interface WithRouteTable { + /** + * Specifies routeTable. + * @param routeTable The reference of the RouteTable resource + * @return the next update stage + */ + Update withRouteTable(RouteTableInner routeTable); + } + + /** + * The stage of the subnet update allowing to specify ServiceEndpointPolicies. + */ + interface WithServiceEndpointPolicies { + /** + * Specifies serviceEndpointPolicies. + * @param serviceEndpointPolicies An array of service endpoint policies + * @return the next update stage + */ + Update withServiceEndpointPolicies(List serviceEndpointPolicies); + } + + /** + * The stage of the subnet update allowing to specify ServiceEndpoints. + */ + interface WithServiceEndpoints { + /** + * Specifies serviceEndpoints. + * @param serviceEndpoints An array of service endpoints + * @return the next update stage + */ + Update withServiceEndpoints(List serviceEndpoints); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SubnetAssociation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SubnetAssociation.java new file mode 100644 index 000000000000..5c76fdad1d12 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SubnetAssociation.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.SecurityRuleInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Subnet and it's custom security rules. + */ +public class SubnetAssociation { + /** + * Subnet ID. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Collection of custom security rules. + */ + @JsonProperty(value = "securityRules") + private List securityRules; + + /** + * Get subnet ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get collection of custom security rules. + * + * @return the securityRules value + */ + public List securityRules() { + return this.securityRules; + } + + /** + * Set collection of custom security rules. + * + * @param securityRules the securityRules value to set + * @return the SubnetAssociation object itself. + */ + public SubnetAssociation withSecurityRules(List securityRules) { + this.securityRules = securityRules; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Subnets.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Subnets.java new file mode 100644 index 000000000000..0c4c4b0e5680 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Subnets.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.SubnetsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Subnets. + */ +public interface Subnets extends SupportsCreating, HasInner { + /** + * Prepares a subnet by applying network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param prepareNetworkPoliciesRequestParameters Parameters supplied to prepare subnet by applying network intent policies. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable prepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName, PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters); + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable unprepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName); + + /** + * Gets the specified subnet by virtual network and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String virtualNetworkName, String subnetName); + + /** + * Gets all subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String virtualNetworkName); + + /** + * Deletes the specified subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String virtualNetworkName, String subnetName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TagsObject.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TagsObject.java new file mode 100644 index 000000000000..981482a7b412 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TagsObject.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.network.v2019_09_01; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Tags object for patch operations. + */ +public class TagsObject { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * 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 TagsObject object itself. + */ + public TagsObject withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Topology.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Topology.java new file mode 100644 index 000000000000..55737851c198 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Topology.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.TopologyInner; +import org.joda.time.DateTime; +import java.util.List; + +/** + * Type representing Topology. + */ +public interface Topology extends HasInner, HasManager { + /** + * @return the createdDateTime value. + */ + DateTime createdDateTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the lastModified value. + */ + DateTime lastModified(); + + /** + * @return the resources value. + */ + List resources(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TopologyAssociation.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TopologyAssociation.java new file mode 100644 index 000000000000..ef172e9acd2e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TopologyAssociation.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Resources that have an association with the parent resource. + */ +public class TopologyAssociation { + /** + * The name of the resource that is associated with the parent resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The ID of the resource that is associated with the parent resource. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * The association type of the child resource to the parent resource. + * Possible values include: 'Associated', 'Contains'. + */ + @JsonProperty(value = "associationType") + private AssociationType associationType; + + /** + * Get the name of the resource that is associated with the parent resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is associated with the parent resource. + * + * @param name the name value to set + * @return the TopologyAssociation object itself. + */ + public TopologyAssociation withName(String name) { + this.name = name; + return this; + } + + /** + * Get the ID of the resource that is associated with the parent resource. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the ID of the resource that is associated with the parent resource. + * + * @param resourceId the resourceId value to set + * @return the TopologyAssociation object itself. + */ + public TopologyAssociation withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'. + * + * @return the associationType value + */ + public AssociationType associationType() { + return this.associationType; + } + + /** + * Set the association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'. + * + * @param associationType the associationType value to set + * @return the TopologyAssociation object itself. + */ + public TopologyAssociation withAssociationType(AssociationType associationType) { + this.associationType = associationType; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TopologyParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TopologyParameters.java new file mode 100644 index 000000000000..b886f8f6abe1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TopologyParameters.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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the representation of topology. + */ +public class TopologyParameters { + /** + * The name of the target resource group to perform topology on. + */ + @JsonProperty(value = "targetResourceGroupName") + private String targetResourceGroupName; + + /** + * The reference of the Virtual Network resource. + */ + @JsonProperty(value = "targetVirtualNetwork") + private SubResource targetVirtualNetwork; + + /** + * The reference of the Subnet resource. + */ + @JsonProperty(value = "targetSubnet") + private SubResource targetSubnet; + + /** + * Get the name of the target resource group to perform topology on. + * + * @return the targetResourceGroupName value + */ + public String targetResourceGroupName() { + return this.targetResourceGroupName; + } + + /** + * Set the name of the target resource group to perform topology on. + * + * @param targetResourceGroupName the targetResourceGroupName value to set + * @return the TopologyParameters object itself. + */ + public TopologyParameters withTargetResourceGroupName(String targetResourceGroupName) { + this.targetResourceGroupName = targetResourceGroupName; + return this; + } + + /** + * Get the reference of the Virtual Network resource. + * + * @return the targetVirtualNetwork value + */ + public SubResource targetVirtualNetwork() { + return this.targetVirtualNetwork; + } + + /** + * Set the reference of the Virtual Network resource. + * + * @param targetVirtualNetwork the targetVirtualNetwork value to set + * @return the TopologyParameters object itself. + */ + public TopologyParameters withTargetVirtualNetwork(SubResource targetVirtualNetwork) { + this.targetVirtualNetwork = targetVirtualNetwork; + return this; + } + + /** + * Get the reference of the Subnet resource. + * + * @return the targetSubnet value + */ + public SubResource targetSubnet() { + return this.targetSubnet; + } + + /** + * Set the reference of the Subnet resource. + * + * @param targetSubnet the targetSubnet value to set + * @return the TopologyParameters object itself. + */ + public TopologyParameters withTargetSubnet(SubResource targetSubnet) { + this.targetSubnet = targetSubnet; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TopologyResource.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TopologyResource.java new file mode 100644 index 000000000000..faf58a4cda58 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TopologyResource.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The network resource topology information for the given resource group. + */ +public class TopologyResource { + /** + * Name of the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * ID of the resource. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Holds the associations the resource has with other resources in the + * resource group. + */ + @JsonProperty(value = "associations") + private List associations; + + /** + * Get name of the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the resource. + * + * @param name the name value to set + * @return the TopologyResource object itself. + */ + public TopologyResource withName(String name) { + this.name = name; + return this; + } + + /** + * Get iD of the resource. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set iD of the resource. + * + * @param id the id value to set + * @return the TopologyResource object itself. + */ + public TopologyResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get resource location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource location. + * + * @param location the location value to set + * @return the TopologyResource object itself. + */ + public TopologyResource withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get holds the associations the resource has with other resources in the resource group. + * + * @return the associations value + */ + public List associations() { + return this.associations; + } + + /** + * Set holds the associations the resource has with other resources in the resource group. + * + * @param associations the associations value to set + * @return the TopologyResource object itself. + */ + public TopologyResource withAssociations(List associations) { + this.associations = associations; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TrafficAnalyticsConfigurationProperties.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TrafficAnalyticsConfigurationProperties.java new file mode 100644 index 000000000000..ca5f37eef2ca --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TrafficAnalyticsConfigurationProperties.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the configuration of traffic analytics. + */ +public class TrafficAnalyticsConfigurationProperties { + /** + * Flag to enable/disable traffic analytics. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /** + * The resource guid of the attached workspace. + */ + @JsonProperty(value = "workspaceId") + private String workspaceId; + + /** + * The location of the attached workspace. + */ + @JsonProperty(value = "workspaceRegion") + private String workspaceRegion; + + /** + * Resource Id of the attached workspace. + */ + @JsonProperty(value = "workspaceResourceId") + private String workspaceResourceId; + + /** + * The interval in minutes which would decide how frequently TA service + * should do flow analytics. + */ + @JsonProperty(value = "trafficAnalyticsInterval") + private Integer trafficAnalyticsInterval; + + /** + * Get flag to enable/disable traffic analytics. + * + * @return the enabled value + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set flag to enable/disable traffic analytics. + * + * @param enabled the enabled value to set + * @return the TrafficAnalyticsConfigurationProperties object itself. + */ + public TrafficAnalyticsConfigurationProperties withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the resource guid of the attached workspace. + * + * @return the workspaceId value + */ + public String workspaceId() { + return this.workspaceId; + } + + /** + * Set the resource guid of the attached workspace. + * + * @param workspaceId the workspaceId value to set + * @return the TrafficAnalyticsConfigurationProperties object itself. + */ + public TrafficAnalyticsConfigurationProperties withWorkspaceId(String workspaceId) { + this.workspaceId = workspaceId; + return this; + } + + /** + * Get the location of the attached workspace. + * + * @return the workspaceRegion value + */ + public String workspaceRegion() { + return this.workspaceRegion; + } + + /** + * Set the location of the attached workspace. + * + * @param workspaceRegion the workspaceRegion value to set + * @return the TrafficAnalyticsConfigurationProperties object itself. + */ + public TrafficAnalyticsConfigurationProperties withWorkspaceRegion(String workspaceRegion) { + this.workspaceRegion = workspaceRegion; + return this; + } + + /** + * Get resource Id of the attached workspace. + * + * @return the workspaceResourceId value + */ + public String workspaceResourceId() { + return this.workspaceResourceId; + } + + /** + * Set resource Id of the attached workspace. + * + * @param workspaceResourceId the workspaceResourceId value to set + * @return the TrafficAnalyticsConfigurationProperties object itself. + */ + public TrafficAnalyticsConfigurationProperties withWorkspaceResourceId(String workspaceResourceId) { + this.workspaceResourceId = workspaceResourceId; + return this; + } + + /** + * Get the interval in minutes which would decide how frequently TA service should do flow analytics. + * + * @return the trafficAnalyticsInterval value + */ + public Integer trafficAnalyticsInterval() { + return this.trafficAnalyticsInterval; + } + + /** + * Set the interval in minutes which would decide how frequently TA service should do flow analytics. + * + * @param trafficAnalyticsInterval the trafficAnalyticsInterval value to set + * @return the TrafficAnalyticsConfigurationProperties object itself. + */ + public TrafficAnalyticsConfigurationProperties withTrafficAnalyticsInterval(Integer trafficAnalyticsInterval) { + this.trafficAnalyticsInterval = trafficAnalyticsInterval; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TrafficAnalyticsProperties.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TrafficAnalyticsProperties.java new file mode 100644 index 000000000000..158941c05de4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TrafficAnalyticsProperties.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the configuration of traffic analytics. + */ +public class TrafficAnalyticsProperties { + /** + * Parameters that define the configuration of traffic analytics. + */ + @JsonProperty(value = "networkWatcherFlowAnalyticsConfiguration", required = true) + private TrafficAnalyticsConfigurationProperties networkWatcherFlowAnalyticsConfiguration; + + /** + * Get parameters that define the configuration of traffic analytics. + * + * @return the networkWatcherFlowAnalyticsConfiguration value + */ + public TrafficAnalyticsConfigurationProperties networkWatcherFlowAnalyticsConfiguration() { + return this.networkWatcherFlowAnalyticsConfiguration; + } + + /** + * Set parameters that define the configuration of traffic analytics. + * + * @param networkWatcherFlowAnalyticsConfiguration the networkWatcherFlowAnalyticsConfiguration value to set + * @return the TrafficAnalyticsProperties object itself. + */ + public TrafficAnalyticsProperties withNetworkWatcherFlowAnalyticsConfiguration(TrafficAnalyticsConfigurationProperties networkWatcherFlowAnalyticsConfiguration) { + this.networkWatcherFlowAnalyticsConfiguration = networkWatcherFlowAnalyticsConfiguration; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TrafficSelectorPolicy.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TrafficSelectorPolicy.java new file mode 100644 index 000000000000..8e62b76b2da0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TrafficSelectorPolicy.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An traffic selector policy for a virtual network gateway connection. + */ +public class TrafficSelectorPolicy { + /** + * A collection of local address spaces in CIDR format. + */ + @JsonProperty(value = "localAddressRanges", required = true) + private List localAddressRanges; + + /** + * A collection of remote address spaces in CIDR format. + */ + @JsonProperty(value = "remoteAddressRanges", required = true) + private List remoteAddressRanges; + + /** + * Get a collection of local address spaces in CIDR format. + * + * @return the localAddressRanges value + */ + public List localAddressRanges() { + return this.localAddressRanges; + } + + /** + * Set a collection of local address spaces in CIDR format. + * + * @param localAddressRanges the localAddressRanges value to set + * @return the TrafficSelectorPolicy object itself. + */ + public TrafficSelectorPolicy withLocalAddressRanges(List localAddressRanges) { + this.localAddressRanges = localAddressRanges; + return this; + } + + /** + * Get a collection of remote address spaces in CIDR format. + * + * @return the remoteAddressRanges value + */ + public List remoteAddressRanges() { + return this.remoteAddressRanges; + } + + /** + * Set a collection of remote address spaces in CIDR format. + * + * @param remoteAddressRanges the remoteAddressRanges value to set + * @return the TrafficSelectorPolicy object itself. + */ + public TrafficSelectorPolicy withRemoteAddressRanges(List remoteAddressRanges) { + this.remoteAddressRanges = remoteAddressRanges; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TransportProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TransportProtocol.java new file mode 100644 index 000000000000..1a5e4f4b8f2f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TransportProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for TransportProtocol. + */ +public final class TransportProtocol extends ExpandableStringEnum { + /** Static value Udp for TransportProtocol. */ + public static final TransportProtocol UDP = fromString("Udp"); + + /** Static value Tcp for TransportProtocol. */ + public static final TransportProtocol TCP = fromString("Tcp"); + + /** Static value All for TransportProtocol. */ + public static final TransportProtocol ALL = fromString("All"); + + /** + * Creates or finds a TransportProtocol from its string representation. + * @param name a name to look for + * @return the corresponding TransportProtocol + */ + @JsonCreator + public static TransportProtocol fromString(String name) { + return fromString(name, TransportProtocol.class); + } + + /** + * @return known TransportProtocol values + */ + public static Collection values() { + return values(TransportProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingDetails.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingDetails.java new file mode 100644 index 000000000000..525ed81b4ed6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingDetails.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information gained from troubleshooting of specified resource. + */ +public class TroubleshootingDetails { + /** + * The id of the get troubleshoot operation. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Reason type of failure. + */ + @JsonProperty(value = "reasonType") + private String reasonType; + + /** + * A summary of troubleshooting. + */ + @JsonProperty(value = "summary") + private String summary; + + /** + * Details on troubleshooting results. + */ + @JsonProperty(value = "detail") + private String detail; + + /** + * List of recommended actions. + */ + @JsonProperty(value = "recommendedActions") + private List recommendedActions; + + /** + * Get the id of the get troubleshoot operation. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the id of the get troubleshoot operation. + * + * @param id the id value to set + * @return the TroubleshootingDetails object itself. + */ + public TroubleshootingDetails withId(String id) { + this.id = id; + return this; + } + + /** + * Get reason type of failure. + * + * @return the reasonType value + */ + public String reasonType() { + return this.reasonType; + } + + /** + * Set reason type of failure. + * + * @param reasonType the reasonType value to set + * @return the TroubleshootingDetails object itself. + */ + public TroubleshootingDetails withReasonType(String reasonType) { + this.reasonType = reasonType; + return this; + } + + /** + * Get a summary of troubleshooting. + * + * @return the summary value + */ + public String summary() { + return this.summary; + } + + /** + * Set a summary of troubleshooting. + * + * @param summary the summary value to set + * @return the TroubleshootingDetails object itself. + */ + public TroubleshootingDetails withSummary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get details on troubleshooting results. + * + * @return the detail value + */ + public String detail() { + return this.detail; + } + + /** + * Set details on troubleshooting results. + * + * @param detail the detail value to set + * @return the TroubleshootingDetails object itself. + */ + public TroubleshootingDetails withDetail(String detail) { + this.detail = detail; + return this; + } + + /** + * Get list of recommended actions. + * + * @return the recommendedActions value + */ + public List recommendedActions() { + return this.recommendedActions; + } + + /** + * Set list of recommended actions. + * + * @param recommendedActions the recommendedActions value to set + * @return the TroubleshootingDetails object itself. + */ + public TroubleshootingDetails withRecommendedActions(List recommendedActions) { + this.recommendedActions = recommendedActions; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingParameters.java new file mode 100644 index 000000000000..7e161bfbd838 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingParameters.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Parameters that define the resource to troubleshoot. + */ +@JsonFlatten +public class TroubleshootingParameters { + /** + * The target resource to troubleshoot. + */ + @JsonProperty(value = "targetResourceId", required = true) + private String targetResourceId; + + /** + * The ID for the storage account to save the troubleshoot result. + */ + @JsonProperty(value = "properties.storageId", required = true) + private String storageId; + + /** + * The path to the blob to save the troubleshoot result in. + */ + @JsonProperty(value = "properties.storagePath", required = true) + private String storagePath; + + /** + * Get the target resource to troubleshoot. + * + * @return the targetResourceId value + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the target resource to troubleshoot. + * + * @param targetResourceId the targetResourceId value to set + * @return the TroubleshootingParameters object itself. + */ + public TroubleshootingParameters withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + + /** + * Get the ID for the storage account to save the troubleshoot result. + * + * @return the storageId value + */ + public String storageId() { + return this.storageId; + } + + /** + * Set the ID for the storage account to save the troubleshoot result. + * + * @param storageId the storageId value to set + * @return the TroubleshootingParameters object itself. + */ + public TroubleshootingParameters withStorageId(String storageId) { + this.storageId = storageId; + return this; + } + + /** + * Get the path to the blob to save the troubleshoot result in. + * + * @return the storagePath value + */ + public String storagePath() { + return this.storagePath; + } + + /** + * Set the path to the blob to save the troubleshoot result in. + * + * @param storagePath the storagePath value to set + * @return the TroubleshootingParameters object itself. + */ + public TroubleshootingParameters withStoragePath(String storagePath) { + this.storagePath = storagePath; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingRecommendedActions.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingRecommendedActions.java new file mode 100644 index 000000000000..d65f3ba5ef71 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingRecommendedActions.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recommended actions based on discovered issues. + */ +public class TroubleshootingRecommendedActions { + /** + * ID of the recommended action. + */ + @JsonProperty(value = "actionId") + private String actionId; + + /** + * Description of recommended actions. + */ + @JsonProperty(value = "actionText") + private String actionText; + + /** + * The uri linking to a documentation for the recommended troubleshooting + * actions. + */ + @JsonProperty(value = "actionUri") + private String actionUri; + + /** + * The information from the URI for the recommended troubleshooting + * actions. + */ + @JsonProperty(value = "actionUriText") + private String actionUriText; + + /** + * Get iD of the recommended action. + * + * @return the actionId value + */ + public String actionId() { + return this.actionId; + } + + /** + * Set iD of the recommended action. + * + * @param actionId the actionId value to set + * @return the TroubleshootingRecommendedActions object itself. + */ + public TroubleshootingRecommendedActions withActionId(String actionId) { + this.actionId = actionId; + return this; + } + + /** + * Get description of recommended actions. + * + * @return the actionText value + */ + public String actionText() { + return this.actionText; + } + + /** + * Set description of recommended actions. + * + * @param actionText the actionText value to set + * @return the TroubleshootingRecommendedActions object itself. + */ + public TroubleshootingRecommendedActions withActionText(String actionText) { + this.actionText = actionText; + return this; + } + + /** + * Get the uri linking to a documentation for the recommended troubleshooting actions. + * + * @return the actionUri value + */ + public String actionUri() { + return this.actionUri; + } + + /** + * Set the uri linking to a documentation for the recommended troubleshooting actions. + * + * @param actionUri the actionUri value to set + * @return the TroubleshootingRecommendedActions object itself. + */ + public TroubleshootingRecommendedActions withActionUri(String actionUri) { + this.actionUri = actionUri; + return this; + } + + /** + * Get the information from the URI for the recommended troubleshooting actions. + * + * @return the actionUriText value + */ + public String actionUriText() { + return this.actionUriText; + } + + /** + * Set the information from the URI for the recommended troubleshooting actions. + * + * @param actionUriText the actionUriText value to set + * @return the TroubleshootingRecommendedActions object itself. + */ + public TroubleshootingRecommendedActions withActionUriText(String actionUriText) { + this.actionUriText = actionUriText; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingResult.java new file mode 100644 index 000000000000..6960b30fb990 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TroubleshootingResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.TroubleshootingResultInner; +import org.joda.time.DateTime; +import java.util.List; + +/** + * Type representing TroubleshootingResult. + */ +public interface TroubleshootingResult extends HasInner, HasManager { + /** + * @return the code value. + */ + String code(); + + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the results value. + */ + List results(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TunnelConnectionHealth.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TunnelConnectionHealth.java new file mode 100644 index 000000000000..b681b612751a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TunnelConnectionHealth.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * VirtualNetworkGatewayConnection properties. + */ +public class TunnelConnectionHealth { + /** + * Tunnel name. + */ + @JsonProperty(value = "tunnel", access = JsonProperty.Access.WRITE_ONLY) + private String tunnel; + + /** + * Virtual Network Gateway connection status. Possible values include: + * 'Unknown', 'Connecting', 'Connected', 'NotConnected'. + */ + @JsonProperty(value = "connectionStatus", access = JsonProperty.Access.WRITE_ONLY) + private VirtualNetworkGatewayConnectionStatus connectionStatus; + + /** + * The Ingress Bytes Transferred in this connection. + */ + @JsonProperty(value = "ingressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long ingressBytesTransferred; + + /** + * The Egress Bytes Transferred in this connection. + */ + @JsonProperty(value = "egressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long egressBytesTransferred; + + /** + * The time at which connection was established in Utc format. + */ + @JsonProperty(value = "lastConnectionEstablishedUtcTime", access = JsonProperty.Access.WRITE_ONLY) + private String lastConnectionEstablishedUtcTime; + + /** + * Get tunnel name. + * + * @return the tunnel value + */ + public String tunnel() { + return this.tunnel; + } + + /** + * Get virtual Network Gateway connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'. + * + * @return the connectionStatus value + */ + public VirtualNetworkGatewayConnectionStatus connectionStatus() { + return this.connectionStatus; + } + + /** + * Get the Ingress Bytes Transferred in this connection. + * + * @return the ingressBytesTransferred value + */ + public Long ingressBytesTransferred() { + return this.ingressBytesTransferred; + } + + /** + * Get the Egress Bytes Transferred in this connection. + * + * @return the egressBytesTransferred value + */ + public Long egressBytesTransferred() { + return this.egressBytesTransferred; + } + + /** + * Get the time at which connection was established in Utc format. + * + * @return the lastConnectionEstablishedUtcTime value + */ + public String lastConnectionEstablishedUtcTime() { + return this.lastConnectionEstablishedUtcTime; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TunnelConnectionStatus.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TunnelConnectionStatus.java new file mode 100644 index 000000000000..9e46cf8a7ab6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/TunnelConnectionStatus.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for TunnelConnectionStatus. + */ +public final class TunnelConnectionStatus extends ExpandableStringEnum { + /** Static value Unknown for TunnelConnectionStatus. */ + public static final TunnelConnectionStatus UNKNOWN = fromString("Unknown"); + + /** Static value Connecting for TunnelConnectionStatus. */ + public static final TunnelConnectionStatus CONNECTING = fromString("Connecting"); + + /** Static value Connected for TunnelConnectionStatus. */ + public static final TunnelConnectionStatus CONNECTED = fromString("Connected"); + + /** Static value NotConnected for TunnelConnectionStatus. */ + public static final TunnelConnectionStatus NOT_CONNECTED = fromString("NotConnected"); + + /** + * Creates or finds a TunnelConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding TunnelConnectionStatus + */ + @JsonCreator + public static TunnelConnectionStatus fromString(String name) { + return fromString(name, TunnelConnectionStatus.class); + } + + /** + * @return known TunnelConnectionStatus values + */ + public static Collection values() { + return values(TunnelConnectionStatus.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/UnprepareNetworkPoliciesRequest.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/UnprepareNetworkPoliciesRequest.java new file mode 100644 index 000000000000..7a8fdea18e02 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/UnprepareNetworkPoliciesRequest.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of UnprepareNetworkPolicies for Subnet. + */ +public class UnprepareNetworkPoliciesRequest { + /** + * The name of the service for which subnet is being unprepared for. + */ + @JsonProperty(value = "serviceName") + private String serviceName; + + /** + * Get the name of the service for which subnet is being unprepared for. + * + * @return the serviceName value + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set the name of the service for which subnet is being unprepared for. + * + * @param serviceName the serviceName value to set + * @return the UnprepareNetworkPoliciesRequest object itself. + */ + public UnprepareNetworkPoliciesRequest withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Usage.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Usage.java new file mode 100644 index 000000000000..6c629042b973 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Usage.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.UsageInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing Usage. + */ +public interface Usage extends HasInner, HasManager { + /** + * @return the currentValue value. + */ + long currentValue(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the limit value. + */ + long limit(); + + /** + * @return the name value. + */ + UsageName name(); + + /** + * @return the unit value. + */ + String unit(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/UsageName.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/UsageName.java new file mode 100644 index 000000000000..ddf764cec09c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/UsageName.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The usage names. + */ +public class UsageName { + /** + * A string describing the resource name. + */ + @JsonProperty(value = "value") + private String value; + + /** + * A localized string describing the resource name. + */ + @JsonProperty(value = "localizedValue") + private String localizedValue; + + /** + * Get a string describing the resource name. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set a string describing the resource name. + * + * @param value the value value to set + * @return the UsageName object itself. + */ + public UsageName withValue(String value) { + this.value = value; + return this; + } + + /** + * Get a localized string describing the resource name. + * + * @return the localizedValue value + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Set a localized string describing the resource name. + * + * @param localizedValue the localizedValue value to set + * @return the UsageName object itself. + */ + public UsageName withLocalizedValue(String localizedValue) { + this.localizedValue = localizedValue; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Usages.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Usages.java new file mode 100644 index 000000000000..910f7422ccf9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Usages.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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.UsagesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Usages. + */ +public interface Usages extends HasInner { + /** + * List network usages for a subscription. + * + * @param location The location where resource usage is queried. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String location); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VerbosityLevel.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VerbosityLevel.java new file mode 100644 index 000000000000..3298e42e7bc3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VerbosityLevel.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VerbosityLevel. + */ +public final class VerbosityLevel extends ExpandableStringEnum { + /** Static value Normal for VerbosityLevel. */ + public static final VerbosityLevel NORMAL = fromString("Normal"); + + /** Static value Minimum for VerbosityLevel. */ + public static final VerbosityLevel MINIMUM = fromString("Minimum"); + + /** Static value Full for VerbosityLevel. */ + public static final VerbosityLevel FULL = fromString("Full"); + + /** + * Creates or finds a VerbosityLevel from its string representation. + * @param name a name to look for + * @return the corresponding VerbosityLevel + */ + @JsonCreator + public static VerbosityLevel fromString(String name) { + return fromString(name, VerbosityLevel.class); + } + + /** + * @return known VerbosityLevel values + */ + public static Collection values() { + return values(VerbosityLevel.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VerificationIPFlowParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VerificationIPFlowParameters.java new file mode 100644 index 000000000000..5b7f31198d09 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VerificationIPFlowParameters.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the IP flow to be verified. + */ +public class VerificationIPFlowParameters { + /** + * The ID of the target resource to perform next-hop on. + */ + @JsonProperty(value = "targetResourceId", required = true) + private String targetResourceId; + + /** + * The direction of the packet represented as a 5-tuple. Possible values + * include: 'Inbound', 'Outbound'. + */ + @JsonProperty(value = "direction", required = true) + private Direction direction; + + /** + * Protocol to be verified on. Possible values include: 'TCP', 'UDP'. + */ + @JsonProperty(value = "protocol", required = true) + private IpFlowProtocol protocol; + + /** + * The local port. Acceptable values are a single integer in the range + * (0-65535). Support for * for the source port, which depends on the + * direction. + */ + @JsonProperty(value = "localPort", required = true) + private String localPort; + + /** + * The remote port. Acceptable values are a single integer in the range + * (0-65535). Support for * for the source port, which depends on the + * direction. + */ + @JsonProperty(value = "remotePort", required = true) + private String remotePort; + + /** + * The local IP address. Acceptable values are valid IPv4 addresses. + */ + @JsonProperty(value = "localIPAddress", required = true) + private String localIPAddress; + + /** + * The remote IP address. Acceptable values are valid IPv4 addresses. + */ + @JsonProperty(value = "remoteIPAddress", required = true) + private String remoteIPAddress; + + /** + * The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any + * of them, then this parameter must be specified. Otherwise optional). + */ + @JsonProperty(value = "targetNicResourceId") + private String targetNicResourceId; + + /** + * Get the ID of the target resource to perform next-hop on. + * + * @return the targetResourceId value + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the ID of the target resource to perform next-hop on. + * + * @param targetResourceId the targetResourceId value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + + /** + * Get the direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'. + * + * @return the direction value + */ + public Direction direction() { + return this.direction; + } + + /** + * Set the direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'. + * + * @param direction the direction value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withDirection(Direction direction) { + this.direction = direction; + return this; + } + + /** + * Get protocol to be verified on. Possible values include: 'TCP', 'UDP'. + * + * @return the protocol value + */ + public IpFlowProtocol protocol() { + return this.protocol; + } + + /** + * Set protocol to be verified on. Possible values include: 'TCP', 'UDP'. + * + * @param protocol the protocol value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withProtocol(IpFlowProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. + * + * @return the localPort value + */ + public String localPort() { + return this.localPort; + } + + /** + * Set the local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. + * + * @param localPort the localPort value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withLocalPort(String localPort) { + this.localPort = localPort; + return this; + } + + /** + * Get the remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. + * + * @return the remotePort value + */ + public String remotePort() { + return this.remotePort; + } + + /** + * Set the remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. + * + * @param remotePort the remotePort value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withRemotePort(String remotePort) { + this.remotePort = remotePort; + return this; + } + + /** + * Get the local IP address. Acceptable values are valid IPv4 addresses. + * + * @return the localIPAddress value + */ + public String localIPAddress() { + return this.localIPAddress; + } + + /** + * Set the local IP address. Acceptable values are valid IPv4 addresses. + * + * @param localIPAddress the localIPAddress value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withLocalIPAddress(String localIPAddress) { + this.localIPAddress = localIPAddress; + return this; + } + + /** + * Get the remote IP address. Acceptable values are valid IPv4 addresses. + * + * @return the remoteIPAddress value + */ + public String remoteIPAddress() { + return this.remoteIPAddress; + } + + /** + * Set the remote IP address. Acceptable values are valid IPv4 addresses. + * + * @param remoteIPAddress the remoteIPAddress value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withRemoteIPAddress(String remoteIPAddress) { + this.remoteIPAddress = remoteIPAddress; + return this; + } + + /** + * Get the NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional). + * + * @return the targetNicResourceId value + */ + public String targetNicResourceId() { + return this.targetNicResourceId; + } + + /** + * Set the NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional). + * + * @param targetNicResourceId the targetNicResourceId value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withTargetNicResourceId(String targetNicResourceId) { + this.targetNicResourceId = targetNicResourceId; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VerificationIPFlowResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VerificationIPFlowResult.java new file mode 100644 index 000000000000..80f5112d5ac6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VerificationIPFlowResult.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VerificationIPFlowResultInner; + +/** + * Type representing VerificationIPFlowResult. + */ +public interface VerificationIPFlowResult extends HasInner, HasManager { + /** + * @return the access value. + */ + Access access(); + + /** + * @return the ruleName value. + */ + String ruleName(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHub.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHub.java new file mode 100644 index 000000000000..87fd51e743c5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHub.java @@ -0,0 +1,401 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualHubRouteTableV2Inner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.HubVirtualNetworkConnectionInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualHubInner; + +/** + * Type representing VirtualHub. + */ +public interface VirtualHub extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the addressPrefix value. + */ + String addressPrefix(); + + /** + * @return the azureFirewall value. + */ + SubResource azureFirewall(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the expressRouteGateway value. + */ + SubResource expressRouteGateway(); + + /** + * @return the p2SVpnGateway value. + */ + SubResource p2SVpnGateway(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the routeTable value. + */ + VirtualHubRouteTable routeTable(); + + /** + * @return the securityProviderName value. + */ + String securityProviderName(); + + /** + * @return the sku value. + */ + String sku(); + + /** + * @return the virtualHubRouteTableV2s value. + */ + List virtualHubRouteTableV2s(); + + /** + * @return the virtualNetworkConnections value. + */ + List virtualNetworkConnections(); + + /** + * @return the virtualWan value. + */ + SubResource virtualWan(); + + /** + * @return the vpnGateway value. + */ + SubResource vpnGateway(); + + /** + * The entirety of the VirtualHub definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of VirtualHub definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VirtualHub definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the VirtualHub definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the virtualhub definition allowing to specify AddressPrefix. + */ + interface WithAddressPrefix { + /** + * Specifies addressPrefix. + * @param addressPrefix Address-prefix for this VirtualHub + * @return the next definition stage + */ + WithCreate withAddressPrefix(String addressPrefix); + } + + /** + * The stage of the virtualhub definition allowing to specify AzureFirewall. + */ + interface WithAzureFirewall { + /** + * Specifies azureFirewall. + * @param azureFirewall The azureFirewall associated with this VirtualHub + * @return the next definition stage + */ + WithCreate withAzureFirewall(SubResource azureFirewall); + } + + /** + * The stage of the virtualhub definition allowing to specify ExpressRouteGateway. + */ + interface WithExpressRouteGateway { + /** + * Specifies expressRouteGateway. + * @param expressRouteGateway The expressRouteGateway associated with this VirtualHub + * @return the next definition stage + */ + WithCreate withExpressRouteGateway(SubResource expressRouteGateway); + } + + /** + * The stage of the virtualhub definition allowing to specify P2SVpnGateway. + */ + interface WithP2SVpnGateway { + /** + * Specifies p2SVpnGateway. + * @param p2SVpnGateway The P2SVpnGateway associated with this VirtualHub + * @return the next definition stage + */ + WithCreate withP2SVpnGateway(SubResource p2SVpnGateway); + } + + /** + * The stage of the virtualhub definition allowing to specify RouteTable. + */ + interface WithRouteTable { + /** + * Specifies routeTable. + * @param routeTable The routeTable associated with this virtual hub + * @return the next definition stage + */ + WithCreate withRouteTable(VirtualHubRouteTable routeTable); + } + + /** + * The stage of the virtualhub definition allowing to specify SecurityProviderName. + */ + interface WithSecurityProviderName { + /** + * Specifies securityProviderName. + * @param securityProviderName The Security Provider name + * @return the next definition stage + */ + WithCreate withSecurityProviderName(String securityProviderName); + } + + /** + * The stage of the virtualhub definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The sku of this VirtualHub + * @return the next definition stage + */ + WithCreate withSku(String sku); + } + + /** + * The stage of the virtualhub definition allowing to specify VirtualHubRouteTableV2s. + */ + interface WithVirtualHubRouteTableV2s { + /** + * Specifies virtualHubRouteTableV2s. + * @param virtualHubRouteTableV2s List of all virtual hub route table v2s associated with this VirtualHub + * @return the next definition stage + */ + WithCreate withVirtualHubRouteTableV2s(List virtualHubRouteTableV2s); + } + + /** + * The stage of the virtualhub definition allowing to specify VirtualNetworkConnections. + */ + interface WithVirtualNetworkConnections { + /** + * Specifies virtualNetworkConnections. + * @param virtualNetworkConnections List of all vnet connections with this VirtualHub + * @return the next definition stage + */ + WithCreate withVirtualNetworkConnections(List virtualNetworkConnections); + } + + /** + * The stage of the virtualhub definition allowing to specify VirtualWan. + */ + interface WithVirtualWan { + /** + * Specifies virtualWan. + * @param virtualWan The VirtualWAN to which the VirtualHub belongs + * @return the next definition stage + */ + WithCreate withVirtualWan(SubResource virtualWan); + } + + /** + * The stage of the virtualhub definition allowing to specify VpnGateway. + */ + interface WithVpnGateway { + /** + * Specifies vpnGateway. + * @param vpnGateway The VpnGateway associated with this VirtualHub + * @return the next definition stage + */ + WithCreate withVpnGateway(SubResource vpnGateway); + } + + /** + * 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.WithAddressPrefix, DefinitionStages.WithAzureFirewall, DefinitionStages.WithExpressRouteGateway, DefinitionStages.WithP2SVpnGateway, DefinitionStages.WithRouteTable, DefinitionStages.WithSecurityProviderName, DefinitionStages.WithSku, DefinitionStages.WithVirtualHubRouteTableV2s, DefinitionStages.WithVirtualNetworkConnections, DefinitionStages.WithVirtualWan, DefinitionStages.WithVpnGateway { + } + } + /** + * The template for a VirtualHub update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAddressPrefix, UpdateStages.WithAzureFirewall, UpdateStages.WithExpressRouteGateway, UpdateStages.WithP2SVpnGateway, UpdateStages.WithRouteTable, UpdateStages.WithSecurityProviderName, UpdateStages.WithSku, UpdateStages.WithVirtualHubRouteTableV2s, UpdateStages.WithVirtualNetworkConnections, UpdateStages.WithVirtualWan, UpdateStages.WithVpnGateway { + } + + /** + * Grouping of VirtualHub update stages. + */ + interface UpdateStages { + /** + * The stage of the virtualhub update allowing to specify AddressPrefix. + */ + interface WithAddressPrefix { + /** + * Specifies addressPrefix. + * @param addressPrefix Address-prefix for this VirtualHub + * @return the next update stage + */ + Update withAddressPrefix(String addressPrefix); + } + + /** + * The stage of the virtualhub update allowing to specify AzureFirewall. + */ + interface WithAzureFirewall { + /** + * Specifies azureFirewall. + * @param azureFirewall The azureFirewall associated with this VirtualHub + * @return the next update stage + */ + Update withAzureFirewall(SubResource azureFirewall); + } + + /** + * The stage of the virtualhub update allowing to specify ExpressRouteGateway. + */ + interface WithExpressRouteGateway { + /** + * Specifies expressRouteGateway. + * @param expressRouteGateway The expressRouteGateway associated with this VirtualHub + * @return the next update stage + */ + Update withExpressRouteGateway(SubResource expressRouteGateway); + } + + /** + * The stage of the virtualhub update allowing to specify P2SVpnGateway. + */ + interface WithP2SVpnGateway { + /** + * Specifies p2SVpnGateway. + * @param p2SVpnGateway The P2SVpnGateway associated with this VirtualHub + * @return the next update stage + */ + Update withP2SVpnGateway(SubResource p2SVpnGateway); + } + + /** + * The stage of the virtualhub update allowing to specify RouteTable. + */ + interface WithRouteTable { + /** + * Specifies routeTable. + * @param routeTable The routeTable associated with this virtual hub + * @return the next update stage + */ + Update withRouteTable(VirtualHubRouteTable routeTable); + } + + /** + * The stage of the virtualhub update allowing to specify SecurityProviderName. + */ + interface WithSecurityProviderName { + /** + * Specifies securityProviderName. + * @param securityProviderName The Security Provider name + * @return the next update stage + */ + Update withSecurityProviderName(String securityProviderName); + } + + /** + * The stage of the virtualhub update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The sku of this VirtualHub + * @return the next update stage + */ + Update withSku(String sku); + } + + /** + * The stage of the virtualhub update allowing to specify VirtualHubRouteTableV2s. + */ + interface WithVirtualHubRouteTableV2s { + /** + * Specifies virtualHubRouteTableV2s. + * @param virtualHubRouteTableV2s List of all virtual hub route table v2s associated with this VirtualHub + * @return the next update stage + */ + Update withVirtualHubRouteTableV2s(List virtualHubRouteTableV2s); + } + + /** + * The stage of the virtualhub update allowing to specify VirtualNetworkConnections. + */ + interface WithVirtualNetworkConnections { + /** + * Specifies virtualNetworkConnections. + * @param virtualNetworkConnections List of all vnet connections with this VirtualHub + * @return the next update stage + */ + Update withVirtualNetworkConnections(List virtualNetworkConnections); + } + + /** + * The stage of the virtualhub update allowing to specify VirtualWan. + */ + interface WithVirtualWan { + /** + * Specifies virtualWan. + * @param virtualWan The VirtualWAN to which the VirtualHub belongs + * @return the next update stage + */ + Update withVirtualWan(SubResource virtualWan); + } + + /** + * The stage of the virtualhub update allowing to specify VpnGateway. + */ + interface WithVpnGateway { + /** + * Specifies vpnGateway. + * @param vpnGateway The VpnGateway associated with this VirtualHub + * @return the next update stage + */ + Update withVpnGateway(SubResource vpnGateway); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubId.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubId.java new file mode 100644 index 000000000000..d96682ee73e6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubId.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Virtual Hub identifier. + */ +public class VirtualHubId { + /** + * The resource URI for the Virtual Hub where the ExpressRoute gateway is + * or will be deployed. The Virtual Hub resource and the ExpressRoute + * gateway resource reside in the same subscription. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the resource URI for the Virtual Hub where the ExpressRoute gateway is or will be deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same subscription. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the resource URI for the Virtual Hub where the ExpressRoute gateway is or will be deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same subscription. + * + * @param id the id value to set + * @return the VirtualHubId object itself. + */ + public VirtualHubId withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRoute.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRoute.java new file mode 100644 index 000000000000..e0f2308f0ebf --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRoute.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * VirtualHub route. + */ +public class VirtualHubRoute { + /** + * List of all addressPrefixes. + */ + @JsonProperty(value = "addressPrefixes") + private List addressPrefixes; + + /** + * NextHop ip address. + */ + @JsonProperty(value = "nextHopIpAddress") + private String nextHopIpAddress; + + /** + * Get list of all addressPrefixes. + * + * @return the addressPrefixes value + */ + public List addressPrefixes() { + return this.addressPrefixes; + } + + /** + * Set list of all addressPrefixes. + * + * @param addressPrefixes the addressPrefixes value to set + * @return the VirtualHubRoute object itself. + */ + public VirtualHubRoute withAddressPrefixes(List addressPrefixes) { + this.addressPrefixes = addressPrefixes; + return this; + } + + /** + * Get nextHop ip address. + * + * @return the nextHopIpAddress value + */ + public String nextHopIpAddress() { + return this.nextHopIpAddress; + } + + /** + * Set nextHop ip address. + * + * @param nextHopIpAddress the nextHopIpAddress value to set + * @return the VirtualHubRoute object itself. + */ + public VirtualHubRoute withNextHopIpAddress(String nextHopIpAddress) { + this.nextHopIpAddress = nextHopIpAddress; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteTable.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteTable.java new file mode 100644 index 000000000000..95747b68f0bc --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteTable.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * VirtualHub route table. + */ +public class VirtualHubRouteTable { + /** + * List of all routes. + */ + @JsonProperty(value = "routes") + private List routes; + + /** + * Get list of all routes. + * + * @return the routes value + */ + public List routes() { + return this.routes; + } + + /** + * Set list of all routes. + * + * @param routes the routes value to set + * @return the VirtualHubRouteTable object itself. + */ + public VirtualHubRouteTable withRoutes(List routes) { + this.routes = routes; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteTableV2.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteTableV2.java new file mode 100644 index 000000000000..d2e35f3950b1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteTableV2.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualHubRouteTableV2Inner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; + +/** + * Type representing VirtualHubRouteTableV2. + */ +public interface VirtualHubRouteTableV2 extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the attachedConnections value. + */ + List attachedConnections(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the routes value. + */ + List routes(); + + /** + * The entirety of the VirtualHubRouteTableV2 definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithVirtualHub, DefinitionStages.WithCreate { + } + + /** + * Grouping of VirtualHubRouteTableV2 definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VirtualHubRouteTableV2 definition. + */ + interface Blank extends WithVirtualHub { + } + + /** + * The stage of the virtualhubroutetablev2 definition allowing to specify VirtualHub. + */ + interface WithVirtualHub { + /** + * Specifies resourceGroupName, virtualHubName. + * @param resourceGroupName The resource group name of the VirtualHub + * @param virtualHubName The name of the VirtualHub + * @return the next definition stage + */ + WithCreate withExistingVirtualHub(String resourceGroupName, String virtualHubName); + } + + /** + * The stage of the virtualhubroutetablev2 definition allowing to specify AttachedConnections. + */ + interface WithAttachedConnections { + /** + * Specifies attachedConnections. + * @param attachedConnections List of all connections attached to this route table v2 + * @return the next definition stage + */ + WithCreate withAttachedConnections(List attachedConnections); + } + + /** + * The stage of the virtualhubroutetablev2 definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the virtualhubroutetablev2 definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the virtualhubroutetablev2 definition allowing to specify Routes. + */ + interface WithRoutes { + /** + * Specifies routes. + * @param routes List of all routes + * @return the next definition stage + */ + WithCreate withRoutes(List routes); + } + + /** + * 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.WithAttachedConnections, DefinitionStages.WithId, DefinitionStages.WithName, DefinitionStages.WithRoutes { + } + } + /** + * The template for a VirtualHubRouteTableV2 update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAttachedConnections, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithRoutes { + } + + /** + * Grouping of VirtualHubRouteTableV2 update stages. + */ + interface UpdateStages { + /** + * The stage of the virtualhubroutetablev2 update allowing to specify AttachedConnections. + */ + interface WithAttachedConnections { + /** + * Specifies attachedConnections. + * @param attachedConnections List of all connections attached to this route table v2 + * @return the next update stage + */ + Update withAttachedConnections(List attachedConnections); + } + + /** + * The stage of the virtualhubroutetablev2 update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the virtualhubroutetablev2 update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the virtualhubroutetablev2 update allowing to specify Routes. + */ + interface WithRoutes { + /** + * Specifies routes. + * @param routes List of all routes + * @return the next update stage + */ + Update withRoutes(List routes); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteTableV2s.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteTableV2s.java new file mode 100644 index 000000000000..021f2d78d98b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteTableV2s.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualHubRouteTableV2sInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VirtualHubRouteTableV2s. + */ +public interface VirtualHubRouteTableV2s extends SupportsCreating, HasInner { + /** + * Retrieves the details of a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String virtualHubName, String routeTableName); + + /** + * Retrieves the details of all VirtualHubRouteTableV2s. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String virtualHubName); + + /** + * Deletes a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String virtualHubName, String routeTableName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteV2.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteV2.java new file mode 100644 index 000000000000..9e549bd4a1f6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubRouteV2.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * VirtualHubRouteTableV2 route. + */ +public class VirtualHubRouteV2 { + /** + * The type of destinations. + */ + @JsonProperty(value = "destinationType") + private String destinationType; + + /** + * List of all destinations. + */ + @JsonProperty(value = "destinations") + private List destinations; + + /** + * The type of next hops. + */ + @JsonProperty(value = "nextHopType") + private String nextHopType; + + /** + * NextHops ip address. + */ + @JsonProperty(value = "nextHops") + private List nextHops; + + /** + * Get the type of destinations. + * + * @return the destinationType value + */ + public String destinationType() { + return this.destinationType; + } + + /** + * Set the type of destinations. + * + * @param destinationType the destinationType value to set + * @return the VirtualHubRouteV2 object itself. + */ + public VirtualHubRouteV2 withDestinationType(String destinationType) { + this.destinationType = destinationType; + return this; + } + + /** + * Get list of all destinations. + * + * @return the destinations value + */ + public List destinations() { + return this.destinations; + } + + /** + * Set list of all destinations. + * + * @param destinations the destinations value to set + * @return the VirtualHubRouteV2 object itself. + */ + public VirtualHubRouteV2 withDestinations(List destinations) { + this.destinations = destinations; + return this; + } + + /** + * Get the type of next hops. + * + * @return the nextHopType value + */ + public String nextHopType() { + return this.nextHopType; + } + + /** + * Set the type of next hops. + * + * @param nextHopType the nextHopType value to set + * @return the VirtualHubRouteV2 object itself. + */ + public VirtualHubRouteV2 withNextHopType(String nextHopType) { + this.nextHopType = nextHopType; + return this; + } + + /** + * Get nextHops ip address. + * + * @return the nextHops value + */ + public List nextHops() { + return this.nextHops; + } + + /** + * Set nextHops ip address. + * + * @param nextHops the nextHops value to set + * @return the VirtualHubRouteV2 object itself. + */ + public VirtualHubRouteV2 withNextHops(List nextHops) { + this.nextHops = nextHops; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubs.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubs.java new file mode 100644 index 000000000000..0ee1af363b15 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualHubs.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.network.v2019_09_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.network.v2019_09_01.implementation.VirtualHubsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VirtualHubs. + */ +public interface VirtualHubs extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualMachineScaleSetNetworkInterfaceIPConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualMachineScaleSetNetworkInterfaceIPConfiguration.java new file mode 100644 index 000000000000..ff86aa031d5b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualMachineScaleSetNetworkInterfaceIPConfiguration.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkInterfaceIPConfigurationInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; + +/** + * Type representing VirtualMachineScaleSetNetworkInterfaceIPConfiguration. + */ +public interface VirtualMachineScaleSetNetworkInterfaceIPConfiguration extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the applicationGatewayBackendAddressPools value. + */ + List applicationGatewayBackendAddressPools(); + + /** + * @return the applicationSecurityGroups value. + */ + List applicationSecurityGroups(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the loadBalancerBackendAddressPools value. + */ + List loadBalancerBackendAddressPools(); + + /** + * @return the loadBalancerInboundNatRules value. + */ + List loadBalancerInboundNatRules(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the primary value. + */ + Boolean primary(); + + /** + * @return the privateIPAddress value. + */ + String privateIPAddress(); + + /** + * @return the privateIPAddressVersion value. + */ + IPVersion privateIPAddressVersion(); + + /** + * @return the privateIPAllocationMethod value. + */ + IPAllocationMethod privateIPAllocationMethod(); + + /** + * @return the privateLinkConnectionProperties value. + */ + NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnectionProperties(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the publicIPAddress value. + */ + PublicIPAddress publicIPAddress(); + + /** + * @return the subnet value. + */ + Subnet subnet(); + + /** + * @return the virtualNetworkTaps value. + */ + List virtualNetworkTaps(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetwork.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetwork.java new file mode 100644 index 000000000000..e7eda84554ca --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetwork.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. + */ + +package com.microsoft.azure.management.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.SubnetInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualNetworkPeeringInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualNetworkInner; + +/** + * Type representing VirtualNetwork. + */ +public interface VirtualNetwork extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the addressSpace value. + */ + AddressSpace addressSpace(); + + /** + * @return the bgpCommunities value. + */ + VirtualNetworkBgpCommunities bgpCommunities(); + + /** + * @return the ddosProtectionPlan value. + */ + SubResource ddosProtectionPlan(); + + /** + * @return the dhcpOptions value. + */ + DhcpOptions dhcpOptions(); + + /** + * @return the enableDdosProtection value. + */ + Boolean enableDdosProtection(); + + /** + * @return the enableVmProtection value. + */ + Boolean enableVmProtection(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the subnets value. + */ + List subnets(); + + /** + * @return the virtualNetworkPeerings value. + */ + List virtualNetworkPeerings(); + + /** + * The entirety of the VirtualNetwork definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of VirtualNetwork definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VirtualNetwork definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the VirtualNetwork definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the virtualnetwork definition allowing to specify AddressSpace. + */ + interface WithAddressSpace { + /** + * Specifies addressSpace. + * @param addressSpace The AddressSpace that contains an array of IP address ranges that can be used by subnets + * @return the next definition stage + */ + WithCreate withAddressSpace(AddressSpace addressSpace); + } + + /** + * The stage of the virtualnetwork definition allowing to specify BgpCommunities. + */ + interface WithBgpCommunities { + /** + * Specifies bgpCommunities. + * @param bgpCommunities Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET + * @return the next definition stage + */ + WithCreate withBgpCommunities(VirtualNetworkBgpCommunities bgpCommunities); + } + + /** + * The stage of the virtualnetwork definition allowing to specify DdosProtectionPlan. + */ + interface WithDdosProtectionPlan { + /** + * Specifies ddosProtectionPlan. + * @param ddosProtectionPlan The DDoS protection plan associated with the virtual network + * @return the next definition stage + */ + WithCreate withDdosProtectionPlan(SubResource ddosProtectionPlan); + } + + /** + * The stage of the virtualnetwork definition allowing to specify DhcpOptions. + */ + interface WithDhcpOptions { + /** + * Specifies dhcpOptions. + * @param dhcpOptions The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network + * @return the next definition stage + */ + WithCreate withDhcpOptions(DhcpOptions dhcpOptions); + } + + /** + * The stage of the virtualnetwork definition allowing to specify EnableDdosProtection. + */ + interface WithEnableDdosProtection { + /** + * Specifies enableDdosProtection. + * @param enableDdosProtection Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource + * @return the next definition stage + */ + WithCreate withEnableDdosProtection(Boolean enableDdosProtection); + } + + /** + * The stage of the virtualnetwork definition allowing to specify EnableVmProtection. + */ + interface WithEnableVmProtection { + /** + * Specifies enableVmProtection. + * @param enableVmProtection Indicates if VM protection is enabled for all the subnets in the virtual network + * @return the next definition stage + */ + WithCreate withEnableVmProtection(Boolean enableVmProtection); + } + + /** + * The stage of the virtualnetwork definition allowing to specify Subnets. + */ + interface WithSubnets { + /** + * Specifies subnets. + * @param subnets A list of subnets in a Virtual Network + * @return the next definition stage + */ + WithCreate withSubnets(List subnets); + } + + /** + * The stage of the virtualnetwork definition allowing to specify VirtualNetworkPeerings. + */ + interface WithVirtualNetworkPeerings { + /** + * Specifies virtualNetworkPeerings. + * @param virtualNetworkPeerings A list of peerings in a Virtual Network + * @return the next definition stage + */ + WithCreate withVirtualNetworkPeerings(List virtualNetworkPeerings); + } + + /** + * 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.WithAddressSpace, DefinitionStages.WithBgpCommunities, DefinitionStages.WithDdosProtectionPlan, DefinitionStages.WithDhcpOptions, DefinitionStages.WithEnableDdosProtection, DefinitionStages.WithEnableVmProtection, DefinitionStages.WithSubnets, DefinitionStages.WithVirtualNetworkPeerings { + } + } + /** + * The template for a VirtualNetwork update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAddressSpace, UpdateStages.WithBgpCommunities, UpdateStages.WithDdosProtectionPlan, UpdateStages.WithDhcpOptions, UpdateStages.WithEnableDdosProtection, UpdateStages.WithEnableVmProtection, UpdateStages.WithSubnets, UpdateStages.WithVirtualNetworkPeerings { + } + + /** + * Grouping of VirtualNetwork update stages. + */ + interface UpdateStages { + /** + * The stage of the virtualnetwork update allowing to specify AddressSpace. + */ + interface WithAddressSpace { + /** + * Specifies addressSpace. + * @param addressSpace The AddressSpace that contains an array of IP address ranges that can be used by subnets + * @return the next update stage + */ + Update withAddressSpace(AddressSpace addressSpace); + } + + /** + * The stage of the virtualnetwork update allowing to specify BgpCommunities. + */ + interface WithBgpCommunities { + /** + * Specifies bgpCommunities. + * @param bgpCommunities Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET + * @return the next update stage + */ + Update withBgpCommunities(VirtualNetworkBgpCommunities bgpCommunities); + } + + /** + * The stage of the virtualnetwork update allowing to specify DdosProtectionPlan. + */ + interface WithDdosProtectionPlan { + /** + * Specifies ddosProtectionPlan. + * @param ddosProtectionPlan The DDoS protection plan associated with the virtual network + * @return the next update stage + */ + Update withDdosProtectionPlan(SubResource ddosProtectionPlan); + } + + /** + * The stage of the virtualnetwork update allowing to specify DhcpOptions. + */ + interface WithDhcpOptions { + /** + * Specifies dhcpOptions. + * @param dhcpOptions The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network + * @return the next update stage + */ + Update withDhcpOptions(DhcpOptions dhcpOptions); + } + + /** + * The stage of the virtualnetwork update allowing to specify EnableDdosProtection. + */ + interface WithEnableDdosProtection { + /** + * Specifies enableDdosProtection. + * @param enableDdosProtection Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource + * @return the next update stage + */ + Update withEnableDdosProtection(Boolean enableDdosProtection); + } + + /** + * The stage of the virtualnetwork update allowing to specify EnableVmProtection. + */ + interface WithEnableVmProtection { + /** + * Specifies enableVmProtection. + * @param enableVmProtection Indicates if VM protection is enabled for all the subnets in the virtual network + * @return the next update stage + */ + Update withEnableVmProtection(Boolean enableVmProtection); + } + + /** + * The stage of the virtualnetwork update allowing to specify Subnets. + */ + interface WithSubnets { + /** + * Specifies subnets. + * @param subnets A list of subnets in a Virtual Network + * @return the next update stage + */ + Update withSubnets(List subnets); + } + + /** + * The stage of the virtualnetwork update allowing to specify VirtualNetworkPeerings. + */ + interface WithVirtualNetworkPeerings { + /** + * Specifies virtualNetworkPeerings. + * @param virtualNetworkPeerings A list of peerings in a Virtual Network + * @return the next update stage + */ + Update withVirtualNetworkPeerings(List virtualNetworkPeerings); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkBgpCommunities.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkBgpCommunities.java new file mode 100644 index 000000000000..a196828d88ca --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkBgpCommunities.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Bgp Communities sent over ExpressRoute with each route corresponding to a + * prefix in this VNET. + */ +public class VirtualNetworkBgpCommunities { + /** + * The BGP community associated with the virtual network. + */ + @JsonProperty(value = "virtualNetworkCommunity", required = true) + private String virtualNetworkCommunity; + + /** + * The BGP community associated with the region of the virtual network. + */ + @JsonProperty(value = "regionalCommunity", access = JsonProperty.Access.WRITE_ONLY) + private String regionalCommunity; + + /** + * Get the BGP community associated with the virtual network. + * + * @return the virtualNetworkCommunity value + */ + public String virtualNetworkCommunity() { + return this.virtualNetworkCommunity; + } + + /** + * Set the BGP community associated with the virtual network. + * + * @param virtualNetworkCommunity the virtualNetworkCommunity value to set + * @return the VirtualNetworkBgpCommunities object itself. + */ + public VirtualNetworkBgpCommunities withVirtualNetworkCommunity(String virtualNetworkCommunity) { + this.virtualNetworkCommunity = virtualNetworkCommunity; + return this; + } + + /** + * Get the BGP community associated with the region of the virtual network. + * + * @return the regionalCommunity value + */ + public String regionalCommunity() { + return this.regionalCommunity; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkConnectionGatewayReference.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkConnectionGatewayReference.java new file mode 100644 index 000000000000..e1e87d8761fb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkConnectionGatewayReference.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A reference to VirtualNetworkGateway or LocalNetworkGateway resource. + */ +public class VirtualNetworkConnectionGatewayReference { + /** + * The ID of VirtualNetworkGateway or LocalNetworkGateway resource. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * Get the ID of VirtualNetworkGateway or LocalNetworkGateway resource. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the ID of VirtualNetworkGateway or LocalNetworkGateway resource. + * + * @param id the id value to set + * @return the VirtualNetworkConnectionGatewayReference object itself. + */ + public VirtualNetworkConnectionGatewayReference withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGateway.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGateway.java new file mode 100644 index 000000000000..c9a7a7aa13bc --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGateway.java @@ -0,0 +1,438 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualNetworkGatewayInner; + +/** + * Type representing VirtualNetworkGateway. + */ +public interface VirtualNetworkGateway extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the activeActive value. + */ + Boolean activeActive(); + + /** + * @return the bgpSettings value. + */ + BgpSettings bgpSettings(); + + /** + * @return the customRoutes value. + */ + AddressSpace customRoutes(); + + /** + * @return the enableBgp value. + */ + Boolean enableBgp(); + + /** + * @return the enableDnsForwarding value. + */ + Boolean enableDnsForwarding(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the gatewayDefaultSite value. + */ + SubResource gatewayDefaultSite(); + + /** + * @return the gatewayType value. + */ + VirtualNetworkGatewayType gatewayType(); + + /** + * @return the inboundDnsForwardingEndpoint value. + */ + String inboundDnsForwardingEndpoint(); + + /** + * @return the ipConfigurations value. + */ + List ipConfigurations(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the sku value. + */ + VirtualNetworkGatewaySku sku(); + + /** + * @return the vpnClientConfiguration value. + */ + VpnClientConfiguration vpnClientConfiguration(); + + /** + * @return the vpnGatewayGeneration value. + */ + VpnGatewayGeneration vpnGatewayGeneration(); + + /** + * @return the vpnType value. + */ + VpnType vpnType(); + + /** + * The entirety of the VirtualNetworkGateway definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of VirtualNetworkGateway definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VirtualNetworkGateway definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the VirtualNetworkGateway definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the virtualnetworkgateway definition allowing to specify ActiveActive. + */ + interface WithActiveActive { + /** + * Specifies activeActive. + * @param activeActive ActiveActive flag + * @return the next definition stage + */ + WithCreate withActiveActive(Boolean activeActive); + } + + /** + * The stage of the virtualnetworkgateway definition allowing to specify BgpSettings. + */ + interface WithBgpSettings { + /** + * Specifies bgpSettings. + * @param bgpSettings Virtual network gateway's BGP speaker settings + * @return the next definition stage + */ + WithCreate withBgpSettings(BgpSettings bgpSettings); + } + + /** + * The stage of the virtualnetworkgateway definition allowing to specify CustomRoutes. + */ + interface WithCustomRoutes { + /** + * Specifies customRoutes. + * @param customRoutes The reference of the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient + * @return the next definition stage + */ + WithCreate withCustomRoutes(AddressSpace customRoutes); + } + + /** + * The stage of the virtualnetworkgateway definition allowing to specify EnableBgp. + */ + interface WithEnableBgp { + /** + * Specifies enableBgp. + * @param enableBgp Whether BGP is enabled for this virtual network gateway or not + * @return the next definition stage + */ + WithCreate withEnableBgp(Boolean enableBgp); + } + + /** + * The stage of the virtualnetworkgateway definition allowing to specify EnableDnsForwarding. + */ + interface WithEnableDnsForwarding { + /** + * Specifies enableDnsForwarding. + * @param enableDnsForwarding Whether dns forwarding is enabled or not + * @return the next definition stage + */ + WithCreate withEnableDnsForwarding(Boolean enableDnsForwarding); + } + + /** + * The stage of the virtualnetworkgateway definition allowing to specify GatewayDefaultSite. + */ + interface WithGatewayDefaultSite { + /** + * Specifies gatewayDefaultSite. + * @param gatewayDefaultSite The reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting + * @return the next definition stage + */ + WithCreate withGatewayDefaultSite(SubResource gatewayDefaultSite); + } + + /** + * The stage of the virtualnetworkgateway definition allowing to specify GatewayType. + */ + interface WithGatewayType { + /** + * Specifies gatewayType. + * @param gatewayType The type of this virtual network gateway. Possible values include: 'Vpn', 'ExpressRoute' + * @return the next definition stage + */ + WithCreate withGatewayType(VirtualNetworkGatewayType gatewayType); + } + + /** + * The stage of the virtualnetworkgateway definition allowing to specify IpConfigurations. + */ + interface WithIpConfigurations { + /** + * Specifies ipConfigurations. + * @param ipConfigurations IP configurations for virtual network gateway + * @return the next definition stage + */ + WithCreate withIpConfigurations(List ipConfigurations); + } + + /** + * The stage of the virtualnetworkgateway definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway + * @return the next definition stage + */ + WithCreate withSku(VirtualNetworkGatewaySku sku); + } + + /** + * The stage of the virtualnetworkgateway definition allowing to specify VpnClientConfiguration. + */ + interface WithVpnClientConfiguration { + /** + * Specifies vpnClientConfiguration. + * @param vpnClientConfiguration The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations + * @return the next definition stage + */ + WithCreate withVpnClientConfiguration(VpnClientConfiguration vpnClientConfiguration); + } + + /** + * The stage of the virtualnetworkgateway definition allowing to specify VpnGatewayGeneration. + */ + interface WithVpnGatewayGeneration { + /** + * Specifies vpnGatewayGeneration. + * @param vpnGatewayGeneration The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. Possible values include: 'None', 'Generation1', 'Generation2' + * @return the next definition stage + */ + WithCreate withVpnGatewayGeneration(VpnGatewayGeneration vpnGatewayGeneration); + } + + /** + * The stage of the virtualnetworkgateway definition allowing to specify VpnType. + */ + interface WithVpnType { + /** + * Specifies vpnType. + * @param vpnType The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased' + * @return the next definition stage + */ + WithCreate withVpnType(VpnType vpnType); + } + + /** + * 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.WithActiveActive, DefinitionStages.WithBgpSettings, DefinitionStages.WithCustomRoutes, DefinitionStages.WithEnableBgp, DefinitionStages.WithEnableDnsForwarding, DefinitionStages.WithGatewayDefaultSite, DefinitionStages.WithGatewayType, DefinitionStages.WithIpConfigurations, DefinitionStages.WithSku, DefinitionStages.WithVpnClientConfiguration, DefinitionStages.WithVpnGatewayGeneration, DefinitionStages.WithVpnType { + } + } + /** + * The template for a VirtualNetworkGateway update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithActiveActive, UpdateStages.WithBgpSettings, UpdateStages.WithCustomRoutes, UpdateStages.WithEnableBgp, UpdateStages.WithEnableDnsForwarding, UpdateStages.WithGatewayDefaultSite, UpdateStages.WithGatewayType, UpdateStages.WithIpConfigurations, UpdateStages.WithSku, UpdateStages.WithVpnClientConfiguration, UpdateStages.WithVpnGatewayGeneration, UpdateStages.WithVpnType { + } + + /** + * Grouping of VirtualNetworkGateway update stages. + */ + interface UpdateStages { + /** + * The stage of the virtualnetworkgateway update allowing to specify ActiveActive. + */ + interface WithActiveActive { + /** + * Specifies activeActive. + * @param activeActive ActiveActive flag + * @return the next update stage + */ + Update withActiveActive(Boolean activeActive); + } + + /** + * The stage of the virtualnetworkgateway update allowing to specify BgpSettings. + */ + interface WithBgpSettings { + /** + * Specifies bgpSettings. + * @param bgpSettings Virtual network gateway's BGP speaker settings + * @return the next update stage + */ + Update withBgpSettings(BgpSettings bgpSettings); + } + + /** + * The stage of the virtualnetworkgateway update allowing to specify CustomRoutes. + */ + interface WithCustomRoutes { + /** + * Specifies customRoutes. + * @param customRoutes The reference of the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient + * @return the next update stage + */ + Update withCustomRoutes(AddressSpace customRoutes); + } + + /** + * The stage of the virtualnetworkgateway update allowing to specify EnableBgp. + */ + interface WithEnableBgp { + /** + * Specifies enableBgp. + * @param enableBgp Whether BGP is enabled for this virtual network gateway or not + * @return the next update stage + */ + Update withEnableBgp(Boolean enableBgp); + } + + /** + * The stage of the virtualnetworkgateway update allowing to specify EnableDnsForwarding. + */ + interface WithEnableDnsForwarding { + /** + * Specifies enableDnsForwarding. + * @param enableDnsForwarding Whether dns forwarding is enabled or not + * @return the next update stage + */ + Update withEnableDnsForwarding(Boolean enableDnsForwarding); + } + + /** + * The stage of the virtualnetworkgateway update allowing to specify GatewayDefaultSite. + */ + interface WithGatewayDefaultSite { + /** + * Specifies gatewayDefaultSite. + * @param gatewayDefaultSite The reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting + * @return the next update stage + */ + Update withGatewayDefaultSite(SubResource gatewayDefaultSite); + } + + /** + * The stage of the virtualnetworkgateway update allowing to specify GatewayType. + */ + interface WithGatewayType { + /** + * Specifies gatewayType. + * @param gatewayType The type of this virtual network gateway. Possible values include: 'Vpn', 'ExpressRoute' + * @return the next update stage + */ + Update withGatewayType(VirtualNetworkGatewayType gatewayType); + } + + /** + * The stage of the virtualnetworkgateway update allowing to specify IpConfigurations. + */ + interface WithIpConfigurations { + /** + * Specifies ipConfigurations. + * @param ipConfigurations IP configurations for virtual network gateway + * @return the next update stage + */ + Update withIpConfigurations(List ipConfigurations); + } + + /** + * The stage of the virtualnetworkgateway update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway + * @return the next update stage + */ + Update withSku(VirtualNetworkGatewaySku sku); + } + + /** + * The stage of the virtualnetworkgateway update allowing to specify VpnClientConfiguration. + */ + interface WithVpnClientConfiguration { + /** + * Specifies vpnClientConfiguration. + * @param vpnClientConfiguration The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations + * @return the next update stage + */ + Update withVpnClientConfiguration(VpnClientConfiguration vpnClientConfiguration); + } + + /** + * The stage of the virtualnetworkgateway update allowing to specify VpnGatewayGeneration. + */ + interface WithVpnGatewayGeneration { + /** + * Specifies vpnGatewayGeneration. + * @param vpnGatewayGeneration The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. Possible values include: 'None', 'Generation1', 'Generation2' + * @return the next update stage + */ + Update withVpnGatewayGeneration(VpnGatewayGeneration vpnGatewayGeneration); + } + + /** + * The stage of the virtualnetworkgateway update allowing to specify VpnType. + */ + interface WithVpnType { + /** + * Specifies vpnType. + * @param vpnType The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased' + * @return the next update stage + */ + Update withVpnType(VpnType vpnType); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnection.java new file mode 100644 index 000000000000..20c5080703f2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnection.java @@ -0,0 +1,489 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.LocalNetworkGatewayInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualNetworkGatewayInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualNetworkGatewayConnectionInner; + +/** + * Type representing VirtualNetworkGatewayConnection. + */ +public interface VirtualNetworkGatewayConnection extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the authorizationKey value. + */ + String authorizationKey(); + + /** + * @return the connectionProtocol value. + */ + VirtualNetworkGatewayConnectionProtocol connectionProtocol(); + + /** + * @return the connectionStatus value. + */ + VirtualNetworkGatewayConnectionStatus connectionStatus(); + + /** + * @return the connectionType value. + */ + VirtualNetworkGatewayConnectionType connectionType(); + + /** + * @return the egressBytesTransferred value. + */ + Long egressBytesTransferred(); + + /** + * @return the enableBgp value. + */ + Boolean enableBgp(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the expressRouteGatewayBypass value. + */ + Boolean expressRouteGatewayBypass(); + + /** + * @return the ingressBytesTransferred value. + */ + Long ingressBytesTransferred(); + + /** + * @return the ipsecPolicies value. + */ + List ipsecPolicies(); + + /** + * @return the localNetworkGateway2 value. + */ + LocalNetworkGateway localNetworkGateway2(); + + /** + * @return the peer value. + */ + SubResource peer(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the routingWeight value. + */ + Integer routingWeight(); + + /** + * @return the sharedKey value. + */ + String sharedKey(); + + /** + * @return the trafficSelectorPolicies value. + */ + List trafficSelectorPolicies(); + + /** + * @return the tunnelConnectionStatus value. + */ + List tunnelConnectionStatus(); + + /** + * @return the usePolicyBasedTrafficSelectors value. + */ + Boolean usePolicyBasedTrafficSelectors(); + + /** + * @return the virtualNetworkGateway1 value. + */ + VirtualNetworkGateway virtualNetworkGateway1(); + + /** + * @return the virtualNetworkGateway2 value. + */ + VirtualNetworkGateway virtualNetworkGateway2(); + + /** + * The entirety of the VirtualNetworkGatewayConnection definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithConnectionType, DefinitionStages.WithVirtualNetworkGateway1, DefinitionStages.WithCreate { + } + + /** + * Grouping of VirtualNetworkGatewayConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VirtualNetworkGatewayConnection definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the VirtualNetworkGatewayConnection definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify ConnectionType. + */ + interface WithConnectionType { + /** + * Specifies connectionType. + * @param connectionType Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' + * @return the next definition stage +*/ + WithVirtualNetworkGateway1 withConnectionType(VirtualNetworkGatewayConnectionType connectionType); + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify VirtualNetworkGateway1. + */ + interface WithVirtualNetworkGateway1 { + /** + * Specifies virtualNetworkGateway1. + * @param virtualNetworkGateway1 The reference to virtual network gateway resource + * @return the next definition stage +*/ + WithCreate withVirtualNetworkGateway1(VirtualNetworkGatewayInner virtualNetworkGateway1); + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify AuthorizationKey. + */ + interface WithAuthorizationKey { + /** + * Specifies authorizationKey. + * @param authorizationKey The authorizationKey + * @return the next definition stage + */ + WithCreate withAuthorizationKey(String authorizationKey); + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify ConnectionProtocol. + */ + interface WithConnectionProtocol { + /** + * Specifies connectionProtocol. + * @param connectionProtocol Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1' + * @return the next definition stage + */ + WithCreate withConnectionProtocol(VirtualNetworkGatewayConnectionProtocol connectionProtocol); + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify EnableBgp. + */ + interface WithEnableBgp { + /** + * Specifies enableBgp. + * @param enableBgp EnableBgp flag + * @return the next definition stage + */ + WithCreate withEnableBgp(Boolean enableBgp); + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify ExpressRouteGatewayBypass. + */ + interface WithExpressRouteGatewayBypass { + /** + * Specifies expressRouteGatewayBypass. + * @param expressRouteGatewayBypass Bypass ExpressRoute Gateway for data forwarding + * @return the next definition stage + */ + WithCreate withExpressRouteGatewayBypass(Boolean expressRouteGatewayBypass); + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify IpsecPolicies. + */ + interface WithIpsecPolicies { + /** + * Specifies ipsecPolicies. + * @param ipsecPolicies The IPSec Policies to be considered by this connection + * @return the next definition stage + */ + WithCreate withIpsecPolicies(List ipsecPolicies); + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify LocalNetworkGateway2. + */ + interface WithLocalNetworkGateway2 { + /** + * Specifies localNetworkGateway2. + * @param localNetworkGateway2 The reference to local network gateway resource + * @return the next definition stage + */ + WithCreate withLocalNetworkGateway2(LocalNetworkGatewayInner localNetworkGateway2); + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify Peer. + */ + interface WithPeer { + /** + * Specifies peer. + * @param peer The reference to peerings resource + * @return the next definition stage + */ + WithCreate withPeer(SubResource peer); + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify RoutingWeight. + */ + interface WithRoutingWeight { + /** + * Specifies routingWeight. + * @param routingWeight The routing weight + * @return the next definition stage + */ + WithCreate withRoutingWeight(Integer routingWeight); + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify SharedKey. + */ + interface WithSharedKey { + /** + * Specifies sharedKey. + * @param sharedKey The IPSec shared key + * @return the next definition stage + */ + WithCreate withSharedKey(String sharedKey); + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify TrafficSelectorPolicies. + */ + interface WithTrafficSelectorPolicies { + /** + * Specifies trafficSelectorPolicies. + * @param trafficSelectorPolicies The Traffic Selector Policies to be considered by this connection + * @return the next definition stage + */ + WithCreate withTrafficSelectorPolicies(List trafficSelectorPolicies); + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify UsePolicyBasedTrafficSelectors. + */ + interface WithUsePolicyBasedTrafficSelectors { + /** + * Specifies usePolicyBasedTrafficSelectors. + * @param usePolicyBasedTrafficSelectors Enable policy-based traffic selectors + * @return the next definition stage + */ + WithCreate withUsePolicyBasedTrafficSelectors(Boolean usePolicyBasedTrafficSelectors); + } + + /** + * The stage of the virtualnetworkgatewayconnection definition allowing to specify VirtualNetworkGateway2. + */ + interface WithVirtualNetworkGateway2 { + /** + * Specifies virtualNetworkGateway2. + * @param virtualNetworkGateway2 The reference to virtual network gateway resource + * @return the next definition stage + */ + WithCreate withVirtualNetworkGateway2(VirtualNetworkGatewayInner virtualNetworkGateway2); + } + + /** + * 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.WithAuthorizationKey, DefinitionStages.WithConnectionProtocol, DefinitionStages.WithEnableBgp, DefinitionStages.WithExpressRouteGatewayBypass, DefinitionStages.WithIpsecPolicies, DefinitionStages.WithLocalNetworkGateway2, DefinitionStages.WithPeer, DefinitionStages.WithRoutingWeight, DefinitionStages.WithSharedKey, DefinitionStages.WithTrafficSelectorPolicies, DefinitionStages.WithUsePolicyBasedTrafficSelectors, DefinitionStages.WithVirtualNetworkGateway2 { + } + } + /** + * The template for a VirtualNetworkGatewayConnection update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAuthorizationKey, UpdateStages.WithConnectionProtocol, UpdateStages.WithEnableBgp, UpdateStages.WithExpressRouteGatewayBypass, UpdateStages.WithIpsecPolicies, UpdateStages.WithLocalNetworkGateway2, UpdateStages.WithPeer, UpdateStages.WithRoutingWeight, UpdateStages.WithSharedKey, UpdateStages.WithTrafficSelectorPolicies, UpdateStages.WithUsePolicyBasedTrafficSelectors, UpdateStages.WithVirtualNetworkGateway2 { + } + + /** + * Grouping of VirtualNetworkGatewayConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the virtualnetworkgatewayconnection update allowing to specify AuthorizationKey. + */ + interface WithAuthorizationKey { + /** + * Specifies authorizationKey. + * @param authorizationKey The authorizationKey + * @return the next update stage + */ + Update withAuthorizationKey(String authorizationKey); + } + + /** + * The stage of the virtualnetworkgatewayconnection update allowing to specify ConnectionProtocol. + */ + interface WithConnectionProtocol { + /** + * Specifies connectionProtocol. + * @param connectionProtocol Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1' + * @return the next update stage + */ + Update withConnectionProtocol(VirtualNetworkGatewayConnectionProtocol connectionProtocol); + } + + /** + * The stage of the virtualnetworkgatewayconnection update allowing to specify EnableBgp. + */ + interface WithEnableBgp { + /** + * Specifies enableBgp. + * @param enableBgp EnableBgp flag + * @return the next update stage + */ + Update withEnableBgp(Boolean enableBgp); + } + + /** + * The stage of the virtualnetworkgatewayconnection update allowing to specify ExpressRouteGatewayBypass. + */ + interface WithExpressRouteGatewayBypass { + /** + * Specifies expressRouteGatewayBypass. + * @param expressRouteGatewayBypass Bypass ExpressRoute Gateway for data forwarding + * @return the next update stage + */ + Update withExpressRouteGatewayBypass(Boolean expressRouteGatewayBypass); + } + + /** + * The stage of the virtualnetworkgatewayconnection update allowing to specify IpsecPolicies. + */ + interface WithIpsecPolicies { + /** + * Specifies ipsecPolicies. + * @param ipsecPolicies The IPSec Policies to be considered by this connection + * @return the next update stage + */ + Update withIpsecPolicies(List ipsecPolicies); + } + + /** + * The stage of the virtualnetworkgatewayconnection update allowing to specify LocalNetworkGateway2. + */ + interface WithLocalNetworkGateway2 { + /** + * Specifies localNetworkGateway2. + * @param localNetworkGateway2 The reference to local network gateway resource + * @return the next update stage + */ + Update withLocalNetworkGateway2(LocalNetworkGatewayInner localNetworkGateway2); + } + + /** + * The stage of the virtualnetworkgatewayconnection update allowing to specify Peer. + */ + interface WithPeer { + /** + * Specifies peer. + * @param peer The reference to peerings resource + * @return the next update stage + */ + Update withPeer(SubResource peer); + } + + /** + * The stage of the virtualnetworkgatewayconnection update allowing to specify RoutingWeight. + */ + interface WithRoutingWeight { + /** + * Specifies routingWeight. + * @param routingWeight The routing weight + * @return the next update stage + */ + Update withRoutingWeight(Integer routingWeight); + } + + /** + * The stage of the virtualnetworkgatewayconnection update allowing to specify SharedKey. + */ + interface WithSharedKey { + /** + * Specifies sharedKey. + * @param sharedKey The IPSec shared key + * @return the next update stage + */ + Update withSharedKey(String sharedKey); + } + + /** + * The stage of the virtualnetworkgatewayconnection update allowing to specify TrafficSelectorPolicies. + */ + interface WithTrafficSelectorPolicies { + /** + * Specifies trafficSelectorPolicies. + * @param trafficSelectorPolicies The Traffic Selector Policies to be considered by this connection + * @return the next update stage + */ + Update withTrafficSelectorPolicies(List trafficSelectorPolicies); + } + + /** + * The stage of the virtualnetworkgatewayconnection update allowing to specify UsePolicyBasedTrafficSelectors. + */ + interface WithUsePolicyBasedTrafficSelectors { + /** + * Specifies usePolicyBasedTrafficSelectors. + * @param usePolicyBasedTrafficSelectors Enable policy-based traffic selectors + * @return the next update stage + */ + Update withUsePolicyBasedTrafficSelectors(Boolean usePolicyBasedTrafficSelectors); + } + + /** + * The stage of the virtualnetworkgatewayconnection update allowing to specify VirtualNetworkGateway2. + */ + interface WithVirtualNetworkGateway2 { + /** + * Specifies virtualNetworkGateway2. + * @param virtualNetworkGateway2 The reference to virtual network gateway resource + * @return the next update stage + */ + Update withVirtualNetworkGateway2(VirtualNetworkGatewayInner virtualNetworkGateway2); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionListEntity.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionListEntity.java new file mode 100644 index 000000000000..efad2cc01e76 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionListEntity.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualNetworkGatewayConnectionListEntityInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import java.util.Map; + +/** + * Type representing VirtualNetworkGatewayConnectionListEntity. + */ +public interface VirtualNetworkGatewayConnectionListEntity extends HasInner, HasManager { + /** + * @return the authorizationKey value. + */ + String authorizationKey(); + + /** + * @return the connectionProtocol value. + */ + VirtualNetworkGatewayConnectionProtocol connectionProtocol(); + + /** + * @return the connectionStatus value. + */ + VirtualNetworkGatewayConnectionStatus connectionStatus(); + + /** + * @return the connectionType value. + */ + VirtualNetworkGatewayConnectionType connectionType(); + + /** + * @return the egressBytesTransferred value. + */ + Long egressBytesTransferred(); + + /** + * @return the enableBgp value. + */ + Boolean enableBgp(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the expressRouteGatewayBypass value. + */ + Boolean expressRouteGatewayBypass(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the ingressBytesTransferred value. + */ + Long ingressBytesTransferred(); + + /** + * @return the ipsecPolicies value. + */ + List ipsecPolicies(); + + /** + * @return the localNetworkGateway2 value. + */ + VirtualNetworkConnectionGatewayReference localNetworkGateway2(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the peer value. + */ + SubResource peer(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * @return the routingWeight value. + */ + Integer routingWeight(); + + /** + * @return the sharedKey value. + */ + String sharedKey(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the trafficSelectorPolicies value. + */ + List trafficSelectorPolicies(); + + /** + * @return the tunnelConnectionStatus value. + */ + List tunnelConnectionStatus(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the usePolicyBasedTrafficSelectors value. + */ + Boolean usePolicyBasedTrafficSelectors(); + + /** + * @return the virtualNetworkGateway1 value. + */ + VirtualNetworkConnectionGatewayReference virtualNetworkGateway1(); + + /** + * @return the virtualNetworkGateway2 value. + */ + VirtualNetworkConnectionGatewayReference virtualNetworkGateway2(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionProtocol.java new file mode 100644 index 000000000000..f4233d85b707 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VirtualNetworkGatewayConnectionProtocol. + */ +public final class VirtualNetworkGatewayConnectionProtocol extends ExpandableStringEnum { + /** Static value IKEv2 for VirtualNetworkGatewayConnectionProtocol. */ + public static final VirtualNetworkGatewayConnectionProtocol IKEV2 = fromString("IKEv2"); + + /** Static value IKEv1 for VirtualNetworkGatewayConnectionProtocol. */ + public static final VirtualNetworkGatewayConnectionProtocol IKEV1 = fromString("IKEv1"); + + /** + * Creates or finds a VirtualNetworkGatewayConnectionProtocol from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewayConnectionProtocol + */ + @JsonCreator + public static VirtualNetworkGatewayConnectionProtocol fromString(String name) { + return fromString(name, VirtualNetworkGatewayConnectionProtocol.class); + } + + /** + * @return known VirtualNetworkGatewayConnectionProtocol values + */ + public static Collection values() { + return values(VirtualNetworkGatewayConnectionProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionStatus.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionStatus.java new file mode 100644 index 000000000000..ccca7033231e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionStatus.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VirtualNetworkGatewayConnectionStatus. + */ +public final class VirtualNetworkGatewayConnectionStatus extends ExpandableStringEnum { + /** Static value Unknown for VirtualNetworkGatewayConnectionStatus. */ + public static final VirtualNetworkGatewayConnectionStatus UNKNOWN = fromString("Unknown"); + + /** Static value Connecting for VirtualNetworkGatewayConnectionStatus. */ + public static final VirtualNetworkGatewayConnectionStatus CONNECTING = fromString("Connecting"); + + /** Static value Connected for VirtualNetworkGatewayConnectionStatus. */ + public static final VirtualNetworkGatewayConnectionStatus CONNECTED = fromString("Connected"); + + /** Static value NotConnected for VirtualNetworkGatewayConnectionStatus. */ + public static final VirtualNetworkGatewayConnectionStatus NOT_CONNECTED = fromString("NotConnected"); + + /** + * Creates or finds a VirtualNetworkGatewayConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewayConnectionStatus + */ + @JsonCreator + public static VirtualNetworkGatewayConnectionStatus fromString(String name) { + return fromString(name, VirtualNetworkGatewayConnectionStatus.class); + } + + /** + * @return known VirtualNetworkGatewayConnectionStatus values + */ + public static Collection values() { + return values(VirtualNetworkGatewayConnectionStatus.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionType.java new file mode 100644 index 000000000000..6d6543a0da0b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnectionType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VirtualNetworkGatewayConnectionType. + */ +public final class VirtualNetworkGatewayConnectionType extends ExpandableStringEnum { + /** Static value IPsec for VirtualNetworkGatewayConnectionType. */ + public static final VirtualNetworkGatewayConnectionType IPSEC = fromString("IPsec"); + + /** Static value Vnet2Vnet for VirtualNetworkGatewayConnectionType. */ + public static final VirtualNetworkGatewayConnectionType VNET2VNET = fromString("Vnet2Vnet"); + + /** Static value ExpressRoute for VirtualNetworkGatewayConnectionType. */ + public static final VirtualNetworkGatewayConnectionType EXPRESS_ROUTE = fromString("ExpressRoute"); + + /** Static value VPNClient for VirtualNetworkGatewayConnectionType. */ + public static final VirtualNetworkGatewayConnectionType VPNCLIENT = fromString("VPNClient"); + + /** + * Creates or finds a VirtualNetworkGatewayConnectionType from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewayConnectionType + */ + @JsonCreator + public static VirtualNetworkGatewayConnectionType fromString(String name) { + return fromString(name, VirtualNetworkGatewayConnectionType.class); + } + + /** + * @return known VirtualNetworkGatewayConnectionType values + */ + public static Collection values() { + return values(VirtualNetworkGatewayConnectionType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnections.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnections.java new file mode 100644 index 000000000000..d7d4d5bf2826 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayConnections.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.network.v2019_09_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.management.network.v2019_09_01.implementation.ConnectionSharedKeyInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualNetworkGatewayConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VirtualNetworkGatewayConnections. + */ +public interface VirtualNetworkGatewayConnections extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, HasInner { + /** + * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters); + + /** + * The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection shared key name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName); + + /** + * The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name. + * @param keyLength The virtual network connection reset shared key length, should between 1 and 128. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable resetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength); + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName); + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayIPConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayIPConfiguration.java new file mode 100644 index 000000000000..890988a6ce1f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayIPConfiguration.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * IP configuration for virtual network gateway. + */ +@JsonFlatten +public class VirtualNetworkGatewayIPConfiguration extends SubResource { + /** + * The private IP address allocation method. Possible values include: + * 'Static', 'Dynamic'. + */ + @JsonProperty(value = "properties.privateIPAllocationMethod") + private IPAllocationMethod privateIPAllocationMethod; + + /** + * The reference of the subnet resource. + */ + @JsonProperty(value = "properties.subnet") + private SubResource subnet; + + /** + * The reference of the public IP resource. + */ + @JsonProperty(value = "properties.publicIPAddress") + private SubResource publicIPAddress; + + /** + * The provisioning state of the virtual network gateway IP configuration + * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', + * 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the private IP address allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @return the privateIPAllocationMethod value + */ + public IPAllocationMethod privateIPAllocationMethod() { + return this.privateIPAllocationMethod; + } + + /** + * Set the private IP address allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @param privateIPAllocationMethod the privateIPAllocationMethod value to set + * @return the VirtualNetworkGatewayIPConfiguration object itself. + */ + public VirtualNetworkGatewayIPConfiguration withPrivateIPAllocationMethod(IPAllocationMethod privateIPAllocationMethod) { + this.privateIPAllocationMethod = privateIPAllocationMethod; + return this; + } + + /** + * Get the reference of the subnet resource. + * + * @return the subnet value + */ + public SubResource subnet() { + return this.subnet; + } + + /** + * Set the reference of the subnet resource. + * + * @param subnet the subnet value to set + * @return the VirtualNetworkGatewayIPConfiguration object itself. + */ + public VirtualNetworkGatewayIPConfiguration withSubnet(SubResource subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get the reference of the public IP resource. + * + * @return the publicIPAddress value + */ + public SubResource publicIPAddress() { + return this.publicIPAddress; + } + + /** + * Set the reference of the public IP resource. + * + * @param publicIPAddress the publicIPAddress value to set + * @return the VirtualNetworkGatewayIPConfiguration object itself. + */ + public VirtualNetworkGatewayIPConfiguration withPublicIPAddress(SubResource publicIPAddress) { + this.publicIPAddress = publicIPAddress; + return this; + } + + /** + * Get the provisioning state of the virtual network gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the VirtualNetworkGatewayIPConfiguration object itself. + */ + public VirtualNetworkGatewayIPConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewaySku.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewaySku.java new file mode 100644 index 000000000000..a34381fd685a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewaySku.java @@ -0,0 +1,90 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * VirtualNetworkGatewaySku details. + */ +public class VirtualNetworkGatewaySku { + /** + * Gateway SKU name. Possible values include: 'Basic', 'HighPerformance', + * 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3', 'VpnGw4', + * 'VpnGw5', 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'VpnGw4AZ', 'VpnGw5AZ', + * 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'. + */ + @JsonProperty(value = "name") + private VirtualNetworkGatewaySkuName name; + + /** + * Gateway SKU tier. Possible values include: 'Basic', 'HighPerformance', + * 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3', 'VpnGw4', + * 'VpnGw5', 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'VpnGw4AZ', 'VpnGw5AZ', + * 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'. + */ + @JsonProperty(value = "tier") + private VirtualNetworkGatewaySkuTier tier; + + /** + * The capacity. + */ + @JsonProperty(value = "capacity", access = JsonProperty.Access.WRITE_ONLY) + private Integer capacity; + + /** + * Get gateway SKU name. Possible values include: 'Basic', 'HighPerformance', 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3', 'VpnGw4', 'VpnGw5', 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'VpnGw4AZ', 'VpnGw5AZ', 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'. + * + * @return the name value + */ + public VirtualNetworkGatewaySkuName name() { + return this.name; + } + + /** + * Set gateway SKU name. Possible values include: 'Basic', 'HighPerformance', 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3', 'VpnGw4', 'VpnGw5', 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'VpnGw4AZ', 'VpnGw5AZ', 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'. + * + * @param name the name value to set + * @return the VirtualNetworkGatewaySku object itself. + */ + public VirtualNetworkGatewaySku withName(VirtualNetworkGatewaySkuName name) { + this.name = name; + return this; + } + + /** + * Get gateway SKU tier. Possible values include: 'Basic', 'HighPerformance', 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3', 'VpnGw4', 'VpnGw5', 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'VpnGw4AZ', 'VpnGw5AZ', 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'. + * + * @return the tier value + */ + public VirtualNetworkGatewaySkuTier tier() { + return this.tier; + } + + /** + * Set gateway SKU tier. Possible values include: 'Basic', 'HighPerformance', 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3', 'VpnGw4', 'VpnGw5', 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'VpnGw4AZ', 'VpnGw5AZ', 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'. + * + * @param tier the tier value to set + * @return the VirtualNetworkGatewaySku object itself. + */ + public VirtualNetworkGatewaySku withTier(VirtualNetworkGatewaySkuTier tier) { + this.tier = tier; + return this; + } + + /** + * Get the capacity. + * + * @return the capacity value + */ + public Integer capacity() { + return this.capacity; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewaySkuName.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewaySkuName.java new file mode 100644 index 000000000000..33bd4633fda0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewaySkuName.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VirtualNetworkGatewaySkuName. + */ +public final class VirtualNetworkGatewaySkuName extends ExpandableStringEnum { + /** Static value Basic for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName BASIC = fromString("Basic"); + + /** Static value HighPerformance for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName HIGH_PERFORMANCE = fromString("HighPerformance"); + + /** Static value Standard for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName STANDARD = fromString("Standard"); + + /** Static value UltraPerformance for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName ULTRA_PERFORMANCE = fromString("UltraPerformance"); + + /** Static value VpnGw1 for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName VPN_GW1 = fromString("VpnGw1"); + + /** Static value VpnGw2 for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName VPN_GW2 = fromString("VpnGw2"); + + /** Static value VpnGw3 for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName VPN_GW3 = fromString("VpnGw3"); + + /** Static value VpnGw4 for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName VPN_GW4 = fromString("VpnGw4"); + + /** Static value VpnGw5 for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName VPN_GW5 = fromString("VpnGw5"); + + /** Static value VpnGw1AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName VPN_GW1AZ = fromString("VpnGw1AZ"); + + /** Static value VpnGw2AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName VPN_GW2AZ = fromString("VpnGw2AZ"); + + /** Static value VpnGw3AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName VPN_GW3AZ = fromString("VpnGw3AZ"); + + /** Static value VpnGw4AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName VPN_GW4AZ = fromString("VpnGw4AZ"); + + /** Static value VpnGw5AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName VPN_GW5AZ = fromString("VpnGw5AZ"); + + /** Static value ErGw1AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName ER_GW1AZ = fromString("ErGw1AZ"); + + /** Static value ErGw2AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName ER_GW2AZ = fromString("ErGw2AZ"); + + /** Static value ErGw3AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName ER_GW3AZ = fromString("ErGw3AZ"); + + /** + * Creates or finds a VirtualNetworkGatewaySkuName from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewaySkuName + */ + @JsonCreator + public static VirtualNetworkGatewaySkuName fromString(String name) { + return fromString(name, VirtualNetworkGatewaySkuName.class); + } + + /** + * @return known VirtualNetworkGatewaySkuName values + */ + public static Collection values() { + return values(VirtualNetworkGatewaySkuName.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewaySkuTier.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewaySkuTier.java new file mode 100644 index 000000000000..84c6597a7f5d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewaySkuTier.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VirtualNetworkGatewaySkuTier. + */ +public final class VirtualNetworkGatewaySkuTier extends ExpandableStringEnum { + /** Static value Basic for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier BASIC = fromString("Basic"); + + /** Static value HighPerformance for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier HIGH_PERFORMANCE = fromString("HighPerformance"); + + /** Static value Standard for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier STANDARD = fromString("Standard"); + + /** Static value UltraPerformance for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier ULTRA_PERFORMANCE = fromString("UltraPerformance"); + + /** Static value VpnGw1 for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier VPN_GW1 = fromString("VpnGw1"); + + /** Static value VpnGw2 for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier VPN_GW2 = fromString("VpnGw2"); + + /** Static value VpnGw3 for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier VPN_GW3 = fromString("VpnGw3"); + + /** Static value VpnGw4 for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier VPN_GW4 = fromString("VpnGw4"); + + /** Static value VpnGw5 for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier VPN_GW5 = fromString("VpnGw5"); + + /** Static value VpnGw1AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier VPN_GW1AZ = fromString("VpnGw1AZ"); + + /** Static value VpnGw2AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier VPN_GW2AZ = fromString("VpnGw2AZ"); + + /** Static value VpnGw3AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier VPN_GW3AZ = fromString("VpnGw3AZ"); + + /** Static value VpnGw4AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier VPN_GW4AZ = fromString("VpnGw4AZ"); + + /** Static value VpnGw5AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier VPN_GW5AZ = fromString("VpnGw5AZ"); + + /** Static value ErGw1AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier ER_GW1AZ = fromString("ErGw1AZ"); + + /** Static value ErGw2AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier ER_GW2AZ = fromString("ErGw2AZ"); + + /** Static value ErGw3AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier ER_GW3AZ = fromString("ErGw3AZ"); + + /** + * Creates or finds a VirtualNetworkGatewaySkuTier from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewaySkuTier + */ + @JsonCreator + public static VirtualNetworkGatewaySkuTier fromString(String name) { + return fromString(name, VirtualNetworkGatewaySkuTier.class); + } + + /** + * @return known VirtualNetworkGatewaySkuTier values + */ + public static Collection values() { + return values(VirtualNetworkGatewaySkuTier.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayType.java new file mode 100644 index 000000000000..beb1e2d240da --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGatewayType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VirtualNetworkGatewayType. + */ +public final class VirtualNetworkGatewayType extends ExpandableStringEnum { + /** Static value Vpn for VirtualNetworkGatewayType. */ + public static final VirtualNetworkGatewayType VPN = fromString("Vpn"); + + /** Static value ExpressRoute for VirtualNetworkGatewayType. */ + public static final VirtualNetworkGatewayType EXPRESS_ROUTE = fromString("ExpressRoute"); + + /** + * Creates or finds a VirtualNetworkGatewayType from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewayType + */ + @JsonCreator + public static VirtualNetworkGatewayType fromString(String name) { + return fromString(name, VirtualNetworkGatewayType.class); + } + + /** + * @return known VirtualNetworkGatewayType values + */ + public static Collection values() { + return values(VirtualNetworkGatewayType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGateways.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGateways.java new file mode 100644 index 000000000000..22a78b0bad84 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkGateways.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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 rx.Completable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnClientIPsecParametersInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualNetworkGatewaysInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionListEntity; + +/** + * Type representing VirtualNetworkGateways. + */ +public interface VirtualNetworkGateways extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, HasInner { + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable resetAsync(String resourceGroupName, String virtualNetworkGatewayName); + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable resetVpnClientSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayName); + + /** + * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters); + + /** + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters); + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName); + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName); + + /** + * Gets a xml format representation for supported vpn devices. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName); + + /** + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName); + + /** + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer); + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable setVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams); + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName); + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName); + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName); + + /** + * Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getVpnclientConnectionHealthAsync(String resourceGroupName, String virtualNetworkGatewayName); + + /** + * Gets all the connections in a virtual network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listConnectionsAsync(final String resourceGroupName, final String virtualNetworkGatewayName); + + /** + * Gets a xml format representation for vpn device configuration script. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for which the configuration script is generated. + * @param parameters Parameters supplied to the generate vpn device script operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkPeering.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkPeering.java new file mode 100644 index 000000000000..135bd7584fa9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkPeering.java @@ -0,0 +1,345 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualNetworkPeeringInner; +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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; + +/** + * Type representing VirtualNetworkPeering. + */ +public interface VirtualNetworkPeering extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the allowForwardedTraffic value. + */ + Boolean allowForwardedTraffic(); + + /** + * @return the allowGatewayTransit value. + */ + Boolean allowGatewayTransit(); + + /** + * @return the allowVirtualNetworkAccess value. + */ + Boolean allowVirtualNetworkAccess(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the peeringState value. + */ + VirtualNetworkPeeringState peeringState(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the remoteAddressSpace value. + */ + AddressSpace remoteAddressSpace(); + + /** + * @return the remoteVirtualNetwork value. + */ + SubResource remoteVirtualNetwork(); + + /** + * @return the useRemoteGateways value. + */ + Boolean useRemoteGateways(); + + /** + * The entirety of the VirtualNetworkPeering definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithVirtualNetwork, DefinitionStages.WithCreate { + } + + /** + * Grouping of VirtualNetworkPeering definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VirtualNetworkPeering definition. + */ + interface Blank extends WithVirtualNetwork { + } + + /** + * The stage of the virtualnetworkpeering definition allowing to specify VirtualNetwork. + */ + interface WithVirtualNetwork { + /** + * Specifies resourceGroupName, virtualNetworkName. + * @param resourceGroupName The name of the resource group + * @param virtualNetworkName The name of the virtual network + * @return the next definition stage + */ + WithCreate withExistingVirtualNetwork(String resourceGroupName, String virtualNetworkName); + } + + /** + * The stage of the virtualnetworkpeering definition allowing to specify AllowForwardedTraffic. + */ + interface WithAllowForwardedTraffic { + /** + * Specifies allowForwardedTraffic. + * @param allowForwardedTraffic Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network + * @return the next definition stage + */ + WithCreate withAllowForwardedTraffic(Boolean allowForwardedTraffic); + } + + /** + * The stage of the virtualnetworkpeering definition allowing to specify AllowGatewayTransit. + */ + interface WithAllowGatewayTransit { + /** + * Specifies allowGatewayTransit. + * @param allowGatewayTransit If gateway links can be used in remote virtual networking to link to this virtual network + * @return the next definition stage + */ + WithCreate withAllowGatewayTransit(Boolean allowGatewayTransit); + } + + /** + * The stage of the virtualnetworkpeering definition allowing to specify AllowVirtualNetworkAccess. + */ + interface WithAllowVirtualNetworkAccess { + /** + * Specifies allowVirtualNetworkAccess. + * @param allowVirtualNetworkAccess Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space + * @return the next definition stage + */ + WithCreate withAllowVirtualNetworkAccess(Boolean allowVirtualNetworkAccess); + } + + /** + * The stage of the virtualnetworkpeering definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the virtualnetworkpeering definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the virtualnetworkpeering definition allowing to specify PeeringState. + */ + interface WithPeeringState { + /** + * Specifies peeringState. + * @param peeringState The status of the virtual network peering. Possible values include: 'Initiated', 'Connected', 'Disconnected' + * @return the next definition stage + */ + WithCreate withPeeringState(VirtualNetworkPeeringState peeringState); + } + + /** + * The stage of the virtualnetworkpeering definition allowing to specify RemoteAddressSpace. + */ + interface WithRemoteAddressSpace { + /** + * Specifies remoteAddressSpace. + * @param remoteAddressSpace The reference of the remote virtual network address space + * @return the next definition stage + */ + WithCreate withRemoteAddressSpace(AddressSpace remoteAddressSpace); + } + + /** + * The stage of the virtualnetworkpeering definition allowing to specify RemoteVirtualNetwork. + */ + interface WithRemoteVirtualNetwork { + /** + * Specifies remoteVirtualNetwork. + * @param remoteVirtualNetwork The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering) + * @return the next definition stage + */ + WithCreate withRemoteVirtualNetwork(SubResource remoteVirtualNetwork); + } + + /** + * The stage of the virtualnetworkpeering definition allowing to specify UseRemoteGateways. + */ + interface WithUseRemoteGateways { + /** + * Specifies useRemoteGateways. + * @param useRemoteGateways If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway + * @return the next definition stage + */ + WithCreate withUseRemoteGateways(Boolean useRemoteGateways); + } + + /** + * 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.WithAllowForwardedTraffic, DefinitionStages.WithAllowGatewayTransit, DefinitionStages.WithAllowVirtualNetworkAccess, DefinitionStages.WithId, DefinitionStages.WithName, DefinitionStages.WithPeeringState, DefinitionStages.WithRemoteAddressSpace, DefinitionStages.WithRemoteVirtualNetwork, DefinitionStages.WithUseRemoteGateways { + } + } + /** + * The template for a VirtualNetworkPeering update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAllowForwardedTraffic, UpdateStages.WithAllowGatewayTransit, UpdateStages.WithAllowVirtualNetworkAccess, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithPeeringState, UpdateStages.WithRemoteAddressSpace, UpdateStages.WithRemoteVirtualNetwork, UpdateStages.WithUseRemoteGateways { + } + + /** + * Grouping of VirtualNetworkPeering update stages. + */ + interface UpdateStages { + /** + * The stage of the virtualnetworkpeering update allowing to specify AllowForwardedTraffic. + */ + interface WithAllowForwardedTraffic { + /** + * Specifies allowForwardedTraffic. + * @param allowForwardedTraffic Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network + * @return the next update stage + */ + Update withAllowForwardedTraffic(Boolean allowForwardedTraffic); + } + + /** + * The stage of the virtualnetworkpeering update allowing to specify AllowGatewayTransit. + */ + interface WithAllowGatewayTransit { + /** + * Specifies allowGatewayTransit. + * @param allowGatewayTransit If gateway links can be used in remote virtual networking to link to this virtual network + * @return the next update stage + */ + Update withAllowGatewayTransit(Boolean allowGatewayTransit); + } + + /** + * The stage of the virtualnetworkpeering update allowing to specify AllowVirtualNetworkAccess. + */ + interface WithAllowVirtualNetworkAccess { + /** + * Specifies allowVirtualNetworkAccess. + * @param allowVirtualNetworkAccess Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space + * @return the next update stage + */ + Update withAllowVirtualNetworkAccess(Boolean allowVirtualNetworkAccess); + } + + /** + * The stage of the virtualnetworkpeering update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the virtualnetworkpeering update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the virtualnetworkpeering update allowing to specify PeeringState. + */ + interface WithPeeringState { + /** + * Specifies peeringState. + * @param peeringState The status of the virtual network peering. Possible values include: 'Initiated', 'Connected', 'Disconnected' + * @return the next update stage + */ + Update withPeeringState(VirtualNetworkPeeringState peeringState); + } + + /** + * The stage of the virtualnetworkpeering update allowing to specify RemoteAddressSpace. + */ + interface WithRemoteAddressSpace { + /** + * Specifies remoteAddressSpace. + * @param remoteAddressSpace The reference of the remote virtual network address space + * @return the next update stage + */ + Update withRemoteAddressSpace(AddressSpace remoteAddressSpace); + } + + /** + * The stage of the virtualnetworkpeering update allowing to specify RemoteVirtualNetwork. + */ + interface WithRemoteVirtualNetwork { + /** + * Specifies remoteVirtualNetwork. + * @param remoteVirtualNetwork The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering) + * @return the next update stage + */ + Update withRemoteVirtualNetwork(SubResource remoteVirtualNetwork); + } + + /** + * The stage of the virtualnetworkpeering update allowing to specify UseRemoteGateways. + */ + interface WithUseRemoteGateways { + /** + * Specifies useRemoteGateways. + * @param useRemoteGateways If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway + * @return the next update stage + */ + Update withUseRemoteGateways(Boolean useRemoteGateways); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkPeeringState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkPeeringState.java new file mode 100644 index 000000000000..9cce0ee168f4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkPeeringState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VirtualNetworkPeeringState. + */ +public final class VirtualNetworkPeeringState extends ExpandableStringEnum { + /** Static value Initiated for VirtualNetworkPeeringState. */ + public static final VirtualNetworkPeeringState INITIATED = fromString("Initiated"); + + /** Static value Connected for VirtualNetworkPeeringState. */ + public static final VirtualNetworkPeeringState CONNECTED = fromString("Connected"); + + /** Static value Disconnected for VirtualNetworkPeeringState. */ + public static final VirtualNetworkPeeringState DISCONNECTED = fromString("Disconnected"); + + /** + * Creates or finds a VirtualNetworkPeeringState from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkPeeringState + */ + @JsonCreator + public static VirtualNetworkPeeringState fromString(String name) { + return fromString(name, VirtualNetworkPeeringState.class); + } + + /** + * @return known VirtualNetworkPeeringState values + */ + public static Collection values() { + return values(VirtualNetworkPeeringState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkPeerings.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkPeerings.java new file mode 100644 index 000000000000..e76142ef0e9a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkPeerings.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualNetworkPeeringsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VirtualNetworkPeerings. + */ +public interface VirtualNetworkPeerings extends SupportsCreating, HasInner { + /** + * Gets the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName); + + /** + * Gets all virtual network peerings in a virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String virtualNetworkName); + + /** + * Deletes the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkTap.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkTap.java new file mode 100644 index 000000000000..6683bc4e441e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkTap.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.FrontendIPConfigurationInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkInterfaceIPConfigurationInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualNetworkTapInner; + +/** + * Type representing VirtualNetworkTap. + */ +public interface VirtualNetworkTap extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the destinationLoadBalancerFrontEndIPConfiguration value. + */ + FrontendIPConfiguration destinationLoadBalancerFrontEndIPConfiguration(); + + /** + * @return the destinationNetworkInterfaceIPConfiguration value. + */ + VirtualMachineScaleSetNetworkInterfaceIPConfiguration destinationNetworkInterfaceIPConfiguration(); + + /** + * @return the destinationPort value. + */ + Integer destinationPort(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the networkInterfaceTapConfigurations value. + */ + List networkInterfaceTapConfigurations(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGuid value. + */ + String resourceGuid(); + + /** + * The entirety of the VirtualNetworkTap definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of VirtualNetworkTap definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VirtualNetworkTap definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the VirtualNetworkTap definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the virtualnetworktap definition allowing to specify DestinationLoadBalancerFrontEndIPConfiguration. + */ + interface WithDestinationLoadBalancerFrontEndIPConfiguration { + /** + * Specifies destinationLoadBalancerFrontEndIPConfiguration. + * @param destinationLoadBalancerFrontEndIPConfiguration The reference to the private IP address on the internal Load Balancer that will receive the tap + * @return the next definition stage + */ + WithCreate withDestinationLoadBalancerFrontEndIPConfiguration(FrontendIPConfigurationInner destinationLoadBalancerFrontEndIPConfiguration); + } + + /** + * The stage of the virtualnetworktap definition allowing to specify DestinationNetworkInterfaceIPConfiguration. + */ + interface WithDestinationNetworkInterfaceIPConfiguration { + /** + * Specifies destinationNetworkInterfaceIPConfiguration. + * @param destinationNetworkInterfaceIPConfiguration The reference to the private IP Address of the collector nic that will receive the tap + * @return the next definition stage + */ + WithCreate withDestinationNetworkInterfaceIPConfiguration(NetworkInterfaceIPConfigurationInner destinationNetworkInterfaceIPConfiguration); + } + + /** + * The stage of the virtualnetworktap definition allowing to specify DestinationPort. + */ + interface WithDestinationPort { + /** + * Specifies destinationPort. + * @param destinationPort The VXLAN destination port that will receive the tapped traffic + * @return the next definition stage + */ + WithCreate withDestinationPort(Integer destinationPort); + } + + /** + * 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.WithDestinationLoadBalancerFrontEndIPConfiguration, DefinitionStages.WithDestinationNetworkInterfaceIPConfiguration, DefinitionStages.WithDestinationPort { + } + } + /** + * The template for a VirtualNetworkTap update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithDestinationLoadBalancerFrontEndIPConfiguration, UpdateStages.WithDestinationNetworkInterfaceIPConfiguration, UpdateStages.WithDestinationPort { + } + + /** + * Grouping of VirtualNetworkTap update stages. + */ + interface UpdateStages { + /** + * The stage of the virtualnetworktap update allowing to specify DestinationLoadBalancerFrontEndIPConfiguration. + */ + interface WithDestinationLoadBalancerFrontEndIPConfiguration { + /** + * Specifies destinationLoadBalancerFrontEndIPConfiguration. + * @param destinationLoadBalancerFrontEndIPConfiguration The reference to the private IP address on the internal Load Balancer that will receive the tap + * @return the next update stage + */ + Update withDestinationLoadBalancerFrontEndIPConfiguration(FrontendIPConfigurationInner destinationLoadBalancerFrontEndIPConfiguration); + } + + /** + * The stage of the virtualnetworktap update allowing to specify DestinationNetworkInterfaceIPConfiguration. + */ + interface WithDestinationNetworkInterfaceIPConfiguration { + /** + * Specifies destinationNetworkInterfaceIPConfiguration. + * @param destinationNetworkInterfaceIPConfiguration The reference to the private IP Address of the collector nic that will receive the tap + * @return the next update stage + */ + Update withDestinationNetworkInterfaceIPConfiguration(NetworkInterfaceIPConfigurationInner destinationNetworkInterfaceIPConfiguration); + } + + /** + * The stage of the virtualnetworktap update allowing to specify DestinationPort. + */ + interface WithDestinationPort { + /** + * Specifies destinationPort. + * @param destinationPort The VXLAN destination port that will receive the tapped traffic + * @return the next update stage + */ + Update withDestinationPort(Integer destinationPort); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkTaps.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkTaps.java new file mode 100644 index 000000000000..0d2b2623e878 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkTaps.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.network.v2019_09_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.network.v2019_09_01.implementation.VirtualNetworkTapsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VirtualNetworkTaps. + */ +public interface VirtualNetworkTaps extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkUsage.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkUsage.java new file mode 100644 index 000000000000..cea3b2a843d6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkUsage.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualNetworkUsageInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing VirtualNetworkUsage. + */ +public interface VirtualNetworkUsage extends HasInner, HasManager { + /** + * @return the currentValue value. + */ + Double currentValue(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the limit value. + */ + Double limit(); + + /** + * @return the name value. + */ + VirtualNetworkUsageName name(); + + /** + * @return the unit value. + */ + String unit(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkUsageName.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkUsageName.java new file mode 100644 index 000000000000..93417f19c679 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworkUsageName.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Usage strings container. + */ +public class VirtualNetworkUsageName { + /** + * Localized subnet size and usage string. + */ + @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) + private String localizedValue; + + /** + * Subnet size and usage string. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /** + * Get localized subnet size and usage string. + * + * @return the localizedValue value + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Get subnet size and usage string. + * + * @return the value value + */ + public String value() { + return this.value; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworks.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworks.java new file mode 100644 index 000000000000..ea7c65dd023d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualNetworks.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.network.v2019_09_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.network.v2019_09_01.implementation.VirtualNetworksInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkUsage; + +/** + * Type representing VirtualNetworks. + */ +public interface VirtualNetworks extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Checks whether a private IP address is available for use. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param ipAddress The private IP address to be verified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkIPAddressAvailabilityAsync(String resourceGroupName, String virtualNetworkName, String ipAddress); + + /** + * Lists usage stats. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listUsageAsync(final String resourceGroupName, final String virtualNetworkName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouter.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouter.java new file mode 100644 index 000000000000..87a624ba516d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouter.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualRouterInner; + +/** + * Type representing VirtualRouter. + */ +public interface VirtualRouter extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the hostedGateway value. + */ + SubResource hostedGateway(); + + /** + * @return the hostedSubnet value. + */ + SubResource hostedSubnet(); + + /** + * @return the peerings value. + */ + List peerings(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the virtualRouterAsn value. + */ + Long virtualRouterAsn(); + + /** + * @return the virtualRouterIps value. + */ + List virtualRouterIps(); + + /** + * The entirety of the VirtualRouter definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of VirtualRouter definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VirtualRouter definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the VirtualRouter definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the virtualrouter definition allowing to specify HostedGateway. + */ + interface WithHostedGateway { + /** + * Specifies hostedGateway. + * @param hostedGateway The Gateway on which VirtualRouter is hosted + * @return the next definition stage + */ + WithCreate withHostedGateway(SubResource hostedGateway); + } + + /** + * The stage of the virtualrouter definition allowing to specify HostedSubnet. + */ + interface WithHostedSubnet { + /** + * Specifies hostedSubnet. + * @param hostedSubnet The Subnet on which VirtualRouter is hosted + * @return the next definition stage + */ + WithCreate withHostedSubnet(SubResource hostedSubnet); + } + + /** + * The stage of the virtualrouter definition allowing to specify VirtualRouterAsn. + */ + interface WithVirtualRouterAsn { + /** + * Specifies virtualRouterAsn. + * @param virtualRouterAsn VirtualRouter ASN + * @return the next definition stage + */ + WithCreate withVirtualRouterAsn(Long virtualRouterAsn); + } + + /** + * The stage of the virtualrouter definition allowing to specify VirtualRouterIps. + */ + interface WithVirtualRouterIps { + /** + * Specifies virtualRouterIps. + * @param virtualRouterIps VirtualRouter IPs + * @return the next definition stage + */ + WithCreate withVirtualRouterIps(List virtualRouterIps); + } + + /** + * 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.WithHostedGateway, DefinitionStages.WithHostedSubnet, DefinitionStages.WithVirtualRouterAsn, DefinitionStages.WithVirtualRouterIps { + } + } + /** + * The template for a VirtualRouter update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithHostedGateway, UpdateStages.WithHostedSubnet, UpdateStages.WithVirtualRouterAsn, UpdateStages.WithVirtualRouterIps { + } + + /** + * Grouping of VirtualRouter update stages. + */ + interface UpdateStages { + /** + * The stage of the virtualrouter update allowing to specify HostedGateway. + */ + interface WithHostedGateway { + /** + * Specifies hostedGateway. + * @param hostedGateway The Gateway on which VirtualRouter is hosted + * @return the next update stage + */ + Update withHostedGateway(SubResource hostedGateway); + } + + /** + * The stage of the virtualrouter update allowing to specify HostedSubnet. + */ + interface WithHostedSubnet { + /** + * Specifies hostedSubnet. + * @param hostedSubnet The Subnet on which VirtualRouter is hosted + * @return the next update stage + */ + Update withHostedSubnet(SubResource hostedSubnet); + } + + /** + * The stage of the virtualrouter update allowing to specify VirtualRouterAsn. + */ + interface WithVirtualRouterAsn { + /** + * Specifies virtualRouterAsn. + * @param virtualRouterAsn VirtualRouter ASN + * @return the next update stage + */ + Update withVirtualRouterAsn(Long virtualRouterAsn); + } + + /** + * The stage of the virtualrouter update allowing to specify VirtualRouterIps. + */ + interface WithVirtualRouterIps { + /** + * Specifies virtualRouterIps. + * @param virtualRouterIps VirtualRouter IPs + * @return the next update stage + */ + Update withVirtualRouterIps(List virtualRouterIps); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouterPeering.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouterPeering.java new file mode 100644 index 000000000000..d687499ed513 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouterPeering.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualRouterPeeringInner; +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.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing VirtualRouterPeering. + */ +public interface VirtualRouterPeering extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the peerAsn value. + */ + Long peerAsn(); + + /** + * @return the peerIp value. + */ + String peerIp(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the VirtualRouterPeering definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithVirtualRouter, DefinitionStages.WithCreate { + } + + /** + * Grouping of VirtualRouterPeering definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VirtualRouterPeering definition. + */ + interface Blank extends WithVirtualRouter { + } + + /** + * The stage of the virtualrouterpeering definition allowing to specify VirtualRouter. + */ + interface WithVirtualRouter { + /** + * Specifies resourceGroupName, virtualRouterName. + * @param resourceGroupName The name of the resource group + * @param virtualRouterName The name of the Virtual Router + * @return the next definition stage + */ + WithCreate withExistingVirtualRouter(String resourceGroupName, String virtualRouterName); + } + + /** + * The stage of the virtualrouterpeering definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the virtualrouterpeering definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name Gets name of the peering unique to VirtualRouter. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the virtualrouterpeering definition allowing to specify PeerAsn. + */ + interface WithPeerAsn { + /** + * Specifies peerAsn. + * @param peerAsn Peer ASN + * @return the next definition stage + */ + WithCreate withPeerAsn(Long peerAsn); + } + + /** + * The stage of the virtualrouterpeering definition allowing to specify PeerIp. + */ + interface WithPeerIp { + /** + * Specifies peerIp. + * @param peerIp Peer IP + * @return the next definition stage + */ + WithCreate withPeerIp(String peerIp); + } + + /** + * 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.WithName, DefinitionStages.WithPeerAsn, DefinitionStages.WithPeerIp { + } + } + /** + * The template for a VirtualRouterPeering update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithPeerAsn, UpdateStages.WithPeerIp { + } + + /** + * Grouping of VirtualRouterPeering update stages. + */ + interface UpdateStages { + /** + * The stage of the virtualrouterpeering update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the virtualrouterpeering update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name Gets name of the peering unique to VirtualRouter. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the virtualrouterpeering update allowing to specify PeerAsn. + */ + interface WithPeerAsn { + /** + * Specifies peerAsn. + * @param peerAsn Peer ASN + * @return the next update stage + */ + Update withPeerAsn(Long peerAsn); + } + + /** + * The stage of the virtualrouterpeering update allowing to specify PeerIp. + */ + interface WithPeerIp { + /** + * Specifies peerIp. + * @param peerIp Peer IP + * @return the next update stage + */ + Update withPeerIp(String peerIp); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouterPeerings.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouterPeerings.java new file mode 100644 index 000000000000..e1efe096121f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouterPeerings.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualRouterPeeringsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VirtualRouterPeerings. + */ +public interface VirtualRouterPeerings extends SupportsCreating, HasInner { + /** + * Gets the specified Virtual Router Peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the Virtual Router Peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String virtualRouterName, String peeringName); + + /** + * Lists all Virtual Router Peerings in a Virtual Router resource. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String virtualRouterName); + + /** + * Deletes the specified peering from a Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String virtualRouterName, String peeringName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouters.java new file mode 100644 index 000000000000..80c509ab3ed0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualRouters.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.network.v2019_09_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.network.v2019_09_01.implementation.VirtualRoutersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VirtualRouters. + */ +public interface VirtualRouters extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWAN.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWAN.java new file mode 100644 index 000000000000..b3ded3c1eaa6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWAN.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VirtualWANInner; + +/** + * Type representing VirtualWAN. + */ +public interface VirtualWAN extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the allowBranchToBranchTraffic value. + */ + Boolean allowBranchToBranchTraffic(); + + /** + * @return the allowVnetToVnetTraffic value. + */ + Boolean allowVnetToVnetTraffic(); + + /** + * @return the disableVpnEncryption value. + */ + Boolean disableVpnEncryption(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the office365LocalBreakoutCategory value. + */ + OfficeTrafficCategory office365LocalBreakoutCategory(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the virtualHubs value. + */ + List virtualHubs(); + + /** + * @return the virtualWANType value. + */ + String virtualWANType(); + + /** + * @return the vpnSites value. + */ + List vpnSites(); + + /** + * The entirety of the VirtualWAN definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of VirtualWAN definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VirtualWAN definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the VirtualWAN definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the virtualwan definition allowing to specify AllowBranchToBranchTraffic. + */ + interface WithAllowBranchToBranchTraffic { + /** + * Specifies allowBranchToBranchTraffic. + * @param allowBranchToBranchTraffic True if branch to branch traffic is allowed + * @return the next definition stage + */ + WithCreate withAllowBranchToBranchTraffic(Boolean allowBranchToBranchTraffic); + } + + /** + * The stage of the virtualwan definition allowing to specify AllowVnetToVnetTraffic. + */ + interface WithAllowVnetToVnetTraffic { + /** + * Specifies allowVnetToVnetTraffic. + * @param allowVnetToVnetTraffic True if Vnet to Vnet traffic is allowed + * @return the next definition stage + */ + WithCreate withAllowVnetToVnetTraffic(Boolean allowVnetToVnetTraffic); + } + + /** + * The stage of the virtualwan definition allowing to specify DisableVpnEncryption. + */ + interface WithDisableVpnEncryption { + /** + * Specifies disableVpnEncryption. + * @param disableVpnEncryption Vpn encryption to be disabled or not + * @return the next definition stage + */ + WithCreate withDisableVpnEncryption(Boolean disableVpnEncryption); + } + + /** + * The stage of the virtualwan definition allowing to specify Office365LocalBreakoutCategory. + */ + interface WithOffice365LocalBreakoutCategory { + /** + * Specifies office365LocalBreakoutCategory. + * @param office365LocalBreakoutCategory The office local breakout category. Possible values include: 'Optimize', 'OptimizeAndAllow', 'All', 'None' + * @return the next definition stage + */ + WithCreate withOffice365LocalBreakoutCategory(OfficeTrafficCategory office365LocalBreakoutCategory); + } + + /** + * The stage of the virtualwan definition allowing to specify VirtualWANType. + */ + interface WithVirtualWANType { + /** + * Specifies virtualWANType. + * @param virtualWANType The type of the VirtualWAN + * @return the next definition stage + */ + WithCreate withVirtualWANType(String virtualWANType); + } + + /** + * 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.WithAllowBranchToBranchTraffic, DefinitionStages.WithAllowVnetToVnetTraffic, DefinitionStages.WithDisableVpnEncryption, DefinitionStages.WithOffice365LocalBreakoutCategory, DefinitionStages.WithVirtualWANType { + } + } + /** + * The template for a VirtualWAN update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAllowBranchToBranchTraffic, UpdateStages.WithAllowVnetToVnetTraffic, UpdateStages.WithDisableVpnEncryption, UpdateStages.WithOffice365LocalBreakoutCategory, UpdateStages.WithVirtualWANType { + } + + /** + * Grouping of VirtualWAN update stages. + */ + interface UpdateStages { + /** + * The stage of the virtualwan update allowing to specify AllowBranchToBranchTraffic. + */ + interface WithAllowBranchToBranchTraffic { + /** + * Specifies allowBranchToBranchTraffic. + * @param allowBranchToBranchTraffic True if branch to branch traffic is allowed + * @return the next update stage + */ + Update withAllowBranchToBranchTraffic(Boolean allowBranchToBranchTraffic); + } + + /** + * The stage of the virtualwan update allowing to specify AllowVnetToVnetTraffic. + */ + interface WithAllowVnetToVnetTraffic { + /** + * Specifies allowVnetToVnetTraffic. + * @param allowVnetToVnetTraffic True if Vnet to Vnet traffic is allowed + * @return the next update stage + */ + Update withAllowVnetToVnetTraffic(Boolean allowVnetToVnetTraffic); + } + + /** + * The stage of the virtualwan update allowing to specify DisableVpnEncryption. + */ + interface WithDisableVpnEncryption { + /** + * Specifies disableVpnEncryption. + * @param disableVpnEncryption Vpn encryption to be disabled or not + * @return the next update stage + */ + Update withDisableVpnEncryption(Boolean disableVpnEncryption); + } + + /** + * The stage of the virtualwan update allowing to specify Office365LocalBreakoutCategory. + */ + interface WithOffice365LocalBreakoutCategory { + /** + * Specifies office365LocalBreakoutCategory. + * @param office365LocalBreakoutCategory The office local breakout category. Possible values include: 'Optimize', 'OptimizeAndAllow', 'All', 'None' + * @return the next update stage + */ + Update withOffice365LocalBreakoutCategory(OfficeTrafficCategory office365LocalBreakoutCategory); + } + + /** + * The stage of the virtualwan update allowing to specify VirtualWANType. + */ + interface WithVirtualWANType { + /** + * Specifies virtualWANType. + * @param virtualWANType The type of the VirtualWAN + * @return the next update stage + */ + Update withVirtualWANType(String virtualWANType); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWanSecurityProvider.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWanSecurityProvider.java new file mode 100644 index 000000000000..c42a7cb7edf5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWanSecurityProvider.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Collection of SecurityProviders. + */ +public class VirtualWanSecurityProvider { + /** + * Name of the security provider. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Url of the security provider. + */ + @JsonProperty(value = "url") + private String url; + + /** + * Name of the security provider. Possible values include: 'External', + * 'Native'. + */ + @JsonProperty(value = "type") + private VirtualWanSecurityProviderType type; + + /** + * Get name of the security provider. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the security provider. + * + * @param name the name value to set + * @return the VirtualWanSecurityProvider object itself. + */ + public VirtualWanSecurityProvider withName(String name) { + this.name = name; + return this; + } + + /** + * Get url of the security provider. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set url of the security provider. + * + * @param url the url value to set + * @return the VirtualWanSecurityProvider object itself. + */ + public VirtualWanSecurityProvider withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get name of the security provider. Possible values include: 'External', 'Native'. + * + * @return the type value + */ + public VirtualWanSecurityProviderType type() { + return this.type; + } + + /** + * Set name of the security provider. Possible values include: 'External', 'Native'. + * + * @param type the type value to set + * @return the VirtualWanSecurityProvider object itself. + */ + public VirtualWanSecurityProvider withType(VirtualWanSecurityProviderType type) { + this.type = type; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWanSecurityProviderType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWanSecurityProviderType.java new file mode 100644 index 000000000000..1af8c3e65bfa --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWanSecurityProviderType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VirtualWanSecurityProviderType. + */ +public final class VirtualWanSecurityProviderType extends ExpandableStringEnum { + /** Static value External for VirtualWanSecurityProviderType. */ + public static final VirtualWanSecurityProviderType EXTERNAL = fromString("External"); + + /** Static value Native for VirtualWanSecurityProviderType. */ + public static final VirtualWanSecurityProviderType NATIVE = fromString("Native"); + + /** + * Creates or finds a VirtualWanSecurityProviderType from its string representation. + * @param name a name to look for + * @return the corresponding VirtualWanSecurityProviderType + */ + @JsonCreator + public static VirtualWanSecurityProviderType fromString(String name) { + return fromString(name, VirtualWanSecurityProviderType.class); + } + + /** + * @return known VirtualWanSecurityProviderType values + */ + public static Collection values() { + return values(VirtualWanSecurityProviderType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWanVpnProfileParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWanVpnProfileParameters.java new file mode 100644 index 000000000000..058934fb99fb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWanVpnProfileParameters.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Virtual Wan Vpn profile parameters Vpn profile generation. + */ +public class VirtualWanVpnProfileParameters { + /** + * VpnServerConfiguration partial resource uri with which VirtualWan is + * associated to. + */ + @JsonProperty(value = "vpnServerConfigurationResourceId") + private String vpnServerConfigurationResourceId; + + /** + * VPN client authentication method. Possible values include: 'EAPTLS', + * 'EAPMSCHAPv2'. + */ + @JsonProperty(value = "authenticationMethod") + private AuthenticationMethod authenticationMethod; + + /** + * Get vpnServerConfiguration partial resource uri with which VirtualWan is associated to. + * + * @return the vpnServerConfigurationResourceId value + */ + public String vpnServerConfigurationResourceId() { + return this.vpnServerConfigurationResourceId; + } + + /** + * Set vpnServerConfiguration partial resource uri with which VirtualWan is associated to. + * + * @param vpnServerConfigurationResourceId the vpnServerConfigurationResourceId value to set + * @return the VirtualWanVpnProfileParameters object itself. + */ + public VirtualWanVpnProfileParameters withVpnServerConfigurationResourceId(String vpnServerConfigurationResourceId) { + this.vpnServerConfigurationResourceId = vpnServerConfigurationResourceId; + return this; + } + + /** + * Get vPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'. + * + * @return the authenticationMethod value + */ + public AuthenticationMethod authenticationMethod() { + return this.authenticationMethod; + } + + /** + * Set vPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'. + * + * @param authenticationMethod the authenticationMethod value to set + * @return the VirtualWanVpnProfileParameters object itself. + */ + public VirtualWanVpnProfileParameters withAuthenticationMethod(AuthenticationMethod authenticationMethod) { + this.authenticationMethod = authenticationMethod; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWans.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWans.java new file mode 100644 index 000000000000..9e0d9cbdd2da --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VirtualWans.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.network.v2019_09_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.network.v2019_09_01.implementation.VirtualWansInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VirtualWans. + */ +public interface VirtualWans extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnAuthenticationType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnAuthenticationType.java new file mode 100644 index 000000000000..6f1b373ff2d3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnAuthenticationType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VpnAuthenticationType. + */ +public final class VpnAuthenticationType extends ExpandableStringEnum { + /** Static value Certificate for VpnAuthenticationType. */ + public static final VpnAuthenticationType CERTIFICATE = fromString("Certificate"); + + /** Static value Radius for VpnAuthenticationType. */ + public static final VpnAuthenticationType RADIUS = fromString("Radius"); + + /** Static value AAD for VpnAuthenticationType. */ + public static final VpnAuthenticationType AAD = fromString("AAD"); + + /** + * Creates or finds a VpnAuthenticationType from its string representation. + * @param name a name to look for + * @return the corresponding VpnAuthenticationType + */ + @JsonCreator + public static VpnAuthenticationType fromString(String name) { + return fromString(name, VpnAuthenticationType.class); + } + + /** + * @return known VpnAuthenticationType values + */ + public static Collection values() { + return values(VpnAuthenticationType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConfiguration.java new file mode 100644 index 000000000000..cb8ebe0c1530 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConfiguration.java @@ -0,0 +1,284 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * VpnClientConfiguration for P2S client. + */ +public class VpnClientConfiguration { + /** + * The reference of the address space resource which represents Address + * space for P2S VpnClient. + */ + @JsonProperty(value = "vpnClientAddressPool") + private AddressSpace vpnClientAddressPool; + + /** + * VpnClientRootCertificate for virtual network gateway. + */ + @JsonProperty(value = "vpnClientRootCertificates") + private List vpnClientRootCertificates; + + /** + * VpnClientRevokedCertificate for Virtual network gateway. + */ + @JsonProperty(value = "vpnClientRevokedCertificates") + private List vpnClientRevokedCertificates; + + /** + * VpnClientProtocols for Virtual network gateway. + */ + @JsonProperty(value = "vpnClientProtocols") + private List vpnClientProtocols; + + /** + * VpnClientIpsecPolicies for virtual network gateway P2S client. + */ + @JsonProperty(value = "vpnClientIpsecPolicies") + private List vpnClientIpsecPolicies; + + /** + * The radius server address property of the VirtualNetworkGateway resource + * for vpn client connection. + */ + @JsonProperty(value = "radiusServerAddress") + private String radiusServerAddress; + + /** + * The radius secret property of the VirtualNetworkGateway resource for vpn + * client connection. + */ + @JsonProperty(value = "radiusServerSecret") + private String radiusServerSecret; + + /** + * The AADTenant property of the VirtualNetworkGateway resource for vpn + * client connection used for AAD authentication. + */ + @JsonProperty(value = "aadTenant") + private String aadTenant; + + /** + * The AADAudience property of the VirtualNetworkGateway resource for vpn + * client connection used for AAD authentication. + */ + @JsonProperty(value = "aadAudience") + private String aadAudience; + + /** + * The AADIssuer property of the VirtualNetworkGateway resource for vpn + * client connection used for AAD authentication. + */ + @JsonProperty(value = "aadIssuer") + private String aadIssuer; + + /** + * Get the reference of the address space resource which represents Address space for P2S VpnClient. + * + * @return the vpnClientAddressPool value + */ + public AddressSpace vpnClientAddressPool() { + return this.vpnClientAddressPool; + } + + /** + * Set the reference of the address space resource which represents Address space for P2S VpnClient. + * + * @param vpnClientAddressPool the vpnClientAddressPool value to set + * @return the VpnClientConfiguration object itself. + */ + public VpnClientConfiguration withVpnClientAddressPool(AddressSpace vpnClientAddressPool) { + this.vpnClientAddressPool = vpnClientAddressPool; + return this; + } + + /** + * Get vpnClientRootCertificate for virtual network gateway. + * + * @return the vpnClientRootCertificates value + */ + public List vpnClientRootCertificates() { + return this.vpnClientRootCertificates; + } + + /** + * Set vpnClientRootCertificate for virtual network gateway. + * + * @param vpnClientRootCertificates the vpnClientRootCertificates value to set + * @return the VpnClientConfiguration object itself. + */ + public VpnClientConfiguration withVpnClientRootCertificates(List vpnClientRootCertificates) { + this.vpnClientRootCertificates = vpnClientRootCertificates; + return this; + } + + /** + * Get vpnClientRevokedCertificate for Virtual network gateway. + * + * @return the vpnClientRevokedCertificates value + */ + public List vpnClientRevokedCertificates() { + return this.vpnClientRevokedCertificates; + } + + /** + * Set vpnClientRevokedCertificate for Virtual network gateway. + * + * @param vpnClientRevokedCertificates the vpnClientRevokedCertificates value to set + * @return the VpnClientConfiguration object itself. + */ + public VpnClientConfiguration withVpnClientRevokedCertificates(List vpnClientRevokedCertificates) { + this.vpnClientRevokedCertificates = vpnClientRevokedCertificates; + return this; + } + + /** + * Get vpnClientProtocols for Virtual network gateway. + * + * @return the vpnClientProtocols value + */ + public List vpnClientProtocols() { + return this.vpnClientProtocols; + } + + /** + * Set vpnClientProtocols for Virtual network gateway. + * + * @param vpnClientProtocols the vpnClientProtocols value to set + * @return the VpnClientConfiguration object itself. + */ + public VpnClientConfiguration withVpnClientProtocols(List vpnClientProtocols) { + this.vpnClientProtocols = vpnClientProtocols; + return this; + } + + /** + * Get vpnClientIpsecPolicies for virtual network gateway P2S client. + * + * @return the vpnClientIpsecPolicies value + */ + public List vpnClientIpsecPolicies() { + return this.vpnClientIpsecPolicies; + } + + /** + * Set vpnClientIpsecPolicies for virtual network gateway P2S client. + * + * @param vpnClientIpsecPolicies the vpnClientIpsecPolicies value to set + * @return the VpnClientConfiguration object itself. + */ + public VpnClientConfiguration withVpnClientIpsecPolicies(List vpnClientIpsecPolicies) { + this.vpnClientIpsecPolicies = vpnClientIpsecPolicies; + return this; + } + + /** + * Get the radius server address property of the VirtualNetworkGateway resource for vpn client connection. + * + * @return the radiusServerAddress value + */ + public String radiusServerAddress() { + return this.radiusServerAddress; + } + + /** + * Set the radius server address property of the VirtualNetworkGateway resource for vpn client connection. + * + * @param radiusServerAddress the radiusServerAddress value to set + * @return the VpnClientConfiguration object itself. + */ + public VpnClientConfiguration withRadiusServerAddress(String radiusServerAddress) { + this.radiusServerAddress = radiusServerAddress; + return this; + } + + /** + * Get the radius secret property of the VirtualNetworkGateway resource for vpn client connection. + * + * @return the radiusServerSecret value + */ + public String radiusServerSecret() { + return this.radiusServerSecret; + } + + /** + * Set the radius secret property of the VirtualNetworkGateway resource for vpn client connection. + * + * @param radiusServerSecret the radiusServerSecret value to set + * @return the VpnClientConfiguration object itself. + */ + public VpnClientConfiguration withRadiusServerSecret(String radiusServerSecret) { + this.radiusServerSecret = radiusServerSecret; + return this; + } + + /** + * Get the AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + * + * @return the aadTenant value + */ + public String aadTenant() { + return this.aadTenant; + } + + /** + * Set the AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + * + * @param aadTenant the aadTenant value to set + * @return the VpnClientConfiguration object itself. + */ + public VpnClientConfiguration withAadTenant(String aadTenant) { + this.aadTenant = aadTenant; + return this; + } + + /** + * Get the AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + * + * @return the aadAudience value + */ + public String aadAudience() { + return this.aadAudience; + } + + /** + * Set the AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + * + * @param aadAudience the aadAudience value to set + * @return the VpnClientConfiguration object itself. + */ + public VpnClientConfiguration withAadAudience(String aadAudience) { + this.aadAudience = aadAudience; + return this; + } + + /** + * Get the AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + * + * @return the aadIssuer value + */ + public String aadIssuer() { + return this.aadIssuer; + } + + /** + * Set the AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + * + * @param aadIssuer the aadIssuer value to set + * @return the VpnClientConfiguration object itself. + */ + public VpnClientConfiguration withAadIssuer(String aadIssuer) { + this.aadIssuer = aadIssuer; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConnectionHealth.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConnectionHealth.java new file mode 100644 index 000000000000..e14686dbcdda --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConnectionHealth.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * VpnClientConnectionHealth properties. + */ +public class VpnClientConnectionHealth { + /** + * Total of the Ingress Bytes Transferred in this P2S Vpn connection. + */ + @JsonProperty(value = "totalIngressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long totalIngressBytesTransferred; + + /** + * Total of the Egress Bytes Transferred in this connection. + */ + @JsonProperty(value = "totalEgressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long totalEgressBytesTransferred; + + /** + * The total of p2s vpn clients connected at this time to this + * P2SVpnGateway. + */ + @JsonProperty(value = "vpnClientConnectionsCount") + private Integer vpnClientConnectionsCount; + + /** + * List of allocated ip addresses to the connected p2s vpn clients. + */ + @JsonProperty(value = "allocatedIpAddresses") + private List allocatedIpAddresses; + + /** + * Get total of the Ingress Bytes Transferred in this P2S Vpn connection. + * + * @return the totalIngressBytesTransferred value + */ + public Long totalIngressBytesTransferred() { + return this.totalIngressBytesTransferred; + } + + /** + * Get total of the Egress Bytes Transferred in this connection. + * + * @return the totalEgressBytesTransferred value + */ + public Long totalEgressBytesTransferred() { + return this.totalEgressBytesTransferred; + } + + /** + * Get the total of p2s vpn clients connected at this time to this P2SVpnGateway. + * + * @return the vpnClientConnectionsCount value + */ + public Integer vpnClientConnectionsCount() { + return this.vpnClientConnectionsCount; + } + + /** + * Set the total of p2s vpn clients connected at this time to this P2SVpnGateway. + * + * @param vpnClientConnectionsCount the vpnClientConnectionsCount value to set + * @return the VpnClientConnectionHealth object itself. + */ + public VpnClientConnectionHealth withVpnClientConnectionsCount(Integer vpnClientConnectionsCount) { + this.vpnClientConnectionsCount = vpnClientConnectionsCount; + return this; + } + + /** + * Get list of allocated ip addresses to the connected p2s vpn clients. + * + * @return the allocatedIpAddresses value + */ + public List allocatedIpAddresses() { + return this.allocatedIpAddresses; + } + + /** + * Set list of allocated ip addresses to the connected p2s vpn clients. + * + * @param allocatedIpAddresses the allocatedIpAddresses value to set + * @return the VpnClientConnectionHealth object itself. + */ + public VpnClientConnectionHealth withAllocatedIpAddresses(List allocatedIpAddresses) { + this.allocatedIpAddresses = allocatedIpAddresses; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConnectionHealthDetail.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConnectionHealthDetail.java new file mode 100644 index 000000000000..f056a575c728 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConnectionHealthDetail.java @@ -0,0 +1,197 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * VPN client connection health detail. + */ +public class VpnClientConnectionHealthDetail { + /** + * The vpn client Id. + */ + @JsonProperty(value = "vpnConnectionId", access = JsonProperty.Access.WRITE_ONLY) + private String vpnConnectionId; + + /** + * The duration time of a connected vpn client. + */ + @JsonProperty(value = "vpnConnectionDuration", access = JsonProperty.Access.WRITE_ONLY) + private Long vpnConnectionDuration; + + /** + * The start time of a connected vpn client. + */ + @JsonProperty(value = "vpnConnectionTime", access = JsonProperty.Access.WRITE_ONLY) + private String vpnConnectionTime; + + /** + * The public Ip of a connected vpn client. + */ + @JsonProperty(value = "publicIpAddress", access = JsonProperty.Access.WRITE_ONLY) + private String publicIpAddress; + + /** + * The assigned private Ip of a connected vpn client. + */ + @JsonProperty(value = "privateIpAddress", access = JsonProperty.Access.WRITE_ONLY) + private String privateIpAddress; + + /** + * The user name of a connected vpn client. + */ + @JsonProperty(value = "vpnUserName", access = JsonProperty.Access.WRITE_ONLY) + private String vpnUserName; + + /** + * The max band width. + */ + @JsonProperty(value = "maxBandwidth", access = JsonProperty.Access.WRITE_ONLY) + private Long maxBandwidth; + + /** + * The egress packets per second. + */ + @JsonProperty(value = "egressPacketsTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long egressPacketsTransferred; + + /** + * The egress bytes per second. + */ + @JsonProperty(value = "egressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long egressBytesTransferred; + + /** + * The ingress packets per second. + */ + @JsonProperty(value = "ingressPacketsTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long ingressPacketsTransferred; + + /** + * The ingress bytes per second. + */ + @JsonProperty(value = "ingressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long ingressBytesTransferred; + + /** + * The max packets transferred per second. + */ + @JsonProperty(value = "maxPacketsPerSecond", access = JsonProperty.Access.WRITE_ONLY) + private Long maxPacketsPerSecond; + + /** + * Get the vpn client Id. + * + * @return the vpnConnectionId value + */ + public String vpnConnectionId() { + return this.vpnConnectionId; + } + + /** + * Get the duration time of a connected vpn client. + * + * @return the vpnConnectionDuration value + */ + public Long vpnConnectionDuration() { + return this.vpnConnectionDuration; + } + + /** + * Get the start time of a connected vpn client. + * + * @return the vpnConnectionTime value + */ + public String vpnConnectionTime() { + return this.vpnConnectionTime; + } + + /** + * Get the public Ip of a connected vpn client. + * + * @return the publicIpAddress value + */ + public String publicIpAddress() { + return this.publicIpAddress; + } + + /** + * Get the assigned private Ip of a connected vpn client. + * + * @return the privateIpAddress value + */ + public String privateIpAddress() { + return this.privateIpAddress; + } + + /** + * Get the user name of a connected vpn client. + * + * @return the vpnUserName value + */ + public String vpnUserName() { + return this.vpnUserName; + } + + /** + * Get the max band width. + * + * @return the maxBandwidth value + */ + public Long maxBandwidth() { + return this.maxBandwidth; + } + + /** + * Get the egress packets per second. + * + * @return the egressPacketsTransferred value + */ + public Long egressPacketsTransferred() { + return this.egressPacketsTransferred; + } + + /** + * Get the egress bytes per second. + * + * @return the egressBytesTransferred value + */ + public Long egressBytesTransferred() { + return this.egressBytesTransferred; + } + + /** + * Get the ingress packets per second. + * + * @return the ingressPacketsTransferred value + */ + public Long ingressPacketsTransferred() { + return this.ingressPacketsTransferred; + } + + /** + * Get the ingress bytes per second. + * + * @return the ingressBytesTransferred value + */ + public Long ingressBytesTransferred() { + return this.ingressBytesTransferred; + } + + /** + * Get the max packets transferred per second. + * + * @return the maxPacketsPerSecond value + */ + public Long maxPacketsPerSecond() { + return this.maxPacketsPerSecond; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConnectionHealthDetailListResult.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConnectionHealthDetailListResult.java new file mode 100644 index 000000000000..73fcc836f4d7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConnectionHealthDetailListResult.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnClientConnectionHealthDetailListResultInner; +import java.util.List; + +/** + * Type representing VpnClientConnectionHealthDetailListResult. + */ +public interface VpnClientConnectionHealthDetailListResult extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientIPsecParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientIPsecParameters.java new file mode 100644 index 000000000000..750affed0f38 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientIPsecParameters.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnClientIPsecParametersInner; + +/** + * Type representing VpnClientIPsecParameters. + */ +public interface VpnClientIPsecParameters extends HasInner, HasManager { + /** + * @return the dhGroup value. + */ + DhGroup dhGroup(); + + /** + * @return the ikeEncryption value. + */ + IkeEncryption ikeEncryption(); + + /** + * @return the ikeIntegrity value. + */ + IkeIntegrity ikeIntegrity(); + + /** + * @return the ipsecEncryption value. + */ + IpsecEncryption ipsecEncryption(); + + /** + * @return the ipsecIntegrity value. + */ + IpsecIntegrity ipsecIntegrity(); + + /** + * @return the pfsGroup value. + */ + PfsGroup pfsGroup(); + + /** + * @return the saDataSizeKilobytes value. + */ + int saDataSizeKilobytes(); + + /** + * @return the saLifeTimeSeconds value. + */ + int saLifeTimeSeconds(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientParameters.java new file mode 100644 index 000000000000..f36e00e73be8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientParameters.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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Vpn Client Parameters for package generation. + */ +public class VpnClientParameters { + /** + * VPN client Processor Architecture. Possible values include: 'Amd64', + * 'X86'. + */ + @JsonProperty(value = "processorArchitecture") + private ProcessorArchitecture processorArchitecture; + + /** + * VPN client authentication method. Possible values include: 'EAPTLS', + * 'EAPMSCHAPv2'. + */ + @JsonProperty(value = "authenticationMethod") + private AuthenticationMethod authenticationMethod; + + /** + * The public certificate data for the radius server authentication + * certificate as a Base-64 encoded string. Required only if external + * radius authentication has been configured with EAPTLS authentication. + */ + @JsonProperty(value = "radiusServerAuthCertificate") + private String radiusServerAuthCertificate; + + /** + * A list of client root certificates public certificate data encoded as + * Base-64 strings. Optional parameter for external radius based + * authentication with EAPTLS. + */ + @JsonProperty(value = "clientRootCertificates") + private List clientRootCertificates; + + /** + * Get vPN client Processor Architecture. Possible values include: 'Amd64', 'X86'. + * + * @return the processorArchitecture value + */ + public ProcessorArchitecture processorArchitecture() { + return this.processorArchitecture; + } + + /** + * Set vPN client Processor Architecture. Possible values include: 'Amd64', 'X86'. + * + * @param processorArchitecture the processorArchitecture value to set + * @return the VpnClientParameters object itself. + */ + public VpnClientParameters withProcessorArchitecture(ProcessorArchitecture processorArchitecture) { + this.processorArchitecture = processorArchitecture; + return this; + } + + /** + * Get vPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'. + * + * @return the authenticationMethod value + */ + public AuthenticationMethod authenticationMethod() { + return this.authenticationMethod; + } + + /** + * Set vPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'. + * + * @param authenticationMethod the authenticationMethod value to set + * @return the VpnClientParameters object itself. + */ + public VpnClientParameters withAuthenticationMethod(AuthenticationMethod authenticationMethod) { + this.authenticationMethod = authenticationMethod; + return this; + } + + /** + * Get the public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication. + * + * @return the radiusServerAuthCertificate value + */ + public String radiusServerAuthCertificate() { + return this.radiusServerAuthCertificate; + } + + /** + * Set the public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication. + * + * @param radiusServerAuthCertificate the radiusServerAuthCertificate value to set + * @return the VpnClientParameters object itself. + */ + public VpnClientParameters withRadiusServerAuthCertificate(String radiusServerAuthCertificate) { + this.radiusServerAuthCertificate = radiusServerAuthCertificate; + return this; + } + + /** + * Get a list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS. + * + * @return the clientRootCertificates value + */ + public List clientRootCertificates() { + return this.clientRootCertificates; + } + + /** + * Set a list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS. + * + * @param clientRootCertificates the clientRootCertificates value to set + * @return the VpnClientParameters object itself. + */ + public VpnClientParameters withClientRootCertificates(List clientRootCertificates) { + this.clientRootCertificates = clientRootCertificates; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientProtocol.java new file mode 100644 index 000000000000..191ad9e40fb6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VpnClientProtocol. + */ +public final class VpnClientProtocol extends ExpandableStringEnum { + /** Static value IkeV2 for VpnClientProtocol. */ + public static final VpnClientProtocol IKE_V2 = fromString("IkeV2"); + + /** Static value SSTP for VpnClientProtocol. */ + public static final VpnClientProtocol SSTP = fromString("SSTP"); + + /** Static value OpenVPN for VpnClientProtocol. */ + public static final VpnClientProtocol OPEN_VPN = fromString("OpenVPN"); + + /** + * Creates or finds a VpnClientProtocol from its string representation. + * @param name a name to look for + * @return the corresponding VpnClientProtocol + */ + @JsonCreator + public static VpnClientProtocol fromString(String name) { + return fromString(name, VpnClientProtocol.class); + } + + /** + * @return known VpnClientProtocol values + */ + public static Collection values() { + return values(VpnClientProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientRevokedCertificate.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientRevokedCertificate.java new file mode 100644 index 000000000000..d9ec3eab1a66 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientRevokedCertificate.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * VPN client revoked certificate of virtual network gateway. + */ +@JsonFlatten +public class VpnClientRevokedCertificate extends SubResource { + /** + * The revoked VPN client certificate thumbprint. + */ + @JsonProperty(value = "properties.thumbprint") + private String thumbprint; + + /** + * The provisioning state of the VPN client revoked certificate resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the revoked VPN client certificate thumbprint. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set the revoked VPN client certificate thumbprint. + * + * @param thumbprint the thumbprint value to set + * @return the VpnClientRevokedCertificate object itself. + */ + public VpnClientRevokedCertificate withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + + /** + * Get the provisioning state of the VPN client revoked certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the VpnClientRevokedCertificate object itself. + */ + public VpnClientRevokedCertificate withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientRootCertificate.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientRootCertificate.java new file mode 100644 index 000000000000..95e803dc0c8c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientRootCertificate.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * VPN client root certificate of virtual network gateway. + */ +@JsonFlatten +public class VpnClientRootCertificate extends SubResource { + /** + * The certificate public data. + */ + @JsonProperty(value = "properties.publicCertData", required = true) + private String publicCertData; + + /** + * The provisioning state of the VPN client root certificate resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the certificate public data. + * + * @return the publicCertData value + */ + public String publicCertData() { + return this.publicCertData; + } + + /** + * Set the certificate public data. + * + * @param publicCertData the publicCertData value to set + * @return the VpnClientRootCertificate object itself. + */ + public VpnClientRootCertificate withPublicCertData(String publicCertData) { + this.publicCertData = publicCertData; + return this; + } + + /** + * Get the provisioning state of the VPN client root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the VpnClientRootCertificate object itself. + */ + public VpnClientRootCertificate withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnection.java new file mode 100644 index 000000000000..fb6a66ae41c8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnection.java @@ -0,0 +1,531 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnConnectionInner; +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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnSiteLinkConnectionInner; + +/** + * Type representing VpnConnection. + */ +public interface VpnConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the connectionBandwidth value. + */ + Integer connectionBandwidth(); + + /** + * @return the connectionStatus value. + */ + VpnConnectionStatus connectionStatus(); + + /** + * @return the egressBytesTransferred value. + */ + Long egressBytesTransferred(); + + /** + * @return the enableBgp value. + */ + Boolean enableBgp(); + + /** + * @return the enableInternetSecurity value. + */ + Boolean enableInternetSecurity(); + + /** + * @return the enableRateLimiting value. + */ + Boolean enableRateLimiting(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the ingressBytesTransferred value. + */ + Long ingressBytesTransferred(); + + /** + * @return the ipsecPolicies value. + */ + List ipsecPolicies(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the remoteVpnSite value. + */ + SubResource remoteVpnSite(); + + /** + * @return the routingWeight value. + */ + Integer routingWeight(); + + /** + * @return the sharedKey value. + */ + String sharedKey(); + + /** + * @return the useLocalAzureIpAddress value. + */ + Boolean useLocalAzureIpAddress(); + + /** + * @return the usePolicyBasedTrafficSelectors value. + */ + Boolean usePolicyBasedTrafficSelectors(); + + /** + * @return the vpnConnectionProtocolType value. + */ + VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType(); + + /** + * @return the vpnLinkConnections value. + */ + List vpnLinkConnections(); + + /** + * The entirety of the VpnConnection definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithVpnGateway, DefinitionStages.WithCreate { + } + + /** + * Grouping of VpnConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VpnConnection definition. + */ + interface Blank extends WithVpnGateway { + } + + /** + * The stage of the vpnconnection definition allowing to specify VpnGateway. + */ + interface WithVpnGateway { + /** + * Specifies resourceGroupName, gatewayName. + * @param resourceGroupName The resource group name of the VpnGateway + * @param gatewayName The name of the gateway + * @return the next definition stage + */ + WithCreate withExistingVpnGateway(String resourceGroupName, String gatewayName); + } + + /** + * The stage of the vpnconnection definition allowing to specify ConnectionBandwidth. + */ + interface WithConnectionBandwidth { + /** + * Specifies connectionBandwidth. + * @param connectionBandwidth Expected bandwidth in MBPS + * @return the next definition stage + */ + WithCreate withConnectionBandwidth(Integer connectionBandwidth); + } + + /** + * The stage of the vpnconnection definition allowing to specify ConnectionStatus. + */ + interface WithConnectionStatus { + /** + * Specifies connectionStatus. + * @param connectionStatus The connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected' + * @return the next definition stage + */ + WithCreate withConnectionStatus(VpnConnectionStatus connectionStatus); + } + + /** + * The stage of the vpnconnection definition allowing to specify EnableBgp. + */ + interface WithEnableBgp { + /** + * Specifies enableBgp. + * @param enableBgp EnableBgp flag + * @return the next definition stage + */ + WithCreate withEnableBgp(Boolean enableBgp); + } + + /** + * The stage of the vpnconnection definition allowing to specify EnableInternetSecurity. + */ + interface WithEnableInternetSecurity { + /** + * Specifies enableInternetSecurity. + * @param enableInternetSecurity Enable internet security + * @return the next definition stage + */ + WithCreate withEnableInternetSecurity(Boolean enableInternetSecurity); + } + + /** + * The stage of the vpnconnection definition allowing to specify EnableRateLimiting. + */ + interface WithEnableRateLimiting { + /** + * Specifies enableRateLimiting. + * @param enableRateLimiting EnableBgp flag + * @return the next definition stage + */ + WithCreate withEnableRateLimiting(Boolean enableRateLimiting); + } + + /** + * The stage of the vpnconnection definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the vpnconnection definition allowing to specify IpsecPolicies. + */ + interface WithIpsecPolicies { + /** + * Specifies ipsecPolicies. + * @param ipsecPolicies The IPSec Policies to be considered by this connection + * @return the next definition stage + */ + WithCreate withIpsecPolicies(List ipsecPolicies); + } + + /** + * The stage of the vpnconnection definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the vpnconnection definition allowing to specify RemoteVpnSite. + */ + interface WithRemoteVpnSite { + /** + * Specifies remoteVpnSite. + * @param remoteVpnSite Id of the connected vpn site + * @return the next definition stage + */ + WithCreate withRemoteVpnSite(SubResource remoteVpnSite); + } + + /** + * The stage of the vpnconnection definition allowing to specify RoutingWeight. + */ + interface WithRoutingWeight { + /** + * Specifies routingWeight. + * @param routingWeight Routing weight for vpn connection + * @return the next definition stage + */ + WithCreate withRoutingWeight(Integer routingWeight); + } + + /** + * The stage of the vpnconnection definition allowing to specify SharedKey. + */ + interface WithSharedKey { + /** + * Specifies sharedKey. + * @param sharedKey SharedKey for the vpn connection + * @return the next definition stage + */ + WithCreate withSharedKey(String sharedKey); + } + + /** + * The stage of the vpnconnection definition allowing to specify UseLocalAzureIpAddress. + */ + interface WithUseLocalAzureIpAddress { + /** + * Specifies useLocalAzureIpAddress. + * @param useLocalAzureIpAddress Use local azure ip to initiate connection + * @return the next definition stage + */ + WithCreate withUseLocalAzureIpAddress(Boolean useLocalAzureIpAddress); + } + + /** + * The stage of the vpnconnection definition allowing to specify UsePolicyBasedTrafficSelectors. + */ + interface WithUsePolicyBasedTrafficSelectors { + /** + * Specifies usePolicyBasedTrafficSelectors. + * @param usePolicyBasedTrafficSelectors Enable policy-based traffic selectors + * @return the next definition stage + */ + WithCreate withUsePolicyBasedTrafficSelectors(Boolean usePolicyBasedTrafficSelectors); + } + + /** + * The stage of the vpnconnection definition allowing to specify VpnConnectionProtocolType. + */ + interface WithVpnConnectionProtocolType { + /** + * Specifies vpnConnectionProtocolType. + * @param vpnConnectionProtocolType Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1' + * @return the next definition stage + */ + WithCreate withVpnConnectionProtocolType(VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType); + } + + /** + * The stage of the vpnconnection definition allowing to specify VpnLinkConnections. + */ + interface WithVpnLinkConnections { + /** + * Specifies vpnLinkConnections. + * @param vpnLinkConnections List of all vpn site link connections to the gateway + * @return the next definition stage + */ + WithCreate withVpnLinkConnections(List vpnLinkConnections); + } + + /** + * 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.WithConnectionBandwidth, DefinitionStages.WithConnectionStatus, DefinitionStages.WithEnableBgp, DefinitionStages.WithEnableInternetSecurity, DefinitionStages.WithEnableRateLimiting, DefinitionStages.WithId, DefinitionStages.WithIpsecPolicies, DefinitionStages.WithName, DefinitionStages.WithRemoteVpnSite, DefinitionStages.WithRoutingWeight, DefinitionStages.WithSharedKey, DefinitionStages.WithUseLocalAzureIpAddress, DefinitionStages.WithUsePolicyBasedTrafficSelectors, DefinitionStages.WithVpnConnectionProtocolType, DefinitionStages.WithVpnLinkConnections { + } + } + /** + * The template for a VpnConnection update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithConnectionBandwidth, UpdateStages.WithConnectionStatus, UpdateStages.WithEnableBgp, UpdateStages.WithEnableInternetSecurity, UpdateStages.WithEnableRateLimiting, UpdateStages.WithId, UpdateStages.WithIpsecPolicies, UpdateStages.WithName, UpdateStages.WithRemoteVpnSite, UpdateStages.WithRoutingWeight, UpdateStages.WithSharedKey, UpdateStages.WithUseLocalAzureIpAddress, UpdateStages.WithUsePolicyBasedTrafficSelectors, UpdateStages.WithVpnConnectionProtocolType, UpdateStages.WithVpnLinkConnections { + } + + /** + * Grouping of VpnConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the vpnconnection update allowing to specify ConnectionBandwidth. + */ + interface WithConnectionBandwidth { + /** + * Specifies connectionBandwidth. + * @param connectionBandwidth Expected bandwidth in MBPS + * @return the next update stage + */ + Update withConnectionBandwidth(Integer connectionBandwidth); + } + + /** + * The stage of the vpnconnection update allowing to specify ConnectionStatus. + */ + interface WithConnectionStatus { + /** + * Specifies connectionStatus. + * @param connectionStatus The connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected' + * @return the next update stage + */ + Update withConnectionStatus(VpnConnectionStatus connectionStatus); + } + + /** + * The stage of the vpnconnection update allowing to specify EnableBgp. + */ + interface WithEnableBgp { + /** + * Specifies enableBgp. + * @param enableBgp EnableBgp flag + * @return the next update stage + */ + Update withEnableBgp(Boolean enableBgp); + } + + /** + * The stage of the vpnconnection update allowing to specify EnableInternetSecurity. + */ + interface WithEnableInternetSecurity { + /** + * Specifies enableInternetSecurity. + * @param enableInternetSecurity Enable internet security + * @return the next update stage + */ + Update withEnableInternetSecurity(Boolean enableInternetSecurity); + } + + /** + * The stage of the vpnconnection update allowing to specify EnableRateLimiting. + */ + interface WithEnableRateLimiting { + /** + * Specifies enableRateLimiting. + * @param enableRateLimiting EnableBgp flag + * @return the next update stage + */ + Update withEnableRateLimiting(Boolean enableRateLimiting); + } + + /** + * The stage of the vpnconnection update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the vpnconnection update allowing to specify IpsecPolicies. + */ + interface WithIpsecPolicies { + /** + * Specifies ipsecPolicies. + * @param ipsecPolicies The IPSec Policies to be considered by this connection + * @return the next update stage + */ + Update withIpsecPolicies(List ipsecPolicies); + } + + /** + * The stage of the vpnconnection update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the vpnconnection update allowing to specify RemoteVpnSite. + */ + interface WithRemoteVpnSite { + /** + * Specifies remoteVpnSite. + * @param remoteVpnSite Id of the connected vpn site + * @return the next update stage + */ + Update withRemoteVpnSite(SubResource remoteVpnSite); + } + + /** + * The stage of the vpnconnection update allowing to specify RoutingWeight. + */ + interface WithRoutingWeight { + /** + * Specifies routingWeight. + * @param routingWeight Routing weight for vpn connection + * @return the next update stage + */ + Update withRoutingWeight(Integer routingWeight); + } + + /** + * The stage of the vpnconnection update allowing to specify SharedKey. + */ + interface WithSharedKey { + /** + * Specifies sharedKey. + * @param sharedKey SharedKey for the vpn connection + * @return the next update stage + */ + Update withSharedKey(String sharedKey); + } + + /** + * The stage of the vpnconnection update allowing to specify UseLocalAzureIpAddress. + */ + interface WithUseLocalAzureIpAddress { + /** + * Specifies useLocalAzureIpAddress. + * @param useLocalAzureIpAddress Use local azure ip to initiate connection + * @return the next update stage + */ + Update withUseLocalAzureIpAddress(Boolean useLocalAzureIpAddress); + } + + /** + * The stage of the vpnconnection update allowing to specify UsePolicyBasedTrafficSelectors. + */ + interface WithUsePolicyBasedTrafficSelectors { + /** + * Specifies usePolicyBasedTrafficSelectors. + * @param usePolicyBasedTrafficSelectors Enable policy-based traffic selectors + * @return the next update stage + */ + Update withUsePolicyBasedTrafficSelectors(Boolean usePolicyBasedTrafficSelectors); + } + + /** + * The stage of the vpnconnection update allowing to specify VpnConnectionProtocolType. + */ + interface WithVpnConnectionProtocolType { + /** + * Specifies vpnConnectionProtocolType. + * @param vpnConnectionProtocolType Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1' + * @return the next update stage + */ + Update withVpnConnectionProtocolType(VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType); + } + + /** + * The stage of the vpnconnection update allowing to specify VpnLinkConnections. + */ + interface WithVpnLinkConnections { + /** + * Specifies vpnLinkConnections. + * @param vpnLinkConnections List of all vpn site link connections to the gateway + * @return the next update stage + */ + Update withVpnLinkConnections(List vpnLinkConnections); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnectionStatus.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnectionStatus.java new file mode 100644 index 000000000000..08adaae25e98 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnectionStatus.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VpnConnectionStatus. + */ +public final class VpnConnectionStatus extends ExpandableStringEnum { + /** Static value Unknown for VpnConnectionStatus. */ + public static final VpnConnectionStatus UNKNOWN = fromString("Unknown"); + + /** Static value Connecting for VpnConnectionStatus. */ + public static final VpnConnectionStatus CONNECTING = fromString("Connecting"); + + /** Static value Connected for VpnConnectionStatus. */ + public static final VpnConnectionStatus CONNECTED = fromString("Connected"); + + /** Static value NotConnected for VpnConnectionStatus. */ + public static final VpnConnectionStatus NOT_CONNECTED = fromString("NotConnected"); + + /** + * Creates or finds a VpnConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding VpnConnectionStatus + */ + @JsonCreator + public static VpnConnectionStatus fromString(String name) { + return fromString(name, VpnConnectionStatus.class); + } + + /** + * @return known VpnConnectionStatus values + */ + public static Collection values() { + return values(VpnConnectionStatus.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnectionVpnGatewayVpnSiteLinkConnection.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnectionVpnGatewayVpnSiteLinkConnection.java new file mode 100644 index 000000000000..8026d3591d29 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnectionVpnGatewayVpnSiteLinkConnection.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnSiteLinkConnectionInner; +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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; + +/** + * Type representing VpnConnectionVpnGatewayVpnSiteLinkConnection. + */ +public interface VpnConnectionVpnGatewayVpnSiteLinkConnection extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the connectionBandwidth value. + */ + Integer connectionBandwidth(); + + /** + * @return the connectionStatus value. + */ + VpnConnectionStatus connectionStatus(); + + /** + * @return the egressBytesTransferred value. + */ + Long egressBytesTransferred(); + + /** + * @return the enableBgp value. + */ + Boolean enableBgp(); + + /** + * @return the enableRateLimiting value. + */ + Boolean enableRateLimiting(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the ingressBytesTransferred value. + */ + Long ingressBytesTransferred(); + + /** + * @return the ipsecPolicies value. + */ + List ipsecPolicies(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the routingWeight value. + */ + Integer routingWeight(); + + /** + * @return the sharedKey value. + */ + String sharedKey(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the useLocalAzureIpAddress value. + */ + Boolean useLocalAzureIpAddress(); + + /** + * @return the usePolicyBasedTrafficSelectors value. + */ + Boolean usePolicyBasedTrafficSelectors(); + + /** + * @return the vpnConnectionProtocolType value. + */ + VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType(); + + /** + * @return the vpnSiteLink value. + */ + SubResource vpnSiteLink(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnectionVpnGatewayVpnSiteLinkConnectionModel.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnectionVpnGatewayVpnSiteLinkConnectionModel.java new file mode 100644 index 000000000000..40aeef6a06c5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnectionVpnGatewayVpnSiteLinkConnectionModel.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnSiteLinkConnectionInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; + +/** + * Type representing VpnConnectionVpnGatewayVpnSiteLinkConnectionModel. + */ +public interface VpnConnectionVpnGatewayVpnSiteLinkConnectionModel extends HasInner, HasManager { + /** + * @return the connectionBandwidth value. + */ + Integer connectionBandwidth(); + + /** + * @return the connectionStatus value. + */ + VpnConnectionStatus connectionStatus(); + + /** + * @return the egressBytesTransferred value. + */ + Long egressBytesTransferred(); + + /** + * @return the enableBgp value. + */ + Boolean enableBgp(); + + /** + * @return the enableRateLimiting value. + */ + Boolean enableRateLimiting(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the ingressBytesTransferred value. + */ + Long ingressBytesTransferred(); + + /** + * @return the ipsecPolicies value. + */ + List ipsecPolicies(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the routingWeight value. + */ + Integer routingWeight(); + + /** + * @return the sharedKey value. + */ + String sharedKey(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the useLocalAzureIpAddress value. + */ + Boolean useLocalAzureIpAddress(); + + /** + * @return the usePolicyBasedTrafficSelectors value. + */ + Boolean usePolicyBasedTrafficSelectors(); + + /** + * @return the vpnConnectionProtocolType value. + */ + VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType(); + + /** + * @return the vpnSiteLink value. + */ + SubResource vpnSiteLink(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnections.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnections.java new file mode 100644 index 000000000000..8c3898b58c17 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnConnections.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.network.v2019_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VpnConnections. + */ +public interface VpnConnections extends SupportsCreating, HasInner { + /** + * Retrieves the details of a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String gatewayName, String connectionName); + + /** + * Retrieves all vpn connections for a particular virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByVpnGatewayAsync(final String resourceGroupName, final String gatewayName); + + /** + * Deletes a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String gatewayName, String connectionName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnDeviceScriptParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnDeviceScriptParameters.java new file mode 100644 index 000000000000..f03774114276 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnDeviceScriptParameters.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Vpn device configuration script generation parameters. + */ +public class VpnDeviceScriptParameters { + /** + * The vendor for the vpn device. + */ + @JsonProperty(value = "vendor") + private String vendor; + + /** + * The device family for the vpn device. + */ + @JsonProperty(value = "deviceFamily") + private String deviceFamily; + + /** + * The firmware version for the vpn device. + */ + @JsonProperty(value = "firmwareVersion") + private String firmwareVersion; + + /** + * Get the vendor for the vpn device. + * + * @return the vendor value + */ + public String vendor() { + return this.vendor; + } + + /** + * Set the vendor for the vpn device. + * + * @param vendor the vendor value to set + * @return the VpnDeviceScriptParameters object itself. + */ + public VpnDeviceScriptParameters withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get the device family for the vpn device. + * + * @return the deviceFamily value + */ + public String deviceFamily() { + return this.deviceFamily; + } + + /** + * Set the device family for the vpn device. + * + * @param deviceFamily the deviceFamily value to set + * @return the VpnDeviceScriptParameters object itself. + */ + public VpnDeviceScriptParameters withDeviceFamily(String deviceFamily) { + this.deviceFamily = deviceFamily; + return this; + } + + /** + * Get the firmware version for the vpn device. + * + * @return the firmwareVersion value + */ + public String firmwareVersion() { + return this.firmwareVersion; + } + + /** + * Set the firmware version for the vpn device. + * + * @param firmwareVersion the firmwareVersion value to set + * @return the VpnDeviceScriptParameters object itself. + */ + public VpnDeviceScriptParameters withFirmwareVersion(String firmwareVersion) { + this.firmwareVersion = firmwareVersion; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGateway.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGateway.java new file mode 100644 index 000000000000..3c7aaf392e0f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGateway.java @@ -0,0 +1,197 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnConnectionInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnGatewayInner; + +/** + * Type representing VpnGateway. + */ +public interface VpnGateway extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the bgpSettings value. + */ + BgpSettings bgpSettings(); + + /** + * @return the connections value. + */ + List connections(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the virtualHub value. + */ + SubResource virtualHub(); + + /** + * @return the vpnGatewayScaleUnit value. + */ + Integer vpnGatewayScaleUnit(); + + /** + * The entirety of the VpnGateway definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of VpnGateway definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VpnGateway definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the VpnGateway definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the vpngateway definition allowing to specify BgpSettings. + */ + interface WithBgpSettings { + /** + * Specifies bgpSettings. + * @param bgpSettings Local network gateway's BGP speaker settings + * @return the next definition stage + */ + WithCreate withBgpSettings(BgpSettings bgpSettings); + } + + /** + * The stage of the vpngateway definition allowing to specify Connections. + */ + interface WithConnections { + /** + * Specifies connections. + * @param connections List of all vpn connections to the gateway + * @return the next definition stage + */ + WithCreate withConnections(List connections); + } + + /** + * The stage of the vpngateway definition allowing to specify VirtualHub. + */ + interface WithVirtualHub { + /** + * Specifies virtualHub. + * @param virtualHub The VirtualHub to which the gateway belongs + * @return the next definition stage + */ + WithCreate withVirtualHub(SubResource virtualHub); + } + + /** + * The stage of the vpngateway definition allowing to specify VpnGatewayScaleUnit. + */ + interface WithVpnGatewayScaleUnit { + /** + * Specifies vpnGatewayScaleUnit. + * @param vpnGatewayScaleUnit The scale unit for this vpn gateway + * @return the next definition stage + */ + WithCreate withVpnGatewayScaleUnit(Integer vpnGatewayScaleUnit); + } + + /** + * 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.WithBgpSettings, DefinitionStages.WithConnections, DefinitionStages.WithVirtualHub, DefinitionStages.WithVpnGatewayScaleUnit { + } + } + /** + * The template for a VpnGateway update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithBgpSettings, UpdateStages.WithConnections, UpdateStages.WithVirtualHub, UpdateStages.WithVpnGatewayScaleUnit { + } + + /** + * Grouping of VpnGateway update stages. + */ + interface UpdateStages { + /** + * The stage of the vpngateway update allowing to specify BgpSettings. + */ + interface WithBgpSettings { + /** + * Specifies bgpSettings. + * @param bgpSettings Local network gateway's BGP speaker settings + * @return the next update stage + */ + Update withBgpSettings(BgpSettings bgpSettings); + } + + /** + * The stage of the vpngateway update allowing to specify Connections. + */ + interface WithConnections { + /** + * Specifies connections. + * @param connections List of all vpn connections to the gateway + * @return the next update stage + */ + Update withConnections(List connections); + } + + /** + * The stage of the vpngateway update allowing to specify VirtualHub. + */ + interface WithVirtualHub { + /** + * Specifies virtualHub. + * @param virtualHub The VirtualHub to which the gateway belongs + * @return the next update stage + */ + Update withVirtualHub(SubResource virtualHub); + } + + /** + * The stage of the vpngateway update allowing to specify VpnGatewayScaleUnit. + */ + interface WithVpnGatewayScaleUnit { + /** + * Specifies vpnGatewayScaleUnit. + * @param vpnGatewayScaleUnit The scale unit for this vpn gateway + * @return the next update stage + */ + Update withVpnGatewayScaleUnit(Integer vpnGatewayScaleUnit); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGatewayGeneration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGatewayGeneration.java new file mode 100644 index 000000000000..8c3cfa180116 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGatewayGeneration.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VpnGatewayGeneration. + */ +public final class VpnGatewayGeneration extends ExpandableStringEnum { + /** Static value None for VpnGatewayGeneration. */ + public static final VpnGatewayGeneration NONE = fromString("None"); + + /** Static value Generation1 for VpnGatewayGeneration. */ + public static final VpnGatewayGeneration GENERATION1 = fromString("Generation1"); + + /** Static value Generation2 for VpnGatewayGeneration. */ + public static final VpnGatewayGeneration GENERATION2 = fromString("Generation2"); + + /** + * Creates or finds a VpnGatewayGeneration from its string representation. + * @param name a name to look for + * @return the corresponding VpnGatewayGeneration + */ + @JsonCreator + public static VpnGatewayGeneration fromString(String name) { + return fromString(name, VpnGatewayGeneration.class); + } + + /** + * @return known VpnGatewayGeneration values + */ + public static Collection values() { + return values(VpnGatewayGeneration.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGatewayTunnelingProtocol.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGatewayTunnelingProtocol.java new file mode 100644 index 000000000000..b0a35415e8e2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGatewayTunnelingProtocol.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VpnGatewayTunnelingProtocol. + */ +public final class VpnGatewayTunnelingProtocol extends ExpandableStringEnum { + /** Static value IkeV2 for VpnGatewayTunnelingProtocol. */ + public static final VpnGatewayTunnelingProtocol IKE_V2 = fromString("IkeV2"); + + /** Static value OpenVPN for VpnGatewayTunnelingProtocol. */ + public static final VpnGatewayTunnelingProtocol OPEN_VPN = fromString("OpenVPN"); + + /** + * Creates or finds a VpnGatewayTunnelingProtocol from its string representation. + * @param name a name to look for + * @return the corresponding VpnGatewayTunnelingProtocol + */ + @JsonCreator + public static VpnGatewayTunnelingProtocol fromString(String name) { + return fromString(name, VpnGatewayTunnelingProtocol.class); + } + + /** + * @return known VpnGatewayTunnelingProtocol values + */ + public static Collection values() { + return values(VpnGatewayTunnelingProtocol.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGateways.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGateways.java new file mode 100644 index 000000000000..d2b5d225290f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnGateways.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.network.v2019_09_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.network.v2019_09_01.implementation.VpnGatewaysInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VpnGateways. + */ +public interface VpnGateways extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Resets the primary of the vpn gateway in the specified resource group. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable resetAsync(String resourceGroupName, String gatewayName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnLinkBgpSettings.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnLinkBgpSettings.java new file mode 100644 index 000000000000..c26d5b80332a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnLinkBgpSettings.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * BGP settings details for a link. + */ +public class VpnLinkBgpSettings { + /** + * The BGP speaker's ASN. + */ + @JsonProperty(value = "asn") + private Long asn; + + /** + * The BGP peering address and BGP identifier of this BGP speaker. + */ + @JsonProperty(value = "bgpPeeringAddress") + private String bgpPeeringAddress; + + /** + * Get the BGP speaker's ASN. + * + * @return the asn value + */ + public Long asn() { + return this.asn; + } + + /** + * Set the BGP speaker's ASN. + * + * @param asn the asn value to set + * @return the VpnLinkBgpSettings object itself. + */ + public VpnLinkBgpSettings withAsn(Long asn) { + this.asn = asn; + return this; + } + + /** + * Get the BGP peering address and BGP identifier of this BGP speaker. + * + * @return the bgpPeeringAddress value + */ + public String bgpPeeringAddress() { + return this.bgpPeeringAddress; + } + + /** + * Set the BGP peering address and BGP identifier of this BGP speaker. + * + * @param bgpPeeringAddress the bgpPeeringAddress value to set + * @return the VpnLinkBgpSettings object itself. + */ + public VpnLinkBgpSettings withBgpPeeringAddress(String bgpPeeringAddress) { + this.bgpPeeringAddress = bgpPeeringAddress; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnLinkConnections.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnLinkConnections.java new file mode 100644 index 000000000000..f9befbf798d7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnLinkConnections.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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnLinkConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VpnLinkConnections. + */ +public interface VpnLinkConnections extends HasInner { + /** + * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByVpnConnectionAsync(final String resourceGroupName, final String gatewayName, final String connectionName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnLinkProviderProperties.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnLinkProviderProperties.java new file mode 100644 index 000000000000..91538b7386bb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnLinkProviderProperties.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of properties of a link provider. + */ +public class VpnLinkProviderProperties { + /** + * Name of the link provider. + */ + @JsonProperty(value = "linkProviderName") + private String linkProviderName; + + /** + * Link speed. + */ + @JsonProperty(value = "linkSpeedInMbps") + private Integer linkSpeedInMbps; + + /** + * Get name of the link provider. + * + * @return the linkProviderName value + */ + public String linkProviderName() { + return this.linkProviderName; + } + + /** + * Set name of the link provider. + * + * @param linkProviderName the linkProviderName value to set + * @return the VpnLinkProviderProperties object itself. + */ + public VpnLinkProviderProperties withLinkProviderName(String linkProviderName) { + this.linkProviderName = linkProviderName; + return this; + } + + /** + * Get link speed. + * + * @return the linkSpeedInMbps value + */ + public Integer linkSpeedInMbps() { + return this.linkSpeedInMbps; + } + + /** + * Set link speed. + * + * @param linkSpeedInMbps the linkSpeedInMbps value to set + * @return the VpnLinkProviderProperties object itself. + */ + public VpnLinkProviderProperties withLinkSpeedInMbps(Integer linkSpeedInMbps) { + this.linkSpeedInMbps = linkSpeedInMbps; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnPacketCaptureStartParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnPacketCaptureStartParameters.java new file mode 100644 index 000000000000..7853768108e5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnPacketCaptureStartParameters.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Start packet capture parameters on virtual network gateway. + */ +public class VpnPacketCaptureStartParameters { + /** + * Start Packet capture parameters. + */ + @JsonProperty(value = "filterData") + private String filterData; + + /** + * Get start Packet capture parameters. + * + * @return the filterData value + */ + public String filterData() { + return this.filterData; + } + + /** + * Set start Packet capture parameters. + * + * @param filterData the filterData value to set + * @return the VpnPacketCaptureStartParameters object itself. + */ + public VpnPacketCaptureStartParameters withFilterData(String filterData) { + this.filterData = filterData; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnPacketCaptureStopParameters.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnPacketCaptureStopParameters.java new file mode 100644 index 000000000000..2315c163491f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnPacketCaptureStopParameters.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Stop packet capture parameters. + */ +public class VpnPacketCaptureStopParameters { + /** + * SAS url for packet capture on virtual network gateway. + */ + @JsonProperty(value = "sasUrl") + private String sasUrl; + + /** + * Get sAS url for packet capture on virtual network gateway. + * + * @return the sasUrl value + */ + public String sasUrl() { + return this.sasUrl; + } + + /** + * Set sAS url for packet capture on virtual network gateway. + * + * @param sasUrl the sasUrl value to set + * @return the VpnPacketCaptureStopParameters object itself. + */ + public VpnPacketCaptureStopParameters withSasUrl(String sasUrl) { + this.sasUrl = sasUrl; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnProfileResponse.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnProfileResponse.java new file mode 100644 index 000000000000..99ad813f4d95 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnProfileResponse.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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnProfileResponseInner; + +/** + * Type representing VpnProfileResponse. + */ +public interface VpnProfileResponse extends HasInner, HasManager { + /** + * @return the profileUrl value. + */ + String profileUrl(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigRadiusClientRootCertificate.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigRadiusClientRootCertificate.java new file mode 100644 index 000000000000..3993af63210f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigRadiusClientRootCertificate.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the Radius client root certificate of VpnServerConfiguration. + */ +public class VpnServerConfigRadiusClientRootCertificate { + /** + * The certificate name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The Radius client root certificate thumbprint. + */ + @JsonProperty(value = "thumbprint") + private String thumbprint; + + /** + * Get the certificate name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the certificate name. + * + * @param name the name value to set + * @return the VpnServerConfigRadiusClientRootCertificate object itself. + */ + public VpnServerConfigRadiusClientRootCertificate withName(String name) { + this.name = name; + return this; + } + + /** + * Get the Radius client root certificate thumbprint. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set the Radius client root certificate thumbprint. + * + * @param thumbprint the thumbprint value to set + * @return the VpnServerConfigRadiusClientRootCertificate object itself. + */ + public VpnServerConfigRadiusClientRootCertificate withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigRadiusServerRootCertificate.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigRadiusServerRootCertificate.java new file mode 100644 index 000000000000..9f181bd420f4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigRadiusServerRootCertificate.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of Radius Server root certificate of VpnServerConfiguration. + */ +public class VpnServerConfigRadiusServerRootCertificate { + /** + * The certificate name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The certificate public data. + */ + @JsonProperty(value = "publicCertData") + private String publicCertData; + + /** + * Get the certificate name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the certificate name. + * + * @param name the name value to set + * @return the VpnServerConfigRadiusServerRootCertificate object itself. + */ + public VpnServerConfigRadiusServerRootCertificate withName(String name) { + this.name = name; + return this; + } + + /** + * Get the certificate public data. + * + * @return the publicCertData value + */ + public String publicCertData() { + return this.publicCertData; + } + + /** + * Set the certificate public data. + * + * @param publicCertData the publicCertData value to set + * @return the VpnServerConfigRadiusServerRootCertificate object itself. + */ + public VpnServerConfigRadiusServerRootCertificate withPublicCertData(String publicCertData) { + this.publicCertData = publicCertData; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigVpnClientRevokedCertificate.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigVpnClientRevokedCertificate.java new file mode 100644 index 000000000000..24b497e797dd --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigVpnClientRevokedCertificate.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the revoked VPN client certificate of VpnServerConfiguration. + */ +public class VpnServerConfigVpnClientRevokedCertificate { + /** + * The certificate name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The revoked VPN client certificate thumbprint. + */ + @JsonProperty(value = "thumbprint") + private String thumbprint; + + /** + * Get the certificate name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the certificate name. + * + * @param name the name value to set + * @return the VpnServerConfigVpnClientRevokedCertificate object itself. + */ + public VpnServerConfigVpnClientRevokedCertificate withName(String name) { + this.name = name; + return this; + } + + /** + * Get the revoked VPN client certificate thumbprint. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set the revoked VPN client certificate thumbprint. + * + * @param thumbprint the thumbprint value to set + * @return the VpnServerConfigVpnClientRevokedCertificate object itself. + */ + public VpnServerConfigVpnClientRevokedCertificate withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigVpnClientRootCertificate.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigVpnClientRootCertificate.java new file mode 100644 index 000000000000..8dd517c7a7d0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigVpnClientRootCertificate.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of VPN client root certificate of VpnServerConfiguration. + */ +public class VpnServerConfigVpnClientRootCertificate { + /** + * The certificate name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The certificate public data. + */ + @JsonProperty(value = "publicCertData") + private String publicCertData; + + /** + * Get the certificate name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the certificate name. + * + * @param name the name value to set + * @return the VpnServerConfigVpnClientRootCertificate object itself. + */ + public VpnServerConfigVpnClientRootCertificate withName(String name) { + this.name = name; + return this; + } + + /** + * Get the certificate public data. + * + * @return the publicCertData value + */ + public String publicCertData() { + return this.publicCertData; + } + + /** + * Set the certificate public data. + * + * @param publicCertData the publicCertData value to set + * @return the VpnServerConfigVpnClientRootCertificate object itself. + */ + public VpnServerConfigVpnClientRootCertificate withPublicCertData(String publicCertData) { + this.publicCertData = publicCertData; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfiguration.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfiguration.java new file mode 100644 index 000000000000..9c887a44d8eb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfiguration.java @@ -0,0 +1,408 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnServerConfigurationInner; + +/** + * Type representing VpnServerConfiguration. + */ +public interface VpnServerConfiguration extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the aadAuthenticationParameters value. + */ + AadAuthenticationParameters aadAuthenticationParameters(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the p2SVpnGateways value. + */ + List p2SVpnGateways(); + + /** + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * @return the radiusClientRootCertificates value. + */ + List radiusClientRootCertificates(); + + /** + * @return the radiusServerAddress value. + */ + String radiusServerAddress(); + + /** + * @return the radiusServerRootCertificates value. + */ + List radiusServerRootCertificates(); + + /** + * @return the radiusServerSecret value. + */ + String radiusServerSecret(); + + /** + * @return the vpnAuthenticationTypes value. + */ + List vpnAuthenticationTypes(); + + /** + * @return the vpnClientIpsecPolicies value. + */ + List vpnClientIpsecPolicies(); + + /** + * @return the vpnClientRevokedCertificates value. + */ + List vpnClientRevokedCertificates(); + + /** + * @return the vpnClientRootCertificates value. + */ + List vpnClientRootCertificates(); + + /** + * @return the vpnProtocols value. + */ + List vpnProtocols(); + + /** + * @return the vpnServerConfigurationName value. + */ + String vpnServerConfigurationName(); + + /** + * @return the vpnServerConfigurationPropertiesEtag value. + */ + String vpnServerConfigurationPropertiesEtag(); + + /** + * The entirety of the VpnServerConfiguration definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of VpnServerConfiguration definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VpnServerConfiguration definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the VpnServerConfiguration definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the vpnserverconfiguration definition allowing to specify AadAuthenticationParameters. + */ + interface WithAadAuthenticationParameters { + /** + * Specifies aadAuthenticationParameters. + * @param aadAuthenticationParameters The set of aad vpn authentication parameters + * @return the next definition stage + */ + WithCreate withAadAuthenticationParameters(AadAuthenticationParameters aadAuthenticationParameters); + } + + /** + * The stage of the vpnserverconfiguration definition allowing to specify RadiusClientRootCertificates. + */ + interface WithRadiusClientRootCertificates { + /** + * Specifies radiusClientRootCertificates. + * @param radiusClientRootCertificates Radius client root certificate of VpnServerConfiguration + * @return the next definition stage + */ + WithCreate withRadiusClientRootCertificates(List radiusClientRootCertificates); + } + + /** + * The stage of the vpnserverconfiguration definition allowing to specify RadiusServerAddress. + */ + interface WithRadiusServerAddress { + /** + * Specifies radiusServerAddress. + * @param radiusServerAddress The radius server address property of the VpnServerConfiguration resource for point to site client connection + * @return the next definition stage + */ + WithCreate withRadiusServerAddress(String radiusServerAddress); + } + + /** + * The stage of the vpnserverconfiguration definition allowing to specify RadiusServerRootCertificates. + */ + interface WithRadiusServerRootCertificates { + /** + * Specifies radiusServerRootCertificates. + * @param radiusServerRootCertificates Radius Server root certificate of VpnServerConfiguration + * @return the next definition stage + */ + WithCreate withRadiusServerRootCertificates(List radiusServerRootCertificates); + } + + /** + * The stage of the vpnserverconfiguration definition allowing to specify RadiusServerSecret. + */ + interface WithRadiusServerSecret { + /** + * Specifies radiusServerSecret. + * @param radiusServerSecret The radius secret property of the VpnServerConfiguration resource for point to site client connection + * @return the next definition stage + */ + WithCreate withRadiusServerSecret(String radiusServerSecret); + } + + /** + * The stage of the vpnserverconfiguration definition allowing to specify VpnAuthenticationTypes. + */ + interface WithVpnAuthenticationTypes { + /** + * Specifies vpnAuthenticationTypes. + * @param vpnAuthenticationTypes VPN authentication types for the VpnServerConfiguration + * @return the next definition stage + */ + WithCreate withVpnAuthenticationTypes(List vpnAuthenticationTypes); + } + + /** + * The stage of the vpnserverconfiguration definition allowing to specify VpnClientIpsecPolicies. + */ + interface WithVpnClientIpsecPolicies { + /** + * Specifies vpnClientIpsecPolicies. + * @param vpnClientIpsecPolicies VpnClientIpsecPolicies for VpnServerConfiguration + * @return the next definition stage + */ + WithCreate withVpnClientIpsecPolicies(List vpnClientIpsecPolicies); + } + + /** + * The stage of the vpnserverconfiguration definition allowing to specify VpnClientRevokedCertificates. + */ + interface WithVpnClientRevokedCertificates { + /** + * Specifies vpnClientRevokedCertificates. + * @param vpnClientRevokedCertificates VPN client revoked certificate of VpnServerConfiguration + * @return the next definition stage + */ + WithCreate withVpnClientRevokedCertificates(List vpnClientRevokedCertificates); + } + + /** + * The stage of the vpnserverconfiguration definition allowing to specify VpnClientRootCertificates. + */ + interface WithVpnClientRootCertificates { + /** + * Specifies vpnClientRootCertificates. + * @param vpnClientRootCertificates VPN client root certificate of VpnServerConfiguration + * @return the next definition stage + */ + WithCreate withVpnClientRootCertificates(List vpnClientRootCertificates); + } + + /** + * The stage of the vpnserverconfiguration definition allowing to specify VpnProtocols. + */ + interface WithVpnProtocols { + /** + * Specifies vpnProtocols. + * @param vpnProtocols VPN protocols for the VpnServerConfiguration + * @return the next definition stage + */ + WithCreate withVpnProtocols(List vpnProtocols); + } + + /** + * The stage of the vpnserverconfiguration definition allowing to specify VpnServerConfigurationName. + */ + interface WithVpnServerConfigurationName { + /** + * Specifies vpnServerConfigurationName. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration that is unique within a resource group + * @return the next definition stage + */ + WithCreate withVpnServerConfigurationName(String vpnServerConfigurationName); + } + + /** + * 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.WithAadAuthenticationParameters, DefinitionStages.WithRadiusClientRootCertificates, DefinitionStages.WithRadiusServerAddress, DefinitionStages.WithRadiusServerRootCertificates, DefinitionStages.WithRadiusServerSecret, DefinitionStages.WithVpnAuthenticationTypes, DefinitionStages.WithVpnClientIpsecPolicies, DefinitionStages.WithVpnClientRevokedCertificates, DefinitionStages.WithVpnClientRootCertificates, DefinitionStages.WithVpnProtocols, DefinitionStages.WithVpnServerConfigurationName { + } + } + /** + * The template for a VpnServerConfiguration update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAadAuthenticationParameters, UpdateStages.WithRadiusClientRootCertificates, UpdateStages.WithRadiusServerAddress, UpdateStages.WithRadiusServerRootCertificates, UpdateStages.WithRadiusServerSecret, UpdateStages.WithVpnAuthenticationTypes, UpdateStages.WithVpnClientIpsecPolicies, UpdateStages.WithVpnClientRevokedCertificates, UpdateStages.WithVpnClientRootCertificates, UpdateStages.WithVpnProtocols, UpdateStages.WithVpnServerConfigurationName { + } + + /** + * Grouping of VpnServerConfiguration update stages. + */ + interface UpdateStages { + /** + * The stage of the vpnserverconfiguration update allowing to specify AadAuthenticationParameters. + */ + interface WithAadAuthenticationParameters { + /** + * Specifies aadAuthenticationParameters. + * @param aadAuthenticationParameters The set of aad vpn authentication parameters + * @return the next update stage + */ + Update withAadAuthenticationParameters(AadAuthenticationParameters aadAuthenticationParameters); + } + + /** + * The stage of the vpnserverconfiguration update allowing to specify RadiusClientRootCertificates. + */ + interface WithRadiusClientRootCertificates { + /** + * Specifies radiusClientRootCertificates. + * @param radiusClientRootCertificates Radius client root certificate of VpnServerConfiguration + * @return the next update stage + */ + Update withRadiusClientRootCertificates(List radiusClientRootCertificates); + } + + /** + * The stage of the vpnserverconfiguration update allowing to specify RadiusServerAddress. + */ + interface WithRadiusServerAddress { + /** + * Specifies radiusServerAddress. + * @param radiusServerAddress The radius server address property of the VpnServerConfiguration resource for point to site client connection + * @return the next update stage + */ + Update withRadiusServerAddress(String radiusServerAddress); + } + + /** + * The stage of the vpnserverconfiguration update allowing to specify RadiusServerRootCertificates. + */ + interface WithRadiusServerRootCertificates { + /** + * Specifies radiusServerRootCertificates. + * @param radiusServerRootCertificates Radius Server root certificate of VpnServerConfiguration + * @return the next update stage + */ + Update withRadiusServerRootCertificates(List radiusServerRootCertificates); + } + + /** + * The stage of the vpnserverconfiguration update allowing to specify RadiusServerSecret. + */ + interface WithRadiusServerSecret { + /** + * Specifies radiusServerSecret. + * @param radiusServerSecret The radius secret property of the VpnServerConfiguration resource for point to site client connection + * @return the next update stage + */ + Update withRadiusServerSecret(String radiusServerSecret); + } + + /** + * The stage of the vpnserverconfiguration update allowing to specify VpnAuthenticationTypes. + */ + interface WithVpnAuthenticationTypes { + /** + * Specifies vpnAuthenticationTypes. + * @param vpnAuthenticationTypes VPN authentication types for the VpnServerConfiguration + * @return the next update stage + */ + Update withVpnAuthenticationTypes(List vpnAuthenticationTypes); + } + + /** + * The stage of the vpnserverconfiguration update allowing to specify VpnClientIpsecPolicies. + */ + interface WithVpnClientIpsecPolicies { + /** + * Specifies vpnClientIpsecPolicies. + * @param vpnClientIpsecPolicies VpnClientIpsecPolicies for VpnServerConfiguration + * @return the next update stage + */ + Update withVpnClientIpsecPolicies(List vpnClientIpsecPolicies); + } + + /** + * The stage of the vpnserverconfiguration update allowing to specify VpnClientRevokedCertificates. + */ + interface WithVpnClientRevokedCertificates { + /** + * Specifies vpnClientRevokedCertificates. + * @param vpnClientRevokedCertificates VPN client revoked certificate of VpnServerConfiguration + * @return the next update stage + */ + Update withVpnClientRevokedCertificates(List vpnClientRevokedCertificates); + } + + /** + * The stage of the vpnserverconfiguration update allowing to specify VpnClientRootCertificates. + */ + interface WithVpnClientRootCertificates { + /** + * Specifies vpnClientRootCertificates. + * @param vpnClientRootCertificates VPN client root certificate of VpnServerConfiguration + * @return the next update stage + */ + Update withVpnClientRootCertificates(List vpnClientRootCertificates); + } + + /** + * The stage of the vpnserverconfiguration update allowing to specify VpnProtocols. + */ + interface WithVpnProtocols { + /** + * Specifies vpnProtocols. + * @param vpnProtocols VPN protocols for the VpnServerConfiguration + * @return the next update stage + */ + Update withVpnProtocols(List vpnProtocols); + } + + /** + * The stage of the vpnserverconfiguration update allowing to specify VpnServerConfigurationName. + */ + interface WithVpnServerConfigurationName { + /** + * Specifies vpnServerConfigurationName. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration that is unique within a resource group + * @return the next update stage + */ + Update withVpnServerConfigurationName(String vpnServerConfigurationName); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigurations.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigurations.java new file mode 100644 index 000000000000..24f0dee7cd7d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigurations.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.network.v2019_09_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.network.v2019_09_01.implementation.VpnServerConfigurationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VpnServerConfigurations. + */ +public interface VpnServerConfigurations extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigurationsAssociatedWithVirtualWans.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigurationsAssociatedWithVirtualWans.java new file mode 100644 index 000000000000..a8573ff30577 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigurationsAssociatedWithVirtualWans.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnServerConfigurationsAssociatedWithVirtualWansInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VpnServerConfigurationsAssociatedWithVirtualWans. + */ +public interface VpnServerConfigurationsAssociatedWithVirtualWans extends HasInner { + /** + * Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String virtualWANName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigurationsResponse.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigurationsResponse.java new file mode 100644 index 000000000000..811ca37ae2a0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnServerConfigurationsResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnServerConfigurationsResponseInner; +import java.util.List; + +/** + * Type representing VpnServerConfigurationsResponse. + */ +public interface VpnServerConfigurationsResponse extends HasInner, HasManager { + /** + * @return the vpnServerConfigurationResourceIds value. + */ + List vpnServerConfigurationResourceIds(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSite.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSite.java new file mode 100644 index 000000000000..9ec1e173e6db --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSite.java @@ -0,0 +1,313 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnSiteLinkInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnSiteInner; + +/** + * Type representing VpnSite. + */ +public interface VpnSite extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the addressSpace value. + */ + AddressSpace addressSpace(); + + /** + * @return the bgpProperties value. + */ + BgpSettings bgpProperties(); + + /** + * @return the deviceProperties value. + */ + DeviceProperties deviceProperties(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the ipAddress value. + */ + String ipAddress(); + + /** + * @return the isSecuritySite value. + */ + Boolean isSecuritySite(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the siteKey value. + */ + String siteKey(); + + /** + * @return the virtualWan value. + */ + SubResource virtualWan(); + + /** + * @return the vpnSiteLinks value. + */ + List vpnSiteLinks(); + + /** + * The entirety of the VpnSite definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of VpnSite definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VpnSite definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the VpnSite definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the vpnsite definition allowing to specify AddressSpace. + */ + interface WithAddressSpace { + /** + * Specifies addressSpace. + * @param addressSpace The AddressSpace that contains an array of IP address ranges + * @return the next definition stage + */ + WithCreate withAddressSpace(AddressSpace addressSpace); + } + + /** + * The stage of the vpnsite definition allowing to specify BgpProperties. + */ + interface WithBgpProperties { + /** + * Specifies bgpProperties. + * @param bgpProperties The set of bgp properties + * @return the next definition stage + */ + WithCreate withBgpProperties(BgpSettings bgpProperties); + } + + /** + * The stage of the vpnsite definition allowing to specify DeviceProperties. + */ + interface WithDeviceProperties { + /** + * Specifies deviceProperties. + * @param deviceProperties The device properties + * @return the next definition stage + */ + WithCreate withDeviceProperties(DeviceProperties deviceProperties); + } + + /** + * The stage of the vpnsite definition allowing to specify IpAddress. + */ + interface WithIpAddress { + /** + * Specifies ipAddress. + * @param ipAddress The ip-address for the vpn-site + * @return the next definition stage + */ + WithCreate withIpAddress(String ipAddress); + } + + /** + * The stage of the vpnsite definition allowing to specify IsSecuritySite. + */ + interface WithIsSecuritySite { + /** + * Specifies isSecuritySite. + * @param isSecuritySite IsSecuritySite flag + * @return the next definition stage + */ + WithCreate withIsSecuritySite(Boolean isSecuritySite); + } + + /** + * The stage of the vpnsite definition allowing to specify SiteKey. + */ + interface WithSiteKey { + /** + * Specifies siteKey. + * @param siteKey The key for vpn-site that can be used for connections + * @return the next definition stage + */ + WithCreate withSiteKey(String siteKey); + } + + /** + * The stage of the vpnsite definition allowing to specify VirtualWan. + */ + interface WithVirtualWan { + /** + * Specifies virtualWan. + * @param virtualWan The VirtualWAN to which the vpnSite belongs + * @return the next definition stage + */ + WithCreate withVirtualWan(SubResource virtualWan); + } + + /** + * The stage of the vpnsite definition allowing to specify VpnSiteLinks. + */ + interface WithVpnSiteLinks { + /** + * Specifies vpnSiteLinks. + * @param vpnSiteLinks List of all vpn site links + * @return the next definition stage + */ + WithCreate withVpnSiteLinks(List vpnSiteLinks); + } + + /** + * 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.WithAddressSpace, DefinitionStages.WithBgpProperties, DefinitionStages.WithDeviceProperties, DefinitionStages.WithIpAddress, DefinitionStages.WithIsSecuritySite, DefinitionStages.WithSiteKey, DefinitionStages.WithVirtualWan, DefinitionStages.WithVpnSiteLinks { + } + } + /** + * The template for a VpnSite update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAddressSpace, UpdateStages.WithBgpProperties, UpdateStages.WithDeviceProperties, UpdateStages.WithIpAddress, UpdateStages.WithIsSecuritySite, UpdateStages.WithSiteKey, UpdateStages.WithVirtualWan, UpdateStages.WithVpnSiteLinks { + } + + /** + * Grouping of VpnSite update stages. + */ + interface UpdateStages { + /** + * The stage of the vpnsite update allowing to specify AddressSpace. + */ + interface WithAddressSpace { + /** + * Specifies addressSpace. + * @param addressSpace The AddressSpace that contains an array of IP address ranges + * @return the next update stage + */ + Update withAddressSpace(AddressSpace addressSpace); + } + + /** + * The stage of the vpnsite update allowing to specify BgpProperties. + */ + interface WithBgpProperties { + /** + * Specifies bgpProperties. + * @param bgpProperties The set of bgp properties + * @return the next update stage + */ + Update withBgpProperties(BgpSettings bgpProperties); + } + + /** + * The stage of the vpnsite update allowing to specify DeviceProperties. + */ + interface WithDeviceProperties { + /** + * Specifies deviceProperties. + * @param deviceProperties The device properties + * @return the next update stage + */ + Update withDeviceProperties(DeviceProperties deviceProperties); + } + + /** + * The stage of the vpnsite update allowing to specify IpAddress. + */ + interface WithIpAddress { + /** + * Specifies ipAddress. + * @param ipAddress The ip-address for the vpn-site + * @return the next update stage + */ + Update withIpAddress(String ipAddress); + } + + /** + * The stage of the vpnsite update allowing to specify IsSecuritySite. + */ + interface WithIsSecuritySite { + /** + * Specifies isSecuritySite. + * @param isSecuritySite IsSecuritySite flag + * @return the next update stage + */ + Update withIsSecuritySite(Boolean isSecuritySite); + } + + /** + * The stage of the vpnsite update allowing to specify SiteKey. + */ + interface WithSiteKey { + /** + * Specifies siteKey. + * @param siteKey The key for vpn-site that can be used for connections + * @return the next update stage + */ + Update withSiteKey(String siteKey); + } + + /** + * The stage of the vpnsite update allowing to specify VirtualWan. + */ + interface WithVirtualWan { + /** + * Specifies virtualWan. + * @param virtualWan The VirtualWAN to which the vpnSite belongs + * @return the next update stage + */ + Update withVirtualWan(SubResource virtualWan); + } + + /** + * The stage of the vpnsite update allowing to specify VpnSiteLinks. + */ + interface WithVpnSiteLinks { + /** + * Specifies vpnSiteLinks. + * @param vpnSiteLinks List of all vpn site links + * @return the next update stage + */ + Update withVpnSiteLinks(List vpnSiteLinks); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteId.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteId.java new file mode 100644 index 000000000000..79bd7418af4e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteId.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.network.v2019_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * VpnSite Resource. + */ +public class VpnSiteId { + /** + * The resource-uri of the vpn-site for which config is to be fetched. + */ + @JsonProperty(value = "vpnSite", access = JsonProperty.Access.WRITE_ONLY) + private String vpnSite; + + /** + * Get the resource-uri of the vpn-site for which config is to be fetched. + * + * @return the vpnSite value + */ + public String vpnSite() { + return this.vpnSite; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteLink.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteLink.java new file mode 100644 index 000000000000..8d28fe113978 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteLink.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnSiteLinkInner; +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.network.v2019_09_01.implementation.NetworkManager; + +/** + * Type representing VpnSiteLink. + */ +public interface VpnSiteLink extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the bgpProperties value. + */ + VpnLinkBgpSettings bgpProperties(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the ipAddress value. + */ + String ipAddress(); + + /** + * @return the linkProperties value. + */ + VpnLinkProviderProperties linkProperties(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteLinkConnections.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteLinkConnections.java new file mode 100644 index 000000000000..a3f8d9505f21 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteLinkConnections.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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnSiteLinkConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VpnSiteLinkConnections. + */ +public interface VpnSiteLinkConnections extends HasInner { + /** + * Retrieves the details of a vpn site link connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @param linkConnectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String gatewayName, String connectionName, String linkConnectionName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteLinks.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteLinks.java new file mode 100644 index 000000000000..7fcc2e81d769 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSiteLinks.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnSiteLinksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VpnSiteLinks. + */ +public interface VpnSiteLinks extends HasInner { + /** + * Retrieves the details of a VPN site link. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite. + * @param vpnSiteLinkName The name of the VpnSiteLink being retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String vpnSiteName, String vpnSiteLinkName); + + /** + * Lists all the vpnSiteLinks in a resource group for a vpn site. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByVpnSiteAsync(final String resourceGroupName, final String vpnSiteName); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSites.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSites.java new file mode 100644 index 000000000000..fb6b0a08a6e3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSites.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.network.v2019_09_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.network.v2019_09_01.implementation.VpnSitesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VpnSites. + */ +public interface VpnSites extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSitesConfigurations.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSitesConfigurations.java new file mode 100644 index 000000000000..6e65e5c5d530 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnSitesConfigurations.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.network.v2019_09_01; + +import rx.Completable; +import com.microsoft.azure.management.network.v2019_09_01.implementation.VpnSitesConfigurationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VpnSitesConfigurations. + */ +public interface VpnSitesConfigurations extends HasInner { + /** + * Gives the sas-url to download the configurations for vpn-sites in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed. + * @param request Parameters supplied to download vpn-sites configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable downloadAsync(String resourceGroupName, String virtualWANName, GetVpnSitesConfigurationRequest request); + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnType.java new file mode 100644 index 000000000000..5835b570d6e4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VpnType. + */ +public final class VpnType extends ExpandableStringEnum { + /** Static value PolicyBased for VpnType. */ + public static final VpnType POLICY_BASED = fromString("PolicyBased"); + + /** Static value RouteBased for VpnType. */ + public static final VpnType ROUTE_BASED = fromString("RouteBased"); + + /** + * Creates or finds a VpnType from its string representation. + * @param name a name to look for + * @return the corresponding VpnType + */ + @JsonCreator + public static VpnType fromString(String name) { + return fromString(name, VpnType.class); + } + + /** + * @return known VpnType values + */ + public static Collection values() { + return values(VpnType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallAction.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallAction.java new file mode 100644 index 000000000000..4ad3fc640aae --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallAction.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WebApplicationFirewallAction. + */ +public final class WebApplicationFirewallAction extends ExpandableStringEnum { + /** Static value Allow for WebApplicationFirewallAction. */ + public static final WebApplicationFirewallAction ALLOW = fromString("Allow"); + + /** Static value Block for WebApplicationFirewallAction. */ + public static final WebApplicationFirewallAction BLOCK = fromString("Block"); + + /** Static value Log for WebApplicationFirewallAction. */ + public static final WebApplicationFirewallAction LOG = fromString("Log"); + + /** + * Creates or finds a WebApplicationFirewallAction from its string representation. + * @param name a name to look for + * @return the corresponding WebApplicationFirewallAction + */ + @JsonCreator + public static WebApplicationFirewallAction fromString(String name) { + return fromString(name, WebApplicationFirewallAction.class); + } + + /** + * @return known WebApplicationFirewallAction values + */ + public static Collection values() { + return values(WebApplicationFirewallAction.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallCustomRule.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallCustomRule.java new file mode 100644 index 000000000000..3560168e7ba4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallCustomRule.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines contents of a web application rule. + */ +public class WebApplicationFirewallCustomRule { + /** + * The name of the resource that is unique within a policy. This name can + * be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Describes priority of the rule. Rules with a lower value will be + * evaluated before rules with a higher value. + */ + @JsonProperty(value = "priority", required = true) + private int priority; + + /** + * Describes type of rule. Possible values include: 'MatchRule', 'Invalid'. + */ + @JsonProperty(value = "ruleType", required = true) + private WebApplicationFirewallRuleType ruleType; + + /** + * List of match conditions. + */ + @JsonProperty(value = "matchConditions", required = true) + private List matchConditions; + + /** + * Type of Actions. Possible values include: 'Allow', 'Block', 'Log'. + */ + @JsonProperty(value = "action", required = true) + private WebApplicationFirewallAction action; + + /** + * Get the name of the resource that is unique within a policy. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a policy. This name can be used to access the resource. + * + * @param name the name value to set + * @return the WebApplicationFirewallCustomRule object itself. + */ + public WebApplicationFirewallCustomRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. + * + * @return the priority value + */ + public int priority() { + return this.priority; + } + + /** + * Set describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. + * + * @param priority the priority value to set + * @return the WebApplicationFirewallCustomRule object itself. + */ + public WebApplicationFirewallCustomRule withPriority(int priority) { + this.priority = priority; + return this; + } + + /** + * Get describes type of rule. Possible values include: 'MatchRule', 'Invalid'. + * + * @return the ruleType value + */ + public WebApplicationFirewallRuleType ruleType() { + return this.ruleType; + } + + /** + * Set describes type of rule. Possible values include: 'MatchRule', 'Invalid'. + * + * @param ruleType the ruleType value to set + * @return the WebApplicationFirewallCustomRule object itself. + */ + public WebApplicationFirewallCustomRule withRuleType(WebApplicationFirewallRuleType ruleType) { + this.ruleType = ruleType; + return this; + } + + /** + * Get list of match conditions. + * + * @return the matchConditions value + */ + public List matchConditions() { + return this.matchConditions; + } + + /** + * Set list of match conditions. + * + * @param matchConditions the matchConditions value to set + * @return the WebApplicationFirewallCustomRule object itself. + */ + public WebApplicationFirewallCustomRule withMatchConditions(List matchConditions) { + this.matchConditions = matchConditions; + return this; + } + + /** + * Get type of Actions. Possible values include: 'Allow', 'Block', 'Log'. + * + * @return the action value + */ + public WebApplicationFirewallAction action() { + return this.action; + } + + /** + * Set type of Actions. Possible values include: 'Allow', 'Block', 'Log'. + * + * @param action the action value to set + * @return the WebApplicationFirewallCustomRule object itself. + */ + public WebApplicationFirewallCustomRule withAction(WebApplicationFirewallAction action) { + this.action = action; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallEnabledState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallEnabledState.java new file mode 100644 index 000000000000..ed2930373573 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallEnabledState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WebApplicationFirewallEnabledState. + */ +public final class WebApplicationFirewallEnabledState extends ExpandableStringEnum { + /** Static value Disabled for WebApplicationFirewallEnabledState. */ + public static final WebApplicationFirewallEnabledState DISABLED = fromString("Disabled"); + + /** Static value Enabled for WebApplicationFirewallEnabledState. */ + public static final WebApplicationFirewallEnabledState ENABLED = fromString("Enabled"); + + /** + * Creates or finds a WebApplicationFirewallEnabledState from its string representation. + * @param name a name to look for + * @return the corresponding WebApplicationFirewallEnabledState + */ + @JsonCreator + public static WebApplicationFirewallEnabledState fromString(String name) { + return fromString(name, WebApplicationFirewallEnabledState.class); + } + + /** + * @return known WebApplicationFirewallEnabledState values + */ + public static Collection values() { + return values(WebApplicationFirewallEnabledState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallMatchVariable.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallMatchVariable.java new file mode 100644 index 000000000000..5fa2d6a2e418 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallMatchVariable.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WebApplicationFirewallMatchVariable. + */ +public final class WebApplicationFirewallMatchVariable extends ExpandableStringEnum { + /** Static value RemoteAddr for WebApplicationFirewallMatchVariable. */ + public static final WebApplicationFirewallMatchVariable REMOTE_ADDR = fromString("RemoteAddr"); + + /** Static value RequestMethod for WebApplicationFirewallMatchVariable. */ + public static final WebApplicationFirewallMatchVariable REQUEST_METHOD = fromString("RequestMethod"); + + /** Static value QueryString for WebApplicationFirewallMatchVariable. */ + public static final WebApplicationFirewallMatchVariable QUERY_STRING = fromString("QueryString"); + + /** Static value PostArgs for WebApplicationFirewallMatchVariable. */ + public static final WebApplicationFirewallMatchVariable POST_ARGS = fromString("PostArgs"); + + /** Static value RequestUri for WebApplicationFirewallMatchVariable. */ + public static final WebApplicationFirewallMatchVariable REQUEST_URI = fromString("RequestUri"); + + /** Static value RequestHeaders for WebApplicationFirewallMatchVariable. */ + public static final WebApplicationFirewallMatchVariable REQUEST_HEADERS = fromString("RequestHeaders"); + + /** Static value RequestBody for WebApplicationFirewallMatchVariable. */ + public static final WebApplicationFirewallMatchVariable REQUEST_BODY = fromString("RequestBody"); + + /** Static value RequestCookies for WebApplicationFirewallMatchVariable. */ + public static final WebApplicationFirewallMatchVariable REQUEST_COOKIES = fromString("RequestCookies"); + + /** + * Creates or finds a WebApplicationFirewallMatchVariable from its string representation. + * @param name a name to look for + * @return the corresponding WebApplicationFirewallMatchVariable + */ + @JsonCreator + public static WebApplicationFirewallMatchVariable fromString(String name) { + return fromString(name, WebApplicationFirewallMatchVariable.class); + } + + /** + * @return known WebApplicationFirewallMatchVariable values + */ + public static Collection values() { + return values(WebApplicationFirewallMatchVariable.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallMode.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallMode.java new file mode 100644 index 000000000000..a40b1d1be16d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallMode.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WebApplicationFirewallMode. + */ +public final class WebApplicationFirewallMode extends ExpandableStringEnum { + /** Static value Prevention for WebApplicationFirewallMode. */ + public static final WebApplicationFirewallMode PREVENTION = fromString("Prevention"); + + /** Static value Detection for WebApplicationFirewallMode. */ + public static final WebApplicationFirewallMode DETECTION = fromString("Detection"); + + /** + * Creates or finds a WebApplicationFirewallMode from its string representation. + * @param name a name to look for + * @return the corresponding WebApplicationFirewallMode + */ + @JsonCreator + public static WebApplicationFirewallMode fromString(String name) { + return fromString(name, WebApplicationFirewallMode.class); + } + + /** + * @return known WebApplicationFirewallMode values + */ + public static Collection values() { + return values(WebApplicationFirewallMode.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallOperator.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallOperator.java new file mode 100644 index 000000000000..beaa9bebf1e1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallOperator.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WebApplicationFirewallOperator. + */ +public final class WebApplicationFirewallOperator extends ExpandableStringEnum { + /** Static value IPMatch for WebApplicationFirewallOperator. */ + public static final WebApplicationFirewallOperator IPMATCH = fromString("IPMatch"); + + /** Static value Equal for WebApplicationFirewallOperator. */ + public static final WebApplicationFirewallOperator EQUAL = fromString("Equal"); + + /** Static value Contains for WebApplicationFirewallOperator. */ + public static final WebApplicationFirewallOperator CONTAINS = fromString("Contains"); + + /** Static value LessThan for WebApplicationFirewallOperator. */ + public static final WebApplicationFirewallOperator LESS_THAN = fromString("LessThan"); + + /** Static value GreaterThan for WebApplicationFirewallOperator. */ + public static final WebApplicationFirewallOperator GREATER_THAN = fromString("GreaterThan"); + + /** Static value LessThanOrEqual for WebApplicationFirewallOperator. */ + public static final WebApplicationFirewallOperator LESS_THAN_OR_EQUAL = fromString("LessThanOrEqual"); + + /** Static value GreaterThanOrEqual for WebApplicationFirewallOperator. */ + public static final WebApplicationFirewallOperator GREATER_THAN_OR_EQUAL = fromString("GreaterThanOrEqual"); + + /** Static value BeginsWith for WebApplicationFirewallOperator. */ + public static final WebApplicationFirewallOperator BEGINS_WITH = fromString("BeginsWith"); + + /** Static value EndsWith for WebApplicationFirewallOperator. */ + public static final WebApplicationFirewallOperator ENDS_WITH = fromString("EndsWith"); + + /** Static value Regex for WebApplicationFirewallOperator. */ + public static final WebApplicationFirewallOperator REGEX = fromString("Regex"); + + /** Static value GeoMatch for WebApplicationFirewallOperator. */ + public static final WebApplicationFirewallOperator GEO_MATCH = fromString("GeoMatch"); + + /** + * Creates or finds a WebApplicationFirewallOperator from its string representation. + * @param name a name to look for + * @return the corresponding WebApplicationFirewallOperator + */ + @JsonCreator + public static WebApplicationFirewallOperator fromString(String name) { + return fromString(name, WebApplicationFirewallOperator.class); + } + + /** + * @return known WebApplicationFirewallOperator values + */ + public static Collection values() { + return values(WebApplicationFirewallOperator.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallPolicies.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallPolicies.java new file mode 100644 index 000000000000..c9b0af7e32ef --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallPolicies.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.network.v2019_09_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.network.v2019_09_01.implementation.WebApplicationFirewallPoliciesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing WebApplicationFirewallPolicies. + */ +public interface WebApplicationFirewallPolicies extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallPolicy.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallPolicy.java new file mode 100644 index 000000000000..9b7bc5a8b34b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallPolicy.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.implementation.NetworkManager; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.implementation.WebApplicationFirewallPolicyInner; + +/** + * Type representing WebApplicationFirewallPolicy. + */ +public interface WebApplicationFirewallPolicy extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the applicationGateways value. + */ + List applicationGateways(); + + /** + * @return the customRules value. + */ + List customRules(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the httpListeners value. + */ + List httpListeners(); + + /** + * @return the managedRules value. + */ + ManagedRulesDefinition managedRules(); + + /** + * @return the pathBasedRules value. + */ + List pathBasedRules(); + + /** + * @return the policySettings value. + */ + PolicySettings policySettings(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceState value. + */ + WebApplicationFirewallPolicyResourceState resourceState(); + + /** + * The entirety of the WebApplicationFirewallPolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithManagedRules, DefinitionStages.WithCreate { + } + + /** + * Grouping of WebApplicationFirewallPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a WebApplicationFirewallPolicy definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the WebApplicationFirewallPolicy definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the webapplicationfirewallpolicy definition allowing to specify ManagedRules. + */ + interface WithManagedRules { + /** + * Specifies managedRules. + * @param managedRules Describes the managedRules structure + * @return the next definition stage +*/ + WithCreate withManagedRules(ManagedRulesDefinition managedRules); + } + + /** + * The stage of the webapplicationfirewallpolicy definition allowing to specify CustomRules. + */ + interface WithCustomRules { + /** + * Specifies customRules. + * @param customRules Describes custom rules inside the policy + * @return the next definition stage + */ + WithCreate withCustomRules(List customRules); + } + + /** + * The stage of the webapplicationfirewallpolicy definition allowing to specify PolicySettings. + */ + interface WithPolicySettings { + /** + * Specifies policySettings. + * @param policySettings Describes policySettings for policy + * @return the next definition stage + */ + WithCreate withPolicySettings(PolicySettings policySettings); + } + + /** + * 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.WithCustomRules, DefinitionStages.WithPolicySettings { + } + } + /** + * The template for a WebApplicationFirewallPolicy update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithCustomRules, UpdateStages.WithPolicySettings { + } + + /** + * Grouping of WebApplicationFirewallPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the webapplicationfirewallpolicy update allowing to specify CustomRules. + */ + interface WithCustomRules { + /** + * Specifies customRules. + * @param customRules Describes custom rules inside the policy + * @return the next update stage + */ + Update withCustomRules(List customRules); + } + + /** + * The stage of the webapplicationfirewallpolicy update allowing to specify PolicySettings. + */ + interface WithPolicySettings { + /** + * Specifies policySettings. + * @param policySettings Describes policySettings for policy + * @return the next update stage + */ + Update withPolicySettings(PolicySettings policySettings); + } + + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallPolicyResourceState.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallPolicyResourceState.java new file mode 100644 index 000000000000..b2c65fa49ca4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallPolicyResourceState.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WebApplicationFirewallPolicyResourceState. + */ +public final class WebApplicationFirewallPolicyResourceState extends ExpandableStringEnum { + /** Static value Creating for WebApplicationFirewallPolicyResourceState. */ + public static final WebApplicationFirewallPolicyResourceState CREATING = fromString("Creating"); + + /** Static value Enabling for WebApplicationFirewallPolicyResourceState. */ + public static final WebApplicationFirewallPolicyResourceState ENABLING = fromString("Enabling"); + + /** Static value Enabled for WebApplicationFirewallPolicyResourceState. */ + public static final WebApplicationFirewallPolicyResourceState ENABLED = fromString("Enabled"); + + /** Static value Disabling for WebApplicationFirewallPolicyResourceState. */ + public static final WebApplicationFirewallPolicyResourceState DISABLING = fromString("Disabling"); + + /** Static value Disabled for WebApplicationFirewallPolicyResourceState. */ + public static final WebApplicationFirewallPolicyResourceState DISABLED = fromString("Disabled"); + + /** Static value Deleting for WebApplicationFirewallPolicyResourceState. */ + public static final WebApplicationFirewallPolicyResourceState DELETING = fromString("Deleting"); + + /** + * Creates or finds a WebApplicationFirewallPolicyResourceState from its string representation. + * @param name a name to look for + * @return the corresponding WebApplicationFirewallPolicyResourceState + */ + @JsonCreator + public static WebApplicationFirewallPolicyResourceState fromString(String name) { + return fromString(name, WebApplicationFirewallPolicyResourceState.class); + } + + /** + * @return known WebApplicationFirewallPolicyResourceState values + */ + public static Collection values() { + return values(WebApplicationFirewallPolicyResourceState.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallRuleType.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallRuleType.java new file mode 100644 index 000000000000..7c8b9b0ae8b3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallRuleType.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WebApplicationFirewallRuleType. + */ +public final class WebApplicationFirewallRuleType extends ExpandableStringEnum { + /** Static value MatchRule for WebApplicationFirewallRuleType. */ + public static final WebApplicationFirewallRuleType MATCH_RULE = fromString("MatchRule"); + + /** Static value Invalid for WebApplicationFirewallRuleType. */ + public static final WebApplicationFirewallRuleType INVALID = fromString("Invalid"); + + /** + * Creates or finds a WebApplicationFirewallRuleType from its string representation. + * @param name a name to look for + * @return the corresponding WebApplicationFirewallRuleType + */ + @JsonCreator + public static WebApplicationFirewallRuleType fromString(String name) { + return fromString(name, WebApplicationFirewallRuleType.class); + } + + /** + * @return known WebApplicationFirewallRuleType values + */ + public static Collection values() { + return values(WebApplicationFirewallRuleType.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallTransform.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallTransform.java new file mode 100644 index 000000000000..5bf99ef76dee --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/WebApplicationFirewallTransform.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.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WebApplicationFirewallTransform. + */ +public final class WebApplicationFirewallTransform extends ExpandableStringEnum { + /** Static value Lowercase for WebApplicationFirewallTransform. */ + public static final WebApplicationFirewallTransform LOWERCASE = fromString("Lowercase"); + + /** Static value Trim for WebApplicationFirewallTransform. */ + public static final WebApplicationFirewallTransform TRIM = fromString("Trim"); + + /** Static value UrlDecode for WebApplicationFirewallTransform. */ + public static final WebApplicationFirewallTransform URL_DECODE = fromString("UrlDecode"); + + /** Static value UrlEncode for WebApplicationFirewallTransform. */ + public static final WebApplicationFirewallTransform URL_ENCODE = fromString("UrlEncode"); + + /** Static value RemoveNulls for WebApplicationFirewallTransform. */ + public static final WebApplicationFirewallTransform REMOVE_NULLS = fromString("RemoveNulls"); + + /** Static value HtmlEntityDecode for WebApplicationFirewallTransform. */ + public static final WebApplicationFirewallTransform HTML_ENTITY_DECODE = fromString("HtmlEntityDecode"); + + /** + * Creates or finds a WebApplicationFirewallTransform from its string representation. + * @param name a name to look for + * @return the corresponding WebApplicationFirewallTransform + */ + @JsonCreator + public static WebApplicationFirewallTransform fromString(String name) { + return fromString(name, WebApplicationFirewallTransform.class); + } + + /** + * @return known WebApplicationFirewallTransform values + */ + public static Collection values() { + return values(WebApplicationFirewallTransform.class); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableSslOptionsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableSslOptionsImpl.java new file mode 100644 index 000000000000..028234ba0f92 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableSslOptionsImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayAvailableSslOptions; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslCipherSuite; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslProtocol; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslPolicyName; +import com.microsoft.azure.SubResource; +import java.util.Map; + +class ApplicationGatewayAvailableSslOptionsImpl extends WrapperImpl implements ApplicationGatewayAvailableSslOptions { + private final NetworkManager manager; + ApplicationGatewayAvailableSslOptionsImpl(ApplicationGatewayAvailableSslOptionsInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List availableCipherSuites() { + return this.inner().availableCipherSuites(); + } + + @Override + public List availableProtocols() { + return this.inner().availableProtocols(); + } + + @Override + public ApplicationGatewaySslPolicyName defaultPolicy() { + return this.inner().defaultPolicy(); + } + + @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 List predefinedPolicies() { + return this.inner().predefinedPolicies(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableSslOptionsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableSslOptionsInner.java new file mode 100644 index 000000000000..d3d872848d84 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableSslOptionsInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslPolicyName; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslCipherSuite; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslProtocol; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Response for ApplicationGatewayAvailableSslOptions API service call. + */ +@JsonFlatten +@SkipParentValidation +public class ApplicationGatewayAvailableSslOptionsInner extends Resource { + /** + * List of available Ssl predefined policy. + */ + @JsonProperty(value = "properties.predefinedPolicies") + private List predefinedPolicies; + + /** + * Name of the Ssl predefined policy applied by default to application + * gateway. Possible values include: 'AppGwSslPolicy20150501', + * 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'. + */ + @JsonProperty(value = "properties.defaultPolicy") + private ApplicationGatewaySslPolicyName defaultPolicy; + + /** + * List of available Ssl cipher suites. + */ + @JsonProperty(value = "properties.availableCipherSuites") + private List availableCipherSuites; + + /** + * List of available Ssl protocols. + */ + @JsonProperty(value = "properties.availableProtocols") + private List availableProtocols; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get list of available Ssl predefined policy. + * + * @return the predefinedPolicies value + */ + public List predefinedPolicies() { + return this.predefinedPolicies; + } + + /** + * Set list of available Ssl predefined policy. + * + * @param predefinedPolicies the predefinedPolicies value to set + * @return the ApplicationGatewayAvailableSslOptionsInner object itself. + */ + public ApplicationGatewayAvailableSslOptionsInner withPredefinedPolicies(List predefinedPolicies) { + this.predefinedPolicies = predefinedPolicies; + return this; + } + + /** + * Get name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'. + * + * @return the defaultPolicy value + */ + public ApplicationGatewaySslPolicyName defaultPolicy() { + return this.defaultPolicy; + } + + /** + * Set name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'. + * + * @param defaultPolicy the defaultPolicy value to set + * @return the ApplicationGatewayAvailableSslOptionsInner object itself. + */ + public ApplicationGatewayAvailableSslOptionsInner withDefaultPolicy(ApplicationGatewaySslPolicyName defaultPolicy) { + this.defaultPolicy = defaultPolicy; + return this; + } + + /** + * Get list of available Ssl cipher suites. + * + * @return the availableCipherSuites value + */ + public List availableCipherSuites() { + return this.availableCipherSuites; + } + + /** + * Set list of available Ssl cipher suites. + * + * @param availableCipherSuites the availableCipherSuites value to set + * @return the ApplicationGatewayAvailableSslOptionsInner object itself. + */ + public ApplicationGatewayAvailableSslOptionsInner withAvailableCipherSuites(List availableCipherSuites) { + this.availableCipherSuites = availableCipherSuites; + return this; + } + + /** + * Get list of available Ssl protocols. + * + * @return the availableProtocols value + */ + public List availableProtocols() { + return this.availableProtocols; + } + + /** + * Set list of available Ssl protocols. + * + * @param availableProtocols the availableProtocols value to set + * @return the ApplicationGatewayAvailableSslOptionsInner object itself. + */ + public ApplicationGatewayAvailableSslOptionsInner withAvailableProtocols(List availableProtocols) { + this.availableProtocols = availableProtocols; + return this; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the ApplicationGatewayAvailableSslOptionsInner object itself. + */ + public ApplicationGatewayAvailableSslOptionsInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableWafRuleSetsResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableWafRuleSetsResultImpl.java new file mode 100644 index 000000000000..0017215c137e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableWafRuleSetsResultImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayAvailableWafRuleSetsResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayFirewallRuleSet; + +class ApplicationGatewayAvailableWafRuleSetsResultImpl extends WrapperImpl implements ApplicationGatewayAvailableWafRuleSetsResult { + private final NetworkManager manager; + ApplicationGatewayAvailableWafRuleSetsResultImpl(ApplicationGatewayAvailableWafRuleSetsResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableWafRuleSetsResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableWafRuleSetsResultInner.java new file mode 100644 index 000000000000..971db246910f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayAvailableWafRuleSetsResultInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayFirewallRuleSet; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for ApplicationGatewayAvailableWafRuleSets API service call. + */ +public class ApplicationGatewayAvailableWafRuleSetsResultInner { + /** + * The list of application gateway rule sets. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the list of application gateway rule sets. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the list of application gateway rule sets. + * + * @param value the value value to set + * @return the ApplicationGatewayAvailableWafRuleSetsResultInner object itself. + */ + public ApplicationGatewayAvailableWafRuleSetsResultInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthImpl.java new file mode 100644 index 000000000000..4d86d3f95f28 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendHealth; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendHealthPool; + +class ApplicationGatewayBackendHealthImpl extends WrapperImpl implements ApplicationGatewayBackendHealth { + private final NetworkManager manager; + ApplicationGatewayBackendHealthImpl(ApplicationGatewayBackendHealthInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List backendAddressPools() { + return this.inner().backendAddressPools(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthInner.java new file mode 100644 index 000000000000..cfd81638c6e7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendHealthPool; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for ApplicationGatewayBackendHealth API service call. + */ +public class ApplicationGatewayBackendHealthInner { + /** + * A list of ApplicationGatewayBackendHealthPool resources. + */ + @JsonProperty(value = "backendAddressPools") + private List backendAddressPools; + + /** + * Get a list of ApplicationGatewayBackendHealthPool resources. + * + * @return the backendAddressPools value + */ + public List backendAddressPools() { + return this.backendAddressPools; + } + + /** + * Set a list of ApplicationGatewayBackendHealthPool resources. + * + * @param backendAddressPools the backendAddressPools value to set + * @return the ApplicationGatewayBackendHealthInner object itself. + */ + public ApplicationGatewayBackendHealthInner withBackendAddressPools(List backendAddressPools) { + this.backendAddressPools = backendAddressPools; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthOnDemandImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthOnDemandImpl.java new file mode 100644 index 000000000000..b33b13881bb1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthOnDemandImpl.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendHealthOnDemand; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendAddressPool; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendHealthHttpSettings; + +class ApplicationGatewayBackendHealthOnDemandImpl extends WrapperImpl implements ApplicationGatewayBackendHealthOnDemand { + private final NetworkManager manager; + ApplicationGatewayBackendHealthOnDemandImpl(ApplicationGatewayBackendHealthOnDemandInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public ApplicationGatewayBackendAddressPool backendAddressPool() { + return this.inner().backendAddressPool(); + } + + @Override + public ApplicationGatewayBackendHealthHttpSettings backendHealthHttpSettings() { + return this.inner().backendHealthHttpSettings(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthOnDemandInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthOnDemandInner.java new file mode 100644 index 000000000000..58f3a50e0d55 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthOnDemandInner.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendAddressPool; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendHealthHttpSettings; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Result of on demand test probe. + */ +public class ApplicationGatewayBackendHealthOnDemandInner { + /** + * Reference of an ApplicationGatewayBackendAddressPool resource. + */ + @JsonProperty(value = "backendAddressPool") + private ApplicationGatewayBackendAddressPool backendAddressPool; + + /** + * Application gateway BackendHealthHttp settings. + */ + @JsonProperty(value = "backendHealthHttpSettings") + private ApplicationGatewayBackendHealthHttpSettings backendHealthHttpSettings; + + /** + * Get reference of an ApplicationGatewayBackendAddressPool resource. + * + * @return the backendAddressPool value + */ + public ApplicationGatewayBackendAddressPool backendAddressPool() { + return this.backendAddressPool; + } + + /** + * Set reference of an ApplicationGatewayBackendAddressPool resource. + * + * @param backendAddressPool the backendAddressPool value to set + * @return the ApplicationGatewayBackendHealthOnDemandInner object itself. + */ + public ApplicationGatewayBackendHealthOnDemandInner withBackendAddressPool(ApplicationGatewayBackendAddressPool backendAddressPool) { + this.backendAddressPool = backendAddressPool; + return this; + } + + /** + * Get application gateway BackendHealthHttp settings. + * + * @return the backendHealthHttpSettings value + */ + public ApplicationGatewayBackendHealthHttpSettings backendHealthHttpSettings() { + return this.backendHealthHttpSettings; + } + + /** + * Set application gateway BackendHealthHttp settings. + * + * @param backendHealthHttpSettings the backendHealthHttpSettings value to set + * @return the ApplicationGatewayBackendHealthOnDemandInner object itself. + */ + public ApplicationGatewayBackendHealthOnDemandInner withBackendHealthHttpSettings(ApplicationGatewayBackendHealthHttpSettings backendHealthHttpSettings) { + this.backendHealthHttpSettings = backendHealthHttpSettings; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayImpl.java new file mode 100644 index 000000000000..0996ea4961be --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayImpl.java @@ -0,0 +1,354 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGateway; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySku; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslPolicy; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayOperationalState; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayAuthenticationCertificate; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayTrustedRootCertificate; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslCertificate; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayFrontendIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayFrontendPort; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayProbe; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendAddressPool; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendHttpSettings; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayHttpListener; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayUrlPathMap; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayRequestRoutingRule; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayRewriteRuleSet; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayRedirectConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayWebApplicationFirewallConfiguration; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayAutoscaleConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayCustomError; +import com.microsoft.azure.management.network.v2019_09_01.ManagedServiceIdentity; + +class ApplicationGatewayImpl extends GroupableResourceCoreImpl implements ApplicationGateway, ApplicationGateway.Definition, ApplicationGateway.Update { + ApplicationGatewayImpl(String name, ApplicationGatewayInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ApplicationGatewaysInner client = this.manager().inner().applicationGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ApplicationGatewaysInner client = this.manager().inner().applicationGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ApplicationGatewaysInner client = this.manager().inner().applicationGateways(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public List authenticationCertificates() { + return this.inner().authenticationCertificates(); + } + + @Override + public ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration() { + return this.inner().autoscaleConfiguration(); + } + + @Override + public List backendAddressPools() { + return this.inner().backendAddressPools(); + } + + @Override + public List backendHttpSettingsCollection() { + return this.inner().backendHttpSettingsCollection(); + } + + @Override + public List customErrorConfigurations() { + return this.inner().customErrorConfigurations(); + } + + @Override + public Boolean enableFips() { + return this.inner().enableFips(); + } + + @Override + public Boolean enableHttp2() { + return this.inner().enableHttp2(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public SubResource firewallPolicy() { + return this.inner().firewallPolicy(); + } + + @Override + public List frontendIPConfigurations() { + return this.inner().frontendIPConfigurations(); + } + + @Override + public List frontendPorts() { + return this.inner().frontendPorts(); + } + + @Override + public List gatewayIPConfigurations() { + return this.inner().gatewayIPConfigurations(); + } + + @Override + public List httpListeners() { + return this.inner().httpListeners(); + } + + @Override + public ManagedServiceIdentity identity() { + return this.inner().identity(); + } + + @Override + public ApplicationGatewayOperationalState operationalState() { + return this.inner().operationalState(); + } + + @Override + public List probes() { + return this.inner().probes(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public List redirectConfigurations() { + return this.inner().redirectConfigurations(); + } + + @Override + public List requestRoutingRules() { + return this.inner().requestRoutingRules(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public List rewriteRuleSets() { + return this.inner().rewriteRuleSets(); + } + + @Override + public ApplicationGatewaySku sku() { + return this.inner().sku(); + } + + @Override + public List sslCertificates() { + return this.inner().sslCertificates(); + } + + @Override + public ApplicationGatewaySslPolicy sslPolicy() { + return this.inner().sslPolicy(); + } + + @Override + public List trustedRootCertificates() { + return this.inner().trustedRootCertificates(); + } + + @Override + public List urlPathMaps() { + return this.inner().urlPathMaps(); + } + + @Override + public ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration() { + return this.inner().webApplicationFirewallConfiguration(); + } + + @Override + public List zones() { + return this.inner().zones(); + } + + @Override + public ApplicationGatewayImpl withAuthenticationCertificates(List authenticationCertificates) { + this.inner().withAuthenticationCertificates(authenticationCertificates); + return this; + } + + @Override + public ApplicationGatewayImpl withAutoscaleConfiguration(ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration) { + this.inner().withAutoscaleConfiguration(autoscaleConfiguration); + return this; + } + + @Override + public ApplicationGatewayImpl withBackendAddressPools(List backendAddressPools) { + this.inner().withBackendAddressPools(backendAddressPools); + return this; + } + + @Override + public ApplicationGatewayImpl withBackendHttpSettingsCollection(List backendHttpSettingsCollection) { + this.inner().withBackendHttpSettingsCollection(backendHttpSettingsCollection); + return this; + } + + @Override + public ApplicationGatewayImpl withCustomErrorConfigurations(List customErrorConfigurations) { + this.inner().withCustomErrorConfigurations(customErrorConfigurations); + return this; + } + + @Override + public ApplicationGatewayImpl withEnableFips(Boolean enableFips) { + this.inner().withEnableFips(enableFips); + return this; + } + + @Override + public ApplicationGatewayImpl withEnableHttp2(Boolean enableHttp2) { + this.inner().withEnableHttp2(enableHttp2); + return this; + } + + @Override + public ApplicationGatewayImpl withFirewallPolicy(SubResource firewallPolicy) { + this.inner().withFirewallPolicy(firewallPolicy); + return this; + } + + @Override + public ApplicationGatewayImpl withFrontendIPConfigurations(List frontendIPConfigurations) { + this.inner().withFrontendIPConfigurations(frontendIPConfigurations); + return this; + } + + @Override + public ApplicationGatewayImpl withFrontendPorts(List frontendPorts) { + this.inner().withFrontendPorts(frontendPorts); + return this; + } + + @Override + public ApplicationGatewayImpl withGatewayIPConfigurations(List gatewayIPConfigurations) { + this.inner().withGatewayIPConfigurations(gatewayIPConfigurations); + return this; + } + + @Override + public ApplicationGatewayImpl withHttpListeners(List httpListeners) { + this.inner().withHttpListeners(httpListeners); + return this; + } + + @Override + public ApplicationGatewayImpl withIdentity(ManagedServiceIdentity identity) { + this.inner().withIdentity(identity); + return this; + } + + @Override + public ApplicationGatewayImpl withProbes(List probes) { + this.inner().withProbes(probes); + return this; + } + + @Override + public ApplicationGatewayImpl withRedirectConfigurations(List redirectConfigurations) { + this.inner().withRedirectConfigurations(redirectConfigurations); + return this; + } + + @Override + public ApplicationGatewayImpl withRequestRoutingRules(List requestRoutingRules) { + this.inner().withRequestRoutingRules(requestRoutingRules); + return this; + } + + @Override + public ApplicationGatewayImpl withRewriteRuleSets(List rewriteRuleSets) { + this.inner().withRewriteRuleSets(rewriteRuleSets); + return this; + } + + @Override + public ApplicationGatewayImpl withSku(ApplicationGatewaySku sku) { + this.inner().withSku(sku); + return this; + } + + @Override + public ApplicationGatewayImpl withSslCertificates(List sslCertificates) { + this.inner().withSslCertificates(sslCertificates); + return this; + } + + @Override + public ApplicationGatewayImpl withSslPolicy(ApplicationGatewaySslPolicy sslPolicy) { + this.inner().withSslPolicy(sslPolicy); + return this; + } + + @Override + public ApplicationGatewayImpl withTrustedRootCertificates(List trustedRootCertificates) { + this.inner().withTrustedRootCertificates(trustedRootCertificates); + return this; + } + + @Override + public ApplicationGatewayImpl withUrlPathMaps(List urlPathMaps) { + this.inner().withUrlPathMaps(urlPathMaps); + return this; + } + + @Override + public ApplicationGatewayImpl withWebApplicationFirewallConfiguration(ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration) { + this.inner().withWebApplicationFirewallConfiguration(webApplicationFirewallConfiguration); + return this; + } + + @Override + public ApplicationGatewayImpl withZones(List zones) { + this.inner().withZones(zones); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayInner.java new file mode 100644 index 000000000000..860da5efc604 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayInner.java @@ -0,0 +1,781 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySku; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslPolicy; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayOperationalState; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayAuthenticationCertificate; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayTrustedRootCertificate; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslCertificate; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayFrontendIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayFrontendPort; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayProbe; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendAddressPool; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendHttpSettings; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayHttpListener; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayUrlPathMap; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayRequestRoutingRule; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayRewriteRuleSet; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayRedirectConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayWebApplicationFirewallConfiguration; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayAutoscaleConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayCustomError; +import com.microsoft.azure.management.network.v2019_09_01.ManagedServiceIdentity; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Application gateway resource. + */ +@JsonFlatten +@SkipParentValidation +public class ApplicationGatewayInner extends Resource { + /** + * SKU of the application gateway resource. + */ + @JsonProperty(value = "properties.sku") + private ApplicationGatewaySku sku; + + /** + * SSL policy of the application gateway resource. + */ + @JsonProperty(value = "properties.sslPolicy") + private ApplicationGatewaySslPolicy sslPolicy; + + /** + * Operational state of the application gateway resource. Possible values + * include: 'Stopped', 'Starting', 'Running', 'Stopping'. + */ + @JsonProperty(value = "properties.operationalState", access = JsonProperty.Access.WRITE_ONLY) + private ApplicationGatewayOperationalState operationalState; + + /** + * Subnets of the application gateway resource. For default limits, see + * [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + */ + @JsonProperty(value = "properties.gatewayIPConfigurations") + private List gatewayIPConfigurations; + + /** + * Authentication certificates of the application gateway resource. For + * default limits, see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + */ + @JsonProperty(value = "properties.authenticationCertificates") + private List authenticationCertificates; + + /** + * Trusted Root certificates of the application gateway resource. For + * default limits, see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + */ + @JsonProperty(value = "properties.trustedRootCertificates") + private List trustedRootCertificates; + + /** + * SSL certificates of the application gateway resource. For default + * limits, see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + */ + @JsonProperty(value = "properties.sslCertificates") + private List sslCertificates; + + /** + * Frontend IP addresses of the application gateway resource. For default + * limits, see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + */ + @JsonProperty(value = "properties.frontendIPConfigurations") + private List frontendIPConfigurations; + + /** + * Frontend ports of the application gateway resource. For default limits, + * see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + */ + @JsonProperty(value = "properties.frontendPorts") + private List frontendPorts; + + /** + * Probes of the application gateway resource. + */ + @JsonProperty(value = "properties.probes") + private List probes; + + /** + * Backend address pool of the application gateway resource. For default + * limits, see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + */ + @JsonProperty(value = "properties.backendAddressPools") + private List backendAddressPools; + + /** + * Backend http settings of the application gateway resource. For default + * limits, see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + */ + @JsonProperty(value = "properties.backendHttpSettingsCollection") + private List backendHttpSettingsCollection; + + /** + * Http listeners of the application gateway resource. For default limits, + * see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + */ + @JsonProperty(value = "properties.httpListeners") + private List httpListeners; + + /** + * URL path map of the application gateway resource. For default limits, + * see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + */ + @JsonProperty(value = "properties.urlPathMaps") + private List urlPathMaps; + + /** + * Request routing rules of the application gateway resource. + */ + @JsonProperty(value = "properties.requestRoutingRules") + private List requestRoutingRules; + + /** + * Rewrite rules for the application gateway resource. + */ + @JsonProperty(value = "properties.rewriteRuleSets") + private List rewriteRuleSets; + + /** + * Redirect configurations of the application gateway resource. For default + * limits, see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + */ + @JsonProperty(value = "properties.redirectConfigurations") + private List redirectConfigurations; + + /** + * Web application firewall configuration. + */ + @JsonProperty(value = "properties.webApplicationFirewallConfiguration") + private ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration; + + /** + * Reference of the FirewallPolicy resource. + */ + @JsonProperty(value = "properties.firewallPolicy") + private SubResource firewallPolicy; + + /** + * Whether HTTP2 is enabled on the application gateway resource. + */ + @JsonProperty(value = "properties.enableHttp2") + private Boolean enableHttp2; + + /** + * Whether FIPS is enabled on the application gateway resource. + */ + @JsonProperty(value = "properties.enableFips") + private Boolean enableFips; + + /** + * Autoscale Configuration. + */ + @JsonProperty(value = "properties.autoscaleConfiguration") + private ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration; + + /** + * The resource GUID property of the application gateway resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the application gateway resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Custom error configurations of the application gateway resource. + */ + @JsonProperty(value = "properties.customErrorConfigurations") + private List customErrorConfigurations; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * A list of availability zones denoting where the resource needs to come + * from. + */ + @JsonProperty(value = "zones") + private List zones; + + /** + * The identity of the application gateway, if configured. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get sKU of the application gateway resource. + * + * @return the sku value + */ + public ApplicationGatewaySku sku() { + return this.sku; + } + + /** + * Set sKU of the application gateway resource. + * + * @param sku the sku value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withSku(ApplicationGatewaySku sku) { + this.sku = sku; + return this; + } + + /** + * Get sSL policy of the application gateway resource. + * + * @return the sslPolicy value + */ + public ApplicationGatewaySslPolicy sslPolicy() { + return this.sslPolicy; + } + + /** + * Set sSL policy of the application gateway resource. + * + * @param sslPolicy the sslPolicy value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withSslPolicy(ApplicationGatewaySslPolicy sslPolicy) { + this.sslPolicy = sslPolicy; + return this; + } + + /** + * Get operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'. + * + * @return the operationalState value + */ + public ApplicationGatewayOperationalState operationalState() { + return this.operationalState; + } + + /** + * Get subnets of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @return the gatewayIPConfigurations value + */ + public List gatewayIPConfigurations() { + return this.gatewayIPConfigurations; + } + + /** + * Set subnets of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @param gatewayIPConfigurations the gatewayIPConfigurations value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withGatewayIPConfigurations(List gatewayIPConfigurations) { + this.gatewayIPConfigurations = gatewayIPConfigurations; + return this; + } + + /** + * Get authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @return the authenticationCertificates value + */ + public List authenticationCertificates() { + return this.authenticationCertificates; + } + + /** + * Set authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @param authenticationCertificates the authenticationCertificates value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withAuthenticationCertificates(List authenticationCertificates) { + this.authenticationCertificates = authenticationCertificates; + return this; + } + + /** + * Get trusted Root certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @return the trustedRootCertificates value + */ + public List trustedRootCertificates() { + return this.trustedRootCertificates; + } + + /** + * Set trusted Root certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @param trustedRootCertificates the trustedRootCertificates value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withTrustedRootCertificates(List trustedRootCertificates) { + this.trustedRootCertificates = trustedRootCertificates; + return this; + } + + /** + * Get sSL certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @return the sslCertificates value + */ + public List sslCertificates() { + return this.sslCertificates; + } + + /** + * Set sSL certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @param sslCertificates the sslCertificates value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withSslCertificates(List sslCertificates) { + this.sslCertificates = sslCertificates; + return this; + } + + /** + * Get frontend IP addresses of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @return the frontendIPConfigurations value + */ + public List frontendIPConfigurations() { + return this.frontendIPConfigurations; + } + + /** + * Set frontend IP addresses of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @param frontendIPConfigurations the frontendIPConfigurations value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withFrontendIPConfigurations(List frontendIPConfigurations) { + this.frontendIPConfigurations = frontendIPConfigurations; + return this; + } + + /** + * Get frontend ports of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @return the frontendPorts value + */ + public List frontendPorts() { + return this.frontendPorts; + } + + /** + * Set frontend ports of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @param frontendPorts the frontendPorts value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withFrontendPorts(List frontendPorts) { + this.frontendPorts = frontendPorts; + return this; + } + + /** + * Get probes of the application gateway resource. + * + * @return the probes value + */ + public List probes() { + return this.probes; + } + + /** + * Set probes of the application gateway resource. + * + * @param probes the probes value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withProbes(List probes) { + this.probes = probes; + return this; + } + + /** + * Get backend address pool of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @return the backendAddressPools value + */ + public List backendAddressPools() { + return this.backendAddressPools; + } + + /** + * Set backend address pool of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @param backendAddressPools the backendAddressPools value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withBackendAddressPools(List backendAddressPools) { + this.backendAddressPools = backendAddressPools; + return this; + } + + /** + * Get backend http settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @return the backendHttpSettingsCollection value + */ + public List backendHttpSettingsCollection() { + return this.backendHttpSettingsCollection; + } + + /** + * Set backend http settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @param backendHttpSettingsCollection the backendHttpSettingsCollection value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withBackendHttpSettingsCollection(List backendHttpSettingsCollection) { + this.backendHttpSettingsCollection = backendHttpSettingsCollection; + return this; + } + + /** + * Get http listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @return the httpListeners value + */ + public List httpListeners() { + return this.httpListeners; + } + + /** + * Set http listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @param httpListeners the httpListeners value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withHttpListeners(List httpListeners) { + this.httpListeners = httpListeners; + return this; + } + + /** + * Get uRL path map of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @return the urlPathMaps value + */ + public List urlPathMaps() { + return this.urlPathMaps; + } + + /** + * Set uRL path map of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @param urlPathMaps the urlPathMaps value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withUrlPathMaps(List urlPathMaps) { + this.urlPathMaps = urlPathMaps; + return this; + } + + /** + * Get request routing rules of the application gateway resource. + * + * @return the requestRoutingRules value + */ + public List requestRoutingRules() { + return this.requestRoutingRules; + } + + /** + * Set request routing rules of the application gateway resource. + * + * @param requestRoutingRules the requestRoutingRules value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withRequestRoutingRules(List requestRoutingRules) { + this.requestRoutingRules = requestRoutingRules; + return this; + } + + /** + * Get rewrite rules for the application gateway resource. + * + * @return the rewriteRuleSets value + */ + public List rewriteRuleSets() { + return this.rewriteRuleSets; + } + + /** + * Set rewrite rules for the application gateway resource. + * + * @param rewriteRuleSets the rewriteRuleSets value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withRewriteRuleSets(List rewriteRuleSets) { + this.rewriteRuleSets = rewriteRuleSets; + return this; + } + + /** + * Get redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @return the redirectConfigurations value + */ + public List redirectConfigurations() { + return this.redirectConfigurations; + } + + /** + * Set redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @param redirectConfigurations the redirectConfigurations value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withRedirectConfigurations(List redirectConfigurations) { + this.redirectConfigurations = redirectConfigurations; + return this; + } + + /** + * Get web application firewall configuration. + * + * @return the webApplicationFirewallConfiguration value + */ + public ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration() { + return this.webApplicationFirewallConfiguration; + } + + /** + * Set web application firewall configuration. + * + * @param webApplicationFirewallConfiguration the webApplicationFirewallConfiguration value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withWebApplicationFirewallConfiguration(ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration) { + this.webApplicationFirewallConfiguration = webApplicationFirewallConfiguration; + return this; + } + + /** + * Get reference of the FirewallPolicy resource. + * + * @return the firewallPolicy value + */ + public SubResource firewallPolicy() { + return this.firewallPolicy; + } + + /** + * Set reference of the FirewallPolicy resource. + * + * @param firewallPolicy the firewallPolicy value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withFirewallPolicy(SubResource firewallPolicy) { + this.firewallPolicy = firewallPolicy; + return this; + } + + /** + * Get whether HTTP2 is enabled on the application gateway resource. + * + * @return the enableHttp2 value + */ + public Boolean enableHttp2() { + return this.enableHttp2; + } + + /** + * Set whether HTTP2 is enabled on the application gateway resource. + * + * @param enableHttp2 the enableHttp2 value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withEnableHttp2(Boolean enableHttp2) { + this.enableHttp2 = enableHttp2; + return this; + } + + /** + * Get whether FIPS is enabled on the application gateway resource. + * + * @return the enableFips value + */ + public Boolean enableFips() { + return this.enableFips; + } + + /** + * Set whether FIPS is enabled on the application gateway resource. + * + * @param enableFips the enableFips value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withEnableFips(Boolean enableFips) { + this.enableFips = enableFips; + return this; + } + + /** + * Get autoscale Configuration. + * + * @return the autoscaleConfiguration value + */ + public ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration() { + return this.autoscaleConfiguration; + } + + /** + * Set autoscale Configuration. + * + * @param autoscaleConfiguration the autoscaleConfiguration value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withAutoscaleConfiguration(ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration) { + this.autoscaleConfiguration = autoscaleConfiguration; + return this; + } + + /** + * Get the resource GUID property of the application gateway resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the application gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get custom error configurations of the application gateway resource. + * + * @return the customErrorConfigurations value + */ + public List customErrorConfigurations() { + return this.customErrorConfigurations; + } + + /** + * Set custom error configurations of the application gateway resource. + * + * @param customErrorConfigurations the customErrorConfigurations value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withCustomErrorConfigurations(List customErrorConfigurations) { + this.customErrorConfigurations = customErrorConfigurations; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get a list of availability zones denoting where the resource needs to come from. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set a list of availability zones denoting where the resource needs to come from. + * + * @param zones the zones value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get the identity of the application gateway, if configured. + * + * @return the identity value + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity of the application gateway, if configured. + * + * @param identity the identity value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaySslPredefinedPolicyImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaySslPredefinedPolicyImpl.java new file mode 100644 index 000000000000..b2671d64631d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaySslPredefinedPolicyImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslPredefinedPolicy; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslCipherSuite; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslProtocol; + +class ApplicationGatewaySslPredefinedPolicyImpl extends WrapperImpl implements ApplicationGatewaySslPredefinedPolicy { + private final NetworkManager manager; + ApplicationGatewaySslPredefinedPolicyImpl(ApplicationGatewaySslPredefinedPolicyInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List cipherSuites() { + return this.inner().cipherSuites(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public ApplicationGatewaySslProtocol minProtocolVersion() { + return this.inner().minProtocolVersion(); + } + + @Override + public String name() { + return this.inner().name(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaySslPredefinedPolicyInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaySslPredefinedPolicyInner.java new file mode 100644 index 000000000000..e841841d4342 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaySslPredefinedPolicyInner.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslCipherSuite; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslProtocol; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * An Ssl predefined policy. + */ +@JsonFlatten +public class ApplicationGatewaySslPredefinedPolicyInner extends SubResource { + /** + * Name of the Ssl predefined policy. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Ssl cipher suites to be enabled in the specified order for application + * gateway. + */ + @JsonProperty(value = "properties.cipherSuites") + private List cipherSuites; + + /** + * Minimum version of Ssl protocol to be supported on application gateway. + * Possible values include: 'TLSv1_0', 'TLSv1_1', 'TLSv1_2'. + */ + @JsonProperty(value = "properties.minProtocolVersion") + private ApplicationGatewaySslProtocol minProtocolVersion; + + /** + * Get name of the Ssl predefined policy. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the Ssl predefined policy. + * + * @param name the name value to set + * @return the ApplicationGatewaySslPredefinedPolicyInner object itself. + */ + public ApplicationGatewaySslPredefinedPolicyInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get ssl cipher suites to be enabled in the specified order for application gateway. + * + * @return the cipherSuites value + */ + public List cipherSuites() { + return this.cipherSuites; + } + + /** + * Set ssl cipher suites to be enabled in the specified order for application gateway. + * + * @param cipherSuites the cipherSuites value to set + * @return the ApplicationGatewaySslPredefinedPolicyInner object itself. + */ + public ApplicationGatewaySslPredefinedPolicyInner withCipherSuites(List cipherSuites) { + this.cipherSuites = cipherSuites; + return this; + } + + /** + * Get minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv1_0', 'TLSv1_1', 'TLSv1_2'. + * + * @return the minProtocolVersion value + */ + public ApplicationGatewaySslProtocol minProtocolVersion() { + return this.minProtocolVersion; + } + + /** + * Set minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv1_0', 'TLSv1_1', 'TLSv1_2'. + * + * @param minProtocolVersion the minProtocolVersion value to set + * @return the ApplicationGatewaySslPredefinedPolicyInner object itself. + */ + public ApplicationGatewaySslPredefinedPolicyInner withMinProtocolVersion(ApplicationGatewaySslProtocol minProtocolVersion) { + this.minProtocolVersion = minProtocolVersion; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaysImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaysImpl.java new file mode 100644 index 000000000000..a888bdfcfa8a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaysImpl.java @@ -0,0 +1,268 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGateways; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGateway; +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 java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendHealth; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendHealthOnDemand; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayAvailableWafRuleSetsResult; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayOnDemandProbe; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayAvailableSslOptions; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewaySslPredefinedPolicy; + +class ApplicationGatewaysImpl extends GroupableResourcesCoreImpl implements ApplicationGateways { + protected ApplicationGatewaysImpl(NetworkManager manager) { + super(manager.inner().applicationGateways(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ApplicationGatewaysInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ApplicationGatewaysInner 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) { + ApplicationGatewaysInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ApplicationGatewaysInner 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 ApplicationGateway call(ApplicationGatewayInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ApplicationGatewaysInner client = this.inner(); + return this.wrapList(client.listAll()); + } + + @Override + public Observable listAsync() { + ApplicationGatewaysInner client = this.inner(); + return client.listAllAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ApplicationGateway call(ApplicationGatewayInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public ApplicationGatewayImpl define(String name) { + return wrapModel(name); + } + + @Override + public Completable startAsync(String resourceGroupName, String applicationGatewayName) { + ApplicationGatewaysInner client = this.inner(); + return client.startAsync(resourceGroupName, applicationGatewayName).toCompletable(); + } + + @Override + public Completable stopAsync(String resourceGroupName, String applicationGatewayName) { + ApplicationGatewaysInner client = this.inner(); + return client.stopAsync(resourceGroupName, applicationGatewayName).toCompletable(); + } + + @Override + public Observable backendHealthAsync(String resourceGroupName, String applicationGatewayName) { + ApplicationGatewaysInner client = this.inner(); + return client.backendHealthAsync(resourceGroupName, applicationGatewayName) + .map(new Func1() { + @Override + public ApplicationGatewayBackendHealth call(ApplicationGatewayBackendHealthInner inner) { + return new ApplicationGatewayBackendHealthImpl(inner, manager()); + } + }); + } + + @Override + public Observable backendHealthOnDemandAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest) { + ApplicationGatewaysInner client = this.inner(); + return client.backendHealthOnDemandAsync(resourceGroupName, applicationGatewayName, probeRequest) + .map(new Func1() { + @Override + public ApplicationGatewayBackendHealthOnDemand call(ApplicationGatewayBackendHealthOnDemandInner inner) { + return new ApplicationGatewayBackendHealthOnDemandImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAvailableServerVariablesAsync() { + ApplicationGatewaysInner client = this.inner(); + return client.listAvailableServerVariablesAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + });} + + @Override + public Observable listAvailableRequestHeadersAsync() { + ApplicationGatewaysInner client = this.inner(); + return client.listAvailableRequestHeadersAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + });} + + @Override + public Observable listAvailableResponseHeadersAsync() { + ApplicationGatewaysInner client = this.inner(); + return client.listAvailableResponseHeadersAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + });} + + @Override + public Observable listAvailableWafRuleSetsAsync() { + ApplicationGatewaysInner client = this.inner(); + return client.listAvailableWafRuleSetsAsync() + .map(new Func1() { + @Override + public ApplicationGatewayAvailableWafRuleSetsResult call(ApplicationGatewayAvailableWafRuleSetsResultInner inner) { + return new ApplicationGatewayAvailableWafRuleSetsResultImpl(inner, manager()); + } + }); + } + + @Override + protected ApplicationGatewayImpl wrapModel(ApplicationGatewayInner inner) { + return new ApplicationGatewayImpl(inner.name(), inner, manager()); + } + + @Override + protected ApplicationGatewayImpl wrapModel(String name) { + return new ApplicationGatewayImpl(name, new ApplicationGatewayInner(), this.manager()); + } + + @Override + public Observable listAvailableSslOptionsAsync() { + ApplicationGatewaysInner client = this.inner(); + return client.listAvailableSslOptionsAsync() + .map(new Func1() { + @Override + public ApplicationGatewayAvailableSslOptions call(ApplicationGatewayAvailableSslOptionsInner inner) { + return new ApplicationGatewayAvailableSslOptionsImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAvailableSslPredefinedPoliciesAsync() { + ApplicationGatewaysInner client = this.inner(); + return client.listAvailableSslPredefinedPoliciesAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ApplicationGatewaySslPredefinedPolicy call(ApplicationGatewaySslPredefinedPolicyInner inner) { + return new ApplicationGatewaySslPredefinedPolicyImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSslPredefinedPolicyAsync(String predefinedPolicyName) { + ApplicationGatewaysInner client = this.inner(); + return client.getSslPredefinedPolicyAsync(predefinedPolicyName) + .map(new Func1() { + @Override + public ApplicationGatewaySslPredefinedPolicy call(ApplicationGatewaySslPredefinedPolicyInner inner) { + return new ApplicationGatewaySslPredefinedPolicyImpl(inner, manager()); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaysInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaysInner.java new file mode 100644 index 000000000000..32e34773865e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewaysInner.java @@ -0,0 +1,2781 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +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.network.v2019_09_01.ApplicationGatewayOnDemandProbe; +import com.microsoft.azure.management.network.v2019_09_01.ErrorException; +import com.microsoft.azure.management.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in ApplicationGateways. + */ +public class ApplicationGatewaysInner implements InnerSupportsGet, InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private ApplicationGatewaysService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ApplicationGatewaysInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ApplicationGatewaysInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ApplicationGatewaysService.class); + this.client = client; + } + + /** + * The interface defining all the services for ApplicationGateways to be + * used by Retrofit to perform actually REST calls. + */ + interface ApplicationGatewaysService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ApplicationGateways delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @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.network.v2019_09_01.ApplicationGateways beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @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.network.v2019_09_01.ApplicationGateways getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @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.network.v2019_09_01.ApplicationGateways createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @Path("subscriptionId") String subscriptionId, @Body ApplicationGatewayInner 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.network.v2019_09_01.ApplicationGateways beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @Path("subscriptionId") String subscriptionId, @Body ApplicationGatewayInner 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.network.v2019_09_01.ApplicationGateways updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ApplicationGateways listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.ApplicationGateways listAll" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways") + Observable> listAll(@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.network.v2019_09_01.ApplicationGateways start" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start") + Observable> start(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @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.network.v2019_09_01.ApplicationGateways beginStart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start") + Observable> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @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.network.v2019_09_01.ApplicationGateways stop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop") + Observable> stop(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @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.network.v2019_09_01.ApplicationGateways beginStop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop") + Observable> beginStop(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @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.network.v2019_09_01.ApplicationGateways backendHealth" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth") + Observable> backendHealth(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.ApplicationGateways beginBackendHealth" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth") + Observable> beginBackendHealth(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.ApplicationGateways backendHealthOnDemand" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand") + Observable> backendHealthOnDemand(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @Body ApplicationGatewayOnDemandProbe probeRequest, @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.network.v2019_09_01.ApplicationGateways beginBackendHealthOnDemand" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand") + Observable> beginBackendHealthOnDemand(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @Body ApplicationGatewayOnDemandProbe probeRequest, @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.network.v2019_09_01.ApplicationGateways listAvailableServerVariables" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables") + Observable> listAvailableServerVariables(@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.network.v2019_09_01.ApplicationGateways listAvailableRequestHeaders" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders") + Observable> listAvailableRequestHeaders(@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.network.v2019_09_01.ApplicationGateways listAvailableResponseHeaders" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders") + Observable> listAvailableResponseHeaders(@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.network.v2019_09_01.ApplicationGateways listAvailableWafRuleSets" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets") + Observable> listAvailableWafRuleSets(@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.network.v2019_09_01.ApplicationGateways listAvailableSslOptions" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default") + Observable> listAvailableSslOptions(@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.network.v2019_09_01.ApplicationGateways listAvailableSslPredefinedPolicies" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies") + Observable> listAvailableSslPredefinedPolicies(@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.network.v2019_09_01.ApplicationGateways getSslPredefinedPolicy" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}") + Observable> getSslPredefinedPolicy(@Path("subscriptionId") String subscriptionId, @Path("predefinedPolicyName") String predefinedPolicyName, @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.network.v2019_09_01.ApplicationGateways 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.network.v2019_09_01.ApplicationGateways listAllNext" }) + @GET + Observable> listAllNext(@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.network.v2019_09_01.ApplicationGateways listAvailableSslPredefinedPoliciesNext" }) + @GET + Observable> listAvailableSslPredefinedPoliciesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 applicationGatewayName) { + deleteWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().last().body(); + } + + /** + * Deletes the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @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 applicationGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); + } + + /** + * Deletes the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String applicationGatewayName) { + return deleteWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 applicationGatewayName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body(); + } + + /** + * Deletes the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @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 applicationGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); + } + + /** + * Deletes the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String applicationGatewayName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ApplicationGatewayInner object if successful. + */ + public ApplicationGatewayInner getByResourceGroup(String resourceGroupName, String applicationGatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body(); + } + + /** + * Gets the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @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 applicationGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); + } + + /** + * Gets the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String applicationGatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, ApplicationGatewayInner>() { + @Override + public ApplicationGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param parameters Parameters supplied to the create or update application gateway 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 ApplicationGatewayInner object if successful. + */ + public ApplicationGatewayInner createOrUpdate(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationGatewayName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param parameters Parameters supplied to the create or update application gateway 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 createOrUpdateAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationGatewayName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param parameters Parameters supplied to the create or update application gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationGatewayName, parameters).map(new Func1, ApplicationGatewayInner>() { + @Override + public ApplicationGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param parameters Parameters supplied to the create or update application gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param parameters Parameters supplied to the create or update application gateway 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 ApplicationGatewayInner object if successful. + */ + public ApplicationGatewayInner beginCreateOrUpdate(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationGatewayName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param parameters Parameters supplied to the create or update application gateway 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 beginCreateOrUpdateAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationGatewayName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param parameters Parameters supplied to the create or update application gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationGatewayName, parameters).map(new Func1, ApplicationGatewayInner>() { + @Override + public ApplicationGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param parameters Parameters supplied to the create or update application gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ApplicationGatewayInner object if successful. + */ + public ApplicationGatewayInner updateTags(String resourceGroupName, String applicationGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body(); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @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 updateTagsAsync(String resourceGroupName, String applicationGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String applicationGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, ApplicationGatewayInner>() { + @Override + public ApplicationGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ApplicationGatewayInner object if successful. + */ + public ApplicationGatewayInner updateTags(String resourceGroupName, String applicationGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags).toBlocking().single().body(); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String applicationGatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags), serviceCallback); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String applicationGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags).map(new Func1, ApplicationGatewayInner>() { + @Override + public ApplicationGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all application gateways in a resource group. + * + * @param resourceGroupName The name of the 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<ApplicationGatewayInner> 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 all application gateways in a resource group. + * + * @param resourceGroupName The name of the 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 all application gateways in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationGatewayInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all application gateways in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationGatewayInner> 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 all application gateways in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationGatewayInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all the application gateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ApplicationGatewayInner> object if successful. + */ + public PagedList listAll() { + ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the application gateways in a subscription. + * + * @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> listAllAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAllSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAllNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the application gateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationGatewayInner> object + */ + public Observable> listAllAsync() { + return listAllWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the application gateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationGatewayInner> object + */ + public Observable>> listAllWithServiceResponseAsync() { + return listAllSinglePageAsync() + .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(listAllNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the application gateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationGatewayInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAllSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listAll(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAllDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAllDelegate(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); + } + + /** + * Starts the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 start(String resourceGroupName, String applicationGatewayName) { + startWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().last().body(); + } + + /** + * Starts the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @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 startAsync(String resourceGroupName, String applicationGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); + } + + /** + * Starts the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable startAsync(String resourceGroupName, String applicationGatewayName) { + return startWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> startWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.start(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Starts the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginStart(String resourceGroupName, String applicationGatewayName) { + beginStartWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body(); + } + + /** + * Starts the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @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 beginStartAsync(String resourceGroupName, String applicationGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); + } + + /** + * Starts the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStartAsync(String resourceGroupName, String applicationGatewayName) { + return beginStartWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts the specified application gateway. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginStart(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStartDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Stops the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 stop(String resourceGroupName, String applicationGatewayName) { + stopWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().last().body(); + } + + /** + * Stops the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @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 stopAsync(String resourceGroupName, String applicationGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); + } + + /** + * Stops the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable stopAsync(String resourceGroupName, String applicationGatewayName) { + return stopWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> stopWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.stop(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Stops the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginStop(String resourceGroupName, String applicationGatewayName) { + beginStopWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body(); + } + + /** + * Stops the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @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 beginStopAsync(String resourceGroupName, String applicationGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); + } + + /** + * Stops the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStopAsync(String resourceGroupName, String applicationGatewayName) { + return beginStopWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStopWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginStop(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStopDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ApplicationGatewayBackendHealthInner object if successful. + */ + public ApplicationGatewayBackendHealthInner backendHealth(String resourceGroupName, String applicationGatewayName) { + return backendHealthWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().last().body(); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @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 backendHealthAsync(String resourceGroupName, String applicationGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(backendHealthWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable backendHealthAsync(String resourceGroupName, String applicationGatewayName) { + return backendHealthWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, ApplicationGatewayBackendHealthInner>() { + @Override + public ApplicationGatewayBackendHealthInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> backendHealthWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + Observable> observable = service.backendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ApplicationGatewayBackendHealthInner object if successful. + */ + public ApplicationGatewayBackendHealthInner backendHealth(String resourceGroupName, String applicationGatewayName, String expand) { + return backendHealthWithServiceResponseAsync(resourceGroupName, applicationGatewayName, expand).toBlocking().last().body(); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @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 backendHealthAsync(String resourceGroupName, String applicationGatewayName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(backendHealthWithServiceResponseAsync(resourceGroupName, applicationGatewayName, expand), serviceCallback); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable backendHealthAsync(String resourceGroupName, String applicationGatewayName, String expand) { + return backendHealthWithServiceResponseAsync(resourceGroupName, applicationGatewayName, expand).map(new Func1, ApplicationGatewayBackendHealthInner>() { + @Override + public ApplicationGatewayBackendHealthInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> backendHealthWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.backendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ApplicationGatewayBackendHealthInner object if successful. + */ + public ApplicationGatewayBackendHealthInner beginBackendHealth(String resourceGroupName, String applicationGatewayName) { + return beginBackendHealthWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body(); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @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 beginBackendHealthAsync(String resourceGroupName, String applicationGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginBackendHealthWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayBackendHealthInner object + */ + public Observable beginBackendHealthAsync(String resourceGroupName, String applicationGatewayName) { + return beginBackendHealthWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, ApplicationGatewayBackendHealthInner>() { + @Override + public ApplicationGatewayBackendHealthInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayBackendHealthInner object + */ + public Observable> beginBackendHealthWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.beginBackendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginBackendHealthDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ApplicationGatewayBackendHealthInner object if successful. + */ + public ApplicationGatewayBackendHealthInner beginBackendHealth(String resourceGroupName, String applicationGatewayName, String expand) { + return beginBackendHealthWithServiceResponseAsync(resourceGroupName, applicationGatewayName, expand).toBlocking().single().body(); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @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 beginBackendHealthAsync(String resourceGroupName, String applicationGatewayName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginBackendHealthWithServiceResponseAsync(resourceGroupName, applicationGatewayName, expand), serviceCallback); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayBackendHealthInner object + */ + public Observable beginBackendHealthAsync(String resourceGroupName, String applicationGatewayName, String expand) { + return beginBackendHealthWithServiceResponseAsync(resourceGroupName, applicationGatewayName, expand).map(new Func1, ApplicationGatewayBackendHealthInner>() { + @Override + public ApplicationGatewayBackendHealthInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the backend health of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayBackendHealthInner object + */ + public Observable> beginBackendHealthWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginBackendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginBackendHealthDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginBackendHealthDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe 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 ApplicationGatewayBackendHealthOnDemandInner object if successful. + */ + public ApplicationGatewayBackendHealthOnDemandInner backendHealthOnDemand(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest) { + return backendHealthOnDemandWithServiceResponseAsync(resourceGroupName, applicationGatewayName, probeRequest).toBlocking().last().body(); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe 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 backendHealthOnDemandAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(backendHealthOnDemandWithServiceResponseAsync(resourceGroupName, applicationGatewayName, probeRequest), serviceCallback); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable backendHealthOnDemandAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest) { + return backendHealthOnDemandWithServiceResponseAsync(resourceGroupName, applicationGatewayName, probeRequest).map(new Func1, ApplicationGatewayBackendHealthOnDemandInner>() { + @Override + public ApplicationGatewayBackendHealthOnDemandInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> backendHealthOnDemandWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName 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 (probeRequest == null) { + throw new IllegalArgumentException("Parameter probeRequest is required and cannot be null."); + } + Validator.validate(probeRequest); + final String apiVersion = "2019-09-01"; + final String expand = null; + Observable> observable = service.backendHealthOnDemand(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, probeRequest, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe operation. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ApplicationGatewayBackendHealthOnDemandInner object if successful. + */ + public ApplicationGatewayBackendHealthOnDemandInner backendHealthOnDemand(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest, String expand) { + return backendHealthOnDemandWithServiceResponseAsync(resourceGroupName, applicationGatewayName, probeRequest, expand).toBlocking().last().body(); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe operation. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @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 backendHealthOnDemandAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(backendHealthOnDemandWithServiceResponseAsync(resourceGroupName, applicationGatewayName, probeRequest, expand), serviceCallback); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe operation. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable backendHealthOnDemandAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest, String expand) { + return backendHealthOnDemandWithServiceResponseAsync(resourceGroupName, applicationGatewayName, probeRequest, expand).map(new Func1, ApplicationGatewayBackendHealthOnDemandInner>() { + @Override + public ApplicationGatewayBackendHealthOnDemandInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe operation. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> backendHealthOnDemandWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName 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 (probeRequest == null) { + throw new IllegalArgumentException("Parameter probeRequest is required and cannot be null."); + } + Validator.validate(probeRequest); + final String apiVersion = "2019-09-01"; + Observable> observable = service.backendHealthOnDemand(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, probeRequest, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe 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 ApplicationGatewayBackendHealthOnDemandInner object if successful. + */ + public ApplicationGatewayBackendHealthOnDemandInner beginBackendHealthOnDemand(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest) { + return beginBackendHealthOnDemandWithServiceResponseAsync(resourceGroupName, applicationGatewayName, probeRequest).toBlocking().single().body(); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe 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 beginBackendHealthOnDemandAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginBackendHealthOnDemandWithServiceResponseAsync(resourceGroupName, applicationGatewayName, probeRequest), serviceCallback); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayBackendHealthOnDemandInner object + */ + public Observable beginBackendHealthOnDemandAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest) { + return beginBackendHealthOnDemandWithServiceResponseAsync(resourceGroupName, applicationGatewayName, probeRequest).map(new Func1, ApplicationGatewayBackendHealthOnDemandInner>() { + @Override + public ApplicationGatewayBackendHealthOnDemandInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayBackendHealthOnDemandInner object + */ + public Observable> beginBackendHealthOnDemandWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName 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 (probeRequest == null) { + throw new IllegalArgumentException("Parameter probeRequest is required and cannot be null."); + } + Validator.validate(probeRequest); + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.beginBackendHealthOnDemand(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, probeRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginBackendHealthOnDemandDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe operation. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ApplicationGatewayBackendHealthOnDemandInner object if successful. + */ + public ApplicationGatewayBackendHealthOnDemandInner beginBackendHealthOnDemand(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest, String expand) { + return beginBackendHealthOnDemandWithServiceResponseAsync(resourceGroupName, applicationGatewayName, probeRequest, expand).toBlocking().single().body(); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe operation. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @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 beginBackendHealthOnDemandAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginBackendHealthOnDemandWithServiceResponseAsync(resourceGroupName, applicationGatewayName, probeRequest, expand), serviceCallback); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe operation. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayBackendHealthOnDemandInner object + */ + public Observable beginBackendHealthOnDemandAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest, String expand) { + return beginBackendHealthOnDemandWithServiceResponseAsync(resourceGroupName, applicationGatewayName, probeRequest, expand).map(new Func1, ApplicationGatewayBackendHealthOnDemandInner>() { + @Override + public ApplicationGatewayBackendHealthOnDemandInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param probeRequest Request body for on-demand test probe operation. + * @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayBackendHealthOnDemandInner object + */ + public Observable> beginBackendHealthOnDemandWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayOnDemandProbe probeRequest, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName 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 (probeRequest == null) { + throw new IllegalArgumentException("Parameter probeRequest is required and cannot be null."); + } + Validator.validate(probeRequest); + final String apiVersion = "2019-09-01"; + return service.beginBackendHealthOnDemand(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, probeRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginBackendHealthOnDemandDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginBackendHealthOnDemandDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all available server variables. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<String> object if successful. + */ + public List listAvailableServerVariables() { + return listAvailableServerVariablesWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists all available server variables. + * + * @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> listAvailableServerVariablesAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listAvailableServerVariablesWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists all available server variables. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + public Observable> listAvailableServerVariablesAsync() { + return listAvailableServerVariablesWithServiceResponseAsync().map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all available server variables. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + public Observable>> listAvailableServerVariablesWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listAvailableServerVariables(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listAvailableServerVariablesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAvailableServerVariablesDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Lists all available request headers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<String> object if successful. + */ + public List listAvailableRequestHeaders() { + return listAvailableRequestHeadersWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists all available request headers. + * + * @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> listAvailableRequestHeadersAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listAvailableRequestHeadersWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists all available request headers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + public Observable> listAvailableRequestHeadersAsync() { + return listAvailableRequestHeadersWithServiceResponseAsync().map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all available request headers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + public Observable>> listAvailableRequestHeadersWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listAvailableRequestHeaders(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listAvailableRequestHeadersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAvailableRequestHeadersDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Lists all available response headers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<String> object if successful. + */ + public List listAvailableResponseHeaders() { + return listAvailableResponseHeadersWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists all available response headers. + * + * @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> listAvailableResponseHeadersAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listAvailableResponseHeadersWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists all available response headers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + public Observable> listAvailableResponseHeadersAsync() { + return listAvailableResponseHeadersWithServiceResponseAsync().map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all available response headers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + public Observable>> listAvailableResponseHeadersWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listAvailableResponseHeaders(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listAvailableResponseHeadersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAvailableResponseHeadersDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Lists all available web application firewall rule sets. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ApplicationGatewayAvailableWafRuleSetsResultInner object if successful. + */ + public ApplicationGatewayAvailableWafRuleSetsResultInner listAvailableWafRuleSets() { + return listAvailableWafRuleSetsWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists all available web application firewall rule sets. + * + * @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 listAvailableWafRuleSetsAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listAvailableWafRuleSetsWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists all available web application firewall rule sets. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayAvailableWafRuleSetsResultInner object + */ + public Observable listAvailableWafRuleSetsAsync() { + return listAvailableWafRuleSetsWithServiceResponseAsync().map(new Func1, ApplicationGatewayAvailableWafRuleSetsResultInner>() { + @Override + public ApplicationGatewayAvailableWafRuleSetsResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all available web application firewall rule sets. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayAvailableWafRuleSetsResultInner object + */ + public Observable> listAvailableWafRuleSetsWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listAvailableWafRuleSets(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listAvailableWafRuleSetsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listAvailableWafRuleSetsDelegate(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 available Ssl options for configuring Ssl 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 ApplicationGatewayAvailableSslOptionsInner object if successful. + */ + public ApplicationGatewayAvailableSslOptionsInner listAvailableSslOptions() { + return listAvailableSslOptionsWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists available Ssl options for configuring Ssl 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 listAvailableSslOptionsAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listAvailableSslOptionsWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists available Ssl options for configuring Ssl policy. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayAvailableSslOptionsInner object + */ + public Observable listAvailableSslOptionsAsync() { + return listAvailableSslOptionsWithServiceResponseAsync().map(new Func1, ApplicationGatewayAvailableSslOptionsInner>() { + @Override + public ApplicationGatewayAvailableSslOptionsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists available Ssl options for configuring Ssl policy. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayAvailableSslOptionsInner object + */ + public Observable> listAvailableSslOptionsWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listAvailableSslOptions(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listAvailableSslOptionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listAvailableSslOptionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all SSL predefined policies for configuring Ssl 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 PagedList<ApplicationGatewaySslPredefinedPolicyInner> object if successful. + */ + public PagedList listAvailableSslPredefinedPolicies() { + ServiceResponse> response = listAvailableSslPredefinedPoliciesSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAvailableSslPredefinedPoliciesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all SSL predefined policies for configuring Ssl 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> listAvailableSslPredefinedPoliciesAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAvailableSslPredefinedPoliciesSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAvailableSslPredefinedPoliciesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all SSL predefined policies for configuring Ssl policy. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationGatewaySslPredefinedPolicyInner> object + */ + public Observable> listAvailableSslPredefinedPoliciesAsync() { + return listAvailableSslPredefinedPoliciesWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all SSL predefined policies for configuring Ssl policy. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationGatewaySslPredefinedPolicyInner> object + */ + public Observable>> listAvailableSslPredefinedPoliciesWithServiceResponseAsync() { + return listAvailableSslPredefinedPoliciesSinglePageAsync() + .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(listAvailableSslPredefinedPoliciesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all SSL predefined policies for configuring Ssl policy. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationGatewaySslPredefinedPolicyInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAvailableSslPredefinedPoliciesSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listAvailableSslPredefinedPolicies(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAvailableSslPredefinedPoliciesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAvailableSslPredefinedPoliciesDelegate(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 Ssl predefined policy with the specified policy name. + * + * @param predefinedPolicyName Name of Ssl predefined 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 ApplicationGatewaySslPredefinedPolicyInner object if successful. + */ + public ApplicationGatewaySslPredefinedPolicyInner getSslPredefinedPolicy(String predefinedPolicyName) { + return getSslPredefinedPolicyWithServiceResponseAsync(predefinedPolicyName).toBlocking().single().body(); + } + + /** + * Gets Ssl predefined policy with the specified policy name. + * + * @param predefinedPolicyName Name of Ssl predefined 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 getSslPredefinedPolicyAsync(String predefinedPolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSslPredefinedPolicyWithServiceResponseAsync(predefinedPolicyName), serviceCallback); + } + + /** + * Gets Ssl predefined policy with the specified policy name. + * + * @param predefinedPolicyName Name of Ssl predefined policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewaySslPredefinedPolicyInner object + */ + public Observable getSslPredefinedPolicyAsync(String predefinedPolicyName) { + return getSslPredefinedPolicyWithServiceResponseAsync(predefinedPolicyName).map(new Func1, ApplicationGatewaySslPredefinedPolicyInner>() { + @Override + public ApplicationGatewaySslPredefinedPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets Ssl predefined policy with the specified policy name. + * + * @param predefinedPolicyName Name of Ssl predefined policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewaySslPredefinedPolicyInner object + */ + public Observable> getSslPredefinedPolicyWithServiceResponseAsync(String predefinedPolicyName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (predefinedPolicyName == null) { + throw new IllegalArgumentException("Parameter predefinedPolicyName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getSslPredefinedPolicy(this.client.subscriptionId(), predefinedPolicyName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSslPredefinedPolicyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSslPredefinedPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all application gateways in a resource group. + * + * @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<ApplicationGatewayInner> 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 all application gateways in a resource group. + * + * @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 all application gateways in a resource group. + * + * @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<ApplicationGatewayInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all application gateways in a resource group. + * + * @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<ApplicationGatewayInner> 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 all application gateways in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationGatewayInner> 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 all the application gateways in a subscription. + * + * @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<ApplicationGatewayInner> object if successful. + */ + public PagedList listAllNext(final String nextPageLink) { + ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the application gateways in a subscription. + * + * @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> listAllNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAllNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAllNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the application gateways in a subscription. + * + * @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<ApplicationGatewayInner> object + */ + public Observable> listAllNextAsync(final String nextPageLink) { + return listAllNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the application gateways in a subscription. + * + * @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<ApplicationGatewayInner> object + */ + public Observable>> listAllNextWithServiceResponseAsync(final String nextPageLink) { + return listAllNextSinglePageAsync(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(listAllNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the application gateways in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationGatewayInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAllNextSinglePageAsync(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.listAllNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAllNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAllNextDelegate(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 all SSL predefined policies for configuring Ssl policy. + * + * @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<ApplicationGatewaySslPredefinedPolicyInner> object if successful. + */ + public PagedList listAvailableSslPredefinedPoliciesNext(final String nextPageLink) { + ServiceResponse> response = listAvailableSslPredefinedPoliciesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAvailableSslPredefinedPoliciesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all SSL predefined policies for configuring Ssl policy. + * + * @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> listAvailableSslPredefinedPoliciesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAvailableSslPredefinedPoliciesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAvailableSslPredefinedPoliciesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all SSL predefined policies for configuring Ssl policy. + * + * @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<ApplicationGatewaySslPredefinedPolicyInner> object + */ + public Observable> listAvailableSslPredefinedPoliciesNextAsync(final String nextPageLink) { + return listAvailableSslPredefinedPoliciesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all SSL predefined policies for configuring Ssl policy. + * + * @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<ApplicationGatewaySslPredefinedPolicyInner> object + */ + public Observable>> listAvailableSslPredefinedPoliciesNextWithServiceResponseAsync(final String nextPageLink) { + return listAvailableSslPredefinedPoliciesNextSinglePageAsync(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(listAvailableSslPredefinedPoliciesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all SSL predefined policies for configuring Ssl policy. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationGatewaySslPredefinedPolicyInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAvailableSslPredefinedPoliciesNextSinglePageAsync(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.listAvailableSslPredefinedPoliciesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAvailableSslPredefinedPoliciesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAvailableSslPredefinedPoliciesNextDelegate(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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupImpl.java new file mode 100644 index 000000000000..70ea6e54826d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupImpl.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationSecurityGroup; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class ApplicationSecurityGroupImpl extends GroupableResourceCoreImpl implements ApplicationSecurityGroup, ApplicationSecurityGroup.Definition, ApplicationSecurityGroup.Update { + ApplicationSecurityGroupImpl(String name, ApplicationSecurityGroupInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ApplicationSecurityGroupsInner client = this.manager().inner().applicationSecurityGroups(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ApplicationSecurityGroupsInner client = this.manager().inner().applicationSecurityGroups(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ApplicationSecurityGroupsInner client = this.manager().inner().applicationSecurityGroups(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupInner.java new file mode 100644 index 000000000000..89c32d06e97e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * An application security group in a resource group. + */ +@JsonFlatten +@SkipParentValidation +public class ApplicationSecurityGroupInner extends Resource { + /** + * The resource GUID property of the application security group resource. + * It uniquely identifies a resource, even if the user changes its name or + * migrate the resource across subscriptions or resource groups. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the application security group resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the application security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the ApplicationSecurityGroupInner object itself. + */ + public ApplicationSecurityGroupInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupsImpl.java new file mode 100644 index 000000000000..cba6486464d4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupsImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationSecurityGroups; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationSecurityGroup; +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; + +class ApplicationSecurityGroupsImpl extends GroupableResourcesCoreImpl implements ApplicationSecurityGroups { + protected ApplicationSecurityGroupsImpl(NetworkManager manager) { + super(manager.inner().applicationSecurityGroups(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ApplicationSecurityGroupsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ApplicationSecurityGroupsInner 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) { + ApplicationSecurityGroupsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ApplicationSecurityGroupsInner 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 ApplicationSecurityGroup call(ApplicationSecurityGroupInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ApplicationSecurityGroupsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ApplicationSecurityGroupsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ApplicationSecurityGroup call(ApplicationSecurityGroupInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public ApplicationSecurityGroupImpl define(String name) { + return wrapModel(name); + } + + @Override + protected ApplicationSecurityGroupImpl wrapModel(ApplicationSecurityGroupInner inner) { + return new ApplicationSecurityGroupImpl(inner.name(), inner, manager()); + } + + @Override + protected ApplicationSecurityGroupImpl wrapModel(String name) { + return new ApplicationSecurityGroupImpl(name, new ApplicationSecurityGroupInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupsInner.java new file mode 100644 index 000000000000..4c807b449c72 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationSecurityGroupsInner.java @@ -0,0 +1,1126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 ApplicationSecurityGroups. + */ +public class ApplicationSecurityGroupsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ApplicationSecurityGroupsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ApplicationSecurityGroupsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ApplicationSecurityGroupsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ApplicationSecurityGroupsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ApplicationSecurityGroups to be + * used by Retrofit to perform actually REST calls. + */ + interface ApplicationSecurityGroupsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ApplicationSecurityGroups delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @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.network.v2019_09_01.ApplicationSecurityGroups beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @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.network.v2019_09_01.ApplicationSecurityGroups getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @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.network.v2019_09_01.ApplicationSecurityGroups createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Body ApplicationSecurityGroupInner 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.network.v2019_09_01.ApplicationSecurityGroups beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Body ApplicationSecurityGroupInner 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.network.v2019_09_01.ApplicationSecurityGroups updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ApplicationSecurityGroups list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups") + Observable> list(@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.network.v2019_09_01.ApplicationSecurityGroups listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.ApplicationSecurityGroups 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.network.v2019_09_01.ApplicationSecurityGroups listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security 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 + */ + public void delete(String resourceGroupName, String applicationSecurityGroupName) { + deleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).toBlocking().last().body(); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security 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 deleteAsync(String resourceGroupName, String applicationSecurityGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName), serviceCallback); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String applicationSecurityGroupName) { + return deleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter applicationSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security 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 + */ + public void beginDelete(String resourceGroupName, String applicationSecurityGroupName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).toBlocking().single().body(); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security 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 beginDeleteAsync(String resourceGroupName, String applicationSecurityGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName), serviceCallback); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String applicationSecurityGroupName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter applicationSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), 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); + } + + /** + * Gets information about the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security 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 ApplicationSecurityGroupInner object if successful. + */ + public ApplicationSecurityGroupInner getByResourceGroup(String resourceGroupName, String applicationSecurityGroupName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).toBlocking().single().body(); + } + + /** + * Gets information about the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security 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 getByResourceGroupAsync(String resourceGroupName, String applicationSecurityGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName), serviceCallback); + } + + /** + * Gets information about the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationSecurityGroupInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String applicationSecurityGroupName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).map(new Func1, ApplicationSecurityGroupInner>() { + @Override + public ApplicationSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationSecurityGroupInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter applicationSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup 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 ApplicationSecurityGroupInner object if successful. + */ + public ApplicationSecurityGroupInner createOrUpdate(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup 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 createOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters), serviceCallback); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).map(new Func1, ApplicationSecurityGroupInner>() { + @Override + public ApplicationSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter applicationSecurityGroupName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup 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 ApplicationSecurityGroupInner object if successful. + */ + public ApplicationSecurityGroupInner beginCreateOrUpdate(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup 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 beginCreateOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters), serviceCallback); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationSecurityGroupInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).map(new Func1, ApplicationSecurityGroupInner>() { + @Override + public ApplicationSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationSecurityGroupInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter applicationSecurityGroupName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 an application security group's tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security 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 ApplicationSecurityGroupInner object if successful. + */ + public ApplicationSecurityGroupInner updateTags(String resourceGroupName, String applicationSecurityGroupName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).toBlocking().single().body(); + } + + /** + * Updates an application security group's tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security 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 updateTagsAsync(String resourceGroupName, String applicationSecurityGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName), serviceCallback); + } + + /** + * Updates an application security group's tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationSecurityGroupInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String applicationSecurityGroupName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).map(new Func1, ApplicationSecurityGroupInner>() { + @Override + public ApplicationSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an application security group's tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationSecurityGroupInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter applicationSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates an application security group's tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ApplicationSecurityGroupInner object if successful. + */ + public ApplicationSecurityGroupInner updateTags(String resourceGroupName, String applicationSecurityGroupName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, tags).toBlocking().single().body(); + } + + /** + * Updates an application security group's tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String applicationSecurityGroupName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, tags), serviceCallback); + } + + /** + * Updates an application security group's tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationSecurityGroupInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String applicationSecurityGroupName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, tags).map(new Func1, ApplicationSecurityGroupInner>() { + @Override + public ApplicationSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an application security group's tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationSecurityGroupInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter applicationSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all application security groups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ApplicationSecurityGroupInner> 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 all application security groups in a subscription. + * + * @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 all application security groups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationSecurityGroupInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all application security groups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationSecurityGroupInner> 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 all application security groups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationSecurityGroupInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all the application security groups in a resource group. + * + * @param resourceGroupName The name of the 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<ApplicationSecurityGroupInner> 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 all the application security groups in a resource group. + * + * @param resourceGroupName The name of the 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 all the application security groups in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationSecurityGroupInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the application security groups in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationSecurityGroupInner> 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 all the application security groups in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationSecurityGroupInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all application security groups in a subscription. + * + * @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<ApplicationSecurityGroupInner> 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 all application security groups in a subscription. + * + * @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 all application security groups in a subscription. + * + * @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<ApplicationSecurityGroupInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all application security groups in a subscription. + * + * @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<ApplicationSecurityGroupInner> 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 all application security groups in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationSecurityGroupInner> 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 all the application security groups in a resource group. + * + * @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<ApplicationSecurityGroupInner> 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 all the application security groups in a resource group. + * + * @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 all the application security groups in a resource group. + * + * @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<ApplicationSecurityGroupInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the application security groups in a resource group. + * + * @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<ApplicationSecurityGroupInner> 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 all the application security groups in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationSecurityGroupInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AutoApprovedPrivateLinkServiceImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AutoApprovedPrivateLinkServiceImpl.java new file mode 100644 index 000000000000..ca332a388527 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AutoApprovedPrivateLinkServiceImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.AutoApprovedPrivateLinkService; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class AutoApprovedPrivateLinkServiceImpl extends WrapperImpl implements AutoApprovedPrivateLinkService { + private final NetworkManager manager; + + AutoApprovedPrivateLinkServiceImpl(AutoApprovedPrivateLinkServiceInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public String privateLinkService() { + return this.inner().privateLinkService(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AutoApprovedPrivateLinkServiceInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AutoApprovedPrivateLinkServiceInner.java new file mode 100644 index 000000000000..a62e7219181d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AutoApprovedPrivateLinkServiceInner.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.network.v2019_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The information of an AutoApprovedPrivateLinkService. + */ +public class AutoApprovedPrivateLinkServiceInner { + /** + * The id of the private link service resource. + */ + @JsonProperty(value = "privateLinkService") + private String privateLinkService; + + /** + * Get the id of the private link service resource. + * + * @return the privateLinkService value + */ + public String privateLinkService() { + return this.privateLinkService; + } + + /** + * Set the id of the private link service resource. + * + * @param privateLinkService the privateLinkService value to set + * @return the AutoApprovedPrivateLinkServiceInner object itself. + */ + public AutoApprovedPrivateLinkServiceInner withPrivateLinkService(String privateLinkService) { + this.privateLinkService = privateLinkService; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableDelegationInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableDelegationInner.java new file mode 100644 index 000000000000..b4951a80d331 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableDelegationInner.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The serviceName of an AvailableDelegation indicates a possible delegation + * for a subnet. + */ +public class AvailableDelegationInner { + /** + * The name of the AvailableDelegation resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique identifier of the AvailableDelegation resource. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Resource type. + */ + @JsonProperty(value = "type") + private String type; + + /** + * The name of the service and resource. + */ + @JsonProperty(value = "serviceName") + private String serviceName; + + /** + * Describes the actions permitted to the service upon delegation. + */ + @JsonProperty(value = "actions") + private List actions; + + /** + * Get the name of the AvailableDelegation resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the AvailableDelegation resource. + * + * @param name the name value to set + * @return the AvailableDelegationInner object itself. + */ + public AvailableDelegationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique identifier of the AvailableDelegation resource. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set a unique identifier of the AvailableDelegation resource. + * + * @param id the id value to set + * @return the AvailableDelegationInner object itself. + */ + public AvailableDelegationInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set resource type. + * + * @param type the type value to set + * @return the AvailableDelegationInner object itself. + */ + public AvailableDelegationInner withType(String type) { + this.type = type; + return this; + } + + /** + * Get the name of the service and resource. + * + * @return the serviceName value + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set the name of the service and resource. + * + * @param serviceName the serviceName value to set + * @return the AvailableDelegationInner object itself. + */ + public AvailableDelegationInner withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get describes the actions permitted to the service upon delegation. + * + * @return the actions value + */ + public List actions() { + return this.actions; + } + + /** + * Set describes the actions permitted to the service upon delegation. + * + * @param actions the actions value to set + * @return the AvailableDelegationInner object itself. + */ + public AvailableDelegationInner withActions(List actions) { + this.actions = actions; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableDelegationsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableDelegationsImpl.java new file mode 100644 index 000000000000..713ea00a566b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableDelegationsImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.AvailableDelegations; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.LocationAvailableDelegation; + +class AvailableDelegationsImpl extends WrapperImpl implements AvailableDelegations { + private final NetworkManager manager; + + AvailableDelegationsImpl(NetworkManager manager) { + super(manager.inner().availableDelegations()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private LocationAvailableDelegationImpl wrapModel(AvailableDelegationInner inner) { + return new LocationAvailableDelegationImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String location) { + AvailableDelegationsInner client = this.inner(); + return client.listAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public LocationAvailableDelegation call(AvailableDelegationInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableDelegationsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableDelegationsInner.java new file mode 100644 index 000000000000..9f4f04f729db --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableDelegationsInner.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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.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 AvailableDelegations. + */ +public class AvailableDelegationsInner { + /** The Retrofit service to perform REST calls. */ + private AvailableDelegationsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of AvailableDelegationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AvailableDelegationsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(AvailableDelegationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for AvailableDelegations to be + * used by Retrofit to perform actually REST calls. + */ + interface AvailableDelegationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.AvailableDelegations list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableDelegations") + Observable> list(@Path("location") String location, @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.network.v2019_09_01.AvailableDelegations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all of the available subnet delegations for this subscription in this region. + * + * @param location The location of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<AvailableDelegationInner> object if successful. + */ + public PagedList list(final String location) { + ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all of the available subnet delegations for this subscription in this region. + * + * @param location The location of the subnet. + * @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 location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all of the available subnet delegations for this subscription in this region. + * + * @param location The location of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailableDelegationInner> object + */ + public Observable> listAsync(final String location) { + return listWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all of the available subnet delegations for this subscription in this region. + * + * @param location The location of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailableDelegationInner> object + */ + public Observable>> listWithServiceResponseAsync(final String location) { + return listSinglePageAsync(location) + .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 all of the available subnet delegations for this subscription in this region. + * + ServiceResponse> * @param location The location of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableDelegationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(location, this.client.subscriptionId(), 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 all of the available subnet delegations for this subscription in this region. + * + * @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<AvailableDelegationInner> 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 all of the available subnet delegations for this subscription in this region. + * + * @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 all of the available subnet delegations for this subscription in this region. + * + * @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<AvailableDelegationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all of the available subnet delegations for this subscription in this region. + * + * @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<AvailableDelegationInner> 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 all of the available subnet delegations for this subscription in this region. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableDelegationInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableEndpointServicesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableEndpointServicesImpl.java new file mode 100644 index 000000000000..bd9e2a719597 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableEndpointServicesImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.AvailableEndpointServices; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.EndpointServiceResult; + +class AvailableEndpointServicesImpl extends WrapperImpl implements AvailableEndpointServices { + private final NetworkManager manager; + + AvailableEndpointServicesImpl(NetworkManager manager) { + super(manager.inner().availableEndpointServices()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private EndpointServiceResultImpl wrapModel(EndpointServiceResultInner inner) { + return new EndpointServiceResultImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String location) { + AvailableEndpointServicesInner client = this.inner(); + return client.listAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public EndpointServiceResult call(EndpointServiceResultInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableEndpointServicesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableEndpointServicesInner.java new file mode 100644 index 000000000000..7f9d2dde7fc2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableEndpointServicesInner.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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.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 AvailableEndpointServices. + */ +public class AvailableEndpointServicesInner { + /** The Retrofit service to perform REST calls. */ + private AvailableEndpointServicesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of AvailableEndpointServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AvailableEndpointServicesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(AvailableEndpointServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for AvailableEndpointServices to be + * used by Retrofit to perform actually REST calls. + */ + interface AvailableEndpointServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.AvailableEndpointServices list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices") + Observable> list(@Path("location") String location, @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.network.v2019_09_01.AvailableEndpointServices listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List what values of endpoint services are available for use. + * + * @param location The location to check available endpoint services. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EndpointServiceResultInner> object if successful. + */ + public PagedList list(final String location) { + ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List what values of endpoint services are available for use. + * + * @param location The location to check available endpoint services. + * @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 location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List what values of endpoint services are available for use. + * + * @param location The location to check available endpoint services. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EndpointServiceResultInner> object + */ + public Observable> listAsync(final String location) { + return listWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List what values of endpoint services are available for use. + * + * @param location The location to check available endpoint services. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EndpointServiceResultInner> object + */ + public Observable>> listWithServiceResponseAsync(final String location) { + return listSinglePageAsync(location) + .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)); + } + }); + } + + /** + * List what values of endpoint services are available for use. + * + ServiceResponse> * @param location The location to check available endpoint services. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EndpointServiceResultInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(location, this.client.subscriptionId(), 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); + } + + /** + * List what values of endpoint services are available for use. + * + * @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<EndpointServiceResultInner> 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(); + } + }; + } + + /** + * List what values of endpoint services are available for use. + * + * @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); + } + + /** + * List what values of endpoint services are available for use. + * + * @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<EndpointServiceResultInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List what values of endpoint services are available for use. + * + * @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<EndpointServiceResultInner> 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)); + } + }); + } + + /** + * List what values of endpoint services are available for use. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EndpointServiceResultInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypeImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypeImpl.java new file mode 100644 index 000000000000..0edb61dc1bf4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypeImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.AvailablePrivateEndpointType; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class AvailablePrivateEndpointTypeImpl extends WrapperImpl implements AvailablePrivateEndpointType { + private final NetworkManager manager; + + AvailablePrivateEndpointTypeImpl(AvailablePrivateEndpointTypeInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String resourceName() { + return this.inner().resourceName(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypeInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypeInner.java new file mode 100644 index 000000000000..807f11859da0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypeInner.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.network.v2019_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The information of an AvailablePrivateEndpointType. + */ +public class AvailablePrivateEndpointTypeInner { + /** + * The name of the service and resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique identifier of the AvailablePrivateEndpoint Type resource. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Resource type. + */ + @JsonProperty(value = "type") + private String type; + + /** + * The name of the service and resource. + */ + @JsonProperty(value = "resourceName") + private String resourceName; + + /** + * Get the name of the service and resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the service and resource. + * + * @param name the name value to set + * @return the AvailablePrivateEndpointTypeInner object itself. + */ + public AvailablePrivateEndpointTypeInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique identifier of the AvailablePrivateEndpoint Type resource. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set a unique identifier of the AvailablePrivateEndpoint Type resource. + * + * @param id the id value to set + * @return the AvailablePrivateEndpointTypeInner object itself. + */ + public AvailablePrivateEndpointTypeInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set resource type. + * + * @param type the type value to set + * @return the AvailablePrivateEndpointTypeInner object itself. + */ + public AvailablePrivateEndpointTypeInner withType(String type) { + this.type = type; + return this; + } + + /** + * Get the name of the service and resource. + * + * @return the resourceName value + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set the name of the service and resource. + * + * @param resourceName the resourceName value to set + * @return the AvailablePrivateEndpointTypeInner object itself. + */ + public AvailablePrivateEndpointTypeInner withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypesImpl.java new file mode 100644 index 000000000000..2946b37bf934 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypesImpl.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.AvailablePrivateEndpointTypes; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.AvailablePrivateEndpointType; + +class AvailablePrivateEndpointTypesImpl extends WrapperImpl implements AvailablePrivateEndpointTypes { + private final NetworkManager manager; + + AvailablePrivateEndpointTypesImpl(NetworkManager manager) { + super(manager.inner().availablePrivateEndpointTypes()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private AvailablePrivateEndpointTypeImpl wrapModel(AvailablePrivateEndpointTypeInner inner) { + return new AvailablePrivateEndpointTypeImpl(inner, manager()); + } + + @Override + public Observable listByResourceGroupAsync(final String location, final String resourceGroupName) { + AvailablePrivateEndpointTypesInner client = this.inner(); + return client.listByResourceGroupAsync(location, resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AvailablePrivateEndpointType call(AvailablePrivateEndpointTypeInner inner) { + return new AvailablePrivateEndpointTypeImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync(final String location) { + AvailablePrivateEndpointTypesInner client = this.inner(); + return client.listAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AvailablePrivateEndpointType call(AvailablePrivateEndpointTypeInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypesInner.java new file mode 100644 index 000000000000..f6c61586bc4a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailablePrivateEndpointTypesInner.java @@ -0,0 +1,533 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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.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 AvailablePrivateEndpointTypes. + */ +public class AvailablePrivateEndpointTypesInner { + /** The Retrofit service to perform REST calls. */ + private AvailablePrivateEndpointTypesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of AvailablePrivateEndpointTypesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AvailablePrivateEndpointTypesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(AvailablePrivateEndpointTypesService.class); + this.client = client; + } + + /** + * The interface defining all the services for AvailablePrivateEndpointTypes to be + * used by Retrofit to perform actually REST calls. + */ + interface AvailablePrivateEndpointTypesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.AvailablePrivateEndpointTypes list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes") + Observable> list(@Path("location") String location, @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.network.v2019_09_01.AvailablePrivateEndpointTypes listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes") + Observable> listByResourceGroup(@Path("location") String location, @Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.AvailablePrivateEndpointTypes 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.network.v2019_09_01.AvailablePrivateEndpointTypes listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<AvailablePrivateEndpointTypeInner> object if successful. + */ + public PagedList list(final String location) { + ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @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 location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailablePrivateEndpointTypeInner> object + */ + public Observable> listAsync(final String location) { + return listWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailablePrivateEndpointTypeInner> object + */ + public Observable>> listWithServiceResponseAsync(final String location) { + return listSinglePageAsync(location) + .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)); + } + }); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + ServiceResponse> * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailablePrivateEndpointTypeInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(location, this.client.subscriptionId(), 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); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the 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<AvailablePrivateEndpointTypeInner> object if successful. + */ + public PagedList listByResourceGroup(final String location, final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(location, resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the 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 location, final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(location, resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailablePrivateEndpointTypeInner> object + */ + public Observable> listByResourceGroupAsync(final String location, final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(location, resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailablePrivateEndpointTypeInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String location, final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(location, 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)); + } + }); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + ServiceResponse> * @param location The location of the domain name. + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailablePrivateEndpointTypeInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String location, final String resourceGroupName) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), 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); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @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<AvailablePrivateEndpointTypeInner> 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(); + } + }; + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @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); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @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<AvailablePrivateEndpointTypeInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @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<AvailablePrivateEndpointTypeInner> 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)); + } + }); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailablePrivateEndpointTypeInner> 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); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @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<AvailablePrivateEndpointTypeInner> 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(); + } + }; + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @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); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @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<AvailablePrivateEndpointTypeInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @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<AvailablePrivateEndpointTypeInner> 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)); + } + }); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailablePrivateEndpointTypeInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableProvidersListImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableProvidersListImpl.java new file mode 100644 index 000000000000..bf9951750aa0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableProvidersListImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.AvailableProvidersList; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.AvailableProvidersListCountry; + +class AvailableProvidersListImpl extends WrapperImpl implements AvailableProvidersList { + private final NetworkManager manager; + AvailableProvidersListImpl(AvailableProvidersListInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List countries() { + return this.inner().countries(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableProvidersListInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableProvidersListInner.java new file mode 100644 index 000000000000..9c3b417e3b26 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableProvidersListInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.AvailableProvidersListCountry; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of available countries with details. + */ +public class AvailableProvidersListInner { + /** + * List of available countries. + */ + @JsonProperty(value = "countries", required = true) + private List countries; + + /** + * Get list of available countries. + * + * @return the countries value + */ + public List countries() { + return this.countries; + } + + /** + * Set list of available countries. + * + * @param countries the countries value to set + * @return the AvailableProvidersListInner object itself. + */ + public AvailableProvidersListInner withCountries(List countries) { + this.countries = countries; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableResourceGroupDelegationsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableResourceGroupDelegationsImpl.java new file mode 100644 index 000000000000..5e7d388025c1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableResourceGroupDelegationsImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.AvailableResourceGroupDelegations; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.LocationAvailableDelegationModel; + +class AvailableResourceGroupDelegationsImpl extends WrapperImpl implements AvailableResourceGroupDelegations { + private final NetworkManager manager; + + AvailableResourceGroupDelegationsImpl(NetworkManager manager) { + super(manager.inner().availableResourceGroupDelegations()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private LocationAvailableDelegationModelImpl wrapModel(AvailableDelegationInner inner) { + return new LocationAvailableDelegationModelImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String location, final String resourceGroupName) { + AvailableResourceGroupDelegationsInner client = this.inner(); + return client.listAsync(location, resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public LocationAvailableDelegationModel call(AvailableDelegationInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableResourceGroupDelegationsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableResourceGroupDelegationsInner.java new file mode 100644 index 000000000000..d5c1f117a401 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableResourceGroupDelegationsInner.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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.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 AvailableResourceGroupDelegations. + */ +public class AvailableResourceGroupDelegationsInner { + /** The Retrofit service to perform REST calls. */ + private AvailableResourceGroupDelegationsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of AvailableResourceGroupDelegationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AvailableResourceGroupDelegationsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(AvailableResourceGroupDelegationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for AvailableResourceGroupDelegations to be + * used by Retrofit to perform actually REST calls. + */ + interface AvailableResourceGroupDelegationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.AvailableResourceGroupDelegations list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableDelegations") + Observable> list(@Path("location") String location, @Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.AvailableResourceGroupDelegations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all of the available subnet delegations for this resource group in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the 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<AvailableDelegationInner> object if successful. + */ + public PagedList list(final String location, final String resourceGroupName) { + ServiceResponse> response = listSinglePageAsync(location, resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all of the available subnet delegations for this resource group in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the 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> listAsync(final String location, final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(location, resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all of the available subnet delegations for this resource group in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailableDelegationInner> object + */ + public Observable> listAsync(final String location, final String resourceGroupName) { + return listWithServiceResponseAsync(location, resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all of the available subnet delegations for this resource group in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailableDelegationInner> object + */ + public Observable>> listWithServiceResponseAsync(final String location, final String resourceGroupName) { + return listSinglePageAsync(location, 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(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all of the available subnet delegations for this resource group in this region. + * + ServiceResponse> * @param location The location of the domain name. + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableDelegationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String location, final String resourceGroupName) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(location, resourceGroupName, this.client.subscriptionId(), 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 all of the available subnet delegations for this resource group in this region. + * + * @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<AvailableDelegationInner> 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 all of the available subnet delegations for this resource group in this region. + * + * @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 all of the available subnet delegations for this resource group in this region. + * + * @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<AvailableDelegationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all of the available subnet delegations for this resource group in this region. + * + * @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<AvailableDelegationInner> 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 all of the available subnet delegations for this resource group in this region. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableDelegationInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasImpl.java new file mode 100644 index 000000000000..f327a225142c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.AvailableServiceAlias; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class AvailableServiceAliasImpl extends WrapperImpl implements AvailableServiceAlias { + private final NetworkManager manager; + + AvailableServiceAliasImpl(AvailableServiceAliasInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String resourceName() { + return this.inner().resourceName(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasInner.java new file mode 100644 index 000000000000..6f2552d1266b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasInner.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.network.v2019_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The available service alias. + */ +public class AvailableServiceAliasInner { + /** + * The name of the service alias. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The ID of the service alias. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The type of the resource. + */ + @JsonProperty(value = "type") + private String type; + + /** + * The resource name of the service alias. + */ + @JsonProperty(value = "resourceName") + private String resourceName; + + /** + * Get the name of the service alias. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the service alias. + * + * @param name the name value to set + * @return the AvailableServiceAliasInner object itself. + */ + public AvailableServiceAliasInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the ID of the service alias. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the ID of the service alias. + * + * @param id the id value to set + * @return the AvailableServiceAliasInner object itself. + */ + public AvailableServiceAliasInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of the resource. + * + * @param type the type value to set + * @return the AvailableServiceAliasInner object itself. + */ + public AvailableServiceAliasInner withType(String type) { + this.type = type; + return this; + } + + /** + * Get the resource name of the service alias. + * + * @return the resourceName value + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set the resource name of the service alias. + * + * @param resourceName the resourceName value to set + * @return the AvailableServiceAliasInner object itself. + */ + public AvailableServiceAliasInner withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasesImpl.java new file mode 100644 index 000000000000..c6800701988e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasesImpl.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.AvailableServiceAliases; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.AvailableServiceAlias; + +class AvailableServiceAliasesImpl extends WrapperImpl implements AvailableServiceAliases { + private final NetworkManager manager; + + AvailableServiceAliasesImpl(NetworkManager manager) { + super(manager.inner().availableServiceAliases()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private AvailableServiceAliasImpl wrapModel(AvailableServiceAliasInner inner) { + return new AvailableServiceAliasImpl(inner, manager()); + } + + @Override + public Observable listByResourceGroupAsync(final String resourceGroupName, final String location) { + AvailableServiceAliasesInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName, location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AvailableServiceAlias call(AvailableServiceAliasInner inner) { + return new AvailableServiceAliasImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync(final String location) { + AvailableServiceAliasesInner client = this.inner(); + return client.listAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AvailableServiceAlias call(AvailableServiceAliasInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasesInner.java new file mode 100644 index 000000000000..3a1191f52a27 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AvailableServiceAliasesInner.java @@ -0,0 +1,533 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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.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 AvailableServiceAliases. + */ +public class AvailableServiceAliasesInner { + /** The Retrofit service to perform REST calls. */ + private AvailableServiceAliasesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of AvailableServiceAliasesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AvailableServiceAliasesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(AvailableServiceAliasesService.class); + this.client = client; + } + + /** + * The interface defining all the services for AvailableServiceAliases to be + * used by Retrofit to perform actually REST calls. + */ + interface AvailableServiceAliasesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.AvailableServiceAliases list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableServiceAliases") + Observable> list(@Path("location") String location, @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.network.v2019_09_01.AvailableServiceAliases listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableServiceAliases") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("location") String location, @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.network.v2019_09_01.AvailableServiceAliases 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.network.v2019_09_01.AvailableServiceAliases listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all available service aliases for this subscription in this region. + * + * @param location The location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<AvailableServiceAliasInner> object if successful. + */ + public PagedList list(final String location) { + ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all available service aliases for this subscription in this region. + * + * @param location The location. + * @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 location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all available service aliases for this subscription in this region. + * + * @param location The location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailableServiceAliasInner> object + */ + public Observable> listAsync(final String location) { + return listWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all available service aliases for this subscription in this region. + * + * @param location The location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailableServiceAliasInner> object + */ + public Observable>> listWithServiceResponseAsync(final String location) { + return listSinglePageAsync(location) + .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 all available service aliases for this subscription in this region. + * + ServiceResponse> * @param location The location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableServiceAliasInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(location, this.client.subscriptionId(), 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 all available service aliases for this resource group in this region. + * + * @param resourceGroupName The name of the resource group. + * @param location The location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<AvailableServiceAliasInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, final String location) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all available service aliases for this resource group in this region. + * + * @param resourceGroupName The name of the resource group. + * @param location The location. + * @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 location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName, location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all available service aliases for this resource group in this region. + * + * @param resourceGroupName The name of the resource group. + * @param location The location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailableServiceAliasInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, final String location) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all available service aliases for this resource group in this region. + * + * @param resourceGroupName The name of the resource group. + * @param location The location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailableServiceAliasInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String location) { + return listByResourceGroupSinglePageAsync(resourceGroupName, location) + .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 all available service aliases for this resource group in this region. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param location The location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableServiceAliasInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String location) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, location, this.client.subscriptionId(), 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 all available service aliases for this subscription in this region. + * + * @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<AvailableServiceAliasInner> 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 all available service aliases for this subscription in this region. + * + * @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 all available service aliases for this subscription in this region. + * + * @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<AvailableServiceAliasInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all available service aliases for this subscription in this region. + * + * @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<AvailableServiceAliasInner> 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 all available service aliases for this subscription in this region. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableServiceAliasInner> 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 all available service aliases for this resource group in this region. + * + * @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<AvailableServiceAliasInner> 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 all available service aliases for this resource group in this region. + * + * @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 all available service aliases for this resource group in this region. + * + * @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<AvailableServiceAliasInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all available service aliases for this resource group in this region. + * + * @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<AvailableServiceAliasInner> 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 all available service aliases for this resource group in this region. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableServiceAliasInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagImpl.java new file mode 100644 index 000000000000..1e96e9742e40 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallFqdnTag; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class AzureFirewallFqdnTagImpl extends GroupableResourceCoreImpl implements AzureFirewallFqdnTag { + AzureFirewallFqdnTagImpl(String name, AzureFirewallFqdnTagInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + AzureFirewallFqdnTagsInner client = this.manager().inner().azureFirewallFqdnTags(); + return null; // NOP createResourceAsync implementation as create is not supported + } + + @Override + public Observable updateResourceAsync() { + AzureFirewallFqdnTagsInner client = this.manager().inner().azureFirewallFqdnTags(); + return null; // NOP updateResourceAsync implementation as update is not supported + } + + @Override + protected Observable getInnerAsync() { + AzureFirewallFqdnTagsInner client = this.manager().inner().azureFirewallFqdnTags(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String fqdnTagName() { + return this.inner().fqdnTagName(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagInner.java new file mode 100644 index 000000000000..dc45fb939c6a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Azure Firewall FQDN Tag Resource. + */ +@JsonFlatten +@SkipParentValidation +public class AzureFirewallFqdnTagInner extends Resource { + /** + * The provisioning state of the Azure firewall FQDN tag resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of this FQDN Tag. + */ + @JsonProperty(value = "properties.fqdnTagName", access = JsonProperty.Access.WRITE_ONLY) + private String fqdnTagName; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the provisioning state of the Azure firewall FQDN tag resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of this FQDN Tag. + * + * @return the fqdnTagName value + */ + public String fqdnTagName() { + return this.fqdnTagName; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the AzureFirewallFqdnTagInner object itself. + */ + public AzureFirewallFqdnTagInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagsImpl.java new file mode 100644 index 000000000000..14d96f1993a8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagsImpl.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallFqdnTags; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallFqdnTag; +import rx.Observable; +import rx.Completable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; + +class AzureFirewallFqdnTagsImpl extends GroupableResourcesCoreImpl implements AzureFirewallFqdnTags { + protected AzureFirewallFqdnTagsImpl(NetworkManager manager) { + super(manager.inner().azureFirewallFqdnTags(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + return null; // NOP Retrieve by resource group not supported + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + AzureFirewallFqdnTagsInner client = this.inner(); + return Completable.error(new Throwable("Delete by RG not supported for this resource")); // NOP Delete by RG not supported + } + + @Override + public PagedList list() { + AzureFirewallFqdnTagsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + AzureFirewallFqdnTagsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AzureFirewallFqdnTag call(AzureFirewallFqdnTagInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + protected AzureFirewallFqdnTagImpl wrapModel(AzureFirewallFqdnTagInner inner) { + return new AzureFirewallFqdnTagImpl(inner.name(), inner, manager()); + } + + @Override + protected AzureFirewallFqdnTagImpl wrapModel(String name) { + return null; // Model is not creatable + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagsInner.java new file mode 100644 index 000000000000..f0a986bd907f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallFqdnTagsInner.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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.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 AzureFirewallFqdnTags. + */ +public class AzureFirewallFqdnTagsInner { + /** The Retrofit service to perform REST calls. */ + private AzureFirewallFqdnTagsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of AzureFirewallFqdnTagsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AzureFirewallFqdnTagsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(AzureFirewallFqdnTagsService.class); + this.client = client; + } + + /** + * The interface defining all the services for AzureFirewallFqdnTags to be + * used by Retrofit to perform actually REST calls. + */ + interface AzureFirewallFqdnTagsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.AzureFirewallFqdnTags list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags") + Observable> list(@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.network.v2019_09_01.AzureFirewallFqdnTags listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all the Azure Firewall FQDN Tags in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<AzureFirewallFqdnTagInner> 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 all the Azure Firewall FQDN Tags in a subscription. + * + * @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 all the Azure Firewall FQDN Tags in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AzureFirewallFqdnTagInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the Azure Firewall FQDN Tags in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AzureFirewallFqdnTagInner> 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 all the Azure Firewall FQDN Tags in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AzureFirewallFqdnTagInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all the Azure Firewall FQDN Tags in a subscription. + * + * @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<AzureFirewallFqdnTagInner> 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 all the Azure Firewall FQDN Tags in a subscription. + * + * @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 all the Azure Firewall FQDN Tags in a subscription. + * + * @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<AzureFirewallFqdnTagInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the Azure Firewall FQDN Tags in a subscription. + * + * @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<AzureFirewallFqdnTagInner> 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 all the Azure Firewall FQDN Tags in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AzureFirewallFqdnTagInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallImpl.java new file mode 100644 index 000000000000..0c8d04d9c0c0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallImpl.java @@ -0,0 +1,182 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewall; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallApplicationRuleCollection; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallNatRuleCollection; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallNetworkRuleCollection; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallThreatIntelMode; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.HubIPAddresses; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallSku; +import java.util.Map; + +class AzureFirewallImpl extends GroupableResourceCoreImpl implements AzureFirewall, AzureFirewall.Definition, AzureFirewall.Update { + AzureFirewallImpl(String name, AzureFirewallInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + AzureFirewallsInner client = this.manager().inner().azureFirewalls(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AzureFirewallsInner client = this.manager().inner().azureFirewalls(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AzureFirewallsInner client = this.manager().inner().azureFirewalls(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Map additionalProperties() { + return this.inner().additionalProperties(); + } + + @Override + public List applicationRuleCollections() { + return this.inner().applicationRuleCollections(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public SubResource firewallPolicy() { + return this.inner().firewallPolicy(); + } + + @Override + public HubIPAddresses hubIpAddresses() { + return this.inner().hubIpAddresses(); + } + + @Override + public List ipConfigurations() { + return this.inner().ipConfigurations(); + } + + @Override + public List natRuleCollections() { + return this.inner().natRuleCollections(); + } + + @Override + public List networkRuleCollections() { + return this.inner().networkRuleCollections(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public AzureFirewallSku sku() { + return this.inner().sku(); + } + + @Override + public AzureFirewallThreatIntelMode threatIntelMode() { + return this.inner().threatIntelMode(); + } + + @Override + public SubResource virtualHub() { + return this.inner().virtualHub(); + } + + @Override + public List zones() { + return this.inner().zones(); + } + + @Override + public AzureFirewallImpl withAdditionalProperties(Map additionalProperties) { + this.inner().withAdditionalProperties(additionalProperties); + return this; + } + + @Override + public AzureFirewallImpl withApplicationRuleCollections(List applicationRuleCollections) { + this.inner().withApplicationRuleCollections(applicationRuleCollections); + return this; + } + + @Override + public AzureFirewallImpl withFirewallPolicy(SubResource firewallPolicy) { + this.inner().withFirewallPolicy(firewallPolicy); + return this; + } + + @Override + public AzureFirewallImpl withIpConfigurations(List ipConfigurations) { + this.inner().withIpConfigurations(ipConfigurations); + return this; + } + + @Override + public AzureFirewallImpl withNatRuleCollections(List natRuleCollections) { + this.inner().withNatRuleCollections(natRuleCollections); + return this; + } + + @Override + public AzureFirewallImpl withNetworkRuleCollections(List networkRuleCollections) { + this.inner().withNetworkRuleCollections(networkRuleCollections); + return this; + } + + @Override + public AzureFirewallImpl withSku(AzureFirewallSku sku) { + this.inner().withSku(sku); + return this; + } + + @Override + public AzureFirewallImpl withThreatIntelMode(AzureFirewallThreatIntelMode threatIntelMode) { + this.inner().withThreatIntelMode(threatIntelMode); + return this; + } + + @Override + public AzureFirewallImpl withVirtualHub(SubResource virtualHub) { + this.inner().withVirtualHub(virtualHub); + return this; + } + + @Override + public AzureFirewallImpl withZones(List zones) { + this.inner().withZones(zones); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallInner.java new file mode 100644 index 000000000000..11ad698a0f6d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallInner.java @@ -0,0 +1,367 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallApplicationRuleCollection; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallNatRuleCollection; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallNetworkRuleCollection; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallThreatIntelMode; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.HubIPAddresses; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallSku; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Azure Firewall resource. + */ +@JsonFlatten +@SkipParentValidation +public class AzureFirewallInner extends Resource { + /** + * Collection of application rule collections used by Azure Firewall. + */ + @JsonProperty(value = "properties.applicationRuleCollections") + private List applicationRuleCollections; + + /** + * Collection of NAT rule collections used by Azure Firewall. + */ + @JsonProperty(value = "properties.natRuleCollections") + private List natRuleCollections; + + /** + * Collection of network rule collections used by Azure Firewall. + */ + @JsonProperty(value = "properties.networkRuleCollections") + private List networkRuleCollections; + + /** + * IP configuration of the Azure Firewall resource. + */ + @JsonProperty(value = "properties.ipConfigurations") + private List ipConfigurations; + + /** + * The provisioning state of the Azure firewall resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The operation mode for Threat Intelligence. Possible values include: + * 'Alert', 'Deny', 'Off'. + */ + @JsonProperty(value = "properties.threatIntelMode") + private AzureFirewallThreatIntelMode threatIntelMode; + + /** + * The virtualHub to which the firewall belongs. + */ + @JsonProperty(value = "properties.virtualHub") + private SubResource virtualHub; + + /** + * The firewallPolicy associated with this azure firewall. + */ + @JsonProperty(value = "properties.firewallPolicy") + private SubResource firewallPolicy; + + /** + * IP addresses associated with AzureFirewall. + */ + @JsonProperty(value = "properties.hubIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + private HubIPAddresses hubIpAddresses; + + /** + * The Azure Firewall Resource SKU. + */ + @JsonProperty(value = "properties.sku") + private AzureFirewallSku sku; + + /** + * The additional properties used to further config this azure firewall. + */ + @JsonProperty(value = "properties.additionalProperties") + private Map additionalProperties; + + /** + * A list of availability zones denoting where the resource needs to come + * from. + */ + @JsonProperty(value = "zones") + private List zones; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get collection of application rule collections used by Azure Firewall. + * + * @return the applicationRuleCollections value + */ + public List applicationRuleCollections() { + return this.applicationRuleCollections; + } + + /** + * Set collection of application rule collections used by Azure Firewall. + * + * @param applicationRuleCollections the applicationRuleCollections value to set + * @return the AzureFirewallInner object itself. + */ + public AzureFirewallInner withApplicationRuleCollections(List applicationRuleCollections) { + this.applicationRuleCollections = applicationRuleCollections; + return this; + } + + /** + * Get collection of NAT rule collections used by Azure Firewall. + * + * @return the natRuleCollections value + */ + public List natRuleCollections() { + return this.natRuleCollections; + } + + /** + * Set collection of NAT rule collections used by Azure Firewall. + * + * @param natRuleCollections the natRuleCollections value to set + * @return the AzureFirewallInner object itself. + */ + public AzureFirewallInner withNatRuleCollections(List natRuleCollections) { + this.natRuleCollections = natRuleCollections; + return this; + } + + /** + * Get collection of network rule collections used by Azure Firewall. + * + * @return the networkRuleCollections value + */ + public List networkRuleCollections() { + return this.networkRuleCollections; + } + + /** + * Set collection of network rule collections used by Azure Firewall. + * + * @param networkRuleCollections the networkRuleCollections value to set + * @return the AzureFirewallInner object itself. + */ + public AzureFirewallInner withNetworkRuleCollections(List networkRuleCollections) { + this.networkRuleCollections = networkRuleCollections; + return this; + } + + /** + * Get iP configuration of the Azure Firewall resource. + * + * @return the ipConfigurations value + */ + public List ipConfigurations() { + return this.ipConfigurations; + } + + /** + * Set iP configuration of the Azure Firewall resource. + * + * @param ipConfigurations the ipConfigurations value to set + * @return the AzureFirewallInner object itself. + */ + public AzureFirewallInner withIpConfigurations(List ipConfigurations) { + this.ipConfigurations = ipConfigurations; + return this; + } + + /** + * Get the provisioning state of the Azure firewall resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the operation mode for Threat Intelligence. Possible values include: 'Alert', 'Deny', 'Off'. + * + * @return the threatIntelMode value + */ + public AzureFirewallThreatIntelMode threatIntelMode() { + return this.threatIntelMode; + } + + /** + * Set the operation mode for Threat Intelligence. Possible values include: 'Alert', 'Deny', 'Off'. + * + * @param threatIntelMode the threatIntelMode value to set + * @return the AzureFirewallInner object itself. + */ + public AzureFirewallInner withThreatIntelMode(AzureFirewallThreatIntelMode threatIntelMode) { + this.threatIntelMode = threatIntelMode; + return this; + } + + /** + * Get the virtualHub to which the firewall belongs. + * + * @return the virtualHub value + */ + public SubResource virtualHub() { + return this.virtualHub; + } + + /** + * Set the virtualHub to which the firewall belongs. + * + * @param virtualHub the virtualHub value to set + * @return the AzureFirewallInner object itself. + */ + public AzureFirewallInner withVirtualHub(SubResource virtualHub) { + this.virtualHub = virtualHub; + return this; + } + + /** + * Get the firewallPolicy associated with this azure firewall. + * + * @return the firewallPolicy value + */ + public SubResource firewallPolicy() { + return this.firewallPolicy; + } + + /** + * Set the firewallPolicy associated with this azure firewall. + * + * @param firewallPolicy the firewallPolicy value to set + * @return the AzureFirewallInner object itself. + */ + public AzureFirewallInner withFirewallPolicy(SubResource firewallPolicy) { + this.firewallPolicy = firewallPolicy; + return this; + } + + /** + * Get iP addresses associated with AzureFirewall. + * + * @return the hubIpAddresses value + */ + public HubIPAddresses hubIpAddresses() { + return this.hubIpAddresses; + } + + /** + * Get the Azure Firewall Resource SKU. + * + * @return the sku value + */ + public AzureFirewallSku sku() { + return this.sku; + } + + /** + * Set the Azure Firewall Resource SKU. + * + * @param sku the sku value to set + * @return the AzureFirewallInner object itself. + */ + public AzureFirewallInner withSku(AzureFirewallSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the additional properties used to further config this azure firewall. + * + * @return the additionalProperties value + */ + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additional properties used to further config this azure firewall. + * + * @param additionalProperties the additionalProperties value to set + * @return the AzureFirewallInner object itself. + */ + public AzureFirewallInner withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + /** + * Get a list of availability zones denoting where the resource needs to come from. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set a list of availability zones denoting where the resource needs to come from. + * + * @param zones the zones value to set + * @return the AzureFirewallInner object itself. + */ + public AzureFirewallInner withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the AzureFirewallInner object itself. + */ + public AzureFirewallInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallsImpl.java new file mode 100644 index 000000000000..f3765cbaea41 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallsImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewalls; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewall; +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; + +class AzureFirewallsImpl extends GroupableResourcesCoreImpl implements AzureFirewalls { + protected AzureFirewallsImpl(NetworkManager manager) { + super(manager.inner().azureFirewalls(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + AzureFirewallsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + AzureFirewallsInner 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) { + AzureFirewallsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + AzureFirewallsInner 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 AzureFirewall call(AzureFirewallInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + AzureFirewallsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + AzureFirewallsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AzureFirewall call(AzureFirewallInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public AzureFirewallImpl define(String name) { + return wrapModel(name); + } + + @Override + protected AzureFirewallImpl wrapModel(AzureFirewallInner inner) { + return new AzureFirewallImpl(inner.name(), inner, manager()); + } + + @Override + protected AzureFirewallImpl wrapModel(String name) { + return new AzureFirewallImpl(name, new AzureFirewallInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallsInner.java new file mode 100644 index 000000000000..342e7ad49138 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallsInner.java @@ -0,0 +1,1126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 AzureFirewalls. + */ +public class AzureFirewallsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private AzureFirewallsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of AzureFirewallsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AzureFirewallsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(AzureFirewallsService.class); + this.client = client; + } + + /** + * The interface defining all the services for AzureFirewalls to be + * used by Retrofit to perform actually REST calls. + */ + interface AzureFirewallsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.AzureFirewalls delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("azureFirewallName") String azureFirewallName, @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.network.v2019_09_01.AzureFirewalls beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("azureFirewallName") String azureFirewallName, @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.network.v2019_09_01.AzureFirewalls getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("azureFirewallName") String azureFirewallName, @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.network.v2019_09_01.AzureFirewalls createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("azureFirewallName") String azureFirewallName, @Path("subscriptionId") String subscriptionId, @Body AzureFirewallInner 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.network.v2019_09_01.AzureFirewalls beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("azureFirewallName") String azureFirewallName, @Path("subscriptionId") String subscriptionId, @Body AzureFirewallInner 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.network.v2019_09_01.AzureFirewalls updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("azureFirewallName") String azureFirewallName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.AzureFirewalls listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.AzureFirewalls list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls") + Observable> list(@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.network.v2019_09_01.AzureFirewalls 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.network.v2019_09_01.AzureFirewalls listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 azureFirewallName) { + deleteWithServiceResponseAsync(resourceGroupName, azureFirewallName).toBlocking().last().body(); + } + + /** + * Deletes the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @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 azureFirewallName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, azureFirewallName), serviceCallback); + } + + /** + * Deletes the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String azureFirewallName) { + return deleteWithServiceResponseAsync(resourceGroupName, azureFirewallName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String azureFirewallName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (azureFirewallName == null) { + throw new IllegalArgumentException("Parameter azureFirewallName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, azureFirewallName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 azureFirewallName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, azureFirewallName).toBlocking().single().body(); + } + + /** + * Deletes the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @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 azureFirewallName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, azureFirewallName), serviceCallback); + } + + /** + * Deletes the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String azureFirewallName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, azureFirewallName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String azureFirewallName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (azureFirewallName == null) { + throw new IllegalArgumentException("Parameter azureFirewallName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, azureFirewallName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 AzureFirewallInner object if successful. + */ + public AzureFirewallInner getByResourceGroup(String resourceGroupName, String azureFirewallName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, azureFirewallName).toBlocking().single().body(); + } + + /** + * Gets the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @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 azureFirewallName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, azureFirewallName), serviceCallback); + } + + /** + * Gets the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureFirewallInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String azureFirewallName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, azureFirewallName).map(new Func1, AzureFirewallInner>() { + @Override + public AzureFirewallInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureFirewallInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String azureFirewallName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (azureFirewallName == null) { + throw new IllegalArgumentException("Parameter azureFirewallName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, azureFirewallName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param parameters Parameters supplied to the create or update Azure Firewall 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 AzureFirewallInner object if successful. + */ + public AzureFirewallInner createOrUpdate(String resourceGroupName, String azureFirewallName, AzureFirewallInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, azureFirewallName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param parameters Parameters supplied to the create or update Azure Firewall 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 createOrUpdateAsync(String resourceGroupName, String azureFirewallName, AzureFirewallInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, azureFirewallName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param parameters Parameters supplied to the create or update Azure Firewall operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String azureFirewallName, AzureFirewallInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, azureFirewallName, parameters).map(new Func1, AzureFirewallInner>() { + @Override + public AzureFirewallInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param parameters Parameters supplied to the create or update Azure Firewall operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String azureFirewallName, AzureFirewallInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (azureFirewallName == null) { + throw new IllegalArgumentException("Parameter azureFirewallName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, azureFirewallName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param parameters Parameters supplied to the create or update Azure Firewall 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 AzureFirewallInner object if successful. + */ + public AzureFirewallInner beginCreateOrUpdate(String resourceGroupName, String azureFirewallName, AzureFirewallInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, azureFirewallName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param parameters Parameters supplied to the create or update Azure Firewall 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 beginCreateOrUpdateAsync(String resourceGroupName, String azureFirewallName, AzureFirewallInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, azureFirewallName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param parameters Parameters supplied to the create or update Azure Firewall operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureFirewallInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String azureFirewallName, AzureFirewallInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, azureFirewallName, parameters).map(new Func1, AzureFirewallInner>() { + @Override + public AzureFirewallInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified Azure Firewall. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param parameters Parameters supplied to the create or update Azure Firewall operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureFirewallInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String azureFirewallName, AzureFirewallInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (azureFirewallName == null) { + throw new IllegalArgumentException("Parameter azureFirewallName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, azureFirewallName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 AzureFirewallInner object if successful. + */ + public AzureFirewallInner updateTags(String resourceGroupName, String azureFirewallName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName).toBlocking().single().body(); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @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 updateTagsAsync(String resourceGroupName, String azureFirewallName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName), serviceCallback); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureFirewallInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String azureFirewallName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName).map(new Func1, AzureFirewallInner>() { + @Override + public AzureFirewallInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureFirewallInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String azureFirewallName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (azureFirewallName == null) { + throw new IllegalArgumentException("Parameter azureFirewallName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, azureFirewallName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 AzureFirewallInner object if successful. + */ + public AzureFirewallInner updateTags(String resourceGroupName, String azureFirewallName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName, tags).toBlocking().single().body(); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String azureFirewallName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName, tags), serviceCallback); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureFirewallInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String azureFirewallName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName, tags).map(new Func1, AzureFirewallInner>() { + @Override + public AzureFirewallInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureFirewallInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String azureFirewallName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (azureFirewallName == null) { + throw new IllegalArgumentException("Parameter azureFirewallName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, azureFirewallName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all Azure Firewalls in a resource group. + * + * @param resourceGroupName The name of the 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<AzureFirewallInner> 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 all Azure Firewalls in a resource group. + * + * @param resourceGroupName The name of the 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 all Azure Firewalls in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AzureFirewallInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Azure Firewalls in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AzureFirewallInner> 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 all Azure Firewalls in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AzureFirewallInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all the Azure Firewalls in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<AzureFirewallInner> 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 all the Azure Firewalls in a subscription. + * + * @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 all the Azure Firewalls in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AzureFirewallInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the Azure Firewalls in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AzureFirewallInner> 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 all the Azure Firewalls in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AzureFirewallInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all Azure Firewalls in a resource group. + * + * @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<AzureFirewallInner> 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 all Azure Firewalls in a resource group. + * + * @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 all Azure Firewalls in a resource group. + * + * @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<AzureFirewallInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Azure Firewalls in a resource group. + * + * @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<AzureFirewallInner> 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 all Azure Firewalls in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AzureFirewallInner> 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 all the Azure Firewalls in a subscription. + * + * @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<AzureFirewallInner> 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 all the Azure Firewalls in a subscription. + * + * @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 all the Azure Firewalls in a subscription. + * + * @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<AzureFirewallInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the Azure Firewalls in a subscription. + * + * @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<AzureFirewallInner> 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 all the Azure Firewalls in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AzureFirewallInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureReachabilityReportImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureReachabilityReportImpl.java new file mode 100644 index 000000000000..7f886c8d11ef --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureReachabilityReportImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.AzureReachabilityReport; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.AzureReachabilityReportLocation; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.AzureReachabilityReportItem; + +class AzureReachabilityReportImpl extends WrapperImpl implements AzureReachabilityReport { + private final NetworkManager manager; + AzureReachabilityReportImpl(AzureReachabilityReportInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String aggregationLevel() { + return this.inner().aggregationLevel(); + } + + @Override + public AzureReachabilityReportLocation providerLocation() { + return this.inner().providerLocation(); + } + + @Override + public List reachabilityReport() { + return this.inner().reachabilityReport(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureReachabilityReportInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureReachabilityReportInner.java new file mode 100644 index 000000000000..0b187d625f11 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureReachabilityReportInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.AzureReachabilityReportLocation; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.AzureReachabilityReportItem; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure reachability report details. + */ +public class AzureReachabilityReportInner { + /** + * The aggregation level of Azure reachability report. Can be Country, + * State or City. + */ + @JsonProperty(value = "aggregationLevel", required = true) + private String aggregationLevel; + + /** + * Parameters that define a geographic location. + */ + @JsonProperty(value = "providerLocation", required = true) + private AzureReachabilityReportLocation providerLocation; + + /** + * List of Azure reachability report items. + */ + @JsonProperty(value = "reachabilityReport", required = true) + private List reachabilityReport; + + /** + * Get the aggregation level of Azure reachability report. Can be Country, State or City. + * + * @return the aggregationLevel value + */ + public String aggregationLevel() { + return this.aggregationLevel; + } + + /** + * Set the aggregation level of Azure reachability report. Can be Country, State or City. + * + * @param aggregationLevel the aggregationLevel value to set + * @return the AzureReachabilityReportInner object itself. + */ + public AzureReachabilityReportInner withAggregationLevel(String aggregationLevel) { + this.aggregationLevel = aggregationLevel; + return this; + } + + /** + * Get parameters that define a geographic location. + * + * @return the providerLocation value + */ + public AzureReachabilityReportLocation providerLocation() { + return this.providerLocation; + } + + /** + * Set parameters that define a geographic location. + * + * @param providerLocation the providerLocation value to set + * @return the AzureReachabilityReportInner object itself. + */ + public AzureReachabilityReportInner withProviderLocation(AzureReachabilityReportLocation providerLocation) { + this.providerLocation = providerLocation; + return this; + } + + /** + * Get list of Azure reachability report items. + * + * @return the reachabilityReport value + */ + public List reachabilityReport() { + return this.reachabilityReport; + } + + /** + * Set list of Azure reachability report items. + * + * @param reachabilityReport the reachabilityReport value to set + * @return the AzureReachabilityReportInner object itself. + */ + public AzureReachabilityReportInner withReachabilityReport(List reachabilityReport) { + this.reachabilityReport = reachabilityReport; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BackendAddressPoolImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BackendAddressPoolImpl.java new file mode 100644 index 000000000000..92c90846cdba --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BackendAddressPoolImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.BackendAddressPool; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.VirtualMachineScaleSetNetworkInterfaceIPConfiguration; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class BackendAddressPoolImpl extends IndexableRefreshableWrapperImpl implements BackendAddressPool { + private final NetworkManager manager; + private String resourceGroupName; + private String loadBalancerName; + private String backendAddressPoolName; + + BackendAddressPoolImpl(BackendAddressPoolInner inner, NetworkManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.loadBalancerName = IdParsingUtils.getValueFromIdByName(inner.id(), "loadBalancers"); + this.backendAddressPoolName = IdParsingUtils.getValueFromIdByName(inner.id(), "backendAddressPools"); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + LoadBalancerBackendAddressPoolsInner client = this.manager().inner().loadBalancerBackendAddressPools(); + return client.getAsync(this.resourceGroupName, this.loadBalancerName, this.backendAddressPoolName); + } + + + + @Override + public List backendIPConfigurations() { + List lst = new ArrayList(); + if (this.inner().backendIPConfigurations() != null) { + for (NetworkInterfaceIPConfigurationInner inner : this.inner().backendIPConfigurations()) { + lst.add( new VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public List loadBalancingRules() { + return this.inner().loadBalancingRules(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public SubResource outboundRule() { + return this.inner().outboundRule(); + } + + @Override + public List outboundRules() { + return this.inner().outboundRules(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BackendAddressPoolInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BackendAddressPoolInner.java new file mode 100644 index 000000000000..82f6d4c63961 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BackendAddressPoolInner.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Pool of backend IP addresses. + */ +@JsonFlatten +public class BackendAddressPoolInner extends SubResource { + /** + * An array of references to IP addresses defined in network interfaces. + */ + @JsonProperty(value = "properties.backendIPConfigurations", access = JsonProperty.Access.WRITE_ONLY) + private List backendIPConfigurations; + + /** + * An array of references to load balancing rules that use this backend + * address pool. + */ + @JsonProperty(value = "properties.loadBalancingRules", access = JsonProperty.Access.WRITE_ONLY) + private List loadBalancingRules; + + /** + * A reference to an outbound rule that uses this backend address pool. + */ + @JsonProperty(value = "properties.outboundRule", access = JsonProperty.Access.WRITE_ONLY) + private SubResource outboundRule; + + /** + * An array of references to outbound rules that use this backend address + * pool. + */ + @JsonProperty(value = "properties.outboundRules", access = JsonProperty.Access.WRITE_ONLY) + private List outboundRules; + + /** + * The provisioning state of the backend address pool resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within the set of backend + * address pools used by the load balancer. This name can be used to access + * the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get an array of references to IP addresses defined in network interfaces. + * + * @return the backendIPConfigurations value + */ + public List backendIPConfigurations() { + return this.backendIPConfigurations; + } + + /** + * Get an array of references to load balancing rules that use this backend address pool. + * + * @return the loadBalancingRules value + */ + public List loadBalancingRules() { + return this.loadBalancingRules; + } + + /** + * Get a reference to an outbound rule that uses this backend address pool. + * + * @return the outboundRule value + */ + public SubResource outboundRule() { + return this.outboundRule; + } + + /** + * Get an array of references to outbound rules that use this backend address pool. + * + * @return the outboundRules value + */ + public List outboundRules() { + return this.outboundRules; + } + + /** + * Get the provisioning state of the backend address pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within the set of backend address pools used by the load balancer. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within the set of backend address pools used by the load balancer. This name can be used to access the resource. + * + * @param name the name value to set + * @return the BackendAddressPoolInner object itself. + */ + public BackendAddressPoolInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostImpl.java new file mode 100644 index 000000000000..4cac8f51433a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.BastionHost; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.BastionHostIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class BastionHostImpl extends GroupableResourceCoreImpl implements BastionHost, BastionHost.Definition, BastionHost.Update { + BastionHostImpl(String name, BastionHostInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + BastionHostsInner client = this.manager().inner().bastionHosts(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + BastionHostsInner client = this.manager().inner().bastionHosts(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + BastionHostsInner client = this.manager().inner().bastionHosts(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String dnsName() { + return this.inner().dnsName(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List ipConfigurations() { + return this.inner().ipConfigurations(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public BastionHostImpl withDnsName(String dnsName) { + this.inner().withDnsName(dnsName); + return this; + } + + @Override + public BastionHostImpl withIpConfigurations(List ipConfigurations) { + this.inner().withIpConfigurations(ipConfigurations); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostInner.java new file mode 100644 index 000000000000..91e3e1448aa3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostInner.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.BastionHostIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Bastion Host resource. + */ +@JsonFlatten +@SkipParentValidation +public class BastionHostInner extends Resource { + /** + * IP configuration of the Bastion Host resource. + */ + @JsonProperty(value = "properties.ipConfigurations") + private List ipConfigurations; + + /** + * FQDN for the endpoint on which bastion host is accessible. + */ + @JsonProperty(value = "properties.dnsName") + private String dnsName; + + /** + * The provisioning state of the bastion host resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get iP configuration of the Bastion Host resource. + * + * @return the ipConfigurations value + */ + public List ipConfigurations() { + return this.ipConfigurations; + } + + /** + * Set iP configuration of the Bastion Host resource. + * + * @param ipConfigurations the ipConfigurations value to set + * @return the BastionHostInner object itself. + */ + public BastionHostInner withIpConfigurations(List ipConfigurations) { + this.ipConfigurations = ipConfigurations; + return this; + } + + /** + * Get fQDN for the endpoint on which bastion host is accessible. + * + * @return the dnsName value + */ + public String dnsName() { + return this.dnsName; + } + + /** + * Set fQDN for the endpoint on which bastion host is accessible. + * + * @param dnsName the dnsName value to set + * @return the BastionHostInner object itself. + */ + public BastionHostInner withDnsName(String dnsName) { + this.dnsName = dnsName; + return this; + } + + /** + * Get the provisioning state of the bastion host resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the BastionHostInner object itself. + */ + public BastionHostInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostsImpl.java new file mode 100644 index 000000000000..ade41c409304 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostsImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.BastionHosts; +import com.microsoft.azure.management.network.v2019_09_01.BastionHost; +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; + +class BastionHostsImpl extends GroupableResourcesCoreImpl implements BastionHosts { + protected BastionHostsImpl(NetworkManager manager) { + super(manager.inner().bastionHosts(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + BastionHostsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + BastionHostsInner 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) { + BastionHostsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + BastionHostsInner 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 BastionHost call(BastionHostInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + BastionHostsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + BastionHostsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public BastionHost call(BastionHostInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public BastionHostImpl define(String name) { + return wrapModel(name); + } + + @Override + protected BastionHostImpl wrapModel(BastionHostInner inner) { + return new BastionHostImpl(inner.name(), inner, manager()); + } + + @Override + protected BastionHostImpl wrapModel(String name) { + return new BastionHostImpl(name, new BastionHostInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostsInner.java new file mode 100644 index 000000000000..4f6eecafc600 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionHostsInner.java @@ -0,0 +1,948 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 BastionHosts. + */ +public class BastionHostsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private BastionHostsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of BastionHostsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public BastionHostsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(BastionHostsService.class); + this.client = client; + } + + /** + * The interface defining all the services for BastionHosts to be + * used by Retrofit to perform actually REST calls. + */ + interface BastionHostsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.BastionHosts delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("bastionHostName") String bastionHostName, @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.network.v2019_09_01.BastionHosts beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("bastionHostName") String bastionHostName, @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.network.v2019_09_01.BastionHosts getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("bastionHostName") String bastionHostName, @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.network.v2019_09_01.BastionHosts createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("bastionHostName") String bastionHostName, @Path("subscriptionId") String subscriptionId, @Body BastionHostInner 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.network.v2019_09_01.BastionHosts beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("bastionHostName") String bastionHostName, @Path("subscriptionId") String subscriptionId, @Body BastionHostInner 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.network.v2019_09_01.BastionHosts list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts") + Observable> list(@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.network.v2019_09_01.BastionHosts listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.BastionHosts 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.network.v2019_09_01.BastionHosts listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 bastionHostName) { + deleteWithServiceResponseAsync(resourceGroupName, bastionHostName).toBlocking().last().body(); + } + + /** + * Deletes the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @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 bastionHostName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, bastionHostName), serviceCallback); + } + + /** + * Deletes the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String bastionHostName) { + return deleteWithServiceResponseAsync(resourceGroupName, bastionHostName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String bastionHostName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, bastionHostName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 bastionHostName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, bastionHostName).toBlocking().single().body(); + } + + /** + * Deletes the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @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 bastionHostName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, bastionHostName), serviceCallback); + } + + /** + * Deletes the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String bastionHostName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, bastionHostName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String bastionHostName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, bastionHostName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 BastionHostInner object if successful. + */ + public BastionHostInner getByResourceGroup(String resourceGroupName, String bastionHostName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, bastionHostName).toBlocking().single().body(); + } + + /** + * Gets the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @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 bastionHostName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, bastionHostName), serviceCallback); + } + + /** + * Gets the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BastionHostInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String bastionHostName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, bastionHostName).map(new Func1, BastionHostInner>() { + @Override + public BastionHostInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BastionHostInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String bastionHostName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, bastionHostName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param parameters Parameters supplied to the create or update Bastion Host 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 BastionHostInner object if successful. + */ + public BastionHostInner createOrUpdate(String resourceGroupName, String bastionHostName, BastionHostInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, bastionHostName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param parameters Parameters supplied to the create or update Bastion Host 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 createOrUpdateAsync(String resourceGroupName, String bastionHostName, BastionHostInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, bastionHostName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param parameters Parameters supplied to the create or update Bastion Host operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String bastionHostName, BastionHostInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, bastionHostName, parameters).map(new Func1, BastionHostInner>() { + @Override + public BastionHostInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param parameters Parameters supplied to the create or update Bastion Host operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String bastionHostName, BastionHostInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, bastionHostName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param parameters Parameters supplied to the create or update Bastion Host 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 BastionHostInner object if successful. + */ + public BastionHostInner beginCreateOrUpdate(String resourceGroupName, String bastionHostName, BastionHostInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, bastionHostName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param parameters Parameters supplied to the create or update Bastion Host 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 beginCreateOrUpdateAsync(String resourceGroupName, String bastionHostName, BastionHostInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, bastionHostName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param parameters Parameters supplied to the create or update Bastion Host operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BastionHostInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String bastionHostName, BastionHostInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, bastionHostName, parameters).map(new Func1, BastionHostInner>() { + @Override + public BastionHostInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified Bastion Host. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param parameters Parameters supplied to the create or update Bastion Host operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BastionHostInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String bastionHostName, BastionHostInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, bastionHostName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 all Bastion Hosts in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<BastionHostInner> 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 all Bastion Hosts in a subscription. + * + * @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 all Bastion Hosts in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionHostInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Bastion Hosts in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionHostInner> 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 all Bastion Hosts in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionHostInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all Bastion Hosts in a resource group. + * + * @param resourceGroupName The name of the 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<BastionHostInner> 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 all Bastion Hosts in a resource group. + * + * @param resourceGroupName The name of the 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 all Bastion Hosts in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionHostInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Bastion Hosts in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionHostInner> 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 all Bastion Hosts in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionHostInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all Bastion Hosts in a subscription. + * + * @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<BastionHostInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all Bastion Hosts in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all Bastion Hosts in a subscription. + * + * @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<BastionHostInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Bastion Hosts in a subscription. + * + * @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<BastionHostInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all Bastion Hosts in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionHostInner> 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 all Bastion Hosts in a resource group. + * + * @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<BastionHostInner> 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 all Bastion Hosts in a resource group. + * + * @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 all Bastion Hosts in a resource group. + * + * @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<BastionHostInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Bastion Hosts in a resource group. + * + * @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<BastionHostInner> 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 all Bastion Hosts in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionHostInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpPeerStatusListResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpPeerStatusListResultImpl.java new file mode 100644 index 000000000000..49eeef271cb8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpPeerStatusListResultImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.BgpPeerStatusListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.BgpPeerStatus; + +class BgpPeerStatusListResultImpl extends WrapperImpl implements BgpPeerStatusListResult { + private final NetworkManager manager; + BgpPeerStatusListResultImpl(BgpPeerStatusListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpPeerStatusListResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpPeerStatusListResultInner.java new file mode 100644 index 000000000000..6d53a2446941 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpPeerStatusListResultInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.BgpPeerStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for list BGP peer status API service call. + */ +public class BgpPeerStatusListResultInner { + /** + * List of BGP peers. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get list of BGP peers. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set list of BGP peers. + * + * @param value the value value to set + * @return the BgpPeerStatusListResultInner object itself. + */ + public BgpPeerStatusListResultInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunitiesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunitiesImpl.java new file mode 100644 index 000000000000..c0b0de767b72 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunitiesImpl.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.BgpServiceCommunities; +import com.microsoft.azure.management.network.v2019_09_01.BgpServiceCommunity; +import rx.Observable; +import rx.Completable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; + +class BgpServiceCommunitiesImpl extends GroupableResourcesCoreImpl implements BgpServiceCommunities { + protected BgpServiceCommunitiesImpl(NetworkManager manager) { + super(manager.inner().bgpServiceCommunities(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + return null; // NOP Retrieve by resource group not supported + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + BgpServiceCommunitiesInner client = this.inner(); + return Completable.error(new Throwable("Delete by RG not supported for this resource")); // NOP Delete by RG not supported + } + + @Override + public PagedList list() { + BgpServiceCommunitiesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + BgpServiceCommunitiesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public BgpServiceCommunity call(BgpServiceCommunityInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + protected BgpServiceCommunityImpl wrapModel(BgpServiceCommunityInner inner) { + return new BgpServiceCommunityImpl(inner.name(), inner, manager()); + } + + @Override + protected BgpServiceCommunityImpl wrapModel(String name) { + return null; // Model is not creatable + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunitiesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunitiesInner.java new file mode 100644 index 000000000000..16f41c9f1449 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunitiesInner.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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.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 BgpServiceCommunities. + */ +public class BgpServiceCommunitiesInner { + /** The Retrofit service to perform REST calls. */ + private BgpServiceCommunitiesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of BgpServiceCommunitiesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public BgpServiceCommunitiesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(BgpServiceCommunitiesService.class); + this.client = client; + } + + /** + * The interface defining all the services for BgpServiceCommunities to be + * used by Retrofit to perform actually REST calls. + */ + interface BgpServiceCommunitiesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.BgpServiceCommunities list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities") + Observable> list(@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.network.v2019_09_01.BgpServiceCommunities listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all the available bgp service communities. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<BgpServiceCommunityInner> 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 all the available bgp service communities. + * + * @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 all the available bgp service communities. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BgpServiceCommunityInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the available bgp service communities. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BgpServiceCommunityInner> 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 all the available bgp service communities. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BgpServiceCommunityInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all the available bgp service communities. + * + * @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<BgpServiceCommunityInner> 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 all the available bgp service communities. + * + * @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 all the available bgp service communities. + * + * @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<BgpServiceCommunityInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the available bgp service communities. + * + * @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<BgpServiceCommunityInner> 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 all the available bgp service communities. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BgpServiceCommunityInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunityImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunityImpl.java new file mode 100644 index 000000000000..ccf05714b9dc --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunityImpl.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.BgpServiceCommunity; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.BGPCommunity; + +class BgpServiceCommunityImpl extends GroupableResourceCoreImpl implements BgpServiceCommunity { + BgpServiceCommunityImpl(String name, BgpServiceCommunityInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + BgpServiceCommunitiesInner client = this.manager().inner().bgpServiceCommunities(); + return null; // NOP createResourceAsync implementation as create is not supported + } + + @Override + public Observable updateResourceAsync() { + BgpServiceCommunitiesInner client = this.manager().inner().bgpServiceCommunities(); + return null; // NOP updateResourceAsync implementation as update is not supported + } + + @Override + protected Observable getInnerAsync() { + BgpServiceCommunitiesInner client = this.manager().inner().bgpServiceCommunities(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + + + @Override + public List bgpCommunities() { + return this.inner().bgpCommunities(); + } + + @Override + public String serviceName() { + return this.inner().serviceName(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunityInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunityInner.java new file mode 100644 index 000000000000..5cee5bd6874b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BgpServiceCommunityInner.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.BGPCommunity; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Service Community Properties. + */ +@JsonFlatten +@SkipParentValidation +public class BgpServiceCommunityInner extends Resource { + /** + * The name of the bgp community. e.g. Skype. + */ + @JsonProperty(value = "properties.serviceName") + private String serviceName; + + /** + * A list of bgp communities. + */ + @JsonProperty(value = "properties.bgpCommunities") + private List bgpCommunities; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the name of the bgp community. e.g. Skype. + * + * @return the serviceName value + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set the name of the bgp community. e.g. Skype. + * + * @param serviceName the serviceName value to set + * @return the BgpServiceCommunityInner object itself. + */ + public BgpServiceCommunityInner withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get a list of bgp communities. + * + * @return the bgpCommunities value + */ + public List bgpCommunities() { + return this.bgpCommunities; + } + + /** + * Set a list of bgp communities. + * + * @param bgpCommunities the bgpCommunities value to set + * @return the BgpServiceCommunityInner object itself. + */ + public BgpServiceCommunityInner withBgpCommunities(List bgpCommunities) { + this.bgpCommunities = bgpCommunities; + return this; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the BgpServiceCommunityInner object itself. + */ + public BgpServiceCommunityInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorInner.java new file mode 100644 index 000000000000..27120c5107a6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorInner.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.Map; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitorSource; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitorDestination; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Parameters that define the operation to create a connection monitor. + */ +@JsonFlatten +public class ConnectionMonitorInner { + /** + * Connection monitor location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Connection monitor tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Describes the source of connection monitor. + */ + @JsonProperty(value = "properties.source", required = true) + private ConnectionMonitorSource source; + + /** + * Describes the destination of connection monitor. + */ + @JsonProperty(value = "properties.destination", required = true) + private ConnectionMonitorDestination destination; + + /** + * Determines if the connection monitor will start automatically once + * created. + */ + @JsonProperty(value = "properties.autoStart") + private Boolean autoStart; + + /** + * Monitoring interval in seconds. + */ + @JsonProperty(value = "properties.monitoringIntervalInSeconds") + private Integer monitoringIntervalInSeconds; + + /** + * Get connection monitor location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set connection monitor location. + * + * @param location the location value to set + * @return the ConnectionMonitorInner object itself. + */ + public ConnectionMonitorInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get connection monitor tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set connection monitor tags. + * + * @param tags the tags value to set + * @return the ConnectionMonitorInner object itself. + */ + public ConnectionMonitorInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get describes the source of connection monitor. + * + * @return the source value + */ + public ConnectionMonitorSource source() { + return this.source; + } + + /** + * Set describes the source of connection monitor. + * + * @param source the source value to set + * @return the ConnectionMonitorInner object itself. + */ + public ConnectionMonitorInner withSource(ConnectionMonitorSource source) { + this.source = source; + return this; + } + + /** + * Get describes the destination of connection monitor. + * + * @return the destination value + */ + public ConnectionMonitorDestination destination() { + return this.destination; + } + + /** + * Set describes the destination of connection monitor. + * + * @param destination the destination value to set + * @return the ConnectionMonitorInner object itself. + */ + public ConnectionMonitorInner withDestination(ConnectionMonitorDestination destination) { + this.destination = destination; + return this; + } + + /** + * Get determines if the connection monitor will start automatically once created. + * + * @return the autoStart value + */ + public Boolean autoStart() { + return this.autoStart; + } + + /** + * Set determines if the connection monitor will start automatically once created. + * + * @param autoStart the autoStart value to set + * @return the ConnectionMonitorInner object itself. + */ + public ConnectionMonitorInner withAutoStart(Boolean autoStart) { + this.autoStart = autoStart; + return this; + } + + /** + * Get monitoring interval in seconds. + * + * @return the monitoringIntervalInSeconds value + */ + public Integer monitoringIntervalInSeconds() { + return this.monitoringIntervalInSeconds; + } + + /** + * Set monitoring interval in seconds. + * + * @param monitoringIntervalInSeconds the monitoringIntervalInSeconds value to set + * @return the ConnectionMonitorInner object itself. + */ + public ConnectionMonitorInner withMonitoringIntervalInSeconds(Integer monitoringIntervalInSeconds) { + this.monitoringIntervalInSeconds = monitoringIntervalInSeconds; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorQueryResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorQueryResultImpl.java new file mode 100644 index 000000000000..9a1c62cc696b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorQueryResultImpl.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitorQueryResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitorSourceStatus; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionStateSnapshot; + +class ConnectionMonitorQueryResultImpl extends WrapperImpl implements ConnectionMonitorQueryResult { + private final NetworkManager manager; + ConnectionMonitorQueryResultImpl(ConnectionMonitorQueryResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public ConnectionMonitorSourceStatus sourceStatus() { + return this.inner().sourceStatus(); + } + + @Override + public List states() { + return this.inner().states(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorQueryResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorQueryResultInner.java new file mode 100644 index 000000000000..de1ab241356f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorQueryResultInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitorSourceStatus; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionStateSnapshot; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of connection states snapshots. + */ +public class ConnectionMonitorQueryResultInner { + /** + * Status of connection monitor source. Possible values include: 'Unknown', + * 'Active', 'Inactive'. + */ + @JsonProperty(value = "sourceStatus") + private ConnectionMonitorSourceStatus sourceStatus; + + /** + * Information about connection states. + */ + @JsonProperty(value = "states") + private List states; + + /** + * Get status of connection monitor source. Possible values include: 'Unknown', 'Active', 'Inactive'. + * + * @return the sourceStatus value + */ + public ConnectionMonitorSourceStatus sourceStatus() { + return this.sourceStatus; + } + + /** + * Set status of connection monitor source. Possible values include: 'Unknown', 'Active', 'Inactive'. + * + * @param sourceStatus the sourceStatus value to set + * @return the ConnectionMonitorQueryResultInner object itself. + */ + public ConnectionMonitorQueryResultInner withSourceStatus(ConnectionMonitorSourceStatus sourceStatus) { + this.sourceStatus = sourceStatus; + return this; + } + + /** + * Get information about connection states. + * + * @return the states value + */ + public List states() { + return this.states; + } + + /** + * Set information about connection states. + * + * @param states the states value to set + * @return the ConnectionMonitorQueryResultInner object itself. + */ + public ConnectionMonitorQueryResultInner withStates(List states) { + this.states = states; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorResultImpl.java new file mode 100644 index 000000000000..68c4da57ed4d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorResultImpl.java @@ -0,0 +1,206 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitorResult; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.Map; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitorSource; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitorDestination; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import org.joda.time.DateTime; +import rx.functions.Func1; + +class ConnectionMonitorResultImpl extends CreatableUpdatableImpl implements ConnectionMonitorResult, ConnectionMonitorResult.Definition, ConnectionMonitorResult.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String networkWatcherName; + private String connectionMonitorName; + private ConnectionMonitorInner createOrUpdateParameter; + + ConnectionMonitorResultImpl(String name, NetworkManager manager) { + super(name, new ConnectionMonitorResultInner()); + this.manager = manager; + // Set resource name + this.connectionMonitorName = name; + // + this.createOrUpdateParameter = new ConnectionMonitorInner(); + } + + ConnectionMonitorResultImpl(ConnectionMonitorResultInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.connectionMonitorName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.networkWatcherName = IdParsingUtils.getValueFromIdByName(inner.id(), "networkWatchers"); + this.connectionMonitorName = IdParsingUtils.getValueFromIdByName(inner.id(), "connectionMonitors"); + // + this.createOrUpdateParameter = new ConnectionMonitorInner(); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ConnectionMonitorsInner client = this.manager().inner().connectionMonitors(); + return client.createOrUpdateAsync(this.resourceGroupName, this.networkWatcherName, this.connectionMonitorName, this.createOrUpdateParameter) + .map(new Func1() { + @Override + public ConnectionMonitorResultInner call(ConnectionMonitorResultInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ConnectionMonitorsInner client = this.manager().inner().connectionMonitors(); + return client.createOrUpdateAsync(this.resourceGroupName, this.networkWatcherName, this.connectionMonitorName, this.createOrUpdateParameter) + .map(new Func1() { + @Override + public ConnectionMonitorResultInner call(ConnectionMonitorResultInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ConnectionMonitorsInner client = this.manager().inner().connectionMonitors(); + return client.getAsync(this.resourceGroupName, this.networkWatcherName, this.connectionMonitorName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createOrUpdateParameter = new ConnectionMonitorInner(); + } + + @Override + public Boolean autoStart() { + return this.inner().autoStart(); + } + + @Override + public ConnectionMonitorDestination destination() { + return this.inner().destination(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public Integer monitoringIntervalInSeconds() { + return this.inner().monitoringIntervalInSeconds(); + } + + @Override + public String monitoringStatus() { + return this.inner().monitoringStatus(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public ConnectionMonitorSource source() { + return this.inner().source(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ConnectionMonitorResultImpl withExistingNetworkWatcher(String resourceGroupName, String networkWatcherName) { + this.resourceGroupName = resourceGroupName; + this.networkWatcherName = networkWatcherName; + return this; + } + + @Override + public ConnectionMonitorResultImpl withDestination(ConnectionMonitorDestination destination) { + this.createOrUpdateParameter.withDestination(destination); + return this; + } + + @Override + public ConnectionMonitorResultImpl withSource(ConnectionMonitorSource source) { + this.createOrUpdateParameter.withSource(source); + return this; + } + + @Override + public ConnectionMonitorResultImpl withAutoStart(Boolean autoStart) { + this.createOrUpdateParameter.withAutoStart(autoStart); + return this; + } + + @Override + public ConnectionMonitorResultImpl withLocation(String location) { + this.createOrUpdateParameter.withLocation(location); + return this; + } + + @Override + public ConnectionMonitorResultImpl withMonitoringIntervalInSeconds(Integer monitoringIntervalInSeconds) { + this.createOrUpdateParameter.withMonitoringIntervalInSeconds(monitoringIntervalInSeconds); + return this; + } + + @Override + public ConnectionMonitorResultImpl withTags(Map tags) { + this.createOrUpdateParameter.withTags(tags); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorResultInner.java new file mode 100644 index 000000000000..38f3977f5a8b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorResultInner.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitorSource; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitorDestination; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Information about the connection monitor. + */ +@JsonFlatten +public class ConnectionMonitorResultInner extends Resource { + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * Describes the source of connection monitor. + */ + @JsonProperty(value = "properties.source", required = true) + private ConnectionMonitorSource source; + + /** + * Describes the destination of connection monitor. + */ + @JsonProperty(value = "properties.destination", required = true) + private ConnectionMonitorDestination destination; + + /** + * Determines if the connection monitor will start automatically once + * created. + */ + @JsonProperty(value = "properties.autoStart") + private Boolean autoStart; + + /** + * Monitoring interval in seconds. + */ + @JsonProperty(value = "properties.monitoringIntervalInSeconds") + private Integer monitoringIntervalInSeconds; + + /** + * The provisioning state of the connection monitor. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState") + private ProvisioningState provisioningState; + + /** + * The date and time when the connection monitor was started. + */ + @JsonProperty(value = "properties.startTime") + private DateTime startTime; + + /** + * The monitoring status of the connection monitor. + */ + @JsonProperty(value = "properties.monitoringStatus") + private String monitoringStatus; + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Set a unique read-only string that changes whenever the resource is updated. + * + * @param etag the etag value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get describes the source of connection monitor. + * + * @return the source value + */ + public ConnectionMonitorSource source() { + return this.source; + } + + /** + * Set describes the source of connection monitor. + * + * @param source the source value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withSource(ConnectionMonitorSource source) { + this.source = source; + return this; + } + + /** + * Get describes the destination of connection monitor. + * + * @return the destination value + */ + public ConnectionMonitorDestination destination() { + return this.destination; + } + + /** + * Set describes the destination of connection monitor. + * + * @param destination the destination value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withDestination(ConnectionMonitorDestination destination) { + this.destination = destination; + return this; + } + + /** + * Get determines if the connection monitor will start automatically once created. + * + * @return the autoStart value + */ + public Boolean autoStart() { + return this.autoStart; + } + + /** + * Set determines if the connection monitor will start automatically once created. + * + * @param autoStart the autoStart value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withAutoStart(Boolean autoStart) { + this.autoStart = autoStart; + return this; + } + + /** + * Get monitoring interval in seconds. + * + * @return the monitoringIntervalInSeconds value + */ + public Integer monitoringIntervalInSeconds() { + return this.monitoringIntervalInSeconds; + } + + /** + * Set monitoring interval in seconds. + * + * @param monitoringIntervalInSeconds the monitoringIntervalInSeconds value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withMonitoringIntervalInSeconds(Integer monitoringIntervalInSeconds) { + this.monitoringIntervalInSeconds = monitoringIntervalInSeconds; + return this; + } + + /** + * Get the provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @param provisioningState the provisioningState value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withProvisioningState(ProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the date and time when the connection monitor was started. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the date and time when the connection monitor was started. + * + * @param startTime the startTime value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the monitoring status of the connection monitor. + * + * @return the monitoringStatus value + */ + public String monitoringStatus() { + return this.monitoringStatus; + } + + /** + * Set the monitoring status of the connection monitor. + * + * @param monitoringStatus the monitoringStatus value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withMonitoringStatus(String monitoringStatus) { + this.monitoringStatus = monitoringStatus; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorsImpl.java new file mode 100644 index 000000000000..eedf9b734815 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorsImpl.java @@ -0,0 +1,110 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitors; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitorQueryResult; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitorResult; + +class ConnectionMonitorsImpl extends WrapperImpl implements ConnectionMonitors { + private final NetworkManager manager; + + ConnectionMonitorsImpl(NetworkManager manager) { + super(manager.inner().connectionMonitors()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public ConnectionMonitorResultImpl define(String name) { + return wrapModel(name); + } + + private ConnectionMonitorResultImpl wrapModel(ConnectionMonitorResultInner inner) { + return new ConnectionMonitorResultImpl(inner, manager()); + } + + private ConnectionMonitorResultImpl wrapModel(String name) { + return new ConnectionMonitorResultImpl(name, this.manager()); + } + + @Override + public Completable stopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + ConnectionMonitorsInner client = this.inner(); + return client.stopAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toCompletable(); + } + + @Override + public Completable startAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + ConnectionMonitorsInner client = this.inner(); + return client.startAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toCompletable(); + } + + @Override + public Observable queryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + ConnectionMonitorsInner client = this.inner(); + return client.queryAsync(resourceGroupName, networkWatcherName, connectionMonitorName) + .map(new Func1() { + @Override + public ConnectionMonitorQueryResult call(ConnectionMonitorQueryResultInner inner) { + return new ConnectionMonitorQueryResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync(String resourceGroupName, String networkWatcherName) { + ConnectionMonitorsInner client = this.inner(); + return client.listAsync(resourceGroupName, networkWatcherName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public ConnectionMonitorResult call(ConnectionMonitorResultInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + ConnectionMonitorsInner client = this.inner(); + return client.getAsync(resourceGroupName, networkWatcherName, connectionMonitorName) + .flatMap(new Func1>() { + @Override + public Observable call(ConnectionMonitorResultInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ConnectionMonitorResult)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + ConnectionMonitorsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorsInner.java new file mode 100644 index 000000000000..3372e2f131b8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorsInner.java @@ -0,0 +1,1326 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.network.v2019_09_01.ErrorResponseException; +import com.microsoft.azure.management.network.v2019_09_01.TagsObject; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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.Response; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in ConnectionMonitors. + */ +public class ConnectionMonitorsInner { + /** The Retrofit service to perform REST calls. */ + private ConnectionMonitorsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ConnectionMonitorsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ConnectionMonitorsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ConnectionMonitorsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ConnectionMonitors to be + * used by Retrofit to perform actually REST calls. + */ + interface ConnectionMonitorsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitors createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @Path("subscriptionId") String subscriptionId, @Body ConnectionMonitorInner 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.network.v2019_09_01.ConnectionMonitors beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @Path("subscriptionId") String subscriptionId, @Body ConnectionMonitorInner 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.network.v2019_09_01.ConnectionMonitors get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.v2019_09_01.ConnectionMonitors delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.v2019_09_01.ConnectionMonitors beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.v2019_09_01.ConnectionMonitors updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitors stop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop") + Observable> stop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.v2019_09_01.ConnectionMonitors beginStop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop") + Observable> beginStop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.v2019_09_01.ConnectionMonitors start" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start") + Observable> start(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.v2019_09_01.ConnectionMonitors beginStart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start") + Observable> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.v2019_09_01.ConnectionMonitors query" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query") + Observable> query(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.v2019_09_01.ConnectionMonitors beginQuery" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query") + Observable> beginQuery(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.v2019_09_01.ConnectionMonitors list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionMonitorResultInner object if successful. + */ + public ConnectionMonitorResultInner createOrUpdate(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).toBlocking().last().body(); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @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 networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters), serviceCallback); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).map(new Func1, ConnectionMonitorResultInner>() { + @Override + public ConnectionMonitorResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-06-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionMonitorResultInner object if successful. + */ + public ConnectionMonitorResultInner beginCreateOrUpdate(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).toBlocking().single().body(); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters), serviceCallback); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorResultInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).map(new Func1, ConnectionMonitorResultInner>() { + @Override + public ConnectionMonitorResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorResultInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-06-01"; + return service.beginCreateOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets a connection monitor by name. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionMonitorResultInner object if successful. + */ + public ConnectionMonitorResultInner get(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return getWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); + } + + /** + * Gets a connection monitor by name. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @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 networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Gets a connection monitor by name. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorResultInner object + */ + public Observable getAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return getWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, ConnectionMonitorResultInner>() { + @Override + public ConnectionMonitorResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a connection monitor by name. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorResultInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-06-01"; + return service.get(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException 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 networkWatcherName, String connectionMonitorName) { + deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @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 networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-06-01"; + Observable> observable = service.delete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException 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 networkWatcherName, String connectionMonitorName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @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 networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-06-01"; + return service.beginDelete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Update tags of the specified connection monitor. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionMonitorResultInner object if successful. + */ + public ConnectionMonitorResultInner updateTags(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); + } + + /** + * Update tags of the specified connection monitor. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param connectionMonitorName The name of the connection monitor. + * @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 updateTagsAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Update tags of the specified connection monitor. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorResultInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, ConnectionMonitorResultInner>() { + @Override + public ConnectionMonitorResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update tags of the specified connection monitor. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorResultInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-06-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Update tags of the specified connection monitor. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param connectionMonitorName The name of the connection monitor. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionMonitorResultInner object if successful. + */ + public ConnectionMonitorResultInner updateTags(String resourceGroupName, String networkWatcherName, String connectionMonitorName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, tags).toBlocking().single().body(); + } + + /** + * Update tags of the specified connection monitor. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param connectionMonitorName The name of the connection monitor. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, tags), serviceCallback); + } + + /** + * Update tags of the specified connection monitor. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param connectionMonitorName The name of the connection monitor. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorResultInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, tags).map(new Func1, ConnectionMonitorResultInner>() { + @Override + public ConnectionMonitorResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update tags of the specified connection monitor. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param connectionMonitorName The name of the connection monitor. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorResultInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-06-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void stop(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @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 stopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable stopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> stopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-06-01"; + Observable> observable = service.stop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginStop(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @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 beginStopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-06-01"; + return service.beginStop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStopDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void start(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + startWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @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 startAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable startAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return startWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> startWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-06-01"; + Observable> observable = service.start(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginStart(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + beginStartWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @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 beginStartAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStartAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return beginStartWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-06-01"; + return service.beginStart(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStartDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionMonitorQueryResultInner object if successful. + */ + public ConnectionMonitorQueryResultInner query(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return queryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @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 queryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(queryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable queryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return queryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, ConnectionMonitorQueryResultInner>() { + @Override + public ConnectionMonitorQueryResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> queryWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-06-01"; + Observable> observable = service.query(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionMonitorQueryResultInner object if successful. + */ + public ConnectionMonitorQueryResultInner beginQuery(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return beginQueryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @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 beginQueryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginQueryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorQueryResultInner object + */ + public Observable beginQueryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return beginQueryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, ConnectionMonitorQueryResultInner>() { + @Override + public ConnectionMonitorQueryResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorQueryResultInner object + */ + public Observable> beginQueryWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-06-01"; + return service.beginQuery(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginQueryDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginQueryDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all connection monitors for the specified Network Watcher. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<ConnectionMonitorResultInner> object if successful. + */ + public List list(String resourceGroupName, String networkWatcherName) { + return listWithServiceResponseAsync(resourceGroupName, networkWatcherName).toBlocking().single().body(); + } + + /** + * Lists all connection monitors for the specified Network Watcher. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @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(String resourceGroupName, String networkWatcherName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, networkWatcherName), serviceCallback); + } + + /** + * Lists all connection monitors for the specified Network Watcher. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ConnectionMonitorResultInner> object + */ + public Observable> listAsync(String resourceGroupName, String networkWatcherName) { + return listWithServiceResponseAsync(resourceGroupName, networkWatcherName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all connection monitors for the specified Network Watcher. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ConnectionMonitorResultInner> object + */ + public Observable>> listWithServiceResponseAsync(String resourceGroupName, String networkWatcherName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-06-01"; + return service.list(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionResetSharedKeyImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionResetSharedKeyImpl.java new file mode 100644 index 000000000000..f3c5b9736311 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionResetSharedKeyImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ConnectionResetSharedKey; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class ConnectionResetSharedKeyImpl extends WrapperImpl implements ConnectionResetSharedKey { + private final NetworkManager manager; + ConnectionResetSharedKeyImpl(ConnectionResetSharedKeyInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public int keyLength() { + return this.inner().keyLength(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionResetSharedKeyInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionResetSharedKeyInner.java new file mode 100644 index 000000000000..3ae59dfff68b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionResetSharedKeyInner.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.network.v2019_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The virtual network connection reset shared key. + */ +public class ConnectionResetSharedKeyInner { + /** + * The virtual network connection reset shared key length, should between 1 + * and 128. + */ + @JsonProperty(value = "keyLength", required = true) + private int keyLength; + + /** + * Get the virtual network connection reset shared key length, should between 1 and 128. + * + * @return the keyLength value + */ + public int keyLength() { + return this.keyLength; + } + + /** + * Set the virtual network connection reset shared key length, should between 1 and 128. + * + * @param keyLength the keyLength value to set + * @return the ConnectionResetSharedKeyInner object itself. + */ + public ConnectionResetSharedKeyInner withKeyLength(int keyLength) { + this.keyLength = keyLength; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionSharedKeyImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionSharedKeyImpl.java new file mode 100644 index 000000000000..7438bbb0a786 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionSharedKeyImpl.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ConnectionSharedKey; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class ConnectionSharedKeyImpl extends WrapperImpl implements ConnectionSharedKey { + private final NetworkManager manager; + ConnectionSharedKeyImpl(ConnectionSharedKeyInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionSharedKeyInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionSharedKeyInner.java new file mode 100644 index 000000000000..70e03272b5d1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionSharedKeyInner.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.network.v2019_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.SubResource; + +/** + * Response for GetConnectionSharedKey API service call. + */ +public class ConnectionSharedKeyInner extends SubResource { + /** + * The virtual network connection shared key value. + */ + @JsonProperty(value = "value", required = true) + private String value; + + /** + * Get the virtual network connection shared key value. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the virtual network connection shared key value. + * + * @param value the value value to set + * @return the ConnectionSharedKeyInner object itself. + */ + public ConnectionSharedKeyInner withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectivityInformationImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectivityInformationImpl.java new file mode 100644 index 000000000000..3d8bf515d389 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectivityInformationImpl.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ConnectivityInformation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionStatus; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ConnectivityHop; + +class ConnectivityInformationImpl extends WrapperImpl implements ConnectivityInformation { + private final NetworkManager manager; + ConnectivityInformationImpl(ConnectivityInformationInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Integer avgLatencyInMs() { + return this.inner().avgLatencyInMs(); + } + + @Override + public ConnectionStatus connectionStatus() { + return this.inner().connectionStatus(); + } + + @Override + public List hops() { + return this.inner().hops(); + } + + @Override + public Integer maxLatencyInMs() { + return this.inner().maxLatencyInMs(); + } + + @Override + public Integer minLatencyInMs() { + return this.inner().minLatencyInMs(); + } + + @Override + public Integer probesFailed() { + return this.inner().probesFailed(); + } + + @Override + public Integer probesSent() { + return this.inner().probesSent(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectivityInformationInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectivityInformationInner.java new file mode 100644 index 000000000000..2b2bc34ef7b0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectivityInformationInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ConnectivityHop; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information on the connectivity status. + */ +public class ConnectivityInformationInner { + /** + * List of hops between the source and the destination. + */ + @JsonProperty(value = "hops", access = JsonProperty.Access.WRITE_ONLY) + private List hops; + + /** + * The connection status. Possible values include: 'Unknown', 'Connected', + * 'Disconnected', 'Degraded'. + */ + @JsonProperty(value = "connectionStatus", access = JsonProperty.Access.WRITE_ONLY) + private ConnectionStatus connectionStatus; + + /** + * Average latency in milliseconds. + */ + @JsonProperty(value = "avgLatencyInMs", access = JsonProperty.Access.WRITE_ONLY) + private Integer avgLatencyInMs; + + /** + * Minimum latency in milliseconds. + */ + @JsonProperty(value = "minLatencyInMs", access = JsonProperty.Access.WRITE_ONLY) + private Integer minLatencyInMs; + + /** + * Maximum latency in milliseconds. + */ + @JsonProperty(value = "maxLatencyInMs", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxLatencyInMs; + + /** + * Total number of probes sent. + */ + @JsonProperty(value = "probesSent", access = JsonProperty.Access.WRITE_ONLY) + private Integer probesSent; + + /** + * Number of failed probes. + */ + @JsonProperty(value = "probesFailed", access = JsonProperty.Access.WRITE_ONLY) + private Integer probesFailed; + + /** + * Get list of hops between the source and the destination. + * + * @return the hops value + */ + public List hops() { + return this.hops; + } + + /** + * Get the connection status. Possible values include: 'Unknown', 'Connected', 'Disconnected', 'Degraded'. + * + * @return the connectionStatus value + */ + public ConnectionStatus connectionStatus() { + return this.connectionStatus; + } + + /** + * Get average latency in milliseconds. + * + * @return the avgLatencyInMs value + */ + public Integer avgLatencyInMs() { + return this.avgLatencyInMs; + } + + /** + * Get minimum latency in milliseconds. + * + * @return the minLatencyInMs value + */ + public Integer minLatencyInMs() { + return this.minLatencyInMs; + } + + /** + * Get maximum latency in milliseconds. + * + * @return the maxLatencyInMs value + */ + public Integer maxLatencyInMs() { + return this.maxLatencyInMs; + } + + /** + * Get total number of probes sent. + * + * @return the probesSent value + */ + public Integer probesSent() { + return this.probesSent; + } + + /** + * Get number of failed probes. + * + * @return the probesFailed value + */ + public Integer probesFailed() { + return this.probesFailed; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPoliciesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPoliciesImpl.java new file mode 100644 index 000000000000..39f7ccbd72ab --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPoliciesImpl.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.DdosCustomPolicies; +import com.microsoft.azure.management.network.v2019_09_01.DdosCustomPolicy; +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; + +class DdosCustomPoliciesImpl extends GroupableResourcesCoreImpl implements DdosCustomPolicies { + protected DdosCustomPoliciesImpl(NetworkManager manager) { + super(manager.inner().ddosCustomPolicies(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + DdosCustomPoliciesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + DdosCustomPoliciesInner 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 DdosCustomPolicyImpl define(String name) { + return wrapModel(name); + } + + @Override + protected DdosCustomPolicyImpl wrapModel(DdosCustomPolicyInner inner) { + return new DdosCustomPolicyImpl(inner.name(), inner, manager()); + } + + @Override + protected DdosCustomPolicyImpl wrapModel(String name) { + return new DdosCustomPolicyImpl(name, new DdosCustomPolicyInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPoliciesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPoliciesInner.java new file mode 100644 index 000000000000..600a7c58bd2e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPoliciesInner.java @@ -0,0 +1,663 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.network.v2019_09_01.TagsObject; +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.Map; +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.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in DdosCustomPolicies. + */ +public class DdosCustomPoliciesInner implements InnerSupportsGet, InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private DdosCustomPoliciesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of DdosCustomPoliciesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DdosCustomPoliciesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(DdosCustomPoliciesService.class); + this.client = client; + } + + /** + * The interface defining all the services for DdosCustomPolicies to be + * used by Retrofit to perform actually REST calls. + */ + interface DdosCustomPoliciesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.DdosCustomPolicies delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("ddosCustomPolicyName") String ddosCustomPolicyName, @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.network.v2019_09_01.DdosCustomPolicies beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("ddosCustomPolicyName") String ddosCustomPolicyName, @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.network.v2019_09_01.DdosCustomPolicies getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("ddosCustomPolicyName") String ddosCustomPolicyName, @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.network.v2019_09_01.DdosCustomPolicies createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("ddosCustomPolicyName") String ddosCustomPolicyName, @Path("subscriptionId") String subscriptionId, @Body DdosCustomPolicyInner 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.network.v2019_09_01.DdosCustomPolicies beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("ddosCustomPolicyName") String ddosCustomPolicyName, @Path("subscriptionId") String subscriptionId, @Body DdosCustomPolicyInner 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.network.v2019_09_01.DdosCustomPolicies updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("ddosCustomPolicyName") String ddosCustomPolicyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom 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 + */ + public void delete(String resourceGroupName, String ddosCustomPolicyName) { + deleteWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName).toBlocking().last().body(); + } + + /** + * Deletes the specified DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom 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 deleteAsync(String resourceGroupName, String ddosCustomPolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName), serviceCallback); + } + + /** + * Deletes the specified DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String ddosCustomPolicyName) { + return deleteWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String ddosCustomPolicyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosCustomPolicyName == null) { + throw new IllegalArgumentException("Parameter ddosCustomPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, ddosCustomPolicyName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom 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 + */ + public void beginDelete(String resourceGroupName, String ddosCustomPolicyName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName).toBlocking().single().body(); + } + + /** + * Deletes the specified DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom 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 beginDeleteAsync(String resourceGroupName, String ddosCustomPolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName), serviceCallback); + } + + /** + * Deletes the specified DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String ddosCustomPolicyName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String ddosCustomPolicyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosCustomPolicyName == null) { + throw new IllegalArgumentException("Parameter ddosCustomPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, ddosCustomPolicyName, this.client.subscriptionId(), 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); + } + + /** + * Gets information about the specified DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom 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 DdosCustomPolicyInner object if successful. + */ + public DdosCustomPolicyInner getByResourceGroup(String resourceGroupName, String ddosCustomPolicyName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName).toBlocking().single().body(); + } + + /** + * Gets information about the specified DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom 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 getByResourceGroupAsync(String resourceGroupName, String ddosCustomPolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName), serviceCallback); + } + + /** + * Gets information about the specified DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosCustomPolicyInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String ddosCustomPolicyName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName).map(new Func1, DdosCustomPolicyInner>() { + @Override + public DdosCustomPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosCustomPolicyInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String ddosCustomPolicyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosCustomPolicyName == null) { + throw new IllegalArgumentException("Parameter ddosCustomPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, ddosCustomPolicyName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates a DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @param parameters Parameters supplied to the create or update 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 DdosCustomPolicyInner object if successful. + */ + public DdosCustomPolicyInner createOrUpdate(String resourceGroupName, String ddosCustomPolicyName, DdosCustomPolicyInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @param parameters Parameters supplied to the create or update 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 createOrUpdateAsync(String resourceGroupName, String ddosCustomPolicyName, DdosCustomPolicyInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName, parameters), serviceCallback); + } + + /** + * Creates or updates a DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String ddosCustomPolicyName, DdosCustomPolicyInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName, parameters).map(new Func1, DdosCustomPolicyInner>() { + @Override + public DdosCustomPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String ddosCustomPolicyName, DdosCustomPolicyInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosCustomPolicyName == null) { + throw new IllegalArgumentException("Parameter ddosCustomPolicyName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, ddosCustomPolicyName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @param parameters Parameters supplied to the create or update 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 DdosCustomPolicyInner object if successful. + */ + public DdosCustomPolicyInner beginCreateOrUpdate(String resourceGroupName, String ddosCustomPolicyName, DdosCustomPolicyInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @param parameters Parameters supplied to the create or update 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 beginCreateOrUpdateAsync(String resourceGroupName, String ddosCustomPolicyName, DdosCustomPolicyInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName, parameters), serviceCallback); + } + + /** + * Creates or updates a DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosCustomPolicyInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String ddosCustomPolicyName, DdosCustomPolicyInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName, parameters).map(new Func1, DdosCustomPolicyInner>() { + @Override + public DdosCustomPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a DDoS custom policy. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosCustomPolicyInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String ddosCustomPolicyName, DdosCustomPolicyInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosCustomPolicyName == null) { + throw new IllegalArgumentException("Parameter ddosCustomPolicyName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, ddosCustomPolicyName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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); + } + + /** + * Update a DDoS custom policy tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom 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 DdosCustomPolicyInner object if successful. + */ + public DdosCustomPolicyInner updateTags(String resourceGroupName, String ddosCustomPolicyName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName).toBlocking().single().body(); + } + + /** + * Update a DDoS custom policy tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom 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 updateTagsAsync(String resourceGroupName, String ddosCustomPolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName), serviceCallback); + } + + /** + * Update a DDoS custom policy tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosCustomPolicyInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String ddosCustomPolicyName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName).map(new Func1, DdosCustomPolicyInner>() { + @Override + public DdosCustomPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a DDoS custom policy tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosCustomPolicyInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String ddosCustomPolicyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosCustomPolicyName == null) { + throw new IllegalArgumentException("Parameter ddosCustomPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, ddosCustomPolicyName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Update a DDoS custom policy tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DdosCustomPolicyInner object if successful. + */ + public DdosCustomPolicyInner updateTags(String resourceGroupName, String ddosCustomPolicyName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName, tags).toBlocking().single().body(); + } + + /** + * Update a DDoS custom policy tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String ddosCustomPolicyName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName, tags), serviceCallback); + } + + /** + * Update a DDoS custom policy tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosCustomPolicyInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String ddosCustomPolicyName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, ddosCustomPolicyName, tags).map(new Func1, DdosCustomPolicyInner>() { + @Override + public DdosCustomPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a DDoS custom policy tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosCustomPolicyName The name of the DDoS custom policy. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosCustomPolicyInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String ddosCustomPolicyName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosCustomPolicyName == null) { + throw new IllegalArgumentException("Parameter ddosCustomPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, ddosCustomPolicyName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPolicyImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPolicyImpl.java new file mode 100644 index 000000000000..bb99eef06d17 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPolicyImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.DdosCustomPolicy; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProtocolCustomSettingsFormat; + +class DdosCustomPolicyImpl extends GroupableResourceCoreImpl implements DdosCustomPolicy, DdosCustomPolicy.Definition, DdosCustomPolicy.Update { + DdosCustomPolicyImpl(String name, DdosCustomPolicyInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + DdosCustomPoliciesInner client = this.manager().inner().ddosCustomPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DdosCustomPoliciesInner client = this.manager().inner().ddosCustomPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DdosCustomPoliciesInner client = this.manager().inner().ddosCustomPolicies(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List protocolCustomSettings() { + return this.inner().protocolCustomSettings(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public List publicIPAddresses() { + return this.inner().publicIPAddresses(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public DdosCustomPolicyImpl withProtocolCustomSettings(List protocolCustomSettings) { + this.inner().withProtocolCustomSettings(protocolCustomSettings); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPolicyInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPolicyInner.java new file mode 100644 index 000000000000..04e8760e2bf6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosCustomPolicyInner.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProtocolCustomSettingsFormat; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * A DDoS custom policy in a resource group. + */ +@JsonFlatten +@SkipParentValidation +public class DdosCustomPolicyInner extends Resource { + /** + * The resource GUID property of the DDoS custom policy resource. It + * uniquely identifies the resource, even if the user changes its name or + * migrate the resource across subscriptions or resource groups. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the DDoS custom policy resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The list of public IPs associated with the DDoS custom policy resource. + * This list is read-only. + */ + @JsonProperty(value = "properties.publicIPAddresses", access = JsonProperty.Access.WRITE_ONLY) + private List publicIPAddresses; + + /** + * The protocol-specific DDoS policy customization parameters. + */ + @JsonProperty(value = "properties.protocolCustomSettings") + private List protocolCustomSettings; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the DDoS custom policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the list of public IPs associated with the DDoS custom policy resource. This list is read-only. + * + * @return the publicIPAddresses value + */ + public List publicIPAddresses() { + return this.publicIPAddresses; + } + + /** + * Get the protocol-specific DDoS policy customization parameters. + * + * @return the protocolCustomSettings value + */ + public List protocolCustomSettings() { + return this.protocolCustomSettings; + } + + /** + * Set the protocol-specific DDoS policy customization parameters. + * + * @param protocolCustomSettings the protocolCustomSettings value to set + * @return the DdosCustomPolicyInner object itself. + */ + public DdosCustomPolicyInner withProtocolCustomSettings(List protocolCustomSettings) { + this.protocolCustomSettings = protocolCustomSettings; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the DdosCustomPolicyInner object itself. + */ + public DdosCustomPolicyInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlanImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlanImpl.java new file mode 100644 index 000000000000..bacfbc4d16ee --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlanImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.DdosProtectionPlan; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.List; +import com.microsoft.azure.SubResource; + +class DdosProtectionPlanImpl extends GroupableResourceCoreImpl implements DdosProtectionPlan, DdosProtectionPlan.Definition, DdosProtectionPlan.Update { + DdosProtectionPlanImpl(String name, DdosProtectionPlanInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + DdosProtectionPlansInner client = this.manager().inner().ddosProtectionPlans(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DdosProtectionPlansInner client = this.manager().inner().ddosProtectionPlans(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DdosProtectionPlansInner client = this.manager().inner().ddosProtectionPlans(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public List virtualNetworks() { + return this.inner().virtualNetworks(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlanInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlanInner.java new file mode 100644 index 000000000000..3ef056a877f8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlanInner.java @@ -0,0 +1,87 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * A DDoS protection plan in a resource group. + */ +@JsonFlatten +public class DdosProtectionPlanInner extends Resource { + /** + * The resource GUID property of the DDoS protection plan resource. It + * uniquely identifies the resource, even if the user changes its name or + * migrate the resource across subscriptions or resource groups. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the DDoS protection plan resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The list of virtual networks associated with the DDoS protection plan + * resource. This list is read-only. + */ + @JsonProperty(value = "properties.virtualNetworks", access = JsonProperty.Access.WRITE_ONLY) + private List virtualNetworks; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the DDoS protection plan resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the list of virtual networks associated with the DDoS protection plan resource. This list is read-only. + * + * @return the virtualNetworks value + */ + public List virtualNetworks() { + return this.virtualNetworks; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlansImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlansImpl.java new file mode 100644 index 000000000000..6ccdac573251 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlansImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.DdosProtectionPlans; +import com.microsoft.azure.management.network.v2019_09_01.DdosProtectionPlan; +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; + +class DdosProtectionPlansImpl extends GroupableResourcesCoreImpl implements DdosProtectionPlans { + protected DdosProtectionPlansImpl(NetworkManager manager) { + super(manager.inner().ddosProtectionPlans(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + DdosProtectionPlansInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + DdosProtectionPlansInner 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) { + DdosProtectionPlansInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + DdosProtectionPlansInner 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 DdosProtectionPlan call(DdosProtectionPlanInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + DdosProtectionPlansInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + DdosProtectionPlansInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DdosProtectionPlan call(DdosProtectionPlanInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public DdosProtectionPlanImpl define(String name) { + return wrapModel(name); + } + + @Override + protected DdosProtectionPlanImpl wrapModel(DdosProtectionPlanInner inner) { + return new DdosProtectionPlanImpl(inner.name(), inner, manager()); + } + + @Override + protected DdosProtectionPlanImpl wrapModel(String name) { + return new DdosProtectionPlanImpl(name, new DdosProtectionPlanInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlansInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlansInner.java new file mode 100644 index 000000000000..40617b255cac --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DdosProtectionPlansInner.java @@ -0,0 +1,1126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 DdosProtectionPlans. + */ +public class DdosProtectionPlansInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private DdosProtectionPlansService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of DdosProtectionPlansInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DdosProtectionPlansInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(DdosProtectionPlansService.class); + this.client = client; + } + + /** + * The interface defining all the services for DdosProtectionPlans to be + * used by Retrofit to perform actually REST calls. + */ + interface DdosProtectionPlansService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.DdosProtectionPlans delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @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.network.v2019_09_01.DdosProtectionPlans beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @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.network.v2019_09_01.DdosProtectionPlans getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @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.network.v2019_09_01.DdosProtectionPlans createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @Path("subscriptionId") String subscriptionId, @Body DdosProtectionPlanInner 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.network.v2019_09_01.DdosProtectionPlans beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @Path("subscriptionId") String subscriptionId, @Body DdosProtectionPlanInner 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.network.v2019_09_01.DdosProtectionPlans updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.DdosProtectionPlans list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans") + Observable> list(@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.network.v2019_09_01.DdosProtectionPlans listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.DdosProtectionPlans 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.network.v2019_09_01.DdosProtectionPlans listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ddosProtectionPlanName) { + deleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().last().body(); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @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 ddosProtectionPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName), serviceCallback); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String ddosProtectionPlanName) { + return deleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ddosProtectionPlanName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().single().body(); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @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 ddosProtectionPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName), serviceCallback); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String ddosProtectionPlanName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), 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); + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DdosProtectionPlanInner object if successful. + */ + public DdosProtectionPlanInner getByResourceGroup(String resourceGroupName, String ddosProtectionPlanName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().single().body(); + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @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 ddosProtectionPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName), serviceCallback); + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String ddosProtectionPlanName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1, DdosProtectionPlanInner>() { + @Override + public DdosProtectionPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update 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 DdosProtectionPlanInner object if successful. + */ + public DdosProtectionPlanInner createOrUpdate(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update 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 createOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters), serviceCallback); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).map(new Func1, DdosProtectionPlanInner>() { + @Override + public DdosProtectionPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update 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 DdosProtectionPlanInner object if successful. + */ + public DdosProtectionPlanInner beginCreateOrUpdate(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update 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 beginCreateOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters), serviceCallback); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).map(new Func1, DdosProtectionPlanInner>() { + @Override + public DdosProtectionPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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); + } + + /** + * Update a DDoS protection plan tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DdosProtectionPlanInner object if successful. + */ + public DdosProtectionPlanInner updateTags(String resourceGroupName, String ddosProtectionPlanName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().single().body(); + } + + /** + * Update a DDoS protection plan tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @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 updateTagsAsync(String resourceGroupName, String ddosProtectionPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName), serviceCallback); + } + + /** + * Update a DDoS protection plan tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String ddosProtectionPlanName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1, DdosProtectionPlanInner>() { + @Override + public DdosProtectionPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a DDoS protection plan tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Update a DDoS protection plan tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DdosProtectionPlanInner object if successful. + */ + public DdosProtectionPlanInner updateTags(String resourceGroupName, String ddosProtectionPlanName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, tags).toBlocking().single().body(); + } + + /** + * Update a DDoS protection plan tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String ddosProtectionPlanName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, tags), serviceCallback); + } + + /** + * Update a DDoS protection plan tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String ddosProtectionPlanName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, tags).map(new Func1, DdosProtectionPlanInner>() { + @Override + public DdosProtectionPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a DDoS protection plan tags. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all DDoS protection plans in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<DdosProtectionPlanInner> 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 all DDoS protection plans in a subscription. + * + * @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 all DDoS protection plans in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> 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 all DDoS protection plans in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DdosProtectionPlanInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all the DDoS protection plans in a resource group. + * + * @param resourceGroupName The name of the 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<DdosProtectionPlanInner> 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 all the DDoS protection plans in a resource group. + * + * @param resourceGroupName The name of the 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 all the DDoS protection plans in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> 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 all the DDoS protection plans in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DdosProtectionPlanInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all DDoS protection plans in a subscription. + * + * @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<DdosProtectionPlanInner> 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 all DDoS protection plans in a subscription. + * + * @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 all DDoS protection plans in a subscription. + * + * @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<DdosProtectionPlanInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @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<DdosProtectionPlanInner> 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 all DDoS protection plans in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DdosProtectionPlanInner> 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 all the DDoS protection plans in a resource group. + * + * @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<DdosProtectionPlanInner> 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 all the DDoS protection plans in a resource group. + * + * @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 all the DDoS protection plans in a resource group. + * + * @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<DdosProtectionPlanInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @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<DdosProtectionPlanInner> 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 all the DDoS protection plans in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DdosProtectionPlanInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DefaultSecurityRulesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DefaultSecurityRulesImpl.java new file mode 100644 index 000000000000..aab8d31a04ca --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DefaultSecurityRulesImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.DefaultSecurityRules; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroupSecurityRuleModel; + +class DefaultSecurityRulesImpl extends WrapperImpl implements DefaultSecurityRules { + private final NetworkManager manager; + + DefaultSecurityRulesImpl(NetworkManager manager) { + super(manager.inner().defaultSecurityRules()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private NetworkSecurityGroupSecurityRuleModelImpl wrapModel(SecurityRuleInner inner) { + return new NetworkSecurityGroupSecurityRuleModelImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String networkSecurityGroupName) { + DefaultSecurityRulesInner client = this.inner(); + return client.listAsync(resourceGroupName, networkSecurityGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public NetworkSecurityGroupSecurityRuleModel call(SecurityRuleInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String networkSecurityGroupName, String defaultSecurityRuleName) { + DefaultSecurityRulesInner client = this.inner(); + return client.getAsync(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName) + .flatMap(new Func1>() { + @Override + public Observable call(SecurityRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((NetworkSecurityGroupSecurityRuleModel)wrapModel(inner)); + } + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DefaultSecurityRulesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DefaultSecurityRulesInner.java new file mode 100644 index 000000000000..faed8c7fcd10 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DefaultSecurityRulesInner.java @@ -0,0 +1,397 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in DefaultSecurityRules. + */ +public class DefaultSecurityRulesInner { + /** The Retrofit service to perform REST calls. */ + private DefaultSecurityRulesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of DefaultSecurityRulesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DefaultSecurityRulesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(DefaultSecurityRulesService.class); + this.client = client; + } + + /** + * The interface defining all the services for DefaultSecurityRules to be + * used by Retrofit to perform actually REST calls. + */ + interface DefaultSecurityRulesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.DefaultSecurityRules list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @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.network.v2019_09_01.DefaultSecurityRules get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("defaultSecurityRuleName") String defaultSecurityRuleName, @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.network.v2019_09_01.DefaultSecurityRules listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all default security rules in a network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security 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<SecurityRuleInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String networkSecurityGroupName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, networkSecurityGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all default security rules in a network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security 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> listAsync(final String resourceGroupName, final String networkSecurityGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, networkSecurityGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all default security rules in a network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SecurityRuleInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String networkSecurityGroupName) { + return listWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all default security rules in a network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SecurityRuleInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String networkSecurityGroupName) { + return listSinglePageAsync(resourceGroupName, networkSecurityGroupName) + .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 all default security rules in a network security group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SecurityRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String networkSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), 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); + } + + /** + * Get the specified default network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param defaultSecurityRuleName The name of the default security 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 SecurityRuleInner object if successful. + */ + public SecurityRuleInner get(String resourceGroupName, String networkSecurityGroupName, String defaultSecurityRuleName) { + return getWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName).toBlocking().single().body(); + } + + /** + * Get the specified default network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param defaultSecurityRuleName The name of the default security 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 getAsync(String resourceGroupName, String networkSecurityGroupName, String defaultSecurityRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName), serviceCallback); + } + + /** + * Get the specified default network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param defaultSecurityRuleName The name of the default security rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecurityRuleInner object + */ + public Observable getAsync(String resourceGroupName, String networkSecurityGroupName, String defaultSecurityRuleName) { + return getWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName).map(new Func1, SecurityRuleInner>() { + @Override + public SecurityRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the specified default network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param defaultSecurityRuleName The name of the default security rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecurityRuleInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, String defaultSecurityRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (defaultSecurityRuleName == null) { + throw new IllegalArgumentException("Parameter defaultSecurityRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName, this.client.subscriptionId(), 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); + } + + /** + * Gets all default security rules in a network security group. + * + * @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<SecurityRuleInner> 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 all default security rules in a network security group. + * + * @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 all default security rules in a network security group. + * + * @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<SecurityRuleInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all default security rules in a network security group. + * + * @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<SecurityRuleInner> 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 all default security rules in a network security group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SecurityRuleInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DnsNameAvailabilityResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DnsNameAvailabilityResultInner.java new file mode 100644 index 000000000000..b70831b0844b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/DnsNameAvailabilityResultInner.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.network.v2019_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for the CheckDnsNameAvailability API service call. + */ +public class DnsNameAvailabilityResultInner { + /** + * Domain availability (True/False). + */ + @JsonProperty(value = "available") + private Boolean available; + + /** + * Get domain availability (True/False). + * + * @return the available value + */ + public Boolean available() { + return this.available; + } + + /** + * Set domain availability (True/False). + * + * @param available the available value to set + * @return the DnsNameAvailabilityResultInner object itself. + */ + public DnsNameAvailabilityResultInner withAvailable(Boolean available) { + this.available = available; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveNetworkSecurityGroupListResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveNetworkSecurityGroupListResultImpl.java new file mode 100644 index 000000000000..d2d731d5aa10 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveNetworkSecurityGroupListResultImpl.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.EffectiveNetworkSecurityGroupListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.EffectiveNetworkSecurityGroup; + +class EffectiveNetworkSecurityGroupListResultImpl extends WrapperImpl implements EffectiveNetworkSecurityGroupListResult { + private final NetworkManager manager; + EffectiveNetworkSecurityGroupListResultImpl(EffectiveNetworkSecurityGroupListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveNetworkSecurityGroupListResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveNetworkSecurityGroupListResultInner.java new file mode 100644 index 000000000000..625294661be3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveNetworkSecurityGroupListResultInner.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.EffectiveNetworkSecurityGroup; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for list effective network security groups API service call. + */ +public class EffectiveNetworkSecurityGroupListResultInner { + /** + * A list of effective network security groups. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get a list of effective network security groups. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set a list of effective network security groups. + * + * @param value the value value to set + * @return the EffectiveNetworkSecurityGroupListResultInner object itself. + */ + public EffectiveNetworkSecurityGroupListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveRouteListResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveRouteListResultImpl.java new file mode 100644 index 000000000000..9d15bc6a7625 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveRouteListResultImpl.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.EffectiveRouteListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.EffectiveRoute; + +class EffectiveRouteListResultImpl extends WrapperImpl implements EffectiveRouteListResult { + private final NetworkManager manager; + EffectiveRouteListResultImpl(EffectiveRouteListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveRouteListResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveRouteListResultInner.java new file mode 100644 index 000000000000..cf6b3884a5be --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EffectiveRouteListResultInner.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.EffectiveRoute; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for list effective route API service call. + */ +public class EffectiveRouteListResultInner { + /** + * A list of effective routes. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get a list of effective routes. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set a list of effective routes. + * + * @param value the value value to set + * @return the EffectiveRouteListResultInner object itself. + */ + public EffectiveRouteListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EndpointServiceResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EndpointServiceResultImpl.java new file mode 100644 index 000000000000..44943f0672e8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EndpointServiceResultImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.EndpointServiceResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class EndpointServiceResultImpl extends WrapperImpl implements EndpointServiceResult { + private final NetworkManager manager; + + EndpointServiceResultImpl(EndpointServiceResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EndpointServiceResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EndpointServiceResultInner.java new file mode 100644 index 000000000000..d305214a5b94 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/EndpointServiceResultInner.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.network.v2019_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.SubResource; + +/** + * Endpoint service. + */ +public class EndpointServiceResultInner extends SubResource { + /** + * Name of the endpoint service. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Type of the endpoint service. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get name of the endpoint service. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get type of the endpoint service. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationImpl.java new file mode 100644 index 000000000000..677da33a3667 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitAuthorization; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.AuthorizationUseStatus; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class ExpressRouteCircuitAuthorizationImpl extends CreatableUpdatableImpl implements ExpressRouteCircuitAuthorization, ExpressRouteCircuitAuthorization.Definition, ExpressRouteCircuitAuthorization.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String circuitName; + private String authorizationName; + + ExpressRouteCircuitAuthorizationImpl(String name, NetworkManager manager) { + super(name, new ExpressRouteCircuitAuthorizationInner()); + this.manager = manager; + // Set resource name + this.authorizationName = name; + // + } + + ExpressRouteCircuitAuthorizationImpl(ExpressRouteCircuitAuthorizationInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.authorizationName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.circuitName = IdParsingUtils.getValueFromIdByName(inner.id(), "expressRouteCircuits"); + this.authorizationName = IdParsingUtils.getValueFromIdByName(inner.id(), "authorizations"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ExpressRouteCircuitAuthorizationsInner client = this.manager().inner().expressRouteCircuitAuthorizations(); + return client.createOrUpdateAsync(this.resourceGroupName, this.circuitName, this.authorizationName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ExpressRouteCircuitAuthorizationsInner client = this.manager().inner().expressRouteCircuitAuthorizations(); + return client.createOrUpdateAsync(this.resourceGroupName, this.circuitName, this.authorizationName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ExpressRouteCircuitAuthorizationsInner client = this.manager().inner().expressRouteCircuitAuthorizations(); + return client.getAsync(this.resourceGroupName, this.circuitName, this.authorizationName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String authorizationKey() { + return this.inner().authorizationKey(); + } + + @Override + public AuthorizationUseStatus authorizationUseStatus() { + return this.inner().authorizationUseStatus(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ExpressRouteCircuitAuthorizationImpl withExistingExpressRouteCircuit(String resourceGroupName, String circuitName) { + this.resourceGroupName = resourceGroupName; + this.circuitName = circuitName; + return this; + } + + @Override + public ExpressRouteCircuitAuthorizationImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public ExpressRouteCircuitAuthorizationImpl withName(String name) { + this.inner().withName(name); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationInner.java new file mode 100644 index 000000000000..bf55f5f64182 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.AuthorizationUseStatus; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Authorization in an ExpressRouteCircuit resource. + */ +@JsonFlatten +public class ExpressRouteCircuitAuthorizationInner extends SubResource { + /** + * The authorization key. + */ + @JsonProperty(value = "properties.authorizationKey", access = JsonProperty.Access.WRITE_ONLY) + private String authorizationKey; + + /** + * The authorization use status. Possible values include: 'Available', + * 'InUse'. + */ + @JsonProperty(value = "properties.authorizationUseStatus", access = JsonProperty.Access.WRITE_ONLY) + private AuthorizationUseStatus authorizationUseStatus; + + /** + * The provisioning state of the authorization resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the authorization key. + * + * @return the authorizationKey value + */ + public String authorizationKey() { + return this.authorizationKey; + } + + /** + * Get the authorization use status. Possible values include: 'Available', 'InUse'. + * + * @return the authorizationUseStatus value + */ + public AuthorizationUseStatus authorizationUseStatus() { + return this.authorizationUseStatus; + } + + /** + * Get the provisioning state of the authorization resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the ExpressRouteCircuitAuthorizationInner object itself. + */ + public ExpressRouteCircuitAuthorizationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationsImpl.java new file mode 100644 index 000000000000..f476e3740976 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitAuthorizations; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitAuthorization; + +class ExpressRouteCircuitAuthorizationsImpl extends WrapperImpl implements ExpressRouteCircuitAuthorizations { + private final NetworkManager manager; + + ExpressRouteCircuitAuthorizationsImpl(NetworkManager manager) { + super(manager.inner().expressRouteCircuitAuthorizations()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public ExpressRouteCircuitAuthorizationImpl define(String name) { + return wrapModel(name); + } + + private ExpressRouteCircuitAuthorizationImpl wrapModel(ExpressRouteCircuitAuthorizationInner inner) { + return new ExpressRouteCircuitAuthorizationImpl(inner, manager()); + } + + private ExpressRouteCircuitAuthorizationImpl wrapModel(String name) { + return new ExpressRouteCircuitAuthorizationImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String circuitName) { + ExpressRouteCircuitAuthorizationsInner client = this.inner(); + return client.listAsync(resourceGroupName, circuitName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ExpressRouteCircuitAuthorization call(ExpressRouteCircuitAuthorizationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String circuitName, String authorizationName) { + ExpressRouteCircuitAuthorizationsInner client = this.inner(); + return client.getAsync(resourceGroupName, circuitName, authorizationName) + .flatMap(new Func1>() { + @Override + public Observable call(ExpressRouteCircuitAuthorizationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ExpressRouteCircuitAuthorization)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String circuitName, String authorizationName) { + ExpressRouteCircuitAuthorizationsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, circuitName, authorizationName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationsInner.java new file mode 100644 index 000000000000..d472f77b9373 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationsInner.java @@ -0,0 +1,764 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 ExpressRouteCircuitAuthorizations. + */ +public class ExpressRouteCircuitAuthorizationsInner { + /** The Retrofit service to perform REST calls. */ + private ExpressRouteCircuitAuthorizationsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRouteCircuitAuthorizationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRouteCircuitAuthorizationsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRouteCircuitAuthorizationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRouteCircuitAuthorizations to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRouteCircuitAuthorizationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitAuthorizations delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("authorizationName") String authorizationName, @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.network.v2019_09_01.ExpressRouteCircuitAuthorizations beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("authorizationName") String authorizationName, @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.network.v2019_09_01.ExpressRouteCircuitAuthorizations get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("authorizationName") String authorizationName, @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.network.v2019_09_01.ExpressRouteCircuitAuthorizations createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("authorizationName") String authorizationName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitAuthorizationInner authorizationParameters, @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.network.v2019_09_01.ExpressRouteCircuitAuthorizations beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("authorizationName") String authorizationName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitAuthorizationInner authorizationParameters, @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.network.v2019_09_01.ExpressRouteCircuitAuthorizations list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @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.network.v2019_09_01.ExpressRouteCircuitAuthorizations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 circuitName, String authorizationName) { + deleteWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName).toBlocking().last().body(); + } + + /** + * Deletes the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @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 circuitName, String authorizationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName), serviceCallback); + } + + /** + * Deletes the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String circuitName, String authorizationName) { + return deleteWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String circuitName, String authorizationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (authorizationName == null) { + throw new IllegalArgumentException("Parameter authorizationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 circuitName, String authorizationName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName).toBlocking().single().body(); + } + + /** + * Deletes the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @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 circuitName, String authorizationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName), serviceCallback); + } + + /** + * Deletes the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String circuitName, String authorizationName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String circuitName, String authorizationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (authorizationName == null) { + throw new IllegalArgumentException("Parameter authorizationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitAuthorizationInner object if successful. + */ + public ExpressRouteCircuitAuthorizationInner get(String resourceGroupName, String circuitName, String authorizationName) { + return getWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName).toBlocking().single().body(); + } + + /** + * Gets the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @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 circuitName, String authorizationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName), serviceCallback); + } + + /** + * Gets the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitAuthorizationInner object + */ + public Observable getAsync(String resourceGroupName, String circuitName, String authorizationName) { + return getWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName).map(new Func1, ExpressRouteCircuitAuthorizationInner>() { + @Override + public ExpressRouteCircuitAuthorizationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified authorization from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitAuthorizationInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String circuitName, String authorizationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (authorizationName == null) { + throw new IllegalArgumentException("Parameter authorizationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates an authorization in the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route circuit authorization 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 ExpressRouteCircuitAuthorizationInner object if successful. + */ + public ExpressRouteCircuitAuthorizationInner createOrUpdate(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName, authorizationParameters).toBlocking().last().body(); + } + + /** + * Creates or updates an authorization in the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route circuit authorization 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 createOrUpdateAsync(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName, authorizationParameters), serviceCallback); + } + + /** + * Creates or updates an authorization in the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route circuit authorization operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName, authorizationParameters).map(new Func1, ExpressRouteCircuitAuthorizationInner>() { + @Override + public ExpressRouteCircuitAuthorizationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an authorization in the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route circuit authorization operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (authorizationName == null) { + throw new IllegalArgumentException("Parameter authorizationName 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 (authorizationParameters == null) { + throw new IllegalArgumentException("Parameter authorizationParameters is required and cannot be null."); + } + Validator.validate(authorizationParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), authorizationParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates an authorization in the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route circuit authorization 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 ExpressRouteCircuitAuthorizationInner object if successful. + */ + public ExpressRouteCircuitAuthorizationInner beginCreateOrUpdate(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName, authorizationParameters).toBlocking().single().body(); + } + + /** + * Creates or updates an authorization in the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route circuit authorization 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 beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName, authorizationParameters), serviceCallback); + } + + /** + * Creates or updates an authorization in the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route circuit authorization operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitAuthorizationInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName, authorizationParameters).map(new Func1, ExpressRouteCircuitAuthorizationInner>() { + @Override + public ExpressRouteCircuitAuthorizationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an authorization in the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route circuit authorization operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitAuthorizationInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (authorizationName == null) { + throw new IllegalArgumentException("Parameter authorizationName 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 (authorizationParameters == null) { + throw new IllegalArgumentException("Parameter authorizationParameters is required and cannot be null."); + } + Validator.validate(authorizationParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), authorizationParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 all authorizations in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ExpressRouteCircuitAuthorizationInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String circuitName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, circuitName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all authorizations in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @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 resourceGroupName, final String circuitName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, circuitName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all authorizations in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCircuitAuthorizationInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String circuitName) { + return listWithServiceResponseAsync(resourceGroupName, circuitName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all authorizations in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCircuitAuthorizationInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String circuitName) { + return listSinglePageAsync(resourceGroupName, circuitName) + .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 all authorizations in an express route circuit. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCircuitAuthorizationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String circuitName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, circuitName, this.client.subscriptionId(), 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 all authorizations in an express route circuit. + * + * @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<ExpressRouteCircuitAuthorizationInner> 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 all authorizations in an express route circuit. + * + * @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 all authorizations in an express route circuit. + * + * @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<ExpressRouteCircuitAuthorizationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all authorizations in an express route circuit. + * + * @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<ExpressRouteCircuitAuthorizationInner> 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 all authorizations in an express route circuit. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCircuitAuthorizationInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionImpl.java new file mode 100644 index 000000000000..f86354374a4b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitConnection; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.CircuitConnectionStatus; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class ExpressRouteCircuitConnectionImpl extends CreatableUpdatableImpl implements ExpressRouteCircuitConnection, ExpressRouteCircuitConnection.Definition, ExpressRouteCircuitConnection.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String circuitName; + private String peeringName; + private String connectionName; + + ExpressRouteCircuitConnectionImpl(String name, NetworkManager manager) { + super(name, new ExpressRouteCircuitConnectionInner()); + this.manager = manager; + // Set resource name + this.connectionName = name; + // + } + + ExpressRouteCircuitConnectionImpl(ExpressRouteCircuitConnectionInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.connectionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.circuitName = IdParsingUtils.getValueFromIdByName(inner.id(), "expressRouteCircuits"); + this.peeringName = IdParsingUtils.getValueFromIdByName(inner.id(), "peerings"); + this.connectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "connections"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ExpressRouteCircuitConnectionsInner client = this.manager().inner().expressRouteCircuitConnections(); + return client.createOrUpdateAsync(this.resourceGroupName, this.circuitName, this.peeringName, this.connectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ExpressRouteCircuitConnectionsInner client = this.manager().inner().expressRouteCircuitConnections(); + return client.createOrUpdateAsync(this.resourceGroupName, this.circuitName, this.peeringName, this.connectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ExpressRouteCircuitConnectionsInner client = this.manager().inner().expressRouteCircuitConnections(); + return client.getAsync(this.resourceGroupName, this.circuitName, this.peeringName, this.connectionName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String addressPrefix() { + return this.inner().addressPrefix(); + } + + @Override + public String authorizationKey() { + return this.inner().authorizationKey(); + } + + @Override + public CircuitConnectionStatus circuitConnectionStatus() { + return this.inner().circuitConnectionStatus(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public SubResource expressRouteCircuitPeering() { + return this.inner().expressRouteCircuitPeering(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public SubResource peerExpressRouteCircuitPeering() { + return this.inner().peerExpressRouteCircuitPeering(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ExpressRouteCircuitConnectionImpl withExistingPeering(String resourceGroupName, String circuitName, String peeringName) { + this.resourceGroupName = resourceGroupName; + this.circuitName = circuitName; + this.peeringName = peeringName; + return this; + } + + @Override + public ExpressRouteCircuitConnectionImpl withAddressPrefix(String addressPrefix) { + this.inner().withAddressPrefix(addressPrefix); + return this; + } + + @Override + public ExpressRouteCircuitConnectionImpl withAuthorizationKey(String authorizationKey) { + this.inner().withAuthorizationKey(authorizationKey); + return this; + } + + @Override + public ExpressRouteCircuitConnectionImpl withExpressRouteCircuitPeering(SubResource expressRouteCircuitPeering) { + this.inner().withExpressRouteCircuitPeering(expressRouteCircuitPeering); + return this; + } + + @Override + public ExpressRouteCircuitConnectionImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public ExpressRouteCircuitConnectionImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public ExpressRouteCircuitConnectionImpl withPeerExpressRouteCircuitPeering(SubResource peerExpressRouteCircuitPeering) { + this.inner().withPeerExpressRouteCircuitPeering(peerExpressRouteCircuitPeering); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionInner.java new file mode 100644 index 000000000000..b0b4be083822 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionInner.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.CircuitConnectionStatus; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. + */ +@JsonFlatten +public class ExpressRouteCircuitConnectionInner extends SubResource { + /** + * Reference to Express Route Circuit Private Peering Resource of the + * circuit initiating connection. + */ + @JsonProperty(value = "properties.expressRouteCircuitPeering") + private SubResource expressRouteCircuitPeering; + + /** + * Reference to Express Route Circuit Private Peering Resource of the + * peered circuit. + */ + @JsonProperty(value = "properties.peerExpressRouteCircuitPeering") + private SubResource peerExpressRouteCircuitPeering; + + /** + * /29 IP address space to carve out Customer addresses for tunnels. + */ + @JsonProperty(value = "properties.addressPrefix") + private String addressPrefix; + + /** + * The authorization key. + */ + @JsonProperty(value = "properties.authorizationKey") + private String authorizationKey; + + /** + * Express Route Circuit connection state. Possible values include: + * 'Connected', 'Connecting', 'Disconnected'. + */ + @JsonProperty(value = "properties.circuitConnectionStatus", access = JsonProperty.Access.WRITE_ONLY) + private CircuitConnectionStatus circuitConnectionStatus; + + /** + * The provisioning state of the express route circuit connection resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. + * + * @return the expressRouteCircuitPeering value + */ + public SubResource expressRouteCircuitPeering() { + return this.expressRouteCircuitPeering; + } + + /** + * Set reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. + * + * @param expressRouteCircuitPeering the expressRouteCircuitPeering value to set + * @return the ExpressRouteCircuitConnectionInner object itself. + */ + public ExpressRouteCircuitConnectionInner withExpressRouteCircuitPeering(SubResource expressRouteCircuitPeering) { + this.expressRouteCircuitPeering = expressRouteCircuitPeering; + return this; + } + + /** + * Get reference to Express Route Circuit Private Peering Resource of the peered circuit. + * + * @return the peerExpressRouteCircuitPeering value + */ + public SubResource peerExpressRouteCircuitPeering() { + return this.peerExpressRouteCircuitPeering; + } + + /** + * Set reference to Express Route Circuit Private Peering Resource of the peered circuit. + * + * @param peerExpressRouteCircuitPeering the peerExpressRouteCircuitPeering value to set + * @return the ExpressRouteCircuitConnectionInner object itself. + */ + public ExpressRouteCircuitConnectionInner withPeerExpressRouteCircuitPeering(SubResource peerExpressRouteCircuitPeering) { + this.peerExpressRouteCircuitPeering = peerExpressRouteCircuitPeering; + return this; + } + + /** + * Get /29 IP address space to carve out Customer addresses for tunnels. + * + * @return the addressPrefix value + */ + public String addressPrefix() { + return this.addressPrefix; + } + + /** + * Set /29 IP address space to carve out Customer addresses for tunnels. + * + * @param addressPrefix the addressPrefix value to set + * @return the ExpressRouteCircuitConnectionInner object itself. + */ + public ExpressRouteCircuitConnectionInner withAddressPrefix(String addressPrefix) { + this.addressPrefix = addressPrefix; + return this; + } + + /** + * Get the authorization key. + * + * @return the authorizationKey value + */ + public String authorizationKey() { + return this.authorizationKey; + } + + /** + * Set the authorization key. + * + * @param authorizationKey the authorizationKey value to set + * @return the ExpressRouteCircuitConnectionInner object itself. + */ + public ExpressRouteCircuitConnectionInner withAuthorizationKey(String authorizationKey) { + this.authorizationKey = authorizationKey; + return this; + } + + /** + * Get express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'. + * + * @return the circuitConnectionStatus value + */ + public CircuitConnectionStatus circuitConnectionStatus() { + return this.circuitConnectionStatus; + } + + /** + * Get the provisioning state of the express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the ExpressRouteCircuitConnectionInner object itself. + */ + public ExpressRouteCircuitConnectionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionsImpl.java new file mode 100644 index 000000000000..0ab2ecd3064f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitConnections; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitConnection; + +class ExpressRouteCircuitConnectionsImpl extends WrapperImpl implements ExpressRouteCircuitConnections { + private final NetworkManager manager; + + ExpressRouteCircuitConnectionsImpl(NetworkManager manager) { + super(manager.inner().expressRouteCircuitConnections()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public ExpressRouteCircuitConnectionImpl define(String name) { + return wrapModel(name); + } + + private ExpressRouteCircuitConnectionImpl wrapModel(ExpressRouteCircuitConnectionInner inner) { + return new ExpressRouteCircuitConnectionImpl(inner, manager()); + } + + private ExpressRouteCircuitConnectionImpl wrapModel(String name) { + return new ExpressRouteCircuitConnectionImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String circuitName, final String peeringName) { + ExpressRouteCircuitConnectionsInner client = this.inner(); + return client.listAsync(resourceGroupName, circuitName, peeringName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ExpressRouteCircuitConnection call(ExpressRouteCircuitConnectionInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + ExpressRouteCircuitConnectionsInner client = this.inner(); + return client.getAsync(resourceGroupName, circuitName, peeringName, connectionName) + .flatMap(new Func1>() { + @Override + public Observable call(ExpressRouteCircuitConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ExpressRouteCircuitConnection)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + ExpressRouteCircuitConnectionsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, circuitName, peeringName, connectionName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionsInner.java new file mode 100644 index 000000000000..c9203e49389d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionsInner.java @@ -0,0 +1,807 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 ExpressRouteCircuitConnections. + */ +public class ExpressRouteCircuitConnectionsInner { + /** The Retrofit service to perform REST calls. */ + private ExpressRouteCircuitConnectionsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRouteCircuitConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRouteCircuitConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRouteCircuitConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRouteCircuitConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRouteCircuitConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitConnections delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @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.network.v2019_09_01.ExpressRouteCircuitConnections beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @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.network.v2019_09_01.ExpressRouteCircuitConnections get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @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.network.v2019_09_01.ExpressRouteCircuitConnections createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, @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.network.v2019_09_01.ExpressRouteCircuitConnections beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, @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.network.v2019_09_01.ExpressRouteCircuitConnections list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @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.network.v2019_09_01.ExpressRouteCircuitConnections listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 circuitName, String peeringName, String connectionName) { + deleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).toBlocking().last().body(); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @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 circuitName, String peeringName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName), serviceCallback); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + return deleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 circuitName, String peeringName, String connectionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).toBlocking().single().body(); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @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 circuitName, String peeringName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName), serviceCallback); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitConnectionInner object if successful. + */ + public ExpressRouteCircuitConnectionInner get(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + return getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).toBlocking().single().body(); + } + + /** + * Gets the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @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 circuitName, String peeringName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName), serviceCallback); + } + + /** + * Gets the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitConnectionInner object + */ + public Observable getAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + return getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).map(new Func1, ExpressRouteCircuitConnectionInner>() { + @Override + public ExpressRouteCircuitConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitConnectionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit connection 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 ExpressRouteCircuitConnectionInner object if successful. + */ + public ExpressRouteCircuitConnectionInner createOrUpdate(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit connection 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 createOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters), serviceCallback); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters).map(new Func1, ExpressRouteCircuitConnectionInner>() { + @Override + public ExpressRouteCircuitConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName 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 (expressRouteCircuitConnectionParameters == null) { + throw new IllegalArgumentException("Parameter expressRouteCircuitConnectionParameters is required and cannot be null."); + } + Validator.validate(expressRouteCircuitConnectionParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), expressRouteCircuitConnectionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit connection 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 ExpressRouteCircuitConnectionInner object if successful. + */ + public ExpressRouteCircuitConnectionInner beginCreateOrUpdate(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit connection 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 beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters), serviceCallback); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitConnectionInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters).map(new Func1, ExpressRouteCircuitConnectionInner>() { + @Override + public ExpressRouteCircuitConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitConnectionInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName 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 (expressRouteCircuitConnectionParameters == null) { + throw new IllegalArgumentException("Parameter expressRouteCircuitConnectionParameters is required and cannot be null."); + } + Validator.validate(expressRouteCircuitConnectionParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), expressRouteCircuitConnectionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 all global reach connections associated with a private peering in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ExpressRouteCircuitConnectionInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String circuitName, final String peeringName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, circuitName, peeringName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all global reach connections associated with a private peering in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param peeringName The name of the peering. + * @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 resourceGroupName, final String circuitName, final String peeringName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, circuitName, peeringName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all global reach connections associated with a private peering in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCircuitConnectionInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String circuitName, final String peeringName) { + return listWithServiceResponseAsync(resourceGroupName, circuitName, peeringName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all global reach connections associated with a private peering in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCircuitConnectionInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String circuitName, final String peeringName) { + return listSinglePageAsync(resourceGroupName, circuitName, peeringName) + .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 all global reach connections associated with a private peering in an express route circuit. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param circuitName The name of the circuit. + ServiceResponse> * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCircuitConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String circuitName, final String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), 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 all global reach connections associated with a private peering in an express route circuit. + * + * @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<ExpressRouteCircuitConnectionInner> 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 all global reach connections associated with a private peering in an express route circuit. + * + * @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 all global reach connections associated with a private peering in an express route circuit. + * + * @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<ExpressRouteCircuitConnectionInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all global reach connections associated with a private peering in an express route circuit. + * + * @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<ExpressRouteCircuitConnectionInner> 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 all global reach connections associated with a private peering in an express route circuit. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCircuitConnectionInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitImpl.java new file mode 100644 index 000000000000..a6606ffc19ac --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitImpl.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuit; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitSku; +import com.microsoft.azure.management.network.v2019_09_01.ServiceProviderProvisioningState; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitServiceProviderProperties; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitAuthorization; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeering; + +class ExpressRouteCircuitImpl extends GroupableResourceCoreImpl implements ExpressRouteCircuit, ExpressRouteCircuit.Definition, ExpressRouteCircuit.Update { + ExpressRouteCircuitImpl(String name, ExpressRouteCircuitInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ExpressRouteCircuitsInner client = this.manager().inner().expressRouteCircuits(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ExpressRouteCircuitsInner client = this.manager().inner().expressRouteCircuits(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ExpressRouteCircuitsInner client = this.manager().inner().expressRouteCircuits(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Boolean allowClassicOperations() { + return this.inner().allowClassicOperations(); + } + + @Override + public List authorizations() { + List lst = new ArrayList(); + if (this.inner().authorizations() != null) { + for (ExpressRouteCircuitAuthorizationInner inner : this.inner().authorizations()) { + lst.add( new ExpressRouteCircuitAuthorizationImpl(inner, manager())); + } + } + return lst; + } + + @Override + public Double bandwidthInGbps() { + return this.inner().bandwidthInGbps(); + } + + @Override + public String circuitProvisioningState() { + return this.inner().circuitProvisioningState(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public SubResource expressRoutePort() { + return this.inner().expressRoutePort(); + } + + @Override + public String gatewayManagerEtag() { + return this.inner().gatewayManagerEtag(); + } + + @Override + public Boolean globalReachEnabled() { + return this.inner().globalReachEnabled(); + } + + @Override + public List peerings() { + List lst = new ArrayList(); + if (this.inner().peerings() != null) { + for (ExpressRouteCircuitPeeringInner inner : this.inner().peerings()) { + lst.add( new ExpressRouteCircuitPeeringImpl(inner, manager())); + } + } + return lst; + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String serviceKey() { + return this.inner().serviceKey(); + } + + @Override + public String serviceProviderNotes() { + return this.inner().serviceProviderNotes(); + } + + @Override + public ExpressRouteCircuitServiceProviderProperties serviceProviderProperties() { + return this.inner().serviceProviderProperties(); + } + + @Override + public ServiceProviderProvisioningState serviceProviderProvisioningState() { + return this.inner().serviceProviderProvisioningState(); + } + + @Override + public ExpressRouteCircuitSku sku() { + return this.inner().sku(); + } + + @Override + public Integer stag() { + return this.inner().stag(); + } + + @Override + public ExpressRouteCircuitImpl withAllowClassicOperations(Boolean allowClassicOperations) { + this.inner().withAllowClassicOperations(allowClassicOperations); + return this; + } + + @Override + public ExpressRouteCircuitImpl withAuthorizations(List authorizations) { + this.inner().withAuthorizations(authorizations); + return this; + } + + @Override + public ExpressRouteCircuitImpl withBandwidthInGbps(Double bandwidthInGbps) { + this.inner().withBandwidthInGbps(bandwidthInGbps); + return this; + } + + @Override + public ExpressRouteCircuitImpl withExpressRoutePort(SubResource expressRoutePort) { + this.inner().withExpressRoutePort(expressRoutePort); + return this; + } + + @Override + public ExpressRouteCircuitImpl withGatewayManagerEtag(String gatewayManagerEtag) { + this.inner().withGatewayManagerEtag(gatewayManagerEtag); + return this; + } + + @Override + public ExpressRouteCircuitImpl withPeerings(List peerings) { + this.inner().withPeerings(peerings); + return this; + } + + @Override + public ExpressRouteCircuitImpl withServiceProviderNotes(String serviceProviderNotes) { + this.inner().withServiceProviderNotes(serviceProviderNotes); + return this; + } + + @Override + public ExpressRouteCircuitImpl withServiceProviderProperties(ExpressRouteCircuitServiceProviderProperties serviceProviderProperties) { + this.inner().withServiceProviderProperties(serviceProviderProperties); + return this; + } + + @Override + public ExpressRouteCircuitImpl withSku(ExpressRouteCircuitSku sku) { + this.inner().withSku(sku); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitInner.java new file mode 100644 index 000000000000..d64458d3ee9c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitInner.java @@ -0,0 +1,398 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitSku; +import com.microsoft.azure.management.network.v2019_09_01.ServiceProviderProvisioningState; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitServiceProviderProperties; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * ExpressRouteCircuit resource. + */ +@JsonFlatten +@SkipParentValidation +public class ExpressRouteCircuitInner extends Resource { + /** + * The SKU. + */ + @JsonProperty(value = "sku") + private ExpressRouteCircuitSku sku; + + /** + * Allow classic operations. + */ + @JsonProperty(value = "properties.allowClassicOperations") + private Boolean allowClassicOperations; + + /** + * The CircuitProvisioningState state of the resource. + */ + @JsonProperty(value = "properties.circuitProvisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String circuitProvisioningState; + + /** + * The ServiceProviderProvisioningState state of the resource. Possible + * values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning'. + */ + @JsonProperty(value = "properties.serviceProviderProvisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ServiceProviderProvisioningState serviceProviderProvisioningState; + + /** + * The list of authorizations. + */ + @JsonProperty(value = "properties.authorizations") + private List authorizations; + + /** + * The list of peerings. + */ + @JsonProperty(value = "properties.peerings") + private List peerings; + + /** + * The ServiceKey. + */ + @JsonProperty(value = "properties.serviceKey", access = JsonProperty.Access.WRITE_ONLY) + private String serviceKey; + + /** + * The ServiceProviderNotes. + */ + @JsonProperty(value = "properties.serviceProviderNotes") + private String serviceProviderNotes; + + /** + * The ServiceProviderProperties. + */ + @JsonProperty(value = "properties.serviceProviderProperties") + private ExpressRouteCircuitServiceProviderProperties serviceProviderProperties; + + /** + * The reference to the ExpressRoutePort resource when the circuit is + * provisioned on an ExpressRoutePort resource. + */ + @JsonProperty(value = "properties.expressRoutePort") + private SubResource expressRoutePort; + + /** + * The bandwidth of the circuit when the circuit is provisioned on an + * ExpressRoutePort resource. + */ + @JsonProperty(value = "properties.bandwidthInGbps") + private Double bandwidthInGbps; + + /** + * The identifier of the circuit traffic. Outer tag for QinQ encapsulation. + */ + @JsonProperty(value = "properties.stag", access = JsonProperty.Access.WRITE_ONLY) + private Integer stag; + + /** + * The provisioning state of the express route circuit resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The GatewayManager Etag. + */ + @JsonProperty(value = "properties.gatewayManagerEtag") + private String gatewayManagerEtag; + + /** + * Flag denoting Global reach status. + */ + @JsonProperty(value = "properties.globalReachEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean globalReachEnabled; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the SKU. + * + * @return the sku value + */ + public ExpressRouteCircuitSku sku() { + return this.sku; + } + + /** + * Set the SKU. + * + * @param sku the sku value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withSku(ExpressRouteCircuitSku sku) { + this.sku = sku; + return this; + } + + /** + * Get allow classic operations. + * + * @return the allowClassicOperations value + */ + public Boolean allowClassicOperations() { + return this.allowClassicOperations; + } + + /** + * Set allow classic operations. + * + * @param allowClassicOperations the allowClassicOperations value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withAllowClassicOperations(Boolean allowClassicOperations) { + this.allowClassicOperations = allowClassicOperations; + return this; + } + + /** + * Get the CircuitProvisioningState state of the resource. + * + * @return the circuitProvisioningState value + */ + public String circuitProvisioningState() { + return this.circuitProvisioningState; + } + + /** + * Get the ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'. + * + * @return the serviceProviderProvisioningState value + */ + public ServiceProviderProvisioningState serviceProviderProvisioningState() { + return this.serviceProviderProvisioningState; + } + + /** + * Get the list of authorizations. + * + * @return the authorizations value + */ + public List authorizations() { + return this.authorizations; + } + + /** + * Set the list of authorizations. + * + * @param authorizations the authorizations value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withAuthorizations(List authorizations) { + this.authorizations = authorizations; + return this; + } + + /** + * Get the list of peerings. + * + * @return the peerings value + */ + public List peerings() { + return this.peerings; + } + + /** + * Set the list of peerings. + * + * @param peerings the peerings value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withPeerings(List peerings) { + this.peerings = peerings; + return this; + } + + /** + * Get the ServiceKey. + * + * @return the serviceKey value + */ + public String serviceKey() { + return this.serviceKey; + } + + /** + * Get the ServiceProviderNotes. + * + * @return the serviceProviderNotes value + */ + public String serviceProviderNotes() { + return this.serviceProviderNotes; + } + + /** + * Set the ServiceProviderNotes. + * + * @param serviceProviderNotes the serviceProviderNotes value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withServiceProviderNotes(String serviceProviderNotes) { + this.serviceProviderNotes = serviceProviderNotes; + return this; + } + + /** + * Get the ServiceProviderProperties. + * + * @return the serviceProviderProperties value + */ + public ExpressRouteCircuitServiceProviderProperties serviceProviderProperties() { + return this.serviceProviderProperties; + } + + /** + * Set the ServiceProviderProperties. + * + * @param serviceProviderProperties the serviceProviderProperties value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withServiceProviderProperties(ExpressRouteCircuitServiceProviderProperties serviceProviderProperties) { + this.serviceProviderProperties = serviceProviderProperties; + return this; + } + + /** + * Get the reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource. + * + * @return the expressRoutePort value + */ + public SubResource expressRoutePort() { + return this.expressRoutePort; + } + + /** + * Set the reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource. + * + * @param expressRoutePort the expressRoutePort value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withExpressRoutePort(SubResource expressRoutePort) { + this.expressRoutePort = expressRoutePort; + return this; + } + + /** + * Get the bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource. + * + * @return the bandwidthInGbps value + */ + public Double bandwidthInGbps() { + return this.bandwidthInGbps; + } + + /** + * Set the bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource. + * + * @param bandwidthInGbps the bandwidthInGbps value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withBandwidthInGbps(Double bandwidthInGbps) { + this.bandwidthInGbps = bandwidthInGbps; + return this; + } + + /** + * Get the identifier of the circuit traffic. Outer tag for QinQ encapsulation. + * + * @return the stag value + */ + public Integer stag() { + return this.stag; + } + + /** + * Get the provisioning state of the express route circuit resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the GatewayManager Etag. + * + * @return the gatewayManagerEtag value + */ + public String gatewayManagerEtag() { + return this.gatewayManagerEtag; + } + + /** + * Set the GatewayManager Etag. + * + * @param gatewayManagerEtag the gatewayManagerEtag value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withGatewayManagerEtag(String gatewayManagerEtag) { + this.gatewayManagerEtag = gatewayManagerEtag; + return this; + } + + /** + * Get flag denoting Global reach status. + * + * @return the globalReachEnabled value + */ + public Boolean globalReachEnabled() { + return this.globalReachEnabled; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringImpl.java new file mode 100644 index 000000000000..b54dff592f5d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringImpl.java @@ -0,0 +1,318 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeering; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePeeringType; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePeeringState; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeeringConfig; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.Ipv6ExpressRouteCircuitPeeringConfig; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteConnectionId; +import java.util.List; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitConnection; +import com.microsoft.azure.management.network.v2019_09_01.PeerExpressRouteCircuitConnection; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitStats; + +class ExpressRouteCircuitPeeringImpl extends CreatableUpdatableImpl implements ExpressRouteCircuitPeering, ExpressRouteCircuitPeering.Definition, ExpressRouteCircuitPeering.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String circuitName; + private String peeringName; + + ExpressRouteCircuitPeeringImpl(String name, NetworkManager manager) { + super(name, new ExpressRouteCircuitPeeringInner()); + this.manager = manager; + // Set resource name + this.peeringName = name; + // + } + + ExpressRouteCircuitPeeringImpl(ExpressRouteCircuitPeeringInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.peeringName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.circuitName = IdParsingUtils.getValueFromIdByName(inner.id(), "expressRouteCircuits"); + this.peeringName = IdParsingUtils.getValueFromIdByName(inner.id(), "peerings"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ExpressRouteCircuitPeeringsInner client = this.manager().inner().expressRouteCircuitPeerings(); + return client.createOrUpdateAsync(this.resourceGroupName, this.circuitName, this.peeringName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ExpressRouteCircuitPeeringsInner client = this.manager().inner().expressRouteCircuitPeerings(); + return client.createOrUpdateAsync(this.resourceGroupName, this.circuitName, this.peeringName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ExpressRouteCircuitPeeringsInner client = this.manager().inner().expressRouteCircuitPeerings(); + return client.getAsync(this.resourceGroupName, this.circuitName, this.peeringName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Integer azureASN() { + return this.inner().azureASN(); + } + + @Override + public List connections() { + List lst = new ArrayList(); + if (this.inner().connections() != null) { + for (ExpressRouteCircuitConnectionInner inner : this.inner().connections()) { + lst.add( new ExpressRouteCircuitConnectionImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public ExpressRouteConnectionId expressRouteConnection() { + return this.inner().expressRouteConnection(); + } + + @Override + public String gatewayManagerEtag() { + return this.inner().gatewayManagerEtag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig() { + return this.inner().ipv6PeeringConfig(); + } + + @Override + public String lastModifiedBy() { + return this.inner().lastModifiedBy(); + } + + @Override + public ExpressRouteCircuitPeeringConfig microsoftPeeringConfig() { + return this.inner().microsoftPeeringConfig(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Long peerASN() { + return this.inner().peerASN(); + } + + @Override + public List peeredConnections() { + List lst = new ArrayList(); + if (this.inner().peeredConnections() != null) { + for (PeerExpressRouteCircuitConnectionInner inner : this.inner().peeredConnections()) { + lst.add( new PeerExpressRouteCircuitConnectionImpl(inner, manager())); + } + } + return lst; + } + + @Override + public ExpressRoutePeeringType peeringType() { + return this.inner().peeringType(); + } + + @Override + public String primaryAzurePort() { + return this.inner().primaryAzurePort(); + } + + @Override + public String primaryPeerAddressPrefix() { + return this.inner().primaryPeerAddressPrefix(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public SubResource routeFilter() { + return this.inner().routeFilter(); + } + + @Override + public String secondaryAzurePort() { + return this.inner().secondaryAzurePort(); + } + + @Override + public String secondaryPeerAddressPrefix() { + return this.inner().secondaryPeerAddressPrefix(); + } + + @Override + public String sharedKey() { + return this.inner().sharedKey(); + } + + @Override + public ExpressRoutePeeringState state() { + return this.inner().state(); + } + + @Override + public ExpressRouteCircuitStats stats() { + ExpressRouteCircuitStatsInner inner = this.inner().stats(); + if (inner != null) { + return new ExpressRouteCircuitStatsImpl(inner, manager()); + } else { + return null; + } + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public Integer vlanId() { + return this.inner().vlanId(); + } + + @Override + public ExpressRouteCircuitPeeringImpl withExistingExpressRouteCircuit(String resourceGroupName, String circuitName) { + this.resourceGroupName = resourceGroupName; + this.circuitName = circuitName; + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withExpressRouteConnection(ExpressRouteConnectionId expressRouteConnection) { + this.inner().withExpressRouteConnection(expressRouteConnection); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withGatewayManagerEtag(String gatewayManagerEtag) { + this.inner().withGatewayManagerEtag(gatewayManagerEtag); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withIpv6PeeringConfig(Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig) { + this.inner().withIpv6PeeringConfig(ipv6PeeringConfig); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withMicrosoftPeeringConfig(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig) { + this.inner().withMicrosoftPeeringConfig(microsoftPeeringConfig); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withPeerASN(Long peerASN) { + this.inner().withPeerASN(peerASN); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withPeeringType(ExpressRoutePeeringType peeringType) { + this.inner().withPeeringType(peeringType); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withPrimaryPeerAddressPrefix(String primaryPeerAddressPrefix) { + this.inner().withPrimaryPeerAddressPrefix(primaryPeerAddressPrefix); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withRouteFilter(SubResource routeFilter) { + this.inner().withRouteFilter(routeFilter); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withSecondaryPeerAddressPrefix(String secondaryPeerAddressPrefix) { + this.inner().withSecondaryPeerAddressPrefix(secondaryPeerAddressPrefix); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withSharedKey(String sharedKey) { + this.inner().withSharedKey(sharedKey); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withState(ExpressRoutePeeringState state) { + this.inner().withState(state); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withStats(ExpressRouteCircuitStatsInner stats) { + this.inner().withStats(stats); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withVlanId(Integer vlanId) { + this.inner().withVlanId(vlanId); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringInner.java new file mode 100644 index 000000000000..e581d660bc36 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringInner.java @@ -0,0 +1,531 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePeeringType; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePeeringState; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeeringConfig; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.Ipv6ExpressRouteCircuitPeeringConfig; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteConnectionId; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Peering in an ExpressRouteCircuit resource. + */ +@JsonFlatten +public class ExpressRouteCircuitPeeringInner extends SubResource { + /** + * The peering type. Possible values include: 'AzurePublicPeering', + * 'AzurePrivatePeering', 'MicrosoftPeering'. + */ + @JsonProperty(value = "properties.peeringType") + private ExpressRoutePeeringType peeringType; + + /** + * The peering state. Possible values include: 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "properties.state") + private ExpressRoutePeeringState state; + + /** + * The Azure ASN. + */ + @JsonProperty(value = "properties.azureASN", access = JsonProperty.Access.WRITE_ONLY) + private Integer azureASN; + + /** + * The peer ASN. + */ + @JsonProperty(value = "properties.peerASN") + private Long peerASN; + + /** + * The primary address prefix. + */ + @JsonProperty(value = "properties.primaryPeerAddressPrefix") + private String primaryPeerAddressPrefix; + + /** + * The secondary address prefix. + */ + @JsonProperty(value = "properties.secondaryPeerAddressPrefix") + private String secondaryPeerAddressPrefix; + + /** + * The primary port. + */ + @JsonProperty(value = "properties.primaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) + private String primaryAzurePort; + + /** + * The secondary port. + */ + @JsonProperty(value = "properties.secondaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryAzurePort; + + /** + * The shared key. + */ + @JsonProperty(value = "properties.sharedKey") + private String sharedKey; + + /** + * The VLAN ID. + */ + @JsonProperty(value = "properties.vlanId") + private Integer vlanId; + + /** + * The Microsoft peering configuration. + */ + @JsonProperty(value = "properties.microsoftPeeringConfig") + private ExpressRouteCircuitPeeringConfig microsoftPeeringConfig; + + /** + * The peering stats of express route circuit. + */ + @JsonProperty(value = "properties.stats") + private ExpressRouteCircuitStatsInner stats; + + /** + * The provisioning state of the express route circuit peering resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The GatewayManager Etag. + */ + @JsonProperty(value = "properties.gatewayManagerEtag") + private String gatewayManagerEtag; + + /** + * Who was the last to modify the peering. + */ + @JsonProperty(value = "properties.lastModifiedBy", access = JsonProperty.Access.WRITE_ONLY) + private String lastModifiedBy; + + /** + * The reference of the RouteFilter resource. + */ + @JsonProperty(value = "properties.routeFilter") + private SubResource routeFilter; + + /** + * The IPv6 peering configuration. + */ + @JsonProperty(value = "properties.ipv6PeeringConfig") + private Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig; + + /** + * The ExpressRoute connection. + */ + @JsonProperty(value = "properties.expressRouteConnection") + private ExpressRouteConnectionId expressRouteConnection; + + /** + * The list of circuit connections associated with Azure Private Peering + * for this circuit. + */ + @JsonProperty(value = "properties.connections", access = JsonProperty.Access.WRITE_ONLY) + private List connections; + + /** + * The list of peered circuit connections associated with Azure Private + * Peering for this circuit. + */ + @JsonProperty(value = "properties.peeredConnections", access = JsonProperty.Access.WRITE_ONLY) + private List peeredConnections; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'. + * + * @return the peeringType value + */ + public ExpressRoutePeeringType peeringType() { + return this.peeringType; + } + + /** + * Set the peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'. + * + * @param peeringType the peeringType value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withPeeringType(ExpressRoutePeeringType peeringType) { + this.peeringType = peeringType; + return this; + } + + /** + * Get the peering state. Possible values include: 'Disabled', 'Enabled'. + * + * @return the state value + */ + public ExpressRoutePeeringState state() { + return this.state; + } + + /** + * Set the peering state. Possible values include: 'Disabled', 'Enabled'. + * + * @param state the state value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withState(ExpressRoutePeeringState state) { + this.state = state; + return this; + } + + /** + * Get the Azure ASN. + * + * @return the azureASN value + */ + public Integer azureASN() { + return this.azureASN; + } + + /** + * Get the peer ASN. + * + * @return the peerASN value + */ + public Long peerASN() { + return this.peerASN; + } + + /** + * Set the peer ASN. + * + * @param peerASN the peerASN value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withPeerASN(Long peerASN) { + this.peerASN = peerASN; + return this; + } + + /** + * Get the primary address prefix. + * + * @return the primaryPeerAddressPrefix value + */ + public String primaryPeerAddressPrefix() { + return this.primaryPeerAddressPrefix; + } + + /** + * Set the primary address prefix. + * + * @param primaryPeerAddressPrefix the primaryPeerAddressPrefix value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withPrimaryPeerAddressPrefix(String primaryPeerAddressPrefix) { + this.primaryPeerAddressPrefix = primaryPeerAddressPrefix; + return this; + } + + /** + * Get the secondary address prefix. + * + * @return the secondaryPeerAddressPrefix value + */ + public String secondaryPeerAddressPrefix() { + return this.secondaryPeerAddressPrefix; + } + + /** + * Set the secondary address prefix. + * + * @param secondaryPeerAddressPrefix the secondaryPeerAddressPrefix value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withSecondaryPeerAddressPrefix(String secondaryPeerAddressPrefix) { + this.secondaryPeerAddressPrefix = secondaryPeerAddressPrefix; + return this; + } + + /** + * Get the primary port. + * + * @return the primaryAzurePort value + */ + public String primaryAzurePort() { + return this.primaryAzurePort; + } + + /** + * Get the secondary port. + * + * @return the secondaryAzurePort value + */ + public String secondaryAzurePort() { + return this.secondaryAzurePort; + } + + /** + * Get the shared key. + * + * @return the sharedKey value + */ + public String sharedKey() { + return this.sharedKey; + } + + /** + * Set the shared key. + * + * @param sharedKey the sharedKey value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withSharedKey(String sharedKey) { + this.sharedKey = sharedKey; + return this; + } + + /** + * Get the VLAN ID. + * + * @return the vlanId value + */ + public Integer vlanId() { + return this.vlanId; + } + + /** + * Set the VLAN ID. + * + * @param vlanId the vlanId value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withVlanId(Integer vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * Get the Microsoft peering configuration. + * + * @return the microsoftPeeringConfig value + */ + public ExpressRouteCircuitPeeringConfig microsoftPeeringConfig() { + return this.microsoftPeeringConfig; + } + + /** + * Set the Microsoft peering configuration. + * + * @param microsoftPeeringConfig the microsoftPeeringConfig value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withMicrosoftPeeringConfig(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig) { + this.microsoftPeeringConfig = microsoftPeeringConfig; + return this; + } + + /** + * Get the peering stats of express route circuit. + * + * @return the stats value + */ + public ExpressRouteCircuitStatsInner stats() { + return this.stats; + } + + /** + * Set the peering stats of express route circuit. + * + * @param stats the stats value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withStats(ExpressRouteCircuitStatsInner stats) { + this.stats = stats; + return this; + } + + /** + * Get the provisioning state of the express route circuit peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the GatewayManager Etag. + * + * @return the gatewayManagerEtag value + */ + public String gatewayManagerEtag() { + return this.gatewayManagerEtag; + } + + /** + * Set the GatewayManager Etag. + * + * @param gatewayManagerEtag the gatewayManagerEtag value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withGatewayManagerEtag(String gatewayManagerEtag) { + this.gatewayManagerEtag = gatewayManagerEtag; + return this; + } + + /** + * Get who was the last to modify the peering. + * + * @return the lastModifiedBy value + */ + public String lastModifiedBy() { + return this.lastModifiedBy; + } + + /** + * Get the reference of the RouteFilter resource. + * + * @return the routeFilter value + */ + public SubResource routeFilter() { + return this.routeFilter; + } + + /** + * Set the reference of the RouteFilter resource. + * + * @param routeFilter the routeFilter value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withRouteFilter(SubResource routeFilter) { + this.routeFilter = routeFilter; + return this; + } + + /** + * Get the IPv6 peering configuration. + * + * @return the ipv6PeeringConfig value + */ + public Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig() { + return this.ipv6PeeringConfig; + } + + /** + * Set the IPv6 peering configuration. + * + * @param ipv6PeeringConfig the ipv6PeeringConfig value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withIpv6PeeringConfig(Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig) { + this.ipv6PeeringConfig = ipv6PeeringConfig; + return this; + } + + /** + * Get the ExpressRoute connection. + * + * @return the expressRouteConnection value + */ + public ExpressRouteConnectionId expressRouteConnection() { + return this.expressRouteConnection; + } + + /** + * Set the ExpressRoute connection. + * + * @param expressRouteConnection the expressRouteConnection value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withExpressRouteConnection(ExpressRouteConnectionId expressRouteConnection) { + this.expressRouteConnection = expressRouteConnection; + return this; + } + + /** + * Get the list of circuit connections associated with Azure Private Peering for this circuit. + * + * @return the connections value + */ + public List connections() { + return this.connections; + } + + /** + * Get the list of peered circuit connections associated with Azure Private Peering for this circuit. + * + * @return the peeredConnections value + */ + public List peeredConnections() { + return this.peeredConnections; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringsImpl.java new file mode 100644 index 000000000000..b691e2071a7a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeerings; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeering; + +class ExpressRouteCircuitPeeringsImpl extends WrapperImpl implements ExpressRouteCircuitPeerings { + private final NetworkManager manager; + + ExpressRouteCircuitPeeringsImpl(NetworkManager manager) { + super(manager.inner().expressRouteCircuitPeerings()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public ExpressRouteCircuitPeeringImpl define(String name) { + return wrapModel(name); + } + + private ExpressRouteCircuitPeeringImpl wrapModel(ExpressRouteCircuitPeeringInner inner) { + return new ExpressRouteCircuitPeeringImpl(inner, manager()); + } + + private ExpressRouteCircuitPeeringImpl wrapModel(String name) { + return new ExpressRouteCircuitPeeringImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String circuitName) { + ExpressRouteCircuitPeeringsInner client = this.inner(); + return client.listAsync(resourceGroupName, circuitName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ExpressRouteCircuitPeering call(ExpressRouteCircuitPeeringInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String circuitName, String peeringName) { + ExpressRouteCircuitPeeringsInner client = this.inner(); + return client.getAsync(resourceGroupName, circuitName, peeringName) + .flatMap(new Func1>() { + @Override + public Observable call(ExpressRouteCircuitPeeringInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ExpressRouteCircuitPeering)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String circuitName, String peeringName) { + ExpressRouteCircuitPeeringsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, circuitName, peeringName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringsInner.java new file mode 100644 index 000000000000..f96e35b5c25d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringsInner.java @@ -0,0 +1,764 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 ExpressRouteCircuitPeerings. + */ +public class ExpressRouteCircuitPeeringsInner { + /** The Retrofit service to perform REST calls. */ + private ExpressRouteCircuitPeeringsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRouteCircuitPeeringsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRouteCircuitPeeringsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRouteCircuitPeeringsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRouteCircuitPeerings to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRouteCircuitPeeringsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeerings delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @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.network.v2019_09_01.ExpressRouteCircuitPeerings beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @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.network.v2019_09_01.ExpressRouteCircuitPeerings get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @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.network.v2019_09_01.ExpressRouteCircuitPeerings createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitPeeringInner peeringParameters, @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.network.v2019_09_01.ExpressRouteCircuitPeerings beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitPeeringInner peeringParameters, @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.network.v2019_09_01.ExpressRouteCircuitPeerings list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @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.network.v2019_09_01.ExpressRouteCircuitPeerings listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified peering from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 circuitName, String peeringName) { + deleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).toBlocking().last().body(); + } + + /** + * Deletes the specified peering from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @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 circuitName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName), serviceCallback); + } + + /** + * Deletes the specified peering from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String circuitName, String peeringName) { + return deleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified peering from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified peering from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 circuitName, String peeringName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).toBlocking().single().body(); + } + + /** + * Deletes the specified peering from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @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 circuitName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName), serviceCallback); + } + + /** + * Deletes the specified peering from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String circuitName, String peeringName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified peering from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified peering for the express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitPeeringInner object if successful. + */ + public ExpressRouteCircuitPeeringInner get(String resourceGroupName, String circuitName, String peeringName) { + return getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).toBlocking().single().body(); + } + + /** + * Gets the specified peering for the express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @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 circuitName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName), serviceCallback); + } + + /** + * Gets the specified peering for the express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitPeeringInner object + */ + public Observable getAsync(String resourceGroupName, String circuitName, String peeringName) { + return getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).map(new Func1, ExpressRouteCircuitPeeringInner>() { + @Override + public ExpressRouteCircuitPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified peering for the express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitPeeringInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates a peering in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update express route circuit peering 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 ExpressRouteCircuitPeeringInner object if successful. + */ + public ExpressRouteCircuitPeeringInner createOrUpdate(String resourceGroupName, String circuitName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, peeringParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a peering in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update express route circuit peering 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 createOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, peeringParameters), serviceCallback); + } + + /** + * Creates or updates a peering in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update express route circuit peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, peeringParameters).map(new Func1, ExpressRouteCircuitPeeringInner>() { + @Override + public ExpressRouteCircuitPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a peering in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update express route circuit peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName 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 (peeringParameters == null) { + throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); + } + Validator.validate(peeringParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a peering in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update express route circuit peering 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 ExpressRouteCircuitPeeringInner object if successful. + */ + public ExpressRouteCircuitPeeringInner beginCreateOrUpdate(String resourceGroupName, String circuitName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, peeringParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a peering in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update express route circuit peering 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 beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, peeringParameters), serviceCallback); + } + + /** + * Creates or updates a peering in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update express route circuit peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitPeeringInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, peeringParameters).map(new Func1, ExpressRouteCircuitPeeringInner>() { + @Override + public ExpressRouteCircuitPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a peering in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update express route circuit peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitPeeringInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName 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 (peeringParameters == null) { + throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); + } + Validator.validate(peeringParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 all peerings in a specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ExpressRouteCircuitPeeringInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String circuitName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, circuitName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all peerings in a specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @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 resourceGroupName, final String circuitName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, circuitName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all peerings in a specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCircuitPeeringInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String circuitName) { + return listWithServiceResponseAsync(resourceGroupName, circuitName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all peerings in a specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCircuitPeeringInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String circuitName) { + return listSinglePageAsync(resourceGroupName, circuitName) + .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 all peerings in a specified express route circuit. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCircuitPeeringInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String circuitName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, circuitName, this.client.subscriptionId(), 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 all peerings in a specified express route circuit. + * + * @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<ExpressRouteCircuitPeeringInner> 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 all peerings in a specified express route circuit. + * + * @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 all peerings in a specified express route circuit. + * + * @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<ExpressRouteCircuitPeeringInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all peerings in a specified express route circuit. + * + * @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<ExpressRouteCircuitPeeringInner> 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 all peerings in a specified express route circuit. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCircuitPeeringInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitStatsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitStatsImpl.java new file mode 100644 index 000000000000..6be92db65400 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitStatsImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitStats; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class ExpressRouteCircuitStatsImpl extends WrapperImpl implements ExpressRouteCircuitStats { + private final NetworkManager manager; + ExpressRouteCircuitStatsImpl(ExpressRouteCircuitStatsInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Long primarybytesIn() { + return this.inner().primarybytesIn(); + } + + @Override + public Long primarybytesOut() { + return this.inner().primarybytesOut(); + } + + @Override + public Long secondarybytesIn() { + return this.inner().secondarybytesIn(); + } + + @Override + public Long secondarybytesOut() { + return this.inner().secondarybytesOut(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitStatsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitStatsInner.java new file mode 100644 index 000000000000..a047b3fa2805 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitStatsInner.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.network.v2019_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains stats associated with the peering. + */ +public class ExpressRouteCircuitStatsInner { + /** + * The Primary BytesIn of the peering. + */ + @JsonProperty(value = "primarybytesIn") + private Long primarybytesIn; + + /** + * The primary BytesOut of the peering. + */ + @JsonProperty(value = "primarybytesOut") + private Long primarybytesOut; + + /** + * The secondary BytesIn of the peering. + */ + @JsonProperty(value = "secondarybytesIn") + private Long secondarybytesIn; + + /** + * The secondary BytesOut of the peering. + */ + @JsonProperty(value = "secondarybytesOut") + private Long secondarybytesOut; + + /** + * Get the Primary BytesIn of the peering. + * + * @return the primarybytesIn value + */ + public Long primarybytesIn() { + return this.primarybytesIn; + } + + /** + * Set the Primary BytesIn of the peering. + * + * @param primarybytesIn the primarybytesIn value to set + * @return the ExpressRouteCircuitStatsInner object itself. + */ + public ExpressRouteCircuitStatsInner withPrimarybytesIn(Long primarybytesIn) { + this.primarybytesIn = primarybytesIn; + return this; + } + + /** + * Get the primary BytesOut of the peering. + * + * @return the primarybytesOut value + */ + public Long primarybytesOut() { + return this.primarybytesOut; + } + + /** + * Set the primary BytesOut of the peering. + * + * @param primarybytesOut the primarybytesOut value to set + * @return the ExpressRouteCircuitStatsInner object itself. + */ + public ExpressRouteCircuitStatsInner withPrimarybytesOut(Long primarybytesOut) { + this.primarybytesOut = primarybytesOut; + return this; + } + + /** + * Get the secondary BytesIn of the peering. + * + * @return the secondarybytesIn value + */ + public Long secondarybytesIn() { + return this.secondarybytesIn; + } + + /** + * Set the secondary BytesIn of the peering. + * + * @param secondarybytesIn the secondarybytesIn value to set + * @return the ExpressRouteCircuitStatsInner object itself. + */ + public ExpressRouteCircuitStatsInner withSecondarybytesIn(Long secondarybytesIn) { + this.secondarybytesIn = secondarybytesIn; + return this; + } + + /** + * Get the secondary BytesOut of the peering. + * + * @return the secondarybytesOut value + */ + public Long secondarybytesOut() { + return this.secondarybytesOut; + } + + /** + * Set the secondary BytesOut of the peering. + * + * @param secondarybytesOut the secondarybytesOut value to set + * @return the ExpressRouteCircuitStatsInner object itself. + */ + public ExpressRouteCircuitStatsInner withSecondarybytesOut(Long secondarybytesOut) { + this.secondarybytesOut = secondarybytesOut; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsArpTableListResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsArpTableListResultImpl.java new file mode 100644 index 000000000000..34f6623f3918 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsArpTableListResultImpl.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitsArpTableListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitArpTable; + +class ExpressRouteCircuitsArpTableListResultImpl extends WrapperImpl implements ExpressRouteCircuitsArpTableListResult { + private final NetworkManager manager; + ExpressRouteCircuitsArpTableListResultImpl(ExpressRouteCircuitsArpTableListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsArpTableListResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsArpTableListResultInner.java new file mode 100644 index 000000000000..9e2863bcfd8a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsArpTableListResultInner.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitArpTable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for ListArpTable associated with the Express Route Circuits API. + */ +public class ExpressRouteCircuitsArpTableListResultInner { + /** + * A list of the ARP tables. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get a list of the ARP tables. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set a list of the ARP tables. + * + * @param value the value value to set + * @return the ExpressRouteCircuitsArpTableListResultInner object itself. + */ + public ExpressRouteCircuitsArpTableListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the URL to get the next set of results. + * + * @param nextLink the nextLink value to set + * @return the ExpressRouteCircuitsArpTableListResultInner object itself. + */ + public ExpressRouteCircuitsArpTableListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsImpl.java new file mode 100644 index 000000000000..9b373284d0eb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuits; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuit; +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.network.v2019_09_01.ExpressRouteCircuitsArpTableListResult; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitsRoutesTableListResult; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitsRoutesTableSummaryListResult; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitStats; + +class ExpressRouteCircuitsImpl extends GroupableResourcesCoreImpl implements ExpressRouteCircuits { + protected ExpressRouteCircuitsImpl(NetworkManager manager) { + super(manager.inner().expressRouteCircuits(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ExpressRouteCircuitsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ExpressRouteCircuitsInner 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) { + ExpressRouteCircuitsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ExpressRouteCircuitsInner 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 ExpressRouteCircuit call(ExpressRouteCircuitInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ExpressRouteCircuitsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ExpressRouteCircuitsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ExpressRouteCircuit call(ExpressRouteCircuitInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public ExpressRouteCircuitImpl define(String name) { + return wrapModel(name); + } + + @Override + protected ExpressRouteCircuitImpl wrapModel(ExpressRouteCircuitInner inner) { + return new ExpressRouteCircuitImpl(inner.name(), inner, manager()); + } + + @Override + protected ExpressRouteCircuitImpl wrapModel(String name) { + return new ExpressRouteCircuitImpl(name, new ExpressRouteCircuitInner(), this.manager()); + } + + @Override + public Observable listArpTableAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + ExpressRouteCircuitsInner client = this.inner(); + return client.listArpTableAsync(resourceGroupName, circuitName, peeringName, devicePath) + .map(new Func1() { + @Override + public ExpressRouteCircuitsArpTableListResult call(ExpressRouteCircuitsArpTableListResultInner inner) { + return new ExpressRouteCircuitsArpTableListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listRoutesTableAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + ExpressRouteCircuitsInner client = this.inner(); + return client.listRoutesTableAsync(resourceGroupName, circuitName, peeringName, devicePath) + .map(new Func1() { + @Override + public ExpressRouteCircuitsRoutesTableListResult call(ExpressRouteCircuitsRoutesTableListResultInner inner) { + return new ExpressRouteCircuitsRoutesTableListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listRoutesTableSummaryAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + ExpressRouteCircuitsInner client = this.inner(); + return client.listRoutesTableSummaryAsync(resourceGroupName, circuitName, peeringName, devicePath) + .map(new Func1() { + @Override + public ExpressRouteCircuitsRoutesTableSummaryListResult call(ExpressRouteCircuitsRoutesTableSummaryListResultInner inner) { + return new ExpressRouteCircuitsRoutesTableSummaryListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable getStatsAsync(String resourceGroupName, String circuitName) { + ExpressRouteCircuitsInner client = this.inner(); + return client.getStatsAsync(resourceGroupName, circuitName) + .map(new Func1() { + @Override + public ExpressRouteCircuitStats call(ExpressRouteCircuitStatsInner inner) { + return new ExpressRouteCircuitStatsImpl(inner, manager()); + } + }); + } + + @Override + public Observable getPeeringStatsAsync(String resourceGroupName, String circuitName, String peeringName) { + ExpressRouteCircuitsInner client = this.inner(); + return client.getPeeringStatsAsync(resourceGroupName, circuitName, peeringName) + .map(new Func1() { + @Override + public ExpressRouteCircuitStats call(ExpressRouteCircuitStatsInner inner) { + return new ExpressRouteCircuitStatsImpl(inner, manager()); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsInner.java new file mode 100644 index 000000000000..39c120d2235a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsInner.java @@ -0,0 +1,1878 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in ExpressRouteCircuits. + */ +public class ExpressRouteCircuitsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ExpressRouteCircuitsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRouteCircuitsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRouteCircuitsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRouteCircuitsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRouteCircuits to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRouteCircuitsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuits delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @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.network.v2019_09_01.ExpressRouteCircuits beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @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.network.v2019_09_01.ExpressRouteCircuits getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @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.network.v2019_09_01.ExpressRouteCircuits createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitInner 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.network.v2019_09_01.ExpressRouteCircuits beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitInner 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.network.v2019_09_01.ExpressRouteCircuits updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuits listArpTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}") + Observable> listArpTable(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.v2019_09_01.ExpressRouteCircuits beginListArpTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}") + Observable> beginListArpTable(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.v2019_09_01.ExpressRouteCircuits listRoutesTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}") + Observable> listRoutesTable(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.v2019_09_01.ExpressRouteCircuits beginListRoutesTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}") + Observable> beginListRoutesTable(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.v2019_09_01.ExpressRouteCircuits listRoutesTableSummary" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}") + Observable> listRoutesTableSummary(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.v2019_09_01.ExpressRouteCircuits beginListRoutesTableSummary" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}") + Observable> beginListRoutesTableSummary(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.v2019_09_01.ExpressRouteCircuits getStats" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stats") + Observable> getStats(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @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.network.v2019_09_01.ExpressRouteCircuits getPeeringStats" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats") + Observable> getPeeringStats(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @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.network.v2019_09_01.ExpressRouteCircuits listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.ExpressRouteCircuits list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits") + Observable> list(@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.network.v2019_09_01.ExpressRouteCircuits 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.network.v2019_09_01.ExpressRouteCircuits listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 circuitName) { + deleteWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().last().body(); + } + + /** + * Deletes the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @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 circuitName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, circuitName), serviceCallback); + } + + /** + * Deletes the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String circuitName) { + return deleteWithServiceResponseAsync(resourceGroupName, circuitName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String circuitName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 circuitName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().single().body(); + } + + /** + * Deletes the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @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 circuitName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName), serviceCallback); + } + + /** + * Deletes the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String circuitName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String circuitName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, circuitName, this.client.subscriptionId(), 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); + } + + /** + * Gets information about the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitInner object if successful. + */ + public ExpressRouteCircuitInner getByResourceGroup(String resourceGroupName, String circuitName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().single().body(); + } + + /** + * Gets information about the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of express route circuit. + * @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 circuitName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, circuitName), serviceCallback); + } + + /** + * Gets information about the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String circuitName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, circuitName).map(new Func1, ExpressRouteCircuitInner>() { + @Override + public ExpressRouteCircuitInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String circuitName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, circuitName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param parameters Parameters supplied to the create or update express route circuit 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 ExpressRouteCircuitInner object if successful. + */ + public ExpressRouteCircuitInner createOrUpdate(String resourceGroupName, String circuitName, ExpressRouteCircuitInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param parameters Parameters supplied to the create or update express route circuit 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 createOrUpdateAsync(String resourceGroupName, String circuitName, ExpressRouteCircuitInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, parameters), serviceCallback); + } + + /** + * Creates or updates an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param parameters Parameters supplied to the create or update express route circuit operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String circuitName, ExpressRouteCircuitInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, parameters).map(new Func1, ExpressRouteCircuitInner>() { + @Override + public ExpressRouteCircuitInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param parameters Parameters supplied to the create or update express route circuit operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String circuitName, ExpressRouteCircuitInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param parameters Parameters supplied to the create or update express route circuit 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 ExpressRouteCircuitInner object if successful. + */ + public ExpressRouteCircuitInner beginCreateOrUpdate(String resourceGroupName, String circuitName, ExpressRouteCircuitInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param parameters Parameters supplied to the create or update express route circuit 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 beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, ExpressRouteCircuitInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, parameters), serviceCallback); + } + + /** + * Creates or updates an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param parameters Parameters supplied to the create or update express route circuit operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, ExpressRouteCircuitInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, parameters).map(new Func1, ExpressRouteCircuitInner>() { + @Override + public ExpressRouteCircuitInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param parameters Parameters supplied to the create or update express route circuit operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String circuitName, ExpressRouteCircuitInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, circuitName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitInner object if successful. + */ + public ExpressRouteCircuitInner updateTags(String resourceGroupName, String circuitName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().single().body(); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @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 updateTagsAsync(String resourceGroupName, String circuitName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, circuitName), serviceCallback); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String circuitName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName).map(new Func1, ExpressRouteCircuitInner>() { + @Override + public ExpressRouteCircuitInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String circuitName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitInner object if successful. + */ + public ExpressRouteCircuitInner updateTags(String resourceGroupName, String circuitName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags).toBlocking().single().body(); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String circuitName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags), serviceCallback); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String circuitName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags).map(new Func1, ExpressRouteCircuitInner>() { + @Override + public ExpressRouteCircuitInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String circuitName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 currently advertised ARP table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitsArpTableListResultInner object if successful. + */ + public ExpressRouteCircuitsArpTableListResultInner listArpTable(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + return listArpTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).toBlocking().last().body(); + } + + /** + * Gets the currently advertised ARP table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @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 listArpTableAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listArpTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised ARP table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listArpTableAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + return listArpTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsArpTableListResultInner>() { + @Override + public ExpressRouteCircuitsArpTableListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised ARP table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listArpTableWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.listArpTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets the currently advertised ARP table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitsArpTableListResultInner object if successful. + */ + public ExpressRouteCircuitsArpTableListResultInner beginListArpTable(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + return beginListArpTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).toBlocking().single().body(); + } + + /** + * Gets the currently advertised ARP table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @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 beginListArpTableAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListArpTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised ARP table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsArpTableListResultInner object + */ + public Observable beginListArpTableAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + return beginListArpTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsArpTableListResultInner>() { + @Override + public ExpressRouteCircuitsArpTableListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised ARP table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsArpTableListResultInner object + */ + public Observable> beginListArpTableWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginListArpTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListArpTableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListArpTableDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the currently advertised routes table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitsRoutesTableListResultInner object if successful. + */ + public ExpressRouteCircuitsRoutesTableListResultInner listRoutesTable(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + return listRoutesTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).toBlocking().last().body(); + } + + /** + * Gets the currently advertised routes table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @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 listRoutesTableAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listRoutesTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised routes table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listRoutesTableAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + return listRoutesTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsRoutesTableListResultInner>() { + @Override + public ExpressRouteCircuitsRoutesTableListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised routes table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listRoutesTableWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.listRoutesTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets the currently advertised routes table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitsRoutesTableListResultInner object if successful. + */ + public ExpressRouteCircuitsRoutesTableListResultInner beginListRoutesTable(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + return beginListRoutesTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).toBlocking().single().body(); + } + + /** + * Gets the currently advertised routes table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @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 beginListRoutesTableAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListRoutesTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised routes table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsRoutesTableListResultInner object + */ + public Observable beginListRoutesTableAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + return beginListRoutesTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsRoutesTableListResultInner>() { + @Override + public ExpressRouteCircuitsRoutesTableListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised routes table associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsRoutesTableListResultInner object + */ + public Observable> beginListRoutesTableWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginListRoutesTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListRoutesTableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListRoutesTableDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the currently advertised routes table summary associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitsRoutesTableSummaryListResultInner object if successful. + */ + public ExpressRouteCircuitsRoutesTableSummaryListResultInner listRoutesTableSummary(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + return listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).toBlocking().last().body(); + } + + /** + * Gets the currently advertised routes table summary associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @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 listRoutesTableSummaryAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised routes table summary associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listRoutesTableSummaryAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + return listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsRoutesTableSummaryListResultInner>() { + @Override + public ExpressRouteCircuitsRoutesTableSummaryListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised routes table summary associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listRoutesTableSummaryWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.listRoutesTableSummary(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets the currently advertised routes table summary associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitsRoutesTableSummaryListResultInner object if successful. + */ + public ExpressRouteCircuitsRoutesTableSummaryListResultInner beginListRoutesTableSummary(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + return beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).toBlocking().single().body(); + } + + /** + * Gets the currently advertised routes table summary associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @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 beginListRoutesTableSummaryAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised routes table summary associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsRoutesTableSummaryListResultInner object + */ + public Observable beginListRoutesTableSummaryAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + return beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsRoutesTableSummaryListResultInner>() { + @Override + public ExpressRouteCircuitsRoutesTableSummaryListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised routes table summary associated with the express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsRoutesTableSummaryListResultInner object + */ + public Observable> beginListRoutesTableSummaryWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginListRoutesTableSummary(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListRoutesTableSummaryDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListRoutesTableSummaryDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all the stats from an express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitStatsInner object if successful. + */ + public ExpressRouteCircuitStatsInner getStats(String resourceGroupName, String circuitName) { + return getStatsWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().single().body(); + } + + /** + * Gets all the stats from an express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @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 getStatsAsync(String resourceGroupName, String circuitName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getStatsWithServiceResponseAsync(resourceGroupName, circuitName), serviceCallback); + } + + /** + * Gets all the stats from an express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitStatsInner object + */ + public Observable getStatsAsync(String resourceGroupName, String circuitName) { + return getStatsWithServiceResponseAsync(resourceGroupName, circuitName).map(new Func1, ExpressRouteCircuitStatsInner>() { + @Override + public ExpressRouteCircuitStatsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all the stats from an express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitStatsInner object + */ + public Observable> getStatsWithServiceResponseAsync(String resourceGroupName, String circuitName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getStats(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getStatsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getStatsDelegate(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 all stats from an express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitStatsInner object if successful. + */ + public ExpressRouteCircuitStatsInner getPeeringStats(String resourceGroupName, String circuitName, String peeringName) { + return getPeeringStatsWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).toBlocking().single().body(); + } + + /** + * Gets all stats from an express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @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 getPeeringStatsAsync(String resourceGroupName, String circuitName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPeeringStatsWithServiceResponseAsync(resourceGroupName, circuitName, peeringName), serviceCallback); + } + + /** + * Gets all stats from an express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitStatsInner object + */ + public Observable getPeeringStatsAsync(String resourceGroupName, String circuitName, String peeringName) { + return getPeeringStatsWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).map(new Func1, ExpressRouteCircuitStatsInner>() { + @Override + public ExpressRouteCircuitStatsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all stats from an express route circuit in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitStatsInner object + */ + public Observable> getPeeringStatsWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getPeeringStats(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPeeringStatsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPeeringStatsDelegate(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 all the express route circuits in a resource group. + * + * @param resourceGroupName The name of the 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<ExpressRouteCircuitInner> 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 all the express route circuits in a resource group. + * + * @param resourceGroupName The name of the 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 all the express route circuits in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCircuitInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the express route circuits in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCircuitInner> 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 all the express route circuits in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCircuitInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all the express route circuits in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ExpressRouteCircuitInner> 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 all the express route circuits in a subscription. + * + * @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 all the express route circuits in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCircuitInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the express route circuits in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCircuitInner> 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 all the express route circuits in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCircuitInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all the express route circuits in a resource group. + * + * @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<ExpressRouteCircuitInner> 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 all the express route circuits in a resource group. + * + * @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 all the express route circuits in a resource group. + * + * @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<ExpressRouteCircuitInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the express route circuits in a resource group. + * + * @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<ExpressRouteCircuitInner> 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 all the express route circuits in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCircuitInner> 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 all the express route circuits in a subscription. + * + * @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<ExpressRouteCircuitInner> 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 all the express route circuits in a subscription. + * + * @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 all the express route circuits in a subscription. + * + * @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<ExpressRouteCircuitInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the express route circuits in a subscription. + * + * @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<ExpressRouteCircuitInner> 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 all the express route circuits in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCircuitInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableListResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableListResultImpl.java new file mode 100644 index 000000000000..8f23111ec6ab --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableListResultImpl.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitsRoutesTableListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitRoutesTable; + +class ExpressRouteCircuitsRoutesTableListResultImpl extends WrapperImpl implements ExpressRouteCircuitsRoutesTableListResult { + private final NetworkManager manager; + ExpressRouteCircuitsRoutesTableListResultImpl(ExpressRouteCircuitsRoutesTableListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableListResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableListResultInner.java new file mode 100644 index 000000000000..8fb0f5d5640f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableListResultInner.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitRoutesTable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for ListRoutesTable associated with the Express Route Circuits API. + */ +public class ExpressRouteCircuitsRoutesTableListResultInner { + /** + * The list of routes table. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the list of routes table. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the list of routes table. + * + * @param value the value value to set + * @return the ExpressRouteCircuitsRoutesTableListResultInner object itself. + */ + public ExpressRouteCircuitsRoutesTableListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the URL to get the next set of results. + * + * @param nextLink the nextLink value to set + * @return the ExpressRouteCircuitsRoutesTableListResultInner object itself. + */ + public ExpressRouteCircuitsRoutesTableListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableSummaryListResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableSummaryListResultImpl.java new file mode 100644 index 000000000000..343ae423e242 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableSummaryListResultImpl.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitsRoutesTableSummaryListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitRoutesTableSummary; + +class ExpressRouteCircuitsRoutesTableSummaryListResultImpl extends WrapperImpl implements ExpressRouteCircuitsRoutesTableSummaryListResult { + private final NetworkManager manager; + ExpressRouteCircuitsRoutesTableSummaryListResultImpl(ExpressRouteCircuitsRoutesTableSummaryListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableSummaryListResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableSummaryListResultInner.java new file mode 100644 index 000000000000..ccfae89a587a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitsRoutesTableSummaryListResultInner.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitRoutesTableSummary; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for ListRoutesTable associated with the Express Route Circuits API. + */ +public class ExpressRouteCircuitsRoutesTableSummaryListResultInner { + /** + * A list of the routes table. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get a list of the routes table. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set a list of the routes table. + * + * @param value the value value to set + * @return the ExpressRouteCircuitsRoutesTableSummaryListResultInner object itself. + */ + public ExpressRouteCircuitsRoutesTableSummaryListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the URL to get the next set of results. + * + * @param nextLink the nextLink value to set + * @return the ExpressRouteCircuitsRoutesTableSummaryListResultInner object itself. + */ + public ExpressRouteCircuitsRoutesTableSummaryListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionImpl.java new file mode 100644 index 000000000000..3b0d0ce70661 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionImpl.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteConnection; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeeringId; + +class ExpressRouteConnectionImpl extends CreatableUpdatableImpl implements ExpressRouteConnection, ExpressRouteConnection.Definition, ExpressRouteConnection.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String expressRouteGatewayName; + private String connectionName; + + ExpressRouteConnectionImpl(String name, NetworkManager manager) { + super(name, new ExpressRouteConnectionInner()); + this.manager = manager; + // Set resource name + this.connectionName = name; + // + } + + ExpressRouteConnectionImpl(ExpressRouteConnectionInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.connectionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.expressRouteGatewayName = IdParsingUtils.getValueFromIdByName(inner.id(), "expressRouteGateways"); + this.connectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "expressRouteConnections"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ExpressRouteConnectionsInner client = this.manager().inner().expressRouteConnections(); + return client.createOrUpdateAsync(this.resourceGroupName, this.expressRouteGatewayName, this.connectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ExpressRouteConnectionsInner client = this.manager().inner().expressRouteConnections(); + return client.createOrUpdateAsync(this.resourceGroupName, this.expressRouteGatewayName, this.connectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ExpressRouteConnectionsInner client = this.manager().inner().expressRouteConnections(); + return client.getAsync(this.resourceGroupName, this.expressRouteGatewayName, this.connectionName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String authorizationKey() { + return this.inner().authorizationKey(); + } + + @Override + public Boolean enableInternetSecurity() { + return this.inner().enableInternetSecurity(); + } + + @Override + public ExpressRouteCircuitPeeringId expressRouteCircuitPeering() { + return this.inner().expressRouteCircuitPeering(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Integer routingWeight() { + return this.inner().routingWeight(); + } + + @Override + public ExpressRouteConnectionImpl withExistingExpressRouteGateway(String resourceGroupName, String expressRouteGatewayName) { + this.resourceGroupName = resourceGroupName; + this.expressRouteGatewayName = expressRouteGatewayName; + return this; + } + + @Override + public ExpressRouteConnectionImpl withExpressRouteCircuitPeering(ExpressRouteCircuitPeeringId expressRouteCircuitPeering) { + this.inner().withExpressRouteCircuitPeering(expressRouteCircuitPeering); + return this; + } + + @Override + public ExpressRouteConnectionImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public ExpressRouteConnectionImpl withAuthorizationKey(String authorizationKey) { + this.inner().withAuthorizationKey(authorizationKey); + return this; + } + + @Override + public ExpressRouteConnectionImpl withEnableInternetSecurity(Boolean enableInternetSecurity) { + this.inner().withEnableInternetSecurity(enableInternetSecurity); + return this; + } + + @Override + public ExpressRouteConnectionImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public ExpressRouteConnectionImpl withRoutingWeight(Integer routingWeight) { + this.inner().withRoutingWeight(routingWeight); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionInner.java new file mode 100644 index 000000000000..4a5e3c31eebd --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionInner.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeeringId; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * ExpressRouteConnection resource. + */ +@JsonFlatten +public class ExpressRouteConnectionInner extends SubResource { + /** + * The provisioning state of the express route connection resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The ExpressRoute circuit peering. + */ + @JsonProperty(value = "properties.expressRouteCircuitPeering", required = true) + private ExpressRouteCircuitPeeringId expressRouteCircuitPeering; + + /** + * Authorization key to establish the connection. + */ + @JsonProperty(value = "properties.authorizationKey") + private String authorizationKey; + + /** + * The routing weight associated to the connection. + */ + @JsonProperty(value = "properties.routingWeight") + private Integer routingWeight; + + /** + * Enable internet security. + */ + @JsonProperty(value = "properties.enableInternetSecurity") + private Boolean enableInternetSecurity; + + /** + * The name of the resource. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Get the provisioning state of the express route connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the ExpressRoute circuit peering. + * + * @return the expressRouteCircuitPeering value + */ + public ExpressRouteCircuitPeeringId expressRouteCircuitPeering() { + return this.expressRouteCircuitPeering; + } + + /** + * Set the ExpressRoute circuit peering. + * + * @param expressRouteCircuitPeering the expressRouteCircuitPeering value to set + * @return the ExpressRouteConnectionInner object itself. + */ + public ExpressRouteConnectionInner withExpressRouteCircuitPeering(ExpressRouteCircuitPeeringId expressRouteCircuitPeering) { + this.expressRouteCircuitPeering = expressRouteCircuitPeering; + return this; + } + + /** + * Get authorization key to establish the connection. + * + * @return the authorizationKey value + */ + public String authorizationKey() { + return this.authorizationKey; + } + + /** + * Set authorization key to establish the connection. + * + * @param authorizationKey the authorizationKey value to set + * @return the ExpressRouteConnectionInner object itself. + */ + public ExpressRouteConnectionInner withAuthorizationKey(String authorizationKey) { + this.authorizationKey = authorizationKey; + return this; + } + + /** + * Get the routing weight associated to the connection. + * + * @return the routingWeight value + */ + public Integer routingWeight() { + return this.routingWeight; + } + + /** + * Set the routing weight associated to the connection. + * + * @param routingWeight the routingWeight value to set + * @return the ExpressRouteConnectionInner object itself. + */ + public ExpressRouteConnectionInner withRoutingWeight(Integer routingWeight) { + this.routingWeight = routingWeight; + return this; + } + + /** + * Get enable internet security. + * + * @return the enableInternetSecurity value + */ + public Boolean enableInternetSecurity() { + return this.enableInternetSecurity; + } + + /** + * Set enable internet security. + * + * @param enableInternetSecurity the enableInternetSecurity value to set + * @return the ExpressRouteConnectionInner object itself. + */ + public ExpressRouteConnectionInner withEnableInternetSecurity(Boolean enableInternetSecurity) { + this.enableInternetSecurity = enableInternetSecurity; + return this; + } + + /** + * Get the name of the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource. + * + * @param name the name value to set + * @return the ExpressRouteConnectionInner object itself. + */ + public ExpressRouteConnectionInner withName(String name) { + this.name = name; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionListImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionListImpl.java new file mode 100644 index 000000000000..9cfc8d4a2362 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionListImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteConnectionList; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class ExpressRouteConnectionListImpl extends WrapperImpl implements ExpressRouteConnectionList { + private final NetworkManager manager; + ExpressRouteConnectionListImpl(ExpressRouteConnectionListInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionListInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionListInner.java new file mode 100644 index 000000000000..99c3f12c0ba8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionListInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * ExpressRouteConnection list. + */ +public class ExpressRouteConnectionListInner { + /** + * The list of ExpressRoute connections. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the list of ExpressRoute connections. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the list of ExpressRoute connections. + * + * @param value the value value to set + * @return the ExpressRouteConnectionListInner object itself. + */ + public ExpressRouteConnectionListInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionsImpl.java new file mode 100644 index 000000000000..219fa118064a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionsImpl.java @@ -0,0 +1,79 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteConnections; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteConnectionList; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteConnection; + +class ExpressRouteConnectionsImpl extends WrapperImpl implements ExpressRouteConnections { + private final NetworkManager manager; + + ExpressRouteConnectionsImpl(NetworkManager manager) { + super(manager.inner().expressRouteConnections()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public ExpressRouteConnectionImpl define(String name) { + return wrapModel(name); + } + + private ExpressRouteConnectionImpl wrapModel(ExpressRouteConnectionInner inner) { + return new ExpressRouteConnectionImpl(inner, manager()); + } + + private ExpressRouteConnectionImpl wrapModel(String name) { + return new ExpressRouteConnectionImpl(name, this.manager()); + } + + @Override + public Observable listAsync(String resourceGroupName, String expressRouteGatewayName) { + ExpressRouteConnectionsInner client = this.inner(); + return client.listAsync(resourceGroupName, expressRouteGatewayName) + .map(new Func1() { + @Override + public ExpressRouteConnectionList call(ExpressRouteConnectionListInner inner) { + return new ExpressRouteConnectionListImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName) { + ExpressRouteConnectionsInner client = this.inner(); + return client.getAsync(resourceGroupName, expressRouteGatewayName, connectionName) + .flatMap(new Func1>() { + @Override + public Observable call(ExpressRouteConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ExpressRouteConnection)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName) { + ExpressRouteConnectionsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, expressRouteGatewayName, connectionName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionsInner.java new file mode 100644 index 000000000000..a77502e1ae73 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteConnectionsInner.java @@ -0,0 +1,606 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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 com.microsoft.rest.Validator; +import java.io.IOException; +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.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ExpressRouteConnections. + */ +public class ExpressRouteConnectionsInner { + /** The Retrofit service to perform REST calls. */ + private ExpressRouteConnectionsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRouteConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRouteConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRouteConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRouteConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRouteConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRouteConnections createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("expressRouteGatewayName") String expressRouteGatewayName, @Path("connectionName") String connectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteConnectionInner putExpressRouteConnectionParameters, @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.network.v2019_09_01.ExpressRouteConnections beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("expressRouteGatewayName") String expressRouteGatewayName, @Path("connectionName") String connectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteConnectionInner putExpressRouteConnectionParameters, @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.network.v2019_09_01.ExpressRouteConnections get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("expressRouteGatewayName") String expressRouteGatewayName, @Path("connectionName") String connectionName, @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.network.v2019_09_01.ExpressRouteConnections delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("expressRouteGatewayName") String expressRouteGatewayName, @Path("connectionName") String connectionName, @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.network.v2019_09_01.ExpressRouteConnections beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("expressRouteGatewayName") String expressRouteGatewayName, @Path("connectionName") String connectionName, @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.network.v2019_09_01.ExpressRouteConnections list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("expressRouteGatewayName") String expressRouteGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @param putExpressRouteConnectionParameters Parameters required in an ExpressRouteConnection PUT 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 ExpressRouteConnectionInner object if successful. + */ + public ExpressRouteConnectionInner createOrUpdate(String resourceGroupName, String expressRouteGatewayName, String connectionName, ExpressRouteConnectionInner putExpressRouteConnectionParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters).toBlocking().last().body(); + } + + /** + * Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @param putExpressRouteConnectionParameters Parameters required in an ExpressRouteConnection PUT 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 createOrUpdateAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName, ExpressRouteConnectionInner putExpressRouteConnectionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters), serviceCallback); + } + + /** + * Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @param putExpressRouteConnectionParameters Parameters required in an ExpressRouteConnection PUT operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName, ExpressRouteConnectionInner putExpressRouteConnectionParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters).map(new Func1, ExpressRouteConnectionInner>() { + @Override + public ExpressRouteConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @param putExpressRouteConnectionParameters Parameters required in an ExpressRouteConnection PUT operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName, ExpressRouteConnectionInner putExpressRouteConnectionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (expressRouteGatewayName == null) { + throw new IllegalArgumentException("Parameter expressRouteGatewayName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName 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 (putExpressRouteConnectionParameters == null) { + throw new IllegalArgumentException("Parameter putExpressRouteConnectionParameters is required and cannot be null."); + } + Validator.validate(putExpressRouteConnectionParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, expressRouteGatewayName, connectionName, this.client.subscriptionId(), putExpressRouteConnectionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @param putExpressRouteConnectionParameters Parameters required in an ExpressRouteConnection PUT 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 ExpressRouteConnectionInner object if successful. + */ + public ExpressRouteConnectionInner beginCreateOrUpdate(String resourceGroupName, String expressRouteGatewayName, String connectionName, ExpressRouteConnectionInner putExpressRouteConnectionParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters).toBlocking().single().body(); + } + + /** + * Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @param putExpressRouteConnectionParameters Parameters required in an ExpressRouteConnection PUT 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 beginCreateOrUpdateAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName, ExpressRouteConnectionInner putExpressRouteConnectionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters), serviceCallback); + } + + /** + * Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @param putExpressRouteConnectionParameters Parameters required in an ExpressRouteConnection PUT operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteConnectionInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName, ExpressRouteConnectionInner putExpressRouteConnectionParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters).map(new Func1, ExpressRouteConnectionInner>() { + @Override + public ExpressRouteConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @param putExpressRouteConnectionParameters Parameters required in an ExpressRouteConnection PUT operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteConnectionInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName, ExpressRouteConnectionInner putExpressRouteConnectionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (expressRouteGatewayName == null) { + throw new IllegalArgumentException("Parameter expressRouteGatewayName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName 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 (putExpressRouteConnectionParameters == null) { + throw new IllegalArgumentException("Parameter putExpressRouteConnectionParameters is required and cannot be null."); + } + Validator.validate(putExpressRouteConnectionParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, expressRouteGatewayName, connectionName, this.client.subscriptionId(), putExpressRouteConnectionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 ExpressRouteConnection. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the ExpressRoute connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteConnectionInner object if successful. + */ + public ExpressRouteConnectionInner get(String resourceGroupName, String expressRouteGatewayName, String connectionName) { + return getWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName).toBlocking().single().body(); + } + + /** + * Gets the specified ExpressRouteConnection. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the ExpressRoute connection. + * @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 expressRouteGatewayName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName), serviceCallback); + } + + /** + * Gets the specified ExpressRouteConnection. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the ExpressRoute connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteConnectionInner object + */ + public Observable getAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName) { + return getWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName).map(new Func1, ExpressRouteConnectionInner>() { + @Override + public ExpressRouteConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified ExpressRouteConnection. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the ExpressRoute connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteConnectionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (expressRouteGatewayName == null) { + throw new IllegalArgumentException("Parameter expressRouteGatewayName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, expressRouteGatewayName, connectionName, this.client.subscriptionId(), 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); + } + + /** + * Deletes a connection to a ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 expressRouteGatewayName, String connectionName) { + deleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName).toBlocking().last().body(); + } + + /** + * Deletes a connection to a ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @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 expressRouteGatewayName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName), serviceCallback); + } + + /** + * Deletes a connection to a ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName) { + return deleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a connection to a ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (expressRouteGatewayName == null) { + throw new IllegalArgumentException("Parameter expressRouteGatewayName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, expressRouteGatewayName, connectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a connection to a ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 expressRouteGatewayName, String connectionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName).toBlocking().single().body(); + } + + /** + * Deletes a connection to a ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @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 expressRouteGatewayName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName), serviceCallback); + } + + /** + * Deletes a connection to a ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a connection to a ExpressRoute circuit. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param connectionName The name of the connection subresource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (expressRouteGatewayName == null) { + throw new IllegalArgumentException("Parameter expressRouteGatewayName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, expressRouteGatewayName, connectionName, this.client.subscriptionId(), 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); + } + + /** + * Lists ExpressRouteConnections. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteConnectionListInner object if successful. + */ + public ExpressRouteConnectionListInner list(String resourceGroupName, String expressRouteGatewayName) { + return listWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName).toBlocking().single().body(); + } + + /** + * Lists ExpressRouteConnections. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @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(String resourceGroupName, String expressRouteGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName), serviceCallback); + } + + /** + * Lists ExpressRouteConnections. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteConnectionListInner object + */ + public Observable listAsync(String resourceGroupName, String expressRouteGatewayName) { + return listWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName).map(new Func1, ExpressRouteConnectionListInner>() { + @Override + public ExpressRouteConnectionListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists ExpressRouteConnections. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteConnectionListInner object + */ + public Observable> listWithServiceResponseAsync(String resourceGroupName, String expressRouteGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (expressRouteGatewayName == null) { + throw new IllegalArgumentException("Parameter expressRouteGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, expressRouteGatewayName, this.client.subscriptionId(), 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionImpl.java new file mode 100644 index 000000000000..e9f8447a3c29 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionImpl.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnection; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitReference; +import com.microsoft.azure.management.network.v2019_09_01.ServiceProviderProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.List; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnectionPeering; + +class ExpressRouteCrossConnectionImpl extends GroupableResourceCoreImpl implements ExpressRouteCrossConnection, ExpressRouteCrossConnection.Definition, ExpressRouteCrossConnection.Update { + ExpressRouteCrossConnectionImpl(String name, ExpressRouteCrossConnectionInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ExpressRouteCrossConnectionsInner client = this.manager().inner().expressRouteCrossConnections(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ExpressRouteCrossConnectionsInner client = this.manager().inner().expressRouteCrossConnections(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ExpressRouteCrossConnectionsInner client = this.manager().inner().expressRouteCrossConnections(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Integer bandwidthInMbps() { + return this.inner().bandwidthInMbps(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public ExpressRouteCircuitReference expressRouteCircuit() { + return this.inner().expressRouteCircuit(); + } + + @Override + public String peeringLocation() { + return this.inner().peeringLocation(); + } + + @Override + public List peerings() { + List lst = new ArrayList(); + if (this.inner().peerings() != null) { + for (ExpressRouteCrossConnectionPeeringInner inner : this.inner().peerings()) { + lst.add( new ExpressRouteCrossConnectionPeeringImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String primaryAzurePort() { + return this.inner().primaryAzurePort(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String secondaryAzurePort() { + return this.inner().secondaryAzurePort(); + } + + @Override + public String serviceProviderNotes() { + return this.inner().serviceProviderNotes(); + } + + @Override + public ServiceProviderProvisioningState serviceProviderProvisioningState() { + return this.inner().serviceProviderProvisioningState(); + } + + @Override + public Integer sTag() { + return this.inner().sTag(); + } + + @Override + public ExpressRouteCrossConnectionImpl withBandwidthInMbps(Integer bandwidthInMbps) { + this.inner().withBandwidthInMbps(bandwidthInMbps); + return this; + } + + @Override + public ExpressRouteCrossConnectionImpl withExpressRouteCircuit(ExpressRouteCircuitReference expressRouteCircuit) { + this.inner().withExpressRouteCircuit(expressRouteCircuit); + return this; + } + + @Override + public ExpressRouteCrossConnectionImpl withPeeringLocation(String peeringLocation) { + this.inner().withPeeringLocation(peeringLocation); + return this; + } + + @Override + public ExpressRouteCrossConnectionImpl withPeerings(List peerings) { + this.inner().withPeerings(peerings); + return this; + } + + @Override + public ExpressRouteCrossConnectionImpl withServiceProviderNotes(String serviceProviderNotes) { + this.inner().withServiceProviderNotes(serviceProviderNotes); + return this; + } + + @Override + public ExpressRouteCrossConnectionImpl withServiceProviderProvisioningState(ServiceProviderProvisioningState serviceProviderProvisioningState) { + this.inner().withServiceProviderProvisioningState(serviceProviderProvisioningState); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionInner.java new file mode 100644 index 000000000000..e498a4ad0ebf --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionInner.java @@ -0,0 +1,286 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitReference; +import com.microsoft.azure.management.network.v2019_09_01.ServiceProviderProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * ExpressRouteCrossConnection resource. + */ +@JsonFlatten +@SkipParentValidation +public class ExpressRouteCrossConnectionInner extends Resource { + /** + * The name of the primary port. + */ + @JsonProperty(value = "properties.primaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) + private String primaryAzurePort; + + /** + * The name of the secondary port. + */ + @JsonProperty(value = "properties.secondaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryAzurePort; + + /** + * The identifier of the circuit traffic. + */ + @JsonProperty(value = "properties.sTag", access = JsonProperty.Access.WRITE_ONLY) + private Integer sTag; + + /** + * The peering location of the ExpressRoute circuit. + */ + @JsonProperty(value = "properties.peeringLocation") + private String peeringLocation; + + /** + * The circuit bandwidth In Mbps. + */ + @JsonProperty(value = "properties.bandwidthInMbps") + private Integer bandwidthInMbps; + + /** + * The ExpressRouteCircuit. + */ + @JsonProperty(value = "properties.expressRouteCircuit") + private ExpressRouteCircuitReference expressRouteCircuit; + + /** + * The provisioning state of the circuit in the connectivity provider + * system. Possible values include: 'NotProvisioned', 'Provisioning', + * 'Provisioned', 'Deprovisioning'. + */ + @JsonProperty(value = "properties.serviceProviderProvisioningState") + private ServiceProviderProvisioningState serviceProviderProvisioningState; + + /** + * Additional read only notes set by the connectivity provider. + */ + @JsonProperty(value = "properties.serviceProviderNotes") + private String serviceProviderNotes; + + /** + * The provisioning state of the express route cross connection resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The list of peerings. + */ + @JsonProperty(value = "properties.peerings") + private List peerings; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the name of the primary port. + * + * @return the primaryAzurePort value + */ + public String primaryAzurePort() { + return this.primaryAzurePort; + } + + /** + * Get the name of the secondary port. + * + * @return the secondaryAzurePort value + */ + public String secondaryAzurePort() { + return this.secondaryAzurePort; + } + + /** + * Get the identifier of the circuit traffic. + * + * @return the sTag value + */ + public Integer sTag() { + return this.sTag; + } + + /** + * Get the peering location of the ExpressRoute circuit. + * + * @return the peeringLocation value + */ + public String peeringLocation() { + return this.peeringLocation; + } + + /** + * Set the peering location of the ExpressRoute circuit. + * + * @param peeringLocation the peeringLocation value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withPeeringLocation(String peeringLocation) { + this.peeringLocation = peeringLocation; + return this; + } + + /** + * Get the circuit bandwidth In Mbps. + * + * @return the bandwidthInMbps value + */ + public Integer bandwidthInMbps() { + return this.bandwidthInMbps; + } + + /** + * Set the circuit bandwidth In Mbps. + * + * @param bandwidthInMbps the bandwidthInMbps value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withBandwidthInMbps(Integer bandwidthInMbps) { + this.bandwidthInMbps = bandwidthInMbps; + return this; + } + + /** + * Get the ExpressRouteCircuit. + * + * @return the expressRouteCircuit value + */ + public ExpressRouteCircuitReference expressRouteCircuit() { + return this.expressRouteCircuit; + } + + /** + * Set the ExpressRouteCircuit. + * + * @param expressRouteCircuit the expressRouteCircuit value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withExpressRouteCircuit(ExpressRouteCircuitReference expressRouteCircuit) { + this.expressRouteCircuit = expressRouteCircuit; + return this; + } + + /** + * Get the provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'. + * + * @return the serviceProviderProvisioningState value + */ + public ServiceProviderProvisioningState serviceProviderProvisioningState() { + return this.serviceProviderProvisioningState; + } + + /** + * Set the provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'. + * + * @param serviceProviderProvisioningState the serviceProviderProvisioningState value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withServiceProviderProvisioningState(ServiceProviderProvisioningState serviceProviderProvisioningState) { + this.serviceProviderProvisioningState = serviceProviderProvisioningState; + return this; + } + + /** + * Get additional read only notes set by the connectivity provider. + * + * @return the serviceProviderNotes value + */ + public String serviceProviderNotes() { + return this.serviceProviderNotes; + } + + /** + * Set additional read only notes set by the connectivity provider. + * + * @param serviceProviderNotes the serviceProviderNotes value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withServiceProviderNotes(String serviceProviderNotes) { + this.serviceProviderNotes = serviceProviderNotes; + return this; + } + + /** + * Get the provisioning state of the express route cross connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the list of peerings. + * + * @return the peerings value + */ + public List peerings() { + return this.peerings; + } + + /** + * Set the list of peerings. + * + * @param peerings the peerings value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withPeerings(List peerings) { + this.peerings = peerings; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringImpl.java new file mode 100644 index 000000000000..f7ad79f3c601 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringImpl.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnectionPeering; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePeeringType; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePeeringState; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeeringConfig; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.Ipv6ExpressRouteCircuitPeeringConfig; + +class ExpressRouteCrossConnectionPeeringImpl extends CreatableUpdatableImpl implements ExpressRouteCrossConnectionPeering, ExpressRouteCrossConnectionPeering.Definition, ExpressRouteCrossConnectionPeering.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String crossConnectionName; + private String peeringName; + + ExpressRouteCrossConnectionPeeringImpl(String name, NetworkManager manager) { + super(name, new ExpressRouteCrossConnectionPeeringInner()); + this.manager = manager; + // Set resource name + this.peeringName = name; + // + } + + ExpressRouteCrossConnectionPeeringImpl(ExpressRouteCrossConnectionPeeringInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.peeringName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.crossConnectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "expressRouteCrossConnections"); + this.peeringName = IdParsingUtils.getValueFromIdByName(inner.id(), "peerings"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ExpressRouteCrossConnectionPeeringsInner client = this.manager().inner().expressRouteCrossConnectionPeerings(); + return client.createOrUpdateAsync(this.resourceGroupName, this.crossConnectionName, this.peeringName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ExpressRouteCrossConnectionPeeringsInner client = this.manager().inner().expressRouteCrossConnectionPeerings(); + return client.createOrUpdateAsync(this.resourceGroupName, this.crossConnectionName, this.peeringName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ExpressRouteCrossConnectionPeeringsInner client = this.manager().inner().expressRouteCrossConnectionPeerings(); + return client.getAsync(this.resourceGroupName, this.crossConnectionName, this.peeringName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Integer azureASN() { + return this.inner().azureASN(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String gatewayManagerEtag() { + return this.inner().gatewayManagerEtag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig() { + return this.inner().ipv6PeeringConfig(); + } + + @Override + public String lastModifiedBy() { + return this.inner().lastModifiedBy(); + } + + @Override + public ExpressRouteCircuitPeeringConfig microsoftPeeringConfig() { + return this.inner().microsoftPeeringConfig(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Long peerASN() { + return this.inner().peerASN(); + } + + @Override + public ExpressRoutePeeringType peeringType() { + return this.inner().peeringType(); + } + + @Override + public String primaryAzurePort() { + return this.inner().primaryAzurePort(); + } + + @Override + public String primaryPeerAddressPrefix() { + return this.inner().primaryPeerAddressPrefix(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String secondaryAzurePort() { + return this.inner().secondaryAzurePort(); + } + + @Override + public String secondaryPeerAddressPrefix() { + return this.inner().secondaryPeerAddressPrefix(); + } + + @Override + public String sharedKey() { + return this.inner().sharedKey(); + } + + @Override + public ExpressRoutePeeringState state() { + return this.inner().state(); + } + + @Override + public Integer vlanId() { + return this.inner().vlanId(); + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl withExistingExpressRouteCrossConnection(String resourceGroupName, String crossConnectionName) { + this.resourceGroupName = resourceGroupName; + this.crossConnectionName = crossConnectionName; + return this; + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl withGatewayManagerEtag(String gatewayManagerEtag) { + this.inner().withGatewayManagerEtag(gatewayManagerEtag); + return this; + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl withIpv6PeeringConfig(Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig) { + this.inner().withIpv6PeeringConfig(ipv6PeeringConfig); + return this; + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl withMicrosoftPeeringConfig(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig) { + this.inner().withMicrosoftPeeringConfig(microsoftPeeringConfig); + return this; + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl withPeerASN(Long peerASN) { + this.inner().withPeerASN(peerASN); + return this; + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl withPeeringType(ExpressRoutePeeringType peeringType) { + this.inner().withPeeringType(peeringType); + return this; + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl withPrimaryPeerAddressPrefix(String primaryPeerAddressPrefix) { + this.inner().withPrimaryPeerAddressPrefix(primaryPeerAddressPrefix); + return this; + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl withSecondaryPeerAddressPrefix(String secondaryPeerAddressPrefix) { + this.inner().withSecondaryPeerAddressPrefix(secondaryPeerAddressPrefix); + return this; + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl withSharedKey(String sharedKey) { + this.inner().withSharedKey(sharedKey); + return this; + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl withState(ExpressRoutePeeringState state) { + this.inner().withState(state); + return this; + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl withVlanId(Integer vlanId) { + this.inner().withVlanId(vlanId); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringInner.java new file mode 100644 index 000000000000..39a87eb24d77 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringInner.java @@ -0,0 +1,405 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePeeringType; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePeeringState; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeeringConfig; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.Ipv6ExpressRouteCircuitPeeringConfig; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Peering in an ExpressRoute Cross Connection resource. + */ +@JsonFlatten +public class ExpressRouteCrossConnectionPeeringInner extends SubResource { + /** + * The peering type. Possible values include: 'AzurePublicPeering', + * 'AzurePrivatePeering', 'MicrosoftPeering'. + */ + @JsonProperty(value = "properties.peeringType") + private ExpressRoutePeeringType peeringType; + + /** + * The peering state. Possible values include: 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "properties.state") + private ExpressRoutePeeringState state; + + /** + * The Azure ASN. + */ + @JsonProperty(value = "properties.azureASN", access = JsonProperty.Access.WRITE_ONLY) + private Integer azureASN; + + /** + * The peer ASN. + */ + @JsonProperty(value = "properties.peerASN") + private Long peerASN; + + /** + * The primary address prefix. + */ + @JsonProperty(value = "properties.primaryPeerAddressPrefix") + private String primaryPeerAddressPrefix; + + /** + * The secondary address prefix. + */ + @JsonProperty(value = "properties.secondaryPeerAddressPrefix") + private String secondaryPeerAddressPrefix; + + /** + * The primary port. + */ + @JsonProperty(value = "properties.primaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) + private String primaryAzurePort; + + /** + * The secondary port. + */ + @JsonProperty(value = "properties.secondaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryAzurePort; + + /** + * The shared key. + */ + @JsonProperty(value = "properties.sharedKey") + private String sharedKey; + + /** + * The VLAN ID. + */ + @JsonProperty(value = "properties.vlanId") + private Integer vlanId; + + /** + * The Microsoft peering configuration. + */ + @JsonProperty(value = "properties.microsoftPeeringConfig") + private ExpressRouteCircuitPeeringConfig microsoftPeeringConfig; + + /** + * The provisioning state of the express route cross connection peering + * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', + * 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The GatewayManager Etag. + */ + @JsonProperty(value = "properties.gatewayManagerEtag") + private String gatewayManagerEtag; + + /** + * Who was the last to modify the peering. + */ + @JsonProperty(value = "properties.lastModifiedBy", access = JsonProperty.Access.WRITE_ONLY) + private String lastModifiedBy; + + /** + * The IPv6 peering configuration. + */ + @JsonProperty(value = "properties.ipv6PeeringConfig") + private Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'. + * + * @return the peeringType value + */ + public ExpressRoutePeeringType peeringType() { + return this.peeringType; + } + + /** + * Set the peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'. + * + * @param peeringType the peeringType value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withPeeringType(ExpressRoutePeeringType peeringType) { + this.peeringType = peeringType; + return this; + } + + /** + * Get the peering state. Possible values include: 'Disabled', 'Enabled'. + * + * @return the state value + */ + public ExpressRoutePeeringState state() { + return this.state; + } + + /** + * Set the peering state. Possible values include: 'Disabled', 'Enabled'. + * + * @param state the state value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withState(ExpressRoutePeeringState state) { + this.state = state; + return this; + } + + /** + * Get the Azure ASN. + * + * @return the azureASN value + */ + public Integer azureASN() { + return this.azureASN; + } + + /** + * Get the peer ASN. + * + * @return the peerASN value + */ + public Long peerASN() { + return this.peerASN; + } + + /** + * Set the peer ASN. + * + * @param peerASN the peerASN value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withPeerASN(Long peerASN) { + this.peerASN = peerASN; + return this; + } + + /** + * Get the primary address prefix. + * + * @return the primaryPeerAddressPrefix value + */ + public String primaryPeerAddressPrefix() { + return this.primaryPeerAddressPrefix; + } + + /** + * Set the primary address prefix. + * + * @param primaryPeerAddressPrefix the primaryPeerAddressPrefix value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withPrimaryPeerAddressPrefix(String primaryPeerAddressPrefix) { + this.primaryPeerAddressPrefix = primaryPeerAddressPrefix; + return this; + } + + /** + * Get the secondary address prefix. + * + * @return the secondaryPeerAddressPrefix value + */ + public String secondaryPeerAddressPrefix() { + return this.secondaryPeerAddressPrefix; + } + + /** + * Set the secondary address prefix. + * + * @param secondaryPeerAddressPrefix the secondaryPeerAddressPrefix value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withSecondaryPeerAddressPrefix(String secondaryPeerAddressPrefix) { + this.secondaryPeerAddressPrefix = secondaryPeerAddressPrefix; + return this; + } + + /** + * Get the primary port. + * + * @return the primaryAzurePort value + */ + public String primaryAzurePort() { + return this.primaryAzurePort; + } + + /** + * Get the secondary port. + * + * @return the secondaryAzurePort value + */ + public String secondaryAzurePort() { + return this.secondaryAzurePort; + } + + /** + * Get the shared key. + * + * @return the sharedKey value + */ + public String sharedKey() { + return this.sharedKey; + } + + /** + * Set the shared key. + * + * @param sharedKey the sharedKey value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withSharedKey(String sharedKey) { + this.sharedKey = sharedKey; + return this; + } + + /** + * Get the VLAN ID. + * + * @return the vlanId value + */ + public Integer vlanId() { + return this.vlanId; + } + + /** + * Set the VLAN ID. + * + * @param vlanId the vlanId value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withVlanId(Integer vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * Get the Microsoft peering configuration. + * + * @return the microsoftPeeringConfig value + */ + public ExpressRouteCircuitPeeringConfig microsoftPeeringConfig() { + return this.microsoftPeeringConfig; + } + + /** + * Set the Microsoft peering configuration. + * + * @param microsoftPeeringConfig the microsoftPeeringConfig value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withMicrosoftPeeringConfig(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig) { + this.microsoftPeeringConfig = microsoftPeeringConfig; + return this; + } + + /** + * Get the provisioning state of the express route cross connection peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the GatewayManager Etag. + * + * @return the gatewayManagerEtag value + */ + public String gatewayManagerEtag() { + return this.gatewayManagerEtag; + } + + /** + * Set the GatewayManager Etag. + * + * @param gatewayManagerEtag the gatewayManagerEtag value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withGatewayManagerEtag(String gatewayManagerEtag) { + this.gatewayManagerEtag = gatewayManagerEtag; + return this; + } + + /** + * Get who was the last to modify the peering. + * + * @return the lastModifiedBy value + */ + public String lastModifiedBy() { + return this.lastModifiedBy; + } + + /** + * Get the IPv6 peering configuration. + * + * @return the ipv6PeeringConfig value + */ + public Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig() { + return this.ipv6PeeringConfig; + } + + /** + * Set the IPv6 peering configuration. + * + * @param ipv6PeeringConfig the ipv6PeeringConfig value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withIpv6PeeringConfig(Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig) { + this.ipv6PeeringConfig = ipv6PeeringConfig; + return this; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringsImpl.java new file mode 100644 index 000000000000..c3bd0f88dea1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnectionPeerings; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnectionPeering; + +class ExpressRouteCrossConnectionPeeringsImpl extends WrapperImpl implements ExpressRouteCrossConnectionPeerings { + private final NetworkManager manager; + + ExpressRouteCrossConnectionPeeringsImpl(NetworkManager manager) { + super(manager.inner().expressRouteCrossConnectionPeerings()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public ExpressRouteCrossConnectionPeeringImpl define(String name) { + return wrapModel(name); + } + + private ExpressRouteCrossConnectionPeeringImpl wrapModel(ExpressRouteCrossConnectionPeeringInner inner) { + return new ExpressRouteCrossConnectionPeeringImpl(inner, manager()); + } + + private ExpressRouteCrossConnectionPeeringImpl wrapModel(String name) { + return new ExpressRouteCrossConnectionPeeringImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String crossConnectionName) { + ExpressRouteCrossConnectionPeeringsInner client = this.inner(); + return client.listAsync(resourceGroupName, crossConnectionName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ExpressRouteCrossConnectionPeering call(ExpressRouteCrossConnectionPeeringInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + ExpressRouteCrossConnectionPeeringsInner client = this.inner(); + return client.getAsync(resourceGroupName, crossConnectionName, peeringName) + .flatMap(new Func1>() { + @Override + public Observable call(ExpressRouteCrossConnectionPeeringInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ExpressRouteCrossConnectionPeering)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + ExpressRouteCrossConnectionPeeringsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, crossConnectionName, peeringName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringsInner.java new file mode 100644 index 000000000000..8443f9e20907 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringsInner.java @@ -0,0 +1,764 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 ExpressRouteCrossConnectionPeerings. + */ +public class ExpressRouteCrossConnectionPeeringsInner { + /** The Retrofit service to perform REST calls. */ + private ExpressRouteCrossConnectionPeeringsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRouteCrossConnectionPeeringsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRouteCrossConnectionPeeringsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRouteCrossConnectionPeeringsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRouteCrossConnectionPeerings to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRouteCrossConnectionPeeringsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnectionPeerings list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @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.network.v2019_09_01.ExpressRouteCrossConnectionPeerings delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @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.network.v2019_09_01.ExpressRouteCrossConnectionPeerings beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @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.network.v2019_09_01.ExpressRouteCrossConnectionPeerings get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @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.network.v2019_09_01.ExpressRouteCrossConnectionPeerings createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionPeeringInner peeringParameters, @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.network.v2019_09_01.ExpressRouteCrossConnectionPeerings beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionPeeringInner peeringParameters, @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.network.v2019_09_01.ExpressRouteCrossConnectionPeerings listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ExpressRouteCrossConnectionPeeringInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String crossConnectionName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, crossConnectionName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @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 resourceGroupName, final String crossConnectionName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, crossConnectionName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionPeeringInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String crossConnectionName) { + return listWithServiceResponseAsync(resourceGroupName, crossConnectionName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionPeeringInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String crossConnectionName) { + return listSinglePageAsync(resourceGroupName, crossConnectionName) + .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 all peerings in a specified ExpressRouteCrossConnection. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String crossConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, crossConnectionName, this.client.subscriptionId(), 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); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 crossConnectionName, String peeringName) { + deleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).toBlocking().last().body(); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @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 crossConnectionName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName), serviceCallback); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + return deleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 crossConnectionName, String peeringName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).toBlocking().single().body(); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @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 crossConnectionName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName), serviceCallback); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCrossConnectionPeeringInner object if successful. + */ + public ExpressRouteCrossConnectionPeeringInner get(String resourceGroupName, String crossConnectionName, String peeringName) { + return getWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).toBlocking().single().body(); + } + + /** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @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 crossConnectionName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName), serviceCallback); + } + + /** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionPeeringInner object + */ + public Observable getAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + return getWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).map(new Func1, ExpressRouteCrossConnectionPeeringInner>() { + @Override + public ExpressRouteCrossConnectionPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionPeeringInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering 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 ExpressRouteCrossConnectionPeeringInner object if successful. + */ + public ExpressRouteCrossConnectionPeeringInner createOrUpdate(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering 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 createOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters), serviceCallback); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).map(new Func1, ExpressRouteCrossConnectionPeeringInner>() { + @Override + public ExpressRouteCrossConnectionPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName 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 (peeringParameters == null) { + throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); + } + Validator.validate(peeringParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering 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 ExpressRouteCrossConnectionPeeringInner object if successful. + */ + public ExpressRouteCrossConnectionPeeringInner beginCreateOrUpdate(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering 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 beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters), serviceCallback); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionPeeringInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).map(new Func1, ExpressRouteCrossConnectionPeeringInner>() { + @Override + public ExpressRouteCrossConnectionPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionPeeringInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName 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 (peeringParameters == null) { + throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); + } + Validator.validate(peeringParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 all peerings in a specified ExpressRouteCrossConnection. + * + * @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<ExpressRouteCrossConnectionPeeringInner> 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 all peerings in a specified ExpressRouteCrossConnection. + * + * @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 all peerings in a specified ExpressRouteCrossConnection. + * + * @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<ExpressRouteCrossConnectionPeeringInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @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<ExpressRouteCrossConnectionPeeringInner> 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 all peerings in a specified ExpressRouteCrossConnection. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsImpl.java new file mode 100644 index 000000000000..77548d5a7900 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsImpl.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. + * def + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnections; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnection; +import rx.Observable; +import rx.Completable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitsArpTableListResult; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnectionsRoutesTableSummaryListResult; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitsRoutesTableListResult; + +class ExpressRouteCrossConnectionsImpl extends GroupableResourcesCoreImpl implements ExpressRouteCrossConnections { + protected ExpressRouteCrossConnectionsImpl(NetworkManager manager) { + super(manager.inner().expressRouteCrossConnections(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ExpressRouteCrossConnectionsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ExpressRouteCrossConnectionsInner client = this.inner(); + return Completable.error(new Throwable("Delete by RG not supported for this resource")); // NOP Delete by RG not supported + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + ExpressRouteCrossConnectionsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ExpressRouteCrossConnectionsInner 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 ExpressRouteCrossConnection call(ExpressRouteCrossConnectionInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ExpressRouteCrossConnectionsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ExpressRouteCrossConnectionsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ExpressRouteCrossConnection call(ExpressRouteCrossConnectionInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public ExpressRouteCrossConnectionImpl define(String name) { + return wrapModel(name); + } + + @Override + protected ExpressRouteCrossConnectionImpl wrapModel(ExpressRouteCrossConnectionInner inner) { + return new ExpressRouteCrossConnectionImpl(inner.name(), inner, manager()); + } + + @Override + protected ExpressRouteCrossConnectionImpl wrapModel(String name) { + return new ExpressRouteCrossConnectionImpl(name, new ExpressRouteCrossConnectionInner(), this.manager()); + } + + @Override + public Observable listArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + ExpressRouteCrossConnectionsInner client = this.inner(); + return client.listArpTableAsync(resourceGroupName, crossConnectionName, peeringName, devicePath) + .map(new Func1() { + @Override + public ExpressRouteCircuitsArpTableListResult call(ExpressRouteCircuitsArpTableListResultInner inner) { + return new ExpressRouteCircuitsArpTableListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + ExpressRouteCrossConnectionsInner client = this.inner(); + return client.listRoutesTableSummaryAsync(resourceGroupName, crossConnectionName, peeringName, devicePath) + .map(new Func1() { + @Override + public ExpressRouteCrossConnectionsRoutesTableSummaryListResult call(ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner inner) { + return new ExpressRouteCrossConnectionsRoutesTableSummaryListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + ExpressRouteCrossConnectionsInner client = this.inner(); + return client.listRoutesTableAsync(resourceGroupName, crossConnectionName, peeringName, devicePath) + .map(new Func1() { + @Override + public ExpressRouteCircuitsRoutesTableListResult call(ExpressRouteCircuitsRoutesTableListResultInner inner) { + return new ExpressRouteCircuitsRoutesTableListResultImpl(inner, manager()); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsInner.java new file mode 100644 index 000000000000..9421c4c62188 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsInner.java @@ -0,0 +1,1533 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +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; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in ExpressRouteCrossConnections. + */ +public class ExpressRouteCrossConnectionsInner implements InnerSupportsGet, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ExpressRouteCrossConnectionsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRouteCrossConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRouteCrossConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRouteCrossConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRouteCrossConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRouteCrossConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnections list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections") + Observable> list(@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.network.v2019_09_01.ExpressRouteCrossConnections listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.ExpressRouteCrossConnections getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @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.network.v2019_09_01.ExpressRouteCrossConnections createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionInner 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.network.v2019_09_01.ExpressRouteCrossConnections beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionInner 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.network.v2019_09_01.ExpressRouteCrossConnections updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject crossConnectionParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnections listArpTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}") + Observable> listArpTable(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.v2019_09_01.ExpressRouteCrossConnections beginListArpTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}") + Observable> beginListArpTable(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.v2019_09_01.ExpressRouteCrossConnections listRoutesTableSummary" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}") + Observable> listRoutesTableSummary(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.v2019_09_01.ExpressRouteCrossConnections beginListRoutesTableSummary" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}") + Observable> beginListRoutesTableSummary(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.v2019_09_01.ExpressRouteCrossConnections listRoutesTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}") + Observable> listRoutesTable(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.v2019_09_01.ExpressRouteCrossConnections beginListRoutesTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}") + Observable> beginListRoutesTable(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.v2019_09_01.ExpressRouteCrossConnections 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.network.v2019_09_01.ExpressRouteCrossConnections listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ExpressRouteCrossConnectionInner> 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(); + } + }; + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @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); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> 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)); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCrossConnectionInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param resourceGroupName The name of the 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<ExpressRouteCrossConnectionInner> 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(); + } + }; + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param resourceGroupName The name of the 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); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> 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)); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCrossConnectionInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 details about the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group (peering location of the circuit). + * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCrossConnectionInner object if successful. + */ + public ExpressRouteCrossConnectionInner getByResourceGroup(String resourceGroupName, String crossConnectionName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, crossConnectionName).toBlocking().single().body(); + } + + /** + * Gets details about the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group (peering location of the circuit). + * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). + * @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 crossConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, crossConnectionName), serviceCallback); + } + + /** + * Gets details about the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group (peering location of the circuit). + * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String crossConnectionName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, crossConnectionName).map(new Func1, ExpressRouteCrossConnectionInner>() { + @Override + public ExpressRouteCrossConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets details about the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group (peering location of the circuit). + * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String crossConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, crossConnectionName, this.client.subscriptionId(), 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); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection 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 ExpressRouteCrossConnectionInner object if successful. + */ + public ExpressRouteCrossConnectionInner createOrUpdate(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters).toBlocking().last().body(); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection 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 createOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters), serviceCallback); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters).map(new Func1, ExpressRouteCrossConnectionInner>() { + @Override + public ExpressRouteCrossConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, crossConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection 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 ExpressRouteCrossConnectionInner object if successful. + */ + public ExpressRouteCrossConnectionInner beginCreateOrUpdate(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters).toBlocking().single().body(); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection 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 beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters), serviceCallback); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters).map(new Func1, ExpressRouteCrossConnectionInner>() { + @Override + public ExpressRouteCrossConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, crossConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCrossConnectionInner object if successful. + */ + public ExpressRouteCrossConnectionInner updateTags(String resourceGroupName, String crossConnectionName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName).toBlocking().single().body(); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @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 updateTagsAsync(String resourceGroupName, String crossConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName), serviceCallback); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String crossConnectionName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName).map(new Func1, ExpressRouteCrossConnectionInner>() { + @Override + public ExpressRouteCrossConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String crossConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject crossConnectionParameters = new TagsObject(); + crossConnectionParameters.withTags(null); + return service.updateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCrossConnectionInner object if successful. + */ + public ExpressRouteCrossConnectionInner updateTags(String resourceGroupName, String crossConnectionName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).toBlocking().single().body(); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String crossConnectionName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags), serviceCallback); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String crossConnectionName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).map(new Func1, ExpressRouteCrossConnectionInner>() { + @Override + public ExpressRouteCrossConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject crossConnectionParameters = new TagsObject(); + crossConnectionParameters.withTags(tags); + return service.updateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitsArpTableListResultInner object if successful. + */ + public ExpressRouteCircuitsArpTableListResultInner listArpTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return listArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().last().body(); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @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 listArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return listArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsArpTableListResultInner>() { + @Override + public ExpressRouteCircuitsArpTableListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listArpTableWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.listArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitsArpTableListResultInner object if successful. + */ + public ExpressRouteCircuitsArpTableListResultInner beginListArpTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return beginListArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().single().body(); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @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 beginListArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsArpTableListResultInner object + */ + public Observable beginListArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return beginListArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsArpTableListResultInner>() { + @Override + public ExpressRouteCircuitsArpTableListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsArpTableListResultInner object + */ + public Observable> beginListArpTableWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginListArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListArpTableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListArpTableDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object if successful. + */ + public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner listRoutesTableSummary(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().last().body(); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @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 listRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner>() { + @Override + public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listRoutesTableSummaryWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.listRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object if successful. + */ + public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner beginListRoutesTableSummary(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().single().body(); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @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 beginListRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object + */ + public Observable beginListRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner>() { + @Override + public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object + */ + public Observable> beginListRoutesTableSummaryWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginListRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListRoutesTableSummaryDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListRoutesTableSummaryDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitsRoutesTableListResultInner object if successful. + */ + public ExpressRouteCircuitsRoutesTableListResultInner listRoutesTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return listRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().last().body(); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @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 listRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return listRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsRoutesTableListResultInner>() { + @Override + public ExpressRouteCircuitsRoutesTableListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listRoutesTableWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.listRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteCircuitsRoutesTableListResultInner object if successful. + */ + public ExpressRouteCircuitsRoutesTableListResultInner beginListRoutesTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return beginListRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().single().body(); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @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 beginListRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsRoutesTableListResultInner object + */ + public Observable beginListRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return beginListRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsRoutesTableListResultInner>() { + @Override + public ExpressRouteCircuitsRoutesTableListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsRoutesTableListResultInner object + */ + public Observable> beginListRoutesTableWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginListRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListRoutesTableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListRoutesTableDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @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<ExpressRouteCrossConnectionInner> 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(); + } + }; + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @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); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @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<ExpressRouteCrossConnectionInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @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<ExpressRouteCrossConnectionInner> 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)); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCrossConnectionInner> 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); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @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<ExpressRouteCrossConnectionInner> 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(); + } + }; + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @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); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @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<ExpressRouteCrossConnectionInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @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<ExpressRouteCrossConnectionInner> 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)); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCrossConnectionInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultImpl.java new file mode 100644 index 000000000000..4bec4ff70f86 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultImpl.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnectionsRoutesTableSummaryListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnectionRoutesTableSummary; + +class ExpressRouteCrossConnectionsRoutesTableSummaryListResultImpl extends WrapperImpl implements ExpressRouteCrossConnectionsRoutesTableSummaryListResult { + private final NetworkManager manager; + ExpressRouteCrossConnectionsRoutesTableSummaryListResultImpl(ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner.java new file mode 100644 index 000000000000..896732754df7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnectionRoutesTableSummary; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for ListRoutesTable associated with the Express Route Cross + * Connections. + */ +public class ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner { + /** + * A list of the routes table. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get a list of the routes table. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set a list of the routes table. + * + * @param value the value value to set + * @return the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object itself. + */ + public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewayImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewayImpl.java new file mode 100644 index 000000000000..15cde5fcdec0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewayImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteGateway; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteGatewayPropertiesAutoScaleConfiguration; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHubId; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteConnection; + +class ExpressRouteGatewayImpl extends GroupableResourceCoreImpl implements ExpressRouteGateway, ExpressRouteGateway.Definition, ExpressRouteGateway.Update { + ExpressRouteGatewayImpl(String name, ExpressRouteGatewayInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ExpressRouteGatewaysInner client = this.manager().inner().expressRouteGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ExpressRouteGatewaysInner client = this.manager().inner().expressRouteGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ExpressRouteGatewaysInner client = this.manager().inner().expressRouteGateways(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public ExpressRouteGatewayPropertiesAutoScaleConfiguration autoScaleConfiguration() { + return this.inner().autoScaleConfiguration(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List expressRouteConnections() { + List lst = new ArrayList(); + if (this.inner().expressRouteConnections() != null) { + for (ExpressRouteConnectionInner inner : this.inner().expressRouteConnections()) { + lst.add( new ExpressRouteConnectionImpl(inner, manager())); + } + } + return lst; + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public VirtualHubId virtualHub() { + return this.inner().virtualHub(); + } + + @Override + public ExpressRouteGatewayImpl withVirtualHub(VirtualHubId virtualHub) { + this.inner().withVirtualHub(virtualHub); + return this; + } + + @Override + public ExpressRouteGatewayImpl withAutoScaleConfiguration(ExpressRouteGatewayPropertiesAutoScaleConfiguration autoScaleConfiguration) { + this.inner().withAutoScaleConfiguration(autoScaleConfiguration); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewayInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewayInner.java new file mode 100644 index 000000000000..0ad8820c7f58 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewayInner.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteGatewayPropertiesAutoScaleConfiguration; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHubId; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * ExpressRoute gateway resource. + */ +@JsonFlatten +@SkipParentValidation +public class ExpressRouteGatewayInner extends Resource { + /** + * Configuration for auto scaling. + */ + @JsonProperty(value = "properties.autoScaleConfiguration") + private ExpressRouteGatewayPropertiesAutoScaleConfiguration autoScaleConfiguration; + + /** + * List of ExpressRoute connections to the ExpressRoute gateway. + */ + @JsonProperty(value = "properties.expressRouteConnections", access = JsonProperty.Access.WRITE_ONLY) + private List expressRouteConnections; + + /** + * The provisioning state of the express route gateway resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The Virtual Hub where the ExpressRoute gateway is or will be deployed. + */ + @JsonProperty(value = "properties.virtualHub", required = true) + private VirtualHubId virtualHub; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get configuration for auto scaling. + * + * @return the autoScaleConfiguration value + */ + public ExpressRouteGatewayPropertiesAutoScaleConfiguration autoScaleConfiguration() { + return this.autoScaleConfiguration; + } + + /** + * Set configuration for auto scaling. + * + * @param autoScaleConfiguration the autoScaleConfiguration value to set + * @return the ExpressRouteGatewayInner object itself. + */ + public ExpressRouteGatewayInner withAutoScaleConfiguration(ExpressRouteGatewayPropertiesAutoScaleConfiguration autoScaleConfiguration) { + this.autoScaleConfiguration = autoScaleConfiguration; + return this; + } + + /** + * Get list of ExpressRoute connections to the ExpressRoute gateway. + * + * @return the expressRouteConnections value + */ + public List expressRouteConnections() { + return this.expressRouteConnections; + } + + /** + * Get the provisioning state of the express route gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the Virtual Hub where the ExpressRoute gateway is or will be deployed. + * + * @return the virtualHub value + */ + public VirtualHubId virtualHub() { + return this.virtualHub; + } + + /** + * Set the Virtual Hub where the ExpressRoute gateway is or will be deployed. + * + * @param virtualHub the virtualHub value to set + * @return the ExpressRouteGatewayInner object itself. + */ + public ExpressRouteGatewayInner withVirtualHub(VirtualHubId virtualHub) { + this.virtualHub = virtualHub; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the ExpressRouteGatewayInner object itself. + */ + public ExpressRouteGatewayInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewaysImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewaysImpl.java new file mode 100644 index 000000000000..567afbdd7632 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewaysImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteGateways; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteGateway; +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; + +class ExpressRouteGatewaysImpl extends GroupableResourcesCoreImpl implements ExpressRouteGateways { + protected ExpressRouteGatewaysImpl(NetworkManager manager) { + super(manager.inner().expressRouteGateways(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ExpressRouteGatewaysInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ExpressRouteGatewaysInner 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) { + ExpressRouteGatewaysInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ExpressRouteGatewaysInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public ExpressRouteGateway call(ExpressRouteGatewayInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ExpressRouteGatewaysInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ExpressRouteGatewaysInner client = this.inner(); + return client.listAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public ExpressRouteGateway call(ExpressRouteGatewayInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public ExpressRouteGatewayImpl define(String name) { + return wrapModel(name); + } + + @Override + protected ExpressRouteGatewayImpl wrapModel(ExpressRouteGatewayInner inner) { + return new ExpressRouteGatewayImpl(inner.name(), inner, manager()); + } + + @Override + protected ExpressRouteGatewayImpl wrapModel(String name) { + return new ExpressRouteGatewayImpl(name, new ExpressRouteGatewayInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewaysInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewaysInner.java new file mode 100644 index 000000000000..3ba2dc5a09d2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewaysInner.java @@ -0,0 +1,662 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.CloudException; +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.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ExpressRouteGateways. + */ +public class ExpressRouteGatewaysInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ExpressRouteGatewaysService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRouteGatewaysInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRouteGatewaysInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRouteGatewaysService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRouteGateways to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRouteGatewaysService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRouteGateways list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways") + Observable> list(@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.network.v2019_09_01.ExpressRouteGateways listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.ExpressRouteGateways createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("expressRouteGatewayName") String expressRouteGatewayName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteGatewayInner putExpressRouteGatewayParameters, @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.network.v2019_09_01.ExpressRouteGateways beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("expressRouteGatewayName") String expressRouteGatewayName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteGatewayInner putExpressRouteGatewayParameters, @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.network.v2019_09_01.ExpressRouteGateways getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("expressRouteGatewayName") String expressRouteGatewayName, @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.network.v2019_09_01.ExpressRouteGateways delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("expressRouteGatewayName") String expressRouteGatewayName, @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.network.v2019_09_01.ExpressRouteGateways beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("expressRouteGatewayName") String expressRouteGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists ExpressRoute gateways under a given subscription. + * + * @return the PagedList object if successful. + */ + public PagedList list() { + PageImpl1 page = new PageImpl1<>(); + page.setItems(listWithServiceResponseAsync().toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Lists ExpressRoute gateways under a given subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists ExpressRoute gateways under a given subscription. + * + * @return the observable to the List<ExpressRouteGatewayInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Lists ExpressRoute gateways under a given subscription. + * + * @return the observable to the List<ExpressRouteGatewayInner> object + */ + public Observable>> listWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.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()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists ExpressRoute gateways in a given resource group. + * + * @param resourceGroupName The name of the resource group. + * @return the PagedList object if successful. + */ + public PagedList listByResourceGroup(String resourceGroupName) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(listByResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Lists ExpressRoute gateways in a given resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName), serviceCallback); + } + + /** + * Lists ExpressRoute gateways in a given resource group. + * + * @param resourceGroupName The name of the resource group. + * @return the observable to the List<ExpressRouteGatewayInner> object + */ + public Observable> listByResourceGroupAsync(String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Lists ExpressRoute gateways in a given resource group. + * + * @param resourceGroupName The name of the resource group. + * @return the observable to the List<ExpressRouteGatewayInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } 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 or updates a ExpressRoute gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param putExpressRouteGatewayParameters Parameters required in an ExpressRoute gateway PUT 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 ExpressRouteGatewayInner object if successful. + */ + public ExpressRouteGatewayInner createOrUpdate(String resourceGroupName, String expressRouteGatewayName, ExpressRouteGatewayInner putExpressRouteGatewayParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a ExpressRoute gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param putExpressRouteGatewayParameters Parameters required in an ExpressRoute gateway PUT 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 createOrUpdateAsync(String resourceGroupName, String expressRouteGatewayName, ExpressRouteGatewayInner putExpressRouteGatewayParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters), serviceCallback); + } + + /** + * Creates or updates a ExpressRoute gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param putExpressRouteGatewayParameters Parameters required in an ExpressRoute gateway PUT operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String expressRouteGatewayName, ExpressRouteGatewayInner putExpressRouteGatewayParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters).map(new Func1, ExpressRouteGatewayInner>() { + @Override + public ExpressRouteGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a ExpressRoute gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param putExpressRouteGatewayParameters Parameters required in an ExpressRoute gateway PUT operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String expressRouteGatewayName, ExpressRouteGatewayInner putExpressRouteGatewayParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (expressRouteGatewayName == null) { + throw new IllegalArgumentException("Parameter expressRouteGatewayName 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 (putExpressRouteGatewayParameters == null) { + throw new IllegalArgumentException("Parameter putExpressRouteGatewayParameters is required and cannot be null."); + } + Validator.validate(putExpressRouteGatewayParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, expressRouteGatewayName, this.client.subscriptionId(), putExpressRouteGatewayParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a ExpressRoute gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param putExpressRouteGatewayParameters Parameters required in an ExpressRoute gateway PUT 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 ExpressRouteGatewayInner object if successful. + */ + public ExpressRouteGatewayInner beginCreateOrUpdate(String resourceGroupName, String expressRouteGatewayName, ExpressRouteGatewayInner putExpressRouteGatewayParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a ExpressRoute gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param putExpressRouteGatewayParameters Parameters required in an ExpressRoute gateway PUT 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 beginCreateOrUpdateAsync(String resourceGroupName, String expressRouteGatewayName, ExpressRouteGatewayInner putExpressRouteGatewayParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters), serviceCallback); + } + + /** + * Creates or updates a ExpressRoute gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param putExpressRouteGatewayParameters Parameters required in an ExpressRoute gateway PUT operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteGatewayInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String expressRouteGatewayName, ExpressRouteGatewayInner putExpressRouteGatewayParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters).map(new Func1, ExpressRouteGatewayInner>() { + @Override + public ExpressRouteGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a ExpressRoute gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @param putExpressRouteGatewayParameters Parameters required in an ExpressRoute gateway PUT operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteGatewayInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String expressRouteGatewayName, ExpressRouteGatewayInner putExpressRouteGatewayParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (expressRouteGatewayName == null) { + throw new IllegalArgumentException("Parameter expressRouteGatewayName 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 (putExpressRouteGatewayParameters == null) { + throw new IllegalArgumentException("Parameter putExpressRouteGatewayParameters is required and cannot be null."); + } + Validator.validate(putExpressRouteGatewayParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, expressRouteGatewayName, this.client.subscriptionId(), putExpressRouteGatewayParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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); + } + + /** + * Fetches the details of a ExpressRoute gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteGatewayInner object if successful. + */ + public ExpressRouteGatewayInner getByResourceGroup(String resourceGroupName, String expressRouteGatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName).toBlocking().single().body(); + } + + /** + * Fetches the details of a ExpressRoute gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @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 expressRouteGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName), serviceCallback); + } + + /** + * Fetches the details of a ExpressRoute gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteGatewayInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String expressRouteGatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName).map(new Func1, ExpressRouteGatewayInner>() { + @Override + public ExpressRouteGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Fetches the details of a ExpressRoute gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteGatewayInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String expressRouteGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (expressRouteGatewayName == null) { + throw new IllegalArgumentException("Parameter expressRouteGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, expressRouteGatewayName, this.client.subscriptionId(), 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); + } + + /** + * Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 expressRouteGatewayName) { + deleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName).toBlocking().last().body(); + } + + /** + * Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @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 expressRouteGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName), serviceCallback); + } + + /** + * Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String expressRouteGatewayName) { + return deleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String expressRouteGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (expressRouteGatewayName == null) { + throw new IllegalArgumentException("Parameter expressRouteGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, expressRouteGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 expressRouteGatewayName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName).toBlocking().single().body(); + } + + /** + * Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @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 expressRouteGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName), serviceCallback); + } + + /** + * Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String expressRouteGatewayName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. + * + * @param resourceGroupName The name of the resource group. + * @param expressRouteGatewayName The name of the ExpressRoute gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String expressRouteGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (expressRouteGatewayName == null) { + throw new IllegalArgumentException("Parameter expressRouteGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, expressRouteGatewayName, this.client.subscriptionId(), 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); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinkImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinkImpl.java new file mode 100644 index 000000000000..8d4d76ffc894 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinkImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteLink; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteLinkAdminState; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteLinkConnectorType; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteLinkMacSecConfig; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class ExpressRouteLinkImpl extends IndexableRefreshableWrapperImpl implements ExpressRouteLink { + private final NetworkManager manager; + private String resourceGroupName; + private String expressRoutePortName; + private String linkName; + + ExpressRouteLinkImpl(ExpressRouteLinkInner inner, NetworkManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.expressRoutePortName = IdParsingUtils.getValueFromIdByName(inner.id(), "ExpressRoutePorts"); + this.linkName = IdParsingUtils.getValueFromIdByName(inner.id(), "links"); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + ExpressRouteLinksInner client = this.manager().inner().expressRouteLinks(); + return client.getAsync(this.resourceGroupName, this.expressRoutePortName, this.linkName); + } + + + + @Override + public ExpressRouteLinkAdminState adminState() { + return this.inner().adminState(); + } + + @Override + public ExpressRouteLinkConnectorType connectorType() { + return this.inner().connectorType(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String interfaceName() { + return this.inner().interfaceName(); + } + + @Override + public ExpressRouteLinkMacSecConfig macSecConfig() { + return this.inner().macSecConfig(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String patchPanelId() { + return this.inner().patchPanelId(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String rackId() { + return this.inner().rackId(); + } + + @Override + public String routerName() { + return this.inner().routerName(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinkInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinkInner.java new file mode 100644 index 000000000000..89883195b43d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinkInner.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteLinkConnectorType; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteLinkAdminState; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteLinkMacSecConfig; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * ExpressRouteLink. + * ExpressRouteLink child resource definition. + */ +@JsonFlatten +public class ExpressRouteLinkInner extends SubResource { + /** + * Name of Azure router associated with physical port. + */ + @JsonProperty(value = "properties.routerName", access = JsonProperty.Access.WRITE_ONLY) + private String routerName; + + /** + * Name of Azure router interface. + */ + @JsonProperty(value = "properties.interfaceName", access = JsonProperty.Access.WRITE_ONLY) + private String interfaceName; + + /** + * Mapping between physical port to patch panel port. + */ + @JsonProperty(value = "properties.patchPanelId", access = JsonProperty.Access.WRITE_ONLY) + private String patchPanelId; + + /** + * Mapping of physical patch panel to rack. + */ + @JsonProperty(value = "properties.rackId", access = JsonProperty.Access.WRITE_ONLY) + private String rackId; + + /** + * Physical fiber port type. Possible values include: 'LC', 'SC'. + */ + @JsonProperty(value = "properties.connectorType", access = JsonProperty.Access.WRITE_ONLY) + private ExpressRouteLinkConnectorType connectorType; + + /** + * Administrative state of the physical port. Possible values include: + * 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.adminState") + private ExpressRouteLinkAdminState adminState; + + /** + * The provisioning state of the express route link resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * MacSec configuration. + */ + @JsonProperty(value = "properties.macSecConfig") + private ExpressRouteLinkMacSecConfig macSecConfig; + + /** + * Name of child port resource that is unique among child port resources of + * the parent. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get name of Azure router associated with physical port. + * + * @return the routerName value + */ + public String routerName() { + return this.routerName; + } + + /** + * Get name of Azure router interface. + * + * @return the interfaceName value + */ + public String interfaceName() { + return this.interfaceName; + } + + /** + * Get mapping between physical port to patch panel port. + * + * @return the patchPanelId value + */ + public String patchPanelId() { + return this.patchPanelId; + } + + /** + * Get mapping of physical patch panel to rack. + * + * @return the rackId value + */ + public String rackId() { + return this.rackId; + } + + /** + * Get physical fiber port type. Possible values include: 'LC', 'SC'. + * + * @return the connectorType value + */ + public ExpressRouteLinkConnectorType connectorType() { + return this.connectorType; + } + + /** + * Get administrative state of the physical port. Possible values include: 'Enabled', 'Disabled'. + * + * @return the adminState value + */ + public ExpressRouteLinkAdminState adminState() { + return this.adminState; + } + + /** + * Set administrative state of the physical port. Possible values include: 'Enabled', 'Disabled'. + * + * @param adminState the adminState value to set + * @return the ExpressRouteLinkInner object itself. + */ + public ExpressRouteLinkInner withAdminState(ExpressRouteLinkAdminState adminState) { + this.adminState = adminState; + return this; + } + + /** + * Get the provisioning state of the express route link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get macSec configuration. + * + * @return the macSecConfig value + */ + public ExpressRouteLinkMacSecConfig macSecConfig() { + return this.macSecConfig; + } + + /** + * Set macSec configuration. + * + * @param macSecConfig the macSecConfig value to set + * @return the ExpressRouteLinkInner object itself. + */ + public ExpressRouteLinkInner withMacSecConfig(ExpressRouteLinkMacSecConfig macSecConfig) { + this.macSecConfig = macSecConfig; + return this; + } + + /** + * Get name of child port resource that is unique among child port resources of the parent. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of child port resource that is unique among child port resources of the parent. + * + * @param name the name value to set + * @return the ExpressRouteLinkInner object itself. + */ + public ExpressRouteLinkInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinksImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinksImpl.java new file mode 100644 index 000000000000..a08c7da31f2c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinksImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteLinks; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteLink; + +class ExpressRouteLinksImpl extends WrapperImpl implements ExpressRouteLinks { + private final NetworkManager manager; + + ExpressRouteLinksImpl(NetworkManager manager) { + super(manager.inner().expressRouteLinks()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private ExpressRouteLinkImpl wrapModel(ExpressRouteLinkInner inner) { + return new ExpressRouteLinkImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String expressRoutePortName) { + ExpressRouteLinksInner client = this.inner(); + return client.listAsync(resourceGroupName, expressRoutePortName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ExpressRouteLink call(ExpressRouteLinkInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String expressRoutePortName, String linkName) { + ExpressRouteLinksInner client = this.inner(); + return client.getAsync(resourceGroupName, expressRoutePortName, linkName) + .flatMap(new Func1>() { + @Override + public Observable call(ExpressRouteLinkInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ExpressRouteLink)wrapModel(inner)); + } + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinksInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinksInner.java new file mode 100644 index 000000000000..34c02d433eaa --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteLinksInner.java @@ -0,0 +1,397 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ExpressRouteLinks. + */ +public class ExpressRouteLinksInner { + /** The Retrofit service to perform REST calls. */ + private ExpressRouteLinksService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRouteLinksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRouteLinksInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRouteLinksService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRouteLinks to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRouteLinksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRouteLinks get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @Path("linkName") String linkName, @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.network.v2019_09_01.ExpressRouteLinks list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @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.network.v2019_09_01.ExpressRouteLinks listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves the specified ExpressRouteLink resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param linkName The name of the ExpressRouteLink resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRouteLinkInner object if successful. + */ + public ExpressRouteLinkInner get(String resourceGroupName, String expressRoutePortName, String linkName) { + return getWithServiceResponseAsync(resourceGroupName, expressRoutePortName, linkName).toBlocking().single().body(); + } + + /** + * Retrieves the specified ExpressRouteLink resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param linkName The name of the ExpressRouteLink resource. + * @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 expressRoutePortName, String linkName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, expressRoutePortName, linkName), serviceCallback); + } + + /** + * Retrieves the specified ExpressRouteLink resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param linkName The name of the ExpressRouteLink resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteLinkInner object + */ + public Observable getAsync(String resourceGroupName, String expressRoutePortName, String linkName) { + return getWithServiceResponseAsync(resourceGroupName, expressRoutePortName, linkName).map(new Func1, ExpressRouteLinkInner>() { + @Override + public ExpressRouteLinkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the specified ExpressRouteLink resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param linkName The name of the ExpressRouteLink resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteLinkInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName, String linkName) { + 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 (expressRoutePortName == null) { + throw new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."); + } + if (linkName == null) { + throw new IllegalArgumentException("Parameter linkName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, linkName, 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); + } + + /** + * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ExpressRouteLinkInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String expressRoutePortName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, expressRoutePortName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @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 resourceGroupName, final String expressRoutePortName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, expressRoutePortName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteLinkInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String expressRoutePortName) { + return listWithServiceResponseAsync(resourceGroupName, expressRoutePortName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteLinkInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String expressRoutePortName) { + return listSinglePageAsync(resourceGroupName, expressRoutePortName) + .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)); + } + }); + } + + /** + * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteLinkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String expressRoutePortName) { + 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 (expressRoutePortName == null) { + throw new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, 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); + } + + /** + * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + * + * @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<ExpressRouteLinkInner> 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(); + } + }; + } + + /** + * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + * + * @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); + } + + /** + * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + * + * @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<ExpressRouteLinkInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + * + * @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<ExpressRouteLinkInner> 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)); + } + }); + } + + /** + * Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteLinkInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortImpl.java new file mode 100644 index 000000000000..24aef0d750c2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortImpl.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePort; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePortsEncapsulation; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.ManagedServiceIdentity; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteLink; + +class ExpressRoutePortImpl extends GroupableResourceCoreImpl implements ExpressRoutePort, ExpressRoutePort.Definition, ExpressRoutePort.Update { + ExpressRoutePortImpl(String name, ExpressRoutePortInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ExpressRoutePortsInner client = this.manager().inner().expressRoutePorts(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ExpressRoutePortsInner client = this.manager().inner().expressRoutePorts(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ExpressRoutePortsInner client = this.manager().inner().expressRoutePorts(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String allocationDate() { + return this.inner().allocationDate(); + } + + @Override + public Integer bandwidthInGbps() { + return this.inner().bandwidthInGbps(); + } + + @Override + public List circuits() { + return this.inner().circuits(); + } + + @Override + public ExpressRoutePortsEncapsulation encapsulation() { + return this.inner().encapsulation(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String etherType() { + return this.inner().etherType(); + } + + @Override + public ManagedServiceIdentity identity() { + return this.inner().identity(); + } + + @Override + public List links() { + List lst = new ArrayList(); + if (this.inner().links() != null) { + for (ExpressRouteLinkInner inner : this.inner().links()) { + lst.add( new ExpressRouteLinkImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String mtu() { + return this.inner().mtu(); + } + + @Override + public String peeringLocation() { + return this.inner().peeringLocation(); + } + + @Override + public Double provisionedBandwidthInGbps() { + return this.inner().provisionedBandwidthInGbps(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public ExpressRoutePortImpl withBandwidthInGbps(Integer bandwidthInGbps) { + this.inner().withBandwidthInGbps(bandwidthInGbps); + return this; + } + + @Override + public ExpressRoutePortImpl withEncapsulation(ExpressRoutePortsEncapsulation encapsulation) { + this.inner().withEncapsulation(encapsulation); + return this; + } + + @Override + public ExpressRoutePortImpl withIdentity(ManagedServiceIdentity identity) { + this.inner().withIdentity(identity); + return this; + } + + @Override + public ExpressRoutePortImpl withLinks(List links) { + this.inner().withLinks(links); + return this; + } + + @Override + public ExpressRoutePortImpl withPeeringLocation(String peeringLocation) { + this.inner().withPeeringLocation(peeringLocation); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortInner.java new file mode 100644 index 000000000000..1c043e9f4b11 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortInner.java @@ -0,0 +1,310 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePortsEncapsulation; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.ManagedServiceIdentity; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * ExpressRoute Port. + * ExpressRoutePort resource definition. + */ +@JsonFlatten +@SkipParentValidation +public class ExpressRoutePortInner extends Resource { + /** + * The name of the peering location that the ExpressRoutePort is mapped to + * physically. + */ + @JsonProperty(value = "properties.peeringLocation") + private String peeringLocation; + + /** + * Bandwidth of procured ports in Gbps. + */ + @JsonProperty(value = "properties.bandwidthInGbps") + private Integer bandwidthInGbps; + + /** + * Aggregate Gbps of associated circuit bandwidths. + */ + @JsonProperty(value = "properties.provisionedBandwidthInGbps", access = JsonProperty.Access.WRITE_ONLY) + private Double provisionedBandwidthInGbps; + + /** + * Maximum transmission unit of the physical port pair(s). + */ + @JsonProperty(value = "properties.mtu", access = JsonProperty.Access.WRITE_ONLY) + private String mtu; + + /** + * Encapsulation method on physical ports. Possible values include: + * 'Dot1Q', 'QinQ'. + */ + @JsonProperty(value = "properties.encapsulation") + private ExpressRoutePortsEncapsulation encapsulation; + + /** + * Ether type of the physical port. + */ + @JsonProperty(value = "properties.etherType", access = JsonProperty.Access.WRITE_ONLY) + private String etherType; + + /** + * Date of the physical port allocation to be used in Letter of + * Authorization. + */ + @JsonProperty(value = "properties.allocationDate", access = JsonProperty.Access.WRITE_ONLY) + private String allocationDate; + + /** + * ExpressRouteLink Sub-Resources. + * The set of physical links of the ExpressRoutePort resource. + */ + @JsonProperty(value = "properties.links") + private List links; + + /** + * Reference the ExpressRoute circuit(s) that are provisioned on this + * ExpressRoutePort resource. + */ + @JsonProperty(value = "properties.circuits", access = JsonProperty.Access.WRITE_ONLY) + private List circuits; + + /** + * The provisioning state of the express route port resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The resource GUID property of the express route port resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * The identity of ExpressRoutePort, if configured. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the name of the peering location that the ExpressRoutePort is mapped to physically. + * + * @return the peeringLocation value + */ + public String peeringLocation() { + return this.peeringLocation; + } + + /** + * Set the name of the peering location that the ExpressRoutePort is mapped to physically. + * + * @param peeringLocation the peeringLocation value to set + * @return the ExpressRoutePortInner object itself. + */ + public ExpressRoutePortInner withPeeringLocation(String peeringLocation) { + this.peeringLocation = peeringLocation; + return this; + } + + /** + * Get bandwidth of procured ports in Gbps. + * + * @return the bandwidthInGbps value + */ + public Integer bandwidthInGbps() { + return this.bandwidthInGbps; + } + + /** + * Set bandwidth of procured ports in Gbps. + * + * @param bandwidthInGbps the bandwidthInGbps value to set + * @return the ExpressRoutePortInner object itself. + */ + public ExpressRoutePortInner withBandwidthInGbps(Integer bandwidthInGbps) { + this.bandwidthInGbps = bandwidthInGbps; + return this; + } + + /** + * Get aggregate Gbps of associated circuit bandwidths. + * + * @return the provisionedBandwidthInGbps value + */ + public Double provisionedBandwidthInGbps() { + return this.provisionedBandwidthInGbps; + } + + /** + * Get maximum transmission unit of the physical port pair(s). + * + * @return the mtu value + */ + public String mtu() { + return this.mtu; + } + + /** + * Get encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'. + * + * @return the encapsulation value + */ + public ExpressRoutePortsEncapsulation encapsulation() { + return this.encapsulation; + } + + /** + * Set encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'. + * + * @param encapsulation the encapsulation value to set + * @return the ExpressRoutePortInner object itself. + */ + public ExpressRoutePortInner withEncapsulation(ExpressRoutePortsEncapsulation encapsulation) { + this.encapsulation = encapsulation; + return this; + } + + /** + * Get ether type of the physical port. + * + * @return the etherType value + */ + public String etherType() { + return this.etherType; + } + + /** + * Get date of the physical port allocation to be used in Letter of Authorization. + * + * @return the allocationDate value + */ + public String allocationDate() { + return this.allocationDate; + } + + /** + * Get the set of physical links of the ExpressRoutePort resource. + * + * @return the links value + */ + public List links() { + return this.links; + } + + /** + * Set the set of physical links of the ExpressRoutePort resource. + * + * @param links the links value to set + * @return the ExpressRoutePortInner object itself. + */ + public ExpressRoutePortInner withLinks(List links) { + this.links = links; + return this; + } + + /** + * Get reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource. + * + * @return the circuits value + */ + public List circuits() { + return this.circuits; + } + + /** + * Get the provisioning state of the express route port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the resource GUID property of the express route port resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get the identity of ExpressRoutePort, if configured. + * + * @return the identity value + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity of ExpressRoutePort, if configured. + * + * @param identity the identity value to set + * @return the ExpressRoutePortInner object itself. + */ + public ExpressRoutePortInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the ExpressRoutePortInner object itself. + */ + public ExpressRoutePortInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsImpl.java new file mode 100644 index 000000000000..f41967ec0926 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePorts; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePort; +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; + +class ExpressRoutePortsImpl extends GroupableResourcesCoreImpl implements ExpressRoutePorts { + protected ExpressRoutePortsImpl(NetworkManager manager) { + super(manager.inner().expressRoutePorts(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ExpressRoutePortsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ExpressRoutePortsInner 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) { + ExpressRoutePortsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ExpressRoutePortsInner 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 ExpressRoutePort call(ExpressRoutePortInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ExpressRoutePortsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ExpressRoutePortsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ExpressRoutePort call(ExpressRoutePortInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public ExpressRoutePortImpl define(String name) { + return wrapModel(name); + } + + @Override + protected ExpressRoutePortImpl wrapModel(ExpressRoutePortInner inner) { + return new ExpressRoutePortImpl(inner.name(), inner, manager()); + } + + @Override + protected ExpressRoutePortImpl wrapModel(String name) { + return new ExpressRoutePortImpl(name, new ExpressRoutePortInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsInner.java new file mode 100644 index 000000000000..caa29626ca16 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsInner.java @@ -0,0 +1,1126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 ExpressRoutePorts. + */ +public class ExpressRoutePortsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ExpressRoutePortsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRoutePortsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRoutePortsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRoutePortsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRoutePorts to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRoutePortsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePorts delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @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.network.v2019_09_01.ExpressRoutePorts beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @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.network.v2019_09_01.ExpressRoutePorts getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @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.network.v2019_09_01.ExpressRoutePorts createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @Query("api-version") String apiVersion, @Body ExpressRoutePortInner parameters, @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.network.v2019_09_01.ExpressRoutePorts beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @Query("api-version") String apiVersion, @Body ExpressRoutePortInner parameters, @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.network.v2019_09_01.ExpressRoutePorts updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}") + Observable> updateTags(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePorts listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.ExpressRoutePorts list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts") + Observable> list(@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.network.v2019_09_01.ExpressRoutePorts 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.network.v2019_09_01.ExpressRoutePorts listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 expressRoutePortName) { + deleteWithServiceResponseAsync(resourceGroupName, expressRoutePortName).toBlocking().last().body(); + } + + /** + * Deletes the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @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 expressRoutePortName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, expressRoutePortName), serviceCallback); + } + + /** + * Deletes the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String expressRoutePortName) { + return deleteWithServiceResponseAsync(resourceGroupName, expressRoutePortName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName) { + 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 (expressRoutePortName == null) { + throw new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 expressRoutePortName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, expressRoutePortName).toBlocking().single().body(); + } + + /** + * Deletes the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @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 expressRoutePortName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, expressRoutePortName), serviceCallback); + } + + /** + * Deletes the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String expressRoutePortName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, expressRoutePortName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName) { + 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 (expressRoutePortName == null) { + throw new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, 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); + } + + /** + * Retrieves the requested ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of ExpressRoutePort. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRoutePortInner object if successful. + */ + public ExpressRoutePortInner getByResourceGroup(String resourceGroupName, String expressRoutePortName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, expressRoutePortName).toBlocking().single().body(); + } + + /** + * Retrieves the requested ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of ExpressRoutePort. + * @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 expressRoutePortName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, expressRoutePortName), serviceCallback); + } + + /** + * Retrieves the requested ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of ExpressRoutePort. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRoutePortInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String expressRoutePortName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, expressRoutePortName).map(new Func1, ExpressRoutePortInner>() { + @Override + public ExpressRoutePortInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the requested ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of ExpressRoutePort. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRoutePortInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName) { + 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 (expressRoutePortName == null) { + throw new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, 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); + } + + /** + * Creates or updates the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param parameters Parameters supplied to the create ExpressRoutePort 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 ExpressRoutePortInner object if successful. + */ + public ExpressRoutePortInner createOrUpdate(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRoutePortName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param parameters Parameters supplied to the create ExpressRoutePort 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 createOrUpdateAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRoutePortName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param parameters Parameters supplied to the create ExpressRoutePort operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRoutePortName, parameters).map(new Func1, ExpressRoutePortInner>() { + @Override + public ExpressRoutePortInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param parameters Parameters supplied to the create ExpressRoutePort operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner 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 (expressRoutePortName == null) { + throw new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param parameters Parameters supplied to the create ExpressRoutePort 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 ExpressRoutePortInner object if successful. + */ + public ExpressRoutePortInner beginCreateOrUpdate(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, expressRoutePortName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param parameters Parameters supplied to the create ExpressRoutePort 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 beginCreateOrUpdateAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, expressRoutePortName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param parameters Parameters supplied to the create ExpressRoutePort operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRoutePortInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, expressRoutePortName, parameters).map(new Func1, ExpressRoutePortInner>() { + @Override + public ExpressRoutePortInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified ExpressRoutePort resource. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param parameters Parameters supplied to the create ExpressRoutePort operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRoutePortInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner 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 (expressRoutePortName == null) { + throw new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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); + } + + /** + * Update ExpressRoutePort tags. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRoutePortInner object if successful. + */ + public ExpressRoutePortInner updateTags(String resourceGroupName, String expressRoutePortName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, expressRoutePortName).toBlocking().single().body(); + } + + /** + * Update ExpressRoutePort tags. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @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 updateTagsAsync(String resourceGroupName, String expressRoutePortName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, expressRoutePortName), serviceCallback); + } + + /** + * Update ExpressRoutePort tags. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRoutePortInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String expressRoutePortName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, expressRoutePortName).map(new Func1, ExpressRoutePortInner>() { + @Override + public ExpressRoutePortInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update ExpressRoutePort tags. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRoutePortInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName) { + 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 (expressRoutePortName == null) { + throw new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Update ExpressRoutePort tags. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRoutePortInner object if successful. + */ + public ExpressRoutePortInner updateTags(String resourceGroupName, String expressRoutePortName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, expressRoutePortName, tags).toBlocking().single().body(); + } + + /** + * Update ExpressRoutePort tags. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String expressRoutePortName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, expressRoutePortName, tags), serviceCallback); + } + + /** + * Update ExpressRoutePort tags. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRoutePortInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String expressRoutePortName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, expressRoutePortName, tags).map(new Func1, ExpressRoutePortInner>() { + @Override + public ExpressRoutePortInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update ExpressRoutePort tags. + * + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the ExpressRoutePort resource. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRoutePortInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName, Map tags) { + 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 (expressRoutePortName == null) { + throw new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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); + } + + /** + * List all the ExpressRoutePort resources in the specified resource group. + * + * @param resourceGroupName The name of the 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<ExpressRoutePortInner> 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(); + } + }; + } + + /** + * List all the ExpressRoutePort resources in the specified resource group. + * + * @param resourceGroupName The name of the 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); + } + + /** + * List all the ExpressRoutePort resources in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRoutePortInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all the ExpressRoutePort resources in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRoutePortInner> 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)); + } + }); + } + + /** + * List all the ExpressRoutePort resources in the specified resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRoutePortInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, 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); + } + + /** + * List all the ExpressRoutePort resources in the specified subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ExpressRoutePortInner> 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(); + } + }; + } + + /** + * List all the ExpressRoutePort resources in the specified subscription. + * + * @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); + } + + /** + * List all the ExpressRoutePort resources in the specified subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRoutePortInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all the ExpressRoutePort resources in the specified subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRoutePortInner> 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)); + } + }); + } + + /** + * List all the ExpressRoutePort resources in the specified subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRoutePortInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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); + } + + /** + * List all the ExpressRoutePort resources in the specified resource group. + * + * @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<ExpressRoutePortInner> 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(); + } + }; + } + + /** + * List all the ExpressRoutePort resources in the specified resource group. + * + * @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); + } + + /** + * List all the ExpressRoutePort resources in the specified resource group. + * + * @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<ExpressRoutePortInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all the ExpressRoutePort resources in the specified resource group. + * + * @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<ExpressRoutePortInner> 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)); + } + }); + } + + /** + * List all the ExpressRoutePort resources in the specified resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRoutePortInner> 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); + } + + /** + * List all the ExpressRoutePort resources in the specified subscription. + * + * @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<ExpressRoutePortInner> 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(); + } + }; + } + + /** + * List all the ExpressRoutePort resources in the specified subscription. + * + * @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); + } + + /** + * List all the ExpressRoutePort resources in the specified subscription. + * + * @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<ExpressRoutePortInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all the ExpressRoutePort resources in the specified subscription. + * + * @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<ExpressRoutePortInner> 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)); + } + }); + } + + /** + * List all the ExpressRoutePort resources in the specified subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRoutePortInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationImpl.java new file mode 100644 index 000000000000..d8345887beb1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePortsLocation; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePortsLocationBandwidths; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class ExpressRoutePortsLocationImpl extends GroupableResourceCoreImpl implements ExpressRoutePortsLocation { + ExpressRoutePortsLocationImpl(String name, ExpressRoutePortsLocationInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ExpressRoutePortsLocationsInner client = this.manager().inner().expressRoutePortsLocations(); + return null; // NOP createResourceAsync implementation as create is not supported + } + + @Override + public Observable updateResourceAsync() { + ExpressRoutePortsLocationsInner client = this.manager().inner().expressRoutePortsLocations(); + return null; // NOP updateResourceAsync implementation as update is not supported + } + + @Override + protected Observable getInnerAsync() { + ExpressRoutePortsLocationsInner client = this.manager().inner().expressRoutePortsLocations(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + + + @Override + public String address() { + return this.inner().address(); + } + + @Override + public List availableBandwidths() { + return this.inner().availableBandwidths(); + } + + @Override + public String contact() { + return this.inner().contact(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationInner.java new file mode 100644 index 000000000000..b82db796a24c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationInner.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePortsLocationBandwidths; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * ExpressRoutePorts Peering Location. + * Definition of the ExpressRoutePorts peering location resource. + */ +@JsonFlatten +@SkipParentValidation +public class ExpressRoutePortsLocationInner extends Resource { + /** + * Address of peering location. + */ + @JsonProperty(value = "properties.address", access = JsonProperty.Access.WRITE_ONLY) + private String address; + + /** + * Contact details of peering locations. + */ + @JsonProperty(value = "properties.contact", access = JsonProperty.Access.WRITE_ONLY) + private String contact; + + /** + * The inventory of available ExpressRoutePort bandwidths. + */ + @JsonProperty(value = "properties.availableBandwidths") + private List availableBandwidths; + + /** + * The provisioning state of the express route port location resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get address of peering location. + * + * @return the address value + */ + public String address() { + return this.address; + } + + /** + * Get contact details of peering locations. + * + * @return the contact value + */ + public String contact() { + return this.contact; + } + + /** + * Get the inventory of available ExpressRoutePort bandwidths. + * + * @return the availableBandwidths value + */ + public List availableBandwidths() { + return this.availableBandwidths; + } + + /** + * Set the inventory of available ExpressRoutePort bandwidths. + * + * @param availableBandwidths the availableBandwidths value to set + * @return the ExpressRoutePortsLocationInner object itself. + */ + public ExpressRoutePortsLocationInner withAvailableBandwidths(List availableBandwidths) { + this.availableBandwidths = availableBandwidths; + return this; + } + + /** + * Get the provisioning state of the express route port location resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the ExpressRoutePortsLocationInner object itself. + */ + public ExpressRoutePortsLocationInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationsImpl.java new file mode 100644 index 000000000000..ed48f4b42273 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationsImpl.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePortsLocations; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePortsLocation; +import rx.Observable; +import rx.Completable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; + +class ExpressRoutePortsLocationsImpl extends GroupableResourcesCoreImpl implements ExpressRoutePortsLocations { + protected ExpressRoutePortsLocationsImpl(NetworkManager manager) { + super(manager.inner().expressRoutePortsLocations(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + return null; // NOP Retrieve by resource group not supported + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ExpressRoutePortsLocationsInner client = this.inner(); + return Completable.error(new Throwable("Delete by RG not supported for this resource")); // NOP Delete by RG not supported + } + + @Override + public PagedList list() { + ExpressRoutePortsLocationsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ExpressRoutePortsLocationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ExpressRoutePortsLocation call(ExpressRoutePortsLocationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String locationName) { + ExpressRoutePortsLocationsInner client = this.inner(); + return client.getAsync(locationName) + .map(new Func1() { + @Override + public ExpressRoutePortsLocation call(ExpressRoutePortsLocationInner inner) { + return new ExpressRoutePortsLocationImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + protected ExpressRoutePortsLocationImpl wrapModel(ExpressRoutePortsLocationInner inner) { + return new ExpressRoutePortsLocationImpl(inner.name(), inner, manager()); + } + + @Override + protected ExpressRoutePortsLocationImpl wrapModel(String name) { + return null; // Model is not creatable + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationsInner.java new file mode 100644 index 000000000000..2e48f1f6de1c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRoutePortsLocationsInner.java @@ -0,0 +1,367 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ExpressRoutePortsLocations. + */ +public class ExpressRoutePortsLocationsInner { + /** The Retrofit service to perform REST calls. */ + private ExpressRoutePortsLocationsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRoutePortsLocationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRoutePortsLocationsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRoutePortsLocationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRoutePortsLocations to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRoutePortsLocationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePortsLocations list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations") + Observable> list(@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.network.v2019_09_01.ExpressRoutePortsLocations get" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("locationName") String locationName, @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.network.v2019_09_01.ExpressRoutePortsLocations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ExpressRoutePortsLocationInner> 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(); + } + }; + } + + /** + * Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. + * + * @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); + } + + /** + * Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRoutePortsLocationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRoutePortsLocationInner> 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)); + } + }); + } + + /** + * Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRoutePortsLocationInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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); + } + + /** + * Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. + * + * @param locationName Name of the requested ExpressRoutePort peering location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ExpressRoutePortsLocationInner object if successful. + */ + public ExpressRoutePortsLocationInner get(String locationName) { + return getWithServiceResponseAsync(locationName).toBlocking().single().body(); + } + + /** + * Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. + * + * @param locationName Name of the requested ExpressRoutePort peering location. + * @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 locationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(locationName), serviceCallback); + } + + /** + * Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. + * + * @param locationName Name of the requested ExpressRoutePort peering location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRoutePortsLocationInner object + */ + public Observable getAsync(String locationName) { + return getWithServiceResponseAsync(locationName).map(new Func1, ExpressRoutePortsLocationInner>() { + @Override + public ExpressRoutePortsLocationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. + * + * @param locationName Name of the requested ExpressRoutePort peering location. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRoutePortsLocationInner object + */ + public Observable> getWithServiceResponseAsync(String locationName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (locationName == null) { + throw new IllegalArgumentException("Parameter locationName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(this.client.subscriptionId(), locationName, 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); + } + + /** + * Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. + * + * @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<ExpressRoutePortsLocationInner> 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(); + } + }; + } + + /** + * Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. + * + * @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); + } + + /** + * Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. + * + * @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<ExpressRoutePortsLocationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. + * + * @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<ExpressRoutePortsLocationInner> 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)); + } + }); + } + + /** + * Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRoutePortsLocationInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProviderImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProviderImpl.java new file mode 100644 index 000000000000..f24fc8e3b147 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProviderImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteServiceProvider; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteServiceProviderBandwidthsOffered; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class ExpressRouteServiceProviderImpl extends GroupableResourceCoreImpl implements ExpressRouteServiceProvider { + ExpressRouteServiceProviderImpl(String name, ExpressRouteServiceProviderInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ExpressRouteServiceProvidersInner client = this.manager().inner().expressRouteServiceProviders(); + return null; // NOP createResourceAsync implementation as create is not supported + } + + @Override + public Observable updateResourceAsync() { + ExpressRouteServiceProvidersInner client = this.manager().inner().expressRouteServiceProviders(); + return null; // NOP updateResourceAsync implementation as update is not supported + } + + @Override + protected Observable getInnerAsync() { + ExpressRouteServiceProvidersInner client = this.manager().inner().expressRouteServiceProviders(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + + + @Override + public List bandwidthsOffered() { + return this.inner().bandwidthsOffered(); + } + + @Override + public List peeringLocations() { + return this.inner().peeringLocations(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProviderInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProviderInner.java new file mode 100644 index 000000000000..4faa1d46fd0b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProviderInner.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteServiceProviderBandwidthsOffered; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * A ExpressRouteResourceProvider object. + */ +@JsonFlatten +@SkipParentValidation +public class ExpressRouteServiceProviderInner extends Resource { + /** + * A list of peering locations. + */ + @JsonProperty(value = "properties.peeringLocations") + private List peeringLocations; + + /** + * A list of bandwidths offered. + */ + @JsonProperty(value = "properties.bandwidthsOffered") + private List bandwidthsOffered; + + /** + * The provisioning state of the express route service provider resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get a list of peering locations. + * + * @return the peeringLocations value + */ + public List peeringLocations() { + return this.peeringLocations; + } + + /** + * Set a list of peering locations. + * + * @param peeringLocations the peeringLocations value to set + * @return the ExpressRouteServiceProviderInner object itself. + */ + public ExpressRouteServiceProviderInner withPeeringLocations(List peeringLocations) { + this.peeringLocations = peeringLocations; + return this; + } + + /** + * Get a list of bandwidths offered. + * + * @return the bandwidthsOffered value + */ + public List bandwidthsOffered() { + return this.bandwidthsOffered; + } + + /** + * Set a list of bandwidths offered. + * + * @param bandwidthsOffered the bandwidthsOffered value to set + * @return the ExpressRouteServiceProviderInner object itself. + */ + public ExpressRouteServiceProviderInner withBandwidthsOffered(List bandwidthsOffered) { + this.bandwidthsOffered = bandwidthsOffered; + return this; + } + + /** + * Get the provisioning state of the express route service provider resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the ExpressRouteServiceProviderInner object itself. + */ + public ExpressRouteServiceProviderInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProvidersImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProvidersImpl.java new file mode 100644 index 000000000000..0684d7db259c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProvidersImpl.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteServiceProviders; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteServiceProvider; +import rx.Observable; +import rx.Completable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; + +class ExpressRouteServiceProvidersImpl extends GroupableResourcesCoreImpl implements ExpressRouteServiceProviders { + protected ExpressRouteServiceProvidersImpl(NetworkManager manager) { + super(manager.inner().expressRouteServiceProviders(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + return null; // NOP Retrieve by resource group not supported + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ExpressRouteServiceProvidersInner client = this.inner(); + return Completable.error(new Throwable("Delete by RG not supported for this resource")); // NOP Delete by RG not supported + } + + @Override + public PagedList list() { + ExpressRouteServiceProvidersInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ExpressRouteServiceProvidersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ExpressRouteServiceProvider call(ExpressRouteServiceProviderInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + protected ExpressRouteServiceProviderImpl wrapModel(ExpressRouteServiceProviderInner inner) { + return new ExpressRouteServiceProviderImpl(inner.name(), inner, manager()); + } + + @Override + protected ExpressRouteServiceProviderImpl wrapModel(String name) { + return null; // Model is not creatable + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProvidersInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProvidersInner.java new file mode 100644 index 000000000000..081ba0fe1103 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteServiceProvidersInner.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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.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 ExpressRouteServiceProviders. + */ +public class ExpressRouteServiceProvidersInner { + /** The Retrofit service to perform REST calls. */ + private ExpressRouteServiceProvidersService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRouteServiceProvidersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRouteServiceProvidersInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRouteServiceProvidersService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRouteServiceProviders to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRouteServiceProvidersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ExpressRouteServiceProviders list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders") + Observable> list(@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.network.v2019_09_01.ExpressRouteServiceProviders listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all the available express route service providers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ExpressRouteServiceProviderInner> 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 all the available express route service providers. + * + * @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 all the available express route service providers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteServiceProviderInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the available express route service providers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteServiceProviderInner> 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 all the available express route service providers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteServiceProviderInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all the available express route service providers. + * + * @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<ExpressRouteServiceProviderInner> 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 all the available express route service providers. + * + * @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 all the available express route service providers. + * + * @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<ExpressRouteServiceProviderInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the available express route service providers. + * + * @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<ExpressRouteServiceProviderInner> 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 all the available express route service providers. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteServiceProviderInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPoliciesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPoliciesImpl.java new file mode 100644 index 000000000000..397f0d68c6dc --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPoliciesImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.FirewallPolicies; +import com.microsoft.azure.management.network.v2019_09_01.FirewallPolicy; +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; + +class FirewallPoliciesImpl extends GroupableResourcesCoreImpl implements FirewallPolicies { + protected FirewallPoliciesImpl(NetworkManager manager) { + super(manager.inner().firewallPolicies(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + FirewallPoliciesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + FirewallPoliciesInner 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) { + FirewallPoliciesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + FirewallPoliciesInner 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 FirewallPolicy call(FirewallPolicyInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + FirewallPoliciesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + FirewallPoliciesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public FirewallPolicy call(FirewallPolicyInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public FirewallPolicyImpl define(String name) { + return wrapModel(name); + } + + @Override + protected FirewallPolicyImpl wrapModel(FirewallPolicyInner inner) { + return new FirewallPolicyImpl(inner.name(), inner, manager()); + } + + @Override + protected FirewallPolicyImpl wrapModel(String name) { + return new FirewallPolicyImpl(name, new FirewallPolicyInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPoliciesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPoliciesInner.java new file mode 100644 index 000000000000..e481d5db9af8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPoliciesInner.java @@ -0,0 +1,1030 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 FirewallPolicies. + */ +public class FirewallPoliciesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private FirewallPoliciesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of FirewallPoliciesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public FirewallPoliciesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(FirewallPoliciesService.class); + this.client = client; + } + + /** + * The interface defining all the services for FirewallPolicies to be + * used by Retrofit to perform actually REST calls. + */ + interface FirewallPoliciesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.FirewallPolicies delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("firewallPolicyName") String firewallPolicyName, @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.network.v2019_09_01.FirewallPolicies beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("firewallPolicyName") String firewallPolicyName, @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.network.v2019_09_01.FirewallPolicies getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("firewallPolicyName") String firewallPolicyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.FirewallPolicies createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("firewallPolicyName") String firewallPolicyName, @Path("subscriptionId") String subscriptionId, @Body FirewallPolicyInner 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.network.v2019_09_01.FirewallPolicies beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("firewallPolicyName") String firewallPolicyName, @Path("subscriptionId") String subscriptionId, @Body FirewallPolicyInner 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.network.v2019_09_01.FirewallPolicies listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.FirewallPolicies list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/firewallPolicies") + Observable> list(@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.network.v2019_09_01.FirewallPolicies 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.network.v2019_09_01.FirewallPolicies listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall 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 + */ + public void delete(String resourceGroupName, String firewallPolicyName) { + deleteWithServiceResponseAsync(resourceGroupName, firewallPolicyName).toBlocking().last().body(); + } + + /** + * Deletes the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall 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 deleteAsync(String resourceGroupName, String firewallPolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, firewallPolicyName), serviceCallback); + } + + /** + * Deletes the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String firewallPolicyName) { + return deleteWithServiceResponseAsync(resourceGroupName, firewallPolicyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String firewallPolicyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (firewallPolicyName == null) { + throw new IllegalArgumentException("Parameter firewallPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, firewallPolicyName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall 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 + */ + public void beginDelete(String resourceGroupName, String firewallPolicyName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, firewallPolicyName).toBlocking().single().body(); + } + + /** + * Deletes the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall 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 beginDeleteAsync(String resourceGroupName, String firewallPolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, firewallPolicyName), serviceCallback); + } + + /** + * Deletes the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String firewallPolicyName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, firewallPolicyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String firewallPolicyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (firewallPolicyName == null) { + throw new IllegalArgumentException("Parameter firewallPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, firewallPolicyName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall 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 FirewallPolicyInner object if successful. + */ + public FirewallPolicyInner getByResourceGroup(String resourceGroupName, String firewallPolicyName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, firewallPolicyName).toBlocking().single().body(); + } + + /** + * Gets the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall 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 getByResourceGroupAsync(String resourceGroupName, String firewallPolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, firewallPolicyName), serviceCallback); + } + + /** + * Gets the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallPolicyInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String firewallPolicyName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, firewallPolicyName).map(new Func1, FirewallPolicyInner>() { + @Override + public FirewallPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallPolicyInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String firewallPolicyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (firewallPolicyName == null) { + throw new IllegalArgumentException("Parameter firewallPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, firewallPolicyName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 FirewallPolicyInner object if successful. + */ + public FirewallPolicyInner getByResourceGroup(String resourceGroupName, String firewallPolicyName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, firewallPolicyName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param expand Expands referenced resources. + * @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 firewallPolicyName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, firewallPolicyName, expand), serviceCallback); + } + + /** + * Gets the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallPolicyInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String firewallPolicyName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, firewallPolicyName, expand).map(new Func1, FirewallPolicyInner>() { + @Override + public FirewallPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallPolicyInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String firewallPolicyName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (firewallPolicyName == null) { + throw new IllegalArgumentException("Parameter firewallPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, firewallPolicyName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Creates or updates the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param parameters Parameters supplied to the create or update Firewall Policy 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 FirewallPolicyInner object if successful. + */ + public FirewallPolicyInner createOrUpdate(String resourceGroupName, String firewallPolicyName, FirewallPolicyInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, firewallPolicyName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param parameters Parameters supplied to the create or update Firewall Policy 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 createOrUpdateAsync(String resourceGroupName, String firewallPolicyName, FirewallPolicyInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, firewallPolicyName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param parameters Parameters supplied to the create or update Firewall Policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String firewallPolicyName, FirewallPolicyInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, firewallPolicyName, parameters).map(new Func1, FirewallPolicyInner>() { + @Override + public FirewallPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param parameters Parameters supplied to the create or update Firewall Policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String firewallPolicyName, FirewallPolicyInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (firewallPolicyName == null) { + throw new IllegalArgumentException("Parameter firewallPolicyName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, firewallPolicyName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param parameters Parameters supplied to the create or update Firewall Policy 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 FirewallPolicyInner object if successful. + */ + public FirewallPolicyInner beginCreateOrUpdate(String resourceGroupName, String firewallPolicyName, FirewallPolicyInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, firewallPolicyName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param parameters Parameters supplied to the create or update Firewall Policy 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 beginCreateOrUpdateAsync(String resourceGroupName, String firewallPolicyName, FirewallPolicyInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, firewallPolicyName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param parameters Parameters supplied to the create or update Firewall Policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallPolicyInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String firewallPolicyName, FirewallPolicyInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, firewallPolicyName, parameters).map(new Func1, FirewallPolicyInner>() { + @Override + public FirewallPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified Firewall Policy. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param parameters Parameters supplied to the create or update Firewall Policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallPolicyInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String firewallPolicyName, FirewallPolicyInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (firewallPolicyName == null) { + throw new IllegalArgumentException("Parameter firewallPolicyName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, firewallPolicyName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 all Firewall Policies in a resource group. + * + * @param resourceGroupName The name of the 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<FirewallPolicyInner> 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 all Firewall Policies in a resource group. + * + * @param resourceGroupName The name of the 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 all Firewall Policies in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FirewallPolicyInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Firewall Policies in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FirewallPolicyInner> 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 all Firewall Policies in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FirewallPolicyInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all the Firewall Policies in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<FirewallPolicyInner> 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 all the Firewall Policies in a subscription. + * + * @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 all the Firewall Policies in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FirewallPolicyInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the Firewall Policies in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FirewallPolicyInner> 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 all the Firewall Policies in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FirewallPolicyInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all Firewall Policies in a resource group. + * + * @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<FirewallPolicyInner> 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 all Firewall Policies in a resource group. + * + * @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 all Firewall Policies in a resource group. + * + * @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<FirewallPolicyInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Firewall Policies in a resource group. + * + * @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<FirewallPolicyInner> 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 all Firewall Policies in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FirewallPolicyInner> 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 all the Firewall Policies in a subscription. + * + * @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<FirewallPolicyInner> 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 all the Firewall Policies in a subscription. + * + * @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 all the Firewall Policies in a subscription. + * + * @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<FirewallPolicyInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the Firewall Policies in a subscription. + * + * @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<FirewallPolicyInner> 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 all the Firewall Policies in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FirewallPolicyInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyImpl.java new file mode 100644 index 000000000000..8f2f2d01bd82 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.FirewallPolicy; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallThreatIntelMode; + +class FirewallPolicyImpl extends GroupableResourceCoreImpl implements FirewallPolicy, FirewallPolicy.Definition, FirewallPolicy.Update { + FirewallPolicyImpl(String name, FirewallPolicyInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + FirewallPoliciesInner client = this.manager().inner().firewallPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + FirewallPoliciesInner client = this.manager().inner().firewallPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + FirewallPoliciesInner client = this.manager().inner().firewallPolicies(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public SubResource basePolicy() { + return this.inner().basePolicy(); + } + + @Override + public List childPolicies() { + return this.inner().childPolicies(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List firewalls() { + return this.inner().firewalls(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public List ruleGroups() { + return this.inner().ruleGroups(); + } + + @Override + public AzureFirewallThreatIntelMode threatIntelMode() { + return this.inner().threatIntelMode(); + } + + @Override + public FirewallPolicyImpl withBasePolicy(SubResource basePolicy) { + this.inner().withBasePolicy(basePolicy); + return this; + } + + @Override + public FirewallPolicyImpl withThreatIntelMode(AzureFirewallThreatIntelMode threatIntelMode) { + this.inner().withThreatIntelMode(threatIntelMode); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyInner.java new file mode 100644 index 000000000000..f69f89694715 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyInner.java @@ -0,0 +1,182 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallThreatIntelMode; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * FirewallPolicy Resource. + */ +@JsonFlatten +@SkipParentValidation +public class FirewallPolicyInner extends Resource { + /** + * List of references to FirewallPolicyRuleGroups. + */ + @JsonProperty(value = "properties.ruleGroups", access = JsonProperty.Access.WRITE_ONLY) + private List ruleGroups; + + /** + * The provisioning state of the firewall policy resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The parent firewall policy from which rules are inherited. + */ + @JsonProperty(value = "properties.basePolicy") + private SubResource basePolicy; + + /** + * List of references to Azure Firewalls that this Firewall Policy is + * associated with. + */ + @JsonProperty(value = "properties.firewalls", access = JsonProperty.Access.WRITE_ONLY) + private List firewalls; + + /** + * List of references to Child Firewall Policies. + */ + @JsonProperty(value = "properties.childPolicies", access = JsonProperty.Access.WRITE_ONLY) + private List childPolicies; + + /** + * The operation mode for Threat Intelligence. Possible values include: + * 'Alert', 'Deny', 'Off'. + */ + @JsonProperty(value = "properties.threatIntelMode") + private AzureFirewallThreatIntelMode threatIntelMode; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get list of references to FirewallPolicyRuleGroups. + * + * @return the ruleGroups value + */ + public List ruleGroups() { + return this.ruleGroups; + } + + /** + * Get the provisioning state of the firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the parent firewall policy from which rules are inherited. + * + * @return the basePolicy value + */ + public SubResource basePolicy() { + return this.basePolicy; + } + + /** + * Set the parent firewall policy from which rules are inherited. + * + * @param basePolicy the basePolicy value to set + * @return the FirewallPolicyInner object itself. + */ + public FirewallPolicyInner withBasePolicy(SubResource basePolicy) { + this.basePolicy = basePolicy; + return this; + } + + /** + * Get list of references to Azure Firewalls that this Firewall Policy is associated with. + * + * @return the firewalls value + */ + public List firewalls() { + return this.firewalls; + } + + /** + * Get list of references to Child Firewall Policies. + * + * @return the childPolicies value + */ + public List childPolicies() { + return this.childPolicies; + } + + /** + * Get the operation mode for Threat Intelligence. Possible values include: 'Alert', 'Deny', 'Off'. + * + * @return the threatIntelMode value + */ + public AzureFirewallThreatIntelMode threatIntelMode() { + return this.threatIntelMode; + } + + /** + * Set the operation mode for Threat Intelligence. Possible values include: 'Alert', 'Deny', 'Off'. + * + * @param threatIntelMode the threatIntelMode value to set + * @return the FirewallPolicyInner object itself. + */ + public FirewallPolicyInner withThreatIntelMode(AzureFirewallThreatIntelMode threatIntelMode) { + this.threatIntelMode = threatIntelMode; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the FirewallPolicyInner object itself. + */ + public FirewallPolicyInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupImpl.java new file mode 100644 index 000000000000..f67aa059ebe2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupImpl.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.FirewallPolicyRuleGroup; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.FirewallPolicyRule; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class FirewallPolicyRuleGroupImpl extends CreatableUpdatableImpl implements FirewallPolicyRuleGroup, FirewallPolicyRuleGroup.Definition, FirewallPolicyRuleGroup.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String firewallPolicyName; + private String ruleGroupName; + + FirewallPolicyRuleGroupImpl(String name, NetworkManager manager) { + super(name, new FirewallPolicyRuleGroupInner()); + this.manager = manager; + // Set resource name + this.ruleGroupName = name; + // + } + + FirewallPolicyRuleGroupImpl(FirewallPolicyRuleGroupInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.ruleGroupName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.firewallPolicyName = IdParsingUtils.getValueFromIdByName(inner.id(), "firewallPolicies"); + this.ruleGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "ruleGroups"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + FirewallPolicyRuleGroupsInner client = this.manager().inner().firewallPolicyRuleGroups(); + return client.createOrUpdateAsync(this.resourceGroupName, this.firewallPolicyName, this.ruleGroupName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + FirewallPolicyRuleGroupsInner client = this.manager().inner().firewallPolicyRuleGroups(); + return client.createOrUpdateAsync(this.resourceGroupName, this.firewallPolicyName, this.ruleGroupName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + FirewallPolicyRuleGroupsInner client = this.manager().inner().firewallPolicyRuleGroups(); + return client.getAsync(this.resourceGroupName, this.firewallPolicyName, this.ruleGroupName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer priority() { + return this.inner().priority(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public List rules() { + return this.inner().rules(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public FirewallPolicyRuleGroupImpl withExistingFirewallPolicy(String resourceGroupName, String firewallPolicyName) { + this.resourceGroupName = resourceGroupName; + this.firewallPolicyName = firewallPolicyName; + return this; + } + + @Override + public FirewallPolicyRuleGroupImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public FirewallPolicyRuleGroupImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public FirewallPolicyRuleGroupImpl withPriority(Integer priority) { + this.inner().withPriority(priority); + return this; + } + + @Override + public FirewallPolicyRuleGroupImpl withRules(List rules) { + this.inner().withRules(rules); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupInner.java new file mode 100644 index 000000000000..df3569cbec9e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.FirewallPolicyRule; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Rule Group resource. + */ +@JsonFlatten +public class FirewallPolicyRuleGroupInner extends SubResource { + /** + * Priority of the Firewall Policy Rule Group resource. + */ + @JsonProperty(value = "properties.priority") + private Integer priority; + + /** + * Group of Firewall Policy rules. + */ + @JsonProperty(value = "properties.rules") + private List rules; + + /** + * The provisioning state of the firewall policy rule group resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Rule Group type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get priority of the Firewall Policy Rule Group resource. + * + * @return the priority value + */ + public Integer priority() { + return this.priority; + } + + /** + * Set priority of the Firewall Policy Rule Group resource. + * + * @param priority the priority value to set + * @return the FirewallPolicyRuleGroupInner object itself. + */ + public FirewallPolicyRuleGroupInner withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get group of Firewall Policy rules. + * + * @return the rules value + */ + public List rules() { + return this.rules; + } + + /** + * Set group of Firewall Policy rules. + * + * @param rules the rules value to set + * @return the FirewallPolicyRuleGroupInner object itself. + */ + public FirewallPolicyRuleGroupInner withRules(List rules) { + this.rules = rules; + return this; + } + + /** + * Get the provisioning state of the firewall policy rule group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the FirewallPolicyRuleGroupInner object itself. + */ + public FirewallPolicyRuleGroupInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get rule Group type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupsImpl.java new file mode 100644 index 000000000000..af2ca67031b0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.FirewallPolicyRuleGroups; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.FirewallPolicyRuleGroup; + +class FirewallPolicyRuleGroupsImpl extends WrapperImpl implements FirewallPolicyRuleGroups { + private final NetworkManager manager; + + FirewallPolicyRuleGroupsImpl(NetworkManager manager) { + super(manager.inner().firewallPolicyRuleGroups()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public FirewallPolicyRuleGroupImpl define(String name) { + return wrapModel(name); + } + + private FirewallPolicyRuleGroupImpl wrapModel(FirewallPolicyRuleGroupInner inner) { + return new FirewallPolicyRuleGroupImpl(inner, manager()); + } + + private FirewallPolicyRuleGroupImpl wrapModel(String name) { + return new FirewallPolicyRuleGroupImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String firewallPolicyName) { + FirewallPolicyRuleGroupsInner client = this.inner(); + return client.listAsync(resourceGroupName, firewallPolicyName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public FirewallPolicyRuleGroup call(FirewallPolicyRuleGroupInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName) { + FirewallPolicyRuleGroupsInner client = this.inner(); + return client.getAsync(resourceGroupName, firewallPolicyName, ruleGroupName) + .flatMap(new Func1>() { + @Override + public Observable call(FirewallPolicyRuleGroupInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((FirewallPolicyRuleGroup)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName) { + FirewallPolicyRuleGroupsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, firewallPolicyName, ruleGroupName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupsInner.java new file mode 100644 index 000000000000..69c04ee7f67a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FirewallPolicyRuleGroupsInner.java @@ -0,0 +1,764 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 FirewallPolicyRuleGroups. + */ +public class FirewallPolicyRuleGroupsInner { + /** The Retrofit service to perform REST calls. */ + private FirewallPolicyRuleGroupsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of FirewallPolicyRuleGroupsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public FirewallPolicyRuleGroupsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(FirewallPolicyRuleGroupsService.class); + this.client = client; + } + + /** + * The interface defining all the services for FirewallPolicyRuleGroups to be + * used by Retrofit to perform actually REST calls. + */ + interface FirewallPolicyRuleGroupsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.FirewallPolicyRuleGroups delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleGroups/{ruleGroupName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("firewallPolicyName") String firewallPolicyName, @Path("ruleGroupName") String ruleGroupName, @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.network.v2019_09_01.FirewallPolicyRuleGroups beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleGroups/{ruleGroupName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("firewallPolicyName") String firewallPolicyName, @Path("ruleGroupName") String ruleGroupName, @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.network.v2019_09_01.FirewallPolicyRuleGroups get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleGroups/{ruleGroupName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("firewallPolicyName") String firewallPolicyName, @Path("ruleGroupName") String ruleGroupName, @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.network.v2019_09_01.FirewallPolicyRuleGroups createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleGroups/{ruleGroupName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("firewallPolicyName") String firewallPolicyName, @Path("ruleGroupName") String ruleGroupName, @Path("subscriptionId") String subscriptionId, @Body FirewallPolicyRuleGroupInner 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.network.v2019_09_01.FirewallPolicyRuleGroups beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleGroups/{ruleGroupName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("firewallPolicyName") String firewallPolicyName, @Path("ruleGroupName") String ruleGroupName, @Path("subscriptionId") String subscriptionId, @Body FirewallPolicyRuleGroupInner 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.network.v2019_09_01.FirewallPolicyRuleGroups list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleGroups") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("firewallPolicyName") String firewallPolicyName, @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.network.v2019_09_01.FirewallPolicyRuleGroups listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 firewallPolicyName, String ruleGroupName) { + deleteWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName).toBlocking().last().body(); + } + + /** + * Deletes the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @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 firewallPolicyName, String ruleGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName), serviceCallback); + } + + /** + * Deletes the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName) { + return deleteWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (firewallPolicyName == null) { + throw new IllegalArgumentException("Parameter firewallPolicyName is required and cannot be null."); + } + if (ruleGroupName == null) { + throw new IllegalArgumentException("Parameter ruleGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, firewallPolicyName, ruleGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 firewallPolicyName, String ruleGroupName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName).toBlocking().single().body(); + } + + /** + * Deletes the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @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 firewallPolicyName, String ruleGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName), serviceCallback); + } + + /** + * Deletes the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (firewallPolicyName == null) { + throw new IllegalArgumentException("Parameter firewallPolicyName is required and cannot be null."); + } + if (ruleGroupName == null) { + throw new IllegalArgumentException("Parameter ruleGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, firewallPolicyName, ruleGroupName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 FirewallPolicyRuleGroupInner object if successful. + */ + public FirewallPolicyRuleGroupInner get(String resourceGroupName, String firewallPolicyName, String ruleGroupName) { + return getWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName).toBlocking().single().body(); + } + + /** + * Gets the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @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 firewallPolicyName, String ruleGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName), serviceCallback); + } + + /** + * Gets the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallPolicyRuleGroupInner object + */ + public Observable getAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName) { + return getWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName).map(new Func1, FirewallPolicyRuleGroupInner>() { + @Override + public FirewallPolicyRuleGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallPolicyRuleGroupInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (firewallPolicyName == null) { + throw new IllegalArgumentException("Parameter firewallPolicyName is required and cannot be null."); + } + if (ruleGroupName == null) { + throw new IllegalArgumentException("Parameter ruleGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, firewallPolicyName, ruleGroupName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @param parameters Parameters supplied to the create or update FirewallPolicyRuleGroup 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 FirewallPolicyRuleGroupInner object if successful. + */ + public FirewallPolicyRuleGroupInner createOrUpdate(String resourceGroupName, String firewallPolicyName, String ruleGroupName, FirewallPolicyRuleGroupInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @param parameters Parameters supplied to the create or update FirewallPolicyRuleGroup 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 createOrUpdateAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName, FirewallPolicyRuleGroupInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @param parameters Parameters supplied to the create or update FirewallPolicyRuleGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName, FirewallPolicyRuleGroupInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName, parameters).map(new Func1, FirewallPolicyRuleGroupInner>() { + @Override + public FirewallPolicyRuleGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @param parameters Parameters supplied to the create or update FirewallPolicyRuleGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName, FirewallPolicyRuleGroupInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (firewallPolicyName == null) { + throw new IllegalArgumentException("Parameter firewallPolicyName is required and cannot be null."); + } + if (ruleGroupName == null) { + throw new IllegalArgumentException("Parameter ruleGroupName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, firewallPolicyName, ruleGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @param parameters Parameters supplied to the create or update FirewallPolicyRuleGroup 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 FirewallPolicyRuleGroupInner object if successful. + */ + public FirewallPolicyRuleGroupInner beginCreateOrUpdate(String resourceGroupName, String firewallPolicyName, String ruleGroupName, FirewallPolicyRuleGroupInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @param parameters Parameters supplied to the create or update FirewallPolicyRuleGroup 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 beginCreateOrUpdateAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName, FirewallPolicyRuleGroupInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @param parameters Parameters supplied to the create or update FirewallPolicyRuleGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallPolicyRuleGroupInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName, FirewallPolicyRuleGroupInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, firewallPolicyName, ruleGroupName, parameters).map(new Func1, FirewallPolicyRuleGroupInner>() { + @Override + public FirewallPolicyRuleGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified FirewallPolicyRuleGroup. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param ruleGroupName The name of the FirewallPolicyRuleGroup. + * @param parameters Parameters supplied to the create or update FirewallPolicyRuleGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallPolicyRuleGroupInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String firewallPolicyName, String ruleGroupName, FirewallPolicyRuleGroupInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (firewallPolicyName == null) { + throw new IllegalArgumentException("Parameter firewallPolicyName is required and cannot be null."); + } + if (ruleGroupName == null) { + throw new IllegalArgumentException("Parameter ruleGroupName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, firewallPolicyName, ruleGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 all FirewallPolicyRuleGroups in a FirewallPolicy resource. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall 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 PagedList<FirewallPolicyRuleGroupInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String firewallPolicyName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, firewallPolicyName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all FirewallPolicyRuleGroups in a FirewallPolicy resource. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall 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> listAsync(final String resourceGroupName, final String firewallPolicyName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, firewallPolicyName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all FirewallPolicyRuleGroups in a FirewallPolicy resource. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FirewallPolicyRuleGroupInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String firewallPolicyName) { + return listWithServiceResponseAsync(resourceGroupName, firewallPolicyName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all FirewallPolicyRuleGroups in a FirewallPolicy resource. + * + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FirewallPolicyRuleGroupInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String firewallPolicyName) { + return listSinglePageAsync(resourceGroupName, firewallPolicyName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all FirewallPolicyRuleGroups in a FirewallPolicy resource. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param firewallPolicyName The name of the Firewall Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FirewallPolicyRuleGroupInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String firewallPolicyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (firewallPolicyName == null) { + throw new IllegalArgumentException("Parameter firewallPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, firewallPolicyName, this.client.subscriptionId(), 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 all FirewallPolicyRuleGroups in a FirewallPolicy resource. + * + * @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<FirewallPolicyRuleGroupInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all FirewallPolicyRuleGroups in a FirewallPolicy resource. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all FirewallPolicyRuleGroups in a FirewallPolicy resource. + * + * @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<FirewallPolicyRuleGroupInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all FirewallPolicyRuleGroups in a FirewallPolicy resource. + * + * @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<FirewallPolicyRuleGroupInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all FirewallPolicyRuleGroups in a FirewallPolicy resource. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FirewallPolicyRuleGroupInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FlowLogInformationImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FlowLogInformationImpl.java new file mode 100644 index 000000000000..d20f0cfb60bc --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FlowLogInformationImpl.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.FlowLogInformation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.TrafficAnalyticsProperties; +import com.microsoft.azure.management.network.v2019_09_01.FlowLogFormatParameters; +import com.microsoft.azure.management.network.v2019_09_01.RetentionPolicyParameters; + +class FlowLogInformationImpl extends WrapperImpl implements FlowLogInformation { + private final NetworkManager manager; + FlowLogInformationImpl(FlowLogInformationInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public boolean enabled() { + return this.inner().enabled(); + } + + @Override + public TrafficAnalyticsProperties flowAnalyticsConfiguration() { + return this.inner().flowAnalyticsConfiguration(); + } + + @Override + public FlowLogFormatParameters format() { + return this.inner().format(); + } + + @Override + public RetentionPolicyParameters retentionPolicy() { + return this.inner().retentionPolicy(); + } + + @Override + public String storageId() { + return this.inner().storageId(); + } + + @Override + public String targetResourceId() { + return this.inner().targetResourceId(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FlowLogInformationInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FlowLogInformationInner.java new file mode 100644 index 000000000000..8c652acf0f95 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FlowLogInformationInner.java @@ -0,0 +1,180 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.RetentionPolicyParameters; +import com.microsoft.azure.management.network.v2019_09_01.FlowLogFormatParameters; +import com.microsoft.azure.management.network.v2019_09_01.TrafficAnalyticsProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information on the configuration of flow log and traffic analytics + * (optional) . + */ +@JsonFlatten +public class FlowLogInformationInner { + /** + * The ID of the resource to configure for flow log and traffic analytics + * (optional) . + */ + @JsonProperty(value = "targetResourceId", required = true) + private String targetResourceId; + + /** + * ID of the storage account which is used to store the flow log. + */ + @JsonProperty(value = "properties.storageId", required = true) + private String storageId; + + /** + * Flag to enable/disable flow logging. + */ + @JsonProperty(value = "properties.enabled", required = true) + private boolean enabled; + + /** + * Parameters that define the retention policy for flow log. + */ + @JsonProperty(value = "properties.retentionPolicy") + private RetentionPolicyParameters retentionPolicy; + + /** + * Parameters that define the flow log format. + */ + @JsonProperty(value = "properties.format") + private FlowLogFormatParameters format; + + /** + * Parameters that define the configuration of traffic analytics. + */ + @JsonProperty(value = "flowAnalyticsConfiguration") + private TrafficAnalyticsProperties flowAnalyticsConfiguration; + + /** + * Get the ID of the resource to configure for flow log and traffic analytics (optional) . + * + * @return the targetResourceId value + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the ID of the resource to configure for flow log and traffic analytics (optional) . + * + * @param targetResourceId the targetResourceId value to set + * @return the FlowLogInformationInner object itself. + */ + public FlowLogInformationInner withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + + /** + * Get iD of the storage account which is used to store the flow log. + * + * @return the storageId value + */ + public String storageId() { + return this.storageId; + } + + /** + * Set iD of the storage account which is used to store the flow log. + * + * @param storageId the storageId value to set + * @return the FlowLogInformationInner object itself. + */ + public FlowLogInformationInner withStorageId(String storageId) { + this.storageId = storageId; + return this; + } + + /** + * Get flag to enable/disable flow logging. + * + * @return the enabled value + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set flag to enable/disable flow logging. + * + * @param enabled the enabled value to set + * @return the FlowLogInformationInner object itself. + */ + public FlowLogInformationInner withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get parameters that define the retention policy for flow log. + * + * @return the retentionPolicy value + */ + public RetentionPolicyParameters retentionPolicy() { + return this.retentionPolicy; + } + + /** + * Set parameters that define the retention policy for flow log. + * + * @param retentionPolicy the retentionPolicy value to set + * @return the FlowLogInformationInner object itself. + */ + public FlowLogInformationInner withRetentionPolicy(RetentionPolicyParameters retentionPolicy) { + this.retentionPolicy = retentionPolicy; + return this; + } + + /** + * Get parameters that define the flow log format. + * + * @return the format value + */ + public FlowLogFormatParameters format() { + return this.format; + } + + /** + * Set parameters that define the flow log format. + * + * @param format the format value to set + * @return the FlowLogInformationInner object itself. + */ + public FlowLogInformationInner withFormat(FlowLogFormatParameters format) { + this.format = format; + return this; + } + + /** + * Get parameters that define the configuration of traffic analytics. + * + * @return the flowAnalyticsConfiguration value + */ + public TrafficAnalyticsProperties flowAnalyticsConfiguration() { + return this.flowAnalyticsConfiguration; + } + + /** + * Set parameters that define the configuration of traffic analytics. + * + * @param flowAnalyticsConfiguration the flowAnalyticsConfiguration value to set + * @return the FlowLogInformationInner object itself. + */ + public FlowLogInformationInner withFlowAnalyticsConfiguration(TrafficAnalyticsProperties flowAnalyticsConfiguration) { + this.flowAnalyticsConfiguration = flowAnalyticsConfiguration; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FrontendIPConfigurationImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FrontendIPConfigurationImpl.java new file mode 100644 index 000000000000..ecf975014d5d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FrontendIPConfigurationImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.FrontendIPConfiguration; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.IPVersion; +import com.microsoft.azure.management.network.v2019_09_01.IPAllocationMethod; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPAddress; +import com.microsoft.azure.management.network.v2019_09_01.Subnet; + +class FrontendIPConfigurationImpl extends IndexableRefreshableWrapperImpl implements FrontendIPConfiguration { + private final NetworkManager manager; + private String resourceGroupName; + private String loadBalancerName; + private String frontendIPConfigurationName; + + FrontendIPConfigurationImpl(FrontendIPConfigurationInner inner, NetworkManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.loadBalancerName = IdParsingUtils.getValueFromIdByName(inner.id(), "loadBalancers"); + this.frontendIPConfigurationName = IdParsingUtils.getValueFromIdByName(inner.id(), "frontendIPConfigurations"); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + LoadBalancerFrontendIPConfigurationsInner client = this.manager().inner().loadBalancerFrontendIPConfigurations(); + return client.getAsync(this.resourceGroupName, this.loadBalancerName, this.frontendIPConfigurationName); + } + + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public List inboundNatPools() { + return this.inner().inboundNatPools(); + } + + @Override + public List inboundNatRules() { + return this.inner().inboundNatRules(); + } + + @Override + public List loadBalancingRules() { + return this.inner().loadBalancingRules(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List outboundRules() { + return this.inner().outboundRules(); + } + + @Override + public String privateIPAddress() { + return this.inner().privateIPAddress(); + } + + @Override + public IPVersion privateIPAddressVersion() { + return this.inner().privateIPAddressVersion(); + } + + @Override + public IPAllocationMethod privateIPAllocationMethod() { + return this.inner().privateIPAllocationMethod(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public PublicIPAddress publicIPAddress() { + PublicIPAddressInner inner = this.inner().publicIPAddress(); + if (inner != null) { + return new PublicIPAddressImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public SubResource publicIPPrefix() { + return this.inner().publicIPPrefix(); + } + + @Override + public Subnet subnet() { + SubnetInner inner = this.inner().subnet(); + if (inner != null) { + return new SubnetImpl(inner, manager()); + } else { + return null; + } + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public List zones() { + return this.inner().zones(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FrontendIPConfigurationInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FrontendIPConfigurationInner.java new file mode 100644 index 000000000000..7fe05c1dbf7c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/FrontendIPConfigurationInner.java @@ -0,0 +1,344 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.IPAllocationMethod; +import com.microsoft.azure.management.network.v2019_09_01.IPVersion; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Frontend IP address of the load balancer. + */ +@JsonFlatten +public class FrontendIPConfigurationInner extends SubResource { + /** + * An array of references to inbound rules that use this frontend IP. + */ + @JsonProperty(value = "properties.inboundNatRules", access = JsonProperty.Access.WRITE_ONLY) + private List inboundNatRules; + + /** + * An array of references to inbound pools that use this frontend IP. + */ + @JsonProperty(value = "properties.inboundNatPools", access = JsonProperty.Access.WRITE_ONLY) + private List inboundNatPools; + + /** + * An array of references to outbound rules that use this frontend IP. + */ + @JsonProperty(value = "properties.outboundRules", access = JsonProperty.Access.WRITE_ONLY) + private List outboundRules; + + /** + * An array of references to load balancing rules that use this frontend + * IP. + */ + @JsonProperty(value = "properties.loadBalancingRules", access = JsonProperty.Access.WRITE_ONLY) + private List loadBalancingRules; + + /** + * The private IP address of the IP configuration. + */ + @JsonProperty(value = "properties.privateIPAddress") + private String privateIPAddress; + + /** + * The Private IP allocation method. Possible values include: 'Static', + * 'Dynamic'. + */ + @JsonProperty(value = "properties.privateIPAllocationMethod") + private IPAllocationMethod privateIPAllocationMethod; + + /** + * Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken + * as IPv4. Possible values include: 'IPv4', 'IPv6'. + */ + @JsonProperty(value = "properties.privateIPAddressVersion") + private IPVersion privateIPAddressVersion; + + /** + * The reference of the subnet resource. + */ + @JsonProperty(value = "properties.subnet") + private SubnetInner subnet; + + /** + * The reference of the Public IP resource. + */ + @JsonProperty(value = "properties.publicIPAddress") + private PublicIPAddressInner publicIPAddress; + + /** + * The reference of the Public IP Prefix resource. + */ + @JsonProperty(value = "properties.publicIPPrefix") + private SubResource publicIPPrefix; + + /** + * The provisioning state of the frontend IP configuration resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within the set of frontend IP + * configurations used by the load balancer. This name can be used to + * access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * A list of availability zones denoting the IP allocated for the resource + * needs to come from. + */ + @JsonProperty(value = "zones") + private List zones; + + /** + * Get an array of references to inbound rules that use this frontend IP. + * + * @return the inboundNatRules value + */ + public List inboundNatRules() { + return this.inboundNatRules; + } + + /** + * Get an array of references to inbound pools that use this frontend IP. + * + * @return the inboundNatPools value + */ + public List inboundNatPools() { + return this.inboundNatPools; + } + + /** + * Get an array of references to outbound rules that use this frontend IP. + * + * @return the outboundRules value + */ + public List outboundRules() { + return this.outboundRules; + } + + /** + * Get an array of references to load balancing rules that use this frontend IP. + * + * @return the loadBalancingRules value + */ + public List loadBalancingRules() { + return this.loadBalancingRules; + } + + /** + * Get the private IP address of the IP configuration. + * + * @return the privateIPAddress value + */ + public String privateIPAddress() { + return this.privateIPAddress; + } + + /** + * Set the private IP address of the IP configuration. + * + * @param privateIPAddress the privateIPAddress value to set + * @return the FrontendIPConfigurationInner object itself. + */ + public FrontendIPConfigurationInner withPrivateIPAddress(String privateIPAddress) { + this.privateIPAddress = privateIPAddress; + return this; + } + + /** + * Get the Private IP allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @return the privateIPAllocationMethod value + */ + public IPAllocationMethod privateIPAllocationMethod() { + return this.privateIPAllocationMethod; + } + + /** + * Set the Private IP allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @param privateIPAllocationMethod the privateIPAllocationMethod value to set + * @return the FrontendIPConfigurationInner object itself. + */ + public FrontendIPConfigurationInner withPrivateIPAllocationMethod(IPAllocationMethod privateIPAllocationMethod) { + this.privateIPAllocationMethod = privateIPAllocationMethod; + return this; + } + + /** + * Get whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6'. + * + * @return the privateIPAddressVersion value + */ + public IPVersion privateIPAddressVersion() { + return this.privateIPAddressVersion; + } + + /** + * Set whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6'. + * + * @param privateIPAddressVersion the privateIPAddressVersion value to set + * @return the FrontendIPConfigurationInner object itself. + */ + public FrontendIPConfigurationInner withPrivateIPAddressVersion(IPVersion privateIPAddressVersion) { + this.privateIPAddressVersion = privateIPAddressVersion; + return this; + } + + /** + * Get the reference of the subnet resource. + * + * @return the subnet value + */ + public SubnetInner subnet() { + return this.subnet; + } + + /** + * Set the reference of the subnet resource. + * + * @param subnet the subnet value to set + * @return the FrontendIPConfigurationInner object itself. + */ + public FrontendIPConfigurationInner withSubnet(SubnetInner subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get the reference of the Public IP resource. + * + * @return the publicIPAddress value + */ + public PublicIPAddressInner publicIPAddress() { + return this.publicIPAddress; + } + + /** + * Set the reference of the Public IP resource. + * + * @param publicIPAddress the publicIPAddress value to set + * @return the FrontendIPConfigurationInner object itself. + */ + public FrontendIPConfigurationInner withPublicIPAddress(PublicIPAddressInner publicIPAddress) { + this.publicIPAddress = publicIPAddress; + return this; + } + + /** + * Get the reference of the Public IP Prefix resource. + * + * @return the publicIPPrefix value + */ + public SubResource publicIPPrefix() { + return this.publicIPPrefix; + } + + /** + * Set the reference of the Public IP Prefix resource. + * + * @param publicIPPrefix the publicIPPrefix value to set + * @return the FrontendIPConfigurationInner object itself. + */ + public FrontendIPConfigurationInner withPublicIPPrefix(SubResource publicIPPrefix) { + this.publicIPPrefix = publicIPPrefix; + return this; + } + + /** + * Get the provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. + * + * @param name the name value to set + * @return the FrontendIPConfigurationInner object itself. + */ + public FrontendIPConfigurationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get a list of availability zones denoting the IP allocated for the resource needs to come from. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set a list of availability zones denoting the IP allocated for the resource needs to come from. + * + * @param zones the zones value to set + * @return the FrontendIPConfigurationInner object itself. + */ + public FrontendIPConfigurationInner withZones(List zones) { + this.zones = zones; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/GatewayRouteListResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/GatewayRouteListResultImpl.java new file mode 100644 index 000000000000..5c78c19fdf35 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/GatewayRouteListResultImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.GatewayRouteListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.GatewayRoute; + +class GatewayRouteListResultImpl extends WrapperImpl implements GatewayRouteListResult { + private final NetworkManager manager; + GatewayRouteListResultImpl(GatewayRouteListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/GatewayRouteListResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/GatewayRouteListResultInner.java new file mode 100644 index 000000000000..6453efbc971b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/GatewayRouteListResultInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.GatewayRoute; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of virtual network gateway routes. + */ +public class GatewayRouteListResultInner { + /** + * List of gateway routes. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get list of gateway routes. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set list of gateway routes. + * + * @param value the value value to set + * @return the GatewayRouteListResultInner object itself. + */ + public GatewayRouteListResultInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionImpl.java new file mode 100644 index 000000000000..2f86a9d6707d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.HubVirtualNetworkConnection; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.SubResource; + +class HubVirtualNetworkConnectionImpl extends IndexableRefreshableWrapperImpl implements HubVirtualNetworkConnection { + private final NetworkManager manager; + private String resourceGroupName; + private String virtualHubName; + private String connectionName; + + HubVirtualNetworkConnectionImpl(HubVirtualNetworkConnectionInner inner, NetworkManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.virtualHubName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualHubs"); + this.connectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "hubVirtualNetworkConnections"); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + HubVirtualNetworkConnectionsInner client = this.manager().inner().hubVirtualNetworkConnections(); + return client.getAsync(this.resourceGroupName, this.virtualHubName, this.connectionName); + } + + + + @Override + public Boolean allowHubToRemoteVnetTransit() { + return this.inner().allowHubToRemoteVnetTransit(); + } + + @Override + public Boolean allowRemoteVnetToUseHubVnetGateways() { + return this.inner().allowRemoteVnetToUseHubVnetGateways(); + } + + @Override + public Boolean enableInternetSecurity() { + return this.inner().enableInternetSecurity(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public SubResource remoteVirtualNetwork() { + return this.inner().remoteVirtualNetwork(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionInner.java new file mode 100644 index 000000000000..7298c81162d1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * HubVirtualNetworkConnection Resource. + */ +@JsonFlatten +public class HubVirtualNetworkConnectionInner extends SubResource { + /** + * Reference to the remote virtual network. + */ + @JsonProperty(value = "properties.remoteVirtualNetwork") + private SubResource remoteVirtualNetwork; + + /** + * VirtualHub to RemoteVnet transit to enabled or not. + */ + @JsonProperty(value = "properties.allowHubToRemoteVnetTransit") + private Boolean allowHubToRemoteVnetTransit; + + /** + * Allow RemoteVnet to use Virtual Hub's gateways. + */ + @JsonProperty(value = "properties.allowRemoteVnetToUseHubVnetGateways") + private Boolean allowRemoteVnetToUseHubVnetGateways; + + /** + * Enable internet security. + */ + @JsonProperty(value = "properties.enableInternetSecurity") + private Boolean enableInternetSecurity; + + /** + * The provisioning state of the hub virtual network connection resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get reference to the remote virtual network. + * + * @return the remoteVirtualNetwork value + */ + public SubResource remoteVirtualNetwork() { + return this.remoteVirtualNetwork; + } + + /** + * Set reference to the remote virtual network. + * + * @param remoteVirtualNetwork the remoteVirtualNetwork value to set + * @return the HubVirtualNetworkConnectionInner object itself. + */ + public HubVirtualNetworkConnectionInner withRemoteVirtualNetwork(SubResource remoteVirtualNetwork) { + this.remoteVirtualNetwork = remoteVirtualNetwork; + return this; + } + + /** + * Get virtualHub to RemoteVnet transit to enabled or not. + * + * @return the allowHubToRemoteVnetTransit value + */ + public Boolean allowHubToRemoteVnetTransit() { + return this.allowHubToRemoteVnetTransit; + } + + /** + * Set virtualHub to RemoteVnet transit to enabled or not. + * + * @param allowHubToRemoteVnetTransit the allowHubToRemoteVnetTransit value to set + * @return the HubVirtualNetworkConnectionInner object itself. + */ + public HubVirtualNetworkConnectionInner withAllowHubToRemoteVnetTransit(Boolean allowHubToRemoteVnetTransit) { + this.allowHubToRemoteVnetTransit = allowHubToRemoteVnetTransit; + return this; + } + + /** + * Get allow RemoteVnet to use Virtual Hub's gateways. + * + * @return the allowRemoteVnetToUseHubVnetGateways value + */ + public Boolean allowRemoteVnetToUseHubVnetGateways() { + return this.allowRemoteVnetToUseHubVnetGateways; + } + + /** + * Set allow RemoteVnet to use Virtual Hub's gateways. + * + * @param allowRemoteVnetToUseHubVnetGateways the allowRemoteVnetToUseHubVnetGateways value to set + * @return the HubVirtualNetworkConnectionInner object itself. + */ + public HubVirtualNetworkConnectionInner withAllowRemoteVnetToUseHubVnetGateways(Boolean allowRemoteVnetToUseHubVnetGateways) { + this.allowRemoteVnetToUseHubVnetGateways = allowRemoteVnetToUseHubVnetGateways; + return this; + } + + /** + * Get enable internet security. + * + * @return the enableInternetSecurity value + */ + public Boolean enableInternetSecurity() { + return this.enableInternetSecurity; + } + + /** + * Set enable internet security. + * + * @param enableInternetSecurity the enableInternetSecurity value to set + * @return the HubVirtualNetworkConnectionInner object itself. + */ + public HubVirtualNetworkConnectionInner withEnableInternetSecurity(Boolean enableInternetSecurity) { + this.enableInternetSecurity = enableInternetSecurity; + return this; + } + + /** + * Get the provisioning state of the hub virtual network connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the HubVirtualNetworkConnectionInner object itself. + */ + public HubVirtualNetworkConnectionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionsImpl.java new file mode 100644 index 000000000000..0c61dbb2bf88 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionsImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.HubVirtualNetworkConnections; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.HubVirtualNetworkConnection; + +class HubVirtualNetworkConnectionsImpl extends WrapperImpl implements HubVirtualNetworkConnections { + private final NetworkManager manager; + + HubVirtualNetworkConnectionsImpl(NetworkManager manager) { + super(manager.inner().hubVirtualNetworkConnections()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private HubVirtualNetworkConnectionImpl wrapModel(HubVirtualNetworkConnectionInner inner) { + return new HubVirtualNetworkConnectionImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String virtualHubName) { + HubVirtualNetworkConnectionsInner client = this.inner(); + return client.listAsync(resourceGroupName, virtualHubName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public HubVirtualNetworkConnection call(HubVirtualNetworkConnectionInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String virtualHubName, String connectionName) { + HubVirtualNetworkConnectionsInner client = this.inner(); + return client.getAsync(resourceGroupName, virtualHubName, connectionName) + .flatMap(new Func1>() { + @Override + public Observable call(HubVirtualNetworkConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((HubVirtualNetworkConnection)wrapModel(inner)); + } + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionsInner.java new file mode 100644 index 000000000000..6e514f76d258 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/HubVirtualNetworkConnectionsInner.java @@ -0,0 +1,397 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in HubVirtualNetworkConnections. + */ +public class HubVirtualNetworkConnectionsInner { + /** The Retrofit service to perform REST calls. */ + private HubVirtualNetworkConnectionsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of HubVirtualNetworkConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public HubVirtualNetworkConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(HubVirtualNetworkConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for HubVirtualNetworkConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface HubVirtualNetworkConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.HubVirtualNetworkConnections get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @Path("connectionName") String connectionName, @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.network.v2019_09_01.HubVirtualNetworkConnections list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @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.network.v2019_09_01.HubVirtualNetworkConnections listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves the details of a HubVirtualNetworkConnection. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param connectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 HubVirtualNetworkConnectionInner object if successful. + */ + public HubVirtualNetworkConnectionInner get(String resourceGroupName, String virtualHubName, String connectionName) { + return getWithServiceResponseAsync(resourceGroupName, virtualHubName, connectionName).toBlocking().single().body(); + } + + /** + * Retrieves the details of a HubVirtualNetworkConnection. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param connectionName The name of the vpn connection. + * @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 virtualHubName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, virtualHubName, connectionName), serviceCallback); + } + + /** + * Retrieves the details of a HubVirtualNetworkConnection. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param connectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HubVirtualNetworkConnectionInner object + */ + public Observable getAsync(String resourceGroupName, String virtualHubName, String connectionName) { + return getWithServiceResponseAsync(resourceGroupName, virtualHubName, connectionName).map(new Func1, HubVirtualNetworkConnectionInner>() { + @Override + public HubVirtualNetworkConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of a HubVirtualNetworkConnection. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param connectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HubVirtualNetworkConnectionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String virtualHubName, String connectionName) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(this.client.subscriptionId(), resourceGroupName, virtualHubName, connectionName, 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); + } + + /** + * Retrieves the details of all HubVirtualNetworkConnections. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<HubVirtualNetworkConnectionInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String virtualHubName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, virtualHubName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the details of all HubVirtualNetworkConnections. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @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 resourceGroupName, final String virtualHubName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, virtualHubName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the details of all HubVirtualNetworkConnections. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HubVirtualNetworkConnectionInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String virtualHubName) { + return listWithServiceResponseAsync(resourceGroupName, virtualHubName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of all HubVirtualNetworkConnections. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HubVirtualNetworkConnectionInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String virtualHubName) { + return listSinglePageAsync(resourceGroupName, virtualHubName) + .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)); + } + }); + } + + /** + * Retrieves the details of all HubVirtualNetworkConnections. + * + ServiceResponse> * @param resourceGroupName The resource group name of the VirtualHub. + ServiceResponse> * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<HubVirtualNetworkConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String virtualHubName) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), resourceGroupName, virtualHubName, 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); + } + + /** + * Retrieves the details of all HubVirtualNetworkConnections. + * + * @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<HubVirtualNetworkConnectionInner> 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(); + } + }; + } + + /** + * Retrieves the details of all HubVirtualNetworkConnections. + * + * @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); + } + + /** + * Retrieves the details of all HubVirtualNetworkConnections. + * + * @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<HubVirtualNetworkConnectionInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of all HubVirtualNetworkConnections. + * + * @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<HubVirtualNetworkConnectionInner> 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)); + } + }); + } + + /** + * Retrieves the details of all HubVirtualNetworkConnections. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<HubVirtualNetworkConnectionInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IPAddressAvailabilityResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IPAddressAvailabilityResultImpl.java new file mode 100644 index 000000000000..f1fd63692fd5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IPAddressAvailabilityResultImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.IPAddressAvailabilityResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class IPAddressAvailabilityResultImpl extends WrapperImpl implements IPAddressAvailabilityResult { + private final NetworkManager manager; + IPAddressAvailabilityResultImpl(IPAddressAvailabilityResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Boolean available() { + return this.inner().available(); + } + + @Override + public List availableIPAddresses() { + return this.inner().availableIPAddresses(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IPAddressAvailabilityResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IPAddressAvailabilityResultInner.java new file mode 100644 index 000000000000..336616d405be --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IPAddressAvailabilityResultInner.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for CheckIPAddressAvailability API service call. + */ +public class IPAddressAvailabilityResultInner { + /** + * Private IP address availability. + */ + @JsonProperty(value = "available") + private Boolean available; + + /** + * Contains other available private IP addresses if the asked for address + * is taken. + */ + @JsonProperty(value = "availableIPAddresses") + private List availableIPAddresses; + + /** + * Get private IP address availability. + * + * @return the available value + */ + public Boolean available() { + return this.available; + } + + /** + * Set private IP address availability. + * + * @param available the available value to set + * @return the IPAddressAvailabilityResultInner object itself. + */ + public IPAddressAvailabilityResultInner withAvailable(Boolean available) { + this.available = available; + return this; + } + + /** + * Get contains other available private IP addresses if the asked for address is taken. + * + * @return the availableIPAddresses value + */ + public List availableIPAddresses() { + return this.availableIPAddresses; + } + + /** + * Set contains other available private IP addresses if the asked for address is taken. + * + * @param availableIPAddresses the availableIPAddresses value to set + * @return the IPAddressAvailabilityResultInner object itself. + */ + public IPAddressAvailabilityResultInner withAvailableIPAddresses(List availableIPAddresses) { + this.availableIPAddresses = availableIPAddresses; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IdParsingUtils.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IdParsingUtils.java new file mode 100644 index 000000000000..0811cc3525cb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_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.network.v2019_09_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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRuleImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRuleImpl.java new file mode 100644 index 000000000000..6ac9d0b229ce --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRuleImpl.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.InboundNatRule; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.TransportProtocol; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.VirtualMachineScaleSetNetworkInterfaceIPConfiguration; + +class InboundNatRuleImpl extends CreatableUpdatableImpl implements InboundNatRule, InboundNatRule.Definition, InboundNatRule.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String loadBalancerName; + private String inboundNatRuleName; + + InboundNatRuleImpl(String name, NetworkManager manager) { + super(name, new InboundNatRuleInner()); + this.manager = manager; + // Set resource name + this.inboundNatRuleName = name; + // + } + + InboundNatRuleImpl(InboundNatRuleInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.inboundNatRuleName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.loadBalancerName = IdParsingUtils.getValueFromIdByName(inner.id(), "loadBalancers"); + this.inboundNatRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "inboundNatRules"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + InboundNatRulesInner client = this.manager().inner().inboundNatRules(); + return client.createOrUpdateAsync(this.resourceGroupName, this.loadBalancerName, this.inboundNatRuleName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + InboundNatRulesInner client = this.manager().inner().inboundNatRules(); + return client.createOrUpdateAsync(this.resourceGroupName, this.loadBalancerName, this.inboundNatRuleName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + InboundNatRulesInner client = this.manager().inner().inboundNatRules(); + return client.getAsync(this.resourceGroupName, this.loadBalancerName, this.inboundNatRuleName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public VirtualMachineScaleSetNetworkInterfaceIPConfiguration backendIPConfiguration() { + NetworkInterfaceIPConfigurationInner inner = this.inner().backendIPConfiguration(); + if (inner != null) { + return new VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl(inner, manager()); + } else { + return null; + } + } + + @Override + public Integer backendPort() { + return this.inner().backendPort(); + } + + @Override + public Boolean enableFloatingIP() { + return this.inner().enableFloatingIP(); + } + + @Override + public Boolean enableTcpReset() { + return this.inner().enableTcpReset(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public SubResource frontendIPConfiguration() { + return this.inner().frontendIPConfiguration(); + } + + @Override + public Integer frontendPort() { + return this.inner().frontendPort(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Integer idleTimeoutInMinutes() { + return this.inner().idleTimeoutInMinutes(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public TransportProtocol protocol() { + return this.inner().protocol(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public InboundNatRuleImpl withExistingLoadBalancer(String resourceGroupName, String loadBalancerName) { + this.resourceGroupName = resourceGroupName; + this.loadBalancerName = loadBalancerName; + return this; + } + + @Override + public InboundNatRuleImpl withBackendPort(Integer backendPort) { + this.inner().withBackendPort(backendPort); + return this; + } + + @Override + public InboundNatRuleImpl withEnableFloatingIP(Boolean enableFloatingIP) { + this.inner().withEnableFloatingIP(enableFloatingIP); + return this; + } + + @Override + public InboundNatRuleImpl withEnableTcpReset(Boolean enableTcpReset) { + this.inner().withEnableTcpReset(enableTcpReset); + return this; + } + + @Override + public InboundNatRuleImpl withFrontendIPConfiguration(SubResource frontendIPConfiguration) { + this.inner().withFrontendIPConfiguration(frontendIPConfiguration); + return this; + } + + @Override + public InboundNatRuleImpl withFrontendPort(Integer frontendPort) { + this.inner().withFrontendPort(frontendPort); + return this; + } + + @Override + public InboundNatRuleImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public InboundNatRuleImpl withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.inner().withIdleTimeoutInMinutes(idleTimeoutInMinutes); + return this; + } + + @Override + public InboundNatRuleImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public InboundNatRuleImpl withProtocol(TransportProtocol protocol) { + this.inner().withProtocol(protocol); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRuleInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRuleInner.java new file mode 100644 index 000000000000..59a6c0233ed7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRuleInner.java @@ -0,0 +1,306 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.TransportProtocol; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Inbound NAT rule of the load balancer. + */ +@JsonFlatten +public class InboundNatRuleInner extends SubResource { + /** + * A reference to frontend IP addresses. + */ + @JsonProperty(value = "properties.frontendIPConfiguration") + private SubResource frontendIPConfiguration; + + /** + * A reference to a private IP address defined on a network interface of a + * VM. Traffic sent to the frontend port of each of the frontend IP + * configurations is forwarded to the backend IP. + */ + @JsonProperty(value = "properties.backendIPConfiguration", access = JsonProperty.Access.WRITE_ONLY) + private NetworkInterfaceIPConfigurationInner backendIPConfiguration; + + /** + * The reference to the transport protocol used by the load balancing rule. + * Possible values include: 'Udp', 'Tcp', 'All'. + */ + @JsonProperty(value = "properties.protocol") + private TransportProtocol protocol; + + /** + * The port for the external endpoint. Port numbers for each rule must be + * unique within the Load Balancer. Acceptable values range from 1 to + * 65534. + */ + @JsonProperty(value = "properties.frontendPort") + private Integer frontendPort; + + /** + * The port used for the internal endpoint. Acceptable values range from 1 + * to 65535. + */ + @JsonProperty(value = "properties.backendPort") + private Integer backendPort; + + /** + * The timeout for the TCP idle connection. The value can be set between 4 + * and 30 minutes. The default value is 4 minutes. This element is only + * used when the protocol is set to TCP. + */ + @JsonProperty(value = "properties.idleTimeoutInMinutes") + private Integer idleTimeoutInMinutes; + + /** + * Configures a virtual machine's endpoint for the floating IP capability + * required to configure a SQL AlwaysOn Availability Group. This setting is + * required when using the SQL AlwaysOn Availability Groups in SQL server. + * This setting can't be changed after you create the endpoint. + */ + @JsonProperty(value = "properties.enableFloatingIP") + private Boolean enableFloatingIP; + + /** + * Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + * connection termination. This element is only used when the protocol is + * set to TCP. + */ + @JsonProperty(value = "properties.enableTcpReset") + private Boolean enableTcpReset; + + /** + * The provisioning state of the inbound NAT rule resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within the set of inbound NAT + * rules used by the load balancer. This name can be used to access the + * resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get a reference to frontend IP addresses. + * + * @return the frontendIPConfiguration value + */ + public SubResource frontendIPConfiguration() { + return this.frontendIPConfiguration; + } + + /** + * Set a reference to frontend IP addresses. + * + * @param frontendIPConfiguration the frontendIPConfiguration value to set + * @return the InboundNatRuleInner object itself. + */ + public InboundNatRuleInner withFrontendIPConfiguration(SubResource frontendIPConfiguration) { + this.frontendIPConfiguration = frontendIPConfiguration; + return this; + } + + /** + * Get a reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. + * + * @return the backendIPConfiguration value + */ + public NetworkInterfaceIPConfigurationInner backendIPConfiguration() { + return this.backendIPConfiguration; + } + + /** + * Get the reference to the transport protocol used by the load balancing rule. Possible values include: 'Udp', 'Tcp', 'All'. + * + * @return the protocol value + */ + public TransportProtocol protocol() { + return this.protocol; + } + + /** + * Set the reference to the transport protocol used by the load balancing rule. Possible values include: 'Udp', 'Tcp', 'All'. + * + * @param protocol the protocol value to set + * @return the InboundNatRuleInner object itself. + */ + public InboundNatRuleInner withProtocol(TransportProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. + * + * @return the frontendPort value + */ + public Integer frontendPort() { + return this.frontendPort; + } + + /** + * Set the port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. + * + * @param frontendPort the frontendPort value to set + * @return the InboundNatRuleInner object itself. + */ + public InboundNatRuleInner withFrontendPort(Integer frontendPort) { + this.frontendPort = frontendPort; + return this; + } + + /** + * Get the port used for the internal endpoint. Acceptable values range from 1 to 65535. + * + * @return the backendPort value + */ + public Integer backendPort() { + return this.backendPort; + } + + /** + * Set the port used for the internal endpoint. Acceptable values range from 1 to 65535. + * + * @param backendPort the backendPort value to set + * @return the InboundNatRuleInner object itself. + */ + public InboundNatRuleInner withBackendPort(Integer backendPort) { + this.backendPort = backendPort; + return this; + } + + /** + * Get the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + * + * @return the idleTimeoutInMinutes value + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set + * @return the InboundNatRuleInner object itself. + */ + public InboundNatRuleInner withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + + /** + * Get configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + * + * @return the enableFloatingIP value + */ + public Boolean enableFloatingIP() { + return this.enableFloatingIP; + } + + /** + * Set configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + * + * @param enableFloatingIP the enableFloatingIP value to set + * @return the InboundNatRuleInner object itself. + */ + public InboundNatRuleInner withEnableFloatingIP(Boolean enableFloatingIP) { + this.enableFloatingIP = enableFloatingIP; + return this; + } + + /** + * Get receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + * + * @return the enableTcpReset value + */ + public Boolean enableTcpReset() { + return this.enableTcpReset; + } + + /** + * Set receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + * + * @param enableTcpReset the enableTcpReset value to set + * @return the InboundNatRuleInner object itself. + */ + public InboundNatRuleInner withEnableTcpReset(Boolean enableTcpReset) { + this.enableTcpReset = enableTcpReset; + return this; + } + + /** + * Get the provisioning state of the inbound NAT rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource. + * + * @param name the name value to set + * @return the InboundNatRuleInner object itself. + */ + public InboundNatRuleInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRulesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRulesImpl.java new file mode 100644 index 000000000000..83a3d8157572 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRulesImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.InboundNatRules; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.InboundNatRule; + +class InboundNatRulesImpl extends WrapperImpl implements InboundNatRules { + private final NetworkManager manager; + + InboundNatRulesImpl(NetworkManager manager) { + super(manager.inner().inboundNatRules()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public InboundNatRuleImpl define(String name) { + return wrapModel(name); + } + + private InboundNatRuleImpl wrapModel(InboundNatRuleInner inner) { + return new InboundNatRuleImpl(inner, manager()); + } + + private InboundNatRuleImpl wrapModel(String name) { + return new InboundNatRuleImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String loadBalancerName) { + InboundNatRulesInner client = this.inner(); + return client.listAsync(resourceGroupName, loadBalancerName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public InboundNatRule call(InboundNatRuleInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName) { + InboundNatRulesInner client = this.inner(); + return client.getAsync(resourceGroupName, loadBalancerName, inboundNatRuleName) + .flatMap(new Func1>() { + @Override + public Observable call(InboundNatRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((InboundNatRule)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName) { + InboundNatRulesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, loadBalancerName, inboundNatRuleName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRulesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRulesInner.java new file mode 100644 index 000000000000..68235d86356e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/InboundNatRulesInner.java @@ -0,0 +1,853 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 InboundNatRules. + */ +public class InboundNatRulesInner { + /** The Retrofit service to perform REST calls. */ + private InboundNatRulesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of InboundNatRulesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public InboundNatRulesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(InboundNatRulesService.class); + this.client = client; + } + + /** + * The interface defining all the services for InboundNatRules to be + * used by Retrofit to perform actually REST calls. + */ + interface InboundNatRulesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.InboundNatRules list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @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.network.v2019_09_01.InboundNatRules delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("inboundNatRuleName") String inboundNatRuleName, @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.network.v2019_09_01.InboundNatRules beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("inboundNatRuleName") String inboundNatRuleName, @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.network.v2019_09_01.InboundNatRules get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("inboundNatRuleName") String inboundNatRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.InboundNatRules createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("inboundNatRuleName") String inboundNatRuleName, @Path("subscriptionId") String subscriptionId, @Body InboundNatRuleInner inboundNatRuleParameters, @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.network.v2019_09_01.InboundNatRules beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("inboundNatRuleName") String inboundNatRuleName, @Path("subscriptionId") String subscriptionId, @Body InboundNatRuleInner inboundNatRuleParameters, @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.network.v2019_09_01.InboundNatRules listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all the inbound nat rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<InboundNatRuleInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String loadBalancerName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, loadBalancerName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the inbound nat rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @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 resourceGroupName, final String loadBalancerName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, loadBalancerName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the inbound nat rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<InboundNatRuleInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String loadBalancerName) { + return listWithServiceResponseAsync(resourceGroupName, loadBalancerName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the inbound nat rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<InboundNatRuleInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String loadBalancerName) { + return listSinglePageAsync(resourceGroupName, loadBalancerName) + .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 all the inbound nat rules in a load balancer. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<InboundNatRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String loadBalancerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), 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); + } + + /** + * Deletes the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat 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 + */ + public void delete(String resourceGroupName, String loadBalancerName, String inboundNatRuleName) { + deleteWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName).toBlocking().last().body(); + } + + /** + * Deletes the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat 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 deleteAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName), serviceCallback); + } + + /** + * Deletes the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName) { + return deleteWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (inboundNatRuleName == null) { + throw new IllegalArgumentException("Parameter inboundNatRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat 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 + */ + public void beginDelete(String resourceGroupName, String loadBalancerName, String inboundNatRuleName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName).toBlocking().single().body(); + } + + /** + * Deletes the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat 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 beginDeleteAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName), serviceCallback); + } + + /** + * Deletes the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (inboundNatRuleName == null) { + throw new IllegalArgumentException("Parameter inboundNatRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat 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 InboundNatRuleInner object if successful. + */ + public InboundNatRuleInner get(String resourceGroupName, String loadBalancerName, String inboundNatRuleName) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName).toBlocking().single().body(); + } + + /** + * Gets the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat 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 getAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName), serviceCallback); + } + + /** + * Gets the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InboundNatRuleInner object + */ + public Observable getAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName).map(new Func1, InboundNatRuleInner>() { + @Override + public InboundNatRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InboundNatRuleInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (inboundNatRuleName == null) { + throw new IllegalArgumentException("Parameter inboundNatRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.get(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 InboundNatRuleInner object if successful. + */ + public InboundNatRuleInner get(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, String expand) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @param expand Expands referenced resources. + * @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 loadBalancerName, String inboundNatRuleName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName, expand), serviceCallback); + } + + /** + * Gets the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InboundNatRuleInner object + */ + public Observable getAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, String expand) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName, expand).map(new Func1, InboundNatRuleInner>() { + @Override + public InboundNatRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InboundNatRuleInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (inboundNatRuleName == null) { + throw new IllegalArgumentException("Parameter inboundNatRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Creates or updates a load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @param inboundNatRuleParameters Parameters supplied to the create or update inbound nat rule 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 InboundNatRuleInner object if successful. + */ + public InboundNatRuleInner createOrUpdate(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, InboundNatRuleInner inboundNatRuleParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @param inboundNatRuleParameters Parameters supplied to the create or update inbound nat rule 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 createOrUpdateAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, InboundNatRuleInner inboundNatRuleParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters), serviceCallback); + } + + /** + * Creates or updates a load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @param inboundNatRuleParameters Parameters supplied to the create or update inbound nat rule operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, InboundNatRuleInner inboundNatRuleParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters).map(new Func1, InboundNatRuleInner>() { + @Override + public InboundNatRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @param inboundNatRuleParameters Parameters supplied to the create or update inbound nat rule operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, InboundNatRuleInner inboundNatRuleParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (inboundNatRuleName == null) { + throw new IllegalArgumentException("Parameter inboundNatRuleName 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 (inboundNatRuleParameters == null) { + throw new IllegalArgumentException("Parameter inboundNatRuleParameters is required and cannot be null."); + } + Validator.validate(inboundNatRuleParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), inboundNatRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @param inboundNatRuleParameters Parameters supplied to the create or update inbound nat rule 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 InboundNatRuleInner object if successful. + */ + public InboundNatRuleInner beginCreateOrUpdate(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, InboundNatRuleInner inboundNatRuleParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @param inboundNatRuleParameters Parameters supplied to the create or update inbound nat rule 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 beginCreateOrUpdateAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, InboundNatRuleInner inboundNatRuleParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters), serviceCallback); + } + + /** + * Creates or updates a load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @param inboundNatRuleParameters Parameters supplied to the create or update inbound nat rule operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InboundNatRuleInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, InboundNatRuleInner inboundNatRuleParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters).map(new Func1, InboundNatRuleInner>() { + @Override + public InboundNatRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a load balancer inbound nat rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param inboundNatRuleName The name of the inbound nat rule. + * @param inboundNatRuleParameters Parameters supplied to the create or update inbound nat rule operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InboundNatRuleInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, InboundNatRuleInner inboundNatRuleParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (inboundNatRuleName == null) { + throw new IllegalArgumentException("Parameter inboundNatRuleName 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 (inboundNatRuleParameters == null) { + throw new IllegalArgumentException("Parameter inboundNatRuleParameters is required and cannot be null."); + } + Validator.validate(inboundNatRuleParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), inboundNatRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 all the inbound nat rules in a load balancer. + * + * @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<InboundNatRuleInner> 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 all the inbound nat rules in a load balancer. + * + * @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 all the inbound nat rules in a load balancer. + * + * @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<InboundNatRuleInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the inbound nat rules in a load balancer. + * + * @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<InboundNatRuleInner> 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 all the inbound nat rules in a load balancer. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<InboundNatRuleInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupImpl.java new file mode 100644 index 000000000000..77a5fcb98092 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.IpGroup; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.List; +import com.microsoft.azure.SubResource; + +class IpGroupImpl extends GroupableResourceCoreImpl implements IpGroup, IpGroup.Definition, IpGroup.Update { + IpGroupImpl(String name, IpGroupInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + IpGroupsInner client = this.manager().inner().ipGroups(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + IpGroupsInner client = this.manager().inner().ipGroups(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + IpGroupsInner client = this.manager().inner().ipGroups(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List firewalls() { + return this.inner().firewalls(); + } + + @Override + public List ipAddresses() { + return this.inner().ipAddresses(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public IpGroupImpl withIpAddresses(List ipAddresses) { + this.inner().withIpAddresses(ipAddresses); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupInner.java new file mode 100644 index 000000000000..64c1e4c893bc --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupInner.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * The IpGroups resource information. + */ +@JsonFlatten +@SkipParentValidation +public class IpGroupInner extends Resource { + /** + * The provisioning state of the IpGroups resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * IpAddresses/IpAddressPrefixes in the IpGroups resource. + */ + @JsonProperty(value = "properties.ipAddresses") + private List ipAddresses; + + /** + * List of references to Azure resources that this IpGroups is associated + * with. + */ + @JsonProperty(value = "properties.firewalls", access = JsonProperty.Access.WRITE_ONLY) + private List firewalls; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the provisioning state of the IpGroups resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get ipAddresses/IpAddressPrefixes in the IpGroups resource. + * + * @return the ipAddresses value + */ + public List ipAddresses() { + return this.ipAddresses; + } + + /** + * Set ipAddresses/IpAddressPrefixes in the IpGroups resource. + * + * @param ipAddresses the ipAddresses value to set + * @return the IpGroupInner object itself. + */ + public IpGroupInner withIpAddresses(List ipAddresses) { + this.ipAddresses = ipAddresses; + return this; + } + + /** + * Get list of references to Azure resources that this IpGroups is associated with. + * + * @return the firewalls value + */ + public List firewalls() { + return this.firewalls; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the IpGroupInner object itself. + */ + public IpGroupInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupsImpl.java new file mode 100644 index 000000000000..7983dcfaaf9f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupsImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.IpGroups; +import com.microsoft.azure.management.network.v2019_09_01.IpGroup; +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; + +class IpGroupsImpl extends GroupableResourcesCoreImpl implements IpGroups { + protected IpGroupsImpl(NetworkManager manager) { + super(manager.inner().ipGroups(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + IpGroupsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + IpGroupsInner 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) { + IpGroupsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + IpGroupsInner 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 IpGroup call(IpGroupInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + IpGroupsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + IpGroupsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public IpGroup call(IpGroupInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public IpGroupImpl define(String name) { + return wrapModel(name); + } + + @Override + protected IpGroupImpl wrapModel(IpGroupInner inner) { + return new IpGroupImpl(inner.name(), inner, manager()); + } + + @Override + protected IpGroupImpl wrapModel(String name) { + return new IpGroupImpl(name, new IpGroupInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupsInner.java new file mode 100644 index 000000000000..587ddcc3d817 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/IpGroupsInner.java @@ -0,0 +1,1208 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.ListOperationCallback; +import com.microsoft.azure.management.network.v2019_09_01.ErrorException; +import com.microsoft.azure.management.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 IpGroups. + */ +public class IpGroupsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private IpGroupsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of IpGroupsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public IpGroupsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(IpGroupsService.class); + this.client = client; + } + + /** + * The interface defining all the services for IpGroups to be + * used by Retrofit to perform actually REST calls. + */ + interface IpGroupsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.IpGroups getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("ipGroupsName") String ipGroupsName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.IpGroups createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("ipGroupsName") String ipGroupsName, @Path("subscriptionId") String subscriptionId, @Body IpGroupInner 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.network.v2019_09_01.IpGroups beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("ipGroupsName") String ipGroupsName, @Path("subscriptionId") String subscriptionId, @Body IpGroupInner 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.network.v2019_09_01.IpGroups updateGroups" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}") + Observable> updateGroups(@Path("resourceGroupName") String resourceGroupName, @Path("ipGroupsName") String ipGroupsName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.IpGroups delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("ipGroupsName") String ipGroupsName, @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.network.v2019_09_01.IpGroups beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("ipGroupsName") String ipGroupsName, @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.network.v2019_09_01.IpGroups listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.IpGroups list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/ipGroups") + Observable> list(@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.network.v2019_09_01.IpGroups 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.network.v2019_09_01.IpGroups listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IpGroupInner object if successful. + */ + public IpGroupInner getByResourceGroup(String resourceGroupName, String ipGroupsName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ipGroupsName).toBlocking().single().body(); + } + + /** + * Gets the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @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 ipGroupsName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, ipGroupsName), serviceCallback); + } + + /** + * Gets the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpGroupInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String ipGroupsName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ipGroupsName).map(new Func1, IpGroupInner>() { + @Override + public IpGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpGroupInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String ipGroupsName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ipGroupsName == null) { + throw new IllegalArgumentException("Parameter ipGroupsName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, ipGroupsName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param expand Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced by the IpGroups resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IpGroupInner object if successful. + */ + public IpGroupInner getByResourceGroup(String resourceGroupName, String ipGroupsName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ipGroupsName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param expand Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced by the IpGroups resource. + * @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 ipGroupsName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, ipGroupsName, expand), serviceCallback); + } + + /** + * Gets the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param expand Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced by the IpGroups resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpGroupInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String ipGroupsName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ipGroupsName, expand).map(new Func1, IpGroupInner>() { + @Override + public IpGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param expand Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced by the IpGroups resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpGroupInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String ipGroupsName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ipGroupsName == null) { + throw new IllegalArgumentException("Parameter ipGroupsName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, ipGroupsName, this.client.subscriptionId(), apiVersion, expand, 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Creates or updates an ipGroups in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param parameters Parameters supplied to the create or update IpGroups operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IpGroupInner object if successful. + */ + public IpGroupInner createOrUpdate(String resourceGroupName, String ipGroupsName, IpGroupInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, ipGroupsName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates an ipGroups in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param parameters Parameters supplied to the create or update IpGroups 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 createOrUpdateAsync(String resourceGroupName, String ipGroupsName, IpGroupInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, ipGroupsName, parameters), serviceCallback); + } + + /** + * Creates or updates an ipGroups in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param parameters Parameters supplied to the create or update IpGroups operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String ipGroupsName, IpGroupInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, ipGroupsName, parameters).map(new Func1, IpGroupInner>() { + @Override + public IpGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an ipGroups in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param parameters Parameters supplied to the create or update IpGroups operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String ipGroupsName, IpGroupInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ipGroupsName == null) { + throw new IllegalArgumentException("Parameter ipGroupsName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, ipGroupsName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates an ipGroups in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param parameters Parameters supplied to the create or update IpGroups operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IpGroupInner object if successful. + */ + public IpGroupInner beginCreateOrUpdate(String resourceGroupName, String ipGroupsName, IpGroupInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ipGroupsName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates an ipGroups in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param parameters Parameters supplied to the create or update IpGroups 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 beginCreateOrUpdateAsync(String resourceGroupName, String ipGroupsName, IpGroupInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ipGroupsName, parameters), serviceCallback); + } + + /** + * Creates or updates an ipGroups in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param parameters Parameters supplied to the create or update IpGroups operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpGroupInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String ipGroupsName, IpGroupInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ipGroupsName, parameters).map(new Func1, IpGroupInner>() { + @Override + public IpGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an ipGroups in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param parameters Parameters supplied to the create or update IpGroups operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpGroupInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String ipGroupsName, IpGroupInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ipGroupsName == null) { + throw new IllegalArgumentException("Parameter ipGroupsName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, ipGroupsName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Updates an IpGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IpGroupInner object if successful. + */ + public IpGroupInner updateGroups(String resourceGroupName, String ipGroupsName) { + return updateGroupsWithServiceResponseAsync(resourceGroupName, ipGroupsName).toBlocking().single().body(); + } + + /** + * Updates an IpGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @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 updateGroupsAsync(String resourceGroupName, String ipGroupsName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateGroupsWithServiceResponseAsync(resourceGroupName, ipGroupsName), serviceCallback); + } + + /** + * Updates an IpGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpGroupInner object + */ + public Observable updateGroupsAsync(String resourceGroupName, String ipGroupsName) { + return updateGroupsWithServiceResponseAsync(resourceGroupName, ipGroupsName).map(new Func1, IpGroupInner>() { + @Override + public IpGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an IpGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpGroupInner object + */ + public Observable> updateGroupsWithServiceResponseAsync(String resourceGroupName, String ipGroupsName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ipGroupsName == null) { + throw new IllegalArgumentException("Parameter ipGroupsName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateGroups(resourceGroupName, ipGroupsName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateGroupsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates an IpGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IpGroupInner object if successful. + */ + public IpGroupInner updateGroups(String resourceGroupName, String ipGroupsName, Map tags) { + return updateGroupsWithServiceResponseAsync(resourceGroupName, ipGroupsName, tags).toBlocking().single().body(); + } + + /** + * Updates an IpGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param tags Resource tags. + * @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 updateGroupsAsync(String resourceGroupName, String ipGroupsName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateGroupsWithServiceResponseAsync(resourceGroupName, ipGroupsName, tags), serviceCallback); + } + + /** + * Updates an IpGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpGroupInner object + */ + public Observable updateGroupsAsync(String resourceGroupName, String ipGroupsName, Map tags) { + return updateGroupsWithServiceResponseAsync(resourceGroupName, ipGroupsName, tags).map(new Func1, IpGroupInner>() { + @Override + public IpGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an IpGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpGroupInner object + */ + public Observable> updateGroupsWithServiceResponseAsync(String resourceGroupName, String ipGroupsName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ipGroupsName == null) { + throw new IllegalArgumentException("Parameter ipGroupsName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateGroups(resourceGroupName, ipGroupsName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateGroupsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateGroupsDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Deletes the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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 ipGroupsName) { + deleteWithServiceResponseAsync(resourceGroupName, ipGroupsName).toBlocking().last().body(); + } + + /** + * Deletes the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @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 ipGroupsName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, ipGroupsName), serviceCallback); + } + + /** + * Deletes the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String ipGroupsName) { + return deleteWithServiceResponseAsync(resourceGroupName, ipGroupsName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String ipGroupsName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ipGroupsName == null) { + throw new IllegalArgumentException("Parameter ipGroupsName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, ipGroupsName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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 ipGroupsName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, ipGroupsName).toBlocking().single().body(); + } + + /** + * Deletes the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @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 ipGroupsName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, ipGroupsName), serviceCallback); + } + + /** + * Deletes the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String ipGroupsName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, ipGroupsName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified ipGroups. + * + * @param resourceGroupName The name of the resource group. + * @param ipGroupsName The name of the ipGroups. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String ipGroupsName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ipGroupsName == null) { + throw new IllegalArgumentException("Parameter ipGroupsName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, ipGroupsName, this.client.subscriptionId(), 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 ErrorException, 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(ErrorException.class) + .build(response); + } + + /** + * Gets all IpGroups in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<IpGroupInner> 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 all IpGroups in a resource group. + * + * @param resourceGroupName The name of the 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 all IpGroups in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IpGroupInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all IpGroups in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IpGroupInner> 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 all IpGroups in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IpGroupInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Gets all IpGroups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<IpGroupInner> 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 all IpGroups in a subscription. + * + * @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 all IpGroups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IpGroupInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all IpGroups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IpGroupInner> 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 all IpGroups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IpGroupInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Gets all IpGroups in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<IpGroupInner> 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 all IpGroups in a resource group. + * + * @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 all IpGroups in a resource group. + * + * @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<IpGroupInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all IpGroups in a resource group. + * + * @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<IpGroupInner> 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 all IpGroups in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IpGroupInner> 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Gets all IpGroups in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<IpGroupInner> 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 all IpGroups in a subscription. + * + * @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 all IpGroups in a subscription. + * + * @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<IpGroupInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all IpGroups in a subscription. + * + * @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<IpGroupInner> 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 all IpGroups in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IpGroupInner> 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerBackendAddressPoolsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerBackendAddressPoolsImpl.java new file mode 100644 index 000000000000..c7ac08bfdde7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerBackendAddressPoolsImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerBackendAddressPools; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.BackendAddressPool; + +class LoadBalancerBackendAddressPoolsImpl extends WrapperImpl implements LoadBalancerBackendAddressPools { + private final NetworkManager manager; + + LoadBalancerBackendAddressPoolsImpl(NetworkManager manager) { + super(manager.inner().loadBalancerBackendAddressPools()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private BackendAddressPoolImpl wrapModel(BackendAddressPoolInner inner) { + return new BackendAddressPoolImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String loadBalancerName) { + LoadBalancerBackendAddressPoolsInner client = this.inner(); + return client.listAsync(resourceGroupName, loadBalancerName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public BackendAddressPool call(BackendAddressPoolInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String loadBalancerName, String backendAddressPoolName) { + LoadBalancerBackendAddressPoolsInner client = this.inner(); + return client.getAsync(resourceGroupName, loadBalancerName, backendAddressPoolName) + .flatMap(new Func1>() { + @Override + public Observable call(BackendAddressPoolInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((BackendAddressPool)wrapModel(inner)); + } + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerBackendAddressPoolsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerBackendAddressPoolsInner.java new file mode 100644 index 000000000000..b0ff2e9b7569 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerBackendAddressPoolsInner.java @@ -0,0 +1,397 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in LoadBalancerBackendAddressPools. + */ +public class LoadBalancerBackendAddressPoolsInner { + /** The Retrofit service to perform REST calls. */ + private LoadBalancerBackendAddressPoolsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of LoadBalancerBackendAddressPoolsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LoadBalancerBackendAddressPoolsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(LoadBalancerBackendAddressPoolsService.class); + this.client = client; + } + + /** + * The interface defining all the services for LoadBalancerBackendAddressPools to be + * used by Retrofit to perform actually REST calls. + */ + interface LoadBalancerBackendAddressPoolsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.LoadBalancerBackendAddressPools list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @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.network.v2019_09_01.LoadBalancerBackendAddressPools get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("backendAddressPoolName") String backendAddressPoolName, @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.network.v2019_09_01.LoadBalancerBackendAddressPools listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all the load balancer backed address pools. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<BackendAddressPoolInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String loadBalancerName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, loadBalancerName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the load balancer backed address pools. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @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 resourceGroupName, final String loadBalancerName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, loadBalancerName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the load balancer backed address pools. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BackendAddressPoolInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String loadBalancerName) { + return listWithServiceResponseAsync(resourceGroupName, loadBalancerName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the load balancer backed address pools. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BackendAddressPoolInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String loadBalancerName) { + return listSinglePageAsync(resourceGroupName, loadBalancerName) + .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 all the load balancer backed address pools. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BackendAddressPoolInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String loadBalancerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), 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 load balancer backend address pool. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param backendAddressPoolName The name of the backend address pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 BackendAddressPoolInner object if successful. + */ + public BackendAddressPoolInner get(String resourceGroupName, String loadBalancerName, String backendAddressPoolName) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, backendAddressPoolName).toBlocking().single().body(); + } + + /** + * Gets load balancer backend address pool. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param backendAddressPoolName The name of the backend address pool. + * @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 loadBalancerName, String backendAddressPoolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, loadBalancerName, backendAddressPoolName), serviceCallback); + } + + /** + * Gets load balancer backend address pool. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param backendAddressPoolName The name of the backend address pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackendAddressPoolInner object + */ + public Observable getAsync(String resourceGroupName, String loadBalancerName, String backendAddressPoolName) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, backendAddressPoolName).map(new Func1, BackendAddressPoolInner>() { + @Override + public BackendAddressPoolInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets load balancer backend address pool. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param backendAddressPoolName The name of the backend address pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackendAddressPoolInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String backendAddressPoolName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (backendAddressPoolName == null) { + throw new IllegalArgumentException("Parameter backendAddressPoolName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, loadBalancerName, backendAddressPoolName, this.client.subscriptionId(), 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); + } + + /** + * Gets all the load balancer backed address pools. + * + * @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<BackendAddressPoolInner> 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 all the load balancer backed address pools. + * + * @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 all the load balancer backed address pools. + * + * @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<BackendAddressPoolInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the load balancer backed address pools. + * + * @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<BackendAddressPoolInner> 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 all the load balancer backed address pools. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BackendAddressPoolInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerFrontendIPConfigurationsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerFrontendIPConfigurationsImpl.java new file mode 100644 index 000000000000..a14f1dfb18b4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerFrontendIPConfigurationsImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerFrontendIPConfigurations; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.FrontendIPConfiguration; + +class LoadBalancerFrontendIPConfigurationsImpl extends WrapperImpl implements LoadBalancerFrontendIPConfigurations { + private final NetworkManager manager; + + LoadBalancerFrontendIPConfigurationsImpl(NetworkManager manager) { + super(manager.inner().loadBalancerFrontendIPConfigurations()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private FrontendIPConfigurationImpl wrapModel(FrontendIPConfigurationInner inner) { + return new FrontendIPConfigurationImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String loadBalancerName) { + LoadBalancerFrontendIPConfigurationsInner client = this.inner(); + return client.listAsync(resourceGroupName, loadBalancerName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public FrontendIPConfiguration call(FrontendIPConfigurationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String loadBalancerName, String frontendIPConfigurationName) { + LoadBalancerFrontendIPConfigurationsInner client = this.inner(); + return client.getAsync(resourceGroupName, loadBalancerName, frontendIPConfigurationName) + .flatMap(new Func1>() { + @Override + public Observable call(FrontendIPConfigurationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((FrontendIPConfiguration)wrapModel(inner)); + } + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerFrontendIPConfigurationsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerFrontendIPConfigurationsInner.java new file mode 100644 index 000000000000..3f9d44755cf8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerFrontendIPConfigurationsInner.java @@ -0,0 +1,397 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in LoadBalancerFrontendIPConfigurations. + */ +public class LoadBalancerFrontendIPConfigurationsInner { + /** The Retrofit service to perform REST calls. */ + private LoadBalancerFrontendIPConfigurationsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of LoadBalancerFrontendIPConfigurationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LoadBalancerFrontendIPConfigurationsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(LoadBalancerFrontendIPConfigurationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for LoadBalancerFrontendIPConfigurations to be + * used by Retrofit to perform actually REST calls. + */ + interface LoadBalancerFrontendIPConfigurationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.LoadBalancerFrontendIPConfigurations list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @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.network.v2019_09_01.LoadBalancerFrontendIPConfigurations get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("frontendIPConfigurationName") String frontendIPConfigurationName, @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.network.v2019_09_01.LoadBalancerFrontendIPConfigurations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all the load balancer frontend IP configurations. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<FrontendIPConfigurationInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String loadBalancerName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, loadBalancerName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the load balancer frontend IP configurations. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @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 resourceGroupName, final String loadBalancerName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, loadBalancerName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the load balancer frontend IP configurations. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FrontendIPConfigurationInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String loadBalancerName) { + return listWithServiceResponseAsync(resourceGroupName, loadBalancerName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the load balancer frontend IP configurations. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FrontendIPConfigurationInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String loadBalancerName) { + return listSinglePageAsync(resourceGroupName, loadBalancerName) + .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 all the load balancer frontend IP configurations. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FrontendIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String loadBalancerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), 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 load balancer frontend IP configuration. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param frontendIPConfigurationName The name of the frontend IP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 FrontendIPConfigurationInner object if successful. + */ + public FrontendIPConfigurationInner get(String resourceGroupName, String loadBalancerName, String frontendIPConfigurationName) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, frontendIPConfigurationName).toBlocking().single().body(); + } + + /** + * Gets load balancer frontend IP configuration. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param frontendIPConfigurationName The name of the frontend IP configuration. + * @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 loadBalancerName, String frontendIPConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, loadBalancerName, frontendIPConfigurationName), serviceCallback); + } + + /** + * Gets load balancer frontend IP configuration. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param frontendIPConfigurationName The name of the frontend IP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FrontendIPConfigurationInner object + */ + public Observable getAsync(String resourceGroupName, String loadBalancerName, String frontendIPConfigurationName) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, frontendIPConfigurationName).map(new Func1, FrontendIPConfigurationInner>() { + @Override + public FrontendIPConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets load balancer frontend IP configuration. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param frontendIPConfigurationName The name of the frontend IP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FrontendIPConfigurationInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String frontendIPConfigurationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (frontendIPConfigurationName == null) { + throw new IllegalArgumentException("Parameter frontendIPConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, loadBalancerName, frontendIPConfigurationName, this.client.subscriptionId(), 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); + } + + /** + * Gets all the load balancer frontend IP configurations. + * + * @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<FrontendIPConfigurationInner> 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 all the load balancer frontend IP configurations. + * + * @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 all the load balancer frontend IP configurations. + * + * @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<FrontendIPConfigurationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the load balancer frontend IP configurations. + * + * @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<FrontendIPConfigurationInner> 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 all the load balancer frontend IP configurations. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FrontendIPConfigurationInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerImpl.java new file mode 100644 index 000000000000..1ac192d82271 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancer; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerSku; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.InboundNatPool; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.BackendAddressPool; +import com.microsoft.azure.management.network.v2019_09_01.FrontendIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.InboundNatRule; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancingRule; +import com.microsoft.azure.management.network.v2019_09_01.OutboundRule; +import com.microsoft.azure.management.network.v2019_09_01.Probe; + +class LoadBalancerImpl extends GroupableResourceCoreImpl implements LoadBalancer, LoadBalancer.Definition, LoadBalancer.Update { + LoadBalancerImpl(String name, LoadBalancerInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + LoadBalancersInner client = this.manager().inner().loadBalancers(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + LoadBalancersInner client = this.manager().inner().loadBalancers(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + LoadBalancersInner client = this.manager().inner().loadBalancers(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public List backendAddressPools() { + List lst = new ArrayList(); + if (this.inner().backendAddressPools() != null) { + for (BackendAddressPoolInner inner : this.inner().backendAddressPools()) { + lst.add( new BackendAddressPoolImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List frontendIPConfigurations() { + List lst = new ArrayList(); + if (this.inner().frontendIPConfigurations() != null) { + for (FrontendIPConfigurationInner inner : this.inner().frontendIPConfigurations()) { + lst.add( new FrontendIPConfigurationImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List inboundNatPools() { + return this.inner().inboundNatPools(); + } + + @Override + public List inboundNatRules() { + List lst = new ArrayList(); + if (this.inner().inboundNatRules() != null) { + for (InboundNatRuleInner inner : this.inner().inboundNatRules()) { + lst.add( new InboundNatRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List loadBalancingRules() { + List lst = new ArrayList(); + if (this.inner().loadBalancingRules() != null) { + for (LoadBalancingRuleInner inner : this.inner().loadBalancingRules()) { + lst.add( new LoadBalancingRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List outboundRules() { + List lst = new ArrayList(); + if (this.inner().outboundRules() != null) { + for (OutboundRuleInner inner : this.inner().outboundRules()) { + lst.add( new OutboundRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List probes() { + List lst = new ArrayList(); + if (this.inner().probes() != null) { + for (ProbeInner inner : this.inner().probes()) { + lst.add( new ProbeImpl(inner, manager())); + } + } + return lst; + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public LoadBalancerSku sku() { + return this.inner().sku(); + } + + @Override + public LoadBalancerImpl withBackendAddressPools(List backendAddressPools) { + this.inner().withBackendAddressPools(backendAddressPools); + return this; + } + + @Override + public LoadBalancerImpl withFrontendIPConfigurations(List frontendIPConfigurations) { + this.inner().withFrontendIPConfigurations(frontendIPConfigurations); + return this; + } + + @Override + public LoadBalancerImpl withInboundNatPools(List inboundNatPools) { + this.inner().withInboundNatPools(inboundNatPools); + return this; + } + + @Override + public LoadBalancerImpl withInboundNatRules(List inboundNatRules) { + this.inner().withInboundNatRules(inboundNatRules); + return this; + } + + @Override + public LoadBalancerImpl withLoadBalancingRules(List loadBalancingRules) { + this.inner().withLoadBalancingRules(loadBalancingRules); + return this; + } + + @Override + public LoadBalancerImpl withOutboundRules(List outboundRules) { + this.inner().withOutboundRules(outboundRules); + return this; + } + + @Override + public LoadBalancerImpl withProbes(List probes) { + this.inner().withProbes(probes); + return this; + } + + @Override + public LoadBalancerImpl withSku(LoadBalancerSku sku) { + this.inner().withSku(sku); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerInner.java new file mode 100644 index 000000000000..d54813d05326 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerInner.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. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerSku; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.InboundNatPool; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * LoadBalancer resource. + */ +@JsonFlatten +@SkipParentValidation +public class LoadBalancerInner extends Resource { + /** + * The load balancer SKU. + */ + @JsonProperty(value = "sku") + private LoadBalancerSku sku; + + /** + * Object representing the frontend IPs to be used for the load balancer. + */ + @JsonProperty(value = "properties.frontendIPConfigurations") + private List frontendIPConfigurations; + + /** + * Collection of backend address pools used by a load balancer. + */ + @JsonProperty(value = "properties.backendAddressPools") + private List backendAddressPools; + + /** + * Object collection representing the load balancing rules Gets the + * provisioning. + */ + @JsonProperty(value = "properties.loadBalancingRules") + private List loadBalancingRules; + + /** + * Collection of probe objects used in the load balancer. + */ + @JsonProperty(value = "properties.probes") + private List probes; + + /** + * Collection of inbound NAT Rules used by a load balancer. Defining + * inbound NAT rules on your load balancer is mutually exclusive with + * defining an inbound NAT pool. Inbound NAT pools are referenced from + * virtual machine scale sets. NICs that are associated with individual + * virtual machines cannot reference an Inbound NAT pool. They have to + * reference individual inbound NAT rules. + */ + @JsonProperty(value = "properties.inboundNatRules") + private List inboundNatRules; + + /** + * Defines an external port range for inbound NAT to a single backend port + * on NICs associated with a load balancer. Inbound NAT rules are created + * automatically for each NIC associated with the Load Balancer using an + * external port from this range. Defining an Inbound NAT pool on your Load + * Balancer is mutually exclusive with defining inbound Nat rules. Inbound + * NAT pools are referenced from virtual machine scale sets. NICs that are + * associated with individual virtual machines cannot reference an inbound + * NAT pool. They have to reference individual inbound NAT rules. + */ + @JsonProperty(value = "properties.inboundNatPools") + private List inboundNatPools; + + /** + * The outbound rules. + */ + @JsonProperty(value = "properties.outboundRules") + private List outboundRules; + + /** + * The resource GUID property of the load balancer resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the load balancer resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the load balancer SKU. + * + * @return the sku value + */ + public LoadBalancerSku sku() { + return this.sku; + } + + /** + * Set the load balancer SKU. + * + * @param sku the sku value to set + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withSku(LoadBalancerSku sku) { + this.sku = sku; + return this; + } + + /** + * Get object representing the frontend IPs to be used for the load balancer. + * + * @return the frontendIPConfigurations value + */ + public List frontendIPConfigurations() { + return this.frontendIPConfigurations; + } + + /** + * Set object representing the frontend IPs to be used for the load balancer. + * + * @param frontendIPConfigurations the frontendIPConfigurations value to set + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withFrontendIPConfigurations(List frontendIPConfigurations) { + this.frontendIPConfigurations = frontendIPConfigurations; + return this; + } + + /** + * Get collection of backend address pools used by a load balancer. + * + * @return the backendAddressPools value + */ + public List backendAddressPools() { + return this.backendAddressPools; + } + + /** + * Set collection of backend address pools used by a load balancer. + * + * @param backendAddressPools the backendAddressPools value to set + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withBackendAddressPools(List backendAddressPools) { + this.backendAddressPools = backendAddressPools; + return this; + } + + /** + * Get object collection representing the load balancing rules Gets the provisioning. + * + * @return the loadBalancingRules value + */ + public List loadBalancingRules() { + return this.loadBalancingRules; + } + + /** + * Set object collection representing the load balancing rules Gets the provisioning. + * + * @param loadBalancingRules the loadBalancingRules value to set + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withLoadBalancingRules(List loadBalancingRules) { + this.loadBalancingRules = loadBalancingRules; + return this; + } + + /** + * Get collection of probe objects used in the load balancer. + * + * @return the probes value + */ + public List probes() { + return this.probes; + } + + /** + * Set collection of probe objects used in the load balancer. + * + * @param probes the probes value to set + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withProbes(List probes) { + this.probes = probes; + return this; + } + + /** + * Get collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. + * + * @return the inboundNatRules value + */ + public List inboundNatRules() { + return this.inboundNatRules; + } + + /** + * Set collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. + * + * @param inboundNatRules the inboundNatRules value to set + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withInboundNatRules(List inboundNatRules) { + this.inboundNatRules = inboundNatRules; + return this; + } + + /** + * Get defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. + * + * @return the inboundNatPools value + */ + public List inboundNatPools() { + return this.inboundNatPools; + } + + /** + * Set defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. + * + * @param inboundNatPools the inboundNatPools value to set + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withInboundNatPools(List inboundNatPools) { + this.inboundNatPools = inboundNatPools; + return this; + } + + /** + * Get the outbound rules. + * + * @return the outboundRules value + */ + public List outboundRules() { + return this.outboundRules; + } + + /** + * Set the outbound rules. + * + * @param outboundRules the outboundRules value to set + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withOutboundRules(List outboundRules) { + this.outboundRules = outboundRules; + return this; + } + + /** + * Get the resource GUID property of the load balancer resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the load balancer resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerLoadBalancingRulesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerLoadBalancingRulesImpl.java new file mode 100644 index 000000000000..de513e09d03e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerLoadBalancingRulesImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerLoadBalancingRules; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancingRule; + +class LoadBalancerLoadBalancingRulesImpl extends WrapperImpl implements LoadBalancerLoadBalancingRules { + private final NetworkManager manager; + + LoadBalancerLoadBalancingRulesImpl(NetworkManager manager) { + super(manager.inner().loadBalancerLoadBalancingRules()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private LoadBalancingRuleImpl wrapModel(LoadBalancingRuleInner inner) { + return new LoadBalancingRuleImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String loadBalancerName) { + LoadBalancerLoadBalancingRulesInner client = this.inner(); + return client.listAsync(resourceGroupName, loadBalancerName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public LoadBalancingRule call(LoadBalancingRuleInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String loadBalancerName, String loadBalancingRuleName) { + LoadBalancerLoadBalancingRulesInner client = this.inner(); + return client.getAsync(resourceGroupName, loadBalancerName, loadBalancingRuleName) + .flatMap(new Func1>() { + @Override + public Observable call(LoadBalancingRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((LoadBalancingRule)wrapModel(inner)); + } + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerLoadBalancingRulesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerLoadBalancingRulesInner.java new file mode 100644 index 000000000000..90c871a39e71 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerLoadBalancingRulesInner.java @@ -0,0 +1,397 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in LoadBalancerLoadBalancingRules. + */ +public class LoadBalancerLoadBalancingRulesInner { + /** The Retrofit service to perform REST calls. */ + private LoadBalancerLoadBalancingRulesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of LoadBalancerLoadBalancingRulesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LoadBalancerLoadBalancingRulesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(LoadBalancerLoadBalancingRulesService.class); + this.client = client; + } + + /** + * The interface defining all the services for LoadBalancerLoadBalancingRules to be + * used by Retrofit to perform actually REST calls. + */ + interface LoadBalancerLoadBalancingRulesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.LoadBalancerLoadBalancingRules list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @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.network.v2019_09_01.LoadBalancerLoadBalancingRules get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("loadBalancingRuleName") String loadBalancingRuleName, @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.network.v2019_09_01.LoadBalancerLoadBalancingRules listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all the load balancing rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<LoadBalancingRuleInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String loadBalancerName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, loadBalancerName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the load balancing rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @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 resourceGroupName, final String loadBalancerName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, loadBalancerName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the load balancing rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LoadBalancingRuleInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String loadBalancerName) { + return listWithServiceResponseAsync(resourceGroupName, loadBalancerName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the load balancing rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LoadBalancingRuleInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String loadBalancerName) { + return listSinglePageAsync(resourceGroupName, loadBalancerName) + .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 all the load balancing rules in a load balancer. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<LoadBalancingRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String loadBalancerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), 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 specified load balancer load balancing rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param loadBalancingRuleName The name of the load balancing 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 LoadBalancingRuleInner object if successful. + */ + public LoadBalancingRuleInner get(String resourceGroupName, String loadBalancerName, String loadBalancingRuleName) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, loadBalancingRuleName).toBlocking().single().body(); + } + + /** + * Gets the specified load balancer load balancing rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param loadBalancingRuleName The name of the load balancing 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 getAsync(String resourceGroupName, String loadBalancerName, String loadBalancingRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, loadBalancerName, loadBalancingRuleName), serviceCallback); + } + + /** + * Gets the specified load balancer load balancing rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param loadBalancingRuleName The name of the load balancing rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancingRuleInner object + */ + public Observable getAsync(String resourceGroupName, String loadBalancerName, String loadBalancingRuleName) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, loadBalancingRuleName).map(new Func1, LoadBalancingRuleInner>() { + @Override + public LoadBalancingRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified load balancer load balancing rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param loadBalancingRuleName The name of the load balancing rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancingRuleInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String loadBalancingRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (loadBalancingRuleName == null) { + throw new IllegalArgumentException("Parameter loadBalancingRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, loadBalancerName, loadBalancingRuleName, this.client.subscriptionId(), 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); + } + + /** + * Gets all the load balancing rules in a load balancer. + * + * @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<LoadBalancingRuleInner> 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 all the load balancing rules in a load balancer. + * + * @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 all the load balancing rules in a load balancer. + * + * @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<LoadBalancingRuleInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the load balancing rules in a load balancer. + * + * @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<LoadBalancingRuleInner> 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 all the load balancing rules in a load balancer. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<LoadBalancingRuleInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerNetworkInterfaceImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerNetworkInterfaceImpl.java new file mode 100644 index 000000000000..35f13792d537 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerNetworkInterfaceImpl.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerNetworkInterface; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceDnsSettings; +import java.util.List; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.VirtualMachineScaleSetNetworkInterfaceIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroup; +import com.microsoft.azure.management.network.v2019_09_01.PrivateEndpoint; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.Map; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceTapConfiguration; +import com.microsoft.azure.SubResource; + +class LoadBalancerNetworkInterfaceImpl extends WrapperImpl implements LoadBalancerNetworkInterface { + private final NetworkManager manager; + + LoadBalancerNetworkInterfaceImpl(NetworkInterfaceInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public NetworkInterfaceDnsSettings dnsSettings() { + return this.inner().dnsSettings(); + } + + @Override + public Boolean enableAcceleratedNetworking() { + return this.inner().enableAcceleratedNetworking(); + } + + @Override + public Boolean enableIPForwarding() { + return this.inner().enableIPForwarding(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List hostedWorkloads() { + return this.inner().hostedWorkloads(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public List ipConfigurations() { + List lst = new ArrayList(); + if (this.inner().ipConfigurations() != null) { + for (NetworkInterfaceIPConfigurationInner inner : this.inner().ipConfigurations()) { + lst.add( new VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String macAddress() { + return this.inner().macAddress(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public NetworkSecurityGroup networkSecurityGroup() { + NetworkSecurityGroupInner inner = this.inner().networkSecurityGroup(); + if (inner != null) { + return new NetworkSecurityGroupImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public Boolean primary() { + return this.inner().primary(); + } + + @Override + public PrivateEndpoint privateEndpoint() { + PrivateEndpointInner inner = this.inner().privateEndpoint(); + if (inner != null) { + return new PrivateEndpointImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public List tapConfigurations() { + List lst = new ArrayList(); + if (this.inner().tapConfigurations() != null) { + for (NetworkInterfaceTapConfigurationInner inner : this.inner().tapConfigurations()) { + lst.add( new NetworkInterfaceTapConfigurationImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public SubResource virtualMachine() { + return this.inner().virtualMachine(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerNetworkInterfacesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerNetworkInterfacesImpl.java new file mode 100644 index 000000000000..72fd6122ea06 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerNetworkInterfacesImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerNetworkInterfaces; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerNetworkInterface; + +class LoadBalancerNetworkInterfacesImpl extends WrapperImpl implements LoadBalancerNetworkInterfaces { + private final NetworkManager manager; + + LoadBalancerNetworkInterfacesImpl(NetworkManager manager) { + super(manager.inner().loadBalancerNetworkInterfaces()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private LoadBalancerNetworkInterfaceImpl wrapModel(NetworkInterfaceInner inner) { + return new LoadBalancerNetworkInterfaceImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String loadBalancerName) { + LoadBalancerNetworkInterfacesInner client = this.inner(); + return client.listAsync(resourceGroupName, loadBalancerName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public LoadBalancerNetworkInterface call(NetworkInterfaceInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerNetworkInterfacesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerNetworkInterfacesInner.java new file mode 100644 index 000000000000..2f5a57dfcb20 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerNetworkInterfacesInner.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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.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 LoadBalancerNetworkInterfaces. + */ +public class LoadBalancerNetworkInterfacesInner { + /** The Retrofit service to perform REST calls. */ + private LoadBalancerNetworkInterfacesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of LoadBalancerNetworkInterfacesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LoadBalancerNetworkInterfacesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(LoadBalancerNetworkInterfacesService.class); + this.client = client; + } + + /** + * The interface defining all the services for LoadBalancerNetworkInterfaces to be + * used by Retrofit to perform actually REST calls. + */ + interface LoadBalancerNetworkInterfacesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.LoadBalancerNetworkInterfaces list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @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.network.v2019_09_01.LoadBalancerNetworkInterfaces listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets associated load balancer network interfaces. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<NetworkInterfaceInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String loadBalancerName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, loadBalancerName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets associated load balancer network interfaces. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @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 resourceGroupName, final String loadBalancerName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, loadBalancerName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets associated load balancer network interfaces. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String loadBalancerName) { + return listWithServiceResponseAsync(resourceGroupName, loadBalancerName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets associated load balancer network interfaces. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String loadBalancerName) { + return listSinglePageAsync(resourceGroupName, loadBalancerName) + .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 associated load balancer network interfaces. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String loadBalancerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), 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 associated load balancer network interfaces. + * + * @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<NetworkInterfaceInner> 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 associated load balancer network interfaces. + * + * @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 associated load balancer network interfaces. + * + * @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<NetworkInterfaceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets associated load balancer network interfaces. + * + * @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<NetworkInterfaceInner> 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 associated load balancer network interfaces. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerOutboundRulesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerOutboundRulesImpl.java new file mode 100644 index 000000000000..2c9d74e0e491 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerOutboundRulesImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerOutboundRules; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.OutboundRule; + +class LoadBalancerOutboundRulesImpl extends WrapperImpl implements LoadBalancerOutboundRules { + private final NetworkManager manager; + + LoadBalancerOutboundRulesImpl(NetworkManager manager) { + super(manager.inner().loadBalancerOutboundRules()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private OutboundRuleImpl wrapModel(OutboundRuleInner inner) { + return new OutboundRuleImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String loadBalancerName) { + LoadBalancerOutboundRulesInner client = this.inner(); + return client.listAsync(resourceGroupName, loadBalancerName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public OutboundRule call(OutboundRuleInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String loadBalancerName, String outboundRuleName) { + LoadBalancerOutboundRulesInner client = this.inner(); + return client.getAsync(resourceGroupName, loadBalancerName, outboundRuleName) + .flatMap(new Func1>() { + @Override + public Observable call(OutboundRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((OutboundRule)wrapModel(inner)); + } + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerOutboundRulesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerOutboundRulesInner.java new file mode 100644 index 000000000000..f5247f77be5b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerOutboundRulesInner.java @@ -0,0 +1,397 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in LoadBalancerOutboundRules. + */ +public class LoadBalancerOutboundRulesInner { + /** The Retrofit service to perform REST calls. */ + private LoadBalancerOutboundRulesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of LoadBalancerOutboundRulesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LoadBalancerOutboundRulesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(LoadBalancerOutboundRulesService.class); + this.client = client; + } + + /** + * The interface defining all the services for LoadBalancerOutboundRules to be + * used by Retrofit to perform actually REST calls. + */ + interface LoadBalancerOutboundRulesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.LoadBalancerOutboundRules list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @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.network.v2019_09_01.LoadBalancerOutboundRules get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("outboundRuleName") String outboundRuleName, @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.network.v2019_09_01.LoadBalancerOutboundRules listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all the outbound rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<OutboundRuleInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String loadBalancerName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, loadBalancerName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the outbound rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @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 resourceGroupName, final String loadBalancerName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, loadBalancerName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the outbound rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OutboundRuleInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String loadBalancerName) { + return listWithServiceResponseAsync(resourceGroupName, loadBalancerName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the outbound rules in a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OutboundRuleInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String loadBalancerName) { + return listSinglePageAsync(resourceGroupName, loadBalancerName) + .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 all the outbound rules in a load balancer. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OutboundRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String loadBalancerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), 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 specified load balancer outbound rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param outboundRuleName The name of the outbound 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 OutboundRuleInner object if successful. + */ + public OutboundRuleInner get(String resourceGroupName, String loadBalancerName, String outboundRuleName) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, outboundRuleName).toBlocking().single().body(); + } + + /** + * Gets the specified load balancer outbound rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param outboundRuleName The name of the outbound 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 getAsync(String resourceGroupName, String loadBalancerName, String outboundRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, loadBalancerName, outboundRuleName), serviceCallback); + } + + /** + * Gets the specified load balancer outbound rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param outboundRuleName The name of the outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OutboundRuleInner object + */ + public Observable getAsync(String resourceGroupName, String loadBalancerName, String outboundRuleName) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, outboundRuleName).map(new Func1, OutboundRuleInner>() { + @Override + public OutboundRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified load balancer outbound rule. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param outboundRuleName The name of the outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OutboundRuleInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String outboundRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (outboundRuleName == null) { + throw new IllegalArgumentException("Parameter outboundRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, loadBalancerName, outboundRuleName, this.client.subscriptionId(), 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); + } + + /** + * Gets all the outbound rules in a load balancer. + * + * @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<OutboundRuleInner> 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 all the outbound rules in a load balancer. + * + * @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 all the outbound rules in a load balancer. + * + * @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<OutboundRuleInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the outbound rules in a load balancer. + * + * @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<OutboundRuleInner> 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 all the outbound rules in a load balancer. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OutboundRuleInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerProbesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerProbesImpl.java new file mode 100644 index 000000000000..f368b94822dc --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerProbesImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerProbes; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.Probe; + +class LoadBalancerProbesImpl extends WrapperImpl implements LoadBalancerProbes { + private final NetworkManager manager; + + LoadBalancerProbesImpl(NetworkManager manager) { + super(manager.inner().loadBalancerProbes()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private ProbeImpl wrapModel(ProbeInner inner) { + return new ProbeImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String loadBalancerName) { + LoadBalancerProbesInner client = this.inner(); + return client.listAsync(resourceGroupName, loadBalancerName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Probe call(ProbeInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String loadBalancerName, String probeName) { + LoadBalancerProbesInner client = this.inner(); + return client.getAsync(resourceGroupName, loadBalancerName, probeName) + .flatMap(new Func1>() { + @Override + public Observable call(ProbeInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Probe)wrapModel(inner)); + } + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerProbesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerProbesInner.java new file mode 100644 index 000000000000..6035eddb42a8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancerProbesInner.java @@ -0,0 +1,397 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in LoadBalancerProbes. + */ +public class LoadBalancerProbesInner { + /** The Retrofit service to perform REST calls. */ + private LoadBalancerProbesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of LoadBalancerProbesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LoadBalancerProbesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(LoadBalancerProbesService.class); + this.client = client; + } + + /** + * The interface defining all the services for LoadBalancerProbes to be + * used by Retrofit to perform actually REST calls. + */ + interface LoadBalancerProbesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.LoadBalancerProbes list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @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.network.v2019_09_01.LoadBalancerProbes get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("probeName") String probeName, @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.network.v2019_09_01.LoadBalancerProbes listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all the load balancer probes. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ProbeInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String loadBalancerName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, loadBalancerName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the load balancer probes. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @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 resourceGroupName, final String loadBalancerName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, loadBalancerName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the load balancer probes. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProbeInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String loadBalancerName) { + return listWithServiceResponseAsync(resourceGroupName, loadBalancerName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the load balancer probes. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProbeInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String loadBalancerName) { + return listSinglePageAsync(resourceGroupName, loadBalancerName) + .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 all the load balancer probes. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProbeInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String loadBalancerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), 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 load balancer probe. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param probeName The name of the probe. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ProbeInner object if successful. + */ + public ProbeInner get(String resourceGroupName, String loadBalancerName, String probeName) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, probeName).toBlocking().single().body(); + } + + /** + * Gets load balancer probe. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param probeName The name of the probe. + * @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 loadBalancerName, String probeName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, loadBalancerName, probeName), serviceCallback); + } + + /** + * Gets load balancer probe. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param probeName The name of the probe. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProbeInner object + */ + public Observable getAsync(String resourceGroupName, String loadBalancerName, String probeName) { + return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, probeName).map(new Func1, ProbeInner>() { + @Override + public ProbeInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets load balancer probe. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param probeName The name of the probe. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProbeInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String probeName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (probeName == null) { + throw new IllegalArgumentException("Parameter probeName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, loadBalancerName, probeName, this.client.subscriptionId(), 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); + } + + /** + * Gets all the load balancer probes. + * + * @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<ProbeInner> 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 all the load balancer probes. + * + * @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 all the load balancer probes. + * + * @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<ProbeInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the load balancer probes. + * + * @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<ProbeInner> 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 all the load balancer probes. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProbeInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancersImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancersImpl.java new file mode 100644 index 000000000000..5461c91547cd --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancersImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancers; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancer; +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; + +class LoadBalancersImpl extends GroupableResourcesCoreImpl implements LoadBalancers { + protected LoadBalancersImpl(NetworkManager manager) { + super(manager.inner().loadBalancers(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + LoadBalancersInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + LoadBalancersInner 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) { + LoadBalancersInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + LoadBalancersInner 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 LoadBalancer call(LoadBalancerInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + LoadBalancersInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + LoadBalancersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public LoadBalancer call(LoadBalancerInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public LoadBalancerImpl define(String name) { + return wrapModel(name); + } + + @Override + protected LoadBalancerImpl wrapModel(LoadBalancerInner inner) { + return new LoadBalancerImpl(inner.name(), inner, manager()); + } + + @Override + protected LoadBalancerImpl wrapModel(String name) { + return new LoadBalancerImpl(name, new LoadBalancerInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancersInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancersInner.java new file mode 100644 index 000000000000..76127fcb0be0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancersInner.java @@ -0,0 +1,1208 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 LoadBalancers. + */ +public class LoadBalancersInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private LoadBalancersService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of LoadBalancersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LoadBalancersInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(LoadBalancersService.class); + this.client = client; + } + + /** + * The interface defining all the services for LoadBalancers to be + * used by Retrofit to perform actually REST calls. + */ + interface LoadBalancersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.LoadBalancers delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @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.network.v2019_09_01.LoadBalancers beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @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.network.v2019_09_01.LoadBalancers getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.LoadBalancers createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("subscriptionId") String subscriptionId, @Body LoadBalancerInner 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.network.v2019_09_01.LoadBalancers beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("subscriptionId") String subscriptionId, @Body LoadBalancerInner 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.network.v2019_09_01.LoadBalancers updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.LoadBalancers list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers") + Observable> list(@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.network.v2019_09_01.LoadBalancers listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.LoadBalancers 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.network.v2019_09_01.LoadBalancers listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 loadBalancerName) { + deleteWithServiceResponseAsync(resourceGroupName, loadBalancerName).toBlocking().last().body(); + } + + /** + * Deletes the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @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 loadBalancerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, loadBalancerName), serviceCallback); + } + + /** + * Deletes the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String loadBalancerName) { + return deleteWithServiceResponseAsync(resourceGroupName, loadBalancerName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String loadBalancerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 loadBalancerName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, loadBalancerName).toBlocking().single().body(); + } + + /** + * Deletes the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @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 loadBalancerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, loadBalancerName), serviceCallback); + } + + /** + * Deletes the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String loadBalancerName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, loadBalancerName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String loadBalancerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, loadBalancerName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 LoadBalancerInner object if successful. + */ + public LoadBalancerInner getByResourceGroup(String resourceGroupName, String loadBalancerName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, loadBalancerName).toBlocking().single().body(); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @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 loadBalancerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, loadBalancerName), serviceCallback); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String loadBalancerName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, loadBalancerName).map(new Func1, LoadBalancerInner>() { + @Override + public LoadBalancerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String loadBalancerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 LoadBalancerInner object if successful. + */ + public LoadBalancerInner getByResourceGroup(String resourceGroupName, String loadBalancerName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, loadBalancerName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param expand Expands referenced resources. + * @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 loadBalancerName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, loadBalancerName, expand), serviceCallback); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String loadBalancerName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, loadBalancerName, expand).map(new Func1, LoadBalancerInner>() { + @Override + public LoadBalancerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Creates or updates a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param parameters Parameters supplied to the create or update load balancer 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 LoadBalancerInner object if successful. + */ + public LoadBalancerInner createOrUpdate(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param parameters Parameters supplied to the create or update load balancer 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 createOrUpdateAsync(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, parameters), serviceCallback); + } + + /** + * Creates or updates a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param parameters Parameters supplied to the create or update load balancer operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, parameters).map(new Func1, LoadBalancerInner>() { + @Override + public LoadBalancerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param parameters Parameters supplied to the create or update load balancer operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, loadBalancerName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param parameters Parameters supplied to the create or update load balancer 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 LoadBalancerInner object if successful. + */ + public LoadBalancerInner beginCreateOrUpdate(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param parameters Parameters supplied to the create or update load balancer 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 beginCreateOrUpdateAsync(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, parameters), serviceCallback); + } + + /** + * Creates or updates a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param parameters Parameters supplied to the create or update load balancer operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, parameters).map(new Func1, LoadBalancerInner>() { + @Override + public LoadBalancerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a load balancer. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param parameters Parameters supplied to the create or update load balancer operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, loadBalancerName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 LoadBalancerInner object if successful. + */ + public LoadBalancerInner updateTags(String resourceGroupName, String loadBalancerName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName).toBlocking().single().body(); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @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 updateTagsAsync(String resourceGroupName, String loadBalancerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName), serviceCallback); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String loadBalancerName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName).map(new Func1, LoadBalancerInner>() { + @Override + public LoadBalancerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String loadBalancerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 LoadBalancerInner object if successful. + */ + public LoadBalancerInner updateTags(String resourceGroupName, String loadBalancerName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags).toBlocking().single().body(); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String loadBalancerName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags), serviceCallback); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String loadBalancerName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags).map(new Func1, LoadBalancerInner>() { + @Override + public LoadBalancerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all the load balancers in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<LoadBalancerInner> 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 all the load balancers in a subscription. + * + * @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 all the load balancers in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LoadBalancerInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the load balancers in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LoadBalancerInner> 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 all the load balancers in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<LoadBalancerInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all the load balancers in a resource group. + * + * @param resourceGroupName The name of the 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<LoadBalancerInner> 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 all the load balancers in a resource group. + * + * @param resourceGroupName The name of the 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 all the load balancers in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LoadBalancerInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the load balancers in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LoadBalancerInner> 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 all the load balancers in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<LoadBalancerInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all the load balancers in a subscription. + * + * @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<LoadBalancerInner> 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 all the load balancers in a subscription. + * + * @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 all the load balancers in a subscription. + * + * @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<LoadBalancerInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the load balancers in a subscription. + * + * @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<LoadBalancerInner> 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 all the load balancers in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<LoadBalancerInner> 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 all the load balancers in a resource group. + * + * @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<LoadBalancerInner> 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 all the load balancers in a resource group. + * + * @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 all the load balancers in a resource group. + * + * @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<LoadBalancerInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the load balancers in a resource group. + * + * @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<LoadBalancerInner> 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 all the load balancers in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<LoadBalancerInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancingRuleImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancingRuleImpl.java new file mode 100644 index 000000000000..0b3c15c5687f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancingRuleImpl.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancingRule; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.LoadDistribution; +import com.microsoft.azure.management.network.v2019_09_01.TransportProtocol; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class LoadBalancingRuleImpl extends IndexableRefreshableWrapperImpl implements LoadBalancingRule { + private final NetworkManager manager; + private String resourceGroupName; + private String loadBalancerName; + private String loadBalancingRuleName; + + LoadBalancingRuleImpl(LoadBalancingRuleInner inner, NetworkManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.loadBalancerName = IdParsingUtils.getValueFromIdByName(inner.id(), "loadBalancers"); + this.loadBalancingRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "loadBalancingRules"); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + LoadBalancerLoadBalancingRulesInner client = this.manager().inner().loadBalancerLoadBalancingRules(); + return client.getAsync(this.resourceGroupName, this.loadBalancerName, this.loadBalancingRuleName); + } + + + + @Override + public SubResource backendAddressPool() { + return this.inner().backendAddressPool(); + } + + @Override + public Integer backendPort() { + return this.inner().backendPort(); + } + + @Override + public Boolean disableOutboundSnat() { + return this.inner().disableOutboundSnat(); + } + + @Override + public Boolean enableFloatingIP() { + return this.inner().enableFloatingIP(); + } + + @Override + public Boolean enableTcpReset() { + return this.inner().enableTcpReset(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public SubResource frontendIPConfiguration() { + return this.inner().frontendIPConfiguration(); + } + + @Override + public int frontendPort() { + return this.inner().frontendPort(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Integer idleTimeoutInMinutes() { + return this.inner().idleTimeoutInMinutes(); + } + + @Override + public LoadDistribution loadDistribution() { + return this.inner().loadDistribution(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public SubResource probe() { + return this.inner().probe(); + } + + @Override + public TransportProtocol protocol() { + return this.inner().protocol(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancingRuleInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancingRuleInner.java new file mode 100644 index 000000000000..9f72fa5f806a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LoadBalancingRuleInner.java @@ -0,0 +1,398 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.TransportProtocol; +import com.microsoft.azure.management.network.v2019_09_01.LoadDistribution; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * A load balancing rule for a load balancer. + */ +@JsonFlatten +public class LoadBalancingRuleInner extends SubResource { + /** + * A reference to frontend IP addresses. + */ + @JsonProperty(value = "properties.frontendIPConfiguration") + private SubResource frontendIPConfiguration; + + /** + * A reference to a pool of DIPs. Inbound traffic is randomly load balanced + * across IPs in the backend IPs. + */ + @JsonProperty(value = "properties.backendAddressPool") + private SubResource backendAddressPool; + + /** + * The reference of the load balancer probe used by the load balancing + * rule. + */ + @JsonProperty(value = "properties.probe") + private SubResource probe; + + /** + * The reference to the transport protocol used by the load balancing rule. + * Possible values include: 'Udp', 'Tcp', 'All'. + */ + @JsonProperty(value = "properties.protocol", required = true) + private TransportProtocol protocol; + + /** + * The load distribution policy for this rule. Possible values include: + * 'Default', 'SourceIP', 'SourceIPProtocol'. + */ + @JsonProperty(value = "properties.loadDistribution") + private LoadDistribution loadDistribution; + + /** + * The port for the external endpoint. Port numbers for each rule must be + * unique within the Load Balancer. Acceptable values are between 0 and + * 65534. Note that value 0 enables "Any Port". + */ + @JsonProperty(value = "properties.frontendPort", required = true) + private int frontendPort; + + /** + * The port used for internal connections on the endpoint. Acceptable + * values are between 0 and 65535. Note that value 0 enables "Any Port". + */ + @JsonProperty(value = "properties.backendPort") + private Integer backendPort; + + /** + * The timeout for the TCP idle connection. The value can be set between 4 + * and 30 minutes. The default value is 4 minutes. This element is only + * used when the protocol is set to TCP. + */ + @JsonProperty(value = "properties.idleTimeoutInMinutes") + private Integer idleTimeoutInMinutes; + + /** + * Configures a virtual machine's endpoint for the floating IP capability + * required to configure a SQL AlwaysOn Availability Group. This setting is + * required when using the SQL AlwaysOn Availability Groups in SQL server. + * This setting can't be changed after you create the endpoint. + */ + @JsonProperty(value = "properties.enableFloatingIP") + private Boolean enableFloatingIP; + + /** + * Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + * connection termination. This element is only used when the protocol is + * set to TCP. + */ + @JsonProperty(value = "properties.enableTcpReset") + private Boolean enableTcpReset; + + /** + * Configures SNAT for the VMs in the backend pool to use the publicIP + * address specified in the frontend of the load balancing rule. + */ + @JsonProperty(value = "properties.disableOutboundSnat") + private Boolean disableOutboundSnat; + + /** + * The provisioning state of the load balancing rule resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within the set of load balancing + * rules used by the load balancer. This name can be used to access the + * resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get a reference to frontend IP addresses. + * + * @return the frontendIPConfiguration value + */ + public SubResource frontendIPConfiguration() { + return this.frontendIPConfiguration; + } + + /** + * Set a reference to frontend IP addresses. + * + * @param frontendIPConfiguration the frontendIPConfiguration value to set + * @return the LoadBalancingRuleInner object itself. + */ + public LoadBalancingRuleInner withFrontendIPConfiguration(SubResource frontendIPConfiguration) { + this.frontendIPConfiguration = frontendIPConfiguration; + return this; + } + + /** + * Get a reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. + * + * @return the backendAddressPool value + */ + public SubResource backendAddressPool() { + return this.backendAddressPool; + } + + /** + * Set a reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. + * + * @param backendAddressPool the backendAddressPool value to set + * @return the LoadBalancingRuleInner object itself. + */ + public LoadBalancingRuleInner withBackendAddressPool(SubResource backendAddressPool) { + this.backendAddressPool = backendAddressPool; + return this; + } + + /** + * Get the reference of the load balancer probe used by the load balancing rule. + * + * @return the probe value + */ + public SubResource probe() { + return this.probe; + } + + /** + * Set the reference of the load balancer probe used by the load balancing rule. + * + * @param probe the probe value to set + * @return the LoadBalancingRuleInner object itself. + */ + public LoadBalancingRuleInner withProbe(SubResource probe) { + this.probe = probe; + return this; + } + + /** + * Get the reference to the transport protocol used by the load balancing rule. Possible values include: 'Udp', 'Tcp', 'All'. + * + * @return the protocol value + */ + public TransportProtocol protocol() { + return this.protocol; + } + + /** + * Set the reference to the transport protocol used by the load balancing rule. Possible values include: 'Udp', 'Tcp', 'All'. + * + * @param protocol the protocol value to set + * @return the LoadBalancingRuleInner object itself. + */ + public LoadBalancingRuleInner withProtocol(TransportProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the load distribution policy for this rule. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'. + * + * @return the loadDistribution value + */ + public LoadDistribution loadDistribution() { + return this.loadDistribution; + } + + /** + * Set the load distribution policy for this rule. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'. + * + * @param loadDistribution the loadDistribution value to set + * @return the LoadBalancingRuleInner object itself. + */ + public LoadBalancingRuleInner withLoadDistribution(LoadDistribution loadDistribution) { + this.loadDistribution = loadDistribution; + return this; + } + + /** + * Get the port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port". + * + * @return the frontendPort value + */ + public int frontendPort() { + return this.frontendPort; + } + + /** + * Set the port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port". + * + * @param frontendPort the frontendPort value to set + * @return the LoadBalancingRuleInner object itself. + */ + public LoadBalancingRuleInner withFrontendPort(int frontendPort) { + this.frontendPort = frontendPort; + return this; + } + + /** + * Get the port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port". + * + * @return the backendPort value + */ + public Integer backendPort() { + return this.backendPort; + } + + /** + * Set the port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port". + * + * @param backendPort the backendPort value to set + * @return the LoadBalancingRuleInner object itself. + */ + public LoadBalancingRuleInner withBackendPort(Integer backendPort) { + this.backendPort = backendPort; + return this; + } + + /** + * Get the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + * + * @return the idleTimeoutInMinutes value + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set + * @return the LoadBalancingRuleInner object itself. + */ + public LoadBalancingRuleInner withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + + /** + * Get configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + * + * @return the enableFloatingIP value + */ + public Boolean enableFloatingIP() { + return this.enableFloatingIP; + } + + /** + * Set configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + * + * @param enableFloatingIP the enableFloatingIP value to set + * @return the LoadBalancingRuleInner object itself. + */ + public LoadBalancingRuleInner withEnableFloatingIP(Boolean enableFloatingIP) { + this.enableFloatingIP = enableFloatingIP; + return this; + } + + /** + * Get receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + * + * @return the enableTcpReset value + */ + public Boolean enableTcpReset() { + return this.enableTcpReset; + } + + /** + * Set receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + * + * @param enableTcpReset the enableTcpReset value to set + * @return the LoadBalancingRuleInner object itself. + */ + public LoadBalancingRuleInner withEnableTcpReset(Boolean enableTcpReset) { + this.enableTcpReset = enableTcpReset; + return this; + } + + /** + * Get configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. + * + * @return the disableOutboundSnat value + */ + public Boolean disableOutboundSnat() { + return this.disableOutboundSnat; + } + + /** + * Set configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. + * + * @param disableOutboundSnat the disableOutboundSnat value to set + * @return the LoadBalancingRuleInner object itself. + */ + public LoadBalancingRuleInner withDisableOutboundSnat(Boolean disableOutboundSnat) { + this.disableOutboundSnat = disableOutboundSnat; + return this; + } + + /** + * Get the provisioning state of the load balancing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource. + * + * @param name the name value to set + * @return the LoadBalancingRuleInner object itself. + */ + public LoadBalancingRuleInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewayImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewayImpl.java new file mode 100644 index 000000000000..9b8958639eeb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewayImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.LocalNetworkGateway; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.AddressSpace; +import com.microsoft.azure.management.network.v2019_09_01.BgpSettings; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class LocalNetworkGatewayImpl extends GroupableResourceCoreImpl implements LocalNetworkGateway, LocalNetworkGateway.Definition, LocalNetworkGateway.Update { + LocalNetworkGatewayImpl(String name, LocalNetworkGatewayInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + LocalNetworkGatewaysInner client = this.manager().inner().localNetworkGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + LocalNetworkGatewaysInner client = this.manager().inner().localNetworkGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + LocalNetworkGatewaysInner client = this.manager().inner().localNetworkGateways(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public BgpSettings bgpSettings() { + return this.inner().bgpSettings(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String gatewayIpAddress() { + return this.inner().gatewayIpAddress(); + } + + @Override + public AddressSpace localNetworkAddressSpace() { + return this.inner().localNetworkAddressSpace(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public LocalNetworkGatewayImpl withBgpSettings(BgpSettings bgpSettings) { + this.inner().withBgpSettings(bgpSettings); + return this; + } + + @Override + public LocalNetworkGatewayImpl withGatewayIpAddress(String gatewayIpAddress) { + this.inner().withGatewayIpAddress(gatewayIpAddress); + return this; + } + + @Override + public LocalNetworkGatewayImpl withLocalNetworkAddressSpace(AddressSpace localNetworkAddressSpace) { + this.inner().withLocalNetworkAddressSpace(localNetworkAddressSpace); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewayInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewayInner.java new file mode 100644 index 000000000000..fec1c6532102 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewayInner.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.AddressSpace; +import com.microsoft.azure.management.network.v2019_09_01.BgpSettings; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * A common class for general resource information. + */ +@JsonFlatten +@SkipParentValidation +public class LocalNetworkGatewayInner extends Resource { + /** + * Local network site address space. + */ + @JsonProperty(value = "properties.localNetworkAddressSpace") + private AddressSpace localNetworkAddressSpace; + + /** + * IP address of local network gateway. + */ + @JsonProperty(value = "properties.gatewayIpAddress") + private String gatewayIpAddress; + + /** + * Local network gateway's BGP speaker settings. + */ + @JsonProperty(value = "properties.bgpSettings") + private BgpSettings bgpSettings; + + /** + * The resource GUID property of the local network gateway resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the local network gateway resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get local network site address space. + * + * @return the localNetworkAddressSpace value + */ + public AddressSpace localNetworkAddressSpace() { + return this.localNetworkAddressSpace; + } + + /** + * Set local network site address space. + * + * @param localNetworkAddressSpace the localNetworkAddressSpace value to set + * @return the LocalNetworkGatewayInner object itself. + */ + public LocalNetworkGatewayInner withLocalNetworkAddressSpace(AddressSpace localNetworkAddressSpace) { + this.localNetworkAddressSpace = localNetworkAddressSpace; + return this; + } + + /** + * Get iP address of local network gateway. + * + * @return the gatewayIpAddress value + */ + public String gatewayIpAddress() { + return this.gatewayIpAddress; + } + + /** + * Set iP address of local network gateway. + * + * @param gatewayIpAddress the gatewayIpAddress value to set + * @return the LocalNetworkGatewayInner object itself. + */ + public LocalNetworkGatewayInner withGatewayIpAddress(String gatewayIpAddress) { + this.gatewayIpAddress = gatewayIpAddress; + return this; + } + + /** + * Get local network gateway's BGP speaker settings. + * + * @return the bgpSettings value + */ + public BgpSettings bgpSettings() { + return this.bgpSettings; + } + + /** + * Set local network gateway's BGP speaker settings. + * + * @param bgpSettings the bgpSettings value to set + * @return the LocalNetworkGatewayInner object itself. + */ + public LocalNetworkGatewayInner withBgpSettings(BgpSettings bgpSettings) { + this.bgpSettings = bgpSettings; + return this; + } + + /** + * Get the resource GUID property of the local network gateway resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the local network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the LocalNetworkGatewayInner object itself. + */ + public LocalNetworkGatewayInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewaysImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewaysImpl.java new file mode 100644 index 000000000000..c99ea34a8c5d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewaysImpl.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. + * def + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.LocalNetworkGateways; +import com.microsoft.azure.management.network.v2019_09_01.LocalNetworkGateway; +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; + +class LocalNetworkGatewaysImpl extends GroupableResourcesCoreImpl implements LocalNetworkGateways { + protected LocalNetworkGatewaysImpl(NetworkManager manager) { + super(manager.inner().localNetworkGateways(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + LocalNetworkGatewaysInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + LocalNetworkGatewaysInner 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) { + LocalNetworkGatewaysInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + LocalNetworkGatewaysInner 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 LocalNetworkGateway call(LocalNetworkGatewayInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public LocalNetworkGatewayImpl define(String name) { + return wrapModel(name); + } + + @Override + protected LocalNetworkGatewayImpl wrapModel(LocalNetworkGatewayInner inner) { + return new LocalNetworkGatewayImpl(inner.name(), inner, manager()); + } + + @Override + protected LocalNetworkGatewayImpl wrapModel(String name) { + return new LocalNetworkGatewayImpl(name, new LocalNetworkGatewayInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewaysInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewaysInner.java new file mode 100644 index 000000000000..5deb58aa5e34 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocalNetworkGatewaysInner.java @@ -0,0 +1,901 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 LocalNetworkGateways. + */ +public class LocalNetworkGatewaysInner implements InnerSupportsGet, InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private LocalNetworkGatewaysService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of LocalNetworkGatewaysInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LocalNetworkGatewaysInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(LocalNetworkGatewaysService.class); + this.client = client; + } + + /** + * The interface defining all the services for LocalNetworkGateways to be + * used by Retrofit to perform actually REST calls. + */ + interface LocalNetworkGatewaysService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.LocalNetworkGateways createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("localNetworkGatewayName") String localNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body LocalNetworkGatewayInner 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.network.v2019_09_01.LocalNetworkGateways beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("localNetworkGatewayName") String localNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body LocalNetworkGatewayInner 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.network.v2019_09_01.LocalNetworkGateways getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("localNetworkGatewayName") String localNetworkGatewayName, @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.network.v2019_09_01.LocalNetworkGateways delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("localNetworkGatewayName") String localNetworkGatewayName, @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.network.v2019_09_01.LocalNetworkGateways beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("localNetworkGatewayName") String localNetworkGatewayName, @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.network.v2019_09_01.LocalNetworkGateways updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("localNetworkGatewayName") String localNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.LocalNetworkGateways listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.LocalNetworkGateways listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a local network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param parameters Parameters supplied to the create or update local network gateway 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 LocalNetworkGatewayInner object if successful. + */ + public LocalNetworkGatewayInner createOrUpdate(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a local network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param parameters Parameters supplied to the create or update local network gateway 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 createOrUpdateAsync(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, parameters), serviceCallback); + } + + /** + * Creates or updates a local network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param parameters Parameters supplied to the create or update local network gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, parameters).map(new Func1, LocalNetworkGatewayInner>() { + @Override + public LocalNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a local network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param parameters Parameters supplied to the create or update local network gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (localNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter localNetworkGatewayName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a local network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param parameters Parameters supplied to the create or update local network gateway 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 LocalNetworkGatewayInner object if successful. + */ + public LocalNetworkGatewayInner beginCreateOrUpdate(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a local network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param parameters Parameters supplied to the create or update local network gateway 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 beginCreateOrUpdateAsync(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, parameters), serviceCallback); + } + + /** + * Creates or updates a local network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param parameters Parameters supplied to the create or update local network gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LocalNetworkGatewayInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, parameters).map(new Func1, LocalNetworkGatewayInner>() { + @Override + public LocalNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a local network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param parameters Parameters supplied to the create or update local network gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LocalNetworkGatewayInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (localNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter localNetworkGatewayName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 local network gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 LocalNetworkGatewayInner object if successful. + */ + public LocalNetworkGatewayInner getByResourceGroup(String resourceGroupName, String localNetworkGatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Gets the specified local network gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @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 localNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName), serviceCallback); + } + + /** + * Gets the specified local network gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LocalNetworkGatewayInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String localNetworkGatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).map(new Func1, LocalNetworkGatewayInner>() { + @Override + public LocalNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified local network gateway in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LocalNetworkGatewayInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (localNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter localNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), 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); + } + + /** + * Deletes the specified local network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 localNetworkGatewayName) { + deleteWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Deletes the specified local network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @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 localNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName), serviceCallback); + } + + /** + * Deletes the specified local network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String localNetworkGatewayName) { + return deleteWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified local network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (localNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter localNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified local network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 localNetworkGatewayName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Deletes the specified local network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @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 localNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName), serviceCallback); + } + + /** + * Deletes the specified local network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String localNetworkGatewayName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified local network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (localNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter localNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), 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); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 LocalNetworkGatewayInner object if successful. + */ + public LocalNetworkGatewayInner updateTags(String resourceGroupName, String localNetworkGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @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 updateTagsAsync(String resourceGroupName, String localNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName), serviceCallback); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LocalNetworkGatewayInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String localNetworkGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).map(new Func1, LocalNetworkGatewayInner>() { + @Override + public LocalNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LocalNetworkGatewayInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (localNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter localNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 LocalNetworkGatewayInner object if successful. + */ + public LocalNetworkGatewayInner updateTags(String resourceGroupName, String localNetworkGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).toBlocking().single().body(); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags), serviceCallback); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LocalNetworkGatewayInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).map(new Func1, LocalNetworkGatewayInner>() { + @Override + public LocalNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LocalNetworkGatewayInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (localNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter localNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all the local network gateways in a resource group. + * + * @param resourceGroupName The name of the 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<LocalNetworkGatewayInner> 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 all the local network gateways in a resource group. + * + * @param resourceGroupName The name of the 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 all the local network gateways in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LocalNetworkGatewayInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the local network gateways in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LocalNetworkGatewayInner> 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 all the local network gateways in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<LocalNetworkGatewayInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all the local network gateways in a resource group. + * + * @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<LocalNetworkGatewayInner> 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 all the local network gateways in a resource group. + * + * @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 all the local network gateways in a resource group. + * + * @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<LocalNetworkGatewayInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the local network gateways in a resource group. + * + * @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<LocalNetworkGatewayInner> 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 all the local network gateways in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<LocalNetworkGatewayInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocationAvailableDelegationImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocationAvailableDelegationImpl.java new file mode 100644 index 000000000000..13433652e315 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocationAvailableDelegationImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.LocationAvailableDelegation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; + +class LocationAvailableDelegationImpl extends WrapperImpl implements LocationAvailableDelegation { + private final NetworkManager manager; + + LocationAvailableDelegationImpl(AvailableDelegationInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public List actions() { + return this.inner().actions(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String serviceName() { + return this.inner().serviceName(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocationAvailableDelegationModelImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocationAvailableDelegationModelImpl.java new file mode 100644 index 000000000000..0c9f7046067b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/LocationAvailableDelegationModelImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.LocationAvailableDelegationModel; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; + +class LocationAvailableDelegationModelImpl extends WrapperImpl implements LocationAvailableDelegationModel { + private final NetworkManager manager; + + LocationAvailableDelegationModelImpl(AvailableDelegationInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public List actions() { + return this.inner().actions(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String serviceName() { + return this.inner().serviceName(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewayImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewayImpl.java new file mode 100644 index 000000000000..4e4aab34a3d3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewayImpl.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.NatGateway; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.NatGatewaySku; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class NatGatewayImpl extends GroupableResourceCoreImpl implements NatGateway, NatGateway.Definition, NatGateway.Update { + NatGatewayImpl(String name, NatGatewayInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + NatGatewaysInner client = this.manager().inner().natGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + NatGatewaysInner client = this.manager().inner().natGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + NatGatewaysInner client = this.manager().inner().natGateways(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public Integer idleTimeoutInMinutes() { + return this.inner().idleTimeoutInMinutes(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public List publicIpAddresses() { + return this.inner().publicIpAddresses(); + } + + @Override + public List publicIpPrefixes() { + return this.inner().publicIpPrefixes(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public NatGatewaySku sku() { + return this.inner().sku(); + } + + @Override + public List subnets() { + return this.inner().subnets(); + } + + @Override + public List zones() { + return this.inner().zones(); + } + + @Override + public NatGatewayImpl withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.inner().withIdleTimeoutInMinutes(idleTimeoutInMinutes); + return this; + } + + @Override + public NatGatewayImpl withPublicIpAddresses(List publicIpAddresses) { + this.inner().withPublicIpAddresses(publicIpAddresses); + return this; + } + + @Override + public NatGatewayImpl withPublicIpPrefixes(List publicIpPrefixes) { + this.inner().withPublicIpPrefixes(publicIpPrefixes); + return this; + } + + @Override + public NatGatewayImpl withSku(NatGatewaySku sku) { + this.inner().withSku(sku); + return this; + } + + @Override + public NatGatewayImpl withZones(List zones) { + this.inner().withZones(zones); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewayInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewayInner.java new file mode 100644 index 000000000000..acc7861d1d1f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewayInner.java @@ -0,0 +1,245 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.NatGatewaySku; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Nat Gateway resource. + */ +@JsonFlatten +@SkipParentValidation +public class NatGatewayInner extends Resource { + /** + * The nat gateway SKU. + */ + @JsonProperty(value = "sku") + private NatGatewaySku sku; + + /** + * The idle timeout of the nat gateway. + */ + @JsonProperty(value = "properties.idleTimeoutInMinutes") + private Integer idleTimeoutInMinutes; + + /** + * An array of public ip addresses associated with the nat gateway + * resource. + */ + @JsonProperty(value = "properties.publicIpAddresses") + private List publicIpAddresses; + + /** + * An array of public ip prefixes associated with the nat gateway resource. + */ + @JsonProperty(value = "properties.publicIpPrefixes") + private List publicIpPrefixes; + + /** + * An array of references to the subnets using this nat gateway resource. + */ + @JsonProperty(value = "properties.subnets", access = JsonProperty.Access.WRITE_ONLY) + private List subnets; + + /** + * The resource GUID property of the NAT gateway resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the NAT gateway resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A list of availability zones denoting the zone in which Nat Gateway + * should be deployed. + */ + @JsonProperty(value = "zones") + private List zones; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the nat gateway SKU. + * + * @return the sku value + */ + public NatGatewaySku sku() { + return this.sku; + } + + /** + * Set the nat gateway SKU. + * + * @param sku the sku value to set + * @return the NatGatewayInner object itself. + */ + public NatGatewayInner withSku(NatGatewaySku sku) { + this.sku = sku; + return this; + } + + /** + * Get the idle timeout of the nat gateway. + * + * @return the idleTimeoutInMinutes value + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set the idle timeout of the nat gateway. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set + * @return the NatGatewayInner object itself. + */ + public NatGatewayInner withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + + /** + * Get an array of public ip addresses associated with the nat gateway resource. + * + * @return the publicIpAddresses value + */ + public List publicIpAddresses() { + return this.publicIpAddresses; + } + + /** + * Set an array of public ip addresses associated with the nat gateway resource. + * + * @param publicIpAddresses the publicIpAddresses value to set + * @return the NatGatewayInner object itself. + */ + public NatGatewayInner withPublicIpAddresses(List publicIpAddresses) { + this.publicIpAddresses = publicIpAddresses; + return this; + } + + /** + * Get an array of public ip prefixes associated with the nat gateway resource. + * + * @return the publicIpPrefixes value + */ + public List publicIpPrefixes() { + return this.publicIpPrefixes; + } + + /** + * Set an array of public ip prefixes associated with the nat gateway resource. + * + * @param publicIpPrefixes the publicIpPrefixes value to set + * @return the NatGatewayInner object itself. + */ + public NatGatewayInner withPublicIpPrefixes(List publicIpPrefixes) { + this.publicIpPrefixes = publicIpPrefixes; + return this; + } + + /** + * Get an array of references to the subnets using this nat gateway resource. + * + * @return the subnets value + */ + public List subnets() { + return this.subnets; + } + + /** + * Get the resource GUID property of the NAT gateway resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the NAT gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a list of availability zones denoting the zone in which Nat Gateway should be deployed. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set a list of availability zones denoting the zone in which Nat Gateway should be deployed. + * + * @param zones the zones value to set + * @return the NatGatewayInner object itself. + */ + public NatGatewayInner withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the NatGatewayInner object itself. + */ + public NatGatewayInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewaysImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewaysImpl.java new file mode 100644 index 000000000000..c7d3d6aea126 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewaysImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.NatGateways; +import com.microsoft.azure.management.network.v2019_09_01.NatGateway; +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; + +class NatGatewaysImpl extends GroupableResourcesCoreImpl implements NatGateways { + protected NatGatewaysImpl(NetworkManager manager) { + super(manager.inner().natGateways(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + NatGatewaysInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + NatGatewaysInner 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) { + NatGatewaysInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + NatGatewaysInner 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 NatGateway call(NatGatewayInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + NatGatewaysInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + NatGatewaysInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public NatGateway call(NatGatewayInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public NatGatewayImpl define(String name) { + return wrapModel(name); + } + + @Override + protected NatGatewayImpl wrapModel(NatGatewayInner inner) { + return new NatGatewayImpl(inner.name(), inner, manager()); + } + + @Override + protected NatGatewayImpl wrapModel(String name) { + return new NatGatewayImpl(name, new NatGatewayInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewaysInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewaysInner.java new file mode 100644 index 000000000000..82a20ebb34a4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewaysInner.java @@ -0,0 +1,1209 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 NatGateways. + */ +public class NatGatewaysInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private NatGatewaysService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of NatGatewaysInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public NatGatewaysInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(NatGatewaysService.class); + this.client = client; + } + + /** + * The interface defining all the services for NatGateways to be + * used by Retrofit to perform actually REST calls. + */ + interface NatGatewaysService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NatGateways delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("natGatewayName") String natGatewayName, @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.network.v2019_09_01.NatGateways beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("natGatewayName") String natGatewayName, @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.network.v2019_09_01.NatGateways getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("natGatewayName") String natGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.NatGateways createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("natGatewayName") String natGatewayName, @Path("subscriptionId") String subscriptionId, @Body NatGatewayInner 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.network.v2019_09_01.NatGateways beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("natGatewayName") String natGatewayName, @Path("subscriptionId") String subscriptionId, @Body NatGatewayInner 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.network.v2019_09_01.NatGateways updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("natGatewayName") String natGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NatGateways list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways") + Observable> list(@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.network.v2019_09_01.NatGateways listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.NatGateways 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.network.v2019_09_01.NatGateways listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 natGatewayName) { + deleteWithServiceResponseAsync(resourceGroupName, natGatewayName).toBlocking().last().body(); + } + + /** + * Deletes the specified nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @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 natGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, natGatewayName), serviceCallback); + } + + /** + * Deletes the specified nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String natGatewayName) { + return deleteWithServiceResponseAsync(resourceGroupName, natGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String natGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (natGatewayName == null) { + throw new IllegalArgumentException("Parameter natGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, natGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 natGatewayName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, natGatewayName).toBlocking().single().body(); + } + + /** + * Deletes the specified nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @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 natGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, natGatewayName), serviceCallback); + } + + /** + * Deletes the specified nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String natGatewayName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, natGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String natGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (natGatewayName == null) { + throw new IllegalArgumentException("Parameter natGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, natGatewayName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified nat gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NatGatewayInner object if successful. + */ + public NatGatewayInner getByResourceGroup(String resourceGroupName, String natGatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, natGatewayName).toBlocking().single().body(); + } + + /** + * Gets the specified nat gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @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 natGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, natGatewayName), serviceCallback); + } + + /** + * Gets the specified nat gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NatGatewayInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String natGatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, natGatewayName).map(new Func1, NatGatewayInner>() { + @Override + public NatGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified nat gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NatGatewayInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String natGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (natGatewayName == null) { + throw new IllegalArgumentException("Parameter natGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, natGatewayName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified nat gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NatGatewayInner object if successful. + */ + public NatGatewayInner getByResourceGroup(String resourceGroupName, String natGatewayName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, natGatewayName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified nat gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param expand Expands referenced resources. + * @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 natGatewayName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, natGatewayName, expand), serviceCallback); + } + + /** + * Gets the specified nat gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NatGatewayInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String natGatewayName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, natGatewayName, expand).map(new Func1, NatGatewayInner>() { + @Override + public NatGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified nat gateway in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NatGatewayInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String natGatewayName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (natGatewayName == null) { + throw new IllegalArgumentException("Parameter natGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, natGatewayName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Creates or updates a nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param parameters Parameters supplied to the create or update nat gateway 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 NatGatewayInner object if successful. + */ + public NatGatewayInner createOrUpdate(String resourceGroupName, String natGatewayName, NatGatewayInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, natGatewayName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param parameters Parameters supplied to the create or update nat gateway 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 createOrUpdateAsync(String resourceGroupName, String natGatewayName, NatGatewayInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, natGatewayName, parameters), serviceCallback); + } + + /** + * Creates or updates a nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param parameters Parameters supplied to the create or update nat gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String natGatewayName, NatGatewayInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, natGatewayName, parameters).map(new Func1, NatGatewayInner>() { + @Override + public NatGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param parameters Parameters supplied to the create or update nat gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String natGatewayName, NatGatewayInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (natGatewayName == null) { + throw new IllegalArgumentException("Parameter natGatewayName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, natGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param parameters Parameters supplied to the create or update nat gateway 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 NatGatewayInner object if successful. + */ + public NatGatewayInner beginCreateOrUpdate(String resourceGroupName, String natGatewayName, NatGatewayInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, natGatewayName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param parameters Parameters supplied to the create or update nat gateway 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 beginCreateOrUpdateAsync(String resourceGroupName, String natGatewayName, NatGatewayInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, natGatewayName, parameters), serviceCallback); + } + + /** + * Creates or updates a nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param parameters Parameters supplied to the create or update nat gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NatGatewayInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String natGatewayName, NatGatewayInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, natGatewayName, parameters).map(new Func1, NatGatewayInner>() { + @Override + public NatGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a nat gateway. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param parameters Parameters supplied to the create or update nat gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NatGatewayInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String natGatewayName, NatGatewayInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (natGatewayName == null) { + throw new IllegalArgumentException("Parameter natGatewayName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, natGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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); + } + + /** + * Updates nat gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NatGatewayInner object if successful. + */ + public NatGatewayInner updateTags(String resourceGroupName, String natGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, natGatewayName).toBlocking().single().body(); + } + + /** + * Updates nat gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @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 updateTagsAsync(String resourceGroupName, String natGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, natGatewayName), serviceCallback); + } + + /** + * Updates nat gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NatGatewayInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String natGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, natGatewayName).map(new Func1, NatGatewayInner>() { + @Override + public NatGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates nat gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NatGatewayInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String natGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (natGatewayName == null) { + throw new IllegalArgumentException("Parameter natGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, natGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates nat gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NatGatewayInner object if successful. + */ + public NatGatewayInner updateTags(String resourceGroupName, String natGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, natGatewayName, tags).toBlocking().single().body(); + } + + /** + * Updates nat gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String natGatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, natGatewayName, tags), serviceCallback); + } + + /** + * Updates nat gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NatGatewayInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String natGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, natGatewayName, tags).map(new Func1, NatGatewayInner>() { + @Override + public NatGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates nat gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param natGatewayName The name of the nat gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NatGatewayInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String natGatewayName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (natGatewayName == null) { + throw new IllegalArgumentException("Parameter natGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, natGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all the Nat Gateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<NatGatewayInner> 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 all the Nat Gateways in a subscription. + * + * @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 all the Nat Gateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NatGatewayInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the Nat Gateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NatGatewayInner> 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 all the Nat Gateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NatGatewayInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all nat gateways in a resource group. + * + * @param resourceGroupName The name of the 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<NatGatewayInner> 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 all nat gateways in a resource group. + * + * @param resourceGroupName The name of the 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 all nat gateways in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NatGatewayInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all nat gateways in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NatGatewayInner> 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 all nat gateways in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NatGatewayInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all the Nat Gateways in a subscription. + * + * @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<NatGatewayInner> 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 all the Nat Gateways in a subscription. + * + * @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 all the Nat Gateways in a subscription. + * + * @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<NatGatewayInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the Nat Gateways in a subscription. + * + * @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<NatGatewayInner> 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 all the Nat Gateways in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NatGatewayInner> 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 all nat gateways in a resource group. + * + * @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<NatGatewayInner> 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 all nat gateways in a resource group. + * + * @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 all nat gateways in a resource group. + * + * @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<NatGatewayInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all nat gateways in a resource group. + * + * @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<NatGatewayInner> 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 all nat gateways in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NatGatewayInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkConfigurationDiagnosticResponseImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkConfigurationDiagnosticResponseImpl.java new file mode 100644 index 000000000000..52e9685adae0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkConfigurationDiagnosticResponseImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.NetworkConfigurationDiagnosticResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.NetworkConfigurationDiagnosticResult; + +class NetworkConfigurationDiagnosticResponseImpl extends WrapperImpl implements NetworkConfigurationDiagnosticResponse { + private final NetworkManager manager; + NetworkConfigurationDiagnosticResponseImpl(NetworkConfigurationDiagnosticResponseInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List results() { + return this.inner().results(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkConfigurationDiagnosticResponseInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkConfigurationDiagnosticResponseInner.java new file mode 100644 index 000000000000..9b8ecc96c533 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkConfigurationDiagnosticResponseInner.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.NetworkConfigurationDiagnosticResult; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results of network configuration diagnostic on the target resource. + */ +public class NetworkConfigurationDiagnosticResponseInner { + /** + * List of network configuration diagnostic results. + */ + @JsonProperty(value = "results", access = JsonProperty.Access.WRITE_ONLY) + private List results; + + /** + * Get list of network configuration diagnostic results. + * + * @return the results value + */ + public List results() { + return this.results; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceIPConfigurationInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceIPConfigurationInner.java new file mode 100644 index 000000000000..df29d9ca273e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceIPConfigurationInner.java @@ -0,0 +1,387 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendAddressPool; +import com.microsoft.azure.management.network.v2019_09_01.IPAllocationMethod; +import com.microsoft.azure.management.network.v2019_09_01.IPVersion; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * IPConfiguration in a network interface. + */ +@JsonFlatten +public class NetworkInterfaceIPConfigurationInner extends SubResource { + /** + * The reference to Virtual Network Taps. + */ + @JsonProperty(value = "properties.virtualNetworkTaps") + private List virtualNetworkTaps; + + /** + * The reference of ApplicationGatewayBackendAddressPool resource. + */ + @JsonProperty(value = "properties.applicationGatewayBackendAddressPools") + private List applicationGatewayBackendAddressPools; + + /** + * The reference of LoadBalancerBackendAddressPool resource. + */ + @JsonProperty(value = "properties.loadBalancerBackendAddressPools") + private List loadBalancerBackendAddressPools; + + /** + * A list of references of LoadBalancerInboundNatRules. + */ + @JsonProperty(value = "properties.loadBalancerInboundNatRules") + private List loadBalancerInboundNatRules; + + /** + * Private IP address of the IP configuration. + */ + @JsonProperty(value = "properties.privateIPAddress") + private String privateIPAddress; + + /** + * The private IP address allocation method. Possible values include: + * 'Static', 'Dynamic'. + */ + @JsonProperty(value = "properties.privateIPAllocationMethod") + private IPAllocationMethod privateIPAllocationMethod; + + /** + * Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. + * Possible values include: 'IPv4', 'IPv6'. + */ + @JsonProperty(value = "properties.privateIPAddressVersion") + private IPVersion privateIPAddressVersion; + + /** + * Subnet bound to the IP configuration. + */ + @JsonProperty(value = "properties.subnet") + private SubnetInner subnet; + + /** + * Whether this is a primary customer address on the network interface. + */ + @JsonProperty(value = "properties.primary") + private Boolean primary; + + /** + * Public IP address bound to the IP configuration. + */ + @JsonProperty(value = "properties.publicIPAddress") + private PublicIPAddressInner publicIPAddress; + + /** + * Application security groups in which the IP configuration is included. + */ + @JsonProperty(value = "properties.applicationSecurityGroups") + private List applicationSecurityGroups; + + /** + * The provisioning state of the network interface IP configuration. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * PrivateLinkConnection properties for the network interface. + */ + @JsonProperty(value = "properties.privateLinkConnectionProperties", access = JsonProperty.Access.WRITE_ONLY) + private NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnectionProperties; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the reference to Virtual Network Taps. + * + * @return the virtualNetworkTaps value + */ + public List virtualNetworkTaps() { + return this.virtualNetworkTaps; + } + + /** + * Set the reference to Virtual Network Taps. + * + * @param virtualNetworkTaps the virtualNetworkTaps value to set + * @return the NetworkInterfaceIPConfigurationInner object itself. + */ + public NetworkInterfaceIPConfigurationInner withVirtualNetworkTaps(List virtualNetworkTaps) { + this.virtualNetworkTaps = virtualNetworkTaps; + return this; + } + + /** + * Get the reference of ApplicationGatewayBackendAddressPool resource. + * + * @return the applicationGatewayBackendAddressPools value + */ + public List applicationGatewayBackendAddressPools() { + return this.applicationGatewayBackendAddressPools; + } + + /** + * Set the reference of ApplicationGatewayBackendAddressPool resource. + * + * @param applicationGatewayBackendAddressPools the applicationGatewayBackendAddressPools value to set + * @return the NetworkInterfaceIPConfigurationInner object itself. + */ + public NetworkInterfaceIPConfigurationInner withApplicationGatewayBackendAddressPools(List applicationGatewayBackendAddressPools) { + this.applicationGatewayBackendAddressPools = applicationGatewayBackendAddressPools; + return this; + } + + /** + * Get the reference of LoadBalancerBackendAddressPool resource. + * + * @return the loadBalancerBackendAddressPools value + */ + public List loadBalancerBackendAddressPools() { + return this.loadBalancerBackendAddressPools; + } + + /** + * Set the reference of LoadBalancerBackendAddressPool resource. + * + * @param loadBalancerBackendAddressPools the loadBalancerBackendAddressPools value to set + * @return the NetworkInterfaceIPConfigurationInner object itself. + */ + public NetworkInterfaceIPConfigurationInner withLoadBalancerBackendAddressPools(List loadBalancerBackendAddressPools) { + this.loadBalancerBackendAddressPools = loadBalancerBackendAddressPools; + return this; + } + + /** + * Get a list of references of LoadBalancerInboundNatRules. + * + * @return the loadBalancerInboundNatRules value + */ + public List loadBalancerInboundNatRules() { + return this.loadBalancerInboundNatRules; + } + + /** + * Set a list of references of LoadBalancerInboundNatRules. + * + * @param loadBalancerInboundNatRules the loadBalancerInboundNatRules value to set + * @return the NetworkInterfaceIPConfigurationInner object itself. + */ + public NetworkInterfaceIPConfigurationInner withLoadBalancerInboundNatRules(List loadBalancerInboundNatRules) { + this.loadBalancerInboundNatRules = loadBalancerInboundNatRules; + return this; + } + + /** + * Get private IP address of the IP configuration. + * + * @return the privateIPAddress value + */ + public String privateIPAddress() { + return this.privateIPAddress; + } + + /** + * Set private IP address of the IP configuration. + * + * @param privateIPAddress the privateIPAddress value to set + * @return the NetworkInterfaceIPConfigurationInner object itself. + */ + public NetworkInterfaceIPConfigurationInner withPrivateIPAddress(String privateIPAddress) { + this.privateIPAddress = privateIPAddress; + return this; + } + + /** + * Get the private IP address allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @return the privateIPAllocationMethod value + */ + public IPAllocationMethod privateIPAllocationMethod() { + return this.privateIPAllocationMethod; + } + + /** + * Set the private IP address allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @param privateIPAllocationMethod the privateIPAllocationMethod value to set + * @return the NetworkInterfaceIPConfigurationInner object itself. + */ + public NetworkInterfaceIPConfigurationInner withPrivateIPAllocationMethod(IPAllocationMethod privateIPAllocationMethod) { + this.privateIPAllocationMethod = privateIPAllocationMethod; + return this; + } + + /** + * Get whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'. + * + * @return the privateIPAddressVersion value + */ + public IPVersion privateIPAddressVersion() { + return this.privateIPAddressVersion; + } + + /** + * Set whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'. + * + * @param privateIPAddressVersion the privateIPAddressVersion value to set + * @return the NetworkInterfaceIPConfigurationInner object itself. + */ + public NetworkInterfaceIPConfigurationInner withPrivateIPAddressVersion(IPVersion privateIPAddressVersion) { + this.privateIPAddressVersion = privateIPAddressVersion; + return this; + } + + /** + * Get subnet bound to the IP configuration. + * + * @return the subnet value + */ + public SubnetInner subnet() { + return this.subnet; + } + + /** + * Set subnet bound to the IP configuration. + * + * @param subnet the subnet value to set + * @return the NetworkInterfaceIPConfigurationInner object itself. + */ + public NetworkInterfaceIPConfigurationInner withSubnet(SubnetInner subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get whether this is a primary customer address on the network interface. + * + * @return the primary value + */ + public Boolean primary() { + return this.primary; + } + + /** + * Set whether this is a primary customer address on the network interface. + * + * @param primary the primary value to set + * @return the NetworkInterfaceIPConfigurationInner object itself. + */ + public NetworkInterfaceIPConfigurationInner withPrimary(Boolean primary) { + this.primary = primary; + return this; + } + + /** + * Get public IP address bound to the IP configuration. + * + * @return the publicIPAddress value + */ + public PublicIPAddressInner publicIPAddress() { + return this.publicIPAddress; + } + + /** + * Set public IP address bound to the IP configuration. + * + * @param publicIPAddress the publicIPAddress value to set + * @return the NetworkInterfaceIPConfigurationInner object itself. + */ + public NetworkInterfaceIPConfigurationInner withPublicIPAddress(PublicIPAddressInner publicIPAddress) { + this.publicIPAddress = publicIPAddress; + return this; + } + + /** + * Get application security groups in which the IP configuration is included. + * + * @return the applicationSecurityGroups value + */ + public List applicationSecurityGroups() { + return this.applicationSecurityGroups; + } + + /** + * Set application security groups in which the IP configuration is included. + * + * @param applicationSecurityGroups the applicationSecurityGroups value to set + * @return the NetworkInterfaceIPConfigurationInner object itself. + */ + public NetworkInterfaceIPConfigurationInner withApplicationSecurityGroups(List applicationSecurityGroups) { + this.applicationSecurityGroups = applicationSecurityGroups; + return this; + } + + /** + * Get the provisioning state of the network interface IP configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get privateLinkConnection properties for the network interface. + * + * @return the privateLinkConnectionProperties value + */ + public NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnectionProperties() { + return this.privateLinkConnectionProperties; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the NetworkInterfaceIPConfigurationInner object itself. + */ + public NetworkInterfaceIPConfigurationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceIPConfigurationsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceIPConfigurationsImpl.java new file mode 100644 index 000000000000..23c93948a408 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceIPConfigurationsImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceIPConfigurations; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceNetworkInterfaceIPConfiguration; + +class NetworkInterfaceIPConfigurationsImpl extends WrapperImpl implements NetworkInterfaceIPConfigurations { + private final NetworkManager manager; + + NetworkInterfaceIPConfigurationsImpl(NetworkManager manager) { + super(manager.inner().networkInterfaceIPConfigurations()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private NetworkInterfaceNetworkInterfaceIPConfigurationImpl wrapModel(NetworkInterfaceIPConfigurationInner inner) { + return new NetworkInterfaceNetworkInterfaceIPConfigurationImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String networkInterfaceName) { + NetworkInterfaceIPConfigurationsInner client = this.inner(); + return client.listAsync(resourceGroupName, networkInterfaceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public NetworkInterfaceNetworkInterfaceIPConfiguration call(NetworkInterfaceIPConfigurationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String networkInterfaceName, String ipConfigurationName) { + NetworkInterfaceIPConfigurationsInner client = this.inner(); + return client.getAsync(resourceGroupName, networkInterfaceName, ipConfigurationName) + .flatMap(new Func1>() { + @Override + public Observable call(NetworkInterfaceIPConfigurationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((NetworkInterfaceNetworkInterfaceIPConfiguration)wrapModel(inner)); + } + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceIPConfigurationsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceIPConfigurationsInner.java new file mode 100644 index 000000000000..ce69701c13e9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceIPConfigurationsInner.java @@ -0,0 +1,397 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in NetworkInterfaceIPConfigurations. + */ +public class NetworkInterfaceIPConfigurationsInner { + /** The Retrofit service to perform REST calls. */ + private NetworkInterfaceIPConfigurationsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of NetworkInterfaceIPConfigurationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public NetworkInterfaceIPConfigurationsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(NetworkInterfaceIPConfigurationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for NetworkInterfaceIPConfigurations to be + * used by Retrofit to perform actually REST calls. + */ + interface NetworkInterfaceIPConfigurationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceIPConfigurations list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.v2019_09_01.NetworkInterfaceIPConfigurations get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("ipConfigurationName") String ipConfigurationName, @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.network.v2019_09_01.NetworkInterfaceIPConfigurations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get all ip configurations in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<NetworkInterfaceIPConfigurationInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String networkInterfaceName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, networkInterfaceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all ip configurations in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @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 resourceGroupName, final String networkInterfaceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, networkInterfaceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all ip configurations in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String networkInterfaceName) { + return listWithServiceResponseAsync(resourceGroupName, networkInterfaceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all ip configurations in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String networkInterfaceName) { + return listSinglePageAsync(resourceGroupName, networkInterfaceName) + .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)); + } + }); + } + + /** + * Get all ip configurations in a network interface. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), 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 specified network interface ip configuration. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkInterfaceIPConfigurationInner object if successful. + */ + public NetworkInterfaceIPConfigurationInner get(String resourceGroupName, String networkInterfaceName, String ipConfigurationName) { + return getWithServiceResponseAsync(resourceGroupName, networkInterfaceName, ipConfigurationName).toBlocking().single().body(); + } + + /** + * Gets the specified network interface ip configuration. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration name. + * @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 networkInterfaceName, String ipConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, networkInterfaceName, ipConfigurationName), serviceCallback); + } + + /** + * Gets the specified network interface ip configuration. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceIPConfigurationInner object + */ + public Observable getAsync(String resourceGroupName, String networkInterfaceName, String ipConfigurationName) { + return getWithServiceResponseAsync(resourceGroupName, networkInterfaceName, ipConfigurationName).map(new Func1, NetworkInterfaceIPConfigurationInner>() { + @Override + public NetworkInterfaceIPConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified network interface ip configuration. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceIPConfigurationInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, String ipConfigurationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (ipConfigurationName == null) { + throw new IllegalArgumentException("Parameter ipConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), 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); + } + + /** + * Get all ip configurations in a network interface. + * + * @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<NetworkInterfaceIPConfigurationInner> 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(); + } + }; + } + + /** + * Get all ip configurations in a network interface. + * + * @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); + } + + /** + * Get all ip configurations in a network interface. + * + * @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<NetworkInterfaceIPConfigurationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all ip configurations in a network interface. + * + * @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<NetworkInterfaceIPConfigurationInner> 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)); + } + }); + } + + /** + * Get all ip configurations in a network interface. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceIPConfigurationInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceImpl.java new file mode 100644 index 000000000000..2e22300db370 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceImpl.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterface; +import rx.Observable; +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceDnsSettings; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.VirtualMachineScaleSetNetworkInterfaceIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroup; +import com.microsoft.azure.management.network.v2019_09_01.PrivateEndpoint; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceTapConfiguration; + +class NetworkInterfaceImpl extends GroupableResourceCoreImpl implements NetworkInterface, NetworkInterface.Definition, NetworkInterface.Update { + NetworkInterfaceImpl(String name, NetworkInterfaceInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + NetworkInterfacesInner client = this.manager().inner().networkInterfaces(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + NetworkInterfacesInner client = this.manager().inner().networkInterfaces(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + NetworkInterfacesInner client = this.manager().inner().networkInterfaces(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public NetworkInterfaceDnsSettings dnsSettings() { + return this.inner().dnsSettings(); + } + + @Override + public Boolean enableAcceleratedNetworking() { + return this.inner().enableAcceleratedNetworking(); + } + + @Override + public Boolean enableIPForwarding() { + return this.inner().enableIPForwarding(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List hostedWorkloads() { + return this.inner().hostedWorkloads(); + } + + @Override + public List ipConfigurations() { + List lst = new ArrayList(); + if (this.inner().ipConfigurations() != null) { + for (NetworkInterfaceIPConfigurationInner inner : this.inner().ipConfigurations()) { + lst.add( new VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String macAddress() { + return this.inner().macAddress(); + } + + @Override + public NetworkSecurityGroup networkSecurityGroup() { + NetworkSecurityGroupInner inner = this.inner().networkSecurityGroup(); + if (inner != null) { + return new NetworkSecurityGroupImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public Boolean primary() { + return this.inner().primary(); + } + + @Override + public PrivateEndpoint privateEndpoint() { + PrivateEndpointInner inner = this.inner().privateEndpoint(); + if (inner != null) { + return new PrivateEndpointImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public List tapConfigurations() { + List lst = new ArrayList(); + if (this.inner().tapConfigurations() != null) { + for (NetworkInterfaceTapConfigurationInner inner : this.inner().tapConfigurations()) { + lst.add( new NetworkInterfaceTapConfigurationImpl(inner, manager())); + } + } + return lst; + } + + @Override + public SubResource virtualMachine() { + return this.inner().virtualMachine(); + } + + @Override + public NetworkInterfaceImpl withDnsSettings(NetworkInterfaceDnsSettings dnsSettings) { + this.inner().withDnsSettings(dnsSettings); + return this; + } + + @Override + public NetworkInterfaceImpl withEnableAcceleratedNetworking(Boolean enableAcceleratedNetworking) { + this.inner().withEnableAcceleratedNetworking(enableAcceleratedNetworking); + return this; + } + + @Override + public NetworkInterfaceImpl withEnableIPForwarding(Boolean enableIPForwarding) { + this.inner().withEnableIPForwarding(enableIPForwarding); + return this; + } + + @Override + public NetworkInterfaceImpl withIpConfigurations(List ipConfigurations) { + this.inner().withIpConfigurations(ipConfigurations); + return this; + } + + @Override + public NetworkInterfaceImpl withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup) { + this.inner().withNetworkSecurityGroup(networkSecurityGroup); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceInner.java new file mode 100644 index 000000000000..7063e697ab2f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceInner.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. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceDnsSettings; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * A network interface in a resource group. + */ +@JsonFlatten +@SkipParentValidation +public class NetworkInterfaceInner extends Resource { + /** + * The reference of a virtual machine. + */ + @JsonProperty(value = "properties.virtualMachine", access = JsonProperty.Access.WRITE_ONLY) + private SubResource virtualMachine; + + /** + * The reference of the NetworkSecurityGroup resource. + */ + @JsonProperty(value = "properties.networkSecurityGroup") + private NetworkSecurityGroupInner networkSecurityGroup; + + /** + * A reference to the private endpoint to which the network interface is + * linked. + */ + @JsonProperty(value = "properties.privateEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointInner privateEndpoint; + + /** + * A list of IPConfigurations of the network interface. + */ + @JsonProperty(value = "properties.ipConfigurations") + private List ipConfigurations; + + /** + * A list of TapConfigurations of the network interface. + */ + @JsonProperty(value = "properties.tapConfigurations", access = JsonProperty.Access.WRITE_ONLY) + private List tapConfigurations; + + /** + * The DNS settings in network interface. + */ + @JsonProperty(value = "properties.dnsSettings") + private NetworkInterfaceDnsSettings dnsSettings; + + /** + * The MAC address of the network interface. + */ + @JsonProperty(value = "properties.macAddress", access = JsonProperty.Access.WRITE_ONLY) + private String macAddress; + + /** + * Whether this is a primary network interface on a virtual machine. + */ + @JsonProperty(value = "properties.primary", access = JsonProperty.Access.WRITE_ONLY) + private Boolean primary; + + /** + * If the network interface is accelerated networking enabled. + */ + @JsonProperty(value = "properties.enableAcceleratedNetworking") + private Boolean enableAcceleratedNetworking; + + /** + * Indicates whether IP forwarding is enabled on this network interface. + */ + @JsonProperty(value = "properties.enableIPForwarding") + private Boolean enableIPForwarding; + + /** + * A list of references to linked BareMetal resources. + */ + @JsonProperty(value = "properties.hostedWorkloads", access = JsonProperty.Access.WRITE_ONLY) + private List hostedWorkloads; + + /** + * The resource GUID property of the network interface resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the network interface resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the reference of a virtual machine. + * + * @return the virtualMachine value + */ + public SubResource virtualMachine() { + return this.virtualMachine; + } + + /** + * Get the reference of the NetworkSecurityGroup resource. + * + * @return the networkSecurityGroup value + */ + public NetworkSecurityGroupInner networkSecurityGroup() { + return this.networkSecurityGroup; + } + + /** + * Set the reference of the NetworkSecurityGroup resource. + * + * @param networkSecurityGroup the networkSecurityGroup value to set + * @return the NetworkInterfaceInner object itself. + */ + public NetworkInterfaceInner withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup) { + this.networkSecurityGroup = networkSecurityGroup; + return this; + } + + /** + * Get a reference to the private endpoint to which the network interface is linked. + * + * @return the privateEndpoint value + */ + public PrivateEndpointInner privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Get a list of IPConfigurations of the network interface. + * + * @return the ipConfigurations value + */ + public List ipConfigurations() { + return this.ipConfigurations; + } + + /** + * Set a list of IPConfigurations of the network interface. + * + * @param ipConfigurations the ipConfigurations value to set + * @return the NetworkInterfaceInner object itself. + */ + public NetworkInterfaceInner withIpConfigurations(List ipConfigurations) { + this.ipConfigurations = ipConfigurations; + return this; + } + + /** + * Get a list of TapConfigurations of the network interface. + * + * @return the tapConfigurations value + */ + public List tapConfigurations() { + return this.tapConfigurations; + } + + /** + * Get the DNS settings in network interface. + * + * @return the dnsSettings value + */ + public NetworkInterfaceDnsSettings dnsSettings() { + return this.dnsSettings; + } + + /** + * Set the DNS settings in network interface. + * + * @param dnsSettings the dnsSettings value to set + * @return the NetworkInterfaceInner object itself. + */ + public NetworkInterfaceInner withDnsSettings(NetworkInterfaceDnsSettings dnsSettings) { + this.dnsSettings = dnsSettings; + return this; + } + + /** + * Get the MAC address of the network interface. + * + * @return the macAddress value + */ + public String macAddress() { + return this.macAddress; + } + + /** + * Get whether this is a primary network interface on a virtual machine. + * + * @return the primary value + */ + public Boolean primary() { + return this.primary; + } + + /** + * Get if the network interface is accelerated networking enabled. + * + * @return the enableAcceleratedNetworking value + */ + public Boolean enableAcceleratedNetworking() { + return this.enableAcceleratedNetworking; + } + + /** + * Set if the network interface is accelerated networking enabled. + * + * @param enableAcceleratedNetworking the enableAcceleratedNetworking value to set + * @return the NetworkInterfaceInner object itself. + */ + public NetworkInterfaceInner withEnableAcceleratedNetworking(Boolean enableAcceleratedNetworking) { + this.enableAcceleratedNetworking = enableAcceleratedNetworking; + return this; + } + + /** + * Get indicates whether IP forwarding is enabled on this network interface. + * + * @return the enableIPForwarding value + */ + public Boolean enableIPForwarding() { + return this.enableIPForwarding; + } + + /** + * Set indicates whether IP forwarding is enabled on this network interface. + * + * @param enableIPForwarding the enableIPForwarding value to set + * @return the NetworkInterfaceInner object itself. + */ + public NetworkInterfaceInner withEnableIPForwarding(Boolean enableIPForwarding) { + this.enableIPForwarding = enableIPForwarding; + return this; + } + + /** + * Get a list of references to linked BareMetal resources. + * + * @return the hostedWorkloads value + */ + public List hostedWorkloads() { + return this.hostedWorkloads; + } + + /** + * Get the resource GUID property of the network interface resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the NetworkInterfaceInner object itself. + */ + public NetworkInterfaceInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceLoadBalancerImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceLoadBalancerImpl.java new file mode 100644 index 000000000000..52762f935c47 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceLoadBalancerImpl.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceLoadBalancer; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.BackendAddressPool; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.FrontendIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.InboundNatPool; +import com.microsoft.azure.management.network.v2019_09_01.InboundNatRule; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancingRule; +import com.microsoft.azure.management.network.v2019_09_01.OutboundRule; +import com.microsoft.azure.management.network.v2019_09_01.Probe; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerSku; +import java.util.Map; + +class NetworkInterfaceLoadBalancerImpl extends WrapperImpl implements NetworkInterfaceLoadBalancer { + private final NetworkManager manager; + + NetworkInterfaceLoadBalancerImpl(LoadBalancerInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public List backendAddressPools() { + List lst = new ArrayList(); + if (this.inner().backendAddressPools() != null) { + for (BackendAddressPoolInner inner : this.inner().backendAddressPools()) { + lst.add( new BackendAddressPoolImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List frontendIPConfigurations() { + List lst = new ArrayList(); + if (this.inner().frontendIPConfigurations() != null) { + for (FrontendIPConfigurationInner inner : this.inner().frontendIPConfigurations()) { + lst.add( new FrontendIPConfigurationImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public List inboundNatPools() { + return this.inner().inboundNatPools(); + } + + @Override + public List inboundNatRules() { + List lst = new ArrayList(); + if (this.inner().inboundNatRules() != null) { + for (InboundNatRuleInner inner : this.inner().inboundNatRules()) { + lst.add( new InboundNatRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List loadBalancingRules() { + List lst = new ArrayList(); + if (this.inner().loadBalancingRules() != null) { + for (LoadBalancingRuleInner inner : this.inner().loadBalancingRules()) { + lst.add( new LoadBalancingRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List outboundRules() { + List lst = new ArrayList(); + if (this.inner().outboundRules() != null) { + for (OutboundRuleInner inner : this.inner().outboundRules()) { + lst.add( new OutboundRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List probes() { + List lst = new ArrayList(); + if (this.inner().probes() != null) { + for (ProbeInner inner : this.inner().probes()) { + lst.add( new ProbeImpl(inner, manager())); + } + } + return lst; + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public LoadBalancerSku sku() { + return this.inner().sku(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceLoadBalancersImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceLoadBalancersImpl.java new file mode 100644 index 000000000000..33d62096df03 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceLoadBalancersImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceLoadBalancers; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceLoadBalancer; + +class NetworkInterfaceLoadBalancersImpl extends WrapperImpl implements NetworkInterfaceLoadBalancers { + private final NetworkManager manager; + + NetworkInterfaceLoadBalancersImpl(NetworkManager manager) { + super(manager.inner().networkInterfaceLoadBalancers()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private NetworkInterfaceLoadBalancerImpl wrapModel(LoadBalancerInner inner) { + return new NetworkInterfaceLoadBalancerImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String networkInterfaceName) { + NetworkInterfaceLoadBalancersInner client = this.inner(); + return client.listAsync(resourceGroupName, networkInterfaceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public NetworkInterfaceLoadBalancer call(LoadBalancerInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceLoadBalancersInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceLoadBalancersInner.java new file mode 100644 index 000000000000..85a529bec5e3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceLoadBalancersInner.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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.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 NetworkInterfaceLoadBalancers. + */ +public class NetworkInterfaceLoadBalancersInner { + /** The Retrofit service to perform REST calls. */ + private NetworkInterfaceLoadBalancersService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of NetworkInterfaceLoadBalancersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public NetworkInterfaceLoadBalancersInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(NetworkInterfaceLoadBalancersService.class); + this.client = client; + } + + /** + * The interface defining all the services for NetworkInterfaceLoadBalancers to be + * used by Retrofit to perform actually REST calls. + */ + interface NetworkInterfaceLoadBalancersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceLoadBalancers list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.v2019_09_01.NetworkInterfaceLoadBalancers listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List all load balancers in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<LoadBalancerInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String networkInterfaceName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, networkInterfaceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all load balancers in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @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 resourceGroupName, final String networkInterfaceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, networkInterfaceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all load balancers in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LoadBalancerInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String networkInterfaceName) { + return listWithServiceResponseAsync(resourceGroupName, networkInterfaceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all load balancers in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<LoadBalancerInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String networkInterfaceName) { + return listSinglePageAsync(resourceGroupName, networkInterfaceName) + .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)); + } + }); + } + + /** + * List all load balancers in a network interface. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<LoadBalancerInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), 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); + } + + /** + * List all load balancers in a network interface. + * + * @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<LoadBalancerInner> 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(); + } + }; + } + + /** + * List all load balancers in a network interface. + * + * @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); + } + + /** + * List all load balancers in a network interface. + * + * @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<LoadBalancerInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all load balancers in a network interface. + * + * @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<LoadBalancerInner> 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)); + } + }); + } + + /** + * List all load balancers in a network interface. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<LoadBalancerInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceNetworkInterfaceIPConfigurationImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceNetworkInterfaceIPConfigurationImpl.java new file mode 100644 index 000000000000..81d098fc622f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceNetworkInterfaceIPConfigurationImpl.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceNetworkInterfaceIPConfiguration; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendAddressPool; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationSecurityGroup; +import com.microsoft.azure.management.network.v2019_09_01.BackendAddressPool; +import com.microsoft.azure.management.network.v2019_09_01.InboundNatRule; +import com.microsoft.azure.management.network.v2019_09_01.IPVersion; +import com.microsoft.azure.management.network.v2019_09_01.IPAllocationMethod; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPAddress; +import com.microsoft.azure.management.network.v2019_09_01.Subnet; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkTap; + +class NetworkInterfaceNetworkInterfaceIPConfigurationImpl extends IndexableRefreshableWrapperImpl implements NetworkInterfaceNetworkInterfaceIPConfiguration { + private final NetworkManager manager; + private String resourceGroupName; + private String networkInterfaceName; + private String ipConfigurationName; + + NetworkInterfaceNetworkInterfaceIPConfigurationImpl(NetworkInterfaceIPConfigurationInner inner, NetworkManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.networkInterfaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "networkInterfaces"); + this.ipConfigurationName = IdParsingUtils.getValueFromIdByName(inner.id(), "ipConfigurations"); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + NetworkInterfaceIPConfigurationsInner client = this.manager().inner().networkInterfaceIPConfigurations(); + return client.getAsync(this.resourceGroupName, this.networkInterfaceName, this.ipConfigurationName); + } + + + + @Override + public List applicationGatewayBackendAddressPools() { + return this.inner().applicationGatewayBackendAddressPools(); + } + + @Override + public List applicationSecurityGroups() { + List lst = new ArrayList(); + if (this.inner().applicationSecurityGroups() != null) { + for (ApplicationSecurityGroupInner inner : this.inner().applicationSecurityGroups()) { + lst.add( new ApplicationSecurityGroupImpl(inner.name(), inner, manager())); + } + } + return lst; + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public List loadBalancerBackendAddressPools() { + List lst = new ArrayList(); + if (this.inner().loadBalancerBackendAddressPools() != null) { + for (BackendAddressPoolInner inner : this.inner().loadBalancerBackendAddressPools()) { + lst.add( new BackendAddressPoolImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List loadBalancerInboundNatRules() { + List lst = new ArrayList(); + if (this.inner().loadBalancerInboundNatRules() != null) { + for (InboundNatRuleInner inner : this.inner().loadBalancerInboundNatRules()) { + lst.add( new InboundNatRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Boolean primary() { + return this.inner().primary(); + } + + @Override + public String privateIPAddress() { + return this.inner().privateIPAddress(); + } + + @Override + public IPVersion privateIPAddressVersion() { + return this.inner().privateIPAddressVersion(); + } + + @Override + public IPAllocationMethod privateIPAllocationMethod() { + return this.inner().privateIPAllocationMethod(); + } + + @Override + public NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnectionProperties() { + return this.inner().privateLinkConnectionProperties(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public PublicIPAddress publicIPAddress() { + PublicIPAddressInner inner = this.inner().publicIPAddress(); + if (inner != null) { + return new PublicIPAddressImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public Subnet subnet() { + SubnetInner inner = this.inner().subnet(); + if (inner != null) { + return new SubnetImpl(inner, manager()); + } else { + return null; + } + } + + @Override + public List virtualNetworkTaps() { + List lst = new ArrayList(); + if (this.inner().virtualNetworkTaps() != null) { + for (VirtualNetworkTapInner inner : this.inner().virtualNetworkTaps()) { + lst.add( new VirtualNetworkTapImpl(inner.name(), inner, manager())); + } + } + return lst; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationImpl.java new file mode 100644 index 000000000000..863f3bdd738c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationImpl.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceTapConfiguration; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkTap; + +class NetworkInterfaceTapConfigurationImpl extends CreatableUpdatableImpl implements NetworkInterfaceTapConfiguration, NetworkInterfaceTapConfiguration.Definition, NetworkInterfaceTapConfiguration.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String networkInterfaceName; + private String tapConfigurationName; + + NetworkInterfaceTapConfigurationImpl(String name, NetworkManager manager) { + super(name, new NetworkInterfaceTapConfigurationInner()); + this.manager = manager; + // Set resource name + this.tapConfigurationName = name; + // + } + + NetworkInterfaceTapConfigurationImpl(NetworkInterfaceTapConfigurationInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.tapConfigurationName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.networkInterfaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "networkInterfaces"); + this.tapConfigurationName = IdParsingUtils.getValueFromIdByName(inner.id(), "tapConfigurations"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + NetworkInterfaceTapConfigurationsInner client = this.manager().inner().networkInterfaceTapConfigurations(); + return client.createOrUpdateAsync(this.resourceGroupName, this.networkInterfaceName, this.tapConfigurationName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + NetworkInterfaceTapConfigurationsInner client = this.manager().inner().networkInterfaceTapConfigurations(); + return client.createOrUpdateAsync(this.resourceGroupName, this.networkInterfaceName, this.tapConfigurationName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + NetworkInterfaceTapConfigurationsInner client = this.manager().inner().networkInterfaceTapConfigurations(); + return client.getAsync(this.resourceGroupName, this.networkInterfaceName, this.tapConfigurationName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public VirtualNetworkTap virtualNetworkTap() { + VirtualNetworkTapInner inner = this.inner().virtualNetworkTap(); + if (inner != null) { + return new VirtualNetworkTapImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public NetworkInterfaceTapConfigurationImpl withExistingNetworkInterface(String resourceGroupName, String networkInterfaceName) { + this.resourceGroupName = resourceGroupName; + this.networkInterfaceName = networkInterfaceName; + return this; + } + + @Override + public NetworkInterfaceTapConfigurationImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public NetworkInterfaceTapConfigurationImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public NetworkInterfaceTapConfigurationImpl withVirtualNetworkTap(VirtualNetworkTapInner virtualNetworkTap) { + this.inner().withVirtualNetworkTap(virtualNetworkTap); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationInner.java new file mode 100644 index 000000000000..e064d0716de6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Tap configuration in a Network Interface. + */ +@JsonFlatten +public class NetworkInterfaceTapConfigurationInner extends SubResource { + /** + * The reference of the Virtual Network Tap resource. + */ + @JsonProperty(value = "properties.virtualNetworkTap") + private VirtualNetworkTapInner virtualNetworkTap; + + /** + * The provisioning state of the network interface tap configuration + * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', + * 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Sub Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the reference of the Virtual Network Tap resource. + * + * @return the virtualNetworkTap value + */ + public VirtualNetworkTapInner virtualNetworkTap() { + return this.virtualNetworkTap; + } + + /** + * Set the reference of the Virtual Network Tap resource. + * + * @param virtualNetworkTap the virtualNetworkTap value to set + * @return the NetworkInterfaceTapConfigurationInner object itself. + */ + public NetworkInterfaceTapConfigurationInner withVirtualNetworkTap(VirtualNetworkTapInner virtualNetworkTap) { + this.virtualNetworkTap = virtualNetworkTap; + return this; + } + + /** + * Get the provisioning state of the network interface tap configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the NetworkInterfaceTapConfigurationInner object itself. + */ + public NetworkInterfaceTapConfigurationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get sub Resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationsImpl.java new file mode 100644 index 000000000000..85d2eafcc50f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceTapConfigurations; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceTapConfiguration; + +class NetworkInterfaceTapConfigurationsImpl extends WrapperImpl implements NetworkInterfaceTapConfigurations { + private final NetworkManager manager; + + NetworkInterfaceTapConfigurationsImpl(NetworkManager manager) { + super(manager.inner().networkInterfaceTapConfigurations()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public NetworkInterfaceTapConfigurationImpl define(String name) { + return wrapModel(name); + } + + private NetworkInterfaceTapConfigurationImpl wrapModel(NetworkInterfaceTapConfigurationInner inner) { + return new NetworkInterfaceTapConfigurationImpl(inner, manager()); + } + + private NetworkInterfaceTapConfigurationImpl wrapModel(String name) { + return new NetworkInterfaceTapConfigurationImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String networkInterfaceName) { + NetworkInterfaceTapConfigurationsInner client = this.inner(); + return client.listAsync(resourceGroupName, networkInterfaceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public NetworkInterfaceTapConfiguration call(NetworkInterfaceTapConfigurationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { + NetworkInterfaceTapConfigurationsInner client = this.inner(); + return client.getAsync(resourceGroupName, networkInterfaceName, tapConfigurationName) + .flatMap(new Func1>() { + @Override + public Observable call(NetworkInterfaceTapConfigurationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((NetworkInterfaceTapConfiguration)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { + NetworkInterfaceTapConfigurationsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, networkInterfaceName, tapConfigurationName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationsInner.java new file mode 100644 index 000000000000..7ed10e9edf59 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationsInner.java @@ -0,0 +1,764 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 NetworkInterfaceTapConfigurations. + */ +public class NetworkInterfaceTapConfigurationsInner { + /** The Retrofit service to perform REST calls. */ + private NetworkInterfaceTapConfigurationsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of NetworkInterfaceTapConfigurationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public NetworkInterfaceTapConfigurationsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(NetworkInterfaceTapConfigurationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for NetworkInterfaceTapConfigurations to be + * used by Retrofit to perform actually REST calls. + */ + interface NetworkInterfaceTapConfigurationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceTapConfigurations delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("tapConfigurationName") String tapConfigurationName, @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.network.v2019_09_01.NetworkInterfaceTapConfigurations beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("tapConfigurationName") String tapConfigurationName, @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.network.v2019_09_01.NetworkInterfaceTapConfigurations get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("tapConfigurationName") String tapConfigurationName, @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.network.v2019_09_01.NetworkInterfaceTapConfigurations createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("tapConfigurationName") String tapConfigurationName, @Path("subscriptionId") String subscriptionId, @Body NetworkInterfaceTapConfigurationInner tapConfigurationParameters, @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.network.v2019_09_01.NetworkInterfaceTapConfigurations beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("tapConfigurationName") String tapConfigurationName, @Path("subscriptionId") String subscriptionId, @Body NetworkInterfaceTapConfigurationInner tapConfigurationParameters, @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.network.v2019_09_01.NetworkInterfaceTapConfigurations list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.v2019_09_01.NetworkInterfaceTapConfigurations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified tap configuration from the NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 networkInterfaceName, String tapConfigurationName) { + deleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName).toBlocking().last().body(); + } + + /** + * Deletes the specified tap configuration from the NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @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 networkInterfaceName, String tapConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName), serviceCallback); + } + + /** + * Deletes the specified tap configuration from the NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { + return deleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified tap configuration from the NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (tapConfigurationName == null) { + throw new IllegalArgumentException("Parameter tapConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, networkInterfaceName, tapConfigurationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified tap configuration from the NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 networkInterfaceName, String tapConfigurationName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName).toBlocking().single().body(); + } + + /** + * Deletes the specified tap configuration from the NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @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 networkInterfaceName, String tapConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName), serviceCallback); + } + + /** + * Deletes the specified tap configuration from the NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified tap configuration from the NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (tapConfigurationName == null) { + throw new IllegalArgumentException("Parameter tapConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, networkInterfaceName, tapConfigurationName, this.client.subscriptionId(), 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); + } + + /** + * Get the specified tap configuration on a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkInterfaceTapConfigurationInner object if successful. + */ + public NetworkInterfaceTapConfigurationInner get(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { + return getWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName).toBlocking().single().body(); + } + + /** + * Get the specified tap configuration on a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @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 networkInterfaceName, String tapConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName), serviceCallback); + } + + /** + * Get the specified tap configuration on a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceTapConfigurationInner object + */ + public Observable getAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { + return getWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName).map(new Func1, NetworkInterfaceTapConfigurationInner>() { + @Override + public NetworkInterfaceTapConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the specified tap configuration on a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceTapConfigurationInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (tapConfigurationName == null) { + throw new IllegalArgumentException("Parameter tapConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, networkInterfaceName, tapConfigurationName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates a Tap configuration in the specified NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @param tapConfigurationParameters Parameters supplied to the create or update tap configuration 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 NetworkInterfaceTapConfigurationInner object if successful. + */ + public NetworkInterfaceTapConfigurationInner createOrUpdate(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a Tap configuration in the specified NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @param tapConfigurationParameters Parameters supplied to the create or update tap configuration 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 createOrUpdateAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters), serviceCallback); + } + + /** + * Creates or updates a Tap configuration in the specified NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @param tapConfigurationParameters Parameters supplied to the create or update tap configuration operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters).map(new Func1, NetworkInterfaceTapConfigurationInner>() { + @Override + public NetworkInterfaceTapConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Tap configuration in the specified NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @param tapConfigurationParameters Parameters supplied to the create or update tap configuration operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (tapConfigurationName == null) { + throw new IllegalArgumentException("Parameter tapConfigurationName 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 (tapConfigurationParameters == null) { + throw new IllegalArgumentException("Parameter tapConfigurationParameters is required and cannot be null."); + } + Validator.validate(tapConfigurationParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, networkInterfaceName, tapConfigurationName, this.client.subscriptionId(), tapConfigurationParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a Tap configuration in the specified NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @param tapConfigurationParameters Parameters supplied to the create or update tap configuration 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 NetworkInterfaceTapConfigurationInner object if successful. + */ + public NetworkInterfaceTapConfigurationInner beginCreateOrUpdate(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a Tap configuration in the specified NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @param tapConfigurationParameters Parameters supplied to the create or update tap configuration 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 beginCreateOrUpdateAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters), serviceCallback); + } + + /** + * Creates or updates a Tap configuration in the specified NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @param tapConfigurationParameters Parameters supplied to the create or update tap configuration operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceTapConfigurationInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters).map(new Func1, NetworkInterfaceTapConfigurationInner>() { + @Override + public NetworkInterfaceTapConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Tap configuration in the specified NetworkInterface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tapConfigurationName The name of the tap configuration. + * @param tapConfigurationParameters Parameters supplied to the create or update tap configuration operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceTapConfigurationInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (tapConfigurationName == null) { + throw new IllegalArgumentException("Parameter tapConfigurationName 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 (tapConfigurationParameters == null) { + throw new IllegalArgumentException("Parameter tapConfigurationParameters is required and cannot be null."); + } + Validator.validate(tapConfigurationParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, networkInterfaceName, tapConfigurationName, this.client.subscriptionId(), tapConfigurationParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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); + } + + /** + * Get all Tap configurations in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<NetworkInterfaceTapConfigurationInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String networkInterfaceName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, networkInterfaceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all Tap configurations in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @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 resourceGroupName, final String networkInterfaceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, networkInterfaceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all Tap configurations in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceTapConfigurationInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String networkInterfaceName) { + return listWithServiceResponseAsync(resourceGroupName, networkInterfaceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all Tap configurations in a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceTapConfigurationInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String networkInterfaceName) { + return listSinglePageAsync(resourceGroupName, networkInterfaceName) + .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)); + } + }); + } + + /** + * Get all Tap configurations in a network interface. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceTapConfigurationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), 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); + } + + /** + * Get all Tap configurations in a network interface. + * + * @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<NetworkInterfaceTapConfigurationInner> 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(); + } + }; + } + + /** + * Get all Tap configurations in a network interface. + * + * @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); + } + + /** + * Get all Tap configurations in a network interface. + * + * @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<NetworkInterfaceTapConfigurationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all Tap configurations in a network interface. + * + * @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<NetworkInterfaceTapConfigurationInner> 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)); + } + }); + } + + /** + * Get all Tap configurations in a network interface. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceTapConfigurationInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfacesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfacesImpl.java new file mode 100644 index 000000000000..90e67b80f25c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfacesImpl.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaces; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterface; +import com.microsoft.azure.Page; +import rx.Completable; +import com.microsoft.azure.management.network.v2019_09_01.EffectiveRouteListResult; +import com.microsoft.azure.management.network.v2019_09_01.EffectiveNetworkSecurityGroupListResult; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerNetworkInterface; +import com.microsoft.azure.management.network.v2019_09_01.VirtualMachineScaleSetNetworkInterfaceIPConfiguration; + +class NetworkInterfacesImpl extends WrapperImpl implements NetworkInterfaces { + private final NetworkManager manager; + + NetworkInterfacesImpl(NetworkManager manager) { + super(manager.inner().networkInterfaces()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public NetworkInterfaceImpl defineNetworkInterface(String name) { + return wrapNetworkInterfaceModel(name); + } + + private NetworkInterfaceImpl wrapNetworkInterfaceModel(String name) { + return new NetworkInterfaceImpl(name, new NetworkInterfaceInner(), this.manager()); + } + + private NetworkInterfaceImpl wrapNetworkInterfaceModel(NetworkInterfaceInner inner) { + return new NetworkInterfaceImpl(inner.name(), inner, manager()); + } + + private VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl wrapVirtualMachineScaleSetNetworkInterfaceIPConfigurationModel(NetworkInterfaceIPConfigurationInner inner) { + return new VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl(inner, manager()); + } + + private Observable getNetworkInterfaceInnerUsingNetworkInterfacesInnerAsync(String resourceGroupName, String name) { + NetworkInterfacesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + private Observable getNetworkInterfaceIPConfigurationInnerUsingNetworkInterfacesInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String virtualMachineScaleSetName = IdParsingUtils.getValueFromIdByName(id, "virtualMachineScaleSets"); + String virtualmachineIndex = IdParsingUtils.getValueFromIdByName(id, "virtualMachines"); + String networkInterfaceName = IdParsingUtils.getValueFromIdByName(id, "networkInterfaces"); + String ipConfigurationName = IdParsingUtils.getValueFromIdByName(id, "ipConfigurations"); + NetworkInterfacesInner client = this.inner(); + return client.getVirtualMachineScaleSetIpConfigurationAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName); + } + + @Override + public Observable getByResourceGroupAsync(String resourceGroupName, String name) { + return this.getNetworkInterfaceInnerUsingNetworkInterfacesInnerAsync(resourceGroupName, name).flatMap(new Func1> () { + @Override + public Observable call(NetworkInterfaceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((NetworkInterface)wrapNetworkInterfaceModel(inner)); + } + } + }); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + NetworkInterfacesInner 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 NetworkInterface call(NetworkInterfaceInner inner) { + return wrapNetworkInterfaceModel(inner); + } + }); + } + + @Override + public Observable listAsync() { + NetworkInterfacesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public NetworkInterface call(NetworkInterfaceInner inner) { + return wrapNetworkInterfaceModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String name) { + return this.inner().deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable getEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName) { + NetworkInterfacesInner client = this.inner(); + return client.getEffectiveRouteTableAsync(resourceGroupName, networkInterfaceName) + .map(new Func1() { + @Override + public EffectiveRouteListResult call(EffectiveRouteListResultInner inner) { + return new EffectiveRouteListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName) { + NetworkInterfacesInner client = this.inner(); + return client.listEffectiveNetworkSecurityGroupsAsync(resourceGroupName, networkInterfaceName) + .map(new Func1() { + @Override + public EffectiveNetworkSecurityGroupListResult call(EffectiveNetworkSecurityGroupListResultInner inner) { + return new EffectiveNetworkSecurityGroupListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listVirtualMachineScaleSetVMNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) { + NetworkInterfacesInner client = this.inner(); + return client.listVirtualMachineScaleSetVMNetworkInterfacesAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public LoadBalancerNetworkInterface call(NetworkInterfaceInner inner) { + return new LoadBalancerNetworkInterfaceImpl(inner, manager()); + } + }); + } + + @Override + public Observable listVirtualMachineScaleSetNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName) { + NetworkInterfacesInner client = this.inner(); + return client.listVirtualMachineScaleSetNetworkInterfacesAsync(resourceGroupName, virtualMachineScaleSetName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public LoadBalancerNetworkInterface call(NetworkInterfaceInner inner) { + return new LoadBalancerNetworkInterfaceImpl(inner, manager()); + } + }); + } + + @Override + public Observable getVirtualMachineScaleSetNetworkInterfaceAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName) { + NetworkInterfacesInner client = this.inner(); + return client.getVirtualMachineScaleSetNetworkInterfaceAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName) + .map(new Func1() { + @Override + public LoadBalancerNetworkInterface call(NetworkInterfaceInner inner) { + return new LoadBalancerNetworkInterfaceImpl(inner, manager()); + } + }); + } + + @Override + public Observable getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) { + NetworkInterfacesInner client = this.inner(); + return client.getVirtualMachineScaleSetIpConfigurationAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName) + .flatMap(new Func1>() { + @Override + public Observable call(NetworkInterfaceIPConfigurationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((VirtualMachineScaleSetNetworkInterfaceIPConfiguration)wrapVirtualMachineScaleSetNetworkInterfaceIPConfigurationModel(inner)); + } + } + }); + } + + @Override + public Observable listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { + NetworkInterfacesInner client = this.inner(); + return client.listVirtualMachineScaleSetIpConfigurationsAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VirtualMachineScaleSetNetworkInterfaceIPConfiguration call(NetworkInterfaceIPConfigurationInner inner) { + return wrapVirtualMachineScaleSetNetworkInterfaceIPConfigurationModel(inner); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfacesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfacesInner.java new file mode 100644 index 000000000000..1e59c5b01718 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfacesInner.java @@ -0,0 +1,2823 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in NetworkInterfaces. + */ +public class NetworkInterfacesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private NetworkInterfacesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of NetworkInterfacesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public NetworkInterfacesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(NetworkInterfacesService.class); + this.client = client; + } + + /** + * The interface defining all the services for NetworkInterfaces to be + * used by Retrofit to perform actually REST calls. + */ + interface NetworkInterfacesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaces delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.v2019_09_01.NetworkInterfaces beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.v2019_09_01.NetworkInterfaces getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.NetworkInterfaces createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Body NetworkInterfaceInner 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.network.v2019_09_01.NetworkInterfaces beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Body NetworkInterfaceInner 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.network.v2019_09_01.NetworkInterfaces updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaces list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces") + Observable> list(@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.network.v2019_09_01.NetworkInterfaces listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.NetworkInterfaces getEffectiveRouteTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable") + Observable> getEffectiveRouteTable(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.v2019_09_01.NetworkInterfaces beginGetEffectiveRouteTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable") + Observable> beginGetEffectiveRouteTable(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.v2019_09_01.NetworkInterfaces listEffectiveNetworkSecurityGroups" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups") + Observable> listEffectiveNetworkSecurityGroups(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.v2019_09_01.NetworkInterfaces beginListEffectiveNetworkSecurityGroups" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups") + Observable> beginListEffectiveNetworkSecurityGroups(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.v2019_09_01.NetworkInterfaces listVirtualMachineScaleSetVMNetworkInterfaces" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces") + Observable> listVirtualMachineScaleSetVMNetworkInterfaces(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @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.network.v2019_09_01.NetworkInterfaces listVirtualMachineScaleSetNetworkInterfaces" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces") + Observable> listVirtualMachineScaleSetNetworkInterfaces(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @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.network.v2019_09_01.NetworkInterfaces getVirtualMachineScaleSetNetworkInterface" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}") + Observable> getVirtualMachineScaleSetNetworkInterface(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.NetworkInterfaces listVirtualMachineScaleSetIpConfigurations" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations") + Observable> listVirtualMachineScaleSetIpConfigurations(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.NetworkInterfaces getVirtualMachineScaleSetIpConfiguration" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}") + Observable> getVirtualMachineScaleSetIpConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("ipConfigurationName") String ipConfigurationName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.NetworkInterfaces 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.network.v2019_09_01.NetworkInterfaces 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.network.v2019_09_01.NetworkInterfaces listVirtualMachineScaleSetVMNetworkInterfacesNext" }) + @GET + Observable> listVirtualMachineScaleSetVMNetworkInterfacesNext(@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.network.v2019_09_01.NetworkInterfaces listVirtualMachineScaleSetNetworkInterfacesNext" }) + @GET + Observable> listVirtualMachineScaleSetNetworkInterfacesNext(@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.network.v2019_09_01.NetworkInterfaces listVirtualMachineScaleSetIpConfigurationsNext" }) + @GET + Observable> listVirtualMachineScaleSetIpConfigurationsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 networkInterfaceName) { + deleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body(); + } + + /** + * Deletes the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @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 networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + } + + /** + * Deletes the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String networkInterfaceName) { + return deleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 networkInterfaceName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); + } + + /** + * Deletes the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @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 networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + } + + /** + * Deletes the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String networkInterfaceName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), 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); + } + + /** + * Gets information about the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkInterfaceInner object if successful. + */ + public NetworkInterfaceInner getByResourceGroup(String resourceGroupName, String networkInterfaceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); + } + + /** + * Gets information about the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @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 networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + } + + /** + * Gets information about the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String networkInterfaceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets information about the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkInterfaceInner object if successful. + */ + public NetworkInterfaceInner getByResourceGroup(String resourceGroupName, String networkInterfaceName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName, expand).toBlocking().single().body(); + } + + /** + * Gets information about the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. + * @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 networkInterfaceName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName, expand), serviceCallback); + } + + /** + * Gets information about the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String networkInterfaceName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName, expand).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Creates or updates a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param parameters Parameters supplied to the create or update network interface 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 NetworkInterfaceInner object if successful. + */ + public NetworkInterfaceInner createOrUpdate(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param parameters Parameters supplied to the create or update network interface 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 createOrUpdateAsync(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, parameters), serviceCallback); + } + + /** + * Creates or updates a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param parameters Parameters supplied to the create or update network interface operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, parameters).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param parameters Parameters supplied to the create or update network interface operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param parameters Parameters supplied to the create or update network interface 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 NetworkInterfaceInner object if successful. + */ + public NetworkInterfaceInner beginCreateOrUpdate(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param parameters Parameters supplied to the create or update network interface 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 beginCreateOrUpdateAsync(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, parameters), serviceCallback); + } + + /** + * Creates or updates a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param parameters Parameters supplied to the create or update network interface operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, parameters).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param parameters Parameters supplied to the create or update network interface operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 a network interface tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkInterfaceInner object if successful. + */ + public NetworkInterfaceInner updateTags(String resourceGroupName, String networkInterfaceName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); + } + + /** + * Updates a network interface tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @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 updateTagsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + } + + /** + * Updates a network interface tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String networkInterfaceName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a network interface tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a network interface tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkInterfaceInner object if successful. + */ + public NetworkInterfaceInner updateTags(String resourceGroupName, String networkInterfaceName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).toBlocking().single().body(); + } + + /** + * Updates a network interface tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String networkInterfaceName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags), serviceCallback); + } + + /** + * Updates a network interface tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String networkInterfaceName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a network interface tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all network interfaces in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<NetworkInterfaceInner> 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 all network interfaces in a subscription. + * + * @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 all network interfaces in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all network interfaces in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceInner> 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 all network interfaces in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all network interfaces in a resource group. + * + * @param resourceGroupName The name of the 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<NetworkInterfaceInner> 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 all network interfaces in a resource group. + * + * @param resourceGroupName The name of the 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 all network interfaces in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all network interfaces in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceInner> 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 all network interfaces in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 EffectiveRouteListResultInner object if successful. + */ + public EffectiveRouteListResultInner getEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) { + return getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body(); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @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 getEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName) { + return getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, EffectiveRouteListResultInner>() { + @Override + public EffectiveRouteListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getEffectiveRouteTableWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.getEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 EffectiveRouteListResultInner object if successful. + */ + public EffectiveRouteListResultInner beginGetEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) { + return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @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 beginGetEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EffectiveRouteListResultInner object + */ + public Observable beginGetEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName) { + return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, EffectiveRouteListResultInner>() { + @Override + public EffectiveRouteListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EffectiveRouteListResultInner object + */ + public Observable> beginGetEffectiveRouteTableWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginGetEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetEffectiveRouteTableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetEffectiveRouteTableDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all network security groups applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 EffectiveNetworkSecurityGroupListResultInner object if successful. + */ + public EffectiveNetworkSecurityGroupListResultInner listEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) { + return listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body(); + } + + /** + * Gets all network security groups applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @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 listEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + } + + /** + * Gets all network security groups applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName) { + return listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, EffectiveNetworkSecurityGroupListResultInner>() { + @Override + public EffectiveNetworkSecurityGroupListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all network security groups applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.listEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets all network security groups applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 EffectiveNetworkSecurityGroupListResultInner object if successful. + */ + public EffectiveNetworkSecurityGroupListResultInner beginListEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) { + return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); + } + + /** + * Gets all network security groups applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @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 beginListEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + } + + /** + * Gets all network security groups applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EffectiveNetworkSecurityGroupListResultInner object + */ + public Observable beginListEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName) { + return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, EffectiveNetworkSecurityGroupListResultInner>() { + @Override + public EffectiveNetworkSecurityGroupListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all network security groups applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EffectiveNetworkSecurityGroupListResultInner object + */ + public Observable> beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginListEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListEffectiveNetworkSecurityGroupsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListEffectiveNetworkSecurityGroupsDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<NetworkInterfaceInner> object if successful. + */ + public PagedList listVirtualMachineScaleSetVMNetworkInterfaces(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) { + ServiceResponse> response = listVirtualMachineScaleSetVMNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @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> listVirtualMachineScaleSetVMNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachineScaleSetVMNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceInner> object + */ + public Observable> listVirtualMachineScaleSetVMNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) { + return listVirtualMachineScaleSetVMNetworkInterfacesWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceInner> object + */ + public Observable>> listVirtualMachineScaleSetVMNetworkInterfacesWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) { + return listVirtualMachineScaleSetVMNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex) + .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(listVirtualMachineScaleSetVMNetworkInterfacesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param virtualMachineScaleSetName The name of the virtual machine scale set. + ServiceResponse> * @param virtualmachineIndex The virtual machine index. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachineScaleSetVMNetworkInterfacesSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-10-01"; + return service.listVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachineScaleSetVMNetworkInterfacesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVirtualMachineScaleSetVMNetworkInterfacesDelegate(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 all network interfaces in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<NetworkInterfaceInner> object if successful. + */ + public PagedList listVirtualMachineScaleSetNetworkInterfaces(final String resourceGroupName, final String virtualMachineScaleSetName) { + ServiceResponse> response = listVirtualMachineScaleSetNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all network interfaces in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @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> listVirtualMachineScaleSetNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachineScaleSetNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all network interfaces in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceInner> object + */ + public Observable> listVirtualMachineScaleSetNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName) { + return listVirtualMachineScaleSetNetworkInterfacesWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all network interfaces in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceInner> object + */ + public Observable>> listVirtualMachineScaleSetNetworkInterfacesWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName) { + return listVirtualMachineScaleSetNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName) + .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(listVirtualMachineScaleSetNetworkInterfacesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all network interfaces in a virtual machine scale set. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachineScaleSetNetworkInterfacesSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-10-01"; + return service.listVirtualMachineScaleSetNetworkInterfaces(resourceGroupName, virtualMachineScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachineScaleSetNetworkInterfacesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVirtualMachineScaleSetNetworkInterfacesDelegate(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); + } + + /** + * Get the specified network interface in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkInterfaceInner object if successful. + */ + public NetworkInterfaceInner getVirtualMachineScaleSetNetworkInterface(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName) { + return getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName).toBlocking().single().body(); + } + + /** + * Get the specified network interface in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @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 getVirtualMachineScaleSetNetworkInterfaceAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName), serviceCallback); + } + + /** + * Get the specified network interface in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable getVirtualMachineScaleSetNetworkInterfaceAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName) { + return getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the specified network interface in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable> getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-10-01"; + final String expand = null; + return service.getVirtualMachineScaleSetNetworkInterface(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVirtualMachineScaleSetNetworkInterfaceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get the specified network interface in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkInterfaceInner object if successful. + */ + public NetworkInterfaceInner getVirtualMachineScaleSetNetworkInterface(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String expand) { + return getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand).toBlocking().single().body(); + } + + /** + * Get the specified network interface in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. + * @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 getVirtualMachineScaleSetNetworkInterfaceAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand), serviceCallback); + } + + /** + * Get the specified network interface in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable getVirtualMachineScaleSetNetworkInterfaceAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String expand) { + return getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the specified network interface in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable> getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-10-01"; + return service.getVirtualMachineScaleSetNetworkInterface(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVirtualMachineScaleSetNetworkInterfaceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVirtualMachineScaleSetNetworkInterfaceDelegate(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); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<NetworkInterfaceIPConfigurationInner> object if successful. + */ + public PagedList listVirtualMachineScaleSetIpConfigurations(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { + ServiceResponse> response = listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @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> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object + */ + public Observable> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { + return listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object + */ + public Observable>> listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { + return listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName) + .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(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-10-01"; + final String expand = null; + return service.listVirtualMachineScaleSetIpConfigurations(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachineScaleSetIpConfigurationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<NetworkInterfaceIPConfigurationInner> object if successful. + */ + public PagedList listVirtualMachineScaleSetIpConfigurations(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) { + ServiceResponse> response = listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. + * @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> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object + */ + public Observable> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) { + return listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object + */ + public Observable>> listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) { + return listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) + .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(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param virtualMachineScaleSetName The name of the virtual machine scale set. + ServiceResponse> * @param virtualmachineIndex The virtual machine index. + ServiceResponse> * @param networkInterfaceName The name of the network interface. + ServiceResponse> * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-10-01"; + return service.listVirtualMachineScaleSetIpConfigurations(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachineScaleSetIpConfigurationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVirtualMachineScaleSetIpConfigurationsDelegate(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); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkInterfaceIPConfigurationInner object if successful. + */ + public NetworkInterfaceIPConfigurationInner getVirtualMachineScaleSetIpConfiguration(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) { + return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName).toBlocking().single().body(); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. + * @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 getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName), serviceCallback); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceIPConfigurationInner object + */ + public Observable getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) { + return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName).map(new Func1, NetworkInterfaceIPConfigurationInner>() { + @Override + public NetworkInterfaceIPConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceIPConfigurationInner object + */ + public Observable> getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (ipConfigurationName == null) { + throw new IllegalArgumentException("Parameter ipConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-10-01"; + final String expand = null; + return service.getVirtualMachineScaleSetIpConfiguration(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVirtualMachineScaleSetIpConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkInterfaceIPConfigurationInner object if successful. + */ + public NetworkInterfaceIPConfigurationInner getVirtualMachineScaleSetIpConfiguration(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand) { + return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, expand).toBlocking().single().body(); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. + * @param expand Expands referenced resources. + * @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 getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, expand), serviceCallback); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceIPConfigurationInner object + */ + public Observable getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand) { + return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, expand).map(new Func1, NetworkInterfaceIPConfigurationInner>() { + @Override + public NetworkInterfaceIPConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceIPConfigurationInner object + */ + public Observable> getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (ipConfigurationName == null) { + throw new IllegalArgumentException("Parameter ipConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-10-01"; + return service.getVirtualMachineScaleSetIpConfiguration(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVirtualMachineScaleSetIpConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVirtualMachineScaleSetIpConfigurationDelegate(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 all network interfaces in a subscription. + * + * @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<NetworkInterfaceInner> 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 all network interfaces in a subscription. + * + * @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 all network interfaces in a subscription. + * + * @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<NetworkInterfaceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all network interfaces in a subscription. + * + * @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<NetworkInterfaceInner> 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 all network interfaces in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceInner> 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 all network interfaces in a resource group. + * + * @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<NetworkInterfaceInner> 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 all network interfaces in a resource group. + * + * @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 all network interfaces in a resource group. + * + * @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<NetworkInterfaceInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all network interfaces in a resource group. + * + * @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<NetworkInterfaceInner> 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 all network interfaces in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceInner> 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 information about all network interfaces in a virtual machine in a virtual machine scale set. + * + * @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<NetworkInterfaceInner> object if successful. + */ + public PagedList listVirtualMachineScaleSetVMNetworkInterfacesNext(final String nextPageLink) { + ServiceResponse> response = listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. + * + * @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> listVirtualMachineScaleSetVMNetworkInterfacesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. + * + * @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<NetworkInterfaceInner> object + */ + public Observable> listVirtualMachineScaleSetVMNetworkInterfacesNextAsync(final String nextPageLink) { + return listVirtualMachineScaleSetVMNetworkInterfacesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. + * + * @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<NetworkInterfaceInner> object + */ + public Observable>> listVirtualMachineScaleSetVMNetworkInterfacesNextWithServiceResponseAsync(final String nextPageLink) { + return listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(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(listVirtualMachineScaleSetVMNetworkInterfacesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(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.listVirtualMachineScaleSetVMNetworkInterfacesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachineScaleSetVMNetworkInterfacesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVirtualMachineScaleSetVMNetworkInterfacesNextDelegate(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 all network interfaces in a virtual machine scale set. + * + * @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<NetworkInterfaceInner> object if successful. + */ + public PagedList listVirtualMachineScaleSetNetworkInterfacesNext(final String nextPageLink) { + ServiceResponse> response = listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all network interfaces in a virtual machine scale set. + * + * @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> listVirtualMachineScaleSetNetworkInterfacesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all network interfaces in a virtual machine scale set. + * + * @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<NetworkInterfaceInner> object + */ + public Observable> listVirtualMachineScaleSetNetworkInterfacesNextAsync(final String nextPageLink) { + return listVirtualMachineScaleSetNetworkInterfacesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all network interfaces in a virtual machine scale set. + * + * @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<NetworkInterfaceInner> object + */ + public Observable>> listVirtualMachineScaleSetNetworkInterfacesNextWithServiceResponseAsync(final String nextPageLink) { + return listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(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(listVirtualMachineScaleSetNetworkInterfacesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all network interfaces in a virtual machine scale set. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(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.listVirtualMachineScaleSetNetworkInterfacesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachineScaleSetNetworkInterfacesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVirtualMachineScaleSetNetworkInterfacesNextDelegate(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); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @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<NetworkInterfaceIPConfigurationInner> object if successful. + */ + public PagedList listVirtualMachineScaleSetIpConfigurationsNext(final String nextPageLink) { + ServiceResponse> response = listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @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> listVirtualMachineScaleSetIpConfigurationsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @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<NetworkInterfaceIPConfigurationInner> object + */ + public Observable> listVirtualMachineScaleSetIpConfigurationsNextAsync(final String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @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<NetworkInterfaceIPConfigurationInner> object + */ + public Observable>> listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(final String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(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(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(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.listVirtualMachineScaleSetIpConfigurationsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachineScaleSetIpConfigurationsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVirtualMachineScaleSetIpConfigurationsNextDelegate(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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkManagementClientImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkManagementClientImpl.java new file mode 100644 index 000000000000..ef01d520ff24 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkManagementClientImpl.java @@ -0,0 +1,1802 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.management.network.v2019_09_01.VirtualWanVpnProfileParameters; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; +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 okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * Initializes a new instance of the NetworkManagementClientImpl class. + */ +public class NetworkManagementClientImpl extends AzureServiceClient { + /** The Retrofit service to perform REST calls. */ + private NetworkManagementClientService service; + /** 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; + } + + /** The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ + private String subscriptionId; + + /** + * Gets The subscription credentials which uniquely identify the 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 The subscription credentials which uniquely identify the 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 NetworkManagementClientImpl 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 NetworkManagementClientImpl 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 NetworkManagementClientImpl 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 NetworkManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The ApplicationGatewaysInner object to access its operations. + */ + private ApplicationGatewaysInner applicationGateways; + + /** + * Gets the ApplicationGatewaysInner object to access its operations. + * @return the ApplicationGatewaysInner object. + */ + public ApplicationGatewaysInner applicationGateways() { + return this.applicationGateways; + } + + /** + * The ApplicationSecurityGroupsInner object to access its operations. + */ + private ApplicationSecurityGroupsInner applicationSecurityGroups; + + /** + * Gets the ApplicationSecurityGroupsInner object to access its operations. + * @return the ApplicationSecurityGroupsInner object. + */ + public ApplicationSecurityGroupsInner applicationSecurityGroups() { + return this.applicationSecurityGroups; + } + + /** + * The AvailableDelegationsInner object to access its operations. + */ + private AvailableDelegationsInner availableDelegations; + + /** + * Gets the AvailableDelegationsInner object to access its operations. + * @return the AvailableDelegationsInner object. + */ + public AvailableDelegationsInner availableDelegations() { + return this.availableDelegations; + } + + /** + * The AvailableResourceGroupDelegationsInner object to access its operations. + */ + private AvailableResourceGroupDelegationsInner availableResourceGroupDelegations; + + /** + * Gets the AvailableResourceGroupDelegationsInner object to access its operations. + * @return the AvailableResourceGroupDelegationsInner object. + */ + public AvailableResourceGroupDelegationsInner availableResourceGroupDelegations() { + return this.availableResourceGroupDelegations; + } + + /** + * The AvailableServiceAliasesInner object to access its operations. + */ + private AvailableServiceAliasesInner availableServiceAliases; + + /** + * Gets the AvailableServiceAliasesInner object to access its operations. + * @return the AvailableServiceAliasesInner object. + */ + public AvailableServiceAliasesInner availableServiceAliases() { + return this.availableServiceAliases; + } + + /** + * The AzureFirewallsInner object to access its operations. + */ + private AzureFirewallsInner azureFirewalls; + + /** + * Gets the AzureFirewallsInner object to access its operations. + * @return the AzureFirewallsInner object. + */ + public AzureFirewallsInner azureFirewalls() { + return this.azureFirewalls; + } + + /** + * The AzureFirewallFqdnTagsInner object to access its operations. + */ + private AzureFirewallFqdnTagsInner azureFirewallFqdnTags; + + /** + * Gets the AzureFirewallFqdnTagsInner object to access its operations. + * @return the AzureFirewallFqdnTagsInner object. + */ + public AzureFirewallFqdnTagsInner azureFirewallFqdnTags() { + return this.azureFirewallFqdnTags; + } + + /** + * The BastionHostsInner object to access its operations. + */ + private BastionHostsInner bastionHosts; + + /** + * Gets the BastionHostsInner object to access its operations. + * @return the BastionHostsInner object. + */ + public BastionHostsInner bastionHosts() { + return this.bastionHosts; + } + + /** + * The DdosCustomPoliciesInner object to access its operations. + */ + private DdosCustomPoliciesInner ddosCustomPolicies; + + /** + * Gets the DdosCustomPoliciesInner object to access its operations. + * @return the DdosCustomPoliciesInner object. + */ + public DdosCustomPoliciesInner ddosCustomPolicies() { + return this.ddosCustomPolicies; + } + + /** + * The DdosProtectionPlansInner object to access its operations. + */ + private DdosProtectionPlansInner ddosProtectionPlans; + + /** + * Gets the DdosProtectionPlansInner object to access its operations. + * @return the DdosProtectionPlansInner object. + */ + public DdosProtectionPlansInner ddosProtectionPlans() { + return this.ddosProtectionPlans; + } + + /** + * The AvailableEndpointServicesInner object to access its operations. + */ + private AvailableEndpointServicesInner availableEndpointServices; + + /** + * Gets the AvailableEndpointServicesInner object to access its operations. + * @return the AvailableEndpointServicesInner object. + */ + public AvailableEndpointServicesInner availableEndpointServices() { + return this.availableEndpointServices; + } + + /** + * The ExpressRouteCircuitAuthorizationsInner object to access its operations. + */ + private ExpressRouteCircuitAuthorizationsInner expressRouteCircuitAuthorizations; + + /** + * Gets the ExpressRouteCircuitAuthorizationsInner object to access its operations. + * @return the ExpressRouteCircuitAuthorizationsInner object. + */ + public ExpressRouteCircuitAuthorizationsInner expressRouteCircuitAuthorizations() { + return this.expressRouteCircuitAuthorizations; + } + + /** + * The ExpressRouteCircuitPeeringsInner object to access its operations. + */ + private ExpressRouteCircuitPeeringsInner expressRouteCircuitPeerings; + + /** + * Gets the ExpressRouteCircuitPeeringsInner object to access its operations. + * @return the ExpressRouteCircuitPeeringsInner object. + */ + public ExpressRouteCircuitPeeringsInner expressRouteCircuitPeerings() { + return this.expressRouteCircuitPeerings; + } + + /** + * The ExpressRouteCircuitConnectionsInner object to access its operations. + */ + private ExpressRouteCircuitConnectionsInner expressRouteCircuitConnections; + + /** + * Gets the ExpressRouteCircuitConnectionsInner object to access its operations. + * @return the ExpressRouteCircuitConnectionsInner object. + */ + public ExpressRouteCircuitConnectionsInner expressRouteCircuitConnections() { + return this.expressRouteCircuitConnections; + } + + /** + * The PeerExpressRouteCircuitConnectionsInner object to access its operations. + */ + private PeerExpressRouteCircuitConnectionsInner peerExpressRouteCircuitConnections; + + /** + * Gets the PeerExpressRouteCircuitConnectionsInner object to access its operations. + * @return the PeerExpressRouteCircuitConnectionsInner object. + */ + public PeerExpressRouteCircuitConnectionsInner peerExpressRouteCircuitConnections() { + return this.peerExpressRouteCircuitConnections; + } + + /** + * The ExpressRouteCircuitsInner object to access its operations. + */ + private ExpressRouteCircuitsInner expressRouteCircuits; + + /** + * Gets the ExpressRouteCircuitsInner object to access its operations. + * @return the ExpressRouteCircuitsInner object. + */ + public ExpressRouteCircuitsInner expressRouteCircuits() { + return this.expressRouteCircuits; + } + + /** + * The ExpressRouteServiceProvidersInner object to access its operations. + */ + private ExpressRouteServiceProvidersInner expressRouteServiceProviders; + + /** + * Gets the ExpressRouteServiceProvidersInner object to access its operations. + * @return the ExpressRouteServiceProvidersInner object. + */ + public ExpressRouteServiceProvidersInner expressRouteServiceProviders() { + return this.expressRouteServiceProviders; + } + + /** + * The ExpressRouteCrossConnectionsInner object to access its operations. + */ + private ExpressRouteCrossConnectionsInner expressRouteCrossConnections; + + /** + * Gets the ExpressRouteCrossConnectionsInner object to access its operations. + * @return the ExpressRouteCrossConnectionsInner object. + */ + public ExpressRouteCrossConnectionsInner expressRouteCrossConnections() { + return this.expressRouteCrossConnections; + } + + /** + * The ExpressRouteCrossConnectionPeeringsInner object to access its operations. + */ + private ExpressRouteCrossConnectionPeeringsInner expressRouteCrossConnectionPeerings; + + /** + * Gets the ExpressRouteCrossConnectionPeeringsInner object to access its operations. + * @return the ExpressRouteCrossConnectionPeeringsInner object. + */ + public ExpressRouteCrossConnectionPeeringsInner expressRouteCrossConnectionPeerings() { + return this.expressRouteCrossConnectionPeerings; + } + + /** + * The ExpressRouteGatewaysInner object to access its operations. + */ + private ExpressRouteGatewaysInner expressRouteGateways; + + /** + * Gets the ExpressRouteGatewaysInner object to access its operations. + * @return the ExpressRouteGatewaysInner object. + */ + public ExpressRouteGatewaysInner expressRouteGateways() { + return this.expressRouteGateways; + } + + /** + * The ExpressRouteConnectionsInner object to access its operations. + */ + private ExpressRouteConnectionsInner expressRouteConnections; + + /** + * Gets the ExpressRouteConnectionsInner object to access its operations. + * @return the ExpressRouteConnectionsInner object. + */ + public ExpressRouteConnectionsInner expressRouteConnections() { + return this.expressRouteConnections; + } + + /** + * The ExpressRoutePortsLocationsInner object to access its operations. + */ + private ExpressRoutePortsLocationsInner expressRoutePortsLocations; + + /** + * Gets the ExpressRoutePortsLocationsInner object to access its operations. + * @return the ExpressRoutePortsLocationsInner object. + */ + public ExpressRoutePortsLocationsInner expressRoutePortsLocations() { + return this.expressRoutePortsLocations; + } + + /** + * The ExpressRoutePortsInner object to access its operations. + */ + private ExpressRoutePortsInner expressRoutePorts; + + /** + * Gets the ExpressRoutePortsInner object to access its operations. + * @return the ExpressRoutePortsInner object. + */ + public ExpressRoutePortsInner expressRoutePorts() { + return this.expressRoutePorts; + } + + /** + * The ExpressRouteLinksInner object to access its operations. + */ + private ExpressRouteLinksInner expressRouteLinks; + + /** + * Gets the ExpressRouteLinksInner object to access its operations. + * @return the ExpressRouteLinksInner object. + */ + public ExpressRouteLinksInner expressRouteLinks() { + return this.expressRouteLinks; + } + + /** + * The FirewallPoliciesInner object to access its operations. + */ + private FirewallPoliciesInner firewallPolicies; + + /** + * Gets the FirewallPoliciesInner object to access its operations. + * @return the FirewallPoliciesInner object. + */ + public FirewallPoliciesInner firewallPolicies() { + return this.firewallPolicies; + } + + /** + * The FirewallPolicyRuleGroupsInner object to access its operations. + */ + private FirewallPolicyRuleGroupsInner firewallPolicyRuleGroups; + + /** + * Gets the FirewallPolicyRuleGroupsInner object to access its operations. + * @return the FirewallPolicyRuleGroupsInner object. + */ + public FirewallPolicyRuleGroupsInner firewallPolicyRuleGroups() { + return this.firewallPolicyRuleGroups; + } + + /** + * The IpGroupsInner object to access its operations. + */ + private IpGroupsInner ipGroups; + + /** + * Gets the IpGroupsInner object to access its operations. + * @return the IpGroupsInner object. + */ + public IpGroupsInner ipGroups() { + return this.ipGroups; + } + + /** + * The LoadBalancersInner object to access its operations. + */ + private LoadBalancersInner loadBalancers; + + /** + * Gets the LoadBalancersInner object to access its operations. + * @return the LoadBalancersInner object. + */ + public LoadBalancersInner loadBalancers() { + return this.loadBalancers; + } + + /** + * The LoadBalancerBackendAddressPoolsInner object to access its operations. + */ + private LoadBalancerBackendAddressPoolsInner loadBalancerBackendAddressPools; + + /** + * Gets the LoadBalancerBackendAddressPoolsInner object to access its operations. + * @return the LoadBalancerBackendAddressPoolsInner object. + */ + public LoadBalancerBackendAddressPoolsInner loadBalancerBackendAddressPools() { + return this.loadBalancerBackendAddressPools; + } + + /** + * The LoadBalancerFrontendIPConfigurationsInner object to access its operations. + */ + private LoadBalancerFrontendIPConfigurationsInner loadBalancerFrontendIPConfigurations; + + /** + * Gets the LoadBalancerFrontendIPConfigurationsInner object to access its operations. + * @return the LoadBalancerFrontendIPConfigurationsInner object. + */ + public LoadBalancerFrontendIPConfigurationsInner loadBalancerFrontendIPConfigurations() { + return this.loadBalancerFrontendIPConfigurations; + } + + /** + * The InboundNatRulesInner object to access its operations. + */ + private InboundNatRulesInner inboundNatRules; + + /** + * Gets the InboundNatRulesInner object to access its operations. + * @return the InboundNatRulesInner object. + */ + public InboundNatRulesInner inboundNatRules() { + return this.inboundNatRules; + } + + /** + * The LoadBalancerLoadBalancingRulesInner object to access its operations. + */ + private LoadBalancerLoadBalancingRulesInner loadBalancerLoadBalancingRules; + + /** + * Gets the LoadBalancerLoadBalancingRulesInner object to access its operations. + * @return the LoadBalancerLoadBalancingRulesInner object. + */ + public LoadBalancerLoadBalancingRulesInner loadBalancerLoadBalancingRules() { + return this.loadBalancerLoadBalancingRules; + } + + /** + * The LoadBalancerOutboundRulesInner object to access its operations. + */ + private LoadBalancerOutboundRulesInner loadBalancerOutboundRules; + + /** + * Gets the LoadBalancerOutboundRulesInner object to access its operations. + * @return the LoadBalancerOutboundRulesInner object. + */ + public LoadBalancerOutboundRulesInner loadBalancerOutboundRules() { + return this.loadBalancerOutboundRules; + } + + /** + * The LoadBalancerNetworkInterfacesInner object to access its operations. + */ + private LoadBalancerNetworkInterfacesInner loadBalancerNetworkInterfaces; + + /** + * Gets the LoadBalancerNetworkInterfacesInner object to access its operations. + * @return the LoadBalancerNetworkInterfacesInner object. + */ + public LoadBalancerNetworkInterfacesInner loadBalancerNetworkInterfaces() { + return this.loadBalancerNetworkInterfaces; + } + + /** + * The LoadBalancerProbesInner object to access its operations. + */ + private LoadBalancerProbesInner loadBalancerProbes; + + /** + * Gets the LoadBalancerProbesInner object to access its operations. + * @return the LoadBalancerProbesInner object. + */ + public LoadBalancerProbesInner loadBalancerProbes() { + return this.loadBalancerProbes; + } + + /** + * The NatGatewaysInner object to access its operations. + */ + private NatGatewaysInner natGateways; + + /** + * Gets the NatGatewaysInner object to access its operations. + * @return the NatGatewaysInner object. + */ + public NatGatewaysInner natGateways() { + return this.natGateways; + } + + /** + * The NetworkInterfacesInner object to access its operations. + */ + private NetworkInterfacesInner networkInterfaces; + + /** + * Gets the NetworkInterfacesInner object to access its operations. + * @return the NetworkInterfacesInner object. + */ + public NetworkInterfacesInner networkInterfaces() { + return this.networkInterfaces; + } + + /** + * The NetworkInterfaceIPConfigurationsInner object to access its operations. + */ + private NetworkInterfaceIPConfigurationsInner networkInterfaceIPConfigurations; + + /** + * Gets the NetworkInterfaceIPConfigurationsInner object to access its operations. + * @return the NetworkInterfaceIPConfigurationsInner object. + */ + public NetworkInterfaceIPConfigurationsInner networkInterfaceIPConfigurations() { + return this.networkInterfaceIPConfigurations; + } + + /** + * The NetworkInterfaceLoadBalancersInner object to access its operations. + */ + private NetworkInterfaceLoadBalancersInner networkInterfaceLoadBalancers; + + /** + * Gets the NetworkInterfaceLoadBalancersInner object to access its operations. + * @return the NetworkInterfaceLoadBalancersInner object. + */ + public NetworkInterfaceLoadBalancersInner networkInterfaceLoadBalancers() { + return this.networkInterfaceLoadBalancers; + } + + /** + * The NetworkInterfaceTapConfigurationsInner object to access its operations. + */ + private NetworkInterfaceTapConfigurationsInner networkInterfaceTapConfigurations; + + /** + * Gets the NetworkInterfaceTapConfigurationsInner object to access its operations. + * @return the NetworkInterfaceTapConfigurationsInner object. + */ + public NetworkInterfaceTapConfigurationsInner networkInterfaceTapConfigurations() { + return this.networkInterfaceTapConfigurations; + } + + /** + * The NetworkProfilesInner object to access its operations. + */ + private NetworkProfilesInner networkProfiles; + + /** + * Gets the NetworkProfilesInner object to access its operations. + * @return the NetworkProfilesInner object. + */ + public NetworkProfilesInner networkProfiles() { + return this.networkProfiles; + } + + /** + * The NetworkSecurityGroupsInner object to access its operations. + */ + private NetworkSecurityGroupsInner networkSecurityGroups; + + /** + * Gets the NetworkSecurityGroupsInner object to access its operations. + * @return the NetworkSecurityGroupsInner object. + */ + public NetworkSecurityGroupsInner networkSecurityGroups() { + return this.networkSecurityGroups; + } + + /** + * The SecurityRulesInner object to access its operations. + */ + private SecurityRulesInner securityRules; + + /** + * Gets the SecurityRulesInner object to access its operations. + * @return the SecurityRulesInner object. + */ + public SecurityRulesInner securityRules() { + return this.securityRules; + } + + /** + * The DefaultSecurityRulesInner object to access its operations. + */ + private DefaultSecurityRulesInner defaultSecurityRules; + + /** + * Gets the DefaultSecurityRulesInner object to access its operations. + * @return the DefaultSecurityRulesInner object. + */ + public DefaultSecurityRulesInner defaultSecurityRules() { + return this.defaultSecurityRules; + } + + /** + * The NetworkWatchersInner object to access its operations. + */ + private NetworkWatchersInner networkWatchers; + + /** + * Gets the NetworkWatchersInner object to access its operations. + * @return the NetworkWatchersInner object. + */ + public NetworkWatchersInner networkWatchers() { + return this.networkWatchers; + } + + /** + * The PacketCapturesInner object to access its operations. + */ + private PacketCapturesInner packetCaptures; + + /** + * Gets the PacketCapturesInner object to access its operations. + * @return the PacketCapturesInner object. + */ + public PacketCapturesInner packetCaptures() { + return this.packetCaptures; + } + + /** + * The ConnectionMonitorsInner object to access its operations. + */ + private ConnectionMonitorsInner connectionMonitors; + + /** + * Gets the ConnectionMonitorsInner object to access its operations. + * @return the ConnectionMonitorsInner object. + */ + public ConnectionMonitorsInner connectionMonitors() { + return this.connectionMonitors; + } + + /** + * 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 PrivateEndpointsInner object to access its operations. + */ + private PrivateEndpointsInner privateEndpoints; + + /** + * Gets the PrivateEndpointsInner object to access its operations. + * @return the PrivateEndpointsInner object. + */ + public PrivateEndpointsInner privateEndpoints() { + return this.privateEndpoints; + } + + /** + * The AvailablePrivateEndpointTypesInner object to access its operations. + */ + private AvailablePrivateEndpointTypesInner availablePrivateEndpointTypes; + + /** + * Gets the AvailablePrivateEndpointTypesInner object to access its operations. + * @return the AvailablePrivateEndpointTypesInner object. + */ + public AvailablePrivateEndpointTypesInner availablePrivateEndpointTypes() { + return this.availablePrivateEndpointTypes; + } + + /** + * The PrivateLinkServicesInner object to access its operations. + */ + private PrivateLinkServicesInner privateLinkServices; + + /** + * Gets the PrivateLinkServicesInner object to access its operations. + * @return the PrivateLinkServicesInner object. + */ + public PrivateLinkServicesInner privateLinkServices() { + return this.privateLinkServices; + } + + /** + * The PublicIPAddressesInner object to access its operations. + */ + private PublicIPAddressesInner publicIPAddresses; + + /** + * Gets the PublicIPAddressesInner object to access its operations. + * @return the PublicIPAddressesInner object. + */ + public PublicIPAddressesInner publicIPAddresses() { + return this.publicIPAddresses; + } + + /** + * The PublicIPPrefixesInner object to access its operations. + */ + private PublicIPPrefixesInner publicIPPrefixes; + + /** + * Gets the PublicIPPrefixesInner object to access its operations. + * @return the PublicIPPrefixesInner object. + */ + public PublicIPPrefixesInner publicIPPrefixes() { + return this.publicIPPrefixes; + } + + /** + * The RouteFiltersInner object to access its operations. + */ + private RouteFiltersInner routeFilters; + + /** + * Gets the RouteFiltersInner object to access its operations. + * @return the RouteFiltersInner object. + */ + public RouteFiltersInner routeFilters() { + return this.routeFilters; + } + + /** + * The RouteFilterRulesInner object to access its operations. + */ + private RouteFilterRulesInner routeFilterRules; + + /** + * Gets the RouteFilterRulesInner object to access its operations. + * @return the RouteFilterRulesInner object. + */ + public RouteFilterRulesInner routeFilterRules() { + return this.routeFilterRules; + } + + /** + * The RouteTablesInner object to access its operations. + */ + private RouteTablesInner routeTables; + + /** + * Gets the RouteTablesInner object to access its operations. + * @return the RouteTablesInner object. + */ + public RouteTablesInner routeTables() { + return this.routeTables; + } + + /** + * The RoutesInner object to access its operations. + */ + private RoutesInner routes; + + /** + * Gets the RoutesInner object to access its operations. + * @return the RoutesInner object. + */ + public RoutesInner routes() { + return this.routes; + } + + /** + * The BgpServiceCommunitiesInner object to access its operations. + */ + private BgpServiceCommunitiesInner bgpServiceCommunities; + + /** + * Gets the BgpServiceCommunitiesInner object to access its operations. + * @return the BgpServiceCommunitiesInner object. + */ + public BgpServiceCommunitiesInner bgpServiceCommunities() { + return this.bgpServiceCommunities; + } + + /** + * The ServiceEndpointPoliciesInner object to access its operations. + */ + private ServiceEndpointPoliciesInner serviceEndpointPolicies; + + /** + * Gets the ServiceEndpointPoliciesInner object to access its operations. + * @return the ServiceEndpointPoliciesInner object. + */ + public ServiceEndpointPoliciesInner serviceEndpointPolicies() { + return this.serviceEndpointPolicies; + } + + /** + * The ServiceEndpointPolicyDefinitionsInner object to access its operations. + */ + private ServiceEndpointPolicyDefinitionsInner serviceEndpointPolicyDefinitions; + + /** + * Gets the ServiceEndpointPolicyDefinitionsInner object to access its operations. + * @return the ServiceEndpointPolicyDefinitionsInner object. + */ + public ServiceEndpointPolicyDefinitionsInner serviceEndpointPolicyDefinitions() { + return this.serviceEndpointPolicyDefinitions; + } + + /** + * The ServiceTagsInner object to access its operations. + */ + private ServiceTagsInner serviceTags; + + /** + * Gets the ServiceTagsInner object to access its operations. + * @return the ServiceTagsInner object. + */ + public ServiceTagsInner serviceTags() { + return this.serviceTags; + } + + /** + * The UsagesInner object to access its operations. + */ + private UsagesInner usages; + + /** + * Gets the UsagesInner object to access its operations. + * @return the UsagesInner object. + */ + public UsagesInner usages() { + return this.usages; + } + + /** + * The VirtualNetworksInner object to access its operations. + */ + private VirtualNetworksInner virtualNetworks; + + /** + * Gets the VirtualNetworksInner object to access its operations. + * @return the VirtualNetworksInner object. + */ + public VirtualNetworksInner virtualNetworks() { + return this.virtualNetworks; + } + + /** + * The SubnetsInner object to access its operations. + */ + private SubnetsInner subnets; + + /** + * Gets the SubnetsInner object to access its operations. + * @return the SubnetsInner object. + */ + public SubnetsInner subnets() { + return this.subnets; + } + + /** + * The ResourceNavigationLinksInner object to access its operations. + */ + private ResourceNavigationLinksInner resourceNavigationLinks; + + /** + * Gets the ResourceNavigationLinksInner object to access its operations. + * @return the ResourceNavigationLinksInner object. + */ + public ResourceNavigationLinksInner resourceNavigationLinks() { + return this.resourceNavigationLinks; + } + + /** + * The ServiceAssociationLinksInner object to access its operations. + */ + private ServiceAssociationLinksInner serviceAssociationLinks; + + /** + * Gets the ServiceAssociationLinksInner object to access its operations. + * @return the ServiceAssociationLinksInner object. + */ + public ServiceAssociationLinksInner serviceAssociationLinks() { + return this.serviceAssociationLinks; + } + + /** + * The VirtualNetworkPeeringsInner object to access its operations. + */ + private VirtualNetworkPeeringsInner virtualNetworkPeerings; + + /** + * Gets the VirtualNetworkPeeringsInner object to access its operations. + * @return the VirtualNetworkPeeringsInner object. + */ + public VirtualNetworkPeeringsInner virtualNetworkPeerings() { + return this.virtualNetworkPeerings; + } + + /** + * The VirtualNetworkGatewaysInner object to access its operations. + */ + private VirtualNetworkGatewaysInner virtualNetworkGateways; + + /** + * Gets the VirtualNetworkGatewaysInner object to access its operations. + * @return the VirtualNetworkGatewaysInner object. + */ + public VirtualNetworkGatewaysInner virtualNetworkGateways() { + return this.virtualNetworkGateways; + } + + /** + * The VirtualNetworkGatewayConnectionsInner object to access its operations. + */ + private VirtualNetworkGatewayConnectionsInner virtualNetworkGatewayConnections; + + /** + * Gets the VirtualNetworkGatewayConnectionsInner object to access its operations. + * @return the VirtualNetworkGatewayConnectionsInner object. + */ + public VirtualNetworkGatewayConnectionsInner virtualNetworkGatewayConnections() { + return this.virtualNetworkGatewayConnections; + } + + /** + * The LocalNetworkGatewaysInner object to access its operations. + */ + private LocalNetworkGatewaysInner localNetworkGateways; + + /** + * Gets the LocalNetworkGatewaysInner object to access its operations. + * @return the LocalNetworkGatewaysInner object. + */ + public LocalNetworkGatewaysInner localNetworkGateways() { + return this.localNetworkGateways; + } + + /** + * The VirtualNetworkTapsInner object to access its operations. + */ + private VirtualNetworkTapsInner virtualNetworkTaps; + + /** + * Gets the VirtualNetworkTapsInner object to access its operations. + * @return the VirtualNetworkTapsInner object. + */ + public VirtualNetworkTapsInner virtualNetworkTaps() { + return this.virtualNetworkTaps; + } + + /** + * The VirtualRoutersInner object to access its operations. + */ + private VirtualRoutersInner virtualRouters; + + /** + * Gets the VirtualRoutersInner object to access its operations. + * @return the VirtualRoutersInner object. + */ + public VirtualRoutersInner virtualRouters() { + return this.virtualRouters; + } + + /** + * The VirtualRouterPeeringsInner object to access its operations. + */ + private VirtualRouterPeeringsInner virtualRouterPeerings; + + /** + * Gets the VirtualRouterPeeringsInner object to access its operations. + * @return the VirtualRouterPeeringsInner object. + */ + public VirtualRouterPeeringsInner virtualRouterPeerings() { + return this.virtualRouterPeerings; + } + + /** + * The VirtualWansInner object to access its operations. + */ + private VirtualWansInner virtualWans; + + /** + * Gets the VirtualWansInner object to access its operations. + * @return the VirtualWansInner object. + */ + public VirtualWansInner virtualWans() { + return this.virtualWans; + } + + /** + * The VpnSitesInner object to access its operations. + */ + private VpnSitesInner vpnSites; + + /** + * Gets the VpnSitesInner object to access its operations. + * @return the VpnSitesInner object. + */ + public VpnSitesInner vpnSites() { + return this.vpnSites; + } + + /** + * The VpnSiteLinksInner object to access its operations. + */ + private VpnSiteLinksInner vpnSiteLinks; + + /** + * Gets the VpnSiteLinksInner object to access its operations. + * @return the VpnSiteLinksInner object. + */ + public VpnSiteLinksInner vpnSiteLinks() { + return this.vpnSiteLinks; + } + + /** + * The VpnSitesConfigurationsInner object to access its operations. + */ + private VpnSitesConfigurationsInner vpnSitesConfigurations; + + /** + * Gets the VpnSitesConfigurationsInner object to access its operations. + * @return the VpnSitesConfigurationsInner object. + */ + public VpnSitesConfigurationsInner vpnSitesConfigurations() { + return this.vpnSitesConfigurations; + } + + /** + * The VpnServerConfigurationsInner object to access its operations. + */ + private VpnServerConfigurationsInner vpnServerConfigurations; + + /** + * Gets the VpnServerConfigurationsInner object to access its operations. + * @return the VpnServerConfigurationsInner object. + */ + public VpnServerConfigurationsInner vpnServerConfigurations() { + return this.vpnServerConfigurations; + } + + /** + * The VirtualHubsInner object to access its operations. + */ + private VirtualHubsInner virtualHubs; + + /** + * Gets the VirtualHubsInner object to access its operations. + * @return the VirtualHubsInner object. + */ + public VirtualHubsInner virtualHubs() { + return this.virtualHubs; + } + + /** + * The HubVirtualNetworkConnectionsInner object to access its operations. + */ + private HubVirtualNetworkConnectionsInner hubVirtualNetworkConnections; + + /** + * Gets the HubVirtualNetworkConnectionsInner object to access its operations. + * @return the HubVirtualNetworkConnectionsInner object. + */ + public HubVirtualNetworkConnectionsInner hubVirtualNetworkConnections() { + return this.hubVirtualNetworkConnections; + } + + /** + * The VpnGatewaysInner object to access its operations. + */ + private VpnGatewaysInner vpnGateways; + + /** + * Gets the VpnGatewaysInner object to access its operations. + * @return the VpnGatewaysInner object. + */ + public VpnGatewaysInner vpnGateways() { + return this.vpnGateways; + } + + /** + * The VpnConnectionsInner object to access its operations. + */ + private VpnConnectionsInner vpnConnections; + + /** + * Gets the VpnConnectionsInner object to access its operations. + * @return the VpnConnectionsInner object. + */ + public VpnConnectionsInner vpnConnections() { + return this.vpnConnections; + } + + /** + * The VpnSiteLinkConnectionsInner object to access its operations. + */ + private VpnSiteLinkConnectionsInner vpnSiteLinkConnections; + + /** + * Gets the VpnSiteLinkConnectionsInner object to access its operations. + * @return the VpnSiteLinkConnectionsInner object. + */ + public VpnSiteLinkConnectionsInner vpnSiteLinkConnections() { + return this.vpnSiteLinkConnections; + } + + /** + * The VpnLinkConnectionsInner object to access its operations. + */ + private VpnLinkConnectionsInner vpnLinkConnections; + + /** + * Gets the VpnLinkConnectionsInner object to access its operations. + * @return the VpnLinkConnectionsInner object. + */ + public VpnLinkConnectionsInner vpnLinkConnections() { + return this.vpnLinkConnections; + } + + /** + * The P2sVpnGatewaysInner object to access its operations. + */ + private P2sVpnGatewaysInner p2sVpnGateways; + + /** + * Gets the P2sVpnGatewaysInner object to access its operations. + * @return the P2sVpnGatewaysInner object. + */ + public P2sVpnGatewaysInner p2sVpnGateways() { + return this.p2sVpnGateways; + } + + /** + * The VpnServerConfigurationsAssociatedWithVirtualWansInner object to access its operations. + */ + private VpnServerConfigurationsAssociatedWithVirtualWansInner vpnServerConfigurationsAssociatedWithVirtualWans; + + /** + * Gets the VpnServerConfigurationsAssociatedWithVirtualWansInner object to access its operations. + * @return the VpnServerConfigurationsAssociatedWithVirtualWansInner object. + */ + public VpnServerConfigurationsAssociatedWithVirtualWansInner vpnServerConfigurationsAssociatedWithVirtualWans() { + return this.vpnServerConfigurationsAssociatedWithVirtualWans; + } + + /** + * The VirtualHubRouteTableV2sInner object to access its operations. + */ + private VirtualHubRouteTableV2sInner virtualHubRouteTableV2s; + + /** + * Gets the VirtualHubRouteTableV2sInner object to access its operations. + * @return the VirtualHubRouteTableV2sInner object. + */ + public VirtualHubRouteTableV2sInner virtualHubRouteTableV2s() { + return this.virtualHubRouteTableV2s; + } + + /** + * The WebApplicationFirewallPoliciesInner object to access its operations. + */ + private WebApplicationFirewallPoliciesInner webApplicationFirewallPolicies; + + /** + * Gets the WebApplicationFirewallPoliciesInner object to access its operations. + * @return the WebApplicationFirewallPoliciesInner object. + */ + public WebApplicationFirewallPoliciesInner webApplicationFirewallPolicies() { + return this.webApplicationFirewallPolicies; + } + + /** + * Initializes an instance of NetworkManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public NetworkManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of NetworkManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public NetworkManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of NetworkManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public NetworkManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2019-09-01"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.applicationGateways = new ApplicationGatewaysInner(restClient().retrofit(), this); + this.applicationSecurityGroups = new ApplicationSecurityGroupsInner(restClient().retrofit(), this); + this.availableDelegations = new AvailableDelegationsInner(restClient().retrofit(), this); + this.availableResourceGroupDelegations = new AvailableResourceGroupDelegationsInner(restClient().retrofit(), this); + this.availableServiceAliases = new AvailableServiceAliasesInner(restClient().retrofit(), this); + this.azureFirewalls = new AzureFirewallsInner(restClient().retrofit(), this); + this.azureFirewallFqdnTags = new AzureFirewallFqdnTagsInner(restClient().retrofit(), this); + this.bastionHosts = new BastionHostsInner(restClient().retrofit(), this); + this.ddosCustomPolicies = new DdosCustomPoliciesInner(restClient().retrofit(), this); + this.ddosProtectionPlans = new DdosProtectionPlansInner(restClient().retrofit(), this); + this.availableEndpointServices = new AvailableEndpointServicesInner(restClient().retrofit(), this); + this.expressRouteCircuitAuthorizations = new ExpressRouteCircuitAuthorizationsInner(restClient().retrofit(), this); + this.expressRouteCircuitPeerings = new ExpressRouteCircuitPeeringsInner(restClient().retrofit(), this); + this.expressRouteCircuitConnections = new ExpressRouteCircuitConnectionsInner(restClient().retrofit(), this); + this.peerExpressRouteCircuitConnections = new PeerExpressRouteCircuitConnectionsInner(restClient().retrofit(), this); + this.expressRouteCircuits = new ExpressRouteCircuitsInner(restClient().retrofit(), this); + this.expressRouteServiceProviders = new ExpressRouteServiceProvidersInner(restClient().retrofit(), this); + this.expressRouteCrossConnections = new ExpressRouteCrossConnectionsInner(restClient().retrofit(), this); + this.expressRouteCrossConnectionPeerings = new ExpressRouteCrossConnectionPeeringsInner(restClient().retrofit(), this); + this.expressRouteGateways = new ExpressRouteGatewaysInner(restClient().retrofit(), this); + this.expressRouteConnections = new ExpressRouteConnectionsInner(restClient().retrofit(), this); + this.expressRoutePortsLocations = new ExpressRoutePortsLocationsInner(restClient().retrofit(), this); + this.expressRoutePorts = new ExpressRoutePortsInner(restClient().retrofit(), this); + this.expressRouteLinks = new ExpressRouteLinksInner(restClient().retrofit(), this); + this.firewallPolicies = new FirewallPoliciesInner(restClient().retrofit(), this); + this.firewallPolicyRuleGroups = new FirewallPolicyRuleGroupsInner(restClient().retrofit(), this); + this.ipGroups = new IpGroupsInner(restClient().retrofit(), this); + this.loadBalancers = new LoadBalancersInner(restClient().retrofit(), this); + this.loadBalancerBackendAddressPools = new LoadBalancerBackendAddressPoolsInner(restClient().retrofit(), this); + this.loadBalancerFrontendIPConfigurations = new LoadBalancerFrontendIPConfigurationsInner(restClient().retrofit(), this); + this.inboundNatRules = new InboundNatRulesInner(restClient().retrofit(), this); + this.loadBalancerLoadBalancingRules = new LoadBalancerLoadBalancingRulesInner(restClient().retrofit(), this); + this.loadBalancerOutboundRules = new LoadBalancerOutboundRulesInner(restClient().retrofit(), this); + this.loadBalancerNetworkInterfaces = new LoadBalancerNetworkInterfacesInner(restClient().retrofit(), this); + this.loadBalancerProbes = new LoadBalancerProbesInner(restClient().retrofit(), this); + this.natGateways = new NatGatewaysInner(restClient().retrofit(), this); + this.networkInterfaces = new NetworkInterfacesInner(restClient().retrofit(), this); + this.networkInterfaceIPConfigurations = new NetworkInterfaceIPConfigurationsInner(restClient().retrofit(), this); + this.networkInterfaceLoadBalancers = new NetworkInterfaceLoadBalancersInner(restClient().retrofit(), this); + this.networkInterfaceTapConfigurations = new NetworkInterfaceTapConfigurationsInner(restClient().retrofit(), this); + this.networkProfiles = new NetworkProfilesInner(restClient().retrofit(), this); + this.networkSecurityGroups = new NetworkSecurityGroupsInner(restClient().retrofit(), this); + this.securityRules = new SecurityRulesInner(restClient().retrofit(), this); + this.defaultSecurityRules = new DefaultSecurityRulesInner(restClient().retrofit(), this); + this.networkWatchers = new NetworkWatchersInner(restClient().retrofit(), this); + this.packetCaptures = new PacketCapturesInner(restClient().retrofit(), this); + this.connectionMonitors = new ConnectionMonitorsInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.privateEndpoints = new PrivateEndpointsInner(restClient().retrofit(), this); + this.availablePrivateEndpointTypes = new AvailablePrivateEndpointTypesInner(restClient().retrofit(), this); + this.privateLinkServices = new PrivateLinkServicesInner(restClient().retrofit(), this); + this.publicIPAddresses = new PublicIPAddressesInner(restClient().retrofit(), this); + this.publicIPPrefixes = new PublicIPPrefixesInner(restClient().retrofit(), this); + this.routeFilters = new RouteFiltersInner(restClient().retrofit(), this); + this.routeFilterRules = new RouteFilterRulesInner(restClient().retrofit(), this); + this.routeTables = new RouteTablesInner(restClient().retrofit(), this); + this.routes = new RoutesInner(restClient().retrofit(), this); + this.bgpServiceCommunities = new BgpServiceCommunitiesInner(restClient().retrofit(), this); + this.serviceEndpointPolicies = new ServiceEndpointPoliciesInner(restClient().retrofit(), this); + this.serviceEndpointPolicyDefinitions = new ServiceEndpointPolicyDefinitionsInner(restClient().retrofit(), this); + this.serviceTags = new ServiceTagsInner(restClient().retrofit(), this); + this.usages = new UsagesInner(restClient().retrofit(), this); + this.virtualNetworks = new VirtualNetworksInner(restClient().retrofit(), this); + this.subnets = new SubnetsInner(restClient().retrofit(), this); + this.resourceNavigationLinks = new ResourceNavigationLinksInner(restClient().retrofit(), this); + this.serviceAssociationLinks = new ServiceAssociationLinksInner(restClient().retrofit(), this); + this.virtualNetworkPeerings = new VirtualNetworkPeeringsInner(restClient().retrofit(), this); + this.virtualNetworkGateways = new VirtualNetworkGatewaysInner(restClient().retrofit(), this); + this.virtualNetworkGatewayConnections = new VirtualNetworkGatewayConnectionsInner(restClient().retrofit(), this); + this.localNetworkGateways = new LocalNetworkGatewaysInner(restClient().retrofit(), this); + this.virtualNetworkTaps = new VirtualNetworkTapsInner(restClient().retrofit(), this); + this.virtualRouters = new VirtualRoutersInner(restClient().retrofit(), this); + this.virtualRouterPeerings = new VirtualRouterPeeringsInner(restClient().retrofit(), this); + this.virtualWans = new VirtualWansInner(restClient().retrofit(), this); + this.vpnSites = new VpnSitesInner(restClient().retrofit(), this); + this.vpnSiteLinks = new VpnSiteLinksInner(restClient().retrofit(), this); + this.vpnSitesConfigurations = new VpnSitesConfigurationsInner(restClient().retrofit(), this); + this.vpnServerConfigurations = new VpnServerConfigurationsInner(restClient().retrofit(), this); + this.virtualHubs = new VirtualHubsInner(restClient().retrofit(), this); + this.hubVirtualNetworkConnections = new HubVirtualNetworkConnectionsInner(restClient().retrofit(), this); + this.vpnGateways = new VpnGatewaysInner(restClient().retrofit(), this); + this.vpnConnections = new VpnConnectionsInner(restClient().retrofit(), this); + this.vpnSiteLinkConnections = new VpnSiteLinkConnectionsInner(restClient().retrofit(), this); + this.vpnLinkConnections = new VpnLinkConnectionsInner(restClient().retrofit(), this); + this.p2sVpnGateways = new P2sVpnGatewaysInner(restClient().retrofit(), this); + this.vpnServerConfigurationsAssociatedWithVirtualWans = new VpnServerConfigurationsAssociatedWithVirtualWansInner(restClient().retrofit(), this); + this.virtualHubRouteTableV2s = new VirtualHubRouteTableV2sInner(restClient().retrofit(), this); + this.webApplicationFirewallPolicies = new WebApplicationFirewallPoliciesInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + initializeService(); + } + + /** + * 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(), "NetworkManagementClient", "2019-09-01"); + } + + private void initializeService() { + service = restClient().retrofit().create(NetworkManagementClientService.class); + } + + /** + * The interface defining all the services for NetworkManagementClient to be + * used by Retrofit to perform actually REST calls. + */ + interface NetworkManagementClientService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkManagementClient checkDnsNameAvailability" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability") + Observable> checkDnsNameAvailability(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("domainNameLabel") String domainNameLabel, @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.network.v2019_09_01.NetworkManagementClient supportedSecurityProviders" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders") + Observable> supportedSecurityProviders(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualWANName") String virtualWANName, @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.network.v2019_09_01.NetworkManagementClient generatevirtualwanvpnserverconfigurationvpnprofile" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile") + Observable> generatevirtualwanvpnserverconfigurationvpnprofile(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualWANName") String virtualWANName, @Body VirtualWanVpnProfileParameters vpnClientParams, @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.network.v2019_09_01.NetworkManagementClient beginGeneratevirtualwanvpnserverconfigurationvpnprofile" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile") + Observable> beginGeneratevirtualwanvpnserverconfigurationvpnprofile(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualWANName") String virtualWANName, @Body VirtualWanVpnProfileParameters vpnClientParams, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * + * @param location The location of the domain name. + * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DnsNameAvailabilityResultInner object if successful. + */ + public DnsNameAvailabilityResultInner checkDnsNameAvailability(String location, String domainNameLabel) { + return checkDnsNameAvailabilityWithServiceResponseAsync(location, domainNameLabel).toBlocking().single().body(); + } + + /** + * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * + * @param location The location of the domain name. + * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + * @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 checkDnsNameAvailabilityAsync(String location, String domainNameLabel, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkDnsNameAvailabilityWithServiceResponseAsync(location, domainNameLabel), serviceCallback); + } + + /** + * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * + * @param location The location of the domain name. + * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DnsNameAvailabilityResultInner object + */ + public Observable checkDnsNameAvailabilityAsync(String location, String domainNameLabel) { + return checkDnsNameAvailabilityWithServiceResponseAsync(location, domainNameLabel).map(new Func1, DnsNameAvailabilityResultInner>() { + @Override + public DnsNameAvailabilityResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * + * @param location The location of the domain name. + * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DnsNameAvailabilityResultInner object + */ + public Observable> checkDnsNameAvailabilityWithServiceResponseAsync(String location, String domainNameLabel) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (domainNameLabel == null) { + throw new IllegalArgumentException("Parameter domainNameLabel is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.checkDnsNameAvailability(location, this.subscriptionId(), domainNameLabel, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkDnsNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkDnsNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gives the supported security providers for the virtual wan. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which supported security providers are needed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualWanSecurityProvidersInner object if successful. + */ + public VirtualWanSecurityProvidersInner supportedSecurityProviders(String resourceGroupName, String virtualWANName) { + return supportedSecurityProvidersWithServiceResponseAsync(resourceGroupName, virtualWANName).toBlocking().single().body(); + } + + /** + * Gives the supported security providers for the virtual wan. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which supported security providers are needed. + * @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 supportedSecurityProvidersAsync(String resourceGroupName, String virtualWANName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(supportedSecurityProvidersWithServiceResponseAsync(resourceGroupName, virtualWANName), serviceCallback); + } + + /** + * Gives the supported security providers for the virtual wan. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which supported security providers are needed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualWanSecurityProvidersInner object + */ + public Observable supportedSecurityProvidersAsync(String resourceGroupName, String virtualWANName) { + return supportedSecurityProvidersWithServiceResponseAsync(resourceGroupName, virtualWANName).map(new Func1, VirtualWanSecurityProvidersInner>() { + @Override + public VirtualWanSecurityProvidersInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gives the supported security providers for the virtual wan. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which supported security providers are needed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualWanSecurityProvidersInner object + */ + public Observable> supportedSecurityProvidersWithServiceResponseAsync(String resourceGroupName, String virtualWANName) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.supportedSecurityProviders(this.subscriptionId(), resourceGroupName, virtualWANName, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = supportedSecurityProvidersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse supportedSecurityProvidersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation 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 VpnProfileResponseInner object if successful. + */ + public VpnProfileResponseInner generatevirtualwanvpnserverconfigurationvpnprofile(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { + return generatevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams).toBlocking().last().body(); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation 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 generatevirtualwanvpnserverconfigurationvpnprofileAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(generatevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams), serviceCallback); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable generatevirtualwanvpnserverconfigurationvpnprofileAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { + return generatevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams).map(new Func1, VpnProfileResponseInner>() { + @Override + public VpnProfileResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> generatevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + if (vpnClientParams == null) { + throw new IllegalArgumentException("Parameter vpnClientParams is required and cannot be null."); + } + Validator.validate(vpnClientParams); + final String apiVersion = "2019-09-01"; + Observable> observable = service.generatevirtualwanvpnserverconfigurationvpnprofile(this.subscriptionId(), resourceGroupName, virtualWANName, vpnClientParams, apiVersion, this.acceptLanguage(), this.userAgent()); + return this.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation 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 VpnProfileResponseInner object if successful. + */ + public VpnProfileResponseInner beginGeneratevirtualwanvpnserverconfigurationvpnprofile(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { + return beginGeneratevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams).toBlocking().single().body(); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation 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 beginGeneratevirtualwanvpnserverconfigurationvpnprofileAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGeneratevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams), serviceCallback); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnProfileResponseInner object + */ + public Observable beginGeneratevirtualwanvpnserverconfigurationvpnprofileAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { + return beginGeneratevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams).map(new Func1, VpnProfileResponseInner>() { + @Override + public VpnProfileResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnProfileResponseInner object + */ + public Observable> beginGeneratevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + if (vpnClientParams == null) { + throw new IllegalArgumentException("Parameter vpnClientParams is required and cannot be null."); + } + Validator.validate(vpnClientParams); + final String apiVersion = "2019-09-01"; + return service.beginGeneratevirtualwanvpnserverconfigurationvpnprofile(this.subscriptionId(), resourceGroupName, virtualWANName, vpnClientParams, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGeneratevirtualwanvpnserverconfigurationvpnprofileDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGeneratevirtualwanvpnserverconfigurationvpnprofileDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkManager.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkManager.java new file mode 100644 index 000000000000..446bcd61d9ae --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkManager.java @@ -0,0 +1,1143 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.ApplicationGateways; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationSecurityGroups; +import com.microsoft.azure.management.network.v2019_09_01.AvailableDelegations; +import com.microsoft.azure.management.network.v2019_09_01.AvailableResourceGroupDelegations; +import com.microsoft.azure.management.network.v2019_09_01.AvailableServiceAliases; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewalls; +import com.microsoft.azure.management.network.v2019_09_01.AzureFirewallFqdnTags; +import com.microsoft.azure.management.network.v2019_09_01.BastionHosts; +import com.microsoft.azure.management.network.v2019_09_01.DdosCustomPolicies; +import com.microsoft.azure.management.network.v2019_09_01.DdosProtectionPlans; +import com.microsoft.azure.management.network.v2019_09_01.AvailableEndpointServices; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitAuthorizations; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeerings; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitConnections; +import com.microsoft.azure.management.network.v2019_09_01.PeerExpressRouteCircuitConnections; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuits; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteServiceProviders; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnections; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCrossConnectionPeerings; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteGateways; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteConnections; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePortsLocations; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePorts; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteLinks; +import com.microsoft.azure.management.network.v2019_09_01.FirewallPolicies; +import com.microsoft.azure.management.network.v2019_09_01.FirewallPolicyRuleGroups; +import com.microsoft.azure.management.network.v2019_09_01.IpGroups; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancers; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerBackendAddressPools; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerFrontendIPConfigurations; +import com.microsoft.azure.management.network.v2019_09_01.InboundNatRules; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerLoadBalancingRules; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerOutboundRules; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerNetworkInterfaces; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerProbes; +import com.microsoft.azure.management.network.v2019_09_01.NatGateways; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaces; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceIPConfigurations; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceLoadBalancers; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceTapConfigurations; +import com.microsoft.azure.management.network.v2019_09_01.NetworkProfiles; +import com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroups; +import com.microsoft.azure.management.network.v2019_09_01.SecurityRules; +import com.microsoft.azure.management.network.v2019_09_01.DefaultSecurityRules; +import com.microsoft.azure.management.network.v2019_09_01.NetworkWatchers; +import com.microsoft.azure.management.network.v2019_09_01.PacketCaptures; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionMonitors; +import com.microsoft.azure.management.network.v2019_09_01.Operations; +import com.microsoft.azure.management.network.v2019_09_01.PrivateEndpoints; +import com.microsoft.azure.management.network.v2019_09_01.AvailablePrivateEndpointTypes; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServices; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPAddresses; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPPrefixes; +import com.microsoft.azure.management.network.v2019_09_01.RouteFilters; +import com.microsoft.azure.management.network.v2019_09_01.RouteFilterRules; +import com.microsoft.azure.management.network.v2019_09_01.RouteTables; +import com.microsoft.azure.management.network.v2019_09_01.Routes; +import com.microsoft.azure.management.network.v2019_09_01.BgpServiceCommunities; +import com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPolicies; +import com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPolicyDefinitions; +import com.microsoft.azure.management.network.v2019_09_01.ServiceTags; +import com.microsoft.azure.management.network.v2019_09_01.Usages; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworks; +import com.microsoft.azure.management.network.v2019_09_01.Subnets; +import com.microsoft.azure.management.network.v2019_09_01.ResourceNavigationLinks; +import com.microsoft.azure.management.network.v2019_09_01.ServiceAssociationLinks; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkPeerings; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGateways; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnections; +import com.microsoft.azure.management.network.v2019_09_01.LocalNetworkGateways; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkTaps; +import com.microsoft.azure.management.network.v2019_09_01.VirtualRouters; +import com.microsoft.azure.management.network.v2019_09_01.VirtualRouterPeerings; +import com.microsoft.azure.management.network.v2019_09_01.VirtualWans; +import com.microsoft.azure.management.network.v2019_09_01.VpnSites; +import com.microsoft.azure.management.network.v2019_09_01.VpnSiteLinks; +import com.microsoft.azure.management.network.v2019_09_01.VpnSitesConfigurations; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigurations; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHubs; +import com.microsoft.azure.management.network.v2019_09_01.HubVirtualNetworkConnections; +import com.microsoft.azure.management.network.v2019_09_01.VpnGateways; +import com.microsoft.azure.management.network.v2019_09_01.VpnConnections; +import com.microsoft.azure.management.network.v2019_09_01.VpnSiteLinkConnections; +import com.microsoft.azure.management.network.v2019_09_01.VpnLinkConnections; +import com.microsoft.azure.management.network.v2019_09_01.P2sVpnGateways; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigurationsAssociatedWithVirtualWans; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHubRouteTableV2s; +import com.microsoft.azure.management.network.v2019_09_01.WebApplicationFirewallPolicies; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure Network resource management. + */ +public final class NetworkManager extends ManagerCore { + private ApplicationGateways applicationGateways; + private ApplicationSecurityGroups applicationSecurityGroups; + private AvailableDelegations availableDelegations; + private AvailableResourceGroupDelegations availableResourceGroupDelegations; + private AvailableServiceAliases availableServiceAliases; + private AzureFirewalls azureFirewalls; + private AzureFirewallFqdnTags azureFirewallFqdnTags; + private BastionHosts bastionHosts; + private DdosCustomPolicies ddosCustomPolicies; + private DdosProtectionPlans ddosProtectionPlans; + private AvailableEndpointServices availableEndpointServices; + private ExpressRouteCircuitAuthorizations expressRouteCircuitAuthorizations; + private ExpressRouteCircuitPeerings expressRouteCircuitPeerings; + private ExpressRouteCircuitConnections expressRouteCircuitConnections; + private PeerExpressRouteCircuitConnections peerExpressRouteCircuitConnections; + private ExpressRouteCircuits expressRouteCircuits; + private ExpressRouteServiceProviders expressRouteServiceProviders; + private ExpressRouteCrossConnections expressRouteCrossConnections; + private ExpressRouteCrossConnectionPeerings expressRouteCrossConnectionPeerings; + private ExpressRouteGateways expressRouteGateways; + private ExpressRouteConnections expressRouteConnections; + private ExpressRoutePortsLocations expressRoutePortsLocations; + private ExpressRoutePorts expressRoutePorts; + private ExpressRouteLinks expressRouteLinks; + private FirewallPolicies firewallPolicies; + private FirewallPolicyRuleGroups firewallPolicyRuleGroups; + private IpGroups ipGroups; + private LoadBalancers loadBalancers; + private LoadBalancerBackendAddressPools loadBalancerBackendAddressPools; + private LoadBalancerFrontendIPConfigurations loadBalancerFrontendIPConfigurations; + private InboundNatRules inboundNatRules; + private LoadBalancerLoadBalancingRules loadBalancerLoadBalancingRules; + private LoadBalancerOutboundRules loadBalancerOutboundRules; + private LoadBalancerNetworkInterfaces loadBalancerNetworkInterfaces; + private LoadBalancerProbes loadBalancerProbes; + private NatGateways natGateways; + private NetworkInterfaces networkInterfaces; + private NetworkInterfaceIPConfigurations networkInterfaceIPConfigurations; + private NetworkInterfaceLoadBalancers networkInterfaceLoadBalancers; + private NetworkInterfaceTapConfigurations networkInterfaceTapConfigurations; + private NetworkProfiles networkProfiles; + private NetworkSecurityGroups networkSecurityGroups; + private SecurityRules securityRules; + private DefaultSecurityRules defaultSecurityRules; + private NetworkWatchers networkWatchers; + private PacketCaptures packetCaptures; + private ConnectionMonitors connectionMonitors; + private Operations operations; + private PrivateEndpoints privateEndpoints; + private AvailablePrivateEndpointTypes availablePrivateEndpointTypes; + private PrivateLinkServices privateLinkServices; + private PublicIPAddresses publicIPAddresses; + private PublicIPPrefixes publicIPPrefixes; + private RouteFilters routeFilters; + private RouteFilterRules routeFilterRules; + private RouteTables routeTables; + private Routes routes; + private BgpServiceCommunities bgpServiceCommunities; + private ServiceEndpointPolicies serviceEndpointPolicies; + private ServiceEndpointPolicyDefinitions serviceEndpointPolicyDefinitions; + private ServiceTags serviceTags; + private Usages usages; + private VirtualNetworks virtualNetworks; + private Subnets subnets; + private ResourceNavigationLinks resourceNavigationLinks; + private ServiceAssociationLinks serviceAssociationLinks; + private VirtualNetworkPeerings virtualNetworkPeerings; + private VirtualNetworkGateways virtualNetworkGateways; + private VirtualNetworkGatewayConnections virtualNetworkGatewayConnections; + private LocalNetworkGateways localNetworkGateways; + private VirtualNetworkTaps virtualNetworkTaps; + private VirtualRouters virtualRouters; + private VirtualRouterPeerings virtualRouterPeerings; + private VirtualWans virtualWans; + private VpnSites vpnSites; + private VpnSiteLinks vpnSiteLinks; + private VpnSitesConfigurations vpnSitesConfigurations; + private VpnServerConfigurations vpnServerConfigurations; + private VirtualHubs virtualHubs; + private HubVirtualNetworkConnections hubVirtualNetworkConnections; + private VpnGateways vpnGateways; + private VpnConnections vpnConnections; + private VpnSiteLinkConnections vpnSiteLinkConnections; + private VpnLinkConnections vpnLinkConnections; + private P2sVpnGateways p2sVpnGateways; + private VpnServerConfigurationsAssociatedWithVirtualWans vpnServerConfigurationsAssociatedWithVirtualWans; + private VirtualHubRouteTableV2s virtualHubRouteTableV2s; + private WebApplicationFirewallPolicies webApplicationFirewallPolicies; + /** + * Get a Configurable instance that can be used to create NetworkManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new NetworkManager.ConfigurableImpl(); + } + /** + * Creates an instance of NetworkManager that exposes Network resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the NetworkManager + */ + public static NetworkManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new NetworkManager(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 NetworkManager that exposes Network resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the NetworkManager + */ + public static NetworkManager authenticate(RestClient restClient, String subscriptionId) { + return new NetworkManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of NetworkManager that exposes Network management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing Network management API entry points that work across subscriptions + */ + NetworkManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage ApplicationGateways. + */ + public ApplicationGateways applicationGateways() { + if (this.applicationGateways == null) { + this.applicationGateways = new ApplicationGatewaysImpl(this); + } + return this.applicationGateways; + } + + /** + * @return Entry point to manage ApplicationSecurityGroups. + */ + public ApplicationSecurityGroups applicationSecurityGroups() { + if (this.applicationSecurityGroups == null) { + this.applicationSecurityGroups = new ApplicationSecurityGroupsImpl(this); + } + return this.applicationSecurityGroups; + } + + /** + * @return Entry point to manage AvailableDelegations. + */ + public AvailableDelegations availableDelegations() { + if (this.availableDelegations == null) { + this.availableDelegations = new AvailableDelegationsImpl(this); + } + return this.availableDelegations; + } + + /** + * @return Entry point to manage AvailableResourceGroupDelegations. + */ + public AvailableResourceGroupDelegations availableResourceGroupDelegations() { + if (this.availableResourceGroupDelegations == null) { + this.availableResourceGroupDelegations = new AvailableResourceGroupDelegationsImpl(this); + } + return this.availableResourceGroupDelegations; + } + + /** + * @return Entry point to manage AvailableServiceAliases. + */ + public AvailableServiceAliases availableServiceAliases() { + if (this.availableServiceAliases == null) { + this.availableServiceAliases = new AvailableServiceAliasesImpl(this); + } + return this.availableServiceAliases; + } + + /** + * @return Entry point to manage AzureFirewalls. + */ + public AzureFirewalls azureFirewalls() { + if (this.azureFirewalls == null) { + this.azureFirewalls = new AzureFirewallsImpl(this); + } + return this.azureFirewalls; + } + + /** + * @return Entry point to manage AzureFirewallFqdnTags. + */ + public AzureFirewallFqdnTags azureFirewallFqdnTags() { + if (this.azureFirewallFqdnTags == null) { + this.azureFirewallFqdnTags = new AzureFirewallFqdnTagsImpl(this); + } + return this.azureFirewallFqdnTags; + } + + /** + * @return Entry point to manage BastionHosts. + */ + public BastionHosts bastionHosts() { + if (this.bastionHosts == null) { + this.bastionHosts = new BastionHostsImpl(this); + } + return this.bastionHosts; + } + + /** + * @return Entry point to manage DdosCustomPolicies. + */ + public DdosCustomPolicies ddosCustomPolicies() { + if (this.ddosCustomPolicies == null) { + this.ddosCustomPolicies = new DdosCustomPoliciesImpl(this); + } + return this.ddosCustomPolicies; + } + + /** + * @return Entry point to manage DdosProtectionPlans. + */ + public DdosProtectionPlans ddosProtectionPlans() { + if (this.ddosProtectionPlans == null) { + this.ddosProtectionPlans = new DdosProtectionPlansImpl(this); + } + return this.ddosProtectionPlans; + } + + /** + * @return Entry point to manage AvailableEndpointServices. + */ + public AvailableEndpointServices availableEndpointServices() { + if (this.availableEndpointServices == null) { + this.availableEndpointServices = new AvailableEndpointServicesImpl(this); + } + return this.availableEndpointServices; + } + + /** + * @return Entry point to manage ExpressRouteCircuitAuthorizations. + */ + public ExpressRouteCircuitAuthorizations expressRouteCircuitAuthorizations() { + if (this.expressRouteCircuitAuthorizations == null) { + this.expressRouteCircuitAuthorizations = new ExpressRouteCircuitAuthorizationsImpl(this); + } + return this.expressRouteCircuitAuthorizations; + } + + /** + * @return Entry point to manage ExpressRouteCircuitPeerings. + */ + public ExpressRouteCircuitPeerings expressRouteCircuitPeerings() { + if (this.expressRouteCircuitPeerings == null) { + this.expressRouteCircuitPeerings = new ExpressRouteCircuitPeeringsImpl(this); + } + return this.expressRouteCircuitPeerings; + } + + /** + * @return Entry point to manage ExpressRouteCircuitConnections. + */ + public ExpressRouteCircuitConnections expressRouteCircuitConnections() { + if (this.expressRouteCircuitConnections == null) { + this.expressRouteCircuitConnections = new ExpressRouteCircuitConnectionsImpl(this); + } + return this.expressRouteCircuitConnections; + } + + /** + * @return Entry point to manage PeerExpressRouteCircuitConnections. + */ + public PeerExpressRouteCircuitConnections peerExpressRouteCircuitConnections() { + if (this.peerExpressRouteCircuitConnections == null) { + this.peerExpressRouteCircuitConnections = new PeerExpressRouteCircuitConnectionsImpl(this); + } + return this.peerExpressRouteCircuitConnections; + } + + /** + * @return Entry point to manage ExpressRouteCircuits. + */ + public ExpressRouteCircuits expressRouteCircuits() { + if (this.expressRouteCircuits == null) { + this.expressRouteCircuits = new ExpressRouteCircuitsImpl(this); + } + return this.expressRouteCircuits; + } + + /** + * @return Entry point to manage ExpressRouteServiceProviders. + */ + public ExpressRouteServiceProviders expressRouteServiceProviders() { + if (this.expressRouteServiceProviders == null) { + this.expressRouteServiceProviders = new ExpressRouteServiceProvidersImpl(this); + } + return this.expressRouteServiceProviders; + } + + /** + * @return Entry point to manage ExpressRouteCrossConnections. + */ + public ExpressRouteCrossConnections expressRouteCrossConnections() { + if (this.expressRouteCrossConnections == null) { + this.expressRouteCrossConnections = new ExpressRouteCrossConnectionsImpl(this); + } + return this.expressRouteCrossConnections; + } + + /** + * @return Entry point to manage ExpressRouteCrossConnectionPeerings. + */ + public ExpressRouteCrossConnectionPeerings expressRouteCrossConnectionPeerings() { + if (this.expressRouteCrossConnectionPeerings == null) { + this.expressRouteCrossConnectionPeerings = new ExpressRouteCrossConnectionPeeringsImpl(this); + } + return this.expressRouteCrossConnectionPeerings; + } + + /** + * @return Entry point to manage ExpressRouteGateways. + */ + public ExpressRouteGateways expressRouteGateways() { + if (this.expressRouteGateways == null) { + this.expressRouteGateways = new ExpressRouteGatewaysImpl(this); + } + return this.expressRouteGateways; + } + + /** + * @return Entry point to manage ExpressRouteConnections. + */ + public ExpressRouteConnections expressRouteConnections() { + if (this.expressRouteConnections == null) { + this.expressRouteConnections = new ExpressRouteConnectionsImpl(this); + } + return this.expressRouteConnections; + } + + /** + * @return Entry point to manage ExpressRoutePortsLocations. + */ + public ExpressRoutePortsLocations expressRoutePortsLocations() { + if (this.expressRoutePortsLocations == null) { + this.expressRoutePortsLocations = new ExpressRoutePortsLocationsImpl(this); + } + return this.expressRoutePortsLocations; + } + + /** + * @return Entry point to manage ExpressRoutePorts. + */ + public ExpressRoutePorts expressRoutePorts() { + if (this.expressRoutePorts == null) { + this.expressRoutePorts = new ExpressRoutePortsImpl(this); + } + return this.expressRoutePorts; + } + + /** + * @return Entry point to manage ExpressRouteLinks. + */ + public ExpressRouteLinks expressRouteLinks() { + if (this.expressRouteLinks == null) { + this.expressRouteLinks = new ExpressRouteLinksImpl(this); + } + return this.expressRouteLinks; + } + + /** + * @return Entry point to manage FirewallPolicies. + */ + public FirewallPolicies firewallPolicies() { + if (this.firewallPolicies == null) { + this.firewallPolicies = new FirewallPoliciesImpl(this); + } + return this.firewallPolicies; + } + + /** + * @return Entry point to manage FirewallPolicyRuleGroups. + */ + public FirewallPolicyRuleGroups firewallPolicyRuleGroups() { + if (this.firewallPolicyRuleGroups == null) { + this.firewallPolicyRuleGroups = new FirewallPolicyRuleGroupsImpl(this); + } + return this.firewallPolicyRuleGroups; + } + + /** + * @return Entry point to manage IpGroups. + */ + public IpGroups ipGroups() { + if (this.ipGroups == null) { + this.ipGroups = new IpGroupsImpl(this); + } + return this.ipGroups; + } + + /** + * @return Entry point to manage LoadBalancers. + */ + public LoadBalancers loadBalancers() { + if (this.loadBalancers == null) { + this.loadBalancers = new LoadBalancersImpl(this); + } + return this.loadBalancers; + } + + /** + * @return Entry point to manage LoadBalancerBackendAddressPools. + */ + public LoadBalancerBackendAddressPools loadBalancerBackendAddressPools() { + if (this.loadBalancerBackendAddressPools == null) { + this.loadBalancerBackendAddressPools = new LoadBalancerBackendAddressPoolsImpl(this); + } + return this.loadBalancerBackendAddressPools; + } + + /** + * @return Entry point to manage LoadBalancerFrontendIPConfigurations. + */ + public LoadBalancerFrontendIPConfigurations loadBalancerFrontendIPConfigurations() { + if (this.loadBalancerFrontendIPConfigurations == null) { + this.loadBalancerFrontendIPConfigurations = new LoadBalancerFrontendIPConfigurationsImpl(this); + } + return this.loadBalancerFrontendIPConfigurations; + } + + /** + * @return Entry point to manage InboundNatRules. + */ + public InboundNatRules inboundNatRules() { + if (this.inboundNatRules == null) { + this.inboundNatRules = new InboundNatRulesImpl(this); + } + return this.inboundNatRules; + } + + /** + * @return Entry point to manage LoadBalancerLoadBalancingRules. + */ + public LoadBalancerLoadBalancingRules loadBalancerLoadBalancingRules() { + if (this.loadBalancerLoadBalancingRules == null) { + this.loadBalancerLoadBalancingRules = new LoadBalancerLoadBalancingRulesImpl(this); + } + return this.loadBalancerLoadBalancingRules; + } + + /** + * @return Entry point to manage LoadBalancerOutboundRules. + */ + public LoadBalancerOutboundRules loadBalancerOutboundRules() { + if (this.loadBalancerOutboundRules == null) { + this.loadBalancerOutboundRules = new LoadBalancerOutboundRulesImpl(this); + } + return this.loadBalancerOutboundRules; + } + + /** + * @return Entry point to manage LoadBalancerNetworkInterfaces. + */ + public LoadBalancerNetworkInterfaces loadBalancerNetworkInterfaces() { + if (this.loadBalancerNetworkInterfaces == null) { + this.loadBalancerNetworkInterfaces = new LoadBalancerNetworkInterfacesImpl(this); + } + return this.loadBalancerNetworkInterfaces; + } + + /** + * @return Entry point to manage LoadBalancerProbes. + */ + public LoadBalancerProbes loadBalancerProbes() { + if (this.loadBalancerProbes == null) { + this.loadBalancerProbes = new LoadBalancerProbesImpl(this); + } + return this.loadBalancerProbes; + } + + /** + * @return Entry point to manage NatGateways. + */ + public NatGateways natGateways() { + if (this.natGateways == null) { + this.natGateways = new NatGatewaysImpl(this); + } + return this.natGateways; + } + + /** + * @return Entry point to manage NetworkInterfaces. + */ + public NetworkInterfaces networkInterfaces() { + if (this.networkInterfaces == null) { + this.networkInterfaces = new NetworkInterfacesImpl(this); + } + return this.networkInterfaces; + } + + /** + * @return Entry point to manage NetworkInterfaceIPConfigurations. + */ + public NetworkInterfaceIPConfigurations networkInterfaceIPConfigurations() { + if (this.networkInterfaceIPConfigurations == null) { + this.networkInterfaceIPConfigurations = new NetworkInterfaceIPConfigurationsImpl(this); + } + return this.networkInterfaceIPConfigurations; + } + + /** + * @return Entry point to manage NetworkInterfaceLoadBalancers. + */ + public NetworkInterfaceLoadBalancers networkInterfaceLoadBalancers() { + if (this.networkInterfaceLoadBalancers == null) { + this.networkInterfaceLoadBalancers = new NetworkInterfaceLoadBalancersImpl(this); + } + return this.networkInterfaceLoadBalancers; + } + + /** + * @return Entry point to manage NetworkInterfaceTapConfigurations. + */ + public NetworkInterfaceTapConfigurations networkInterfaceTapConfigurations() { + if (this.networkInterfaceTapConfigurations == null) { + this.networkInterfaceTapConfigurations = new NetworkInterfaceTapConfigurationsImpl(this); + } + return this.networkInterfaceTapConfigurations; + } + + /** + * @return Entry point to manage NetworkProfiles. + */ + public NetworkProfiles networkProfiles() { + if (this.networkProfiles == null) { + this.networkProfiles = new NetworkProfilesImpl(this); + } + return this.networkProfiles; + } + + /** + * @return Entry point to manage NetworkSecurityGroups. + */ + public NetworkSecurityGroups networkSecurityGroups() { + if (this.networkSecurityGroups == null) { + this.networkSecurityGroups = new NetworkSecurityGroupsImpl(this); + } + return this.networkSecurityGroups; + } + + /** + * @return Entry point to manage SecurityRules. + */ + public SecurityRules securityRules() { + if (this.securityRules == null) { + this.securityRules = new SecurityRulesImpl(this); + } + return this.securityRules; + } + + /** + * @return Entry point to manage DefaultSecurityRules. + */ + public DefaultSecurityRules defaultSecurityRules() { + if (this.defaultSecurityRules == null) { + this.defaultSecurityRules = new DefaultSecurityRulesImpl(this); + } + return this.defaultSecurityRules; + } + + /** + * @return Entry point to manage NetworkWatchers. + */ + public NetworkWatchers networkWatchers() { + if (this.networkWatchers == null) { + this.networkWatchers = new NetworkWatchersImpl(this); + } + return this.networkWatchers; + } + + /** + * @return Entry point to manage PacketCaptures. + */ + public PacketCaptures packetCaptures() { + if (this.packetCaptures == null) { + this.packetCaptures = new PacketCapturesImpl(this); + } + return this.packetCaptures; + } + + /** + * @return Entry point to manage ConnectionMonitors. + */ + public ConnectionMonitors connectionMonitors() { + if (this.connectionMonitors == null) { + this.connectionMonitors = new ConnectionMonitorsImpl(this); + } + return this.connectionMonitors; + } + + /** + * @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 PrivateEndpoints. + */ + public PrivateEndpoints privateEndpoints() { + if (this.privateEndpoints == null) { + this.privateEndpoints = new PrivateEndpointsImpl(this); + } + return this.privateEndpoints; + } + + /** + * @return Entry point to manage AvailablePrivateEndpointTypes. + */ + public AvailablePrivateEndpointTypes availablePrivateEndpointTypes() { + if (this.availablePrivateEndpointTypes == null) { + this.availablePrivateEndpointTypes = new AvailablePrivateEndpointTypesImpl(this); + } + return this.availablePrivateEndpointTypes; + } + + /** + * @return Entry point to manage PrivateLinkServices. + */ + public PrivateLinkServices privateLinkServices() { + if (this.privateLinkServices == null) { + this.privateLinkServices = new PrivateLinkServicesImpl(this); + } + return this.privateLinkServices; + } + + /** + * @return Entry point to manage PublicIPAddresses. + */ + public PublicIPAddresses publicIPAddresses() { + if (this.publicIPAddresses == null) { + this.publicIPAddresses = new PublicIPAddressesImpl(this); + } + return this.publicIPAddresses; + } + + /** + * @return Entry point to manage PublicIPPrefixes. + */ + public PublicIPPrefixes publicIPPrefixes() { + if (this.publicIPPrefixes == null) { + this.publicIPPrefixes = new PublicIPPrefixesImpl(this); + } + return this.publicIPPrefixes; + } + + /** + * @return Entry point to manage RouteFilters. + */ + public RouteFilters routeFilters() { + if (this.routeFilters == null) { + this.routeFilters = new RouteFiltersImpl(this); + } + return this.routeFilters; + } + + /** + * @return Entry point to manage RouteFilterRules. + */ + public RouteFilterRules routeFilterRules() { + if (this.routeFilterRules == null) { + this.routeFilterRules = new RouteFilterRulesImpl(this); + } + return this.routeFilterRules; + } + + /** + * @return Entry point to manage RouteTables. + */ + public RouteTables routeTables() { + if (this.routeTables == null) { + this.routeTables = new RouteTablesImpl(this); + } + return this.routeTables; + } + + /** + * @return Entry point to manage Routes. + */ + public Routes routes() { + if (this.routes == null) { + this.routes = new RoutesImpl(this); + } + return this.routes; + } + + /** + * @return Entry point to manage BgpServiceCommunities. + */ + public BgpServiceCommunities bgpServiceCommunities() { + if (this.bgpServiceCommunities == null) { + this.bgpServiceCommunities = new BgpServiceCommunitiesImpl(this); + } + return this.bgpServiceCommunities; + } + + /** + * @return Entry point to manage ServiceEndpointPolicies. + */ + public ServiceEndpointPolicies serviceEndpointPolicies() { + if (this.serviceEndpointPolicies == null) { + this.serviceEndpointPolicies = new ServiceEndpointPoliciesImpl(this); + } + return this.serviceEndpointPolicies; + } + + /** + * @return Entry point to manage ServiceEndpointPolicyDefinitions. + */ + public ServiceEndpointPolicyDefinitions serviceEndpointPolicyDefinitions() { + if (this.serviceEndpointPolicyDefinitions == null) { + this.serviceEndpointPolicyDefinitions = new ServiceEndpointPolicyDefinitionsImpl(this); + } + return this.serviceEndpointPolicyDefinitions; + } + + /** + * @return Entry point to manage ServiceTags. + */ + public ServiceTags serviceTags() { + if (this.serviceTags == null) { + this.serviceTags = new ServiceTagsImpl(this); + } + return this.serviceTags; + } + + /** + * @return Entry point to manage Usages. + */ + public Usages usages() { + if (this.usages == null) { + this.usages = new UsagesImpl(this); + } + return this.usages; + } + + /** + * @return Entry point to manage VirtualNetworks. + */ + public VirtualNetworks virtualNetworks() { + if (this.virtualNetworks == null) { + this.virtualNetworks = new VirtualNetworksImpl(this); + } + return this.virtualNetworks; + } + + /** + * @return Entry point to manage Subnets. + */ + public Subnets subnets() { + if (this.subnets == null) { + this.subnets = new SubnetsImpl(this); + } + return this.subnets; + } + + /** + * @return Entry point to manage ResourceNavigationLinks. + */ + public ResourceNavigationLinks resourceNavigationLinks() { + if (this.resourceNavigationLinks == null) { + this.resourceNavigationLinks = new ResourceNavigationLinksImpl(this); + } + return this.resourceNavigationLinks; + } + + /** + * @return Entry point to manage ServiceAssociationLinks. + */ + public ServiceAssociationLinks serviceAssociationLinks() { + if (this.serviceAssociationLinks == null) { + this.serviceAssociationLinks = new ServiceAssociationLinksImpl(this); + } + return this.serviceAssociationLinks; + } + + /** + * @return Entry point to manage VirtualNetworkPeerings. + */ + public VirtualNetworkPeerings virtualNetworkPeerings() { + if (this.virtualNetworkPeerings == null) { + this.virtualNetworkPeerings = new VirtualNetworkPeeringsImpl(this); + } + return this.virtualNetworkPeerings; + } + + /** + * @return Entry point to manage VirtualNetworkGateways. + */ + public VirtualNetworkGateways virtualNetworkGateways() { + if (this.virtualNetworkGateways == null) { + this.virtualNetworkGateways = new VirtualNetworkGatewaysImpl(this); + } + return this.virtualNetworkGateways; + } + + /** + * @return Entry point to manage VirtualNetworkGatewayConnections. + */ + public VirtualNetworkGatewayConnections virtualNetworkGatewayConnections() { + if (this.virtualNetworkGatewayConnections == null) { + this.virtualNetworkGatewayConnections = new VirtualNetworkGatewayConnectionsImpl(this); + } + return this.virtualNetworkGatewayConnections; + } + + /** + * @return Entry point to manage LocalNetworkGateways. + */ + public LocalNetworkGateways localNetworkGateways() { + if (this.localNetworkGateways == null) { + this.localNetworkGateways = new LocalNetworkGatewaysImpl(this); + } + return this.localNetworkGateways; + } + + /** + * @return Entry point to manage VirtualNetworkTaps. + */ + public VirtualNetworkTaps virtualNetworkTaps() { + if (this.virtualNetworkTaps == null) { + this.virtualNetworkTaps = new VirtualNetworkTapsImpl(this); + } + return this.virtualNetworkTaps; + } + + /** + * @return Entry point to manage VirtualRouters. + */ + public VirtualRouters virtualRouters() { + if (this.virtualRouters == null) { + this.virtualRouters = new VirtualRoutersImpl(this); + } + return this.virtualRouters; + } + + /** + * @return Entry point to manage VirtualRouterPeerings. + */ + public VirtualRouterPeerings virtualRouterPeerings() { + if (this.virtualRouterPeerings == null) { + this.virtualRouterPeerings = new VirtualRouterPeeringsImpl(this); + } + return this.virtualRouterPeerings; + } + + /** + * @return Entry point to manage VirtualWans. + */ + public VirtualWans virtualWans() { + if (this.virtualWans == null) { + this.virtualWans = new VirtualWansImpl(this); + } + return this.virtualWans; + } + + /** + * @return Entry point to manage VpnSites. + */ + public VpnSites vpnSites() { + if (this.vpnSites == null) { + this.vpnSites = new VpnSitesImpl(this); + } + return this.vpnSites; + } + + /** + * @return Entry point to manage VpnSiteLinks. + */ + public VpnSiteLinks vpnSiteLinks() { + if (this.vpnSiteLinks == null) { + this.vpnSiteLinks = new VpnSiteLinksImpl(this); + } + return this.vpnSiteLinks; + } + + /** + * @return Entry point to manage VpnSitesConfigurations. + */ + public VpnSitesConfigurations vpnSitesConfigurations() { + if (this.vpnSitesConfigurations == null) { + this.vpnSitesConfigurations = new VpnSitesConfigurationsImpl(this); + } + return this.vpnSitesConfigurations; + } + + /** + * @return Entry point to manage VpnServerConfigurations. + */ + public VpnServerConfigurations vpnServerConfigurations() { + if (this.vpnServerConfigurations == null) { + this.vpnServerConfigurations = new VpnServerConfigurationsImpl(this); + } + return this.vpnServerConfigurations; + } + + /** + * @return Entry point to manage VirtualHubs. + */ + public VirtualHubs virtualHubs() { + if (this.virtualHubs == null) { + this.virtualHubs = new VirtualHubsImpl(this); + } + return this.virtualHubs; + } + + /** + * @return Entry point to manage HubVirtualNetworkConnections. + */ + public HubVirtualNetworkConnections hubVirtualNetworkConnections() { + if (this.hubVirtualNetworkConnections == null) { + this.hubVirtualNetworkConnections = new HubVirtualNetworkConnectionsImpl(this); + } + return this.hubVirtualNetworkConnections; + } + + /** + * @return Entry point to manage VpnGateways. + */ + public VpnGateways vpnGateways() { + if (this.vpnGateways == null) { + this.vpnGateways = new VpnGatewaysImpl(this); + } + return this.vpnGateways; + } + + /** + * @return Entry point to manage VpnConnections. + */ + public VpnConnections vpnConnections() { + if (this.vpnConnections == null) { + this.vpnConnections = new VpnConnectionsImpl(this); + } + return this.vpnConnections; + } + + /** + * @return Entry point to manage VpnSiteLinkConnections. + */ + public VpnSiteLinkConnections vpnSiteLinkConnections() { + if (this.vpnSiteLinkConnections == null) { + this.vpnSiteLinkConnections = new VpnSiteLinkConnectionsImpl(this); + } + return this.vpnSiteLinkConnections; + } + + /** + * @return Entry point to manage VpnLinkConnections. + */ + public VpnLinkConnections vpnLinkConnections() { + if (this.vpnLinkConnections == null) { + this.vpnLinkConnections = new VpnLinkConnectionsImpl(this); + } + return this.vpnLinkConnections; + } + + /** + * @return Entry point to manage P2sVpnGateways. + */ + public P2sVpnGateways p2sVpnGateways() { + if (this.p2sVpnGateways == null) { + this.p2sVpnGateways = new P2sVpnGatewaysImpl(this); + } + return this.p2sVpnGateways; + } + + /** + * @return Entry point to manage VpnServerConfigurationsAssociatedWithVirtualWans. + */ + public VpnServerConfigurationsAssociatedWithVirtualWans vpnServerConfigurationsAssociatedWithVirtualWans() { + if (this.vpnServerConfigurationsAssociatedWithVirtualWans == null) { + this.vpnServerConfigurationsAssociatedWithVirtualWans = new VpnServerConfigurationsAssociatedWithVirtualWansImpl(this); + } + return this.vpnServerConfigurationsAssociatedWithVirtualWans; + } + + /** + * @return Entry point to manage VirtualHubRouteTableV2s. + */ + public VirtualHubRouteTableV2s virtualHubRouteTableV2s() { + if (this.virtualHubRouteTableV2s == null) { + this.virtualHubRouteTableV2s = new VirtualHubRouteTableV2sImpl(this); + } + return this.virtualHubRouteTableV2s; + } + + /** + * @return Entry point to manage WebApplicationFirewallPolicies. + */ + public WebApplicationFirewallPolicies webApplicationFirewallPolicies() { + if (this.webApplicationFirewallPolicies == null) { + this.webApplicationFirewallPolicies = new WebApplicationFirewallPoliciesImpl(this); + } + return this.webApplicationFirewallPolicies; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public NetworkManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return NetworkManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private NetworkManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new NetworkManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfileImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfileImpl.java new file mode 100644 index 000000000000..52480688e95f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfileImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.NetworkProfile; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ContainerNetworkInterface; +import com.microsoft.azure.management.network.v2019_09_01.ContainerNetworkInterfaceConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class NetworkProfileImpl extends GroupableResourceCoreImpl implements NetworkProfile, NetworkProfile.Definition, NetworkProfile.Update { + NetworkProfileImpl(String name, NetworkProfileInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + NetworkProfilesInner client = this.manager().inner().networkProfiles(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + NetworkProfilesInner client = this.manager().inner().networkProfiles(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + NetworkProfilesInner client = this.manager().inner().networkProfiles(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public List containerNetworkInterfaceConfigurations() { + return this.inner().containerNetworkInterfaceConfigurations(); + } + + @Override + public List containerNetworkInterfaces() { + return this.inner().containerNetworkInterfaces(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public NetworkProfileImpl withContainerNetworkInterfaceConfigurations(List containerNetworkInterfaceConfigurations) { + this.inner().withContainerNetworkInterfaceConfigurations(containerNetworkInterfaceConfigurations); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfileInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfileInner.java new file mode 100644 index 000000000000..0adb23599d5a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfileInner.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ContainerNetworkInterface; +import com.microsoft.azure.management.network.v2019_09_01.ContainerNetworkInterfaceConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Network profile resource. + */ +@JsonFlatten +@SkipParentValidation +public class NetworkProfileInner extends Resource { + /** + * List of child container network interfaces. + */ + @JsonProperty(value = "properties.containerNetworkInterfaces", access = JsonProperty.Access.WRITE_ONLY) + private List containerNetworkInterfaces; + + /** + * List of chid container network interface configurations. + */ + @JsonProperty(value = "properties.containerNetworkInterfaceConfigurations") + private List containerNetworkInterfaceConfigurations; + + /** + * The resource GUID property of the network profile resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the network profile resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get list of child container network interfaces. + * + * @return the containerNetworkInterfaces value + */ + public List containerNetworkInterfaces() { + return this.containerNetworkInterfaces; + } + + /** + * Get list of chid container network interface configurations. + * + * @return the containerNetworkInterfaceConfigurations value + */ + public List containerNetworkInterfaceConfigurations() { + return this.containerNetworkInterfaceConfigurations; + } + + /** + * Set list of chid container network interface configurations. + * + * @param containerNetworkInterfaceConfigurations the containerNetworkInterfaceConfigurations value to set + * @return the NetworkProfileInner object itself. + */ + public NetworkProfileInner withContainerNetworkInterfaceConfigurations(List containerNetworkInterfaceConfigurations) { + this.containerNetworkInterfaceConfigurations = containerNetworkInterfaceConfigurations; + return this; + } + + /** + * Get the resource GUID property of the network profile resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the network profile resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the NetworkProfileInner object itself. + */ + public NetworkProfileInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfilesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfilesImpl.java new file mode 100644 index 000000000000..9ce64fc90341 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfilesImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.NetworkProfiles; +import com.microsoft.azure.management.network.v2019_09_01.NetworkProfile; +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; + +class NetworkProfilesImpl extends GroupableResourcesCoreImpl implements NetworkProfiles { + protected NetworkProfilesImpl(NetworkManager manager) { + super(manager.inner().networkProfiles(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + NetworkProfilesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + NetworkProfilesInner 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) { + NetworkProfilesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + NetworkProfilesInner 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 NetworkProfile call(NetworkProfileInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + NetworkProfilesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + NetworkProfilesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public NetworkProfile call(NetworkProfileInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public NetworkProfileImpl define(String name) { + return wrapModel(name); + } + + @Override + protected NetworkProfileImpl wrapModel(NetworkProfileInner inner) { + return new NetworkProfileImpl(inner.name(), inner, manager()); + } + + @Override + protected NetworkProfileImpl wrapModel(String name) { + return new NetworkProfileImpl(name, new NetworkProfileInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfilesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfilesInner.java new file mode 100644 index 000000000000..95290dc31c96 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkProfilesInner.java @@ -0,0 +1,1111 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 NetworkProfiles. + */ +public class NetworkProfilesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private NetworkProfilesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of NetworkProfilesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public NetworkProfilesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(NetworkProfilesService.class); + this.client = client; + } + + /** + * The interface defining all the services for NetworkProfiles to be + * used by Retrofit to perform actually REST calls. + */ + interface NetworkProfilesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkProfiles delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("networkProfileName") String networkProfileName, @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.network.v2019_09_01.NetworkProfiles beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkProfileName") String networkProfileName, @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.network.v2019_09_01.NetworkProfiles getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("networkProfileName") String networkProfileName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.NetworkProfiles createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkProfileName") String networkProfileName, @Path("subscriptionId") String subscriptionId, @Body NetworkProfileInner 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.network.v2019_09_01.NetworkProfiles updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkProfileName") String networkProfileName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkProfiles list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles") + Observable> list(@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.network.v2019_09_01.NetworkProfiles listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.NetworkProfiles 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.network.v2019_09_01.NetworkProfiles listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the NetworkProfile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 networkProfileName) { + deleteWithServiceResponseAsync(resourceGroupName, networkProfileName).toBlocking().last().body(); + } + + /** + * Deletes the specified network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the NetworkProfile. + * @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 networkProfileName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, networkProfileName), serviceCallback); + } + + /** + * Deletes the specified network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the NetworkProfile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String networkProfileName) { + return deleteWithServiceResponseAsync(resourceGroupName, networkProfileName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the NetworkProfile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String networkProfileName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkProfileName == null) { + throw new IllegalArgumentException("Parameter networkProfileName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, networkProfileName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the NetworkProfile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 networkProfileName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, networkProfileName).toBlocking().single().body(); + } + + /** + * Deletes the specified network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the NetworkProfile. + * @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 networkProfileName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkProfileName), serviceCallback); + } + + /** + * Deletes the specified network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the NetworkProfile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String networkProfileName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, networkProfileName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the NetworkProfile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String networkProfileName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkProfileName == null) { + throw new IllegalArgumentException("Parameter networkProfileName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, networkProfileName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified network profile in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the public IP prefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkProfileInner object if successful. + */ + public NetworkProfileInner getByResourceGroup(String resourceGroupName, String networkProfileName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkProfileName).toBlocking().single().body(); + } + + /** + * Gets the specified network profile in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the public IP prefix. + * @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 networkProfileName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkProfileName), serviceCallback); + } + + /** + * Gets the specified network profile in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the public IP prefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkProfileInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String networkProfileName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkProfileName).map(new Func1, NetworkProfileInner>() { + @Override + public NetworkProfileInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified network profile in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the public IP prefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkProfileInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String networkProfileName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkProfileName == null) { + throw new IllegalArgumentException("Parameter networkProfileName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, networkProfileName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified network profile in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the public IP prefix. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkProfileInner object if successful. + */ + public NetworkProfileInner getByResourceGroup(String resourceGroupName, String networkProfileName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkProfileName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified network profile in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the public IP prefix. + * @param expand Expands referenced resources. + * @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 networkProfileName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkProfileName, expand), serviceCallback); + } + + /** + * Gets the specified network profile in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the public IP prefix. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkProfileInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String networkProfileName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkProfileName, expand).map(new Func1, NetworkProfileInner>() { + @Override + public NetworkProfileInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified network profile in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the public IP prefix. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkProfileInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String networkProfileName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkProfileName == null) { + throw new IllegalArgumentException("Parameter networkProfileName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, networkProfileName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Creates or updates a network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the network profile. + * @param parameters Parameters supplied to the create or update network profile 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 NetworkProfileInner object if successful. + */ + public NetworkProfileInner createOrUpdate(String resourceGroupName, String networkProfileName, NetworkProfileInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkProfileName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the network profile. + * @param parameters Parameters supplied to the create or update network profile 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 createOrUpdateAsync(String resourceGroupName, String networkProfileName, NetworkProfileInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, networkProfileName, parameters), serviceCallback); + } + + /** + * Creates or updates a network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the network profile. + * @param parameters Parameters supplied to the create or update network profile operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String networkProfileName, NetworkProfileInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkProfileName, parameters).map(new Func1, NetworkProfileInner>() { + @Override + public NetworkProfileInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the network profile. + * @param parameters Parameters supplied to the create or update network profile operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkProfileName, NetworkProfileInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkProfileName == null) { + throw new IllegalArgumentException("Parameter networkProfileName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, networkProfileName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates network profile tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the network profile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkProfileInner object if successful. + */ + public NetworkProfileInner updateTags(String resourceGroupName, String networkProfileName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkProfileName).toBlocking().single().body(); + } + + /** + * Updates network profile tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the network profile. + * @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 updateTagsAsync(String resourceGroupName, String networkProfileName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkProfileName), serviceCallback); + } + + /** + * Updates network profile tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the network profile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkProfileInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String networkProfileName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkProfileName).map(new Func1, NetworkProfileInner>() { + @Override + public NetworkProfileInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates network profile tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the network profile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkProfileInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkProfileName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkProfileName == null) { + throw new IllegalArgumentException("Parameter networkProfileName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, networkProfileName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates network profile tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the network profile. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkProfileInner object if successful. + */ + public NetworkProfileInner updateTags(String resourceGroupName, String networkProfileName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkProfileName, tags).toBlocking().single().body(); + } + + /** + * Updates network profile tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the network profile. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String networkProfileName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkProfileName, tags), serviceCallback); + } + + /** + * Updates network profile tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the network profile. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkProfileInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String networkProfileName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkProfileName, tags).map(new Func1, NetworkProfileInner>() { + @Override + public NetworkProfileInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates network profile tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the network profile. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkProfileInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkProfileName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkProfileName == null) { + throw new IllegalArgumentException("Parameter networkProfileName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, networkProfileName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all the network profiles in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<NetworkProfileInner> 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 all the network profiles in a subscription. + * + * @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 all the network profiles in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkProfileInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the network profiles in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkProfileInner> 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 all the network profiles in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkProfileInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all network profiles in a resource group. + * + * @param resourceGroupName The name of the 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<NetworkProfileInner> 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 all network profiles in a resource group. + * + * @param resourceGroupName The name of the 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 all network profiles in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkProfileInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all network profiles in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkProfileInner> 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 all network profiles in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkProfileInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all the network profiles in a subscription. + * + * @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<NetworkProfileInner> 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 all the network profiles in a subscription. + * + * @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 all the network profiles in a subscription. + * + * @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<NetworkProfileInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the network profiles in a subscription. + * + * @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<NetworkProfileInner> 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 all the network profiles in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkProfileInner> 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 all network profiles in a resource group. + * + * @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<NetworkProfileInner> 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 all network profiles in a resource group. + * + * @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 all network profiles in a resource group. + * + * @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<NetworkProfileInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all network profiles in a resource group. + * + * @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<NetworkProfileInner> 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 all network profiles in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkProfileInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupImpl.java new file mode 100644 index 000000000000..d33969016b23 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroup; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroupSecurityRule; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterface; +import com.microsoft.azure.management.network.v2019_09_01.Subnet; + +class NetworkSecurityGroupImpl extends GroupableResourceCoreImpl implements NetworkSecurityGroup, NetworkSecurityGroup.Definition, NetworkSecurityGroup.Update { + NetworkSecurityGroupImpl(String name, NetworkSecurityGroupInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + NetworkSecurityGroupsInner client = this.manager().inner().networkSecurityGroups(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + NetworkSecurityGroupsInner client = this.manager().inner().networkSecurityGroups(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + NetworkSecurityGroupsInner client = this.manager().inner().networkSecurityGroups(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public List defaultSecurityRules() { + List lst = new ArrayList(); + if (this.inner().defaultSecurityRules() != null) { + for (SecurityRuleInner inner : this.inner().defaultSecurityRules()) { + lst.add( new NetworkSecurityGroupSecurityRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List networkInterfaces() { + List lst = new ArrayList(); + if (this.inner().networkInterfaces() != null) { + for (NetworkInterfaceInner inner : this.inner().networkInterfaces()) { + lst.add( new NetworkInterfaceImpl(inner.name(), inner, manager())); + } + } + return lst; + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public List securityRules() { + List lst = new ArrayList(); + if (this.inner().securityRules() != null) { + for (SecurityRuleInner inner : this.inner().securityRules()) { + lst.add( new NetworkSecurityGroupSecurityRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List subnets() { + List lst = new ArrayList(); + if (this.inner().subnets() != null) { + for (SubnetInner inner : this.inner().subnets()) { + lst.add( new SubnetImpl(inner, manager())); + } + } + return lst; + } + + @Override + public NetworkSecurityGroupImpl withSecurityRules(List securityRules) { + this.inner().withSecurityRules(securityRules); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupInner.java new file mode 100644 index 000000000000..d74fa17ae621 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupInner.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * NetworkSecurityGroup resource. + */ +@JsonFlatten +@SkipParentValidation +public class NetworkSecurityGroupInner extends Resource { + /** + * A collection of security rules of the network security group. + */ + @JsonProperty(value = "properties.securityRules") + private List securityRules; + + /** + * The default security rules of network security group. + */ + @JsonProperty(value = "properties.defaultSecurityRules", access = JsonProperty.Access.WRITE_ONLY) + private List defaultSecurityRules; + + /** + * A collection of references to network interfaces. + */ + @JsonProperty(value = "properties.networkInterfaces", access = JsonProperty.Access.WRITE_ONLY) + private List networkInterfaces; + + /** + * A collection of references to subnets. + */ + @JsonProperty(value = "properties.subnets", access = JsonProperty.Access.WRITE_ONLY) + private List subnets; + + /** + * The resource GUID property of the network security group resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the network security group resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get a collection of security rules of the network security group. + * + * @return the securityRules value + */ + public List securityRules() { + return this.securityRules; + } + + /** + * Set a collection of security rules of the network security group. + * + * @param securityRules the securityRules value to set + * @return the NetworkSecurityGroupInner object itself. + */ + public NetworkSecurityGroupInner withSecurityRules(List securityRules) { + this.securityRules = securityRules; + return this; + } + + /** + * Get the default security rules of network security group. + * + * @return the defaultSecurityRules value + */ + public List defaultSecurityRules() { + return this.defaultSecurityRules; + } + + /** + * Get a collection of references to network interfaces. + * + * @return the networkInterfaces value + */ + public List networkInterfaces() { + return this.networkInterfaces; + } + + /** + * Get a collection of references to subnets. + * + * @return the subnets value + */ + public List subnets() { + return this.subnets; + } + + /** + * Get the resource GUID property of the network security group resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the network security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the NetworkSecurityGroupInner object itself. + */ + public NetworkSecurityGroupInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupSecurityRuleImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupSecurityRuleImpl.java new file mode 100644 index 000000000000..bf99482fe06d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupSecurityRuleImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroupSecurityRule; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.SecurityRuleProtocol; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.SecurityRuleAccess; +import com.microsoft.azure.management.network.v2019_09_01.SecurityRuleDirection; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationSecurityGroup; + +class NetworkSecurityGroupSecurityRuleImpl extends CreatableUpdatableImpl implements NetworkSecurityGroupSecurityRule, NetworkSecurityGroupSecurityRule.Definition, NetworkSecurityGroupSecurityRule.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String networkSecurityGroupName; + private String securityRuleName; + + NetworkSecurityGroupSecurityRuleImpl(String name, NetworkManager manager) { + super(name, new SecurityRuleInner()); + this.manager = manager; + // Set resource name + this.securityRuleName = name; + // + } + + NetworkSecurityGroupSecurityRuleImpl(SecurityRuleInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.securityRuleName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.networkSecurityGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "networkSecurityGroups"); + this.securityRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "securityRules"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + SecurityRulesInner client = this.manager().inner().securityRules(); + return client.createOrUpdateAsync(this.resourceGroupName, this.networkSecurityGroupName, this.securityRuleName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + SecurityRulesInner client = this.manager().inner().securityRules(); + return client.createOrUpdateAsync(this.resourceGroupName, this.networkSecurityGroupName, this.securityRuleName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + SecurityRulesInner client = this.manager().inner().securityRules(); + return client.getAsync(this.resourceGroupName, this.networkSecurityGroupName, this.securityRuleName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public SecurityRuleAccess access() { + return this.inner().access(); + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String destinationAddressPrefix() { + return this.inner().destinationAddressPrefix(); + } + + @Override + public List destinationAddressPrefixes() { + return this.inner().destinationAddressPrefixes(); + } + + @Override + public List destinationApplicationSecurityGroups() { + List lst = new ArrayList(); + if (this.inner().destinationApplicationSecurityGroups() != null) { + for (ApplicationSecurityGroupInner inner : this.inner().destinationApplicationSecurityGroups()) { + lst.add( new ApplicationSecurityGroupImpl(inner.name(), inner, manager())); + } + } + return lst; + } + + @Override + public String destinationPortRange() { + return this.inner().destinationPortRange(); + } + + @Override + public List destinationPortRanges() { + return this.inner().destinationPortRanges(); + } + + @Override + public SecurityRuleDirection direction() { + return this.inner().direction(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer priority() { + return this.inner().priority(); + } + + @Override + public SecurityRuleProtocol protocol() { + return this.inner().protocol(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String sourceAddressPrefix() { + return this.inner().sourceAddressPrefix(); + } + + @Override + public List sourceAddressPrefixes() { + return this.inner().sourceAddressPrefixes(); + } + + @Override + public List sourceApplicationSecurityGroups() { + List lst = new ArrayList(); + if (this.inner().sourceApplicationSecurityGroups() != null) { + for (ApplicationSecurityGroupInner inner : this.inner().sourceApplicationSecurityGroups()) { + lst.add( new ApplicationSecurityGroupImpl(inner.name(), inner, manager())); + } + } + return lst; + } + + @Override + public String sourcePortRange() { + return this.inner().sourcePortRange(); + } + + @Override + public List sourcePortRanges() { + return this.inner().sourcePortRanges(); + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withExistingNetworkSecurityGroup(String resourceGroupName, String networkSecurityGroupName) { + this.resourceGroupName = resourceGroupName; + this.networkSecurityGroupName = networkSecurityGroupName; + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withAccess(SecurityRuleAccess access) { + this.inner().withAccess(access); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withDirection(SecurityRuleDirection direction) { + this.inner().withDirection(direction); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withProtocol(SecurityRuleProtocol protocol) { + this.inner().withProtocol(protocol); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withDescription(String description) { + this.inner().withDescription(description); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withDestinationAddressPrefix(String destinationAddressPrefix) { + this.inner().withDestinationAddressPrefix(destinationAddressPrefix); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withDestinationAddressPrefixes(List destinationAddressPrefixes) { + this.inner().withDestinationAddressPrefixes(destinationAddressPrefixes); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withDestinationApplicationSecurityGroups(List destinationApplicationSecurityGroups) { + this.inner().withDestinationApplicationSecurityGroups(destinationApplicationSecurityGroups); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withDestinationPortRange(String destinationPortRange) { + this.inner().withDestinationPortRange(destinationPortRange); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withDestinationPortRanges(List destinationPortRanges) { + this.inner().withDestinationPortRanges(destinationPortRanges); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withPriority(Integer priority) { + this.inner().withPriority(priority); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withSourceAddressPrefix(String sourceAddressPrefix) { + this.inner().withSourceAddressPrefix(sourceAddressPrefix); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withSourceAddressPrefixes(List sourceAddressPrefixes) { + this.inner().withSourceAddressPrefixes(sourceAddressPrefixes); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withSourceApplicationSecurityGroups(List sourceApplicationSecurityGroups) { + this.inner().withSourceApplicationSecurityGroups(sourceApplicationSecurityGroups); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withSourcePortRange(String sourcePortRange) { + this.inner().withSourcePortRange(sourcePortRange); + return this; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl withSourcePortRanges(List sourcePortRanges) { + this.inner().withSourcePortRanges(sourcePortRanges); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupSecurityRuleModelImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupSecurityRuleModelImpl.java new file mode 100644 index 000000000000..3a5d9ff4b27e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupSecurityRuleModelImpl.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroupSecurityRuleModel; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.SecurityRuleAccess; +import java.util.List; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationSecurityGroup; +import com.microsoft.azure.management.network.v2019_09_01.SecurityRuleDirection; +import com.microsoft.azure.management.network.v2019_09_01.SecurityRuleProtocol; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class NetworkSecurityGroupSecurityRuleModelImpl extends IndexableRefreshableWrapperImpl implements NetworkSecurityGroupSecurityRuleModel { + private final NetworkManager manager; + private String resourceGroupName; + private String networkSecurityGroupName; + private String defaultSecurityRuleName; + + NetworkSecurityGroupSecurityRuleModelImpl(SecurityRuleInner inner, NetworkManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.networkSecurityGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "networkSecurityGroups"); + this.defaultSecurityRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "defaultSecurityRules"); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + DefaultSecurityRulesInner client = this.manager().inner().defaultSecurityRules(); + return client.getAsync(this.resourceGroupName, this.networkSecurityGroupName, this.defaultSecurityRuleName); + } + + + + @Override + public SecurityRuleAccess access() { + return this.inner().access(); + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String destinationAddressPrefix() { + return this.inner().destinationAddressPrefix(); + } + + @Override + public List destinationAddressPrefixes() { + return this.inner().destinationAddressPrefixes(); + } + + @Override + public List destinationApplicationSecurityGroups() { + List lst = new ArrayList(); + if (this.inner().destinationApplicationSecurityGroups() != null) { + for (ApplicationSecurityGroupInner inner : this.inner().destinationApplicationSecurityGroups()) { + lst.add( new ApplicationSecurityGroupImpl(inner.name(), inner, manager())); + } + } + return lst; + } + + @Override + public String destinationPortRange() { + return this.inner().destinationPortRange(); + } + + @Override + public List destinationPortRanges() { + return this.inner().destinationPortRanges(); + } + + @Override + public SecurityRuleDirection direction() { + return this.inner().direction(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer priority() { + return this.inner().priority(); + } + + @Override + public SecurityRuleProtocol protocol() { + return this.inner().protocol(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String sourceAddressPrefix() { + return this.inner().sourceAddressPrefix(); + } + + @Override + public List sourceAddressPrefixes() { + return this.inner().sourceAddressPrefixes(); + } + + @Override + public List sourceApplicationSecurityGroups() { + List lst = new ArrayList(); + if (this.inner().sourceApplicationSecurityGroups() != null) { + for (ApplicationSecurityGroupInner inner : this.inner().sourceApplicationSecurityGroups()) { + lst.add( new ApplicationSecurityGroupImpl(inner.name(), inner, manager())); + } + } + return lst; + } + + @Override + public String sourcePortRange() { + return this.inner().sourcePortRange(); + } + + @Override + public List sourcePortRanges() { + return this.inner().sourcePortRanges(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupsImpl.java new file mode 100644 index 000000000000..611ad4f98e2b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupsImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroups; +import com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroup; +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; + +class NetworkSecurityGroupsImpl extends GroupableResourcesCoreImpl implements NetworkSecurityGroups { + protected NetworkSecurityGroupsImpl(NetworkManager manager) { + super(manager.inner().networkSecurityGroups(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + NetworkSecurityGroupsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + NetworkSecurityGroupsInner 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) { + NetworkSecurityGroupsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + NetworkSecurityGroupsInner 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 NetworkSecurityGroup call(NetworkSecurityGroupInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + NetworkSecurityGroupsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + NetworkSecurityGroupsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public NetworkSecurityGroup call(NetworkSecurityGroupInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public NetworkSecurityGroupImpl define(String name) { + return wrapModel(name); + } + + @Override + protected NetworkSecurityGroupImpl wrapModel(NetworkSecurityGroupInner inner) { + return new NetworkSecurityGroupImpl(inner.name(), inner, manager()); + } + + @Override + protected NetworkSecurityGroupImpl wrapModel(String name) { + return new NetworkSecurityGroupImpl(name, new NetworkSecurityGroupInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupsInner.java new file mode 100644 index 000000000000..7b90251221a8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkSecurityGroupsInner.java @@ -0,0 +1,1208 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 NetworkSecurityGroups. + */ +public class NetworkSecurityGroupsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private NetworkSecurityGroupsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of NetworkSecurityGroupsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public NetworkSecurityGroupsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(NetworkSecurityGroupsService.class); + this.client = client; + } + + /** + * The interface defining all the services for NetworkSecurityGroups to be + * used by Retrofit to perform actually REST calls. + */ + interface NetworkSecurityGroupsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroups delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @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.network.v2019_09_01.NetworkSecurityGroups beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @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.network.v2019_09_01.NetworkSecurityGroups getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.NetworkSecurityGroups createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Body NetworkSecurityGroupInner 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.network.v2019_09_01.NetworkSecurityGroups beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Body NetworkSecurityGroupInner 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.network.v2019_09_01.NetworkSecurityGroups updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroups list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups") + Observable> list(@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.network.v2019_09_01.NetworkSecurityGroups listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.NetworkSecurityGroups 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.network.v2019_09_01.NetworkSecurityGroups listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security 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 + */ + public void delete(String resourceGroupName, String networkSecurityGroupName) { + deleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).toBlocking().last().body(); + } + + /** + * Deletes the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security 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 deleteAsync(String resourceGroupName, String networkSecurityGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName), serviceCallback); + } + + /** + * Deletes the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String networkSecurityGroupName) { + return deleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security 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 + */ + public void beginDelete(String resourceGroupName, String networkSecurityGroupName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).toBlocking().single().body(); + } + + /** + * Deletes the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security 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 beginDeleteAsync(String resourceGroupName, String networkSecurityGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName), serviceCallback); + } + + /** + * Deletes the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String networkSecurityGroupName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security 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 NetworkSecurityGroupInner object if successful. + */ + public NetworkSecurityGroupInner getByResourceGroup(String resourceGroupName, String networkSecurityGroupName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).toBlocking().single().body(); + } + + /** + * Gets the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security 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 getByResourceGroupAsync(String resourceGroupName, String networkSecurityGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName), serviceCallback); + } + + /** + * Gets the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String networkSecurityGroupName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).map(new Func1, NetworkSecurityGroupInner>() { + @Override + public NetworkSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkSecurityGroupInner object if successful. + */ + public NetworkSecurityGroupInner getByResourceGroup(String resourceGroupName, String networkSecurityGroupName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param expand Expands referenced resources. + * @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 networkSecurityGroupName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, expand), serviceCallback); + } + + /** + * Gets the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String networkSecurityGroupName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, expand).map(new Func1, NetworkSecurityGroupInner>() { + @Override + public NetworkSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Creates or updates a network security group in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param parameters Parameters supplied to the create or update network security group 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 NetworkSecurityGroupInner object if successful. + */ + public NetworkSecurityGroupInner createOrUpdate(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a network security group in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param parameters Parameters supplied to the create or update network security group 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 createOrUpdateAsync(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, parameters), serviceCallback); + } + + /** + * Creates or updates a network security group in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param parameters Parameters supplied to the create or update network security group operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, parameters).map(new Func1, NetworkSecurityGroupInner>() { + @Override + public NetworkSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a network security group in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param parameters Parameters supplied to the create or update network security group operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a network security group in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param parameters Parameters supplied to the create or update network security group 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 NetworkSecurityGroupInner object if successful. + */ + public NetworkSecurityGroupInner beginCreateOrUpdate(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a network security group in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param parameters Parameters supplied to the create or update network security group 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 beginCreateOrUpdateAsync(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, parameters), serviceCallback); + } + + /** + * Creates or updates a network security group in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param parameters Parameters supplied to the create or update network security group operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, parameters).map(new Func1, NetworkSecurityGroupInner>() { + @Override + public NetworkSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a network security group in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param parameters Parameters supplied to the create or update network security group operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security 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 NetworkSecurityGroupInner object if successful. + */ + public NetworkSecurityGroupInner updateTags(String resourceGroupName, String networkSecurityGroupName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).toBlocking().single().body(); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security 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 updateTagsAsync(String resourceGroupName, String networkSecurityGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName), serviceCallback); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String networkSecurityGroupName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).map(new Func1, NetworkSecurityGroupInner>() { + @Override + public NetworkSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 NetworkSecurityGroupInner object if successful. + */ + public NetworkSecurityGroupInner updateTags(String resourceGroupName, String networkSecurityGroupName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags).toBlocking().single().body(); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String networkSecurityGroupName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags), serviceCallback); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String networkSecurityGroupName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags).map(new Func1, NetworkSecurityGroupInner>() { + @Override + public NetworkSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all network security groups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<NetworkSecurityGroupInner> 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 all network security groups in a subscription. + * + * @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 all network security groups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkSecurityGroupInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all network security groups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkSecurityGroupInner> 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 all network security groups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkSecurityGroupInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all network security groups in a resource group. + * + * @param resourceGroupName The name of the 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<NetworkSecurityGroupInner> 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 all network security groups in a resource group. + * + * @param resourceGroupName The name of the 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 all network security groups in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkSecurityGroupInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all network security groups in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkSecurityGroupInner> 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 all network security groups in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkSecurityGroupInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all network security groups in a subscription. + * + * @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<NetworkSecurityGroupInner> 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 all network security groups in a subscription. + * + * @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 all network security groups in a subscription. + * + * @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<NetworkSecurityGroupInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all network security groups in a subscription. + * + * @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<NetworkSecurityGroupInner> 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 all network security groups in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkSecurityGroupInner> 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 all network security groups in a resource group. + * + * @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<NetworkSecurityGroupInner> 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 all network security groups in a resource group. + * + * @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 all network security groups in a resource group. + * + * @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<NetworkSecurityGroupInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all network security groups in a resource group. + * + * @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<NetworkSecurityGroupInner> 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 all network security groups in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkSecurityGroupInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatcherImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatcherImpl.java new file mode 100644 index 000000000000..42056e8b16c1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatcherImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.NetworkWatcher; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class NetworkWatcherImpl extends GroupableResourceCoreImpl implements NetworkWatcher, NetworkWatcher.Definition, NetworkWatcher.Update { + NetworkWatcherImpl(String name, NetworkWatcherInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + NetworkWatchersInner client = this.manager().inner().networkWatchers(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + NetworkWatchersInner client = this.manager().inner().networkWatchers(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + NetworkWatchersInner client = this.manager().inner().networkWatchers(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatcherInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatcherInner.java new file mode 100644 index 000000000000..bbb9c56c774d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatcherInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Network watcher in a resource group. + */ +@JsonFlatten +@SkipParentValidation +public class NetworkWatcherInner extends Resource { + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * The provisioning state of the network watcher resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get the provisioning state of the network watcher resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the NetworkWatcherInner object itself. + */ + public NetworkWatcherInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatchersImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatchersImpl.java new file mode 100644 index 000000000000..413352fe63cb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatchersImpl.java @@ -0,0 +1,300 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.NetworkWatchers; +import com.microsoft.azure.management.network.v2019_09_01.NetworkWatcher; +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.network.v2019_09_01.Topology; +import com.microsoft.azure.management.network.v2019_09_01.VerificationIPFlowResult; +import com.microsoft.azure.management.network.v2019_09_01.NextHopResult; +import com.microsoft.azure.management.network.v2019_09_01.SecurityGroupViewResult; +import com.microsoft.azure.management.network.v2019_09_01.TroubleshootingResult; +import com.microsoft.azure.management.network.v2019_09_01.FlowLogInformation; +import com.microsoft.azure.management.network.v2019_09_01.ConnectivityInformation; +import com.microsoft.azure.management.network.v2019_09_01.AzureReachabilityReport; +import com.microsoft.azure.management.network.v2019_09_01.AvailableProvidersList; +import com.microsoft.azure.management.network.v2019_09_01.NetworkConfigurationDiagnosticResponse; +import com.microsoft.azure.management.network.v2019_09_01.TopologyParameters; +import com.microsoft.azure.management.network.v2019_09_01.VerificationIPFlowParameters; +import com.microsoft.azure.management.network.v2019_09_01.NextHopParameters; +import com.microsoft.azure.management.network.v2019_09_01.TroubleshootingParameters; +import com.microsoft.azure.management.network.v2019_09_01.ConnectivityParameters; +import com.microsoft.azure.management.network.v2019_09_01.AzureReachabilityReportParameters; +import com.microsoft.azure.management.network.v2019_09_01.AvailableProvidersListParameters; +import com.microsoft.azure.management.network.v2019_09_01.NetworkConfigurationDiagnosticParameters; + +class NetworkWatchersImpl extends GroupableResourcesCoreImpl implements NetworkWatchers { + protected NetworkWatchersImpl(NetworkManager manager) { + super(manager.inner().networkWatchers(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + NetworkWatchersInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + NetworkWatchersInner 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) { + NetworkWatchersInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + NetworkWatchersInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public NetworkWatcher call(NetworkWatcherInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + NetworkWatchersInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + NetworkWatchersInner client = this.inner(); + return client.listAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public NetworkWatcher call(NetworkWatcherInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public NetworkWatcherImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable getTopologyAsync(String resourceGroupName, String networkWatcherName, TopologyParameters parameters) { + NetworkWatchersInner client = this.inner(); + return client.getTopologyAsync(resourceGroupName, networkWatcherName, parameters) + .map(new Func1() { + @Override + public Topology call(TopologyInner inner) { + return new TopologyImpl(inner, manager()); + } + }); + } + + @Override + public Observable verifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { + NetworkWatchersInner client = this.inner(); + return client.verifyIPFlowAsync(resourceGroupName, networkWatcherName, parameters) + .map(new Func1() { + @Override + public VerificationIPFlowResult call(VerificationIPFlowResultInner inner) { + return new VerificationIPFlowResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable getNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { + NetworkWatchersInner client = this.inner(); + return client.getNextHopAsync(resourceGroupName, networkWatcherName, parameters) + .map(new Func1() { + @Override + public NextHopResult call(NextHopResultInner inner) { + return new NextHopResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable getVMSecurityRulesAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + NetworkWatchersInner client = this.inner(); + return client.getVMSecurityRulesAsync(resourceGroupName, networkWatcherName, targetResourceId) + .map(new Func1() { + @Override + public SecurityGroupViewResult call(SecurityGroupViewResultInner inner) { + return new SecurityGroupViewResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable getTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { + NetworkWatchersInner client = this.inner(); + return client.getTroubleshootingAsync(resourceGroupName, networkWatcherName, parameters) + .map(new Func1() { + @Override + public TroubleshootingResult call(TroubleshootingResultInner inner) { + return new TroubleshootingResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable getTroubleshootingResultAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + NetworkWatchersInner client = this.inner(); + return client.getTroubleshootingResultAsync(resourceGroupName, networkWatcherName, targetResourceId) + .map(new Func1() { + @Override + public TroubleshootingResult call(TroubleshootingResultInner inner) { + return new TroubleshootingResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable setFlowLogConfigurationAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters) { + NetworkWatchersInner client = this.inner(); + return client.setFlowLogConfigurationAsync(resourceGroupName, networkWatcherName, parameters) + .map(new Func1() { + @Override + public FlowLogInformation call(FlowLogInformationInner inner) { + return new FlowLogInformationImpl(inner, manager()); + } + }); + } + + @Override + public Observable getFlowLogStatusAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + NetworkWatchersInner client = this.inner(); + return client.getFlowLogStatusAsync(resourceGroupName, networkWatcherName, targetResourceId) + .map(new Func1() { + @Override + public FlowLogInformation call(FlowLogInformationInner inner) { + return new FlowLogInformationImpl(inner, manager()); + } + }); + } + + @Override + public Observable checkConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { + NetworkWatchersInner client = this.inner(); + return client.checkConnectivityAsync(resourceGroupName, networkWatcherName, parameters) + .map(new Func1() { + @Override + public ConnectivityInformation call(ConnectivityInformationInner inner) { + return new ConnectivityInformationImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { + NetworkWatchersInner client = this.inner(); + return client.getAzureReachabilityReportAsync(resourceGroupName, networkWatcherName, parameters) + .map(new Func1() { + @Override + public AzureReachabilityReport call(AzureReachabilityReportInner inner) { + return new AzureReachabilityReportImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { + NetworkWatchersInner client = this.inner(); + return client.listAvailableProvidersAsync(resourceGroupName, networkWatcherName, parameters) + .map(new Func1() { + @Override + public AvailableProvidersList call(AvailableProvidersListInner inner) { + return new AvailableProvidersListImpl(inner, manager()); + } + }); + } + + @Override + public Observable getNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + NetworkWatchersInner client = this.inner(); + return client.getNetworkConfigurationDiagnosticAsync(resourceGroupName, networkWatcherName, parameters) + .map(new Func1() { + @Override + public NetworkConfigurationDiagnosticResponse call(NetworkConfigurationDiagnosticResponseInner inner) { + return new NetworkConfigurationDiagnosticResponseImpl(inner, manager()); + } + }); + } + + @Override + protected NetworkWatcherImpl wrapModel(NetworkWatcherInner inner) { + return new NetworkWatcherImpl(inner.name(), inner, manager()); + } + + @Override + protected NetworkWatcherImpl wrapModel(String name) { + return new NetworkWatcherImpl(name, new NetworkWatcherInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatchersInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatchersInner.java new file mode 100644 index 000000000000..443ccf40f13e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatchersInner.java @@ -0,0 +1,2814 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.management.network.v2019_09_01.AvailableProvidersListParameters; +import com.microsoft.azure.management.network.v2019_09_01.AzureReachabilityReportParameters; +import com.microsoft.azure.management.network.v2019_09_01.ConnectivityParameters; +import com.microsoft.azure.management.network.v2019_09_01.ErrorResponseException; +import com.microsoft.azure.management.network.v2019_09_01.FlowLogStatusParameters; +import com.microsoft.azure.management.network.v2019_09_01.NetworkConfigurationDiagnosticParameters; +import com.microsoft.azure.management.network.v2019_09_01.NextHopParameters; +import com.microsoft.azure.management.network.v2019_09_01.QueryTroubleshootingParameters; +import com.microsoft.azure.management.network.v2019_09_01.SecurityGroupViewParameters; +import com.microsoft.azure.management.network.v2019_09_01.TagsObject; +import com.microsoft.azure.management.network.v2019_09_01.TopologyParameters; +import com.microsoft.azure.management.network.v2019_09_01.TroubleshootingParameters; +import com.microsoft.azure.management.network.v2019_09_01.VerificationIPFlowParameters; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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.Response; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in NetworkWatchers. + */ +public class NetworkWatchersInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private NetworkWatchersService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of NetworkWatchersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public NetworkWatchersInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(NetworkWatchersService.class); + this.client = client; + } + + /** + * The interface defining all the services for NetworkWatchers to be + * used by Retrofit to perform actually REST calls. + */ + interface NetworkWatchersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkWatchers createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body NetworkWatcherInner 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.network.v2019_09_01.NetworkWatchers getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @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.network.v2019_09_01.NetworkWatchers delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @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.network.v2019_09_01.NetworkWatchers beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @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.network.v2019_09_01.NetworkWatchers updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkWatchers listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.NetworkWatchers list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers") + Observable> list(@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.network.v2019_09_01.NetworkWatchers getTopology" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology") + Observable> getTopology(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body TopologyParameters 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.network.v2019_09_01.NetworkWatchers verifyIPFlow" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify") + Observable> verifyIPFlow(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body VerificationIPFlowParameters 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.network.v2019_09_01.NetworkWatchers beginVerifyIPFlow" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify") + Observable> beginVerifyIPFlow(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body VerificationIPFlowParameters 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.network.v2019_09_01.NetworkWatchers getNextHop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop") + Observable> getNextHop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body NextHopParameters 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.network.v2019_09_01.NetworkWatchers beginGetNextHop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop") + Observable> beginGetNextHop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body NextHopParameters 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.network.v2019_09_01.NetworkWatchers getVMSecurityRules" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView") + Observable> getVMSecurityRules(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SecurityGroupViewParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkWatchers beginGetVMSecurityRules" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView") + Observable> beginGetVMSecurityRules(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SecurityGroupViewParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkWatchers getTroubleshooting" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot") + Observable> getTroubleshooting(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body TroubleshootingParameters 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.network.v2019_09_01.NetworkWatchers beginGetTroubleshooting" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot") + Observable> beginGetTroubleshooting(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body TroubleshootingParameters 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.network.v2019_09_01.NetworkWatchers getTroubleshootingResult" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult") + Observable> getTroubleshootingResult(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body QueryTroubleshootingParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkWatchers beginGetTroubleshootingResult" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult") + Observable> beginGetTroubleshootingResult(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body QueryTroubleshootingParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkWatchers setFlowLogConfiguration" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog") + Observable> setFlowLogConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body FlowLogInformationInner 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.network.v2019_09_01.NetworkWatchers beginSetFlowLogConfiguration" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog") + Observable> beginSetFlowLogConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body FlowLogInformationInner 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.network.v2019_09_01.NetworkWatchers getFlowLogStatus" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus") + Observable> getFlowLogStatus(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body FlowLogStatusParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkWatchers beginGetFlowLogStatus" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus") + Observable> beginGetFlowLogStatus(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body FlowLogStatusParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkWatchers checkConnectivity" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck") + Observable> checkConnectivity(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body ConnectivityParameters 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.network.v2019_09_01.NetworkWatchers beginCheckConnectivity" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck") + Observable> beginCheckConnectivity(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body ConnectivityParameters 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.network.v2019_09_01.NetworkWatchers getAzureReachabilityReport" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport") + Observable> getAzureReachabilityReport(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body AzureReachabilityReportParameters 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.network.v2019_09_01.NetworkWatchers beginGetAzureReachabilityReport" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport") + Observable> beginGetAzureReachabilityReport(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body AzureReachabilityReportParameters 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.network.v2019_09_01.NetworkWatchers listAvailableProviders" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList") + Observable> listAvailableProviders(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body AvailableProvidersListParameters 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.network.v2019_09_01.NetworkWatchers beginListAvailableProviders" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList") + Observable> beginListAvailableProviders(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body AvailableProvidersListParameters 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.network.v2019_09_01.NetworkWatchers getNetworkConfigurationDiagnostic" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic") + Observable> getNetworkConfigurationDiagnostic(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body NetworkConfigurationDiagnosticParameters 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.network.v2019_09_01.NetworkWatchers beginGetNetworkConfigurationDiagnostic" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic") + Observable> beginGetNetworkConfigurationDiagnostic(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body NetworkConfigurationDiagnosticParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a network watcher in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the network watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkWatcherInner object if successful. + */ + public NetworkWatcherInner createOrUpdate(String resourceGroupName, String networkWatcherName, NetworkWatcherInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a network watcher in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the network watcher resource. + * @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 networkWatcherName, NetworkWatcherInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Creates or updates a network watcher in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the network watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkWatcherInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String networkWatcherName, NetworkWatcherInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, NetworkWatcherInner>() { + @Override + public NetworkWatcherInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a network watcher in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the network watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkWatcherInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, NetworkWatcherInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.createOrUpdate(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets the specified network watcher by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkWatcherInner object if successful. + */ + public NetworkWatcherInner getByResourceGroup(String resourceGroupName, String networkWatcherName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkWatcherName).toBlocking().single().body(); + } + + /** + * Gets the specified network watcher by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @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 networkWatcherName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkWatcherName), serviceCallback); + } + + /** + * Gets the specified network watcher by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkWatcherInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String networkWatcherName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkWatcherName).map(new Func1, NetworkWatcherInner>() { + @Override + public NetworkWatcherInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified network watcher by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkWatcherInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String networkWatcherName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, networkWatcherName, this.client.subscriptionId(), 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes the specified network watcher resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException 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 networkWatcherName) { + deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName).toBlocking().last().body(); + } + + /** + * Deletes the specified network watcher resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @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 networkWatcherName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName), serviceCallback); + } + + /** + * Deletes the specified network watcher resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String networkWatcherName) { + return deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified network watcher resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String networkWatcherName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified network watcher resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException 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 networkWatcherName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName).toBlocking().single().body(); + } + + /** + * Deletes the specified network watcher resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @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 networkWatcherName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName), serviceCallback); + } + + /** + * Deletes the specified network watcher resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String networkWatcherName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified network watcher resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String networkWatcherName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, networkWatcherName, this.client.subscriptionId(), 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkWatcherInner object if successful. + */ + public NetworkWatcherInner updateTags(String resourceGroupName, String networkWatcherName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName).toBlocking().single().body(); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @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 updateTagsAsync(String resourceGroupName, String networkWatcherName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName), serviceCallback); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkWatcherInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String networkWatcherName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName).map(new Func1, NetworkWatcherInner>() { + @Override + public NetworkWatcherInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkWatcherInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkWatcherName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkWatcherInner object if successful. + */ + public NetworkWatcherInner updateTags(String resourceGroupName, String networkWatcherName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, tags).toBlocking().single().body(); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String networkWatcherName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, tags), serviceCallback); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkWatcherInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String networkWatcherName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, tags).map(new Func1, NetworkWatcherInner>() { + @Override + public NetworkWatcherInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkWatcherInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets all network watchers by resource group. + * + * @param resourceGroupName The name of the resource group. + * @return the PagedList object if successful. + */ + public PagedList listByResourceGroup(String resourceGroupName) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(listByResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Gets all network watchers by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName), serviceCallback); + } + + /** + * Gets all network watchers by resource group. + * + * @param resourceGroupName The name of the resource group. + * @return the observable to the List<NetworkWatcherInner> object + */ + public Observable> listByResourceGroupAsync(String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Gets all network watchers by resource group. + * + * @param resourceGroupName The name of the resource group. + * @return the observable to the List<NetworkWatcherInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets all network watchers by subscription. + * + * @return the PagedList object if successful. + */ + public PagedList list() { + PageImpl1 page = new PageImpl1<>(); + page.setItems(listWithServiceResponseAsync().toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Gets all network watchers by subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Gets all network watchers by subscription. + * + * @return the observable to the List<NetworkWatcherInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Gets all network watchers by subscription. + * + * @return the observable to the List<NetworkWatcherInner> object + */ + public Observable>> listWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets the current network topology by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the representation of topology. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TopologyInner object if successful. + */ + public TopologyInner getTopology(String resourceGroupName, String networkWatcherName, TopologyParameters parameters) { + return getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); + } + + /** + * Gets the current network topology by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the representation of topology. + * @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 getTopologyAsync(String resourceGroupName, String networkWatcherName, TopologyParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Gets the current network topology by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the representation of topology. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopologyInner object + */ + public Observable getTopologyAsync(String resourceGroupName, String networkWatcherName, TopologyParameters parameters) { + return getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, TopologyInner>() { + @Override + public TopologyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the current network topology by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the representation of topology. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopologyInner object + */ + public Observable> getTopologyWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, TopologyParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.getTopology(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTopologyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTopologyDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Verify IP flow from the specified VM to a location given the currently configured NSG rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the IP flow to be verified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VerificationIPFlowResultInner object if successful. + */ + public VerificationIPFlowResultInner verifyIPFlow(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { + return verifyIPFlowWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); + } + + /** + * Verify IP flow from the specified VM to a location given the currently configured NSG rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the IP flow to be verified. + * @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 verifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(verifyIPFlowWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Verify IP flow from the specified VM to a location given the currently configured NSG rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the IP flow to be verified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable verifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { + return verifyIPFlowWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, VerificationIPFlowResultInner>() { + @Override + public VerificationIPFlowResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Verify IP flow from the specified VM to a location given the currently configured NSG rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the IP flow to be verified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> verifyIPFlowWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.verifyIPFlow(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Verify IP flow from the specified VM to a location given the currently configured NSG rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the IP flow to be verified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VerificationIPFlowResultInner object if successful. + */ + public VerificationIPFlowResultInner beginVerifyIPFlow(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { + return beginVerifyIPFlowWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); + } + + /** + * Verify IP flow from the specified VM to a location given the currently configured NSG rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the IP flow to be verified. + * @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 beginVerifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginVerifyIPFlowWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Verify IP flow from the specified VM to a location given the currently configured NSG rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the IP flow to be verified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VerificationIPFlowResultInner object + */ + public Observable beginVerifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { + return beginVerifyIPFlowWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, VerificationIPFlowResultInner>() { + @Override + public VerificationIPFlowResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Verify IP flow from the specified VM to a location given the currently configured NSG rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the IP flow to be verified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VerificationIPFlowResultInner object + */ + public Observable> beginVerifyIPFlowWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginVerifyIPFlow(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginVerifyIPFlowDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginVerifyIPFlowDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets the next hop from the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the source and destination endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NextHopResultInner object if successful. + */ + public NextHopResultInner getNextHop(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { + return getNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); + } + + /** + * Gets the next hop from the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the source and destination endpoint. + * @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 getNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Gets the next hop from the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the source and destination endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { + return getNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, NextHopResultInner>() { + @Override + public NextHopResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the next hop from the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the source and destination endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getNextHopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.getNextHop(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets the next hop from the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the source and destination endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NextHopResultInner object if successful. + */ + public NextHopResultInner beginGetNextHop(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { + return beginGetNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); + } + + /** + * Gets the next hop from the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the source and destination endpoint. + * @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 beginGetNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Gets the next hop from the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the source and destination endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NextHopResultInner object + */ + public Observable beginGetNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { + return beginGetNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, NextHopResultInner>() { + @Override + public NextHopResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the next hop from the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters that define the source and destination endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NextHopResultInner object + */ + public Observable> beginGetNextHopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginGetNextHop(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetNextHopDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetNextHopDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets the configured and effective security group rules on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param targetResourceId ID of the target VM. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SecurityGroupViewResultInner object if successful. + */ + public SecurityGroupViewResultInner getVMSecurityRules(String resourceGroupName, String networkWatcherName, String targetResourceId) { + return getVMSecurityRulesWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).toBlocking().last().body(); + } + + /** + * Gets the configured and effective security group rules on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param targetResourceId ID of the target VM. + * @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 getVMSecurityRulesAsync(String resourceGroupName, String networkWatcherName, String targetResourceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVMSecurityRulesWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId), serviceCallback); + } + + /** + * Gets the configured and effective security group rules on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param targetResourceId ID of the target VM. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getVMSecurityRulesAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + return getVMSecurityRulesWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).map(new Func1, SecurityGroupViewResultInner>() { + @Override + public SecurityGroupViewResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the configured and effective security group rules on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param targetResourceId ID of the target VM. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getVMSecurityRulesWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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 (targetResourceId == null) { + throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + SecurityGroupViewParameters parameters = new SecurityGroupViewParameters(); + parameters.withTargetResourceId(targetResourceId); + Observable> observable = service.getVMSecurityRules(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets the configured and effective security group rules on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param targetResourceId ID of the target VM. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SecurityGroupViewResultInner object if successful. + */ + public SecurityGroupViewResultInner beginGetVMSecurityRules(String resourceGroupName, String networkWatcherName, String targetResourceId) { + return beginGetVMSecurityRulesWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).toBlocking().single().body(); + } + + /** + * Gets the configured and effective security group rules on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param targetResourceId ID of the target VM. + * @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 beginGetVMSecurityRulesAsync(String resourceGroupName, String networkWatcherName, String targetResourceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetVMSecurityRulesWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId), serviceCallback); + } + + /** + * Gets the configured and effective security group rules on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param targetResourceId ID of the target VM. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecurityGroupViewResultInner object + */ + public Observable beginGetVMSecurityRulesAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + return beginGetVMSecurityRulesWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).map(new Func1, SecurityGroupViewResultInner>() { + @Override + public SecurityGroupViewResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the configured and effective security group rules on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param targetResourceId ID of the target VM. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecurityGroupViewResultInner object + */ + public Observable> beginGetVMSecurityRulesWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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 (targetResourceId == null) { + throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + SecurityGroupViewParameters parameters = new SecurityGroupViewParameters(); + parameters.withTargetResourceId(targetResourceId); + return service.beginGetVMSecurityRules(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetVMSecurityRulesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetVMSecurityRulesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Initiate troubleshooting on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the resource to troubleshoot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TroubleshootingResultInner object if successful. + */ + public TroubleshootingResultInner getTroubleshooting(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { + return getTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); + } + + /** + * Initiate troubleshooting on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the resource to troubleshoot. + * @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 getTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Initiate troubleshooting on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the resource to troubleshoot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { + return getTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, TroubleshootingResultInner>() { + @Override + public TroubleshootingResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Initiate troubleshooting on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the resource to troubleshoot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getTroubleshootingWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.getTroubleshooting(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Initiate troubleshooting on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the resource to troubleshoot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TroubleshootingResultInner object if successful. + */ + public TroubleshootingResultInner beginGetTroubleshooting(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { + return beginGetTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); + } + + /** + * Initiate troubleshooting on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the resource to troubleshoot. + * @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 beginGetTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Initiate troubleshooting on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the resource to troubleshoot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TroubleshootingResultInner object + */ + public Observable beginGetTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { + return beginGetTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, TroubleshootingResultInner>() { + @Override + public TroubleshootingResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Initiate troubleshooting on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the resource to troubleshoot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TroubleshootingResultInner object + */ + public Observable> beginGetTroubleshootingWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginGetTroubleshooting(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetTroubleshootingDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetTroubleshootingDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Get the last completed troubleshooting result on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource ID to query the troubleshooting result. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TroubleshootingResultInner object if successful. + */ + public TroubleshootingResultInner getTroubleshootingResult(String resourceGroupName, String networkWatcherName, String targetResourceId) { + return getTroubleshootingResultWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).toBlocking().last().body(); + } + + /** + * Get the last completed troubleshooting result on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource ID to query the troubleshooting result. + * @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 getTroubleshootingResultAsync(String resourceGroupName, String networkWatcherName, String targetResourceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTroubleshootingResultWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId), serviceCallback); + } + + /** + * Get the last completed troubleshooting result on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource ID to query the troubleshooting result. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getTroubleshootingResultAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + return getTroubleshootingResultWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).map(new Func1, TroubleshootingResultInner>() { + @Override + public TroubleshootingResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the last completed troubleshooting result on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource ID to query the troubleshooting result. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getTroubleshootingResultWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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 (targetResourceId == null) { + throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + QueryTroubleshootingParameters parameters = new QueryTroubleshootingParameters(); + parameters.withTargetResourceId(targetResourceId); + Observable> observable = service.getTroubleshootingResult(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Get the last completed troubleshooting result on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource ID to query the troubleshooting result. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TroubleshootingResultInner object if successful. + */ + public TroubleshootingResultInner beginGetTroubleshootingResult(String resourceGroupName, String networkWatcherName, String targetResourceId) { + return beginGetTroubleshootingResultWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).toBlocking().single().body(); + } + + /** + * Get the last completed troubleshooting result on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource ID to query the troubleshooting result. + * @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 beginGetTroubleshootingResultAsync(String resourceGroupName, String networkWatcherName, String targetResourceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetTroubleshootingResultWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId), serviceCallback); + } + + /** + * Get the last completed troubleshooting result on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource ID to query the troubleshooting result. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TroubleshootingResultInner object + */ + public Observable beginGetTroubleshootingResultAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + return beginGetTroubleshootingResultWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).map(new Func1, TroubleshootingResultInner>() { + @Override + public TroubleshootingResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the last completed troubleshooting result on a specified resource. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource ID to query the troubleshooting result. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TroubleshootingResultInner object + */ + public Observable> beginGetTroubleshootingResultWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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 (targetResourceId == null) { + throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + QueryTroubleshootingParameters parameters = new QueryTroubleshootingParameters(); + parameters.withTargetResourceId(targetResourceId); + return service.beginGetTroubleshootingResult(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetTroubleshootingResultDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetTroubleshootingResultDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Configures flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the configuration of flow log. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FlowLogInformationInner object if successful. + */ + public FlowLogInformationInner setFlowLogConfiguration(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters) { + return setFlowLogConfigurationWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); + } + + /** + * Configures flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the configuration of flow log. + * @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 setFlowLogConfigurationAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(setFlowLogConfigurationWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Configures flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the configuration of flow log. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable setFlowLogConfigurationAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters) { + return setFlowLogConfigurationWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, FlowLogInformationInner>() { + @Override + public FlowLogInformationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Configures flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the configuration of flow log. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> setFlowLogConfigurationWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.setFlowLogConfiguration(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Configures flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the configuration of flow log. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FlowLogInformationInner object if successful. + */ + public FlowLogInformationInner beginSetFlowLogConfiguration(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters) { + return beginSetFlowLogConfigurationWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); + } + + /** + * Configures flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the configuration of flow log. + * @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 beginSetFlowLogConfigurationAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginSetFlowLogConfigurationWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Configures flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the configuration of flow log. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FlowLogInformationInner object + */ + public Observable beginSetFlowLogConfigurationAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters) { + return beginSetFlowLogConfigurationWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, FlowLogInformationInner>() { + @Override + public FlowLogInformationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Configures flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that define the configuration of flow log. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FlowLogInformationInner object + */ + public Observable> beginSetFlowLogConfigurationWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginSetFlowLogConfiguration(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginSetFlowLogConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginSetFlowLogConfigurationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Queries status of flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FlowLogInformationInner object if successful. + */ + public FlowLogInformationInner getFlowLogStatus(String resourceGroupName, String networkWatcherName, String targetResourceId) { + return getFlowLogStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).toBlocking().last().body(); + } + + /** + * Queries status of flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. + * @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 getFlowLogStatusAsync(String resourceGroupName, String networkWatcherName, String targetResourceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getFlowLogStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId), serviceCallback); + } + + /** + * Queries status of flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getFlowLogStatusAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + return getFlowLogStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).map(new Func1, FlowLogInformationInner>() { + @Override + public FlowLogInformationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Queries status of flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getFlowLogStatusWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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 (targetResourceId == null) { + throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + FlowLogStatusParameters parameters = new FlowLogStatusParameters(); + parameters.withTargetResourceId(targetResourceId); + Observable> observable = service.getFlowLogStatus(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Queries status of flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FlowLogInformationInner object if successful. + */ + public FlowLogInformationInner beginGetFlowLogStatus(String resourceGroupName, String networkWatcherName, String targetResourceId) { + return beginGetFlowLogStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).toBlocking().single().body(); + } + + /** + * Queries status of flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. + * @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 beginGetFlowLogStatusAsync(String resourceGroupName, String networkWatcherName, String targetResourceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetFlowLogStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId), serviceCallback); + } + + /** + * Queries status of flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FlowLogInformationInner object + */ + public Observable beginGetFlowLogStatusAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + return beginGetFlowLogStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).map(new Func1, FlowLogInformationInner>() { + @Override + public FlowLogInformationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Queries status of flow log and traffic analytics (optional) on a specified resource. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FlowLogInformationInner object + */ + public Observable> beginGetFlowLogStatusWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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 (targetResourceId == null) { + throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + FlowLogStatusParameters parameters = new FlowLogStatusParameters(); + parameters.withTargetResourceId(targetResourceId); + return service.beginGetFlowLogStatus(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetFlowLogStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetFlowLogStatusDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine how the connectivity check will be performed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectivityInformationInner object if successful. + */ + public ConnectivityInformationInner checkConnectivity(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { + return checkConnectivityWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); + } + + /** + * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine how the connectivity check will be performed. + * @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 checkConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkConnectivityWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine how the connectivity check will be performed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable checkConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { + return checkConnectivityWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, ConnectivityInformationInner>() { + @Override + public ConnectivityInformationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine how the connectivity check will be performed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> checkConnectivityWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.checkConnectivity(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine how the connectivity check will be performed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectivityInformationInner object if successful. + */ + public ConnectivityInformationInner beginCheckConnectivity(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { + return beginCheckConnectivityWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); + } + + /** + * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine how the connectivity check will be performed. + * @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 beginCheckConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCheckConnectivityWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine how the connectivity check will be performed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectivityInformationInner object + */ + public Observable beginCheckConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { + return beginCheckConnectivityWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, ConnectivityInformationInner>() { + @Override + public ConnectivityInformationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine how the connectivity check will be performed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectivityInformationInner object + */ + public Observable> beginCheckConnectivityWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCheckConnectivity(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCheckConnectivityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCheckConnectivityDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AzureReachabilityReportInner object if successful. + */ + public AzureReachabilityReportInner getAzureReachabilityReport(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { + return getAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @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 getAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { + return getAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, AzureReachabilityReportInner>() { + @Override + public AzureReachabilityReportInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getAzureReachabilityReportWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.getAzureReachabilityReport(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AzureReachabilityReportInner object if successful. + */ + public AzureReachabilityReportInner beginGetAzureReachabilityReport(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { + return beginGetAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @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 beginGetAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureReachabilityReportInner object + */ + public Observable beginGetAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { + return beginGetAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, AzureReachabilityReportInner>() { + @Override + public AzureReachabilityReportInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureReachabilityReportInner object + */ + public Observable> beginGetAzureReachabilityReportWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginGetAzureReachabilityReport(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetAzureReachabilityReportDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetAzureReachabilityReportDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AvailableProvidersListInner object if successful. + */ + public AvailableProvidersListInner listAvailableProviders(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { + return listAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @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 listAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { + return listAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, AvailableProvidersListInner>() { + @Override + public AvailableProvidersListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listAvailableProvidersWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.listAvailableProviders(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AvailableProvidersListInner object if successful. + */ + public AvailableProvidersListInner beginListAvailableProviders(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { + return beginListAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @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 beginListAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AvailableProvidersListInner object + */ + public Observable beginListAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { + return beginListAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, AvailableProvidersListInner>() { + @Override + public AvailableProvidersListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AvailableProvidersListInner object + */ + public Observable> beginListAvailableProvidersWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginListAvailableProviders(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListAvailableProvidersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListAvailableProvidersDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkConfigurationDiagnosticResponseInner object if successful. + */ + public NetworkConfigurationDiagnosticResponseInner getNetworkConfigurationDiagnostic(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + return getNetworkConfigurationDiagnosticWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); + } + + /** + * Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @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 getNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getNetworkConfigurationDiagnosticWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + return getNetworkConfigurationDiagnosticWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, NetworkConfigurationDiagnosticResponseInner>() { + @Override + public NetworkConfigurationDiagnosticResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getNetworkConfigurationDiagnosticWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.getNetworkConfigurationDiagnostic(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkConfigurationDiagnosticResponseInner object if successful. + */ + public NetworkConfigurationDiagnosticResponseInner beginGetNetworkConfigurationDiagnostic(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + return beginGetNetworkConfigurationDiagnosticWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); + } + + /** + * Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @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 beginGetNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetNetworkConfigurationDiagnosticWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkConfigurationDiagnosticResponseInner object + */ + public Observable beginGetNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + return beginGetNetworkConfigurationDiagnosticWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, NetworkConfigurationDiagnosticResponseInner>() { + @Override + public NetworkConfigurationDiagnosticResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkConfigurationDiagnosticResponseInner object + */ + public Observable> beginGetNetworkConfigurationDiagnosticWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginGetNetworkConfigurationDiagnostic(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetNetworkConfigurationDiagnosticDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetNetworkConfigurationDiagnosticDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NextHopResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NextHopResultImpl.java new file mode 100644 index 000000000000..c9ab65ee479f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NextHopResultImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.NextHopResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.NextHopType; + +class NextHopResultImpl extends WrapperImpl implements NextHopResult { + private final NetworkManager manager; + NextHopResultImpl(NextHopResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String nextHopIpAddress() { + return this.inner().nextHopIpAddress(); + } + + @Override + public NextHopType nextHopType() { + return this.inner().nextHopType(); + } + + @Override + public String routeTableId() { + return this.inner().routeTableId(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NextHopResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NextHopResultInner.java new file mode 100644 index 000000000000..96c7f3bc8e96 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NextHopResultInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.NextHopType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The information about next hop from the specified VM. + */ +public class NextHopResultInner { + /** + * Next hop type. Possible values include: 'Internet', 'VirtualAppliance', + * 'VirtualNetworkGateway', 'VnetLocal', 'HyperNetGateway', 'None'. + */ + @JsonProperty(value = "nextHopType") + private NextHopType nextHopType; + + /** + * Next hop IP Address. + */ + @JsonProperty(value = "nextHopIpAddress") + private String nextHopIpAddress; + + /** + * The resource identifier for the route table associated with the route + * being returned. If the route being returned does not correspond to any + * user created routes then this field will be the string 'System Route'. + */ + @JsonProperty(value = "routeTableId") + private String routeTableId; + + /** + * Get next hop type. Possible values include: 'Internet', 'VirtualAppliance', 'VirtualNetworkGateway', 'VnetLocal', 'HyperNetGateway', 'None'. + * + * @return the nextHopType value + */ + public NextHopType nextHopType() { + return this.nextHopType; + } + + /** + * Set next hop type. Possible values include: 'Internet', 'VirtualAppliance', 'VirtualNetworkGateway', 'VnetLocal', 'HyperNetGateway', 'None'. + * + * @param nextHopType the nextHopType value to set + * @return the NextHopResultInner object itself. + */ + public NextHopResultInner withNextHopType(NextHopType nextHopType) { + this.nextHopType = nextHopType; + return this; + } + + /** + * Get next hop IP Address. + * + * @return the nextHopIpAddress value + */ + public String nextHopIpAddress() { + return this.nextHopIpAddress; + } + + /** + * Set next hop IP Address. + * + * @param nextHopIpAddress the nextHopIpAddress value to set + * @return the NextHopResultInner object itself. + */ + public NextHopResultInner withNextHopIpAddress(String nextHopIpAddress) { + this.nextHopIpAddress = nextHopIpAddress; + return this; + } + + /** + * Get the resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. + * + * @return the routeTableId value + */ + public String routeTableId() { + return this.routeTableId; + } + + /** + * Set the resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. + * + * @param routeTableId the routeTableId value to set + * @return the NextHopResultInner object itself. + */ + public NextHopResultInner withRouteTableId(String routeTableId) { + this.routeTableId = routeTableId; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationImpl.java new file mode 100644 index 000000000000..290325df5ce6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.Operation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.OperationDisplay; +import com.microsoft.azure.management.network.v2019_09_01.OperationPropertiesFormatServiceSpecification; + +class OperationImpl extends WrapperImpl implements Operation { + private final NetworkManager manager; + OperationImpl(OperationInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public OperationDisplay display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String origin() { + return this.inner().origin(); + } + + @Override + public OperationPropertiesFormatServiceSpecification serviceSpecification() { + return this.inner().serviceSpecification(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationInner.java new file mode 100644 index 000000000000..67017f397326 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationInner.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.OperationDisplay; +import com.microsoft.azure.management.network.v2019_09_01.OperationPropertiesFormatServiceSpecification; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Network REST API operation definition. + */ +@JsonFlatten +public class OperationInner { + /** + * Operation name: {provider}/{resource}/{operation}. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Display metadata associated with the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * Origin of the operation. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * Specification of the service. + */ + @JsonProperty(value = "properties.serviceSpecification") + private OperationPropertiesFormatServiceSpecification serviceSpecification; + + /** + * Get operation name: {provider}/{resource}/{operation}. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set operation name: {provider}/{resource}/{operation}. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get display metadata associated with the operation. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set display metadata associated with 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 origin of the operation. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set origin of the operation. + * + * @param origin the origin value to set + * @return the OperationInner object itself. + */ + public OperationInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get specification of the service. + * + * @return the serviceSpecification value + */ + public OperationPropertiesFormatServiceSpecification serviceSpecification() { + return this.serviceSpecification; + } + + /** + * Set specification of the service. + * + * @param serviceSpecification the serviceSpecification value to set + * @return the OperationInner object itself. + */ + public OperationInner withServiceSpecification(OperationPropertiesFormatServiceSpecification serviceSpecification) { + this.serviceSpecification = serviceSpecification; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationsImpl.java new file mode 100644 index 000000000000..7d5404ba939f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationsImpl.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. + * abc + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.Operation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final NetworkManager manager; + + OperationsImpl(NetworkManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Operation call(OperationInner inner) { + return new OperationImpl(inner, manager()); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationsInner.java new file mode 100644 index 000000000000..c76572af5fd7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OperationsInner.java @@ -0,0 +1,281 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +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 Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl 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, NetworkManagementClientImpl 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.network.v2019_09_01.Operations list" }) + @GET("providers/Microsoft.Network/operations") + Observable> list(@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.network.v2019_09_01.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available Network 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 PagedList<OperationInner> 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 all of the available Network 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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available Network Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available Network Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> 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 all of the available Network Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + final String apiVersion = "2019-09-01"; + return service.list(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 { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all of the available Network Rest API operations. + * + * @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<OperationInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available Network Rest API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available Network Rest API operations. + * + * @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<OperationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available Network Rest API operations. + * + * @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<OperationInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available Network Rest API operations. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OutboundRuleImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OutboundRuleImpl.java new file mode 100644 index 000000000000..2e3624664e0a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OutboundRuleImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.OutboundRule; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerOutboundRuleProtocol; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class OutboundRuleImpl extends IndexableRefreshableWrapperImpl implements OutboundRule { + private final NetworkManager manager; + private String resourceGroupName; + private String loadBalancerName; + private String outboundRuleName; + + OutboundRuleImpl(OutboundRuleInner inner, NetworkManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.loadBalancerName = IdParsingUtils.getValueFromIdByName(inner.id(), "loadBalancers"); + this.outboundRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "outboundRules"); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + LoadBalancerOutboundRulesInner client = this.manager().inner().loadBalancerOutboundRules(); + return client.getAsync(this.resourceGroupName, this.loadBalancerName, this.outboundRuleName); + } + + + + @Override + public Integer allocatedOutboundPorts() { + return this.inner().allocatedOutboundPorts(); + } + + @Override + public SubResource backendAddressPool() { + return this.inner().backendAddressPool(); + } + + @Override + public Boolean enableTcpReset() { + return this.inner().enableTcpReset(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List frontendIPConfigurations() { + return this.inner().frontendIPConfigurations(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Integer idleTimeoutInMinutes() { + return this.inner().idleTimeoutInMinutes(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public LoadBalancerOutboundRuleProtocol protocol() { + return this.inner().protocol(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OutboundRuleInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OutboundRuleInner.java new file mode 100644 index 000000000000..e433d35eb26a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/OutboundRuleInner.java @@ -0,0 +1,256 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.LoadBalancerOutboundRuleProtocol; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Outbound rule of the load balancer. + */ +@JsonFlatten +public class OutboundRuleInner extends SubResource { + /** + * The number of outbound ports to be used for NAT. + */ + @JsonProperty(value = "properties.allocatedOutboundPorts") + private Integer allocatedOutboundPorts; + + /** + * The Frontend IP addresses of the load balancer. + */ + @JsonProperty(value = "properties.frontendIPConfigurations", required = true) + private List frontendIPConfigurations; + + /** + * A reference to a pool of DIPs. Outbound traffic is randomly load + * balanced across IPs in the backend IPs. + */ + @JsonProperty(value = "properties.backendAddressPool", required = true) + private SubResource backendAddressPool; + + /** + * The provisioning state of the outbound rule resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The protocol for the outbound rule in load balancer. Possible values + * include: 'Tcp', 'Udp', 'All'. + */ + @JsonProperty(value = "properties.protocol", required = true) + private LoadBalancerOutboundRuleProtocol protocol; + + /** + * Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + * connection termination. This element is only used when the protocol is + * set to TCP. + */ + @JsonProperty(value = "properties.enableTcpReset") + private Boolean enableTcpReset; + + /** + * The timeout for the TCP idle connection. + */ + @JsonProperty(value = "properties.idleTimeoutInMinutes") + private Integer idleTimeoutInMinutes; + + /** + * The name of the resource that is unique within the set of outbound rules + * used by the load balancer. This name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the number of outbound ports to be used for NAT. + * + * @return the allocatedOutboundPorts value + */ + public Integer allocatedOutboundPorts() { + return this.allocatedOutboundPorts; + } + + /** + * Set the number of outbound ports to be used for NAT. + * + * @param allocatedOutboundPorts the allocatedOutboundPorts value to set + * @return the OutboundRuleInner object itself. + */ + public OutboundRuleInner withAllocatedOutboundPorts(Integer allocatedOutboundPorts) { + this.allocatedOutboundPorts = allocatedOutboundPorts; + return this; + } + + /** + * Get the Frontend IP addresses of the load balancer. + * + * @return the frontendIPConfigurations value + */ + public List frontendIPConfigurations() { + return this.frontendIPConfigurations; + } + + /** + * Set the Frontend IP addresses of the load balancer. + * + * @param frontendIPConfigurations the frontendIPConfigurations value to set + * @return the OutboundRuleInner object itself. + */ + public OutboundRuleInner withFrontendIPConfigurations(List frontendIPConfigurations) { + this.frontendIPConfigurations = frontendIPConfigurations; + return this; + } + + /** + * Get a reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. + * + * @return the backendAddressPool value + */ + public SubResource backendAddressPool() { + return this.backendAddressPool; + } + + /** + * Set a reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. + * + * @param backendAddressPool the backendAddressPool value to set + * @return the OutboundRuleInner object itself. + */ + public OutboundRuleInner withBackendAddressPool(SubResource backendAddressPool) { + this.backendAddressPool = backendAddressPool; + return this; + } + + /** + * Get the provisioning state of the outbound rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the protocol for the outbound rule in load balancer. Possible values include: 'Tcp', 'Udp', 'All'. + * + * @return the protocol value + */ + public LoadBalancerOutboundRuleProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol for the outbound rule in load balancer. Possible values include: 'Tcp', 'Udp', 'All'. + * + * @param protocol the protocol value to set + * @return the OutboundRuleInner object itself. + */ + public OutboundRuleInner withProtocol(LoadBalancerOutboundRuleProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + * + * @return the enableTcpReset value + */ + public Boolean enableTcpReset() { + return this.enableTcpReset; + } + + /** + * Set receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + * + * @param enableTcpReset the enableTcpReset value to set + * @return the OutboundRuleInner object itself. + */ + public OutboundRuleInner withEnableTcpReset(Boolean enableTcpReset) { + this.enableTcpReset = enableTcpReset; + return this; + } + + /** + * Get the timeout for the TCP idle connection. + * + * @return the idleTimeoutInMinutes value + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set the timeout for the TCP idle connection. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set + * @return the OutboundRuleInner object itself. + */ + public OutboundRuleInner withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + + /** + * Get the name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used to access the resource. + * + * @param name the name value to set + * @return the OutboundRuleInner object itself. + */ + public OutboundRuleInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnConnectionHealthImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnConnectionHealthImpl.java new file mode 100644 index 000000000000..3fe33d221789 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnConnectionHealthImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.P2SVpnConnectionHealth; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class P2SVpnConnectionHealthImpl extends WrapperImpl implements P2SVpnConnectionHealth { + private final NetworkManager manager; + P2SVpnConnectionHealthImpl(P2SVpnConnectionHealthInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String sasUrl() { + return this.inner().sasUrl(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnConnectionHealthInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnConnectionHealthInner.java new file mode 100644 index 000000000000..fa6341ebc05d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnConnectionHealthInner.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.network.v2019_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * P2S Vpn connection detailed health written to sas url. + */ +public class P2SVpnConnectionHealthInner { + /** + * Returned sas url of the blob to which the p2s vpn connection detailed + * health will be written. + */ + @JsonProperty(value = "sasUrl") + private String sasUrl; + + /** + * Get returned sas url of the blob to which the p2s vpn connection detailed health will be written. + * + * @return the sasUrl value + */ + public String sasUrl() { + return this.sasUrl; + } + + /** + * Set returned sas url of the blob to which the p2s vpn connection detailed health will be written. + * + * @param sasUrl the sasUrl value to set + * @return the P2SVpnConnectionHealthInner object itself. + */ + public P2SVpnConnectionHealthInner withSasUrl(String sasUrl) { + this.sasUrl = sasUrl; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnGatewayImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnGatewayImpl.java new file mode 100644 index 000000000000..83b6297d743b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnGatewayImpl.java @@ -0,0 +1,110 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.P2SVpnGateway; +import rx.Observable; +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.P2SConnectionConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.VpnClientConnectionHealth; + +class P2SVpnGatewayImpl extends GroupableResourceCoreImpl implements P2SVpnGateway, P2SVpnGateway.Definition, P2SVpnGateway.Update { + P2SVpnGatewayImpl(String name, P2SVpnGatewayInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + P2sVpnGatewaysInner client = this.manager().inner().p2sVpnGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + P2sVpnGatewaysInner client = this.manager().inner().p2sVpnGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + P2sVpnGatewaysInner client = this.manager().inner().p2sVpnGateways(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List p2SConnectionConfigurations() { + return this.inner().p2SConnectionConfigurations(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public SubResource virtualHub() { + return this.inner().virtualHub(); + } + + @Override + public VpnClientConnectionHealth vpnClientConnectionHealth() { + return this.inner().vpnClientConnectionHealth(); + } + + @Override + public Integer vpnGatewayScaleUnit() { + return this.inner().vpnGatewayScaleUnit(); + } + + @Override + public SubResource vpnServerConfiguration() { + return this.inner().vpnServerConfiguration(); + } + + @Override + public P2SVpnGatewayImpl withP2SConnectionConfigurations(List p2SConnectionConfigurations) { + this.inner().withP2SConnectionConfigurations(p2SConnectionConfigurations); + return this; + } + + @Override + public P2SVpnGatewayImpl withVirtualHub(SubResource virtualHub) { + this.inner().withVirtualHub(virtualHub); + return this; + } + + @Override + public P2SVpnGatewayImpl withVpnGatewayScaleUnit(Integer vpnGatewayScaleUnit) { + this.inner().withVpnGatewayScaleUnit(vpnGatewayScaleUnit); + return this; + } + + @Override + public P2SVpnGatewayImpl withVpnServerConfiguration(SubResource vpnServerConfiguration) { + this.inner().withVpnServerConfiguration(vpnServerConfiguration); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnGatewayInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnGatewayInner.java new file mode 100644 index 000000000000..22ae3078db93 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2SVpnGatewayInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.P2SConnectionConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.VpnClientConnectionHealth; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * P2SVpnGateway Resource. + */ +@JsonFlatten +@SkipParentValidation +public class P2SVpnGatewayInner extends Resource { + /** + * The VirtualHub to which the gateway belongs. + */ + @JsonProperty(value = "properties.virtualHub") + private SubResource virtualHub; + + /** + * List of all p2s connection configurations of the gateway. + */ + @JsonProperty(value = "properties.p2SConnectionConfigurations") + private List p2SConnectionConfigurations; + + /** + * The provisioning state of the P2S VPN gateway resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The scale unit for this p2s vpn gateway. + */ + @JsonProperty(value = "properties.vpnGatewayScaleUnit") + private Integer vpnGatewayScaleUnit; + + /** + * The VpnServerConfiguration to which the p2sVpnGateway is attached to. + */ + @JsonProperty(value = "properties.vpnServerConfiguration") + private SubResource vpnServerConfiguration; + + /** + * All P2S VPN clients' connection health status. + */ + @JsonProperty(value = "properties.vpnClientConnectionHealth", access = JsonProperty.Access.WRITE_ONLY) + private VpnClientConnectionHealth vpnClientConnectionHealth; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the VirtualHub to which the gateway belongs. + * + * @return the virtualHub value + */ + public SubResource virtualHub() { + return this.virtualHub; + } + + /** + * Set the VirtualHub to which the gateway belongs. + * + * @param virtualHub the virtualHub value to set + * @return the P2SVpnGatewayInner object itself. + */ + public P2SVpnGatewayInner withVirtualHub(SubResource virtualHub) { + this.virtualHub = virtualHub; + return this; + } + + /** + * Get list of all p2s connection configurations of the gateway. + * + * @return the p2SConnectionConfigurations value + */ + public List p2SConnectionConfigurations() { + return this.p2SConnectionConfigurations; + } + + /** + * Set list of all p2s connection configurations of the gateway. + * + * @param p2SConnectionConfigurations the p2SConnectionConfigurations value to set + * @return the P2SVpnGatewayInner object itself. + */ + public P2SVpnGatewayInner withP2SConnectionConfigurations(List p2SConnectionConfigurations) { + this.p2SConnectionConfigurations = p2SConnectionConfigurations; + return this; + } + + /** + * Get the provisioning state of the P2S VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the scale unit for this p2s vpn gateway. + * + * @return the vpnGatewayScaleUnit value + */ + public Integer vpnGatewayScaleUnit() { + return this.vpnGatewayScaleUnit; + } + + /** + * Set the scale unit for this p2s vpn gateway. + * + * @param vpnGatewayScaleUnit the vpnGatewayScaleUnit value to set + * @return the P2SVpnGatewayInner object itself. + */ + public P2SVpnGatewayInner withVpnGatewayScaleUnit(Integer vpnGatewayScaleUnit) { + this.vpnGatewayScaleUnit = vpnGatewayScaleUnit; + return this; + } + + /** + * Get the VpnServerConfiguration to which the p2sVpnGateway is attached to. + * + * @return the vpnServerConfiguration value + */ + public SubResource vpnServerConfiguration() { + return this.vpnServerConfiguration; + } + + /** + * Set the VpnServerConfiguration to which the p2sVpnGateway is attached to. + * + * @param vpnServerConfiguration the vpnServerConfiguration value to set + * @return the P2SVpnGatewayInner object itself. + */ + public P2SVpnGatewayInner withVpnServerConfiguration(SubResource vpnServerConfiguration) { + this.vpnServerConfiguration = vpnServerConfiguration; + return this; + } + + /** + * Get all P2S VPN clients' connection health status. + * + * @return the vpnClientConnectionHealth value + */ + public VpnClientConnectionHealth vpnClientConnectionHealth() { + return this.vpnClientConnectionHealth; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the P2SVpnGatewayInner object itself. + */ + public P2SVpnGatewayInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2sVpnGatewaysImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2sVpnGatewaysImpl.java new file mode 100644 index 000000000000..bb670b400e37 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2sVpnGatewaysImpl.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.P2sVpnGateways; +import com.microsoft.azure.management.network.v2019_09_01.P2SVpnGateway; +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.network.v2019_09_01.VpnProfileResponse; +import com.microsoft.azure.management.network.v2019_09_01.P2SVpnConnectionHealth; +import com.microsoft.azure.management.network.v2019_09_01.P2SVpnConnectionHealthRequest; + +class P2sVpnGatewaysImpl extends GroupableResourcesCoreImpl implements P2sVpnGateways { + protected P2sVpnGatewaysImpl(NetworkManager manager) { + super(manager.inner().p2sVpnGateways(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + P2sVpnGatewaysInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + P2sVpnGatewaysInner 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) { + P2sVpnGatewaysInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + P2sVpnGatewaysInner 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 P2SVpnGateway call(P2SVpnGatewayInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + P2sVpnGatewaysInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + P2sVpnGatewaysInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public P2SVpnGateway call(P2SVpnGatewayInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public P2SVpnGatewayImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable generateVpnProfileAsync(String resourceGroupName, String gatewayName) { + P2sVpnGatewaysInner client = this.inner(); + return client.generateVpnProfileAsync(resourceGroupName, gatewayName) + .map(new Func1() { + @Override + public VpnProfileResponse call(VpnProfileResponseInner inner) { + return new VpnProfileResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable getP2sVpnConnectionHealthAsync(String resourceGroupName, String gatewayName) { + P2sVpnGatewaysInner client = this.inner(); + return client.getP2sVpnConnectionHealthAsync(resourceGroupName, gatewayName) + .map(new Func1() { + @Override + public P2SVpnGateway call(P2SVpnGatewayInner inner) { + return new P2SVpnGatewayImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + public Observable getP2sVpnConnectionHealthDetailedAsync(String resourceGroupName, String gatewayName, P2SVpnConnectionHealthRequest request) { + P2sVpnGatewaysInner client = this.inner(); + return client.getP2sVpnConnectionHealthDetailedAsync(resourceGroupName, gatewayName, request) + .map(new Func1() { + @Override + public P2SVpnConnectionHealth call(P2SVpnConnectionHealthInner inner) { + return new P2SVpnConnectionHealthImpl(inner, manager()); + } + }); + } + + @Override + protected P2SVpnGatewayImpl wrapModel(P2SVpnGatewayInner inner) { + return new P2SVpnGatewayImpl(inner.name(), inner, manager()); + } + + @Override + protected P2SVpnGatewayImpl wrapModel(String name) { + return new P2SVpnGatewayImpl(name, new P2SVpnGatewayInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2sVpnGatewaysInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2sVpnGatewaysInner.java new file mode 100644 index 000000000000..89296a86ac97 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/P2sVpnGatewaysInner.java @@ -0,0 +1,1789 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.AuthenticationMethod; +import com.microsoft.azure.management.network.v2019_09_01.P2SVpnConnectionHealthRequest; +import com.microsoft.azure.management.network.v2019_09_01.P2SVpnProfileParameters; +import com.microsoft.azure.management.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in P2sVpnGateways. + */ +public class P2sVpnGatewaysInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private P2sVpnGatewaysService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of P2sVpnGatewaysInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public P2sVpnGatewaysInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(P2sVpnGatewaysService.class); + this.client = client; + } + + /** + * The interface defining all the services for P2sVpnGateways to be + * used by Retrofit to perform actually REST calls. + */ + interface P2sVpnGatewaysService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.P2sVpnGateways getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @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.network.v2019_09_01.P2sVpnGateways createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Query("api-version") String apiVersion, @Body P2SVpnGatewayInner p2SVpnGatewayParameters, @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.network.v2019_09_01.P2sVpnGateways beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Query("api-version") String apiVersion, @Body P2SVpnGatewayInner p2SVpnGatewayParameters, @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.network.v2019_09_01.P2sVpnGateways updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}") + Observable> updateTags(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject p2SVpnGatewayParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.P2sVpnGateways delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @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.network.v2019_09_01.P2sVpnGateways beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @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.network.v2019_09_01.P2sVpnGateways listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.P2sVpnGateways list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways") + Observable> list(@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.network.v2019_09_01.P2sVpnGateways generateVpnProfile" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile") + Observable> generateVpnProfile(@Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body P2SVpnProfileParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.P2sVpnGateways beginGenerateVpnProfile" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile") + Observable> beginGenerateVpnProfile(@Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body P2SVpnProfileParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.P2sVpnGateways getP2sVpnConnectionHealth" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth") + Observable> getP2sVpnConnectionHealth(@Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @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.network.v2019_09_01.P2sVpnGateways beginGetP2sVpnConnectionHealth" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth") + Observable> beginGetP2sVpnConnectionHealth(@Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @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.network.v2019_09_01.P2sVpnGateways getP2sVpnConnectionHealthDetailed" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed") + Observable> getP2sVpnConnectionHealthDetailed(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Body P2SVpnConnectionHealthRequest request, @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.network.v2019_09_01.P2sVpnGateways beginGetP2sVpnConnectionHealthDetailed" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed") + Observable> beginGetP2sVpnConnectionHealthDetailed(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Body P2SVpnConnectionHealthRequest request, @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.network.v2019_09_01.P2sVpnGateways 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.network.v2019_09_01.P2sVpnGateways listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves the details of a virtual wan p2s vpn gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 P2SVpnGatewayInner object if successful. + */ + public P2SVpnGatewayInner getByResourceGroup(String resourceGroupName, String gatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().single().body(); + } + + /** + * Retrieves the details of a virtual wan p2s vpn gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @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 gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Retrieves the details of a virtual wan p2s vpn gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the P2SVpnGatewayInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String gatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, P2SVpnGatewayInner>() { + @Override + public P2SVpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of a virtual wan p2s vpn gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the P2SVpnGatewayInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, gatewayName, 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); + } + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 P2SVpnGatewayInner object if successful. + */ + public P2SVpnGatewayInner createOrUpdate(String resourceGroupName, String gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, p2SVpnGatewayParameters).toBlocking().last().body(); + } + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn gateway. + * @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 gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, p2SVpnGatewayParameters), serviceCallback); + } + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, p2SVpnGatewayParameters).map(new Func1, P2SVpnGatewayInner>() { + @Override + public P2SVpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (p2SVpnGatewayParameters == null) { + throw new IllegalArgumentException("Parameter p2SVpnGatewayParameters is required and cannot be null."); + } + Validator.validate(p2SVpnGatewayParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, gatewayName, apiVersion, p2SVpnGatewayParameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 P2SVpnGatewayInner object if successful. + */ + public P2SVpnGatewayInner beginCreateOrUpdate(String resourceGroupName, String gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, p2SVpnGatewayParameters).toBlocking().single().body(); + } + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn gateway. + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, p2SVpnGatewayParameters), serviceCallback); + } + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the P2SVpnGatewayInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, p2SVpnGatewayParameters).map(new Func1, P2SVpnGatewayInner>() { + @Override + public P2SVpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the P2SVpnGatewayInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (p2SVpnGatewayParameters == null) { + throw new IllegalArgumentException("Parameter p2SVpnGatewayParameters is required and cannot be null."); + } + Validator.validate(p2SVpnGatewayParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, gatewayName, apiVersion, p2SVpnGatewayParameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 virtual wan p2s vpn gateway tags. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 P2SVpnGatewayInner object if successful. + */ + public P2SVpnGatewayInner updateTags(String resourceGroupName, String gatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().single().body(); + } + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @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 updateTagsAsync(String resourceGroupName, String gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the P2SVpnGatewayInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String gatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, P2SVpnGatewayInner>() { + @Override + public P2SVpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the P2SVpnGatewayInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject p2SVpnGatewayParameters = new TagsObject(); + p2SVpnGatewayParameters.withTags(null); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, gatewayName, apiVersion, this.client.acceptLanguage(), p2SVpnGatewayParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 P2SVpnGatewayInner object if successful. + */ + public P2SVpnGatewayInner updateTags(String resourceGroupName, String gatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, gatewayName, tags).toBlocking().single().body(); + } + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String gatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, gatewayName, tags), serviceCallback); + } + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the P2SVpnGatewayInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String gatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, gatewayName, tags).map(new Func1, P2SVpnGatewayInner>() { + @Override + public P2SVpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the P2SVpnGatewayInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String gatewayName, Map tags) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject p2SVpnGatewayParameters = new TagsObject(); + p2SVpnGatewayParameters.withTags(tags); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, gatewayName, apiVersion, this.client.acceptLanguage(), p2SVpnGatewayParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 a virtual wan p2s vpn gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 gatewayName) { + deleteWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().last().body(); + } + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @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 gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String gatewayName) { + return deleteWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, gatewayName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 gatewayName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().single().body(); + } + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @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 gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String gatewayName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, gatewayName, 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); + } + + /** + * Lists all the P2SVpnGateways in a resource group. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<P2SVpnGatewayInner> 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 all the P2SVpnGateways in a resource group. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @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 all the P2SVpnGateways in a resource group. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<P2SVpnGatewayInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the P2SVpnGateways in a resource group. + * + * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<P2SVpnGatewayInner> 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 all the P2SVpnGateways in a resource group. + * + ServiceResponse> * @param resourceGroupName The resource group name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<P2SVpnGatewayInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, 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 all the P2SVpnGateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<P2SVpnGatewayInner> 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 all the P2SVpnGateways in a subscription. + * + * @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 all the P2SVpnGateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<P2SVpnGatewayInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the P2SVpnGateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<P2SVpnGatewayInner> 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 all the P2SVpnGateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<P2SVpnGatewayInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnProfileResponseInner object if successful. + */ + public VpnProfileResponseInner generateVpnProfile(String resourceGroupName, String gatewayName) { + return generateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().last().body(); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @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 generateVpnProfileAsync(String resourceGroupName, String gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(generateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable generateVpnProfileAsync(String resourceGroupName, String gatewayName) { + return generateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, VpnProfileResponseInner>() { + @Override + public VpnProfileResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> generateVpnProfileWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final AuthenticationMethod authenticationMethod = null; + P2SVpnProfileParameters parameters = new P2SVpnProfileParameters(); + parameters.withAuthenticationMethod(null); + Observable> observable = service.generateVpnProfile(resourceGroupName, gatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param authenticationMethod VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnProfileResponseInner object if successful. + */ + public VpnProfileResponseInner generateVpnProfile(String resourceGroupName, String gatewayName, AuthenticationMethod authenticationMethod) { + return generateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName, authenticationMethod).toBlocking().last().body(); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param authenticationMethod VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + * @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 generateVpnProfileAsync(String resourceGroupName, String gatewayName, AuthenticationMethod authenticationMethod, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(generateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName, authenticationMethod), serviceCallback); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param authenticationMethod VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable generateVpnProfileAsync(String resourceGroupName, String gatewayName, AuthenticationMethod authenticationMethod) { + return generateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName, authenticationMethod).map(new Func1, VpnProfileResponseInner>() { + @Override + public VpnProfileResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param authenticationMethod VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> generateVpnProfileWithServiceResponseAsync(String resourceGroupName, String gatewayName, AuthenticationMethod authenticationMethod) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + P2SVpnProfileParameters parameters = new P2SVpnProfileParameters(); + parameters.withAuthenticationMethod(authenticationMethod); + Observable> observable = service.generateVpnProfile(resourceGroupName, gatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnProfileResponseInner object if successful. + */ + public VpnProfileResponseInner beginGenerateVpnProfile(String resourceGroupName, String gatewayName) { + return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().single().body(); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @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 beginGenerateVpnProfileAsync(String resourceGroupName, String gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnProfileResponseInner object + */ + public Observable beginGenerateVpnProfileAsync(String resourceGroupName, String gatewayName) { + return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, VpnProfileResponseInner>() { + @Override + public VpnProfileResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnProfileResponseInner object + */ + public Observable> beginGenerateVpnProfileWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final AuthenticationMethod authenticationMethod = null; + P2SVpnProfileParameters parameters = new P2SVpnProfileParameters(); + parameters.withAuthenticationMethod(null); + return service.beginGenerateVpnProfile(resourceGroupName, gatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGenerateVpnProfileDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param authenticationMethod VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnProfileResponseInner object if successful. + */ + public VpnProfileResponseInner beginGenerateVpnProfile(String resourceGroupName, String gatewayName, AuthenticationMethod authenticationMethod) { + return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName, authenticationMethod).toBlocking().single().body(); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param authenticationMethod VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + * @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 beginGenerateVpnProfileAsync(String resourceGroupName, String gatewayName, AuthenticationMethod authenticationMethod, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName, authenticationMethod), serviceCallback); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param authenticationMethod VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnProfileResponseInner object + */ + public Observable beginGenerateVpnProfileAsync(String resourceGroupName, String gatewayName, AuthenticationMethod authenticationMethod) { + return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName, authenticationMethod).map(new Func1, VpnProfileResponseInner>() { + @Override + public VpnProfileResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param authenticationMethod VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnProfileResponseInner object + */ + public Observable> beginGenerateVpnProfileWithServiceResponseAsync(String resourceGroupName, String gatewayName, AuthenticationMethod authenticationMethod) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + P2SVpnProfileParameters parameters = new P2SVpnProfileParameters(); + parameters.withAuthenticationMethod(authenticationMethod); + return service.beginGenerateVpnProfile(resourceGroupName, gatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGenerateVpnProfileDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGenerateVpnProfileDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 P2SVpnGatewayInner object if successful. + */ + public P2SVpnGatewayInner getP2sVpnConnectionHealth(String resourceGroupName, String gatewayName) { + return getP2sVpnConnectionHealthWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().last().body(); + } + + /** + * Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @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 getP2sVpnConnectionHealthAsync(String resourceGroupName, String gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getP2sVpnConnectionHealthWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getP2sVpnConnectionHealthAsync(String resourceGroupName, String gatewayName) { + return getP2sVpnConnectionHealthWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, P2SVpnGatewayInner>() { + @Override + public P2SVpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getP2sVpnConnectionHealthWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.getP2sVpnConnectionHealth(resourceGroupName, gatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 P2SVpnGatewayInner object if successful. + */ + public P2SVpnGatewayInner beginGetP2sVpnConnectionHealth(String resourceGroupName, String gatewayName) { + return beginGetP2sVpnConnectionHealthWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().single().body(); + } + + /** + * Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @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 beginGetP2sVpnConnectionHealthAsync(String resourceGroupName, String gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetP2sVpnConnectionHealthWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the P2SVpnGatewayInner object + */ + public Observable beginGetP2sVpnConnectionHealthAsync(String resourceGroupName, String gatewayName) { + return beginGetP2sVpnConnectionHealthWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, P2SVpnGatewayInner>() { + @Override + public P2SVpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the P2SVpnGatewayInner object + */ + public Observable> beginGetP2sVpnConnectionHealthWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginGetP2sVpnConnectionHealth(resourceGroupName, gatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetP2sVpnConnectionHealthDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetP2sVpnConnectionHealthDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param request Request parameters supplied to get p2s vpn connections detailed health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 P2SVpnConnectionHealthInner object if successful. + */ + public P2SVpnConnectionHealthInner getP2sVpnConnectionHealthDetailed(String resourceGroupName, String gatewayName, P2SVpnConnectionHealthRequest request) { + return getP2sVpnConnectionHealthDetailedWithServiceResponseAsync(resourceGroupName, gatewayName, request).toBlocking().last().body(); + } + + /** + * Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param request Request parameters supplied to get p2s vpn connections detailed health. + * @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 getP2sVpnConnectionHealthDetailedAsync(String resourceGroupName, String gatewayName, P2SVpnConnectionHealthRequest request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getP2sVpnConnectionHealthDetailedWithServiceResponseAsync(resourceGroupName, gatewayName, request), serviceCallback); + } + + /** + * Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param request Request parameters supplied to get p2s vpn connections detailed health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getP2sVpnConnectionHealthDetailedAsync(String resourceGroupName, String gatewayName, P2SVpnConnectionHealthRequest request) { + return getP2sVpnConnectionHealthDetailedWithServiceResponseAsync(resourceGroupName, gatewayName, request).map(new Func1, P2SVpnConnectionHealthInner>() { + @Override + public P2SVpnConnectionHealthInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param request Request parameters supplied to get p2s vpn connections detailed health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getP2sVpnConnectionHealthDetailedWithServiceResponseAsync(String resourceGroupName, String gatewayName, P2SVpnConnectionHealthRequest request) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); + } + Validator.validate(request); + final String apiVersion = "2019-09-01"; + Observable> observable = service.getP2sVpnConnectionHealthDetailed(this.client.subscriptionId(), resourceGroupName, gatewayName, request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param request Request parameters supplied to get p2s vpn connections detailed health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 P2SVpnConnectionHealthInner object if successful. + */ + public P2SVpnConnectionHealthInner beginGetP2sVpnConnectionHealthDetailed(String resourceGroupName, String gatewayName, P2SVpnConnectionHealthRequest request) { + return beginGetP2sVpnConnectionHealthDetailedWithServiceResponseAsync(resourceGroupName, gatewayName, request).toBlocking().single().body(); + } + + /** + * Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param request Request parameters supplied to get p2s vpn connections detailed health. + * @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 beginGetP2sVpnConnectionHealthDetailedAsync(String resourceGroupName, String gatewayName, P2SVpnConnectionHealthRequest request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetP2sVpnConnectionHealthDetailedWithServiceResponseAsync(resourceGroupName, gatewayName, request), serviceCallback); + } + + /** + * Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param request Request parameters supplied to get p2s vpn connections detailed health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the P2SVpnConnectionHealthInner object + */ + public Observable beginGetP2sVpnConnectionHealthDetailedAsync(String resourceGroupName, String gatewayName, P2SVpnConnectionHealthRequest request) { + return beginGetP2sVpnConnectionHealthDetailedWithServiceResponseAsync(resourceGroupName, gatewayName, request).map(new Func1, P2SVpnConnectionHealthInner>() { + @Override + public P2SVpnConnectionHealthInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param gatewayName The name of the P2SVpnGateway. + * @param request Request parameters supplied to get p2s vpn connections detailed health. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the P2SVpnConnectionHealthInner object + */ + public Observable> beginGetP2sVpnConnectionHealthDetailedWithServiceResponseAsync(String resourceGroupName, String gatewayName, P2SVpnConnectionHealthRequest request) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); + } + Validator.validate(request); + final String apiVersion = "2019-09-01"; + return service.beginGetP2sVpnConnectionHealthDetailed(this.client.subscriptionId(), resourceGroupName, gatewayName, request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetP2sVpnConnectionHealthDetailedDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetP2sVpnConnectionHealthDetailedDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all the P2SVpnGateways in a resource group. + * + * @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<P2SVpnGatewayInner> 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 all the P2SVpnGateways in a resource group. + * + * @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 all the P2SVpnGateways in a resource group. + * + * @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<P2SVpnGatewayInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the P2SVpnGateways in a resource group. + * + * @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<P2SVpnGatewayInner> 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 all the P2SVpnGateways in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<P2SVpnGatewayInner> 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 all the P2SVpnGateways in a subscription. + * + * @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<P2SVpnGatewayInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the P2SVpnGateways in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the P2SVpnGateways in a subscription. + * + * @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<P2SVpnGatewayInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the P2SVpnGateways in a subscription. + * + * @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<P2SVpnGatewayInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the P2SVpnGateways in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<P2SVpnGatewayInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureInner.java new file mode 100644 index 000000000000..de3cc915a8b0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureInner.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.PacketCaptureStorageLocation; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.PacketCaptureFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Parameters that define the create packet capture operation. + */ +@JsonFlatten +public class PacketCaptureInner { + /** + * The ID of the targeted resource, only VM is currently supported. + */ + @JsonProperty(value = "properties.target", required = true) + private String target; + + /** + * Number of bytes captured per packet, the remaining bytes are truncated. + */ + @JsonProperty(value = "properties.bytesToCapturePerPacket") + private Integer bytesToCapturePerPacket; + + /** + * Maximum size of the capture output. + */ + @JsonProperty(value = "properties.totalBytesPerSession") + private Integer totalBytesPerSession; + + /** + * Maximum duration of the capture session in seconds. + */ + @JsonProperty(value = "properties.timeLimitInSeconds") + private Integer timeLimitInSeconds; + + /** + * Describes the storage location for a packet capture session. + */ + @JsonProperty(value = "properties.storageLocation", required = true) + private PacketCaptureStorageLocation storageLocation; + + /** + * A list of packet capture filters. + */ + @JsonProperty(value = "properties.filters") + private List filters; + + /** + * Get the ID of the targeted resource, only VM is currently supported. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set the ID of the targeted resource, only VM is currently supported. + * + * @param target the target value to set + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get number of bytes captured per packet, the remaining bytes are truncated. + * + * @return the bytesToCapturePerPacket value + */ + public Integer bytesToCapturePerPacket() { + return this.bytesToCapturePerPacket; + } + + /** + * Set number of bytes captured per packet, the remaining bytes are truncated. + * + * @param bytesToCapturePerPacket the bytesToCapturePerPacket value to set + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withBytesToCapturePerPacket(Integer bytesToCapturePerPacket) { + this.bytesToCapturePerPacket = bytesToCapturePerPacket; + return this; + } + + /** + * Get maximum size of the capture output. + * + * @return the totalBytesPerSession value + */ + public Integer totalBytesPerSession() { + return this.totalBytesPerSession; + } + + /** + * Set maximum size of the capture output. + * + * @param totalBytesPerSession the totalBytesPerSession value to set + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withTotalBytesPerSession(Integer totalBytesPerSession) { + this.totalBytesPerSession = totalBytesPerSession; + return this; + } + + /** + * Get maximum duration of the capture session in seconds. + * + * @return the timeLimitInSeconds value + */ + public Integer timeLimitInSeconds() { + return this.timeLimitInSeconds; + } + + /** + * Set maximum duration of the capture session in seconds. + * + * @param timeLimitInSeconds the timeLimitInSeconds value to set + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withTimeLimitInSeconds(Integer timeLimitInSeconds) { + this.timeLimitInSeconds = timeLimitInSeconds; + return this; + } + + /** + * Get describes the storage location for a packet capture session. + * + * @return the storageLocation value + */ + public PacketCaptureStorageLocation storageLocation() { + return this.storageLocation; + } + + /** + * Set describes the storage location for a packet capture session. + * + * @param storageLocation the storageLocation value to set + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withStorageLocation(PacketCaptureStorageLocation storageLocation) { + this.storageLocation = storageLocation; + return this; + } + + /** + * Get a list of packet capture filters. + * + * @return the filters value + */ + public List filters() { + return this.filters; + } + + /** + * Set a list of packet capture filters. + * + * @param filters the filters value to set + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withFilters(List filters) { + this.filters = filters; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureQueryStatusResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureQueryStatusResultImpl.java new file mode 100644 index 000000000000..36609f56c4ef --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureQueryStatusResultImpl.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.PacketCaptureQueryStatusResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.PcError; +import com.microsoft.azure.management.network.v2019_09_01.PcStatus; + +class PacketCaptureQueryStatusResultImpl extends WrapperImpl implements PacketCaptureQueryStatusResult { + private final NetworkManager manager; + PacketCaptureQueryStatusResultImpl(PacketCaptureQueryStatusResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public DateTime captureStartTime() { + return this.inner().captureStartTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List packetCaptureError() { + return this.inner().packetCaptureError(); + } + + @Override + public PcStatus packetCaptureStatus() { + return this.inner().packetCaptureStatus(); + } + + @Override + public String stopReason() { + return this.inner().stopReason(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureQueryStatusResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureQueryStatusResultInner.java new file mode 100644 index 000000000000..7cb3c9f4a3df --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureQueryStatusResultInner.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.network.v2019_09_01.PcStatus; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.PcError; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Status of packet capture session. + */ +public class PacketCaptureQueryStatusResultInner { + /** + * The name of the packet capture resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The ID of the packet capture resource. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The start time of the packet capture session. + */ + @JsonProperty(value = "captureStartTime") + private DateTime captureStartTime; + + /** + * The status of the packet capture session. Possible values include: + * 'NotStarted', 'Running', 'Stopped', 'Error', 'Unknown'. + */ + @JsonProperty(value = "packetCaptureStatus") + private PcStatus packetCaptureStatus; + + /** + * The reason the current packet capture session was stopped. + */ + @JsonProperty(value = "stopReason") + private String stopReason; + + /** + * List of errors of packet capture session. + */ + @JsonProperty(value = "packetCaptureError") + private List packetCaptureError; + + /** + * Get the name of the packet capture resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the packet capture resource. + * + * @param name the name value to set + * @return the PacketCaptureQueryStatusResultInner object itself. + */ + public PacketCaptureQueryStatusResultInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the ID of the packet capture resource. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the ID of the packet capture resource. + * + * @param id the id value to set + * @return the PacketCaptureQueryStatusResultInner object itself. + */ + public PacketCaptureQueryStatusResultInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the start time of the packet capture session. + * + * @return the captureStartTime value + */ + public DateTime captureStartTime() { + return this.captureStartTime; + } + + /** + * Set the start time of the packet capture session. + * + * @param captureStartTime the captureStartTime value to set + * @return the PacketCaptureQueryStatusResultInner object itself. + */ + public PacketCaptureQueryStatusResultInner withCaptureStartTime(DateTime captureStartTime) { + this.captureStartTime = captureStartTime; + return this; + } + + /** + * Get the status of the packet capture session. Possible values include: 'NotStarted', 'Running', 'Stopped', 'Error', 'Unknown'. + * + * @return the packetCaptureStatus value + */ + public PcStatus packetCaptureStatus() { + return this.packetCaptureStatus; + } + + /** + * Set the status of the packet capture session. Possible values include: 'NotStarted', 'Running', 'Stopped', 'Error', 'Unknown'. + * + * @param packetCaptureStatus the packetCaptureStatus value to set + * @return the PacketCaptureQueryStatusResultInner object itself. + */ + public PacketCaptureQueryStatusResultInner withPacketCaptureStatus(PcStatus packetCaptureStatus) { + this.packetCaptureStatus = packetCaptureStatus; + return this; + } + + /** + * Get the reason the current packet capture session was stopped. + * + * @return the stopReason value + */ + public String stopReason() { + return this.stopReason; + } + + /** + * Set the reason the current packet capture session was stopped. + * + * @param stopReason the stopReason value to set + * @return the PacketCaptureQueryStatusResultInner object itself. + */ + public PacketCaptureQueryStatusResultInner withStopReason(String stopReason) { + this.stopReason = stopReason; + return this; + } + + /** + * Get list of errors of packet capture session. + * + * @return the packetCaptureError value + */ + public List packetCaptureError() { + return this.packetCaptureError; + } + + /** + * Set list of errors of packet capture session. + * + * @param packetCaptureError the packetCaptureError value to set + * @return the PacketCaptureQueryStatusResultInner object itself. + */ + public PacketCaptureQueryStatusResultInner withPacketCaptureError(List packetCaptureError) { + this.packetCaptureError = packetCaptureError; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureResultImpl.java new file mode 100644 index 000000000000..4ba84c04f909 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureResultImpl.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.PacketCaptureResult; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.PacketCaptureStorageLocation; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.PacketCaptureFilter; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import rx.functions.Func1; + +class PacketCaptureResultImpl extends CreatableUpdatableImpl implements PacketCaptureResult, PacketCaptureResult.Definition, PacketCaptureResult.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String networkWatcherName; + private String packetCaptureName; + private PacketCaptureInner createOrUpdateParameter; + + PacketCaptureResultImpl(String name, NetworkManager manager) { + super(name, new PacketCaptureResultInner()); + this.manager = manager; + // Set resource name + this.packetCaptureName = name; + // + this.createOrUpdateParameter = new PacketCaptureInner(); + } + + PacketCaptureResultImpl(PacketCaptureResultInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.packetCaptureName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.networkWatcherName = IdParsingUtils.getValueFromIdByName(inner.id(), "networkWatchers"); + this.packetCaptureName = IdParsingUtils.getValueFromIdByName(inner.id(), "packetCaptures"); + // + this.createOrUpdateParameter = new PacketCaptureInner(); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + PacketCapturesInner client = this.manager().inner().packetCaptures(); + return client.createAsync(this.resourceGroupName, this.networkWatcherName, this.packetCaptureName, this.createOrUpdateParameter) + .map(new Func1() { + @Override + public PacketCaptureResultInner call(PacketCaptureResultInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + PacketCapturesInner client = this.manager().inner().packetCaptures(); + return client.createAsync(this.resourceGroupName, this.networkWatcherName, this.packetCaptureName, this.createOrUpdateParameter) + .map(new Func1() { + @Override + public PacketCaptureResultInner call(PacketCaptureResultInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PacketCapturesInner client = this.manager().inner().packetCaptures(); + return client.getAsync(this.resourceGroupName, this.networkWatcherName, this.packetCaptureName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createOrUpdateParameter = new PacketCaptureInner(); + } + + @Override + public Integer bytesToCapturePerPacket() { + return this.inner().bytesToCapturePerPacket(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List filters() { + return this.inner().filters(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public PacketCaptureStorageLocation storageLocation() { + return this.inner().storageLocation(); + } + + @Override + public String target() { + return this.inner().target(); + } + + @Override + public Integer timeLimitInSeconds() { + return this.inner().timeLimitInSeconds(); + } + + @Override + public Integer totalBytesPerSession() { + return this.inner().totalBytesPerSession(); + } + + @Override + public PacketCaptureResultImpl withExistingNetworkWatcher(String resourceGroupName, String networkWatcherName) { + this.resourceGroupName = resourceGroupName; + this.networkWatcherName = networkWatcherName; + return this; + } + + @Override + public PacketCaptureResultImpl withStorageLocation(PacketCaptureStorageLocation storageLocation) { + this.createOrUpdateParameter.withStorageLocation(storageLocation); + return this; + } + + @Override + public PacketCaptureResultImpl withTarget(String target) { + this.createOrUpdateParameter.withTarget(target); + return this; + } + + @Override + public PacketCaptureResultImpl withBytesToCapturePerPacket(Integer bytesToCapturePerPacket) { + this.createOrUpdateParameter.withBytesToCapturePerPacket(bytesToCapturePerPacket); + return this; + } + + @Override + public PacketCaptureResultImpl withFilters(List filters) { + this.createOrUpdateParameter.withFilters(filters); + return this; + } + + @Override + public PacketCaptureResultImpl withTimeLimitInSeconds(Integer timeLimitInSeconds) { + this.createOrUpdateParameter.withTimeLimitInSeconds(timeLimitInSeconds); + return this; + } + + @Override + public PacketCaptureResultImpl withTotalBytesPerSession(Integer totalBytesPerSession) { + this.createOrUpdateParameter.withTotalBytesPerSession(totalBytesPerSession); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureResultInner.java new file mode 100644 index 000000000000..c4e119a655a5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCaptureResultInner.java @@ -0,0 +1,240 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.PacketCaptureStorageLocation; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.PacketCaptureFilter; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information about packet capture session. + */ +@JsonFlatten +public class PacketCaptureResultInner { + /** + * Name of the packet capture session. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * ID of the packet capture operation. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * The ID of the targeted resource, only VM is currently supported. + */ + @JsonProperty(value = "properties.target", required = true) + private String target; + + /** + * Number of bytes captured per packet, the remaining bytes are truncated. + */ + @JsonProperty(value = "properties.bytesToCapturePerPacket") + private Integer bytesToCapturePerPacket; + + /** + * Maximum size of the capture output. + */ + @JsonProperty(value = "properties.totalBytesPerSession") + private Integer totalBytesPerSession; + + /** + * Maximum duration of the capture session in seconds. + */ + @JsonProperty(value = "properties.timeLimitInSeconds") + private Integer timeLimitInSeconds; + + /** + * Describes the storage location for a packet capture session. + */ + @JsonProperty(value = "properties.storageLocation", required = true) + private PacketCaptureStorageLocation storageLocation; + + /** + * A list of packet capture filters. + */ + @JsonProperty(value = "properties.filters") + private List filters; + + /** + * The provisioning state of the packet capture session. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Get name of the packet capture session. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get iD of the packet capture operation. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get the ID of the targeted resource, only VM is currently supported. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set the ID of the targeted resource, only VM is currently supported. + * + * @param target the target value to set + * @return the PacketCaptureResultInner object itself. + */ + public PacketCaptureResultInner withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get number of bytes captured per packet, the remaining bytes are truncated. + * + * @return the bytesToCapturePerPacket value + */ + public Integer bytesToCapturePerPacket() { + return this.bytesToCapturePerPacket; + } + + /** + * Set number of bytes captured per packet, the remaining bytes are truncated. + * + * @param bytesToCapturePerPacket the bytesToCapturePerPacket value to set + * @return the PacketCaptureResultInner object itself. + */ + public PacketCaptureResultInner withBytesToCapturePerPacket(Integer bytesToCapturePerPacket) { + this.bytesToCapturePerPacket = bytesToCapturePerPacket; + return this; + } + + /** + * Get maximum size of the capture output. + * + * @return the totalBytesPerSession value + */ + public Integer totalBytesPerSession() { + return this.totalBytesPerSession; + } + + /** + * Set maximum size of the capture output. + * + * @param totalBytesPerSession the totalBytesPerSession value to set + * @return the PacketCaptureResultInner object itself. + */ + public PacketCaptureResultInner withTotalBytesPerSession(Integer totalBytesPerSession) { + this.totalBytesPerSession = totalBytesPerSession; + return this; + } + + /** + * Get maximum duration of the capture session in seconds. + * + * @return the timeLimitInSeconds value + */ + public Integer timeLimitInSeconds() { + return this.timeLimitInSeconds; + } + + /** + * Set maximum duration of the capture session in seconds. + * + * @param timeLimitInSeconds the timeLimitInSeconds value to set + * @return the PacketCaptureResultInner object itself. + */ + public PacketCaptureResultInner withTimeLimitInSeconds(Integer timeLimitInSeconds) { + this.timeLimitInSeconds = timeLimitInSeconds; + return this; + } + + /** + * Get describes the storage location for a packet capture session. + * + * @return the storageLocation value + */ + public PacketCaptureStorageLocation storageLocation() { + return this.storageLocation; + } + + /** + * Set describes the storage location for a packet capture session. + * + * @param storageLocation the storageLocation value to set + * @return the PacketCaptureResultInner object itself. + */ + public PacketCaptureResultInner withStorageLocation(PacketCaptureStorageLocation storageLocation) { + this.storageLocation = storageLocation; + return this; + } + + /** + * Get a list of packet capture filters. + * + * @return the filters value + */ + public List filters() { + return this.filters; + } + + /** + * Set a list of packet capture filters. + * + * @param filters the filters value to set + * @return the PacketCaptureResultInner object itself. + */ + public PacketCaptureResultInner withFilters(List filters) { + this.filters = filters; + return this; + } + + /** + * Get the provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCapturesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCapturesImpl.java new file mode 100644 index 000000000000..934f6631a994 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCapturesImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.PacketCaptures; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.PacketCaptureQueryStatusResult; +import com.microsoft.azure.management.network.v2019_09_01.PacketCaptureResult; + +class PacketCapturesImpl extends WrapperImpl implements PacketCaptures { + private final NetworkManager manager; + + PacketCapturesImpl(NetworkManager manager) { + super(manager.inner().packetCaptures()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public PacketCaptureResultImpl define(String name) { + return wrapModel(name); + } + + private PacketCaptureResultImpl wrapModel(PacketCaptureResultInner inner) { + return new PacketCaptureResultImpl(inner, manager()); + } + + private PacketCaptureResultImpl wrapModel(String name) { + return new PacketCaptureResultImpl(name, this.manager()); + } + + @Override + public Completable stopAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + PacketCapturesInner client = this.inner(); + return client.stopAsync(resourceGroupName, networkWatcherName, packetCaptureName).toCompletable(); + } + + @Override + public Observable getStatusAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + PacketCapturesInner client = this.inner(); + return client.getStatusAsync(resourceGroupName, networkWatcherName, packetCaptureName) + .map(new Func1() { + @Override + public PacketCaptureQueryStatusResult call(PacketCaptureQueryStatusResultInner inner) { + return new PacketCaptureQueryStatusResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync(String resourceGroupName, String networkWatcherName) { + PacketCapturesInner client = this.inner(); + return client.listAsync(resourceGroupName, networkWatcherName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public PacketCaptureResult call(PacketCaptureResultInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + PacketCapturesInner client = this.inner(); + return client.getAsync(resourceGroupName, networkWatcherName, packetCaptureName) + .flatMap(new Func1>() { + @Override + public Observable call(PacketCaptureResultInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((PacketCaptureResult)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + PacketCapturesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, networkWatcherName, packetCaptureName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCapturesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCapturesInner.java new file mode 100644 index 000000000000..4da3fdd5c60b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PacketCapturesInner.java @@ -0,0 +1,961 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.network.v2019_09_01.ErrorResponseException; +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.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in PacketCaptures. + */ +public class PacketCapturesInner { + /** The Retrofit service to perform REST calls. */ + private PacketCapturesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of PacketCapturesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PacketCapturesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(PacketCapturesService.class); + this.client = client; + } + + /** + * The interface defining all the services for PacketCaptures to be + * used by Retrofit to perform actually REST calls. + */ + interface PacketCapturesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PacketCaptures create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}") + Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("packetCaptureName") String packetCaptureName, @Path("subscriptionId") String subscriptionId, @Body PacketCaptureInner 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.network.v2019_09_01.PacketCaptures beginCreate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}") + Observable> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("packetCaptureName") String packetCaptureName, @Path("subscriptionId") String subscriptionId, @Body PacketCaptureInner 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.network.v2019_09_01.PacketCaptures get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("packetCaptureName") String packetCaptureName, @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.network.v2019_09_01.PacketCaptures delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("packetCaptureName") String packetCaptureName, @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.network.v2019_09_01.PacketCaptures beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("packetCaptureName") String packetCaptureName, @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.network.v2019_09_01.PacketCaptures stop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop") + Observable> stop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("packetCaptureName") String packetCaptureName, @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.network.v2019_09_01.PacketCaptures beginStop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop") + Observable> beginStop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("packetCaptureName") String packetCaptureName, @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.network.v2019_09_01.PacketCaptures getStatus" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus") + Observable> getStatus(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("packetCaptureName") String packetCaptureName, @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.network.v2019_09_01.PacketCaptures beginGetStatus" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus") + Observable> beginGetStatus(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("packetCaptureName") String packetCaptureName, @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.network.v2019_09_01.PacketCaptures list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create and start a packet capture on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters that define the create packet capture operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PacketCaptureResultInner object if successful. + */ + public PacketCaptureResultInner create(String resourceGroupName, String networkWatcherName, String packetCaptureName, PacketCaptureInner parameters) { + return createWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName, parameters).toBlocking().last().body(); + } + + /** + * Create and start a packet capture on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters that define the create packet capture 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 networkWatcherName, String packetCaptureName, PacketCaptureInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName, parameters), serviceCallback); + } + + /** + * Create and start a packet capture on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters that define the create packet capture operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName, PacketCaptureInner parameters) { + return createWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName, parameters).map(new Func1, PacketCaptureResultInner>() { + @Override + public PacketCaptureResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create and start a packet capture on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters that define the create packet capture operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName, PacketCaptureInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (packetCaptureName == null) { + throw new IllegalArgumentException("Parameter packetCaptureName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.create(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create and start a packet capture on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters that define the create packet capture operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PacketCaptureResultInner object if successful. + */ + public PacketCaptureResultInner beginCreate(String resourceGroupName, String networkWatcherName, String packetCaptureName, PacketCaptureInner parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName, parameters).toBlocking().single().body(); + } + + /** + * Create and start a packet capture on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters that define the create packet capture 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 networkWatcherName, String packetCaptureName, PacketCaptureInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName, parameters), serviceCallback); + } + + /** + * Create and start a packet capture on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters that define the create packet capture operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PacketCaptureResultInner object + */ + public Observable beginCreateAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName, PacketCaptureInner parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName, parameters).map(new Func1, PacketCaptureResultInner>() { + @Override + public PacketCaptureResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create and start a packet capture on the specified VM. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters that define the create packet capture operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PacketCaptureResultInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName, PacketCaptureInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (packetCaptureName == null) { + throw new IllegalArgumentException("Parameter packetCaptureName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreate(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), parameters, 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets a packet capture session by name. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PacketCaptureResultInner object if successful. + */ + public PacketCaptureResultInner get(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + return getWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).toBlocking().single().body(); + } + + /** + * Gets a packet capture session by name. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @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 networkWatcherName, String packetCaptureName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName), serviceCallback); + } + + /** + * Gets a packet capture session by name. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PacketCaptureResultInner object + */ + public Observable getAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + return getWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).map(new Func1, PacketCaptureResultInner>() { + @Override + public PacketCaptureResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a packet capture session by name. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PacketCaptureResultInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (packetCaptureName == null) { + throw new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException 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 networkWatcherName, String packetCaptureName) { + deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).toBlocking().last().body(); + } + + /** + * Deletes the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @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 networkWatcherName, String packetCaptureName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName), serviceCallback); + } + + /** + * Deletes the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + return deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (packetCaptureName == null) { + throw new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException 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 networkWatcherName, String packetCaptureName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).toBlocking().single().body(); + } + + /** + * Deletes the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @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 networkWatcherName, String packetCaptureName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName), serviceCallback); + } + + /** + * Deletes the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (packetCaptureName == null) { + throw new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Stops a specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void stop(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).toBlocking().last().body(); + } + + /** + * Stops a specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @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 stopAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName), serviceCallback); + } + + /** + * Stops a specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable stopAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + return stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops a specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> stopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (packetCaptureName == null) { + throw new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.stop(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Stops a specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginStop(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).toBlocking().single().body(); + } + + /** + * Stops a specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @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 beginStopAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName), serviceCallback); + } + + /** + * Stops a specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStopAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + return beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops a specified packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (packetCaptureName == null) { + throw new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginStop(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStopDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Query the status of a running packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @param packetCaptureName The name given to the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PacketCaptureQueryStatusResultInner object if successful. + */ + public PacketCaptureQueryStatusResultInner getStatus(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + return getStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).toBlocking().last().body(); + } + + /** + * Query the status of a running packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @param packetCaptureName The name given to the packet capture session. + * @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 getStatusAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName), serviceCallback); + } + + /** + * Query the status of a running packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @param packetCaptureName The name given to the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getStatusAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + return getStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).map(new Func1, PacketCaptureQueryStatusResultInner>() { + @Override + public PacketCaptureQueryStatusResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Query the status of a running packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @param packetCaptureName The name given to the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getStatusWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (packetCaptureName == null) { + throw new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.getStatus(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Query the status of a running packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @param packetCaptureName The name given to the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PacketCaptureQueryStatusResultInner object if successful. + */ + public PacketCaptureQueryStatusResultInner beginGetStatus(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + return beginGetStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).toBlocking().single().body(); + } + + /** + * Query the status of a running packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @param packetCaptureName The name given to the packet capture session. + * @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 beginGetStatusAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName), serviceCallback); + } + + /** + * Query the status of a running packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @param packetCaptureName The name given to the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PacketCaptureQueryStatusResultInner object + */ + public Observable beginGetStatusAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + return beginGetStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).map(new Func1, PacketCaptureQueryStatusResultInner>() { + @Override + public PacketCaptureQueryStatusResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Query the status of a running packet capture session. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @param packetCaptureName The name given to the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PacketCaptureQueryStatusResultInner object + */ + public Observable> beginGetStatusWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (packetCaptureName == null) { + throw new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginGetStatus(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetStatusDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all packet capture sessions within the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<PacketCaptureResultInner> object if successful. + */ + public List list(String resourceGroupName, String networkWatcherName) { + return listWithServiceResponseAsync(resourceGroupName, networkWatcherName).toBlocking().single().body(); + } + + /** + * Lists all packet capture sessions within the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @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(String resourceGroupName, String networkWatcherName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, networkWatcherName), serviceCallback); + } + + /** + * Lists all packet capture sessions within the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<PacketCaptureResultInner> object + */ + public Observable> listAsync(String resourceGroupName, String networkWatcherName) { + return listWithServiceResponseAsync(resourceGroupName, networkWatcherName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all packet capture sessions within the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the Network Watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<PacketCaptureResultInner> object + */ + public Observable>> listWithServiceResponseAsync(String resourceGroupName, String networkWatcherName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PageImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PageImpl.java new file mode 100644 index 000000000000..68d8563b3231 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_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.network.v2019_09_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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PageImpl1.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PageImpl1.java new file mode 100644 index 000000000000..05a8ecf8db60 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PageImpl1.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.network.v2019_09_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 PageImpl1 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("") + 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 PageImpl1 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 PageImpl1 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionImpl.java new file mode 100644 index 000000000000..c7433f2a2bc2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionImpl.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.PeerExpressRouteCircuitConnection; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.CircuitConnectionStatus; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class PeerExpressRouteCircuitConnectionImpl extends IndexableRefreshableWrapperImpl implements PeerExpressRouteCircuitConnection { + private final NetworkManager manager; + private String resourceGroupName; + private String circuitName; + private String peeringName; + private String connectionName; + + PeerExpressRouteCircuitConnectionImpl(PeerExpressRouteCircuitConnectionInner inner, NetworkManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.circuitName = IdParsingUtils.getValueFromIdByName(inner.id(), "expressRouteCircuits"); + this.peeringName = IdParsingUtils.getValueFromIdByName(inner.id(), "peerings"); + this.connectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "peerConnections"); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + PeerExpressRouteCircuitConnectionsInner client = this.manager().inner().peerExpressRouteCircuitConnections(); + return client.getAsync(this.resourceGroupName, this.circuitName, this.peeringName, this.connectionName); + } + + + + @Override + public String addressPrefix() { + return this.inner().addressPrefix(); + } + + @Override + public String authResourceGuid() { + return this.inner().authResourceGuid(); + } + + @Override + public CircuitConnectionStatus circuitConnectionStatus() { + return this.inner().circuitConnectionStatus(); + } + + @Override + public String connectionName() { + return this.inner().connectionName(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public SubResource expressRouteCircuitPeering() { + return this.inner().expressRouteCircuitPeering(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public SubResource peerExpressRouteCircuitPeering() { + return this.inner().peerExpressRouteCircuitPeering(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionInner.java new file mode 100644 index 000000000000..852560f5e285 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionInner.java @@ -0,0 +1,257 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.CircuitConnectionStatus; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Peer Express Route Circuit Connection in an ExpressRouteCircuitPeering + * resource. + */ +@JsonFlatten +public class PeerExpressRouteCircuitConnectionInner extends SubResource { + /** + * Reference to Express Route Circuit Private Peering Resource of the + * circuit. + */ + @JsonProperty(value = "properties.expressRouteCircuitPeering") + private SubResource expressRouteCircuitPeering; + + /** + * Reference to Express Route Circuit Private Peering Resource of the + * peered circuit. + */ + @JsonProperty(value = "properties.peerExpressRouteCircuitPeering") + private SubResource peerExpressRouteCircuitPeering; + + /** + * /29 IP address space to carve out Customer addresses for tunnels. + */ + @JsonProperty(value = "properties.addressPrefix") + private String addressPrefix; + + /** + * Express Route Circuit connection state. Possible values include: + * 'Connected', 'Connecting', 'Disconnected'. + */ + @JsonProperty(value = "properties.circuitConnectionStatus") + private CircuitConnectionStatus circuitConnectionStatus; + + /** + * The name of the express route circuit connection resource. + */ + @JsonProperty(value = "properties.connectionName") + private String connectionName; + + /** + * The resource guid of the authorization used for the express route + * circuit connection. + */ + @JsonProperty(value = "properties.authResourceGuid") + private String authResourceGuid; + + /** + * The provisioning state of the peer express route circuit connection + * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', + * 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get reference to Express Route Circuit Private Peering Resource of the circuit. + * + * @return the expressRouteCircuitPeering value + */ + public SubResource expressRouteCircuitPeering() { + return this.expressRouteCircuitPeering; + } + + /** + * Set reference to Express Route Circuit Private Peering Resource of the circuit. + * + * @param expressRouteCircuitPeering the expressRouteCircuitPeering value to set + * @return the PeerExpressRouteCircuitConnectionInner object itself. + */ + public PeerExpressRouteCircuitConnectionInner withExpressRouteCircuitPeering(SubResource expressRouteCircuitPeering) { + this.expressRouteCircuitPeering = expressRouteCircuitPeering; + return this; + } + + /** + * Get reference to Express Route Circuit Private Peering Resource of the peered circuit. + * + * @return the peerExpressRouteCircuitPeering value + */ + public SubResource peerExpressRouteCircuitPeering() { + return this.peerExpressRouteCircuitPeering; + } + + /** + * Set reference to Express Route Circuit Private Peering Resource of the peered circuit. + * + * @param peerExpressRouteCircuitPeering the peerExpressRouteCircuitPeering value to set + * @return the PeerExpressRouteCircuitConnectionInner object itself. + */ + public PeerExpressRouteCircuitConnectionInner withPeerExpressRouteCircuitPeering(SubResource peerExpressRouteCircuitPeering) { + this.peerExpressRouteCircuitPeering = peerExpressRouteCircuitPeering; + return this; + } + + /** + * Get /29 IP address space to carve out Customer addresses for tunnels. + * + * @return the addressPrefix value + */ + public String addressPrefix() { + return this.addressPrefix; + } + + /** + * Set /29 IP address space to carve out Customer addresses for tunnels. + * + * @param addressPrefix the addressPrefix value to set + * @return the PeerExpressRouteCircuitConnectionInner object itself. + */ + public PeerExpressRouteCircuitConnectionInner withAddressPrefix(String addressPrefix) { + this.addressPrefix = addressPrefix; + return this; + } + + /** + * Get express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'. + * + * @return the circuitConnectionStatus value + */ + public CircuitConnectionStatus circuitConnectionStatus() { + return this.circuitConnectionStatus; + } + + /** + * Set express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'. + * + * @param circuitConnectionStatus the circuitConnectionStatus value to set + * @return the PeerExpressRouteCircuitConnectionInner object itself. + */ + public PeerExpressRouteCircuitConnectionInner withCircuitConnectionStatus(CircuitConnectionStatus circuitConnectionStatus) { + this.circuitConnectionStatus = circuitConnectionStatus; + return this; + } + + /** + * Get the name of the express route circuit connection resource. + * + * @return the connectionName value + */ + public String connectionName() { + return this.connectionName; + } + + /** + * Set the name of the express route circuit connection resource. + * + * @param connectionName the connectionName value to set + * @return the PeerExpressRouteCircuitConnectionInner object itself. + */ + public PeerExpressRouteCircuitConnectionInner withConnectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Get the resource guid of the authorization used for the express route circuit connection. + * + * @return the authResourceGuid value + */ + public String authResourceGuid() { + return this.authResourceGuid; + } + + /** + * Set the resource guid of the authorization used for the express route circuit connection. + * + * @param authResourceGuid the authResourceGuid value to set + * @return the PeerExpressRouteCircuitConnectionInner object itself. + */ + public PeerExpressRouteCircuitConnectionInner withAuthResourceGuid(String authResourceGuid) { + this.authResourceGuid = authResourceGuid; + return this; + } + + /** + * Get the provisioning state of the peer express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the PeerExpressRouteCircuitConnectionInner object itself. + */ + public PeerExpressRouteCircuitConnectionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionsImpl.java new file mode 100644 index 000000000000..c0d777ae8d45 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionsImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.PeerExpressRouteCircuitConnections; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.PeerExpressRouteCircuitConnection; + +class PeerExpressRouteCircuitConnectionsImpl extends WrapperImpl implements PeerExpressRouteCircuitConnections { + private final NetworkManager manager; + + PeerExpressRouteCircuitConnectionsImpl(NetworkManager manager) { + super(manager.inner().peerExpressRouteCircuitConnections()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private PeerExpressRouteCircuitConnectionImpl wrapModel(PeerExpressRouteCircuitConnectionInner inner) { + return new PeerExpressRouteCircuitConnectionImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String circuitName, final String peeringName) { + PeerExpressRouteCircuitConnectionsInner client = this.inner(); + return client.listAsync(resourceGroupName, circuitName, peeringName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PeerExpressRouteCircuitConnection call(PeerExpressRouteCircuitConnectionInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + PeerExpressRouteCircuitConnectionsInner client = this.inner(); + return client.getAsync(resourceGroupName, circuitName, peeringName, connectionName) + .flatMap(new Func1>() { + @Override + public Observable call(PeerExpressRouteCircuitConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((PeerExpressRouteCircuitConnection)wrapModel(inner)); + } + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionsInner.java new file mode 100644 index 000000000000..b52246ec4bfc --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PeerExpressRouteCircuitConnectionsInner.java @@ -0,0 +1,412 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PeerExpressRouteCircuitConnections. + */ +public class PeerExpressRouteCircuitConnectionsInner { + /** The Retrofit service to perform REST calls. */ + private PeerExpressRouteCircuitConnectionsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of PeerExpressRouteCircuitConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PeerExpressRouteCircuitConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(PeerExpressRouteCircuitConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for PeerExpressRouteCircuitConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface PeerExpressRouteCircuitConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PeerExpressRouteCircuitConnections get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @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.network.v2019_09_01.PeerExpressRouteCircuitConnections list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @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.network.v2019_09_01.PeerExpressRouteCircuitConnections listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the peer express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PeerExpressRouteCircuitConnectionInner object if successful. + */ + public PeerExpressRouteCircuitConnectionInner get(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + return getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).toBlocking().single().body(); + } + + /** + * Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the peer express route circuit connection. + * @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 circuitName, String peeringName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName), serviceCallback); + } + + /** + * Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the peer express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeerExpressRouteCircuitConnectionInner object + */ + public Observable getAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + return getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).map(new Func1, PeerExpressRouteCircuitConnectionInner>() { + @Override + public PeerExpressRouteCircuitConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the peer express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeerExpressRouteCircuitConnectionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), 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); + } + + /** + * Gets all global reach peer connections associated with a private peering in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<PeerExpressRouteCircuitConnectionInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String circuitName, final String peeringName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, circuitName, peeringName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all global reach peer connections associated with a private peering in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param peeringName The name of the peering. + * @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 resourceGroupName, final String circuitName, final String peeringName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, circuitName, peeringName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all global reach peer connections associated with a private peering in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeerExpressRouteCircuitConnectionInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String circuitName, final String peeringName) { + return listWithServiceResponseAsync(resourceGroupName, circuitName, peeringName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all global reach peer connections associated with a private peering in an express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeerExpressRouteCircuitConnectionInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String circuitName, final String peeringName) { + return listSinglePageAsync(resourceGroupName, circuitName, peeringName) + .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 all global reach peer connections associated with a private peering in an express route circuit. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param circuitName The name of the circuit. + ServiceResponse> * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeerExpressRouteCircuitConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String circuitName, final String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), 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 all global reach peer connections associated with a private peering in an express route circuit. + * + * @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<PeerExpressRouteCircuitConnectionInner> 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 all global reach peer connections associated with a private peering in an express route circuit. + * + * @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 all global reach peer connections associated with a private peering in an express route circuit. + * + * @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<PeerExpressRouteCircuitConnectionInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all global reach peer connections associated with a private peering in an express route circuit. + * + * @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<PeerExpressRouteCircuitConnectionInner> 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 all global reach peer connections associated with a private peering in an express route circuit. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeerExpressRouteCircuitConnectionInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointConnectionImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 000000000000..0a1cf569fa93 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointConnectionImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.PrivateEndpointConnection; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServiceConnectionState; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.PrivateEndpoint; + +class PrivateEndpointConnectionImpl extends CreatableUpdatableImpl implements PrivateEndpointConnection, PrivateEndpointConnection.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String serviceName; + private String peConnectionName; + + PrivateEndpointConnectionImpl(String name, NetworkManager manager) { + super(name, new PrivateEndpointConnectionInner()); + this.manager = manager; + // Set resource name + this.peConnectionName = name; + // + } + + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.peConnectionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.serviceName = IdParsingUtils.getValueFromIdByName(inner.id(), "privateLinkServices"); + this.peConnectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "privateEndpointConnections"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + PrivateLinkServicesInner client = this.manager().inner().privateLinkServices(); + return null; // NOP createResourceAsync implementation as create is not supported + } + + @Override + public Observable updateResourceAsync() { + PrivateLinkServicesInner client = this.manager().inner().privateLinkServices(); + return client.updatePrivateEndpointConnectionAsync(this.resourceGroupName, this.serviceName, this.peConnectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PrivateLinkServicesInner client = this.manager().inner().privateLinkServices(); + return client.getPrivateEndpointConnectionAsync(this.resourceGroupName, this.serviceName, this.peConnectionName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String linkIdentifier() { + return this.inner().linkIdentifier(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public PrivateEndpoint privateEndpoint() { + PrivateEndpointInner inner = this.inner().privateEndpoint(); + if (inner != null) { + return new PrivateEndpointImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.inner().privateLinkServiceConnectionState(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public PrivateEndpointConnectionImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public PrivateEndpointConnectionImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.inner().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointConnectionInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointConnectionInner.java new file mode 100644 index 000000000000..96e91bd483f1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointConnectionInner.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServiceConnectionState; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * PrivateEndpointConnection resource. + */ +@JsonFlatten +public class PrivateEndpointConnectionInner extends SubResource { + /** + * The resource of private end point. + */ + @JsonProperty(value = "properties.privateEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointInner privateEndpoint; + + /** + * A collection of information about the state of the connection between + * service consumer and provider. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /** + * The provisioning state of the private endpoint connection resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The consumer link id. + */ + @JsonProperty(value = "properties.linkIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String linkIdentifier; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the resource of private end point. + * + * @return the privateEndpoint value + */ + public PrivateEndpointInner privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Get a collection of information about the state of the connection between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set a collection of information about the state of the connection between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the consumer link id. + * + * @return the linkIdentifier value + */ + public String linkIdentifier() { + return this.linkIdentifier; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointImpl.java new file mode 100644 index 000000000000..53c31c1029e5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.PrivateEndpoint; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServiceConnection; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterface; +import com.microsoft.azure.management.network.v2019_09_01.Subnet; + +class PrivateEndpointImpl extends GroupableResourceCoreImpl implements PrivateEndpoint, PrivateEndpoint.Definition, PrivateEndpoint.Update { + PrivateEndpointImpl(String name, PrivateEndpointInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + PrivateEndpointsInner client = this.manager().inner().privateEndpoints(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + PrivateEndpointsInner client = this.manager().inner().privateEndpoints(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PrivateEndpointsInner client = this.manager().inner().privateEndpoints(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List manualPrivateLinkServiceConnections() { + return this.inner().manualPrivateLinkServiceConnections(); + } + + @Override + public List networkInterfaces() { + List lst = new ArrayList(); + if (this.inner().networkInterfaces() != null) { + for (NetworkInterfaceInner inner : this.inner().networkInterfaces()) { + lst.add( new NetworkInterfaceImpl(inner.name(), inner, manager())); + } + } + return lst; + } + + @Override + public List privateLinkServiceConnections() { + return this.inner().privateLinkServiceConnections(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Subnet subnet() { + SubnetInner inner = this.inner().subnet(); + if (inner != null) { + return new SubnetImpl(inner, manager()); + } else { + return null; + } + } + + @Override + public PrivateEndpointImpl withManualPrivateLinkServiceConnections(List manualPrivateLinkServiceConnections) { + this.inner().withManualPrivateLinkServiceConnections(manualPrivateLinkServiceConnections); + return this; + } + + @Override + public PrivateEndpointImpl withPrivateLinkServiceConnections(List privateLinkServiceConnections) { + this.inner().withPrivateLinkServiceConnections(privateLinkServiceConnections); + return this; + } + + @Override + public PrivateEndpointImpl withSubnet(SubnetInner subnet) { + this.inner().withSubnet(subnet); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointInner.java new file mode 100644 index 000000000000..6181942171fe --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointInner.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServiceConnection; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Private endpoint resource. + */ +@JsonFlatten +@SkipParentValidation +public class PrivateEndpointInner extends Resource { + /** + * The ID of the subnet from which the private IP will be allocated. + */ + @JsonProperty(value = "properties.subnet") + private SubnetInner subnet; + + /** + * An array of references to the network interfaces created for this + * private endpoint. + */ + @JsonProperty(value = "properties.networkInterfaces", access = JsonProperty.Access.WRITE_ONLY) + private List networkInterfaces; + + /** + * The provisioning state of the private endpoint resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A grouping of information about the connection to the remote resource. + */ + @JsonProperty(value = "properties.privateLinkServiceConnections") + private List privateLinkServiceConnections; + + /** + * A grouping of information about the connection to the remote resource. + * Used when the network admin does not have access to approve connections + * to the remote resource. + */ + @JsonProperty(value = "properties.manualPrivateLinkServiceConnections") + private List manualPrivateLinkServiceConnections; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the ID of the subnet from which the private IP will be allocated. + * + * @return the subnet value + */ + public SubnetInner subnet() { + return this.subnet; + } + + /** + * Set the ID of the subnet from which the private IP will be allocated. + * + * @param subnet the subnet value to set + * @return the PrivateEndpointInner object itself. + */ + public PrivateEndpointInner withSubnet(SubnetInner subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get an array of references to the network interfaces created for this private endpoint. + * + * @return the networkInterfaces value + */ + public List networkInterfaces() { + return this.networkInterfaces; + } + + /** + * Get the provisioning state of the private endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a grouping of information about the connection to the remote resource. + * + * @return the privateLinkServiceConnections value + */ + public List privateLinkServiceConnections() { + return this.privateLinkServiceConnections; + } + + /** + * Set a grouping of information about the connection to the remote resource. + * + * @param privateLinkServiceConnections the privateLinkServiceConnections value to set + * @return the PrivateEndpointInner object itself. + */ + public PrivateEndpointInner withPrivateLinkServiceConnections(List privateLinkServiceConnections) { + this.privateLinkServiceConnections = privateLinkServiceConnections; + return this; + } + + /** + * Get a grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource. + * + * @return the manualPrivateLinkServiceConnections value + */ + public List manualPrivateLinkServiceConnections() { + return this.manualPrivateLinkServiceConnections; + } + + /** + * Set a grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource. + * + * @param manualPrivateLinkServiceConnections the manualPrivateLinkServiceConnections value to set + * @return the PrivateEndpointInner object itself. + */ + public PrivateEndpointInner withManualPrivateLinkServiceConnections(List manualPrivateLinkServiceConnections) { + this.manualPrivateLinkServiceConnections = manualPrivateLinkServiceConnections; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the PrivateEndpointInner object itself. + */ + public PrivateEndpointInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointsImpl.java new file mode 100644 index 000000000000..080b3975c775 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointsImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.PrivateEndpoints; +import com.microsoft.azure.management.network.v2019_09_01.PrivateEndpoint; +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; + +class PrivateEndpointsImpl extends GroupableResourcesCoreImpl implements PrivateEndpoints { + protected PrivateEndpointsImpl(NetworkManager manager) { + super(manager.inner().privateEndpoints(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + PrivateEndpointsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + PrivateEndpointsInner 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) { + PrivateEndpointsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + PrivateEndpointsInner 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 PrivateEndpoint call(PrivateEndpointInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + PrivateEndpointsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + PrivateEndpointsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PrivateEndpoint call(PrivateEndpointInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PrivateEndpointImpl define(String name) { + return wrapModel(name); + } + + @Override + protected PrivateEndpointImpl wrapModel(PrivateEndpointInner inner) { + return new PrivateEndpointImpl(inner.name(), inner, manager()); + } + + @Override + protected PrivateEndpointImpl wrapModel(String name) { + return new PrivateEndpointImpl(name, new PrivateEndpointInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointsInner.java new file mode 100644 index 000000000000..aeb608290b46 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateEndpointsInner.java @@ -0,0 +1,1030 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.ListOperationCallback; +import com.microsoft.azure.management.network.v2019_09_01.ErrorException; +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 PrivateEndpoints. + */ +public class PrivateEndpointsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private PrivateEndpointsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of PrivateEndpointsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PrivateEndpointsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(PrivateEndpointsService.class); + this.client = client; + } + + /** + * The interface defining all the services for PrivateEndpoints to be + * used by Retrofit to perform actually REST calls. + */ + interface PrivateEndpointsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PrivateEndpoints delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("privateEndpointName") String privateEndpointName, @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.network.v2019_09_01.PrivateEndpoints beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("privateEndpointName") String privateEndpointName, @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.network.v2019_09_01.PrivateEndpoints getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("privateEndpointName") String privateEndpointName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.PrivateEndpoints createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("privateEndpointName") String privateEndpointName, @Path("subscriptionId") String subscriptionId, @Body PrivateEndpointInner 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.network.v2019_09_01.PrivateEndpoints beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("privateEndpointName") String privateEndpointName, @Path("subscriptionId") String subscriptionId, @Body PrivateEndpointInner 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.network.v2019_09_01.PrivateEndpoints listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.PrivateEndpoints list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/privateEndpoints") + Observable> list(@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.network.v2019_09_01.PrivateEndpoints 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.network.v2019_09_01.PrivateEndpoints listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified private endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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 privateEndpointName) { + deleteWithServiceResponseAsync(resourceGroupName, privateEndpointName).toBlocking().last().body(); + } + + /** + * Deletes the specified private endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @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 privateEndpointName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, privateEndpointName), serviceCallback); + } + + /** + * Deletes the specified private endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String privateEndpointName) { + return deleteWithServiceResponseAsync(resourceGroupName, privateEndpointName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified private endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String privateEndpointName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateEndpointName == null) { + throw new IllegalArgumentException("Parameter privateEndpointName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, privateEndpointName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified private endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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 privateEndpointName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, privateEndpointName).toBlocking().single().body(); + } + + /** + * Deletes the specified private endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @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 privateEndpointName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, privateEndpointName), serviceCallback); + } + + /** + * Deletes the specified private endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String privateEndpointName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, privateEndpointName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified private endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String privateEndpointName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateEndpointName == null) { + throw new IllegalArgumentException("Parameter privateEndpointName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, privateEndpointName, this.client.subscriptionId(), 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 ErrorException, 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(ErrorException.class) + .build(response); + } + + /** + * Gets the specified private endpoint by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointInner object if successful. + */ + public PrivateEndpointInner getByResourceGroup(String resourceGroupName, String privateEndpointName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, privateEndpointName).toBlocking().single().body(); + } + + /** + * Gets the specified private endpoint by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @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 privateEndpointName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, privateEndpointName), serviceCallback); + } + + /** + * Gets the specified private endpoint by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String privateEndpointName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, privateEndpointName).map(new Func1, PrivateEndpointInner>() { + @Override + public PrivateEndpointInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified private endpoint by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String privateEndpointName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateEndpointName == null) { + throw new IllegalArgumentException("Parameter privateEndpointName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, privateEndpointName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified private endpoint by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointInner object if successful. + */ + public PrivateEndpointInner getByResourceGroup(String resourceGroupName, String privateEndpointName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, privateEndpointName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified private endpoint by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @param expand Expands referenced resources. + * @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 privateEndpointName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, privateEndpointName, expand), serviceCallback); + } + + /** + * Gets the specified private endpoint by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String privateEndpointName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, privateEndpointName, expand).map(new Func1, PrivateEndpointInner>() { + @Override + public PrivateEndpointInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified private endpoint by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String privateEndpointName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateEndpointName == null) { + throw new IllegalArgumentException("Parameter privateEndpointName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, privateEndpointName, this.client.subscriptionId(), apiVersion, expand, 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Creates or updates an private endpoint in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @param parameters Parameters supplied to the create or update private endpoint operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointInner object if successful. + */ + public PrivateEndpointInner createOrUpdate(String resourceGroupName, String privateEndpointName, PrivateEndpointInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateEndpointName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates an private endpoint in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @param parameters Parameters supplied to the create or update private endpoint 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 createOrUpdateAsync(String resourceGroupName, String privateEndpointName, PrivateEndpointInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, privateEndpointName, parameters), serviceCallback); + } + + /** + * Creates or updates an private endpoint in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @param parameters Parameters supplied to the create or update private endpoint operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String privateEndpointName, PrivateEndpointInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateEndpointName, parameters).map(new Func1, PrivateEndpointInner>() { + @Override + public PrivateEndpointInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an private endpoint in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @param parameters Parameters supplied to the create or update private endpoint operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateEndpointName, PrivateEndpointInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateEndpointName == null) { + throw new IllegalArgumentException("Parameter privateEndpointName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, privateEndpointName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates an private endpoint in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @param parameters Parameters supplied to the create or update private endpoint operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointInner object if successful. + */ + public PrivateEndpointInner beginCreateOrUpdate(String resourceGroupName, String privateEndpointName, PrivateEndpointInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateEndpointName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates an private endpoint in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @param parameters Parameters supplied to the create or update private endpoint 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 beginCreateOrUpdateAsync(String resourceGroupName, String privateEndpointName, PrivateEndpointInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateEndpointName, parameters), serviceCallback); + } + + /** + * Creates or updates an private endpoint in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @param parameters Parameters supplied to the create or update private endpoint operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String privateEndpointName, PrivateEndpointInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateEndpointName, parameters).map(new Func1, PrivateEndpointInner>() { + @Override + public PrivateEndpointInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an private endpoint in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param privateEndpointName The name of the private endpoint. + * @param parameters Parameters supplied to the create or update private endpoint operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateEndpointName, PrivateEndpointInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateEndpointName == null) { + throw new IllegalArgumentException("Parameter privateEndpointName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, privateEndpointName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Gets all private endpoints in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<PrivateEndpointInner> 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 all private endpoints in a resource group. + * + * @param resourceGroupName The name of the 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 all private endpoints in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateEndpointInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all private endpoints in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateEndpointInner> 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 all private endpoints in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateEndpointInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Gets all private endpoints in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<PrivateEndpointInner> 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 all private endpoints in a subscription. + * + * @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 all private endpoints in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateEndpointInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all private endpoints in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateEndpointInner> 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 all private endpoints in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateEndpointInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Gets all private endpoints in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<PrivateEndpointInner> 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 all private endpoints in a resource group. + * + * @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 all private endpoints in a resource group. + * + * @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<PrivateEndpointInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all private endpoints in a resource group. + * + * @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<PrivateEndpointInner> 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 all private endpoints in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateEndpointInner> 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Gets all private endpoints in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<PrivateEndpointInner> 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 all private endpoints in a subscription. + * + * @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 all private endpoints in a subscription. + * + * @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<PrivateEndpointInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all private endpoints in a subscription. + * + * @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<PrivateEndpointInner> 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 all private endpoints in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateEndpointInner> 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceImpl.java new file mode 100644 index 000000000000..9dd9225e4cce --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkService; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServiceIpConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServicePropertiesVisibility; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServicePropertiesAutoApproval; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.FrontendIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterface; +import com.microsoft.azure.management.network.v2019_09_01.PrivateEndpointConnection; + +class PrivateLinkServiceImpl extends GroupableResourceCoreImpl implements PrivateLinkService, PrivateLinkService.Definition, PrivateLinkService.Update { + PrivateLinkServiceImpl(String name, PrivateLinkServiceInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + PrivateLinkServicesInner client = this.manager().inner().privateLinkServices(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + PrivateLinkServicesInner client = this.manager().inner().privateLinkServices(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PrivateLinkServicesInner client = this.manager().inner().privateLinkServices(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String alias() { + return this.inner().alias(); + } + + @Override + public PrivateLinkServicePropertiesAutoApproval autoApproval() { + return this.inner().autoApproval(); + } + + @Override + public Boolean enableProxyProtocol() { + return this.inner().enableProxyProtocol(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List fqdns() { + return this.inner().fqdns(); + } + + @Override + public List ipConfigurations() { + return this.inner().ipConfigurations(); + } + + @Override + public List loadBalancerFrontendIpConfigurations() { + List lst = new ArrayList(); + if (this.inner().loadBalancerFrontendIpConfigurations() != null) { + for (FrontendIPConfigurationInner inner : this.inner().loadBalancerFrontendIpConfigurations()) { + lst.add( new FrontendIPConfigurationImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List networkInterfaces() { + List lst = new ArrayList(); + if (this.inner().networkInterfaces() != null) { + for (NetworkInterfaceInner inner : this.inner().networkInterfaces()) { + lst.add( new NetworkInterfaceImpl(inner.name(), inner, manager())); + } + } + return lst; + } + + @Override + public List privateEndpointConnections() { + List lst = new ArrayList(); + if (this.inner().privateEndpointConnections() != null) { + for (PrivateEndpointConnectionInner inner : this.inner().privateEndpointConnections()) { + lst.add( new PrivateEndpointConnectionImpl(inner, manager())); + } + } + return lst; + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public PrivateLinkServicePropertiesVisibility visibility() { + return this.inner().visibility(); + } + + @Override + public PrivateLinkServiceImpl withAutoApproval(PrivateLinkServicePropertiesAutoApproval autoApproval) { + this.inner().withAutoApproval(autoApproval); + return this; + } + + @Override + public PrivateLinkServiceImpl withEnableProxyProtocol(Boolean enableProxyProtocol) { + this.inner().withEnableProxyProtocol(enableProxyProtocol); + return this; + } + + @Override + public PrivateLinkServiceImpl withFqdns(List fqdns) { + this.inner().withFqdns(fqdns); + return this; + } + + @Override + public PrivateLinkServiceImpl withIpConfigurations(List ipConfigurations) { + this.inner().withIpConfigurations(ipConfigurations); + return this; + } + + @Override + public PrivateLinkServiceImpl withLoadBalancerFrontendIpConfigurations(List loadBalancerFrontendIpConfigurations) { + this.inner().withLoadBalancerFrontendIpConfigurations(loadBalancerFrontendIpConfigurations); + return this; + } + + @Override + public PrivateLinkServiceImpl withVisibility(PrivateLinkServicePropertiesVisibility visibility) { + this.inner().withVisibility(visibility); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceInner.java new file mode 100644 index 000000000000..ff7261bd838d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceInner.java @@ -0,0 +1,286 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServiceIpConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServicePropertiesVisibility; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServicePropertiesAutoApproval; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Private link service resource. + */ +@JsonFlatten +@SkipParentValidation +public class PrivateLinkServiceInner extends Resource { + /** + * An array of references to the load balancer IP configurations. + */ + @JsonProperty(value = "properties.loadBalancerFrontendIpConfigurations") + private List loadBalancerFrontendIpConfigurations; + + /** + * An array of private link service IP configurations. + */ + @JsonProperty(value = "properties.ipConfigurations") + private List ipConfigurations; + + /** + * An array of references to the network interfaces created for this + * private link service. + */ + @JsonProperty(value = "properties.networkInterfaces", access = JsonProperty.Access.WRITE_ONLY) + private List networkInterfaces; + + /** + * The provisioning state of the private link service resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * An array of list about connections to the private endpoint. + */ + @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /** + * The visibility list of the private link service. + */ + @JsonProperty(value = "properties.visibility") + private PrivateLinkServicePropertiesVisibility visibility; + + /** + * The auto-approval list of the private link service. + */ + @JsonProperty(value = "properties.autoApproval") + private PrivateLinkServicePropertiesAutoApproval autoApproval; + + /** + * The list of Fqdn. + */ + @JsonProperty(value = "properties.fqdns") + private List fqdns; + + /** + * The alias of the private link service. + */ + @JsonProperty(value = "properties.alias", access = JsonProperty.Access.WRITE_ONLY) + private String alias; + + /** + * Whether the private link service is enabled for proxy protocol or not. + */ + @JsonProperty(value = "properties.enableProxyProtocol") + private Boolean enableProxyProtocol; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get an array of references to the load balancer IP configurations. + * + * @return the loadBalancerFrontendIpConfigurations value + */ + public List loadBalancerFrontendIpConfigurations() { + return this.loadBalancerFrontendIpConfigurations; + } + + /** + * Set an array of references to the load balancer IP configurations. + * + * @param loadBalancerFrontendIpConfigurations the loadBalancerFrontendIpConfigurations value to set + * @return the PrivateLinkServiceInner object itself. + */ + public PrivateLinkServiceInner withLoadBalancerFrontendIpConfigurations(List loadBalancerFrontendIpConfigurations) { + this.loadBalancerFrontendIpConfigurations = loadBalancerFrontendIpConfigurations; + return this; + } + + /** + * Get an array of private link service IP configurations. + * + * @return the ipConfigurations value + */ + public List ipConfigurations() { + return this.ipConfigurations; + } + + /** + * Set an array of private link service IP configurations. + * + * @param ipConfigurations the ipConfigurations value to set + * @return the PrivateLinkServiceInner object itself. + */ + public PrivateLinkServiceInner withIpConfigurations(List ipConfigurations) { + this.ipConfigurations = ipConfigurations; + return this; + } + + /** + * Get an array of references to the network interfaces created for this private link service. + * + * @return the networkInterfaces value + */ + public List networkInterfaces() { + return this.networkInterfaces; + } + + /** + * Get the provisioning state of the private link service resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get an array of list about connections to the private endpoint. + * + * @return the privateEndpointConnections value + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Get the visibility list of the private link service. + * + * @return the visibility value + */ + public PrivateLinkServicePropertiesVisibility visibility() { + return this.visibility; + } + + /** + * Set the visibility list of the private link service. + * + * @param visibility the visibility value to set + * @return the PrivateLinkServiceInner object itself. + */ + public PrivateLinkServiceInner withVisibility(PrivateLinkServicePropertiesVisibility visibility) { + this.visibility = visibility; + return this; + } + + /** + * Get the auto-approval list of the private link service. + * + * @return the autoApproval value + */ + public PrivateLinkServicePropertiesAutoApproval autoApproval() { + return this.autoApproval; + } + + /** + * Set the auto-approval list of the private link service. + * + * @param autoApproval the autoApproval value to set + * @return the PrivateLinkServiceInner object itself. + */ + public PrivateLinkServiceInner withAutoApproval(PrivateLinkServicePropertiesAutoApproval autoApproval) { + this.autoApproval = autoApproval; + return this; + } + + /** + * Get the list of Fqdn. + * + * @return the fqdns value + */ + public List fqdns() { + return this.fqdns; + } + + /** + * Set the list of Fqdn. + * + * @param fqdns the fqdns value to set + * @return the PrivateLinkServiceInner object itself. + */ + public PrivateLinkServiceInner withFqdns(List fqdns) { + this.fqdns = fqdns; + return this; + } + + /** + * Get the alias of the private link service. + * + * @return the alias value + */ + public String alias() { + return this.alias; + } + + /** + * Get whether the private link service is enabled for proxy protocol or not. + * + * @return the enableProxyProtocol value + */ + public Boolean enableProxyProtocol() { + return this.enableProxyProtocol; + } + + /** + * Set whether the private link service is enabled for proxy protocol or not. + * + * @param enableProxyProtocol the enableProxyProtocol value to set + * @return the PrivateLinkServiceInner object itself. + */ + public PrivateLinkServiceInner withEnableProxyProtocol(Boolean enableProxyProtocol) { + this.enableProxyProtocol = enableProxyProtocol; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the PrivateLinkServiceInner object itself. + */ + public PrivateLinkServiceInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceVisibilityImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceVisibilityImpl.java new file mode 100644 index 000000000000..9dd3c7bdf630 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceVisibilityImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServiceVisibility; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class PrivateLinkServiceVisibilityImpl extends WrapperImpl implements PrivateLinkServiceVisibility { + private final NetworkManager manager; + PrivateLinkServiceVisibilityImpl(PrivateLinkServiceVisibilityInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Boolean visible() { + return this.inner().visible(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceVisibilityInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceVisibilityInner.java new file mode 100644 index 000000000000..1601aec2afe7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServiceVisibilityInner.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.network.v2019_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for the CheckPrivateLinkServiceVisibility API service call. + */ +public class PrivateLinkServiceVisibilityInner { + /** + * Private Link Service Visibility (True/False). + */ + @JsonProperty(value = "visible") + private Boolean visible; + + /** + * Get private Link Service Visibility (True/False). + * + * @return the visible value + */ + public Boolean visible() { + return this.visible; + } + + /** + * Set private Link Service Visibility (True/False). + * + * @param visible the visible value to set + * @return the PrivateLinkServiceVisibilityInner object itself. + */ + public PrivateLinkServiceVisibilityInner withVisible(Boolean visible) { + this.visible = visible; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesImpl.java new file mode 100644 index 000000000000..73abc8ab7c3a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesImpl.java @@ -0,0 +1,257 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServices; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkService; +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.network.v2019_09_01.PrivateEndpointConnection; +import com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServiceVisibility; +import com.microsoft.azure.management.network.v2019_09_01.AutoApprovedPrivateLinkService; + +class PrivateLinkServicesImpl extends GroupableResourcesCoreImpl implements PrivateLinkServices { + protected PrivateLinkServicesImpl(NetworkManager manager) { + super(manager.inner().privateLinkServices(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + PrivateLinkServicesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + PrivateLinkServicesInner 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) { + PrivateLinkServicesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + PrivateLinkServicesInner 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 PrivateLinkService call(PrivateLinkServiceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + PrivateLinkServicesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + PrivateLinkServicesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PrivateLinkService call(PrivateLinkServiceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PrivateLinkServiceImpl define(String name) { + return wrapModel(name); + } + + @Override + protected PrivateLinkServiceImpl wrapModel(PrivateLinkServiceInner inner) { + return new PrivateLinkServiceImpl(inner.name(), inner, manager()); + } + + @Override + protected PrivateLinkServiceImpl wrapModel(String name) { + return new PrivateLinkServiceImpl(name, new PrivateLinkServiceInner(), this.manager()); + } + + private PrivateEndpointConnectionImpl wrapPrivateEndpointConnectionModel(PrivateEndpointConnectionInner inner) { + return new PrivateEndpointConnectionImpl(inner, manager()); + } + + private AutoApprovedPrivateLinkServiceImpl wrapAutoApprovedPrivateLinkServiceModel(AutoApprovedPrivateLinkServiceInner inner) { + return new AutoApprovedPrivateLinkServiceImpl(inner, manager()); + } + + private Observable getPrivateEndpointConnectionInnerUsingPrivateLinkServicesInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String serviceName = IdParsingUtils.getValueFromIdByName(id, "privateLinkServices"); + String peConnectionName = IdParsingUtils.getValueFromIdByName(id, "privateEndpointConnections"); + PrivateLinkServicesInner client = this.inner(); + return client.getPrivateEndpointConnectionAsync(resourceGroupName, serviceName, peConnectionName); + } + + @Override + public Observable getPrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName) { + PrivateLinkServicesInner client = this.inner(); + return client.getPrivateEndpointConnectionAsync(resourceGroupName, serviceName, peConnectionName) + .flatMap(new Func1>() { + @Override + public Observable call(PrivateEndpointConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((PrivateEndpointConnection)wrapPrivateEndpointConnectionModel(inner)); + } + } + }); + } + + @Override + public Observable listPrivateEndpointConnectionsAsync(final String resourceGroupName, final String serviceName) { + PrivateLinkServicesInner client = this.inner(); + return client.listPrivateEndpointConnectionsAsync(resourceGroupName, serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PrivateEndpointConnection call(PrivateEndpointConnectionInner inner) { + return wrapPrivateEndpointConnectionModel(inner); + } + }); + } + + @Override + public Completable deletePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName) { + PrivateLinkServicesInner client = this.inner(); + return client.deletePrivateEndpointConnectionAsync(resourceGroupName, serviceName, peConnectionName).toCompletable(); + } + + @Override + public Observable checkPrivateLinkServiceVisibilityAsync(String location) { + PrivateLinkServicesInner client = this.inner(); + return client.checkPrivateLinkServiceVisibilityAsync(location) + .map(new Func1() { + @Override + public PrivateLinkServiceVisibility call(PrivateLinkServiceVisibilityInner inner) { + return new PrivateLinkServiceVisibilityImpl(inner, manager()); + } + }); + } + + @Override + public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName) { + PrivateLinkServicesInner client = this.inner(); + return client.checkPrivateLinkServiceVisibilityByResourceGroupAsync(location, resourceGroupName) + .map(new Func1() { + @Override + public PrivateLinkServiceVisibility call(PrivateLinkServiceVisibilityInner inner) { + return new PrivateLinkServiceVisibilityImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAutoApprovedPrivateLinkServicesAsync(final String location) { + PrivateLinkServicesInner client = this.inner(); + return client.listAutoApprovedPrivateLinkServicesAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AutoApprovedPrivateLinkService call(AutoApprovedPrivateLinkServiceInner inner) { + return wrapAutoApprovedPrivateLinkServiceModel(inner); + } + }); + } + + @Override + public Observable listAutoApprovedPrivateLinkServicesByResourceGroupAsync(final String location, final String resourceGroupName) { + PrivateLinkServicesInner client = this.inner(); + return client.listAutoApprovedPrivateLinkServicesByResourceGroupAsync(location, resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AutoApprovedPrivateLinkService call(AutoApprovedPrivateLinkServiceInner inner) { + return new AutoApprovedPrivateLinkServiceImpl(inner, manager()); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesInner.java new file mode 100644 index 000000000000..ca84c6a74a97 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesInner.java @@ -0,0 +1,2539 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.CheckPrivateLinkServiceVisibilityRequest; +import com.microsoft.azure.management.network.v2019_09_01.ErrorException; +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.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 PrivateLinkServices. + */ +public class PrivateLinkServicesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private PrivateLinkServicesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of PrivateLinkServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PrivateLinkServicesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(PrivateLinkServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for PrivateLinkServices to be + * used by Retrofit to perform actually REST calls. + */ + interface PrivateLinkServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServices delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @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.network.v2019_09_01.PrivateLinkServices beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @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.network.v2019_09_01.PrivateLinkServices getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.PrivateLinkServices createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body PrivateLinkServiceInner 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.network.v2019_09_01.PrivateLinkServices beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body PrivateLinkServiceInner 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.network.v2019_09_01.PrivateLinkServices listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.PrivateLinkServices list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/privateLinkServices") + Observable> list(@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.network.v2019_09_01.PrivateLinkServices getPrivateEndpointConnection" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}") + Observable> getPrivateEndpointConnection(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("peConnectionName") String peConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.PrivateLinkServices updatePrivateEndpointConnection" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}") + Observable> updatePrivateEndpointConnection(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("peConnectionName") String peConnectionName, @Path("subscriptionId") String subscriptionId, @Body PrivateEndpointConnectionInner 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.network.v2019_09_01.PrivateLinkServices deletePrivateEndpointConnection" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", method = "DELETE", hasBody = true) + Observable> deletePrivateEndpointConnection(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("peConnectionName") String peConnectionName, @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.network.v2019_09_01.PrivateLinkServices beginDeletePrivateEndpointConnection" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", method = "DELETE", hasBody = true) + Observable> beginDeletePrivateEndpointConnection(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("peConnectionName") String peConnectionName, @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.network.v2019_09_01.PrivateLinkServices listPrivateEndpointConnections" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections") + Observable> listPrivateEndpointConnections(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @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.network.v2019_09_01.PrivateLinkServices checkPrivateLinkServiceVisibility" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") + Observable> checkPrivateLinkServiceVisibility(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckPrivateLinkServiceVisibilityRequest parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServices checkPrivateLinkServiceVisibilityByResourceGroup" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") + Observable> checkPrivateLinkServiceVisibilityByResourceGroup(@Path("location") String location, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckPrivateLinkServiceVisibilityRequest parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServices listAutoApprovedPrivateLinkServices" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices") + Observable> listAutoApprovedPrivateLinkServices(@Path("location") String location, @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.network.v2019_09_01.PrivateLinkServices listAutoApprovedPrivateLinkServicesByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices") + Observable> listAutoApprovedPrivateLinkServicesByResourceGroup(@Path("location") String location, @Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.PrivateLinkServices 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.network.v2019_09_01.PrivateLinkServices 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.network.v2019_09_01.PrivateLinkServices listPrivateEndpointConnectionsNext" }) + @GET + Observable> listPrivateEndpointConnectionsNext(@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.network.v2019_09_01.PrivateLinkServices listAutoApprovedPrivateLinkServicesNext" }) + @GET + Observable> listAutoApprovedPrivateLinkServicesNext(@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.network.v2019_09_01.PrivateLinkServices listAutoApprovedPrivateLinkServicesByResourceGroupNext" }) + @GET + Observable> listAutoApprovedPrivateLinkServicesByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified private link service. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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 serviceName) { + deleteWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().last().body(); + } + + /** + * Deletes the specified private link service. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); + } + + /** + * Deletes the specified private link service. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String serviceName) { + return deleteWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified private link service. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, serviceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified private link service. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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 serviceName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); + } + + /** + * Deletes the specified private link service. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); + } + + /** + * Deletes the specified private link service. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String serviceName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified private link service. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String serviceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, serviceName, this.client.subscriptionId(), 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 ErrorException, 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(ErrorException.class) + .build(response); + } + + /** + * Gets the specified private link service by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateLinkServiceInner object if successful. + */ + public PrivateLinkServiceInner getByResourceGroup(String resourceGroupName, String serviceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); + } + + /** + * Gets the specified private link service by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); + } + + /** + * Gets the specified private link service by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String serviceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, PrivateLinkServiceInner>() { + @Override + public PrivateLinkServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified private link service by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String serviceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, serviceName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified private link service by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateLinkServiceInner object if successful. + */ + public PrivateLinkServiceInner getByResourceGroup(String resourceGroupName, String serviceName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified private link service by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param expand Expands referenced resources. + * @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 serviceName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceName, expand), serviceCallback); + } + + /** + * Gets the specified private link service by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String serviceName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceName, expand).map(new Func1, PrivateLinkServiceInner>() { + @Override + public PrivateLinkServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified private link service by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String serviceName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, serviceName, this.client.subscriptionId(), apiVersion, expand, 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Creates or updates an private link service in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param parameters Parameters supplied to the create or update private link service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateLinkServiceInner object if successful. + */ + public PrivateLinkServiceInner createOrUpdate(String resourceGroupName, String serviceName, PrivateLinkServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates an private link service in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param parameters Parameters supplied to the create or update private link service 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 createOrUpdateAsync(String resourceGroupName, String serviceName, PrivateLinkServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); + } + + /** + * Creates or updates an private link service in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param parameters Parameters supplied to the create or update private link service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, PrivateLinkServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, PrivateLinkServiceInner>() { + @Override + public PrivateLinkServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an private link service in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param parameters Parameters supplied to the create or update private link service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, PrivateLinkServiceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates an private link service in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param parameters Parameters supplied to the create or update private link service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateLinkServiceInner object if successful. + */ + public PrivateLinkServiceInner beginCreateOrUpdate(String resourceGroupName, String serviceName, PrivateLinkServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates an private link service in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param parameters Parameters supplied to the create or update private link service 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 beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, PrivateLinkServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); + } + + /** + * Creates or updates an private link service in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param parameters Parameters supplied to the create or update private link service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, PrivateLinkServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, PrivateLinkServiceInner>() { + @Override + public PrivateLinkServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an private link service in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param parameters Parameters supplied to the create or update private link service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, PrivateLinkServiceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Gets all private link services in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<PrivateLinkServiceInner> 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 all private link services in a resource group. + * + * @param resourceGroupName The name of the 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 all private link services in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateLinkServiceInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all private link services in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateLinkServiceInner> 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 all private link services in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateLinkServiceInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Gets all private link service in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<PrivateLinkServiceInner> 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 all private link service in a subscription. + * + * @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 all private link service in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateLinkServiceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all private link service in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateLinkServiceInner> 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 all private link service in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateLinkServiceInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Get the specific private end point connection by specific private link service in the resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner getPrivateEndpointConnection(String resourceGroupName, String serviceName, String peConnectionName) { + return getPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName).toBlocking().single().body(); + } + + /** + * Get the specific private end point connection by specific private link service in the resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @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 getPrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName), serviceCallback); + } + + /** + * Get the specific private end point connection by specific private link service in the resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable getPrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName) { + return getPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the specific private end point connection by specific private link service in the resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable> getPrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String serviceName, String peConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (peConnectionName == null) { + throw new IllegalArgumentException("Parameter peConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getPrivateEndpointConnection(resourceGroupName, serviceName, peConnectionName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPrivateEndpointConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get the specific private end point connection by specific private link service in the resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner getPrivateEndpointConnection(String resourceGroupName, String serviceName, String peConnectionName, String expand) { + return getPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName, expand).toBlocking().single().body(); + } + + /** + * Get the specific private end point connection by specific private link service in the resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @param expand Expands referenced resources. + * @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 getPrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName, expand), serviceCallback); + } + + /** + * Get the specific private end point connection by specific private link service in the resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable getPrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, String expand) { + return getPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName, expand).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the specific private end point connection by specific private link service in the resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable> getPrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String serviceName, String peConnectionName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (peConnectionName == null) { + throw new IllegalArgumentException("Parameter peConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getPrivateEndpointConnection(resourceGroupName, serviceName, peConnectionName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPrivateEndpointConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPrivateEndpointConnectionDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Approve or reject private end point connection for a private link service in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @param parameters Parameters supplied to approve or reject the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner updatePrivateEndpointConnection(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnectionInner parameters) { + return updatePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName, parameters).toBlocking().single().body(); + } + + /** + * Approve or reject private end point connection for a private link service in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @param parameters Parameters supplied to approve or reject the private end point connection. + * @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 updatePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updatePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName, parameters), serviceCallback); + } + + /** + * Approve or reject private end point connection for a private link service in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @param parameters Parameters supplied to approve or reject the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable updatePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnectionInner parameters) { + return updatePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName, parameters).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Approve or reject private end point connection for a private link service in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @param parameters Parameters supplied to approve or reject the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable> updatePrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnectionInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (peConnectionName == null) { + throw new IllegalArgumentException("Parameter peConnectionName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.updatePrivateEndpointConnection(resourceGroupName, serviceName, peConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updatePrivateEndpointConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updatePrivateEndpointConnectionDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Delete private end point connection for a private link service in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deletePrivateEndpointConnection(String resourceGroupName, String serviceName, String peConnectionName) { + deletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName).toBlocking().last().body(); + } + + /** + * Delete private end point connection for a private link service in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @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 deletePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName), serviceCallback); + } + + /** + * Delete private end point connection for a private link service in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deletePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName) { + return deletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete private end point connection for a private link service in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deletePrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String serviceName, String peConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (peConnectionName == null) { + throw new IllegalArgumentException("Parameter peConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.deletePrivateEndpointConnection(resourceGroupName, serviceName, peConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete private end point connection for a private link service in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDeletePrivateEndpointConnection(String resourceGroupName, String serviceName, String peConnectionName) { + beginDeletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName).toBlocking().single().body(); + } + + /** + * Delete private end point connection for a private link service in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @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 beginDeletePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName), serviceCallback); + } + + /** + * Delete private end point connection for a private link service in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeletePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName) { + return beginDeletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete private end point connection for a private link service in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @param peConnectionName The name of the private end point connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeletePrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String serviceName, String peConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (peConnectionName == null) { + throw new IllegalArgumentException("Parameter peConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDeletePrivateEndpointConnection(resourceGroupName, serviceName, peConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeletePrivateEndpointConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeletePrivateEndpointConnectionDelegate(Response response) throws ErrorException, 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(ErrorException.class) + .build(response); + } + + /** + * Gets all private end point connections for a specific private link service. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<PrivateEndpointConnectionInner> object if successful. + */ + public PagedList listPrivateEndpointConnections(final String resourceGroupName, final String serviceName) { + ServiceResponse> response = listPrivateEndpointConnectionsSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPrivateEndpointConnectionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all private end point connections for a specific private link service. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @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> listPrivateEndpointConnectionsAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPrivateEndpointConnectionsSinglePageAsync(resourceGroupName, serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPrivateEndpointConnectionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all private end point connections for a specific private link service. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateEndpointConnectionInner> object + */ + public Observable> listPrivateEndpointConnectionsAsync(final String resourceGroupName, final String serviceName) { + return listPrivateEndpointConnectionsWithServiceResponseAsync(resourceGroupName, serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all private end point connections for a specific private link service. + * + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateEndpointConnectionInner> object + */ + public Observable>> listPrivateEndpointConnectionsWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { + return listPrivateEndpointConnectionsSinglePageAsync(resourceGroupName, serviceName) + .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(listPrivateEndpointConnectionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all private end point connections for a specific private link service. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param serviceName The name of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateEndpointConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPrivateEndpointConnectionsSinglePageAsync(final String resourceGroupName, final String serviceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listPrivateEndpointConnections(resourceGroupName, serviceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPrivateEndpointConnectionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPrivateEndpointConnectionsDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PrivateLinkServiceVisibilityInner object if successful. + */ + public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibility(String location) { + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @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 checkPrivateLinkServiceVisibilityAsync(String location, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable checkPrivateLinkServiceVisibilityAsync(String location) { + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location).map(new Func1, PrivateLinkServiceVisibilityInner>() { + @Override + public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable> checkPrivateLinkServiceVisibilityWithServiceResponseAsync(String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String privateLinkServiceAlias = null; + CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); + parameters.withPrivateLinkServiceAlias(null); + return service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PrivateLinkServiceVisibilityInner object if successful. + */ + public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibility(String location, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).toBlocking().single().body(); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param privateLinkServiceAlias The alias of the private link service. + * @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 checkPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias), serviceCallback); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable checkPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { + @Override + public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable> checkPrivateLinkServiceVisibilityWithServiceResponseAsync(String location, String privateLinkServiceAlias) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); + parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); + return service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkPrivateLinkServiceVisibilityDelegate(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 subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the 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 PrivateLinkServiceVisibilityInner object if successful. + */ + public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName) { + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).toBlocking().single().body(); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the 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 checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName), serviceCallback); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName) { + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).map(new Func1, PrivateLinkServiceVisibilityInner>() { + @Override + public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable> checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + 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."); + } + final String apiVersion = "2019-09-01"; + final String privateLinkServiceAlias = null; + CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); + parameters.withPrivateLinkServiceAlias(null); + return service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PrivateLinkServiceVisibilityInner object if successful. + */ + public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).toBlocking().single().body(); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @param privateLinkServiceAlias The alias of the private link service. + * @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 checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias), serviceCallback); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { + @Override + public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable> checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + 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."); + } + final String apiVersion = "2019-09-01"; + CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); + parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); + return service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkPrivateLinkServiceVisibilityByResourceGroupDelegate(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); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<AutoApprovedPrivateLinkServiceInner> object if successful. + */ + public PagedList listAutoApprovedPrivateLinkServices(final String location) { + ServiceResponse> response = listAutoApprovedPrivateLinkServicesSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @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> listAutoApprovedPrivateLinkServicesAsync(final String location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAutoApprovedPrivateLinkServicesSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable> listAutoApprovedPrivateLinkServicesAsync(final String location) { + return listAutoApprovedPrivateLinkServicesWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable>> listAutoApprovedPrivateLinkServicesWithServiceResponseAsync(final String location) { + return listAutoApprovedPrivateLinkServicesSinglePageAsync(location) + .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(listAutoApprovedPrivateLinkServicesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + ServiceResponse> * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AutoApprovedPrivateLinkServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAutoApprovedPrivateLinkServicesSinglePageAsync(final String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listAutoApprovedPrivateLinkServices(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAutoApprovedPrivateLinkServicesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAutoApprovedPrivateLinkServicesDelegate(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); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the 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<AutoApprovedPrivateLinkServiceInner> object if successful. + */ + public PagedList listAutoApprovedPrivateLinkServicesByResourceGroup(final String location, final String resourceGroupName) { + ServiceResponse> response = listAutoApprovedPrivateLinkServicesByResourceGroupSinglePageAsync(location, resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the 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> listAutoApprovedPrivateLinkServicesByResourceGroupAsync(final String location, final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAutoApprovedPrivateLinkServicesByResourceGroupSinglePageAsync(location, resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable> listAutoApprovedPrivateLinkServicesByResourceGroupAsync(final String location, final String resourceGroupName) { + return listAutoApprovedPrivateLinkServicesByResourceGroupWithServiceResponseAsync(location, resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable>> listAutoApprovedPrivateLinkServicesByResourceGroupWithServiceResponseAsync(final String location, final String resourceGroupName) { + return listAutoApprovedPrivateLinkServicesByResourceGroupSinglePageAsync(location, 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(listAutoApprovedPrivateLinkServicesByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + ServiceResponse> * @param location The location of the domain name. + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AutoApprovedPrivateLinkServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAutoApprovedPrivateLinkServicesByResourceGroupSinglePageAsync(final String location, final String resourceGroupName) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + 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."); + } + final String apiVersion = "2019-09-01"; + return service.listAutoApprovedPrivateLinkServicesByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAutoApprovedPrivateLinkServicesByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAutoApprovedPrivateLinkServicesByResourceGroupDelegate(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 all private link services in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<PrivateLinkServiceInner> 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 all private link services in a resource group. + * + * @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 all private link services in a resource group. + * + * @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<PrivateLinkServiceInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all private link services in a resource group. + * + * @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<PrivateLinkServiceInner> 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 all private link services in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateLinkServiceInner> 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Gets all private link service in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<PrivateLinkServiceInner> 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 all private link service in a subscription. + * + * @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 all private link service in a subscription. + * + * @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<PrivateLinkServiceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all private link service in a subscription. + * + * @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<PrivateLinkServiceInner> 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 all private link service in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateLinkServiceInner> 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Gets all private end point connections for a specific private link service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<PrivateEndpointConnectionInner> object if successful. + */ + public PagedList listPrivateEndpointConnectionsNext(final String nextPageLink) { + ServiceResponse> response = listPrivateEndpointConnectionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPrivateEndpointConnectionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all private end point connections for a specific private link service. + * + * @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> listPrivateEndpointConnectionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPrivateEndpointConnectionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPrivateEndpointConnectionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all private end point connections for a specific private link service. + * + * @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<PrivateEndpointConnectionInner> object + */ + public Observable> listPrivateEndpointConnectionsNextAsync(final String nextPageLink) { + return listPrivateEndpointConnectionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all private end point connections for a specific private link service. + * + * @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<PrivateEndpointConnectionInner> object + */ + public Observable>> listPrivateEndpointConnectionsNextWithServiceResponseAsync(final String nextPageLink) { + return listPrivateEndpointConnectionsNextSinglePageAsync(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(listPrivateEndpointConnectionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all private end point connections for a specific private link service. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateEndpointConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPrivateEndpointConnectionsNextSinglePageAsync(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.listPrivateEndpointConnectionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPrivateEndpointConnectionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPrivateEndpointConnectionsNextDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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<AutoApprovedPrivateLinkServiceInner> object if successful. + */ + public PagedList listAutoApprovedPrivateLinkServicesNext(final String nextPageLink) { + ServiceResponse> response = listAutoApprovedPrivateLinkServicesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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> listAutoApprovedPrivateLinkServicesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAutoApprovedPrivateLinkServicesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable> listAutoApprovedPrivateLinkServicesNextAsync(final String nextPageLink) { + return listAutoApprovedPrivateLinkServicesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable>> listAutoApprovedPrivateLinkServicesNextWithServiceResponseAsync(final String nextPageLink) { + return listAutoApprovedPrivateLinkServicesNextSinglePageAsync(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(listAutoApprovedPrivateLinkServicesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AutoApprovedPrivateLinkServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAutoApprovedPrivateLinkServicesNextSinglePageAsync(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.listAutoApprovedPrivateLinkServicesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAutoApprovedPrivateLinkServicesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAutoApprovedPrivateLinkServicesNextDelegate(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); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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<AutoApprovedPrivateLinkServiceInner> object if successful. + */ + public PagedList listAutoApprovedPrivateLinkServicesByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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> listAutoApprovedPrivateLinkServicesByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable> listAutoApprovedPrivateLinkServicesByResourceGroupNextAsync(final String nextPageLink) { + return listAutoApprovedPrivateLinkServicesByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable>> listAutoApprovedPrivateLinkServicesByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(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(listAutoApprovedPrivateLinkServicesByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AutoApprovedPrivateLinkServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(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.listAutoApprovedPrivateLinkServicesByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAutoApprovedPrivateLinkServicesByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAutoApprovedPrivateLinkServicesByResourceGroupNextDelegate(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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ProbeImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ProbeImpl.java new file mode 100644 index 000000000000..9cb4eeae0c3a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ProbeImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.Probe; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProbeProtocol; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class ProbeImpl extends IndexableRefreshableWrapperImpl implements Probe { + private final NetworkManager manager; + private String resourceGroupName; + private String loadBalancerName; + private String probeName; + + ProbeImpl(ProbeInner inner, NetworkManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.loadBalancerName = IdParsingUtils.getValueFromIdByName(inner.id(), "loadBalancers"); + this.probeName = IdParsingUtils.getValueFromIdByName(inner.id(), "probes"); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + LoadBalancerProbesInner client = this.manager().inner().loadBalancerProbes(); + return client.getAsync(this.resourceGroupName, this.loadBalancerName, this.probeName); + } + + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Integer intervalInSeconds() { + return this.inner().intervalInSeconds(); + } + + @Override + public List loadBalancingRules() { + return this.inner().loadBalancingRules(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer numberOfProbes() { + return this.inner().numberOfProbes(); + } + + @Override + public int port() { + return this.inner().port(); + } + + @Override + public ProbeProtocol protocol() { + return this.inner().protocol(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String requestPath() { + return this.inner().requestPath(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ProbeInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ProbeInner.java new file mode 100644 index 000000000000..c2b0dd4a7a9b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ProbeInner.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProbeProtocol; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * A load balancer probe. + */ +@JsonFlatten +public class ProbeInner extends SubResource { + /** + * The load balancer rules that use this probe. + */ + @JsonProperty(value = "properties.loadBalancingRules", access = JsonProperty.Access.WRITE_ONLY) + private List loadBalancingRules; + + /** + * The protocol of the end point. If 'Tcp' is specified, a received ACK is + * required for the probe to be successful. If 'Http' or 'Https' is + * specified, a 200 OK response from the specifies URI is required for the + * probe to be successful. Possible values include: 'Http', 'Tcp', 'Https'. + */ + @JsonProperty(value = "properties.protocol", required = true) + private ProbeProtocol protocol; + + /** + * The port for communicating the probe. Possible values range from 1 to + * 65535, inclusive. + */ + @JsonProperty(value = "properties.port", required = true) + private int port; + + /** + * The interval, in seconds, for how frequently to probe the endpoint for + * health status. Typically, the interval is slightly less than half the + * allocated timeout period (in seconds) which allows two full probes + * before taking the instance out of rotation. The default value is 15, the + * minimum value is 5. + */ + @JsonProperty(value = "properties.intervalInSeconds") + private Integer intervalInSeconds; + + /** + * The number of probes where if no response, will result in stopping + * further traffic from being delivered to the endpoint. This values allows + * endpoints to be taken out of rotation faster or slower than the typical + * times used in Azure. + */ + @JsonProperty(value = "properties.numberOfProbes") + private Integer numberOfProbes; + + /** + * The URI used for requesting health status from the VM. Path is required + * if a protocol is set to http. Otherwise, it is not allowed. There is no + * default value. + */ + @JsonProperty(value = "properties.requestPath") + private String requestPath; + + /** + * The provisioning state of the probe resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within the set of probes used by + * the load balancer. This name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the load balancer rules that use this probe. + * + * @return the loadBalancingRules value + */ + public List loadBalancingRules() { + return this.loadBalancingRules; + } + + /** + * Get the protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'Http', 'Tcp', 'Https'. + * + * @return the protocol value + */ + public ProbeProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'Http', 'Tcp', 'Https'. + * + * @param protocol the protocol value to set + * @return the ProbeInner object itself. + */ + public ProbeInner withProtocol(ProbeProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the port for communicating the probe. Possible values range from 1 to 65535, inclusive. + * + * @return the port value + */ + public int port() { + return this.port; + } + + /** + * Set the port for communicating the probe. Possible values range from 1 to 65535, inclusive. + * + * @param port the port value to set + * @return the ProbeInner object itself. + */ + public ProbeInner withPort(int port) { + this.port = port; + return this; + } + + /** + * Get the interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. + * + * @return the intervalInSeconds value + */ + public Integer intervalInSeconds() { + return this.intervalInSeconds; + } + + /** + * Set the interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. + * + * @param intervalInSeconds the intervalInSeconds value to set + * @return the ProbeInner object itself. + */ + public ProbeInner withIntervalInSeconds(Integer intervalInSeconds) { + this.intervalInSeconds = intervalInSeconds; + return this; + } + + /** + * Get the number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. + * + * @return the numberOfProbes value + */ + public Integer numberOfProbes() { + return this.numberOfProbes; + } + + /** + * Set the number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. + * + * @param numberOfProbes the numberOfProbes value to set + * @return the ProbeInner object itself. + */ + public ProbeInner withNumberOfProbes(Integer numberOfProbes) { + this.numberOfProbes = numberOfProbes; + return this; + } + + /** + * Get the URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. + * + * @return the requestPath value + */ + public String requestPath() { + return this.requestPath; + } + + /** + * Set the URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. + * + * @param requestPath the requestPath value to set + * @return the ProbeInner object itself. + */ + public ProbeInner withRequestPath(String requestPath) { + this.requestPath = requestPath; + return this; + } + + /** + * Get the provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access the resource. + * + * @param name the name value to set + * @return the ProbeInner object itself. + */ + public ProbeInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressImpl.java new file mode 100644 index 000000000000..33997b4a051d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressImpl.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPAddress; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPAddressSku; +import com.microsoft.azure.management.network.v2019_09_01.IPAllocationMethod; +import com.microsoft.azure.management.network.v2019_09_01.IPVersion; +import com.microsoft.azure.management.network.v2019_09_01.IPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPAddressDnsSettings; +import com.microsoft.azure.management.network.v2019_09_01.DdosSettings; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.IpTag; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class PublicIPAddressImpl extends GroupableResourceCoreImpl implements PublicIPAddress, PublicIPAddress.Definition, PublicIPAddress.Update { + PublicIPAddressImpl(String name, PublicIPAddressInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + PublicIPAddressesInner client = this.manager().inner().publicIPAddresses(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + PublicIPAddressesInner client = this.manager().inner().publicIPAddresses(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PublicIPAddressesInner client = this.manager().inner().publicIPAddresses(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public DdosSettings ddosSettings() { + return this.inner().ddosSettings(); + } + + @Override + public PublicIPAddressDnsSettings dnsSettings() { + return this.inner().dnsSettings(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public Integer idleTimeoutInMinutes() { + return this.inner().idleTimeoutInMinutes(); + } + + @Override + public String ipAddress() { + return this.inner().ipAddress(); + } + + @Override + public IPConfiguration ipConfiguration() { + return this.inner().ipConfiguration(); + } + + @Override + public List ipTags() { + return this.inner().ipTags(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public IPVersion publicIPAddressVersion() { + return this.inner().publicIPAddressVersion(); + } + + @Override + public IPAllocationMethod publicIPAllocationMethod() { + return this.inner().publicIPAllocationMethod(); + } + + @Override + public SubResource publicIPPrefix() { + return this.inner().publicIPPrefix(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public PublicIPAddressSku sku() { + return this.inner().sku(); + } + + @Override + public List zones() { + return this.inner().zones(); + } + + @Override + public PublicIPAddressImpl withDdosSettings(DdosSettings ddosSettings) { + this.inner().withDdosSettings(ddosSettings); + return this; + } + + @Override + public PublicIPAddressImpl withDnsSettings(PublicIPAddressDnsSettings dnsSettings) { + this.inner().withDnsSettings(dnsSettings); + return this; + } + + @Override + public PublicIPAddressImpl withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.inner().withIdleTimeoutInMinutes(idleTimeoutInMinutes); + return this; + } + + @Override + public PublicIPAddressImpl withIpAddress(String ipAddress) { + this.inner().withIpAddress(ipAddress); + return this; + } + + @Override + public PublicIPAddressImpl withIpTags(List ipTags) { + this.inner().withIpTags(ipTags); + return this; + } + + @Override + public PublicIPAddressImpl withPublicIPAddressVersion(IPVersion publicIPAddressVersion) { + this.inner().withPublicIPAddressVersion(publicIPAddressVersion); + return this; + } + + @Override + public PublicIPAddressImpl withPublicIPAllocationMethod(IPAllocationMethod publicIPAllocationMethod) { + this.inner().withPublicIPAllocationMethod(publicIPAllocationMethod); + return this; + } + + @Override + public PublicIPAddressImpl withPublicIPPrefix(SubResource publicIPPrefix) { + this.inner().withPublicIPPrefix(publicIPPrefix); + return this; + } + + @Override + public PublicIPAddressImpl withSku(PublicIPAddressSku sku) { + this.inner().withSku(sku); + return this; + } + + @Override + public PublicIPAddressImpl withZones(List zones) { + this.inner().withZones(zones); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressInner.java new file mode 100644 index 000000000000..d54474648057 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.PublicIPAddressSku; +import com.microsoft.azure.management.network.v2019_09_01.IPAllocationMethod; +import com.microsoft.azure.management.network.v2019_09_01.IPVersion; +import com.microsoft.azure.management.network.v2019_09_01.IPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPAddressDnsSettings; +import com.microsoft.azure.management.network.v2019_09_01.DdosSettings; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.IpTag; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Public IP address resource. + */ +@JsonFlatten +@SkipParentValidation +public class PublicIPAddressInner extends Resource { + /** + * The public IP address SKU. + */ + @JsonProperty(value = "sku") + private PublicIPAddressSku sku; + + /** + * The public IP address allocation method. Possible values include: + * 'Static', 'Dynamic'. + */ + @JsonProperty(value = "properties.publicIPAllocationMethod") + private IPAllocationMethod publicIPAllocationMethod; + + /** + * The public IP address version. Possible values include: 'IPv4', 'IPv6'. + */ + @JsonProperty(value = "properties.publicIPAddressVersion") + private IPVersion publicIPAddressVersion; + + /** + * The IP configuration associated with the public IP address. + */ + @JsonProperty(value = "properties.ipConfiguration", access = JsonProperty.Access.WRITE_ONLY) + private IPConfiguration ipConfiguration; + + /** + * The FQDN of the DNS record associated with the public IP address. + */ + @JsonProperty(value = "properties.dnsSettings") + private PublicIPAddressDnsSettings dnsSettings; + + /** + * The DDoS protection custom policy associated with the public IP address. + */ + @JsonProperty(value = "properties.ddosSettings") + private DdosSettings ddosSettings; + + /** + * The list of tags associated with the public IP address. + */ + @JsonProperty(value = "properties.ipTags") + private List ipTags; + + /** + * The IP address associated with the public IP address resource. + */ + @JsonProperty(value = "properties.ipAddress") + private String ipAddress; + + /** + * The Public IP Prefix this Public IP Address should be allocated from. + */ + @JsonProperty(value = "properties.publicIPPrefix") + private SubResource publicIPPrefix; + + /** + * The idle timeout of the public IP address. + */ + @JsonProperty(value = "properties.idleTimeoutInMinutes") + private Integer idleTimeoutInMinutes; + + /** + * The resource GUID property of the public IP address resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the public IP address resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * A list of availability zones denoting the IP allocated for the resource + * needs to come from. + */ + @JsonProperty(value = "zones") + private List zones; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the public IP address SKU. + * + * @return the sku value + */ + public PublicIPAddressSku sku() { + return this.sku; + } + + /** + * Set the public IP address SKU. + * + * @param sku the sku value to set + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withSku(PublicIPAddressSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the public IP address allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @return the publicIPAllocationMethod value + */ + public IPAllocationMethod publicIPAllocationMethod() { + return this.publicIPAllocationMethod; + } + + /** + * Set the public IP address allocation method. Possible values include: 'Static', 'Dynamic'. + * + * @param publicIPAllocationMethod the publicIPAllocationMethod value to set + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withPublicIPAllocationMethod(IPAllocationMethod publicIPAllocationMethod) { + this.publicIPAllocationMethod = publicIPAllocationMethod; + return this; + } + + /** + * Get the public IP address version. Possible values include: 'IPv4', 'IPv6'. + * + * @return the publicIPAddressVersion value + */ + public IPVersion publicIPAddressVersion() { + return this.publicIPAddressVersion; + } + + /** + * Set the public IP address version. Possible values include: 'IPv4', 'IPv6'. + * + * @param publicIPAddressVersion the publicIPAddressVersion value to set + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withPublicIPAddressVersion(IPVersion publicIPAddressVersion) { + this.publicIPAddressVersion = publicIPAddressVersion; + return this; + } + + /** + * Get the IP configuration associated with the public IP address. + * + * @return the ipConfiguration value + */ + public IPConfiguration ipConfiguration() { + return this.ipConfiguration; + } + + /** + * Get the FQDN of the DNS record associated with the public IP address. + * + * @return the dnsSettings value + */ + public PublicIPAddressDnsSettings dnsSettings() { + return this.dnsSettings; + } + + /** + * Set the FQDN of the DNS record associated with the public IP address. + * + * @param dnsSettings the dnsSettings value to set + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withDnsSettings(PublicIPAddressDnsSettings dnsSettings) { + this.dnsSettings = dnsSettings; + return this; + } + + /** + * Get the DDoS protection custom policy associated with the public IP address. + * + * @return the ddosSettings value + */ + public DdosSettings ddosSettings() { + return this.ddosSettings; + } + + /** + * Set the DDoS protection custom policy associated with the public IP address. + * + * @param ddosSettings the ddosSettings value to set + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withDdosSettings(DdosSettings ddosSettings) { + this.ddosSettings = ddosSettings; + return this; + } + + /** + * Get the list of tags associated with the public IP address. + * + * @return the ipTags value + */ + public List ipTags() { + return this.ipTags; + } + + /** + * Set the list of tags associated with the public IP address. + * + * @param ipTags the ipTags value to set + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withIpTags(List ipTags) { + this.ipTags = ipTags; + return this; + } + + /** + * Get the IP address associated with the public IP address resource. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the IP address associated with the public IP address resource. + * + * @param ipAddress the ipAddress value to set + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the Public IP Prefix this Public IP Address should be allocated from. + * + * @return the publicIPPrefix value + */ + public SubResource publicIPPrefix() { + return this.publicIPPrefix; + } + + /** + * Set the Public IP Prefix this Public IP Address should be allocated from. + * + * @param publicIPPrefix the publicIPPrefix value to set + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withPublicIPPrefix(SubResource publicIPPrefix) { + this.publicIPPrefix = publicIPPrefix; + return this; + } + + /** + * Get the idle timeout of the public IP address. + * + * @return the idleTimeoutInMinutes value + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set the idle timeout of the public IP address. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + + /** + * Get the resource GUID property of the public IP address resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the public IP address resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get a list of availability zones denoting the IP allocated for the resource needs to come from. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set a list of availability zones denoting the IP allocated for the resource needs to come from. + * + * @param zones the zones value to set + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressesImpl.java new file mode 100644 index 000000000000..6ffda529b0ac --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressesImpl.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPAddresses; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPAddress; +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; + +class PublicIPAddressesImpl extends GroupableResourcesCoreImpl implements PublicIPAddresses { + protected PublicIPAddressesImpl(NetworkManager manager) { + super(manager.inner().publicIPAddresses(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + PublicIPAddressesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + PublicIPAddressesInner 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) { + PublicIPAddressesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + PublicIPAddressesInner 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 PublicIPAddress call(PublicIPAddressInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + PublicIPAddressesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + PublicIPAddressesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PublicIPAddress call(PublicIPAddressInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PublicIPAddressImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable listVirtualMachineScaleSetPublicIPAddressesAsync(final String resourceGroupName, final String virtualMachineScaleSetName) { + PublicIPAddressesInner client = this.inner(); + return client.listVirtualMachineScaleSetPublicIPAddressesAsync(resourceGroupName, virtualMachineScaleSetName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PublicIPAddress call(PublicIPAddressInner inner) { + return new PublicIPAddressImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + public Observable listVirtualMachineScaleSetVMPublicIPAddressesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String ipConfigurationName) { + PublicIPAddressesInner client = this.inner(); + return client.listVirtualMachineScaleSetVMPublicIPAddressesAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PublicIPAddress call(PublicIPAddressInner inner) { + return new PublicIPAddressImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + public Observable getVirtualMachineScaleSetPublicIPAddressAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName) { + PublicIPAddressesInner client = this.inner(); + return client.getVirtualMachineScaleSetPublicIPAddressAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIpAddressName) + .map(new Func1() { + @Override + public PublicIPAddress call(PublicIPAddressInner inner) { + return new PublicIPAddressImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + protected PublicIPAddressImpl wrapModel(PublicIPAddressInner inner) { + return new PublicIPAddressImpl(inner.name(), inner, manager()); + } + + @Override + protected PublicIPAddressImpl wrapModel(String name) { + return new PublicIPAddressImpl(name, new PublicIPAddressInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressesInner.java new file mode 100644 index 000000000000..2001c89ada14 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPAddressesInner.java @@ -0,0 +1,1938 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 PublicIPAddresses. + */ +public class PublicIPAddressesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private PublicIPAddressesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of PublicIPAddressesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PublicIPAddressesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(PublicIPAddressesService.class); + this.client = client; + } + + /** + * The interface defining all the services for PublicIPAddresses to be + * used by Retrofit to perform actually REST calls. + */ + interface PublicIPAddressesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PublicIPAddresses delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpAddressName") String publicIpAddressName, @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.network.v2019_09_01.PublicIPAddresses beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpAddressName") String publicIpAddressName, @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.network.v2019_09_01.PublicIPAddresses getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpAddressName") String publicIpAddressName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.PublicIPAddresses createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpAddressName") String publicIpAddressName, @Path("subscriptionId") String subscriptionId, @Body PublicIPAddressInner 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.network.v2019_09_01.PublicIPAddresses beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpAddressName") String publicIpAddressName, @Path("subscriptionId") String subscriptionId, @Body PublicIPAddressInner 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.network.v2019_09_01.PublicIPAddresses updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpAddressName") String publicIpAddressName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PublicIPAddresses list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses") + Observable> list(@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.network.v2019_09_01.PublicIPAddresses listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.PublicIPAddresses listVirtualMachineScaleSetPublicIPAddresses" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses") + Observable> listVirtualMachineScaleSetPublicIPAddresses(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @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.network.v2019_09_01.PublicIPAddresses listVirtualMachineScaleSetVMPublicIPAddresses" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses") + Observable> listVirtualMachineScaleSetVMPublicIPAddresses(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("ipConfigurationName") String ipConfigurationName, @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.network.v2019_09_01.PublicIPAddresses getVirtualMachineScaleSetPublicIPAddress" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}") + Observable> getVirtualMachineScaleSetPublicIPAddress(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("ipConfigurationName") String ipConfigurationName, @Path("publicIpAddressName") String publicIpAddressName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.PublicIPAddresses 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.network.v2019_09_01.PublicIPAddresses 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.network.v2019_09_01.PublicIPAddresses listVirtualMachineScaleSetPublicIPAddressesNext" }) + @GET + Observable> listVirtualMachineScaleSetPublicIPAddressesNext(@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.network.v2019_09_01.PublicIPAddresses listVirtualMachineScaleSetVMPublicIPAddressesNext" }) + @GET + Observable> listVirtualMachineScaleSetVMPublicIPAddressesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 publicIpAddressName) { + deleteWithServiceResponseAsync(resourceGroupName, publicIpAddressName).toBlocking().last().body(); + } + + /** + * Deletes the specified public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @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 publicIpAddressName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, publicIpAddressName), serviceCallback); + } + + /** + * Deletes the specified public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String publicIpAddressName) { + return deleteWithServiceResponseAsync(resourceGroupName, publicIpAddressName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 publicIpAddressName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, publicIpAddressName).toBlocking().single().body(); + } + + /** + * Deletes the specified public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @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 publicIpAddressName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, publicIpAddressName), serviceCallback); + } + + /** + * Deletes the specified public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String publicIpAddressName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, publicIpAddressName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified public IP address in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PublicIPAddressInner object if successful. + */ + public PublicIPAddressInner getByResourceGroup(String resourceGroupName, String publicIpAddressName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpAddressName).toBlocking().single().body(); + } + + /** + * Gets the specified public IP address in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @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 publicIpAddressName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpAddressName), serviceCallback); + } + + /** + * Gets the specified public IP address in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String publicIpAddressName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpAddressName).map(new Func1, PublicIPAddressInner>() { + @Override + public PublicIPAddressInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified public IP address in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified public IP address in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PublicIPAddressInner object if successful. + */ + public PublicIPAddressInner getByResourceGroup(String resourceGroupName, String publicIpAddressName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpAddressName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified public IP address in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @param expand Expands referenced resources. + * @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 publicIpAddressName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpAddressName, expand), serviceCallback); + } + + /** + * Gets the specified public IP address in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String publicIpAddressName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpAddressName, expand).map(new Func1, PublicIPAddressInner>() { + @Override + public PublicIPAddressInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified public IP address in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the subnet. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Creates or updates a static or dynamic public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameters supplied to the create or update public IP address 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 PublicIPAddressInner object if successful. + */ + public PublicIPAddressInner createOrUpdate(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpAddressName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a static or dynamic public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameters supplied to the create or update public IP address 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 createOrUpdateAsync(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpAddressName, parameters), serviceCallback); + } + + /** + * Creates or updates a static or dynamic public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameters supplied to the create or update public IP address operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpAddressName, parameters).map(new Func1, PublicIPAddressInner>() { + @Override + public PublicIPAddressInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a static or dynamic public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameters supplied to the create or update public IP address operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a static or dynamic public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameters supplied to the create or update public IP address 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 PublicIPAddressInner object if successful. + */ + public PublicIPAddressInner beginCreateOrUpdate(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpAddressName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a static or dynamic public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameters supplied to the create or update public IP address 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 beginCreateOrUpdateAsync(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpAddressName, parameters), serviceCallback); + } + + /** + * Creates or updates a static or dynamic public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameters supplied to the create or update public IP address operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpAddressName, parameters).map(new Func1, PublicIPAddressInner>() { + @Override + public PublicIPAddressInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a static or dynamic public IP address. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameters supplied to the create or update public IP address operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PublicIPAddressInner object if successful. + */ + public PublicIPAddressInner updateTags(String resourceGroupName, String publicIpAddressName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName).toBlocking().single().body(); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @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 updateTagsAsync(String resourceGroupName, String publicIpAddressName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName), serviceCallback); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String publicIpAddressName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName).map(new Func1, PublicIPAddressInner>() { + @Override + public PublicIPAddressInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PublicIPAddressInner object if successful. + */ + public PublicIPAddressInner updateTags(String resourceGroupName, String publicIpAddressName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags).toBlocking().single().body(); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String publicIpAddressName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags), serviceCallback); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String publicIpAddressName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags).map(new Func1, PublicIPAddressInner>() { + @Override + public PublicIPAddressInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all the public IP addresses in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<PublicIPAddressInner> 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 all the public IP addresses in a subscription. + * + * @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 all the public IP addresses in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicIPAddressInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the public IP addresses in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicIPAddressInner> 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 all the public IP addresses in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicIPAddressInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all public IP addresses in a resource group. + * + * @param resourceGroupName The name of the 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<PublicIPAddressInner> 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 all public IP addresses in a resource group. + * + * @param resourceGroupName The name of the 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 all public IP addresses in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicIPAddressInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all public IP addresses in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicIPAddressInner> 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 all public IP addresses in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicIPAddressInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 information about all public IP addresses on a virtual machine scale set level. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<PublicIPAddressInner> object if successful. + */ + public PagedList listVirtualMachineScaleSetPublicIPAddresses(final String resourceGroupName, final String virtualMachineScaleSetName) { + ServiceResponse> response = listVirtualMachineScaleSetPublicIPAddressesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetPublicIPAddressesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets information about all public IP addresses on a virtual machine scale set level. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @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> listVirtualMachineScaleSetPublicIPAddressesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachineScaleSetPublicIPAddressesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetPublicIPAddressesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets information about all public IP addresses on a virtual machine scale set level. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicIPAddressInner> object + */ + public Observable> listVirtualMachineScaleSetPublicIPAddressesAsync(final String resourceGroupName, final String virtualMachineScaleSetName) { + return listVirtualMachineScaleSetPublicIPAddressesWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets information about all public IP addresses on a virtual machine scale set level. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicIPAddressInner> object + */ + public Observable>> listVirtualMachineScaleSetPublicIPAddressesWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName) { + return listVirtualMachineScaleSetPublicIPAddressesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName) + .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(listVirtualMachineScaleSetPublicIPAddressesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets information about all public IP addresses on a virtual machine scale set level. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicIPAddressInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachineScaleSetPublicIPAddressesSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-10-01"; + return service.listVirtualMachineScaleSetPublicIPAddresses(resourceGroupName, virtualMachineScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachineScaleSetPublicIPAddressesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVirtualMachineScaleSetPublicIPAddressesDelegate(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 information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The network interface name. + * @param ipConfigurationName The IP configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<PublicIPAddressInner> object if successful. + */ + public PagedList listVirtualMachineScaleSetVMPublicIPAddresses(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String ipConfigurationName) { + ServiceResponse> response = listVirtualMachineScaleSetVMPublicIPAddressesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetVMPublicIPAddressesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The network interface name. + * @param ipConfigurationName The IP configuration name. + * @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> listVirtualMachineScaleSetVMPublicIPAddressesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String ipConfigurationName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachineScaleSetVMPublicIPAddressesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetVMPublicIPAddressesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The network interface name. + * @param ipConfigurationName The IP configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicIPAddressInner> object + */ + public Observable> listVirtualMachineScaleSetVMPublicIPAddressesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String ipConfigurationName) { + return listVirtualMachineScaleSetVMPublicIPAddressesWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The network interface name. + * @param ipConfigurationName The IP configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicIPAddressInner> object + */ + public Observable>> listVirtualMachineScaleSetVMPublicIPAddressesWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String ipConfigurationName) { + return listVirtualMachineScaleSetVMPublicIPAddressesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName) + .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(listVirtualMachineScaleSetVMPublicIPAddressesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param virtualMachineScaleSetName The name of the virtual machine scale set. + ServiceResponse> * @param virtualmachineIndex The virtual machine index. + ServiceResponse> * @param networkInterfaceName The network interface name. + ServiceResponse> * @param ipConfigurationName The IP configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicIPAddressInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachineScaleSetVMPublicIPAddressesSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String ipConfigurationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (ipConfigurationName == null) { + throw new IllegalArgumentException("Parameter ipConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-10-01"; + return service.listVirtualMachineScaleSetVMPublicIPAddresses(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachineScaleSetVMPublicIPAddressesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVirtualMachineScaleSetVMPublicIPAddressesDelegate(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); + } + + /** + * Get the specified public IP address in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the IP configuration. + * @param publicIpAddressName The name of the public IP Address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PublicIPAddressInner object if successful. + */ + public PublicIPAddressInner getVirtualMachineScaleSetPublicIPAddress(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName) { + return getVirtualMachineScaleSetPublicIPAddressWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIpAddressName).toBlocking().single().body(); + } + + /** + * Get the specified public IP address in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the IP configuration. + * @param publicIpAddressName The name of the public IP Address. + * @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 getVirtualMachineScaleSetPublicIPAddressAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVirtualMachineScaleSetPublicIPAddressWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIpAddressName), serviceCallback); + } + + /** + * Get the specified public IP address in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the IP configuration. + * @param publicIpAddressName The name of the public IP Address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable getVirtualMachineScaleSetPublicIPAddressAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName) { + return getVirtualMachineScaleSetPublicIPAddressWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIpAddressName).map(new Func1, PublicIPAddressInner>() { + @Override + public PublicIPAddressInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the specified public IP address in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the IP configuration. + * @param publicIpAddressName The name of the public IP Address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable> getVirtualMachineScaleSetPublicIPAddressWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (ipConfigurationName == null) { + throw new IllegalArgumentException("Parameter ipConfigurationName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-10-01"; + final String expand = null; + return service.getVirtualMachineScaleSetPublicIPAddress(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVirtualMachineScaleSetPublicIPAddressDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get the specified public IP address in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the IP configuration. + * @param publicIpAddressName The name of the public IP Address. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PublicIPAddressInner object if successful. + */ + public PublicIPAddressInner getVirtualMachineScaleSetPublicIPAddress(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName, String expand) { + return getVirtualMachineScaleSetPublicIPAddressWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIpAddressName, expand).toBlocking().single().body(); + } + + /** + * Get the specified public IP address in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the IP configuration. + * @param publicIpAddressName The name of the public IP Address. + * @param expand Expands referenced resources. + * @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 getVirtualMachineScaleSetPublicIPAddressAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVirtualMachineScaleSetPublicIPAddressWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIpAddressName, expand), serviceCallback); + } + + /** + * Get the specified public IP address in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the IP configuration. + * @param publicIpAddressName The name of the public IP Address. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable getVirtualMachineScaleSetPublicIPAddressAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName, String expand) { + return getVirtualMachineScaleSetPublicIPAddressWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIpAddressName, expand).map(new Func1, PublicIPAddressInner>() { + @Override + public PublicIPAddressInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the specified public IP address in a virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the IP configuration. + * @param publicIpAddressName The name of the public IP Address. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable> getVirtualMachineScaleSetPublicIPAddressWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (ipConfigurationName == null) { + throw new IllegalArgumentException("Parameter ipConfigurationName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-10-01"; + return service.getVirtualMachineScaleSetPublicIPAddress(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVirtualMachineScaleSetPublicIPAddressDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVirtualMachineScaleSetPublicIPAddressDelegate(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 all the public IP addresses in a subscription. + * + * @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<PublicIPAddressInner> 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 all the public IP addresses in a subscription. + * + * @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 all the public IP addresses in a subscription. + * + * @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<PublicIPAddressInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the public IP addresses in a subscription. + * + * @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<PublicIPAddressInner> 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 all the public IP addresses in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicIPAddressInner> 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 all public IP addresses in a resource group. + * + * @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<PublicIPAddressInner> 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 all public IP addresses in a resource group. + * + * @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 all public IP addresses in a resource group. + * + * @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<PublicIPAddressInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all public IP addresses in a resource group. + * + * @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<PublicIPAddressInner> 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 all public IP addresses in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicIPAddressInner> 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 information about all public IP addresses on a virtual machine scale set level. + * + * @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<PublicIPAddressInner> object if successful. + */ + public PagedList listVirtualMachineScaleSetPublicIPAddressesNext(final String nextPageLink) { + ServiceResponse> response = listVirtualMachineScaleSetPublicIPAddressesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetPublicIPAddressesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets information about all public IP addresses on a virtual machine scale set level. + * + * @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> listVirtualMachineScaleSetPublicIPAddressesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachineScaleSetPublicIPAddressesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetPublicIPAddressesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets information about all public IP addresses on a virtual machine scale set level. + * + * @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<PublicIPAddressInner> object + */ + public Observable> listVirtualMachineScaleSetPublicIPAddressesNextAsync(final String nextPageLink) { + return listVirtualMachineScaleSetPublicIPAddressesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets information about all public IP addresses on a virtual machine scale set level. + * + * @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<PublicIPAddressInner> object + */ + public Observable>> listVirtualMachineScaleSetPublicIPAddressesNextWithServiceResponseAsync(final String nextPageLink) { + return listVirtualMachineScaleSetPublicIPAddressesNextSinglePageAsync(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(listVirtualMachineScaleSetPublicIPAddressesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets information about all public IP addresses on a virtual machine scale set level. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicIPAddressInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachineScaleSetPublicIPAddressesNextSinglePageAsync(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.listVirtualMachineScaleSetPublicIPAddressesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachineScaleSetPublicIPAddressesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVirtualMachineScaleSetPublicIPAddressesNextDelegate(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 information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. + * + * @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<PublicIPAddressInner> object if successful. + */ + public PagedList listVirtualMachineScaleSetVMPublicIPAddressesNext(final String nextPageLink) { + ServiceResponse> response = listVirtualMachineScaleSetVMPublicIPAddressesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetVMPublicIPAddressesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. + * + * @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> listVirtualMachineScaleSetVMPublicIPAddressesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachineScaleSetVMPublicIPAddressesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetVMPublicIPAddressesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. + * + * @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<PublicIPAddressInner> object + */ + public Observable> listVirtualMachineScaleSetVMPublicIPAddressesNextAsync(final String nextPageLink) { + return listVirtualMachineScaleSetVMPublicIPAddressesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. + * + * @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<PublicIPAddressInner> object + */ + public Observable>> listVirtualMachineScaleSetVMPublicIPAddressesNextWithServiceResponseAsync(final String nextPageLink) { + return listVirtualMachineScaleSetVMPublicIPAddressesNextSinglePageAsync(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(listVirtualMachineScaleSetVMPublicIPAddressesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicIPAddressInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachineScaleSetVMPublicIPAddressesNextSinglePageAsync(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.listVirtualMachineScaleSetVMPublicIPAddressesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachineScaleSetVMPublicIPAddressesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVirtualMachineScaleSetVMPublicIPAddressesNextDelegate(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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixImpl.java new file mode 100644 index 000000000000..5ce78fbd51d7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPPrefix; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPPrefixSku; +import com.microsoft.azure.management.network.v2019_09_01.IPVersion; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.IpTag; +import com.microsoft.azure.management.network.v2019_09_01.ReferencedPublicIpAddress; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class PublicIPPrefixImpl extends GroupableResourceCoreImpl implements PublicIPPrefix, PublicIPPrefix.Definition, PublicIPPrefix.Update { + PublicIPPrefixImpl(String name, PublicIPPrefixInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + PublicIPPrefixesInner client = this.manager().inner().publicIPPrefixes(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + PublicIPPrefixesInner client = this.manager().inner().publicIPPrefixes(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PublicIPPrefixesInner client = this.manager().inner().publicIPPrefixes(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String ipPrefix() { + return this.inner().ipPrefix(); + } + + @Override + public List ipTags() { + return this.inner().ipTags(); + } + + @Override + public SubResource loadBalancerFrontendIpConfiguration() { + return this.inner().loadBalancerFrontendIpConfiguration(); + } + + @Override + public Integer prefixLength() { + return this.inner().prefixLength(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public List publicIPAddresses() { + return this.inner().publicIPAddresses(); + } + + @Override + public IPVersion publicIPAddressVersion() { + return this.inner().publicIPAddressVersion(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public PublicIPPrefixSku sku() { + return this.inner().sku(); + } + + @Override + public List zones() { + return this.inner().zones(); + } + + @Override + public PublicIPPrefixImpl withIpTags(List ipTags) { + this.inner().withIpTags(ipTags); + return this; + } + + @Override + public PublicIPPrefixImpl withPrefixLength(Integer prefixLength) { + this.inner().withPrefixLength(prefixLength); + return this; + } + + @Override + public PublicIPPrefixImpl withPublicIPAddressVersion(IPVersion publicIPAddressVersion) { + this.inner().withPublicIPAddressVersion(publicIPAddressVersion); + return this; + } + + @Override + public PublicIPPrefixImpl withSku(PublicIPPrefixSku sku) { + this.inner().withSku(sku); + return this; + } + + @Override + public PublicIPPrefixImpl withZones(List zones) { + this.inner().withZones(zones); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixInner.java new file mode 100644 index 000000000000..21c39adef9f3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixInner.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.PublicIPPrefixSku; +import com.microsoft.azure.management.network.v2019_09_01.IPVersion; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.IpTag; +import com.microsoft.azure.management.network.v2019_09_01.ReferencedPublicIpAddress; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Public IP prefix resource. + */ +@JsonFlatten +@SkipParentValidation +public class PublicIPPrefixInner extends Resource { + /** + * The public IP prefix SKU. + */ + @JsonProperty(value = "sku") + private PublicIPPrefixSku sku; + + /** + * The public IP address version. Possible values include: 'IPv4', 'IPv6'. + */ + @JsonProperty(value = "properties.publicIPAddressVersion") + private IPVersion publicIPAddressVersion; + + /** + * The list of tags associated with the public IP prefix. + */ + @JsonProperty(value = "properties.ipTags") + private List ipTags; + + /** + * The Length of the Public IP Prefix. + */ + @JsonProperty(value = "properties.prefixLength") + private Integer prefixLength; + + /** + * The allocated Prefix. + */ + @JsonProperty(value = "properties.ipPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String ipPrefix; + + /** + * The list of all referenced PublicIPAddresses. + */ + @JsonProperty(value = "properties.publicIPAddresses", access = JsonProperty.Access.WRITE_ONLY) + private List publicIPAddresses; + + /** + * The reference to load balancer frontend IP configuration associated with + * the public IP prefix. + */ + @JsonProperty(value = "properties.loadBalancerFrontendIpConfiguration", access = JsonProperty.Access.WRITE_ONLY) + private SubResource loadBalancerFrontendIpConfiguration; + + /** + * The resource GUID property of the public IP prefix resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the public IP prefix resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * A list of availability zones denoting the IP allocated for the resource + * needs to come from. + */ + @JsonProperty(value = "zones") + private List zones; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the public IP prefix SKU. + * + * @return the sku value + */ + public PublicIPPrefixSku sku() { + return this.sku; + } + + /** + * Set the public IP prefix SKU. + * + * @param sku the sku value to set + * @return the PublicIPPrefixInner object itself. + */ + public PublicIPPrefixInner withSku(PublicIPPrefixSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the public IP address version. Possible values include: 'IPv4', 'IPv6'. + * + * @return the publicIPAddressVersion value + */ + public IPVersion publicIPAddressVersion() { + return this.publicIPAddressVersion; + } + + /** + * Set the public IP address version. Possible values include: 'IPv4', 'IPv6'. + * + * @param publicIPAddressVersion the publicIPAddressVersion value to set + * @return the PublicIPPrefixInner object itself. + */ + public PublicIPPrefixInner withPublicIPAddressVersion(IPVersion publicIPAddressVersion) { + this.publicIPAddressVersion = publicIPAddressVersion; + return this; + } + + /** + * Get the list of tags associated with the public IP prefix. + * + * @return the ipTags value + */ + public List ipTags() { + return this.ipTags; + } + + /** + * Set the list of tags associated with the public IP prefix. + * + * @param ipTags the ipTags value to set + * @return the PublicIPPrefixInner object itself. + */ + public PublicIPPrefixInner withIpTags(List ipTags) { + this.ipTags = ipTags; + return this; + } + + /** + * Get the Length of the Public IP Prefix. + * + * @return the prefixLength value + */ + public Integer prefixLength() { + return this.prefixLength; + } + + /** + * Set the Length of the Public IP Prefix. + * + * @param prefixLength the prefixLength value to set + * @return the PublicIPPrefixInner object itself. + */ + public PublicIPPrefixInner withPrefixLength(Integer prefixLength) { + this.prefixLength = prefixLength; + return this; + } + + /** + * Get the allocated Prefix. + * + * @return the ipPrefix value + */ + public String ipPrefix() { + return this.ipPrefix; + } + + /** + * Get the list of all referenced PublicIPAddresses. + * + * @return the publicIPAddresses value + */ + public List publicIPAddresses() { + return this.publicIPAddresses; + } + + /** + * Get the reference to load balancer frontend IP configuration associated with the public IP prefix. + * + * @return the loadBalancerFrontendIpConfiguration value + */ + public SubResource loadBalancerFrontendIpConfiguration() { + return this.loadBalancerFrontendIpConfiguration; + } + + /** + * Get the resource GUID property of the public IP prefix resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the public IP prefix resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get a list of availability zones denoting the IP allocated for the resource needs to come from. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set a list of availability zones denoting the IP allocated for the resource needs to come from. + * + * @param zones the zones value to set + * @return the PublicIPPrefixInner object itself. + */ + public PublicIPPrefixInner withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the PublicIPPrefixInner object itself. + */ + public PublicIPPrefixInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixesImpl.java new file mode 100644 index 000000000000..6f654aef7659 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixesImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPPrefixes; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPPrefix; +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; + +class PublicIPPrefixesImpl extends GroupableResourcesCoreImpl implements PublicIPPrefixes { + protected PublicIPPrefixesImpl(NetworkManager manager) { + super(manager.inner().publicIPPrefixes(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + PublicIPPrefixesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + PublicIPPrefixesInner 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) { + PublicIPPrefixesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + PublicIPPrefixesInner 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 PublicIPPrefix call(PublicIPPrefixInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + PublicIPPrefixesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + PublicIPPrefixesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PublicIPPrefix call(PublicIPPrefixInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PublicIPPrefixImpl define(String name) { + return wrapModel(name); + } + + @Override + protected PublicIPPrefixImpl wrapModel(PublicIPPrefixInner inner) { + return new PublicIPPrefixImpl(inner.name(), inner, manager()); + } + + @Override + protected PublicIPPrefixImpl wrapModel(String name) { + return new PublicIPPrefixImpl(name, new PublicIPPrefixInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixesInner.java new file mode 100644 index 000000000000..0fb35e7be876 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PublicIPPrefixesInner.java @@ -0,0 +1,1208 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 PublicIPPrefixes. + */ +public class PublicIPPrefixesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private PublicIPPrefixesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of PublicIPPrefixesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PublicIPPrefixesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(PublicIPPrefixesService.class); + this.client = client; + } + + /** + * The interface defining all the services for PublicIPPrefixes to be + * used by Retrofit to perform actually REST calls. + */ + interface PublicIPPrefixesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PublicIPPrefixes delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpPrefixName") String publicIpPrefixName, @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.network.v2019_09_01.PublicIPPrefixes beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpPrefixName") String publicIpPrefixName, @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.network.v2019_09_01.PublicIPPrefixes getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpPrefixName") String publicIpPrefixName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.PublicIPPrefixes createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpPrefixName") String publicIpPrefixName, @Path("subscriptionId") String subscriptionId, @Body PublicIPPrefixInner 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.network.v2019_09_01.PublicIPPrefixes beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpPrefixName") String publicIpPrefixName, @Path("subscriptionId") String subscriptionId, @Body PublicIPPrefixInner 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.network.v2019_09_01.PublicIPPrefixes updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpPrefixName") String publicIpPrefixName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PublicIPPrefixes list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes") + Observable> list(@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.network.v2019_09_01.PublicIPPrefixes listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.PublicIPPrefixes 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.network.v2019_09_01.PublicIPPrefixes listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the PublicIpPrefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 publicIpPrefixName) { + deleteWithServiceResponseAsync(resourceGroupName, publicIpPrefixName).toBlocking().last().body(); + } + + /** + * Deletes the specified public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the PublicIpPrefix. + * @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 publicIpPrefixName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, publicIpPrefixName), serviceCallback); + } + + /** + * Deletes the specified public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the PublicIpPrefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String publicIpPrefixName) { + return deleteWithServiceResponseAsync(resourceGroupName, publicIpPrefixName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the PublicIpPrefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String publicIpPrefixName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpPrefixName == null) { + throw new IllegalArgumentException("Parameter publicIpPrefixName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, publicIpPrefixName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the PublicIpPrefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 publicIpPrefixName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, publicIpPrefixName).toBlocking().single().body(); + } + + /** + * Deletes the specified public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the PublicIpPrefix. + * @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 publicIpPrefixName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, publicIpPrefixName), serviceCallback); + } + + /** + * Deletes the specified public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the PublicIpPrefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String publicIpPrefixName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, publicIpPrefixName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the PublicIpPrefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String publicIpPrefixName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpPrefixName == null) { + throw new IllegalArgumentException("Parameter publicIpPrefixName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, publicIpPrefixName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified public IP prefix in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PublicIPPrefixInner object if successful. + */ + public PublicIPPrefixInner getByResourceGroup(String resourceGroupName, String publicIpPrefixName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpPrefixName).toBlocking().single().body(); + } + + /** + * Gets the specified public IP prefix in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @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 publicIpPrefixName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpPrefixName), serviceCallback); + } + + /** + * Gets the specified public IP prefix in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPPrefixInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String publicIpPrefixName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpPrefixName).map(new Func1, PublicIPPrefixInner>() { + @Override + public PublicIPPrefixInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified public IP prefix in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPPrefixInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String publicIpPrefixName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpPrefixName == null) { + throw new IllegalArgumentException("Parameter publicIpPrefixName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, publicIpPrefixName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified public IP prefix in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PublicIPPrefixInner object if successful. + */ + public PublicIPPrefixInner getByResourceGroup(String resourceGroupName, String publicIpPrefixName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified public IP prefix in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param expand Expands referenced resources. + * @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 publicIpPrefixName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, expand), serviceCallback); + } + + /** + * Gets the specified public IP prefix in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPPrefixInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String publicIpPrefixName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, expand).map(new Func1, PublicIPPrefixInner>() { + @Override + public PublicIPPrefixInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified public IP prefix in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPPrefixInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String publicIpPrefixName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpPrefixName == null) { + throw new IllegalArgumentException("Parameter publicIpPrefixName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, publicIpPrefixName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Creates or updates a static or dynamic public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param parameters Parameters supplied to the create or update public IP prefix 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 PublicIPPrefixInner object if successful. + */ + public PublicIPPrefixInner createOrUpdate(String resourceGroupName, String publicIpPrefixName, PublicIPPrefixInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a static or dynamic public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param parameters Parameters supplied to the create or update public IP prefix 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 createOrUpdateAsync(String resourceGroupName, String publicIpPrefixName, PublicIPPrefixInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, parameters), serviceCallback); + } + + /** + * Creates or updates a static or dynamic public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param parameters Parameters supplied to the create or update public IP prefix operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String publicIpPrefixName, PublicIPPrefixInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, parameters).map(new Func1, PublicIPPrefixInner>() { + @Override + public PublicIPPrefixInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a static or dynamic public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param parameters Parameters supplied to the create or update public IP prefix operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String publicIpPrefixName, PublicIPPrefixInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpPrefixName == null) { + throw new IllegalArgumentException("Parameter publicIpPrefixName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, publicIpPrefixName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a static or dynamic public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param parameters Parameters supplied to the create or update public IP prefix 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 PublicIPPrefixInner object if successful. + */ + public PublicIPPrefixInner beginCreateOrUpdate(String resourceGroupName, String publicIpPrefixName, PublicIPPrefixInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a static or dynamic public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param parameters Parameters supplied to the create or update public IP prefix 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 beginCreateOrUpdateAsync(String resourceGroupName, String publicIpPrefixName, PublicIPPrefixInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, parameters), serviceCallback); + } + + /** + * Creates or updates a static or dynamic public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param parameters Parameters supplied to the create or update public IP prefix operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPPrefixInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String publicIpPrefixName, PublicIPPrefixInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, parameters).map(new Func1, PublicIPPrefixInner>() { + @Override + public PublicIPPrefixInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a static or dynamic public IP prefix. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param parameters Parameters supplied to the create or update public IP prefix operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPPrefixInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String publicIpPrefixName, PublicIPPrefixInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpPrefixName == null) { + throw new IllegalArgumentException("Parameter publicIpPrefixName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, publicIpPrefixName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 public IP prefix tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PublicIPPrefixInner object if successful. + */ + public PublicIPPrefixInner updateTags(String resourceGroupName, String publicIpPrefixName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpPrefixName).toBlocking().single().body(); + } + + /** + * Updates public IP prefix tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @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 updateTagsAsync(String resourceGroupName, String publicIpPrefixName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, publicIpPrefixName), serviceCallback); + } + + /** + * Updates public IP prefix tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPPrefixInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String publicIpPrefixName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpPrefixName).map(new Func1, PublicIPPrefixInner>() { + @Override + public PublicIPPrefixInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates public IP prefix tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPPrefixInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String publicIpPrefixName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpPrefixName == null) { + throw new IllegalArgumentException("Parameter publicIpPrefixName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, publicIpPrefixName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates public IP prefix tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PublicIPPrefixInner object if successful. + */ + public PublicIPPrefixInner updateTags(String resourceGroupName, String publicIpPrefixName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, tags).toBlocking().single().body(); + } + + /** + * Updates public IP prefix tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String publicIpPrefixName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, tags), serviceCallback); + } + + /** + * Updates public IP prefix tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPPrefixInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String publicIpPrefixName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, tags).map(new Func1, PublicIPPrefixInner>() { + @Override + public PublicIPPrefixInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates public IP prefix tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpPrefixName The name of the public IP prefix. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPPrefixInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String publicIpPrefixName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpPrefixName == null) { + throw new IllegalArgumentException("Parameter publicIpPrefixName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, publicIpPrefixName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all the public IP prefixes in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<PublicIPPrefixInner> 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 all the public IP prefixes in a subscription. + * + * @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 all the public IP prefixes in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicIPPrefixInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the public IP prefixes in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicIPPrefixInner> 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 all the public IP prefixes in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicIPPrefixInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all public IP prefixes in a resource group. + * + * @param resourceGroupName The name of the 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<PublicIPPrefixInner> 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 all public IP prefixes in a resource group. + * + * @param resourceGroupName The name of the 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 all public IP prefixes in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicIPPrefixInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all public IP prefixes in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicIPPrefixInner> 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 all public IP prefixes in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicIPPrefixInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all the public IP prefixes in a subscription. + * + * @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<PublicIPPrefixInner> 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 all the public IP prefixes in a subscription. + * + * @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 all the public IP prefixes in a subscription. + * + * @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<PublicIPPrefixInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the public IP prefixes in a subscription. + * + * @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<PublicIPPrefixInner> 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 all the public IP prefixes in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicIPPrefixInner> 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 all public IP prefixes in a resource group. + * + * @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<PublicIPPrefixInner> 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 all public IP prefixes in a resource group. + * + * @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 all public IP prefixes in a resource group. + * + * @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<PublicIPPrefixInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all public IP prefixes in a resource group. + * + * @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<PublicIPPrefixInner> 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 all public IP prefixes in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicIPPrefixInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinkInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinkInner.java new file mode 100644 index 000000000000..2abdc65a983e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinkInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * ResourceNavigationLink resource. + */ +@JsonFlatten +public class ResourceNavigationLinkInner extends SubResource { + /** + * Resource type of the linked resource. + */ + @JsonProperty(value = "properties.linkedResourceType") + private String linkedResourceType; + + /** + * Link to the external resource. + */ + @JsonProperty(value = "properties.link") + private String link; + + /** + * The provisioning state of the resource navigation link resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of the resource that is unique within a resource group. This name + * can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get resource type of the linked resource. + * + * @return the linkedResourceType value + */ + public String linkedResourceType() { + return this.linkedResourceType; + } + + /** + * Set resource type of the linked resource. + * + * @param linkedResourceType the linkedResourceType value to set + * @return the ResourceNavigationLinkInner object itself. + */ + public ResourceNavigationLinkInner withLinkedResourceType(String linkedResourceType) { + this.linkedResourceType = linkedResourceType; + return this; + } + + /** + * Get link to the external resource. + * + * @return the link value + */ + public String link() { + return this.link; + } + + /** + * Set link to the external resource. + * + * @param link the link value to set + * @return the ResourceNavigationLinkInner object itself. + */ + public ResourceNavigationLinkInner withLink(String link) { + this.link = link; + return this; + } + + /** + * Get the provisioning state of the resource navigation link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the ResourceNavigationLinkInner object itself. + */ + public ResourceNavigationLinkInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksImpl.java new file mode 100644 index 000000000000..ae90c8b20447 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ResourceNavigationLinks; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ResourceNavigationLinksListResult; + +class ResourceNavigationLinksImpl extends WrapperImpl implements ResourceNavigationLinks { + private final NetworkManager manager; + + ResourceNavigationLinksImpl(NetworkManager manager) { + super(manager.inner().resourceNavigationLinks()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + ResourceNavigationLinksInner client = this.inner(); + return client.listAsync(resourceGroupName, virtualNetworkName, subnetName) + .map(new Func1() { + @Override + public ResourceNavigationLinksListResult call(ResourceNavigationLinksListResultInner inner) { + return new ResourceNavigationLinksListResultImpl(inner, manager()); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksInner.java new file mode 100644 index 000000000000..a3df36c1ad5a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksInner.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.network.v2019_09_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 ResourceNavigationLinks. + */ +public class ResourceNavigationLinksInner { + /** The Retrofit service to perform REST calls. */ + private ResourceNavigationLinksService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ResourceNavigationLinksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ResourceNavigationLinksInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ResourceNavigationLinksService.class); + this.client = client; + } + + /** + * The interface defining all the services for ResourceNavigationLinks to be + * used by Retrofit to perform actually REST calls. + */ + interface ResourceNavigationLinksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ResourceNavigationLinks list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ResourceNavigationLinks") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subnetName") String subnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of resource navigation links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ResourceNavigationLinksListResultInner object if successful. + */ + public ResourceNavigationLinksListResultInner list(String resourceGroupName, String virtualNetworkName, String subnetName) { + return listWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().single().body(); + } + + /** + * Gets a list of resource navigation links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @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(String resourceGroupName, String virtualNetworkName, String subnetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName), serviceCallback); + } + + /** + * Gets a list of resource navigation links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResourceNavigationLinksListResultInner object + */ + public Observable listAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + return listWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).map(new Func1, ResourceNavigationLinksListResultInner>() { + @Override + public ResourceNavigationLinksListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a list of resource navigation links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResourceNavigationLinksListResultInner object + */ + public Observable> listWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksListResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksListResultImpl.java new file mode 100644 index 000000000000..253d8c5cde16 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksListResultImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ResourceNavigationLinksListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class ResourceNavigationLinksListResultImpl extends WrapperImpl implements ResourceNavigationLinksListResult { + private final NetworkManager manager; + ResourceNavigationLinksListResultImpl(ResourceNavigationLinksListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksListResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksListResultInner.java new file mode 100644 index 000000000000..1d872d9b390f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ResourceNavigationLinksListResultInner.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for ResourceNavigationLinks_List operation. + */ +public class ResourceNavigationLinksListResultInner { + /** + * The resource navigation links in a subnet. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the resource navigation links in a subnet. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the resource navigation links in a subnet. + * + * @param value the value value to set + * @return the ResourceNavigationLinksListResultInner object itself. + */ + public ResourceNavigationLinksListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterImpl.java new file mode 100644 index 000000000000..a97c413feffb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.RouteFilter; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeering; +import com.microsoft.azure.management.network.v2019_09_01.RouteFilterRule; + +class RouteFilterImpl extends GroupableResourceCoreImpl implements RouteFilter, RouteFilter.Definition, RouteFilter.Update { + RouteFilterImpl(String name, RouteFilterInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + RouteFiltersInner client = this.manager().inner().routeFilters(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + RouteFiltersInner client = this.manager().inner().routeFilters(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + RouteFiltersInner client = this.manager().inner().routeFilters(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List ipv6Peerings() { + List lst = new ArrayList(); + if (this.inner().ipv6Peerings() != null) { + for (ExpressRouteCircuitPeeringInner inner : this.inner().ipv6Peerings()) { + lst.add( new ExpressRouteCircuitPeeringImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List peerings() { + List lst = new ArrayList(); + if (this.inner().peerings() != null) { + for (ExpressRouteCircuitPeeringInner inner : this.inner().peerings()) { + lst.add( new ExpressRouteCircuitPeeringImpl(inner, manager())); + } + } + return lst; + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public List rules() { + List lst = new ArrayList(); + if (this.inner().rules() != null) { + for (RouteFilterRuleInner inner : this.inner().rules()) { + lst.add( new RouteFilterRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public RouteFilterImpl withRules(List rules) { + this.inner().withRules(rules); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterInner.java new file mode 100644 index 000000000000..006a1be46459 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Route Filter Resource. + */ +@JsonFlatten +@SkipParentValidation +public class RouteFilterInner extends Resource { + /** + * Collection of RouteFilterRules contained within a route filter. + */ + @JsonProperty(value = "properties.rules") + private List rules; + + /** + * A collection of references to express route circuit peerings. + */ + @JsonProperty(value = "properties.peerings", access = JsonProperty.Access.WRITE_ONLY) + private List peerings; + + /** + * A collection of references to express route circuit ipv6 peerings. + */ + @JsonProperty(value = "properties.ipv6Peerings", access = JsonProperty.Access.WRITE_ONLY) + private List ipv6Peerings; + + /** + * The provisioning state of the route filter resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get collection of RouteFilterRules contained within a route filter. + * + * @return the rules value + */ + public List rules() { + return this.rules; + } + + /** + * Set collection of RouteFilterRules contained within a route filter. + * + * @param rules the rules value to set + * @return the RouteFilterInner object itself. + */ + public RouteFilterInner withRules(List rules) { + this.rules = rules; + return this; + } + + /** + * Get a collection of references to express route circuit peerings. + * + * @return the peerings value + */ + public List peerings() { + return this.peerings; + } + + /** + * Get a collection of references to express route circuit ipv6 peerings. + * + * @return the ipv6Peerings value + */ + public List ipv6Peerings() { + return this.ipv6Peerings; + } + + /** + * Get the provisioning state of the route filter resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the RouteFilterInner object itself. + */ + public RouteFilterInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRuleImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRuleImpl.java new file mode 100644 index 000000000000..9b13bcd8d677 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRuleImpl.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.RouteFilterRule; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.Access; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class RouteFilterRuleImpl extends CreatableUpdatableImpl implements RouteFilterRule, RouteFilterRule.Definition, RouteFilterRule.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String routeFilterName; + private String ruleName; + + RouteFilterRuleImpl(String name, NetworkManager manager) { + super(name, new RouteFilterRuleInner()); + this.manager = manager; + // Set resource name + this.ruleName = name; + // + } + + RouteFilterRuleImpl(RouteFilterRuleInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.ruleName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.routeFilterName = IdParsingUtils.getValueFromIdByName(inner.id(), "routeFilters"); + this.ruleName = IdParsingUtils.getValueFromIdByName(inner.id(), "routeFilterRules"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + RouteFilterRulesInner client = this.manager().inner().routeFilterRules(); + return client.createOrUpdateAsync(this.resourceGroupName, this.routeFilterName, this.ruleName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + RouteFilterRulesInner client = this.manager().inner().routeFilterRules(); + return client.createOrUpdateAsync(this.resourceGroupName, this.routeFilterName, this.ruleName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + RouteFilterRulesInner client = this.manager().inner().routeFilterRules(); + return client.getAsync(this.resourceGroupName, this.routeFilterName, this.ruleName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Access access() { + return this.inner().access(); + } + + @Override + public List communities() { + return this.inner().communities(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @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 ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String routeFilterRuleType() { + return this.inner().routeFilterRuleType(); + } + + @Override + public RouteFilterRuleImpl withExistingRouteFilter(String resourceGroupName, String routeFilterName) { + this.resourceGroupName = resourceGroupName; + this.routeFilterName = routeFilterName; + return this; + } + + @Override + public RouteFilterRuleImpl withAccess(Access access) { + this.inner().withAccess(access); + return this; + } + + @Override + public RouteFilterRuleImpl withCommunities(List communities) { + this.inner().withCommunities(communities); + return this; + } + + @Override + public RouteFilterRuleImpl withRouteFilterRuleType(String routeFilterRuleType) { + this.inner().withRouteFilterRuleType(routeFilterRuleType); + return this; + } + + @Override + public RouteFilterRuleImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public RouteFilterRuleImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + + @Override + public RouteFilterRuleImpl withName(String name) { + this.inner().withName(name); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRuleInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRuleInner.java new file mode 100644 index 000000000000..8886e1bf1c0c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRuleInner.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.Access; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Route Filter Rule Resource. + */ +@JsonFlatten +public class RouteFilterRuleInner extends SubResource { + /** + * The access type of the rule. Possible values include: 'Allow', 'Deny'. + */ + @JsonProperty(value = "properties.access", required = true) + private Access access; + + /** + * The rule type of the rule. + */ + @JsonProperty(value = "properties.routeFilterRuleType", required = true) + private String routeFilterRuleType; + + /** + * The collection for bgp community values to filter on. e.g. + * ['12076:5010','12076:5020']. + */ + @JsonProperty(value = "properties.communities", required = true) + private List communities; + + /** + * The provisioning state of the route filter rule resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Creates an instance of RouteFilterRuleInner class. + * @param access the access type of the rule. Possible values include: 'Allow', 'Deny'. + * @param communities the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. + */ + public RouteFilterRuleInner() { + routeFilterRuleType = "Community"; + } + + /** + * Get the access type of the rule. Possible values include: 'Allow', 'Deny'. + * + * @return the access value + */ + public Access access() { + return this.access; + } + + /** + * Set the access type of the rule. Possible values include: 'Allow', 'Deny'. + * + * @param access the access value to set + * @return the RouteFilterRuleInner object itself. + */ + public RouteFilterRuleInner withAccess(Access access) { + this.access = access; + return this; + } + + /** + * Get the rule type of the rule. + * + * @return the routeFilterRuleType value + */ + public String routeFilterRuleType() { + return this.routeFilterRuleType; + } + + /** + * Set the rule type of the rule. + * + * @param routeFilterRuleType the routeFilterRuleType value to set + * @return the RouteFilterRuleInner object itself. + */ + public RouteFilterRuleInner withRouteFilterRuleType(String routeFilterRuleType) { + this.routeFilterRuleType = routeFilterRuleType; + return this; + } + + /** + * Get the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. + * + * @return the communities value + */ + public List communities() { + return this.communities; + } + + /** + * Set the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. + * + * @param communities the communities value to set + * @return the RouteFilterRuleInner object itself. + */ + public RouteFilterRuleInner withCommunities(List communities) { + this.communities = communities; + return this; + } + + /** + * Get the provisioning state of the route filter rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the RouteFilterRuleInner object itself. + */ + public RouteFilterRuleInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get resource location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource location. + * + * @param location the location value to set + * @return the RouteFilterRuleInner object itself. + */ + public RouteFilterRuleInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRulesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRulesImpl.java new file mode 100644 index 000000000000..3cf808d2de73 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRulesImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.RouteFilterRules; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.RouteFilterRule; + +class RouteFilterRulesImpl extends WrapperImpl implements RouteFilterRules { + private final NetworkManager manager; + + RouteFilterRulesImpl(NetworkManager manager) { + super(manager.inner().routeFilterRules()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public RouteFilterRuleImpl define(String name) { + return wrapModel(name); + } + + private RouteFilterRuleImpl wrapModel(RouteFilterRuleInner inner) { + return new RouteFilterRuleImpl(inner, manager()); + } + + private RouteFilterRuleImpl wrapModel(String name) { + return new RouteFilterRuleImpl(name, this.manager()); + } + + @Override + public Observable listByRouteFilterAsync(final String resourceGroupName, final String routeFilterName) { + RouteFilterRulesInner client = this.inner(); + return client.listByRouteFilterAsync(resourceGroupName, routeFilterName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public RouteFilterRule call(RouteFilterRuleInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String routeFilterName, String ruleName) { + RouteFilterRulesInner client = this.inner(); + return client.getAsync(resourceGroupName, routeFilterName, ruleName) + .flatMap(new Func1>() { + @Override + public Observable call(RouteFilterRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((RouteFilterRule)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String routeFilterName, String ruleName) { + RouteFilterRulesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, routeFilterName, ruleName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRulesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRulesInner.java new file mode 100644 index 000000000000..34e85373106f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFilterRulesInner.java @@ -0,0 +1,764 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 RouteFilterRules. + */ +public class RouteFilterRulesInner { + /** The Retrofit service to perform REST calls. */ + private RouteFilterRulesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of RouteFilterRulesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public RouteFilterRulesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(RouteFilterRulesService.class); + this.client = client; + } + + /** + * The interface defining all the services for RouteFilterRules to be + * used by Retrofit to perform actually REST calls. + */ + interface RouteFilterRulesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.RouteFilterRules delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("routeFilterName") String routeFilterName, @Path("ruleName") String ruleName, @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.network.v2019_09_01.RouteFilterRules beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("routeFilterName") String routeFilterName, @Path("ruleName") String ruleName, @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.network.v2019_09_01.RouteFilterRules get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("routeFilterName") String routeFilterName, @Path("ruleName") String ruleName, @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.network.v2019_09_01.RouteFilterRules createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("routeFilterName") String routeFilterName, @Path("ruleName") String ruleName, @Path("subscriptionId") String subscriptionId, @Body RouteFilterRuleInner routeFilterRuleParameters, @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.network.v2019_09_01.RouteFilterRules beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("routeFilterName") String routeFilterName, @Path("ruleName") String ruleName, @Path("subscriptionId") String subscriptionId, @Body RouteFilterRuleInner routeFilterRuleParameters, @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.network.v2019_09_01.RouteFilterRules listByRouteFilter" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules") + Observable> listByRouteFilter(@Path("resourceGroupName") String resourceGroupName, @Path("routeFilterName") String routeFilterName, @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.network.v2019_09_01.RouteFilterRules listByRouteFilterNext" }) + @GET + Observable> listByRouteFilterNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the 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 + */ + public void delete(String resourceGroupName, String routeFilterName, String ruleName) { + deleteWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName).toBlocking().last().body(); + } + + /** + * Deletes the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the 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 deleteAsync(String resourceGroupName, String routeFilterName, String ruleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName), serviceCallback); + } + + /** + * Deletes the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String routeFilterName, String ruleName) { + return deleteWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String routeFilterName, String ruleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName is required and cannot be null."); + } + if (ruleName == null) { + throw new IllegalArgumentException("Parameter ruleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the 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 + */ + public void beginDelete(String resourceGroupName, String routeFilterName, String ruleName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName).toBlocking().single().body(); + } + + /** + * Deletes the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the 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 beginDeleteAsync(String resourceGroupName, String routeFilterName, String ruleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName), serviceCallback); + } + + /** + * Deletes the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String routeFilterName, String ruleName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String routeFilterName, String ruleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName is required and cannot be null."); + } + if (ruleName == null) { + throw new IllegalArgumentException("Parameter ruleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the 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 RouteFilterRuleInner object if successful. + */ + public RouteFilterRuleInner get(String resourceGroupName, String routeFilterName, String ruleName) { + return getWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName).toBlocking().single().body(); + } + + /** + * Gets the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the 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 getAsync(String resourceGroupName, String routeFilterName, String ruleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName), serviceCallback); + } + + /** + * Gets the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterRuleInner object + */ + public Observable getAsync(String resourceGroupName, String routeFilterName, String ruleName) { + return getWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName).map(new Func1, RouteFilterRuleInner>() { + @Override + public RouteFilterRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified rule from a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterRuleInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String routeFilterName, String ruleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName is required and cannot be null."); + } + if (ruleName == null) { + throw new IllegalArgumentException("Parameter ruleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates a route in the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the route filter rule. + * @param routeFilterRuleParameters Parameters supplied to the create or update route filter rule 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 RouteFilterRuleInner object if successful. + */ + public RouteFilterRuleInner createOrUpdate(String resourceGroupName, String routeFilterName, String ruleName, RouteFilterRuleInner routeFilterRuleParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a route in the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the route filter rule. + * @param routeFilterRuleParameters Parameters supplied to the create or update route filter rule 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 createOrUpdateAsync(String resourceGroupName, String routeFilterName, String ruleName, RouteFilterRuleInner routeFilterRuleParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters), serviceCallback); + } + + /** + * Creates or updates a route in the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the route filter rule. + * @param routeFilterRuleParameters Parameters supplied to the create or update route filter rule operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String routeFilterName, String ruleName, RouteFilterRuleInner routeFilterRuleParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters).map(new Func1, RouteFilterRuleInner>() { + @Override + public RouteFilterRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a route in the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the route filter rule. + * @param routeFilterRuleParameters Parameters supplied to the create or update route filter rule operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String routeFilterName, String ruleName, RouteFilterRuleInner routeFilterRuleParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName is required and cannot be null."); + } + if (ruleName == null) { + throw new IllegalArgumentException("Parameter ruleName 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 (routeFilterRuleParameters == null) { + throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); + } + Validator.validate(routeFilterRuleParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a route in the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the route filter rule. + * @param routeFilterRuleParameters Parameters supplied to the create or update route filter rule 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 RouteFilterRuleInner object if successful. + */ + public RouteFilterRuleInner beginCreateOrUpdate(String resourceGroupName, String routeFilterName, String ruleName, RouteFilterRuleInner routeFilterRuleParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a route in the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the route filter rule. + * @param routeFilterRuleParameters Parameters supplied to the create or update route filter rule 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 beginCreateOrUpdateAsync(String resourceGroupName, String routeFilterName, String ruleName, RouteFilterRuleInner routeFilterRuleParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters), serviceCallback); + } + + /** + * Creates or updates a route in the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the route filter rule. + * @param routeFilterRuleParameters Parameters supplied to the create or update route filter rule operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterRuleInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String routeFilterName, String ruleName, RouteFilterRuleInner routeFilterRuleParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters).map(new Func1, RouteFilterRuleInner>() { + @Override + public RouteFilterRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a route in the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param ruleName The name of the route filter rule. + * @param routeFilterRuleParameters Parameters supplied to the create or update route filter rule operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterRuleInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String routeFilterName, String ruleName, RouteFilterRuleInner routeFilterRuleParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName is required and cannot be null."); + } + if (ruleName == null) { + throw new IllegalArgumentException("Parameter ruleName 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 (routeFilterRuleParameters == null) { + throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); + } + Validator.validate(routeFilterRuleParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 all RouteFilterRules in a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<RouteFilterRuleInner> object if successful. + */ + public PagedList listByRouteFilter(final String resourceGroupName, final String routeFilterName) { + ServiceResponse> response = listByRouteFilterSinglePageAsync(resourceGroupName, routeFilterName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByRouteFilterNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all RouteFilterRules in a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @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> listByRouteFilterAsync(final String resourceGroupName, final String routeFilterName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByRouteFilterSinglePageAsync(resourceGroupName, routeFilterName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByRouteFilterNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all RouteFilterRules in a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RouteFilterRuleInner> object + */ + public Observable> listByRouteFilterAsync(final String resourceGroupName, final String routeFilterName) { + return listByRouteFilterWithServiceResponseAsync(resourceGroupName, routeFilterName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all RouteFilterRules in a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RouteFilterRuleInner> object + */ + public Observable>> listByRouteFilterWithServiceResponseAsync(final String resourceGroupName, final String routeFilterName) { + return listByRouteFilterSinglePageAsync(resourceGroupName, routeFilterName) + .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(listByRouteFilterNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all RouteFilterRules in a route filter. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RouteFilterRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByRouteFilterSinglePageAsync(final String resourceGroupName, final String routeFilterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listByRouteFilter(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByRouteFilterDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByRouteFilterDelegate(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 all RouteFilterRules in a route filter. + * + * @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<RouteFilterRuleInner> object if successful. + */ + public PagedList listByRouteFilterNext(final String nextPageLink) { + ServiceResponse> response = listByRouteFilterNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByRouteFilterNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all RouteFilterRules in a route filter. + * + * @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> listByRouteFilterNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByRouteFilterNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByRouteFilterNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all RouteFilterRules in a route filter. + * + * @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<RouteFilterRuleInner> object + */ + public Observable> listByRouteFilterNextAsync(final String nextPageLink) { + return listByRouteFilterNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all RouteFilterRules in a route filter. + * + * @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<RouteFilterRuleInner> object + */ + public Observable>> listByRouteFilterNextWithServiceResponseAsync(final String nextPageLink) { + return listByRouteFilterNextSinglePageAsync(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(listByRouteFilterNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all RouteFilterRules in a route filter. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RouteFilterRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByRouteFilterNextSinglePageAsync(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.listByRouteFilterNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByRouteFilterNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByRouteFilterNextDelegate(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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFiltersImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFiltersImpl.java new file mode 100644 index 000000000000..a49cee8fabfe --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFiltersImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.RouteFilters; +import com.microsoft.azure.management.network.v2019_09_01.RouteFilter; +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; + +class RouteFiltersImpl extends GroupableResourcesCoreImpl implements RouteFilters { + protected RouteFiltersImpl(NetworkManager manager) { + super(manager.inner().routeFilters(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + RouteFiltersInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + RouteFiltersInner 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) { + RouteFiltersInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + RouteFiltersInner 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 RouteFilter call(RouteFilterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + RouteFiltersInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + RouteFiltersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public RouteFilter call(RouteFilterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public RouteFilterImpl define(String name) { + return wrapModel(name); + } + + @Override + protected RouteFilterImpl wrapModel(RouteFilterInner inner) { + return new RouteFilterImpl(inner.name(), inner, manager()); + } + + @Override + protected RouteFilterImpl wrapModel(String name) { + return new RouteFilterImpl(name, new RouteFilterInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFiltersInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFiltersInner.java new file mode 100644 index 000000000000..6a2bcef79b5c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteFiltersInner.java @@ -0,0 +1,1208 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 RouteFilters. + */ +public class RouteFiltersInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private RouteFiltersService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of RouteFiltersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public RouteFiltersInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(RouteFiltersService.class); + this.client = client; + } + + /** + * The interface defining all the services for RouteFilters to be + * used by Retrofit to perform actually REST calls. + */ + interface RouteFiltersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.RouteFilters delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("routeFilterName") String routeFilterName, @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.network.v2019_09_01.RouteFilters beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("routeFilterName") String routeFilterName, @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.network.v2019_09_01.RouteFilters getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("routeFilterName") String routeFilterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.RouteFilters createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("routeFilterName") String routeFilterName, @Path("subscriptionId") String subscriptionId, @Body RouteFilterInner routeFilterParameters, @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.network.v2019_09_01.RouteFilters beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("routeFilterName") String routeFilterName, @Path("subscriptionId") String subscriptionId, @Body RouteFilterInner routeFilterParameters, @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.network.v2019_09_01.RouteFilters updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("routeFilterName") String routeFilterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.RouteFilters listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.RouteFilters list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters") + Observable> list(@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.network.v2019_09_01.RouteFilters 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.network.v2019_09_01.RouteFilters listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 routeFilterName) { + deleteWithServiceResponseAsync(resourceGroupName, routeFilterName).toBlocking().last().body(); + } + + /** + * Deletes the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @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 routeFilterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, routeFilterName), serviceCallback); + } + + /** + * Deletes the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String routeFilterName) { + return deleteWithServiceResponseAsync(resourceGroupName, routeFilterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String routeFilterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 routeFilterName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, routeFilterName).toBlocking().single().body(); + } + + /** + * Deletes the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @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 routeFilterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, routeFilterName), serviceCallback); + } + + /** + * Deletes the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String routeFilterName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, routeFilterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String routeFilterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, routeFilterName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 RouteFilterInner object if successful. + */ + public RouteFilterInner getByResourceGroup(String resourceGroupName, String routeFilterName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeFilterName).toBlocking().single().body(); + } + + /** + * Gets the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @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 routeFilterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeFilterName), serviceCallback); + } + + /** + * Gets the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String routeFilterName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeFilterName).map(new Func1, RouteFilterInner>() { + @Override + public RouteFilterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String routeFilterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param expand Expands referenced express route bgp peering resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 RouteFilterInner object if successful. + */ + public RouteFilterInner getByResourceGroup(String resourceGroupName, String routeFilterName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeFilterName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param expand Expands referenced express route bgp peering resources. + * @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 routeFilterName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeFilterName, expand), serviceCallback); + } + + /** + * Gets the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param expand Expands referenced express route bgp peering resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String routeFilterName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeFilterName, expand).map(new Func1, RouteFilterInner>() { + @Override + public RouteFilterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param expand Expands referenced express route bgp peering resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String routeFilterName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Creates or updates a route filter in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param routeFilterParameters Parameters supplied to the create or update route filter 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 RouteFilterInner object if successful. + */ + public RouteFilterInner createOrUpdate(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, routeFilterParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a route filter in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param routeFilterParameters Parameters supplied to the create or update route filter 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 createOrUpdateAsync(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, routeFilterParameters), serviceCallback); + } + + /** + * Creates or updates a route filter in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param routeFilterParameters Parameters supplied to the create or update route filter operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, routeFilterParameters).map(new Func1, RouteFilterInner>() { + @Override + public RouteFilterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a route filter in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param routeFilterParameters Parameters supplied to the create or update route filter operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName 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 (routeFilterParameters == null) { + throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); + } + Validator.validate(routeFilterParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a route filter in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param routeFilterParameters Parameters supplied to the create or update route filter 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 RouteFilterInner object if successful. + */ + public RouteFilterInner beginCreateOrUpdate(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, routeFilterParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a route filter in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param routeFilterParameters Parameters supplied to the create or update route filter 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 beginCreateOrUpdateAsync(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, routeFilterParameters), serviceCallback); + } + + /** + * Creates or updates a route filter in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param routeFilterParameters Parameters supplied to the create or update route filter operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, routeFilterParameters).map(new Func1, RouteFilterInner>() { + @Override + public RouteFilterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a route filter in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param routeFilterParameters Parameters supplied to the create or update route filter operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName 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 (routeFilterParameters == null) { + throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); + } + Validator.validate(routeFilterParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 tags of a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 RouteFilterInner object if successful. + */ + public RouteFilterInner updateTags(String resourceGroupName, String routeFilterName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, routeFilterName).toBlocking().single().body(); + } + + /** + * Updates tags of a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @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 updateTagsAsync(String resourceGroupName, String routeFilterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, routeFilterName), serviceCallback); + } + + /** + * Updates tags of a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String routeFilterName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, routeFilterName).map(new Func1, RouteFilterInner>() { + @Override + public RouteFilterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags of a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String routeFilterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates tags of a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 RouteFilterInner object if successful. + */ + public RouteFilterInner updateTags(String resourceGroupName, String routeFilterName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, routeFilterName, tags).toBlocking().single().body(); + } + + /** + * Updates tags of a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String routeFilterName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, routeFilterName, tags), serviceCallback); + } + + /** + * Updates tags of a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String routeFilterName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, routeFilterName, tags).map(new Func1, RouteFilterInner>() { + @Override + public RouteFilterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags of a route filter. + * + * @param resourceGroupName The name of the resource group. + * @param routeFilterName The name of the route filter. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteFilterInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String routeFilterName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeFilterName == null) { + throw new IllegalArgumentException("Parameter routeFilterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all route filters in a resource group. + * + * @param resourceGroupName The name of the 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<RouteFilterInner> 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 all route filters in a resource group. + * + * @param resourceGroupName The name of the 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 all route filters in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RouteFilterInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all route filters in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RouteFilterInner> 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 all route filters in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RouteFilterInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all route filters in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<RouteFilterInner> 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 all route filters in a subscription. + * + * @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 all route filters in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RouteFilterInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all route filters in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RouteFilterInner> 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 all route filters in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RouteFilterInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all route filters in a resource group. + * + * @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<RouteFilterInner> 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 all route filters in a resource group. + * + * @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 all route filters in a resource group. + * + * @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<RouteFilterInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all route filters in a resource group. + * + * @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<RouteFilterInner> 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 all route filters in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RouteFilterInner> 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 all route filters in a subscription. + * + * @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<RouteFilterInner> 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 all route filters in a subscription. + * + * @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 all route filters in a subscription. + * + * @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<RouteFilterInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all route filters in a subscription. + * + * @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<RouteFilterInner> 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 all route filters in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RouteFilterInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteImpl.java new file mode 100644 index 000000000000..89b0a5dab6c6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.Route; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.RouteNextHopType; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class RouteImpl extends CreatableUpdatableImpl implements Route, Route.Definition, Route.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String routeTableName; + private String routeName; + + RouteImpl(String name, NetworkManager manager) { + super(name, new RouteInner()); + this.manager = manager; + // Set resource name + this.routeName = name; + // + } + + RouteImpl(RouteInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.routeName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.routeTableName = IdParsingUtils.getValueFromIdByName(inner.id(), "routeTables"); + this.routeName = IdParsingUtils.getValueFromIdByName(inner.id(), "routes"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + RoutesInner client = this.manager().inner().routes(); + return client.createOrUpdateAsync(this.resourceGroupName, this.routeTableName, this.routeName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + RoutesInner client = this.manager().inner().routes(); + return client.createOrUpdateAsync(this.resourceGroupName, this.routeTableName, this.routeName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + RoutesInner client = this.manager().inner().routes(); + return client.getAsync(this.resourceGroupName, this.routeTableName, this.routeName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String addressPrefix() { + return this.inner().addressPrefix(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String nextHopIpAddress() { + return this.inner().nextHopIpAddress(); + } + + @Override + public RouteNextHopType nextHopType() { + return this.inner().nextHopType(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public RouteImpl withExistingRouteTable(String resourceGroupName, String routeTableName) { + this.resourceGroupName = resourceGroupName; + this.routeTableName = routeTableName; + return this; + } + + @Override + public RouteImpl withNextHopType(RouteNextHopType nextHopType) { + this.inner().withNextHopType(nextHopType); + return this; + } + + @Override + public RouteImpl withAddressPrefix(String addressPrefix) { + this.inner().withAddressPrefix(addressPrefix); + return this; + } + + @Override + public RouteImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public RouteImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public RouteImpl withNextHopIpAddress(String nextHopIpAddress) { + this.inner().withNextHopIpAddress(nextHopIpAddress); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteInner.java new file mode 100644 index 000000000000..e8ce0629cb8e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteInner.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.RouteNextHopType; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Route resource. + */ +@JsonFlatten +public class RouteInner extends SubResource { + /** + * The destination CIDR to which the route applies. + */ + @JsonProperty(value = "properties.addressPrefix") + private String addressPrefix; + + /** + * The type of Azure hop the packet should be sent to. Possible values + * include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', + * 'VirtualAppliance', 'None'. + */ + @JsonProperty(value = "properties.nextHopType", required = true) + private RouteNextHopType nextHopType; + + /** + * The IP address packets should be forwarded to. Next hop values are only + * allowed in routes where the next hop type is VirtualAppliance. + */ + @JsonProperty(value = "properties.nextHopIpAddress") + private String nextHopIpAddress; + + /** + * The provisioning state of the route resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the destination CIDR to which the route applies. + * + * @return the addressPrefix value + */ + public String addressPrefix() { + return this.addressPrefix; + } + + /** + * Set the destination CIDR to which the route applies. + * + * @param addressPrefix the addressPrefix value to set + * @return the RouteInner object itself. + */ + public RouteInner withAddressPrefix(String addressPrefix) { + this.addressPrefix = addressPrefix; + return this; + } + + /** + * Get the type of Azure hop the packet should be sent to. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'. + * + * @return the nextHopType value + */ + public RouteNextHopType nextHopType() { + return this.nextHopType; + } + + /** + * Set the type of Azure hop the packet should be sent to. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'. + * + * @param nextHopType the nextHopType value to set + * @return the RouteInner object itself. + */ + public RouteInner withNextHopType(RouteNextHopType nextHopType) { + this.nextHopType = nextHopType; + return this; + } + + /** + * Get the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. + * + * @return the nextHopIpAddress value + */ + public String nextHopIpAddress() { + return this.nextHopIpAddress; + } + + /** + * Set the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. + * + * @param nextHopIpAddress the nextHopIpAddress value to set + * @return the RouteInner object itself. + */ + public RouteInner withNextHopIpAddress(String nextHopIpAddress) { + this.nextHopIpAddress = nextHopIpAddress; + return this; + } + + /** + * Get the provisioning state of the route resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the RouteInner object itself. + */ + public RouteInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTableImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTableImpl.java new file mode 100644 index 000000000000..6bb431f9a385 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTableImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.RouteTable; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.Route; +import com.microsoft.azure.management.network.v2019_09_01.Subnet; + +class RouteTableImpl extends GroupableResourceCoreImpl implements RouteTable, RouteTable.Definition, RouteTable.Update { + RouteTableImpl(String name, RouteTableInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + RouteTablesInner client = this.manager().inner().routeTables(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + RouteTablesInner client = this.manager().inner().routeTables(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + RouteTablesInner client = this.manager().inner().routeTables(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Boolean disableBgpRoutePropagation() { + return this.inner().disableBgpRoutePropagation(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public List routes() { + List lst = new ArrayList(); + if (this.inner().routes() != null) { + for (RouteInner inner : this.inner().routes()) { + lst.add( new RouteImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List subnets() { + List lst = new ArrayList(); + if (this.inner().subnets() != null) { + for (SubnetInner inner : this.inner().subnets()) { + lst.add( new SubnetImpl(inner, manager())); + } + } + return lst; + } + + @Override + public RouteTableImpl withDisableBgpRoutePropagation(Boolean disableBgpRoutePropagation) { + this.inner().withDisableBgpRoutePropagation(disableBgpRoutePropagation); + return this; + } + + @Override + public RouteTableImpl withRoutes(List routes) { + this.inner().withRoutes(routes); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTableInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTableInner.java new file mode 100644 index 000000000000..0e2c5f1a34b8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTableInner.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Route table resource. + */ +@JsonFlatten +@SkipParentValidation +public class RouteTableInner extends Resource { + /** + * Collection of routes contained within a route table. + */ + @JsonProperty(value = "properties.routes") + private List routes; + + /** + * A collection of references to subnets. + */ + @JsonProperty(value = "properties.subnets", access = JsonProperty.Access.WRITE_ONLY) + private List subnets; + + /** + * Whether to disable the routes learned by BGP on that route table. True + * means disable. + */ + @JsonProperty(value = "properties.disableBgpRoutePropagation") + private Boolean disableBgpRoutePropagation; + + /** + * The provisioning state of the route table resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get collection of routes contained within a route table. + * + * @return the routes value + */ + public List routes() { + return this.routes; + } + + /** + * Set collection of routes contained within a route table. + * + * @param routes the routes value to set + * @return the RouteTableInner object itself. + */ + public RouteTableInner withRoutes(List routes) { + this.routes = routes; + return this; + } + + /** + * Get a collection of references to subnets. + * + * @return the subnets value + */ + public List subnets() { + return this.subnets; + } + + /** + * Get whether to disable the routes learned by BGP on that route table. True means disable. + * + * @return the disableBgpRoutePropagation value + */ + public Boolean disableBgpRoutePropagation() { + return this.disableBgpRoutePropagation; + } + + /** + * Set whether to disable the routes learned by BGP on that route table. True means disable. + * + * @param disableBgpRoutePropagation the disableBgpRoutePropagation value to set + * @return the RouteTableInner object itself. + */ + public RouteTableInner withDisableBgpRoutePropagation(Boolean disableBgpRoutePropagation) { + this.disableBgpRoutePropagation = disableBgpRoutePropagation; + return this; + } + + /** + * Get the provisioning state of the route table resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the RouteTableInner object itself. + */ + public RouteTableInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTablesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTablesImpl.java new file mode 100644 index 000000000000..e3e5cfd989b0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTablesImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.RouteTables; +import com.microsoft.azure.management.network.v2019_09_01.RouteTable; +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; + +class RouteTablesImpl extends GroupableResourcesCoreImpl implements RouteTables { + protected RouteTablesImpl(NetworkManager manager) { + super(manager.inner().routeTables(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + RouteTablesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + RouteTablesInner 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) { + RouteTablesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + RouteTablesInner 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 RouteTable call(RouteTableInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + RouteTablesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + RouteTablesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public RouteTable call(RouteTableInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public RouteTableImpl define(String name) { + return wrapModel(name); + } + + @Override + protected RouteTableImpl wrapModel(RouteTableInner inner) { + return new RouteTableImpl(inner.name(), inner, manager()); + } + + @Override + protected RouteTableImpl wrapModel(String name) { + return new RouteTableImpl(name, new RouteTableInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTablesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTablesInner.java new file mode 100644 index 000000000000..dfe492ebc5a3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTablesInner.java @@ -0,0 +1,1208 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 RouteTables. + */ +public class RouteTablesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private RouteTablesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of RouteTablesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public RouteTablesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(RouteTablesService.class); + this.client = client; + } + + /** + * The interface defining all the services for RouteTables to be + * used by Retrofit to perform actually REST calls. + */ + interface RouteTablesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.RouteTables delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @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.network.v2019_09_01.RouteTables beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @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.network.v2019_09_01.RouteTables getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.RouteTables createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("subscriptionId") String subscriptionId, @Body RouteTableInner 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.network.v2019_09_01.RouteTables beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("subscriptionId") String subscriptionId, @Body RouteTableInner 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.network.v2019_09_01.RouteTables updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.RouteTables listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.RouteTables list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables") + Observable> list(@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.network.v2019_09_01.RouteTables 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.network.v2019_09_01.RouteTables listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String routeTableName) { + deleteWithServiceResponseAsync(resourceGroupName, routeTableName).toBlocking().last().body(); + } + + /** + * Deletes the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String routeTableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, routeTableName), serviceCallback); + } + + /** + * Deletes the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String routeTableName) { + return deleteWithServiceResponseAsync(resourceGroupName, routeTableName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String routeTableName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String routeTableName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, routeTableName).toBlocking().single().body(); + } + + /** + * Deletes the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String routeTableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, routeTableName), serviceCallback); + } + + /** + * Deletes the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String routeTableName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, routeTableName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String routeTableName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, routeTableName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RouteTableInner object if successful. + */ + public RouteTableInner getByResourceGroup(String resourceGroupName, String routeTableName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeTableName).toBlocking().single().body(); + } + + /** + * Gets the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String routeTableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeTableName), serviceCallback); + } + + /** + * Gets the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String routeTableName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeTableName).map(new Func1, RouteTableInner>() { + @Override + public RouteTableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String routeTableName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 RouteTableInner object if successful. + */ + public RouteTableInner getByResourceGroup(String resourceGroupName, String routeTableName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeTableName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param expand Expands referenced resources. + * @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 routeTableName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeTableName, expand), serviceCallback); + } + + /** + * Gets the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String routeTableName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeTableName, expand).map(new Func1, RouteTableInner>() { + @Override + public RouteTableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String routeTableName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Create or updates a route table in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param parameters Parameters supplied to the create or update route table 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 RouteTableInner object if successful. + */ + public RouteTableInner createOrUpdate(String resourceGroupName, String routeTableName, RouteTableInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, parameters).toBlocking().last().body(); + } + + /** + * Create or updates a route table in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param parameters Parameters supplied to the create or update route table 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 createOrUpdateAsync(String resourceGroupName, String routeTableName, RouteTableInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, parameters), serviceCallback); + } + + /** + * Create or updates a route table in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param parameters Parameters supplied to the create or update route table operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String routeTableName, RouteTableInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, parameters).map(new Func1, RouteTableInner>() { + @Override + public RouteTableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or updates a route table in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param parameters Parameters supplied to the create or update route table operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String routeTableName, RouteTableInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, routeTableName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or updates a route table in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param parameters Parameters supplied to the create or update route table 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 RouteTableInner object if successful. + */ + public RouteTableInner beginCreateOrUpdate(String resourceGroupName, String routeTableName, RouteTableInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, parameters).toBlocking().single().body(); + } + + /** + * Create or updates a route table in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param parameters Parameters supplied to the create or update route table 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 beginCreateOrUpdateAsync(String resourceGroupName, String routeTableName, RouteTableInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, parameters), serviceCallback); + } + + /** + * Create or updates a route table in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param parameters Parameters supplied to the create or update route table operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String routeTableName, RouteTableInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, parameters).map(new Func1, RouteTableInner>() { + @Override + public RouteTableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or updates a route table in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param parameters Parameters supplied to the create or update route table operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String routeTableName, RouteTableInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, routeTableName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RouteTableInner object if successful. + */ + public RouteTableInner updateTags(String resourceGroupName, String routeTableName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName).toBlocking().single().body(); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String routeTableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName), serviceCallback); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String routeTableName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName).map(new Func1, RouteTableInner>() { + @Override + public RouteTableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String routeTableName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 RouteTableInner object if successful. + */ + public RouteTableInner updateTags(String resourceGroupName, String routeTableName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).toBlocking().single().body(); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String routeTableName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags), serviceCallback); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String routeTableName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).map(new Func1, RouteTableInner>() { + @Override + public RouteTableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String routeTableName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all route tables in a resource group. + * + * @param resourceGroupName The name of the 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<RouteTableInner> 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 all route tables in a resource group. + * + * @param resourceGroupName The name of the 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 all route tables in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RouteTableInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all route tables in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RouteTableInner> 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 all route tables in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RouteTableInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all route tables in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<RouteTableInner> 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 all route tables in a subscription. + * + * @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 all route tables in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RouteTableInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all route tables in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RouteTableInner> 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 all route tables in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RouteTableInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all route tables in a resource group. + * + * @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<RouteTableInner> 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 all route tables in a resource group. + * + * @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 all route tables in a resource group. + * + * @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<RouteTableInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all route tables in a resource group. + * + * @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<RouteTableInner> 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 all route tables in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RouteTableInner> 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 all route tables in a subscription. + * + * @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<RouteTableInner> 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 all route tables in a subscription. + * + * @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 all route tables in a subscription. + * + * @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<RouteTableInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all route tables in a subscription. + * + * @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<RouteTableInner> 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 all route tables in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RouteTableInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RoutesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RoutesImpl.java new file mode 100644 index 000000000000..c1d7f31ce1d0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RoutesImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.Routes; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.Route; + +class RoutesImpl extends WrapperImpl implements Routes { + private final NetworkManager manager; + + RoutesImpl(NetworkManager manager) { + super(manager.inner().routes()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public RouteImpl define(String name) { + return wrapModel(name); + } + + private RouteImpl wrapModel(RouteInner inner) { + return new RouteImpl(inner, manager()); + } + + private RouteImpl wrapModel(String name) { + return new RouteImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String routeTableName) { + RoutesInner client = this.inner(); + return client.listAsync(resourceGroupName, routeTableName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Route call(RouteInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String routeTableName, String routeName) { + RoutesInner client = this.inner(); + return client.getAsync(resourceGroupName, routeTableName, routeName) + .flatMap(new Func1>() { + @Override + public Observable call(RouteInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Route)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String routeTableName, String routeName) { + RoutesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, routeTableName, routeName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RoutesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RoutesInner.java new file mode 100644 index 000000000000..4735156c99e6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RoutesInner.java @@ -0,0 +1,764 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 Routes. + */ +public class RoutesInner { + /** The Retrofit service to perform REST calls. */ + private RoutesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of RoutesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public RoutesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(RoutesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Routes to be + * used by Retrofit to perform actually REST calls. + */ + interface RoutesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.Routes delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("routeName") String routeName, @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.network.v2019_09_01.Routes beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("routeName") String routeName, @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.network.v2019_09_01.Routes get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("routeName") String routeName, @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.network.v2019_09_01.Routes createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("routeName") String routeName, @Path("subscriptionId") String subscriptionId, @Body RouteInner routeParameters, @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.network.v2019_09_01.Routes beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("routeName") String routeName, @Path("subscriptionId") String subscriptionId, @Body RouteInner routeParameters, @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.network.v2019_09_01.Routes list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @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.network.v2019_09_01.Routes listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 routeTableName, String routeName) { + deleteWithServiceResponseAsync(resourceGroupName, routeTableName, routeName).toBlocking().last().body(); + } + + /** + * Deletes the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @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 routeTableName, String routeName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, routeTableName, routeName), serviceCallback); + } + + /** + * Deletes the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String routeTableName, String routeName) { + return deleteWithServiceResponseAsync(resourceGroupName, routeTableName, routeName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String routeTableName, String routeName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (routeName == null) { + throw new IllegalArgumentException("Parameter routeName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 routeTableName, String routeName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, routeTableName, routeName).toBlocking().single().body(); + } + + /** + * Deletes the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @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 routeTableName, String routeName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, routeTableName, routeName), serviceCallback); + } + + /** + * Deletes the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String routeTableName, String routeName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, routeTableName, routeName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String routeTableName, String routeName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (routeName == null) { + throw new IllegalArgumentException("Parameter routeName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 RouteInner object if successful. + */ + public RouteInner get(String resourceGroupName, String routeTableName, String routeName) { + return getWithServiceResponseAsync(resourceGroupName, routeTableName, routeName).toBlocking().single().body(); + } + + /** + * Gets the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @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 routeTableName, String routeName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, routeTableName, routeName), serviceCallback); + } + + /** + * Gets the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteInner object + */ + public Observable getAsync(String resourceGroupName, String routeTableName, String routeName) { + return getWithServiceResponseAsync(resourceGroupName, routeTableName, routeName).map(new Func1, RouteInner>() { + @Override + public RouteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified route from a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String routeTableName, String routeName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (routeName == null) { + throw new IllegalArgumentException("Parameter routeName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates a route in the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @param routeParameters Parameters supplied to the create or update route 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 RouteInner object if successful. + */ + public RouteInner createOrUpdate(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, routeName, routeParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a route in the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @param routeParameters Parameters supplied to the create or update route 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 createOrUpdateAsync(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, routeName, routeParameters), serviceCallback); + } + + /** + * Creates or updates a route in the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @param routeParameters Parameters supplied to the create or update route operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, routeName, routeParameters).map(new Func1, RouteInner>() { + @Override + public RouteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a route in the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @param routeParameters Parameters supplied to the create or update route operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (routeName == null) { + throw new IllegalArgumentException("Parameter routeName 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 (routeParameters == null) { + throw new IllegalArgumentException("Parameter routeParameters is required and cannot be null."); + } + Validator.validate(routeParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), routeParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a route in the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @param routeParameters Parameters supplied to the create or update route 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 RouteInner object if successful. + */ + public RouteInner beginCreateOrUpdate(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, routeName, routeParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a route in the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @param routeParameters Parameters supplied to the create or update route 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 beginCreateOrUpdateAsync(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, routeName, routeParameters), serviceCallback); + } + + /** + * Creates or updates a route in the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @param routeParameters Parameters supplied to the create or update route operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, routeName, routeParameters).map(new Func1, RouteInner>() { + @Override + public RouteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a route in the specified route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param routeName The name of the route. + * @param routeParameters Parameters supplied to the create or update route operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (routeName == null) { + throw new IllegalArgumentException("Parameter routeName 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 (routeParameters == null) { + throw new IllegalArgumentException("Parameter routeParameters is required and cannot be null."); + } + Validator.validate(routeParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), routeParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 all routes in a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RouteInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String routeTableName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, routeTableName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all routes in a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String resourceGroupName, final String routeTableName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, routeTableName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all routes in a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RouteInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String routeTableName) { + return listWithServiceResponseAsync(resourceGroupName, routeTableName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all routes in a route table. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RouteInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String routeTableName) { + return listSinglePageAsync(resourceGroupName, routeTableName) + .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 all routes in a route table. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RouteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String routeTableName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, routeTableName, this.client.subscriptionId(), 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 all routes in a route table. + * + * @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<RouteInner> 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 all routes in a route table. + * + * @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 all routes in a route table. + * + * @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<RouteInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all routes in a route table. + * + * @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<RouteInner> 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 all routes in a route table. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RouteInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityGroupViewResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityGroupViewResultImpl.java new file mode 100644 index 000000000000..66413df35931 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityGroupViewResultImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.SecurityGroupViewResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.SecurityGroupNetworkInterface; + +class SecurityGroupViewResultImpl extends WrapperImpl implements SecurityGroupViewResult { + private final NetworkManager manager; + SecurityGroupViewResultImpl(SecurityGroupViewResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List networkInterfaces() { + return this.inner().networkInterfaces(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityGroupViewResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityGroupViewResultInner.java new file mode 100644 index 000000000000..1cd2355acdd6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityGroupViewResultInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.SecurityGroupNetworkInterface; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The information about security rules applied to the specified VM. + */ +public class SecurityGroupViewResultInner { + /** + * List of network interfaces on the specified VM. + */ + @JsonProperty(value = "networkInterfaces") + private List networkInterfaces; + + /** + * Get list of network interfaces on the specified VM. + * + * @return the networkInterfaces value + */ + public List networkInterfaces() { + return this.networkInterfaces; + } + + /** + * Set list of network interfaces on the specified VM. + * + * @param networkInterfaces the networkInterfaces value to set + * @return the SecurityGroupViewResultInner object itself. + */ + public SecurityGroupViewResultInner withNetworkInterfaces(List networkInterfaces) { + this.networkInterfaces = networkInterfaces; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityRuleInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityRuleInner.java new file mode 100644 index 000000000000..9266065f8d44 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityRuleInner.java @@ -0,0 +1,486 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.SecurityRuleProtocol; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.SecurityRuleAccess; +import com.microsoft.azure.management.network.v2019_09_01.SecurityRuleDirection; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Network security rule. + */ +@JsonFlatten +public class SecurityRuleInner extends SubResource { + /** + * A description for this rule. Restricted to 140 chars. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * Network protocol this rule applies to. Possible values include: 'Tcp', + * 'Udp', 'Icmp', 'Esp', '*', 'Ah'. + */ + @JsonProperty(value = "properties.protocol", required = true) + private SecurityRuleProtocol protocol; + + /** + * The source port or range. Integer or range between 0 and 65535. Asterisk + * '*' can also be used to match all ports. + */ + @JsonProperty(value = "properties.sourcePortRange") + private String sourcePortRange; + + /** + * The destination port or range. Integer or range between 0 and 65535. + * Asterisk '*' can also be used to match all ports. + */ + @JsonProperty(value = "properties.destinationPortRange") + private String destinationPortRange; + + /** + * The CIDR or source IP range. Asterisk '*' can also be used to match all + * source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' + * and 'Internet' can also be used. If this is an ingress rule, specifies + * where network traffic originates from. + */ + @JsonProperty(value = "properties.sourceAddressPrefix") + private String sourceAddressPrefix; + + /** + * The CIDR or source IP ranges. + */ + @JsonProperty(value = "properties.sourceAddressPrefixes") + private List sourceAddressPrefixes; + + /** + * The application security group specified as source. + */ + @JsonProperty(value = "properties.sourceApplicationSecurityGroups") + private List sourceApplicationSecurityGroups; + + /** + * The destination address prefix. CIDR or destination IP range. Asterisk + * '*' can also be used to match all source IPs. Default tags such as + * 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. + */ + @JsonProperty(value = "properties.destinationAddressPrefix") + private String destinationAddressPrefix; + + /** + * The destination address prefixes. CIDR or destination IP ranges. + */ + @JsonProperty(value = "properties.destinationAddressPrefixes") + private List destinationAddressPrefixes; + + /** + * The application security group specified as destination. + */ + @JsonProperty(value = "properties.destinationApplicationSecurityGroups") + private List destinationApplicationSecurityGroups; + + /** + * The source port ranges. + */ + @JsonProperty(value = "properties.sourcePortRanges") + private List sourcePortRanges; + + /** + * The destination port ranges. + */ + @JsonProperty(value = "properties.destinationPortRanges") + private List destinationPortRanges; + + /** + * The network traffic is allowed or denied. Possible values include: + * 'Allow', 'Deny'. + */ + @JsonProperty(value = "properties.access", required = true) + private SecurityRuleAccess access; + + /** + * The priority of the rule. The value can be between 100 and 4096. The + * priority number must be unique for each rule in the collection. The + * lower the priority number, the higher the priority of the rule. + */ + @JsonProperty(value = "properties.priority") + private Integer priority; + + /** + * The direction of the rule. The direction specifies if rule will be + * evaluated on incoming or outgoing traffic. Possible values include: + * 'Inbound', 'Outbound'. + */ + @JsonProperty(value = "properties.direction", required = true) + private SecurityRuleDirection direction; + + /** + * The provisioning state of the security rule resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get a description for this rule. Restricted to 140 chars. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set a description for this rule. Restricted to 140 chars. + * + * @param description the description value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get network protocol this rule applies to. Possible values include: 'Tcp', 'Udp', 'Icmp', 'Esp', '*', 'Ah'. + * + * @return the protocol value + */ + public SecurityRuleProtocol protocol() { + return this.protocol; + } + + /** + * Set network protocol this rule applies to. Possible values include: 'Tcp', 'Udp', 'Icmp', 'Esp', '*', 'Ah'. + * + * @param protocol the protocol value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withProtocol(SecurityRuleProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. + * + * @return the sourcePortRange value + */ + public String sourcePortRange() { + return this.sourcePortRange; + } + + /** + * Set the source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. + * + * @param sourcePortRange the sourcePortRange value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withSourcePortRange(String sourcePortRange) { + this.sourcePortRange = sourcePortRange; + return this; + } + + /** + * Get the destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. + * + * @return the destinationPortRange value + */ + public String destinationPortRange() { + return this.destinationPortRange; + } + + /** + * Set the destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. + * + * @param destinationPortRange the destinationPortRange value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withDestinationPortRange(String destinationPortRange) { + this.destinationPortRange = destinationPortRange; + return this; + } + + /** + * Get the CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. + * + * @return the sourceAddressPrefix value + */ + public String sourceAddressPrefix() { + return this.sourceAddressPrefix; + } + + /** + * Set the CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. + * + * @param sourceAddressPrefix the sourceAddressPrefix value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withSourceAddressPrefix(String sourceAddressPrefix) { + this.sourceAddressPrefix = sourceAddressPrefix; + return this; + } + + /** + * Get the CIDR or source IP ranges. + * + * @return the sourceAddressPrefixes value + */ + public List sourceAddressPrefixes() { + return this.sourceAddressPrefixes; + } + + /** + * Set the CIDR or source IP ranges. + * + * @param sourceAddressPrefixes the sourceAddressPrefixes value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withSourceAddressPrefixes(List sourceAddressPrefixes) { + this.sourceAddressPrefixes = sourceAddressPrefixes; + return this; + } + + /** + * Get the application security group specified as source. + * + * @return the sourceApplicationSecurityGroups value + */ + public List sourceApplicationSecurityGroups() { + return this.sourceApplicationSecurityGroups; + } + + /** + * Set the application security group specified as source. + * + * @param sourceApplicationSecurityGroups the sourceApplicationSecurityGroups value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withSourceApplicationSecurityGroups(List sourceApplicationSecurityGroups) { + this.sourceApplicationSecurityGroups = sourceApplicationSecurityGroups; + return this; + } + + /** + * Get the destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. + * + * @return the destinationAddressPrefix value + */ + public String destinationAddressPrefix() { + return this.destinationAddressPrefix; + } + + /** + * Set the destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. + * + * @param destinationAddressPrefix the destinationAddressPrefix value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withDestinationAddressPrefix(String destinationAddressPrefix) { + this.destinationAddressPrefix = destinationAddressPrefix; + return this; + } + + /** + * Get the destination address prefixes. CIDR or destination IP ranges. + * + * @return the destinationAddressPrefixes value + */ + public List destinationAddressPrefixes() { + return this.destinationAddressPrefixes; + } + + /** + * Set the destination address prefixes. CIDR or destination IP ranges. + * + * @param destinationAddressPrefixes the destinationAddressPrefixes value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withDestinationAddressPrefixes(List destinationAddressPrefixes) { + this.destinationAddressPrefixes = destinationAddressPrefixes; + return this; + } + + /** + * Get the application security group specified as destination. + * + * @return the destinationApplicationSecurityGroups value + */ + public List destinationApplicationSecurityGroups() { + return this.destinationApplicationSecurityGroups; + } + + /** + * Set the application security group specified as destination. + * + * @param destinationApplicationSecurityGroups the destinationApplicationSecurityGroups value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withDestinationApplicationSecurityGroups(List destinationApplicationSecurityGroups) { + this.destinationApplicationSecurityGroups = destinationApplicationSecurityGroups; + return this; + } + + /** + * Get the source port ranges. + * + * @return the sourcePortRanges value + */ + public List sourcePortRanges() { + return this.sourcePortRanges; + } + + /** + * Set the source port ranges. + * + * @param sourcePortRanges the sourcePortRanges value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withSourcePortRanges(List sourcePortRanges) { + this.sourcePortRanges = sourcePortRanges; + return this; + } + + /** + * Get the destination port ranges. + * + * @return the destinationPortRanges value + */ + public List destinationPortRanges() { + return this.destinationPortRanges; + } + + /** + * Set the destination port ranges. + * + * @param destinationPortRanges the destinationPortRanges value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withDestinationPortRanges(List destinationPortRanges) { + this.destinationPortRanges = destinationPortRanges; + return this; + } + + /** + * Get the network traffic is allowed or denied. Possible values include: 'Allow', 'Deny'. + * + * @return the access value + */ + public SecurityRuleAccess access() { + return this.access; + } + + /** + * Set the network traffic is allowed or denied. Possible values include: 'Allow', 'Deny'. + * + * @param access the access value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withAccess(SecurityRuleAccess access) { + this.access = access; + return this; + } + + /** + * Get the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. + * + * @return the priority value + */ + public Integer priority() { + return this.priority; + } + + /** + * Set the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. + * + * @param priority the priority value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get the direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'Inbound', 'Outbound'. + * + * @return the direction value + */ + public SecurityRuleDirection direction() { + return this.direction; + } + + /** + * Set the direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'Inbound', 'Outbound'. + * + * @param direction the direction value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withDirection(SecurityRuleDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get the provisioning state of the security rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityRulesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityRulesImpl.java new file mode 100644 index 000000000000..7043601a8656 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityRulesImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.SecurityRules; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroupSecurityRule; + +class SecurityRulesImpl extends WrapperImpl implements SecurityRules { + private final NetworkManager manager; + + SecurityRulesImpl(NetworkManager manager) { + super(manager.inner().securityRules()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public NetworkSecurityGroupSecurityRuleImpl define(String name) { + return wrapModel(name); + } + + private NetworkSecurityGroupSecurityRuleImpl wrapModel(SecurityRuleInner inner) { + return new NetworkSecurityGroupSecurityRuleImpl(inner, manager()); + } + + private NetworkSecurityGroupSecurityRuleImpl wrapModel(String name) { + return new NetworkSecurityGroupSecurityRuleImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String networkSecurityGroupName) { + SecurityRulesInner client = this.inner(); + return client.listAsync(resourceGroupName, networkSecurityGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public NetworkSecurityGroupSecurityRule call(SecurityRuleInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { + SecurityRulesInner client = this.inner(); + return client.getAsync(resourceGroupName, networkSecurityGroupName, securityRuleName) + .flatMap(new Func1>() { + @Override + public Observable call(SecurityRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((NetworkSecurityGroupSecurityRule)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { + SecurityRulesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, networkSecurityGroupName, securityRuleName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityRulesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityRulesInner.java new file mode 100644 index 000000000000..ccc5aec85772 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SecurityRulesInner.java @@ -0,0 +1,764 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 SecurityRules. + */ +public class SecurityRulesInner { + /** The Retrofit service to perform REST calls. */ + private SecurityRulesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of SecurityRulesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public SecurityRulesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(SecurityRulesService.class); + this.client = client; + } + + /** + * The interface defining all the services for SecurityRules to be + * used by Retrofit to perform actually REST calls. + */ + interface SecurityRulesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.SecurityRules delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("securityRuleName") String securityRuleName, @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.network.v2019_09_01.SecurityRules beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("securityRuleName") String securityRuleName, @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.network.v2019_09_01.SecurityRules get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("securityRuleName") String securityRuleName, @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.network.v2019_09_01.SecurityRules createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("securityRuleName") String securityRuleName, @Path("subscriptionId") String subscriptionId, @Body SecurityRuleInner securityRuleParameters, @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.network.v2019_09_01.SecurityRules beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("securityRuleName") String securityRuleName, @Path("subscriptionId") String subscriptionId, @Body SecurityRuleInner securityRuleParameters, @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.network.v2019_09_01.SecurityRules list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @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.network.v2019_09_01.SecurityRules listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security 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 + */ + public void delete(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { + deleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName).toBlocking().last().body(); + } + + /** + * Deletes the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security 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 deleteAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName), serviceCallback); + } + + /** + * Deletes the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { + return deleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (securityRuleName == null) { + throw new IllegalArgumentException("Parameter securityRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security 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 + */ + public void beginDelete(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName).toBlocking().single().body(); + } + + /** + * Deletes the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security 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 beginDeleteAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName), serviceCallback); + } + + /** + * Deletes the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (securityRuleName == null) { + throw new IllegalArgumentException("Parameter securityRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), 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); + } + + /** + * Get the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security 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 SecurityRuleInner object if successful. + */ + public SecurityRuleInner get(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { + return getWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName).toBlocking().single().body(); + } + + /** + * Get the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security 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 getAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName), serviceCallback); + } + + /** + * Get the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecurityRuleInner object + */ + public Observable getAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { + return getWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName).map(new Func1, SecurityRuleInner>() { + @Override + public SecurityRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the specified network security rule. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecurityRuleInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (securityRuleName == null) { + throw new IllegalArgumentException("Parameter securityRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates a security rule in the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @param securityRuleParameters Parameters supplied to the create or update network security rule 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 SecurityRuleInner object if successful. + */ + public SecurityRuleInner createOrUpdate(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, SecurityRuleInner securityRuleParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a security rule in the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @param securityRuleParameters Parameters supplied to the create or update network security rule 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 createOrUpdateAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, SecurityRuleInner securityRuleParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters), serviceCallback); + } + + /** + * Creates or updates a security rule in the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @param securityRuleParameters Parameters supplied to the create or update network security rule operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, SecurityRuleInner securityRuleParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters).map(new Func1, SecurityRuleInner>() { + @Override + public SecurityRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a security rule in the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @param securityRuleParameters Parameters supplied to the create or update network security rule operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, SecurityRuleInner securityRuleParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (securityRuleName == null) { + throw new IllegalArgumentException("Parameter securityRuleName 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 (securityRuleParameters == null) { + throw new IllegalArgumentException("Parameter securityRuleParameters is required and cannot be null."); + } + Validator.validate(securityRuleParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), securityRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a security rule in the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @param securityRuleParameters Parameters supplied to the create or update network security rule 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 SecurityRuleInner object if successful. + */ + public SecurityRuleInner beginCreateOrUpdate(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, SecurityRuleInner securityRuleParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a security rule in the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @param securityRuleParameters Parameters supplied to the create or update network security rule 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 beginCreateOrUpdateAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, SecurityRuleInner securityRuleParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters), serviceCallback); + } + + /** + * Creates or updates a security rule in the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @param securityRuleParameters Parameters supplied to the create or update network security rule operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecurityRuleInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, SecurityRuleInner securityRuleParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters).map(new Func1, SecurityRuleInner>() { + @Override + public SecurityRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a security rule in the specified network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param securityRuleName The name of the security rule. + * @param securityRuleParameters Parameters supplied to the create or update network security rule operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecurityRuleInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, SecurityRuleInner securityRuleParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (securityRuleName == null) { + throw new IllegalArgumentException("Parameter securityRuleName 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 (securityRuleParameters == null) { + throw new IllegalArgumentException("Parameter securityRuleParameters is required and cannot be null."); + } + Validator.validate(securityRuleParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), securityRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 all security rules in a network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security 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<SecurityRuleInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String networkSecurityGroupName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, networkSecurityGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all security rules in a network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security 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> listAsync(final String resourceGroupName, final String networkSecurityGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, networkSecurityGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all security rules in a network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SecurityRuleInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String networkSecurityGroupName) { + return listWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all security rules in a network security group. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SecurityRuleInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String networkSecurityGroupName) { + return listSinglePageAsync(resourceGroupName, networkSecurityGroupName) + .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 all security rules in a network security group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SecurityRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String networkSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), 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 all security rules in a network security group. + * + * @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<SecurityRuleInner> 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 all security rules in a network security group. + * + * @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 all security rules in a network security group. + * + * @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<SecurityRuleInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all security rules in a network security group. + * + * @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<SecurityRuleInner> 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 all security rules in a network security group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SecurityRuleInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinkInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinkInner.java new file mode 100644 index 000000000000..dfa4e7e30a8b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinkInner.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * ServiceAssociationLink resource. + */ +@JsonFlatten +public class ServiceAssociationLinkInner extends SubResource { + /** + * Resource type of the linked resource. + */ + @JsonProperty(value = "properties.linkedResourceType") + private String linkedResourceType; + + /** + * Link to the external resource. + */ + @JsonProperty(value = "properties.link") + private String link; + + /** + * The provisioning state of the service association link resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * If true, the resource can be deleted. + */ + @JsonProperty(value = "properties.allowDelete") + private Boolean allowDelete; + + /** + * A list of locations. + */ + @JsonProperty(value = "properties.locations") + private List locations; + + /** + * Name of the resource that is unique within a resource group. This name + * can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get resource type of the linked resource. + * + * @return the linkedResourceType value + */ + public String linkedResourceType() { + return this.linkedResourceType; + } + + /** + * Set resource type of the linked resource. + * + * @param linkedResourceType the linkedResourceType value to set + * @return the ServiceAssociationLinkInner object itself. + */ + public ServiceAssociationLinkInner withLinkedResourceType(String linkedResourceType) { + this.linkedResourceType = linkedResourceType; + return this; + } + + /** + * Get link to the external resource. + * + * @return the link value + */ + public String link() { + return this.link; + } + + /** + * Set link to the external resource. + * + * @param link the link value to set + * @return the ServiceAssociationLinkInner object itself. + */ + public ServiceAssociationLinkInner withLink(String link) { + this.link = link; + return this; + } + + /** + * Get the provisioning state of the service association link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get if true, the resource can be deleted. + * + * @return the allowDelete value + */ + public Boolean allowDelete() { + return this.allowDelete; + } + + /** + * Set if true, the resource can be deleted. + * + * @param allowDelete the allowDelete value to set + * @return the ServiceAssociationLinkInner object itself. + */ + public ServiceAssociationLinkInner withAllowDelete(Boolean allowDelete) { + this.allowDelete = allowDelete; + return this; + } + + /** + * Get a list of locations. + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Set a list of locations. + * + * @param locations the locations value to set + * @return the ServiceAssociationLinkInner object itself. + */ + public ServiceAssociationLinkInner withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the ServiceAssociationLinkInner object itself. + */ + public ServiceAssociationLinkInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksImpl.java new file mode 100644 index 000000000000..f9b0fa9fa102 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ServiceAssociationLinks; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ServiceAssociationLinksListResult; + +class ServiceAssociationLinksImpl extends WrapperImpl implements ServiceAssociationLinks { + private final NetworkManager manager; + + ServiceAssociationLinksImpl(NetworkManager manager) { + super(manager.inner().serviceAssociationLinks()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + ServiceAssociationLinksInner client = this.inner(); + return client.listAsync(resourceGroupName, virtualNetworkName, subnetName) + .map(new Func1() { + @Override + public ServiceAssociationLinksListResult call(ServiceAssociationLinksListResultInner inner) { + return new ServiceAssociationLinksListResultImpl(inner, manager()); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksInner.java new file mode 100644 index 000000000000..e1b274d2a1d2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksInner.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.network.v2019_09_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 ServiceAssociationLinks. + */ +public class ServiceAssociationLinksInner { + /** The Retrofit service to perform REST calls. */ + private ServiceAssociationLinksService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ServiceAssociationLinksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServiceAssociationLinksInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ServiceAssociationLinksService.class); + this.client = client; + } + + /** + * The interface defining all the services for ServiceAssociationLinks to be + * used by Retrofit to perform actually REST calls. + */ + interface ServiceAssociationLinksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ServiceAssociationLinks list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ServiceAssociationLinks") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subnetName") String subnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of service association links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ServiceAssociationLinksListResultInner object if successful. + */ + public ServiceAssociationLinksListResultInner list(String resourceGroupName, String virtualNetworkName, String subnetName) { + return listWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().single().body(); + } + + /** + * Gets a list of service association links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @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(String resourceGroupName, String virtualNetworkName, String subnetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName), serviceCallback); + } + + /** + * Gets a list of service association links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceAssociationLinksListResultInner object + */ + public Observable listAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + return listWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).map(new Func1, ServiceAssociationLinksListResultInner>() { + @Override + public ServiceAssociationLinksListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a list of service association links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceAssociationLinksListResultInner object + */ + public Observable> listWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksListResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksListResultImpl.java new file mode 100644 index 000000000000..afcba7198e64 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksListResultImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ServiceAssociationLinksListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class ServiceAssociationLinksListResultImpl extends WrapperImpl implements ServiceAssociationLinksListResult { + private final NetworkManager manager; + ServiceAssociationLinksListResultImpl(ServiceAssociationLinksListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksListResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksListResultInner.java new file mode 100644 index 000000000000..37e5ce50ca41 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceAssociationLinksListResultInner.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for ServiceAssociationLinks_List operation. + */ +public class ServiceAssociationLinksListResultInner { + /** + * The service association links in a subnet. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the service association links in a subnet. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the service association links in a subnet. + * + * @param value the value value to set + * @return the ServiceAssociationLinksListResultInner object itself. + */ + public ServiceAssociationLinksListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPoliciesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPoliciesImpl.java new file mode 100644 index 000000000000..f11b0cd6e3ec --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPoliciesImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPolicies; +import com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPolicy; +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; + +class ServiceEndpointPoliciesImpl extends GroupableResourcesCoreImpl implements ServiceEndpointPolicies { + protected ServiceEndpointPoliciesImpl(NetworkManager manager) { + super(manager.inner().serviceEndpointPolicies(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ServiceEndpointPoliciesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ServiceEndpointPoliciesInner 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) { + ServiceEndpointPoliciesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ServiceEndpointPoliciesInner 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 ServiceEndpointPolicy call(ServiceEndpointPolicyInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ServiceEndpointPoliciesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ServiceEndpointPoliciesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceEndpointPolicy call(ServiceEndpointPolicyInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public ServiceEndpointPolicyImpl define(String name) { + return wrapModel(name); + } + + @Override + protected ServiceEndpointPolicyImpl wrapModel(ServiceEndpointPolicyInner inner) { + return new ServiceEndpointPolicyImpl(inner.name(), inner, manager()); + } + + @Override + protected ServiceEndpointPolicyImpl wrapModel(String name) { + return new ServiceEndpointPolicyImpl(name, new ServiceEndpointPolicyInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPoliciesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPoliciesInner.java new file mode 100644 index 000000000000..36b071e3f4be --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPoliciesInner.java @@ -0,0 +1,1208 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 ServiceEndpointPolicies. + */ +public class ServiceEndpointPoliciesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ServiceEndpointPoliciesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ServiceEndpointPoliciesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServiceEndpointPoliciesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ServiceEndpointPoliciesService.class); + this.client = client; + } + + /** + * The interface defining all the services for ServiceEndpointPolicies to be + * used by Retrofit to perform actually REST calls. + */ + interface ServiceEndpointPoliciesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPolicies delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceEndpointPolicyName") String serviceEndpointPolicyName, @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.network.v2019_09_01.ServiceEndpointPolicies beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceEndpointPolicyName") String serviceEndpointPolicyName, @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.network.v2019_09_01.ServiceEndpointPolicies getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("serviceEndpointPolicyName") String serviceEndpointPolicyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.ServiceEndpointPolicies createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceEndpointPolicyName") String serviceEndpointPolicyName, @Path("subscriptionId") String subscriptionId, @Body ServiceEndpointPolicyInner 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.network.v2019_09_01.ServiceEndpointPolicies beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceEndpointPolicyName") String serviceEndpointPolicyName, @Path("subscriptionId") String subscriptionId, @Body ServiceEndpointPolicyInner 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.network.v2019_09_01.ServiceEndpointPolicies updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("serviceEndpointPolicyName") String serviceEndpointPolicyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPolicies list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/ServiceEndpointPolicies") + Observable> list(@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.network.v2019_09_01.ServiceEndpointPolicies listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.ServiceEndpointPolicies 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.network.v2019_09_01.ServiceEndpointPolicies listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint 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 + */ + public void delete(String resourceGroupName, String serviceEndpointPolicyName) { + deleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName).toBlocking().last().body(); + } + + /** + * Deletes the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint 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 deleteAsync(String resourceGroupName, String serviceEndpointPolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName), serviceCallback); + } + + /** + * Deletes the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String serviceEndpointPolicyName) { + return deleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, serviceEndpointPolicyName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint 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 + */ + public void beginDelete(String resourceGroupName, String serviceEndpointPolicyName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName).toBlocking().single().body(); + } + + /** + * Deletes the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint 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 beginDeleteAsync(String resourceGroupName, String serviceEndpointPolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName), serviceCallback); + } + + /** + * Deletes the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String serviceEndpointPolicyName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, serviceEndpointPolicyName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified service Endpoint Policies in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint 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 ServiceEndpointPolicyInner object if successful. + */ + public ServiceEndpointPolicyInner getByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName).toBlocking().single().body(); + } + + /** + * Gets the specified service Endpoint Policies in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint 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 getByResourceGroupAsync(String resourceGroupName, String serviceEndpointPolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName), serviceCallback); + } + + /** + * Gets the specified service Endpoint Policies in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String serviceEndpointPolicyName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName).map(new Func1, ServiceEndpointPolicyInner>() { + @Override + public ServiceEndpointPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified service Endpoint Policies in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, serviceEndpointPolicyName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified service Endpoint Policies in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ServiceEndpointPolicyInner object if successful. + */ + public ServiceEndpointPolicyInner getByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified service Endpoint Policies in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param expand Expands referenced resources. + * @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 serviceEndpointPolicyName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, expand), serviceCallback); + } + + /** + * Gets the specified service Endpoint Policies in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String serviceEndpointPolicyName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, expand).map(new Func1, ServiceEndpointPolicyInner>() { + @Override + public ServiceEndpointPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified service Endpoint Policies in a specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, serviceEndpointPolicyName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Creates or updates a service Endpoint Policies. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param parameters Parameters supplied to the create or update service endpoint policy 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 ServiceEndpointPolicyInner object if successful. + */ + public ServiceEndpointPolicyInner createOrUpdate(String resourceGroupName, String serviceEndpointPolicyName, ServiceEndpointPolicyInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a service Endpoint Policies. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param parameters Parameters supplied to the create or update service endpoint policy 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 createOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, ServiceEndpointPolicyInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, parameters), serviceCallback); + } + + /** + * Creates or updates a service Endpoint Policies. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param parameters Parameters supplied to the create or update service endpoint policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, ServiceEndpointPolicyInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, parameters).map(new Func1, ServiceEndpointPolicyInner>() { + @Override + public ServiceEndpointPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a service Endpoint Policies. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param parameters Parameters supplied to the create or update service endpoint policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName, ServiceEndpointPolicyInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, serviceEndpointPolicyName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a service Endpoint Policies. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param parameters Parameters supplied to the create or update service endpoint policy 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 ServiceEndpointPolicyInner object if successful. + */ + public ServiceEndpointPolicyInner beginCreateOrUpdate(String resourceGroupName, String serviceEndpointPolicyName, ServiceEndpointPolicyInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a service Endpoint Policies. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param parameters Parameters supplied to the create or update service endpoint policy 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 beginCreateOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, ServiceEndpointPolicyInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, parameters), serviceCallback); + } + + /** + * Creates or updates a service Endpoint Policies. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param parameters Parameters supplied to the create or update service endpoint policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, ServiceEndpointPolicyInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, parameters).map(new Func1, ServiceEndpointPolicyInner>() { + @Override + public ServiceEndpointPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a service Endpoint Policies. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param parameters Parameters supplied to the create or update service endpoint policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName, ServiceEndpointPolicyInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, serviceEndpointPolicyName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 tags of a service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint 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 ServiceEndpointPolicyInner object if successful. + */ + public ServiceEndpointPolicyInner updateTags(String resourceGroupName, String serviceEndpointPolicyName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName).toBlocking().single().body(); + } + + /** + * Updates tags of a service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint 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 updateTagsAsync(String resourceGroupName, String serviceEndpointPolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName), serviceCallback); + } + + /** + * Updates tags of a service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String serviceEndpointPolicyName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName).map(new Func1, ServiceEndpointPolicyInner>() { + @Override + public ServiceEndpointPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags of a service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, serviceEndpointPolicyName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates tags of a service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ServiceEndpointPolicyInner object if successful. + */ + public ServiceEndpointPolicyInner updateTags(String resourceGroupName, String serviceEndpointPolicyName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, tags).toBlocking().single().body(); + } + + /** + * Updates tags of a service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String serviceEndpointPolicyName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, tags), serviceCallback); + } + + /** + * Updates tags of a service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String serviceEndpointPolicyName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, tags).map(new Func1, ServiceEndpointPolicyInner>() { + @Override + public ServiceEndpointPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags of a service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, serviceEndpointPolicyName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all the service endpoint policies in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ServiceEndpointPolicyInner> 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 all the service endpoint policies in a subscription. + * + * @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 all the service endpoint policies in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceEndpointPolicyInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the service endpoint policies in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceEndpointPolicyInner> 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 all the service endpoint policies in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceEndpointPolicyInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all service endpoint Policies in a resource group. + * + * @param resourceGroupName The name of the 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<ServiceEndpointPolicyInner> 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 all service endpoint Policies in a resource group. + * + * @param resourceGroupName The name of the 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 all service endpoint Policies in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceEndpointPolicyInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all service endpoint Policies in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceEndpointPolicyInner> 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 all service endpoint Policies in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceEndpointPolicyInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all the service endpoint policies in a subscription. + * + * @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<ServiceEndpointPolicyInner> 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 all the service endpoint policies in a subscription. + * + * @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 all the service endpoint policies in a subscription. + * + * @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<ServiceEndpointPolicyInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the service endpoint policies in a subscription. + * + * @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<ServiceEndpointPolicyInner> 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 all the service endpoint policies in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceEndpointPolicyInner> 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 all service endpoint Policies in a resource group. + * + * @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<ServiceEndpointPolicyInner> 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 all service endpoint Policies in a resource group. + * + * @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 all service endpoint Policies in a resource group. + * + * @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<ServiceEndpointPolicyInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all service endpoint Policies in a resource group. + * + * @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<ServiceEndpointPolicyInner> 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 all service endpoint Policies in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceEndpointPolicyInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionImpl.java new file mode 100644 index 000000000000..7b27283906fa --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPolicyDefinition; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class ServiceEndpointPolicyDefinitionImpl extends CreatableUpdatableImpl implements ServiceEndpointPolicyDefinition, ServiceEndpointPolicyDefinition.Definition, ServiceEndpointPolicyDefinition.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String serviceEndpointPolicyName; + private String serviceEndpointPolicyDefinitionName; + + ServiceEndpointPolicyDefinitionImpl(String name, NetworkManager manager) { + super(name, new ServiceEndpointPolicyDefinitionInner()); + this.manager = manager; + // Set resource name + this.serviceEndpointPolicyDefinitionName = name; + // + } + + ServiceEndpointPolicyDefinitionImpl(ServiceEndpointPolicyDefinitionInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.serviceEndpointPolicyDefinitionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.serviceEndpointPolicyName = IdParsingUtils.getValueFromIdByName(inner.id(), "serviceEndpointPolicies"); + this.serviceEndpointPolicyDefinitionName = IdParsingUtils.getValueFromIdByName(inner.id(), "serviceEndpointPolicyDefinitions"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ServiceEndpointPolicyDefinitionsInner client = this.manager().inner().serviceEndpointPolicyDefinitions(); + return client.createOrUpdateAsync(this.resourceGroupName, this.serviceEndpointPolicyName, this.serviceEndpointPolicyDefinitionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ServiceEndpointPolicyDefinitionsInner client = this.manager().inner().serviceEndpointPolicyDefinitions(); + return client.createOrUpdateAsync(this.resourceGroupName, this.serviceEndpointPolicyName, this.serviceEndpointPolicyDefinitionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ServiceEndpointPolicyDefinitionsInner client = this.manager().inner().serviceEndpointPolicyDefinitions(); + return client.getAsync(this.resourceGroupName, this.serviceEndpointPolicyName, this.serviceEndpointPolicyDefinitionName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String service() { + return this.inner().service(); + } + + @Override + public List serviceResources() { + return this.inner().serviceResources(); + } + + @Override + public ServiceEndpointPolicyDefinitionImpl withExistingServiceEndpointPolicy(String resourceGroupName, String serviceEndpointPolicyName) { + this.resourceGroupName = resourceGroupName; + this.serviceEndpointPolicyName = serviceEndpointPolicyName; + return this; + } + + @Override + public ServiceEndpointPolicyDefinitionImpl withDescription(String description) { + this.inner().withDescription(description); + return this; + } + + @Override + public ServiceEndpointPolicyDefinitionImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public ServiceEndpointPolicyDefinitionImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public ServiceEndpointPolicyDefinitionImpl withService(String service) { + this.inner().withService(service); + return this; + } + + @Override + public ServiceEndpointPolicyDefinitionImpl withServiceResources(List serviceResources) { + this.inner().withServiceResources(serviceResources); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionInner.java new file mode 100644 index 000000000000..be43d5b1f3d0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Service Endpoint policy definitions. + */ +@JsonFlatten +public class ServiceEndpointPolicyDefinitionInner extends SubResource { + /** + * A description for this rule. Restricted to 140 chars. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * Service endpoint name. + */ + @JsonProperty(value = "properties.service") + private String service; + + /** + * A list of service resources. + */ + @JsonProperty(value = "properties.serviceResources") + private List serviceResources; + + /** + * The provisioning state of the service endpoint policy definition + * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', + * 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get a description for this rule. Restricted to 140 chars. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set a description for this rule. Restricted to 140 chars. + * + * @param description the description value to set + * @return the ServiceEndpointPolicyDefinitionInner object itself. + */ + public ServiceEndpointPolicyDefinitionInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get service endpoint name. + * + * @return the service value + */ + public String service() { + return this.service; + } + + /** + * Set service endpoint name. + * + * @param service the service value to set + * @return the ServiceEndpointPolicyDefinitionInner object itself. + */ + public ServiceEndpointPolicyDefinitionInner withService(String service) { + this.service = service; + return this; + } + + /** + * Get a list of service resources. + * + * @return the serviceResources value + */ + public List serviceResources() { + return this.serviceResources; + } + + /** + * Set a list of service resources. + * + * @param serviceResources the serviceResources value to set + * @return the ServiceEndpointPolicyDefinitionInner object itself. + */ + public ServiceEndpointPolicyDefinitionInner withServiceResources(List serviceResources) { + this.serviceResources = serviceResources; + return this; + } + + /** + * Get the provisioning state of the service endpoint policy definition resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the ServiceEndpointPolicyDefinitionInner object itself. + */ + public ServiceEndpointPolicyDefinitionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionsImpl.java new file mode 100644 index 000000000000..6427468600b1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPolicyDefinitions; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPolicyDefinition; + +class ServiceEndpointPolicyDefinitionsImpl extends WrapperImpl implements ServiceEndpointPolicyDefinitions { + private final NetworkManager manager; + + ServiceEndpointPolicyDefinitionsImpl(NetworkManager manager) { + super(manager.inner().serviceEndpointPolicyDefinitions()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public ServiceEndpointPolicyDefinitionImpl define(String name) { + return wrapModel(name); + } + + private ServiceEndpointPolicyDefinitionImpl wrapModel(ServiceEndpointPolicyDefinitionInner inner) { + return new ServiceEndpointPolicyDefinitionImpl(inner, manager()); + } + + private ServiceEndpointPolicyDefinitionImpl wrapModel(String name) { + return new ServiceEndpointPolicyDefinitionImpl(name, this.manager()); + } + + @Override + public Observable listByResourceGroupAsync(final String resourceGroupName, final String serviceEndpointPolicyName) { + ServiceEndpointPolicyDefinitionsInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName, serviceEndpointPolicyName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceEndpointPolicyDefinition call(ServiceEndpointPolicyDefinitionInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) { + ServiceEndpointPolicyDefinitionsInner client = this.inner(); + return client.getAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName) + .flatMap(new Func1>() { + @Override + public Observable call(ServiceEndpointPolicyDefinitionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServiceEndpointPolicyDefinition)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) { + ServiceEndpointPolicyDefinitionsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionsInner.java new file mode 100644 index 000000000000..a7f36c768bb4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyDefinitionsInner.java @@ -0,0 +1,764 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 ServiceEndpointPolicyDefinitions. + */ +public class ServiceEndpointPolicyDefinitionsInner { + /** The Retrofit service to perform REST calls. */ + private ServiceEndpointPolicyDefinitionsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ServiceEndpointPolicyDefinitionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServiceEndpointPolicyDefinitionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ServiceEndpointPolicyDefinitionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ServiceEndpointPolicyDefinitions to be + * used by Retrofit to perform actually REST calls. + */ + interface ServiceEndpointPolicyDefinitionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPolicyDefinitions delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceEndpointPolicyName") String serviceEndpointPolicyName, @Path("serviceEndpointPolicyDefinitionName") String serviceEndpointPolicyDefinitionName, @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.network.v2019_09_01.ServiceEndpointPolicyDefinitions beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceEndpointPolicyName") String serviceEndpointPolicyName, @Path("serviceEndpointPolicyDefinitionName") String serviceEndpointPolicyDefinitionName, @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.network.v2019_09_01.ServiceEndpointPolicyDefinitions get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceEndpointPolicyName") String serviceEndpointPolicyName, @Path("serviceEndpointPolicyDefinitionName") String serviceEndpointPolicyDefinitionName, @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.network.v2019_09_01.ServiceEndpointPolicyDefinitions createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceEndpointPolicyName") String serviceEndpointPolicyName, @Path("serviceEndpointPolicyDefinitionName") String serviceEndpointPolicyDefinitionName, @Path("subscriptionId") String subscriptionId, @Body ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions, @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.network.v2019_09_01.ServiceEndpointPolicyDefinitions beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceEndpointPolicyName") String serviceEndpointPolicyName, @Path("serviceEndpointPolicyDefinitionName") String serviceEndpointPolicyDefinitionName, @Path("subscriptionId") String subscriptionId, @Body ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions, @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.network.v2019_09_01.ServiceEndpointPolicyDefinitions listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("serviceEndpointPolicyName") String serviceEndpointPolicyName, @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.network.v2019_09_01.ServiceEndpointPolicyDefinitions listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified ServiceEndpoint policy definitions. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the Service Endpoint Policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) { + deleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).toBlocking().last().body(); + } + + /** + * Deletes the specified ServiceEndpoint policy definitions. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the Service Endpoint Policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition. + * @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 serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName), serviceCallback); + } + + /** + * Deletes the specified ServiceEndpoint policy definitions. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the Service Endpoint Policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) { + return deleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified ServiceEndpoint policy definitions. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the Service Endpoint Policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName is required and cannot be null."); + } + if (serviceEndpointPolicyDefinitionName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyDefinitionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified ServiceEndpoint policy definitions. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the Service Endpoint Policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).toBlocking().single().body(); + } + + /** + * Deletes the specified ServiceEndpoint policy definitions. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the Service Endpoint Policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition. + * @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 serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName), serviceCallback); + } + + /** + * Deletes the specified ServiceEndpoint policy definitions. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the Service Endpoint Policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified ServiceEndpoint policy definitions. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the Service Endpoint Policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName is required and cannot be null."); + } + if (serviceEndpointPolicyDefinitionName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyDefinitionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, this.client.subscriptionId(), 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); + } + + /** + * Get the specified service endpoint policy definitions from service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy name. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ServiceEndpointPolicyDefinitionInner object if successful. + */ + public ServiceEndpointPolicyDefinitionInner get(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) { + return getWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).toBlocking().single().body(); + } + + /** + * Get the specified service endpoint policy definitions from service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy name. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. + * @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 serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName), serviceCallback); + } + + /** + * Get the specified service endpoint policy definitions from service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy name. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyDefinitionInner object + */ + public Observable getAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) { + return getWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).map(new Func1, ServiceEndpointPolicyDefinitionInner>() { + @Override + public ServiceEndpointPolicyDefinitionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the specified service endpoint policy definitions from service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy name. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyDefinitionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName is required and cannot be null."); + } + if (serviceEndpointPolicyDefinitionName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyDefinitionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates a service endpoint policy definition in the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. + * @param serviceEndpointPolicyDefinitions Parameters supplied to the create or update service endpoint policy 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 ServiceEndpointPolicyDefinitionInner object if successful. + */ + public ServiceEndpointPolicyDefinitionInner createOrUpdate(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions).toBlocking().last().body(); + } + + /** + * Creates or updates a service endpoint policy definition in the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. + * @param serviceEndpointPolicyDefinitions Parameters supplied to the create or update service endpoint policy 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 createOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions), serviceCallback); + } + + /** + * Creates or updates a service endpoint policy definition in the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. + * @param serviceEndpointPolicyDefinitions Parameters supplied to the create or update service endpoint policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions).map(new Func1, ServiceEndpointPolicyDefinitionInner>() { + @Override + public ServiceEndpointPolicyDefinitionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a service endpoint policy definition in the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. + * @param serviceEndpointPolicyDefinitions Parameters supplied to the create or update service endpoint policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName is required and cannot be null."); + } + if (serviceEndpointPolicyDefinitionName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyDefinitionName 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 (serviceEndpointPolicyDefinitions == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyDefinitions is required and cannot be null."); + } + Validator.validate(serviceEndpointPolicyDefinitions); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, this.client.subscriptionId(), serviceEndpointPolicyDefinitions, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a service endpoint policy definition in the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. + * @param serviceEndpointPolicyDefinitions Parameters supplied to the create or update service endpoint policy 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 ServiceEndpointPolicyDefinitionInner object if successful. + */ + public ServiceEndpointPolicyDefinitionInner beginCreateOrUpdate(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions).toBlocking().single().body(); + } + + /** + * Creates or updates a service endpoint policy definition in the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. + * @param serviceEndpointPolicyDefinitions Parameters supplied to the create or update service endpoint policy 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 beginCreateOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions), serviceCallback); + } + + /** + * Creates or updates a service endpoint policy definition in the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. + * @param serviceEndpointPolicyDefinitions Parameters supplied to the create or update service endpoint policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyDefinitionInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions).map(new Func1, ServiceEndpointPolicyDefinitionInner>() { + @Override + public ServiceEndpointPolicyDefinitionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a service endpoint policy definition in the specified service endpoint policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy. + * @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definition name. + * @param serviceEndpointPolicyDefinitions Parameters supplied to the create or update service endpoint policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceEndpointPolicyDefinitionInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName is required and cannot be null."); + } + if (serviceEndpointPolicyDefinitionName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyDefinitionName 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 (serviceEndpointPolicyDefinitions == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyDefinitions is required and cannot be null."); + } + Validator.validate(serviceEndpointPolicyDefinitions); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, this.client.subscriptionId(), serviceEndpointPolicyDefinitions, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 all service endpoint policy definitions in a service end point policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ServiceEndpointPolicyDefinitionInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, final String serviceEndpointPolicyName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, serviceEndpointPolicyName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all service endpoint policy definitions in a service end point policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy name. + * @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 serviceEndpointPolicyName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName, serviceEndpointPolicyName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all service endpoint policy definitions in a service end point policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceEndpointPolicyDefinitionInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, final String serviceEndpointPolicyName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all service endpoint policy definitions in a service end point policy. + * + * @param resourceGroupName The name of the resource group. + * @param serviceEndpointPolicyName The name of the service endpoint policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceEndpointPolicyDefinitionInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String serviceEndpointPolicyName) { + return listByResourceGroupSinglePageAsync(resourceGroupName, serviceEndpointPolicyName) + .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 all service endpoint policy definitions in a service end point policy. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param serviceEndpointPolicyName The name of the service endpoint policy name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceEndpointPolicyDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String serviceEndpointPolicyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (serviceEndpointPolicyName == null) { + throw new IllegalArgumentException("Parameter serviceEndpointPolicyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, serviceEndpointPolicyName, this.client.subscriptionId(), 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 all service endpoint policy definitions in a service end point policy. + * + * @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<ServiceEndpointPolicyDefinitionInner> 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 all service endpoint policy definitions in a service end point policy. + * + * @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 all service endpoint policy definitions in a service end point policy. + * + * @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<ServiceEndpointPolicyDefinitionInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all service endpoint policy definitions in a service end point policy. + * + * @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<ServiceEndpointPolicyDefinitionInner> 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 all service endpoint policy definitions in a service end point policy. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceEndpointPolicyDefinitionInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyImpl.java new file mode 100644 index 000000000000..85e9fea2d2c8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyImpl.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPolicy; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPolicyDefinition; +import com.microsoft.azure.management.network.v2019_09_01.Subnet; + +class ServiceEndpointPolicyImpl extends GroupableResourceCoreImpl implements ServiceEndpointPolicy, ServiceEndpointPolicy.Definition, ServiceEndpointPolicy.Update { + ServiceEndpointPolicyImpl(String name, ServiceEndpointPolicyInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ServiceEndpointPoliciesInner client = this.manager().inner().serviceEndpointPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ServiceEndpointPoliciesInner client = this.manager().inner().serviceEndpointPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ServiceEndpointPoliciesInner client = this.manager().inner().serviceEndpointPolicies(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public List serviceEndpointPolicyDefinitions() { + List lst = new ArrayList(); + if (this.inner().serviceEndpointPolicyDefinitions() != null) { + for (ServiceEndpointPolicyDefinitionInner inner : this.inner().serviceEndpointPolicyDefinitions()) { + lst.add( new ServiceEndpointPolicyDefinitionImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List subnets() { + List lst = new ArrayList(); + if (this.inner().subnets() != null) { + for (SubnetInner inner : this.inner().subnets()) { + lst.add( new SubnetImpl(inner, manager())); + } + } + return lst; + } + + @Override + public ServiceEndpointPolicyImpl withServiceEndpointPolicyDefinitions(List serviceEndpointPolicyDefinitions) { + this.inner().withServiceEndpointPolicyDefinitions(serviceEndpointPolicyDefinitions); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyInner.java new file mode 100644 index 000000000000..02fe52ebada9 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPolicyInner.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Service End point policy resource. + */ +@JsonFlatten +@SkipParentValidation +public class ServiceEndpointPolicyInner extends Resource { + /** + * A collection of service endpoint policy definitions of the service + * endpoint policy. + */ + @JsonProperty(value = "properties.serviceEndpointPolicyDefinitions") + private List serviceEndpointPolicyDefinitions; + + /** + * A collection of references to subnets. + */ + @JsonProperty(value = "properties.subnets", access = JsonProperty.Access.WRITE_ONLY) + private List subnets; + + /** + * The resource GUID property of the service endpoint policy resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the service endpoint policy resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get a collection of service endpoint policy definitions of the service endpoint policy. + * + * @return the serviceEndpointPolicyDefinitions value + */ + public List serviceEndpointPolicyDefinitions() { + return this.serviceEndpointPolicyDefinitions; + } + + /** + * Set a collection of service endpoint policy definitions of the service endpoint policy. + * + * @param serviceEndpointPolicyDefinitions the serviceEndpointPolicyDefinitions value to set + * @return the ServiceEndpointPolicyInner object itself. + */ + public ServiceEndpointPolicyInner withServiceEndpointPolicyDefinitions(List serviceEndpointPolicyDefinitions) { + this.serviceEndpointPolicyDefinitions = serviceEndpointPolicyDefinitions; + return this; + } + + /** + * Get a collection of references to subnets. + * + * @return the subnets value + */ + public List subnets() { + return this.subnets; + } + + /** + * Get the resource GUID property of the service endpoint policy resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the service endpoint policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the ServiceEndpointPolicyInner object itself. + */ + public ServiceEndpointPolicyInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsImpl.java new file mode 100644 index 000000000000..dc440f1fca5a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.ServiceTags; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ServiceTagsListResult; + +class ServiceTagsImpl extends WrapperImpl implements ServiceTags { + private final NetworkManager manager; + + ServiceTagsImpl(NetworkManager manager) { + super(manager.inner().serviceTags()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(String location) { + ServiceTagsInner client = this.inner(); + return client.listAsync(location) + .map(new Func1() { + @Override + public ServiceTagsListResult call(ServiceTagsListResultInner inner) { + return new ServiceTagsListResultImpl(inner, manager()); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsInner.java new file mode 100644 index 000000000000..f1c728ab23fa --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsInner.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.network.v2019_09_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 ServiceTags. + */ +public class ServiceTagsInner { + /** The Retrofit service to perform REST calls. */ + private ServiceTagsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ServiceTagsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServiceTagsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ServiceTagsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ServiceTags to be + * used by Retrofit to perform actually REST calls. + */ + interface ServiceTagsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.ServiceTags list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTags") + Observable> list(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of service tag information resources. + * + * @param location The location that will be used as a reference for version (not as a filter based on location, you will get the list of service tags with prefix details across all regions but limited to the cloud that your subscription belongs to). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ServiceTagsListResultInner object if successful. + */ + public ServiceTagsListResultInner list(String location) { + return listWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Gets a list of service tag information resources. + * + * @param location The location that will be used as a reference for version (not as a filter based on location, you will get the list of service tags with prefix details across all regions but limited to the cloud that your subscription belongs to). + * @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(String location, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Gets a list of service tag information resources. + * + * @param location The location that will be used as a reference for version (not as a filter based on location, you will get the list of service tags with prefix details across all regions but limited to the cloud that your subscription belongs to). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceTagsListResultInner object + */ + public Observable listAsync(String location) { + return listWithServiceResponseAsync(location).map(new Func1, ServiceTagsListResultInner>() { + @Override + public ServiceTagsListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a list of service tag information resources. + * + * @param location The location that will be used as a reference for version (not as a filter based on location, you will get the list of service tags with prefix details across all regions but limited to the cloud that your subscription belongs to). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceTagsListResultInner object + */ + public Observable> listWithServiceResponseAsync(String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(location, this.client.subscriptionId(), 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsListResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsListResultImpl.java new file mode 100644 index 000000000000..ce33d8cd4a35 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsListResultImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ServiceTagsListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ServiceTagInformation; + +class ServiceTagsListResultImpl extends WrapperImpl implements ServiceTagsListResult { + private final NetworkManager manager; + ServiceTagsListResultImpl(ServiceTagsListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String changeNumber() { + return this.inner().changeNumber(); + } + + @Override + public String cloud() { + return this.inner().cloud(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public List values() { + return this.inner().values(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsListResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsListResultInner.java new file mode 100644 index 000000000000..da01430c87d1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceTagsListResultInner.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ServiceTagInformation; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for the ListServiceTags API service call. + */ +public class ServiceTagsListResultInner { + /** + * The name of the cloud. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The ID of the cloud. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * The azure resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * The iteration number. + */ + @JsonProperty(value = "changeNumber", access = JsonProperty.Access.WRITE_ONLY) + private String changeNumber; + + /** + * The name of the cloud. + */ + @JsonProperty(value = "cloud", access = JsonProperty.Access.WRITE_ONLY) + private String cloud; + + /** + * The list of service tag information resources. + */ + @JsonProperty(value = "values", access = JsonProperty.Access.WRITE_ONLY) + private List values; + + /** + * Get the name of the cloud. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the ID of the cloud. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get the azure resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get the iteration number. + * + * @return the changeNumber value + */ + public String changeNumber() { + return this.changeNumber; + } + + /** + * Get the name of the cloud. + * + * @return the cloud value + */ + public String cloud() { + return this.cloud; + } + + /** + * Get the list of service tag information resources. + * + * @return the values value + */ + public List values() { + return this.values; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetImpl.java new file mode 100644 index 000000000000..adcddd32d626 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetImpl.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.Subnet; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPropertiesFormat; +import com.microsoft.azure.management.network.v2019_09_01.IPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.IPConfigurationProfile; +import com.microsoft.azure.management.network.v2019_09_01.Delegation; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.NetworkSecurityGroup; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.PrivateEndpoint; +import com.microsoft.azure.management.network.v2019_09_01.RouteTable; +import com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPolicy; + +class SubnetImpl extends CreatableUpdatableImpl implements Subnet, Subnet.Definition, Subnet.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String virtualNetworkName; + private String subnetName; + + SubnetImpl(String name, NetworkManager manager) { + super(name, new SubnetInner()); + this.manager = manager; + // Set resource name + this.subnetName = name; + // + } + + SubnetImpl(SubnetInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.subnetName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.virtualNetworkName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualNetworks"); + this.subnetName = IdParsingUtils.getValueFromIdByName(inner.id(), "subnets"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + SubnetsInner client = this.manager().inner().subnets(); + return client.createOrUpdateAsync(this.resourceGroupName, this.virtualNetworkName, this.subnetName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + SubnetsInner client = this.manager().inner().subnets(); + return client.createOrUpdateAsync(this.resourceGroupName, this.virtualNetworkName, this.subnetName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + SubnetsInner client = this.manager().inner().subnets(); + return client.getAsync(this.resourceGroupName, this.virtualNetworkName, this.subnetName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String addressPrefix() { + return this.inner().addressPrefix(); + } + + @Override + public List addressPrefixes() { + return this.inner().addressPrefixes(); + } + + @Override + public List delegations() { + return this.inner().delegations(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public List ipConfigurationProfiles() { + return this.inner().ipConfigurationProfiles(); + } + + @Override + public List ipConfigurations() { + return this.inner().ipConfigurations(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public SubResource natGateway() { + return this.inner().natGateway(); + } + + @Override + public NetworkSecurityGroup networkSecurityGroup() { + NetworkSecurityGroupInner inner = this.inner().networkSecurityGroup(); + if (inner != null) { + return new NetworkSecurityGroupImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public String privateEndpointNetworkPolicies() { + return this.inner().privateEndpointNetworkPolicies(); + } + + @Override + public List privateEndpoints() { + List lst = new ArrayList(); + if (this.inner().privateEndpoints() != null) { + for (PrivateEndpointInner inner : this.inner().privateEndpoints()) { + lst.add( new PrivateEndpointImpl(inner.name(), inner, manager())); + } + } + return lst; + } + + @Override + public String privateLinkServiceNetworkPolicies() { + return this.inner().privateLinkServiceNetworkPolicies(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String purpose() { + return this.inner().purpose(); + } + + @Override + public List resourceNavigationLinks() { + return this.inner().resourceNavigationLinks(); + } + + @Override + public RouteTable routeTable() { + RouteTableInner inner = this.inner().routeTable(); + if (inner != null) { + return new RouteTableImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public List serviceAssociationLinks() { + return this.inner().serviceAssociationLinks(); + } + + @Override + public List serviceEndpointPolicies() { + List lst = new ArrayList(); + if (this.inner().serviceEndpointPolicies() != null) { + for (ServiceEndpointPolicyInner inner : this.inner().serviceEndpointPolicies()) { + lst.add( new ServiceEndpointPolicyImpl(inner.name(), inner, manager())); + } + } + return lst; + } + + @Override + public List serviceEndpoints() { + return this.inner().serviceEndpoints(); + } + + @Override + public SubnetImpl withExistingVirtualNetwork(String resourceGroupName, String virtualNetworkName) { + this.resourceGroupName = resourceGroupName; + this.virtualNetworkName = virtualNetworkName; + return this; + } + + @Override + public SubnetImpl withAddressPrefix(String addressPrefix) { + this.inner().withAddressPrefix(addressPrefix); + return this; + } + + @Override + public SubnetImpl withAddressPrefixes(List addressPrefixes) { + this.inner().withAddressPrefixes(addressPrefixes); + return this; + } + + @Override + public SubnetImpl withDelegations(List delegations) { + this.inner().withDelegations(delegations); + return this; + } + + @Override + public SubnetImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public SubnetImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public SubnetImpl withNatGateway(SubResource natGateway) { + this.inner().withNatGateway(natGateway); + return this; + } + + @Override + public SubnetImpl withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup) { + this.inner().withNetworkSecurityGroup(networkSecurityGroup); + return this; + } + + @Override + public SubnetImpl withPrivateEndpointNetworkPolicies(String privateEndpointNetworkPolicies) { + this.inner().withPrivateEndpointNetworkPolicies(privateEndpointNetworkPolicies); + return this; + } + + @Override + public SubnetImpl withPrivateLinkServiceNetworkPolicies(String privateLinkServiceNetworkPolicies) { + this.inner().withPrivateLinkServiceNetworkPolicies(privateLinkServiceNetworkPolicies); + return this; + } + + @Override + public SubnetImpl withRouteTable(RouteTableInner routeTable) { + this.inner().withRouteTable(routeTable); + return this; + } + + @Override + public SubnetImpl withServiceEndpointPolicies(List serviceEndpointPolicies) { + this.inner().withServiceEndpointPolicies(serviceEndpointPolicies); + return this; + } + + @Override + public SubnetImpl withServiceEndpoints(List serviceEndpoints) { + this.inner().withServiceEndpoints(serviceEndpoints); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetInner.java new file mode 100644 index 000000000000..5939927a52a5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetInner.java @@ -0,0 +1,438 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ServiceEndpointPropertiesFormat; +import com.microsoft.azure.management.network.v2019_09_01.IPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.IPConfigurationProfile; +import com.microsoft.azure.management.network.v2019_09_01.Delegation; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Subnet in a virtual network resource. + */ +@JsonFlatten +public class SubnetInner extends SubResource { + /** + * The address prefix for the subnet. + */ + @JsonProperty(value = "properties.addressPrefix") + private String addressPrefix; + + /** + * List of address prefixes for the subnet. + */ + @JsonProperty(value = "properties.addressPrefixes") + private List addressPrefixes; + + /** + * The reference of the NetworkSecurityGroup resource. + */ + @JsonProperty(value = "properties.networkSecurityGroup") + private NetworkSecurityGroupInner networkSecurityGroup; + + /** + * The reference of the RouteTable resource. + */ + @JsonProperty(value = "properties.routeTable") + private RouteTableInner routeTable; + + /** + * Nat gateway associated with this subnet. + */ + @JsonProperty(value = "properties.natGateway") + private SubResource natGateway; + + /** + * An array of service endpoints. + */ + @JsonProperty(value = "properties.serviceEndpoints") + private List serviceEndpoints; + + /** + * An array of service endpoint policies. + */ + @JsonProperty(value = "properties.serviceEndpointPolicies") + private List serviceEndpointPolicies; + + /** + * An array of references to private endpoints. + */ + @JsonProperty(value = "properties.privateEndpoints", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpoints; + + /** + * An array of references to the network interface IP configurations using + * subnet. + */ + @JsonProperty(value = "properties.ipConfigurations", access = JsonProperty.Access.WRITE_ONLY) + private List ipConfigurations; + + /** + * Array of IP configuration profiles which reference this subnet. + */ + @JsonProperty(value = "properties.ipConfigurationProfiles", access = JsonProperty.Access.WRITE_ONLY) + private List ipConfigurationProfiles; + + /** + * An array of references to the external resources using subnet. + */ + @JsonProperty(value = "properties.resourceNavigationLinks", access = JsonProperty.Access.WRITE_ONLY) + private List resourceNavigationLinks; + + /** + * An array of references to services injecting into this subnet. + */ + @JsonProperty(value = "properties.serviceAssociationLinks", access = JsonProperty.Access.WRITE_ONLY) + private List serviceAssociationLinks; + + /** + * An array of references to the delegations on the subnet. + */ + @JsonProperty(value = "properties.delegations") + private List delegations; + + /** + * A read-only string identifying the intention of use for this subnet + * based on delegations and other user-defined properties. + */ + @JsonProperty(value = "properties.purpose", access = JsonProperty.Access.WRITE_ONLY) + private String purpose; + + /** + * The provisioning state of the subnet resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Enable or Disable apply network policies on private end point in the + * subnet. + */ + @JsonProperty(value = "properties.privateEndpointNetworkPolicies") + private String privateEndpointNetworkPolicies; + + /** + * Enable or Disable apply network policies on private link service in the + * subnet. + */ + @JsonProperty(value = "properties.privateLinkServiceNetworkPolicies") + private String privateLinkServiceNetworkPolicies; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the address prefix for the subnet. + * + * @return the addressPrefix value + */ + public String addressPrefix() { + return this.addressPrefix; + } + + /** + * Set the address prefix for the subnet. + * + * @param addressPrefix the addressPrefix value to set + * @return the SubnetInner object itself. + */ + public SubnetInner withAddressPrefix(String addressPrefix) { + this.addressPrefix = addressPrefix; + return this; + } + + /** + * Get list of address prefixes for the subnet. + * + * @return the addressPrefixes value + */ + public List addressPrefixes() { + return this.addressPrefixes; + } + + /** + * Set list of address prefixes for the subnet. + * + * @param addressPrefixes the addressPrefixes value to set + * @return the SubnetInner object itself. + */ + public SubnetInner withAddressPrefixes(List addressPrefixes) { + this.addressPrefixes = addressPrefixes; + return this; + } + + /** + * Get the reference of the NetworkSecurityGroup resource. + * + * @return the networkSecurityGroup value + */ + public NetworkSecurityGroupInner networkSecurityGroup() { + return this.networkSecurityGroup; + } + + /** + * Set the reference of the NetworkSecurityGroup resource. + * + * @param networkSecurityGroup the networkSecurityGroup value to set + * @return the SubnetInner object itself. + */ + public SubnetInner withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup) { + this.networkSecurityGroup = networkSecurityGroup; + return this; + } + + /** + * Get the reference of the RouteTable resource. + * + * @return the routeTable value + */ + public RouteTableInner routeTable() { + return this.routeTable; + } + + /** + * Set the reference of the RouteTable resource. + * + * @param routeTable the routeTable value to set + * @return the SubnetInner object itself. + */ + public SubnetInner withRouteTable(RouteTableInner routeTable) { + this.routeTable = routeTable; + return this; + } + + /** + * Get nat gateway associated with this subnet. + * + * @return the natGateway value + */ + public SubResource natGateway() { + return this.natGateway; + } + + /** + * Set nat gateway associated with this subnet. + * + * @param natGateway the natGateway value to set + * @return the SubnetInner object itself. + */ + public SubnetInner withNatGateway(SubResource natGateway) { + this.natGateway = natGateway; + return this; + } + + /** + * Get an array of service endpoints. + * + * @return the serviceEndpoints value + */ + public List serviceEndpoints() { + return this.serviceEndpoints; + } + + /** + * Set an array of service endpoints. + * + * @param serviceEndpoints the serviceEndpoints value to set + * @return the SubnetInner object itself. + */ + public SubnetInner withServiceEndpoints(List serviceEndpoints) { + this.serviceEndpoints = serviceEndpoints; + return this; + } + + /** + * Get an array of service endpoint policies. + * + * @return the serviceEndpointPolicies value + */ + public List serviceEndpointPolicies() { + return this.serviceEndpointPolicies; + } + + /** + * Set an array of service endpoint policies. + * + * @param serviceEndpointPolicies the serviceEndpointPolicies value to set + * @return the SubnetInner object itself. + */ + public SubnetInner withServiceEndpointPolicies(List serviceEndpointPolicies) { + this.serviceEndpointPolicies = serviceEndpointPolicies; + return this; + } + + /** + * Get an array of references to private endpoints. + * + * @return the privateEndpoints value + */ + public List privateEndpoints() { + return this.privateEndpoints; + } + + /** + * Get an array of references to the network interface IP configurations using subnet. + * + * @return the ipConfigurations value + */ + public List ipConfigurations() { + return this.ipConfigurations; + } + + /** + * Get array of IP configuration profiles which reference this subnet. + * + * @return the ipConfigurationProfiles value + */ + public List ipConfigurationProfiles() { + return this.ipConfigurationProfiles; + } + + /** + * Get an array of references to the external resources using subnet. + * + * @return the resourceNavigationLinks value + */ + public List resourceNavigationLinks() { + return this.resourceNavigationLinks; + } + + /** + * Get an array of references to services injecting into this subnet. + * + * @return the serviceAssociationLinks value + */ + public List serviceAssociationLinks() { + return this.serviceAssociationLinks; + } + + /** + * Get an array of references to the delegations on the subnet. + * + * @return the delegations value + */ + public List delegations() { + return this.delegations; + } + + /** + * Set an array of references to the delegations on the subnet. + * + * @param delegations the delegations value to set + * @return the SubnetInner object itself. + */ + public SubnetInner withDelegations(List delegations) { + this.delegations = delegations; + return this; + } + + /** + * Get a read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties. + * + * @return the purpose value + */ + public String purpose() { + return this.purpose; + } + + /** + * Get the provisioning state of the subnet resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get enable or Disable apply network policies on private end point in the subnet. + * + * @return the privateEndpointNetworkPolicies value + */ + public String privateEndpointNetworkPolicies() { + return this.privateEndpointNetworkPolicies; + } + + /** + * Set enable or Disable apply network policies on private end point in the subnet. + * + * @param privateEndpointNetworkPolicies the privateEndpointNetworkPolicies value to set + * @return the SubnetInner object itself. + */ + public SubnetInner withPrivateEndpointNetworkPolicies(String privateEndpointNetworkPolicies) { + this.privateEndpointNetworkPolicies = privateEndpointNetworkPolicies; + return this; + } + + /** + * Get enable or Disable apply network policies on private link service in the subnet. + * + * @return the privateLinkServiceNetworkPolicies value + */ + public String privateLinkServiceNetworkPolicies() { + return this.privateLinkServiceNetworkPolicies; + } + + /** + * Set enable or Disable apply network policies on private link service in the subnet. + * + * @param privateLinkServiceNetworkPolicies the privateLinkServiceNetworkPolicies value to set + * @return the SubnetInner object itself. + */ + public SubnetInner withPrivateLinkServiceNetworkPolicies(String privateLinkServiceNetworkPolicies) { + this.privateLinkServiceNetworkPolicies = privateLinkServiceNetworkPolicies; + return this; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the SubnetInner object itself. + */ + public SubnetInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetsImpl.java new file mode 100644 index 000000000000..c3f67d60fb12 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetsImpl.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.Subnets; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.PrepareNetworkPoliciesRequest; +import com.microsoft.azure.management.network.v2019_09_01.Subnet; + +class SubnetsImpl extends WrapperImpl implements Subnets { + private final NetworkManager manager; + + SubnetsImpl(NetworkManager manager) { + super(manager.inner().subnets()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public SubnetImpl define(String name) { + return wrapModel(name); + } + + private SubnetImpl wrapModel(SubnetInner inner) { + return new SubnetImpl(inner, manager()); + } + + private SubnetImpl wrapModel(String name) { + return new SubnetImpl(name, this.manager()); + } + + @Override + public Completable prepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName, PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters) { + SubnetsInner client = this.inner(); + return client.prepareNetworkPoliciesAsync(resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters).toCompletable(); + } + + @Override + public Completable unprepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + SubnetsInner client = this.inner(); + return client.unprepareNetworkPoliciesAsync(resourceGroupName, virtualNetworkName, subnetName).toCompletable(); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String virtualNetworkName) { + SubnetsInner client = this.inner(); + return client.listAsync(resourceGroupName, virtualNetworkName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Subnet call(SubnetInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + SubnetsInner client = this.inner(); + return client.getAsync(resourceGroupName, virtualNetworkName, subnetName) + .flatMap(new Func1>() { + @Override + public Observable call(SubnetInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Subnet)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + SubnetsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, virtualNetworkName, subnetName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetsInner.java new file mode 100644 index 000000000000..29d9057d13a6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetsInner.java @@ -0,0 +1,1393 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.PrepareNetworkPoliciesRequest; +import com.microsoft.azure.management.network.v2019_09_01.UnprepareNetworkPoliciesRequest; +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.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in Subnets. + */ +public class SubnetsInner { + /** The Retrofit service to perform REST calls. */ + private SubnetsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of SubnetsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public SubnetsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(SubnetsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Subnets to be + * used by Retrofit to perform actually REST calls. + */ + interface SubnetsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.Subnets delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subnetName") String subnetName, @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.network.v2019_09_01.Subnets beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subnetName") String subnetName, @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.network.v2019_09_01.Subnets get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subnetName") String subnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.Subnets createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subnetName") String subnetName, @Path("subscriptionId") String subscriptionId, @Body SubnetInner subnetParameters, @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.network.v2019_09_01.Subnets beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subnetName") String subnetName, @Path("subscriptionId") String subscriptionId, @Body SubnetInner subnetParameters, @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.network.v2019_09_01.Subnets prepareNetworkPolicies" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies") + Observable> prepareNetworkPolicies(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subnetName") String subnetName, @Path("subscriptionId") String subscriptionId, @Body PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters, @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.network.v2019_09_01.Subnets beginPrepareNetworkPolicies" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies") + Observable> beginPrepareNetworkPolicies(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subnetName") String subnetName, @Path("subscriptionId") String subscriptionId, @Body PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters, @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.network.v2019_09_01.Subnets unprepareNetworkPolicies" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies") + Observable> unprepareNetworkPolicies(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subnetName") String subnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UnprepareNetworkPoliciesRequest unprepareNetworkPoliciesRequestParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.Subnets beginUnprepareNetworkPolicies" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies") + Observable> beginUnprepareNetworkPolicies(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subnetName") String subnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UnprepareNetworkPoliciesRequest unprepareNetworkPoliciesRequestParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.Subnets list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @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.network.v2019_09_01.Subnets listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualNetworkName, String subnetName) { + deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().last().body(); + } + + /** + * Deletes the specified subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @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 virtualNetworkName, String subnetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName), serviceCallback); + } + + /** + * Deletes the specified subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + return deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualNetworkName, String subnetName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().single().body(); + } + + /** + * Deletes the specified subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @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 virtualNetworkName, String subnetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName), serviceCallback); + } + + /** + * Deletes the specified subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified subnet by virtual network and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 SubnetInner object if successful. + */ + public SubnetInner get(String resourceGroupName, String virtualNetworkName, String subnetName) { + return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().single().body(); + } + + /** + * Gets the specified subnet by virtual network and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @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 virtualNetworkName, String subnetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName), serviceCallback); + } + + /** + * Gets the specified subnet by virtual network and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SubnetInner object + */ + public Observable getAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).map(new Func1, SubnetInner>() { + @Override + public SubnetInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified subnet by virtual network and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SubnetInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified subnet by virtual network and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 SubnetInner object if successful. + */ + public SubnetInner get(String resourceGroupName, String virtualNetworkName, String subnetName, String expand) { + return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified subnet by virtual network and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param expand Expands referenced resources. + * @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 virtualNetworkName, String subnetName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, expand), serviceCallback); + } + + /** + * Gets the specified subnet by virtual network and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SubnetInner object + */ + public Observable getAsync(String resourceGroupName, String virtualNetworkName, String subnetName, String expand) { + return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, expand).map(new Func1, SubnetInner>() { + @Override + public SubnetInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified subnet by virtual network and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SubnetInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Creates or updates a subnet in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param subnetParameters Parameters supplied to the create or update subnet 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 SubnetInner object if successful. + */ + public SubnetInner createOrUpdate(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, subnetParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a subnet in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param subnetParameters Parameters supplied to the create or update subnet 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 createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, subnetParameters), serviceCallback); + } + + /** + * Creates or updates a subnet in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param subnetParameters Parameters supplied to the create or update subnet operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, subnetParameters).map(new Func1, SubnetInner>() { + @Override + public SubnetInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a subnet in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param subnetParameters Parameters supplied to the create or update subnet operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName 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 (subnetParameters == null) { + throw new IllegalArgumentException("Parameter subnetParameters is required and cannot be null."); + } + Validator.validate(subnetParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), subnetParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a subnet in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param subnetParameters Parameters supplied to the create or update subnet 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 SubnetInner object if successful. + */ + public SubnetInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, subnetParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a subnet in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param subnetParameters Parameters supplied to the create or update subnet 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 beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, subnetParameters), serviceCallback); + } + + /** + * Creates or updates a subnet in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param subnetParameters Parameters supplied to the create or update subnet operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SubnetInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, subnetParameters).map(new Func1, SubnetInner>() { + @Override + public SubnetInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a subnet in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param subnetParameters Parameters supplied to the create or update subnet operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SubnetInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName 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 (subnetParameters == null) { + throw new IllegalArgumentException("Parameter subnetParameters is required and cannot be null."); + } + Validator.validate(subnetParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), subnetParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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); + } + + /** + * Prepares a subnet by applying network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param prepareNetworkPoliciesRequestParameters Parameters supplied to prepare subnet by applying network intent policies. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 prepareNetworkPolicies(String resourceGroupName, String virtualNetworkName, String subnetName, PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters) { + prepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters).toBlocking().last().body(); + } + + /** + * Prepares a subnet by applying network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param prepareNetworkPoliciesRequestParameters Parameters supplied to prepare subnet by applying network intent policies. + * @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 prepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName, PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(prepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters), serviceCallback); + } + + /** + * Prepares a subnet by applying network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param prepareNetworkPoliciesRequestParameters Parameters supplied to prepare subnet by applying network intent policies. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable prepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName, PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters) { + return prepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Prepares a subnet by applying network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param prepareNetworkPoliciesRequestParameters Parameters supplied to prepare subnet by applying network intent policies. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> prepareNetworkPoliciesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName, PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName 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 (prepareNetworkPoliciesRequestParameters == null) { + throw new IllegalArgumentException("Parameter prepareNetworkPoliciesRequestParameters is required and cannot be null."); + } + Validator.validate(prepareNetworkPoliciesRequestParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.prepareNetworkPolicies(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), prepareNetworkPoliciesRequestParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Prepares a subnet by applying network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param prepareNetworkPoliciesRequestParameters Parameters supplied to prepare subnet by applying network intent policies. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginPrepareNetworkPolicies(String resourceGroupName, String virtualNetworkName, String subnetName, PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters) { + beginPrepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters).toBlocking().single().body(); + } + + /** + * Prepares a subnet by applying network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param prepareNetworkPoliciesRequestParameters Parameters supplied to prepare subnet by applying network intent policies. + * @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 beginPrepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName, PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPrepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters), serviceCallback); + } + + /** + * Prepares a subnet by applying network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param prepareNetworkPoliciesRequestParameters Parameters supplied to prepare subnet by applying network intent policies. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginPrepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName, PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters) { + return beginPrepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Prepares a subnet by applying network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param prepareNetworkPoliciesRequestParameters Parameters supplied to prepare subnet by applying network intent policies. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginPrepareNetworkPoliciesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName, PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName 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 (prepareNetworkPoliciesRequestParameters == null) { + throw new IllegalArgumentException("Parameter prepareNetworkPoliciesRequestParameters is required and cannot be null."); + } + Validator.validate(prepareNetworkPoliciesRequestParameters); + final String apiVersion = "2019-09-01"; + return service.beginPrepareNetworkPolicies(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), prepareNetworkPoliciesRequestParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPrepareNetworkPoliciesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginPrepareNetworkPoliciesDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 unprepareNetworkPolicies(String resourceGroupName, String virtualNetworkName, String subnetName) { + unprepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().last().body(); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @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 unprepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(unprepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName), serviceCallback); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable unprepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + return unprepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> unprepareNetworkPoliciesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String serviceName = null; + UnprepareNetworkPoliciesRequest unprepareNetworkPoliciesRequestParameters = new UnprepareNetworkPoliciesRequest(); + unprepareNetworkPoliciesRequestParameters.withServiceName(null); + Observable> observable = service.unprepareNetworkPolicies(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), unprepareNetworkPoliciesRequestParameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param serviceName The name of the service for which subnet is being unprepared 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 unprepareNetworkPolicies(String resourceGroupName, String virtualNetworkName, String subnetName, String serviceName) { + unprepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, serviceName).toBlocking().last().body(); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param serviceName The name of the service for which subnet is being unprepared 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 unprepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(unprepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, serviceName), serviceCallback); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param serviceName The name of the service for which subnet is being unprepared for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable unprepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName, String serviceName) { + return unprepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param serviceName The name of the service for which subnet is being unprepared for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> unprepareNetworkPoliciesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName, String serviceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + UnprepareNetworkPoliciesRequest unprepareNetworkPoliciesRequestParameters = new UnprepareNetworkPoliciesRequest(); + unprepareNetworkPoliciesRequestParameters.withServiceName(serviceName); + Observable> observable = service.unprepareNetworkPolicies(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), unprepareNetworkPoliciesRequestParameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginUnprepareNetworkPolicies(String resourceGroupName, String virtualNetworkName, String subnetName) { + beginUnprepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().single().body(); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @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 beginUnprepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUnprepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName), serviceCallback); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginUnprepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + return beginUnprepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginUnprepareNetworkPoliciesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String serviceName = null; + UnprepareNetworkPoliciesRequest unprepareNetworkPoliciesRequestParameters = new UnprepareNetworkPoliciesRequest(); + unprepareNetworkPoliciesRequestParameters.withServiceName(null); + return service.beginUnprepareNetworkPolicies(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), unprepareNetworkPoliciesRequestParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUnprepareNetworkPoliciesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param serviceName The name of the service for which subnet is being unprepared 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 beginUnprepareNetworkPolicies(String resourceGroupName, String virtualNetworkName, String subnetName, String serviceName) { + beginUnprepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, serviceName).toBlocking().single().body(); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param serviceName The name of the service for which subnet is being unprepared 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 beginUnprepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUnprepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, serviceName), serviceCallback); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param serviceName The name of the service for which subnet is being unprepared for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginUnprepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName, String serviceName) { + return beginUnprepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Unprepares a subnet by removing network intent policies. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param serviceName The name of the service for which subnet is being unprepared for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginUnprepareNetworkPoliciesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName, String serviceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + UnprepareNetworkPoliciesRequest unprepareNetworkPoliciesRequestParameters = new UnprepareNetworkPoliciesRequest(); + unprepareNetworkPoliciesRequestParameters.withServiceName(serviceName); + return service.beginUnprepareNetworkPolicies(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), unprepareNetworkPoliciesRequestParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUnprepareNetworkPoliciesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUnprepareNetworkPoliciesDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<SubnetInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String virtualNetworkName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, virtualNetworkName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @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 resourceGroupName, final String virtualNetworkName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, virtualNetworkName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SubnetInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String virtualNetworkName) { + return listWithServiceResponseAsync(resourceGroupName, virtualNetworkName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SubnetInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String virtualNetworkName) { + return listSinglePageAsync(resourceGroupName, virtualNetworkName) + .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 all subnets in a virtual network. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SubnetInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String virtualNetworkName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), 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 all subnets in a virtual network. + * + * @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<SubnetInner> 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 all subnets in a virtual network. + * + * @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 all subnets in a virtual network. + * + * @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<SubnetInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all subnets in a virtual network. + * + * @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<SubnetInner> 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 all subnets in a virtual network. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SubnetInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TopologyImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TopologyImpl.java new file mode 100644 index 000000000000..df5678081bfe --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TopologyImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.Topology; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.TopologyResource; + +class TopologyImpl extends WrapperImpl implements Topology { + private final NetworkManager manager; + TopologyImpl(TopologyInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public DateTime createdDateTime() { + return this.inner().createdDateTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public DateTime lastModified() { + return this.inner().lastModified(); + } + + @Override + public List resources() { + return this.inner().resources(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TopologyInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TopologyInner.java new file mode 100644 index 000000000000..7630bc84e579 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TopologyInner.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.TopologyResource; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Topology of the specified resource group. + */ +public class TopologyInner { + /** + * GUID representing the operation id. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * The datetime when the topology was initially created for the resource + * group. + */ + @JsonProperty(value = "createdDateTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime createdDateTime; + + /** + * The datetime when the topology was last modified. + */ + @JsonProperty(value = "lastModified", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModified; + + /** + * A list of topology resources. + */ + @JsonProperty(value = "resources") + private List resources; + + /** + * Get gUID representing the operation id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get the datetime when the topology was initially created for the resource group. + * + * @return the createdDateTime value + */ + public DateTime createdDateTime() { + return this.createdDateTime; + } + + /** + * Get the datetime when the topology was last modified. + * + * @return the lastModified value + */ + public DateTime lastModified() { + return this.lastModified; + } + + /** + * Get a list of topology resources. + * + * @return the resources value + */ + public List resources() { + return this.resources; + } + + /** + * Set a list of topology resources. + * + * @param resources the resources value to set + * @return the TopologyInner object itself. + */ + public TopologyInner withResources(List resources) { + this.resources = resources; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TroubleshootingResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TroubleshootingResultImpl.java new file mode 100644 index 000000000000..44ce92a29aed --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TroubleshootingResultImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.TroubleshootingResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.TroubleshootingDetails; + +class TroubleshootingResultImpl extends WrapperImpl implements TroubleshootingResult { + private final NetworkManager manager; + TroubleshootingResultImpl(TroubleshootingResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String code() { + return this.inner().code(); + } + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public List results() { + return this.inner().results(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TroubleshootingResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TroubleshootingResultInner.java new file mode 100644 index 000000000000..50be2196b91c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/TroubleshootingResultInner.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.TroubleshootingDetails; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Troubleshooting information gained from specified resource. + */ +public class TroubleshootingResultInner { + /** + * The start time of the troubleshooting. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * The end time of the troubleshooting. + */ + @JsonProperty(value = "endTime") + private DateTime endTime; + + /** + * The result code of the troubleshooting. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Information from troubleshooting. + */ + @JsonProperty(value = "results") + private List results; + + /** + * Get the start time of the troubleshooting. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the start time of the troubleshooting. + * + * @param startTime the startTime value to set + * @return the TroubleshootingResultInner object itself. + */ + public TroubleshootingResultInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the end time of the troubleshooting. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the end time of the troubleshooting. + * + * @param endTime the endTime value to set + * @return the TroubleshootingResultInner object itself. + */ + public TroubleshootingResultInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the result code of the troubleshooting. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the result code of the troubleshooting. + * + * @param code the code value to set + * @return the TroubleshootingResultInner object itself. + */ + public TroubleshootingResultInner withCode(String code) { + this.code = code; + return this; + } + + /** + * Get information from troubleshooting. + * + * @return the results value + */ + public List results() { + return this.results; + } + + /** + * Set information from troubleshooting. + * + * @param results the results value to set + * @return the TroubleshootingResultInner object itself. + */ + public TroubleshootingResultInner withResults(List results) { + this.results = results; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsageImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsageImpl.java new file mode 100644 index 000000000000..84a53476d79c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsageImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.Usage; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.UsageName; + +class UsageImpl extends WrapperImpl implements Usage { + private final NetworkManager manager; + + UsageImpl(UsageInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public long currentValue() { + return this.inner().currentValue(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public long limit() { + return this.inner().limit(); + } + + @Override + public UsageName name() { + return this.inner().name(); + } + + @Override + public String unit() { + return this.inner().unit(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsageInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsageInner.java new file mode 100644 index 000000000000..ec9a6c260b0c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsageInner.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.UsageName; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes network resource usage. + */ +public class UsageInner { + /** + * Resource identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * An enum describing the unit of measurement. + */ + @JsonProperty(value = "unit", required = true) + private String unit; + + /** + * The current value of the usage. + */ + @JsonProperty(value = "currentValue", required = true) + private long currentValue; + + /** + * The limit of usage. + */ + @JsonProperty(value = "limit", required = true) + private long limit; + + /** + * The name of the type of usage. + */ + @JsonProperty(value = "name", required = true) + private UsageName name; + + /** + * Creates an instance of UsageInner class. + * @param currentValue the current value of the usage. + * @param limit the limit of usage. + * @param name the name of the type of usage. + */ + public UsageInner() { + unit = "Count"; + } + + /** + * Get resource identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get an enum describing the unit of measurement. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set an enum describing the unit of measurement. + * + * @param unit the unit value to set + * @return the UsageInner object itself. + */ + public UsageInner withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the current value of the usage. + * + * @return the currentValue value + */ + public long currentValue() { + return this.currentValue; + } + + /** + * Set the current value of the usage. + * + * @param currentValue the currentValue value to set + * @return the UsageInner object itself. + */ + public UsageInner withCurrentValue(long currentValue) { + this.currentValue = currentValue; + return this; + } + + /** + * Get the limit of usage. + * + * @return the limit value + */ + public long limit() { + return this.limit; + } + + /** + * Set the limit of usage. + * + * @param limit the limit value to set + * @return the UsageInner object itself. + */ + public UsageInner withLimit(long limit) { + this.limit = limit; + return this; + } + + /** + * Get the name of the type of usage. + * + * @return the name value + */ + public UsageName name() { + return this.name; + } + + /** + * Set the name of the type of usage. + * + * @param name the name value to set + * @return the UsageInner object itself. + */ + public UsageInner withName(UsageName name) { + this.name = name; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsagesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsagesImpl.java new file mode 100644 index 000000000000..c9af6c058995 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsagesImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.Usages; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.Usage; + +class UsagesImpl extends WrapperImpl implements Usages { + private final NetworkManager manager; + + UsagesImpl(NetworkManager manager) { + super(manager.inner().usages()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private UsageImpl wrapModel(UsageInner inner) { + return new UsageImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String location) { + UsagesInner client = this.inner(); + return client.listAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Usage call(UsageInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsagesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsagesInner.java new file mode 100644 index 000000000000..c2e63a476bf0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/UsagesInner.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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.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 Usages. + */ +public class UsagesInner { + /** The Retrofit service to perform REST calls. */ + private UsagesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of UsagesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public UsagesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(UsagesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Usages to be + * used by Retrofit to perform actually REST calls. + */ + interface UsagesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.Usages list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages") + Observable> list(@Path("location") String location, @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.network.v2019_09_01.Usages listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List network usages for a subscription. + * + * @param location The location where resource usage is queried. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<UsageInner> object if successful. + */ + public PagedList list(final String location) { + ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List network usages for a subscription. + * + * @param location The location where resource usage is queried. + * @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 location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List network usages for a subscription. + * + * @param location The location where resource usage is queried. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageInner> object + */ + public Observable> listAsync(final String location) { + return listWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List network usages for a subscription. + * + * @param location The location where resource usage is queried. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageInner> object + */ + public Observable>> listWithServiceResponseAsync(final String location) { + return listSinglePageAsync(location) + .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)); + } + }); + } + + /** + * List network usages for a subscription. + * + ServiceResponse> * @param location The location where resource usage is queried. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UsageInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(location, this.client.subscriptionId(), 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); + } + + /** + * List network usages for a subscription. + * + * @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<UsageInner> 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(); + } + }; + } + + /** + * List network usages for a subscription. + * + * @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); + } + + /** + * List network usages for a subscription. + * + * @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<UsageInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List network usages for a subscription. + * + * @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<UsageInner> 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)); + } + }); + } + + /** + * List network usages for a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UsageInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VerificationIPFlowResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VerificationIPFlowResultImpl.java new file mode 100644 index 000000000000..a3edb8101e1d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VerificationIPFlowResultImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VerificationIPFlowResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.Access; + +class VerificationIPFlowResultImpl extends WrapperImpl implements VerificationIPFlowResult { + private final NetworkManager manager; + VerificationIPFlowResultImpl(VerificationIPFlowResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Access access() { + return this.inner().access(); + } + + @Override + public String ruleName() { + return this.inner().ruleName(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VerificationIPFlowResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VerificationIPFlowResultInner.java new file mode 100644 index 000000000000..a0d910f7088d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VerificationIPFlowResultInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.Access; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results of IP flow verification on the target resource. + */ +public class VerificationIPFlowResultInner { + /** + * Indicates whether the traffic is allowed or denied. Possible values + * include: 'Allow', 'Deny'. + */ + @JsonProperty(value = "access") + private Access access; + + /** + * Name of the rule. If input is not matched against any security rule, it + * is not displayed. + */ + @JsonProperty(value = "ruleName") + private String ruleName; + + /** + * Get indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'. + * + * @return the access value + */ + public Access access() { + return this.access; + } + + /** + * Set indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'. + * + * @param access the access value to set + * @return the VerificationIPFlowResultInner object itself. + */ + public VerificationIPFlowResultInner withAccess(Access access) { + this.access = access; + return this; + } + + /** + * Get name of the rule. If input is not matched against any security rule, it is not displayed. + * + * @return the ruleName value + */ + public String ruleName() { + return this.ruleName; + } + + /** + * Set name of the rule. If input is not matched against any security rule, it is not displayed. + * + * @param ruleName the ruleName value to set + * @return the VerificationIPFlowResultInner object itself. + */ + public VerificationIPFlowResultInner withRuleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubImpl.java new file mode 100644 index 000000000000..51ac6f2313db --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHub; +import rx.Observable; +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHubRouteTable; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHubRouteTableV2; +import com.microsoft.azure.management.network.v2019_09_01.HubVirtualNetworkConnection; + +class VirtualHubImpl extends GroupableResourceCoreImpl implements VirtualHub, VirtualHub.Definition, VirtualHub.Update { + VirtualHubImpl(String name, VirtualHubInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + VirtualHubsInner client = this.manager().inner().virtualHubs(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VirtualHubsInner client = this.manager().inner().virtualHubs(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VirtualHubsInner client = this.manager().inner().virtualHubs(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String addressPrefix() { + return this.inner().addressPrefix(); + } + + @Override + public SubResource azureFirewall() { + return this.inner().azureFirewall(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public SubResource expressRouteGateway() { + return this.inner().expressRouteGateway(); + } + + @Override + public SubResource p2SVpnGateway() { + return this.inner().p2SVpnGateway(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public VirtualHubRouteTable routeTable() { + return this.inner().routeTable(); + } + + @Override + public String securityProviderName() { + return this.inner().securityProviderName(); + } + + @Override + public String sku() { + return this.inner().sku(); + } + + @Override + public List virtualHubRouteTableV2s() { + List lst = new ArrayList(); + if (this.inner().virtualHubRouteTableV2s() != null) { + for (VirtualHubRouteTableV2Inner inner : this.inner().virtualHubRouteTableV2s()) { + lst.add( new VirtualHubRouteTableV2Impl(inner, manager())); + } + } + return lst; + } + + @Override + public List virtualNetworkConnections() { + List lst = new ArrayList(); + if (this.inner().virtualNetworkConnections() != null) { + for (HubVirtualNetworkConnectionInner inner : this.inner().virtualNetworkConnections()) { + lst.add( new HubVirtualNetworkConnectionImpl(inner, manager())); + } + } + return lst; + } + + @Override + public SubResource virtualWan() { + return this.inner().virtualWan(); + } + + @Override + public SubResource vpnGateway() { + return this.inner().vpnGateway(); + } + + @Override + public VirtualHubImpl withAddressPrefix(String addressPrefix) { + this.inner().withAddressPrefix(addressPrefix); + return this; + } + + @Override + public VirtualHubImpl withAzureFirewall(SubResource azureFirewall) { + this.inner().withAzureFirewall(azureFirewall); + return this; + } + + @Override + public VirtualHubImpl withExpressRouteGateway(SubResource expressRouteGateway) { + this.inner().withExpressRouteGateway(expressRouteGateway); + return this; + } + + @Override + public VirtualHubImpl withP2SVpnGateway(SubResource p2SVpnGateway) { + this.inner().withP2SVpnGateway(p2SVpnGateway); + return this; + } + + @Override + public VirtualHubImpl withRouteTable(VirtualHubRouteTable routeTable) { + this.inner().withRouteTable(routeTable); + return this; + } + + @Override + public VirtualHubImpl withSecurityProviderName(String securityProviderName) { + this.inner().withSecurityProviderName(securityProviderName); + return this; + } + + @Override + public VirtualHubImpl withSku(String sku) { + this.inner().withSku(sku); + return this; + } + + @Override + public VirtualHubImpl withVirtualHubRouteTableV2s(List virtualHubRouteTableV2s) { + this.inner().withVirtualHubRouteTableV2s(virtualHubRouteTableV2s); + return this; + } + + @Override + public VirtualHubImpl withVirtualNetworkConnections(List virtualNetworkConnections) { + this.inner().withVirtualNetworkConnections(virtualNetworkConnections); + return this; + } + + @Override + public VirtualHubImpl withVirtualWan(SubResource virtualWan) { + this.inner().withVirtualWan(virtualWan); + return this; + } + + @Override + public VirtualHubImpl withVpnGateway(SubResource vpnGateway) { + this.inner().withVpnGateway(vpnGateway); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubInner.java new file mode 100644 index 000000000000..07ed599cf2ea --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHubRouteTable; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * VirtualHub Resource. + */ +@JsonFlatten +@SkipParentValidation +public class VirtualHubInner extends Resource { + /** + * The VirtualWAN to which the VirtualHub belongs. + */ + @JsonProperty(value = "properties.virtualWan") + private SubResource virtualWan; + + /** + * The VpnGateway associated with this VirtualHub. + */ + @JsonProperty(value = "properties.vpnGateway") + private SubResource vpnGateway; + + /** + * The P2SVpnGateway associated with this VirtualHub. + */ + @JsonProperty(value = "properties.p2SVpnGateway") + private SubResource p2SVpnGateway; + + /** + * The expressRouteGateway associated with this VirtualHub. + */ + @JsonProperty(value = "properties.expressRouteGateway") + private SubResource expressRouteGateway; + + /** + * The azureFirewall associated with this VirtualHub. + */ + @JsonProperty(value = "properties.azureFirewall") + private SubResource azureFirewall; + + /** + * List of all vnet connections with this VirtualHub. + */ + @JsonProperty(value = "properties.virtualNetworkConnections") + private List virtualNetworkConnections; + + /** + * Address-prefix for this VirtualHub. + */ + @JsonProperty(value = "properties.addressPrefix") + private String addressPrefix; + + /** + * The routeTable associated with this virtual hub. + */ + @JsonProperty(value = "properties.routeTable") + private VirtualHubRouteTable routeTable; + + /** + * The provisioning state of the virtual hub resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The Security Provider name. + */ + @JsonProperty(value = "properties.securityProviderName") + private String securityProviderName; + + /** + * List of all virtual hub route table v2s associated with this VirtualHub. + */ + @JsonProperty(value = "properties.virtualHubRouteTableV2s") + private List virtualHubRouteTableV2s; + + /** + * The sku of this VirtualHub. + */ + @JsonProperty(value = "properties.sku") + private String sku; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the VirtualWAN to which the VirtualHub belongs. + * + * @return the virtualWan value + */ + public SubResource virtualWan() { + return this.virtualWan; + } + + /** + * Set the VirtualWAN to which the VirtualHub belongs. + * + * @param virtualWan the virtualWan value to set + * @return the VirtualHubInner object itself. + */ + public VirtualHubInner withVirtualWan(SubResource virtualWan) { + this.virtualWan = virtualWan; + return this; + } + + /** + * Get the VpnGateway associated with this VirtualHub. + * + * @return the vpnGateway value + */ + public SubResource vpnGateway() { + return this.vpnGateway; + } + + /** + * Set the VpnGateway associated with this VirtualHub. + * + * @param vpnGateway the vpnGateway value to set + * @return the VirtualHubInner object itself. + */ + public VirtualHubInner withVpnGateway(SubResource vpnGateway) { + this.vpnGateway = vpnGateway; + return this; + } + + /** + * Get the P2SVpnGateway associated with this VirtualHub. + * + * @return the p2SVpnGateway value + */ + public SubResource p2SVpnGateway() { + return this.p2SVpnGateway; + } + + /** + * Set the P2SVpnGateway associated with this VirtualHub. + * + * @param p2SVpnGateway the p2SVpnGateway value to set + * @return the VirtualHubInner object itself. + */ + public VirtualHubInner withP2SVpnGateway(SubResource p2SVpnGateway) { + this.p2SVpnGateway = p2SVpnGateway; + return this; + } + + /** + * Get the expressRouteGateway associated with this VirtualHub. + * + * @return the expressRouteGateway value + */ + public SubResource expressRouteGateway() { + return this.expressRouteGateway; + } + + /** + * Set the expressRouteGateway associated with this VirtualHub. + * + * @param expressRouteGateway the expressRouteGateway value to set + * @return the VirtualHubInner object itself. + */ + public VirtualHubInner withExpressRouteGateway(SubResource expressRouteGateway) { + this.expressRouteGateway = expressRouteGateway; + return this; + } + + /** + * Get the azureFirewall associated with this VirtualHub. + * + * @return the azureFirewall value + */ + public SubResource azureFirewall() { + return this.azureFirewall; + } + + /** + * Set the azureFirewall associated with this VirtualHub. + * + * @param azureFirewall the azureFirewall value to set + * @return the VirtualHubInner object itself. + */ + public VirtualHubInner withAzureFirewall(SubResource azureFirewall) { + this.azureFirewall = azureFirewall; + return this; + } + + /** + * Get list of all vnet connections with this VirtualHub. + * + * @return the virtualNetworkConnections value + */ + public List virtualNetworkConnections() { + return this.virtualNetworkConnections; + } + + /** + * Set list of all vnet connections with this VirtualHub. + * + * @param virtualNetworkConnections the virtualNetworkConnections value to set + * @return the VirtualHubInner object itself. + */ + public VirtualHubInner withVirtualNetworkConnections(List virtualNetworkConnections) { + this.virtualNetworkConnections = virtualNetworkConnections; + return this; + } + + /** + * Get address-prefix for this VirtualHub. + * + * @return the addressPrefix value + */ + public String addressPrefix() { + return this.addressPrefix; + } + + /** + * Set address-prefix for this VirtualHub. + * + * @param addressPrefix the addressPrefix value to set + * @return the VirtualHubInner object itself. + */ + public VirtualHubInner withAddressPrefix(String addressPrefix) { + this.addressPrefix = addressPrefix; + return this; + } + + /** + * Get the routeTable associated with this virtual hub. + * + * @return the routeTable value + */ + public VirtualHubRouteTable routeTable() { + return this.routeTable; + } + + /** + * Set the routeTable associated with this virtual hub. + * + * @param routeTable the routeTable value to set + * @return the VirtualHubInner object itself. + */ + public VirtualHubInner withRouteTable(VirtualHubRouteTable routeTable) { + this.routeTable = routeTable; + return this; + } + + /** + * Get the provisioning state of the virtual hub resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the Security Provider name. + * + * @return the securityProviderName value + */ + public String securityProviderName() { + return this.securityProviderName; + } + + /** + * Set the Security Provider name. + * + * @param securityProviderName the securityProviderName value to set + * @return the VirtualHubInner object itself. + */ + public VirtualHubInner withSecurityProviderName(String securityProviderName) { + this.securityProviderName = securityProviderName; + return this; + } + + /** + * Get list of all virtual hub route table v2s associated with this VirtualHub. + * + * @return the virtualHubRouteTableV2s value + */ + public List virtualHubRouteTableV2s() { + return this.virtualHubRouteTableV2s; + } + + /** + * Set list of all virtual hub route table v2s associated with this VirtualHub. + * + * @param virtualHubRouteTableV2s the virtualHubRouteTableV2s value to set + * @return the VirtualHubInner object itself. + */ + public VirtualHubInner withVirtualHubRouteTableV2s(List virtualHubRouteTableV2s) { + this.virtualHubRouteTableV2s = virtualHubRouteTableV2s; + return this; + } + + /** + * Get the sku of this VirtualHub. + * + * @return the sku value + */ + public String sku() { + return this.sku; + } + + /** + * Set the sku of this VirtualHub. + * + * @param sku the sku value to set + * @return the VirtualHubInner object itself. + */ + public VirtualHubInner withSku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the VirtualHubInner object itself. + */ + public VirtualHubInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2Impl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2Impl.java new file mode 100644 index 000000000000..116e802a05e7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2Impl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VirtualHubRouteTableV2; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHubRouteV2; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class VirtualHubRouteTableV2Impl extends CreatableUpdatableImpl implements VirtualHubRouteTableV2, VirtualHubRouteTableV2.Definition, VirtualHubRouteTableV2.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String virtualHubName; + private String routeTableName; + + VirtualHubRouteTableV2Impl(String name, NetworkManager manager) { + super(name, new VirtualHubRouteTableV2Inner()); + this.manager = manager; + // Set resource name + this.routeTableName = name; + // + } + + VirtualHubRouteTableV2Impl(VirtualHubRouteTableV2Inner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.routeTableName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.virtualHubName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualHubs"); + this.routeTableName = IdParsingUtils.getValueFromIdByName(inner.id(), "routeTables"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + VirtualHubRouteTableV2sInner client = this.manager().inner().virtualHubRouteTableV2s(); + return client.createOrUpdateAsync(this.resourceGroupName, this.virtualHubName, this.routeTableName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VirtualHubRouteTableV2sInner client = this.manager().inner().virtualHubRouteTableV2s(); + return client.createOrUpdateAsync(this.resourceGroupName, this.virtualHubName, this.routeTableName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VirtualHubRouteTableV2sInner client = this.manager().inner().virtualHubRouteTableV2s(); + return client.getAsync(this.resourceGroupName, this.virtualHubName, this.routeTableName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public List attachedConnections() { + return this.inner().attachedConnections(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public List routes() { + return this.inner().routes(); + } + + @Override + public VirtualHubRouteTableV2Impl withExistingVirtualHub(String resourceGroupName, String virtualHubName) { + this.resourceGroupName = resourceGroupName; + this.virtualHubName = virtualHubName; + return this; + } + + @Override + public VirtualHubRouteTableV2Impl withAttachedConnections(List attachedConnections) { + this.inner().withAttachedConnections(attachedConnections); + return this; + } + + @Override + public VirtualHubRouteTableV2Impl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public VirtualHubRouteTableV2Impl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public VirtualHubRouteTableV2Impl withRoutes(List routes) { + this.inner().withRoutes(routes); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2Inner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2Inner.java new file mode 100644 index 000000000000..ee1b675b6cfe --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2Inner.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHubRouteV2; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * VirtualHubRouteTableV2 Resource. + */ +@JsonFlatten +public class VirtualHubRouteTableV2Inner extends SubResource { + /** + * List of all routes. + */ + @JsonProperty(value = "properties.routes") + private List routes; + + /** + * List of all connections attached to this route table v2. + */ + @JsonProperty(value = "properties.attachedConnections") + private List attachedConnections; + + /** + * The provisioning state of the virtual hub route table v2 resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get list of all routes. + * + * @return the routes value + */ + public List routes() { + return this.routes; + } + + /** + * Set list of all routes. + * + * @param routes the routes value to set + * @return the VirtualHubRouteTableV2Inner object itself. + */ + public VirtualHubRouteTableV2Inner withRoutes(List routes) { + this.routes = routes; + return this; + } + + /** + * Get list of all connections attached to this route table v2. + * + * @return the attachedConnections value + */ + public List attachedConnections() { + return this.attachedConnections; + } + + /** + * Set list of all connections attached to this route table v2. + * + * @param attachedConnections the attachedConnections value to set + * @return the VirtualHubRouteTableV2Inner object itself. + */ + public VirtualHubRouteTableV2Inner withAttachedConnections(List attachedConnections) { + this.attachedConnections = attachedConnections; + return this; + } + + /** + * Get the provisioning state of the virtual hub route table v2 resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the VirtualHubRouteTableV2Inner object itself. + */ + public VirtualHubRouteTableV2Inner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2sImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2sImpl.java new file mode 100644 index 000000000000..4c50cb692f08 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2sImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHubRouteTableV2s; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHubRouteTableV2; + +class VirtualHubRouteTableV2sImpl extends WrapperImpl implements VirtualHubRouteTableV2s { + private final NetworkManager manager; + + VirtualHubRouteTableV2sImpl(NetworkManager manager) { + super(manager.inner().virtualHubRouteTableV2s()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public VirtualHubRouteTableV2Impl define(String name) { + return wrapModel(name); + } + + private VirtualHubRouteTableV2Impl wrapModel(VirtualHubRouteTableV2Inner inner) { + return new VirtualHubRouteTableV2Impl(inner, manager()); + } + + private VirtualHubRouteTableV2Impl wrapModel(String name) { + return new VirtualHubRouteTableV2Impl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String virtualHubName) { + VirtualHubRouteTableV2sInner client = this.inner(); + return client.listAsync(resourceGroupName, virtualHubName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VirtualHubRouteTableV2 call(VirtualHubRouteTableV2Inner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String virtualHubName, String routeTableName) { + VirtualHubRouteTableV2sInner client = this.inner(); + return client.getAsync(resourceGroupName, virtualHubName, routeTableName) + .flatMap(new Func1>() { + @Override + public Observable call(VirtualHubRouteTableV2Inner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((VirtualHubRouteTableV2)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String virtualHubName, String routeTableName) { + VirtualHubRouteTableV2sInner client = this.inner(); + return client.deleteAsync(resourceGroupName, virtualHubName, routeTableName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2sInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2sInner.java new file mode 100644 index 000000000000..7baab3a918f7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubRouteTableV2sInner.java @@ -0,0 +1,765 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.ErrorException; +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 VirtualHubRouteTableV2s. + */ +public class VirtualHubRouteTableV2sInner { + /** The Retrofit service to perform REST calls. */ + private VirtualHubRouteTableV2sService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VirtualHubRouteTableV2sInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VirtualHubRouteTableV2sInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VirtualHubRouteTableV2sService.class); + this.client = client; + } + + /** + * The interface defining all the services for VirtualHubRouteTableV2s to be + * used by Retrofit to perform actually REST calls. + */ + interface VirtualHubRouteTableV2sService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualHubRouteTableV2s get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @Path("routeTableName") String routeTableName, @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.network.v2019_09_01.VirtualHubRouteTableV2s createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @Path("routeTableName") String routeTableName, @Query("api-version") String apiVersion, @Body VirtualHubRouteTableV2Inner virtualHubRouteTableV2Parameters, @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.network.v2019_09_01.VirtualHubRouteTableV2s beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @Path("routeTableName") String routeTableName, @Query("api-version") String apiVersion, @Body VirtualHubRouteTableV2Inner virtualHubRouteTableV2Parameters, @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.network.v2019_09_01.VirtualHubRouteTableV2s delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @Path("routeTableName") String routeTableName, @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.network.v2019_09_01.VirtualHubRouteTableV2s beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @Path("routeTableName") String routeTableName, @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.network.v2019_09_01.VirtualHubRouteTableV2s list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @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.network.v2019_09_01.VirtualHubRouteTableV2s listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves the details of a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualHubRouteTableV2Inner object if successful. + */ + public VirtualHubRouteTableV2Inner get(String resourceGroupName, String virtualHubName, String routeTableName) { + return getWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName).toBlocking().single().body(); + } + + /** + * Retrieves the details of a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @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 virtualHubName, String routeTableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName), serviceCallback); + } + + /** + * Retrieves the details of a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualHubRouteTableV2Inner object + */ + public Observable getAsync(String resourceGroupName, String virtualHubName, String routeTableName) { + return getWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName).map(new Func1, VirtualHubRouteTableV2Inner>() { + @Override + public VirtualHubRouteTableV2Inner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualHubRouteTableV2Inner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String virtualHubName, String routeTableName) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(this.client.subscriptionId(), resourceGroupName, virtualHubName, routeTableName, 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @param virtualHubRouteTableV2Parameters Parameters supplied to create or update VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualHubRouteTableV2Inner object if successful. + */ + public VirtualHubRouteTableV2Inner createOrUpdate(String resourceGroupName, String virtualHubName, String routeTableName, VirtualHubRouteTableV2Inner virtualHubRouteTableV2Parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters).toBlocking().last().body(); + } + + /** + * Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @param virtualHubRouteTableV2Parameters Parameters supplied to create or update VirtualHubRouteTableV2. + * @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 virtualHubName, String routeTableName, VirtualHubRouteTableV2Inner virtualHubRouteTableV2Parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters), serviceCallback); + } + + /** + * Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @param virtualHubRouteTableV2Parameters Parameters supplied to create or update VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String virtualHubName, String routeTableName, VirtualHubRouteTableV2Inner virtualHubRouteTableV2Parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters).map(new Func1, VirtualHubRouteTableV2Inner>() { + @Override + public VirtualHubRouteTableV2Inner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @param virtualHubRouteTableV2Parameters Parameters supplied to create or update VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualHubName, String routeTableName, VirtualHubRouteTableV2Inner virtualHubRouteTableV2Parameters) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (virtualHubRouteTableV2Parameters == null) { + throw new IllegalArgumentException("Parameter virtualHubRouteTableV2Parameters is required and cannot be null."); + } + Validator.validate(virtualHubRouteTableV2Parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, virtualHubName, routeTableName, apiVersion, virtualHubRouteTableV2Parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @param virtualHubRouteTableV2Parameters Parameters supplied to create or update VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualHubRouteTableV2Inner object if successful. + */ + public VirtualHubRouteTableV2Inner beginCreateOrUpdate(String resourceGroupName, String virtualHubName, String routeTableName, VirtualHubRouteTableV2Inner virtualHubRouteTableV2Parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters).toBlocking().single().body(); + } + + /** + * Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @param virtualHubRouteTableV2Parameters Parameters supplied to create or update VirtualHubRouteTableV2. + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String virtualHubName, String routeTableName, VirtualHubRouteTableV2Inner virtualHubRouteTableV2Parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters), serviceCallback); + } + + /** + * Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @param virtualHubRouteTableV2Parameters Parameters supplied to create or update VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualHubRouteTableV2Inner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String virtualHubName, String routeTableName, VirtualHubRouteTableV2Inner virtualHubRouteTableV2Parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters).map(new Func1, VirtualHubRouteTableV2Inner>() { + @Override + public VirtualHubRouteTableV2Inner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @param virtualHubRouteTableV2Parameters Parameters supplied to create or update VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualHubRouteTableV2Inner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualHubName, String routeTableName, VirtualHubRouteTableV2Inner virtualHubRouteTableV2Parameters) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (virtualHubRouteTableV2Parameters == null) { + throw new IllegalArgumentException("Parameter virtualHubRouteTableV2Parameters is required and cannot be null."); + } + Validator.validate(virtualHubRouteTableV2Parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, virtualHubName, routeTableName, apiVersion, virtualHubRouteTableV2Parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Deletes a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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 virtualHubName, String routeTableName) { + deleteWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName).toBlocking().last().body(); + } + + /** + * Deletes a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @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 virtualHubName, String routeTableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName), serviceCallback); + } + + /** + * Deletes a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String virtualHubName, String routeTableName) { + return deleteWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String virtualHubName, String routeTableName) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, virtualHubName, routeTableName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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 virtualHubName, String routeTableName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName).toBlocking().single().body(); + } + + /** + * Deletes a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @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 virtualHubName, String routeTableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName), serviceCallback); + } + + /** + * Deletes a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String virtualHubName, String routeTableName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, virtualHubName, routeTableName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a VirtualHubRouteTableV2. + * + * @param resourceGroupName The resource group name of the VirtualHubRouteTableV2. + * @param virtualHubName The name of the VirtualHub. + * @param routeTableName The name of the VirtualHubRouteTableV2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String virtualHubName, String routeTableName) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, virtualHubName, routeTableName, 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 ErrorException, 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(ErrorException.class) + .build(response); + } + + /** + * Retrieves the details of all VirtualHubRouteTableV2s. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VirtualHubRouteTableV2Inner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String virtualHubName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, virtualHubName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the details of all VirtualHubRouteTableV2s. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @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 resourceGroupName, final String virtualHubName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, virtualHubName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the details of all VirtualHubRouteTableV2s. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualHubRouteTableV2Inner> object + */ + public Observable> listAsync(final String resourceGroupName, final String virtualHubName) { + return listWithServiceResponseAsync(resourceGroupName, virtualHubName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of all VirtualHubRouteTableV2s. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualHubRouteTableV2Inner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String virtualHubName) { + return listSinglePageAsync(resourceGroupName, virtualHubName) + .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)); + } + }); + } + + /** + * Retrieves the details of all VirtualHubRouteTableV2s. + * + ServiceResponse> * @param resourceGroupName The resource group name of the VirtualHub. + ServiceResponse> * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualHubRouteTableV2Inner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String virtualHubName) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), resourceGroupName, virtualHubName, 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); + } + + /** + * Retrieves the details of all VirtualHubRouteTableV2s. + * + * @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<VirtualHubRouteTableV2Inner> 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(); + } + }; + } + + /** + * Retrieves the details of all VirtualHubRouteTableV2s. + * + * @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); + } + + /** + * Retrieves the details of all VirtualHubRouteTableV2s. + * + * @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<VirtualHubRouteTableV2Inner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of all VirtualHubRouteTableV2s. + * + * @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<VirtualHubRouteTableV2Inner> 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)); + } + }); + } + + /** + * Retrieves the details of all VirtualHubRouteTableV2s. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualHubRouteTableV2Inner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubsImpl.java new file mode 100644 index 000000000000..04aa49271833 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubsImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHubs; +import com.microsoft.azure.management.network.v2019_09_01.VirtualHub; +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; + +class VirtualHubsImpl extends GroupableResourcesCoreImpl implements VirtualHubs { + protected VirtualHubsImpl(NetworkManager manager) { + super(manager.inner().virtualHubs(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + VirtualHubsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + VirtualHubsInner 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) { + VirtualHubsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + VirtualHubsInner 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 VirtualHub call(VirtualHubInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + VirtualHubsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + VirtualHubsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VirtualHub call(VirtualHubInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public VirtualHubImpl define(String name) { + return wrapModel(name); + } + + @Override + protected VirtualHubImpl wrapModel(VirtualHubInner inner) { + return new VirtualHubImpl(inner.name(), inner, manager()); + } + + @Override + protected VirtualHubImpl wrapModel(String name) { + return new VirtualHubImpl(name, new VirtualHubInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubsInner.java new file mode 100644 index 000000000000..3bfb553a573d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualHubsInner.java @@ -0,0 +1,1126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 VirtualHubs. + */ +public class VirtualHubsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private VirtualHubsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VirtualHubsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VirtualHubsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VirtualHubsService.class); + this.client = client; + } + + /** + * The interface defining all the services for VirtualHubs to be + * used by Retrofit to perform actually REST calls. + */ + interface VirtualHubsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualHubs getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @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.network.v2019_09_01.VirtualHubs createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @Query("api-version") String apiVersion, @Body VirtualHubInner virtualHubParameters, @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.network.v2019_09_01.VirtualHubs beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @Query("api-version") String apiVersion, @Body VirtualHubInner virtualHubParameters, @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.network.v2019_09_01.VirtualHubs updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}") + Observable> updateTags(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject virtualHubParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualHubs delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @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.network.v2019_09_01.VirtualHubs beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @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.network.v2019_09_01.VirtualHubs listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.VirtualHubs list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs") + Observable> list(@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.network.v2019_09_01.VirtualHubs 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.network.v2019_09_01.VirtualHubs listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves the details of a VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualHubInner object if successful. + */ + public VirtualHubInner getByResourceGroup(String resourceGroupName, String virtualHubName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualHubName).toBlocking().single().body(); + } + + /** + * Retrieves the details of a VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @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 virtualHubName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualHubName), serviceCallback); + } + + /** + * Retrieves the details of a VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualHubInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String virtualHubName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualHubName).map(new Func1, VirtualHubInner>() { + @Override + public VirtualHubInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of a VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualHubInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String virtualHubName) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, virtualHubName, 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); + } + + /** + * Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param virtualHubParameters Parameters supplied to create or update VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualHubInner object if successful. + */ + public VirtualHubInner createOrUpdate(String resourceGroupName, String virtualHubName, VirtualHubInner virtualHubParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualHubName, virtualHubParameters).toBlocking().last().body(); + } + + /** + * Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param virtualHubParameters Parameters supplied to create or update VirtualHub. + * @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 virtualHubName, VirtualHubInner virtualHubParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualHubName, virtualHubParameters), serviceCallback); + } + + /** + * Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param virtualHubParameters Parameters supplied to create or update VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String virtualHubName, VirtualHubInner virtualHubParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualHubName, virtualHubParameters).map(new Func1, VirtualHubInner>() { + @Override + public VirtualHubInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param virtualHubParameters Parameters supplied to create or update VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualHubName, VirtualHubInner virtualHubParameters) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + if (virtualHubParameters == null) { + throw new IllegalArgumentException("Parameter virtualHubParameters is required and cannot be null."); + } + Validator.validate(virtualHubParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, virtualHubName, apiVersion, virtualHubParameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param virtualHubParameters Parameters supplied to create or update VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualHubInner object if successful. + */ + public VirtualHubInner beginCreateOrUpdate(String resourceGroupName, String virtualHubName, VirtualHubInner virtualHubParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualHubName, virtualHubParameters).toBlocking().single().body(); + } + + /** + * Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param virtualHubParameters Parameters supplied to create or update VirtualHub. + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String virtualHubName, VirtualHubInner virtualHubParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualHubName, virtualHubParameters), serviceCallback); + } + + /** + * Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param virtualHubParameters Parameters supplied to create or update VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualHubInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String virtualHubName, VirtualHubInner virtualHubParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualHubName, virtualHubParameters).map(new Func1, VirtualHubInner>() { + @Override + public VirtualHubInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param virtualHubParameters Parameters supplied to create or update VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualHubInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualHubName, VirtualHubInner virtualHubParameters) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + if (virtualHubParameters == null) { + throw new IllegalArgumentException("Parameter virtualHubParameters is required and cannot be null."); + } + Validator.validate(virtualHubParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, virtualHubName, apiVersion, virtualHubParameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 VirtualHub tags. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualHubInner object if successful. + */ + public VirtualHubInner updateTags(String resourceGroupName, String virtualHubName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualHubName).toBlocking().single().body(); + } + + /** + * Updates VirtualHub tags. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @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 updateTagsAsync(String resourceGroupName, String virtualHubName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualHubName), serviceCallback); + } + + /** + * Updates VirtualHub tags. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualHubInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualHubName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualHubName).map(new Func1, VirtualHubInner>() { + @Override + public VirtualHubInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates VirtualHub tags. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualHubInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualHubName) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject virtualHubParameters = new TagsObject(); + virtualHubParameters.withTags(null); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, virtualHubName, apiVersion, this.client.acceptLanguage(), virtualHubParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates VirtualHub tags. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualHubInner object if successful. + */ + public VirtualHubInner updateTags(String resourceGroupName, String virtualHubName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualHubName, tags).toBlocking().single().body(); + } + + /** + * Updates VirtualHub tags. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String virtualHubName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualHubName, tags), serviceCallback); + } + + /** + * Updates VirtualHub tags. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualHubInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualHubName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualHubName, tags).map(new Func1, VirtualHubInner>() { + @Override + public VirtualHubInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates VirtualHub tags. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualHubInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualHubName, Map tags) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject virtualHubParameters = new TagsObject(); + virtualHubParameters.withTags(tags); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, virtualHubName, apiVersion, this.client.acceptLanguage(), virtualHubParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 a VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualHubName) { + deleteWithServiceResponseAsync(resourceGroupName, virtualHubName).toBlocking().last().body(); + } + + /** + * Deletes a VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @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 virtualHubName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, virtualHubName), serviceCallback); + } + + /** + * Deletes a VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String virtualHubName) { + return deleteWithServiceResponseAsync(resourceGroupName, virtualHubName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String virtualHubName) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, virtualHubName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualHubName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, virtualHubName).toBlocking().single().body(); + } + + /** + * Deletes a VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @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 virtualHubName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, virtualHubName), serviceCallback); + } + + /** + * Deletes a VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String virtualHubName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, virtualHubName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a VirtualHub. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @param virtualHubName The name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String virtualHubName) { + 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 (virtualHubName == null) { + throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, virtualHubName, 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); + } + + /** + * Lists all the VirtualHubs in a resource group. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VirtualHubInner> 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 all the VirtualHubs in a resource group. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @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 all the VirtualHubs in a resource group. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualHubInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VirtualHubs in a resource group. + * + * @param resourceGroupName The resource group name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualHubInner> 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 all the VirtualHubs in a resource group. + * + ServiceResponse> * @param resourceGroupName The resource group name of the VirtualHub. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualHubInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, 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 all the VirtualHubs in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VirtualHubInner> 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 all the VirtualHubs in a subscription. + * + * @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 all the VirtualHubs in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualHubInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VirtualHubs in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualHubInner> 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 all the VirtualHubs in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualHubInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all the VirtualHubs in a resource group. + * + * @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<VirtualHubInner> 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 all the VirtualHubs in a resource group. + * + * @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 all the VirtualHubs in a resource group. + * + * @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<VirtualHubInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VirtualHubs in a resource group. + * + * @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<VirtualHubInner> 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 all the VirtualHubs in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualHubInner> 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 all the VirtualHubs in a subscription. + * + * @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<VirtualHubInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the VirtualHubs in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the VirtualHubs in a subscription. + * + * @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<VirtualHubInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VirtualHubs in a subscription. + * + * @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<VirtualHubInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the VirtualHubs in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualHubInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java new file mode 100644 index 000000000000..21cda78d7227 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VirtualMachineScaleSetNetworkInterfaceIPConfiguration; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendAddressPool; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationSecurityGroup; +import com.microsoft.azure.management.network.v2019_09_01.BackendAddressPool; +import com.microsoft.azure.management.network.v2019_09_01.InboundNatRule; +import com.microsoft.azure.management.network.v2019_09_01.IPVersion; +import com.microsoft.azure.management.network.v2019_09_01.IPAllocationMethod; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.PublicIPAddress; +import com.microsoft.azure.management.network.v2019_09_01.Subnet; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkTap; + +class VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl extends IndexableRefreshableWrapperImpl implements VirtualMachineScaleSetNetworkInterfaceIPConfiguration { + private final NetworkManager manager; + private String resourceGroupName; + private String virtualMachineScaleSetName; + private String virtualmachineIndex; + private String networkInterfaceName; + private String ipConfigurationName; + + VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl(NetworkInterfaceIPConfigurationInner inner, NetworkManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.virtualMachineScaleSetName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualMachineScaleSets"); + this.virtualmachineIndex = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualMachines"); + this.networkInterfaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "networkInterfaces"); + this.ipConfigurationName = IdParsingUtils.getValueFromIdByName(inner.id(), "ipConfigurations"); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + NetworkInterfacesInner client = this.manager().inner().networkInterfaces(); + return client.getVirtualMachineScaleSetIpConfigurationAsync(this.resourceGroupName, this.virtualMachineScaleSetName, this.virtualmachineIndex, this.networkInterfaceName, this.ipConfigurationName); + } + + + + @Override + public List applicationGatewayBackendAddressPools() { + return this.inner().applicationGatewayBackendAddressPools(); + } + + @Override + public List applicationSecurityGroups() { + List lst = new ArrayList(); + if (this.inner().applicationSecurityGroups() != null) { + for (ApplicationSecurityGroupInner inner : this.inner().applicationSecurityGroups()) { + lst.add( new ApplicationSecurityGroupImpl(inner.name(), inner, manager())); + } + } + return lst; + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public List loadBalancerBackendAddressPools() { + List lst = new ArrayList(); + if (this.inner().loadBalancerBackendAddressPools() != null) { + for (BackendAddressPoolInner inner : this.inner().loadBalancerBackendAddressPools()) { + lst.add( new BackendAddressPoolImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List loadBalancerInboundNatRules() { + List lst = new ArrayList(); + if (this.inner().loadBalancerInboundNatRules() != null) { + for (InboundNatRuleInner inner : this.inner().loadBalancerInboundNatRules()) { + lst.add( new InboundNatRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Boolean primary() { + return this.inner().primary(); + } + + @Override + public String privateIPAddress() { + return this.inner().privateIPAddress(); + } + + @Override + public IPVersion privateIPAddressVersion() { + return this.inner().privateIPAddressVersion(); + } + + @Override + public IPAllocationMethod privateIPAllocationMethod() { + return this.inner().privateIPAllocationMethod(); + } + + @Override + public NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnectionProperties() { + return this.inner().privateLinkConnectionProperties(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public PublicIPAddress publicIPAddress() { + PublicIPAddressInner inner = this.inner().publicIPAddress(); + if (inner != null) { + return new PublicIPAddressImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public Subnet subnet() { + SubnetInner inner = this.inner().subnet(); + if (inner != null) { + return new SubnetImpl(inner, manager()); + } else { + return null; + } + } + + @Override + public List virtualNetworkTaps() { + List lst = new ArrayList(); + if (this.inner().virtualNetworkTaps() != null) { + for (VirtualNetworkTapInner inner : this.inner().virtualNetworkTaps()) { + lst.add( new VirtualNetworkTapImpl(inner.name(), inner, manager())); + } + } + return lst; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionImpl.java new file mode 100644 index 000000000000..cbccf01fc8aa --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionImpl.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnection; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionType; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionProtocol; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionStatus; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.TunnelConnectionHealth; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.IpsecPolicy; +import com.microsoft.azure.management.network.v2019_09_01.TrafficSelectorPolicy; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.LocalNetworkGateway; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGateway; + +class VirtualNetworkGatewayConnectionImpl extends GroupableResourceCoreImpl implements VirtualNetworkGatewayConnection, VirtualNetworkGatewayConnection.Definition, VirtualNetworkGatewayConnection.Update { + VirtualNetworkGatewayConnectionImpl(String name, VirtualNetworkGatewayConnectionInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + VirtualNetworkGatewayConnectionsInner client = this.manager().inner().virtualNetworkGatewayConnections(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VirtualNetworkGatewayConnectionsInner client = this.manager().inner().virtualNetworkGatewayConnections(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VirtualNetworkGatewayConnectionsInner client = this.manager().inner().virtualNetworkGatewayConnections(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String authorizationKey() { + return this.inner().authorizationKey(); + } + + @Override + public VirtualNetworkGatewayConnectionProtocol connectionProtocol() { + return this.inner().connectionProtocol(); + } + + @Override + public VirtualNetworkGatewayConnectionStatus connectionStatus() { + return this.inner().connectionStatus(); + } + + @Override + public VirtualNetworkGatewayConnectionType connectionType() { + return this.inner().connectionType(); + } + + @Override + public Long egressBytesTransferred() { + return this.inner().egressBytesTransferred(); + } + + @Override + public Boolean enableBgp() { + return this.inner().enableBgp(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public Boolean expressRouteGatewayBypass() { + return this.inner().expressRouteGatewayBypass(); + } + + @Override + public Long ingressBytesTransferred() { + return this.inner().ingressBytesTransferred(); + } + + @Override + public List ipsecPolicies() { + return this.inner().ipsecPolicies(); + } + + @Override + public LocalNetworkGateway localNetworkGateway2() { + LocalNetworkGatewayInner inner = this.inner().localNetworkGateway2(); + if (inner != null) { + return new LocalNetworkGatewayImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public SubResource peer() { + return this.inner().peer(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public Integer routingWeight() { + return this.inner().routingWeight(); + } + + @Override + public String sharedKey() { + return this.inner().sharedKey(); + } + + @Override + public List trafficSelectorPolicies() { + return this.inner().trafficSelectorPolicies(); + } + + @Override + public List tunnelConnectionStatus() { + return this.inner().tunnelConnectionStatus(); + } + + @Override + public Boolean usePolicyBasedTrafficSelectors() { + return this.inner().usePolicyBasedTrafficSelectors(); + } + + @Override + public VirtualNetworkGateway virtualNetworkGateway1() { + VirtualNetworkGatewayInner inner = this.inner().virtualNetworkGateway1(); + if (inner != null) { + return new VirtualNetworkGatewayImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public VirtualNetworkGateway virtualNetworkGateway2() { + VirtualNetworkGatewayInner inner = this.inner().virtualNetworkGateway2(); + if (inner != null) { + return new VirtualNetworkGatewayImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public VirtualNetworkGatewayConnectionImpl withConnectionType(VirtualNetworkGatewayConnectionType connectionType) { + this.inner().withConnectionType(connectionType); + return this; + } + + @Override + public VirtualNetworkGatewayConnectionImpl withVirtualNetworkGateway1(VirtualNetworkGatewayInner virtualNetworkGateway1) { + this.inner().withVirtualNetworkGateway1(virtualNetworkGateway1); + return this; + } + + @Override + public VirtualNetworkGatewayConnectionImpl withAuthorizationKey(String authorizationKey) { + this.inner().withAuthorizationKey(authorizationKey); + return this; + } + + @Override + public VirtualNetworkGatewayConnectionImpl withConnectionProtocol(VirtualNetworkGatewayConnectionProtocol connectionProtocol) { + this.inner().withConnectionProtocol(connectionProtocol); + return this; + } + + @Override + public VirtualNetworkGatewayConnectionImpl withEnableBgp(Boolean enableBgp) { + this.inner().withEnableBgp(enableBgp); + return this; + } + + @Override + public VirtualNetworkGatewayConnectionImpl withExpressRouteGatewayBypass(Boolean expressRouteGatewayBypass) { + this.inner().withExpressRouteGatewayBypass(expressRouteGatewayBypass); + return this; + } + + @Override + public VirtualNetworkGatewayConnectionImpl withIpsecPolicies(List ipsecPolicies) { + this.inner().withIpsecPolicies(ipsecPolicies); + return this; + } + + @Override + public VirtualNetworkGatewayConnectionImpl withLocalNetworkGateway2(LocalNetworkGatewayInner localNetworkGateway2) { + this.inner().withLocalNetworkGateway2(localNetworkGateway2); + return this; + } + + @Override + public VirtualNetworkGatewayConnectionImpl withPeer(SubResource peer) { + this.inner().withPeer(peer); + return this; + } + + @Override + public VirtualNetworkGatewayConnectionImpl withRoutingWeight(Integer routingWeight) { + this.inner().withRoutingWeight(routingWeight); + return this; + } + + @Override + public VirtualNetworkGatewayConnectionImpl withSharedKey(String sharedKey) { + this.inner().withSharedKey(sharedKey); + return this; + } + + @Override + public VirtualNetworkGatewayConnectionImpl withTrafficSelectorPolicies(List trafficSelectorPolicies) { + this.inner().withTrafficSelectorPolicies(trafficSelectorPolicies); + return this; + } + + @Override + public VirtualNetworkGatewayConnectionImpl withUsePolicyBasedTrafficSelectors(Boolean usePolicyBasedTrafficSelectors) { + this.inner().withUsePolicyBasedTrafficSelectors(usePolicyBasedTrafficSelectors); + return this; + } + + @Override + public VirtualNetworkGatewayConnectionImpl withVirtualNetworkGateway2(VirtualNetworkGatewayInner virtualNetworkGateway2) { + this.inner().withVirtualNetworkGateway2(virtualNetworkGateway2); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionInner.java new file mode 100644 index 000000000000..667bde8a963e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionInner.java @@ -0,0 +1,532 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionType; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionProtocol; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionStatus; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.TunnelConnectionHealth; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.IpsecPolicy; +import com.microsoft.azure.management.network.v2019_09_01.TrafficSelectorPolicy; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * A common class for general resource information. + */ +@JsonFlatten +@SkipParentValidation +public class VirtualNetworkGatewayConnectionInner extends Resource { + /** + * The authorizationKey. + */ + @JsonProperty(value = "properties.authorizationKey") + private String authorizationKey; + + /** + * The reference to virtual network gateway resource. + */ + @JsonProperty(value = "properties.virtualNetworkGateway1", required = true) + private VirtualNetworkGatewayInner virtualNetworkGateway1; + + /** + * The reference to virtual network gateway resource. + */ + @JsonProperty(value = "properties.virtualNetworkGateway2") + private VirtualNetworkGatewayInner virtualNetworkGateway2; + + /** + * The reference to local network gateway resource. + */ + @JsonProperty(value = "properties.localNetworkGateway2") + private LocalNetworkGatewayInner localNetworkGateway2; + + /** + * Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', + * 'ExpressRoute', 'VPNClient'. + */ + @JsonProperty(value = "properties.connectionType", required = true) + private VirtualNetworkGatewayConnectionType connectionType; + + /** + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1'. + */ + @JsonProperty(value = "properties.connectionProtocol") + private VirtualNetworkGatewayConnectionProtocol connectionProtocol; + + /** + * The routing weight. + */ + @JsonProperty(value = "properties.routingWeight") + private Integer routingWeight; + + /** + * The IPSec shared key. + */ + @JsonProperty(value = "properties.sharedKey") + private String sharedKey; + + /** + * Virtual Network Gateway connection status. Possible values include: + * 'Unknown', 'Connecting', 'Connected', 'NotConnected'. + */ + @JsonProperty(value = "properties.connectionStatus", access = JsonProperty.Access.WRITE_ONLY) + private VirtualNetworkGatewayConnectionStatus connectionStatus; + + /** + * Collection of all tunnels' connection health status. + */ + @JsonProperty(value = "properties.tunnelConnectionStatus", access = JsonProperty.Access.WRITE_ONLY) + private List tunnelConnectionStatus; + + /** + * The egress bytes transferred in this connection. + */ + @JsonProperty(value = "properties.egressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long egressBytesTransferred; + + /** + * The ingress bytes transferred in this connection. + */ + @JsonProperty(value = "properties.ingressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long ingressBytesTransferred; + + /** + * The reference to peerings resource. + */ + @JsonProperty(value = "properties.peer") + private SubResource peer; + + /** + * EnableBgp flag. + */ + @JsonProperty(value = "properties.enableBgp") + private Boolean enableBgp; + + /** + * Enable policy-based traffic selectors. + */ + @JsonProperty(value = "properties.usePolicyBasedTrafficSelectors") + private Boolean usePolicyBasedTrafficSelectors; + + /** + * The IPSec Policies to be considered by this connection. + */ + @JsonProperty(value = "properties.ipsecPolicies") + private List ipsecPolicies; + + /** + * The Traffic Selector Policies to be considered by this connection. + */ + @JsonProperty(value = "properties.trafficSelectorPolicies") + private List trafficSelectorPolicies; + + /** + * The resource GUID property of the virtual network gateway connection + * resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the virtual network gateway connection + * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', + * 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Bypass ExpressRoute Gateway for data forwarding. + */ + @JsonProperty(value = "properties.expressRouteGatewayBypass") + private Boolean expressRouteGatewayBypass; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the authorizationKey. + * + * @return the authorizationKey value + */ + public String authorizationKey() { + return this.authorizationKey; + } + + /** + * Set the authorizationKey. + * + * @param authorizationKey the authorizationKey value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withAuthorizationKey(String authorizationKey) { + this.authorizationKey = authorizationKey; + return this; + } + + /** + * Get the reference to virtual network gateway resource. + * + * @return the virtualNetworkGateway1 value + */ + public VirtualNetworkGatewayInner virtualNetworkGateway1() { + return this.virtualNetworkGateway1; + } + + /** + * Set the reference to virtual network gateway resource. + * + * @param virtualNetworkGateway1 the virtualNetworkGateway1 value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway1(VirtualNetworkGatewayInner virtualNetworkGateway1) { + this.virtualNetworkGateway1 = virtualNetworkGateway1; + return this; + } + + /** + * Get the reference to virtual network gateway resource. + * + * @return the virtualNetworkGateway2 value + */ + public VirtualNetworkGatewayInner virtualNetworkGateway2() { + return this.virtualNetworkGateway2; + } + + /** + * Set the reference to virtual network gateway resource. + * + * @param virtualNetworkGateway2 the virtualNetworkGateway2 value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway2(VirtualNetworkGatewayInner virtualNetworkGateway2) { + this.virtualNetworkGateway2 = virtualNetworkGateway2; + return this; + } + + /** + * Get the reference to local network gateway resource. + * + * @return the localNetworkGateway2 value + */ + public LocalNetworkGatewayInner localNetworkGateway2() { + return this.localNetworkGateway2; + } + + /** + * Set the reference to local network gateway resource. + * + * @param localNetworkGateway2 the localNetworkGateway2 value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withLocalNetworkGateway2(LocalNetworkGatewayInner localNetworkGateway2) { + this.localNetworkGateway2 = localNetworkGateway2; + return this; + } + + /** + * Get gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'. + * + * @return the connectionType value + */ + public VirtualNetworkGatewayConnectionType connectionType() { + return this.connectionType; + } + + /** + * Set gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'. + * + * @param connectionType the connectionType value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withConnectionType(VirtualNetworkGatewayConnectionType connectionType) { + this.connectionType = connectionType; + return this; + } + + /** + * Get connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'. + * + * @return the connectionProtocol value + */ + public VirtualNetworkGatewayConnectionProtocol connectionProtocol() { + return this.connectionProtocol; + } + + /** + * Set connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'. + * + * @param connectionProtocol the connectionProtocol value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withConnectionProtocol(VirtualNetworkGatewayConnectionProtocol connectionProtocol) { + this.connectionProtocol = connectionProtocol; + return this; + } + + /** + * Get the routing weight. + * + * @return the routingWeight value + */ + public Integer routingWeight() { + return this.routingWeight; + } + + /** + * Set the routing weight. + * + * @param routingWeight the routingWeight value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withRoutingWeight(Integer routingWeight) { + this.routingWeight = routingWeight; + return this; + } + + /** + * Get the IPSec shared key. + * + * @return the sharedKey value + */ + public String sharedKey() { + return this.sharedKey; + } + + /** + * Set the IPSec shared key. + * + * @param sharedKey the sharedKey value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withSharedKey(String sharedKey) { + this.sharedKey = sharedKey; + return this; + } + + /** + * Get virtual Network Gateway connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'. + * + * @return the connectionStatus value + */ + public VirtualNetworkGatewayConnectionStatus connectionStatus() { + return this.connectionStatus; + } + + /** + * Get collection of all tunnels' connection health status. + * + * @return the tunnelConnectionStatus value + */ + public List tunnelConnectionStatus() { + return this.tunnelConnectionStatus; + } + + /** + * Get the egress bytes transferred in this connection. + * + * @return the egressBytesTransferred value + */ + public Long egressBytesTransferred() { + return this.egressBytesTransferred; + } + + /** + * Get the ingress bytes transferred in this connection. + * + * @return the ingressBytesTransferred value + */ + public Long ingressBytesTransferred() { + return this.ingressBytesTransferred; + } + + /** + * Get the reference to peerings resource. + * + * @return the peer value + */ + public SubResource peer() { + return this.peer; + } + + /** + * Set the reference to peerings resource. + * + * @param peer the peer value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withPeer(SubResource peer) { + this.peer = peer; + return this; + } + + /** + * Get enableBgp flag. + * + * @return the enableBgp value + */ + public Boolean enableBgp() { + return this.enableBgp; + } + + /** + * Set enableBgp flag. + * + * @param enableBgp the enableBgp value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withEnableBgp(Boolean enableBgp) { + this.enableBgp = enableBgp; + return this; + } + + /** + * Get enable policy-based traffic selectors. + * + * @return the usePolicyBasedTrafficSelectors value + */ + public Boolean usePolicyBasedTrafficSelectors() { + return this.usePolicyBasedTrafficSelectors; + } + + /** + * Set enable policy-based traffic selectors. + * + * @param usePolicyBasedTrafficSelectors the usePolicyBasedTrafficSelectors value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withUsePolicyBasedTrafficSelectors(Boolean usePolicyBasedTrafficSelectors) { + this.usePolicyBasedTrafficSelectors = usePolicyBasedTrafficSelectors; + return this; + } + + /** + * Get the IPSec Policies to be considered by this connection. + * + * @return the ipsecPolicies value + */ + public List ipsecPolicies() { + return this.ipsecPolicies; + } + + /** + * Set the IPSec Policies to be considered by this connection. + * + * @param ipsecPolicies the ipsecPolicies value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withIpsecPolicies(List ipsecPolicies) { + this.ipsecPolicies = ipsecPolicies; + return this; + } + + /** + * Get the Traffic Selector Policies to be considered by this connection. + * + * @return the trafficSelectorPolicies value + */ + public List trafficSelectorPolicies() { + return this.trafficSelectorPolicies; + } + + /** + * Set the Traffic Selector Policies to be considered by this connection. + * + * @param trafficSelectorPolicies the trafficSelectorPolicies value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withTrafficSelectorPolicies(List trafficSelectorPolicies) { + this.trafficSelectorPolicies = trafficSelectorPolicies; + return this; + } + + /** + * Get the resource GUID property of the virtual network gateway connection resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get bypass ExpressRoute Gateway for data forwarding. + * + * @return the expressRouteGatewayBypass value + */ + public Boolean expressRouteGatewayBypass() { + return this.expressRouteGatewayBypass; + } + + /** + * Set bypass ExpressRoute Gateway for data forwarding. + * + * @param expressRouteGatewayBypass the expressRouteGatewayBypass value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withExpressRouteGatewayBypass(Boolean expressRouteGatewayBypass) { + this.expressRouteGatewayBypass = expressRouteGatewayBypass; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionListEntityImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionListEntityImpl.java new file mode 100644 index 000000000000..53cacf74b79c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionListEntityImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionListEntity; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionProtocol; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionStatus; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionType; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.IpsecPolicy; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkConnectionGatewayReference; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.Map; +import com.microsoft.azure.management.network.v2019_09_01.TrafficSelectorPolicy; +import com.microsoft.azure.management.network.v2019_09_01.TunnelConnectionHealth; + +class VirtualNetworkGatewayConnectionListEntityImpl extends WrapperImpl implements VirtualNetworkGatewayConnectionListEntity { + private final NetworkManager manager; + + VirtualNetworkGatewayConnectionListEntityImpl(VirtualNetworkGatewayConnectionListEntityInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public String authorizationKey() { + return this.inner().authorizationKey(); + } + + @Override + public VirtualNetworkGatewayConnectionProtocol connectionProtocol() { + return this.inner().connectionProtocol(); + } + + @Override + public VirtualNetworkGatewayConnectionStatus connectionStatus() { + return this.inner().connectionStatus(); + } + + @Override + public VirtualNetworkGatewayConnectionType connectionType() { + return this.inner().connectionType(); + } + + @Override + public Long egressBytesTransferred() { + return this.inner().egressBytesTransferred(); + } + + @Override + public Boolean enableBgp() { + return this.inner().enableBgp(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public Boolean expressRouteGatewayBypass() { + return this.inner().expressRouteGatewayBypass(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Long ingressBytesTransferred() { + return this.inner().ingressBytesTransferred(); + } + + @Override + public List ipsecPolicies() { + return this.inner().ipsecPolicies(); + } + + @Override + public VirtualNetworkConnectionGatewayReference localNetworkGateway2() { + return this.inner().localNetworkGateway2(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public SubResource peer() { + return this.inner().peer(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public Integer routingWeight() { + return this.inner().routingWeight(); + } + + @Override + public String sharedKey() { + return this.inner().sharedKey(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public List trafficSelectorPolicies() { + return this.inner().trafficSelectorPolicies(); + } + + @Override + public List tunnelConnectionStatus() { + return this.inner().tunnelConnectionStatus(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public Boolean usePolicyBasedTrafficSelectors() { + return this.inner().usePolicyBasedTrafficSelectors(); + } + + @Override + public VirtualNetworkConnectionGatewayReference virtualNetworkGateway1() { + return this.inner().virtualNetworkGateway1(); + } + + @Override + public VirtualNetworkConnectionGatewayReference virtualNetworkGateway2() { + return this.inner().virtualNetworkGateway2(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionListEntityInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionListEntityInner.java new file mode 100644 index 000000000000..5e6176a405b4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionListEntityInner.java @@ -0,0 +1,533 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkConnectionGatewayReference; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionType; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionProtocol; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionStatus; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.TunnelConnectionHealth; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.IpsecPolicy; +import com.microsoft.azure.management.network.v2019_09_01.TrafficSelectorPolicy; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * A common class for general resource information. + */ +@JsonFlatten +@SkipParentValidation +public class VirtualNetworkGatewayConnectionListEntityInner extends Resource { + /** + * The authorizationKey. + */ + @JsonProperty(value = "properties.authorizationKey") + private String authorizationKey; + + /** + * The reference to virtual network gateway resource. + */ + @JsonProperty(value = "properties.virtualNetworkGateway1", required = true) + private VirtualNetworkConnectionGatewayReference virtualNetworkGateway1; + + /** + * The reference to virtual network gateway resource. + */ + @JsonProperty(value = "properties.virtualNetworkGateway2") + private VirtualNetworkConnectionGatewayReference virtualNetworkGateway2; + + /** + * The reference to local network gateway resource. + */ + @JsonProperty(value = "properties.localNetworkGateway2") + private VirtualNetworkConnectionGatewayReference localNetworkGateway2; + + /** + * Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', + * 'ExpressRoute', 'VPNClient'. + */ + @JsonProperty(value = "properties.connectionType", required = true) + private VirtualNetworkGatewayConnectionType connectionType; + + /** + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1'. + */ + @JsonProperty(value = "properties.connectionProtocol") + private VirtualNetworkGatewayConnectionProtocol connectionProtocol; + + /** + * The routing weight. + */ + @JsonProperty(value = "properties.routingWeight") + private Integer routingWeight; + + /** + * The IPSec shared key. + */ + @JsonProperty(value = "properties.sharedKey") + private String sharedKey; + + /** + * Virtual Network Gateway connection status. Possible values include: + * 'Unknown', 'Connecting', 'Connected', 'NotConnected'. + */ + @JsonProperty(value = "properties.connectionStatus", access = JsonProperty.Access.WRITE_ONLY) + private VirtualNetworkGatewayConnectionStatus connectionStatus; + + /** + * Collection of all tunnels' connection health status. + */ + @JsonProperty(value = "properties.tunnelConnectionStatus", access = JsonProperty.Access.WRITE_ONLY) + private List tunnelConnectionStatus; + + /** + * The egress bytes transferred in this connection. + */ + @JsonProperty(value = "properties.egressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long egressBytesTransferred; + + /** + * The ingress bytes transferred in this connection. + */ + @JsonProperty(value = "properties.ingressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long ingressBytesTransferred; + + /** + * The reference to peerings resource. + */ + @JsonProperty(value = "properties.peer") + private SubResource peer; + + /** + * EnableBgp flag. + */ + @JsonProperty(value = "properties.enableBgp") + private Boolean enableBgp; + + /** + * Enable policy-based traffic selectors. + */ + @JsonProperty(value = "properties.usePolicyBasedTrafficSelectors") + private Boolean usePolicyBasedTrafficSelectors; + + /** + * The IPSec Policies to be considered by this connection. + */ + @JsonProperty(value = "properties.ipsecPolicies") + private List ipsecPolicies; + + /** + * The Traffic Selector Policies to be considered by this connection. + */ + @JsonProperty(value = "properties.trafficSelectorPolicies") + private List trafficSelectorPolicies; + + /** + * The resource GUID property of the virtual network gateway connection + * resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the virtual network gateway connection + * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', + * 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Bypass ExpressRoute Gateway for data forwarding. + */ + @JsonProperty(value = "properties.expressRouteGatewayBypass") + private Boolean expressRouteGatewayBypass; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the authorizationKey. + * + * @return the authorizationKey value + */ + public String authorizationKey() { + return this.authorizationKey; + } + + /** + * Set the authorizationKey. + * + * @param authorizationKey the authorizationKey value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withAuthorizationKey(String authorizationKey) { + this.authorizationKey = authorizationKey; + return this; + } + + /** + * Get the reference to virtual network gateway resource. + * + * @return the virtualNetworkGateway1 value + */ + public VirtualNetworkConnectionGatewayReference virtualNetworkGateway1() { + return this.virtualNetworkGateway1; + } + + /** + * Set the reference to virtual network gateway resource. + * + * @param virtualNetworkGateway1 the virtualNetworkGateway1 value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withVirtualNetworkGateway1(VirtualNetworkConnectionGatewayReference virtualNetworkGateway1) { + this.virtualNetworkGateway1 = virtualNetworkGateway1; + return this; + } + + /** + * Get the reference to virtual network gateway resource. + * + * @return the virtualNetworkGateway2 value + */ + public VirtualNetworkConnectionGatewayReference virtualNetworkGateway2() { + return this.virtualNetworkGateway2; + } + + /** + * Set the reference to virtual network gateway resource. + * + * @param virtualNetworkGateway2 the virtualNetworkGateway2 value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withVirtualNetworkGateway2(VirtualNetworkConnectionGatewayReference virtualNetworkGateway2) { + this.virtualNetworkGateway2 = virtualNetworkGateway2; + return this; + } + + /** + * Get the reference to local network gateway resource. + * + * @return the localNetworkGateway2 value + */ + public VirtualNetworkConnectionGatewayReference localNetworkGateway2() { + return this.localNetworkGateway2; + } + + /** + * Set the reference to local network gateway resource. + * + * @param localNetworkGateway2 the localNetworkGateway2 value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withLocalNetworkGateway2(VirtualNetworkConnectionGatewayReference localNetworkGateway2) { + this.localNetworkGateway2 = localNetworkGateway2; + return this; + } + + /** + * Get gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'. + * + * @return the connectionType value + */ + public VirtualNetworkGatewayConnectionType connectionType() { + return this.connectionType; + } + + /** + * Set gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'. + * + * @param connectionType the connectionType value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withConnectionType(VirtualNetworkGatewayConnectionType connectionType) { + this.connectionType = connectionType; + return this; + } + + /** + * Get connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'. + * + * @return the connectionProtocol value + */ + public VirtualNetworkGatewayConnectionProtocol connectionProtocol() { + return this.connectionProtocol; + } + + /** + * Set connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'. + * + * @param connectionProtocol the connectionProtocol value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withConnectionProtocol(VirtualNetworkGatewayConnectionProtocol connectionProtocol) { + this.connectionProtocol = connectionProtocol; + return this; + } + + /** + * Get the routing weight. + * + * @return the routingWeight value + */ + public Integer routingWeight() { + return this.routingWeight; + } + + /** + * Set the routing weight. + * + * @param routingWeight the routingWeight value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withRoutingWeight(Integer routingWeight) { + this.routingWeight = routingWeight; + return this; + } + + /** + * Get the IPSec shared key. + * + * @return the sharedKey value + */ + public String sharedKey() { + return this.sharedKey; + } + + /** + * Set the IPSec shared key. + * + * @param sharedKey the sharedKey value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withSharedKey(String sharedKey) { + this.sharedKey = sharedKey; + return this; + } + + /** + * Get virtual Network Gateway connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'. + * + * @return the connectionStatus value + */ + public VirtualNetworkGatewayConnectionStatus connectionStatus() { + return this.connectionStatus; + } + + /** + * Get collection of all tunnels' connection health status. + * + * @return the tunnelConnectionStatus value + */ + public List tunnelConnectionStatus() { + return this.tunnelConnectionStatus; + } + + /** + * Get the egress bytes transferred in this connection. + * + * @return the egressBytesTransferred value + */ + public Long egressBytesTransferred() { + return this.egressBytesTransferred; + } + + /** + * Get the ingress bytes transferred in this connection. + * + * @return the ingressBytesTransferred value + */ + public Long ingressBytesTransferred() { + return this.ingressBytesTransferred; + } + + /** + * Get the reference to peerings resource. + * + * @return the peer value + */ + public SubResource peer() { + return this.peer; + } + + /** + * Set the reference to peerings resource. + * + * @param peer the peer value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withPeer(SubResource peer) { + this.peer = peer; + return this; + } + + /** + * Get enableBgp flag. + * + * @return the enableBgp value + */ + public Boolean enableBgp() { + return this.enableBgp; + } + + /** + * Set enableBgp flag. + * + * @param enableBgp the enableBgp value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withEnableBgp(Boolean enableBgp) { + this.enableBgp = enableBgp; + return this; + } + + /** + * Get enable policy-based traffic selectors. + * + * @return the usePolicyBasedTrafficSelectors value + */ + public Boolean usePolicyBasedTrafficSelectors() { + return this.usePolicyBasedTrafficSelectors; + } + + /** + * Set enable policy-based traffic selectors. + * + * @param usePolicyBasedTrafficSelectors the usePolicyBasedTrafficSelectors value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withUsePolicyBasedTrafficSelectors(Boolean usePolicyBasedTrafficSelectors) { + this.usePolicyBasedTrafficSelectors = usePolicyBasedTrafficSelectors; + return this; + } + + /** + * Get the IPSec Policies to be considered by this connection. + * + * @return the ipsecPolicies value + */ + public List ipsecPolicies() { + return this.ipsecPolicies; + } + + /** + * Set the IPSec Policies to be considered by this connection. + * + * @param ipsecPolicies the ipsecPolicies value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withIpsecPolicies(List ipsecPolicies) { + this.ipsecPolicies = ipsecPolicies; + return this; + } + + /** + * Get the Traffic Selector Policies to be considered by this connection. + * + * @return the trafficSelectorPolicies value + */ + public List trafficSelectorPolicies() { + return this.trafficSelectorPolicies; + } + + /** + * Set the Traffic Selector Policies to be considered by this connection. + * + * @param trafficSelectorPolicies the trafficSelectorPolicies value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withTrafficSelectorPolicies(List trafficSelectorPolicies) { + this.trafficSelectorPolicies = trafficSelectorPolicies; + return this; + } + + /** + * Get the resource GUID property of the virtual network gateway connection resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get bypass ExpressRoute Gateway for data forwarding. + * + * @return the expressRouteGatewayBypass value + */ + public Boolean expressRouteGatewayBypass() { + return this.expressRouteGatewayBypass; + } + + /** + * Set bypass ExpressRoute Gateway for data forwarding. + * + * @param expressRouteGatewayBypass the expressRouteGatewayBypass value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withExpressRouteGatewayBypass(Boolean expressRouteGatewayBypass) { + this.expressRouteGatewayBypass = expressRouteGatewayBypass; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. + */ + public VirtualNetworkGatewayConnectionListEntityInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionsImpl.java new file mode 100644 index 000000000000..fff81f0bf862 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionsImpl.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. + * def + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnections; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnection; +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.network.v2019_09_01.ConnectionSharedKey; +import com.microsoft.azure.management.network.v2019_09_01.ConnectionResetSharedKey; + +class VirtualNetworkGatewayConnectionsImpl extends GroupableResourcesCoreImpl implements VirtualNetworkGatewayConnections { + protected VirtualNetworkGatewayConnectionsImpl(NetworkManager manager) { + super(manager.inner().virtualNetworkGatewayConnections(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + VirtualNetworkGatewayConnectionsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + VirtualNetworkGatewayConnectionsInner 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) { + VirtualNetworkGatewayConnectionsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + VirtualNetworkGatewayConnectionsInner 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 VirtualNetworkGatewayConnection call(VirtualNetworkGatewayConnectionInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public VirtualNetworkGatewayConnectionImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { + VirtualNetworkGatewayConnectionsInner client = this.inner(); + return client.setSharedKeyAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters) + .map(new Func1() { + @Override + public ConnectionSharedKey call(ConnectionSharedKeyInner inner) { + return new ConnectionSharedKeyImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + VirtualNetworkGatewayConnectionsInner client = this.inner(); + return client.getSharedKeyAsync(resourceGroupName, virtualNetworkGatewayConnectionName) + .map(new Func1() { + @Override + public ConnectionSharedKey call(ConnectionSharedKeyInner inner) { + return new ConnectionSharedKeyImpl(inner, manager()); + } + }); + } + + @Override + public Observable resetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) { + VirtualNetworkGatewayConnectionsInner client = this.inner(); + return client.resetSharedKeyAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength) + .map(new Func1() { + @Override + public ConnectionResetSharedKey call(ConnectionResetSharedKeyInner inner) { + return new ConnectionResetSharedKeyImpl(inner, manager()); + } + }); + } + + @Override + public Observable startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + VirtualNetworkGatewayConnectionsInner client = this.inner(); + return client.startPacketCaptureAsync(resourceGroupName, virtualNetworkGatewayConnectionName) + ;} + + @Override + public Observable stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + VirtualNetworkGatewayConnectionsInner client = this.inner(); + return client.stopPacketCaptureAsync(resourceGroupName, virtualNetworkGatewayConnectionName) + ;} + + @Override + protected VirtualNetworkGatewayConnectionImpl wrapModel(VirtualNetworkGatewayConnectionInner inner) { + return new VirtualNetworkGatewayConnectionImpl(inner.name(), inner, manager()); + } + + @Override + protected VirtualNetworkGatewayConnectionImpl wrapModel(String name) { + return new VirtualNetworkGatewayConnectionImpl(name, new VirtualNetworkGatewayConnectionInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionsInner.java new file mode 100644 index 000000000000..143bc34724a8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayConnectionsInner.java @@ -0,0 +1,2141 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +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.network.v2019_09_01.ErrorException; +import com.microsoft.azure.management.network.v2019_09_01.TagsObject; +import com.microsoft.azure.management.network.v2019_09_01.VpnPacketCaptureStartParameters; +import com.microsoft.azure.management.network.v2019_09_01.VpnPacketCaptureStopParameters; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in VirtualNetworkGatewayConnections. + */ +public class VirtualNetworkGatewayConnectionsInner implements InnerSupportsGet, InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private VirtualNetworkGatewayConnectionsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VirtualNetworkGatewayConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VirtualNetworkGatewayConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VirtualNetworkGatewayConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for VirtualNetworkGatewayConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface VirtualNetworkGatewayConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnections createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkGatewayConnectionInner 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.network.v2019_09_01.VirtualNetworkGatewayConnections beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkGatewayConnectionInner 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.network.v2019_09_01.VirtualNetworkGatewayConnections getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @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.network.v2019_09_01.VirtualNetworkGatewayConnections delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @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.network.v2019_09_01.VirtualNetworkGatewayConnections beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @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.network.v2019_09_01.VirtualNetworkGatewayConnections updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnections beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnections setSharedKey" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey") + Observable> setSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Body ConnectionSharedKeyInner 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.network.v2019_09_01.VirtualNetworkGatewayConnections beginSetSharedKey" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey") + Observable> beginSetSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Body ConnectionSharedKeyInner 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.network.v2019_09_01.VirtualNetworkGatewayConnections getSharedKey" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey") + Observable> getSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @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.network.v2019_09_01.VirtualNetworkGatewayConnections listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.VirtualNetworkGatewayConnections resetSharedKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset") + Observable> resetSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ConnectionResetSharedKeyInner parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnections beginResetSharedKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset") + Observable> beginResetSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ConnectionResetSharedKeyInner parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnections startPacketCapture" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture") + Observable> startPacketCapture(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VpnPacketCaptureStartParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnections beginStartPacketCapture" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture") + Observable> beginStartPacketCapture(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VpnPacketCaptureStartParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnections stopPacketCapture" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture") + Observable> stopPacketCapture(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VpnPacketCaptureStopParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnections beginStopPacketCapture" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture") + Observable> beginStopPacketCapture(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VpnPacketCaptureStopParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnections listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param parameters Parameters supplied to the create or update virtual network gateway connection 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 VirtualNetworkGatewayConnectionInner object if successful. + */ + public VirtualNetworkGatewayConnectionInner createOrUpdate(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param parameters Parameters supplied to the create or update virtual network gateway connection 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 createOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters), serviceCallback); + } + + /** + * Creates or updates a virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param parameters Parameters supplied to the create or update virtual network gateway connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).map(new Func1, VirtualNetworkGatewayConnectionInner>() { + @Override + public VirtualNetworkGatewayConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param parameters Parameters supplied to the create or update virtual network gateway connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param parameters Parameters supplied to the create or update virtual network gateway connection 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 VirtualNetworkGatewayConnectionInner object if successful. + */ + public VirtualNetworkGatewayConnectionInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param parameters Parameters supplied to the create or update virtual network gateway connection 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 beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters), serviceCallback); + } + + /** + * Creates or updates a virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param parameters Parameters supplied to the create or update virtual network gateway connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayConnectionInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).map(new Func1, VirtualNetworkGatewayConnectionInner>() { + @Override + public VirtualNetworkGatewayConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param parameters Parameters supplied to the create or update virtual network gateway connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayConnectionInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 virtual network gateway connection by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayConnectionInner object if successful. + */ + public VirtualNetworkGatewayConnectionInner getByResourceGroup(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body(); + } + + /** + * Gets the specified virtual network gateway connection by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @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 virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); + } + + /** + * Gets the specified virtual network gateway connection by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayConnectionInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, VirtualNetworkGatewayConnectionInner>() { + @Override + public VirtualNetworkGatewayConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified virtual network gateway connection by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayConnectionInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), 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); + } + + /** + * Deletes the specified virtual network Gateway connection. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualNetworkGatewayConnectionName) { + deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().body(); + } + + /** + * Deletes the specified virtual network Gateway connection. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @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 virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); + } + + /** + * Deletes the specified virtual network Gateway connection. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified virtual network Gateway connection. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified virtual network Gateway connection. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualNetworkGatewayConnectionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body(); + } + + /** + * Deletes the specified virtual network Gateway connection. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @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 virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); + } + + /** + * Deletes the specified virtual network Gateway connection. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified virtual network Gateway connection. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), 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); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayConnectionInner object if successful. + */ + public VirtualNetworkGatewayConnectionInner updateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().body(); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @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 updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, VirtualNetworkGatewayConnectionInner>() { + @Override + public VirtualNetworkGatewayConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayConnectionInner object if successful. + */ + public VirtualNetworkGatewayConnectionInner updateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).toBlocking().last().body(); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags), serviceCallback); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).map(new Func1, VirtualNetworkGatewayConnectionInner>() { + @Override + public VirtualNetworkGatewayConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayConnectionInner object if successful. + */ + public VirtualNetworkGatewayConnectionInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body(); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @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 beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayConnectionInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, VirtualNetworkGatewayConnectionInner>() { + @Override + public VirtualNetworkGatewayConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayConnectionInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayConnectionInner object if successful. + */ + public VirtualNetworkGatewayConnectionInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).toBlocking().single().body(); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @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 beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags), serviceCallback); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayConnectionInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).map(new Func1, VirtualNetworkGatewayConnectionInner>() { + @Override + public VirtualNetworkGatewayConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayConnectionInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource 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 ConnectionSharedKeyInner object if successful. + */ + public ConnectionSharedKeyInner setSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { + return setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().last().body(); + } + + /** + * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource 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 setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters), serviceCallback); + } + + /** + * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { + return setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).map(new Func1, ConnectionSharedKeyInner>() { + @Override + public ConnectionSharedKeyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> setSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.setSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource 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 ConnectionSharedKeyInner object if successful. + */ + public ConnectionSharedKeyInner beginSetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { + return beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().single().body(); + } + + /** + * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource 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 beginSetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters), serviceCallback); + } + + /** + * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionSharedKeyInner object + */ + public Observable beginSetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { + return beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).map(new Func1, ConnectionSharedKeyInner>() { + @Override + public ConnectionSharedKeyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionSharedKeyInner object + */ + public Observable> beginSetSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginSetSharedKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginSetSharedKeyDelegate(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); + } + + /** + * The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection shared key name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ConnectionSharedKeyInner object if successful. + */ + public ConnectionSharedKeyInner getSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return getSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body(); + } + + /** + * The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection shared key name. + * @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 getSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); + } + + /** + * The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection shared key name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionSharedKeyInner object + */ + public Observable getSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return getSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, ConnectionSharedKeyInner>() { + @Override + public ConnectionSharedKeyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection shared key name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionSharedKeyInner object + */ + public Observable> getSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSharedKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSharedKeyDelegate(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); + } + + /** + * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. + * + * @param resourceGroupName The name of the 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<VirtualNetworkGatewayConnectionInner> 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(); + } + }; + } + + /** + * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. + * + * @param resourceGroupName The name of the 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); + } + + /** + * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkGatewayConnectionInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkGatewayConnectionInner> 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)); + } + }); + } + + /** + * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkGatewayConnectionInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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); + } + + /** + * The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name. + * @param keyLength The virtual network connection reset shared key length, should between 1 and 128. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ConnectionResetSharedKeyInner object if successful. + */ + public ConnectionResetSharedKeyInner resetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) { + return resetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength).toBlocking().last().body(); + } + + /** + * The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name. + * @param keyLength The virtual network connection reset shared key length, should between 1 and 128. + * @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 resetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength), serviceCallback); + } + + /** + * The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name. + * @param keyLength The virtual network connection reset shared key length, should between 1 and 128. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable resetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) { + return resetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength).map(new Func1, ConnectionResetSharedKeyInner>() { + @Override + public ConnectionResetSharedKeyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name. + * @param keyLength The virtual network connection reset shared key length, should between 1 and 128. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> resetSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + ConnectionResetSharedKeyInner parameters = new ConnectionResetSharedKeyInner(); + parameters.withKeyLength(keyLength); + Observable> observable = service.resetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name. + * @param keyLength The virtual network connection reset shared key length, should between 1 and 128. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ConnectionResetSharedKeyInner object if successful. + */ + public ConnectionResetSharedKeyInner beginResetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) { + return beginResetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength).toBlocking().single().body(); + } + + /** + * The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name. + * @param keyLength The virtual network connection reset shared key length, should between 1 and 128. + * @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 beginResetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginResetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength), serviceCallback); + } + + /** + * The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name. + * @param keyLength The virtual network connection reset shared key length, should between 1 and 128. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionResetSharedKeyInner object + */ + public Observable beginResetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) { + return beginResetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength).map(new Func1, ConnectionResetSharedKeyInner>() { + @Override + public ConnectionResetSharedKeyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name. + * @param keyLength The virtual network connection reset shared key length, should between 1 and 128. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionResetSharedKeyInner object + */ + public Observable> beginResetSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + ConnectionResetSharedKeyInner parameters = new ConnectionResetSharedKeyInner(); + parameters.withKeyLength(keyLength); + return service.beginResetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginResetSharedKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginResetSharedKeyDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String startPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().body(); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @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 startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> startPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String filterData = null; + VpnPacketCaptureStartParameters parameters = new VpnPacketCaptureStartParameters(); + parameters.withFilterData(null); + Observable> observable = service.startPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param filterData Start Packet capture parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String startPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData) { + return startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, filterData).toBlocking().last().body(); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param filterData Start Packet capture parameters. + * @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 startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, filterData), serviceCallback); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param filterData Start Packet capture parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData) { + return startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, filterData).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param filterData Start Packet capture parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> startPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + VpnPacketCaptureStartParameters parameters = null; + if (filterData != null) { + parameters = new VpnPacketCaptureStartParameters(); + parameters.withFilterData(filterData); + } + Observable> observable = service.startPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String beginStartPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body(); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @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 beginStartPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginStartPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginStartPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String filterData = null; + VpnPacketCaptureStartParameters parameters = new VpnPacketCaptureStartParameters(); + parameters.withFilterData(null); + return service.beginStartPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartPacketCaptureDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param filterData Start Packet capture parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String beginStartPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData) { + return beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, filterData).toBlocking().single().body(); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param filterData Start Packet capture parameters. + * @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 beginStartPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, filterData), serviceCallback); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param filterData Start Packet capture parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginStartPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData) { + return beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, filterData).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param filterData Start Packet capture parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginStartPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + VpnPacketCaptureStartParameters parameters = null; + if (filterData != null) { + parameters = new VpnPacketCaptureStartParameters(); + parameters.withFilterData(filterData); + } + return service.beginStartPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartPacketCaptureDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStartPacketCaptureDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String stopPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().body(); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @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 stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> stopPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String sasUrl = null; + VpnPacketCaptureStopParameters parameters = new VpnPacketCaptureStopParameters(); + parameters.withSasUrl(null); + Observable> observable = service.stopPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String stopPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl) { + return stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, sasUrl).toBlocking().last().body(); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @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 stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, sasUrl), serviceCallback); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl) { + return stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, sasUrl).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> stopPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + VpnPacketCaptureStopParameters parameters = new VpnPacketCaptureStopParameters(); + parameters.withSasUrl(sasUrl); + Observable> observable = service.stopPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String beginStopPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body(); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @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 beginStopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginStopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginStopPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String sasUrl = null; + VpnPacketCaptureStopParameters parameters = new VpnPacketCaptureStopParameters(); + parameters.withSasUrl(null); + return service.beginStopPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopPacketCaptureDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String beginStopPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl) { + return beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, sasUrl).toBlocking().single().body(); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @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 beginStopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, sasUrl), serviceCallback); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginStopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl) { + return beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, sasUrl).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops packet capture on virtual network gateway connection in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginStopPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + VpnPacketCaptureStopParameters parameters = new VpnPacketCaptureStopParameters(); + parameters.withSasUrl(sasUrl); + return service.beginStopPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopPacketCaptureDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStopPacketCaptureDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. + * + * @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<VirtualNetworkGatewayConnectionInner> 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(); + } + }; + } + + /** + * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. + * + * @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); + } + + /** + * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. + * + * @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<VirtualNetworkGatewayConnectionInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. + * + * @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<VirtualNetworkGatewayConnectionInner> 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)); + } + }); + } + + /** + * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkGatewayConnectionInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayImpl.java new file mode 100644 index 000000000000..d19230357cbc --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayImpl.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. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGateway; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayType; +import com.microsoft.azure.management.network.v2019_09_01.VpnType; +import com.microsoft.azure.management.network.v2019_09_01.VpnGatewayGeneration; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewaySku; +import com.microsoft.azure.management.network.v2019_09_01.VpnClientConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.BgpSettings; +import com.microsoft.azure.management.network.v2019_09_01.AddressSpace; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class VirtualNetworkGatewayImpl extends GroupableResourceCoreImpl implements VirtualNetworkGateway, VirtualNetworkGateway.Definition, VirtualNetworkGateway.Update { + VirtualNetworkGatewayImpl(String name, VirtualNetworkGatewayInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + VirtualNetworkGatewaysInner client = this.manager().inner().virtualNetworkGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VirtualNetworkGatewaysInner client = this.manager().inner().virtualNetworkGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VirtualNetworkGatewaysInner client = this.manager().inner().virtualNetworkGateways(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Boolean activeActive() { + return this.inner().activeActive(); + } + + @Override + public BgpSettings bgpSettings() { + return this.inner().bgpSettings(); + } + + @Override + public AddressSpace customRoutes() { + return this.inner().customRoutes(); + } + + @Override + public Boolean enableBgp() { + return this.inner().enableBgp(); + } + + @Override + public Boolean enableDnsForwarding() { + return this.inner().enableDnsForwarding(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public SubResource gatewayDefaultSite() { + return this.inner().gatewayDefaultSite(); + } + + @Override + public VirtualNetworkGatewayType gatewayType() { + return this.inner().gatewayType(); + } + + @Override + public String inboundDnsForwardingEndpoint() { + return this.inner().inboundDnsForwardingEndpoint(); + } + + @Override + public List ipConfigurations() { + return this.inner().ipConfigurations(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public VirtualNetworkGatewaySku sku() { + return this.inner().sku(); + } + + @Override + public VpnClientConfiguration vpnClientConfiguration() { + return this.inner().vpnClientConfiguration(); + } + + @Override + public VpnGatewayGeneration vpnGatewayGeneration() { + return this.inner().vpnGatewayGeneration(); + } + + @Override + public VpnType vpnType() { + return this.inner().vpnType(); + } + + @Override + public VirtualNetworkGatewayImpl withActiveActive(Boolean activeActive) { + this.inner().withActiveActive(activeActive); + return this; + } + + @Override + public VirtualNetworkGatewayImpl withBgpSettings(BgpSettings bgpSettings) { + this.inner().withBgpSettings(bgpSettings); + return this; + } + + @Override + public VirtualNetworkGatewayImpl withCustomRoutes(AddressSpace customRoutes) { + this.inner().withCustomRoutes(customRoutes); + return this; + } + + @Override + public VirtualNetworkGatewayImpl withEnableBgp(Boolean enableBgp) { + this.inner().withEnableBgp(enableBgp); + return this; + } + + @Override + public VirtualNetworkGatewayImpl withEnableDnsForwarding(Boolean enableDnsForwarding) { + this.inner().withEnableDnsForwarding(enableDnsForwarding); + return this; + } + + @Override + public VirtualNetworkGatewayImpl withGatewayDefaultSite(SubResource gatewayDefaultSite) { + this.inner().withGatewayDefaultSite(gatewayDefaultSite); + return this; + } + + @Override + public VirtualNetworkGatewayImpl withGatewayType(VirtualNetworkGatewayType gatewayType) { + this.inner().withGatewayType(gatewayType); + return this; + } + + @Override + public VirtualNetworkGatewayImpl withIpConfigurations(List ipConfigurations) { + this.inner().withIpConfigurations(ipConfigurations); + return this; + } + + @Override + public VirtualNetworkGatewayImpl withSku(VirtualNetworkGatewaySku sku) { + this.inner().withSku(sku); + return this; + } + + @Override + public VirtualNetworkGatewayImpl withVpnClientConfiguration(VpnClientConfiguration vpnClientConfiguration) { + this.inner().withVpnClientConfiguration(vpnClientConfiguration); + return this; + } + + @Override + public VirtualNetworkGatewayImpl withVpnGatewayGeneration(VpnGatewayGeneration vpnGatewayGeneration) { + this.inner().withVpnGatewayGeneration(vpnGatewayGeneration); + return this; + } + + @Override + public VirtualNetworkGatewayImpl withVpnType(VpnType vpnType) { + this.inner().withVpnType(vpnType); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayInner.java new file mode 100644 index 000000000000..18a78f9b0d54 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewayInner.java @@ -0,0 +1,443 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayType; +import com.microsoft.azure.management.network.v2019_09_01.VpnType; +import com.microsoft.azure.management.network.v2019_09_01.VpnGatewayGeneration; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewaySku; +import com.microsoft.azure.management.network.v2019_09_01.VpnClientConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.BgpSettings; +import com.microsoft.azure.management.network.v2019_09_01.AddressSpace; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * A common class for general resource information. + */ +@JsonFlatten +@SkipParentValidation +public class VirtualNetworkGatewayInner extends Resource { + /** + * IP configurations for virtual network gateway. + */ + @JsonProperty(value = "properties.ipConfigurations") + private List ipConfigurations; + + /** + * The type of this virtual network gateway. Possible values include: + * 'Vpn', 'ExpressRoute'. + */ + @JsonProperty(value = "properties.gatewayType") + private VirtualNetworkGatewayType gatewayType; + + /** + * The type of this virtual network gateway. Possible values include: + * 'PolicyBased', 'RouteBased'. + */ + @JsonProperty(value = "properties.vpnType") + private VpnType vpnType; + + /** + * The generation for this VirtualNetworkGateway. Must be None if + * gatewayType is not VPN. Possible values include: 'None', 'Generation1', + * 'Generation2'. + */ + @JsonProperty(value = "properties.vpnGatewayGeneration") + private VpnGatewayGeneration vpnGatewayGeneration; + + /** + * Whether BGP is enabled for this virtual network gateway or not. + */ + @JsonProperty(value = "properties.enableBgp") + private Boolean enableBgp; + + /** + * ActiveActive flag. + */ + @JsonProperty(value = "properties.activeActive") + private Boolean activeActive; + + /** + * The reference of the LocalNetworkGateway resource which represents local + * network site having default routes. Assign Null value in case of + * removing existing default site setting. + */ + @JsonProperty(value = "properties.gatewayDefaultSite") + private SubResource gatewayDefaultSite; + + /** + * The reference of the VirtualNetworkGatewaySku resource which represents + * the SKU selected for Virtual network gateway. + */ + @JsonProperty(value = "properties.sku") + private VirtualNetworkGatewaySku sku; + + /** + * The reference of the VpnClientConfiguration resource which represents + * the P2S VpnClient configurations. + */ + @JsonProperty(value = "properties.vpnClientConfiguration") + private VpnClientConfiguration vpnClientConfiguration; + + /** + * Virtual network gateway's BGP speaker settings. + */ + @JsonProperty(value = "properties.bgpSettings") + private BgpSettings bgpSettings; + + /** + * The reference of the address space resource which represents the custom + * routes address space specified by the customer for virtual network + * gateway and VpnClient. + */ + @JsonProperty(value = "properties.customRoutes") + private AddressSpace customRoutes; + + /** + * The resource GUID property of the virtual network gateway resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the virtual network gateway resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Whether dns forwarding is enabled or not. + */ + @JsonProperty(value = "properties.enableDnsForwarding") + private Boolean enableDnsForwarding; + + /** + * The IP address allocated by the gateway to which dns requests can be + * sent. + */ + @JsonProperty(value = "properties.inboundDnsForwardingEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String inboundDnsForwardingEndpoint; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get iP configurations for virtual network gateway. + * + * @return the ipConfigurations value + */ + public List ipConfigurations() { + return this.ipConfigurations; + } + + /** + * Set iP configurations for virtual network gateway. + * + * @param ipConfigurations the ipConfigurations value to set + * @return the VirtualNetworkGatewayInner object itself. + */ + public VirtualNetworkGatewayInner withIpConfigurations(List ipConfigurations) { + this.ipConfigurations = ipConfigurations; + return this; + } + + /** + * Get the type of this virtual network gateway. Possible values include: 'Vpn', 'ExpressRoute'. + * + * @return the gatewayType value + */ + public VirtualNetworkGatewayType gatewayType() { + return this.gatewayType; + } + + /** + * Set the type of this virtual network gateway. Possible values include: 'Vpn', 'ExpressRoute'. + * + * @param gatewayType the gatewayType value to set + * @return the VirtualNetworkGatewayInner object itself. + */ + public VirtualNetworkGatewayInner withGatewayType(VirtualNetworkGatewayType gatewayType) { + this.gatewayType = gatewayType; + return this; + } + + /** + * Get the type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'. + * + * @return the vpnType value + */ + public VpnType vpnType() { + return this.vpnType; + } + + /** + * Set the type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'. + * + * @param vpnType the vpnType value to set + * @return the VirtualNetworkGatewayInner object itself. + */ + public VirtualNetworkGatewayInner withVpnType(VpnType vpnType) { + this.vpnType = vpnType; + return this; + } + + /** + * Get the generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. Possible values include: 'None', 'Generation1', 'Generation2'. + * + * @return the vpnGatewayGeneration value + */ + public VpnGatewayGeneration vpnGatewayGeneration() { + return this.vpnGatewayGeneration; + } + + /** + * Set the generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. Possible values include: 'None', 'Generation1', 'Generation2'. + * + * @param vpnGatewayGeneration the vpnGatewayGeneration value to set + * @return the VirtualNetworkGatewayInner object itself. + */ + public VirtualNetworkGatewayInner withVpnGatewayGeneration(VpnGatewayGeneration vpnGatewayGeneration) { + this.vpnGatewayGeneration = vpnGatewayGeneration; + return this; + } + + /** + * Get whether BGP is enabled for this virtual network gateway or not. + * + * @return the enableBgp value + */ + public Boolean enableBgp() { + return this.enableBgp; + } + + /** + * Set whether BGP is enabled for this virtual network gateway or not. + * + * @param enableBgp the enableBgp value to set + * @return the VirtualNetworkGatewayInner object itself. + */ + public VirtualNetworkGatewayInner withEnableBgp(Boolean enableBgp) { + this.enableBgp = enableBgp; + return this; + } + + /** + * Get activeActive flag. + * + * @return the activeActive value + */ + public Boolean activeActive() { + return this.activeActive; + } + + /** + * Set activeActive flag. + * + * @param activeActive the activeActive value to set + * @return the VirtualNetworkGatewayInner object itself. + */ + public VirtualNetworkGatewayInner withActiveActive(Boolean activeActive) { + this.activeActive = activeActive; + return this; + } + + /** + * Get the reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting. + * + * @return the gatewayDefaultSite value + */ + public SubResource gatewayDefaultSite() { + return this.gatewayDefaultSite; + } + + /** + * Set the reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting. + * + * @param gatewayDefaultSite the gatewayDefaultSite value to set + * @return the VirtualNetworkGatewayInner object itself. + */ + public VirtualNetworkGatewayInner withGatewayDefaultSite(SubResource gatewayDefaultSite) { + this.gatewayDefaultSite = gatewayDefaultSite; + return this; + } + + /** + * Get the reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. + * + * @return the sku value + */ + public VirtualNetworkGatewaySku sku() { + return this.sku; + } + + /** + * Set the reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. + * + * @param sku the sku value to set + * @return the VirtualNetworkGatewayInner object itself. + */ + public VirtualNetworkGatewayInner withSku(VirtualNetworkGatewaySku sku) { + this.sku = sku; + return this; + } + + /** + * Get the reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations. + * + * @return the vpnClientConfiguration value + */ + public VpnClientConfiguration vpnClientConfiguration() { + return this.vpnClientConfiguration; + } + + /** + * Set the reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations. + * + * @param vpnClientConfiguration the vpnClientConfiguration value to set + * @return the VirtualNetworkGatewayInner object itself. + */ + public VirtualNetworkGatewayInner withVpnClientConfiguration(VpnClientConfiguration vpnClientConfiguration) { + this.vpnClientConfiguration = vpnClientConfiguration; + return this; + } + + /** + * Get virtual network gateway's BGP speaker settings. + * + * @return the bgpSettings value + */ + public BgpSettings bgpSettings() { + return this.bgpSettings; + } + + /** + * Set virtual network gateway's BGP speaker settings. + * + * @param bgpSettings the bgpSettings value to set + * @return the VirtualNetworkGatewayInner object itself. + */ + public VirtualNetworkGatewayInner withBgpSettings(BgpSettings bgpSettings) { + this.bgpSettings = bgpSettings; + return this; + } + + /** + * Get the reference of the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient. + * + * @return the customRoutes value + */ + public AddressSpace customRoutes() { + return this.customRoutes; + } + + /** + * Set the reference of the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient. + * + * @param customRoutes the customRoutes value to set + * @return the VirtualNetworkGatewayInner object itself. + */ + public VirtualNetworkGatewayInner withCustomRoutes(AddressSpace customRoutes) { + this.customRoutes = customRoutes; + return this; + } + + /** + * Get the resource GUID property of the virtual network gateway resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the virtual network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get whether dns forwarding is enabled or not. + * + * @return the enableDnsForwarding value + */ + public Boolean enableDnsForwarding() { + return this.enableDnsForwarding; + } + + /** + * Set whether dns forwarding is enabled or not. + * + * @param enableDnsForwarding the enableDnsForwarding value to set + * @return the VirtualNetworkGatewayInner object itself. + */ + public VirtualNetworkGatewayInner withEnableDnsForwarding(Boolean enableDnsForwarding) { + this.enableDnsForwarding = enableDnsForwarding; + return this; + } + + /** + * Get the IP address allocated by the gateway to which dns requests can be sent. + * + * @return the inboundDnsForwardingEndpoint value + */ + public String inboundDnsForwardingEndpoint() { + return this.inboundDnsForwardingEndpoint; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the VirtualNetworkGatewayInner object itself. + */ + public VirtualNetworkGatewayInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewaysImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewaysImpl.java new file mode 100644 index 000000000000..d92a05c75104 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewaysImpl.java @@ -0,0 +1,275 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGateways; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGateway; +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.network.v2019_09_01.BgpPeerStatusListResult; +import com.microsoft.azure.management.network.v2019_09_01.GatewayRouteListResult; +import com.microsoft.azure.management.network.v2019_09_01.VpnClientIPsecParameters; +import com.microsoft.azure.management.network.v2019_09_01.VpnClientConnectionHealthDetailListResult; +import com.microsoft.azure.management.network.v2019_09_01.VpnClientParameters; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionListEntity; +import com.microsoft.azure.management.network.v2019_09_01.VpnDeviceScriptParameters; + +class VirtualNetworkGatewaysImpl extends GroupableResourcesCoreImpl implements VirtualNetworkGateways { + protected VirtualNetworkGatewaysImpl(NetworkManager manager) { + super(manager.inner().virtualNetworkGateways(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + VirtualNetworkGatewaysInner 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) { + VirtualNetworkGatewaysInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + VirtualNetworkGatewaysInner 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 VirtualNetworkGateway call(VirtualNetworkGatewayInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public VirtualNetworkGatewayImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable resetAsync(String resourceGroupName, String virtualNetworkGatewayName) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.resetAsync(resourceGroupName, virtualNetworkGatewayName) + .map(new Func1() { + @Override + public VirtualNetworkGateway call(VirtualNetworkGatewayInner inner) { + return new VirtualNetworkGatewayImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + public Completable resetVpnClientSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayName) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.resetVpnClientSharedKeyAsync(resourceGroupName, virtualNetworkGatewayName).toCompletable(); + } + + @Override + public Observable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.generatevpnclientpackageAsync(resourceGroupName, virtualNetworkGatewayName, parameters) + ;} + + @Override + public Observable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.generateVpnProfileAsync(resourceGroupName, virtualNetworkGatewayName, parameters) + ;} + + @Override + public Observable getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.getVpnProfilePackageUrlAsync(resourceGroupName, virtualNetworkGatewayName) + ;} + + @Override + public Observable getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.getBgpPeerStatusAsync(resourceGroupName, virtualNetworkGatewayName) + .map(new Func1() { + @Override + public BgpPeerStatusListResult call(BgpPeerStatusListResultInner inner) { + return new BgpPeerStatusListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.supportedVpnDevicesAsync(resourceGroupName, virtualNetworkGatewayName) + ;} + + @Override + public Observable getLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.getLearnedRoutesAsync(resourceGroupName, virtualNetworkGatewayName) + .map(new Func1() { + @Override + public GatewayRouteListResult call(GatewayRouteListResultInner inner) { + return new GatewayRouteListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.getAdvertisedRoutesAsync(resourceGroupName, virtualNetworkGatewayName, peer) + .map(new Func1() { + @Override + public GatewayRouteListResult call(GatewayRouteListResultInner inner) { + return new GatewayRouteListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable setVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.setVpnclientIpsecParametersAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams) + .map(new Func1() { + @Override + public VpnClientIPsecParameters call(VpnClientIPsecParametersInner inner) { + return new VpnClientIPsecParametersImpl(inner, manager()); + } + }); + } + + @Override + public Observable getVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.getVpnclientIpsecParametersAsync(resourceGroupName, virtualNetworkGatewayName) + .map(new Func1() { + @Override + public VpnClientIPsecParameters call(VpnClientIPsecParametersInner inner) { + return new VpnClientIPsecParametersImpl(inner, manager()); + } + }); + } + + @Override + public Observable startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.startPacketCaptureAsync(resourceGroupName, virtualNetworkGatewayName) + ;} + + @Override + public Observable stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.stopPacketCaptureAsync(resourceGroupName, virtualNetworkGatewayName) + ;} + + @Override + public Observable getVpnclientConnectionHealthAsync(String resourceGroupName, String virtualNetworkGatewayName) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.getVpnclientConnectionHealthAsync(resourceGroupName, virtualNetworkGatewayName) + .map(new Func1() { + @Override + public VpnClientConnectionHealthDetailListResult call(VpnClientConnectionHealthDetailListResultInner inner) { + return new VpnClientConnectionHealthDetailListResultImpl(inner, manager()); + } + }); + } + + @Override + protected VirtualNetworkGatewayImpl wrapModel(VirtualNetworkGatewayInner inner) { + return new VirtualNetworkGatewayImpl(inner.name(), inner, manager()); + } + + @Override + protected VirtualNetworkGatewayImpl wrapModel(String name) { + return new VirtualNetworkGatewayImpl(name, new VirtualNetworkGatewayInner(), this.manager()); + } + + private VirtualNetworkGatewayConnectionListEntityImpl wrapVirtualNetworkGatewayConnectionListEntityModel(VirtualNetworkGatewayConnectionListEntityInner inner) { + return new VirtualNetworkGatewayConnectionListEntityImpl(inner, manager()); + } + + @Override + public Observable listConnectionsAsync(final String resourceGroupName, final String virtualNetworkGatewayName) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.listConnectionsAsync(resourceGroupName, virtualNetworkGatewayName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VirtualNetworkGatewayConnectionListEntity call(VirtualNetworkGatewayConnectionListEntityInner inner) { + return wrapVirtualNetworkGatewayConnectionListEntityModel(inner); + } + }); + } + + @Override + public Observable vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.vpnDeviceConfigurationScriptAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters) + ;} + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewaysInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewaysInner.java new file mode 100644 index 000000000000..0a27e78eed67 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkGatewaysInner.java @@ -0,0 +1,4256 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +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.network.v2019_09_01.ErrorException; +import com.microsoft.azure.management.network.v2019_09_01.TagsObject; +import com.microsoft.azure.management.network.v2019_09_01.VpnClientParameters; +import com.microsoft.azure.management.network.v2019_09_01.VpnDeviceScriptParameters; +import com.microsoft.azure.management.network.v2019_09_01.VpnPacketCaptureStartParameters; +import com.microsoft.azure.management.network.v2019_09_01.VpnPacketCaptureStopParameters; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in VirtualNetworkGateways. + */ +public class VirtualNetworkGatewaysInner implements InnerSupportsGet, InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private VirtualNetworkGatewaysService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VirtualNetworkGatewaysInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VirtualNetworkGatewaysInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VirtualNetworkGatewaysService.class); + this.client = client; + } + + /** + * The interface defining all the services for VirtualNetworkGateways to be + * used by Retrofit to perform actually REST calls. + */ + interface VirtualNetworkGatewaysService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGateways createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkGatewayInner 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.network.v2019_09_01.VirtualNetworkGateways beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkGatewayInner 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.network.v2019_09_01.VirtualNetworkGateways getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGateways beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGateways listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.VirtualNetworkGateways listConnections" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections") + Observable> listConnections(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways reset" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset") + Observable> reset(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("gatewayVip") String gatewayVip, @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.network.v2019_09_01.VirtualNetworkGateways beginReset" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset") + Observable> beginReset(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("gatewayVip") String gatewayVip, @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.network.v2019_09_01.VirtualNetworkGateways resetVpnClientSharedKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey") + Observable> resetVpnClientSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways beginResetVpnClientSharedKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey") + Observable> beginResetVpnClientSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways generatevpnclientpackage" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage") + Observable> generatevpnclientpackage(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParameters 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.network.v2019_09_01.VirtualNetworkGateways beginGeneratevpnclientpackage" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage") + Observable> beginGeneratevpnclientpackage(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParameters 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.network.v2019_09_01.VirtualNetworkGateways generateVpnProfile" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile") + Observable> generateVpnProfile(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParameters 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.network.v2019_09_01.VirtualNetworkGateways beginGenerateVpnProfile" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile") + Observable> beginGenerateVpnProfile(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParameters 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.network.v2019_09_01.VirtualNetworkGateways getVpnProfilePackageUrl" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl") + Observable> getVpnProfilePackageUrl(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways beginGetVpnProfilePackageUrl" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl") + Observable> beginGetVpnProfilePackageUrl(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways getBgpPeerStatus" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus") + Observable> getBgpPeerStatus(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("peer") String peer, @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.network.v2019_09_01.VirtualNetworkGateways beginGetBgpPeerStatus" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus") + Observable> beginGetBgpPeerStatus(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("peer") String peer, @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.network.v2019_09_01.VirtualNetworkGateways supportedVpnDevices" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices") + Observable> supportedVpnDevices(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways getLearnedRoutes" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes") + Observable> getLearnedRoutes(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways beginGetLearnedRoutes" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes") + Observable> beginGetLearnedRoutes(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways getAdvertisedRoutes" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes") + Observable> getAdvertisedRoutes(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("peer") String peer, @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.network.v2019_09_01.VirtualNetworkGateways beginGetAdvertisedRoutes" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes") + Observable> beginGetAdvertisedRoutes(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("peer") String peer, @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.network.v2019_09_01.VirtualNetworkGateways setVpnclientIpsecParameters" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters") + Observable> setVpnclientIpsecParameters(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientIPsecParametersInner vpnclientIpsecParams, @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.network.v2019_09_01.VirtualNetworkGateways beginSetVpnclientIpsecParameters" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters") + Observable> beginSetVpnclientIpsecParameters(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientIPsecParametersInner vpnclientIpsecParams, @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.network.v2019_09_01.VirtualNetworkGateways getVpnclientIpsecParameters" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters") + Observable> getVpnclientIpsecParameters(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways beginGetVpnclientIpsecParameters" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters") + Observable> beginGetVpnclientIpsecParameters(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways vpnDeviceConfigurationScript" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript") + Observable> vpnDeviceConfigurationScript(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Body VpnDeviceScriptParameters 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.network.v2019_09_01.VirtualNetworkGateways startPacketCapture" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture") + Observable> startPacketCapture(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VpnPacketCaptureStartParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGateways beginStartPacketCapture" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture") + Observable> beginStartPacketCapture(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VpnPacketCaptureStartParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGateways stopPacketCapture" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture") + Observable> stopPacketCapture(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VpnPacketCaptureStopParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGateways beginStopPacketCapture" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture") + Observable> beginStopPacketCapture(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VpnPacketCaptureStopParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGateways getVpnclientConnectionHealth" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth") + Observable> getVpnclientConnectionHealth(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways beginGetVpnclientConnectionHealth" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth") + Observable> beginGetVpnclientConnectionHealth(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.v2019_09_01.VirtualNetworkGateways 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.network.v2019_09_01.VirtualNetworkGateways listConnectionsNext" }) + @GET + Observable> listConnectionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to create or update virtual network gateway 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 VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner createOrUpdate(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to create or update virtual network gateway 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 createOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); + } + + /** + * Creates or updates a virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to create or update virtual network gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to create or update virtual network gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to create or update virtual network gateway 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 VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to create or update virtual network gateway 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 beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); + } + + /** + * Creates or updates a virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to create or update virtual network gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to create or update virtual network gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 virtual network gateway by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner getByResourceGroup(String resourceGroupName, String virtualNetworkGatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Gets the specified virtual network gateway by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Gets the specified virtual network gateway by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified virtual network gateway by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), 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); + } + + /** + * Deletes the specified virtual network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualNetworkGatewayName) { + deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Deletes the specified virtual network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Deletes the specified virtual network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified virtual network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified virtual network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualNetworkGatewayName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Deletes the specified virtual network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Deletes the specified virtual network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified virtual network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), 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); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner updateTags(String resourceGroupName, String virtualNetworkGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner updateTags(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).toBlocking().last().body(); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags), serviceCallback); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).toBlocking().single().body(); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @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 beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags), serviceCallback); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all virtual network gateways by resource group. + * + * @param resourceGroupName The name of the 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<VirtualNetworkGatewayInner> 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 all virtual network gateways by resource group. + * + * @param resourceGroupName The name of the 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 all virtual network gateways by resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkGatewayInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all virtual network gateways by resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkGatewayInner> 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 all virtual network gateways by resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkGatewayInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all the connections in a virtual network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VirtualNetworkGatewayConnectionListEntityInner> object if successful. + */ + public PagedList listConnections(final String resourceGroupName, final String virtualNetworkGatewayName) { + ServiceResponse> response = listConnectionsSinglePageAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listConnectionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the connections in a virtual network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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> listConnectionsAsync(final String resourceGroupName, final String virtualNetworkGatewayName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listConnectionsSinglePageAsync(resourceGroupName, virtualNetworkGatewayName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listConnectionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the connections in a virtual network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkGatewayConnectionListEntityInner> object + */ + public Observable> listConnectionsAsync(final String resourceGroupName, final String virtualNetworkGatewayName) { + return listConnectionsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the connections in a virtual network gateway. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkGatewayConnectionListEntityInner> object + */ + public Observable>> listConnectionsWithServiceResponseAsync(final String resourceGroupName, final String virtualNetworkGatewayName) { + return listConnectionsSinglePageAsync(resourceGroupName, virtualNetworkGatewayName) + .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(listConnectionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the connections in a virtual network gateway. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkGatewayConnectionListEntityInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listConnectionsSinglePageAsync(final String resourceGroupName, final String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listConnections(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listConnectionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConnectionsDelegate(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); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner reset(String resourceGroupName, String virtualNetworkGatewayName) { + return resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 resetAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable resetAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> resetWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String gatewayVip = null; + Observable> observable = service.reset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner reset(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { + return resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip).toBlocking().last().body(); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. + * @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 resetAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip), serviceCallback); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable resetAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { + return resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> resetWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.reset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner beginReset(String resourceGroupName, String virtualNetworkGatewayName) { + return beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 beginResetAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable beginResetAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable> beginResetWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String gatewayVip = null; + return service.beginReset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginResetDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner beginReset(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { + return beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip).toBlocking().single().body(); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. + * @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 beginResetAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip), serviceCallback); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable beginResetAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { + return beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets the primary of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable> beginResetWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginReset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginResetDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginResetDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 resetVpnClientSharedKey(String resourceGroupName, String virtualNetworkGatewayName) { + resetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 resetVpnClientSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable resetVpnClientSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return resetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> resetVpnClientSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.resetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginResetVpnClientSharedKey(String resourceGroupName, String virtualNetworkGatewayName) { + beginResetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 beginResetVpnClientSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginResetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginResetVpnClientSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginResetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginResetVpnClientSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginResetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginResetVpnClientSharedKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginResetVpnClientSharedKeyDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package 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 String object if successful. + */ + public String generatevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + return generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().last().body(); + } + + /** + * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package 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 generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); + } + + /** + * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + return generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> generatevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.generatevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package 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 String object if successful. + */ + public String beginGeneratevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + return beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().body(); + } + + /** + * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package 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 beginGeneratevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); + } + + /** + * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginGeneratevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + return beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginGeneratevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginGeneratevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGeneratevpnclientpackageDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGeneratevpnclientpackageDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package 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 String object if successful. + */ + public String generateVpnProfile(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + return generateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().last().body(); + } + + /** + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package 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 generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(generateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); + } + + /** + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + return generateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> generateVpnProfileWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.generateVpnProfile(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package 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 String object if successful. + */ + public String beginGenerateVpnProfile(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().body(); + } + + /** + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package 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 beginGenerateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); + } + + /** + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginGenerateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginGenerateVpnProfileWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginGenerateVpnProfile(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGenerateVpnProfileDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGenerateVpnProfileDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 String object if successful. + */ + public String getVpnProfilePackageUrl(String resourceGroupName, String virtualNetworkGatewayName) { + return getVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return getVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getVpnProfilePackageUrlWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.getVpnProfilePackageUrl(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 String object if successful. + */ + public String beginGetVpnProfilePackageUrl(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 beginGetVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginGetVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginGetVpnProfilePackageUrlWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginGetVpnProfilePackageUrl(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetVpnProfilePackageUrlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetVpnProfilePackageUrlDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 BgpPeerStatusListResultInner object if successful. + */ + public BgpPeerStatusListResultInner getBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName) { + return getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, BgpPeerStatusListResultInner>() { + @Override + public BgpPeerStatusListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getBgpPeerStatusWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String peer = null; + Observable> observable = service.getBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer to retrieve the status of. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 BgpPeerStatusListResultInner object if successful. + */ + public BgpPeerStatusListResultInner getBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).toBlocking().last().body(); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer to retrieve the status of. + * @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 getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer), serviceCallback); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer to retrieve the status of. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).map(new Func1, BgpPeerStatusListResultInner>() { + @Override + public BgpPeerStatusListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer to retrieve the status of. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getBgpPeerStatusWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.getBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 BgpPeerStatusListResultInner object if successful. + */ + public BgpPeerStatusListResultInner beginGetBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 beginGetBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BgpPeerStatusListResultInner object + */ + public Observable beginGetBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, BgpPeerStatusListResultInner>() { + @Override + public BgpPeerStatusListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BgpPeerStatusListResultInner object + */ + public Observable> beginGetBgpPeerStatusWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String peer = null; + return service.beginGetBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetBgpPeerStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer to retrieve the status of. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 BgpPeerStatusListResultInner object if successful. + */ + public BgpPeerStatusListResultInner beginGetBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).toBlocking().single().body(); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer to retrieve the status of. + * @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 beginGetBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer), serviceCallback); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer to retrieve the status of. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BgpPeerStatusListResultInner object + */ + public Observable beginGetBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).map(new Func1, BgpPeerStatusListResultInner>() { + @Override + public BgpPeerStatusListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer to retrieve the status of. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BgpPeerStatusListResultInner object + */ + public Observable> beginGetBgpPeerStatusWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginGetBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetBgpPeerStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetBgpPeerStatusDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a xml format representation for supported vpn devices. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 String object if successful. + */ + public String supportedVpnDevices(String resourceGroupName, String virtualNetworkGatewayName) { + return supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Gets a xml format representation for supported vpn devices. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Gets a xml format representation for supported vpn devices. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a xml format representation for supported vpn devices. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> supportedVpnDevicesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = supportedVpnDevicesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse supportedVpnDevicesDelegate(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); + } + + /** + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 GatewayRouteListResultInner object if successful. + */ + public GatewayRouteListResultInner getLearnedRoutes(String resourceGroupName, String virtualNetworkGatewayName) { + return getLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 getLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return getLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, GatewayRouteListResultInner>() { + @Override + public GatewayRouteListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getLearnedRoutesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.getLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 GatewayRouteListResultInner object if successful. + */ + public GatewayRouteListResultInner beginGetLearnedRoutes(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 beginGetLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GatewayRouteListResultInner object + */ + public Observable beginGetLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, GatewayRouteListResultInner>() { + @Override + public GatewayRouteListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GatewayRouteListResultInner object + */ + public Observable> beginGetLearnedRoutesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginGetLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetLearnedRoutesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetLearnedRoutesDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 GatewayRouteListResultInner object if successful. + */ + public GatewayRouteListResultInner getAdvertisedRoutes(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return getAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).toBlocking().last().body(); + } + + /** + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer. + * @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 getAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer), serviceCallback); + } + + /** + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return getAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).map(new Func1, GatewayRouteListResultInner>() { + @Override + public GatewayRouteListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getAdvertisedRoutesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName 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 (peer == null) { + throw new IllegalArgumentException("Parameter peer is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.getAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 GatewayRouteListResultInner object if successful. + */ + public GatewayRouteListResultInner beginGetAdvertisedRoutes(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return beginGetAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).toBlocking().single().body(); + } + + /** + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer. + * @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 beginGetAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer), serviceCallback); + } + + /** + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GatewayRouteListResultInner object + */ + public Observable beginGetAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return beginGetAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).map(new Func1, GatewayRouteListResultInner>() { + @Override + public GatewayRouteListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GatewayRouteListResultInner object + */ + public Observable> beginGetAdvertisedRoutesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName 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 (peer == null) { + throw new IllegalArgumentException("Parameter peer is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginGetAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetAdvertisedRoutesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetAdvertisedRoutesDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource 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 VpnClientIPsecParametersInner object if successful. + */ + public VpnClientIPsecParametersInner setVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + return setVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).toBlocking().last().body(); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource 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 setVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(setVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams), serviceCallback); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable setVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + return setVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).map(new Func1, VpnClientIPsecParametersInner>() { + @Override + public VpnClientIPsecParametersInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> setVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName 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 (vpnclientIpsecParams == null) { + throw new IllegalArgumentException("Parameter vpnclientIpsecParams is required and cannot be null."); + } + Validator.validate(vpnclientIpsecParams); + final String apiVersion = "2019-09-01"; + Observable> observable = service.setVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), vpnclientIpsecParams, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource 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 VpnClientIPsecParametersInner object if successful. + */ + public VpnClientIPsecParametersInner beginSetVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + return beginSetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).toBlocking().single().body(); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource 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 beginSetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginSetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams), serviceCallback); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnClientIPsecParametersInner object + */ + public Observable beginSetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + return beginSetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).map(new Func1, VpnClientIPsecParametersInner>() { + @Override + public VpnClientIPsecParametersInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnClientIPsecParametersInner object + */ + public Observable> beginSetVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName 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 (vpnclientIpsecParams == null) { + throw new IllegalArgumentException("Parameter vpnclientIpsecParams is required and cannot be null."); + } + Validator.validate(vpnclientIpsecParams); + final String apiVersion = "2019-09-01"; + return service.beginSetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), vpnclientIpsecParams, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginSetVpnclientIpsecParametersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginSetVpnclientIpsecParametersDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnClientIPsecParametersInner object if successful. + */ + public VpnClientIPsecParametersInner getVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName) { + return getVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @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 getVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return getVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VpnClientIPsecParametersInner>() { + @Override + public VpnClientIPsecParametersInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.getVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnClientIPsecParametersInner object if successful. + */ + public VpnClientIPsecParametersInner beginGetVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @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 beginGetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnClientIPsecParametersInner object + */ + public Observable beginGetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VpnClientIPsecParametersInner>() { + @Override + public VpnClientIPsecParametersInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnClientIPsecParametersInner object + */ + public Observable> beginGetVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginGetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetVpnclientIpsecParametersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetVpnclientIpsecParametersDelegate(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 a xml format representation for vpn device configuration script. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for which the configuration script is generated. + * @param parameters Parameters supplied to the generate vpn device script 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 String object if successful. + */ + public String vpnDeviceConfigurationScript(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters) { + return vpnDeviceConfigurationScriptWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().single().body(); + } + + /** + * Gets a xml format representation for vpn device configuration script. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for which the configuration script is generated. + * @param parameters Parameters supplied to the generate vpn device script 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 vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(vpnDeviceConfigurationScriptWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters), serviceCallback); + } + + /** + * Gets a xml format representation for vpn device configuration script. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for which the configuration script is generated. + * @param parameters Parameters supplied to the generate vpn device script operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters) { + return vpnDeviceConfigurationScriptWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a xml format representation for vpn device configuration script. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for which the configuration script is generated. + * @param parameters Parameters supplied to the generate vpn device script operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> vpnDeviceConfigurationScriptWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.vpnDeviceConfigurationScript(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = vpnDeviceConfigurationScriptDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse vpnDeviceConfigurationScriptDelegate(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); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String startPacketCapture(String resourceGroupName, String virtualNetworkGatewayName) { + return startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> startPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String filterData = null; + VpnPacketCaptureStartParameters parameters = new VpnPacketCaptureStartParameters(); + parameters.withFilterData(null); + Observable> observable = service.startPacketCapture(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param filterData Start Packet capture parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String startPacketCapture(String resourceGroupName, String virtualNetworkGatewayName, String filterData) { + return startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, filterData).toBlocking().last().body(); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param filterData Start Packet capture parameters. + * @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 startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName, String filterData, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, filterData), serviceCallback); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param filterData Start Packet capture parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName, String filterData) { + return startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, filterData).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param filterData Start Packet capture parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> startPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String filterData) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + VpnPacketCaptureStartParameters parameters = null; + if (filterData != null) { + parameters = new VpnPacketCaptureStartParameters(); + parameters.withFilterData(filterData); + } + Observable> observable = service.startPacketCapture(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String beginStartPacketCapture(String resourceGroupName, String virtualNetworkGatewayName) { + return beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 beginStartPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginStartPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginStartPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String filterData = null; + VpnPacketCaptureStartParameters parameters = new VpnPacketCaptureStartParameters(); + parameters.withFilterData(null); + return service.beginStartPacketCapture(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartPacketCaptureDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param filterData Start Packet capture parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String beginStartPacketCapture(String resourceGroupName, String virtualNetworkGatewayName, String filterData) { + return beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, filterData).toBlocking().single().body(); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param filterData Start Packet capture parameters. + * @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 beginStartPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName, String filterData, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, filterData), serviceCallback); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param filterData Start Packet capture parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginStartPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName, String filterData) { + return beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, filterData).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param filterData Start Packet capture parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginStartPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String filterData) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + VpnPacketCaptureStartParameters parameters = null; + if (filterData != null) { + parameters = new VpnPacketCaptureStartParameters(); + parameters.withFilterData(filterData); + } + return service.beginStartPacketCapture(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartPacketCaptureDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStartPacketCaptureDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String stopPacketCapture(String resourceGroupName, String virtualNetworkGatewayName) { + return stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> stopPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String sasUrl = null; + VpnPacketCaptureStopParameters parameters = new VpnPacketCaptureStopParameters(); + parameters.withSasUrl(null); + Observable> observable = service.stopPacketCapture(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String stopPacketCapture(String resourceGroupName, String virtualNetworkGatewayName, String sasUrl) { + return stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, sasUrl).toBlocking().last().body(); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @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 stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName, String sasUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, sasUrl), serviceCallback); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName, String sasUrl) { + return stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, sasUrl).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> stopPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String sasUrl) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + VpnPacketCaptureStopParameters parameters = new VpnPacketCaptureStopParameters(); + parameters.withSasUrl(sasUrl); + Observable> observable = service.stopPacketCapture(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String beginStopPacketCapture(String resourceGroupName, String virtualNetworkGatewayName) { + return beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 beginStopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginStopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginStopPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String sasUrl = null; + VpnPacketCaptureStopParameters parameters = new VpnPacketCaptureStopParameters(); + parameters.withSasUrl(null); + return service.beginStopPacketCapture(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopPacketCaptureDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String beginStopPacketCapture(String resourceGroupName, String virtualNetworkGatewayName, String sasUrl) { + return beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, sasUrl).toBlocking().single().body(); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @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 beginStopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName, String sasUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, sasUrl), serviceCallback); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginStopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayName, String sasUrl) { + return beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, sasUrl).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops packet capture on virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param sasUrl SAS url for packet capture on virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginStopPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String sasUrl) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + VpnPacketCaptureStopParameters parameters = new VpnPacketCaptureStopParameters(); + parameters.withSasUrl(sasUrl); + return service.beginStopPacketCapture(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopPacketCaptureDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStopPacketCaptureDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnClientConnectionHealthDetailListResultInner object if successful. + */ + public VpnClientConnectionHealthDetailListResultInner getVpnclientConnectionHealth(String resourceGroupName, String virtualNetworkGatewayName) { + return getVpnclientConnectionHealthWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 getVpnclientConnectionHealthAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVpnclientConnectionHealthWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getVpnclientConnectionHealthAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return getVpnclientConnectionHealthWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VpnClientConnectionHealthDetailListResultInner>() { + @Override + public VpnClientConnectionHealthDetailListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getVpnclientConnectionHealthWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.getVpnclientConnectionHealth(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnClientConnectionHealthDetailListResultInner object if successful. + */ + public VpnClientConnectionHealthDetailListResultInner beginGetVpnclientConnectionHealth(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnclientConnectionHealthWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @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 beginGetVpnclientConnectionHealthAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetVpnclientConnectionHealthWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnClientConnectionHealthDetailListResultInner object + */ + public Observable beginGetVpnclientConnectionHealthAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnclientConnectionHealthWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VpnClientConnectionHealthDetailListResultInner>() { + @Override + public VpnClientConnectionHealthDetailListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnClientConnectionHealthDetailListResultInner object + */ + public Observable> beginGetVpnclientConnectionHealthWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginGetVpnclientConnectionHealth(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetVpnclientConnectionHealthDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetVpnclientConnectionHealthDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all virtual network gateways by resource group. + * + * @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<VirtualNetworkGatewayInner> 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 all virtual network gateways by resource group. + * + * @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 all virtual network gateways by resource group. + * + * @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<VirtualNetworkGatewayInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all virtual network gateways by resource group. + * + * @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<VirtualNetworkGatewayInner> 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 all virtual network gateways by resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkGatewayInner> 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 all the connections in a virtual network gateway. + * + * @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<VirtualNetworkGatewayConnectionListEntityInner> object if successful. + */ + public PagedList listConnectionsNext(final String nextPageLink) { + ServiceResponse> response = listConnectionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listConnectionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the connections in a virtual network gateway. + * + * @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> listConnectionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listConnectionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listConnectionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the connections in a virtual network gateway. + * + * @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<VirtualNetworkGatewayConnectionListEntityInner> object + */ + public Observable> listConnectionsNextAsync(final String nextPageLink) { + return listConnectionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the connections in a virtual network gateway. + * + * @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<VirtualNetworkGatewayConnectionListEntityInner> object + */ + public Observable>> listConnectionsNextWithServiceResponseAsync(final String nextPageLink) { + return listConnectionsNextSinglePageAsync(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(listConnectionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the connections in a virtual network gateway. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkGatewayConnectionListEntityInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listConnectionsNextSinglePageAsync(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.listConnectionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listConnectionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConnectionsNextDelegate(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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkImpl.java new file mode 100644 index 000000000000..7a7e958bfcb7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkImpl.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetwork; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.AddressSpace; +import com.microsoft.azure.management.network.v2019_09_01.DhcpOptions; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkBgpCommunities; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.Subnet; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkPeering; + +class VirtualNetworkImpl extends GroupableResourceCoreImpl implements VirtualNetwork, VirtualNetwork.Definition, VirtualNetwork.Update { + VirtualNetworkImpl(String name, VirtualNetworkInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + VirtualNetworksInner client = this.manager().inner().virtualNetworks(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VirtualNetworksInner client = this.manager().inner().virtualNetworks(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VirtualNetworksInner client = this.manager().inner().virtualNetworks(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public AddressSpace addressSpace() { + return this.inner().addressSpace(); + } + + @Override + public VirtualNetworkBgpCommunities bgpCommunities() { + return this.inner().bgpCommunities(); + } + + @Override + public SubResource ddosProtectionPlan() { + return this.inner().ddosProtectionPlan(); + } + + @Override + public DhcpOptions dhcpOptions() { + return this.inner().dhcpOptions(); + } + + @Override + public Boolean enableDdosProtection() { + return this.inner().enableDdosProtection(); + } + + @Override + public Boolean enableVmProtection() { + return this.inner().enableVmProtection(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public List subnets() { + List lst = new ArrayList(); + if (this.inner().subnets() != null) { + for (SubnetInner inner : this.inner().subnets()) { + lst.add( new SubnetImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List virtualNetworkPeerings() { + List lst = new ArrayList(); + if (this.inner().virtualNetworkPeerings() != null) { + for (VirtualNetworkPeeringInner inner : this.inner().virtualNetworkPeerings()) { + lst.add( new VirtualNetworkPeeringImpl(inner, manager())); + } + } + return lst; + } + + @Override + public VirtualNetworkImpl withAddressSpace(AddressSpace addressSpace) { + this.inner().withAddressSpace(addressSpace); + return this; + } + + @Override + public VirtualNetworkImpl withBgpCommunities(VirtualNetworkBgpCommunities bgpCommunities) { + this.inner().withBgpCommunities(bgpCommunities); + return this; + } + + @Override + public VirtualNetworkImpl withDdosProtectionPlan(SubResource ddosProtectionPlan) { + this.inner().withDdosProtectionPlan(ddosProtectionPlan); + return this; + } + + @Override + public VirtualNetworkImpl withDhcpOptions(DhcpOptions dhcpOptions) { + this.inner().withDhcpOptions(dhcpOptions); + return this; + } + + @Override + public VirtualNetworkImpl withEnableDdosProtection(Boolean enableDdosProtection) { + this.inner().withEnableDdosProtection(enableDdosProtection); + return this; + } + + @Override + public VirtualNetworkImpl withEnableVmProtection(Boolean enableVmProtection) { + this.inner().withEnableVmProtection(enableVmProtection); + return this; + } + + @Override + public VirtualNetworkImpl withSubnets(List subnets) { + this.inner().withSubnets(subnets); + return this; + } + + @Override + public VirtualNetworkImpl withVirtualNetworkPeerings(List virtualNetworkPeerings) { + this.inner().withVirtualNetworkPeerings(virtualNetworkPeerings); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkInner.java new file mode 100644 index 000000000000..beb710041b9b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkInner.java @@ -0,0 +1,314 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.AddressSpace; +import com.microsoft.azure.management.network.v2019_09_01.DhcpOptions; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkBgpCommunities; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Virtual Network resource. + */ +@JsonFlatten +@SkipParentValidation +public class VirtualNetworkInner extends Resource { + /** + * The AddressSpace that contains an array of IP address ranges that can be + * used by subnets. + */ + @JsonProperty(value = "properties.addressSpace") + private AddressSpace addressSpace; + + /** + * The dhcpOptions that contains an array of DNS servers available to VMs + * deployed in the virtual network. + */ + @JsonProperty(value = "properties.dhcpOptions") + private DhcpOptions dhcpOptions; + + /** + * A list of subnets in a Virtual Network. + */ + @JsonProperty(value = "properties.subnets") + private List subnets; + + /** + * A list of peerings in a Virtual Network. + */ + @JsonProperty(value = "properties.virtualNetworkPeerings") + private List virtualNetworkPeerings; + + /** + * The resourceGuid property of the Virtual Network resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the virtual network resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Indicates if DDoS protection is enabled for all the protected resources + * in the virtual network. It requires a DDoS protection plan associated + * with the resource. + */ + @JsonProperty(value = "properties.enableDdosProtection") + private Boolean enableDdosProtection; + + /** + * Indicates if VM protection is enabled for all the subnets in the virtual + * network. + */ + @JsonProperty(value = "properties.enableVmProtection") + private Boolean enableVmProtection; + + /** + * The DDoS protection plan associated with the virtual network. + */ + @JsonProperty(value = "properties.ddosProtectionPlan") + private SubResource ddosProtectionPlan; + + /** + * Bgp Communities sent over ExpressRoute with each route corresponding to + * a prefix in this VNET. + */ + @JsonProperty(value = "properties.bgpCommunities") + private VirtualNetworkBgpCommunities bgpCommunities; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the AddressSpace that contains an array of IP address ranges that can be used by subnets. + * + * @return the addressSpace value + */ + public AddressSpace addressSpace() { + return this.addressSpace; + } + + /** + * Set the AddressSpace that contains an array of IP address ranges that can be used by subnets. + * + * @param addressSpace the addressSpace value to set + * @return the VirtualNetworkInner object itself. + */ + public VirtualNetworkInner withAddressSpace(AddressSpace addressSpace) { + this.addressSpace = addressSpace; + return this; + } + + /** + * Get the dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. + * + * @return the dhcpOptions value + */ + public DhcpOptions dhcpOptions() { + return this.dhcpOptions; + } + + /** + * Set the dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. + * + * @param dhcpOptions the dhcpOptions value to set + * @return the VirtualNetworkInner object itself. + */ + public VirtualNetworkInner withDhcpOptions(DhcpOptions dhcpOptions) { + this.dhcpOptions = dhcpOptions; + return this; + } + + /** + * Get a list of subnets in a Virtual Network. + * + * @return the subnets value + */ + public List subnets() { + return this.subnets; + } + + /** + * Set a list of subnets in a Virtual Network. + * + * @param subnets the subnets value to set + * @return the VirtualNetworkInner object itself. + */ + public VirtualNetworkInner withSubnets(List subnets) { + this.subnets = subnets; + return this; + } + + /** + * Get a list of peerings in a Virtual Network. + * + * @return the virtualNetworkPeerings value + */ + public List virtualNetworkPeerings() { + return this.virtualNetworkPeerings; + } + + /** + * Set a list of peerings in a Virtual Network. + * + * @param virtualNetworkPeerings the virtualNetworkPeerings value to set + * @return the VirtualNetworkInner object itself. + */ + public VirtualNetworkInner withVirtualNetworkPeerings(List virtualNetworkPeerings) { + this.virtualNetworkPeerings = virtualNetworkPeerings; + return this; + } + + /** + * Get the resourceGuid property of the Virtual Network resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the virtual network resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource. + * + * @return the enableDdosProtection value + */ + public Boolean enableDdosProtection() { + return this.enableDdosProtection; + } + + /** + * Set indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource. + * + * @param enableDdosProtection the enableDdosProtection value to set + * @return the VirtualNetworkInner object itself. + */ + public VirtualNetworkInner withEnableDdosProtection(Boolean enableDdosProtection) { + this.enableDdosProtection = enableDdosProtection; + return this; + } + + /** + * Get indicates if VM protection is enabled for all the subnets in the virtual network. + * + * @return the enableVmProtection value + */ + public Boolean enableVmProtection() { + return this.enableVmProtection; + } + + /** + * Set indicates if VM protection is enabled for all the subnets in the virtual network. + * + * @param enableVmProtection the enableVmProtection value to set + * @return the VirtualNetworkInner object itself. + */ + public VirtualNetworkInner withEnableVmProtection(Boolean enableVmProtection) { + this.enableVmProtection = enableVmProtection; + return this; + } + + /** + * Get the DDoS protection plan associated with the virtual network. + * + * @return the ddosProtectionPlan value + */ + public SubResource ddosProtectionPlan() { + return this.ddosProtectionPlan; + } + + /** + * Set the DDoS protection plan associated with the virtual network. + * + * @param ddosProtectionPlan the ddosProtectionPlan value to set + * @return the VirtualNetworkInner object itself. + */ + public VirtualNetworkInner withDdosProtectionPlan(SubResource ddosProtectionPlan) { + this.ddosProtectionPlan = ddosProtectionPlan; + return this; + } + + /** + * Get bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. + * + * @return the bgpCommunities value + */ + public VirtualNetworkBgpCommunities bgpCommunities() { + return this.bgpCommunities; + } + + /** + * Set bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. + * + * @param bgpCommunities the bgpCommunities value to set + * @return the VirtualNetworkInner object itself. + */ + public VirtualNetworkInner withBgpCommunities(VirtualNetworkBgpCommunities bgpCommunities) { + this.bgpCommunities = bgpCommunities; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the VirtualNetworkInner object itself. + */ + public VirtualNetworkInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringImpl.java new file mode 100644 index 000000000000..9cdd6c3b9c5c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringImpl.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkPeering; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.AddressSpace; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkPeeringState; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class VirtualNetworkPeeringImpl extends CreatableUpdatableImpl implements VirtualNetworkPeering, VirtualNetworkPeering.Definition, VirtualNetworkPeering.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String virtualNetworkName; + private String virtualNetworkPeeringName; + + VirtualNetworkPeeringImpl(String name, NetworkManager manager) { + super(name, new VirtualNetworkPeeringInner()); + this.manager = manager; + // Set resource name + this.virtualNetworkPeeringName = name; + // + } + + VirtualNetworkPeeringImpl(VirtualNetworkPeeringInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.virtualNetworkPeeringName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.virtualNetworkName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualNetworks"); + this.virtualNetworkPeeringName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualNetworkPeerings"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + VirtualNetworkPeeringsInner client = this.manager().inner().virtualNetworkPeerings(); + return client.createOrUpdateAsync(this.resourceGroupName, this.virtualNetworkName, this.virtualNetworkPeeringName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VirtualNetworkPeeringsInner client = this.manager().inner().virtualNetworkPeerings(); + return client.createOrUpdateAsync(this.resourceGroupName, this.virtualNetworkName, this.virtualNetworkPeeringName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VirtualNetworkPeeringsInner client = this.manager().inner().virtualNetworkPeerings(); + return client.getAsync(this.resourceGroupName, this.virtualNetworkName, this.virtualNetworkPeeringName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Boolean allowForwardedTraffic() { + return this.inner().allowForwardedTraffic(); + } + + @Override + public Boolean allowGatewayTransit() { + return this.inner().allowGatewayTransit(); + } + + @Override + public Boolean allowVirtualNetworkAccess() { + return this.inner().allowVirtualNetworkAccess(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public VirtualNetworkPeeringState peeringState() { + return this.inner().peeringState(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public AddressSpace remoteAddressSpace() { + return this.inner().remoteAddressSpace(); + } + + @Override + public SubResource remoteVirtualNetwork() { + return this.inner().remoteVirtualNetwork(); + } + + @Override + public Boolean useRemoteGateways() { + return this.inner().useRemoteGateways(); + } + + @Override + public VirtualNetworkPeeringImpl withExistingVirtualNetwork(String resourceGroupName, String virtualNetworkName) { + this.resourceGroupName = resourceGroupName; + this.virtualNetworkName = virtualNetworkName; + return this; + } + + @Override + public VirtualNetworkPeeringImpl withAllowForwardedTraffic(Boolean allowForwardedTraffic) { + this.inner().withAllowForwardedTraffic(allowForwardedTraffic); + return this; + } + + @Override + public VirtualNetworkPeeringImpl withAllowGatewayTransit(Boolean allowGatewayTransit) { + this.inner().withAllowGatewayTransit(allowGatewayTransit); + return this; + } + + @Override + public VirtualNetworkPeeringImpl withAllowVirtualNetworkAccess(Boolean allowVirtualNetworkAccess) { + this.inner().withAllowVirtualNetworkAccess(allowVirtualNetworkAccess); + return this; + } + + @Override + public VirtualNetworkPeeringImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public VirtualNetworkPeeringImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public VirtualNetworkPeeringImpl withPeeringState(VirtualNetworkPeeringState peeringState) { + this.inner().withPeeringState(peeringState); + return this; + } + + @Override + public VirtualNetworkPeeringImpl withRemoteAddressSpace(AddressSpace remoteAddressSpace) { + this.inner().withRemoteAddressSpace(remoteAddressSpace); + return this; + } + + @Override + public VirtualNetworkPeeringImpl withRemoteVirtualNetwork(SubResource remoteVirtualNetwork) { + this.inner().withRemoteVirtualNetwork(remoteVirtualNetwork); + return this; + } + + @Override + public VirtualNetworkPeeringImpl withUseRemoteGateways(Boolean useRemoteGateways) { + this.inner().withUseRemoteGateways(useRemoteGateways); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringInner.java new file mode 100644 index 000000000000..6d3e84709ece --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringInner.java @@ -0,0 +1,274 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.AddressSpace; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkPeeringState; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Peerings in a virtual network resource. + */ +@JsonFlatten +public class VirtualNetworkPeeringInner extends SubResource { + /** + * Whether the VMs in the local virtual network space would be able to + * access the VMs in remote virtual network space. + */ + @JsonProperty(value = "properties.allowVirtualNetworkAccess") + private Boolean allowVirtualNetworkAccess; + + /** + * Whether the forwarded traffic from the VMs in the local virtual network + * will be allowed/disallowed in remote virtual network. + */ + @JsonProperty(value = "properties.allowForwardedTraffic") + private Boolean allowForwardedTraffic; + + /** + * If gateway links can be used in remote virtual networking to link to + * this virtual network. + */ + @JsonProperty(value = "properties.allowGatewayTransit") + private Boolean allowGatewayTransit; + + /** + * If remote gateways can be used on this virtual network. If the flag is + * set to true, and allowGatewayTransit on remote peering is also true, + * virtual network will use gateways of remote virtual network for transit. + * Only one peering can have this flag set to true. This flag cannot be set + * if virtual network already has a gateway. + */ + @JsonProperty(value = "properties.useRemoteGateways") + private Boolean useRemoteGateways; + + /** + * The reference of the remote virtual network. The remote virtual network + * can be in the same or different region (preview). See here to register + * for the preview and learn more + * (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). + */ + @JsonProperty(value = "properties.remoteVirtualNetwork") + private SubResource remoteVirtualNetwork; + + /** + * The reference of the remote virtual network address space. + */ + @JsonProperty(value = "properties.remoteAddressSpace") + private AddressSpace remoteAddressSpace; + + /** + * The status of the virtual network peering. Possible values include: + * 'Initiated', 'Connected', 'Disconnected'. + */ + @JsonProperty(value = "properties.peeringState") + private VirtualNetworkPeeringState peeringState; + + /** + * The provisioning state of the virtual network peering resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. + * + * @return the allowVirtualNetworkAccess value + */ + public Boolean allowVirtualNetworkAccess() { + return this.allowVirtualNetworkAccess; + } + + /** + * Set whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. + * + * @param allowVirtualNetworkAccess the allowVirtualNetworkAccess value to set + * @return the VirtualNetworkPeeringInner object itself. + */ + public VirtualNetworkPeeringInner withAllowVirtualNetworkAccess(Boolean allowVirtualNetworkAccess) { + this.allowVirtualNetworkAccess = allowVirtualNetworkAccess; + return this; + } + + /** + * Get whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. + * + * @return the allowForwardedTraffic value + */ + public Boolean allowForwardedTraffic() { + return this.allowForwardedTraffic; + } + + /** + * Set whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. + * + * @param allowForwardedTraffic the allowForwardedTraffic value to set + * @return the VirtualNetworkPeeringInner object itself. + */ + public VirtualNetworkPeeringInner withAllowForwardedTraffic(Boolean allowForwardedTraffic) { + this.allowForwardedTraffic = allowForwardedTraffic; + return this; + } + + /** + * Get if gateway links can be used in remote virtual networking to link to this virtual network. + * + * @return the allowGatewayTransit value + */ + public Boolean allowGatewayTransit() { + return this.allowGatewayTransit; + } + + /** + * Set if gateway links can be used in remote virtual networking to link to this virtual network. + * + * @param allowGatewayTransit the allowGatewayTransit value to set + * @return the VirtualNetworkPeeringInner object itself. + */ + public VirtualNetworkPeeringInner withAllowGatewayTransit(Boolean allowGatewayTransit) { + this.allowGatewayTransit = allowGatewayTransit; + return this; + } + + /** + * Get if remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. + * + * @return the useRemoteGateways value + */ + public Boolean useRemoteGateways() { + return this.useRemoteGateways; + } + + /** + * Set if remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. + * + * @param useRemoteGateways the useRemoteGateways value to set + * @return the VirtualNetworkPeeringInner object itself. + */ + public VirtualNetworkPeeringInner withUseRemoteGateways(Boolean useRemoteGateways) { + this.useRemoteGateways = useRemoteGateways; + return this; + } + + /** + * Get the reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). + * + * @return the remoteVirtualNetwork value + */ + public SubResource remoteVirtualNetwork() { + return this.remoteVirtualNetwork; + } + + /** + * Set the reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). + * + * @param remoteVirtualNetwork the remoteVirtualNetwork value to set + * @return the VirtualNetworkPeeringInner object itself. + */ + public VirtualNetworkPeeringInner withRemoteVirtualNetwork(SubResource remoteVirtualNetwork) { + this.remoteVirtualNetwork = remoteVirtualNetwork; + return this; + } + + /** + * Get the reference of the remote virtual network address space. + * + * @return the remoteAddressSpace value + */ + public AddressSpace remoteAddressSpace() { + return this.remoteAddressSpace; + } + + /** + * Set the reference of the remote virtual network address space. + * + * @param remoteAddressSpace the remoteAddressSpace value to set + * @return the VirtualNetworkPeeringInner object itself. + */ + public VirtualNetworkPeeringInner withRemoteAddressSpace(AddressSpace remoteAddressSpace) { + this.remoteAddressSpace = remoteAddressSpace; + return this; + } + + /** + * Get the status of the virtual network peering. Possible values include: 'Initiated', 'Connected', 'Disconnected'. + * + * @return the peeringState value + */ + public VirtualNetworkPeeringState peeringState() { + return this.peeringState; + } + + /** + * Set the status of the virtual network peering. Possible values include: 'Initiated', 'Connected', 'Disconnected'. + * + * @param peeringState the peeringState value to set + * @return the VirtualNetworkPeeringInner object itself. + */ + public VirtualNetworkPeeringInner withPeeringState(VirtualNetworkPeeringState peeringState) { + this.peeringState = peeringState; + return this; + } + + /** + * Get the provisioning state of the virtual network peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the VirtualNetworkPeeringInner object itself. + */ + public VirtualNetworkPeeringInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringsImpl.java new file mode 100644 index 000000000000..305177147758 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkPeerings; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkPeering; + +class VirtualNetworkPeeringsImpl extends WrapperImpl implements VirtualNetworkPeerings { + private final NetworkManager manager; + + VirtualNetworkPeeringsImpl(NetworkManager manager) { + super(manager.inner().virtualNetworkPeerings()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public VirtualNetworkPeeringImpl define(String name) { + return wrapModel(name); + } + + private VirtualNetworkPeeringImpl wrapModel(VirtualNetworkPeeringInner inner) { + return new VirtualNetworkPeeringImpl(inner, manager()); + } + + private VirtualNetworkPeeringImpl wrapModel(String name) { + return new VirtualNetworkPeeringImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String virtualNetworkName) { + VirtualNetworkPeeringsInner client = this.inner(); + return client.listAsync(resourceGroupName, virtualNetworkName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VirtualNetworkPeering call(VirtualNetworkPeeringInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) { + VirtualNetworkPeeringsInner client = this.inner(); + return client.getAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName) + .flatMap(new Func1>() { + @Override + public Observable call(VirtualNetworkPeeringInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((VirtualNetworkPeering)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) { + VirtualNetworkPeeringsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringsInner.java new file mode 100644 index 000000000000..38b3393f517d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkPeeringsInner.java @@ -0,0 +1,764 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 VirtualNetworkPeerings. + */ +public class VirtualNetworkPeeringsInner { + /** The Retrofit service to perform REST calls. */ + private VirtualNetworkPeeringsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VirtualNetworkPeeringsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VirtualNetworkPeeringsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VirtualNetworkPeeringsService.class); + this.client = client; + } + + /** + * The interface defining all the services for VirtualNetworkPeerings to be + * used by Retrofit to perform actually REST calls. + */ + interface VirtualNetworkPeeringsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkPeerings delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("virtualNetworkPeeringName") String virtualNetworkPeeringName, @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.network.v2019_09_01.VirtualNetworkPeerings beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("virtualNetworkPeeringName") String virtualNetworkPeeringName, @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.network.v2019_09_01.VirtualNetworkPeerings get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("virtualNetworkPeeringName") String virtualNetworkPeeringName, @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.network.v2019_09_01.VirtualNetworkPeerings createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("virtualNetworkPeeringName") String virtualNetworkPeeringName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkPeeringInner virtualNetworkPeeringParameters, @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.network.v2019_09_01.VirtualNetworkPeerings beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("virtualNetworkPeeringName") String virtualNetworkPeeringName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkPeeringInner virtualNetworkPeeringParameters, @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.network.v2019_09_01.VirtualNetworkPeerings list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @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.network.v2019_09_01.VirtualNetworkPeerings listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualNetworkName, String virtualNetworkPeeringName) { + deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName).toBlocking().last().body(); + } + + /** + * Deletes the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @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 virtualNetworkName, String virtualNetworkPeeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName), serviceCallback); + } + + /** + * Deletes the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) { + return deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (virtualNetworkPeeringName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkPeeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualNetworkName, String virtualNetworkPeeringName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName).toBlocking().single().body(); + } + + /** + * Deletes the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @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 virtualNetworkName, String virtualNetworkPeeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName), serviceCallback); + } + + /** + * Deletes the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (virtualNetworkPeeringName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkPeeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkPeeringInner object if successful. + */ + public VirtualNetworkPeeringInner get(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) { + return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName).toBlocking().single().body(); + } + + /** + * Gets the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @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 virtualNetworkName, String virtualNetworkPeeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName), serviceCallback); + } + + /** + * Gets the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkPeeringInner object + */ + public Observable getAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) { + return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName).map(new Func1, VirtualNetworkPeeringInner>() { + @Override + public VirtualNetworkPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified virtual network peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the virtual network peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkPeeringInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (virtualNetworkPeeringName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkPeeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates a peering in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create or update virtual network peering 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 VirtualNetworkPeeringInner object if successful. + */ + public VirtualNetworkPeeringInner createOrUpdate(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a peering in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create or update virtual network peering 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 createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters), serviceCallback); + } + + /** + * Creates or updates a peering in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create or update virtual network peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters).map(new Func1, VirtualNetworkPeeringInner>() { + @Override + public VirtualNetworkPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a peering in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create or update virtual network peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (virtualNetworkPeeringName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkPeeringName 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 (virtualNetworkPeeringParameters == null) { + throw new IllegalArgumentException("Parameter virtualNetworkPeeringParameters is required and cannot be null."); + } + Validator.validate(virtualNetworkPeeringParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), virtualNetworkPeeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a peering in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create or update virtual network peering 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 VirtualNetworkPeeringInner object if successful. + */ + public VirtualNetworkPeeringInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a peering in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create or update virtual network peering 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 beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters), serviceCallback); + } + + /** + * Creates or updates a peering in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create or update virtual network peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkPeeringInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters).map(new Func1, VirtualNetworkPeeringInner>() { + @Override + public VirtualNetworkPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a peering in the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param virtualNetworkPeeringName The name of the peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create or update virtual network peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkPeeringInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (virtualNetworkPeeringName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkPeeringName 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 (virtualNetworkPeeringParameters == null) { + throw new IllegalArgumentException("Parameter virtualNetworkPeeringParameters is required and cannot be null."); + } + Validator.validate(virtualNetworkPeeringParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), virtualNetworkPeeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 all virtual network peerings in a virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VirtualNetworkPeeringInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String virtualNetworkName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, virtualNetworkName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all virtual network peerings in a virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @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 resourceGroupName, final String virtualNetworkName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, virtualNetworkName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all virtual network peerings in a virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkPeeringInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String virtualNetworkName) { + return listWithServiceResponseAsync(resourceGroupName, virtualNetworkName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all virtual network peerings in a virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkPeeringInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String virtualNetworkName) { + return listSinglePageAsync(resourceGroupName, virtualNetworkName) + .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 all virtual network peerings in a virtual network. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkPeeringInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String virtualNetworkName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), 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 all virtual network peerings in a virtual network. + * + * @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<VirtualNetworkPeeringInner> 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 all virtual network peerings in a virtual network. + * + * @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 all virtual network peerings in a virtual network. + * + * @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<VirtualNetworkPeeringInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all virtual network peerings in a virtual network. + * + * @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<VirtualNetworkPeeringInner> 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 all virtual network peerings in a virtual network. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkPeeringInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapImpl.java new file mode 100644 index 000000000000..a2519b952391 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkTap; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.FrontendIPConfiguration; +import com.microsoft.azure.management.network.v2019_09_01.VirtualMachineScaleSetNetworkInterfaceIPConfiguration; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.NetworkInterfaceTapConfiguration; + +class VirtualNetworkTapImpl extends GroupableResourceCoreImpl implements VirtualNetworkTap, VirtualNetworkTap.Definition, VirtualNetworkTap.Update { + VirtualNetworkTapImpl(String name, VirtualNetworkTapInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + VirtualNetworkTapsInner client = this.manager().inner().virtualNetworkTaps(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VirtualNetworkTapsInner client = this.manager().inner().virtualNetworkTaps(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VirtualNetworkTapsInner client = this.manager().inner().virtualNetworkTaps(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public FrontendIPConfiguration destinationLoadBalancerFrontEndIPConfiguration() { + FrontendIPConfigurationInner inner = this.inner().destinationLoadBalancerFrontEndIPConfiguration(); + if (inner != null) { + return new FrontendIPConfigurationImpl(inner, manager()); + } else { + return null; + } + } + + @Override + public VirtualMachineScaleSetNetworkInterfaceIPConfiguration destinationNetworkInterfaceIPConfiguration() { + NetworkInterfaceIPConfigurationInner inner = this.inner().destinationNetworkInterfaceIPConfiguration(); + if (inner != null) { + return new VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl(inner, manager()); + } else { + return null; + } + } + + @Override + public Integer destinationPort() { + return this.inner().destinationPort(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List networkInterfaceTapConfigurations() { + List lst = new ArrayList(); + if (this.inner().networkInterfaceTapConfigurations() != null) { + for (NetworkInterfaceTapConfigurationInner inner : this.inner().networkInterfaceTapConfigurations()) { + lst.add( new NetworkInterfaceTapConfigurationImpl(inner, manager())); + } + } + return lst; + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGuid() { + return this.inner().resourceGuid(); + } + + @Override + public VirtualNetworkTapImpl withDestinationLoadBalancerFrontEndIPConfiguration(FrontendIPConfigurationInner destinationLoadBalancerFrontEndIPConfiguration) { + this.inner().withDestinationLoadBalancerFrontEndIPConfiguration(destinationLoadBalancerFrontEndIPConfiguration); + return this; + } + + @Override + public VirtualNetworkTapImpl withDestinationNetworkInterfaceIPConfiguration(NetworkInterfaceIPConfigurationInner destinationNetworkInterfaceIPConfiguration) { + this.inner().withDestinationNetworkInterfaceIPConfiguration(destinationNetworkInterfaceIPConfiguration); + return this; + } + + @Override + public VirtualNetworkTapImpl withDestinationPort(Integer destinationPort) { + this.inner().withDestinationPort(destinationPort); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapInner.java new file mode 100644 index 000000000000..5e1948cfe814 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapInner.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Virtual Network Tap resource. + */ +@JsonFlatten +@SkipParentValidation +public class VirtualNetworkTapInner extends Resource { + /** + * Specifies the list of resource IDs for the network interface IP + * configuration that needs to be tapped. + */ + @JsonProperty(value = "properties.networkInterfaceTapConfigurations", access = JsonProperty.Access.WRITE_ONLY) + private List networkInterfaceTapConfigurations; + + /** + * The resource GUID property of the virtual network tap resource. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the virtual network tap resource. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The reference to the private IP Address of the collector nic that will + * receive the tap. + */ + @JsonProperty(value = "properties.destinationNetworkInterfaceIPConfiguration") + private NetworkInterfaceIPConfigurationInner destinationNetworkInterfaceIPConfiguration; + + /** + * The reference to the private IP address on the internal Load Balancer + * that will receive the tap. + */ + @JsonProperty(value = "properties.destinationLoadBalancerFrontEndIPConfiguration") + private FrontendIPConfigurationInner destinationLoadBalancerFrontEndIPConfiguration; + + /** + * The VXLAN destination port that will receive the tapped traffic. + */ + @JsonProperty(value = "properties.destinationPort") + private Integer destinationPort; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get specifies the list of resource IDs for the network interface IP configuration that needs to be tapped. + * + * @return the networkInterfaceTapConfigurations value + */ + public List networkInterfaceTapConfigurations() { + return this.networkInterfaceTapConfigurations; + } + + /** + * Get the resource GUID property of the virtual network tap resource. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the virtual network tap resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the reference to the private IP Address of the collector nic that will receive the tap. + * + * @return the destinationNetworkInterfaceIPConfiguration value + */ + public NetworkInterfaceIPConfigurationInner destinationNetworkInterfaceIPConfiguration() { + return this.destinationNetworkInterfaceIPConfiguration; + } + + /** + * Set the reference to the private IP Address of the collector nic that will receive the tap. + * + * @param destinationNetworkInterfaceIPConfiguration the destinationNetworkInterfaceIPConfiguration value to set + * @return the VirtualNetworkTapInner object itself. + */ + public VirtualNetworkTapInner withDestinationNetworkInterfaceIPConfiguration(NetworkInterfaceIPConfigurationInner destinationNetworkInterfaceIPConfiguration) { + this.destinationNetworkInterfaceIPConfiguration = destinationNetworkInterfaceIPConfiguration; + return this; + } + + /** + * Get the reference to the private IP address on the internal Load Balancer that will receive the tap. + * + * @return the destinationLoadBalancerFrontEndIPConfiguration value + */ + public FrontendIPConfigurationInner destinationLoadBalancerFrontEndIPConfiguration() { + return this.destinationLoadBalancerFrontEndIPConfiguration; + } + + /** + * Set the reference to the private IP address on the internal Load Balancer that will receive the tap. + * + * @param destinationLoadBalancerFrontEndIPConfiguration the destinationLoadBalancerFrontEndIPConfiguration value to set + * @return the VirtualNetworkTapInner object itself. + */ + public VirtualNetworkTapInner withDestinationLoadBalancerFrontEndIPConfiguration(FrontendIPConfigurationInner destinationLoadBalancerFrontEndIPConfiguration) { + this.destinationLoadBalancerFrontEndIPConfiguration = destinationLoadBalancerFrontEndIPConfiguration; + return this; + } + + /** + * Get the VXLAN destination port that will receive the tapped traffic. + * + * @return the destinationPort value + */ + public Integer destinationPort() { + return this.destinationPort; + } + + /** + * Set the VXLAN destination port that will receive the tapped traffic. + * + * @param destinationPort the destinationPort value to set + * @return the VirtualNetworkTapInner object itself. + */ + public VirtualNetworkTapInner withDestinationPort(Integer destinationPort) { + this.destinationPort = destinationPort; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the VirtualNetworkTapInner object itself. + */ + public VirtualNetworkTapInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapsImpl.java new file mode 100644 index 000000000000..78b57ea7b3cc --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapsImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkTaps; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkTap; +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; + +class VirtualNetworkTapsImpl extends GroupableResourcesCoreImpl implements VirtualNetworkTaps { + protected VirtualNetworkTapsImpl(NetworkManager manager) { + super(manager.inner().virtualNetworkTaps(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + VirtualNetworkTapsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + VirtualNetworkTapsInner 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) { + VirtualNetworkTapsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + VirtualNetworkTapsInner 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 VirtualNetworkTap call(VirtualNetworkTapInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + VirtualNetworkTapsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + VirtualNetworkTapsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VirtualNetworkTap call(VirtualNetworkTapInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public VirtualNetworkTapImpl define(String name) { + return wrapModel(name); + } + + @Override + protected VirtualNetworkTapImpl wrapModel(VirtualNetworkTapInner inner) { + return new VirtualNetworkTapImpl(inner.name(), inner, manager()); + } + + @Override + protected VirtualNetworkTapImpl wrapModel(String name) { + return new VirtualNetworkTapImpl(name, new VirtualNetworkTapInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapsInner.java new file mode 100644 index 000000000000..d593532fa6cc --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkTapsInner.java @@ -0,0 +1,1126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 VirtualNetworkTaps. + */ +public class VirtualNetworkTapsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private VirtualNetworkTapsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VirtualNetworkTapsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VirtualNetworkTapsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VirtualNetworkTapsService.class); + this.client = client; + } + + /** + * The interface defining all the services for VirtualNetworkTaps to be + * used by Retrofit to perform actually REST calls. + */ + interface VirtualNetworkTapsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkTaps delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("tapName") String tapName, @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.network.v2019_09_01.VirtualNetworkTaps beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("tapName") String tapName, @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.network.v2019_09_01.VirtualNetworkTaps getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("tapName") String tapName, @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.network.v2019_09_01.VirtualNetworkTaps createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("tapName") String tapName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkTapInner 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.network.v2019_09_01.VirtualNetworkTaps beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("tapName") String tapName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkTapInner 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.network.v2019_09_01.VirtualNetworkTaps updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("tapName") String tapName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject tapParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkTaps list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps") + Observable> list(@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.network.v2019_09_01.VirtualNetworkTaps listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.VirtualNetworkTaps 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.network.v2019_09_01.VirtualNetworkTaps listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified virtual network tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 tapName) { + deleteWithServiceResponseAsync(resourceGroupName, tapName).toBlocking().last().body(); + } + + /** + * Deletes the specified virtual network tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @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 tapName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, tapName), serviceCallback); + } + + /** + * Deletes the specified virtual network tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String tapName) { + return deleteWithServiceResponseAsync(resourceGroupName, tapName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified virtual network tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String tapName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (tapName == null) { + throw new IllegalArgumentException("Parameter tapName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, tapName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified virtual network tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 tapName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, tapName).toBlocking().single().body(); + } + + /** + * Deletes the specified virtual network tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @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 tapName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, tapName), serviceCallback); + } + + /** + * Deletes the specified virtual network tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String tapName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, tapName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified virtual network tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String tapName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (tapName == null) { + throw new IllegalArgumentException("Parameter tapName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, tapName, this.client.subscriptionId(), 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); + } + + /** + * Gets information about the specified virtual network tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of virtual network tap. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkTapInner object if successful. + */ + public VirtualNetworkTapInner getByResourceGroup(String resourceGroupName, String tapName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, tapName).toBlocking().single().body(); + } + + /** + * Gets information about the specified virtual network tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of virtual network tap. + * @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 tapName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, tapName), serviceCallback); + } + + /** + * Gets information about the specified virtual network tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of virtual network tap. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkTapInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String tapName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, tapName).map(new Func1, VirtualNetworkTapInner>() { + @Override + public VirtualNetworkTapInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified virtual network tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of virtual network tap. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkTapInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String tapName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (tapName == null) { + throw new IllegalArgumentException("Parameter tapName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, tapName, this.client.subscriptionId(), 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); + } + + /** + * Creates or updates a Virtual Network Tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @param parameters Parameters supplied to the create or update virtual network tap 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 VirtualNetworkTapInner object if successful. + */ + public VirtualNetworkTapInner createOrUpdate(String resourceGroupName, String tapName, VirtualNetworkTapInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, tapName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a Virtual Network Tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @param parameters Parameters supplied to the create or update virtual network tap 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 createOrUpdateAsync(String resourceGroupName, String tapName, VirtualNetworkTapInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, tapName, parameters), serviceCallback); + } + + /** + * Creates or updates a Virtual Network Tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @param parameters Parameters supplied to the create or update virtual network tap operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String tapName, VirtualNetworkTapInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, tapName, parameters).map(new Func1, VirtualNetworkTapInner>() { + @Override + public VirtualNetworkTapInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Virtual Network Tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @param parameters Parameters supplied to the create or update virtual network tap operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String tapName, VirtualNetworkTapInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (tapName == null) { + throw new IllegalArgumentException("Parameter tapName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, tapName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a Virtual Network Tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @param parameters Parameters supplied to the create or update virtual network tap 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 VirtualNetworkTapInner object if successful. + */ + public VirtualNetworkTapInner beginCreateOrUpdate(String resourceGroupName, String tapName, VirtualNetworkTapInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, tapName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a Virtual Network Tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @param parameters Parameters supplied to the create or update virtual network tap 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 beginCreateOrUpdateAsync(String resourceGroupName, String tapName, VirtualNetworkTapInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, tapName, parameters), serviceCallback); + } + + /** + * Creates or updates a Virtual Network Tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @param parameters Parameters supplied to the create or update virtual network tap operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkTapInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String tapName, VirtualNetworkTapInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, tapName, parameters).map(new Func1, VirtualNetworkTapInner>() { + @Override + public VirtualNetworkTapInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Virtual Network Tap. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the virtual network tap. + * @param parameters Parameters supplied to the create or update virtual network tap operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkTapInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String tapName, VirtualNetworkTapInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (tapName == null) { + throw new IllegalArgumentException("Parameter tapName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, tapName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 an VirtualNetworkTap tags. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the tap. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkTapInner object if successful. + */ + public VirtualNetworkTapInner updateTags(String resourceGroupName, String tapName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, tapName).toBlocking().single().body(); + } + + /** + * Updates an VirtualNetworkTap tags. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the tap. + * @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 updateTagsAsync(String resourceGroupName, String tapName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, tapName), serviceCallback); + } + + /** + * Updates an VirtualNetworkTap tags. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the tap. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkTapInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String tapName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, tapName).map(new Func1, VirtualNetworkTapInner>() { + @Override + public VirtualNetworkTapInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an VirtualNetworkTap tags. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the tap. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkTapInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String tapName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (tapName == null) { + throw new IllegalArgumentException("Parameter tapName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject tapParameters = new TagsObject(); + tapParameters.withTags(null); + return service.updateTags(resourceGroupName, tapName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), tapParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates an VirtualNetworkTap tags. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the tap. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkTapInner object if successful. + */ + public VirtualNetworkTapInner updateTags(String resourceGroupName, String tapName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, tapName, tags).toBlocking().single().body(); + } + + /** + * Updates an VirtualNetworkTap tags. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the tap. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String tapName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, tapName, tags), serviceCallback); + } + + /** + * Updates an VirtualNetworkTap tags. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the tap. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkTapInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String tapName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, tapName, tags).map(new Func1, VirtualNetworkTapInner>() { + @Override + public VirtualNetworkTapInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an VirtualNetworkTap tags. + * + * @param resourceGroupName The name of the resource group. + * @param tapName The name of the tap. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkTapInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String tapName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (tapName == null) { + throw new IllegalArgumentException("Parameter tapName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject tapParameters = new TagsObject(); + tapParameters.withTags(tags); + return service.updateTags(resourceGroupName, tapName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), tapParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all the VirtualNetworkTaps in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VirtualNetworkTapInner> 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 all the VirtualNetworkTaps in a subscription. + * + * @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 all the VirtualNetworkTaps in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkTapInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the VirtualNetworkTaps in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkTapInner> 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 all the VirtualNetworkTaps in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkTapInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all the VirtualNetworkTaps in a subscription. + * + * @param resourceGroupName The name of the 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<VirtualNetworkTapInner> 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 all the VirtualNetworkTaps in a subscription. + * + * @param resourceGroupName The name of the 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 all the VirtualNetworkTaps in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkTapInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the VirtualNetworkTaps in a subscription. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkTapInner> 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 all the VirtualNetworkTaps in a subscription. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkTapInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all the VirtualNetworkTaps in a subscription. + * + * @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<VirtualNetworkTapInner> 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 all the VirtualNetworkTaps in a subscription. + * + * @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 all the VirtualNetworkTaps in a subscription. + * + * @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<VirtualNetworkTapInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the VirtualNetworkTaps in a subscription. + * + * @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<VirtualNetworkTapInner> 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 all the VirtualNetworkTaps in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkTapInner> 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 all the VirtualNetworkTaps in a subscription. + * + * @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<VirtualNetworkTapInner> 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 all the VirtualNetworkTaps in a subscription. + * + * @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 all the VirtualNetworkTaps in a subscription. + * + * @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<VirtualNetworkTapInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the VirtualNetworkTaps in a subscription. + * + * @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<VirtualNetworkTapInner> 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 all the VirtualNetworkTaps in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkTapInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkUsageImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkUsageImpl.java new file mode 100644 index 000000000000..5d5b2eabe6ae --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkUsageImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkUsage; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkUsageName; + +class VirtualNetworkUsageImpl extends WrapperImpl implements VirtualNetworkUsage { + private final NetworkManager manager; + + VirtualNetworkUsageImpl(VirtualNetworkUsageInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public Double currentValue() { + return this.inner().currentValue(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Double limit() { + return this.inner().limit(); + } + + @Override + public VirtualNetworkUsageName name() { + return this.inner().name(); + } + + @Override + public String unit() { + return this.inner().unit(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkUsageInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkUsageInner.java new file mode 100644 index 000000000000..001eecf7ad24 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworkUsageInner.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkUsageName; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Usage details for subnet. + */ +public class VirtualNetworkUsageInner { + /** + * Indicates number of IPs used from the Subnet. + */ + @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY) + private Double currentValue; + + /** + * Subnet identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Indicates the size of the subnet. + */ + @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) + private Double limit; + + /** + * The name containing common and localized value for usage. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private VirtualNetworkUsageName name; + + /** + * Usage units. Returns 'Count'. + */ + @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) + private String unit; + + /** + * Get indicates number of IPs used from the Subnet. + * + * @return the currentValue value + */ + public Double currentValue() { + return this.currentValue; + } + + /** + * Get subnet identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get indicates the size of the subnet. + * + * @return the limit value + */ + public Double limit() { + return this.limit; + } + + /** + * Get the name containing common and localized value for usage. + * + * @return the name value + */ + public VirtualNetworkUsageName name() { + return this.name; + } + + /** + * Get usage units. Returns 'Count'. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworksImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworksImpl.java new file mode 100644 index 000000000000..fb913ca75f42 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworksImpl.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworks; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetwork; +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.network.v2019_09_01.IPAddressAvailabilityResult; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkUsage; + +class VirtualNetworksImpl extends GroupableResourcesCoreImpl implements VirtualNetworks { + protected VirtualNetworksImpl(NetworkManager manager) { + super(manager.inner().virtualNetworks(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + VirtualNetworksInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + VirtualNetworksInner 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) { + VirtualNetworksInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + VirtualNetworksInner 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 VirtualNetwork call(VirtualNetworkInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + VirtualNetworksInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + VirtualNetworksInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VirtualNetwork call(VirtualNetworkInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public VirtualNetworkImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable checkIPAddressAvailabilityAsync(String resourceGroupName, String virtualNetworkName, String ipAddress) { + VirtualNetworksInner client = this.inner(); + return client.checkIPAddressAvailabilityAsync(resourceGroupName, virtualNetworkName, ipAddress) + .map(new Func1() { + @Override + public IPAddressAvailabilityResult call(IPAddressAvailabilityResultInner inner) { + return new IPAddressAvailabilityResultImpl(inner, manager()); + } + }); + } + + @Override + protected VirtualNetworkImpl wrapModel(VirtualNetworkInner inner) { + return new VirtualNetworkImpl(inner.name(), inner, manager()); + } + + @Override + protected VirtualNetworkImpl wrapModel(String name) { + return new VirtualNetworkImpl(name, new VirtualNetworkInner(), this.manager()); + } + + private VirtualNetworkUsageImpl wrapVirtualNetworkUsageModel(VirtualNetworkUsageInner inner) { + return new VirtualNetworkUsageImpl(inner, manager()); + } + + @Override + public Observable listUsageAsync(final String resourceGroupName, final String virtualNetworkName) { + VirtualNetworksInner client = this.inner(); + return client.listUsageAsync(resourceGroupName, virtualNetworkName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VirtualNetworkUsage call(VirtualNetworkUsageInner inner) { + return wrapVirtualNetworkUsageModel(inner); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworksInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworksInner.java new file mode 100644 index 000000000000..973a12f96755 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualNetworksInner.java @@ -0,0 +1,1543 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 VirtualNetworks. + */ +public class VirtualNetworksInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private VirtualNetworksService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VirtualNetworksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VirtualNetworksInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VirtualNetworksService.class); + this.client = client; + } + + /** + * The interface defining all the services for VirtualNetworks to be + * used by Retrofit to perform actually REST calls. + */ + interface VirtualNetworksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworks delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @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.network.v2019_09_01.VirtualNetworks beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @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.network.v2019_09_01.VirtualNetworks getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.VirtualNetworks createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkInner 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.network.v2019_09_01.VirtualNetworks beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkInner 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.network.v2019_09_01.VirtualNetworks updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualNetworks list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks") + Observable> list(@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.network.v2019_09_01.VirtualNetworks listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.VirtualNetworks checkIPAddressAvailability" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability") + Observable> checkIPAddressAvailability(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subscriptionId") String subscriptionId, @Query("ipAddress") String ipAddress, @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.network.v2019_09_01.VirtualNetworks listUsage" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages") + Observable> listUsage(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @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.network.v2019_09_01.VirtualNetworks 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.network.v2019_09_01.VirtualNetworks 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.network.v2019_09_01.VirtualNetworks listUsageNext" }) + @GET + Observable> listUsageNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualNetworkName) { + deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName).toBlocking().last().body(); + } + + /** + * Deletes the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @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 virtualNetworkName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName), serviceCallback); + } + + /** + * Deletes the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String virtualNetworkName) { + return deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualNetworkName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName).toBlocking().single().body(); + } + + /** + * Deletes the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @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 virtualNetworkName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName), serviceCallback); + } + + /** + * Deletes the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String virtualNetworkName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified virtual network. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), 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); + } + + /** + * Gets the specified virtual network by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkInner object if successful. + */ + public VirtualNetworkInner getByResourceGroup(String resourceGroupName, String virtualNetworkName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkName).toBlocking().single().body(); + } + + /** + * Gets the specified virtual network by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @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 virtualNetworkName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkName), serviceCallback); + } + + /** + * Gets the specified virtual network by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String virtualNetworkName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkName).map(new Func1, VirtualNetworkInner>() { + @Override + public VirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified virtual network by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified virtual network by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkInner object if successful. + */ + public VirtualNetworkInner getByResourceGroup(String resourceGroupName, String virtualNetworkName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified virtual network by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param expand Expands referenced resources. + * @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 virtualNetworkName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkName, expand), serviceCallback); + } + + /** + * Gets the specified virtual network by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String virtualNetworkName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkName, expand).map(new Func1, VirtualNetworkInner>() { + @Override + public VirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified virtual network by resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, expand, 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); + } + + /** + * Creates or updates a virtual network in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param parameters Parameters supplied to the create or update virtual network 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 VirtualNetworkInner object if successful. + */ + public VirtualNetworkInner createOrUpdate(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a virtual network in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param parameters Parameters supplied to the create or update virtual network 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 createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters), serviceCallback); + } + + /** + * Creates or updates a virtual network in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param parameters Parameters supplied to the create or update virtual network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters).map(new Func1, VirtualNetworkInner>() { + @Override + public VirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a virtual network in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param parameters Parameters supplied to the create or update virtual network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a virtual network in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param parameters Parameters supplied to the create or update virtual network 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 VirtualNetworkInner object if successful. + */ + public VirtualNetworkInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a virtual network in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param parameters Parameters supplied to the create or update virtual network 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 beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters), serviceCallback); + } + + /** + * Creates or updates a virtual network in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param parameters Parameters supplied to the create or update virtual network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters).map(new Func1, VirtualNetworkInner>() { + @Override + public VirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a virtual network in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param parameters Parameters supplied to the create or update virtual network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkInner object if successful. + */ + public VirtualNetworkInner updateTags(String resourceGroupName, String virtualNetworkName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName).toBlocking().single().body(); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @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 updateTagsAsync(String resourceGroupName, String virtualNetworkName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName), serviceCallback); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName).map(new Func1, VirtualNetworkInner>() { + @Override + public VirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualNetworkInner object if successful. + */ + public VirtualNetworkInner updateTags(String resourceGroupName, String virtualNetworkName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).toBlocking().single().body(); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String virtualNetworkName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags), serviceCallback); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).map(new Func1, VirtualNetworkInner>() { + @Override + public VirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 all virtual networks in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VirtualNetworkInner> 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 all virtual networks in a subscription. + * + * @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 all virtual networks in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all virtual networks in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkInner> 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 all virtual networks in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all virtual networks in a resource group. + * + * @param resourceGroupName The name of the 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<VirtualNetworkInner> 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 all virtual networks in a resource group. + * + * @param resourceGroupName The name of the 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 all virtual networks in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all virtual networks in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkInner> 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 all virtual networks in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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); + } + + /** + * Checks whether a private IP address is available for use. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param ipAddress The private IP address to be verified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 IPAddressAvailabilityResultInner object if successful. + */ + public IPAddressAvailabilityResultInner checkIPAddressAvailability(String resourceGroupName, String virtualNetworkName, String ipAddress) { + return checkIPAddressAvailabilityWithServiceResponseAsync(resourceGroupName, virtualNetworkName, ipAddress).toBlocking().single().body(); + } + + /** + * Checks whether a private IP address is available for use. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param ipAddress The private IP address to be verified. + * @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 checkIPAddressAvailabilityAsync(String resourceGroupName, String virtualNetworkName, String ipAddress, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkIPAddressAvailabilityWithServiceResponseAsync(resourceGroupName, virtualNetworkName, ipAddress), serviceCallback); + } + + /** + * Checks whether a private IP address is available for use. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param ipAddress The private IP address to be verified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IPAddressAvailabilityResultInner object + */ + public Observable checkIPAddressAvailabilityAsync(String resourceGroupName, String virtualNetworkName, String ipAddress) { + return checkIPAddressAvailabilityWithServiceResponseAsync(resourceGroupName, virtualNetworkName, ipAddress).map(new Func1, IPAddressAvailabilityResultInner>() { + @Override + public IPAddressAvailabilityResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether a private IP address is available for use. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param ipAddress The private IP address to be verified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IPAddressAvailabilityResultInner object + */ + public Observable> checkIPAddressAvailabilityWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String ipAddress) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName 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 (ipAddress == null) { + throw new IllegalArgumentException("Parameter ipAddress is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.checkIPAddressAvailability(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), ipAddress, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkIPAddressAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkIPAddressAvailabilityDelegate(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 usage stats. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VirtualNetworkUsageInner> object if successful. + */ + public PagedList listUsage(final String resourceGroupName, final String virtualNetworkName) { + ServiceResponse> response = listUsageSinglePageAsync(resourceGroupName, virtualNetworkName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsageNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists usage stats. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @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> listUsageAsync(final String resourceGroupName, final String virtualNetworkName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsageSinglePageAsync(resourceGroupName, virtualNetworkName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsageNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists usage stats. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkUsageInner> object + */ + public Observable> listUsageAsync(final String resourceGroupName, final String virtualNetworkName) { + return listUsageWithServiceResponseAsync(resourceGroupName, virtualNetworkName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists usage stats. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkUsageInner> object + */ + public Observable>> listUsageWithServiceResponseAsync(final String resourceGroupName, final String virtualNetworkName) { + return listUsageSinglePageAsync(resourceGroupName, virtualNetworkName) + .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(listUsageNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists usage stats. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkUsageInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listUsageSinglePageAsync(final String resourceGroupName, final String virtualNetworkName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listUsage(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsageDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsageDelegate(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 all virtual networks in a subscription. + * + * @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<VirtualNetworkInner> 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 all virtual networks in a subscription. + * + * @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 all virtual networks in a subscription. + * + * @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<VirtualNetworkInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all virtual networks in a subscription. + * + * @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<VirtualNetworkInner> 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 all virtual networks in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkInner> 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 all virtual networks in a resource group. + * + * @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<VirtualNetworkInner> 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 all virtual networks in a resource group. + * + * @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 all virtual networks in a resource group. + * + * @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<VirtualNetworkInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all virtual networks in a resource group. + * + * @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<VirtualNetworkInner> 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 all virtual networks in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkInner> 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 usage stats. + * + * @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<VirtualNetworkUsageInner> object if successful. + */ + public PagedList listUsageNext(final String nextPageLink) { + ServiceResponse> response = listUsageNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsageNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists usage stats. + * + * @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> listUsageNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsageNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsageNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists usage stats. + * + * @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<VirtualNetworkUsageInner> object + */ + public Observable> listUsageNextAsync(final String nextPageLink) { + return listUsageNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists usage stats. + * + * @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<VirtualNetworkUsageInner> object + */ + public Observable>> listUsageNextWithServiceResponseAsync(final String nextPageLink) { + return listUsageNextSinglePageAsync(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(listUsageNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists usage stats. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkUsageInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listUsageNextSinglePageAsync(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.listUsageNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsageNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsageNextDelegate(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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterImpl.java new file mode 100644 index 000000000000..198d1216875a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterImpl.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualRouter; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class VirtualRouterImpl extends GroupableResourceCoreImpl implements VirtualRouter, VirtualRouter.Definition, VirtualRouter.Update { + VirtualRouterImpl(String name, VirtualRouterInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + VirtualRoutersInner client = this.manager().inner().virtualRouters(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VirtualRoutersInner client = this.manager().inner().virtualRouters(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VirtualRoutersInner client = this.manager().inner().virtualRouters(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public SubResource hostedGateway() { + return this.inner().hostedGateway(); + } + + @Override + public SubResource hostedSubnet() { + return this.inner().hostedSubnet(); + } + + @Override + public List peerings() { + return this.inner().peerings(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Long virtualRouterAsn() { + return this.inner().virtualRouterAsn(); + } + + @Override + public List virtualRouterIps() { + return this.inner().virtualRouterIps(); + } + + @Override + public VirtualRouterImpl withHostedGateway(SubResource hostedGateway) { + this.inner().withHostedGateway(hostedGateway); + return this; + } + + @Override + public VirtualRouterImpl withHostedSubnet(SubResource hostedSubnet) { + this.inner().withHostedSubnet(hostedSubnet); + return this; + } + + @Override + public VirtualRouterImpl withVirtualRouterAsn(Long virtualRouterAsn) { + this.inner().withVirtualRouterAsn(virtualRouterAsn); + return this; + } + + @Override + public VirtualRouterImpl withVirtualRouterIps(List virtualRouterIps) { + this.inner().withVirtualRouterIps(virtualRouterIps); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterInner.java new file mode 100644 index 000000000000..15e18aa7f702 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterInner.java @@ -0,0 +1,202 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * VirtualRouter Resource. + */ +@JsonFlatten +@SkipParentValidation +public class VirtualRouterInner extends Resource { + /** + * VirtualRouter ASN. + */ + @JsonProperty(value = "properties.virtualRouterAsn") + private Long virtualRouterAsn; + + /** + * VirtualRouter IPs. + */ + @JsonProperty(value = "properties.virtualRouterIps") + private List virtualRouterIps; + + /** + * The Subnet on which VirtualRouter is hosted. + */ + @JsonProperty(value = "properties.hostedSubnet") + private SubResource hostedSubnet; + + /** + * The Gateway on which VirtualRouter is hosted. + */ + @JsonProperty(value = "properties.hostedGateway") + private SubResource hostedGateway; + + /** + * List of references to VirtualRouterPeerings. + */ + @JsonProperty(value = "properties.peerings", access = JsonProperty.Access.WRITE_ONLY) + private List peerings; + + /** + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Gets a unique read-only string that changes whenever the resource is + * updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get virtualRouter ASN. + * + * @return the virtualRouterAsn value + */ + public Long virtualRouterAsn() { + return this.virtualRouterAsn; + } + + /** + * Set virtualRouter ASN. + * + * @param virtualRouterAsn the virtualRouterAsn value to set + * @return the VirtualRouterInner object itself. + */ + public VirtualRouterInner withVirtualRouterAsn(Long virtualRouterAsn) { + this.virtualRouterAsn = virtualRouterAsn; + return this; + } + + /** + * Get virtualRouter IPs. + * + * @return the virtualRouterIps value + */ + public List virtualRouterIps() { + return this.virtualRouterIps; + } + + /** + * Set virtualRouter IPs. + * + * @param virtualRouterIps the virtualRouterIps value to set + * @return the VirtualRouterInner object itself. + */ + public VirtualRouterInner withVirtualRouterIps(List virtualRouterIps) { + this.virtualRouterIps = virtualRouterIps; + return this; + } + + /** + * Get the Subnet on which VirtualRouter is hosted. + * + * @return the hostedSubnet value + */ + public SubResource hostedSubnet() { + return this.hostedSubnet; + } + + /** + * Set the Subnet on which VirtualRouter is hosted. + * + * @param hostedSubnet the hostedSubnet value to set + * @return the VirtualRouterInner object itself. + */ + public VirtualRouterInner withHostedSubnet(SubResource hostedSubnet) { + this.hostedSubnet = hostedSubnet; + return this; + } + + /** + * Get the Gateway on which VirtualRouter is hosted. + * + * @return the hostedGateway value + */ + public SubResource hostedGateway() { + return this.hostedGateway; + } + + /** + * Set the Gateway on which VirtualRouter is hosted. + * + * @param hostedGateway the hostedGateway value to set + * @return the VirtualRouterInner object itself. + */ + public VirtualRouterInner withHostedGateway(SubResource hostedGateway) { + this.hostedGateway = hostedGateway; + return this; + } + + /** + * Get list of references to VirtualRouterPeerings. + * + * @return the peerings value + */ + public List peerings() { + return this.peerings; + } + + /** + * Get the provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get gets a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the VirtualRouterInner object itself. + */ + public VirtualRouterInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringImpl.java new file mode 100644 index 000000000000..0f676ae5deb5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringImpl.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VirtualRouterPeering; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class VirtualRouterPeeringImpl extends CreatableUpdatableImpl implements VirtualRouterPeering, VirtualRouterPeering.Definition, VirtualRouterPeering.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String virtualRouterName; + private String peeringName; + + VirtualRouterPeeringImpl(String name, NetworkManager manager) { + super(name, new VirtualRouterPeeringInner()); + this.manager = manager; + // Set resource name + this.peeringName = name; + // + } + + VirtualRouterPeeringImpl(VirtualRouterPeeringInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.peeringName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.virtualRouterName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualRouters"); + this.peeringName = IdParsingUtils.getValueFromIdByName(inner.id(), "peerings"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + VirtualRouterPeeringsInner client = this.manager().inner().virtualRouterPeerings(); + return client.createOrUpdateAsync(this.resourceGroupName, this.virtualRouterName, this.peeringName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VirtualRouterPeeringsInner client = this.manager().inner().virtualRouterPeerings(); + return client.createOrUpdateAsync(this.resourceGroupName, this.virtualRouterName, this.peeringName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VirtualRouterPeeringsInner client = this.manager().inner().virtualRouterPeerings(); + return client.getAsync(this.resourceGroupName, this.virtualRouterName, this.peeringName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Long peerAsn() { + return this.inner().peerAsn(); + } + + @Override + public String peerIp() { + return this.inner().peerIp(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public VirtualRouterPeeringImpl withExistingVirtualRouter(String resourceGroupName, String virtualRouterName) { + this.resourceGroupName = resourceGroupName; + this.virtualRouterName = virtualRouterName; + return this; + } + + @Override + public VirtualRouterPeeringImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public VirtualRouterPeeringImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public VirtualRouterPeeringImpl withPeerAsn(Long peerAsn) { + this.inner().withPeerAsn(peerAsn); + return this; + } + + @Override + public VirtualRouterPeeringImpl withPeerIp(String peerIp) { + this.inner().withPeerIp(peerIp); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringInner.java new file mode 100644 index 000000000000..e1e819f3c485 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringInner.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Virtual Router Peering resource. + */ +@JsonFlatten +public class VirtualRouterPeeringInner extends SubResource { + /** + * Peer ASN. + */ + @JsonProperty(value = "properties.peerAsn") + private Long peerAsn; + + /** + * Peer IP. + */ + @JsonProperty(value = "properties.peerIp") + private String peerIp; + + /** + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Gets name of the peering unique to VirtualRouter. This name can be used + * to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Gets a unique read-only string that changes whenever the resource is + * updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Peering type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get peer ASN. + * + * @return the peerAsn value + */ + public Long peerAsn() { + return this.peerAsn; + } + + /** + * Set peer ASN. + * + * @param peerAsn the peerAsn value to set + * @return the VirtualRouterPeeringInner object itself. + */ + public VirtualRouterPeeringInner withPeerAsn(Long peerAsn) { + this.peerAsn = peerAsn; + return this; + } + + /** + * Get peer IP. + * + * @return the peerIp value + */ + public String peerIp() { + return this.peerIp; + } + + /** + * Set peer IP. + * + * @param peerIp the peerIp value to set + * @return the VirtualRouterPeeringInner object itself. + */ + public VirtualRouterPeeringInner withPeerIp(String peerIp) { + this.peerIp = peerIp; + return this; + } + + /** + * Get the provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get gets name of the peering unique to VirtualRouter. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set gets name of the peering unique to VirtualRouter. This name can be used to access the resource. + * + * @param name the name value to set + * @return the VirtualRouterPeeringInner object itself. + */ + public VirtualRouterPeeringInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get gets a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get peering type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringsImpl.java new file mode 100644 index 000000000000..32016109f3b7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualRouterPeerings; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.VirtualRouterPeering; + +class VirtualRouterPeeringsImpl extends WrapperImpl implements VirtualRouterPeerings { + private final NetworkManager manager; + + VirtualRouterPeeringsImpl(NetworkManager manager) { + super(manager.inner().virtualRouterPeerings()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public VirtualRouterPeeringImpl define(String name) { + return wrapModel(name); + } + + private VirtualRouterPeeringImpl wrapModel(VirtualRouterPeeringInner inner) { + return new VirtualRouterPeeringImpl(inner, manager()); + } + + private VirtualRouterPeeringImpl wrapModel(String name) { + return new VirtualRouterPeeringImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String virtualRouterName) { + VirtualRouterPeeringsInner client = this.inner(); + return client.listAsync(resourceGroupName, virtualRouterName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VirtualRouterPeering call(VirtualRouterPeeringInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String virtualRouterName, String peeringName) { + VirtualRouterPeeringsInner client = this.inner(); + return client.getAsync(resourceGroupName, virtualRouterName, peeringName) + .flatMap(new Func1>() { + @Override + public Observable call(VirtualRouterPeeringInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((VirtualRouterPeering)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String virtualRouterName, String peeringName) { + VirtualRouterPeeringsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, virtualRouterName, peeringName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringsInner.java new file mode 100644 index 000000000000..dcc4e497ce54 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRouterPeeringsInner.java @@ -0,0 +1,764 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.network.v2019_09_01.ErrorException; +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 VirtualRouterPeerings. + */ +public class VirtualRouterPeeringsInner { + /** The Retrofit service to perform REST calls. */ + private VirtualRouterPeeringsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VirtualRouterPeeringsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VirtualRouterPeeringsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VirtualRouterPeeringsService.class); + this.client = client; + } + + /** + * The interface defining all the services for VirtualRouterPeerings to be + * used by Retrofit to perform actually REST calls. + */ + interface VirtualRouterPeeringsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualRouterPeerings delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualRouterName") String virtualRouterName, @Path("peeringName") String peeringName, @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.network.v2019_09_01.VirtualRouterPeerings beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualRouterName") String virtualRouterName, @Path("peeringName") String peeringName, @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.network.v2019_09_01.VirtualRouterPeerings get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("virtualRouterName") String virtualRouterName, @Path("peeringName") String peeringName, @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.network.v2019_09_01.VirtualRouterPeerings createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualRouterName") String virtualRouterName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body VirtualRouterPeeringInner 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.network.v2019_09_01.VirtualRouterPeerings beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualRouterName") String virtualRouterName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body VirtualRouterPeeringInner 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.network.v2019_09_01.VirtualRouterPeerings list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("virtualRouterName") String virtualRouterName, @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.network.v2019_09_01.VirtualRouterPeerings listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified peering from a Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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 virtualRouterName, String peeringName) { + deleteWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName).toBlocking().last().body(); + } + + /** + * Deletes the specified peering from a Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the peering. + * @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 virtualRouterName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName), serviceCallback); + } + + /** + * Deletes the specified peering from a Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String virtualRouterName, String peeringName) { + return deleteWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified peering from a Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String virtualRouterName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualRouterName == null) { + throw new IllegalArgumentException("Parameter virtualRouterName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, virtualRouterName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified peering from a Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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 virtualRouterName, String peeringName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName).toBlocking().single().body(); + } + + /** + * Deletes the specified peering from a Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the peering. + * @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 virtualRouterName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName), serviceCallback); + } + + /** + * Deletes the specified peering from a Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String virtualRouterName, String peeringName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified peering from a Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String virtualRouterName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualRouterName == null) { + throw new IllegalArgumentException("Parameter virtualRouterName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, virtualRouterName, peeringName, this.client.subscriptionId(), 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 ErrorException, 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(ErrorException.class) + .build(response); + } + + /** + * Gets the specified Virtual Router Peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the Virtual Router Peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualRouterPeeringInner object if successful. + */ + public VirtualRouterPeeringInner get(String resourceGroupName, String virtualRouterName, String peeringName) { + return getWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName).toBlocking().single().body(); + } + + /** + * Gets the specified Virtual Router Peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the Virtual Router Peering. + * @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 virtualRouterName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName), serviceCallback); + } + + /** + * Gets the specified Virtual Router Peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the Virtual Router Peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualRouterPeeringInner object + */ + public Observable getAsync(String resourceGroupName, String virtualRouterName, String peeringName) { + return getWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName).map(new Func1, VirtualRouterPeeringInner>() { + @Override + public VirtualRouterPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Virtual Router Peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the Virtual Router Peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualRouterPeeringInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String virtualRouterName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualRouterName == null) { + throw new IllegalArgumentException("Parameter virtualRouterName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(resourceGroupName, virtualRouterName, peeringName, this.client.subscriptionId(), 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Creates or updates the specified Virtual Router Peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the Virtual Router Peering. + * @param parameters Parameters supplied to the create or update Virtual Router Peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualRouterPeeringInner object if successful. + */ + public VirtualRouterPeeringInner createOrUpdate(String resourceGroupName, String virtualRouterName, String peeringName, VirtualRouterPeeringInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates the specified Virtual Router Peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the Virtual Router Peering. + * @param parameters Parameters supplied to the create or update Virtual Router Peering 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 createOrUpdateAsync(String resourceGroupName, String virtualRouterName, String peeringName, VirtualRouterPeeringInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified Virtual Router Peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the Virtual Router Peering. + * @param parameters Parameters supplied to the create or update Virtual Router Peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String virtualRouterName, String peeringName, VirtualRouterPeeringInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName, parameters).map(new Func1, VirtualRouterPeeringInner>() { + @Override + public VirtualRouterPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified Virtual Router Peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the Virtual Router Peering. + * @param parameters Parameters supplied to the create or update Virtual Router Peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualRouterName, String peeringName, VirtualRouterPeeringInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualRouterName == null) { + throw new IllegalArgumentException("Parameter virtualRouterName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, virtualRouterName, peeringName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates the specified Virtual Router Peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the Virtual Router Peering. + * @param parameters Parameters supplied to the create or update Virtual Router Peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualRouterPeeringInner object if successful. + */ + public VirtualRouterPeeringInner beginCreateOrUpdate(String resourceGroupName, String virtualRouterName, String peeringName, VirtualRouterPeeringInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified Virtual Router Peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the Virtual Router Peering. + * @param parameters Parameters supplied to the create or update Virtual Router Peering 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 beginCreateOrUpdateAsync(String resourceGroupName, String virtualRouterName, String peeringName, VirtualRouterPeeringInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified Virtual Router Peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the Virtual Router Peering. + * @param parameters Parameters supplied to the create or update Virtual Router Peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualRouterPeeringInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String virtualRouterName, String peeringName, VirtualRouterPeeringInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualRouterName, peeringName, parameters).map(new Func1, VirtualRouterPeeringInner>() { + @Override + public VirtualRouterPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified Virtual Router Peering. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param peeringName The name of the Virtual Router Peering. + * @param parameters Parameters supplied to the create or update Virtual Router Peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualRouterPeeringInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualRouterName, String peeringName, VirtualRouterPeeringInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualRouterName == null) { + throw new IllegalArgumentException("Parameter virtualRouterName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, virtualRouterName, peeringName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Lists all Virtual Router Peerings in a Virtual Router resource. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<VirtualRouterPeeringInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String virtualRouterName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, virtualRouterName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all Virtual Router Peerings in a Virtual Router resource. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @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 resourceGroupName, final String virtualRouterName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, virtualRouterName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all Virtual Router Peerings in a Virtual Router resource. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualRouterPeeringInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String virtualRouterName) { + return listWithServiceResponseAsync(resourceGroupName, virtualRouterName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Virtual Router Peerings in a Virtual Router resource. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualRouterPeeringInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String virtualRouterName) { + return listSinglePageAsync(resourceGroupName, virtualRouterName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all Virtual Router Peerings in a Virtual Router resource. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualRouterPeeringInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String virtualRouterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualRouterName == null) { + throw new IllegalArgumentException("Parameter virtualRouterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.list(resourceGroupName, virtualRouterName, this.client.subscriptionId(), 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Lists all Virtual Router Peerings in a Virtual Router resource. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<VirtualRouterPeeringInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all Virtual Router Peerings in a Virtual Router resource. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all Virtual Router Peerings in a Virtual Router resource. + * + * @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<VirtualRouterPeeringInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Virtual Router Peerings in a Virtual Router resource. + * + * @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<VirtualRouterPeeringInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all Virtual Router Peerings in a Virtual Router resource. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualRouterPeeringInner> 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRoutersImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRoutersImpl.java new file mode 100644 index 000000000000..50b10048cd7e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRoutersImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualRouters; +import com.microsoft.azure.management.network.v2019_09_01.VirtualRouter; +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; + +class VirtualRoutersImpl extends GroupableResourcesCoreImpl implements VirtualRouters { + protected VirtualRoutersImpl(NetworkManager manager) { + super(manager.inner().virtualRouters(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + VirtualRoutersInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + VirtualRoutersInner 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) { + VirtualRoutersInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + VirtualRoutersInner 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 VirtualRouter call(VirtualRouterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + VirtualRoutersInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + VirtualRoutersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VirtualRouter call(VirtualRouterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public VirtualRouterImpl define(String name) { + return wrapModel(name); + } + + @Override + protected VirtualRouterImpl wrapModel(VirtualRouterInner inner) { + return new VirtualRouterImpl(inner.name(), inner, manager()); + } + + @Override + protected VirtualRouterImpl wrapModel(String name) { + return new VirtualRouterImpl(name, new VirtualRouterInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRoutersInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRoutersInner.java new file mode 100644 index 000000000000..66ddb6ea17d6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualRoutersInner.java @@ -0,0 +1,1030 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.ListOperationCallback; +import com.microsoft.azure.management.network.v2019_09_01.ErrorException; +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 VirtualRouters. + */ +public class VirtualRoutersInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private VirtualRoutersService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VirtualRoutersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VirtualRoutersInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VirtualRoutersService.class); + this.client = client; + } + + /** + * The interface defining all the services for VirtualRouters to be + * used by Retrofit to perform actually REST calls. + */ + interface VirtualRoutersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualRouters delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualRouterName") String virtualRouterName, @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.network.v2019_09_01.VirtualRouters beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualRouterName") String virtualRouterName, @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.network.v2019_09_01.VirtualRouters getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("virtualRouterName") String virtualRouterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.v2019_09_01.VirtualRouters createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualRouterName") String virtualRouterName, @Path("subscriptionId") String subscriptionId, @Body VirtualRouterInner 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.network.v2019_09_01.VirtualRouters beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualRouterName") String virtualRouterName, @Path("subscriptionId") String subscriptionId, @Body VirtualRouterInner 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.network.v2019_09_01.VirtualRouters listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.VirtualRouters list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualRouters") + Observable> list(@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.network.v2019_09_01.VirtualRouters 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.network.v2019_09_01.VirtualRouters listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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 virtualRouterName) { + deleteWithServiceResponseAsync(resourceGroupName, virtualRouterName).toBlocking().last().body(); + } + + /** + * Deletes the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @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 virtualRouterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, virtualRouterName), serviceCallback); + } + + /** + * Deletes the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String virtualRouterName) { + return deleteWithServiceResponseAsync(resourceGroupName, virtualRouterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String virtualRouterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualRouterName == null) { + throw new IllegalArgumentException("Parameter virtualRouterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, virtualRouterName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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 virtualRouterName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, virtualRouterName).toBlocking().single().body(); + } + + /** + * Deletes the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @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 virtualRouterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, virtualRouterName), serviceCallback); + } + + /** + * Deletes the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String virtualRouterName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, virtualRouterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String virtualRouterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualRouterName == null) { + throw new IllegalArgumentException("Parameter virtualRouterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, virtualRouterName, this.client.subscriptionId(), 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 ErrorException, 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(ErrorException.class) + .build(response); + } + + /** + * Gets the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualRouterInner object if successful. + */ + public VirtualRouterInner getByResourceGroup(String resourceGroupName, String virtualRouterName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualRouterName).toBlocking().single().body(); + } + + /** + * Gets the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @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 virtualRouterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualRouterName), serviceCallback); + } + + /** + * Gets the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualRouterInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String virtualRouterName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualRouterName).map(new Func1, VirtualRouterInner>() { + @Override + public VirtualRouterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualRouterInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String virtualRouterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualRouterName == null) { + throw new IllegalArgumentException("Parameter virtualRouterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String expand = null; + return service.getByResourceGroup(resourceGroupName, virtualRouterName, this.client.subscriptionId(), apiVersion, expand, 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); + } + } + }); + } + + /** + * Gets the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualRouterInner object if successful. + */ + public VirtualRouterInner getByResourceGroup(String resourceGroupName, String virtualRouterName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualRouterName, expand).toBlocking().single().body(); + } + + /** + * Gets the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param expand Expands referenced resources. + * @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 virtualRouterName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualRouterName, expand), serviceCallback); + } + + /** + * Gets the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualRouterInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String virtualRouterName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualRouterName, expand).map(new Func1, VirtualRouterInner>() { + @Override + public VirtualRouterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualRouterInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String virtualRouterName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualRouterName == null) { + throw new IllegalArgumentException("Parameter virtualRouterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, virtualRouterName, this.client.subscriptionId(), apiVersion, expand, 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Creates or updates the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param parameters Parameters supplied to the create or update Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualRouterInner object if successful. + */ + public VirtualRouterInner createOrUpdate(String resourceGroupName, String virtualRouterName, VirtualRouterInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualRouterName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param parameters Parameters supplied to the create or update Virtual Router. + * @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 virtualRouterName, VirtualRouterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualRouterName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param parameters Parameters supplied to the create or update Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String virtualRouterName, VirtualRouterInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualRouterName, parameters).map(new Func1, VirtualRouterInner>() { + @Override + public VirtualRouterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param parameters Parameters supplied to the create or update Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualRouterName, VirtualRouterInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualRouterName == null) { + throw new IllegalArgumentException("Parameter virtualRouterName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, virtualRouterName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param parameters Parameters supplied to the create or update Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualRouterInner object if successful. + */ + public VirtualRouterInner beginCreateOrUpdate(String resourceGroupName, String virtualRouterName, VirtualRouterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualRouterName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param parameters Parameters supplied to the create or update Virtual Router. + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String virtualRouterName, VirtualRouterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualRouterName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param parameters Parameters supplied to the create or update Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualRouterInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String virtualRouterName, VirtualRouterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualRouterName, parameters).map(new Func1, VirtualRouterInner>() { + @Override + public VirtualRouterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified Virtual Router. + * + * @param resourceGroupName The name of the resource group. + * @param virtualRouterName The name of the Virtual Router. + * @param parameters Parameters supplied to the create or update Virtual Router. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualRouterInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualRouterName, VirtualRouterInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualRouterName == null) { + throw new IllegalArgumentException("Parameter virtualRouterName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, virtualRouterName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Lists all Virtual Routers in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<VirtualRouterInner> 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 all Virtual Routers in a resource group. + * + * @param resourceGroupName The name of the 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 all Virtual Routers in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualRouterInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Virtual Routers in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualRouterInner> 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 all Virtual Routers in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualRouterInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Gets all the Virtual Routers in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<VirtualRouterInner> 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 all the Virtual Routers in a subscription. + * + * @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 all the Virtual Routers in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualRouterInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the Virtual Routers in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualRouterInner> 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 all the Virtual Routers in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualRouterInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Lists all Virtual Routers in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<VirtualRouterInner> 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 all Virtual Routers in a resource group. + * + * @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 all Virtual Routers in a resource group. + * + * @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<VirtualRouterInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Virtual Routers in a resource group. + * + * @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<VirtualRouterInner> 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 all Virtual Routers in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualRouterInner> 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + + /** + * Gets all the Virtual Routers in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorException 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<VirtualRouterInner> 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 all the Virtual Routers in a subscription. + * + * @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 all the Virtual Routers in a subscription. + * + * @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<VirtualRouterInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the Virtual Routers in a subscription. + * + * @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<VirtualRouterInner> 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 all the Virtual Routers in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualRouterInner> 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 ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorException.class) + .build(response); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWANImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWANImpl.java new file mode 100644 index 000000000000..4fc1499e1f65 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWANImpl.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualWAN; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.OfficeTrafficCategory; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class VirtualWANImpl extends GroupableResourceCoreImpl implements VirtualWAN, VirtualWAN.Definition, VirtualWAN.Update { + VirtualWANImpl(String name, VirtualWANInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + VirtualWansInner client = this.manager().inner().virtualWans(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VirtualWansInner client = this.manager().inner().virtualWans(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VirtualWansInner client = this.manager().inner().virtualWans(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Boolean allowBranchToBranchTraffic() { + return this.inner().allowBranchToBranchTraffic(); + } + + @Override + public Boolean allowVnetToVnetTraffic() { + return this.inner().allowVnetToVnetTraffic(); + } + + @Override + public Boolean disableVpnEncryption() { + return this.inner().disableVpnEncryption(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public OfficeTrafficCategory office365LocalBreakoutCategory() { + return this.inner().office365LocalBreakoutCategory(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public List virtualHubs() { + return this.inner().virtualHubs(); + } + + @Override + public String virtualWANType() { + return this.inner().virtualWANType(); + } + + @Override + public List vpnSites() { + return this.inner().vpnSites(); + } + + @Override + public VirtualWANImpl withAllowBranchToBranchTraffic(Boolean allowBranchToBranchTraffic) { + this.inner().withAllowBranchToBranchTraffic(allowBranchToBranchTraffic); + return this; + } + + @Override + public VirtualWANImpl withAllowVnetToVnetTraffic(Boolean allowVnetToVnetTraffic) { + this.inner().withAllowVnetToVnetTraffic(allowVnetToVnetTraffic); + return this; + } + + @Override + public VirtualWANImpl withDisableVpnEncryption(Boolean disableVpnEncryption) { + this.inner().withDisableVpnEncryption(disableVpnEncryption); + return this; + } + + @Override + public VirtualWANImpl withOffice365LocalBreakoutCategory(OfficeTrafficCategory office365LocalBreakoutCategory) { + this.inner().withOffice365LocalBreakoutCategory(office365LocalBreakoutCategory); + return this; + } + + @Override + public VirtualWANImpl withVirtualWANType(String virtualWANType) { + this.inner().withVirtualWANType(virtualWANType); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWANInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWANInner.java new file mode 100644 index 000000000000..23a9096bf31a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWANInner.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.OfficeTrafficCategory; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * VirtualWAN Resource. + */ +@JsonFlatten +@SkipParentValidation +public class VirtualWANInner extends Resource { + /** + * Vpn encryption to be disabled or not. + */ + @JsonProperty(value = "properties.disableVpnEncryption") + private Boolean disableVpnEncryption; + + /** + * List of VirtualHubs in the VirtualWAN. + */ + @JsonProperty(value = "properties.virtualHubs", access = JsonProperty.Access.WRITE_ONLY) + private List virtualHubs; + + /** + * List of VpnSites in the VirtualWAN. + */ + @JsonProperty(value = "properties.vpnSites", access = JsonProperty.Access.WRITE_ONLY) + private List vpnSites; + + /** + * True if branch to branch traffic is allowed. + */ + @JsonProperty(value = "properties.allowBranchToBranchTraffic") + private Boolean allowBranchToBranchTraffic; + + /** + * True if Vnet to Vnet traffic is allowed. + */ + @JsonProperty(value = "properties.allowVnetToVnetTraffic") + private Boolean allowVnetToVnetTraffic; + + /** + * The office local breakout category. Possible values include: 'Optimize', + * 'OptimizeAndAllow', 'All', 'None'. + */ + @JsonProperty(value = "properties.office365LocalBreakoutCategory") + private OfficeTrafficCategory office365LocalBreakoutCategory; + + /** + * The provisioning state of the virtual WAN resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The type of the VirtualWAN. + */ + @JsonProperty(value = "properties.type") + private String virtualWANType; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get vpn encryption to be disabled or not. + * + * @return the disableVpnEncryption value + */ + public Boolean disableVpnEncryption() { + return this.disableVpnEncryption; + } + + /** + * Set vpn encryption to be disabled or not. + * + * @param disableVpnEncryption the disableVpnEncryption value to set + * @return the VirtualWANInner object itself. + */ + public VirtualWANInner withDisableVpnEncryption(Boolean disableVpnEncryption) { + this.disableVpnEncryption = disableVpnEncryption; + return this; + } + + /** + * Get list of VirtualHubs in the VirtualWAN. + * + * @return the virtualHubs value + */ + public List virtualHubs() { + return this.virtualHubs; + } + + /** + * Get list of VpnSites in the VirtualWAN. + * + * @return the vpnSites value + */ + public List vpnSites() { + return this.vpnSites; + } + + /** + * Get true if branch to branch traffic is allowed. + * + * @return the allowBranchToBranchTraffic value + */ + public Boolean allowBranchToBranchTraffic() { + return this.allowBranchToBranchTraffic; + } + + /** + * Set true if branch to branch traffic is allowed. + * + * @param allowBranchToBranchTraffic the allowBranchToBranchTraffic value to set + * @return the VirtualWANInner object itself. + */ + public VirtualWANInner withAllowBranchToBranchTraffic(Boolean allowBranchToBranchTraffic) { + this.allowBranchToBranchTraffic = allowBranchToBranchTraffic; + return this; + } + + /** + * Get true if Vnet to Vnet traffic is allowed. + * + * @return the allowVnetToVnetTraffic value + */ + public Boolean allowVnetToVnetTraffic() { + return this.allowVnetToVnetTraffic; + } + + /** + * Set true if Vnet to Vnet traffic is allowed. + * + * @param allowVnetToVnetTraffic the allowVnetToVnetTraffic value to set + * @return the VirtualWANInner object itself. + */ + public VirtualWANInner withAllowVnetToVnetTraffic(Boolean allowVnetToVnetTraffic) { + this.allowVnetToVnetTraffic = allowVnetToVnetTraffic; + return this; + } + + /** + * Get the office local breakout category. Possible values include: 'Optimize', 'OptimizeAndAllow', 'All', 'None'. + * + * @return the office365LocalBreakoutCategory value + */ + public OfficeTrafficCategory office365LocalBreakoutCategory() { + return this.office365LocalBreakoutCategory; + } + + /** + * Set the office local breakout category. Possible values include: 'Optimize', 'OptimizeAndAllow', 'All', 'None'. + * + * @param office365LocalBreakoutCategory the office365LocalBreakoutCategory value to set + * @return the VirtualWANInner object itself. + */ + public VirtualWANInner withOffice365LocalBreakoutCategory(OfficeTrafficCategory office365LocalBreakoutCategory) { + this.office365LocalBreakoutCategory = office365LocalBreakoutCategory; + return this; + } + + /** + * Get the provisioning state of the virtual WAN resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the type of the VirtualWAN. + * + * @return the virtualWANType value + */ + public String virtualWANType() { + return this.virtualWANType; + } + + /** + * Set the type of the VirtualWAN. + * + * @param virtualWANType the virtualWANType value to set + * @return the VirtualWANInner object itself. + */ + public VirtualWANInner withVirtualWANType(String virtualWANType) { + this.virtualWANType = virtualWANType; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the VirtualWANInner object itself. + */ + public VirtualWANInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWanSecurityProvidersInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWanSecurityProvidersInner.java new file mode 100644 index 000000000000..b365acdc2a31 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWanSecurityProvidersInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.VirtualWanSecurityProvider; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Collection of SecurityProviders. + */ +public class VirtualWanSecurityProvidersInner { + /** + * List of VirtualWAN security providers. + */ + @JsonProperty(value = "supportedProviders") + private List supportedProviders; + + /** + * Get list of VirtualWAN security providers. + * + * @return the supportedProviders value + */ + public List supportedProviders() { + return this.supportedProviders; + } + + /** + * Set list of VirtualWAN security providers. + * + * @param supportedProviders the supportedProviders value to set + * @return the VirtualWanSecurityProvidersInner object itself. + */ + public VirtualWanSecurityProvidersInner withSupportedProviders(List supportedProviders) { + this.supportedProviders = supportedProviders; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWansImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWansImpl.java new file mode 100644 index 000000000000..7da87317db65 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWansImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VirtualWans; +import com.microsoft.azure.management.network.v2019_09_01.VirtualWAN; +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; + +class VirtualWansImpl extends GroupableResourcesCoreImpl implements VirtualWans { + protected VirtualWansImpl(NetworkManager manager) { + super(manager.inner().virtualWans(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + VirtualWansInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + VirtualWansInner 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) { + VirtualWansInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + VirtualWansInner 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 VirtualWAN call(VirtualWANInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + VirtualWansInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + VirtualWansInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VirtualWAN call(VirtualWANInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public VirtualWANImpl define(String name) { + return wrapModel(name); + } + + @Override + protected VirtualWANImpl wrapModel(VirtualWANInner inner) { + return new VirtualWANImpl(inner.name(), inner, manager()); + } + + @Override + protected VirtualWANImpl wrapModel(String name) { + return new VirtualWANImpl(name, new VirtualWANInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWansInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWansInner.java new file mode 100644 index 000000000000..3514e6cd04f0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VirtualWansInner.java @@ -0,0 +1,1126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 VirtualWans. + */ +public class VirtualWansInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private VirtualWansService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VirtualWansInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VirtualWansInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VirtualWansService.class); + this.client = client; + } + + /** + * The interface defining all the services for VirtualWans to be + * used by Retrofit to perform actually REST calls. + */ + interface VirtualWansService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualWans getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("VirtualWANName") String virtualWANName, @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.network.v2019_09_01.VirtualWans createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("VirtualWANName") String virtualWANName, @Query("api-version") String apiVersion, @Body VirtualWANInner wANParameters, @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.network.v2019_09_01.VirtualWans beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("VirtualWANName") String virtualWANName, @Query("api-version") String apiVersion, @Body VirtualWANInner wANParameters, @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.network.v2019_09_01.VirtualWans updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}") + Observable> updateTags(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("VirtualWANName") String virtualWANName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject wANParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VirtualWans delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("VirtualWANName") String virtualWANName, @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.network.v2019_09_01.VirtualWans beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("VirtualWANName") String virtualWANName, @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.network.v2019_09_01.VirtualWans listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.VirtualWans list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans") + Observable> list(@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.network.v2019_09_01.VirtualWans 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.network.v2019_09_01.VirtualWans listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves the details of a VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualWANInner object if successful. + */ + public VirtualWANInner getByResourceGroup(String resourceGroupName, String virtualWANName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualWANName).toBlocking().single().body(); + } + + /** + * Retrieves the details of a VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being retrieved. + * @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 virtualWANName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualWANName), serviceCallback); + } + + /** + * Retrieves the details of a VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualWANInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String virtualWANName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualWANName).map(new Func1, VirtualWANInner>() { + @Override + public VirtualWANInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of a VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualWANInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String virtualWANName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, virtualWANName, this.client.subscriptionId(), 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); + } + + /** + * Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being created or updated. + * @param wANParameters Parameters supplied to create or update VirtualWAN. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualWANInner object if successful. + */ + public VirtualWANInner createOrUpdate(String resourceGroupName, String virtualWANName, VirtualWANInner wANParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualWANName, wANParameters).toBlocking().last().body(); + } + + /** + * Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being created or updated. + * @param wANParameters Parameters supplied to create or update VirtualWAN. + * @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 virtualWANName, VirtualWANInner wANParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualWANName, wANParameters), serviceCallback); + } + + /** + * Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being created or updated. + * @param wANParameters Parameters supplied to create or update VirtualWAN. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String virtualWANName, VirtualWANInner wANParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualWANName, wANParameters).map(new Func1, VirtualWANInner>() { + @Override + public VirtualWANInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being created or updated. + * @param wANParameters Parameters supplied to create or update VirtualWAN. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualWANName, VirtualWANInner wANParameters) { + 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 (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + if (wANParameters == null) { + throw new IllegalArgumentException("Parameter wANParameters is required and cannot be null."); + } + Validator.validate(wANParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, virtualWANName, apiVersion, wANParameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being created or updated. + * @param wANParameters Parameters supplied to create or update VirtualWAN. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualWANInner object if successful. + */ + public VirtualWANInner beginCreateOrUpdate(String resourceGroupName, String virtualWANName, VirtualWANInner wANParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualWANName, wANParameters).toBlocking().single().body(); + } + + /** + * Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being created or updated. + * @param wANParameters Parameters supplied to create or update VirtualWAN. + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String virtualWANName, VirtualWANInner wANParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualWANName, wANParameters), serviceCallback); + } + + /** + * Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being created or updated. + * @param wANParameters Parameters supplied to create or update VirtualWAN. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualWANInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String virtualWANName, VirtualWANInner wANParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualWANName, wANParameters).map(new Func1, VirtualWANInner>() { + @Override + public VirtualWANInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being created or updated. + * @param wANParameters Parameters supplied to create or update VirtualWAN. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualWANInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualWANName, VirtualWANInner wANParameters) { + 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 (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + if (wANParameters == null) { + throw new IllegalArgumentException("Parameter wANParameters is required and cannot be null."); + } + Validator.validate(wANParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, virtualWANName, apiVersion, wANParameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 a VirtualWAN tags. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualWANInner object if successful. + */ + public VirtualWANInner updateTags(String resourceGroupName, String virtualWANName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualWANName).toBlocking().single().body(); + } + + /** + * Updates a VirtualWAN tags. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being updated. + * @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 updateTagsAsync(String resourceGroupName, String virtualWANName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualWANName), serviceCallback); + } + + /** + * Updates a VirtualWAN tags. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualWANInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualWANName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualWANName).map(new Func1, VirtualWANInner>() { + @Override + public VirtualWANInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a VirtualWAN tags. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualWANInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualWANName) { + 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 (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject wANParameters = new TagsObject(); + wANParameters.withTags(null); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, virtualWANName, apiVersion, this.client.acceptLanguage(), wANParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a VirtualWAN tags. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being updated. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VirtualWANInner object if successful. + */ + public VirtualWANInner updateTags(String resourceGroupName, String virtualWANName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualWANName, tags).toBlocking().single().body(); + } + + /** + * Updates a VirtualWAN tags. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being updated. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String virtualWANName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualWANName, tags), serviceCallback); + } + + /** + * Updates a VirtualWAN tags. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being updated. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualWANInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualWANName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualWANName, tags).map(new Func1, VirtualWANInner>() { + @Override + public VirtualWANInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a VirtualWAN tags. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being updated. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualWANInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualWANName, Map tags) { + 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 (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject wANParameters = new TagsObject(); + wANParameters.withTags(tags); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, virtualWANName, apiVersion, this.client.acceptLanguage(), wANParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 a VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualWANName) { + deleteWithServiceResponseAsync(resourceGroupName, virtualWANName).toBlocking().last().body(); + } + + /** + * Deletes a VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being deleted. + * @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 virtualWANName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, virtualWANName), serviceCallback); + } + + /** + * Deletes a VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String virtualWANName) { + return deleteWithServiceResponseAsync(resourceGroupName, virtualWANName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String virtualWANName) { + 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 (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, virtualWANName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 virtualWANName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, virtualWANName).toBlocking().single().body(); + } + + /** + * Deletes a VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being deleted. + * @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 virtualWANName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, virtualWANName), serviceCallback); + } + + /** + * Deletes a VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String virtualWANName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, virtualWANName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a VirtualWAN. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @param virtualWANName The name of the VirtualWAN being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String virtualWANName) { + 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 (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, virtualWANName, 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); + } + + /** + * Lists all the VirtualWANs in a resource group. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VirtualWANInner> 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 all the VirtualWANs in a resource group. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @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 all the VirtualWANs in a resource group. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualWANInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VirtualWANs in a resource group. + * + * @param resourceGroupName The resource group name of the VirtualWan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualWANInner> 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 all the VirtualWANs in a resource group. + * + ServiceResponse> * @param resourceGroupName The resource group name of the VirtualWan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualWANInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, 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 all the VirtualWANs in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VirtualWANInner> 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 all the VirtualWANs in a subscription. + * + * @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 all the VirtualWANs in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualWANInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VirtualWANs in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualWANInner> 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 all the VirtualWANs in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualWANInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all the VirtualWANs in a resource group. + * + * @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<VirtualWANInner> 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 all the VirtualWANs in a resource group. + * + * @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 all the VirtualWANs in a resource group. + * + * @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<VirtualWANInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VirtualWANs in a resource group. + * + * @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<VirtualWANInner> 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 all the VirtualWANs in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualWANInner> 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 all the VirtualWANs in a subscription. + * + * @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<VirtualWANInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the VirtualWANs in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the VirtualWANs in a subscription. + * + * @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<VirtualWANInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VirtualWANs in a subscription. + * + * @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<VirtualWANInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the VirtualWANs in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualWANInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientConnectionHealthDetailListResultImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientConnectionHealthDetailListResultImpl.java new file mode 100644 index 000000000000..19556160daaa --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientConnectionHealthDetailListResultImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VpnClientConnectionHealthDetailListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.VpnClientConnectionHealthDetail; + +class VpnClientConnectionHealthDetailListResultImpl extends WrapperImpl implements VpnClientConnectionHealthDetailListResult { + private final NetworkManager manager; + VpnClientConnectionHealthDetailListResultImpl(VpnClientConnectionHealthDetailListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientConnectionHealthDetailListResultInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientConnectionHealthDetailListResultInner.java new file mode 100644 index 000000000000..b98cf5e92939 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientConnectionHealthDetailListResultInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.VpnClientConnectionHealthDetail; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of virtual network gateway vpn client connection health. + */ +public class VpnClientConnectionHealthDetailListResultInner { + /** + * List of vpn client connection health. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get list of vpn client connection health. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set list of vpn client connection health. + * + * @param value the value value to set + * @return the VpnClientConnectionHealthDetailListResultInner object itself. + */ + public VpnClientConnectionHealthDetailListResultInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientIPsecParametersImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientIPsecParametersImpl.java new file mode 100644 index 000000000000..9b38184321eb --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientIPsecParametersImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VpnClientIPsecParameters; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.DhGroup; +import com.microsoft.azure.management.network.v2019_09_01.IkeEncryption; +import com.microsoft.azure.management.network.v2019_09_01.IkeIntegrity; +import com.microsoft.azure.management.network.v2019_09_01.IpsecEncryption; +import com.microsoft.azure.management.network.v2019_09_01.IpsecIntegrity; +import com.microsoft.azure.management.network.v2019_09_01.PfsGroup; + +class VpnClientIPsecParametersImpl extends WrapperImpl implements VpnClientIPsecParameters { + private final NetworkManager manager; + VpnClientIPsecParametersImpl(VpnClientIPsecParametersInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public DhGroup dhGroup() { + return this.inner().dhGroup(); + } + + @Override + public IkeEncryption ikeEncryption() { + return this.inner().ikeEncryption(); + } + + @Override + public IkeIntegrity ikeIntegrity() { + return this.inner().ikeIntegrity(); + } + + @Override + public IpsecEncryption ipsecEncryption() { + return this.inner().ipsecEncryption(); + } + + @Override + public IpsecIntegrity ipsecIntegrity() { + return this.inner().ipsecIntegrity(); + } + + @Override + public PfsGroup pfsGroup() { + return this.inner().pfsGroup(); + } + + @Override + public int saDataSizeKilobytes() { + return this.inner().saDataSizeKilobytes(); + } + + @Override + public int saLifeTimeSeconds() { + return this.inner().saLifeTimeSeconds(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientIPsecParametersInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientIPsecParametersInner.java new file mode 100644 index 000000000000..8419209a4116 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnClientIPsecParametersInner.java @@ -0,0 +1,242 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.IpsecEncryption; +import com.microsoft.azure.management.network.v2019_09_01.IpsecIntegrity; +import com.microsoft.azure.management.network.v2019_09_01.IkeEncryption; +import com.microsoft.azure.management.network.v2019_09_01.IkeIntegrity; +import com.microsoft.azure.management.network.v2019_09_01.DhGroup; +import com.microsoft.azure.management.network.v2019_09_01.PfsGroup; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An IPSec parameters for a virtual network gateway P2S connection. + */ +public class VpnClientIPsecParametersInner { + /** + * The IPSec Security Association (also called Quick Mode or Phase 2 SA) + * lifetime in seconds for P2S client. + */ + @JsonProperty(value = "saLifeTimeSeconds", required = true) + private int saLifeTimeSeconds; + + /** + * The IPSec Security Association (also called Quick Mode or Phase 2 SA) + * payload size in KB for P2S client.. + */ + @JsonProperty(value = "saDataSizeKilobytes", required = true) + private int saDataSizeKilobytes; + + /** + * The IPSec encryption algorithm (IKE phase 1). Possible values include: + * 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', + * 'GCMAES192', 'GCMAES256'. + */ + @JsonProperty(value = "ipsecEncryption", required = true) + private IpsecEncryption ipsecEncryption; + + /** + * The IPSec integrity algorithm (IKE phase 1). Possible values include: + * 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + */ + @JsonProperty(value = "ipsecIntegrity", required = true) + private IpsecIntegrity ipsecIntegrity; + + /** + * The IKE encryption algorithm (IKE phase 2). Possible values include: + * 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. + */ + @JsonProperty(value = "ikeEncryption", required = true) + private IkeEncryption ikeEncryption; + + /** + * The IKE integrity algorithm (IKE phase 2). Possible values include: + * 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. + */ + @JsonProperty(value = "ikeIntegrity", required = true) + private IkeIntegrity ikeIntegrity; + + /** + * The DH Group used in IKE Phase 1 for initial SA. Possible values + * include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', + * 'ECP256', 'ECP384', 'DHGroup24'. + */ + @JsonProperty(value = "dhGroup", required = true) + private DhGroup dhGroup; + + /** + * The Pfs Group used in IKE Phase 2 for new child SA. Possible values + * include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', + * 'PFS14', 'PFSMM'. + */ + @JsonProperty(value = "pfsGroup", required = true) + private PfsGroup pfsGroup; + + /** + * Get the IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. + * + * @return the saLifeTimeSeconds value + */ + public int saLifeTimeSeconds() { + return this.saLifeTimeSeconds; + } + + /** + * Set the IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. + * + * @param saLifeTimeSeconds the saLifeTimeSeconds value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withSaLifeTimeSeconds(int saLifeTimeSeconds) { + this.saLifeTimeSeconds = saLifeTimeSeconds; + return this; + } + + /** + * Get the IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. + * + * @return the saDataSizeKilobytes value + */ + public int saDataSizeKilobytes() { + return this.saDataSizeKilobytes; + } + + /** + * Set the IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. + * + * @param saDataSizeKilobytes the saDataSizeKilobytes value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withSaDataSizeKilobytes(int saDataSizeKilobytes) { + this.saDataSizeKilobytes = saDataSizeKilobytes; + return this; + } + + /** + * Get the IPSec encryption algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @return the ipsecEncryption value + */ + public IpsecEncryption ipsecEncryption() { + return this.ipsecEncryption; + } + + /** + * Set the IPSec encryption algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @param ipsecEncryption the ipsecEncryption value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withIpsecEncryption(IpsecEncryption ipsecEncryption) { + this.ipsecEncryption = ipsecEncryption; + return this; + } + + /** + * Get the IPSec integrity algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @return the ipsecIntegrity value + */ + public IpsecIntegrity ipsecIntegrity() { + return this.ipsecIntegrity; + } + + /** + * Set the IPSec integrity algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @param ipsecIntegrity the ipsecIntegrity value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withIpsecIntegrity(IpsecIntegrity ipsecIntegrity) { + this.ipsecIntegrity = ipsecIntegrity; + return this; + } + + /** + * Get the IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. + * + * @return the ikeEncryption value + */ + public IkeEncryption ikeEncryption() { + return this.ikeEncryption; + } + + /** + * Set the IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. + * + * @param ikeEncryption the ikeEncryption value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withIkeEncryption(IkeEncryption ikeEncryption) { + this.ikeEncryption = ikeEncryption; + return this; + } + + /** + * Get the IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. + * + * @return the ikeIntegrity value + */ + public IkeIntegrity ikeIntegrity() { + return this.ikeIntegrity; + } + + /** + * Set the IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. + * + * @param ikeIntegrity the ikeIntegrity value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withIkeIntegrity(IkeIntegrity ikeIntegrity) { + this.ikeIntegrity = ikeIntegrity; + return this; + } + + /** + * Get the DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'. + * + * @return the dhGroup value + */ + public DhGroup dhGroup() { + return this.dhGroup; + } + + /** + * Set the DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'. + * + * @param dhGroup the dhGroup value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withDhGroup(DhGroup dhGroup) { + this.dhGroup = dhGroup; + return this; + } + + /** + * Get the Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM'. + * + * @return the pfsGroup value + */ + public PfsGroup pfsGroup() { + return this.pfsGroup; + } + + /** + * Set the Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM'. + * + * @param pfsGroup the pfsGroup value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withPfsGroup(PfsGroup pfsGroup) { + this.pfsGroup = pfsGroup; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionImpl.java new file mode 100644 index 000000000000..9b4c62de6cf8 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionImpl.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VpnConnection; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.VpnConnectionStatus; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionProtocol; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.IpsecPolicy; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.VpnConnectionVpnGatewayVpnSiteLinkConnection; + +class VpnConnectionImpl extends CreatableUpdatableImpl implements VpnConnection, VpnConnection.Definition, VpnConnection.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String gatewayName; + private String connectionName; + + VpnConnectionImpl(String name, NetworkManager manager) { + super(name, new VpnConnectionInner()); + this.manager = manager; + // Set resource name + this.connectionName = name; + // + } + + VpnConnectionImpl(VpnConnectionInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.connectionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.gatewayName = IdParsingUtils.getValueFromIdByName(inner.id(), "vpnGateways"); + this.connectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "vpnConnections"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + VpnConnectionsInner client = this.manager().inner().vpnConnections(); + return client.createOrUpdateAsync(this.resourceGroupName, this.gatewayName, this.connectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VpnConnectionsInner client = this.manager().inner().vpnConnections(); + return client.createOrUpdateAsync(this.resourceGroupName, this.gatewayName, this.connectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VpnConnectionsInner client = this.manager().inner().vpnConnections(); + return client.getAsync(this.resourceGroupName, this.gatewayName, this.connectionName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Integer connectionBandwidth() { + return this.inner().connectionBandwidth(); + } + + @Override + public VpnConnectionStatus connectionStatus() { + return this.inner().connectionStatus(); + } + + @Override + public Long egressBytesTransferred() { + return this.inner().egressBytesTransferred(); + } + + @Override + public Boolean enableBgp() { + return this.inner().enableBgp(); + } + + @Override + public Boolean enableInternetSecurity() { + return this.inner().enableInternetSecurity(); + } + + @Override + public Boolean enableRateLimiting() { + return this.inner().enableRateLimiting(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Long ingressBytesTransferred() { + return this.inner().ingressBytesTransferred(); + } + + @Override + public List ipsecPolicies() { + return this.inner().ipsecPolicies(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public SubResource remoteVpnSite() { + return this.inner().remoteVpnSite(); + } + + @Override + public Integer routingWeight() { + return this.inner().routingWeight(); + } + + @Override + public String sharedKey() { + return this.inner().sharedKey(); + } + + @Override + public Boolean useLocalAzureIpAddress() { + return this.inner().useLocalAzureIpAddress(); + } + + @Override + public Boolean usePolicyBasedTrafficSelectors() { + return this.inner().usePolicyBasedTrafficSelectors(); + } + + @Override + public VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType() { + return this.inner().vpnConnectionProtocolType(); + } + + @Override + public List vpnLinkConnections() { + List lst = new ArrayList(); + if (this.inner().vpnLinkConnections() != null) { + for (VpnSiteLinkConnectionInner inner : this.inner().vpnLinkConnections()) { + lst.add( new VpnConnectionVpnGatewayVpnSiteLinkConnectionImpl(inner, manager())); + } + } + return lst; + } + + @Override + public VpnConnectionImpl withExistingVpnGateway(String resourceGroupName, String gatewayName) { + this.resourceGroupName = resourceGroupName; + this.gatewayName = gatewayName; + return this; + } + + @Override + public VpnConnectionImpl withConnectionBandwidth(Integer connectionBandwidth) { + this.inner().withConnectionBandwidth(connectionBandwidth); + return this; + } + + @Override + public VpnConnectionImpl withConnectionStatus(VpnConnectionStatus connectionStatus) { + this.inner().withConnectionStatus(connectionStatus); + return this; + } + + @Override + public VpnConnectionImpl withEnableBgp(Boolean enableBgp) { + this.inner().withEnableBgp(enableBgp); + return this; + } + + @Override + public VpnConnectionImpl withEnableInternetSecurity(Boolean enableInternetSecurity) { + this.inner().withEnableInternetSecurity(enableInternetSecurity); + return this; + } + + @Override + public VpnConnectionImpl withEnableRateLimiting(Boolean enableRateLimiting) { + this.inner().withEnableRateLimiting(enableRateLimiting); + return this; + } + + @Override + public VpnConnectionImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public VpnConnectionImpl withIpsecPolicies(List ipsecPolicies) { + this.inner().withIpsecPolicies(ipsecPolicies); + return this; + } + + @Override + public VpnConnectionImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public VpnConnectionImpl withRemoteVpnSite(SubResource remoteVpnSite) { + this.inner().withRemoteVpnSite(remoteVpnSite); + return this; + } + + @Override + public VpnConnectionImpl withRoutingWeight(Integer routingWeight) { + this.inner().withRoutingWeight(routingWeight); + return this; + } + + @Override + public VpnConnectionImpl withSharedKey(String sharedKey) { + this.inner().withSharedKey(sharedKey); + return this; + } + + @Override + public VpnConnectionImpl withUseLocalAzureIpAddress(Boolean useLocalAzureIpAddress) { + this.inner().withUseLocalAzureIpAddress(useLocalAzureIpAddress); + return this; + } + + @Override + public VpnConnectionImpl withUsePolicyBasedTrafficSelectors(Boolean usePolicyBasedTrafficSelectors) { + this.inner().withUsePolicyBasedTrafficSelectors(usePolicyBasedTrafficSelectors); + return this; + } + + @Override + public VpnConnectionImpl withVpnConnectionProtocolType(VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType) { + this.inner().withVpnConnectionProtocolType(vpnConnectionProtocolType); + return this; + } + + @Override + public VpnConnectionImpl withVpnLinkConnections(List vpnLinkConnections) { + this.inner().withVpnLinkConnections(vpnLinkConnections); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionInner.java new file mode 100644 index 000000000000..d916109b3a9b --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionInner.java @@ -0,0 +1,453 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.VpnConnectionStatus; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionProtocol; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.IpsecPolicy; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * VpnConnection Resource. + */ +@JsonFlatten +public class VpnConnectionInner extends SubResource { + /** + * Id of the connected vpn site. + */ + @JsonProperty(value = "properties.remoteVpnSite") + private SubResource remoteVpnSite; + + /** + * Routing weight for vpn connection. + */ + @JsonProperty(value = "properties.routingWeight") + private Integer routingWeight; + + /** + * The connection status. Possible values include: 'Unknown', 'Connecting', + * 'Connected', 'NotConnected'. + */ + @JsonProperty(value = "properties.connectionStatus") + private VpnConnectionStatus connectionStatus; + + /** + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1'. + */ + @JsonProperty(value = "properties.vpnConnectionProtocolType") + private VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType; + + /** + * Ingress bytes transferred. + */ + @JsonProperty(value = "properties.ingressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long ingressBytesTransferred; + + /** + * Egress bytes transferred. + */ + @JsonProperty(value = "properties.egressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long egressBytesTransferred; + + /** + * Expected bandwidth in MBPS. + */ + @JsonProperty(value = "properties.connectionBandwidth") + private Integer connectionBandwidth; + + /** + * SharedKey for the vpn connection. + */ + @JsonProperty(value = "properties.sharedKey") + private String sharedKey; + + /** + * EnableBgp flag. + */ + @JsonProperty(value = "properties.enableBgp") + private Boolean enableBgp; + + /** + * Enable policy-based traffic selectors. + */ + @JsonProperty(value = "properties.usePolicyBasedTrafficSelectors") + private Boolean usePolicyBasedTrafficSelectors; + + /** + * The IPSec Policies to be considered by this connection. + */ + @JsonProperty(value = "properties.ipsecPolicies") + private List ipsecPolicies; + + /** + * EnableBgp flag. + */ + @JsonProperty(value = "properties.enableRateLimiting") + private Boolean enableRateLimiting; + + /** + * Enable internet security. + */ + @JsonProperty(value = "properties.enableInternetSecurity") + private Boolean enableInternetSecurity; + + /** + * Use local azure ip to initiate connection. + */ + @JsonProperty(value = "properties.useLocalAzureIpAddress") + private Boolean useLocalAzureIpAddress; + + /** + * The provisioning state of the VPN connection resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * List of all vpn site link connections to the gateway. + */ + @JsonProperty(value = "properties.vpnLinkConnections") + private List vpnLinkConnections; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get id of the connected vpn site. + * + * @return the remoteVpnSite value + */ + public SubResource remoteVpnSite() { + return this.remoteVpnSite; + } + + /** + * Set id of the connected vpn site. + * + * @param remoteVpnSite the remoteVpnSite value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withRemoteVpnSite(SubResource remoteVpnSite) { + this.remoteVpnSite = remoteVpnSite; + return this; + } + + /** + * Get routing weight for vpn connection. + * + * @return the routingWeight value + */ + public Integer routingWeight() { + return this.routingWeight; + } + + /** + * Set routing weight for vpn connection. + * + * @param routingWeight the routingWeight value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withRoutingWeight(Integer routingWeight) { + this.routingWeight = routingWeight; + return this; + } + + /** + * Get the connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'. + * + * @return the connectionStatus value + */ + public VpnConnectionStatus connectionStatus() { + return this.connectionStatus; + } + + /** + * Set the connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'. + * + * @param connectionStatus the connectionStatus value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withConnectionStatus(VpnConnectionStatus connectionStatus) { + this.connectionStatus = connectionStatus; + return this; + } + + /** + * Get connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'. + * + * @return the vpnConnectionProtocolType value + */ + public VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType() { + return this.vpnConnectionProtocolType; + } + + /** + * Set connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'. + * + * @param vpnConnectionProtocolType the vpnConnectionProtocolType value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withVpnConnectionProtocolType(VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType) { + this.vpnConnectionProtocolType = vpnConnectionProtocolType; + return this; + } + + /** + * Get ingress bytes transferred. + * + * @return the ingressBytesTransferred value + */ + public Long ingressBytesTransferred() { + return this.ingressBytesTransferred; + } + + /** + * Get egress bytes transferred. + * + * @return the egressBytesTransferred value + */ + public Long egressBytesTransferred() { + return this.egressBytesTransferred; + } + + /** + * Get expected bandwidth in MBPS. + * + * @return the connectionBandwidth value + */ + public Integer connectionBandwidth() { + return this.connectionBandwidth; + } + + /** + * Set expected bandwidth in MBPS. + * + * @param connectionBandwidth the connectionBandwidth value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withConnectionBandwidth(Integer connectionBandwidth) { + this.connectionBandwidth = connectionBandwidth; + return this; + } + + /** + * Get sharedKey for the vpn connection. + * + * @return the sharedKey value + */ + public String sharedKey() { + return this.sharedKey; + } + + /** + * Set sharedKey for the vpn connection. + * + * @param sharedKey the sharedKey value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withSharedKey(String sharedKey) { + this.sharedKey = sharedKey; + return this; + } + + /** + * Get enableBgp flag. + * + * @return the enableBgp value + */ + public Boolean enableBgp() { + return this.enableBgp; + } + + /** + * Set enableBgp flag. + * + * @param enableBgp the enableBgp value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withEnableBgp(Boolean enableBgp) { + this.enableBgp = enableBgp; + return this; + } + + /** + * Get enable policy-based traffic selectors. + * + * @return the usePolicyBasedTrafficSelectors value + */ + public Boolean usePolicyBasedTrafficSelectors() { + return this.usePolicyBasedTrafficSelectors; + } + + /** + * Set enable policy-based traffic selectors. + * + * @param usePolicyBasedTrafficSelectors the usePolicyBasedTrafficSelectors value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withUsePolicyBasedTrafficSelectors(Boolean usePolicyBasedTrafficSelectors) { + this.usePolicyBasedTrafficSelectors = usePolicyBasedTrafficSelectors; + return this; + } + + /** + * Get the IPSec Policies to be considered by this connection. + * + * @return the ipsecPolicies value + */ + public List ipsecPolicies() { + return this.ipsecPolicies; + } + + /** + * Set the IPSec Policies to be considered by this connection. + * + * @param ipsecPolicies the ipsecPolicies value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withIpsecPolicies(List ipsecPolicies) { + this.ipsecPolicies = ipsecPolicies; + return this; + } + + /** + * Get enableBgp flag. + * + * @return the enableRateLimiting value + */ + public Boolean enableRateLimiting() { + return this.enableRateLimiting; + } + + /** + * Set enableBgp flag. + * + * @param enableRateLimiting the enableRateLimiting value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withEnableRateLimiting(Boolean enableRateLimiting) { + this.enableRateLimiting = enableRateLimiting; + return this; + } + + /** + * Get enable internet security. + * + * @return the enableInternetSecurity value + */ + public Boolean enableInternetSecurity() { + return this.enableInternetSecurity; + } + + /** + * Set enable internet security. + * + * @param enableInternetSecurity the enableInternetSecurity value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withEnableInternetSecurity(Boolean enableInternetSecurity) { + this.enableInternetSecurity = enableInternetSecurity; + return this; + } + + /** + * Get use local azure ip to initiate connection. + * + * @return the useLocalAzureIpAddress value + */ + public Boolean useLocalAzureIpAddress() { + return this.useLocalAzureIpAddress; + } + + /** + * Set use local azure ip to initiate connection. + * + * @param useLocalAzureIpAddress the useLocalAzureIpAddress value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withUseLocalAzureIpAddress(Boolean useLocalAzureIpAddress) { + this.useLocalAzureIpAddress = useLocalAzureIpAddress; + return this; + } + + /** + * Get the provisioning state of the VPN connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get list of all vpn site link connections to the gateway. + * + * @return the vpnLinkConnections value + */ + public List vpnLinkConnections() { + return this.vpnLinkConnections; + } + + /** + * Set list of all vpn site link connections to the gateway. + * + * @param vpnLinkConnections the vpnLinkConnections value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withVpnLinkConnections(List vpnLinkConnections) { + this.vpnLinkConnections = vpnLinkConnections; + return this; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the VpnConnectionInner object itself. + */ + public VpnConnectionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionVpnGatewayVpnSiteLinkConnectionImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionVpnGatewayVpnSiteLinkConnectionImpl.java new file mode 100644 index 000000000000..40de7ee868c2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionVpnGatewayVpnSiteLinkConnectionImpl.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VpnConnectionVpnGatewayVpnSiteLinkConnection; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.VpnConnectionStatus; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.IpsecPolicy; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionProtocol; +import com.microsoft.azure.SubResource; + +class VpnConnectionVpnGatewayVpnSiteLinkConnectionImpl extends IndexableRefreshableWrapperImpl implements VpnConnectionVpnGatewayVpnSiteLinkConnection { + private final NetworkManager manager; + private String resourceGroupName; + private String gatewayName; + private String connectionName; + private String linkConnectionName; + + VpnConnectionVpnGatewayVpnSiteLinkConnectionImpl(VpnSiteLinkConnectionInner inner, NetworkManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.gatewayName = IdParsingUtils.getValueFromIdByName(inner.id(), "vpnGateways"); + this.connectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "vpnConnections"); + this.linkConnectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "vpnLinkConnections"); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + VpnSiteLinkConnectionsInner client = this.manager().inner().vpnSiteLinkConnections(); + return client.getAsync(this.resourceGroupName, this.gatewayName, this.connectionName, this.linkConnectionName); + } + + + + @Override + public Integer connectionBandwidth() { + return this.inner().connectionBandwidth(); + } + + @Override + public VpnConnectionStatus connectionStatus() { + return this.inner().connectionStatus(); + } + + @Override + public Long egressBytesTransferred() { + return this.inner().egressBytesTransferred(); + } + + @Override + public Boolean enableBgp() { + return this.inner().enableBgp(); + } + + @Override + public Boolean enableRateLimiting() { + return this.inner().enableRateLimiting(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Long ingressBytesTransferred() { + return this.inner().ingressBytesTransferred(); + } + + @Override + public List ipsecPolicies() { + return this.inner().ipsecPolicies(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Integer routingWeight() { + return this.inner().routingWeight(); + } + + @Override + public String sharedKey() { + return this.inner().sharedKey(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public Boolean useLocalAzureIpAddress() { + return this.inner().useLocalAzureIpAddress(); + } + + @Override + public Boolean usePolicyBasedTrafficSelectors() { + return this.inner().usePolicyBasedTrafficSelectors(); + } + + @Override + public VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType() { + return this.inner().vpnConnectionProtocolType(); + } + + @Override + public SubResource vpnSiteLink() { + return this.inner().vpnSiteLink(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionVpnGatewayVpnSiteLinkConnectionModelImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionVpnGatewayVpnSiteLinkConnectionModelImpl.java new file mode 100644 index 000000000000..9233d8a8c278 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionVpnGatewayVpnSiteLinkConnectionModelImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VpnConnectionVpnGatewayVpnSiteLinkConnectionModel; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.VpnConnectionStatus; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.IpsecPolicy; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionProtocol; +import com.microsoft.azure.SubResource; + +class VpnConnectionVpnGatewayVpnSiteLinkConnectionModelImpl extends WrapperImpl implements VpnConnectionVpnGatewayVpnSiteLinkConnectionModel { + private final NetworkManager manager; + + VpnConnectionVpnGatewayVpnSiteLinkConnectionModelImpl(VpnSiteLinkConnectionInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public Integer connectionBandwidth() { + return this.inner().connectionBandwidth(); + } + + @Override + public VpnConnectionStatus connectionStatus() { + return this.inner().connectionStatus(); + } + + @Override + public Long egressBytesTransferred() { + return this.inner().egressBytesTransferred(); + } + + @Override + public Boolean enableBgp() { + return this.inner().enableBgp(); + } + + @Override + public Boolean enableRateLimiting() { + return this.inner().enableRateLimiting(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Long ingressBytesTransferred() { + return this.inner().ingressBytesTransferred(); + } + + @Override + public List ipsecPolicies() { + return this.inner().ipsecPolicies(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Integer routingWeight() { + return this.inner().routingWeight(); + } + + @Override + public String sharedKey() { + return this.inner().sharedKey(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public Boolean useLocalAzureIpAddress() { + return this.inner().useLocalAzureIpAddress(); + } + + @Override + public Boolean usePolicyBasedTrafficSelectors() { + return this.inner().usePolicyBasedTrafficSelectors(); + } + + @Override + public VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType() { + return this.inner().vpnConnectionProtocolType(); + } + + @Override + public SubResource vpnSiteLink() { + return this.inner().vpnSiteLink(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionsImpl.java new file mode 100644 index 000000000000..5908a54e66d3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.VpnConnections; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.VpnConnection; + +class VpnConnectionsImpl extends WrapperImpl implements VpnConnections { + private final NetworkManager manager; + + VpnConnectionsImpl(NetworkManager manager) { + super(manager.inner().vpnConnections()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public VpnConnectionImpl define(String name) { + return wrapModel(name); + } + + private VpnConnectionImpl wrapModel(VpnConnectionInner inner) { + return new VpnConnectionImpl(inner, manager()); + } + + private VpnConnectionImpl wrapModel(String name) { + return new VpnConnectionImpl(name, this.manager()); + } + + @Override + public Observable listByVpnGatewayAsync(final String resourceGroupName, final String gatewayName) { + VpnConnectionsInner client = this.inner(); + return client.listByVpnGatewayAsync(resourceGroupName, gatewayName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VpnConnection call(VpnConnectionInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String gatewayName, String connectionName) { + VpnConnectionsInner client = this.inner(); + return client.getAsync(resourceGroupName, gatewayName, connectionName) + .flatMap(new Func1>() { + @Override + public Observable call(VpnConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((VpnConnection)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String gatewayName, String connectionName) { + VpnConnectionsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, gatewayName, connectionName).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionsInner.java new file mode 100644 index 000000000000..d154272279e5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnConnectionsInner.java @@ -0,0 +1,764 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 VpnConnections. + */ +public class VpnConnectionsInner { + /** The Retrofit service to perform REST calls. */ + private VpnConnectionsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VpnConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VpnConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VpnConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for VpnConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface VpnConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VpnConnections get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Path("connectionName") String connectionName, @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.network.v2019_09_01.VpnConnections createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Path("connectionName") String connectionName, @Query("api-version") String apiVersion, @Body VpnConnectionInner vpnConnectionParameters, @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.network.v2019_09_01.VpnConnections beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Path("connectionName") String connectionName, @Query("api-version") String apiVersion, @Body VpnConnectionInner vpnConnectionParameters, @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.network.v2019_09_01.VpnConnections delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Path("connectionName") String connectionName, @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.network.v2019_09_01.VpnConnections beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Path("connectionName") String connectionName, @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.network.v2019_09_01.VpnConnections listByVpnGateway" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections") + Observable> listByVpnGateway(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @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.network.v2019_09_01.VpnConnections listByVpnGatewayNext" }) + @GET + Observable> listByVpnGatewayNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves the details of a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnConnectionInner object if successful. + */ + public VpnConnectionInner get(String resourceGroupName, String gatewayName, String connectionName) { + return getWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName).toBlocking().single().body(); + } + + /** + * Retrieves the details of a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @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 gatewayName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName), serviceCallback); + } + + /** + * Retrieves the details of a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnConnectionInner object + */ + public Observable getAsync(String resourceGroupName, String gatewayName, String connectionName) { + return getWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName).map(new Func1, VpnConnectionInner>() { + @Override + public VpnConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnConnectionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String gatewayName, String connectionName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(this.client.subscriptionId(), resourceGroupName, gatewayName, connectionName, 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); + } + + /** + * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @param vpnConnectionParameters Parameters supplied to create or Update a VPN Connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnConnectionInner object if successful. + */ + public VpnConnectionInner createOrUpdate(String resourceGroupName, String gatewayName, String connectionName, VpnConnectionInner vpnConnectionParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters).toBlocking().last().body(); + } + + /** + * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @param vpnConnectionParameters Parameters supplied to create or Update a VPN Connection. + * @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 gatewayName, String connectionName, VpnConnectionInner vpnConnectionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters), serviceCallback); + } + + /** + * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @param vpnConnectionParameters Parameters supplied to create or Update a VPN Connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String gatewayName, String connectionName, VpnConnectionInner vpnConnectionParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters).map(new Func1, VpnConnectionInner>() { + @Override + public VpnConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @param vpnConnectionParameters Parameters supplied to create or Update a VPN Connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String gatewayName, String connectionName, VpnConnectionInner vpnConnectionParameters) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (vpnConnectionParameters == null) { + throw new IllegalArgumentException("Parameter vpnConnectionParameters is required and cannot be null."); + } + Validator.validate(vpnConnectionParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, gatewayName, connectionName, apiVersion, vpnConnectionParameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @param vpnConnectionParameters Parameters supplied to create or Update a VPN Connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnConnectionInner object if successful. + */ + public VpnConnectionInner beginCreateOrUpdate(String resourceGroupName, String gatewayName, String connectionName, VpnConnectionInner vpnConnectionParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters).toBlocking().single().body(); + } + + /** + * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @param vpnConnectionParameters Parameters supplied to create or Update a VPN Connection. + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String gatewayName, String connectionName, VpnConnectionInner vpnConnectionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters), serviceCallback); + } + + /** + * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @param vpnConnectionParameters Parameters supplied to create or Update a VPN Connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnConnectionInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String gatewayName, String connectionName, VpnConnectionInner vpnConnectionParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters).map(new Func1, VpnConnectionInner>() { + @Override + public VpnConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @param vpnConnectionParameters Parameters supplied to create or Update a VPN Connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnConnectionInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String gatewayName, String connectionName, VpnConnectionInner vpnConnectionParameters) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (vpnConnectionParameters == null) { + throw new IllegalArgumentException("Parameter vpnConnectionParameters is required and cannot be null."); + } + Validator.validate(vpnConnectionParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, gatewayName, connectionName, apiVersion, vpnConnectionParameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 gatewayName, String connectionName) { + deleteWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName).toBlocking().last().body(); + } + + /** + * Deletes a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @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 gatewayName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName), serviceCallback); + } + + /** + * Deletes a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String gatewayName, String connectionName) { + return deleteWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String gatewayName, String connectionName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, gatewayName, connectionName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 gatewayName, String connectionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName).toBlocking().single().body(); + } + + /** + * Deletes a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @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 gatewayName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName), serviceCallback); + } + + /** + * Deletes a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String gatewayName, String connectionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String gatewayName, String connectionName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, gatewayName, connectionName, 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); + } + + /** + * Retrieves all vpn connections for a particular virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VpnConnectionInner> object if successful. + */ + public PagedList listByVpnGateway(final String resourceGroupName, final String gatewayName) { + ServiceResponse> response = listByVpnGatewaySinglePageAsync(resourceGroupName, gatewayName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByVpnGatewayNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves all vpn connections for a particular virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @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> listByVpnGatewayAsync(final String resourceGroupName, final String gatewayName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByVpnGatewaySinglePageAsync(resourceGroupName, gatewayName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByVpnGatewayNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves all vpn connections for a particular virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnConnectionInner> object + */ + public Observable> listByVpnGatewayAsync(final String resourceGroupName, final String gatewayName) { + return listByVpnGatewayWithServiceResponseAsync(resourceGroupName, gatewayName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all vpn connections for a particular virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnConnectionInner> object + */ + public Observable>> listByVpnGatewayWithServiceResponseAsync(final String resourceGroupName, final String gatewayName) { + return listByVpnGatewaySinglePageAsync(resourceGroupName, gatewayName) + .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(listByVpnGatewayNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves all vpn connections for a particular virtual wan vpn gateway. + * + ServiceResponse> * @param resourceGroupName The resource group name of the VpnGateway. + ServiceResponse> * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByVpnGatewaySinglePageAsync(final String resourceGroupName, final String gatewayName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listByVpnGateway(this.client.subscriptionId(), resourceGroupName, gatewayName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByVpnGatewayDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByVpnGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves all vpn connections for a particular virtual wan vpn gateway. + * + * @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<VpnConnectionInner> object if successful. + */ + public PagedList listByVpnGatewayNext(final String nextPageLink) { + ServiceResponse> response = listByVpnGatewayNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByVpnGatewayNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves all vpn connections for a particular virtual wan vpn gateway. + * + * @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> listByVpnGatewayNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByVpnGatewayNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByVpnGatewayNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves all vpn connections for a particular virtual wan vpn gateway. + * + * @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<VpnConnectionInner> object + */ + public Observable> listByVpnGatewayNextAsync(final String nextPageLink) { + return listByVpnGatewayNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all vpn connections for a particular virtual wan vpn gateway. + * + * @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<VpnConnectionInner> object + */ + public Observable>> listByVpnGatewayNextWithServiceResponseAsync(final String nextPageLink) { + return listByVpnGatewayNextSinglePageAsync(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(listByVpnGatewayNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves all vpn connections for a particular virtual wan vpn gateway. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByVpnGatewayNextSinglePageAsync(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.listByVpnGatewayNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByVpnGatewayNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByVpnGatewayNextDelegate(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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewayImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewayImpl.java new file mode 100644 index 000000000000..a291f2f52a8e --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewayImpl.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VpnGateway; +import rx.Observable; +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.BgpSettings; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.VpnConnection; + +class VpnGatewayImpl extends GroupableResourceCoreImpl implements VpnGateway, VpnGateway.Definition, VpnGateway.Update { + VpnGatewayImpl(String name, VpnGatewayInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + VpnGatewaysInner client = this.manager().inner().vpnGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VpnGatewaysInner client = this.manager().inner().vpnGateways(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VpnGatewaysInner client = this.manager().inner().vpnGateways(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public BgpSettings bgpSettings() { + return this.inner().bgpSettings(); + } + + @Override + public List connections() { + List lst = new ArrayList(); + if (this.inner().connections() != null) { + for (VpnConnectionInner inner : this.inner().connections()) { + lst.add( new VpnConnectionImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public SubResource virtualHub() { + return this.inner().virtualHub(); + } + + @Override + public Integer vpnGatewayScaleUnit() { + return this.inner().vpnGatewayScaleUnit(); + } + + @Override + public VpnGatewayImpl withBgpSettings(BgpSettings bgpSettings) { + this.inner().withBgpSettings(bgpSettings); + return this; + } + + @Override + public VpnGatewayImpl withConnections(List connections) { + this.inner().withConnections(connections); + return this; + } + + @Override + public VpnGatewayImpl withVirtualHub(SubResource virtualHub) { + this.inner().withVirtualHub(virtualHub); + return this; + } + + @Override + public VpnGatewayImpl withVpnGatewayScaleUnit(Integer vpnGatewayScaleUnit) { + this.inner().withVpnGatewayScaleUnit(vpnGatewayScaleUnit); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewayInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewayInner.java new file mode 100644 index 000000000000..1b6863f79f60 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewayInner.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.SubResource; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.BgpSettings; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * VpnGateway Resource. + */ +@JsonFlatten +@SkipParentValidation +public class VpnGatewayInner extends Resource { + /** + * The VirtualHub to which the gateway belongs. + */ + @JsonProperty(value = "properties.virtualHub") + private SubResource virtualHub; + + /** + * List of all vpn connections to the gateway. + */ + @JsonProperty(value = "properties.connections") + private List connections; + + /** + * Local network gateway's BGP speaker settings. + */ + @JsonProperty(value = "properties.bgpSettings") + private BgpSettings bgpSettings; + + /** + * The provisioning state of the VPN gateway resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The scale unit for this vpn gateway. + */ + @JsonProperty(value = "properties.vpnGatewayScaleUnit") + private Integer vpnGatewayScaleUnit; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the VirtualHub to which the gateway belongs. + * + * @return the virtualHub value + */ + public SubResource virtualHub() { + return this.virtualHub; + } + + /** + * Set the VirtualHub to which the gateway belongs. + * + * @param virtualHub the virtualHub value to set + * @return the VpnGatewayInner object itself. + */ + public VpnGatewayInner withVirtualHub(SubResource virtualHub) { + this.virtualHub = virtualHub; + return this; + } + + /** + * Get list of all vpn connections to the gateway. + * + * @return the connections value + */ + public List connections() { + return this.connections; + } + + /** + * Set list of all vpn connections to the gateway. + * + * @param connections the connections value to set + * @return the VpnGatewayInner object itself. + */ + public VpnGatewayInner withConnections(List connections) { + this.connections = connections; + return this; + } + + /** + * Get local network gateway's BGP speaker settings. + * + * @return the bgpSettings value + */ + public BgpSettings bgpSettings() { + return this.bgpSettings; + } + + /** + * Set local network gateway's BGP speaker settings. + * + * @param bgpSettings the bgpSettings value to set + * @return the VpnGatewayInner object itself. + */ + public VpnGatewayInner withBgpSettings(BgpSettings bgpSettings) { + this.bgpSettings = bgpSettings; + return this; + } + + /** + * Get the provisioning state of the VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the scale unit for this vpn gateway. + * + * @return the vpnGatewayScaleUnit value + */ + public Integer vpnGatewayScaleUnit() { + return this.vpnGatewayScaleUnit; + } + + /** + * Set the scale unit for this vpn gateway. + * + * @param vpnGatewayScaleUnit the vpnGatewayScaleUnit value to set + * @return the VpnGatewayInner object itself. + */ + public VpnGatewayInner withVpnGatewayScaleUnit(Integer vpnGatewayScaleUnit) { + this.vpnGatewayScaleUnit = vpnGatewayScaleUnit; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the VpnGatewayInner object itself. + */ + public VpnGatewayInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewaysImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewaysImpl.java new file mode 100644 index 000000000000..29c254934d6d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewaysImpl.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VpnGateways; +import com.microsoft.azure.management.network.v2019_09_01.VpnGateway; +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; + +class VpnGatewaysImpl extends GroupableResourcesCoreImpl implements VpnGateways { + protected VpnGatewaysImpl(NetworkManager manager) { + super(manager.inner().vpnGateways(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + VpnGatewaysInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + VpnGatewaysInner 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) { + VpnGatewaysInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + VpnGatewaysInner 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 VpnGateway call(VpnGatewayInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + VpnGatewaysInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + VpnGatewaysInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VpnGateway call(VpnGatewayInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public VpnGatewayImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable resetAsync(String resourceGroupName, String gatewayName) { + VpnGatewaysInner client = this.inner(); + return client.resetAsync(resourceGroupName, gatewayName) + .map(new Func1() { + @Override + public VpnGateway call(VpnGatewayInner inner) { + return new VpnGatewayImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + protected VpnGatewayImpl wrapModel(VpnGatewayInner inner) { + return new VpnGatewayImpl(inner.name(), inner, manager()); + } + + @Override + protected VpnGatewayImpl wrapModel(String name) { + return new VpnGatewayImpl(name, new VpnGatewayInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewaysInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewaysInner.java new file mode 100644 index 000000000000..069f98868085 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnGatewaysInner.java @@ -0,0 +1,1291 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in VpnGateways. + */ +public class VpnGatewaysInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private VpnGatewaysService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VpnGatewaysInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VpnGatewaysInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VpnGatewaysService.class); + this.client = client; + } + + /** + * The interface defining all the services for VpnGateways to be + * used by Retrofit to perform actually REST calls. + */ + interface VpnGatewaysService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VpnGateways getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @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.network.v2019_09_01.VpnGateways createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Query("api-version") String apiVersion, @Body VpnGatewayInner vpnGatewayParameters, @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.network.v2019_09_01.VpnGateways beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Query("api-version") String apiVersion, @Body VpnGatewayInner vpnGatewayParameters, @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.network.v2019_09_01.VpnGateways updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}") + Observable> updateTags(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject vpnGatewayParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VpnGateways delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @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.network.v2019_09_01.VpnGateways beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @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.network.v2019_09_01.VpnGateways reset" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset") + Observable> reset(@Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @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.network.v2019_09_01.VpnGateways beginReset" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset") + Observable> beginReset(@Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @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.network.v2019_09_01.VpnGateways listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.VpnGateways list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways") + Observable> list(@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.network.v2019_09_01.VpnGateways 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.network.v2019_09_01.VpnGateways listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves the details of a virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnGatewayInner object if successful. + */ + public VpnGatewayInner getByResourceGroup(String resourceGroupName, String gatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().single().body(); + } + + /** + * Retrieves the details of a virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @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 gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Retrieves the details of a virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnGatewayInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String gatewayName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, VpnGatewayInner>() { + @Override + public VpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of a virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnGatewayInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, gatewayName, 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); + } + + /** + * Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnGatewayInner object if successful. + */ + public VpnGatewayInner createOrUpdate(String resourceGroupName, String gatewayName, VpnGatewayInner vpnGatewayParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, vpnGatewayParameters).toBlocking().last().body(); + } + + /** + * Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. + * @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 gatewayName, VpnGatewayInner vpnGatewayParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, vpnGatewayParameters), serviceCallback); + } + + /** + * Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String gatewayName, VpnGatewayInner vpnGatewayParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, vpnGatewayParameters).map(new Func1, VpnGatewayInner>() { + @Override + public VpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String gatewayName, VpnGatewayInner vpnGatewayParameters) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (vpnGatewayParameters == null) { + throw new IllegalArgumentException("Parameter vpnGatewayParameters is required and cannot be null."); + } + Validator.validate(vpnGatewayParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, gatewayName, apiVersion, vpnGatewayParameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnGatewayInner object if successful. + */ + public VpnGatewayInner beginCreateOrUpdate(String resourceGroupName, String gatewayName, VpnGatewayInner vpnGatewayParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, vpnGatewayParameters).toBlocking().single().body(); + } + + /** + * Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String gatewayName, VpnGatewayInner vpnGatewayParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, vpnGatewayParameters), serviceCallback); + } + + /** + * Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnGatewayInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String gatewayName, VpnGatewayInner vpnGatewayParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, vpnGatewayParameters).map(new Func1, VpnGatewayInner>() { + @Override + public VpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnGatewayInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String gatewayName, VpnGatewayInner vpnGatewayParameters) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (vpnGatewayParameters == null) { + throw new IllegalArgumentException("Parameter vpnGatewayParameters is required and cannot be null."); + } + Validator.validate(vpnGatewayParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, gatewayName, apiVersion, vpnGatewayParameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 virtual wan vpn gateway tags. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnGatewayInner object if successful. + */ + public VpnGatewayInner updateTags(String resourceGroupName, String gatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().single().body(); + } + + /** + * Updates virtual wan vpn gateway tags. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @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 updateTagsAsync(String resourceGroupName, String gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Updates virtual wan vpn gateway tags. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnGatewayInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String gatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, VpnGatewayInner>() { + @Override + public VpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates virtual wan vpn gateway tags. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnGatewayInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject vpnGatewayParameters = new TagsObject(); + vpnGatewayParameters.withTags(null); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, gatewayName, apiVersion, this.client.acceptLanguage(), vpnGatewayParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates virtual wan vpn gateway tags. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnGatewayInner object if successful. + */ + public VpnGatewayInner updateTags(String resourceGroupName, String gatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, gatewayName, tags).toBlocking().single().body(); + } + + /** + * Updates virtual wan vpn gateway tags. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String gatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, gatewayName, tags), serviceCallback); + } + + /** + * Updates virtual wan vpn gateway tags. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnGatewayInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String gatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, gatewayName, tags).map(new Func1, VpnGatewayInner>() { + @Override + public VpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates virtual wan vpn gateway tags. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnGatewayInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String gatewayName, Map tags) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject vpnGatewayParameters = new TagsObject(); + vpnGatewayParameters.withTags(tags); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, gatewayName, apiVersion, this.client.acceptLanguage(), vpnGatewayParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 a virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 gatewayName) { + deleteWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().last().body(); + } + + /** + * Deletes a virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @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 gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Deletes a virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String gatewayName) { + return deleteWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, gatewayName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 gatewayName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().single().body(); + } + + /** + * Deletes a virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @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 gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Deletes a virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String gatewayName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a virtual wan vpn gateway. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, gatewayName, 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); + } + + /** + * Resets the primary of the vpn gateway in the specified resource group. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnGatewayInner object if successful. + */ + public VpnGatewayInner reset(String resourceGroupName, String gatewayName) { + return resetWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().last().body(); + } + + /** + * Resets the primary of the vpn gateway in the specified resource group. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @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 resetAsync(String resourceGroupName, String gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Resets the primary of the vpn gateway in the specified resource group. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable resetAsync(String resourceGroupName, String gatewayName) { + return resetWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, VpnGatewayInner>() { + @Override + public VpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets the primary of the vpn gateway in the specified resource group. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> resetWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.reset(resourceGroupName, gatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Resets the primary of the vpn gateway in the specified resource group. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnGatewayInner object if successful. + */ + public VpnGatewayInner beginReset(String resourceGroupName, String gatewayName) { + return beginResetWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().single().body(); + } + + /** + * Resets the primary of the vpn gateway in the specified resource group. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @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 beginResetAsync(String resourceGroupName, String gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginResetWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); + } + + /** + * Resets the primary of the vpn gateway in the specified resource group. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnGatewayInner object + */ + public Observable beginResetAsync(String resourceGroupName, String gatewayName) { + return beginResetWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1, VpnGatewayInner>() { + @Override + public VpnGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets the primary of the vpn gateway in the specified resource group. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnGatewayInner object + */ + public Observable> beginResetWithServiceResponseAsync(String resourceGroupName, String gatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginReset(resourceGroupName, gatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginResetDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginResetDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all the VpnGateways in a resource group. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VpnGatewayInner> 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 all the VpnGateways in a resource group. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @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 all the VpnGateways in a resource group. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnGatewayInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VpnGateways in a resource group. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnGatewayInner> 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 all the VpnGateways in a resource group. + * + ServiceResponse> * @param resourceGroupName The resource group name of the VpnGateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnGatewayInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, 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 all the VpnGateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VpnGatewayInner> 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 all the VpnGateways in a subscription. + * + * @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 all the VpnGateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnGatewayInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VpnGateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnGatewayInner> 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 all the VpnGateways in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnGatewayInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all the VpnGateways in a resource group. + * + * @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<VpnGatewayInner> 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 all the VpnGateways in a resource group. + * + * @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 all the VpnGateways in a resource group. + * + * @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<VpnGatewayInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VpnGateways in a resource group. + * + * @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<VpnGatewayInner> 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 all the VpnGateways in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnGatewayInner> 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 all the VpnGateways in a subscription. + * + * @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<VpnGatewayInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the VpnGateways in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the VpnGateways in a subscription. + * + * @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<VpnGatewayInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VpnGateways in a subscription. + * + * @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<VpnGatewayInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the VpnGateways in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnGatewayInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnLinkConnectionsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnLinkConnectionsImpl.java new file mode 100644 index 000000000000..5314115babe5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnLinkConnectionsImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.VpnLinkConnections; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.VpnConnectionVpnGatewayVpnSiteLinkConnectionModel; + +class VpnLinkConnectionsImpl extends WrapperImpl implements VpnLinkConnections { + private final NetworkManager manager; + + VpnLinkConnectionsImpl(NetworkManager manager) { + super(manager.inner().vpnLinkConnections()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private VpnConnectionVpnGatewayVpnSiteLinkConnectionModelImpl wrapModel(VpnSiteLinkConnectionInner inner) { + return new VpnConnectionVpnGatewayVpnSiteLinkConnectionModelImpl(inner, manager()); + } + + @Override + public Observable listByVpnConnectionAsync(final String resourceGroupName, final String gatewayName, final String connectionName) { + VpnLinkConnectionsInner client = this.inner(); + return client.listByVpnConnectionAsync(resourceGroupName, gatewayName, connectionName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VpnConnectionVpnGatewayVpnSiteLinkConnectionModel call(VpnSiteLinkConnectionInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnLinkConnectionsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnLinkConnectionsInner.java new file mode 100644 index 000000000000..c4c5bdd42fc0 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnLinkConnectionsInner.java @@ -0,0 +1,309 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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.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 VpnLinkConnections. + */ +public class VpnLinkConnectionsInner { + /** The Retrofit service to perform REST calls. */ + private VpnLinkConnectionsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VpnLinkConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VpnLinkConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VpnLinkConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for VpnLinkConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface VpnLinkConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VpnLinkConnections listByVpnConnection" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections") + Observable> listByVpnConnection(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Path("connectionName") String connectionName, @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.network.v2019_09_01.VpnLinkConnections listByVpnConnectionNext" }) + @GET + Observable> listByVpnConnectionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VpnSiteLinkConnectionInner> object if successful. + */ + public PagedList listByVpnConnection(final String resourceGroupName, final String gatewayName, final String connectionName) { + ServiceResponse> response = listByVpnConnectionSinglePageAsync(resourceGroupName, gatewayName, connectionName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByVpnConnectionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @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> listByVpnConnectionAsync(final String resourceGroupName, final String gatewayName, final String connectionName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByVpnConnectionSinglePageAsync(resourceGroupName, gatewayName, connectionName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByVpnConnectionNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnSiteLinkConnectionInner> object + */ + public Observable> listByVpnConnectionAsync(final String resourceGroupName, final String gatewayName, final String connectionName) { + return listByVpnConnectionWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnSiteLinkConnectionInner> object + */ + public Observable>> listByVpnConnectionWithServiceResponseAsync(final String resourceGroupName, final String gatewayName, final String connectionName) { + return listByVpnConnectionSinglePageAsync(resourceGroupName, gatewayName, connectionName) + .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(listByVpnConnectionNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. + * + ServiceResponse> * @param resourceGroupName The resource group name of the VpnGateway. + ServiceResponse> * @param gatewayName The name of the gateway. + ServiceResponse> * @param connectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnSiteLinkConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByVpnConnectionSinglePageAsync(final String resourceGroupName, final String gatewayName, final String connectionName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listByVpnConnection(this.client.subscriptionId(), resourceGroupName, gatewayName, connectionName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByVpnConnectionDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByVpnConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. + * + * @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<VpnSiteLinkConnectionInner> object if successful. + */ + public PagedList listByVpnConnectionNext(final String nextPageLink) { + ServiceResponse> response = listByVpnConnectionNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByVpnConnectionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. + * + * @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> listByVpnConnectionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByVpnConnectionNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByVpnConnectionNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. + * + * @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<VpnSiteLinkConnectionInner> object + */ + public Observable> listByVpnConnectionNextAsync(final String nextPageLink) { + return listByVpnConnectionNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. + * + * @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<VpnSiteLinkConnectionInner> object + */ + public Observable>> listByVpnConnectionNextWithServiceResponseAsync(final String nextPageLink) { + return listByVpnConnectionNextSinglePageAsync(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(listByVpnConnectionNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnSiteLinkConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByVpnConnectionNextSinglePageAsync(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.listByVpnConnectionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByVpnConnectionNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByVpnConnectionNextDelegate(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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnProfileResponseImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnProfileResponseImpl.java new file mode 100644 index 000000000000..8d6994623c92 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnProfileResponseImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VpnProfileResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class VpnProfileResponseImpl extends WrapperImpl implements VpnProfileResponse { + private final NetworkManager manager; + VpnProfileResponseImpl(VpnProfileResponseInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String profileUrl() { + return this.inner().profileUrl(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnProfileResponseInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnProfileResponseInner.java new file mode 100644 index 000000000000..573d33aa681c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnProfileResponseInner.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.network.v2019_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Vpn Profile Response for package generation. + */ +public class VpnProfileResponseInner { + /** + * URL to the VPN profile. + */ + @JsonProperty(value = "profileUrl") + private String profileUrl; + + /** + * Get uRL to the VPN profile. + * + * @return the profileUrl value + */ + public String profileUrl() { + return this.profileUrl; + } + + /** + * Set uRL to the VPN profile. + * + * @param profileUrl the profileUrl value to set + * @return the VpnProfileResponseInner object itself. + */ + public VpnProfileResponseInner withProfileUrl(String profileUrl) { + this.profileUrl = profileUrl; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationImpl.java new file mode 100644 index 000000000000..618c16cc4b62 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationImpl.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfiguration; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.VpnGatewayTunnelingProtocol; +import com.microsoft.azure.management.network.v2019_09_01.VpnAuthenticationType; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigVpnClientRootCertificate; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigVpnClientRevokedCertificate; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigRadiusServerRootCertificate; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigRadiusClientRootCertificate; +import com.microsoft.azure.management.network.v2019_09_01.IpsecPolicy; +import com.microsoft.azure.management.network.v2019_09_01.AadAuthenticationParameters; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.P2SVpnGateway; + +class VpnServerConfigurationImpl extends GroupableResourceCoreImpl implements VpnServerConfiguration, VpnServerConfiguration.Definition, VpnServerConfiguration.Update { + VpnServerConfigurationImpl(String name, VpnServerConfigurationInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + VpnServerConfigurationsInner client = this.manager().inner().vpnServerConfigurations(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VpnServerConfigurationsInner client = this.manager().inner().vpnServerConfigurations(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VpnServerConfigurationsInner client = this.manager().inner().vpnServerConfigurations(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public AadAuthenticationParameters aadAuthenticationParameters() { + return this.inner().aadAuthenticationParameters(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List p2SVpnGateways() { + List lst = new ArrayList(); + if (this.inner().p2SVpnGateways() != null) { + for (P2SVpnGatewayInner inner : this.inner().p2SVpnGateways()) { + lst.add( new P2SVpnGatewayImpl(inner.name(), inner, manager())); + } + } + return lst; + } + + @Override + public String provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public List radiusClientRootCertificates() { + return this.inner().radiusClientRootCertificates(); + } + + @Override + public String radiusServerAddress() { + return this.inner().radiusServerAddress(); + } + + @Override + public List radiusServerRootCertificates() { + return this.inner().radiusServerRootCertificates(); + } + + @Override + public String radiusServerSecret() { + return this.inner().radiusServerSecret(); + } + + @Override + public List vpnAuthenticationTypes() { + return this.inner().vpnAuthenticationTypes(); + } + + @Override + public List vpnClientIpsecPolicies() { + return this.inner().vpnClientIpsecPolicies(); + } + + @Override + public List vpnClientRevokedCertificates() { + return this.inner().vpnClientRevokedCertificates(); + } + + @Override + public List vpnClientRootCertificates() { + return this.inner().vpnClientRootCertificates(); + } + + @Override + public List vpnProtocols() { + return this.inner().vpnProtocols(); + } + + @Override + public String vpnServerConfigurationName() { + return this.inner().vpnServerConfigurationName(); + } + + @Override + public String vpnServerConfigurationPropertiesEtag() { + return this.inner().vpnServerConfigurationPropertiesEtag(); + } + + @Override + public VpnServerConfigurationImpl withAadAuthenticationParameters(AadAuthenticationParameters aadAuthenticationParameters) { + this.inner().withAadAuthenticationParameters(aadAuthenticationParameters); + return this; + } + + @Override + public VpnServerConfigurationImpl withRadiusClientRootCertificates(List radiusClientRootCertificates) { + this.inner().withRadiusClientRootCertificates(radiusClientRootCertificates); + return this; + } + + @Override + public VpnServerConfigurationImpl withRadiusServerAddress(String radiusServerAddress) { + this.inner().withRadiusServerAddress(radiusServerAddress); + return this; + } + + @Override + public VpnServerConfigurationImpl withRadiusServerRootCertificates(List radiusServerRootCertificates) { + this.inner().withRadiusServerRootCertificates(radiusServerRootCertificates); + return this; + } + + @Override + public VpnServerConfigurationImpl withRadiusServerSecret(String radiusServerSecret) { + this.inner().withRadiusServerSecret(radiusServerSecret); + return this; + } + + @Override + public VpnServerConfigurationImpl withVpnAuthenticationTypes(List vpnAuthenticationTypes) { + this.inner().withVpnAuthenticationTypes(vpnAuthenticationTypes); + return this; + } + + @Override + public VpnServerConfigurationImpl withVpnClientIpsecPolicies(List vpnClientIpsecPolicies) { + this.inner().withVpnClientIpsecPolicies(vpnClientIpsecPolicies); + return this; + } + + @Override + public VpnServerConfigurationImpl withVpnClientRevokedCertificates(List vpnClientRevokedCertificates) { + this.inner().withVpnClientRevokedCertificates(vpnClientRevokedCertificates); + return this; + } + + @Override + public VpnServerConfigurationImpl withVpnClientRootCertificates(List vpnClientRootCertificates) { + this.inner().withVpnClientRootCertificates(vpnClientRootCertificates); + return this; + } + + @Override + public VpnServerConfigurationImpl withVpnProtocols(List vpnProtocols) { + this.inner().withVpnProtocols(vpnProtocols); + return this; + } + + @Override + public VpnServerConfigurationImpl withVpnServerConfigurationName(String vpnServerConfigurationName) { + this.inner().withVpnServerConfigurationName(vpnServerConfigurationName); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationInner.java new file mode 100644 index 000000000000..bbccc3eedd52 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationInner.java @@ -0,0 +1,408 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.VpnGatewayTunnelingProtocol; +import com.microsoft.azure.management.network.v2019_09_01.VpnAuthenticationType; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigVpnClientRootCertificate; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigVpnClientRevokedCertificate; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigRadiusServerRootCertificate; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigRadiusClientRootCertificate; +import com.microsoft.azure.management.network.v2019_09_01.IpsecPolicy; +import com.microsoft.azure.management.network.v2019_09_01.AadAuthenticationParameters; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * VpnServerConfiguration Resource. + */ +@JsonFlatten +@SkipParentValidation +public class VpnServerConfigurationInner extends Resource { + /** + * The name of the VpnServerConfiguration that is unique within a resource + * group. + */ + @JsonProperty(value = "properties.name") + private String vpnServerConfigurationName; + + /** + * VPN protocols for the VpnServerConfiguration. + */ + @JsonProperty(value = "properties.vpnProtocols") + private List vpnProtocols; + + /** + * VPN authentication types for the VpnServerConfiguration. + */ + @JsonProperty(value = "properties.vpnAuthenticationTypes") + private List vpnAuthenticationTypes; + + /** + * VPN client root certificate of VpnServerConfiguration. + */ + @JsonProperty(value = "properties.vpnClientRootCertificates") + private List vpnClientRootCertificates; + + /** + * VPN client revoked certificate of VpnServerConfiguration. + */ + @JsonProperty(value = "properties.vpnClientRevokedCertificates") + private List vpnClientRevokedCertificates; + + /** + * Radius Server root certificate of VpnServerConfiguration. + */ + @JsonProperty(value = "properties.radiusServerRootCertificates") + private List radiusServerRootCertificates; + + /** + * Radius client root certificate of VpnServerConfiguration. + */ + @JsonProperty(value = "properties.radiusClientRootCertificates") + private List radiusClientRootCertificates; + + /** + * VpnClientIpsecPolicies for VpnServerConfiguration. + */ + @JsonProperty(value = "properties.vpnClientIpsecPolicies") + private List vpnClientIpsecPolicies; + + /** + * The radius server address property of the VpnServerConfiguration + * resource for point to site client connection. + */ + @JsonProperty(value = "properties.radiusServerAddress") + private String radiusServerAddress; + + /** + * The radius secret property of the VpnServerConfiguration resource for + * point to site client connection. + */ + @JsonProperty(value = "properties.radiusServerSecret") + private String radiusServerSecret; + + /** + * The set of aad vpn authentication parameters. + */ + @JsonProperty(value = "properties.aadAuthenticationParameters") + private AadAuthenticationParameters aadAuthenticationParameters; + + /** + * The provisioning state of the VpnServerConfiguration resource. Possible + * values are: 'Updating', 'Deleting', and 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * List of references to P2SVpnGateways. + */ + @JsonProperty(value = "properties.p2SVpnGateways", access = JsonProperty.Access.WRITE_ONLY) + private List p2SVpnGateways; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "properties.etag", access = JsonProperty.Access.WRITE_ONLY) + private String vpnServerConfigurationPropertiesEtag; + + /** + * Gets a unique read-only string that changes whenever the resource is + * updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the name of the VpnServerConfiguration that is unique within a resource group. + * + * @return the vpnServerConfigurationName value + */ + public String vpnServerConfigurationName() { + return this.vpnServerConfigurationName; + } + + /** + * Set the name of the VpnServerConfiguration that is unique within a resource group. + * + * @param vpnServerConfigurationName the vpnServerConfigurationName value to set + * @return the VpnServerConfigurationInner object itself. + */ + public VpnServerConfigurationInner withVpnServerConfigurationName(String vpnServerConfigurationName) { + this.vpnServerConfigurationName = vpnServerConfigurationName; + return this; + } + + /** + * Get vPN protocols for the VpnServerConfiguration. + * + * @return the vpnProtocols value + */ + public List vpnProtocols() { + return this.vpnProtocols; + } + + /** + * Set vPN protocols for the VpnServerConfiguration. + * + * @param vpnProtocols the vpnProtocols value to set + * @return the VpnServerConfigurationInner object itself. + */ + public VpnServerConfigurationInner withVpnProtocols(List vpnProtocols) { + this.vpnProtocols = vpnProtocols; + return this; + } + + /** + * Get vPN authentication types for the VpnServerConfiguration. + * + * @return the vpnAuthenticationTypes value + */ + public List vpnAuthenticationTypes() { + return this.vpnAuthenticationTypes; + } + + /** + * Set vPN authentication types for the VpnServerConfiguration. + * + * @param vpnAuthenticationTypes the vpnAuthenticationTypes value to set + * @return the VpnServerConfigurationInner object itself. + */ + public VpnServerConfigurationInner withVpnAuthenticationTypes(List vpnAuthenticationTypes) { + this.vpnAuthenticationTypes = vpnAuthenticationTypes; + return this; + } + + /** + * Get vPN client root certificate of VpnServerConfiguration. + * + * @return the vpnClientRootCertificates value + */ + public List vpnClientRootCertificates() { + return this.vpnClientRootCertificates; + } + + /** + * Set vPN client root certificate of VpnServerConfiguration. + * + * @param vpnClientRootCertificates the vpnClientRootCertificates value to set + * @return the VpnServerConfigurationInner object itself. + */ + public VpnServerConfigurationInner withVpnClientRootCertificates(List vpnClientRootCertificates) { + this.vpnClientRootCertificates = vpnClientRootCertificates; + return this; + } + + /** + * Get vPN client revoked certificate of VpnServerConfiguration. + * + * @return the vpnClientRevokedCertificates value + */ + public List vpnClientRevokedCertificates() { + return this.vpnClientRevokedCertificates; + } + + /** + * Set vPN client revoked certificate of VpnServerConfiguration. + * + * @param vpnClientRevokedCertificates the vpnClientRevokedCertificates value to set + * @return the VpnServerConfigurationInner object itself. + */ + public VpnServerConfigurationInner withVpnClientRevokedCertificates(List vpnClientRevokedCertificates) { + this.vpnClientRevokedCertificates = vpnClientRevokedCertificates; + return this; + } + + /** + * Get radius Server root certificate of VpnServerConfiguration. + * + * @return the radiusServerRootCertificates value + */ + public List radiusServerRootCertificates() { + return this.radiusServerRootCertificates; + } + + /** + * Set radius Server root certificate of VpnServerConfiguration. + * + * @param radiusServerRootCertificates the radiusServerRootCertificates value to set + * @return the VpnServerConfigurationInner object itself. + */ + public VpnServerConfigurationInner withRadiusServerRootCertificates(List radiusServerRootCertificates) { + this.radiusServerRootCertificates = radiusServerRootCertificates; + return this; + } + + /** + * Get radius client root certificate of VpnServerConfiguration. + * + * @return the radiusClientRootCertificates value + */ + public List radiusClientRootCertificates() { + return this.radiusClientRootCertificates; + } + + /** + * Set radius client root certificate of VpnServerConfiguration. + * + * @param radiusClientRootCertificates the radiusClientRootCertificates value to set + * @return the VpnServerConfigurationInner object itself. + */ + public VpnServerConfigurationInner withRadiusClientRootCertificates(List radiusClientRootCertificates) { + this.radiusClientRootCertificates = radiusClientRootCertificates; + return this; + } + + /** + * Get vpnClientIpsecPolicies for VpnServerConfiguration. + * + * @return the vpnClientIpsecPolicies value + */ + public List vpnClientIpsecPolicies() { + return this.vpnClientIpsecPolicies; + } + + /** + * Set vpnClientIpsecPolicies for VpnServerConfiguration. + * + * @param vpnClientIpsecPolicies the vpnClientIpsecPolicies value to set + * @return the VpnServerConfigurationInner object itself. + */ + public VpnServerConfigurationInner withVpnClientIpsecPolicies(List vpnClientIpsecPolicies) { + this.vpnClientIpsecPolicies = vpnClientIpsecPolicies; + return this; + } + + /** + * Get the radius server address property of the VpnServerConfiguration resource for point to site client connection. + * + * @return the radiusServerAddress value + */ + public String radiusServerAddress() { + return this.radiusServerAddress; + } + + /** + * Set the radius server address property of the VpnServerConfiguration resource for point to site client connection. + * + * @param radiusServerAddress the radiusServerAddress value to set + * @return the VpnServerConfigurationInner object itself. + */ + public VpnServerConfigurationInner withRadiusServerAddress(String radiusServerAddress) { + this.radiusServerAddress = radiusServerAddress; + return this; + } + + /** + * Get the radius secret property of the VpnServerConfiguration resource for point to site client connection. + * + * @return the radiusServerSecret value + */ + public String radiusServerSecret() { + return this.radiusServerSecret; + } + + /** + * Set the radius secret property of the VpnServerConfiguration resource for point to site client connection. + * + * @param radiusServerSecret the radiusServerSecret value to set + * @return the VpnServerConfigurationInner object itself. + */ + public VpnServerConfigurationInner withRadiusServerSecret(String radiusServerSecret) { + this.radiusServerSecret = radiusServerSecret; + return this; + } + + /** + * Get the set of aad vpn authentication parameters. + * + * @return the aadAuthenticationParameters value + */ + public AadAuthenticationParameters aadAuthenticationParameters() { + return this.aadAuthenticationParameters; + } + + /** + * Set the set of aad vpn authentication parameters. + * + * @param aadAuthenticationParameters the aadAuthenticationParameters value to set + * @return the VpnServerConfigurationInner object itself. + */ + public VpnServerConfigurationInner withAadAuthenticationParameters(AadAuthenticationParameters aadAuthenticationParameters) { + this.aadAuthenticationParameters = aadAuthenticationParameters; + return this; + } + + /** + * Get the provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get list of references to P2SVpnGateways. + * + * @return the p2SVpnGateways value + */ + public List p2SVpnGateways() { + return this.p2SVpnGateways; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the vpnServerConfigurationPropertiesEtag value + */ + public String vpnServerConfigurationPropertiesEtag() { + return this.vpnServerConfigurationPropertiesEtag; + } + + /** + * Get gets a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the VpnServerConfigurationInner object itself. + */ + public VpnServerConfigurationInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsAssociatedWithVirtualWansImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsAssociatedWithVirtualWansImpl.java new file mode 100644 index 000000000000..428d26776702 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsAssociatedWithVirtualWansImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigurationsAssociatedWithVirtualWans; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigurationsResponse; + +class VpnServerConfigurationsAssociatedWithVirtualWansImpl extends WrapperImpl implements VpnServerConfigurationsAssociatedWithVirtualWans { + private final NetworkManager manager; + + VpnServerConfigurationsAssociatedWithVirtualWansImpl(NetworkManager manager) { + super(manager.inner().vpnServerConfigurationsAssociatedWithVirtualWans()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(String resourceGroupName, String virtualWANName) { + VpnServerConfigurationsAssociatedWithVirtualWansInner client = this.inner(); + return client.listAsync(resourceGroupName, virtualWANName) + .map(new Func1() { + @Override + public VpnServerConfigurationsResponse call(VpnServerConfigurationsResponseInner inner) { + return new VpnServerConfigurationsResponseImpl(inner, manager()); + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsAssociatedWithVirtualWansInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsAssociatedWithVirtualWansInner.java new file mode 100644 index 000000000000..8e2644cdd9b4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsAssociatedWithVirtualWansInner.java @@ -0,0 +1,220 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in VpnServerConfigurationsAssociatedWithVirtualWans. + */ +public class VpnServerConfigurationsAssociatedWithVirtualWansInner { + /** The Retrofit service to perform REST calls. */ + private VpnServerConfigurationsAssociatedWithVirtualWansService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VpnServerConfigurationsAssociatedWithVirtualWansInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VpnServerConfigurationsAssociatedWithVirtualWansInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VpnServerConfigurationsAssociatedWithVirtualWansService.class); + this.client = client; + } + + /** + * The interface defining all the services for VpnServerConfigurationsAssociatedWithVirtualWans to be + * used by Retrofit to perform actually REST calls. + */ + interface VpnServerConfigurationsAssociatedWithVirtualWansService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigurationsAssociatedWithVirtualWans list" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualWANName") String virtualWANName, @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.network.v2019_09_01.VpnServerConfigurationsAssociatedWithVirtualWans beginList" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations") + Observable> beginList(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualWANName") String virtualWANName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnServerConfigurationsResponseInner object if successful. + */ + public VpnServerConfigurationsResponseInner list(String resourceGroupName, String virtualWANName) { + return listWithServiceResponseAsync(resourceGroupName, virtualWANName).toBlocking().last().body(); + } + + /** + * Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @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(String resourceGroupName, String virtualWANName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, virtualWANName), serviceCallback); + } + + /** + * Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listAsync(String resourceGroupName, String virtualWANName) { + return listWithServiceResponseAsync(resourceGroupName, virtualWANName).map(new Func1, VpnServerConfigurationsResponseInner>() { + @Override + public VpnServerConfigurationsResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listWithServiceResponseAsync(String resourceGroupName, String virtualWANName) { + 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 (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.list(this.client.subscriptionId(), resourceGroupName, virtualWANName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnServerConfigurationsResponseInner object if successful. + */ + public VpnServerConfigurationsResponseInner beginList(String resourceGroupName, String virtualWANName) { + return beginListWithServiceResponseAsync(resourceGroupName, virtualWANName).toBlocking().single().body(); + } + + /** + * Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @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 beginListAsync(String resourceGroupName, String virtualWANName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListWithServiceResponseAsync(resourceGroupName, virtualWANName), serviceCallback); + } + + /** + * Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnServerConfigurationsResponseInner object + */ + public Observable beginListAsync(String resourceGroupName, String virtualWANName) { + return beginListWithServiceResponseAsync(resourceGroupName, virtualWANName).map(new Func1, VpnServerConfigurationsResponseInner>() { + @Override + public VpnServerConfigurationsResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnServerConfigurationsResponseInner object + */ + public Observable> beginListWithServiceResponseAsync(String resourceGroupName, String virtualWANName) { + 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 (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginList(this.client.subscriptionId(), resourceGroupName, virtualWANName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsImpl.java new file mode 100644 index 000000000000..56e394f05b1a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigurations; +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfiguration; +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; + +class VpnServerConfigurationsImpl extends GroupableResourcesCoreImpl implements VpnServerConfigurations { + protected VpnServerConfigurationsImpl(NetworkManager manager) { + super(manager.inner().vpnServerConfigurations(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + VpnServerConfigurationsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + VpnServerConfigurationsInner 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) { + VpnServerConfigurationsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + VpnServerConfigurationsInner 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 VpnServerConfiguration call(VpnServerConfigurationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + VpnServerConfigurationsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + VpnServerConfigurationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VpnServerConfiguration call(VpnServerConfigurationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public VpnServerConfigurationImpl define(String name) { + return wrapModel(name); + } + + @Override + protected VpnServerConfigurationImpl wrapModel(VpnServerConfigurationInner inner) { + return new VpnServerConfigurationImpl(inner.name(), inner, manager()); + } + + @Override + protected VpnServerConfigurationImpl wrapModel(String name) { + return new VpnServerConfigurationImpl(name, new VpnServerConfigurationInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsInner.java new file mode 100644 index 000000000000..f1902a19139f --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsInner.java @@ -0,0 +1,1126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 VpnServerConfigurations. + */ +public class VpnServerConfigurationsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private VpnServerConfigurationsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VpnServerConfigurationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VpnServerConfigurationsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VpnServerConfigurationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for VpnServerConfigurations to be + * used by Retrofit to perform actually REST calls. + */ + interface VpnServerConfigurationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigurations getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnServerConfigurationName") String vpnServerConfigurationName, @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.network.v2019_09_01.VpnServerConfigurations createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnServerConfigurationName") String vpnServerConfigurationName, @Query("api-version") String apiVersion, @Body VpnServerConfigurationInner vpnServerConfigurationParameters, @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.network.v2019_09_01.VpnServerConfigurations beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnServerConfigurationName") String vpnServerConfigurationName, @Query("api-version") String apiVersion, @Body VpnServerConfigurationInner vpnServerConfigurationParameters, @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.network.v2019_09_01.VpnServerConfigurations updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}") + Observable> updateTags(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnServerConfigurationName") String vpnServerConfigurationName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject vpnServerConfigurationParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigurations delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnServerConfigurationName") String vpnServerConfigurationName, @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.network.v2019_09_01.VpnServerConfigurations beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnServerConfigurationName") String vpnServerConfigurationName, @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.network.v2019_09_01.VpnServerConfigurations listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.VpnServerConfigurations list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnServerConfigurations") + Observable> list(@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.network.v2019_09_01.VpnServerConfigurations 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.network.v2019_09_01.VpnServerConfigurations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves the details of a VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnServerConfigurationInner object if successful. + */ + public VpnServerConfigurationInner getByResourceGroup(String resourceGroupName, String vpnServerConfigurationName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName).toBlocking().single().body(); + } + + /** + * Retrieves the details of a VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being retrieved. + * @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 vpnServerConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName), serviceCallback); + } + + /** + * Retrieves the details of a VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnServerConfigurationInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String vpnServerConfigurationName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName).map(new Func1, VpnServerConfigurationInner>() { + @Override + public VpnServerConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of a VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnServerConfigurationInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String vpnServerConfigurationName) { + 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 (vpnServerConfigurationName == null) { + throw new IllegalArgumentException("Parameter vpnServerConfigurationName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, vpnServerConfigurationName, 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); + } + + /** + * Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being created or updated. + * @param vpnServerConfigurationParameters Parameters supplied to create or update VpnServerConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnServerConfigurationInner object if successful. + */ + public VpnServerConfigurationInner createOrUpdate(String resourceGroupName, String vpnServerConfigurationName, VpnServerConfigurationInner vpnServerConfigurationParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters).toBlocking().last().body(); + } + + /** + * Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being created or updated. + * @param vpnServerConfigurationParameters Parameters supplied to create or update VpnServerConfiguration. + * @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 vpnServerConfigurationName, VpnServerConfigurationInner vpnServerConfigurationParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters), serviceCallback); + } + + /** + * Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being created or updated. + * @param vpnServerConfigurationParameters Parameters supplied to create or update VpnServerConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String vpnServerConfigurationName, VpnServerConfigurationInner vpnServerConfigurationParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters).map(new Func1, VpnServerConfigurationInner>() { + @Override + public VpnServerConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being created or updated. + * @param vpnServerConfigurationParameters Parameters supplied to create or update VpnServerConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String vpnServerConfigurationName, VpnServerConfigurationInner vpnServerConfigurationParameters) { + 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 (vpnServerConfigurationName == null) { + throw new IllegalArgumentException("Parameter vpnServerConfigurationName is required and cannot be null."); + } + if (vpnServerConfigurationParameters == null) { + throw new IllegalArgumentException("Parameter vpnServerConfigurationParameters is required and cannot be null."); + } + Validator.validate(vpnServerConfigurationParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, vpnServerConfigurationName, apiVersion, vpnServerConfigurationParameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being created or updated. + * @param vpnServerConfigurationParameters Parameters supplied to create or update VpnServerConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnServerConfigurationInner object if successful. + */ + public VpnServerConfigurationInner beginCreateOrUpdate(String resourceGroupName, String vpnServerConfigurationName, VpnServerConfigurationInner vpnServerConfigurationParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters).toBlocking().single().body(); + } + + /** + * Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being created or updated. + * @param vpnServerConfigurationParameters Parameters supplied to create or update VpnServerConfiguration. + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String vpnServerConfigurationName, VpnServerConfigurationInner vpnServerConfigurationParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters), serviceCallback); + } + + /** + * Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being created or updated. + * @param vpnServerConfigurationParameters Parameters supplied to create or update VpnServerConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnServerConfigurationInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String vpnServerConfigurationName, VpnServerConfigurationInner vpnServerConfigurationParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters).map(new Func1, VpnServerConfigurationInner>() { + @Override + public VpnServerConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being created or updated. + * @param vpnServerConfigurationParameters Parameters supplied to create or update VpnServerConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnServerConfigurationInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String vpnServerConfigurationName, VpnServerConfigurationInner vpnServerConfigurationParameters) { + 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 (vpnServerConfigurationName == null) { + throw new IllegalArgumentException("Parameter vpnServerConfigurationName is required and cannot be null."); + } + if (vpnServerConfigurationParameters == null) { + throw new IllegalArgumentException("Parameter vpnServerConfigurationParameters is required and cannot be null."); + } + Validator.validate(vpnServerConfigurationParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, vpnServerConfigurationName, apiVersion, vpnServerConfigurationParameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 VpnServerConfiguration tags. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnServerConfigurationInner object if successful. + */ + public VpnServerConfigurationInner updateTags(String resourceGroupName, String vpnServerConfigurationName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName).toBlocking().single().body(); + } + + /** + * Updates VpnServerConfiguration tags. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being updated. + * @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 updateTagsAsync(String resourceGroupName, String vpnServerConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName), serviceCallback); + } + + /** + * Updates VpnServerConfiguration tags. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnServerConfigurationInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String vpnServerConfigurationName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName).map(new Func1, VpnServerConfigurationInner>() { + @Override + public VpnServerConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates VpnServerConfiguration tags. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnServerConfigurationInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String vpnServerConfigurationName) { + 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 (vpnServerConfigurationName == null) { + throw new IllegalArgumentException("Parameter vpnServerConfigurationName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject vpnServerConfigurationParameters = new TagsObject(); + vpnServerConfigurationParameters.withTags(null); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, vpnServerConfigurationName, apiVersion, this.client.acceptLanguage(), vpnServerConfigurationParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates VpnServerConfiguration tags. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being updated. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnServerConfigurationInner object if successful. + */ + public VpnServerConfigurationInner updateTags(String resourceGroupName, String vpnServerConfigurationName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName, tags).toBlocking().single().body(); + } + + /** + * Updates VpnServerConfiguration tags. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being updated. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String vpnServerConfigurationName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName, tags), serviceCallback); + } + + /** + * Updates VpnServerConfiguration tags. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being updated. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnServerConfigurationInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String vpnServerConfigurationName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName, tags).map(new Func1, VpnServerConfigurationInner>() { + @Override + public VpnServerConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates VpnServerConfiguration tags. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being updated. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnServerConfigurationInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String vpnServerConfigurationName, Map tags) { + 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 (vpnServerConfigurationName == null) { + throw new IllegalArgumentException("Parameter vpnServerConfigurationName is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject vpnServerConfigurationParameters = new TagsObject(); + vpnServerConfigurationParameters.withTags(tags); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, vpnServerConfigurationName, apiVersion, this.client.acceptLanguage(), vpnServerConfigurationParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 a VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 vpnServerConfigurationName) { + deleteWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName).toBlocking().last().body(); + } + + /** + * Deletes a VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being deleted. + * @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 vpnServerConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName), serviceCallback); + } + + /** + * Deletes a VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String vpnServerConfigurationName) { + return deleteWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vpnServerConfigurationName) { + 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 (vpnServerConfigurationName == null) { + throw new IllegalArgumentException("Parameter vpnServerConfigurationName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, vpnServerConfigurationName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 vpnServerConfigurationName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName).toBlocking().single().body(); + } + + /** + * Deletes a VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being deleted. + * @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 vpnServerConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName), serviceCallback); + } + + /** + * Deletes a VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String vpnServerConfigurationName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vpnServerConfigurationName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a VpnServerConfiguration. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vpnServerConfigurationName) { + 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 (vpnServerConfigurationName == null) { + throw new IllegalArgumentException("Parameter vpnServerConfigurationName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, vpnServerConfigurationName, 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); + } + + /** + * Lists all the vpnServerConfigurations in a resource group. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VpnServerConfigurationInner> 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 all the vpnServerConfigurations in a resource group. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @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 all the vpnServerConfigurations in a resource group. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnServerConfigurationInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the vpnServerConfigurations in a resource group. + * + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnServerConfigurationInner> 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 all the vpnServerConfigurations in a resource group. + * + ServiceResponse> * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnServerConfigurationInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, 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 all the VpnServerConfigurations in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VpnServerConfigurationInner> 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 all the VpnServerConfigurations in a subscription. + * + * @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 all the VpnServerConfigurations in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnServerConfigurationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VpnServerConfigurations in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnServerConfigurationInner> 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 all the VpnServerConfigurations in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnServerConfigurationInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all the vpnServerConfigurations in a resource group. + * + * @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<VpnServerConfigurationInner> 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 all the vpnServerConfigurations in a resource group. + * + * @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 all the vpnServerConfigurations in a resource group. + * + * @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<VpnServerConfigurationInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the vpnServerConfigurations in a resource group. + * + * @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<VpnServerConfigurationInner> 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 all the vpnServerConfigurations in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnServerConfigurationInner> 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 all the VpnServerConfigurations in a subscription. + * + * @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<VpnServerConfigurationInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the VpnServerConfigurations in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the VpnServerConfigurations in a subscription. + * + * @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<VpnServerConfigurationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VpnServerConfigurations in a subscription. + * + * @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<VpnServerConfigurationInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the VpnServerConfigurations in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnServerConfigurationInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsResponseImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsResponseImpl.java new file mode 100644 index 000000000000..d90f5a2384a5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsResponseImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VpnServerConfigurationsResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class VpnServerConfigurationsResponseImpl extends WrapperImpl implements VpnServerConfigurationsResponse { + private final NetworkManager manager; + VpnServerConfigurationsResponseImpl(VpnServerConfigurationsResponseInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List vpnServerConfigurationResourceIds() { + return this.inner().vpnServerConfigurationResourceIds(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsResponseInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsResponseInner.java new file mode 100644 index 000000000000..e09cc8c296f1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnServerConfigurationsResponseInner.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.network.v2019_09_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * VpnServerConfigurations list associated with VirtualWan Response. + */ +public class VpnServerConfigurationsResponseInner { + /** + * List of VpnServerConfigurations associated with VirtualWan. + */ + @JsonProperty(value = "vpnServerConfigurationResourceIds") + private List vpnServerConfigurationResourceIds; + + /** + * Get list of VpnServerConfigurations associated with VirtualWan. + * + * @return the vpnServerConfigurationResourceIds value + */ + public List vpnServerConfigurationResourceIds() { + return this.vpnServerConfigurationResourceIds; + } + + /** + * Set list of VpnServerConfigurations associated with VirtualWan. + * + * @param vpnServerConfigurationResourceIds the vpnServerConfigurationResourceIds value to set + * @return the VpnServerConfigurationsResponseInner object itself. + */ + public VpnServerConfigurationsResponseInner withVpnServerConfigurationResourceIds(List vpnServerConfigurationResourceIds) { + this.vpnServerConfigurationResourceIds = vpnServerConfigurationResourceIds; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteImpl.java new file mode 100644 index 000000000000..1b7654a4c053 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteImpl.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VpnSite; +import rx.Observable; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.DeviceProperties; +import com.microsoft.azure.management.network.v2019_09_01.AddressSpace; +import com.microsoft.azure.management.network.v2019_09_01.BgpSettings; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.List; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.VpnSiteLink; + +class VpnSiteImpl extends GroupableResourceCoreImpl implements VpnSite, VpnSite.Definition, VpnSite.Update { + VpnSiteImpl(String name, VpnSiteInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + VpnSitesInner client = this.manager().inner().vpnSites(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VpnSitesInner client = this.manager().inner().vpnSites(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VpnSitesInner client = this.manager().inner().vpnSites(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public AddressSpace addressSpace() { + return this.inner().addressSpace(); + } + + @Override + public BgpSettings bgpProperties() { + return this.inner().bgpProperties(); + } + + @Override + public DeviceProperties deviceProperties() { + return this.inner().deviceProperties(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String ipAddress() { + return this.inner().ipAddress(); + } + + @Override + public Boolean isSecuritySite() { + return this.inner().isSecuritySite(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String siteKey() { + return this.inner().siteKey(); + } + + @Override + public SubResource virtualWan() { + return this.inner().virtualWan(); + } + + @Override + public List vpnSiteLinks() { + List lst = new ArrayList(); + if (this.inner().vpnSiteLinks() != null) { + for (VpnSiteLinkInner inner : this.inner().vpnSiteLinks()) { + lst.add( new VpnSiteLinkImpl(inner, manager())); + } + } + return lst; + } + + @Override + public VpnSiteImpl withAddressSpace(AddressSpace addressSpace) { + this.inner().withAddressSpace(addressSpace); + return this; + } + + @Override + public VpnSiteImpl withBgpProperties(BgpSettings bgpProperties) { + this.inner().withBgpProperties(bgpProperties); + return this; + } + + @Override + public VpnSiteImpl withDeviceProperties(DeviceProperties deviceProperties) { + this.inner().withDeviceProperties(deviceProperties); + return this; + } + + @Override + public VpnSiteImpl withIpAddress(String ipAddress) { + this.inner().withIpAddress(ipAddress); + return this; + } + + @Override + public VpnSiteImpl withIsSecuritySite(Boolean isSecuritySite) { + this.inner().withIsSecuritySite(isSecuritySite); + return this; + } + + @Override + public VpnSiteImpl withSiteKey(String siteKey) { + this.inner().withSiteKey(siteKey); + return this; + } + + @Override + public VpnSiteImpl withVirtualWan(SubResource virtualWan) { + this.inner().withVirtualWan(virtualWan); + return this; + } + + @Override + public VpnSiteImpl withVpnSiteLinks(List vpnSiteLinks) { + this.inner().withVpnSiteLinks(vpnSiteLinks); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteInner.java new file mode 100644 index 000000000000..01f1a792dbb7 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteInner.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.DeviceProperties; +import com.microsoft.azure.management.network.v2019_09_01.AddressSpace; +import com.microsoft.azure.management.network.v2019_09_01.BgpSettings; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * VpnSite Resource. + */ +@JsonFlatten +@SkipParentValidation +public class VpnSiteInner extends Resource { + /** + * The VirtualWAN to which the vpnSite belongs. + */ + @JsonProperty(value = "properties.virtualWan") + private SubResource virtualWan; + + /** + * The device properties. + */ + @JsonProperty(value = "properties.deviceProperties") + private DeviceProperties deviceProperties; + + /** + * The ip-address for the vpn-site. + */ + @JsonProperty(value = "properties.ipAddress") + private String ipAddress; + + /** + * The key for vpn-site that can be used for connections. + */ + @JsonProperty(value = "properties.siteKey") + private String siteKey; + + /** + * The AddressSpace that contains an array of IP address ranges. + */ + @JsonProperty(value = "properties.addressSpace") + private AddressSpace addressSpace; + + /** + * The set of bgp properties. + */ + @JsonProperty(value = "properties.bgpProperties") + private BgpSettings bgpProperties; + + /** + * The provisioning state of the VPN site resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * IsSecuritySite flag. + */ + @JsonProperty(value = "properties.isSecuritySite") + private Boolean isSecuritySite; + + /** + * List of all vpn site links. + */ + @JsonProperty(value = "properties.vpnSiteLinks") + private List vpnSiteLinks; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the VirtualWAN to which the vpnSite belongs. + * + * @return the virtualWan value + */ + public SubResource virtualWan() { + return this.virtualWan; + } + + /** + * Set the VirtualWAN to which the vpnSite belongs. + * + * @param virtualWan the virtualWan value to set + * @return the VpnSiteInner object itself. + */ + public VpnSiteInner withVirtualWan(SubResource virtualWan) { + this.virtualWan = virtualWan; + return this; + } + + /** + * Get the device properties. + * + * @return the deviceProperties value + */ + public DeviceProperties deviceProperties() { + return this.deviceProperties; + } + + /** + * Set the device properties. + * + * @param deviceProperties the deviceProperties value to set + * @return the VpnSiteInner object itself. + */ + public VpnSiteInner withDeviceProperties(DeviceProperties deviceProperties) { + this.deviceProperties = deviceProperties; + return this; + } + + /** + * Get the ip-address for the vpn-site. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ip-address for the vpn-site. + * + * @param ipAddress the ipAddress value to set + * @return the VpnSiteInner object itself. + */ + public VpnSiteInner withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the key for vpn-site that can be used for connections. + * + * @return the siteKey value + */ + public String siteKey() { + return this.siteKey; + } + + /** + * Set the key for vpn-site that can be used for connections. + * + * @param siteKey the siteKey value to set + * @return the VpnSiteInner object itself. + */ + public VpnSiteInner withSiteKey(String siteKey) { + this.siteKey = siteKey; + return this; + } + + /** + * Get the AddressSpace that contains an array of IP address ranges. + * + * @return the addressSpace value + */ + public AddressSpace addressSpace() { + return this.addressSpace; + } + + /** + * Set the AddressSpace that contains an array of IP address ranges. + * + * @param addressSpace the addressSpace value to set + * @return the VpnSiteInner object itself. + */ + public VpnSiteInner withAddressSpace(AddressSpace addressSpace) { + this.addressSpace = addressSpace; + return this; + } + + /** + * Get the set of bgp properties. + * + * @return the bgpProperties value + */ + public BgpSettings bgpProperties() { + return this.bgpProperties; + } + + /** + * Set the set of bgp properties. + * + * @param bgpProperties the bgpProperties value to set + * @return the VpnSiteInner object itself. + */ + public VpnSiteInner withBgpProperties(BgpSettings bgpProperties) { + this.bgpProperties = bgpProperties; + return this; + } + + /** + * Get the provisioning state of the VPN site resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get isSecuritySite flag. + * + * @return the isSecuritySite value + */ + public Boolean isSecuritySite() { + return this.isSecuritySite; + } + + /** + * Set isSecuritySite flag. + * + * @param isSecuritySite the isSecuritySite value to set + * @return the VpnSiteInner object itself. + */ + public VpnSiteInner withIsSecuritySite(Boolean isSecuritySite) { + this.isSecuritySite = isSecuritySite; + return this; + } + + /** + * Get list of all vpn site links. + * + * @return the vpnSiteLinks value + */ + public List vpnSiteLinks() { + return this.vpnSiteLinks; + } + + /** + * Set list of all vpn site links. + * + * @param vpnSiteLinks the vpnSiteLinks value to set + * @return the VpnSiteInner object itself. + */ + public VpnSiteInner withVpnSiteLinks(List vpnSiteLinks) { + this.vpnSiteLinks = vpnSiteLinks; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the VpnSiteInner object itself. + */ + public VpnSiteInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkConnectionInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkConnectionInner.java new file mode 100644 index 000000000000..82c0af8e67a3 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkConnectionInner.java @@ -0,0 +1,416 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.v2019_09_01.VpnConnectionStatus; +import com.microsoft.azure.management.network.v2019_09_01.VirtualNetworkGatewayConnectionProtocol; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.IpsecPolicy; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * VpnSiteLinkConnection Resource. + */ +@JsonFlatten +public class VpnSiteLinkConnectionInner extends SubResource { + /** + * Id of the connected vpn site link. + */ + @JsonProperty(value = "properties.vpnSiteLink") + private SubResource vpnSiteLink; + + /** + * Routing weight for vpn connection. + */ + @JsonProperty(value = "properties.routingWeight") + private Integer routingWeight; + + /** + * The connection status. Possible values include: 'Unknown', 'Connecting', + * 'Connected', 'NotConnected'. + */ + @JsonProperty(value = "properties.connectionStatus") + private VpnConnectionStatus connectionStatus; + + /** + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1'. + */ + @JsonProperty(value = "properties.vpnConnectionProtocolType") + private VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType; + + /** + * Ingress bytes transferred. + */ + @JsonProperty(value = "properties.ingressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long ingressBytesTransferred; + + /** + * Egress bytes transferred. + */ + @JsonProperty(value = "properties.egressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY) + private Long egressBytesTransferred; + + /** + * Expected bandwidth in MBPS. + */ + @JsonProperty(value = "properties.connectionBandwidth") + private Integer connectionBandwidth; + + /** + * SharedKey for the vpn connection. + */ + @JsonProperty(value = "properties.sharedKey") + private String sharedKey; + + /** + * EnableBgp flag. + */ + @JsonProperty(value = "properties.enableBgp") + private Boolean enableBgp; + + /** + * Enable policy-based traffic selectors. + */ + @JsonProperty(value = "properties.usePolicyBasedTrafficSelectors") + private Boolean usePolicyBasedTrafficSelectors; + + /** + * The IPSec Policies to be considered by this connection. + */ + @JsonProperty(value = "properties.ipsecPolicies") + private List ipsecPolicies; + + /** + * EnableBgp flag. + */ + @JsonProperty(value = "properties.enableRateLimiting") + private Boolean enableRateLimiting; + + /** + * Use local azure ip to initiate connection. + */ + @JsonProperty(value = "properties.useLocalAzureIpAddress") + private Boolean useLocalAzureIpAddress; + + /** + * The provisioning state of the VPN site link connection resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get id of the connected vpn site link. + * + * @return the vpnSiteLink value + */ + public SubResource vpnSiteLink() { + return this.vpnSiteLink; + } + + /** + * Set id of the connected vpn site link. + * + * @param vpnSiteLink the vpnSiteLink value to set + * @return the VpnSiteLinkConnectionInner object itself. + */ + public VpnSiteLinkConnectionInner withVpnSiteLink(SubResource vpnSiteLink) { + this.vpnSiteLink = vpnSiteLink; + return this; + } + + /** + * Get routing weight for vpn connection. + * + * @return the routingWeight value + */ + public Integer routingWeight() { + return this.routingWeight; + } + + /** + * Set routing weight for vpn connection. + * + * @param routingWeight the routingWeight value to set + * @return the VpnSiteLinkConnectionInner object itself. + */ + public VpnSiteLinkConnectionInner withRoutingWeight(Integer routingWeight) { + this.routingWeight = routingWeight; + return this; + } + + /** + * Get the connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'. + * + * @return the connectionStatus value + */ + public VpnConnectionStatus connectionStatus() { + return this.connectionStatus; + } + + /** + * Set the connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'. + * + * @param connectionStatus the connectionStatus value to set + * @return the VpnSiteLinkConnectionInner object itself. + */ + public VpnSiteLinkConnectionInner withConnectionStatus(VpnConnectionStatus connectionStatus) { + this.connectionStatus = connectionStatus; + return this; + } + + /** + * Get connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'. + * + * @return the vpnConnectionProtocolType value + */ + public VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType() { + return this.vpnConnectionProtocolType; + } + + /** + * Set connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'. + * + * @param vpnConnectionProtocolType the vpnConnectionProtocolType value to set + * @return the VpnSiteLinkConnectionInner object itself. + */ + public VpnSiteLinkConnectionInner withVpnConnectionProtocolType(VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType) { + this.vpnConnectionProtocolType = vpnConnectionProtocolType; + return this; + } + + /** + * Get ingress bytes transferred. + * + * @return the ingressBytesTransferred value + */ + public Long ingressBytesTransferred() { + return this.ingressBytesTransferred; + } + + /** + * Get egress bytes transferred. + * + * @return the egressBytesTransferred value + */ + public Long egressBytesTransferred() { + return this.egressBytesTransferred; + } + + /** + * Get expected bandwidth in MBPS. + * + * @return the connectionBandwidth value + */ + public Integer connectionBandwidth() { + return this.connectionBandwidth; + } + + /** + * Set expected bandwidth in MBPS. + * + * @param connectionBandwidth the connectionBandwidth value to set + * @return the VpnSiteLinkConnectionInner object itself. + */ + public VpnSiteLinkConnectionInner withConnectionBandwidth(Integer connectionBandwidth) { + this.connectionBandwidth = connectionBandwidth; + return this; + } + + /** + * Get sharedKey for the vpn connection. + * + * @return the sharedKey value + */ + public String sharedKey() { + return this.sharedKey; + } + + /** + * Set sharedKey for the vpn connection. + * + * @param sharedKey the sharedKey value to set + * @return the VpnSiteLinkConnectionInner object itself. + */ + public VpnSiteLinkConnectionInner withSharedKey(String sharedKey) { + this.sharedKey = sharedKey; + return this; + } + + /** + * Get enableBgp flag. + * + * @return the enableBgp value + */ + public Boolean enableBgp() { + return this.enableBgp; + } + + /** + * Set enableBgp flag. + * + * @param enableBgp the enableBgp value to set + * @return the VpnSiteLinkConnectionInner object itself. + */ + public VpnSiteLinkConnectionInner withEnableBgp(Boolean enableBgp) { + this.enableBgp = enableBgp; + return this; + } + + /** + * Get enable policy-based traffic selectors. + * + * @return the usePolicyBasedTrafficSelectors value + */ + public Boolean usePolicyBasedTrafficSelectors() { + return this.usePolicyBasedTrafficSelectors; + } + + /** + * Set enable policy-based traffic selectors. + * + * @param usePolicyBasedTrafficSelectors the usePolicyBasedTrafficSelectors value to set + * @return the VpnSiteLinkConnectionInner object itself. + */ + public VpnSiteLinkConnectionInner withUsePolicyBasedTrafficSelectors(Boolean usePolicyBasedTrafficSelectors) { + this.usePolicyBasedTrafficSelectors = usePolicyBasedTrafficSelectors; + return this; + } + + /** + * Get the IPSec Policies to be considered by this connection. + * + * @return the ipsecPolicies value + */ + public List ipsecPolicies() { + return this.ipsecPolicies; + } + + /** + * Set the IPSec Policies to be considered by this connection. + * + * @param ipsecPolicies the ipsecPolicies value to set + * @return the VpnSiteLinkConnectionInner object itself. + */ + public VpnSiteLinkConnectionInner withIpsecPolicies(List ipsecPolicies) { + this.ipsecPolicies = ipsecPolicies; + return this; + } + + /** + * Get enableBgp flag. + * + * @return the enableRateLimiting value + */ + public Boolean enableRateLimiting() { + return this.enableRateLimiting; + } + + /** + * Set enableBgp flag. + * + * @param enableRateLimiting the enableRateLimiting value to set + * @return the VpnSiteLinkConnectionInner object itself. + */ + public VpnSiteLinkConnectionInner withEnableRateLimiting(Boolean enableRateLimiting) { + this.enableRateLimiting = enableRateLimiting; + return this; + } + + /** + * Get use local azure ip to initiate connection. + * + * @return the useLocalAzureIpAddress value + */ + public Boolean useLocalAzureIpAddress() { + return this.useLocalAzureIpAddress; + } + + /** + * Set use local azure ip to initiate connection. + * + * @param useLocalAzureIpAddress the useLocalAzureIpAddress value to set + * @return the VpnSiteLinkConnectionInner object itself. + */ + public VpnSiteLinkConnectionInner withUseLocalAzureIpAddress(Boolean useLocalAzureIpAddress) { + this.useLocalAzureIpAddress = useLocalAzureIpAddress; + return this; + } + + /** + * Get the provisioning state of the VPN site link connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the VpnSiteLinkConnectionInner object itself. + */ + public VpnSiteLinkConnectionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkConnectionsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkConnectionsImpl.java new file mode 100644 index 000000000000..afd0edad63e2 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkConnectionsImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.VpnSiteLinkConnections; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.network.v2019_09_01.VpnConnectionVpnGatewayVpnSiteLinkConnection; + +class VpnSiteLinkConnectionsImpl extends WrapperImpl implements VpnSiteLinkConnections { + private final NetworkManager manager; + + VpnSiteLinkConnectionsImpl(NetworkManager manager) { + super(manager.inner().vpnSiteLinkConnections()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private VpnConnectionVpnGatewayVpnSiteLinkConnectionImpl wrapModel(VpnSiteLinkConnectionInner inner) { + return new VpnConnectionVpnGatewayVpnSiteLinkConnectionImpl(inner, manager()); + } + + @Override + public Observable getAsync(String resourceGroupName, String gatewayName, String connectionName, String linkConnectionName) { + VpnSiteLinkConnectionsInner client = this.inner(); + return client.getAsync(resourceGroupName, gatewayName, connectionName, linkConnectionName) + .flatMap(new Func1>() { + @Override + public Observable call(VpnSiteLinkConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((VpnConnectionVpnGatewayVpnSiteLinkConnection)wrapModel(inner)); + } + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkConnectionsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkConnectionsInner.java new file mode 100644 index 000000000000..48a5dd81774a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkConnectionsInner.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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 VpnSiteLinkConnections. + */ +public class VpnSiteLinkConnectionsInner { + /** The Retrofit service to perform REST calls. */ + private VpnSiteLinkConnectionsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VpnSiteLinkConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VpnSiteLinkConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VpnSiteLinkConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for VpnSiteLinkConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface VpnSiteLinkConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VpnSiteLinkConnections get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("gatewayName") String gatewayName, @Path("connectionName") String connectionName, @Path("linkConnectionName") String linkConnectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves the details of a vpn site link connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @param linkConnectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnSiteLinkConnectionInner object if successful. + */ + public VpnSiteLinkConnectionInner get(String resourceGroupName, String gatewayName, String connectionName, String linkConnectionName) { + return getWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName, linkConnectionName).toBlocking().single().body(); + } + + /** + * Retrieves the details of a vpn site link connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @param linkConnectionName The name of the vpn connection. + * @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 gatewayName, String connectionName, String linkConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName, linkConnectionName), serviceCallback); + } + + /** + * Retrieves the details of a vpn site link connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @param linkConnectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnSiteLinkConnectionInner object + */ + public Observable getAsync(String resourceGroupName, String gatewayName, String connectionName, String linkConnectionName) { + return getWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName, linkConnectionName).map(new Func1, VpnSiteLinkConnectionInner>() { + @Override + public VpnSiteLinkConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of a vpn site link connection. + * + * @param resourceGroupName The resource group name of the VpnGateway. + * @param gatewayName The name of the gateway. + * @param connectionName The name of the vpn connection. + * @param linkConnectionName The name of the vpn connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnSiteLinkConnectionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String gatewayName, String connectionName, String linkConnectionName) { + 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 (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (linkConnectionName == null) { + throw new IllegalArgumentException("Parameter linkConnectionName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(this.client.subscriptionId(), resourceGroupName, gatewayName, connectionName, linkConnectionName, 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); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkImpl.java new file mode 100644 index 000000000000..c52b9763e13a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkImpl.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VpnSiteLink; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.VpnLinkBgpSettings; +import com.microsoft.azure.management.network.v2019_09_01.VpnLinkProviderProperties; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; + +class VpnSiteLinkImpl extends IndexableRefreshableWrapperImpl implements VpnSiteLink { + private final NetworkManager manager; + private String resourceGroupName; + private String vpnSiteName; + private String vpnSiteLinkName; + + VpnSiteLinkImpl(VpnSiteLinkInner inner, NetworkManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.vpnSiteName = IdParsingUtils.getValueFromIdByName(inner.id(), "vpnSites"); + this.vpnSiteLinkName = IdParsingUtils.getValueFromIdByName(inner.id(), "vpnSiteLinks"); + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + VpnSiteLinksInner client = this.manager().inner().vpnSiteLinks(); + return client.getAsync(this.resourceGroupName, this.vpnSiteName, this.vpnSiteLinkName); + } + + + + @Override + public VpnLinkBgpSettings bgpProperties() { + return this.inner().bgpProperties(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String ipAddress() { + return this.inner().ipAddress(); + } + + @Override + public VpnLinkProviderProperties linkProperties() { + return this.inner().linkProperties(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkInner.java new file mode 100644 index 000000000000..37b03ebc8ac4 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinkInner.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VpnLinkProviderProperties; +import com.microsoft.azure.management.network.v2019_09_01.VpnLinkBgpSettings; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * VpnSiteLink Resource. + */ +@JsonFlatten +public class VpnSiteLinkInner extends SubResource { + /** + * The link provider properties. + */ + @JsonProperty(value = "properties.linkProperties") + private VpnLinkProviderProperties linkProperties; + + /** + * The ip-address for the vpn-site-link. + */ + @JsonProperty(value = "properties.ipAddress") + private String ipAddress; + + /** + * The set of bgp properties. + */ + @JsonProperty(value = "properties.bgpProperties") + private VpnLinkBgpSettings bgpProperties; + + /** + * The provisioning state of the VPN site link resource. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * The name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the link provider properties. + * + * @return the linkProperties value + */ + public VpnLinkProviderProperties linkProperties() { + return this.linkProperties; + } + + /** + * Set the link provider properties. + * + * @param linkProperties the linkProperties value to set + * @return the VpnSiteLinkInner object itself. + */ + public VpnSiteLinkInner withLinkProperties(VpnLinkProviderProperties linkProperties) { + this.linkProperties = linkProperties; + return this; + } + + /** + * Get the ip-address for the vpn-site-link. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ip-address for the vpn-site-link. + * + * @param ipAddress the ipAddress value to set + * @return the VpnSiteLinkInner object itself. + */ + public VpnSiteLinkInner withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the set of bgp properties. + * + * @return the bgpProperties value + */ + public VpnLinkBgpSettings bgpProperties() { + return this.bgpProperties; + } + + /** + * Set the set of bgp properties. + * + * @param bgpProperties the bgpProperties value to set + * @return the VpnSiteLinkInner object itself. + */ + public VpnSiteLinkInner withBgpProperties(VpnLinkBgpSettings bgpProperties) { + this.bgpProperties = bgpProperties; + return this; + } + + /** + * Get the provisioning state of the VPN site link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the VpnSiteLinkInner object itself. + */ + public VpnSiteLinkInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinksImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinksImpl.java new file mode 100644 index 000000000000..e9c9102fd784 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinksImpl.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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.VpnSiteLinks; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2019_09_01.VpnSiteLink; + +class VpnSiteLinksImpl extends WrapperImpl implements VpnSiteLinks { + private final NetworkManager manager; + + VpnSiteLinksImpl(NetworkManager manager) { + super(manager.inner().vpnSiteLinks()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + private VpnSiteLinkImpl wrapModel(VpnSiteLinkInner inner) { + return new VpnSiteLinkImpl(inner, manager()); + } + + @Override + public Observable listByVpnSiteAsync(final String resourceGroupName, final String vpnSiteName) { + VpnSiteLinksInner client = this.inner(); + return client.listByVpnSiteAsync(resourceGroupName, vpnSiteName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VpnSiteLink call(VpnSiteLinkInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String vpnSiteName, String vpnSiteLinkName) { + VpnSiteLinksInner client = this.inner(); + return client.getAsync(resourceGroupName, vpnSiteName, vpnSiteLinkName) + .flatMap(new Func1>() { + @Override + public Observable call(VpnSiteLinkInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((VpnSiteLink)wrapModel(inner)); + } + } + }); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinksInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinksInner.java new file mode 100644 index 000000000000..82bc6d7a3c8a --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSiteLinksInner.java @@ -0,0 +1,397 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in VpnSiteLinks. + */ +public class VpnSiteLinksInner { + /** The Retrofit service to perform REST calls. */ + private VpnSiteLinksService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VpnSiteLinksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VpnSiteLinksInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VpnSiteLinksService.class); + this.client = client; + } + + /** + * The interface defining all the services for VpnSiteLinks to be + * used by Retrofit to perform actually REST calls. + */ + interface VpnSiteLinksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VpnSiteLinks get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnSiteName") String vpnSiteName, @Path("vpnSiteLinkName") String vpnSiteLinkName, @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.network.v2019_09_01.VpnSiteLinks listByVpnSite" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks") + Observable> listByVpnSite(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnSiteName") String vpnSiteName, @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.network.v2019_09_01.VpnSiteLinks listByVpnSiteNext" }) + @GET + Observable> listByVpnSiteNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves the details of a VPN site link. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite. + * @param vpnSiteLinkName The name of the VpnSiteLink being retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnSiteLinkInner object if successful. + */ + public VpnSiteLinkInner get(String resourceGroupName, String vpnSiteName, String vpnSiteLinkName) { + return getWithServiceResponseAsync(resourceGroupName, vpnSiteName, vpnSiteLinkName).toBlocking().single().body(); + } + + /** + * Retrieves the details of a VPN site link. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite. + * @param vpnSiteLinkName The name of the VpnSiteLink being retrieved. + * @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 vpnSiteName, String vpnSiteLinkName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, vpnSiteName, vpnSiteLinkName), serviceCallback); + } + + /** + * Retrieves the details of a VPN site link. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite. + * @param vpnSiteLinkName The name of the VpnSiteLink being retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnSiteLinkInner object + */ + public Observable getAsync(String resourceGroupName, String vpnSiteName, String vpnSiteLinkName) { + return getWithServiceResponseAsync(resourceGroupName, vpnSiteName, vpnSiteLinkName).map(new Func1, VpnSiteLinkInner>() { + @Override + public VpnSiteLinkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of a VPN site link. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite. + * @param vpnSiteLinkName The name of the VpnSiteLink being retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnSiteLinkInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String vpnSiteName, String vpnSiteLinkName) { + 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 (vpnSiteName == null) { + throw new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null."); + } + if (vpnSiteLinkName == null) { + throw new IllegalArgumentException("Parameter vpnSiteLinkName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.get(this.client.subscriptionId(), resourceGroupName, vpnSiteName, vpnSiteLinkName, 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); + } + + /** + * Lists all the vpnSiteLinks in a resource group for a vpn site. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VpnSiteLinkInner> object if successful. + */ + public PagedList listByVpnSite(final String resourceGroupName, final String vpnSiteName) { + ServiceResponse> response = listByVpnSiteSinglePageAsync(resourceGroupName, vpnSiteName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByVpnSiteNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the vpnSiteLinks in a resource group for a vpn site. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite. + * @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> listByVpnSiteAsync(final String resourceGroupName, final String vpnSiteName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByVpnSiteSinglePageAsync(resourceGroupName, vpnSiteName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByVpnSiteNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the vpnSiteLinks in a resource group for a vpn site. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnSiteLinkInner> object + */ + public Observable> listByVpnSiteAsync(final String resourceGroupName, final String vpnSiteName) { + return listByVpnSiteWithServiceResponseAsync(resourceGroupName, vpnSiteName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the vpnSiteLinks in a resource group for a vpn site. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnSiteLinkInner> object + */ + public Observable>> listByVpnSiteWithServiceResponseAsync(final String resourceGroupName, final String vpnSiteName) { + return listByVpnSiteSinglePageAsync(resourceGroupName, vpnSiteName) + .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(listByVpnSiteNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the vpnSiteLinks in a resource group for a vpn site. + * + ServiceResponse> * @param resourceGroupName The resource group name of the VpnSite. + ServiceResponse> * @param vpnSiteName The name of the VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnSiteLinkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByVpnSiteSinglePageAsync(final String resourceGroupName, final String vpnSiteName) { + 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 (vpnSiteName == null) { + throw new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.listByVpnSite(this.client.subscriptionId(), resourceGroupName, vpnSiteName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByVpnSiteDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByVpnSiteDelegate(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 all the vpnSiteLinks in a resource group for a vpn site. + * + * @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<VpnSiteLinkInner> object if successful. + */ + public PagedList listByVpnSiteNext(final String nextPageLink) { + ServiceResponse> response = listByVpnSiteNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByVpnSiteNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the vpnSiteLinks in a resource group for a vpn site. + * + * @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> listByVpnSiteNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByVpnSiteNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByVpnSiteNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the vpnSiteLinks in a resource group for a vpn site. + * + * @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<VpnSiteLinkInner> object + */ + public Observable> listByVpnSiteNextAsync(final String nextPageLink) { + return listByVpnSiteNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the vpnSiteLinks in a resource group for a vpn site. + * + * @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<VpnSiteLinkInner> object + */ + public Observable>> listByVpnSiteNextWithServiceResponseAsync(final String nextPageLink) { + return listByVpnSiteNextSinglePageAsync(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(listByVpnSiteNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the vpnSiteLinks in a resource group for a vpn site. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnSiteLinkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByVpnSiteNextSinglePageAsync(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.listByVpnSiteNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByVpnSiteNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByVpnSiteNextDelegate(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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesConfigurationsImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesConfigurationsImpl.java new file mode 100644 index 000000000000..0caa61a1f2f5 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesConfigurationsImpl.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. + * abc + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_09_01.VpnSitesConfigurations; +import rx.Completable; +import com.microsoft.azure.management.network.v2019_09_01.GetVpnSitesConfigurationRequest; + +class VpnSitesConfigurationsImpl extends WrapperImpl implements VpnSitesConfigurations { + private final NetworkManager manager; + + VpnSitesConfigurationsImpl(NetworkManager manager) { + super(manager.inner().vpnSitesConfigurations()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public Completable downloadAsync(String resourceGroupName, String virtualWANName, GetVpnSitesConfigurationRequest request) { + VpnSitesConfigurationsInner client = this.inner(); + return client.downloadAsync(resourceGroupName, virtualWANName, request).toCompletable(); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesConfigurationsInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesConfigurationsInner.java new file mode 100644 index 000000000000..60364c4777aa --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesConfigurationsInner.java @@ -0,0 +1,237 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.network.v2019_09_01.GetVpnSitesConfigurationRequest; +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 okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in VpnSitesConfigurations. + */ +public class VpnSitesConfigurationsInner { + /** The Retrofit service to perform REST calls. */ + private VpnSitesConfigurationsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VpnSitesConfigurationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VpnSitesConfigurationsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VpnSitesConfigurationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for VpnSitesConfigurations to be + * used by Retrofit to perform actually REST calls. + */ + interface VpnSitesConfigurationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VpnSitesConfigurations download" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration") + Observable> download(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualWANName") String virtualWANName, @Body GetVpnSitesConfigurationRequest request, @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.network.v2019_09_01.VpnSitesConfigurations beginDownload" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration") + Observable> beginDownload(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualWANName") String virtualWANName, @Body GetVpnSitesConfigurationRequest request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gives the sas-url to download the configurations for vpn-sites in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed. + * @param request Parameters supplied to download vpn-sites configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 download(String resourceGroupName, String virtualWANName, GetVpnSitesConfigurationRequest request) { + downloadWithServiceResponseAsync(resourceGroupName, virtualWANName, request).toBlocking().last().body(); + } + + /** + * Gives the sas-url to download the configurations for vpn-sites in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed. + * @param request Parameters supplied to download vpn-sites configuration. + * @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 downloadAsync(String resourceGroupName, String virtualWANName, GetVpnSitesConfigurationRequest request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(downloadWithServiceResponseAsync(resourceGroupName, virtualWANName, request), serviceCallback); + } + + /** + * Gives the sas-url to download the configurations for vpn-sites in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed. + * @param request Parameters supplied to download vpn-sites configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable downloadAsync(String resourceGroupName, String virtualWANName, GetVpnSitesConfigurationRequest request) { + return downloadWithServiceResponseAsync(resourceGroupName, virtualWANName, request).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gives the sas-url to download the configurations for vpn-sites in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed. + * @param request Parameters supplied to download vpn-sites configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> downloadWithServiceResponseAsync(String resourceGroupName, String virtualWANName, GetVpnSitesConfigurationRequest request) { + 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 (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + if (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); + } + Validator.validate(request); + final String apiVersion = "2019-09-01"; + Observable> observable = service.download(this.client.subscriptionId(), resourceGroupName, virtualWANName, request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Gives the sas-url to download the configurations for vpn-sites in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed. + * @param request Parameters supplied to download vpn-sites configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginDownload(String resourceGroupName, String virtualWANName, GetVpnSitesConfigurationRequest request) { + beginDownloadWithServiceResponseAsync(resourceGroupName, virtualWANName, request).toBlocking().single().body(); + } + + /** + * Gives the sas-url to download the configurations for vpn-sites in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed. + * @param request Parameters supplied to download vpn-sites configuration. + * @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 beginDownloadAsync(String resourceGroupName, String virtualWANName, GetVpnSitesConfigurationRequest request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDownloadWithServiceResponseAsync(resourceGroupName, virtualWANName, request), serviceCallback); + } + + /** + * Gives the sas-url to download the configurations for vpn-sites in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed. + * @param request Parameters supplied to download vpn-sites configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDownloadAsync(String resourceGroupName, String virtualWANName, GetVpnSitesConfigurationRequest request) { + return beginDownloadWithServiceResponseAsync(resourceGroupName, virtualWANName, request).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gives the sas-url to download the configurations for vpn-sites in a resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed. + * @param request Parameters supplied to download vpn-sites configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDownloadWithServiceResponseAsync(String resourceGroupName, String virtualWANName, GetVpnSitesConfigurationRequest request) { + 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 (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + if (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); + } + Validator.validate(request); + final String apiVersion = "2019-09-01"; + return service.beginDownload(this.client.subscriptionId(), resourceGroupName, virtualWANName, request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDownloadDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDownloadDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesImpl.java new file mode 100644 index 000000000000..28fca4e76209 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.VpnSites; +import com.microsoft.azure.management.network.v2019_09_01.VpnSite; +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; + +class VpnSitesImpl extends GroupableResourcesCoreImpl implements VpnSites { + protected VpnSitesImpl(NetworkManager manager) { + super(manager.inner().vpnSites(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + VpnSitesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + VpnSitesInner 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) { + VpnSitesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + VpnSitesInner 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 VpnSite call(VpnSiteInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + VpnSitesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + VpnSitesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VpnSite call(VpnSiteInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public VpnSiteImpl define(String name) { + return wrapModel(name); + } + + @Override + protected VpnSiteImpl wrapModel(VpnSiteInner inner) { + return new VpnSiteImpl(inner.name(), inner, manager()); + } + + @Override + protected VpnSiteImpl wrapModel(String name) { + return new VpnSiteImpl(name, new VpnSiteInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesInner.java new file mode 100644 index 000000000000..2541029dc515 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/VpnSitesInner.java @@ -0,0 +1,1126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.network.v2019_09_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 VpnSites. + */ +public class VpnSitesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private VpnSitesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of VpnSitesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VpnSitesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(VpnSitesService.class); + this.client = client; + } + + /** + * The interface defining all the services for VpnSites to be + * used by Retrofit to perform actually REST calls. + */ + interface VpnSitesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VpnSites getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnSiteName") String vpnSiteName, @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.network.v2019_09_01.VpnSites createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnSiteName") String vpnSiteName, @Query("api-version") String apiVersion, @Body VpnSiteInner vpnSiteParameters, @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.network.v2019_09_01.VpnSites beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnSiteName") String vpnSiteName, @Query("api-version") String apiVersion, @Body VpnSiteInner vpnSiteParameters, @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.network.v2019_09_01.VpnSites updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}") + Observable> updateTags(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnSiteName") String vpnSiteName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject vpnSiteParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.VpnSites delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnSiteName") String vpnSiteName, @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.network.v2019_09_01.VpnSites beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vpnSiteName") String vpnSiteName, @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.network.v2019_09_01.VpnSites listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.VpnSites list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites") + Observable> list(@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.network.v2019_09_01.VpnSites 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.network.v2019_09_01.VpnSites listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves the details of a VPN site. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnSiteInner object if successful. + */ + public VpnSiteInner getByResourceGroup(String resourceGroupName, String vpnSiteName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vpnSiteName).toBlocking().single().body(); + } + + /** + * Retrieves the details of a VPN site. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being retrieved. + * @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 vpnSiteName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, vpnSiteName), serviceCallback); + } + + /** + * Retrieves the details of a VPN site. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnSiteInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String vpnSiteName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vpnSiteName).map(new Func1, VpnSiteInner>() { + @Override + public VpnSiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the details of a VPN site. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnSiteInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String vpnSiteName) { + 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 (vpnSiteName == null) { + throw new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, vpnSiteName, 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); + } + + /** + * Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being created or updated. + * @param vpnSiteParameters Parameters supplied to create or update VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnSiteInner object if successful. + */ + public VpnSiteInner createOrUpdate(String resourceGroupName, String vpnSiteName, VpnSiteInner vpnSiteParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, vpnSiteName, vpnSiteParameters).toBlocking().last().body(); + } + + /** + * Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being created or updated. + * @param vpnSiteParameters Parameters supplied to create or update VpnSite. + * @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 vpnSiteName, VpnSiteInner vpnSiteParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, vpnSiteName, vpnSiteParameters), serviceCallback); + } + + /** + * Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being created or updated. + * @param vpnSiteParameters Parameters supplied to create or update VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String vpnSiteName, VpnSiteInner vpnSiteParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, vpnSiteName, vpnSiteParameters).map(new Func1, VpnSiteInner>() { + @Override + public VpnSiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being created or updated. + * @param vpnSiteParameters Parameters supplied to create or update VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String vpnSiteName, VpnSiteInner vpnSiteParameters) { + 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 (vpnSiteName == null) { + throw new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null."); + } + if (vpnSiteParameters == null) { + throw new IllegalArgumentException("Parameter vpnSiteParameters is required and cannot be null."); + } + Validator.validate(vpnSiteParameters); + final String apiVersion = "2019-09-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, vpnSiteName, apiVersion, vpnSiteParameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being created or updated. + * @param vpnSiteParameters Parameters supplied to create or update VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnSiteInner object if successful. + */ + public VpnSiteInner beginCreateOrUpdate(String resourceGroupName, String vpnSiteName, VpnSiteInner vpnSiteParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vpnSiteName, vpnSiteParameters).toBlocking().single().body(); + } + + /** + * Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being created or updated. + * @param vpnSiteParameters Parameters supplied to create or update VpnSite. + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String vpnSiteName, VpnSiteInner vpnSiteParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vpnSiteName, vpnSiteParameters), serviceCallback); + } + + /** + * Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being created or updated. + * @param vpnSiteParameters Parameters supplied to create or update VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnSiteInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String vpnSiteName, VpnSiteInner vpnSiteParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vpnSiteName, vpnSiteParameters).map(new Func1, VpnSiteInner>() { + @Override + public VpnSiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being created or updated. + * @param vpnSiteParameters Parameters supplied to create or update VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnSiteInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String vpnSiteName, VpnSiteInner vpnSiteParameters) { + 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 (vpnSiteName == null) { + throw new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null."); + } + if (vpnSiteParameters == null) { + throw new IllegalArgumentException("Parameter vpnSiteParameters is required and cannot be null."); + } + Validator.validate(vpnSiteParameters); + final String apiVersion = "2019-09-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, vpnSiteName, apiVersion, vpnSiteParameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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 VpnSite tags. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnSiteInner object if successful. + */ + public VpnSiteInner updateTags(String resourceGroupName, String vpnSiteName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, vpnSiteName).toBlocking().single().body(); + } + + /** + * Updates VpnSite tags. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being updated. + * @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 updateTagsAsync(String resourceGroupName, String vpnSiteName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, vpnSiteName), serviceCallback); + } + + /** + * Updates VpnSite tags. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnSiteInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String vpnSiteName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, vpnSiteName).map(new Func1, VpnSiteInner>() { + @Override + public VpnSiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates VpnSite tags. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being updated. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnSiteInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String vpnSiteName) { + 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 (vpnSiteName == null) { + throw new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final Map tags = null; + TagsObject vpnSiteParameters = new TagsObject(); + vpnSiteParameters.withTags(null); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, vpnSiteName, apiVersion, this.client.acceptLanguage(), vpnSiteParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates VpnSite tags. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being updated. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 VpnSiteInner object if successful. + */ + public VpnSiteInner updateTags(String resourceGroupName, String vpnSiteName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, vpnSiteName, tags).toBlocking().single().body(); + } + + /** + * Updates VpnSite tags. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being updated. + * @param tags Resource tags. + * @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 updateTagsAsync(String resourceGroupName, String vpnSiteName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, vpnSiteName, tags), serviceCallback); + } + + /** + * Updates VpnSite tags. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being updated. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnSiteInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String vpnSiteName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, vpnSiteName, tags).map(new Func1, VpnSiteInner>() { + @Override + public VpnSiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates VpnSite tags. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being updated. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnSiteInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String vpnSiteName, Map tags) { + 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 (vpnSiteName == null) { + throw new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject vpnSiteParameters = new TagsObject(); + vpnSiteParameters.withTags(tags); + return service.updateTags(this.client.subscriptionId(), resourceGroupName, vpnSiteName, apiVersion, this.client.acceptLanguage(), vpnSiteParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(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 a VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 vpnSiteName) { + deleteWithServiceResponseAsync(resourceGroupName, vpnSiteName).toBlocking().last().body(); + } + + /** + * Deletes a VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being deleted. + * @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 vpnSiteName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vpnSiteName), serviceCallback); + } + + /** + * Deletes a VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String vpnSiteName) { + return deleteWithServiceResponseAsync(resourceGroupName, vpnSiteName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vpnSiteName) { + 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 (vpnSiteName == null) { + throw new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, vpnSiteName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 vpnSiteName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vpnSiteName).toBlocking().single().body(); + } + + /** + * Deletes a VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being deleted. + * @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 vpnSiteName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vpnSiteName), serviceCallback); + } + + /** + * Deletes a VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String vpnSiteName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vpnSiteName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a VpnSite. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @param vpnSiteName The name of the VpnSite being deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vpnSiteName) { + 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 (vpnSiteName == null) { + throw new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, vpnSiteName, 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); + } + + /** + * Lists all the vpnSites in a resource group. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VpnSiteInner> 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 all the vpnSites in a resource group. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @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 all the vpnSites in a resource group. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnSiteInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the vpnSites in a resource group. + * + * @param resourceGroupName The resource group name of the VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnSiteInner> 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 all the vpnSites in a resource group. + * + ServiceResponse> * @param resourceGroupName The resource group name of the VpnSite. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnSiteInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, 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 all the VpnSites in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<VpnSiteInner> 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 all the VpnSites in a subscription. + * + * @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 all the VpnSites in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnSiteInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VpnSites in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VpnSiteInner> 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 all the VpnSites in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnSiteInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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 all the vpnSites in a resource group. + * + * @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<VpnSiteInner> 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 all the vpnSites in a resource group. + * + * @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 all the vpnSites in a resource group. + * + * @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<VpnSiteInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the vpnSites in a resource group. + * + * @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<VpnSiteInner> 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 all the vpnSites in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnSiteInner> 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 all the VpnSites in a subscription. + * + * @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<VpnSiteInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the VpnSites in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the VpnSites in a subscription. + * + * @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<VpnSiteInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the VpnSites in a subscription. + * + * @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<VpnSiteInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the VpnSites in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VpnSiteInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPoliciesImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPoliciesImpl.java new file mode 100644 index 000000000000..66d80dde3e2d --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPoliciesImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.WebApplicationFirewallPolicies; +import com.microsoft.azure.management.network.v2019_09_01.WebApplicationFirewallPolicy; +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; + +class WebApplicationFirewallPoliciesImpl extends GroupableResourcesCoreImpl implements WebApplicationFirewallPolicies { + protected WebApplicationFirewallPoliciesImpl(NetworkManager manager) { + super(manager.inner().webApplicationFirewallPolicies(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + WebApplicationFirewallPoliciesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + WebApplicationFirewallPoliciesInner 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) { + WebApplicationFirewallPoliciesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + WebApplicationFirewallPoliciesInner 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 WebApplicationFirewallPolicy call(WebApplicationFirewallPolicyInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + WebApplicationFirewallPoliciesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + WebApplicationFirewallPoliciesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public WebApplicationFirewallPolicy call(WebApplicationFirewallPolicyInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public WebApplicationFirewallPolicyImpl define(String name) { + return wrapModel(name); + } + + @Override + protected WebApplicationFirewallPolicyImpl wrapModel(WebApplicationFirewallPolicyInner inner) { + return new WebApplicationFirewallPolicyImpl(inner.name(), inner, manager()); + } + + @Override + protected WebApplicationFirewallPolicyImpl wrapModel(String name) { + return new WebApplicationFirewallPolicyImpl(name, new WebApplicationFirewallPolicyInner(), this.manager()); + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPoliciesInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPoliciesInner.java new file mode 100644 index 000000000000..dd9572929956 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPoliciesInner.java @@ -0,0 +1,869 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_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.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 WebApplicationFirewallPolicies. + */ +public class WebApplicationFirewallPoliciesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private WebApplicationFirewallPoliciesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of WebApplicationFirewallPoliciesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public WebApplicationFirewallPoliciesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(WebApplicationFirewallPoliciesService.class); + this.client = client; + } + + /** + * The interface defining all the services for WebApplicationFirewallPolicies to be + * used by Retrofit to perform actually REST calls. + */ + interface WebApplicationFirewallPoliciesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.WebApplicationFirewallPolicies listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.v2019_09_01.WebApplicationFirewallPolicies list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies") + Observable> list(@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.network.v2019_09_01.WebApplicationFirewallPolicies getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("policyName") String policyName, @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.network.v2019_09_01.WebApplicationFirewallPolicies createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("policyName") String policyName, @Path("subscriptionId") String subscriptionId, @Body WebApplicationFirewallPolicyInner 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.network.v2019_09_01.WebApplicationFirewallPolicies delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("policyName") String policyName, @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.network.v2019_09_01.WebApplicationFirewallPolicies beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("policyName") String policyName, @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.network.v2019_09_01.WebApplicationFirewallPolicies 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.network.v2019_09_01.WebApplicationFirewallPolicies listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the protection policies within a resource group. + * + * @param resourceGroupName The name of the 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<WebApplicationFirewallPolicyInner> 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 all of the protection policies within a resource group. + * + * @param resourceGroupName The name of the 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 all of the protection policies within a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WebApplicationFirewallPolicyInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the protection policies within a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WebApplicationFirewallPolicyInner> 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 all of the protection policies within a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WebApplicationFirewallPolicyInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), 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 all the WAF policies in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<WebApplicationFirewallPolicyInner> 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 all the WAF policies in a subscription. + * + * @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 all the WAF policies in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WebApplicationFirewallPolicyInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the WAF policies in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WebApplicationFirewallPolicyInner> 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 all the WAF policies in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WebApplicationFirewallPolicyInner> 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."); + } + final String apiVersion = "2019-09-01"; + return service.list(this.client.subscriptionId(), 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); + } + + /** + * Retrieve protection policy with specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the 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 WebApplicationFirewallPolicyInner object if successful. + */ + public WebApplicationFirewallPolicyInner getByResourceGroup(String resourceGroupName, String policyName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, policyName).toBlocking().single().body(); + } + + /** + * Retrieve protection policy with specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the 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 getByResourceGroupAsync(String resourceGroupName, String policyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, policyName), serviceCallback); + } + + /** + * Retrieve protection policy with specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WebApplicationFirewallPolicyInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String policyName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, policyName).map(new Func1, WebApplicationFirewallPolicyInner>() { + @Override + public WebApplicationFirewallPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieve protection policy with specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WebApplicationFirewallPolicyInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String policyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getByResourceGroup(resourceGroupName, policyName, this.client.subscriptionId(), 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); + } + + /** + * Creates or update policy with specified rule set name within a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the policy. + * @param parameters Policy to be created. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 WebApplicationFirewallPolicyInner object if successful. + */ + public WebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupName, String policyName, WebApplicationFirewallPolicyInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, policyName, parameters).toBlocking().single().body(); + } + + /** + * Creates or update policy with specified rule set name within a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the policy. + * @param parameters Policy to be created. + * @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 policyName, WebApplicationFirewallPolicyInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, policyName, parameters), serviceCallback); + } + + /** + * Creates or update policy with specified rule set name within a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the policy. + * @param parameters Policy to be created. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WebApplicationFirewallPolicyInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String policyName, WebApplicationFirewallPolicyInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, policyName, parameters).map(new Func1, WebApplicationFirewallPolicyInner>() { + @Override + public WebApplicationFirewallPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or update policy with specified rule set name within a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the policy. + * @param parameters Policy to be created. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WebApplicationFirewallPolicyInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String policyName, WebApplicationFirewallPolicyInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName 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."); + } + Validator.validate(parameters); + final String apiVersion = "2019-09-01"; + return service.createOrUpdate(resourceGroupName, policyName, this.client.subscriptionId(), parameters, 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()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes Policy. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the 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 + */ + public void delete(String resourceGroupName, String policyName) { + deleteWithServiceResponseAsync(resourceGroupName, policyName).toBlocking().last().body(); + } + + /** + * Deletes Policy. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the 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 deleteAsync(String resourceGroupName, String policyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, policyName), serviceCallback); + } + + /** + * Deletes Policy. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String policyName) { + return deleteWithServiceResponseAsync(resourceGroupName, policyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes Policy. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String policyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + Observable> observable = service.delete(resourceGroupName, policyName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes Policy. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the 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 + */ + public void beginDelete(String resourceGroupName, String policyName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, policyName).toBlocking().single().body(); + } + + /** + * Deletes Policy. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the 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 beginDeleteAsync(String resourceGroupName, String policyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, policyName), serviceCallback); + } + + /** + * Deletes Policy. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String policyName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, policyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes Policy. + * + * @param resourceGroupName The name of the resource group. + * @param policyName The name of the policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String policyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (policyName == null) { + throw new IllegalArgumentException("Parameter policyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginDelete(resourceGroupName, policyName, this.client.subscriptionId(), 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); + } + + /** + * Lists all of the protection policies within a resource group. + * + * @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<WebApplicationFirewallPolicyInner> 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 all of the protection policies within a resource group. + * + * @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 all of the protection policies within a resource group. + * + * @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<WebApplicationFirewallPolicyInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the protection policies within a resource group. + * + * @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<WebApplicationFirewallPolicyInner> 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 all of the protection policies within a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WebApplicationFirewallPolicyInner> 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 all the WAF policies in a subscription. + * + * @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<WebApplicationFirewallPolicyInner> 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 all the WAF policies in a subscription. + * + * @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 all the WAF policies in a subscription. + * + * @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<WebApplicationFirewallPolicyInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the WAF policies in a subscription. + * + * @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<WebApplicationFirewallPolicyInner> 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 all the WAF policies in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WebApplicationFirewallPolicyInner> 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/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPolicyImpl.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPolicyImpl.java new file mode 100644 index 000000000000..56076e38bbb6 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPolicyImpl.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.network.v2019_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.network.v2019_09_01.WebApplicationFirewallPolicy; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_09_01.PolicySettings; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.WebApplicationFirewallCustomRule; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.WebApplicationFirewallPolicyResourceState; +import com.microsoft.azure.management.network.v2019_09_01.ManagedRulesDefinition; +import com.microsoft.azure.SubResource; +import java.util.ArrayList; +import com.microsoft.azure.management.network.v2019_09_01.ApplicationGateway; + +class WebApplicationFirewallPolicyImpl extends GroupableResourceCoreImpl implements WebApplicationFirewallPolicy, WebApplicationFirewallPolicy.Definition, WebApplicationFirewallPolicy.Update { + WebApplicationFirewallPolicyImpl(String name, WebApplicationFirewallPolicyInner inner, NetworkManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + WebApplicationFirewallPoliciesInner client = this.manager().inner().webApplicationFirewallPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebApplicationFirewallPoliciesInner client = this.manager().inner().webApplicationFirewallPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebApplicationFirewallPoliciesInner client = this.manager().inner().webApplicationFirewallPolicies(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public List applicationGateways() { + List lst = new ArrayList(); + if (this.inner().applicationGateways() != null) { + for (ApplicationGatewayInner inner : this.inner().applicationGateways()) { + lst.add( new ApplicationGatewayImpl(inner.name(), inner, manager())); + } + } + return lst; + } + + @Override + public List customRules() { + return this.inner().customRules(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public List httpListeners() { + return this.inner().httpListeners(); + } + + @Override + public ManagedRulesDefinition managedRules() { + return this.inner().managedRules(); + } + + @Override + public List pathBasedRules() { + return this.inner().pathBasedRules(); + } + + @Override + public PolicySettings policySettings() { + return this.inner().policySettings(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public WebApplicationFirewallPolicyResourceState resourceState() { + return this.inner().resourceState(); + } + + @Override + public WebApplicationFirewallPolicyImpl withManagedRules(ManagedRulesDefinition managedRules) { + this.inner().withManagedRules(managedRules); + return this; + } + + @Override + public WebApplicationFirewallPolicyImpl withCustomRules(List customRules) { + this.inner().withCustomRules(customRules); + return this; + } + + @Override + public WebApplicationFirewallPolicyImpl withPolicySettings(PolicySettings policySettings) { + this.inner().withPolicySettings(policySettings); + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPolicyInner.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPolicyInner.java new file mode 100644 index 000000000000..09095cff271c --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPolicyInner.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.PolicySettings; +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.WebApplicationFirewallCustomRule; +import com.microsoft.azure.management.network.v2019_09_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_09_01.WebApplicationFirewallPolicyResourceState; +import com.microsoft.azure.management.network.v2019_09_01.ManagedRulesDefinition; +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Defines web application firewall policy. + */ +@JsonFlatten +@SkipParentValidation +public class WebApplicationFirewallPolicyInner extends Resource { + /** + * Describes policySettings for policy. + */ + @JsonProperty(value = "properties.policySettings") + private PolicySettings policySettings; + + /** + * Describes custom rules inside the policy. + */ + @JsonProperty(value = "properties.customRules") + private List customRules; + + /** + * A collection of references to application gateways. + */ + @JsonProperty(value = "properties.applicationGateways", access = JsonProperty.Access.WRITE_ONLY) + private List applicationGateways; + + /** + * The provisioning state of the web application firewall policy resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Resource status of the policy. + * Resource status of the policy. Possible values include: 'Creating', + * 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting'. + */ + @JsonProperty(value = "properties.resourceState", access = JsonProperty.Access.WRITE_ONLY) + private WebApplicationFirewallPolicyResourceState resourceState; + + /** + * Describes the managedRules structure. + */ + @JsonProperty(value = "properties.managedRules", required = true) + private ManagedRulesDefinition managedRules; + + /** + * A collection of references to application gateway http listeners. + */ + @JsonProperty(value = "properties.httpListeners", access = JsonProperty.Access.WRITE_ONLY) + private List httpListeners; + + /** + * A collection of references to application gateway path rules. + */ + @JsonProperty(value = "properties.pathBasedRules", access = JsonProperty.Access.WRITE_ONLY) + private List pathBasedRules; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get describes policySettings for policy. + * + * @return the policySettings value + */ + public PolicySettings policySettings() { + return this.policySettings; + } + + /** + * Set describes policySettings for policy. + * + * @param policySettings the policySettings value to set + * @return the WebApplicationFirewallPolicyInner object itself. + */ + public WebApplicationFirewallPolicyInner withPolicySettings(PolicySettings policySettings) { + this.policySettings = policySettings; + return this; + } + + /** + * Get describes custom rules inside the policy. + * + * @return the customRules value + */ + public List customRules() { + return this.customRules; + } + + /** + * Set describes custom rules inside the policy. + * + * @param customRules the customRules value to set + * @return the WebApplicationFirewallPolicyInner object itself. + */ + public WebApplicationFirewallPolicyInner withCustomRules(List customRules) { + this.customRules = customRules; + return this; + } + + /** + * Get a collection of references to application gateways. + * + * @return the applicationGateways value + */ + public List applicationGateways() { + return this.applicationGateways; + } + + /** + * Get the provisioning state of the web application firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get resource status of the policy. Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting'. + * + * @return the resourceState value + */ + public WebApplicationFirewallPolicyResourceState resourceState() { + return this.resourceState; + } + + /** + * Get describes the managedRules structure. + * + * @return the managedRules value + */ + public ManagedRulesDefinition managedRules() { + return this.managedRules; + } + + /** + * Set describes the managedRules structure. + * + * @param managedRules the managedRules value to set + * @return the WebApplicationFirewallPolicyInner object itself. + */ + public WebApplicationFirewallPolicyInner withManagedRules(ManagedRulesDefinition managedRules) { + this.managedRules = managedRules; + return this; + } + + /** + * Get a collection of references to application gateway http listeners. + * + * @return the httpListeners value + */ + public List httpListeners() { + return this.httpListeners; + } + + /** + * Get a collection of references to application gateway path rules. + * + * @return the pathBasedRules value + */ + public List pathBasedRules() { + return this.pathBasedRules; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the WebApplicationFirewallPolicyInner object itself. + */ + public WebApplicationFirewallPolicyInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/package-info.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/package-info.java new file mode 100644 index 000000000000..c2ee5c353156 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_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 NetworkManagementClient. + * Network Client. + */ +package com.microsoft.azure.management.network.v2019_09_01.implementation; diff --git a/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/package-info.java b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/package-info.java new file mode 100644 index 000000000000..01af4b71bae1 --- /dev/null +++ b/network/resource-manager/v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_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 NetworkManagementClient. + * Network Client. + */ +package com.microsoft.azure.management.network.v2019_09_01; From 2eab1034f27b0baae21c8ca57a228d2cb2852678 Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Tue, 22 Oct 2019 22:16:16 -0700 Subject: [PATCH 46/64] DataMigration: regenerate package-2018-07-15-preview (#5983) --- .../v2018_07_15_preview/pom.xml | 2 +- .../CheckOCIDriverTaskOutput.java | 18 ++++-- .../CheckOCIDriverTaskProperties.java | 2 +- .../ConnectToMongoDbTaskProperties.java | 2 +- .../ConnectToSourceMySqlTaskProperties.java | 2 +- ...nnectToSourceOracleSyncTaskProperties.java | 2 +- ...tToSourcePostgreSqlSyncTaskProperties.java | 2 +- ...ctToSourceSqlServerSyncTaskProperties.java | 2 +- .../ConnectToSourceSqlServerTaskOutput.java | 2 +- ...ourceSqlServerTaskOutputAgentJobLevel.java | 2 +- ...ourceSqlServerTaskOutputDatabaseLevel.java | 2 +- ...ToSourceSqlServerTaskOutputLoginLevel.java | 2 +- ...tToSourceSqlServerTaskOutputTaskLevel.java | 2 +- ...onnectToSourceSqlServerTaskProperties.java | 2 +- ...ToTargetAzureDbForMySqlTaskProperties.java | 2 +- ...zureDbForPostgreSqlSyncTaskProperties.java | 2 +- ...zureDbForPostgreSqlSyncTaskProperties.java | 2 +- .../ConnectToTargetSqlDbTaskProperties.java | 2 +- ...onnectToTargetSqlMISyncTaskProperties.java | 2 +- .../ConnectToTargetSqlMITaskProperties.java | 2 +- ...ectToTargetSqlSqlDbSyncTaskProperties.java | 2 +- .../v2018_07_15_preview/ConnectionInfo.java | 47 +-------------- .../GetTdeCertificatesSqlTaskProperties.java | 2 +- .../GetUserTablesOracleTaskProperties.java | 2 +- ...GetUserTablesPostgreSqlTaskProperties.java | 2 +- .../GetUserTablesSqlSyncTaskProperties.java | 2 +- .../GetUserTablesSqlTaskProperties.java | 2 +- .../InstallOCIDriverTaskProperties.java | 2 +- .../MiSqlConnectionInfo.java | 2 +- ...igrateMISyncCompleteCommandProperties.java | 2 +- .../MigrateMongoDbTaskProperties.java | 2 +- ...ateMySqlAzureDbForMySqlSyncTaskOutput.java | 2 +- ...DbForMySqlSyncTaskOutputDatabaseError.java | 2 +- ...DbForMySqlSyncTaskOutputDatabaseLevel.java | 2 +- ...SqlAzureDbForMySqlSyncTaskOutputError.java | 2 +- ...bForMySqlSyncTaskOutputMigrationLevel.java | 2 +- ...ureDbForMySqlSyncTaskOutputTableLevel.java | 2 +- ...ySqlAzureDbForMySqlSyncTaskProperties.java | 2 +- ...zureDbForPostgreSqlSyncTaskProperties.java | 2 +- ...OracleAzureDbPostgreSqlSyncTaskOutput.java | 2 +- ...PostgreSqlSyncTaskOutputDatabaseError.java | 2 +- ...PostgreSqlSyncTaskOutputDatabaseLevel.java | 2 +- ...eAzureDbPostgreSqlSyncTaskOutputError.java | 2 +- ...ostgreSqlSyncTaskOutputMigrationLevel.java | 2 +- ...eDbPostgreSqlSyncTaskOutputTableLevel.java | 2 +- ...SqlAzureDbForPostgreSqlSyncTaskOutput.java | 2 +- ...PostgreSqlSyncTaskOutputDatabaseError.java | 2 +- ...PostgreSqlSyncTaskOutputDatabaseLevel.java | 2 +- ...ureDbForPostgreSqlSyncTaskOutputError.java | 2 +- ...ostgreSqlSyncTaskOutputMigrationLevel.java | 2 +- ...ForPostgreSqlSyncTaskOutputTableLevel.java | 2 +- ...zureDbForPostgreSqlSyncTaskProperties.java | 2 +- ...MigrateSchemaSqlServerSqlDbTaskOutput.java | 2 +- ...SqlServerSqlDbTaskOutputDatabaseLevel.java | 2 +- ...teSchemaSqlServerSqlDbTaskOutputError.java | 2 +- ...qlServerSqlDbTaskOutputMigrationLevel.java | 2 +- ...ateSchemaSqlServerSqlDbTaskProperties.java | 2 +- .../MigrateSchemaSqlTaskOutputError.java | 2 +- .../MigrateSqlServerSqlDbSyncTaskOutput.java | 2 +- ...erverSqlDbSyncTaskOutputDatabaseError.java | 2 +- ...erverSqlDbSyncTaskOutputDatabaseLevel.java | 2 +- ...rateSqlServerSqlDbSyncTaskOutputError.java | 2 +- ...rverSqlDbSyncTaskOutputMigrationLevel.java | 2 +- ...qlServerSqlDbSyncTaskOutputTableLevel.java | 2 +- ...grateSqlServerSqlDbSyncTaskProperties.java | 2 +- .../MigrateSqlServerSqlDbTaskOutput.java | 2 +- ...SqlServerSqlDbTaskOutputDatabaseLevel.java | 2 +- .../MigrateSqlServerSqlDbTaskOutputError.java | 2 +- ...qlServerSqlDbTaskOutputMigrationLevel.java | 2 +- ...ateSqlServerSqlDbTaskOutputTableLevel.java | 2 +- .../MigrateSqlServerSqlDbTaskProperties.java | 2 +- .../MigrateSqlServerSqlMISyncTaskOutput.java | 2 +- ...erverSqlMISyncTaskOutputDatabaseLevel.java | 2 +- ...rateSqlServerSqlMISyncTaskOutputError.java | 2 +- ...rverSqlMISyncTaskOutputMigrationLevel.java | 2 +- ...grateSqlServerSqlMISyncTaskProperties.java | 2 +- .../MigrateSqlServerSqlMITaskInput.java | 28 +++++++++ .../MigrateSqlServerSqlMITaskOutput.java | 2 +- ...SqlServerSqlMITaskOutputAgentJobLevel.java | 2 +- ...SqlServerSqlMITaskOutputDatabaseLevel.java | 2 +- .../MigrateSqlServerSqlMITaskOutputError.java | 2 +- ...ateSqlServerSqlMITaskOutputLoginLevel.java | 2 +- ...qlServerSqlMITaskOutputMigrationLevel.java | 2 +- .../MigrateSqlServerSqlMITaskProperties.java | 2 +- .../MigrateSsisTaskOutput.java | 2 +- .../MigrateSsisTaskOutputMigrationLevel.java | 2 +- .../MigrateSsisTaskOutputProjectLevel.java | 2 +- .../MigrateSsisTaskProperties.java | 2 +- .../MigrateSyncCompleteCommandProperties.java | 2 +- .../MigrationEligibilityInfo.java | 10 ++-- .../MongoDbCancelCommand.java | 2 +- .../MongoDbConnectionInfo.java | 2 +- .../MongoDbFinishCommand.java | 2 +- .../MongoDbRestartCommand.java | 2 +- .../MySqlConnectionInfo.java | 2 +- .../OracleConnectionInfo.java | 2 +- .../PostgreSqlConnectionInfo.java | 2 +- .../ProjectTaskProperties.java | 15 +---- .../SqlConnectionInfo.java | 2 +- .../UploadOCIDriverTaskProperties.java | 2 +- ...InputSqlServerSqlDbSyncTaskProperties.java | 2 +- ...InputSqlServerSqlMISyncTaskProperties.java | 2 +- ...tionInputSqlServerSqlMITaskProperties.java | 2 +- .../ValidateMongoDbTaskProperties.java | 2 +- ...zureDbForPostgreSqlSyncTaskProperties.java | 2 +- .../CommandPropertiesInner.java | 57 ++++--------------- 106 files changed, 162 insertions(+), 213 deletions(-) diff --git a/datamigration/resource-manager/v2018_07_15_preview/pom.xml b/datamigration/resource-manager/v2018_07_15_preview/pom.xml index 8b29ac9b9adb..07c1056a8b1a 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/pom.xml +++ b/datamigration/resource-manager/v2018_07_15_preview/pom.xml @@ -15,7 +15,7 @@ ../../../pom.management.xml azure-mgmt-datamigration - 1.0.0-beta-1 + 1.0.0-beta-2 jar Microsoft Azure SDK for DataMigration Management This package contains Microsoft DataMigration Management SDK. diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskOutput.java index 79581c783cda..23c37ddc77e0 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskOutput.java @@ -8,7 +8,6 @@ package com.microsoft.azure.management.datamigration.v2018_07_15_preview; -import java.util.Map; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; @@ -19,8 +18,8 @@ public class CheckOCIDriverTaskOutput { /** * Information about the installed driver if found and valid. */ - @JsonProperty(value = "installedDriver", access = JsonProperty.Access.WRITE_ONLY) - private Map> installedDriver; + @JsonProperty(value = "installedDriver") + private OracleOCIDriverInfo installedDriver; /** * Validation errors. @@ -33,10 +32,21 @@ public class CheckOCIDriverTaskOutput { * * @return the installedDriver value */ - public Map> installedDriver() { + public OracleOCIDriverInfo installedDriver() { return this.installedDriver; } + /** + * Set information about the installed driver if found and valid. + * + * @param installedDriver the installedDriver value to set + * @return the CheckOCIDriverTaskOutput object itself. + */ + public CheckOCIDriverTaskOutput withInstalledDriver(OracleOCIDriverInfo installedDriver) { + this.installedDriver = installedDriver; + return this; + } + /** * Get validation errors. * diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskProperties.java index 8eb79918ac8c..a5b089fe5730 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskProperties.java @@ -16,7 +16,7 @@ /** * Properties for the task that checks for OCI drivers. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = CheckOCIDriverTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Service.Check.OCI") public class CheckOCIDriverTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToMongoDbTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToMongoDbTaskProperties.java index 9477624b0c36..0d5f978e4b7c 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToMongoDbTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToMongoDbTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates the connection to and provides * information about a MongoDB server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToMongoDbTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Connect.MongoDb") public class ConnectToMongoDbTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceMySqlTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceMySqlTaskProperties.java index 1c0bb1755b48..f8719ccfacc5 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceMySqlTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceMySqlTaskProperties.java @@ -16,7 +16,7 @@ /** * Properties for the task that validates MySQL database connection. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToSourceMySqlTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ConnectToSource.MySql") public class ConnectToSourceMySqlTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskProperties.java index a76f8051037f..9b8a9fa4306e 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskProperties.java @@ -16,7 +16,7 @@ /** * Properties for the task that validates Oracle database connection. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToSourceOracleSyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ConnectToSource.Oracle.Sync") public class ConnectToSourceOracleSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskProperties.java index 7baf6ccc0153..6cd8a9826041 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to PostgreSQL server and * source server requirements for online migration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToSourcePostgreSqlSyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ConnectToSource.PostgreSql.Sync") public class ConnectToSourcePostgreSqlSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerSyncTaskProperties.java index 1dee0528673e..f3a6974a86ad 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to SQL Server and source * server requirements for online migration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToSourceSqlServerSyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ConnectToSource.SqlServer.Sync") public class ConnectToSourceSqlServerSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutput.java index b1dea666688a..c21fd4845606 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutput.java @@ -17,7 +17,7 @@ * Output for the task that validates connection to SQL Server and also * validates source server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = ConnectToSourceSqlServerTaskOutput.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("ConnectToSourceSqlServerTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "AgentJobLevelOutput", value = ConnectToSourceSqlServerTaskOutputAgentJobLevel.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java index ce3fa6d859a4..6fad4be12de2 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java @@ -18,7 +18,7 @@ * Agent Job level output for the task that validates connection to SQL Server * and also validates source server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = ConnectToSourceSqlServerTaskOutputAgentJobLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("AgentJobLevelOutput") public class ConnectToSourceSqlServerTaskOutputAgentJobLevel extends ConnectToSourceSqlServerTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java index 0fb4f60f4dc7..25f294d2a841 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java @@ -17,7 +17,7 @@ * Database level output for the task that validates connection to SQL Server * and also validates source server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = ConnectToSourceSqlServerTaskOutputDatabaseLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelOutput") public class ConnectToSourceSqlServerTaskOutputDatabaseLevel extends ConnectToSourceSqlServerTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java index 83e4ca0b704c..f4cbbae769c5 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java @@ -16,7 +16,7 @@ * Login level output for the task that validates connection to SQL Server and * also validates source server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = ConnectToSourceSqlServerTaskOutputLoginLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("LoginLevelOutput") public class ConnectToSourceSqlServerTaskOutputLoginLevel extends ConnectToSourceSqlServerTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java index 403532deab09..e1b1870bda07 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java @@ -18,7 +18,7 @@ * Task level output for the task that validates connection to SQL Server and * also validates source server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = ConnectToSourceSqlServerTaskOutputTaskLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("TaskLevelOutput") public class ConnectToSourceSqlServerTaskOutputTaskLevel extends ConnectToSourceSqlServerTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskProperties.java index 1cd0abb274cb..50c0c18713d0 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to SQL Server and also * validates source server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToSourceSqlServerTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ConnectToSource.SqlServer") public class ConnectToSourceSqlServerTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskProperties.java index 79fa93730ad5..0ba4955a2809 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to Azure Database for * MySQL and target server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetAzureDbForMySqlTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ConnectToTarget.AzureDbForMySql") public class ConnectToTargetAzureDbForMySqlTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.java index 5634c372d5fe..8ac06066f8ea 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to Azure Database For * PostgreSQL server and target server requirements for online migration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ConnectToTarget.AzureDbForPostgreSql.Sync") public class ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.java index 871ab0a66616..4ffb4c2033e7 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.java @@ -18,7 +18,7 @@ * PostgreSQL server and target server requirements for online migration for * Oracle source. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync") public class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlDbTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlDbTaskProperties.java index f1e95979af9a..41bf8703326e 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlDbTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlDbTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to SQL DB and target * server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetSqlDbTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ConnectToTarget.SqlDb") public class ConnectToTargetSqlDbTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskProperties.java index e519cb6fc76a..a5ab5302bcb3 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to Azure SQL Database * Managed Instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetSqlMISyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ConnectToTarget.AzureSqlDbMI.Sync.LRS") public class ConnectToTargetSqlMISyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMITaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMITaskProperties.java index 2e607944fb82..faea27badcd5 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMITaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMITaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to Azure SQL Database * Managed Instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetSqlMITaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ConnectToTarget.AzureSqlDbMI") public class ConnectToTargetSqlMITaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskProperties.java index b888fe78181c..a9f1f370bc61 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to SQL DB and target * server requirements for online migration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetSqlSqlDbSyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ConnectToTarget.SqlDb.Sync") public class ConnectToTargetSqlSqlDbSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectionInfo.java index 79d4024da87f..ae08307b8d30 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectionInfo.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectionInfo.java @@ -16,56 +16,15 @@ /** * Defines the connection properties of a server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = ConnectionInfo.class) -@JsonTypeName("Unknown") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("ConnectionInfo") @JsonSubTypes({ - @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureDbSqlMi.Complete", value = MigrateMISyncCompleteCommandProperties.class), - @JsonSubTypes.Type(name = "Migrate.Sync.Complete.Database", value = MigrateSyncCompleteCommandProperties.class), @JsonSubTypes.Type(name = "MiSqlConnectionInfo", value = MiSqlConnectionInfo.class), @JsonSubTypes.Type(name = "PostgreSqlConnectionInfo", value = PostgreSqlConnectionInfo.class), @JsonSubTypes.Type(name = "OracleConnectionInfo", value = OracleConnectionInfo.class), @JsonSubTypes.Type(name = "MySqlConnectionInfo", value = MySqlConnectionInfo.class), @JsonSubTypes.Type(name = "MongoDbConnectionInfo", value = MongoDbConnectionInfo.class), - @JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class), - @JsonSubTypes.Type(name = "Migrate.Ssis", value = MigrateSsisTaskProperties.class), - @JsonSubTypes.Type(name = "GetTDECertificates.Sql", value = GetTdeCertificatesSqlTaskProperties.class), - @JsonSubTypes.Type(name = "Validate.Oracle.AzureDbPostgreSql.Sync", value = ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "Validate.MongoDb", value = ValidateMongoDbTaskProperties.class), - @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", value = ValidateMigrationInputSqlServerSqlMISyncTaskProperties.class), - @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI", value = ValidateMigrationInputSqlServerSqlMITaskProperties.class), - @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.SqlDb.Sync", value = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.Oracle.AzureDbForPostgreSql.Sync", value = MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.PostgreSql.AzureDbForPostgreSql.Sync", value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.MySql.AzureDbForMySql.Sync", value = MigrateMySqlAzureDbForMySqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDb.Sync", value = MigrateSqlServerSqlDbSyncTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.SqlServer.SqlDb", value = MigrateSqlServerSqlDbTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", value = MigrateSqlServerSqlMISyncTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDbMI", value = MigrateSqlServerSqlMITaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.MongoDb", value = MigrateMongoDbTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.AzureDbForMySql", value = ConnectToTargetAzureDbForMySqlTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI.Sync.LRS", value = ConnectToTargetSqlMISyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI", value = ConnectToTargetSqlMITaskProperties.class), - @JsonSubTypes.Type(name = "GetUserTablesPostgreSql", value = GetUserTablesPostgreSqlTaskProperties.class), - @JsonSubTypes.Type(name = "GetUserTablesOracle", value = GetUserTablesOracleTaskProperties.class), - @JsonSubTypes.Type(name = "GetUserTables.AzureSqlDb.Sync", value = GetUserTablesSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", value = ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.AzureDbForPostgreSql.Sync", value = ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb.Sync", value = ConnectToTargetSqlSqlDbSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToSource.Oracle.Sync", value = ConnectToSourceOracleSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToSource.PostgreSql.Sync", value = ConnectToSourcePostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToSource.SqlServer.Sync", value = ConnectToSourceSqlServerSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToSource.SqlServer", value = ConnectToSourceSqlServerTaskProperties.class), - @JsonSubTypes.Type(name = "Connect.MongoDb", value = ConnectToMongoDbTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToSource.MySql", value = ConnectToSourceMySqlTaskProperties.class), - @JsonSubTypes.Type(name = "MigrateSchemaSqlServerSqlDb", value = MigrateSchemaSqlServerSqlDbTaskProperties.class), - @JsonSubTypes.Type(name = "cancel", value = MongoDbCancelCommand.class), - @JsonSubTypes.Type(name = "finish", value = MongoDbFinishCommand.class), - @JsonSubTypes.Type(name = "restart", value = MongoDbRestartCommand.class), - @JsonSubTypes.Type(name = "Service.Check.OCI", value = CheckOCIDriverTaskProperties.class), - @JsonSubTypes.Type(name = "Service.Upload.OCI", value = UploadOCIDriverTaskProperties.class), - @JsonSubTypes.Type(name = "Service.Install.OCI", value = InstallOCIDriverTaskProperties.class) + @JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class) }) public class ConnectionInfo { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetTdeCertificatesSqlTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetTdeCertificatesSqlTaskProperties.java index 0c8521e017be..859c4d2e44e7 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetTdeCertificatesSqlTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetTdeCertificatesSqlTaskProperties.java @@ -16,7 +16,7 @@ /** * Properties for the task that gets TDE certificates in Base64 encoded format. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = GetTdeCertificatesSqlTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("GetTDECertificates.Sql") public class GetTdeCertificatesSqlTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskProperties.java index f4cf0aae0b76..f7fb40d0ee50 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that collects user tables for the given list of * Oracle schemas. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = GetUserTablesOracleTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("GetUserTablesOracle") public class GetUserTablesOracleTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskProperties.java index e96ec1e90903..7dfb89f53f9f 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that collects user tables for the given list of * databases. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = GetUserTablesPostgreSqlTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("GetUserTablesPostgreSql") public class GetUserTablesPostgreSqlTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlSyncTaskProperties.java index c5403146628a..6fc255df11d1 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that collects user tables for the given list of * databases. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = GetUserTablesSqlSyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("GetUserTables.AzureSqlDb.Sync") public class GetUserTablesSqlSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlTaskProperties.java index 21e987b48f37..d3e975fd41b5 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that collects user tables for the given list of * databases. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = GetUserTablesSqlTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("GetUserTables.Sql") public class GetUserTablesSqlTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskProperties.java index 86443cf43865..f1c986fcac5d 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskProperties.java @@ -16,7 +16,7 @@ /** * Properties for the task that installs an OCI driver. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = InstallOCIDriverTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Service.Install.OCI") public class InstallOCIDriverTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MiSqlConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MiSqlConnectionInfo.java index 0c68a37e473b..c7574aff28f7 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MiSqlConnectionInfo.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MiSqlConnectionInfo.java @@ -16,7 +16,7 @@ * Properties required to create a connection to Azure SQL database Managed * instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = MiSqlConnectionInfo.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("MiSqlConnectionInfo") public class MiSqlConnectionInfo extends ConnectionInfo { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandProperties.java index b694c2c81168..2635c744151f 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandProperties.java @@ -17,7 +17,7 @@ * Properties for the command that completes online migration for an Azure SQL * Database Managed Instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType", defaultImpl = MigrateMISyncCompleteCommandProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") @JsonTypeName("Migrate.SqlServer.AzureDbSqlMi.Complete") public class MigrateMISyncCompleteCommandProperties extends CommandPropertiesInner { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMongoDbTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMongoDbTaskProperties.java index 0a05721e7f53..3783388278f6 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMongoDbTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMongoDbTaskProperties.java @@ -16,7 +16,7 @@ /** * Properties for the task that migrates data between MongoDB data sources. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateMongoDbTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Migrate.MongoDb") public class MigrateMongoDbTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java index adab82444daa..65519021593f 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java @@ -17,7 +17,7 @@ * Output for the task that migrates MySQL databases to Azure Database for * MySQL for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskOutput.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrateMySqlAzureDbForMySqlSyncTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "DatabaseLevelErrorOutput", value = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java index 49cbcc1b03f7..75a8a0837b7b 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java @@ -16,7 +16,7 @@ /** * The MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelErrorOutput") public class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java index 5e9ef0029d43..54e7ede733d7 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java @@ -16,7 +16,7 @@ /** * The MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelOutput") public class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java index 9633409eb9ee..c6f586d45a32 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateMySqlAzureDbForMySqlSyncTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskOutputError.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("ErrorOutput") public class MigrateMySqlAzureDbForMySqlSyncTaskOutputError extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java index fd30236afc58..f905f16855a4 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java @@ -16,7 +16,7 @@ /** * The MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrationLevelOutput") public class MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java index 9b714b311904..10a44aea9873 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java @@ -16,7 +16,7 @@ /** * The MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("TableLevelOutput") public class MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java index c2110fb52f59..eb6da201f3af 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that migrates MySQL databases to Azure Database for * MySQL for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Migrate.MySql.AzureDbForMySql.Sync") public class MigrateMySqlAzureDbForMySqlSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.java index 08fa5d22ac40..c3a8b5406ba4 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that migrates Oracle to Azure Database for * PostgreSQL for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Migrate.Oracle.AzureDbForPostgreSql.Sync") public class MigrateOracleAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutput.java index 042c9e737263..c5ffdd029668 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutput.java @@ -17,7 +17,7 @@ * Output for the task that migrates Oracle databases to Azure Database for * PostgreSQL for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateOracleAzureDbPostgreSqlSyncTaskOutput.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrateOracleAzureDbPostgreSqlSyncTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "DatabaseLevelErrorOutput", value = MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError.java index 3cf00268fbc6..9d4e7e395033 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError.java @@ -16,7 +16,7 @@ /** * The MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelErrorOutput") public class MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError extends MigrateOracleAzureDbPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel.java index e95d9e5c96c4..328abf1e0435 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel.java @@ -16,7 +16,7 @@ /** * The MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelOutput") public class MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel extends MigrateOracleAzureDbPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputError.java index 5465992358b7..bc8fbde55397 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateOracleAzureDbPostgreSqlSyncTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateOracleAzureDbPostgreSqlSyncTaskOutputError.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("ErrorOutput") public class MigrateOracleAzureDbPostgreSqlSyncTaskOutputError extends MigrateOracleAzureDbPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel.java index d68477fbb43c..3a769979ac39 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel.java @@ -16,7 +16,7 @@ /** * The MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrationLevelOutput") public class MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel extends MigrateOracleAzureDbPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel.java index c862f841e342..758e8a402aba 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel.java @@ -16,7 +16,7 @@ /** * The MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("TableLevelOutput") public class MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel extends MigrateOracleAzureDbPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java index 84715f9f89f8..b2caf288b8bd 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java @@ -17,7 +17,7 @@ * Output for the task that migrates PostgreSQL databases to Azure Database for * PostgreSQL for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "DatabaseLevelErrorOutput", value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java index 26ec9b044bf3..fde8231b698d 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java @@ -16,7 +16,7 @@ /** * The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelErrorOutput") public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java index 44467bca1be3..a759838cb565 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java @@ -16,7 +16,7 @@ /** * The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelOutput") public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java index 1884024a209e..599359a2a16b 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("ErrorOutput") public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java index 034fd6b91f0f..98b491f20e27 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java @@ -16,7 +16,7 @@ /** * The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrationLevelOutput") public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java index 9755fe4ab717..b6110c68117c 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java @@ -16,7 +16,7 @@ /** * The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("TableLevelOutput") public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java index 6ab70240201f..7dc6e5a45e71 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that migrates PostgreSQL databases to Azure Database * for PostgreSQL for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Migrate.PostgreSql.AzureDbForPostgreSql.Sync") public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutput.java index c4d5d10fc6ac..459900dadd05 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutput.java @@ -17,7 +17,7 @@ * Output for the task that migrates Schema for SQL Server databases to Azure * SQL databases. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSchemaSqlServerSqlDbTaskOutput.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrateSchemaSqlServerSqlDbTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.java index 59bd26ec0a1f..35925e75b8e4 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.java @@ -16,7 +16,7 @@ /** * The MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelOutput") public class MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel extends MigrateSchemaSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputError.java index fe927a0aae77..3a9a777ec600 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateSchemaSqlServerSqlDbTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSchemaSqlServerSqlDbTaskOutputError.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("SchemaErrorOutput") public class MigrateSchemaSqlServerSqlDbTaskOutputError extends MigrateSchemaSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.java index d5f547f9f36c..7700414a53eb 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.java @@ -16,7 +16,7 @@ /** * The MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrationLevelOutput") public class MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel extends MigrateSchemaSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskProperties.java index ffb3f23d7701..7b23c0e96a5f 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskProperties.java @@ -17,7 +17,7 @@ * Properties for task that migrates Schema for SQL Server databases to Azure * SQL databases. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateSchemaSqlServerSqlDbTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("MigrateSchemaSqlServerSqlDb") public class MigrateSchemaSqlServerSqlDbTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlTaskOutputError.java index 6b5d66a50884..c70710d8f878 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateSchemaSqlTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSchemaSqlTaskOutputError.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("ErrorOutput") public class MigrateSchemaSqlTaskOutputError extends MigrateSchemaSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutput.java index 7d4d6a44da61..0540eb2da927 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutput.java @@ -17,7 +17,7 @@ * Output for the task that migrates on-prem SQL Server databases to Azure SQL * Database for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbSyncTaskOutput.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrateSqlServerSqlDbSyncTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "DatabaseLevelErrorOutput", value = MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java index 0e51b1f9084c..6f2263e3677f 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java @@ -16,7 +16,7 @@ /** * The MigrateSqlServerSqlDbSyncTaskOutputDatabaseError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelErrorOutput") public class MigrateSqlServerSqlDbSyncTaskOutputDatabaseError extends MigrateSqlServerSqlDbSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java index dd3c3f3f087a..72d0467ed9e5 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java @@ -16,7 +16,7 @@ /** * The MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelOutput") public class MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel extends MigrateSqlServerSqlDbSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputError.java index d993c717eacb..69873a8038fb 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateSqlServerSqlDbSyncTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbSyncTaskOutputError.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("ErrorOutput") public class MigrateSqlServerSqlDbSyncTaskOutputError extends MigrateSqlServerSqlDbSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java index 9bc1cbb87afb..d3c2489ed59b 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java @@ -16,7 +16,7 @@ /** * The MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrationLevelOutput") public class MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel extends MigrateSqlServerSqlDbSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java index 1532d40afaf8..216322c39b9c 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java @@ -16,7 +16,7 @@ /** * The MigrateSqlServerSqlDbSyncTaskOutputTableLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbSyncTaskOutputTableLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("TableLevelOutput") public class MigrateSqlServerSqlDbSyncTaskOutputTableLevel extends MigrateSqlServerSqlDbSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskProperties.java index b2966e47e6dc..2e1b90f09cf8 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that migrates on-prem SQL Server databases to Azure * SQL Database for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateSqlServerSqlDbSyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Migrate.SqlServer.AzureSqlDb.Sync") public class MigrateSqlServerSqlDbSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutput.java index 5d5b6deab73f..6f41e1d6530c 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutput.java @@ -17,7 +17,7 @@ * Output for the task that migrates on-prem SQL Server databases to Azure SQL * Database. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutput.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrateSqlServerSqlDbTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlDbTaskOutputError.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java index 879ffc6692c9..37cf51a7a2fd 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java @@ -18,7 +18,7 @@ /** * The MigrateSqlServerSqlDbTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutputDatabaseLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelOutput") public class MigrateSqlServerSqlDbTaskOutputDatabaseLevel extends MigrateSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputError.java index acd9bd8cd695..3266b090a366 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateSqlServerSqlDbTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutputError.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("ErrorOutput") public class MigrateSqlServerSqlDbTaskOutputError extends MigrateSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java index ed4d1924ccd0..a4051b9b9485 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java @@ -18,7 +18,7 @@ /** * The MigrateSqlServerSqlDbTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutputMigrationLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrationLevelOutput") public class MigrateSqlServerSqlDbTaskOutputMigrationLevel extends MigrateSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java index dce11ea0f477..357c527dacb0 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java @@ -16,7 +16,7 @@ /** * The MigrateSqlServerSqlDbTaskOutputTableLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutputTableLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("TableLevelOutput") public class MigrateSqlServerSqlDbTaskOutputTableLevel extends MigrateSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskProperties.java index bff3b16bcb96..3a13b549153c 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that migrates on-prem SQL Server databases to Azure * SQL Database. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateSqlServerSqlDbTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Migrate.SqlServer.SqlDb") public class MigrateSqlServerSqlDbTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutput.java index b17e835650ce..c3a5ba786613 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutput.java @@ -17,7 +17,7 @@ * Output for task that migrates SQL Server databases to Azure SQL Database * Managed Instance using Log Replay Service. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMISyncTaskOutput.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrateSqlServerSqlMISyncTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlMISyncTaskOutputError.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.java index 523eb08dd3b8..5a322cabd39a 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.java @@ -17,7 +17,7 @@ /** * The MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelOutput") public class MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel extends MigrateSqlServerSqlMISyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputError.java index 7fa0947997aa..f644f8fe6e61 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateSqlServerSqlMISyncTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMISyncTaskOutputError.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("ErrorOutput") public class MigrateSqlServerSqlMISyncTaskOutputError extends MigrateSqlServerSqlMISyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.java index 4da76ed9e0b2..81ec0f7348c9 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.java @@ -16,7 +16,7 @@ /** * The MigrateSqlServerSqlMISyncTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrationLevelOutput") public class MigrateSqlServerSqlMISyncTaskOutputMigrationLevel extends MigrateSqlServerSqlMISyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskProperties.java index 57e3596835a7..39e5fabed633 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for task that migrates SQL Server databases to Azure SQL Database * Managed Instance sync scenario. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateSqlServerSqlMISyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Migrate.SqlServer.AzureSqlDbMI.Sync.LRS") public class MigrateSqlServerSqlMISyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskInput.java index 3f93588551a1..949f60151fe1 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskInput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskInput.java @@ -56,6 +56,14 @@ public class MigrateSqlServerSqlMITaskInput extends SqlMigrationTaskInput { @JsonProperty(value = "backupMode") private BackupMode backupMode; + /** + * Azure Active Directory domain name in the format of 'contoso.com' for + * federated Azure AD or 'contoso.onmicrosoft.com' for managed domain, + * required if and only if Windows logins are selected. + */ + @JsonProperty(value = "aadDomainName") + private String aadDomainName; + /** * Get databases to migrate. * @@ -176,4 +184,24 @@ public MigrateSqlServerSqlMITaskInput withBackupMode(BackupMode backupMode) { return this; } + /** + * Get azure Active Directory domain name in the format of 'contoso.com' for federated Azure AD or 'contoso.onmicrosoft.com' for managed domain, required if and only if Windows logins are selected. + * + * @return the aadDomainName value + */ + public String aadDomainName() { + return this.aadDomainName; + } + + /** + * Set azure Active Directory domain name in the format of 'contoso.com' for federated Azure AD or 'contoso.onmicrosoft.com' for managed domain, required if and only if Windows logins are selected. + * + * @param aadDomainName the aadDomainName value to set + * @return the MigrateSqlServerSqlMITaskInput object itself. + */ + public MigrateSqlServerSqlMITaskInput withAadDomainName(String aadDomainName) { + this.aadDomainName = aadDomainName; + return this; + } + } diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutput.java index 0c91b24ef7ab..17cabcea6140 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutput.java @@ -17,7 +17,7 @@ * Output for task that migrates SQL Server databases to Azure SQL Database * Managed Instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMITaskOutput.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrateSqlServerSqlMITaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlMITaskOutputError.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java index 2f7a37f1d71c..aa303584f674 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java @@ -17,7 +17,7 @@ /** * The MigrateSqlServerSqlMITaskOutputAgentJobLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMITaskOutputAgentJobLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("AgentJobLevelOutput") public class MigrateSqlServerSqlMITaskOutputAgentJobLevel extends MigrateSqlServerSqlMITaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java index db2188ff62e1..02bff80a6848 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java @@ -17,7 +17,7 @@ /** * The MigrateSqlServerSqlMITaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMITaskOutputDatabaseLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelOutput") public class MigrateSqlServerSqlMITaskOutputDatabaseLevel extends MigrateSqlServerSqlMITaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputError.java index fb6df32dcf2d..7277a2e49d7a 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateSqlServerSqlMITaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMITaskOutputError.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("ErrorOutput") public class MigrateSqlServerSqlMITaskOutputError extends MigrateSqlServerSqlMITaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java index 496c6e11d8c4..71154cab8c11 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java @@ -17,7 +17,7 @@ /** * The MigrateSqlServerSqlMITaskOutputLoginLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMITaskOutputLoginLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("LoginLevelOutput") public class MigrateSqlServerSqlMITaskOutputLoginLevel extends MigrateSqlServerSqlMITaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java index 008fc3150ce7..9a8a0d6ca015 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java @@ -18,7 +18,7 @@ /** * The MigrateSqlServerSqlMITaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMITaskOutputMigrationLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrationLevelOutput") public class MigrateSqlServerSqlMITaskOutputMigrationLevel extends MigrateSqlServerSqlMITaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskProperties.java index 9631cfd12f85..094797a6c57c 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskProperties.java @@ -17,7 +17,7 @@ * Properties for task that migrates SQL Server databases to Azure SQL Database * Managed Instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateSqlServerSqlMITaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Migrate.SqlServer.AzureSqlDbMI") public class MigrateSqlServerSqlMITaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutput.java index 0cb303340fbd..9f323ec4ed21 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutput.java @@ -17,7 +17,7 @@ * Output for task that migrates SSIS packages from SQL Server to Azure SQL * Database Managed Instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSsisTaskOutput.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrateSsisTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "SsisProjectLevelOutput", value = MigrateSsisTaskOutputProjectLevel.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputMigrationLevel.java index c24425c84374..1a1544894459 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputMigrationLevel.java @@ -17,7 +17,7 @@ /** * The MigrateSsisTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSsisTaskOutputMigrationLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("MigrationLevelOutput") public class MigrateSsisTaskOutputMigrationLevel extends MigrateSsisTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputProjectLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputProjectLevel.java index d43c19c35b37..ce8bbde93b1d 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputProjectLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputProjectLevel.java @@ -17,7 +17,7 @@ /** * The MigrateSsisTaskOutputProjectLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSsisTaskOutputProjectLevel.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("SsisProjectLevelOutput") public class MigrateSsisTaskOutputProjectLevel extends MigrateSsisTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskProperties.java index eed248aef840..9969304e73ca 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskProperties.java @@ -17,7 +17,7 @@ * Properties for task that migrates SSIS packages from SQL Server databases to * Azure SQL Database Managed Instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateSsisTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Migrate.Ssis") public class MigrateSsisTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSyncCompleteCommandProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSyncCompleteCommandProperties.java index 90280d568391..477e139c4f4b 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSyncCompleteCommandProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSyncCompleteCommandProperties.java @@ -16,7 +16,7 @@ /** * Properties for the command that completes sync migration for a database. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType", defaultImpl = MigrateSyncCompleteCommandProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") @JsonTypeName("Migrate.Sync.Complete.Database") public class MigrateSyncCompleteCommandProperties extends CommandPropertiesInner { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrationEligibilityInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrationEligibilityInfo.java index ffc9141efb47..189ebd6580e3 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrationEligibilityInfo.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrationEligibilityInfo.java @@ -18,8 +18,8 @@ public class MigrationEligibilityInfo { /** * Whether object is eligible for migration or not. */ - @JsonProperty(value = "isEligibileForMigration", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isEligibileForMigration; + @JsonProperty(value = "isEligibleForMigration", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEligibleForMigration; /** * Information about eligibility failure for the server object. @@ -30,10 +30,10 @@ public class MigrationEligibilityInfo { /** * Get whether object is eligible for migration or not. * - * @return the isEligibileForMigration value + * @return the isEligibleForMigration value */ - public Boolean isEligibileForMigration() { - return this.isEligibileForMigration; + public Boolean isEligibleForMigration() { + return this.isEligibleForMigration; } /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbCancelCommand.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbCancelCommand.java index c65398e3e76a..776625685df2 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbCancelCommand.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbCancelCommand.java @@ -16,7 +16,7 @@ /** * Properties for the command that cancels a migration in whole or in part. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType", defaultImpl = MongoDbCancelCommand.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") @JsonTypeName("cancel") public class MongoDbCancelCommand extends CommandPropertiesInner { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbConnectionInfo.java index f41986750ef3..3a1b6d17e99e 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbConnectionInfo.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbConnectionInfo.java @@ -15,7 +15,7 @@ /** * Describes a connection to a MongoDB data source. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = MongoDbConnectionInfo.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("MongoDbConnectionInfo") public class MongoDbConnectionInfo extends ConnectionInfo { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbFinishCommand.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbFinishCommand.java index 85f5b0e18af0..a22b8632007a 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbFinishCommand.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbFinishCommand.java @@ -16,7 +16,7 @@ /** * Properties for the command that finishes a migration in whole or in part. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType", defaultImpl = MongoDbFinishCommand.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") @JsonTypeName("finish") public class MongoDbFinishCommand extends CommandPropertiesInner { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbRestartCommand.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbRestartCommand.java index f47c4cccdfd2..e453e76a90e4 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbRestartCommand.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbRestartCommand.java @@ -16,7 +16,7 @@ /** * Properties for the command that restarts a migration in whole or in part. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType", defaultImpl = MongoDbRestartCommand.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") @JsonTypeName("restart") public class MongoDbRestartCommand extends CommandPropertiesInner { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MySqlConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MySqlConnectionInfo.java index d75e4980374d..b3af8d084b3d 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MySqlConnectionInfo.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MySqlConnectionInfo.java @@ -15,7 +15,7 @@ /** * Information for connecting to MySQL server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = MySqlConnectionInfo.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("MySqlConnectionInfo") public class MySqlConnectionInfo extends ConnectionInfo { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OracleConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OracleConnectionInfo.java index 0027f1ada356..84b47d81a955 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OracleConnectionInfo.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OracleConnectionInfo.java @@ -15,7 +15,7 @@ /** * Information for connecting to Oracle server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = OracleConnectionInfo.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("OracleConnectionInfo") public class OracleConnectionInfo extends ConnectionInfo { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/PostgreSqlConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/PostgreSqlConnectionInfo.java index 5781c09c37b6..aa2445651087 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/PostgreSqlConnectionInfo.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/PostgreSqlConnectionInfo.java @@ -15,7 +15,7 @@ /** * Information for connecting to PostgreSQL server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = PostgreSqlConnectionInfo.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("PostgreSqlConnectionInfo") public class PostgreSqlConnectionInfo extends ConnectionInfo { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectTaskProperties.java index 6d7aec823e68..3be25c3e064c 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectTaskProperties.java @@ -20,17 +20,9 @@ * Base class for all types of DMS task properties. If task is not supported by * current client, this object is returned. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ProjectTaskProperties.class) -@JsonTypeName("Unknown") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ProjectTaskProperties") @JsonSubTypes({ - @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureDbSqlMi.Complete", value = MigrateMISyncCompleteCommandProperties.class), - @JsonSubTypes.Type(name = "Migrate.Sync.Complete.Database", value = MigrateSyncCompleteCommandProperties.class), - @JsonSubTypes.Type(name = "MiSqlConnectionInfo", value = MiSqlConnectionInfo.class), - @JsonSubTypes.Type(name = "PostgreSqlConnectionInfo", value = PostgreSqlConnectionInfo.class), - @JsonSubTypes.Type(name = "OracleConnectionInfo", value = OracleConnectionInfo.class), - @JsonSubTypes.Type(name = "MySqlConnectionInfo", value = MySqlConnectionInfo.class), - @JsonSubTypes.Type(name = "MongoDbConnectionInfo", value = MongoDbConnectionInfo.class), - @JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class), @JsonSubTypes.Type(name = "Migrate.Ssis", value = MigrateSsisTaskProperties.class), @JsonSubTypes.Type(name = "GetTDECertificates.Sql", value = GetTdeCertificatesSqlTaskProperties.class), @JsonSubTypes.Type(name = "Validate.Oracle.AzureDbPostgreSql.Sync", value = ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.class), @@ -64,9 +56,6 @@ @JsonSubTypes.Type(name = "Connect.MongoDb", value = ConnectToMongoDbTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToSource.MySql", value = ConnectToSourceMySqlTaskProperties.class), @JsonSubTypes.Type(name = "MigrateSchemaSqlServerSqlDb", value = MigrateSchemaSqlServerSqlDbTaskProperties.class), - @JsonSubTypes.Type(name = "cancel", value = MongoDbCancelCommand.class), - @JsonSubTypes.Type(name = "finish", value = MongoDbFinishCommand.class), - @JsonSubTypes.Type(name = "restart", value = MongoDbRestartCommand.class), @JsonSubTypes.Type(name = "Service.Check.OCI", value = CheckOCIDriverTaskProperties.class), @JsonSubTypes.Type(name = "Service.Upload.OCI", value = UploadOCIDriverTaskProperties.class), @JsonSubTypes.Type(name = "Service.Install.OCI", value = InstallOCIDriverTaskProperties.class) diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SqlConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SqlConnectionInfo.java index 232f4842ded4..716cd62a97eb 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SqlConnectionInfo.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SqlConnectionInfo.java @@ -15,7 +15,7 @@ /** * Information for connecting to SQL database server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = SqlConnectionInfo.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("SqlConnectionInfo") public class SqlConnectionInfo extends ConnectionInfo { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskProperties.java index c58ac0af9119..49f94d0264e8 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskProperties.java @@ -16,7 +16,7 @@ /** * Properties for the task that uploads an OCI driver. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = UploadOCIDriverTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Service.Upload.OCI") public class UploadOCIDriverTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java index e7a68ebed9b0..c6c0bc30c57f 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for task that validates migration input for SQL to Azure SQL DB * sync migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ValidateMigrationInput.SqlServer.SqlDb.Sync") public class ValidateMigrationInputSqlServerSqlDbSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskProperties.java index f778e5b56314..e55478094af3 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for task that validates migration input for SQL to Azure SQL * Database Managed Instance sync scenario. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ValidateMigrationInputSqlServerSqlMISyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS") public class ValidateMigrationInputSqlServerSqlMISyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java index 8ae6d958e642..9afa2fec22ca 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java @@ -17,7 +17,7 @@ * Properties for task that validates migration input for SQL to Azure SQL * Database Managed Instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ValidateMigrationInputSqlServerSqlMITaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("ValidateMigrationInput.SqlServer.AzureSqlDbMI") public class ValidateMigrationInputSqlServerSqlMITaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMongoDbTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMongoDbTaskProperties.java index c96f8bb9eed3..e73d686b05ae 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMongoDbTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMongoDbTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates a migration between MongoDB data * sources. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ValidateMongoDbTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Validate.MongoDb") public class ValidateMongoDbTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.java index e6c54967a24a..864c0d33923c 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates a migration for Oracle to Azure * Database for PostgreSQL for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Validate.Oracle.AzureDbPostgreSql.Sync") public class ValidateOracleAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/CommandPropertiesInner.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/CommandPropertiesInner.java index b39916cba817..157f84f1d648 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/CommandPropertiesInner.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/CommandPropertiesInner.java @@ -9,8 +9,13 @@ package com.microsoft.azure.management.datamigration.v2018_07_15_preview.implementation; import java.util.List; - -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.*; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ODataError; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.CommandState; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MigrateMISyncCompleteCommandProperties; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MigrateSyncCompleteCommandProperties; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MongoDbCancelCommand; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MongoDbFinishCommand; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MongoDbRestartCommand; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,56 +25,14 @@ * Base class for all types of DMS command properties. If command is not * supported by current client, this object is returned. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType", defaultImpl = CommandPropertiesInner.class) -@JsonTypeName("Unknown") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") +@JsonTypeName("CommandProperties") @JsonSubTypes({ @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureDbSqlMi.Complete", value = MigrateMISyncCompleteCommandProperties.class), @JsonSubTypes.Type(name = "Migrate.Sync.Complete.Database", value = MigrateSyncCompleteCommandProperties.class), - @JsonSubTypes.Type(name = "MiSqlConnectionInfo", value = MiSqlConnectionInfo.class), - @JsonSubTypes.Type(name = "PostgreSqlConnectionInfo", value = PostgreSqlConnectionInfo.class), - @JsonSubTypes.Type(name = "OracleConnectionInfo", value = OracleConnectionInfo.class), - @JsonSubTypes.Type(name = "MySqlConnectionInfo", value = MySqlConnectionInfo.class), - @JsonSubTypes.Type(name = "MongoDbConnectionInfo", value = MongoDbConnectionInfo.class), - @JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class), - @JsonSubTypes.Type(name = "Migrate.Ssis", value = MigrateSsisTaskProperties.class), - @JsonSubTypes.Type(name = "GetTDECertificates.Sql", value = GetTdeCertificatesSqlTaskProperties.class), - @JsonSubTypes.Type(name = "Validate.Oracle.AzureDbPostgreSql.Sync", value = ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "Validate.MongoDb", value = ValidateMongoDbTaskProperties.class), - @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", value = ValidateMigrationInputSqlServerSqlMISyncTaskProperties.class), - @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI", value = ValidateMigrationInputSqlServerSqlMITaskProperties.class), - @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.SqlDb.Sync", value = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.Oracle.AzureDbForPostgreSql.Sync", value = MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.PostgreSql.AzureDbForPostgreSql.Sync", value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.MySql.AzureDbForMySql.Sync", value = MigrateMySqlAzureDbForMySqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDb.Sync", value = MigrateSqlServerSqlDbSyncTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.SqlServer.SqlDb", value = MigrateSqlServerSqlDbTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", value = MigrateSqlServerSqlMISyncTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDbMI", value = MigrateSqlServerSqlMITaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.MongoDb", value = MigrateMongoDbTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.AzureDbForMySql", value = ConnectToTargetAzureDbForMySqlTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI.Sync.LRS", value = ConnectToTargetSqlMISyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI", value = ConnectToTargetSqlMITaskProperties.class), - @JsonSubTypes.Type(name = "GetUserTablesPostgreSql", value = GetUserTablesPostgreSqlTaskProperties.class), - @JsonSubTypes.Type(name = "GetUserTablesOracle", value = GetUserTablesOracleTaskProperties.class), - @JsonSubTypes.Type(name = "GetUserTables.AzureSqlDb.Sync", value = GetUserTablesSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", value = ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.AzureDbForPostgreSql.Sync", value = ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb.Sync", value = ConnectToTargetSqlSqlDbSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToSource.Oracle.Sync", value = ConnectToSourceOracleSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToSource.PostgreSql.Sync", value = ConnectToSourcePostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToSource.SqlServer.Sync", value = ConnectToSourceSqlServerSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToSource.SqlServer", value = ConnectToSourceSqlServerTaskProperties.class), - @JsonSubTypes.Type(name = "Connect.MongoDb", value = ConnectToMongoDbTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToSource.MySql", value = ConnectToSourceMySqlTaskProperties.class), - @JsonSubTypes.Type(name = "MigrateSchemaSqlServerSqlDb", value = MigrateSchemaSqlServerSqlDbTaskProperties.class), @JsonSubTypes.Type(name = "cancel", value = MongoDbCancelCommand.class), @JsonSubTypes.Type(name = "finish", value = MongoDbFinishCommand.class), - @JsonSubTypes.Type(name = "restart", value = MongoDbRestartCommand.class), - @JsonSubTypes.Type(name = "Service.Check.OCI", value = CheckOCIDriverTaskProperties.class), - @JsonSubTypes.Type(name = "Service.Upload.OCI", value = UploadOCIDriverTaskProperties.class), - @JsonSubTypes.Type(name = "Service.Install.OCI", value = InstallOCIDriverTaskProperties.class) + @JsonSubTypes.Type(name = "restart", value = MongoDbRestartCommand.class) }) public class CommandPropertiesInner { /** From 2b6be293f0d5df2430502de720de2fc301426154 Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Wed, 23 Oct 2019 00:14:49 -0700 Subject: [PATCH 47/64] Storage: generate package-2019-06 (#5985) --- storage/resource-manager/v2019_06_01/pom.xml | 135 ++ .../storage/v2019_06_01/AccessTier.java | 53 + .../v2019_06_01/AccountSasParameters.java | 236 ++ .../storage/v2019_06_01/AccountStatus.java | 53 + .../storage/v2019_06_01/Action.java | 50 + .../ActiveDirectoryProperties.java | 174 ++ .../v2019_06_01/AzureEntityResource.java | 34 + ...AzureFilesIdentityBasedAuthentication.java | 70 + .../storage/v2019_06_01/BlobContainer.java | 192 ++ .../storage/v2019_06_01/BlobContainers.java | 148 ++ ...eateOrUpdateImmutabilityPolicyHeaders.java | 46 + ...ainersDeleteImmutabilityPolicyHeaders.java | 46 + ...ainersExtendImmutabilityPolicyHeaders.java | 46 + ...ontainersGetImmutabilityPolicyHeaders.java | 46 + ...ntainersLockImmutabilityPolicyHeaders.java | 46 + .../v2019_06_01/BlobServiceProperties.java | 233 ++ .../storage/v2019_06_01/BlobServices.java | 40 + .../storage/v2019_06_01/Bypass.java | 47 + .../storage/v2019_06_01/ChangeFeed.java | 44 + .../CheckNameAvailabilityResult.java | 35 + .../storage/v2019_06_01/CorsRule.java | 153 ++ .../storage/v2019_06_01/CorsRules.java | 46 + .../storage/v2019_06_01/CustomDomain.java | 72 + .../v2019_06_01/DateAfterCreation.java | 43 + .../v2019_06_01/DateAfterModification.java | 43 + .../storage/v2019_06_01/DefaultAction.java | 53 + .../v2019_06_01/DeleteRetentionPolicy.java | 70 + .../storage/v2019_06_01/Dimension.java | 69 + .../v2019_06_01/DirectoryServiceOptions.java | 44 + .../storage/v2019_06_01/Encryption.java | 97 + .../v2019_06_01/EncryptionService.java | 63 + .../v2019_06_01/EncryptionServices.java | 99 + .../storage/v2019_06_01/Endpoints.java | 108 + .../storage/v2019_06_01/ErrorResponse.java | 71 + .../v2019_06_01/ErrorResponseException.java | 44 + .../storage/v2019_06_01/FileServiceItems.java | 27 + .../v2019_06_01/FileServiceProperties.java | 118 + .../storage/v2019_06_01/FileServices.java | 40 + .../storage/v2019_06_01/FileShare.java | 157 ++ .../storage/v2019_06_01/FileShareItem.java | 57 + .../storage/v2019_06_01/FileShares.java | 53 + .../v2019_06_01/GeoReplicationStats.java | 76 + .../v2019_06_01/GeoReplicationStatus.java | 44 + .../storage/v2019_06_01/HttpProtocol.java | 53 + .../storage/v2019_06_01/IPRule.java | 70 + .../storage/v2019_06_01/Identity.java | 80 + .../v2019_06_01/ImmutabilityPolicy.java | 152 ++ .../ImmutabilityPolicyProperties.java | 94 + .../v2019_06_01/ImmutabilityPolicyState.java | 41 + .../ImmutabilityPolicyUpdateType.java | 44 + .../storage/v2019_06_01/KeyPermission.java | 53 + .../storage/v2019_06_01/KeySource.java | 41 + .../v2019_06_01/KeyVaultProperties.java | 95 + .../management/storage/v2019_06_01/Kind.java | 50 + .../v2019_06_01/LargeFileSharesState.java | 41 + .../v2019_06_01/LeaseContainerRequest.java | 152 ++ .../v2019_06_01/LeaseContainerResponse.java | 30 + .../storage/v2019_06_01/LeaseDuration.java | 41 + .../storage/v2019_06_01/LeaseState.java | 50 + .../storage/v2019_06_01/LeaseStatus.java | 41 + .../storage/v2019_06_01/LegalHold.java | 31 + .../v2019_06_01/LegalHoldProperties.java | 63 + .../v2019_06_01/ListAccountSasResponse.java | 25 + .../v2019_06_01/ListContainerItem.java | 92 + .../storage/v2019_06_01/ListKeyExpand.java | 50 + .../v2019_06_01/ListServiceSasResponse.java | 25 + .../v2019_06_01/ManagementPolicies.java | 41 + .../storage/v2019_06_01/ManagementPolicy.java | 124 + .../v2019_06_01/ManagementPolicyAction.java | 70 + .../v2019_06_01/ManagementPolicyBaseBlob.java | 97 + .../ManagementPolicyDefinition.java | 70 + .../v2019_06_01/ManagementPolicyFilter.java | 71 + .../v2019_06_01/ManagementPolicyRule.java | 132 + .../v2019_06_01/ManagementPolicySchema.java | 46 + .../v2019_06_01/ManagementPolicySnapShot.java | 43 + .../v2019_06_01/MetricSpecification.java | 252 ++ .../storage/v2019_06_01/NetworkRuleSet.java | 127 + .../storage/v2019_06_01/Operation.java | 40 + .../storage/v2019_06_01/OperationDisplay.java | 121 + .../storage/v2019_06_01/Operations.java | 27 + .../storage/v2019_06_01/Permissions.java | 59 + .../storage/v2019_06_01/PrivateEndpoint.java | 32 + .../PrivateEndpointConnection.java | 163 ++ ...teEndpointConnectionProvisioningState.java | 47 + .../PrivateEndpointConnections.java | 43 + ...rivateEndpointServiceConnectionStatus.java | 44 + .../PrivateLinkResourceListResult.java | 27 + .../v2019_06_01/PrivateLinkResources.java | 29 + .../PrivateLinkServiceConnectionState.java | 99 + .../v2019_06_01/ProvisioningState.java | 56 + .../storage/v2019_06_01/PublicAccess.java | 56 + .../storage/v2019_06_01/Reason.java | 53 + .../storage/v2019_06_01/ReasonCode.java | 41 + .../storage/v2019_06_01/Restriction.java | 80 + .../storage/v2019_06_01/SKUCapability.java | 50 + .../v2019_06_01/ServiceSasParameters.java | 493 ++++ .../v2019_06_01/ServiceSpecification.java | 44 + .../storage/v2019_06_01/Services.java | 47 + .../storage/v2019_06_01/SignedResource.java | 47 + .../v2019_06_01/SignedResourceTypes.java | 44 + .../management/storage/v2019_06_01/Sku.java | 56 + .../storage/v2019_06_01/SkuName.java | 59 + .../storage/v2019_06_01/SkuTier.java | 53 + .../management/storage/v2019_06_01/Skus.java | 19 + .../management/storage/v2019_06_01/State.java | 62 + .../storage/v2019_06_01/StorageAccount.java | 438 ++++ ...ccountCheckNameAvailabilityParameters.java | 77 + .../StorageAccountCreateParameters.java | 376 +++ .../v2019_06_01/StorageAccountExpand.java | 50 + .../v2019_06_01/StorageAccountKey.java | 63 + .../StorageAccountListKeysResult.java | 26 + ...StorageAccountRegenerateKeyParameters.java | 44 + .../StorageAccountUpdateParameters.java | 322 +++ .../storage/v2019_06_01/StorageAccounts.java | 98 + .../storage/v2019_06_01/TagProperty.java | 94 + .../v2019_06_01/UpdateHistoryProperty.java | 113 + .../management/storage/v2019_06_01/Usage.java | 40 + .../storage/v2019_06_01/UsageName.java | 47 + .../storage/v2019_06_01/UsageUnit.java | 65 + .../storage/v2019_06_01/Usages.java | 28 + .../v2019_06_01/VirtualNetworkRule.java | 98 + .../implementation/BlobContainerImpl.java | 181 ++ .../implementation/BlobContainerInner.java | 213 ++ .../implementation/BlobContainersImpl.java | 189 ++ .../implementation/BlobContainersInner.java | 2156 +++++++++++++++++ .../BlobServicePropertiesImpl.java | 150 ++ .../BlobServicePropertiesInner.java | 158 ++ .../implementation/BlobServicesImpl.java | 78 + .../implementation/BlobServicesInner.java | 345 +++ .../CheckNameAvailabilityResultImpl.java | 42 + .../CheckNameAvailabilityResultInner.java | 67 + .../implementation/FileServiceItemsImpl.java | 32 + .../implementation/FileServiceItemsInner.java | 33 + .../FileServicePropertiesImpl.java | 134 + .../FileServicePropertiesInner.java | 50 + .../implementation/FileServicesImpl.java | 72 + .../implementation/FileServicesInner.java | 422 ++++ .../implementation/FileShareImpl.java | 140 ++ .../implementation/FileShareInner.java | 91 + .../implementation/FileShareItemImpl.java | 63 + .../implementation/FileShareItemInner.java | 90 + .../implementation/FileSharesImpl.java | 82 + .../implementation/FileSharesInner.java | 1033 ++++++++ .../implementation/IdParsingUtils.java | 57 + .../ImmutabilityPolicyImpl.java | 135 ++ .../ImmutabilityPolicyInner.java | 66 + .../LeaseContainerResponseImpl.java | 36 + .../LeaseContainerResponseInner.java | 70 + .../implementation/LegalHoldImpl.java | 37 + .../implementation/LegalHoldInner.java | 64 + .../ListAccountSasResponseImpl.java | 31 + .../ListAccountSasResponseInner.java | 32 + .../implementation/ListContainerItemImpl.java | 104 + .../ListContainerItemInner.java | 212 ++ .../ListServiceSasResponseImpl.java | 31 + .../ListServiceSasResponseInner.java | 32 + .../ManagementPoliciesImpl.java | 66 + .../ManagementPoliciesInner.java | 345 +++ .../implementation/ManagementPolicyImpl.java | 140 ++ .../implementation/ManagementPolicyInner.java | 65 + .../implementation/OperationImpl.java | 48 + .../implementation/OperationInner.java | 125 + .../implementation/OperationsImpl.java | 49 + .../implementation/OperationsInner.java | 134 + .../v2019_06_01/implementation/PageImpl.java | 75 + .../v2019_06_01/implementation/PageImpl1.java | 75 + .../PrivateEndpointConnectionImpl.java | 130 + .../PrivateEndpointConnectionInner.java | 103 + .../PrivateEndpointConnectionsImpl.java | 66 + .../PrivateEndpointConnectionsInner.java | 359 +++ .../PrivateLinkResourceInner.java | 77 + .../PrivateLinkResourceListResultImpl.java | 32 + .../PrivateLinkResourceListResultInner.java | 44 + .../PrivateLinkResourcesImpl.java | 42 + .../PrivateLinkResourcesInner.java | 146 ++ .../v2019_06_01/implementation/SkuImpl.java | 72 + .../v2019_06_01/implementation/SkuInner.java | 161 ++ .../v2019_06_01/implementation/SkusImpl.java | 68 + .../v2019_06_01/implementation/SkusInner.java | 144 ++ .../implementation/StorageAccountImpl.java | 322 +++ .../implementation/StorageAccountInner.java | 456 ++++ .../StorageAccountListKeysResultImpl.java | 33 + .../StorageAccountListKeysResultInner.java | 35 + .../implementation/StorageAccountsImpl.java | 216 ++ .../implementation/StorageAccountsInner.java | 1748 +++++++++++++ .../StorageManagementClientImpl.java | 336 +++ .../implementation/StorageManager.java | 219 ++ .../v2019_06_01/implementation/UsageImpl.java | 52 + .../implementation/UsageInner.java | 81 + .../implementation/UsagesImpl.java | 53 + .../implementation/UsagesInner.java | 145 ++ .../implementation/package-info.java | 11 + .../storage/v2019_06_01/package-info.java | 11 + 193 files changed, 22890 insertions(+) create mode 100644 storage/resource-manager/v2019_06_01/pom.xml create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AccessTier.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AccountSasParameters.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AccountStatus.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Action.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ActiveDirectoryProperties.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AzureEntityResource.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AzureFilesIdentityBasedAuthentication.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainer.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainers.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersCreateOrUpdateImmutabilityPolicyHeaders.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersDeleteImmutabilityPolicyHeaders.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersExtendImmutabilityPolicyHeaders.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersGetImmutabilityPolicyHeaders.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersLockImmutabilityPolicyHeaders.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServices.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Bypass.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ChangeFeed.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CheckNameAvailabilityResult.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CorsRule.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CorsRules.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CustomDomain.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DateAfterCreation.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DateAfterModification.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DefaultAction.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DeleteRetentionPolicy.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Dimension.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DirectoryServiceOptions.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Encryption.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionService.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionServices.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Endpoints.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ErrorResponse.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ErrorResponseException.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceItems.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceProperties.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServices.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShare.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShareItem.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShares.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/GeoReplicationStats.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/GeoReplicationStatus.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/HttpProtocol.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/IPRule.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Identity.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicy.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyProperties.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyState.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyUpdateType.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/KeyPermission.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/KeySource.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/KeyVaultProperties.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Kind.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LargeFileSharesState.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseContainerRequest.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseContainerResponse.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseDuration.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseState.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseStatus.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LegalHold.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LegalHoldProperties.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListAccountSasResponse.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListContainerItem.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListKeyExpand.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListServiceSasResponse.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicies.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicy.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyAction.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyBaseBlob.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyDefinition.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyFilter.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyRule.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicySchema.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicySnapShot.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/MetricSpecification.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/NetworkRuleSet.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Operation.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/OperationDisplay.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Operations.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Permissions.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpoint.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointConnection.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointConnectionProvisioningState.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointConnections.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointServiceConnectionStatus.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateLinkResourceListResult.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateLinkResources.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateLinkServiceConnectionState.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ProvisioningState.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PublicAccess.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Reason.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ReasonCode.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Restriction.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SKUCapability.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ServiceSasParameters.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ServiceSpecification.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Services.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SignedResource.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SignedResourceTypes.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Sku.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SkuName.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SkuTier.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Skus.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/State.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccount.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountCheckNameAvailabilityParameters.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountCreateParameters.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountExpand.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountKey.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountListKeysResult.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountRegenerateKeyParameters.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountUpdateParameters.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccounts.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/TagProperty.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/UpdateHistoryProperty.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Usage.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/UsageName.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/UsageUnit.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Usages.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/VirtualNetworkRule.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainerImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainerInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicesImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicesInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/CheckNameAvailabilityResultImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/CheckNameAvailabilityResultInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServiceItemsImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServiceItemsInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicesImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicesInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/IdParsingUtils.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LeaseContainerResponseImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LeaseContainerResponseInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LegalHoldImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LegalHoldInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListAccountSasResponseImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListAccountSasResponseInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListContainerItemImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListContainerItemInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListServiceSasResponseImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListServiceSasResponseInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPoliciesImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPoliciesInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPolicyImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPolicyInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationsImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationsInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PageImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PageImpl1.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionsImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionsInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourceInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourceListResultImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourceListResultInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourcesImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourcesInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountListKeysResultImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountListKeysResultInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountsImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountsInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManagementClientImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManager.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsageImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsageInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsagesImpl.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsagesInner.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/package-info.java create mode 100644 storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/package-info.java diff --git a/storage/resource-manager/v2019_06_01/pom.xml b/storage/resource-manager/v2019_06_01/pom.xml new file mode 100644 index 000000000000..1ce26f37d839 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.storage.v2019_06_01 + + com.microsoft.azure + azure-arm-parent + 1.1.0 + ../../../pom.management.xml + + azure-mgmt-storage + 1.0.0-beta + jar + Microsoft Azure SDK for Storage Management + This package contains Microsoft Storage 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 + + 1.6.5 + + + + + + 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/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AccessTier.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AccessTier.java new file mode 100644 index 000000000000..2615d5d794cf --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AccessTier.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AccessTier. + */ +public enum AccessTier { + /** Enum value Hot. */ + HOT("Hot"), + + /** Enum value Cool. */ + COOL("Cool"); + + /** The actual serialized value for a AccessTier instance. */ + private String value; + + AccessTier(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AccessTier instance. + * + * @param value the serialized value to parse. + * @return the parsed AccessTier object, or null if unable to parse. + */ + @JsonCreator + public static AccessTier fromString(String value) { + AccessTier[] items = AccessTier.values(); + for (AccessTier item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AccountSasParameters.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AccountSasParameters.java new file mode 100644 index 000000000000..f0f413f5805f --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AccountSasParameters.java @@ -0,0 +1,236 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The parameters to list SAS credentials of a storage account. + */ +public class AccountSasParameters { + /** + * The signed services accessible with the account SAS. Possible values + * include: Blob (b), Queue (q), Table (t), File (f). Possible values + * include: 'b', 'q', 't', 'f'. + */ + @JsonProperty(value = "signedServices", required = true) + private Services services; + + /** + * The signed resource types that are accessible with the account SAS. + * Service (s): Access to service-level APIs; Container (c): Access to + * container-level APIs; Object (o): Access to object-level APIs for blobs, + * queue messages, table entities, and files. Possible values include: 's', + * 'c', 'o'. + */ + @JsonProperty(value = "signedResourceTypes", required = true) + private SignedResourceTypes resourceTypes; + + /** + * The signed permissions for the account SAS. Possible values include: + * Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update + * (u) and Process (p). Possible values include: 'r', 'd', 'w', 'l', 'a', + * 'c', 'u', 'p'. + */ + @JsonProperty(value = "signedPermission", required = true) + private Permissions permissions; + + /** + * An IP address or a range of IP addresses from which to accept requests. + */ + @JsonProperty(value = "signedIp") + private String iPAddressOrRange; + + /** + * The protocol permitted for a request made with the account SAS. Possible + * values include: 'https,http', 'https'. + */ + @JsonProperty(value = "signedProtocol") + private HttpProtocol protocols; + + /** + * The time at which the SAS becomes valid. + */ + @JsonProperty(value = "signedStart") + private DateTime sharedAccessStartTime; + + /** + * The time at which the shared access signature becomes invalid. + */ + @JsonProperty(value = "signedExpiry", required = true) + private DateTime sharedAccessExpiryTime; + + /** + * The key to sign the account SAS token with. + */ + @JsonProperty(value = "keyToSign") + private String keyToSign; + + /** + * Get the signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). Possible values include: 'b', 'q', 't', 'f'. + * + * @return the services value + */ + public Services services() { + return this.services; + } + + /** + * Set the signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). Possible values include: 'b', 'q', 't', 'f'. + * + * @param services the services value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withServices(Services services) { + this.services = services; + return this; + } + + /** + * Get the signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files. Possible values include: 's', 'c', 'o'. + * + * @return the resourceTypes value + */ + public SignedResourceTypes resourceTypes() { + return this.resourceTypes; + } + + /** + * Set the signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files. Possible values include: 's', 'c', 'o'. + * + * @param resourceTypes the resourceTypes value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withResourceTypes(SignedResourceTypes resourceTypes) { + this.resourceTypes = resourceTypes; + return this; + } + + /** + * Get the signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', 'l', 'a', 'c', 'u', 'p'. + * + * @return the permissions value + */ + public Permissions permissions() { + return this.permissions; + } + + /** + * Set the signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', 'l', 'a', 'c', 'u', 'p'. + * + * @param permissions the permissions value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withPermissions(Permissions permissions) { + this.permissions = permissions; + return this; + } + + /** + * Get an IP address or a range of IP addresses from which to accept requests. + * + * @return the iPAddressOrRange value + */ + public String iPAddressOrRange() { + return this.iPAddressOrRange; + } + + /** + * Set an IP address or a range of IP addresses from which to accept requests. + * + * @param iPAddressOrRange the iPAddressOrRange value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withIPAddressOrRange(String iPAddressOrRange) { + this.iPAddressOrRange = iPAddressOrRange; + return this; + } + + /** + * Get the protocol permitted for a request made with the account SAS. Possible values include: 'https,http', 'https'. + * + * @return the protocols value + */ + public HttpProtocol protocols() { + return this.protocols; + } + + /** + * Set the protocol permitted for a request made with the account SAS. Possible values include: 'https,http', 'https'. + * + * @param protocols the protocols value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withProtocols(HttpProtocol protocols) { + this.protocols = protocols; + return this; + } + + /** + * Get the time at which the SAS becomes valid. + * + * @return the sharedAccessStartTime value + */ + public DateTime sharedAccessStartTime() { + return this.sharedAccessStartTime; + } + + /** + * Set the time at which the SAS becomes valid. + * + * @param sharedAccessStartTime the sharedAccessStartTime value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withSharedAccessStartTime(DateTime sharedAccessStartTime) { + this.sharedAccessStartTime = sharedAccessStartTime; + return this; + } + + /** + * Get the time at which the shared access signature becomes invalid. + * + * @return the sharedAccessExpiryTime value + */ + public DateTime sharedAccessExpiryTime() { + return this.sharedAccessExpiryTime; + } + + /** + * Set the time at which the shared access signature becomes invalid. + * + * @param sharedAccessExpiryTime the sharedAccessExpiryTime value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withSharedAccessExpiryTime(DateTime sharedAccessExpiryTime) { + this.sharedAccessExpiryTime = sharedAccessExpiryTime; + return this; + } + + /** + * Get the key to sign the account SAS token with. + * + * @return the keyToSign value + */ + public String keyToSign() { + return this.keyToSign; + } + + /** + * Set the key to sign the account SAS token with. + * + * @param keyToSign the keyToSign value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withKeyToSign(String keyToSign) { + this.keyToSign = keyToSign; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AccountStatus.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AccountStatus.java new file mode 100644 index 000000000000..6282b4acc402 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AccountStatus.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AccountStatus. + */ +public enum AccountStatus { + /** Enum value available. */ + AVAILABLE("available"), + + /** Enum value unavailable. */ + UNAVAILABLE("unavailable"); + + /** The actual serialized value for a AccountStatus instance. */ + private String value; + + AccountStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AccountStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed AccountStatus object, or null if unable to parse. + */ + @JsonCreator + public static AccountStatus fromString(String value) { + AccountStatus[] items = AccountStatus.values(); + for (AccountStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Action.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Action.java new file mode 100644 index 000000000000..d55878f27f0a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Action.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for Action. + */ +public enum Action { + /** Enum value Allow. */ + ALLOW("Allow"); + + /** The actual serialized value for a Action instance. */ + private String value; + + Action(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a Action instance. + * + * @param value the serialized value to parse. + * @return the parsed Action object, or null if unable to parse. + */ + @JsonCreator + public static Action fromString(String value) { + Action[] items = Action.values(); + for (Action item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ActiveDirectoryProperties.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ActiveDirectoryProperties.java new file mode 100644 index 000000000000..3c50f992ba17 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ActiveDirectoryProperties.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Settings properties for Active Directory (AD). + */ +public class ActiveDirectoryProperties { + /** + * Specifies the primary domain that the AD DNS server is authoritative + * for. + */ + @JsonProperty(value = "domainName", required = true) + private String domainName; + + /** + * Specifies the NetBIOS domain name. + */ + @JsonProperty(value = "netBiosDomainName", required = true) + private String netBiosDomainName; + + /** + * Specifies the Active Directory forest to get. + */ + @JsonProperty(value = "forestName", required = true) + private String forestName; + + /** + * Specifies the domain GUID. + */ + @JsonProperty(value = "domainGuid", required = true) + private String domainGuid; + + /** + * Specifies the security identifier (SID). + */ + @JsonProperty(value = "domainSid", required = true) + private String domainSid; + + /** + * Specifies the security identifier (SID) for Azure Storage. + */ + @JsonProperty(value = "azureStorageSid", required = true) + private String azureStorageSid; + + /** + * Get specifies the primary domain that the AD DNS server is authoritative for. + * + * @return the domainName value + */ + public String domainName() { + return this.domainName; + } + + /** + * Set specifies the primary domain that the AD DNS server is authoritative for. + * + * @param domainName the domainName value to set + * @return the ActiveDirectoryProperties object itself. + */ + public ActiveDirectoryProperties withDomainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Get specifies the NetBIOS domain name. + * + * @return the netBiosDomainName value + */ + public String netBiosDomainName() { + return this.netBiosDomainName; + } + + /** + * Set specifies the NetBIOS domain name. + * + * @param netBiosDomainName the netBiosDomainName value to set + * @return the ActiveDirectoryProperties object itself. + */ + public ActiveDirectoryProperties withNetBiosDomainName(String netBiosDomainName) { + this.netBiosDomainName = netBiosDomainName; + return this; + } + + /** + * Get specifies the Active Directory forest to get. + * + * @return the forestName value + */ + public String forestName() { + return this.forestName; + } + + /** + * Set specifies the Active Directory forest to get. + * + * @param forestName the forestName value to set + * @return the ActiveDirectoryProperties object itself. + */ + public ActiveDirectoryProperties withForestName(String forestName) { + this.forestName = forestName; + return this; + } + + /** + * Get specifies the domain GUID. + * + * @return the domainGuid value + */ + public String domainGuid() { + return this.domainGuid; + } + + /** + * Set specifies the domain GUID. + * + * @param domainGuid the domainGuid value to set + * @return the ActiveDirectoryProperties object itself. + */ + public ActiveDirectoryProperties withDomainGuid(String domainGuid) { + this.domainGuid = domainGuid; + return this; + } + + /** + * Get specifies the security identifier (SID). + * + * @return the domainSid value + */ + public String domainSid() { + return this.domainSid; + } + + /** + * Set specifies the security identifier (SID). + * + * @param domainSid the domainSid value to set + * @return the ActiveDirectoryProperties object itself. + */ + public ActiveDirectoryProperties withDomainSid(String domainSid) { + this.domainSid = domainSid; + return this; + } + + /** + * Get specifies the security identifier (SID) for Azure Storage. + * + * @return the azureStorageSid value + */ + public String azureStorageSid() { + return this.azureStorageSid; + } + + /** + * Set specifies the security identifier (SID) for Azure Storage. + * + * @param azureStorageSid the azureStorageSid value to set + * @return the ActiveDirectoryProperties object itself. + */ + public ActiveDirectoryProperties withAzureStorageSid(String azureStorageSid) { + this.azureStorageSid = azureStorageSid; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AzureEntityResource.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AzureEntityResource.java new file mode 100644 index 000000000000..2485febb1789 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AzureEntityResource.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * The resource model definition for a Azure Resource Manager resource with an + * etag. + */ +public class AzureEntityResource extends ProxyResource { + /** + * Resource Etag. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get resource Etag. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AzureFilesIdentityBasedAuthentication.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AzureFilesIdentityBasedAuthentication.java new file mode 100644 index 000000000000..ecd0bebd55c0 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/AzureFilesIdentityBasedAuthentication.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Settings for Azure Files identity based authentication. + */ +public class AzureFilesIdentityBasedAuthentication { + /** + * Indicates the directory service used. Possible values include: 'None', + * 'AADDS', 'AD'. + */ + @JsonProperty(value = "directoryServiceOptions", required = true) + private DirectoryServiceOptions directoryServiceOptions; + + /** + * Required if choose AD. + */ + @JsonProperty(value = "activeDirectoryProperties") + private ActiveDirectoryProperties activeDirectoryProperties; + + /** + * Get indicates the directory service used. Possible values include: 'None', 'AADDS', 'AD'. + * + * @return the directoryServiceOptions value + */ + public DirectoryServiceOptions directoryServiceOptions() { + return this.directoryServiceOptions; + } + + /** + * Set indicates the directory service used. Possible values include: 'None', 'AADDS', 'AD'. + * + * @param directoryServiceOptions the directoryServiceOptions value to set + * @return the AzureFilesIdentityBasedAuthentication object itself. + */ + public AzureFilesIdentityBasedAuthentication withDirectoryServiceOptions(DirectoryServiceOptions directoryServiceOptions) { + this.directoryServiceOptions = directoryServiceOptions; + return this; + } + + /** + * Get required if choose AD. + * + * @return the activeDirectoryProperties value + */ + public ActiveDirectoryProperties activeDirectoryProperties() { + return this.activeDirectoryProperties; + } + + /** + * Set required if choose AD. + * + * @param activeDirectoryProperties the activeDirectoryProperties value to set + * @return the AzureFilesIdentityBasedAuthentication object itself. + */ + public AzureFilesIdentityBasedAuthentication withActiveDirectoryProperties(ActiveDirectoryProperties activeDirectoryProperties) { + this.activeDirectoryProperties = activeDirectoryProperties; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainer.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainer.java new file mode 100644 index 000000000000..58f9840b269f --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainer.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.BlobContainerInner; +import com.microsoft.azure.arm.model.Indexable; +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.storage.v2019_06_01.implementation.StorageManager; +import java.util.Map; +import org.joda.time.DateTime; + +/** + * Type representing BlobContainer. + */ +public interface BlobContainer extends HasInner, Indexable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the hasImmutabilityPolicy value. + */ + Boolean hasImmutabilityPolicy(); + + /** + * @return the hasLegalHold value. + */ + Boolean hasLegalHold(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the immutabilityPolicy value. + */ + ImmutabilityPolicyProperties immutabilityPolicy(); + + /** + * @return the lastModifiedTime value. + */ + DateTime lastModifiedTime(); + + /** + * @return the leaseDuration value. + */ + LeaseDuration leaseDuration(); + + /** + * @return the leaseState value. + */ + LeaseState leaseState(); + + /** + * @return the leaseStatus value. + */ + LeaseStatus leaseStatus(); + + /** + * @return the legalHold value. + */ + LegalHoldProperties legalHold(); + + /** + * @return the metadata value. + */ + Map metadata(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the publicAccess value. + */ + PublicAccess publicAccess(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the BlobContainer definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithBlobService, DefinitionStages.WithPublicAccess, DefinitionStages.WithMetadata, DefinitionStages.WithCreate { + } + + /** + * Grouping of BlobContainer definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a BlobContainer definition. + */ + interface Blank extends WithBlobService { + } + + /** + * The stage of the blobcontainer definition allowing to specify BlobService. + */ + interface WithBlobService { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only + * @return the next definition stage + */ + WithPublicAccess withExistingBlobService(String resourceGroupName, String accountName); + } + + /** + * The stage of the blobcontainer definition allowing to specify PublicAccess. + */ + interface WithPublicAccess { + /** + * Specifies publicAccess. + * @param publicAccess Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None' + * @return the next definition stage + */ + WithMetadata withPublicAccess(PublicAccess publicAccess); + } + + /** + * The stage of the blobcontainer definition allowing to specify Metadata. + */ + interface WithMetadata { + /** + * Specifies metadata. + * @param metadata A name-value pair to associate with the container as metadata + * @return the next definition stage + */ + WithCreate withMetadata(Map metadata); + } + + /** + * 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 BlobContainer update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithPublicAccess, UpdateStages.WithMetadata { + } + + /** + * Grouping of BlobContainer update stages. + */ + interface UpdateStages { + /** + * The stage of the blobcontainer update allowing to specify PublicAccess. + */ + interface WithPublicAccess { + /** + * Specifies publicAccess. + * @param publicAccess Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None' + * @return the next update stage + */ + Update withPublicAccess(PublicAccess publicAccess); + } + + /** + * The stage of the blobcontainer update allowing to specify Metadata. + */ + interface WithMetadata { + /** + * Specifies metadata. + * @param metadata A name-value pair to associate with the container as metadata + * @return the next update stage + */ + Update withMetadata(Map metadata); + } + + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainers.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainers.java new file mode 100644 index 000000000000..4a376f3ef6e1 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainers.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.storage.v2019_06_01; + +import rx.Completable; +import rx.Observable; +import java.util.List; + +/** + * Type representing BlobContainers. + */ +public interface BlobContainers { + /** + * Begins definition for a new Container resource. + * @param name resource name. + * @return the first stage of the new Container definition. + */ + BlobContainer.DefinitionStages.Blank defineContainer(String name); + + /** + * Begins definition for a new ImmutabilityPolicy resource. + * @param name resource name. + * @return the first stage of the new ImmutabilityPolicy definition. + */ + ImmutabilityPolicy.DefinitionStages.Blank defineImmutabilityPolicy(String name); + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String accountName); + + /** + * Gets properties of a specified container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String containerName); + + /** + * Deletes specified container under its account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String containerName); + + /** + * Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param tags Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable setLegalHoldAsync(String resourceGroupName, String accountName, String containerName, List tags); + + /** + * Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param tags Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable clearLegalHoldAsync(String resourceGroupName, String accountName, String containerName, List tags); + + /** + * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable leaseAsync(String resourceGroupName, String accountName, String containerName); + + /** + * Gets the existing immutability policy along with the corresponding ETag in response headers and body. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName); + + /** + * Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, only way is to delete the container after deleting all blobs inside the container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch); + + /** + * Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch); + + /** + * Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, int immutabilityPeriodSinceCreationInDays); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersCreateOrUpdateImmutabilityPolicyHeaders.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersCreateOrUpdateImmutabilityPolicyHeaders.java new file mode 100644 index 000000000000..b173ef9d0236 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersCreateOrUpdateImmutabilityPolicyHeaders.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for CreateOrUpdateImmutabilityPolicy operation. + */ +public class BlobContainersCreateOrUpdateImmutabilityPolicyHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the BlobContainersCreateOrUpdateImmutabilityPolicyHeaders object itself. + */ + public BlobContainersCreateOrUpdateImmutabilityPolicyHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersDeleteImmutabilityPolicyHeaders.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersDeleteImmutabilityPolicyHeaders.java new file mode 100644 index 000000000000..cc108bd3d005 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersDeleteImmutabilityPolicyHeaders.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for DeleteImmutabilityPolicy operation. + */ +public class BlobContainersDeleteImmutabilityPolicyHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the BlobContainersDeleteImmutabilityPolicyHeaders object itself. + */ + public BlobContainersDeleteImmutabilityPolicyHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersExtendImmutabilityPolicyHeaders.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersExtendImmutabilityPolicyHeaders.java new file mode 100644 index 000000000000..4fc21590dc8a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersExtendImmutabilityPolicyHeaders.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for ExtendImmutabilityPolicy operation. + */ +public class BlobContainersExtendImmutabilityPolicyHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the BlobContainersExtendImmutabilityPolicyHeaders object itself. + */ + public BlobContainersExtendImmutabilityPolicyHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersGetImmutabilityPolicyHeaders.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersGetImmutabilityPolicyHeaders.java new file mode 100644 index 000000000000..2d4d8cef3803 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersGetImmutabilityPolicyHeaders.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for GetImmutabilityPolicy operation. + */ +public class BlobContainersGetImmutabilityPolicyHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the BlobContainersGetImmutabilityPolicyHeaders object itself. + */ + public BlobContainersGetImmutabilityPolicyHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersLockImmutabilityPolicyHeaders.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersLockImmutabilityPolicyHeaders.java new file mode 100644 index 000000000000..93262b1136f2 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainersLockImmutabilityPolicyHeaders.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for LockImmutabilityPolicy operation. + */ +public class BlobContainersLockImmutabilityPolicyHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the BlobContainersLockImmutabilityPolicyHeaders object itself. + */ + public BlobContainersLockImmutabilityPolicyHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java new file mode 100644 index 000000000000..c202f7f71c7a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.BlobServicePropertiesInner; +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.storage.v2019_06_01.implementation.StorageManager; + +/** + * Type representing BlobServiceProperties. + */ +public interface BlobServiceProperties extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the automaticSnapshotPolicyEnabled value. + */ + Boolean automaticSnapshotPolicyEnabled(); + + /** + * @return the changeFeed value. + */ + ChangeFeed changeFeed(); + + /** + * @return the cors value. + */ + CorsRules cors(); + + /** + * @return the defaultServiceVersion value. + */ + String defaultServiceVersion(); + + /** + * @return the deleteRetentionPolicy value. + */ + DeleteRetentionPolicy deleteRetentionPolicy(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the BlobServiceProperties definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithStorageAccount, DefinitionStages.WithCreate { + } + + /** + * Grouping of BlobServiceProperties definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a BlobServiceProperties definition. + */ + interface Blank extends WithStorageAccount { + } + + /** + * The stage of the blobserviceproperties definition allowing to specify StorageAccount. + */ + interface WithStorageAccount { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only + * @return the next definition stage + */ + WithCreate withExistingStorageAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the blobserviceproperties definition allowing to specify AutomaticSnapshotPolicyEnabled. + */ + interface WithAutomaticSnapshotPolicyEnabled { + /** + * Specifies automaticSnapshotPolicyEnabled. + * @param automaticSnapshotPolicyEnabled Automatic Snapshot is enabled if set to true + * @return the next definition stage + */ + WithCreate withAutomaticSnapshotPolicyEnabled(Boolean automaticSnapshotPolicyEnabled); + } + + /** + * The stage of the blobserviceproperties definition allowing to specify ChangeFeed. + */ + interface WithChangeFeed { + /** + * Specifies changeFeed. + * @param changeFeed The blob service properties for change feed events + * @return the next definition stage + */ + WithCreate withChangeFeed(ChangeFeed changeFeed); + } + + /** + * The stage of the blobserviceproperties definition allowing to specify Cors. + */ + interface WithCors { + /** + * Specifies cors. + * @param cors Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service + * @return the next definition stage + */ + WithCreate withCors(CorsRules cors); + } + + /** + * The stage of the blobserviceproperties definition allowing to specify DefaultServiceVersion. + */ + interface WithDefaultServiceVersion { + /** + * Specifies defaultServiceVersion. + * @param defaultServiceVersion DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions + * @return the next definition stage + */ + WithCreate withDefaultServiceVersion(String defaultServiceVersion); + } + + /** + * The stage of the blobserviceproperties definition allowing to specify DeleteRetentionPolicy. + */ + interface WithDeleteRetentionPolicy { + /** + * Specifies deleteRetentionPolicy. + * @param deleteRetentionPolicy The blob service properties for soft delete + * @return the next definition stage + */ + WithCreate withDeleteRetentionPolicy(DeleteRetentionPolicy deleteRetentionPolicy); + } + + /** + * 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.WithAutomaticSnapshotPolicyEnabled, DefinitionStages.WithChangeFeed, DefinitionStages.WithCors, DefinitionStages.WithDefaultServiceVersion, DefinitionStages.WithDeleteRetentionPolicy { + } + } + /** + * The template for a BlobServiceProperties update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAutomaticSnapshotPolicyEnabled, UpdateStages.WithChangeFeed, UpdateStages.WithCors, UpdateStages.WithDefaultServiceVersion, UpdateStages.WithDeleteRetentionPolicy { + } + + /** + * Grouping of BlobServiceProperties update stages. + */ + interface UpdateStages { + /** + * The stage of the blobserviceproperties update allowing to specify AutomaticSnapshotPolicyEnabled. + */ + interface WithAutomaticSnapshotPolicyEnabled { + /** + * Specifies automaticSnapshotPolicyEnabled. + * @param automaticSnapshotPolicyEnabled Automatic Snapshot is enabled if set to true + * @return the next update stage + */ + Update withAutomaticSnapshotPolicyEnabled(Boolean automaticSnapshotPolicyEnabled); + } + + /** + * The stage of the blobserviceproperties update allowing to specify ChangeFeed. + */ + interface WithChangeFeed { + /** + * Specifies changeFeed. + * @param changeFeed The blob service properties for change feed events + * @return the next update stage + */ + Update withChangeFeed(ChangeFeed changeFeed); + } + + /** + * The stage of the blobserviceproperties update allowing to specify Cors. + */ + interface WithCors { + /** + * Specifies cors. + * @param cors Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service + * @return the next update stage + */ + Update withCors(CorsRules cors); + } + + /** + * The stage of the blobserviceproperties update allowing to specify DefaultServiceVersion. + */ + interface WithDefaultServiceVersion { + /** + * Specifies defaultServiceVersion. + * @param defaultServiceVersion DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions + * @return the next update stage + */ + Update withDefaultServiceVersion(String defaultServiceVersion); + } + + /** + * The stage of the blobserviceproperties update allowing to specify DeleteRetentionPolicy. + */ + interface WithDeleteRetentionPolicy { + /** + * Specifies deleteRetentionPolicy. + * @param deleteRetentionPolicy The blob service properties for soft delete + * @return the next update stage + */ + Update withDeleteRetentionPolicy(DeleteRetentionPolicy deleteRetentionPolicy); + } + + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServices.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServices.java new file mode 100644 index 000000000000..24713279bbcb --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServices.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.BlobServicesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing BlobServices. + */ +public interface BlobServices extends SupportsCreating, HasInner { + /** + * Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getServicePropertiesAsync(String resourceGroupName, String accountName); + + /** + * List blob services of storage account. It returns a collection of one object named default. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String accountName); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Bypass.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Bypass.java new file mode 100644 index 000000000000..cb4ed391b726 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Bypass.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Bypass. + */ +public final class Bypass extends ExpandableStringEnum { + /** Static value None for Bypass. */ + public static final Bypass NONE = fromString("None"); + + /** Static value Logging for Bypass. */ + public static final Bypass LOGGING = fromString("Logging"); + + /** Static value Metrics for Bypass. */ + public static final Bypass METRICS = fromString("Metrics"); + + /** Static value AzureServices for Bypass. */ + public static final Bypass AZURE_SERVICES = fromString("AzureServices"); + + /** + * Creates or finds a Bypass from its string representation. + * @param name a name to look for + * @return the corresponding Bypass + */ + @JsonCreator + public static Bypass fromString(String name) { + return fromString(name, Bypass.class); + } + + /** + * @return known Bypass values + */ + public static Collection values() { + return values(Bypass.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ChangeFeed.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ChangeFeed.java new file mode 100644 index 000000000000..24a9e8041f78 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ChangeFeed.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The blob service properties for change feed events. + */ +public class ChangeFeed { + /** + * Indicates whether change feed event logging is enabled for the Blob + * service. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Get indicates whether change feed event logging is enabled for the Blob service. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set indicates whether change feed event logging is enabled for the Blob service. + * + * @param enabled the enabled value to set + * @return the ChangeFeed object itself. + */ + public ChangeFeed withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CheckNameAvailabilityResult.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CheckNameAvailabilityResult.java new file mode 100644 index 000000000000..c12e97b57b16 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CheckNameAvailabilityResult.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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.CheckNameAvailabilityResultInner; + +/** + * Type representing CheckNameAvailabilityResult. + */ +public interface CheckNameAvailabilityResult extends HasInner, HasManager { + /** + * @return the message value. + */ + String message(); + + /** + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * @return the reason value. + */ + Reason reason(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CorsRule.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CorsRule.java new file mode 100644 index 000000000000..38069a8dca86 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CorsRule.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifies a CORS rule for the Blob service. + */ +public class CorsRule { + /** + * Required if CorsRule element is present. A list of origin domains that + * will be allowed via CORS, or "*" to allow all domains. + */ + @JsonProperty(value = "allowedOrigins", required = true) + private List allowedOrigins; + + /** + * Required if CorsRule element is present. A list of HTTP methods that are + * allowed to be executed by the origin. + */ + @JsonProperty(value = "allowedMethods", required = true) + private List allowedMethods; + + /** + * Required if CorsRule element is present. The number of seconds that the + * client/browser should cache a preflight response. + */ + @JsonProperty(value = "maxAgeInSeconds", required = true) + private int maxAgeInSeconds; + + /** + * Required if CorsRule element is present. A list of response headers to + * expose to CORS clients. + */ + @JsonProperty(value = "exposedHeaders", required = true) + private List exposedHeaders; + + /** + * Required if CorsRule element is present. A list of headers allowed to be + * part of the cross-origin request. + */ + @JsonProperty(value = "allowedHeaders", required = true) + private List allowedHeaders; + + /** + * Get required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains. + * + * @return the allowedOrigins value + */ + public List allowedOrigins() { + return this.allowedOrigins; + } + + /** + * Set required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains. + * + * @param allowedOrigins the allowedOrigins value to set + * @return the CorsRule object itself. + */ + public CorsRule withAllowedOrigins(List allowedOrigins) { + this.allowedOrigins = allowedOrigins; + return this; + } + + /** + * Get required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin. + * + * @return the allowedMethods value + */ + public List allowedMethods() { + return this.allowedMethods; + } + + /** + * Set required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin. + * + * @param allowedMethods the allowedMethods value to set + * @return the CorsRule object itself. + */ + public CorsRule withAllowedMethods(List allowedMethods) { + this.allowedMethods = allowedMethods; + return this; + } + + /** + * Get required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response. + * + * @return the maxAgeInSeconds value + */ + public int maxAgeInSeconds() { + return this.maxAgeInSeconds; + } + + /** + * Set required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response. + * + * @param maxAgeInSeconds the maxAgeInSeconds value to set + * @return the CorsRule object itself. + */ + public CorsRule withMaxAgeInSeconds(int maxAgeInSeconds) { + this.maxAgeInSeconds = maxAgeInSeconds; + return this; + } + + /** + * Get required if CorsRule element is present. A list of response headers to expose to CORS clients. + * + * @return the exposedHeaders value + */ + public List exposedHeaders() { + return this.exposedHeaders; + } + + /** + * Set required if CorsRule element is present. A list of response headers to expose to CORS clients. + * + * @param exposedHeaders the exposedHeaders value to set + * @return the CorsRule object itself. + */ + public CorsRule withExposedHeaders(List exposedHeaders) { + this.exposedHeaders = exposedHeaders; + return this; + } + + /** + * Get required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request. + * + * @return the allowedHeaders value + */ + public List allowedHeaders() { + return this.allowedHeaders; + } + + /** + * Set required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request. + * + * @param allowedHeaders the allowedHeaders value to set + * @return the CorsRule object itself. + */ + public CorsRule withAllowedHeaders(List allowedHeaders) { + this.allowedHeaders = allowedHeaders; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CorsRules.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CorsRules.java new file mode 100644 index 000000000000..77437df2a6c4 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CorsRules.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.storage.v2019_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Sets the CORS rules. You can include up to five CorsRule elements in the + * request. + */ +public class CorsRules { + /** + * The List of CORS rules. You can include up to five CorsRule elements in + * the request. + */ + @JsonProperty(value = "corsRules") + private List corsRules; + + /** + * Get the List of CORS rules. You can include up to five CorsRule elements in the request. + * + * @return the corsRules value + */ + public List corsRules() { + return this.corsRules; + } + + /** + * Set the List of CORS rules. You can include up to five CorsRule elements in the request. + * + * @param corsRules the corsRules value to set + * @return the CorsRules object itself. + */ + public CorsRules withCorsRules(List corsRules) { + this.corsRules = corsRules; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CustomDomain.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CustomDomain.java new file mode 100644 index 000000000000..ab8a7dd16caa --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/CustomDomain.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The custom domain assigned to this storage account. This can be set via + * Update. + */ +public class CustomDomain { + /** + * Gets or sets the custom domain name assigned to the storage account. + * Name is the CNAME source. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Indicates whether indirect CName validation is enabled. Default value is + * false. This should only be set on updates. + */ + @JsonProperty(value = "useSubDomainName") + private Boolean useSubDomainName; + + /** + * Get gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. + * + * @param name the name value to set + * @return the CustomDomain object itself. + */ + public CustomDomain withName(String name) { + this.name = name; + return this; + } + + /** + * Get indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates. + * + * @return the useSubDomainName value + */ + public Boolean useSubDomainName() { + return this.useSubDomainName; + } + + /** + * Set indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates. + * + * @param useSubDomainName the useSubDomainName value to set + * @return the CustomDomain object itself. + */ + public CustomDomain withUseSubDomainName(Boolean useSubDomainName) { + this.useSubDomainName = useSubDomainName; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DateAfterCreation.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DateAfterCreation.java new file mode 100644 index 000000000000..5c7fe162cf31 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DateAfterCreation.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Object to define the number of days after creation. + */ +public class DateAfterCreation { + /** + * Value indicating the age in days after creation. + */ + @JsonProperty(value = "daysAfterCreationGreaterThan", required = true) + private double daysAfterCreationGreaterThan; + + /** + * Get value indicating the age in days after creation. + * + * @return the daysAfterCreationGreaterThan value + */ + public double daysAfterCreationGreaterThan() { + return this.daysAfterCreationGreaterThan; + } + + /** + * Set value indicating the age in days after creation. + * + * @param daysAfterCreationGreaterThan the daysAfterCreationGreaterThan value to set + * @return the DateAfterCreation object itself. + */ + public DateAfterCreation withDaysAfterCreationGreaterThan(double daysAfterCreationGreaterThan) { + this.daysAfterCreationGreaterThan = daysAfterCreationGreaterThan; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DateAfterModification.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DateAfterModification.java new file mode 100644 index 000000000000..cee9c93a3125 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DateAfterModification.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Object to define the number of days after last modification. + */ +public class DateAfterModification { + /** + * Value indicating the age in days after last modification. + */ + @JsonProperty(value = "daysAfterModificationGreaterThan", required = true) + private double daysAfterModificationGreaterThan; + + /** + * Get value indicating the age in days after last modification. + * + * @return the daysAfterModificationGreaterThan value + */ + public double daysAfterModificationGreaterThan() { + return this.daysAfterModificationGreaterThan; + } + + /** + * Set value indicating the age in days after last modification. + * + * @param daysAfterModificationGreaterThan the daysAfterModificationGreaterThan value to set + * @return the DateAfterModification object itself. + */ + public DateAfterModification withDaysAfterModificationGreaterThan(double daysAfterModificationGreaterThan) { + this.daysAfterModificationGreaterThan = daysAfterModificationGreaterThan; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DefaultAction.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DefaultAction.java new file mode 100644 index 000000000000..04b65f2597e8 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DefaultAction.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DefaultAction. + */ +public enum DefaultAction { + /** Enum value Allow. */ + ALLOW("Allow"), + + /** Enum value Deny. */ + DENY("Deny"); + + /** The actual serialized value for a DefaultAction instance. */ + private String value; + + DefaultAction(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DefaultAction instance. + * + * @param value the serialized value to parse. + * @return the parsed DefaultAction object, or null if unable to parse. + */ + @JsonCreator + public static DefaultAction fromString(String value) { + DefaultAction[] items = DefaultAction.values(); + for (DefaultAction item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DeleteRetentionPolicy.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DeleteRetentionPolicy.java new file mode 100644 index 000000000000..09343c6b9095 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DeleteRetentionPolicy.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The blob service properties for soft delete. + */ +public class DeleteRetentionPolicy { + /** + * Indicates whether DeleteRetentionPolicy is enabled for the Blob service. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Indicates the number of days that the deleted blob should be retained. + * The minimum specified value can be 1 and the maximum value can be 365. + */ + @JsonProperty(value = "days") + private Integer days; + + /** + * Get indicates whether DeleteRetentionPolicy is enabled for the Blob service. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set indicates whether DeleteRetentionPolicy is enabled for the Blob service. + * + * @param enabled the enabled value to set + * @return the DeleteRetentionPolicy object itself. + */ + public DeleteRetentionPolicy withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get indicates the number of days that the deleted blob should be retained. The minimum specified value can be 1 and the maximum value can be 365. + * + * @return the days value + */ + public Integer days() { + return this.days; + } + + /** + * Set indicates the number of days that the deleted blob should be retained. The minimum specified value can be 1 and the maximum value can be 365. + * + * @param days the days value to set + * @return the DeleteRetentionPolicy object itself. + */ + public DeleteRetentionPolicy withDays(Integer days) { + this.days = days; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Dimension.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Dimension.java new file mode 100644 index 000000000000..5ccd44c57b91 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Dimension.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dimension of blobs, possibly be blob type or access tier. + */ +public class Dimension { + /** + * Display name of dimension. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Display name of dimension. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Get display name of dimension. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set display name of dimension. + * + * @param name the name value to set + * @return the Dimension object itself. + */ + public Dimension withName(String name) { + this.name = name; + return this; + } + + /** + * Get display name of dimension. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set display name of dimension. + * + * @param displayName the displayName value to set + * @return the Dimension object itself. + */ + public Dimension withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DirectoryServiceOptions.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DirectoryServiceOptions.java new file mode 100644 index 000000000000..bc130d2c5391 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DirectoryServiceOptions.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DirectoryServiceOptions. + */ +public final class DirectoryServiceOptions extends ExpandableStringEnum { + /** Static value None for DirectoryServiceOptions. */ + public static final DirectoryServiceOptions NONE = fromString("None"); + + /** Static value AADDS for DirectoryServiceOptions. */ + public static final DirectoryServiceOptions AADDS = fromString("AADDS"); + + /** Static value AD for DirectoryServiceOptions. */ + public static final DirectoryServiceOptions AD = fromString("AD"); + + /** + * Creates or finds a DirectoryServiceOptions from its string representation. + * @param name a name to look for + * @return the corresponding DirectoryServiceOptions + */ + @JsonCreator + public static DirectoryServiceOptions fromString(String name) { + return fromString(name, DirectoryServiceOptions.class); + } + + /** + * @return known DirectoryServiceOptions values + */ + public static Collection values() { + return values(DirectoryServiceOptions.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Encryption.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Encryption.java new file mode 100644 index 000000000000..37251e878db8 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Encryption.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The encryption settings on the storage account. + */ +public class Encryption { + /** + * List of services which support encryption. + */ + @JsonProperty(value = "services") + private EncryptionServices services; + + /** + * The encryption keySource (provider). Possible values (case-insensitive): + * Microsoft.Storage, Microsoft.Keyvault. Possible values include: + * 'Microsoft.Storage', 'Microsoft.Keyvault'. + */ + @JsonProperty(value = "keySource", required = true) + private KeySource keySource; + + /** + * Properties provided by key vault. + */ + @JsonProperty(value = "keyvaultproperties") + private KeyVaultProperties keyVaultProperties; + + /** + * Get list of services which support encryption. + * + * @return the services value + */ + public EncryptionServices services() { + return this.services; + } + + /** + * Set list of services which support encryption. + * + * @param services the services value to set + * @return the Encryption object itself. + */ + public Encryption withServices(EncryptionServices services) { + this.services = services; + return this; + } + + /** + * Get the encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. Possible values include: 'Microsoft.Storage', 'Microsoft.Keyvault'. + * + * @return the keySource value + */ + public KeySource keySource() { + return this.keySource; + } + + /** + * Set the encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. Possible values include: 'Microsoft.Storage', 'Microsoft.Keyvault'. + * + * @param keySource the keySource value to set + * @return the Encryption object itself. + */ + public Encryption withKeySource(KeySource keySource) { + this.keySource = keySource; + return this; + } + + /** + * Get properties provided by key vault. + * + * @return the keyVaultProperties value + */ + public KeyVaultProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set properties provided by key vault. + * + * @param keyVaultProperties the keyVaultProperties value to set + * @return the Encryption object itself. + */ + public Encryption withKeyVaultProperties(KeyVaultProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionService.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionService.java new file mode 100644 index 000000000000..4bdd525e7046 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionService.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.storage.v2019_06_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A service that allows server-side encryption to be used. + */ +public class EncryptionService { + /** + * A boolean indicating whether or not the service encrypts the data as it + * is stored. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Gets a rough estimate of the date/time when the encryption was last + * enabled by the user. Only returned when encryption is enabled. There + * might be some unencrypted blobs which were written after this time, as + * it is just a rough estimate. + */ + @JsonProperty(value = "lastEnabledTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastEnabledTime; + + /** + * Get a boolean indicating whether or not the service encrypts the data as it is stored. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set a boolean indicating whether or not the service encrypts the data as it is stored. + * + * @param enabled the enabled value to set + * @return the EncryptionService object itself. + */ + public EncryptionService withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get gets a rough estimate of the date/time when the encryption was last enabled by the user. Only returned when encryption is enabled. There might be some unencrypted blobs which were written after this time, as it is just a rough estimate. + * + * @return the lastEnabledTime value + */ + public DateTime lastEnabledTime() { + return this.lastEnabledTime; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionServices.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionServices.java new file mode 100644 index 000000000000..71595032e707 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionServices.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A list of services that support encryption. + */ +public class EncryptionServices { + /** + * The encryption function of the blob storage service. + */ + @JsonProperty(value = "blob") + private EncryptionService blob; + + /** + * The encryption function of the file storage service. + */ + @JsonProperty(value = "file") + private EncryptionService file; + + /** + * The encryption function of the table storage service. + */ + @JsonProperty(value = "table", access = JsonProperty.Access.WRITE_ONLY) + private EncryptionService table; + + /** + * The encryption function of the queue storage service. + */ + @JsonProperty(value = "queue", access = JsonProperty.Access.WRITE_ONLY) + private EncryptionService queue; + + /** + * Get the encryption function of the blob storage service. + * + * @return the blob value + */ + public EncryptionService blob() { + return this.blob; + } + + /** + * Set the encryption function of the blob storage service. + * + * @param blob the blob value to set + * @return the EncryptionServices object itself. + */ + public EncryptionServices withBlob(EncryptionService blob) { + this.blob = blob; + return this; + } + + /** + * Get the encryption function of the file storage service. + * + * @return the file value + */ + public EncryptionService file() { + return this.file; + } + + /** + * Set the encryption function of the file storage service. + * + * @param file the file value to set + * @return the EncryptionServices object itself. + */ + public EncryptionServices withFile(EncryptionService file) { + this.file = file; + return this; + } + + /** + * Get the encryption function of the table storage service. + * + * @return the table value + */ + public EncryptionService table() { + return this.table; + } + + /** + * Get the encryption function of the queue storage service. + * + * @return the queue value + */ + public EncryptionService queue() { + return this.queue; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Endpoints.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Endpoints.java new file mode 100644 index 000000000000..ad2f8a03c572 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Endpoints.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The URIs that are used to perform a retrieval of a public blob, queue, + * table, web or dfs object. + */ +public class Endpoints { + /** + * Gets the blob endpoint. + */ + @JsonProperty(value = "blob", access = JsonProperty.Access.WRITE_ONLY) + private String blob; + + /** + * Gets the queue endpoint. + */ + @JsonProperty(value = "queue", access = JsonProperty.Access.WRITE_ONLY) + private String queue; + + /** + * Gets the table endpoint. + */ + @JsonProperty(value = "table", access = JsonProperty.Access.WRITE_ONLY) + private String table; + + /** + * Gets the file endpoint. + */ + @JsonProperty(value = "file", access = JsonProperty.Access.WRITE_ONLY) + private String file; + + /** + * Gets the web endpoint. + */ + @JsonProperty(value = "web", access = JsonProperty.Access.WRITE_ONLY) + private String web; + + /** + * Gets the dfs endpoint. + */ + @JsonProperty(value = "dfs", access = JsonProperty.Access.WRITE_ONLY) + private String dfs; + + /** + * Get gets the blob endpoint. + * + * @return the blob value + */ + public String blob() { + return this.blob; + } + + /** + * Get gets the queue endpoint. + * + * @return the queue value + */ + public String queue() { + return this.queue; + } + + /** + * Get gets the table endpoint. + * + * @return the table value + */ + public String table() { + return this.table; + } + + /** + * Get gets the file endpoint. + * + * @return the file value + */ + public String file() { + return this.file; + } + + /** + * Get gets the web endpoint. + * + * @return the web value + */ + public String web() { + return this.web; + } + + /** + * Get gets the dfs endpoint. + * + * @return the dfs value + */ + public String dfs() { + return this.dfs; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ErrorResponse.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ErrorResponse.java new file mode 100644 index 000000000000..b9e0ce8f03ed --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ErrorResponse.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An error response from the storage resource provider. + */ +public class ErrorResponse { + /** + * An identifier for the error. Codes are invariant and are intended to be + * consumed programmatically. + */ + @JsonProperty(value = "code") + private String code; + + /** + * A message describing the error, intended to be suitable for display in a + * user interface. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get an identifier for the error. Codes are invariant and are intended to be consumed programmatically. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set an identifier for the error. Codes are invariant and are intended to be consumed programmatically. + * + * @param code the code value to set + * @return the ErrorResponse object itself. + */ + public ErrorResponse withCode(String code) { + this.code = code; + return this; + } + + /** + * Get a message describing the error, intended to be suitable for display in a user interface. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set a message describing the error, intended to be suitable for display in a user interface. + * + * @param message the message value to set + * @return the ErrorResponse object itself. + */ + public ErrorResponse withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ErrorResponseException.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ErrorResponseException.java new file mode 100644 index 000000000000..39a26ec3149f --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ErrorResponseException.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.storage.v2019_06_01; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ErrorResponse information. + */ +public class ErrorResponseException extends RestException { + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ErrorResponseException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { + super(message, response, body); + } + + @Override + public ErrorResponse body() { + return (ErrorResponse) super.body(); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceItems.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceItems.java new file mode 100644 index 000000000000..93522a5b2c95 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceItems.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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.FileServiceItemsInner; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.FileServicePropertiesInner; +import java.util.List; + +/** + * Type representing FileServiceItems. + */ +public interface FileServiceItems extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceProperties.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceProperties.java new file mode 100644 index 000000000000..3c7625b0a672 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceProperties.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.FileServicePropertiesInner; +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.storage.v2019_06_01.implementation.StorageManager; +import java.util.List; + +/** + * Type representing FileServiceProperties. + */ +public interface FileServiceProperties extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the cors value. + */ + CorsRules cors(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the FileServiceProperties definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithStorageAccount, DefinitionStages.WithCors, DefinitionStages.WithCreate { + } + + /** + * Grouping of FileServiceProperties definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a FileServiceProperties definition. + */ + interface Blank extends WithStorageAccount { + } + + /** + * The stage of the fileserviceproperties definition allowing to specify StorageAccount. + */ + interface WithStorageAccount { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only + * @return the next definition stage + */ + WithCors withExistingStorageAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the fileserviceproperties definition allowing to specify Cors. + */ + interface WithCors { + /** + * Specifies cors. + * @param cors Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service + * @return the next definition stage + */ + WithCreate withCors(CorsRules cors); + } + + /** + * 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 FileServiceProperties update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithCors { + } + + /** + * Grouping of FileServiceProperties update stages. + */ + interface UpdateStages { + /** + * The stage of the fileserviceproperties update allowing to specify Cors. + */ + interface WithCors { + /** + * Specifies cors. + * @param cors Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service + * @return the next update stage + */ + Update withCors(CorsRules cors); + } + + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServices.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServices.java new file mode 100644 index 000000000000..5a6a95a5c19a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServices.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.FileServicesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing FileServices. + */ +public interface FileServices extends SupportsCreating, HasInner { + /** + * List all file services in storage accounts. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String accountName); + + /** + * Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getServicePropertiesAsync(String resourceGroupName, String accountName); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShare.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShare.java new file mode 100644 index 000000000000..be94cfa0562a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShare.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.FileShareInner; +import com.microsoft.azure.arm.model.Indexable; +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.storage.v2019_06_01.implementation.StorageManager; +import java.util.Map; +import org.joda.time.DateTime; + +/** + * Type representing FileShare. + */ +public interface FileShare extends HasInner, Indexable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the lastModifiedTime value. + */ + DateTime lastModifiedTime(); + + /** + * @return the metadata value. + */ + Map metadata(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the shareQuota value. + */ + Integer shareQuota(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the FileShare definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithFileService, DefinitionStages.WithMetadata, DefinitionStages.WithShareQuota, DefinitionStages.WithCreate { + } + + /** + * Grouping of FileShare definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a FileShare definition. + */ + interface Blank extends WithFileService { + } + + /** + * The stage of the fileshare definition allowing to specify FileService. + */ + interface WithFileService { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only + * @return the next definition stage + */ + WithMetadata withExistingFileService(String resourceGroupName, String accountName); + } + + /** + * The stage of the fileshare definition allowing to specify Metadata. + */ + interface WithMetadata { + /** + * Specifies metadata. + * @param metadata A name-value pair to associate with the share as metadata + * @return the next definition stage + */ + WithShareQuota withMetadata(Map metadata); + } + + /** + * The stage of the fileshare definition allowing to specify ShareQuota. + */ + interface WithShareQuota { + /** + * Specifies shareQuota. + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120) + * @return the next definition stage + */ + WithCreate withShareQuota(Integer shareQuota); + } + + /** + * 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 FileShare update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithMetadata, UpdateStages.WithShareQuota { + } + + /** + * Grouping of FileShare update stages. + */ + interface UpdateStages { + /** + * The stage of the fileshare update allowing to specify Metadata. + */ + interface WithMetadata { + /** + * Specifies metadata. + * @param metadata A name-value pair to associate with the share as metadata + * @return the next update stage + */ + Update withMetadata(Map metadata); + } + + /** + * The stage of the fileshare update allowing to specify ShareQuota. + */ + interface WithShareQuota { + /** + * Specifies shareQuota. + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120) + * @return the next update stage + */ + Update withShareQuota(Integer shareQuota); + } + + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShareItem.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShareItem.java new file mode 100644 index 000000000000..d0e56e51ef15 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShareItem.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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.FileShareItemInner; +import org.joda.time.DateTime; +import java.util.Map; + +/** + * Type representing FileShareItem. + */ +public interface FileShareItem extends HasInner, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the lastModifiedTime value. + */ + DateTime lastModifiedTime(); + + /** + * @return the metadata value. + */ + Map metadata(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the shareQuota value. + */ + Integer shareQuota(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShares.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShares.java new file mode 100644 index 000000000000..d81fe9cd759f --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShares.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.storage.v2019_06_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.FileSharesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing FileShares. + */ +public interface FileShares extends SupportsCreating, HasInner { + /** + * Lists all shares. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String accountName); + + /** + * Gets properties of a specified share. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String shareName); + + /** + * Deletes specified share under its account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String shareName); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/GeoReplicationStats.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/GeoReplicationStats.java new file mode 100644 index 000000000000..c8dce587b362 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/GeoReplicationStats.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.storage.v2019_06_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Statistics related to replication for storage account's Blob, Table, Queue + * and File services. It is only available when geo-redundant replication is + * enabled for the storage account. + */ +public class GeoReplicationStats { + /** + * The status of the secondary location. Possible values are: - Live: + * Indicates that the secondary location is active and operational. - + * Bootstrap: Indicates initial synchronization from the primary location + * to the secondary location is in progress.This typically occurs when + * replication is first enabled. - Unavailable: Indicates that the + * secondary location is temporarily unavailable. Possible values include: + * 'Live', 'Bootstrap', 'Unavailable'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private GeoReplicationStatus status; + + /** + * All primary writes preceding this UTC date/time value are guaranteed to + * be available for read operations. Primary writes following this point in + * time may or may not be available for reads. Element may be default value + * if value of LastSyncTime is not available, this can happen if secondary + * is offline or we are in bootstrap. + */ + @JsonProperty(value = "lastSyncTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastSyncTime; + + /** + * A boolean flag which indicates whether or not account failover is + * supported for the account. + */ + @JsonProperty(value = "canFailover", access = JsonProperty.Access.WRITE_ONLY) + private Boolean canFailover; + + /** + * Get the status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable. Possible values include: 'Live', 'Bootstrap', 'Unavailable'. + * + * @return the status value + */ + public GeoReplicationStatus status() { + return this.status; + } + + /** + * Get all primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary writes following this point in time may or may not be available for reads. Element may be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap. + * + * @return the lastSyncTime value + */ + public DateTime lastSyncTime() { + return this.lastSyncTime; + } + + /** + * Get a boolean flag which indicates whether or not account failover is supported for the account. + * + * @return the canFailover value + */ + public Boolean canFailover() { + return this.canFailover; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/GeoReplicationStatus.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/GeoReplicationStatus.java new file mode 100644 index 000000000000..8a426eaf1356 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/GeoReplicationStatus.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for GeoReplicationStatus. + */ +public final class GeoReplicationStatus extends ExpandableStringEnum { + /** Static value Live for GeoReplicationStatus. */ + public static final GeoReplicationStatus LIVE = fromString("Live"); + + /** Static value Bootstrap for GeoReplicationStatus. */ + public static final GeoReplicationStatus BOOTSTRAP = fromString("Bootstrap"); + + /** Static value Unavailable for GeoReplicationStatus. */ + public static final GeoReplicationStatus UNAVAILABLE = fromString("Unavailable"); + + /** + * Creates or finds a GeoReplicationStatus from its string representation. + * @param name a name to look for + * @return the corresponding GeoReplicationStatus + */ + @JsonCreator + public static GeoReplicationStatus fromString(String name) { + return fromString(name, GeoReplicationStatus.class); + } + + /** + * @return known GeoReplicationStatus values + */ + public static Collection values() { + return values(GeoReplicationStatus.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/HttpProtocol.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/HttpProtocol.java new file mode 100644 index 000000000000..6990c795dcd0 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/HttpProtocol.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for HttpProtocol. + */ +public enum HttpProtocol { + /** Enum value https,http. */ + HTTPSHTTP("https,http"), + + /** Enum value https. */ + HTTPS("https"); + + /** The actual serialized value for a HttpProtocol instance. */ + private String value; + + HttpProtocol(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a HttpProtocol instance. + * + * @param value the serialized value to parse. + * @return the parsed HttpProtocol object, or null if unable to parse. + */ + @JsonCreator + public static HttpProtocol fromString(String value) { + HttpProtocol[] items = HttpProtocol.values(); + for (HttpProtocol item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/IPRule.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/IPRule.java new file mode 100644 index 000000000000..00a3806b576c --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/IPRule.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * IP rule with specific IP or IP range in CIDR format. + */ +public class IPRule { + /** + * Specifies the IP or IP range in CIDR format. Only IPV4 address is + * allowed. + */ + @JsonProperty(value = "value", required = true) + private String iPAddressOrRange; + + /** + * The action of IP ACL rule. Possible values include: 'Allow'. + */ + @JsonProperty(value = "action") + private Action action; + + /** + * Get specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + * + * @return the iPAddressOrRange value + */ + public String iPAddressOrRange() { + return this.iPAddressOrRange; + } + + /** + * Set specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + * + * @param iPAddressOrRange the iPAddressOrRange value to set + * @return the IPRule object itself. + */ + public IPRule withIPAddressOrRange(String iPAddressOrRange) { + this.iPAddressOrRange = iPAddressOrRange; + return this; + } + + /** + * Get the action of IP ACL rule. Possible values include: 'Allow'. + * + * @return the action value + */ + public Action action() { + return this.action; + } + + /** + * Set the action of IP ACL rule. Possible values include: 'Allow'. + * + * @param action the action value to set + * @return the IPRule object itself. + */ + public IPRule withAction(Action action) { + this.action = action; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Identity.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Identity.java new file mode 100644 index 000000000000..e2ac7d1ce811 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Identity.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Identity for the resource. + */ +public class Identity { + /** + * The principal ID of resource identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * The tenant ID of resource. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /** + * The identity type. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * Creates an instance of Identity class. + */ + public Identity() { + type = "SystemAssigned"; + } + + /** + * Get the principal ID of resource identity. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenant ID of resource. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the identity type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the identity type. + * + * @param type the type value to set + * @return the Identity object itself. + */ + public Identity withType(String type) { + this.type = type; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicy.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicy.java new file mode 100644 index 000000000000..9c7ed4bc0307 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicy.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.ImmutabilityPolicyInner; +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.storage.v2019_06_01.implementation.StorageManager; + +/** + * Type representing ImmutabilityPolicy. + */ +public interface ImmutabilityPolicy extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the immutabilityPeriodSinceCreationInDays value. + */ + int immutabilityPeriodSinceCreationInDays(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the state value. + */ + ImmutabilityPolicyState state(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ImmutabilityPolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithContainer, DefinitionStages.WithIfMatch, DefinitionStages.WithImmutabilityPeriodSinceCreationInDays, DefinitionStages.WithCreate { + } + + /** + * Grouping of ImmutabilityPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ImmutabilityPolicy definition. + */ + interface Blank extends WithContainer { + } + + /** + * The stage of the immutabilitypolicy definition allowing to specify Container. + */ + interface WithContainer { + /** + * Specifies resourceGroupName, accountName, containerName. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number + * @return the next definition stage + */ + WithIfMatch withExistingContainer(String resourceGroupName, String accountName, String containerName); + } + + /** + * The stage of the immutabilitypolicy definition allowing to specify IfMatch. + */ + interface WithIfMatch { + /** + * Specifies ifMatch. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied + * @return the next definition stage + */ + WithImmutabilityPeriodSinceCreationInDays withIfMatch(String ifMatch); + } + + /** + * The stage of the immutabilitypolicy definition allowing to specify ImmutabilityPeriodSinceCreationInDays. + */ + interface WithImmutabilityPeriodSinceCreationInDays { + /** + * Specifies immutabilityPeriodSinceCreationInDays. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days + * @return the next definition stage + */ + WithCreate withImmutabilityPeriodSinceCreationInDays(int immutabilityPeriodSinceCreationInDays); + } + + /** + * 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 ImmutabilityPolicy update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithIfMatch, UpdateStages.WithImmutabilityPeriodSinceCreationInDays { + } + + /** + * Grouping of ImmutabilityPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the immutabilitypolicy update allowing to specify IfMatch. + */ + interface WithIfMatch { + /** + * Specifies ifMatch. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied + * @return the next update stage + */ + Update withIfMatch(String ifMatch); + } + + /** + * The stage of the immutabilitypolicy update allowing to specify ImmutabilityPeriodSinceCreationInDays. + */ + interface WithImmutabilityPeriodSinceCreationInDays { + /** + * Specifies immutabilityPeriodSinceCreationInDays. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days + * @return the next update stage + */ + Update withImmutabilityPeriodSinceCreationInDays(int immutabilityPeriodSinceCreationInDays); + } + + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyProperties.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyProperties.java new file mode 100644 index 000000000000..658464ded45f --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyProperties.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The properties of an ImmutabilityPolicy of a blob container. + */ +@JsonFlatten +public class ImmutabilityPolicyProperties { + /** + * The immutability period for the blobs in the container since the policy + * creation, in days. + */ + @JsonProperty(value = "properties.immutabilityPeriodSinceCreationInDays", required = true) + private int immutabilityPeriodSinceCreationInDays; + + /** + * The ImmutabilityPolicy state of a blob container, possible values + * include: Locked and Unlocked. Possible values include: 'Locked', + * 'Unlocked'. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private ImmutabilityPolicyState state; + + /** + * ImmutabilityPolicy Etag. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * The ImmutabilityPolicy update history of the blob container. + */ + @JsonProperty(value = "updateHistory", access = JsonProperty.Access.WRITE_ONLY) + private List updateHistory; + + /** + * Get the immutability period for the blobs in the container since the policy creation, in days. + * + * @return the immutabilityPeriodSinceCreationInDays value + */ + public int immutabilityPeriodSinceCreationInDays() { + return this.immutabilityPeriodSinceCreationInDays; + } + + /** + * Set the immutability period for the blobs in the container since the policy creation, in days. + * + * @param immutabilityPeriodSinceCreationInDays the immutabilityPeriodSinceCreationInDays value to set + * @return the ImmutabilityPolicyProperties object itself. + */ + public ImmutabilityPolicyProperties withImmutabilityPeriodSinceCreationInDays(int immutabilityPeriodSinceCreationInDays) { + this.immutabilityPeriodSinceCreationInDays = immutabilityPeriodSinceCreationInDays; + return this; + } + + /** + * Get the ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked'. + * + * @return the state value + */ + public ImmutabilityPolicyState state() { + return this.state; + } + + /** + * Get immutabilityPolicy Etag. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get the ImmutabilityPolicy update history of the blob container. + * + * @return the updateHistory value + */ + public List updateHistory() { + return this.updateHistory; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyState.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyState.java new file mode 100644 index 000000000000..3460d209c4d9 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyState.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ImmutabilityPolicyState. + */ +public final class ImmutabilityPolicyState extends ExpandableStringEnum { + /** Static value Locked for ImmutabilityPolicyState. */ + public static final ImmutabilityPolicyState LOCKED = fromString("Locked"); + + /** Static value Unlocked for ImmutabilityPolicyState. */ + public static final ImmutabilityPolicyState UNLOCKED = fromString("Unlocked"); + + /** + * Creates or finds a ImmutabilityPolicyState from its string representation. + * @param name a name to look for + * @return the corresponding ImmutabilityPolicyState + */ + @JsonCreator + public static ImmutabilityPolicyState fromString(String name) { + return fromString(name, ImmutabilityPolicyState.class); + } + + /** + * @return known ImmutabilityPolicyState values + */ + public static Collection values() { + return values(ImmutabilityPolicyState.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyUpdateType.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyUpdateType.java new file mode 100644 index 000000000000..8d0ca1632c31 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyUpdateType.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ImmutabilityPolicyUpdateType. + */ +public final class ImmutabilityPolicyUpdateType extends ExpandableStringEnum { + /** Static value put for ImmutabilityPolicyUpdateType. */ + public static final ImmutabilityPolicyUpdateType PUT = fromString("put"); + + /** Static value lock for ImmutabilityPolicyUpdateType. */ + public static final ImmutabilityPolicyUpdateType LOCK = fromString("lock"); + + /** Static value extend for ImmutabilityPolicyUpdateType. */ + public static final ImmutabilityPolicyUpdateType EXTEND = fromString("extend"); + + /** + * Creates or finds a ImmutabilityPolicyUpdateType from its string representation. + * @param name a name to look for + * @return the corresponding ImmutabilityPolicyUpdateType + */ + @JsonCreator + public static ImmutabilityPolicyUpdateType fromString(String name) { + return fromString(name, ImmutabilityPolicyUpdateType.class); + } + + /** + * @return known ImmutabilityPolicyUpdateType values + */ + public static Collection values() { + return values(ImmutabilityPolicyUpdateType.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/KeyPermission.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/KeyPermission.java new file mode 100644 index 000000000000..b4b738e567a1 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/KeyPermission.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for KeyPermission. + */ +public enum KeyPermission { + /** Enum value Read. */ + READ("Read"), + + /** Enum value Full. */ + FULL("Full"); + + /** The actual serialized value for a KeyPermission instance. */ + private String value; + + KeyPermission(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a KeyPermission instance. + * + * @param value the serialized value to parse. + * @return the parsed KeyPermission object, or null if unable to parse. + */ + @JsonCreator + public static KeyPermission fromString(String value) { + KeyPermission[] items = KeyPermission.values(); + for (KeyPermission item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/KeySource.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/KeySource.java new file mode 100644 index 000000000000..8c3b7f5913d1 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/KeySource.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for KeySource. + */ +public final class KeySource extends ExpandableStringEnum { + /** Static value Microsoft.Storage for KeySource. */ + public static final KeySource MICROSOFT_STORAGE = fromString("Microsoft.Storage"); + + /** Static value Microsoft.Keyvault for KeySource. */ + public static final KeySource MICROSOFT_KEYVAULT = fromString("Microsoft.Keyvault"); + + /** + * Creates or finds a KeySource from its string representation. + * @param name a name to look for + * @return the corresponding KeySource + */ + @JsonCreator + public static KeySource fromString(String name) { + return fromString(name, KeySource.class); + } + + /** + * @return known KeySource values + */ + public static Collection values() { + return values(KeySource.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/KeyVaultProperties.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/KeyVaultProperties.java new file mode 100644 index 000000000000..63de743ed910 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/KeyVaultProperties.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of key vault. + */ +public class KeyVaultProperties { + /** + * The name of KeyVault key. + */ + @JsonProperty(value = "keyname") + private String keyName; + + /** + * The version of KeyVault key. + */ + @JsonProperty(value = "keyversion") + private String keyVersion; + + /** + * The Uri of KeyVault. + */ + @JsonProperty(value = "keyvaulturi") + private String keyVaultUri; + + /** + * Get the name of KeyVault key. + * + * @return the keyName value + */ + public String keyName() { + return this.keyName; + } + + /** + * Set the name of KeyVault key. + * + * @param keyName the keyName value to set + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + /** + * Get the version of KeyVault key. + * + * @return the keyVersion value + */ + public String keyVersion() { + return this.keyVersion; + } + + /** + * Set the version of KeyVault key. + * + * @param keyVersion the keyVersion value to set + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyVersion(String keyVersion) { + this.keyVersion = keyVersion; + return this; + } + + /** + * Get the Uri of KeyVault. + * + * @return the keyVaultUri value + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the Uri of KeyVault. + * + * @param keyVaultUri the keyVaultUri value to set + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Kind.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Kind.java new file mode 100644 index 000000000000..b0ec17f27dea --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Kind.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Kind. + */ +public final class Kind extends ExpandableStringEnum { + /** Static value Storage for Kind. */ + public static final Kind STORAGE = fromString("Storage"); + + /** Static value StorageV2 for Kind. */ + public static final Kind STORAGE_V2 = fromString("StorageV2"); + + /** Static value BlobStorage for Kind. */ + public static final Kind BLOB_STORAGE = fromString("BlobStorage"); + + /** Static value FileStorage for Kind. */ + public static final Kind FILE_STORAGE = fromString("FileStorage"); + + /** Static value BlockBlobStorage for Kind. */ + public static final Kind BLOCK_BLOB_STORAGE = fromString("BlockBlobStorage"); + + /** + * Creates or finds a Kind from its string representation. + * @param name a name to look for + * @return the corresponding Kind + */ + @JsonCreator + public static Kind fromString(String name) { + return fromString(name, Kind.class); + } + + /** + * @return known Kind values + */ + public static Collection values() { + return values(Kind.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LargeFileSharesState.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LargeFileSharesState.java new file mode 100644 index 000000000000..97a4d7287d30 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LargeFileSharesState.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LargeFileSharesState. + */ +public final class LargeFileSharesState extends ExpandableStringEnum { + /** Static value Disabled for LargeFileSharesState. */ + public static final LargeFileSharesState DISABLED = fromString("Disabled"); + + /** Static value Enabled for LargeFileSharesState. */ + public static final LargeFileSharesState ENABLED = fromString("Enabled"); + + /** + * Creates or finds a LargeFileSharesState from its string representation. + * @param name a name to look for + * @return the corresponding LargeFileSharesState + */ + @JsonCreator + public static LargeFileSharesState fromString(String name) { + return fromString(name, LargeFileSharesState.class); + } + + /** + * @return known LargeFileSharesState values + */ + public static Collection values() { + return values(LargeFileSharesState.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseContainerRequest.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseContainerRequest.java new file mode 100644 index 000000000000..a7e3d036bc47 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseContainerRequest.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Lease Container request schema. + */ +public class LeaseContainerRequest { + /** + * Specifies the lease action. Can be one of the available actions. + * Possible values include: 'Acquire', 'Renew', 'Change', 'Release', + * 'Break'. + */ + @JsonProperty(value = "action", required = true) + private String action; + + /** + * Identifies the lease. Can be specified in any valid GUID string format. + */ + @JsonProperty(value = "leaseId") + private String leaseId; + + /** + * Optional. For a break action, proposed duration the lease should + * continue before it is broken, in seconds, between 0 and 60. + */ + @JsonProperty(value = "breakPeriod") + private Integer breakPeriod; + + /** + * Required for acquire. Specifies the duration of the lease, in seconds, + * or negative one (-1) for a lease that never expires. + */ + @JsonProperty(value = "leaseDuration") + private Integer leaseDuration; + + /** + * Optional for acquire, required for change. Proposed lease ID, in a GUID + * string format. + */ + @JsonProperty(value = "proposedLeaseId") + private String proposedLeaseId; + + /** + * Get specifies the lease action. Can be one of the available actions. Possible values include: 'Acquire', 'Renew', 'Change', 'Release', 'Break'. + * + * @return the action value + */ + public String action() { + return this.action; + } + + /** + * Set specifies the lease action. Can be one of the available actions. Possible values include: 'Acquire', 'Renew', 'Change', 'Release', 'Break'. + * + * @param action the action value to set + * @return the LeaseContainerRequest object itself. + */ + public LeaseContainerRequest withAction(String action) { + this.action = action; + return this; + } + + /** + * Get identifies the lease. Can be specified in any valid GUID string format. + * + * @return the leaseId value + */ + public String leaseId() { + return this.leaseId; + } + + /** + * Set identifies the lease. Can be specified in any valid GUID string format. + * + * @param leaseId the leaseId value to set + * @return the LeaseContainerRequest object itself. + */ + public LeaseContainerRequest withLeaseId(String leaseId) { + this.leaseId = leaseId; + return this; + } + + /** + * Get optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. + * + * @return the breakPeriod value + */ + public Integer breakPeriod() { + return this.breakPeriod; + } + + /** + * Set optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. + * + * @param breakPeriod the breakPeriod value to set + * @return the LeaseContainerRequest object itself. + */ + public LeaseContainerRequest withBreakPeriod(Integer breakPeriod) { + this.breakPeriod = breakPeriod; + return this; + } + + /** + * Get required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. + * + * @return the leaseDuration value + */ + public Integer leaseDuration() { + return this.leaseDuration; + } + + /** + * Set required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. + * + * @param leaseDuration the leaseDuration value to set + * @return the LeaseContainerRequest object itself. + */ + public LeaseContainerRequest withLeaseDuration(Integer leaseDuration) { + this.leaseDuration = leaseDuration; + return this; + } + + /** + * Get optional for acquire, required for change. Proposed lease ID, in a GUID string format. + * + * @return the proposedLeaseId value + */ + public String proposedLeaseId() { + return this.proposedLeaseId; + } + + /** + * Set optional for acquire, required for change. Proposed lease ID, in a GUID string format. + * + * @param proposedLeaseId the proposedLeaseId value to set + * @return the LeaseContainerRequest object itself. + */ + public LeaseContainerRequest withProposedLeaseId(String proposedLeaseId) { + this.proposedLeaseId = proposedLeaseId; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseContainerResponse.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseContainerResponse.java new file mode 100644 index 000000000000..1bf745cf76cf --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseContainerResponse.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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.LeaseContainerResponseInner; + +/** + * Type representing LeaseContainerResponse. + */ +public interface LeaseContainerResponse extends HasInner, HasManager { + /** + * @return the leaseId value. + */ + String leaseId(); + + /** + * @return the leaseTimeSeconds value. + */ + String leaseTimeSeconds(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseDuration.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseDuration.java new file mode 100644 index 000000000000..a8482ae4cd21 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseDuration.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LeaseDuration. + */ +public final class LeaseDuration extends ExpandableStringEnum { + /** Static value Infinite for LeaseDuration. */ + public static final LeaseDuration INFINITE = fromString("Infinite"); + + /** Static value Fixed for LeaseDuration. */ + public static final LeaseDuration FIXED = fromString("Fixed"); + + /** + * Creates or finds a LeaseDuration from its string representation. + * @param name a name to look for + * @return the corresponding LeaseDuration + */ + @JsonCreator + public static LeaseDuration fromString(String name) { + return fromString(name, LeaseDuration.class); + } + + /** + * @return known LeaseDuration values + */ + public static Collection values() { + return values(LeaseDuration.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseState.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseState.java new file mode 100644 index 000000000000..1b8717c605b9 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseState.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LeaseState. + */ +public final class LeaseState extends ExpandableStringEnum { + /** Static value Available for LeaseState. */ + public static final LeaseState AVAILABLE = fromString("Available"); + + /** Static value Leased for LeaseState. */ + public static final LeaseState LEASED = fromString("Leased"); + + /** Static value Expired for LeaseState. */ + public static final LeaseState EXPIRED = fromString("Expired"); + + /** Static value Breaking for LeaseState. */ + public static final LeaseState BREAKING = fromString("Breaking"); + + /** Static value Broken for LeaseState. */ + public static final LeaseState BROKEN = fromString("Broken"); + + /** + * Creates or finds a LeaseState from its string representation. + * @param name a name to look for + * @return the corresponding LeaseState + */ + @JsonCreator + public static LeaseState fromString(String name) { + return fromString(name, LeaseState.class); + } + + /** + * @return known LeaseState values + */ + public static Collection values() { + return values(LeaseState.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseStatus.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseStatus.java new file mode 100644 index 000000000000..62229b371cee --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LeaseStatus.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LeaseStatus. + */ +public final class LeaseStatus extends ExpandableStringEnum { + /** Static value Locked for LeaseStatus. */ + public static final LeaseStatus LOCKED = fromString("Locked"); + + /** Static value Unlocked for LeaseStatus. */ + public static final LeaseStatus UNLOCKED = fromString("Unlocked"); + + /** + * Creates or finds a LeaseStatus from its string representation. + * @param name a name to look for + * @return the corresponding LeaseStatus + */ + @JsonCreator + public static LeaseStatus fromString(String name) { + return fromString(name, LeaseStatus.class); + } + + /** + * @return known LeaseStatus values + */ + public static Collection values() { + return values(LeaseStatus.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LegalHold.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LegalHold.java new file mode 100644 index 000000000000..e7a4037708ad --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LegalHold.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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.LegalHoldInner; +import java.util.List; + +/** + * Type representing LegalHold. + */ +public interface LegalHold extends HasInner, HasManager { + /** + * @return the hasLegalHold value. + */ + Boolean hasLegalHold(); + + /** + * @return the tags value. + */ + List tags(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LegalHoldProperties.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LegalHoldProperties.java new file mode 100644 index 000000000000..0ed516c2b454 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/LegalHoldProperties.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.storage.v2019_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The LegalHold property of a blob container. + */ +public class LegalHoldProperties { + /** + * The hasLegalHold public property is set to true by SRP if there are at + * least one existing tag. The hasLegalHold public property is set to false + * by SRP if all existing legal hold tags are cleared out. There can be a + * maximum of 1000 blob containers with hasLegalHold=true for a given + * account. + */ + @JsonProperty(value = "hasLegalHold", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasLegalHold; + + /** + * The list of LegalHold tags of a blob container. + */ + @JsonProperty(value = "tags") + private List tags; + + /** + * Get the hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. + * + * @return the hasLegalHold value + */ + public Boolean hasLegalHold() { + return this.hasLegalHold; + } + + /** + * Get the list of LegalHold tags of a blob container. + * + * @return the tags value + */ + public List tags() { + return this.tags; + } + + /** + * Set the list of LegalHold tags of a blob container. + * + * @param tags the tags value to set + * @return the LegalHoldProperties object itself. + */ + public LegalHoldProperties withTags(List tags) { + this.tags = tags; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListAccountSasResponse.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListAccountSasResponse.java new file mode 100644 index 000000000000..158ea9fcfc9a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListAccountSasResponse.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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.ListAccountSasResponseInner; + +/** + * Type representing ListAccountSasResponse. + */ +public interface ListAccountSasResponse extends HasInner, HasManager { + /** + * @return the accountSasToken value. + */ + String accountSasToken(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListContainerItem.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListContainerItem.java new file mode 100644 index 000000000000..7bbc62365fe9 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListContainerItem.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.ListContainerItemInner; +import org.joda.time.DateTime; +import java.util.Map; + +/** + * Type representing ListContainerItem. + */ +public interface ListContainerItem extends HasInner, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the hasImmutabilityPolicy value. + */ + Boolean hasImmutabilityPolicy(); + + /** + * @return the hasLegalHold value. + */ + Boolean hasLegalHold(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the immutabilityPolicy value. + */ + ImmutabilityPolicyProperties immutabilityPolicy(); + + /** + * @return the lastModifiedTime value. + */ + DateTime lastModifiedTime(); + + /** + * @return the leaseDuration value. + */ + LeaseDuration leaseDuration(); + + /** + * @return the leaseState value. + */ + LeaseState leaseState(); + + /** + * @return the leaseStatus value. + */ + LeaseStatus leaseStatus(); + + /** + * @return the legalHold value. + */ + LegalHoldProperties legalHold(); + + /** + * @return the metadata value. + */ + Map metadata(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the publicAccess value. + */ + PublicAccess publicAccess(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListKeyExpand.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListKeyExpand.java new file mode 100644 index 000000000000..c129265563fa --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListKeyExpand.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ListKeyExpand. + */ +public enum ListKeyExpand { + /** Enum value kerb. */ + KERB("kerb"); + + /** The actual serialized value for a ListKeyExpand instance. */ + private String value; + + ListKeyExpand(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ListKeyExpand instance. + * + * @param value the serialized value to parse. + * @return the parsed ListKeyExpand object, or null if unable to parse. + */ + @JsonCreator + public static ListKeyExpand fromString(String value) { + ListKeyExpand[] items = ListKeyExpand.values(); + for (ListKeyExpand item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListServiceSasResponse.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListServiceSasResponse.java new file mode 100644 index 000000000000..fb2006821e43 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ListServiceSasResponse.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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.ListServiceSasResponseInner; + +/** + * Type representing ListServiceSasResponse. + */ +public interface ListServiceSasResponse extends HasInner, HasManager { + /** + * @return the serviceSasToken value. + */ + String serviceSasToken(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicies.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicies.java new file mode 100644 index 000000000000..fc7c2eb027b3 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicies.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.storage.v2019_06_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.ManagementPoliciesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ManagementPolicies. + */ +public interface ManagementPolicies extends SupportsCreating, HasInner { + /** + * Gets the managementpolicy associated with the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName); + + /** + * Deletes the managementpolicy associated with the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicy.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicy.java new file mode 100644 index 000000000000..e41dab2b155e --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicy.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.ManagementPolicyInner; +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.storage.v2019_06_01.implementation.StorageManager; +import java.util.List; +import org.joda.time.DateTime; + +/** + * Type representing ManagementPolicy. + */ +public interface ManagementPolicy extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the lastModifiedTime value. + */ + DateTime lastModifiedTime(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the policy value. + */ + ManagementPolicySchema policy(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ManagementPolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithStorageAccount, DefinitionStages.WithPolicy, DefinitionStages.WithCreate { + } + + /** + * Grouping of ManagementPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ManagementPolicy definition. + */ + interface Blank extends WithStorageAccount { + } + + /** + * The stage of the managementpolicy definition allowing to specify StorageAccount. + */ + interface WithStorageAccount { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only + * @return the next definition stage + */ + WithPolicy withExistingStorageAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the managementpolicy definition allowing to specify Policy. + */ + interface WithPolicy { + /** + * Specifies policy. + * @param policy The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts + * @return the next definition stage + */ + WithCreate withPolicy(ManagementPolicySchema policy); + } + + /** + * 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 ManagementPolicy update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithPolicy { + } + + /** + * Grouping of ManagementPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the managementpolicy update allowing to specify Policy. + */ + interface WithPolicy { + /** + * Specifies policy. + * @param policy The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts + * @return the next update stage + */ + Update withPolicy(ManagementPolicySchema policy); + } + + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyAction.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyAction.java new file mode 100644 index 000000000000..305636997cd6 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyAction.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Actions are applied to the filtered blobs when the execution condition is + * met. + */ +public class ManagementPolicyAction { + /** + * The management policy action for base blob. + */ + @JsonProperty(value = "baseBlob") + private ManagementPolicyBaseBlob baseBlob; + + /** + * The management policy action for snapshot. + */ + @JsonProperty(value = "snapshot") + private ManagementPolicySnapShot snapshot; + + /** + * Get the management policy action for base blob. + * + * @return the baseBlob value + */ + public ManagementPolicyBaseBlob baseBlob() { + return this.baseBlob; + } + + /** + * Set the management policy action for base blob. + * + * @param baseBlob the baseBlob value to set + * @return the ManagementPolicyAction object itself. + */ + public ManagementPolicyAction withBaseBlob(ManagementPolicyBaseBlob baseBlob) { + this.baseBlob = baseBlob; + return this; + } + + /** + * Get the management policy action for snapshot. + * + * @return the snapshot value + */ + public ManagementPolicySnapShot snapshot() { + return this.snapshot; + } + + /** + * Set the management policy action for snapshot. + * + * @param snapshot the snapshot value to set + * @return the ManagementPolicyAction object itself. + */ + public ManagementPolicyAction withSnapshot(ManagementPolicySnapShot snapshot) { + this.snapshot = snapshot; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyBaseBlob.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyBaseBlob.java new file mode 100644 index 000000000000..08d36ecb032c --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyBaseBlob.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Management policy action for base blob. + */ +public class ManagementPolicyBaseBlob { + /** + * The function to tier blobs to cool storage. Support blobs currently at + * Hot tier. + */ + @JsonProperty(value = "tierToCool") + private DateAfterModification tierToCool; + + /** + * The function to tier blobs to archive storage. Support blobs currently + * at Hot or Cool tier. + */ + @JsonProperty(value = "tierToArchive") + private DateAfterModification tierToArchive; + + /** + * The function to delete the blob. + */ + @JsonProperty(value = "delete") + private DateAfterModification delete; + + /** + * Get the function to tier blobs to cool storage. Support blobs currently at Hot tier. + * + * @return the tierToCool value + */ + public DateAfterModification tierToCool() { + return this.tierToCool; + } + + /** + * Set the function to tier blobs to cool storage. Support blobs currently at Hot tier. + * + * @param tierToCool the tierToCool value to set + * @return the ManagementPolicyBaseBlob object itself. + */ + public ManagementPolicyBaseBlob withTierToCool(DateAfterModification tierToCool) { + this.tierToCool = tierToCool; + return this; + } + + /** + * Get the function to tier blobs to archive storage. Support blobs currently at Hot or Cool tier. + * + * @return the tierToArchive value + */ + public DateAfterModification tierToArchive() { + return this.tierToArchive; + } + + /** + * Set the function to tier blobs to archive storage. Support blobs currently at Hot or Cool tier. + * + * @param tierToArchive the tierToArchive value to set + * @return the ManagementPolicyBaseBlob object itself. + */ + public ManagementPolicyBaseBlob withTierToArchive(DateAfterModification tierToArchive) { + this.tierToArchive = tierToArchive; + return this; + } + + /** + * Get the function to delete the blob. + * + * @return the delete value + */ + public DateAfterModification delete() { + return this.delete; + } + + /** + * Set the function to delete the blob. + * + * @param delete the delete value to set + * @return the ManagementPolicyBaseBlob object itself. + */ + public ManagementPolicyBaseBlob withDelete(DateAfterModification delete) { + this.delete = delete; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyDefinition.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyDefinition.java new file mode 100644 index 000000000000..ef486e995ab9 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyDefinition.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An object that defines the Lifecycle rule. Each definition is made up with a + * filters set and an actions set. + */ +public class ManagementPolicyDefinition { + /** + * An object that defines the action set. + */ + @JsonProperty(value = "actions", required = true) + private ManagementPolicyAction actions; + + /** + * An object that defines the filter set. + */ + @JsonProperty(value = "filters") + private ManagementPolicyFilter filters; + + /** + * Get an object that defines the action set. + * + * @return the actions value + */ + public ManagementPolicyAction actions() { + return this.actions; + } + + /** + * Set an object that defines the action set. + * + * @param actions the actions value to set + * @return the ManagementPolicyDefinition object itself. + */ + public ManagementPolicyDefinition withActions(ManagementPolicyAction actions) { + this.actions = actions; + return this; + } + + /** + * Get an object that defines the filter set. + * + * @return the filters value + */ + public ManagementPolicyFilter filters() { + return this.filters; + } + + /** + * Set an object that defines the filter set. + * + * @param filters the filters value to set + * @return the ManagementPolicyDefinition object itself. + */ + public ManagementPolicyDefinition withFilters(ManagementPolicyFilter filters) { + this.filters = filters; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyFilter.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyFilter.java new file mode 100644 index 000000000000..0249cef5e79a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyFilter.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Filters limit rule actions to a subset of blobs within the storage account. + * If multiple filters are defined, a logical AND is performed on all filters. + */ +public class ManagementPolicyFilter { + /** + * An array of strings for prefixes to be match. + */ + @JsonProperty(value = "prefixMatch") + private List prefixMatch; + + /** + * An array of predefined enum values. Only blockBlob is supported. + */ + @JsonProperty(value = "blobTypes", required = true) + private List blobTypes; + + /** + * Get an array of strings for prefixes to be match. + * + * @return the prefixMatch value + */ + public List prefixMatch() { + return this.prefixMatch; + } + + /** + * Set an array of strings for prefixes to be match. + * + * @param prefixMatch the prefixMatch value to set + * @return the ManagementPolicyFilter object itself. + */ + public ManagementPolicyFilter withPrefixMatch(List prefixMatch) { + this.prefixMatch = prefixMatch; + return this; + } + + /** + * Get an array of predefined enum values. Only blockBlob is supported. + * + * @return the blobTypes value + */ + public List blobTypes() { + return this.blobTypes; + } + + /** + * Set an array of predefined enum values. Only blockBlob is supported. + * + * @param blobTypes the blobTypes value to set + * @return the ManagementPolicyFilter object itself. + */ + public ManagementPolicyFilter withBlobTypes(List blobTypes) { + this.blobTypes = blobTypes; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyRule.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyRule.java new file mode 100644 index 000000000000..e6acc3bff8e3 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicyRule.java @@ -0,0 +1,132 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An object that wraps the Lifecycle rule. Each rule is uniquely defined by + * name. + */ +public class ManagementPolicyRule { + /** + * Rule is enabled if set to true. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * A rule name can contain any combination of alpha numeric characters. + * Rule name is case-sensitive. It must be unique within a policy. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The valid value is Lifecycle. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * An object that defines the Lifecycle rule. + */ + @JsonProperty(value = "definition", required = true) + private ManagementPolicyDefinition definition; + + /** + * Creates an instance of ManagementPolicyRule class. + * @param name a rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy. + * @param definition an object that defines the Lifecycle rule. + */ + public ManagementPolicyRule() { + type = "Lifecycle"; + } + + /** + * Get rule is enabled if set to true. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set rule is enabled if set to true. + * + * @param enabled the enabled value to set + * @return the ManagementPolicyRule object itself. + */ + public ManagementPolicyRule withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get a rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set a rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy. + * + * @param name the name value to set + * @return the ManagementPolicyRule object itself. + */ + public ManagementPolicyRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get the valid value is Lifecycle. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the valid value is Lifecycle. + * + * @param type the type value to set + * @return the ManagementPolicyRule object itself. + */ + public ManagementPolicyRule withType(String type) { + this.type = type; + return this; + } + + /** + * Get an object that defines the Lifecycle rule. + * + * @return the definition value + */ + public ManagementPolicyDefinition definition() { + return this.definition; + } + + /** + * Set an object that defines the Lifecycle rule. + * + * @param definition the definition value to set + * @return the ManagementPolicyRule object itself. + */ + public ManagementPolicyRule withDefinition(ManagementPolicyDefinition definition) { + this.definition = definition; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicySchema.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicySchema.java new file mode 100644 index 000000000000..081e5dc908ca --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicySchema.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.storage.v2019_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Storage Account ManagementPolicies Rules. See more details in: + * https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + */ +public class ManagementPolicySchema { + /** + * The Storage Account ManagementPolicies Rules. See more details in: + * https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + */ + @JsonProperty(value = "rules", required = true) + private List rules; + + /** + * Get the Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + * + * @return the rules value + */ + public List rules() { + return this.rules; + } + + /** + * Set the Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + * + * @param rules the rules value to set + * @return the ManagementPolicySchema object itself. + */ + public ManagementPolicySchema withRules(List rules) { + this.rules = rules; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicySnapShot.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicySnapShot.java new file mode 100644 index 000000000000..23584790016d --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ManagementPolicySnapShot.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Management policy action for snapshot. + */ +public class ManagementPolicySnapShot { + /** + * The function to delete the blob snapshot. + */ + @JsonProperty(value = "delete") + private DateAfterCreation delete; + + /** + * Get the function to delete the blob snapshot. + * + * @return the delete value + */ + public DateAfterCreation delete() { + return this.delete; + } + + /** + * Set the function to delete the blob snapshot. + * + * @param delete the delete value to set + * @return the ManagementPolicySnapShot object itself. + */ + public ManagementPolicySnapShot withDelete(DateAfterCreation delete) { + this.delete = delete; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/MetricSpecification.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/MetricSpecification.java new file mode 100644 index 000000000000..d01c853ebedb --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/MetricSpecification.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metric specification of operation. + */ +public class MetricSpecification { + /** + * Name of metric specification. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Display name of metric specification. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Display description of metric specification. + */ + @JsonProperty(value = "displayDescription") + private String displayDescription; + + /** + * Unit could be Bytes or Count. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Dimensions of blobs, including blob type and access tier. + */ + @JsonProperty(value = "dimensions") + private List dimensions; + + /** + * Aggregation type could be Average. + */ + @JsonProperty(value = "aggregationType") + private String aggregationType; + + /** + * The property to decide fill gap with zero or not. + */ + @JsonProperty(value = "fillGapWithZero") + private Boolean fillGapWithZero; + + /** + * The category this metric specification belong to, could be Capacity. + */ + @JsonProperty(value = "category") + private String category; + + /** + * Account Resource Id. + */ + @JsonProperty(value = "resourceIdDimensionNameOverride") + private String resourceIdDimensionNameOverride; + + /** + * Get name of metric specification. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of metric specification. + * + * @param name the name value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get display name of metric specification. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set display name of metric specification. + * + * @param displayName the displayName value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get display description of metric specification. + * + * @return the displayDescription value + */ + public String displayDescription() { + return this.displayDescription; + } + + /** + * Set display description of metric specification. + * + * @param displayDescription the displayDescription value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayDescription(String displayDescription) { + this.displayDescription = displayDescription; + return this; + } + + /** + * Get unit could be Bytes or Count. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set unit could be Bytes or Count. + * + * @param unit the unit value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get dimensions of blobs, including blob type and access tier. + * + * @return the dimensions value + */ + public List dimensions() { + return this.dimensions; + } + + /** + * Set dimensions of blobs, including blob type and access tier. + * + * @param dimensions the dimensions value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDimensions(List dimensions) { + this.dimensions = dimensions; + return this; + } + + /** + * Get aggregation type could be Average. + * + * @return the aggregationType value + */ + public String aggregationType() { + return this.aggregationType; + } + + /** + * Set aggregation type could be Average. + * + * @param aggregationType the aggregationType value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withAggregationType(String aggregationType) { + this.aggregationType = aggregationType; + return this; + } + + /** + * Get the property to decide fill gap with zero or not. + * + * @return the fillGapWithZero value + */ + public Boolean fillGapWithZero() { + return this.fillGapWithZero; + } + + /** + * Set the property to decide fill gap with zero or not. + * + * @param fillGapWithZero the fillGapWithZero value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { + this.fillGapWithZero = fillGapWithZero; + return this; + } + + /** + * Get the category this metric specification belong to, could be Capacity. + * + * @return the category value + */ + public String category() { + return this.category; + } + + /** + * Set the category this metric specification belong to, could be Capacity. + * + * @param category the category value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get account Resource Id. + * + * @return the resourceIdDimensionNameOverride value + */ + public String resourceIdDimensionNameOverride() { + return this.resourceIdDimensionNameOverride; + } + + /** + * Set account Resource Id. + * + * @param resourceIdDimensionNameOverride the resourceIdDimensionNameOverride value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withResourceIdDimensionNameOverride(String resourceIdDimensionNameOverride) { + this.resourceIdDimensionNameOverride = resourceIdDimensionNameOverride; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/NetworkRuleSet.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/NetworkRuleSet.java new file mode 100644 index 000000000000..77114ff5087f --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/NetworkRuleSet.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network rule set. + */ +public class NetworkRuleSet { + /** + * Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. + * Possible values are any combination of Logging|Metrics|AzureServices + * (For example, "Logging, Metrics"), or None to bypass none of those + * traffics. Possible values include: 'None', 'Logging', 'Metrics', + * 'AzureServices'. + */ + @JsonProperty(value = "bypass") + private Bypass bypass; + + /** + * Sets the virtual network rules. + */ + @JsonProperty(value = "virtualNetworkRules") + private List virtualNetworkRules; + + /** + * Sets the IP ACL rules. + */ + @JsonProperty(value = "ipRules") + private List ipRules; + + /** + * Specifies the default action of allow or deny when no other rules match. + * Possible values include: 'Allow', 'Deny'. + */ + @JsonProperty(value = "defaultAction", required = true) + private DefaultAction defaultAction; + + /** + * Get specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. Possible values include: 'None', 'Logging', 'Metrics', 'AzureServices'. + * + * @return the bypass value + */ + public Bypass bypass() { + return this.bypass; + } + + /** + * Set specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. Possible values include: 'None', 'Logging', 'Metrics', 'AzureServices'. + * + * @param bypass the bypass value to set + * @return the NetworkRuleSet object itself. + */ + public NetworkRuleSet withBypass(Bypass bypass) { + this.bypass = bypass; + return this; + } + + /** + * Get sets the virtual network rules. + * + * @return the virtualNetworkRules value + */ + public List virtualNetworkRules() { + return this.virtualNetworkRules; + } + + /** + * Set sets the virtual network rules. + * + * @param virtualNetworkRules the virtualNetworkRules value to set + * @return the NetworkRuleSet object itself. + */ + public NetworkRuleSet withVirtualNetworkRules(List virtualNetworkRules) { + this.virtualNetworkRules = virtualNetworkRules; + return this; + } + + /** + * Get sets the IP ACL rules. + * + * @return the ipRules value + */ + public List ipRules() { + return this.ipRules; + } + + /** + * Set sets the IP ACL rules. + * + * @param ipRules the ipRules value to set + * @return the NetworkRuleSet object itself. + */ + public NetworkRuleSet withIpRules(List ipRules) { + this.ipRules = ipRules; + return this; + } + + /** + * Get specifies the default action of allow or deny when no other rules match. Possible values include: 'Allow', 'Deny'. + * + * @return the defaultAction value + */ + public DefaultAction defaultAction() { + return this.defaultAction; + } + + /** + * Set specifies the default action of allow or deny when no other rules match. Possible values include: 'Allow', 'Deny'. + * + * @param defaultAction the defaultAction value to set + * @return the NetworkRuleSet object itself. + */ + public NetworkRuleSet withDefaultAction(DefaultAction defaultAction) { + this.defaultAction = defaultAction; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Operation.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Operation.java new file mode 100644 index 000000000000..a2951e7d9529 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Operation.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.OperationInner; + +/** + * Type representing Operation. + */ +public interface Operation extends HasInner, HasManager { + /** + * @return the display value. + */ + OperationDisplay display(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the origin value. + */ + String origin(); + + /** + * @return the serviceSpecification value. + */ + ServiceSpecification serviceSpecification(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/OperationDisplay.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/OperationDisplay.java new file mode 100644 index 000000000000..263b9110f72d --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/OperationDisplay.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Display metadata associated with the operation. + */ +public class OperationDisplay { + /** + * Service provider: Microsoft Storage. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * Resource on which the operation is performed etc. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * Type of operation: get, read, delete, etc. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * Description of the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get service provider: Microsoft Storage. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set service provider: Microsoft Storage. + * + * @param provider the provider value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get resource on which the operation is performed etc. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set resource on which the operation is performed etc. + * + * @param resource the resource value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get type of operation: get, read, delete, etc. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set type of operation: get, read, delete, etc. + * + * @param operation the operation value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the operation. + * + * @param description the description value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Operations.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Operations.java new file mode 100644 index 000000000000..88c310081977 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_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.storage.v2019_06_01; + +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Lists all of the available Storage Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Permissions.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Permissions.java new file mode 100644 index 000000000000..307db2ea21ba --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Permissions.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Permissions. + */ +public final class Permissions extends ExpandableStringEnum { + /** Static value r for Permissions. */ + public static final Permissions R = fromString("r"); + + /** Static value d for Permissions. */ + public static final Permissions D = fromString("d"); + + /** Static value w for Permissions. */ + public static final Permissions W = fromString("w"); + + /** Static value l for Permissions. */ + public static final Permissions L = fromString("l"); + + /** Static value a for Permissions. */ + public static final Permissions A = fromString("a"); + + /** Static value c for Permissions. */ + public static final Permissions C = fromString("c"); + + /** Static value u for Permissions. */ + public static final Permissions U = fromString("u"); + + /** Static value p for Permissions. */ + public static final Permissions P = fromString("p"); + + /** + * Creates or finds a Permissions from its string representation. + * @param name a name to look for + * @return the corresponding Permissions + */ + @JsonCreator + public static Permissions fromString(String name) { + return fromString(name, Permissions.class); + } + + /** + * @return known Permissions values + */ + public static Collection values() { + return values(Permissions.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpoint.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpoint.java new file mode 100644 index 000000000000..119f892f7323 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpoint.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Private Endpoint resource. + */ +public class PrivateEndpoint { + /** + * The ARM identifier for Private Endpoint. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Get the ARM identifier for Private Endpoint. + * + * @return the id value + */ + public String id() { + return this.id; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointConnection.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointConnection.java new file mode 100644 index 000000000000..616814badb88 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointConnection.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.PrivateEndpointConnectionInner; +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.storage.v2019_06_01.implementation.StorageManager; + +/** + * Type representing PrivateEndpointConnection. + */ +public interface PrivateEndpointConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * @return the privateLinkServiceConnectionState value. + */ + PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); + + /** + * @return the provisioningState value. + */ + PrivateEndpointConnectionProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the PrivateEndpointConnection definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithStorageAccount, DefinitionStages.WithPrivateLinkServiceConnectionState, DefinitionStages.WithCreate { + } + + /** + * Grouping of PrivateEndpointConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PrivateEndpointConnection definition. + */ + interface Blank extends WithStorageAccount { + } + + /** + * The stage of the privateendpointconnection definition allowing to specify StorageAccount. + */ + interface WithStorageAccount { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only + * @return the next definition stage + */ + WithPrivateLinkServiceConnectionState withExistingStorageAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the privateendpointconnection definition allowing to specify PrivateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies privateLinkServiceConnectionState. + * @param privateLinkServiceConnectionState A collection of information about the state of the connection between service consumer and provider + * @return the next definition stage + */ + WithCreate withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + } + + /** + * The stage of the privateendpointconnection definition allowing to specify PrivateEndpoint. + */ + interface WithPrivateEndpoint { + /** + * Specifies privateEndpoint. + * @param privateEndpoint The resource of private end point + * @return the next definition stage + */ + WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + + /** + * The stage of the privateendpointconnection definition allowing to specify ProvisioningState. + */ + interface WithProvisioningState { + /** + * Specifies provisioningState. + * @param provisioningState The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + * @return the next definition stage + */ + WithCreate withProvisioningState(PrivateEndpointConnectionProvisioningState provisioningState); + } + + /** + * 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.WithPrivateEndpoint, DefinitionStages.WithProvisioningState { + } + } + /** + * The template for a PrivateEndpointConnection update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithPrivateEndpoint, UpdateStages.WithProvisioningState { + } + + /** + * Grouping of PrivateEndpointConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the privateendpointconnection update allowing to specify PrivateEndpoint. + */ + interface WithPrivateEndpoint { + /** + * Specifies privateEndpoint. + * @param privateEndpoint The resource of private end point + * @return the next update stage + */ + Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + + /** + * The stage of the privateendpointconnection update allowing to specify ProvisioningState. + */ + interface WithProvisioningState { + /** + * Specifies provisioningState. + * @param provisioningState The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + * @return the next update stage + */ + Update withProvisioningState(PrivateEndpointConnectionProvisioningState provisioningState); + } + + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointConnectionProvisioningState.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointConnectionProvisioningState.java new file mode 100644 index 000000000000..3f73352906c7 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointConnectionProvisioningState.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PrivateEndpointConnectionProvisioningState. + */ +public final class PrivateEndpointConnectionProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Creating for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); + + /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); + + /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding PrivateEndpointConnectionProvisioningState + */ + @JsonCreator + public static PrivateEndpointConnectionProvisioningState fromString(String name) { + return fromString(name, PrivateEndpointConnectionProvisioningState.class); + } + + /** + * @return known PrivateEndpointConnectionProvisioningState values + */ + public static Collection values() { + return values(PrivateEndpointConnectionProvisioningState.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointConnections.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointConnections.java new file mode 100644 index 000000000000..6e2dbbbf55bb --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointConnections.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.storage.v2019_06_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.PrivateEndpointConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PrivateEndpointConnections. + */ +public interface PrivateEndpointConnections extends SupportsCreating, HasInner { + /** + * Gets the specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Storage Account + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName); + + /** + * Deletes the specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Storage Account + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointServiceConnectionStatus.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointServiceConnectionStatus.java new file mode 100644 index 000000000000..da6b20978c9b --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateEndpointServiceConnectionStatus.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PrivateEndpointServiceConnectionStatus. + */ +public final class PrivateEndpointServiceConnectionStatus extends ExpandableStringEnum { + /** Static value Pending for PrivateEndpointServiceConnectionStatus. */ + public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); + + /** Static value Approved for PrivateEndpointServiceConnectionStatus. */ + public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); + + /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */ + public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); + + /** + * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding PrivateEndpointServiceConnectionStatus + */ + @JsonCreator + public static PrivateEndpointServiceConnectionStatus fromString(String name) { + return fromString(name, PrivateEndpointServiceConnectionStatus.class); + } + + /** + * @return known PrivateEndpointServiceConnectionStatus values + */ + public static Collection values() { + return values(PrivateEndpointServiceConnectionStatus.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateLinkResourceListResult.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateLinkResourceListResult.java new file mode 100644 index 000000000000..c5f9a7bd73fc --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateLinkResourceListResult.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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.PrivateLinkResourceListResultInner; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.PrivateLinkResourceInner; +import java.util.List; + +/** + * Type representing PrivateLinkResourceListResult. + */ +public interface PrivateLinkResourceListResult extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateLinkResources.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateLinkResources.java new file mode 100644 index 000000000000..82ea16213622 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateLinkResources.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.PrivateLinkResourcesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PrivateLinkResources. + */ +public interface PrivateLinkResources extends HasInner { + /** + * Gets the private link resources that need to be created for a storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByStorageAccountAsync(String resourceGroupName, String accountName); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateLinkServiceConnectionState.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateLinkServiceConnectionState.java new file mode 100644 index 000000000000..2852c2b07693 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PrivateLinkServiceConnectionState.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A collection of information about the state of the connection between + * service consumer and provider. + */ +public class PrivateLinkServiceConnectionState { + /** + * Indicates whether the connection has been Approved/Rejected/Removed by + * the owner of the service. Possible values include: 'Pending', + * 'Approved', 'Rejected'. + */ + @JsonProperty(value = "status") + private PrivateEndpointServiceConnectionStatus status; + + /** + * The reason for approval/rejection of the connection. + */ + @JsonProperty(value = "description") + private String description; + + /** + * A message indicating if changes on the service provider require any + * updates on the consumer. + */ + @JsonProperty(value = "actionRequired") + private String actionRequired; + + /** + * Get indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected'. + * + * @return the status value + */ + public PrivateEndpointServiceConnectionStatus status() { + return this.status; + } + + /** + * Set indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected'. + * + * @param status the status value to set + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { + this.status = status; + return this; + } + + /** + * Get the reason for approval/rejection of the connection. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the reason for approval/rejection of the connection. + * + * @param description the description value to set + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get a message indicating if changes on the service provider require any updates on the consumer. + * + * @return the actionRequired value + */ + public String actionRequired() { + return this.actionRequired; + } + + /** + * Set a message indicating if changes on the service provider require any updates on the consumer. + * + * @param actionRequired the actionRequired value to set + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withActionRequired(String actionRequired) { + this.actionRequired = actionRequired; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ProvisioningState.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ProvisioningState.java new file mode 100644 index 000000000000..6fe2318ba95a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ProvisioningState.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ProvisioningState. + */ +public enum ProvisioningState { + /** Enum value Creating. */ + CREATING("Creating"), + + /** Enum value ResolvingDNS. */ + RESOLVING_DNS("ResolvingDNS"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"); + + /** The actual serialized value for a ProvisioningState instance. */ + private String value; + + ProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed ProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static ProvisioningState fromString(String value) { + ProvisioningState[] items = ProvisioningState.values(); + for (ProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PublicAccess.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PublicAccess.java new file mode 100644 index 000000000000..598f6d38e252 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/PublicAccess.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for PublicAccess. + */ +public enum PublicAccess { + /** Enum value Container. */ + CONTAINER("Container"), + + /** Enum value Blob. */ + BLOB("Blob"), + + /** Enum value None. */ + NONE("None"); + + /** The actual serialized value for a PublicAccess instance. */ + private String value; + + PublicAccess(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a PublicAccess instance. + * + * @param value the serialized value to parse. + * @return the parsed PublicAccess object, or null if unable to parse. + */ + @JsonCreator + public static PublicAccess fromString(String value) { + PublicAccess[] items = PublicAccess.values(); + for (PublicAccess item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Reason.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Reason.java new file mode 100644 index 000000000000..87f5233fcbfd --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Reason.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for Reason. + */ +public enum Reason { + /** Enum value AccountNameInvalid. */ + ACCOUNT_NAME_INVALID("AccountNameInvalid"), + + /** Enum value AlreadyExists. */ + ALREADY_EXISTS("AlreadyExists"); + + /** The actual serialized value for a Reason instance. */ + private String value; + + Reason(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a Reason instance. + * + * @param value the serialized value to parse. + * @return the parsed Reason object, or null if unable to parse. + */ + @JsonCreator + public static Reason fromString(String value) { + Reason[] items = Reason.values(); + for (Reason item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ReasonCode.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ReasonCode.java new file mode 100644 index 000000000000..1eb4aec55a3d --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ReasonCode.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ReasonCode. + */ +public final class ReasonCode extends ExpandableStringEnum { + /** Static value QuotaId for ReasonCode. */ + public static final ReasonCode QUOTA_ID = fromString("QuotaId"); + + /** Static value NotAvailableForSubscription for ReasonCode. */ + public static final ReasonCode NOT_AVAILABLE_FOR_SUBSCRIPTION = fromString("NotAvailableForSubscription"); + + /** + * Creates or finds a ReasonCode from its string representation. + * @param name a name to look for + * @return the corresponding ReasonCode + */ + @JsonCreator + public static ReasonCode fromString(String name) { + return fromString(name, ReasonCode.class); + } + + /** + * @return known ReasonCode values + */ + public static Collection values() { + return values(ReasonCode.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Restriction.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Restriction.java new file mode 100644 index 000000000000..b4ba6be2e49e --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Restriction.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.storage.v2019_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The restriction because of which SKU cannot be used. + */ +public class Restriction { + /** + * The type of restrictions. As of now only possible value for this is + * location. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * The value of restrictions. If the restriction type is set to location. + * This would be different locations where the SKU is restricted. + */ + @JsonProperty(value = "values", access = JsonProperty.Access.WRITE_ONLY) + private List values; + + /** + * The reason for the restriction. As of now this can be "QuotaId" or + * "NotAvailableForSubscription". Quota Id is set when the SKU has + * requiredQuotas parameter as the subscription does not belong to that + * quota. The "NotAvailableForSubscription" is related to capacity at DC. + * Possible values include: 'QuotaId', 'NotAvailableForSubscription'. + */ + @JsonProperty(value = "reasonCode") + private ReasonCode reasonCode; + + /** + * Get the type of restrictions. As of now only possible value for this is location. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get the value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Get the reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The "NotAvailableForSubscription" is related to capacity at DC. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. + * + * @return the reasonCode value + */ + public ReasonCode reasonCode() { + return this.reasonCode; + } + + /** + * Set the reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The "NotAvailableForSubscription" is related to capacity at DC. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. + * + * @param reasonCode the reasonCode value to set + * @return the Restriction object itself. + */ + public Restriction withReasonCode(ReasonCode reasonCode) { + this.reasonCode = reasonCode; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SKUCapability.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SKUCapability.java new file mode 100644 index 000000000000..c86fdeb6795f --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SKUCapability.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The capability information in the specified SKU, including file encryption, + * network ACLs, change notification, etc. + */ +public class SKUCapability { + /** + * The name of capability, The capability information in the specified SKU, + * including file encryption, network ACLs, change notification, etc. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * A string value to indicate states of given capability. Possibly 'true' + * or 'false'. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /** + * Get the name of capability, The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get a string value to indicate states of given capability. Possibly 'true' or 'false'. + * + * @return the value value + */ + public String value() { + return this.value; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ServiceSasParameters.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ServiceSasParameters.java new file mode 100644 index 000000000000..24177d41269a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ServiceSasParameters.java @@ -0,0 +1,493 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The parameters to list service SAS credentials of a specific resource. + */ +public class ServiceSasParameters { + /** + * The canonical path to the signed resource. + */ + @JsonProperty(value = "canonicalizedResource", required = true) + private String canonicalizedResource; + + /** + * The signed services accessible with the service SAS. Possible values + * include: Blob (b), Container (c), File (f), Share (s). Possible values + * include: 'b', 'c', 'f', 's'. + */ + @JsonProperty(value = "signedResource") + private SignedResource resource; + + /** + * The signed permissions for the service SAS. Possible values include: + * Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update + * (u) and Process (p). Possible values include: 'r', 'd', 'w', 'l', 'a', + * 'c', 'u', 'p'. + */ + @JsonProperty(value = "signedPermission") + private Permissions permissions; + + /** + * An IP address or a range of IP addresses from which to accept requests. + */ + @JsonProperty(value = "signedIp") + private String iPAddressOrRange; + + /** + * The protocol permitted for a request made with the account SAS. Possible + * values include: 'https,http', 'https'. + */ + @JsonProperty(value = "signedProtocol") + private HttpProtocol protocols; + + /** + * The time at which the SAS becomes valid. + */ + @JsonProperty(value = "signedStart") + private DateTime sharedAccessStartTime; + + /** + * The time at which the shared access signature becomes invalid. + */ + @JsonProperty(value = "signedExpiry") + private DateTime sharedAccessExpiryTime; + + /** + * A unique value up to 64 characters in length that correlates to an + * access policy specified for the container, queue, or table. + */ + @JsonProperty(value = "signedIdentifier") + private String identifier; + + /** + * The start of partition key. + */ + @JsonProperty(value = "startPk") + private String partitionKeyStart; + + /** + * The end of partition key. + */ + @JsonProperty(value = "endPk") + private String partitionKeyEnd; + + /** + * The start of row key. + */ + @JsonProperty(value = "startRk") + private String rowKeyStart; + + /** + * The end of row key. + */ + @JsonProperty(value = "endRk") + private String rowKeyEnd; + + /** + * The key to sign the account SAS token with. + */ + @JsonProperty(value = "keyToSign") + private String keyToSign; + + /** + * The response header override for cache control. + */ + @JsonProperty(value = "rscc") + private String cacheControl; + + /** + * The response header override for content disposition. + */ + @JsonProperty(value = "rscd") + private String contentDisposition; + + /** + * The response header override for content encoding. + */ + @JsonProperty(value = "rsce") + private String contentEncoding; + + /** + * The response header override for content language. + */ + @JsonProperty(value = "rscl") + private String contentLanguage; + + /** + * The response header override for content type. + */ + @JsonProperty(value = "rsct") + private String contentType; + + /** + * Get the canonical path to the signed resource. + * + * @return the canonicalizedResource value + */ + public String canonicalizedResource() { + return this.canonicalizedResource; + } + + /** + * Set the canonical path to the signed resource. + * + * @param canonicalizedResource the canonicalizedResource value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withCanonicalizedResource(String canonicalizedResource) { + this.canonicalizedResource = canonicalizedResource; + return this; + } + + /** + * Get the signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s). Possible values include: 'b', 'c', 'f', 's'. + * + * @return the resource value + */ + public SignedResource resource() { + return this.resource; + } + + /** + * Set the signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s). Possible values include: 'b', 'c', 'f', 's'. + * + * @param resource the resource value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withResource(SignedResource resource) { + this.resource = resource; + return this; + } + + /** + * Get the signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', 'l', 'a', 'c', 'u', 'p'. + * + * @return the permissions value + */ + public Permissions permissions() { + return this.permissions; + } + + /** + * Set the signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', 'l', 'a', 'c', 'u', 'p'. + * + * @param permissions the permissions value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withPermissions(Permissions permissions) { + this.permissions = permissions; + return this; + } + + /** + * Get an IP address or a range of IP addresses from which to accept requests. + * + * @return the iPAddressOrRange value + */ + public String iPAddressOrRange() { + return this.iPAddressOrRange; + } + + /** + * Set an IP address or a range of IP addresses from which to accept requests. + * + * @param iPAddressOrRange the iPAddressOrRange value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withIPAddressOrRange(String iPAddressOrRange) { + this.iPAddressOrRange = iPAddressOrRange; + return this; + } + + /** + * Get the protocol permitted for a request made with the account SAS. Possible values include: 'https,http', 'https'. + * + * @return the protocols value + */ + public HttpProtocol protocols() { + return this.protocols; + } + + /** + * Set the protocol permitted for a request made with the account SAS. Possible values include: 'https,http', 'https'. + * + * @param protocols the protocols value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withProtocols(HttpProtocol protocols) { + this.protocols = protocols; + return this; + } + + /** + * Get the time at which the SAS becomes valid. + * + * @return the sharedAccessStartTime value + */ + public DateTime sharedAccessStartTime() { + return this.sharedAccessStartTime; + } + + /** + * Set the time at which the SAS becomes valid. + * + * @param sharedAccessStartTime the sharedAccessStartTime value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withSharedAccessStartTime(DateTime sharedAccessStartTime) { + this.sharedAccessStartTime = sharedAccessStartTime; + return this; + } + + /** + * Get the time at which the shared access signature becomes invalid. + * + * @return the sharedAccessExpiryTime value + */ + public DateTime sharedAccessExpiryTime() { + return this.sharedAccessExpiryTime; + } + + /** + * Set the time at which the shared access signature becomes invalid. + * + * @param sharedAccessExpiryTime the sharedAccessExpiryTime value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withSharedAccessExpiryTime(DateTime sharedAccessExpiryTime) { + this.sharedAccessExpiryTime = sharedAccessExpiryTime; + return this; + } + + /** + * Get a unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table. + * + * @return the identifier value + */ + public String identifier() { + return this.identifier; + } + + /** + * Set a unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table. + * + * @param identifier the identifier value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withIdentifier(String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get the start of partition key. + * + * @return the partitionKeyStart value + */ + public String partitionKeyStart() { + return this.partitionKeyStart; + } + + /** + * Set the start of partition key. + * + * @param partitionKeyStart the partitionKeyStart value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withPartitionKeyStart(String partitionKeyStart) { + this.partitionKeyStart = partitionKeyStart; + return this; + } + + /** + * Get the end of partition key. + * + * @return the partitionKeyEnd value + */ + public String partitionKeyEnd() { + return this.partitionKeyEnd; + } + + /** + * Set the end of partition key. + * + * @param partitionKeyEnd the partitionKeyEnd value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withPartitionKeyEnd(String partitionKeyEnd) { + this.partitionKeyEnd = partitionKeyEnd; + return this; + } + + /** + * Get the start of row key. + * + * @return the rowKeyStart value + */ + public String rowKeyStart() { + return this.rowKeyStart; + } + + /** + * Set the start of row key. + * + * @param rowKeyStart the rowKeyStart value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withRowKeyStart(String rowKeyStart) { + this.rowKeyStart = rowKeyStart; + return this; + } + + /** + * Get the end of row key. + * + * @return the rowKeyEnd value + */ + public String rowKeyEnd() { + return this.rowKeyEnd; + } + + /** + * Set the end of row key. + * + * @param rowKeyEnd the rowKeyEnd value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withRowKeyEnd(String rowKeyEnd) { + this.rowKeyEnd = rowKeyEnd; + return this; + } + + /** + * Get the key to sign the account SAS token with. + * + * @return the keyToSign value + */ + public String keyToSign() { + return this.keyToSign; + } + + /** + * Set the key to sign the account SAS token with. + * + * @param keyToSign the keyToSign value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withKeyToSign(String keyToSign) { + this.keyToSign = keyToSign; + return this; + } + + /** + * Get the response header override for cache control. + * + * @return the cacheControl value + */ + public String cacheControl() { + return this.cacheControl; + } + + /** + * Set the response header override for cache control. + * + * @param cacheControl the cacheControl value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withCacheControl(String cacheControl) { + this.cacheControl = cacheControl; + return this; + } + + /** + * Get the response header override for content disposition. + * + * @return the contentDisposition value + */ + public String contentDisposition() { + return this.contentDisposition; + } + + /** + * Set the response header override for content disposition. + * + * @param contentDisposition the contentDisposition value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withContentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * Get the response header override for content encoding. + * + * @return the contentEncoding value + */ + public String contentEncoding() { + return this.contentEncoding; + } + + /** + * Set the response header override for content encoding. + * + * @param contentEncoding the contentEncoding value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withContentEncoding(String contentEncoding) { + this.contentEncoding = contentEncoding; + return this; + } + + /** + * Get the response header override for content language. + * + * @return the contentLanguage value + */ + public String contentLanguage() { + return this.contentLanguage; + } + + /** + * Set the response header override for content language. + * + * @param contentLanguage the contentLanguage value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withContentLanguage(String contentLanguage) { + this.contentLanguage = contentLanguage; + return this; + } + + /** + * Get the response header override for content type. + * + * @return the contentType value + */ + public String contentType() { + return this.contentType; + } + + /** + * Set the response header override for content type. + * + * @param contentType the contentType value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withContentType(String contentType) { + this.contentType = contentType; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ServiceSpecification.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ServiceSpecification.java new file mode 100644 index 000000000000..b82c738a81ae --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ServiceSpecification.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.storage.v2019_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * One property of operation, include metric specifications. + */ +public class ServiceSpecification { + /** + * Metric specifications of operation. + */ + @JsonProperty(value = "metricSpecifications") + private List metricSpecifications; + + /** + * Get metric specifications of operation. + * + * @return the metricSpecifications value + */ + public List metricSpecifications() { + return this.metricSpecifications; + } + + /** + * Set metric specifications of operation. + * + * @param metricSpecifications the metricSpecifications value to set + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withMetricSpecifications(List metricSpecifications) { + this.metricSpecifications = metricSpecifications; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Services.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Services.java new file mode 100644 index 000000000000..65820f6860f0 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Services.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Services. + */ +public final class Services extends ExpandableStringEnum { + /** Static value b for Services. */ + public static final Services B = fromString("b"); + + /** Static value q for Services. */ + public static final Services Q = fromString("q"); + + /** Static value t for Services. */ + public static final Services T = fromString("t"); + + /** Static value f for Services. */ + public static final Services F = fromString("f"); + + /** + * Creates or finds a Services from its string representation. + * @param name a name to look for + * @return the corresponding Services + */ + @JsonCreator + public static Services fromString(String name) { + return fromString(name, Services.class); + } + + /** + * @return known Services values + */ + public static Collection values() { + return values(Services.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SignedResource.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SignedResource.java new file mode 100644 index 000000000000..ef51603a7ba4 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SignedResource.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SignedResource. + */ +public final class SignedResource extends ExpandableStringEnum { + /** Static value b for SignedResource. */ + public static final SignedResource B = fromString("b"); + + /** Static value c for SignedResource. */ + public static final SignedResource C = fromString("c"); + + /** Static value f for SignedResource. */ + public static final SignedResource F = fromString("f"); + + /** Static value s for SignedResource. */ + public static final SignedResource S = fromString("s"); + + /** + * Creates or finds a SignedResource from its string representation. + * @param name a name to look for + * @return the corresponding SignedResource + */ + @JsonCreator + public static SignedResource fromString(String name) { + return fromString(name, SignedResource.class); + } + + /** + * @return known SignedResource values + */ + public static Collection values() { + return values(SignedResource.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SignedResourceTypes.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SignedResourceTypes.java new file mode 100644 index 000000000000..9c91df53c43a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SignedResourceTypes.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.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SignedResourceTypes. + */ +public final class SignedResourceTypes extends ExpandableStringEnum { + /** Static value s for SignedResourceTypes. */ + public static final SignedResourceTypes S = fromString("s"); + + /** Static value c for SignedResourceTypes. */ + public static final SignedResourceTypes C = fromString("c"); + + /** Static value o for SignedResourceTypes. */ + public static final SignedResourceTypes O = fromString("o"); + + /** + * Creates or finds a SignedResourceTypes from its string representation. + * @param name a name to look for + * @return the corresponding SignedResourceTypes + */ + @JsonCreator + public static SignedResourceTypes fromString(String name) { + return fromString(name, SignedResourceTypes.class); + } + + /** + * @return known SignedResourceTypes values + */ + public static Collection values() { + return values(SignedResourceTypes.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Sku.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Sku.java new file mode 100644 index 000000000000..51107bce4c90 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Sku.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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkuInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; +import java.util.List; + +/** + * Type representing Sku. + */ +public interface Sku extends HasInner, HasManager { + /** + * @return the capabilities value. + */ + List capabilities(); + + /** + * @return the kind value. + */ + Kind kind(); + + /** + * @return the locations value. + */ + List locations(); + + /** + * @return the name value. + */ + SkuName name(); + + /** + * @return the resourceType value. + */ + String resourceType(); + + /** + * @return the restrictions value. + */ + List restrictions(); + + /** + * @return the tier value. + */ + SkuTier tier(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SkuName.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SkuName.java new file mode 100644 index 000000000000..ca38d5831667 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SkuName.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SkuName. + */ +public final class SkuName extends ExpandableStringEnum { + /** Static value Standard_LRS for SkuName. */ + public static final SkuName STANDARD_LRS = fromString("Standard_LRS"); + + /** Static value Standard_GRS for SkuName. */ + public static final SkuName STANDARD_GRS = fromString("Standard_GRS"); + + /** Static value Standard_RAGRS for SkuName. */ + public static final SkuName STANDARD_RAGRS = fromString("Standard_RAGRS"); + + /** Static value Standard_ZRS for SkuName. */ + public static final SkuName STANDARD_ZRS = fromString("Standard_ZRS"); + + /** Static value Premium_LRS for SkuName. */ + public static final SkuName PREMIUM_LRS = fromString("Premium_LRS"); + + /** Static value Premium_ZRS for SkuName. */ + public static final SkuName PREMIUM_ZRS = fromString("Premium_ZRS"); + + /** Static value Standard_GZRS for SkuName. */ + public static final SkuName STANDARD_GZRS = fromString("Standard_GZRS"); + + /** Static value Standard_RAGZRS for SkuName. */ + public static final SkuName STANDARD_RAGZRS = fromString("Standard_RAGZRS"); + + /** + * Creates or finds a SkuName from its string representation. + * @param name a name to look for + * @return the corresponding SkuName + */ + @JsonCreator + public static SkuName fromString(String name) { + return fromString(name, SkuName.class); + } + + /** + * @return known SkuName values + */ + public static Collection values() { + return values(SkuName.class); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SkuTier.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SkuTier.java new file mode 100644 index 000000000000..c1d440623cc7 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SkuTier.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SkuTier. + */ +public enum SkuTier { + /** Enum value Standard. */ + STANDARD("Standard"), + + /** Enum value Premium. */ + PREMIUM("Premium"); + + /** The actual serialized value for a SkuTier instance. */ + private String value; + + SkuTier(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SkuTier instance. + * + * @param value the serialized value to parse. + * @return the parsed SkuTier object, or null if unable to parse. + */ + @JsonCreator + public static SkuTier fromString(String value) { + SkuTier[] items = SkuTier.values(); + for (SkuTier item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Skus.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Skus.java new file mode 100644 index 000000000000..87b163436bc5 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Skus.java @@ -0,0 +1,19 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkusInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Skus. + */ +public interface Skus extends SupportsListing, HasInner { +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/State.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/State.java new file mode 100644 index 000000000000..f5b234a1a2da --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/State.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for State. + */ +public enum State { + /** Enum value provisioning. */ + PROVISIONING("provisioning"), + + /** Enum value deprovisioning. */ + DEPROVISIONING("deprovisioning"), + + /** Enum value succeeded. */ + SUCCEEDED("succeeded"), + + /** Enum value failed. */ + FAILED("failed"), + + /** Enum value networkSourceDeleted. */ + NETWORK_SOURCE_DELETED("networkSourceDeleted"); + + /** The actual serialized value for a State instance. */ + private String value; + + State(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a State instance. + * + * @param value the serialized value to parse. + * @return the parsed State object, or null if unable to parse. + */ + @JsonCreator + public static State fromString(String value) { + State[] items = State.values(); + for (State item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccount.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccount.java new file mode 100644 index 000000000000..2777882766f8 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccount.java @@ -0,0 +1,438 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_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.storage.v2019_06_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkuInner; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageAccountInner; + +/** + * Type representing StorageAccount. + */ +public interface StorageAccount extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the accessTier value. + */ + AccessTier accessTier(); + + /** + * @return the azureFilesIdentityBasedAuthentication value. + */ + AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication(); + + /** + * @return the creationTime value. + */ + DateTime creationTime(); + + /** + * @return the customDomain value. + */ + CustomDomain customDomain(); + + /** + * @return the enableHttpsTrafficOnly value. + */ + Boolean enableHttpsTrafficOnly(); + + /** + * @return the encryption value. + */ + Encryption encryption(); + + /** + * @return the failoverInProgress value. + */ + Boolean failoverInProgress(); + + /** + * @return the geoReplicationStats value. + */ + GeoReplicationStats geoReplicationStats(); + + /** + * @return the identity value. + */ + Identity identity(); + + /** + * @return the isHnsEnabled value. + */ + Boolean isHnsEnabled(); + + /** + * @return the kind value. + */ + Kind kind(); + + /** + * @return the largeFileSharesState value. + */ + LargeFileSharesState largeFileSharesState(); + + /** + * @return the lastGeoFailoverTime value. + */ + DateTime lastGeoFailoverTime(); + + /** + * @return the networkRuleSet value. + */ + NetworkRuleSet networkRuleSet(); + + /** + * @return the primaryEndpoints value. + */ + Endpoints primaryEndpoints(); + + /** + * @return the primaryLocation value. + */ + String primaryLocation(); + + /** + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the secondaryEndpoints value. + */ + Endpoints secondaryEndpoints(); + + /** + * @return the secondaryLocation value. + */ + String secondaryLocation(); + + /** + * @return the sku value. + */ + Sku sku(); + + /** + * @return the statusOfPrimary value. + */ + AccountStatus statusOfPrimary(); + + /** + * @return the statusOfSecondary value. + */ + AccountStatus statusOfSecondary(); + + /** + * The entirety of the StorageAccount definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithKind, DefinitionStages.WithSku, DefinitionStages.WithCreate { + } + + /** + * Grouping of StorageAccount definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a StorageAccount definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the StorageAccount definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the storageaccount definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Required. Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' + * @return the next definition stage +*/ + WithSku withKind(Kind kind); + } + + /** + * The stage of the storageaccount definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku Required. Gets or sets the SKU name + * @return the next definition stage +*/ + WithCreate withSku(SkuInner sku); + } + + /** + * The stage of the storageaccount definition allowing to specify AccessTier. + */ + interface WithAccessTier { + /** + * Specifies accessTier. + * @param accessTier Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' + * @return the next definition stage + */ + WithCreate withAccessTier(AccessTier accessTier); + } + + /** + * The stage of the storageaccount definition allowing to specify AzureFilesIdentityBasedAuthentication. + */ + interface WithAzureFilesIdentityBasedAuthentication { + /** + * Specifies azureFilesIdentityBasedAuthentication. + * @param azureFilesIdentityBasedAuthentication Provides the identity based authentication settings for Azure Files + * @return the next definition stage + */ + WithCreate withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication); + } + + /** + * The stage of the storageaccount definition allowing to specify CustomDomain. + */ + interface WithCustomDomain { + /** + * Specifies customDomain. + * @param customDomain User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property + * @return the next definition stage + */ + WithCreate withCustomDomain(CustomDomain customDomain); + } + + /** + * The stage of the storageaccount definition allowing to specify EnableHttpsTrafficOnly. + */ + interface WithEnableHttpsTrafficOnly { + /** + * Specifies enableHttpsTrafficOnly. + * @param enableHttpsTrafficOnly Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01 + * @return the next definition stage + */ + WithCreate withEnableHttpsTrafficOnly(Boolean enableHttpsTrafficOnly); + } + + /** + * The stage of the storageaccount definition allowing to specify Encryption. + */ + interface WithEncryption { + /** + * Specifies encryption. + * @param encryption Not applicable. Azure Storage encryption is enabled for all storage accounts and cannot be disabled + * @return the next definition stage + */ + WithCreate withEncryption(Encryption encryption); + } + + /** + * The stage of the storageaccount definition allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity The identity of the resource + * @return the next definition stage + */ + WithCreate withIdentity(Identity identity); + } + + /** + * The stage of the storageaccount definition allowing to specify IsHnsEnabled. + */ + interface WithIsHnsEnabled { + /** + * Specifies isHnsEnabled. + * @param isHnsEnabled Account HierarchicalNamespace enabled if sets to true + * @return the next definition stage + */ + WithCreate withIsHnsEnabled(Boolean isHnsEnabled); + } + + /** + * The stage of the storageaccount definition allowing to specify LargeFileSharesState. + */ + interface WithLargeFileSharesState { + /** + * Specifies largeFileSharesState. + * @param largeFileSharesState Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled' + * @return the next definition stage + */ + WithCreate withLargeFileSharesState(LargeFileSharesState largeFileSharesState); + } + + /** + * The stage of the storageaccount definition allowing to specify NetworkRuleSet. + */ + interface WithNetworkRuleSet { + /** + * Specifies networkRuleSet. + * @param networkRuleSet Network rule set + * @return the next definition stage + */ + WithCreate withNetworkRuleSet(NetworkRuleSet networkRuleSet); + } + + /** + * 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.WithAccessTier, DefinitionStages.WithAzureFilesIdentityBasedAuthentication, DefinitionStages.WithCustomDomain, DefinitionStages.WithEnableHttpsTrafficOnly, DefinitionStages.WithEncryption, DefinitionStages.WithIdentity, DefinitionStages.WithIsHnsEnabled, DefinitionStages.WithLargeFileSharesState, DefinitionStages.WithNetworkRuleSet { + } + } + /** + * The template for a StorageAccount update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAccessTier, UpdateStages.WithAzureFilesIdentityBasedAuthentication, UpdateStages.WithCustomDomain, UpdateStages.WithEnableHttpsTrafficOnly, UpdateStages.WithEncryption, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithLargeFileSharesState, UpdateStages.WithNetworkRuleSet, UpdateStages.WithSku { + } + + /** + * Grouping of StorageAccount update stages. + */ + interface UpdateStages { + /** + * The stage of the storageaccount update allowing to specify AccessTier. + */ + interface WithAccessTier { + /** + * Specifies accessTier. + * @param accessTier Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' + * @return the next update stage + */ + Update withAccessTier(AccessTier accessTier); + } + + /** + * The stage of the storageaccount update allowing to specify AzureFilesIdentityBasedAuthentication. + */ + interface WithAzureFilesIdentityBasedAuthentication { + /** + * Specifies azureFilesIdentityBasedAuthentication. + * @param azureFilesIdentityBasedAuthentication Provides the identity based authentication settings for Azure Files + * @return the next update stage + */ + Update withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication); + } + + /** + * The stage of the storageaccount update allowing to specify CustomDomain. + */ + interface WithCustomDomain { + /** + * Specifies customDomain. + * @param customDomain Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property + * @return the next update stage + */ + Update withCustomDomain(CustomDomain customDomain); + } + + /** + * The stage of the storageaccount update allowing to specify EnableHttpsTrafficOnly. + */ + interface WithEnableHttpsTrafficOnly { + /** + * Specifies enableHttpsTrafficOnly. + * @param enableHttpsTrafficOnly Allows https traffic only to storage service if sets to true + * @return the next update stage + */ + Update withEnableHttpsTrafficOnly(Boolean enableHttpsTrafficOnly); + } + + /** + * The stage of the storageaccount update allowing to specify Encryption. + */ + interface WithEncryption { + /** + * Specifies encryption. + * @param encryption Provides the encryption settings on the account. The default setting is unencrypted + * @return the next update stage + */ + Update withEncryption(Encryption encryption); + } + + /** + * The stage of the storageaccount update allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity The identity of the resource + * @return the next update stage + */ + Update withIdentity(Identity identity); + } + + /** + * The stage of the storageaccount update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' + * @return the next update stage + */ + Update withKind(Kind kind); + } + + /** + * The stage of the storageaccount update allowing to specify LargeFileSharesState. + */ + interface WithLargeFileSharesState { + /** + * Specifies largeFileSharesState. + * @param largeFileSharesState Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled' + * @return the next update stage + */ + Update withLargeFileSharesState(LargeFileSharesState largeFileSharesState); + } + + /** + * The stage of the storageaccount update allowing to specify NetworkRuleSet. + */ + interface WithNetworkRuleSet { + /** + * Specifies networkRuleSet. + * @param networkRuleSet Network rule set + * @return the next update stage + */ + Update withNetworkRuleSet(NetworkRuleSet networkRuleSet); + } + + /** + * The stage of the storageaccount update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku Gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value + * @return the next update stage + */ + Update withSku(SkuInner sku); + } + + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountCheckNameAvailabilityParameters.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountCheckNameAvailabilityParameters.java new file mode 100644 index 000000000000..1e4a2a57218c --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountCheckNameAvailabilityParameters.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The parameters used to check the availability of the storage account name. + */ +public class StorageAccountCheckNameAvailabilityParameters { + /** + * The storage account name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The type of resource, Microsoft.Storage/storageAccounts. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * Creates an instance of StorageAccountCheckNameAvailabilityParameters class. + * @param name the storage account name. + */ + public StorageAccountCheckNameAvailabilityParameters() { + type = "Microsoft.Storage/storageAccounts"; + } + + /** + * Get the storage account name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the storage account name. + * + * @param name the name value to set + * @return the StorageAccountCheckNameAvailabilityParameters object itself. + */ + public StorageAccountCheckNameAvailabilityParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type of resource, Microsoft.Storage/storageAccounts. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of resource, Microsoft.Storage/storageAccounts. + * + * @param type the type value to set + * @return the StorageAccountCheckNameAvailabilityParameters object itself. + */ + public StorageAccountCheckNameAvailabilityParameters withType(String type) { + this.type = type; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountCreateParameters.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountCreateParameters.java new file mode 100644 index 000000000000..188f9f264127 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountCreateParameters.java @@ -0,0 +1,376 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkuInner; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used when creating a storage account. + */ +@JsonFlatten +public class StorageAccountCreateParameters { + /** + * Required. Gets or sets the SKU name. + */ + @JsonProperty(value = "sku", required = true) + private SkuInner sku; + + /** + * Required. Indicates the type of storage account. Possible values + * include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', + * 'BlockBlobStorage'. + */ + @JsonProperty(value = "kind", required = true) + private Kind kind; + + /** + * Required. Gets or sets the location of the resource. This will be one of + * the supported and registered Azure Geo Regions (e.g. West US, East US, + * Southeast Asia, etc.). The geo region of a resource cannot be changed + * once it is created, but if an identical geo region is specified on + * update, the request will succeed. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * Gets or sets a list of key value pairs that describe the resource. These + * tags can be used for viewing and grouping this resource (across resource + * groups). A maximum of 15 tags can be provided for a resource. Each tag + * must have a key with a length no greater than 128 characters and a value + * with a length no greater than 256 characters. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The identity of the resource. + */ + @JsonProperty(value = "identity") + private Identity identity; + + /** + * User domain assigned to the storage account. Name is the CNAME source. + * Only one custom domain is supported per storage account at this time. To + * clear the existing custom domain, use an empty string for the custom + * domain name property. + */ + @JsonProperty(value = "properties.customDomain") + private CustomDomain customDomain; + + /** + * Not applicable. Azure Storage encryption is enabled for all storage + * accounts and cannot be disabled. + */ + @JsonProperty(value = "properties.encryption") + private Encryption encryption; + + /** + * Network rule set. + */ + @JsonProperty(value = "properties.networkAcls") + private NetworkRuleSet networkRuleSet; + + /** + * Required for storage accounts where kind = BlobStorage. The access tier + * used for billing. Possible values include: 'Hot', 'Cool'. + */ + @JsonProperty(value = "properties.accessTier") + private AccessTier accessTier; + + /** + * Provides the identity based authentication settings for Azure Files. + */ + @JsonProperty(value = "properties.azureFilesIdentityBasedAuthentication") + private AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication; + + /** + * Allows https traffic only to storage service if sets to true. The + * default value is true since API version 2019-04-01. + */ + @JsonProperty(value = "properties.supportsHttpsTrafficOnly") + private Boolean enableHttpsTrafficOnly; + + /** + * Account HierarchicalNamespace enabled if sets to true. + */ + @JsonProperty(value = "properties.isHnsEnabled") + private Boolean isHnsEnabled; + + /** + * Allow large file shares if sets to Enabled. It cannot be disabled once + * it is enabled. Possible values include: 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "properties.largeFileSharesState") + private LargeFileSharesState largeFileSharesState; + + /** + * Get required. Gets or sets the SKU name. + * + * @return the sku value + */ + public SkuInner sku() { + return this.sku; + } + + /** + * Set required. Gets or sets the SKU name. + * + * @param sku the sku value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withSku(SkuInner sku) { + this.sku = sku; + return this; + } + + /** + * Get required. Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage'. + * + * @return the kind value + */ + public Kind kind() { + return this.kind; + } + + /** + * Set required. Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage'. + * + * @param kind the kind value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withKind(Kind kind) { + this.kind = kind; + return this; + } + + /** + * Get required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. + * + * @param location the location value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. + * + * @param tags the tags value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the identity of the resource. + * + * @return the identity value + */ + public Identity identity() { + return this.identity; + } + + /** + * Set the identity of the resource. + * + * @param identity the identity value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withIdentity(Identity identity) { + this.identity = identity; + return this; + } + + /** + * Get user domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. + * + * @return the customDomain value + */ + public CustomDomain customDomain() { + return this.customDomain; + } + + /** + * Set user domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. + * + * @param customDomain the customDomain value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withCustomDomain(CustomDomain customDomain) { + this.customDomain = customDomain; + return this; + } + + /** + * Get not applicable. Azure Storage encryption is enabled for all storage accounts and cannot be disabled. + * + * @return the encryption value + */ + public Encryption encryption() { + return this.encryption; + } + + /** + * Set not applicable. Azure Storage encryption is enabled for all storage accounts and cannot be disabled. + * + * @param encryption the encryption value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withEncryption(Encryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get network rule set. + * + * @return the networkRuleSet value + */ + public NetworkRuleSet networkRuleSet() { + return this.networkRuleSet; + } + + /** + * Set network rule set. + * + * @param networkRuleSet the networkRuleSet value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withNetworkRuleSet(NetworkRuleSet networkRuleSet) { + this.networkRuleSet = networkRuleSet; + return this; + } + + /** + * Get required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'. + * + * @return the accessTier value + */ + public AccessTier accessTier() { + return this.accessTier; + } + + /** + * Set required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'. + * + * @param accessTier the accessTier value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withAccessTier(AccessTier accessTier) { + this.accessTier = accessTier; + return this; + } + + /** + * Get provides the identity based authentication settings for Azure Files. + * + * @return the azureFilesIdentityBasedAuthentication value + */ + public AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication() { + return this.azureFilesIdentityBasedAuthentication; + } + + /** + * Set provides the identity based authentication settings for Azure Files. + * + * @param azureFilesIdentityBasedAuthentication the azureFilesIdentityBasedAuthentication value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication) { + this.azureFilesIdentityBasedAuthentication = azureFilesIdentityBasedAuthentication; + return this; + } + + /** + * Get allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. + * + * @return the enableHttpsTrafficOnly value + */ + public Boolean enableHttpsTrafficOnly() { + return this.enableHttpsTrafficOnly; + } + + /** + * Set allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. + * + * @param enableHttpsTrafficOnly the enableHttpsTrafficOnly value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withEnableHttpsTrafficOnly(Boolean enableHttpsTrafficOnly) { + this.enableHttpsTrafficOnly = enableHttpsTrafficOnly; + return this; + } + + /** + * Get account HierarchicalNamespace enabled if sets to true. + * + * @return the isHnsEnabled value + */ + public Boolean isHnsEnabled() { + return this.isHnsEnabled; + } + + /** + * Set account HierarchicalNamespace enabled if sets to true. + * + * @param isHnsEnabled the isHnsEnabled value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withIsHnsEnabled(Boolean isHnsEnabled) { + this.isHnsEnabled = isHnsEnabled; + return this; + } + + /** + * Get allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'. + * + * @return the largeFileSharesState value + */ + public LargeFileSharesState largeFileSharesState() { + return this.largeFileSharesState; + } + + /** + * Set allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'. + * + * @param largeFileSharesState the largeFileSharesState value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withLargeFileSharesState(LargeFileSharesState largeFileSharesState) { + this.largeFileSharesState = largeFileSharesState; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountExpand.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountExpand.java new file mode 100644 index 000000000000..67e8dfb26e37 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountExpand.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for StorageAccountExpand. + */ +public enum StorageAccountExpand { + /** Enum value geoReplicationStats. */ + GEO_REPLICATION_STATS("geoReplicationStats"); + + /** The actual serialized value for a StorageAccountExpand instance. */ + private String value; + + StorageAccountExpand(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a StorageAccountExpand instance. + * + * @param value the serialized value to parse. + * @return the parsed StorageAccountExpand object, or null if unable to parse. + */ + @JsonCreator + public static StorageAccountExpand fromString(String value) { + StorageAccountExpand[] items = StorageAccountExpand.values(); + for (StorageAccountExpand item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountKey.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountKey.java new file mode 100644 index 000000000000..da9f1068545b --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountKey.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An access key for the storage account. + */ +public class StorageAccountKey { + /** + * Name of the key. + */ + @JsonProperty(value = "keyName", access = JsonProperty.Access.WRITE_ONLY) + private String keyName; + + /** + * Base 64-encoded value of the key. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /** + * Permissions for the key -- read-only or full permissions. Possible + * values include: 'Read', 'Full'. + */ + @JsonProperty(value = "permissions", access = JsonProperty.Access.WRITE_ONLY) + private KeyPermission permissions; + + /** + * Get name of the key. + * + * @return the keyName value + */ + public String keyName() { + return this.keyName; + } + + /** + * Get base 64-encoded value of the key. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Get permissions for the key -- read-only or full permissions. Possible values include: 'Read', 'Full'. + * + * @return the permissions value + */ + public KeyPermission permissions() { + return this.permissions; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountListKeysResult.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountListKeysResult.java new file mode 100644 index 000000000000..89ca6111517c --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountListKeysResult.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageAccountListKeysResultInner; +import java.util.List; + +/** + * Type representing StorageAccountListKeysResult. + */ +public interface StorageAccountListKeysResult extends HasInner, HasManager { + /** + * @return the keys value. + */ + List keys(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountRegenerateKeyParameters.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountRegenerateKeyParameters.java new file mode 100644 index 000000000000..60162551a0fd --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountRegenerateKeyParameters.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The parameters used to regenerate the storage account key. + */ +public class StorageAccountRegenerateKeyParameters { + /** + * The name of storage keys that want to be regenerated, possible values + * are key1, key2, kerb1, kerb2. + */ + @JsonProperty(value = "keyName", required = true) + private String keyName; + + /** + * Get the name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. + * + * @return the keyName value + */ + public String keyName() { + return this.keyName; + } + + /** + * Set the name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. + * + * @param keyName the keyName value to set + * @return the StorageAccountRegenerateKeyParameters object itself. + */ + public StorageAccountRegenerateKeyParameters withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountUpdateParameters.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountUpdateParameters.java new file mode 100644 index 000000000000..b07420060af8 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountUpdateParameters.java @@ -0,0 +1,322 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkuInner; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters that can be provided when updating the storage account + * properties. + */ +@JsonFlatten +public class StorageAccountUpdateParameters { + /** + * Gets or sets the SKU name. Note that the SKU name cannot be updated to + * Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of those SKU + * names be updated to any other value. + */ + @JsonProperty(value = "sku") + private SkuInner sku; + + /** + * Gets or sets a list of key value pairs that describe the resource. These + * tags can be used in viewing and grouping this resource (across resource + * groups). A maximum of 15 tags can be provided for a resource. Each tag + * must have a key no greater in length than 128 characters and a value no + * greater in length than 256 characters. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The identity of the resource. + */ + @JsonProperty(value = "identity") + private Identity identity; + + /** + * Custom domain assigned to the storage account by the user. Name is the + * CNAME source. Only one custom domain is supported per storage account at + * this time. To clear the existing custom domain, use an empty string for + * the custom domain name property. + */ + @JsonProperty(value = "properties.customDomain") + private CustomDomain customDomain; + + /** + * Provides the encryption settings on the account. The default setting is + * unencrypted. + */ + @JsonProperty(value = "properties.encryption") + private Encryption encryption; + + /** + * Required for storage accounts where kind = BlobStorage. The access tier + * used for billing. Possible values include: 'Hot', 'Cool'. + */ + @JsonProperty(value = "properties.accessTier") + private AccessTier accessTier; + + /** + * Provides the identity based authentication settings for Azure Files. + */ + @JsonProperty(value = "properties.azureFilesIdentityBasedAuthentication") + private AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication; + + /** + * Allows https traffic only to storage service if sets to true. + */ + @JsonProperty(value = "properties.supportsHttpsTrafficOnly") + private Boolean enableHttpsTrafficOnly; + + /** + * Network rule set. + */ + @JsonProperty(value = "properties.networkAcls") + private NetworkRuleSet networkRuleSet; + + /** + * Allow large file shares if sets to Enabled. It cannot be disabled once + * it is enabled. Possible values include: 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "properties.largeFileSharesState") + private LargeFileSharesState largeFileSharesState; + + /** + * Optional. Indicates the type of storage account. Currently only + * StorageV2 value supported by server. Possible values include: 'Storage', + * 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage'. + */ + @JsonProperty(value = "kind") + private Kind kind; + + /** + * Get gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value. + * + * @return the sku value + */ + public SkuInner sku() { + return this.sku; + } + + /** + * Set gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value. + * + * @param sku the sku value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withSku(SkuInner sku) { + this.sku = sku; + return this; + } + + /** + * Get gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. + * + * @param tags the tags value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the identity of the resource. + * + * @return the identity value + */ + public Identity identity() { + return this.identity; + } + + /** + * Set the identity of the resource. + * + * @param identity the identity value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withIdentity(Identity identity) { + this.identity = identity; + return this; + } + + /** + * Get custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. + * + * @return the customDomain value + */ + public CustomDomain customDomain() { + return this.customDomain; + } + + /** + * Set custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. + * + * @param customDomain the customDomain value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withCustomDomain(CustomDomain customDomain) { + this.customDomain = customDomain; + return this; + } + + /** + * Get provides the encryption settings on the account. The default setting is unencrypted. + * + * @return the encryption value + */ + public Encryption encryption() { + return this.encryption; + } + + /** + * Set provides the encryption settings on the account. The default setting is unencrypted. + * + * @param encryption the encryption value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withEncryption(Encryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'. + * + * @return the accessTier value + */ + public AccessTier accessTier() { + return this.accessTier; + } + + /** + * Set required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'. + * + * @param accessTier the accessTier value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withAccessTier(AccessTier accessTier) { + this.accessTier = accessTier; + return this; + } + + /** + * Get provides the identity based authentication settings for Azure Files. + * + * @return the azureFilesIdentityBasedAuthentication value + */ + public AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication() { + return this.azureFilesIdentityBasedAuthentication; + } + + /** + * Set provides the identity based authentication settings for Azure Files. + * + * @param azureFilesIdentityBasedAuthentication the azureFilesIdentityBasedAuthentication value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication) { + this.azureFilesIdentityBasedAuthentication = azureFilesIdentityBasedAuthentication; + return this; + } + + /** + * Get allows https traffic only to storage service if sets to true. + * + * @return the enableHttpsTrafficOnly value + */ + public Boolean enableHttpsTrafficOnly() { + return this.enableHttpsTrafficOnly; + } + + /** + * Set allows https traffic only to storage service if sets to true. + * + * @param enableHttpsTrafficOnly the enableHttpsTrafficOnly value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withEnableHttpsTrafficOnly(Boolean enableHttpsTrafficOnly) { + this.enableHttpsTrafficOnly = enableHttpsTrafficOnly; + return this; + } + + /** + * Get network rule set. + * + * @return the networkRuleSet value + */ + public NetworkRuleSet networkRuleSet() { + return this.networkRuleSet; + } + + /** + * Set network rule set. + * + * @param networkRuleSet the networkRuleSet value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withNetworkRuleSet(NetworkRuleSet networkRuleSet) { + this.networkRuleSet = networkRuleSet; + return this; + } + + /** + * Get allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'. + * + * @return the largeFileSharesState value + */ + public LargeFileSharesState largeFileSharesState() { + return this.largeFileSharesState; + } + + /** + * Set allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'. + * + * @param largeFileSharesState the largeFileSharesState value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withLargeFileSharesState(LargeFileSharesState largeFileSharesState) { + this.largeFileSharesState = largeFileSharesState; + return this; + } + + /** + * Get optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage'. + * + * @return the kind value + */ + public Kind kind() { + return this.kind; + } + + /** + * Set optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage'. + * + * @param kind the kind value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withKind(Kind kind) { + this.kind = kind; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccounts.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccounts.java new file mode 100644 index 000000000000..c60ca1c8a4ee --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccounts.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_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.storage.v2019_06_01.implementation.StorageAccountsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing StorageAccounts. + */ +public interface StorageAccounts extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listKeysAsync(String resourceGroupName, String accountName); + + /** + * Regenerates one of the access keys or Kerberos keys for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable regenerateKeyAsync(String resourceGroupName, String accountName, String keyName); + + /** + * List SAS credentials of a storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide to list SAS credentials for the storage account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAccountSASAsync(String resourceGroupName, String accountName, AccountSasParameters parameters); + + /** + * List service SAS credentials of a specific resource. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide to list service SAS credentials. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listServiceSASAsync(String resourceGroupName, String accountName, ServiceSasParameters parameters); + + /** + * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable failoverAsync(String resourceGroupName, String accountName); + + /** + * Revoke user delegation keys. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable revokeUserDelegationKeysAsync(String resourceGroupName, String accountName); + + /** + * Checks that the storage account name is valid and is not already in use. + * + * @param name The storage account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String name); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/TagProperty.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/TagProperty.java new file mode 100644 index 000000000000..4b45970f6d11 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/TagProperty.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_06_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A tag of the LegalHold of a blob container. + */ +public class TagProperty { + /** + * The tag value. + */ + @JsonProperty(value = "tag", access = JsonProperty.Access.WRITE_ONLY) + private String tag; + + /** + * Returns the date and time the tag was added. + */ + @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) + private DateTime timestamp; + + /** + * Returns the Object ID of the user who added the tag. + */ + @JsonProperty(value = "objectIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String objectIdentifier; + + /** + * Returns the Tenant ID that issued the token for the user who added the + * tag. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /** + * Returns the User Principal Name of the user who added the tag. + */ + @JsonProperty(value = "upn", access = JsonProperty.Access.WRITE_ONLY) + private String upn; + + /** + * Get the tag value. + * + * @return the tag value + */ + public String tag() { + return this.tag; + } + + /** + * Get returns the date and time the tag was added. + * + * @return the timestamp value + */ + public DateTime timestamp() { + return this.timestamp; + } + + /** + * Get returns the Object ID of the user who added the tag. + * + * @return the objectIdentifier value + */ + public String objectIdentifier() { + return this.objectIdentifier; + } + + /** + * Get returns the Tenant ID that issued the token for the user who added the tag. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get returns the User Principal Name of the user who added the tag. + * + * @return the upn value + */ + public String upn() { + return this.upn; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/UpdateHistoryProperty.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/UpdateHistoryProperty.java new file mode 100644 index 000000000000..bb885834c8b4 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/UpdateHistoryProperty.java @@ -0,0 +1,113 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An update history of the ImmutabilityPolicy of a blob container. + */ +public class UpdateHistoryProperty { + /** + * The ImmutabilityPolicy update type of a blob container, possible values + * include: put, lock and extend. Possible values include: 'put', 'lock', + * 'extend'. + */ + @JsonProperty(value = "update", access = JsonProperty.Access.WRITE_ONLY) + private ImmutabilityPolicyUpdateType update; + + /** + * The immutability period for the blobs in the container since the policy + * creation, in days. + */ + @JsonProperty(value = "immutabilityPeriodSinceCreationInDays", access = JsonProperty.Access.WRITE_ONLY) + private Integer immutabilityPeriodSinceCreationInDays; + + /** + * Returns the date and time the ImmutabilityPolicy was updated. + */ + @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) + private DateTime timestamp; + + /** + * Returns the Object ID of the user who updated the ImmutabilityPolicy. + */ + @JsonProperty(value = "objectIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String objectIdentifier; + + /** + * Returns the Tenant ID that issued the token for the user who updated the + * ImmutabilityPolicy. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /** + * Returns the User Principal Name of the user who updated the + * ImmutabilityPolicy. + */ + @JsonProperty(value = "upn", access = JsonProperty.Access.WRITE_ONLY) + private String upn; + + /** + * Get the ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend. Possible values include: 'put', 'lock', 'extend'. + * + * @return the update value + */ + public ImmutabilityPolicyUpdateType update() { + return this.update; + } + + /** + * Get the immutability period for the blobs in the container since the policy creation, in days. + * + * @return the immutabilityPeriodSinceCreationInDays value + */ + public Integer immutabilityPeriodSinceCreationInDays() { + return this.immutabilityPeriodSinceCreationInDays; + } + + /** + * Get returns the date and time the ImmutabilityPolicy was updated. + * + * @return the timestamp value + */ + public DateTime timestamp() { + return this.timestamp; + } + + /** + * Get returns the Object ID of the user who updated the ImmutabilityPolicy. + * + * @return the objectIdentifier value + */ + public String objectIdentifier() { + return this.objectIdentifier; + } + + /** + * Get returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get returns the User Principal Name of the user who updated the ImmutabilityPolicy. + * + * @return the upn value + */ + public String upn() { + return this.upn; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Usage.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Usage.java new file mode 100644 index 000000000000..9b5d3ccf3ad4 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Usage.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.UsageInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; + +/** + * Type representing Usage. + */ +public interface Usage extends HasInner, HasManager { + /** + * @return the currentValue value. + */ + Integer currentValue(); + + /** + * @return the limit value. + */ + Integer limit(); + + /** + * @return the name value. + */ + UsageName name(); + + /** + * @return the unit value. + */ + UsageUnit unit(); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/UsageName.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/UsageName.java new file mode 100644 index 000000000000..3e5edea514ad --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/UsageName.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The usage names that can be used; currently limited to StorageAccount. + */ +public class UsageName { + /** + * Gets a string describing the resource name. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /** + * Gets a localized string describing the resource name. + */ + @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) + private String localizedValue; + + /** + * Get gets a string describing the resource name. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Get gets a localized string describing the resource name. + * + * @return the localizedValue value + */ + public String localizedValue() { + return this.localizedValue; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/UsageUnit.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/UsageUnit.java new file mode 100644 index 000000000000..d9c22fd128b8 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/UsageUnit.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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for UsageUnit. + */ +public enum UsageUnit { + /** Enum value Count. */ + COUNT("Count"), + + /** Enum value Bytes. */ + BYTES("Bytes"), + + /** Enum value Seconds. */ + SECONDS("Seconds"), + + /** Enum value Percent. */ + PERCENT("Percent"), + + /** Enum value CountsPerSecond. */ + COUNTS_PER_SECOND("CountsPerSecond"), + + /** Enum value BytesPerSecond. */ + BYTES_PER_SECOND("BytesPerSecond"); + + /** The actual serialized value for a UsageUnit instance. */ + private String value; + + UsageUnit(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UsageUnit instance. + * + * @param value the serialized value to parse. + * @return the parsed UsageUnit object, or null if unable to parse. + */ + @JsonCreator + public static UsageUnit fromString(String value) { + UsageUnit[] items = UsageUnit.values(); + for (UsageUnit item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Usages.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Usages.java new file mode 100644 index 000000000000..e313ad02f94a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Usages.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.storage.v2019_06_01; + +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.UsagesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Usages. + */ +public interface Usages extends HasInner { + /** + * Gets the current usage count and the limit for the resources of the location under the subscription. + * + * @param location The location of the Azure Storage resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByLocationAsync(String location); + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/VirtualNetworkRule.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/VirtualNetworkRule.java new file mode 100644 index 000000000000..9867a97f3097 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/VirtualNetworkRule.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Virtual Network rule. + */ +public class VirtualNetworkRule { + /** + * Resource ID of a subnet, for example: + * /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + */ + @JsonProperty(value = "id", required = true) + private String virtualNetworkResourceId; + + /** + * The action of virtual network rule. Possible values include: 'Allow'. + */ + @JsonProperty(value = "action") + private Action action; + + /** + * Gets the state of virtual network rule. Possible values include: + * 'provisioning', 'deprovisioning', 'succeeded', 'failed', + * 'networkSourceDeleted'. + */ + @JsonProperty(value = "state") + private State state; + + /** + * Get resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @return the virtualNetworkResourceId value + */ + public String virtualNetworkResourceId() { + return this.virtualNetworkResourceId; + } + + /** + * Set resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @param virtualNetworkResourceId the virtualNetworkResourceId value to set + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withVirtualNetworkResourceId(String virtualNetworkResourceId) { + this.virtualNetworkResourceId = virtualNetworkResourceId; + return this; + } + + /** + * Get the action of virtual network rule. Possible values include: 'Allow'. + * + * @return the action value + */ + public Action action() { + return this.action; + } + + /** + * Set the action of virtual network rule. Possible values include: 'Allow'. + * + * @param action the action value to set + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withAction(Action action) { + this.action = action; + return this; + } + + /** + * Get gets the state of virtual network rule. Possible values include: 'provisioning', 'deprovisioning', 'succeeded', 'failed', 'networkSourceDeleted'. + * + * @return the state value + */ + public State state() { + return this.state; + } + + /** + * Set gets the state of virtual network rule. Possible values include: 'provisioning', 'deprovisioning', 'succeeded', 'failed', 'networkSourceDeleted'. + * + * @param state the state value to set + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withState(State state) { + this.state = state; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainerImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainerImpl.java new file mode 100644 index 000000000000..864faf486109 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainerImpl.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.BlobContainer; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.PublicAccess; +import java.util.Map; +import com.microsoft.azure.management.storage.v2019_06_01.ImmutabilityPolicyProperties; +import org.joda.time.DateTime; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseDuration; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseState; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseStatus; +import com.microsoft.azure.management.storage.v2019_06_01.LegalHoldProperties; + +class BlobContainerImpl extends CreatableUpdatableImpl implements BlobContainer, BlobContainer.Definition, BlobContainer.Update { + private final StorageManager manager; + private String resourceGroupName; + private String accountName; + private String containerName; + private PublicAccess cpublicAccess; + private Map cmetadata; + private PublicAccess upublicAccess; + private Map umetadata; + + BlobContainerImpl(String name, StorageManager manager) { + super(name, new BlobContainerInner()); + this.manager = manager; + // Set resource name + this.containerName = name; + // + } + + BlobContainerImpl(BlobContainerInner inner, StorageManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.containerName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "storageAccounts"); + this.containerName = IdParsingUtils.getValueFromIdByName(inner.id(), "containers"); + // + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + BlobContainersInner client = this.manager().inner().blobContainers(); + return client.createAsync(this.resourceGroupName, this.accountName, this.containerName, this.cpublicAccess, this.cmetadata) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + BlobContainersInner client = this.manager().inner().blobContainers(); + return client.updateAsync(this.resourceGroupName, this.accountName, this.containerName, this.upublicAccess, this.umetadata) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + BlobContainersInner client = this.manager().inner().blobContainers(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public Boolean hasImmutabilityPolicy() { + return this.inner().hasImmutabilityPolicy(); + } + + @Override + public Boolean hasLegalHold() { + return this.inner().hasLegalHold(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public ImmutabilityPolicyProperties immutabilityPolicy() { + return this.inner().immutabilityPolicy(); + } + + @Override + public DateTime lastModifiedTime() { + return this.inner().lastModifiedTime(); + } + + @Override + public LeaseDuration leaseDuration() { + return this.inner().leaseDuration(); + } + + @Override + public LeaseState leaseState() { + return this.inner().leaseState(); + } + + @Override + public LeaseStatus leaseStatus() { + return this.inner().leaseStatus(); + } + + @Override + public LegalHoldProperties legalHold() { + return this.inner().legalHold(); + } + + @Override + public Map metadata() { + return this.inner().metadata(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public PublicAccess publicAccess() { + return this.inner().publicAccess(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public BlobContainerImpl withExistingBlobService(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public BlobContainerImpl withPublicAccess(PublicAccess publicAccess) { + if (isInCreateMode()) { + this.cpublicAccess = publicAccess; + } else { + this.upublicAccess = publicAccess; + } + return this; + } + + @Override + public BlobContainerImpl withMetadata(Map metadata) { + if (isInCreateMode()) { + this.cmetadata = metadata; + } else { + this.umetadata = metadata; + } + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainerInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainerInner.java new file mode 100644 index 000000000000..d4974ff862db --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainerInner.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.PublicAccess; +import org.joda.time.DateTime; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseStatus; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseState; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseDuration; +import java.util.Map; +import com.microsoft.azure.management.storage.v2019_06_01.ImmutabilityPolicyProperties; +import com.microsoft.azure.management.storage.v2019_06_01.LegalHoldProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.storage.v2019_06_01.AzureEntityResource; + +/** + * Properties of the blob container, including Id, resource name, resource + * type, Etag. + */ +@JsonFlatten +public class BlobContainerInner extends AzureEntityResource { + /** + * Specifies whether data in the container may be accessed publicly and the + * level of access. Possible values include: 'Container', 'Blob', 'None'. + */ + @JsonProperty(value = "properties.publicAccess") + private PublicAccess publicAccess; + + /** + * Returns the date and time the container was last modified. + */ + @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * The lease status of the container. Possible values include: 'Locked', + * 'Unlocked'. + */ + @JsonProperty(value = "properties.leaseStatus", access = JsonProperty.Access.WRITE_ONLY) + private LeaseStatus leaseStatus; + + /** + * Lease state of the container. Possible values include: 'Available', + * 'Leased', 'Expired', 'Breaking', 'Broken'. + */ + @JsonProperty(value = "properties.leaseState", access = JsonProperty.Access.WRITE_ONLY) + private LeaseState leaseState; + + /** + * Specifies whether the lease on a container is of infinite or fixed + * duration, only when the container is leased. Possible values include: + * 'Infinite', 'Fixed'. + */ + @JsonProperty(value = "properties.leaseDuration", access = JsonProperty.Access.WRITE_ONLY) + private LeaseDuration leaseDuration; + + /** + * A name-value pair to associate with the container as metadata. + */ + @JsonProperty(value = "properties.metadata") + private Map metadata; + + /** + * The ImmutabilityPolicy property of the container. + */ + @JsonProperty(value = "properties.immutabilityPolicy", access = JsonProperty.Access.WRITE_ONLY) + private ImmutabilityPolicyProperties immutabilityPolicy; + + /** + * The LegalHold property of the container. + */ + @JsonProperty(value = "properties.legalHold", access = JsonProperty.Access.WRITE_ONLY) + private LegalHoldProperties legalHold; + + /** + * The hasLegalHold public property is set to true by SRP if there are at + * least one existing tag. The hasLegalHold public property is set to false + * by SRP if all existing legal hold tags are cleared out. There can be a + * maximum of 1000 blob containers with hasLegalHold=true for a given + * account. + */ + @JsonProperty(value = "properties.hasLegalHold", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasLegalHold; + + /** + * The hasImmutabilityPolicy public property is set to true by SRP if + * ImmutabilityPolicy has been created for this container. The + * hasImmutabilityPolicy public property is set to false by SRP if + * ImmutabilityPolicy has not been created for this container. + */ + @JsonProperty(value = "properties.hasImmutabilityPolicy", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasImmutabilityPolicy; + + /** + * Get specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'. + * + * @return the publicAccess value + */ + public PublicAccess publicAccess() { + return this.publicAccess; + } + + /** + * Set specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'. + * + * @param publicAccess the publicAccess value to set + * @return the BlobContainerInner object itself. + */ + public BlobContainerInner withPublicAccess(PublicAccess publicAccess) { + this.publicAccess = publicAccess; + return this; + } + + /** + * Get returns the date and time the container was last modified. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get the lease status of the container. Possible values include: 'Locked', 'Unlocked'. + * + * @return the leaseStatus value + */ + public LeaseStatus leaseStatus() { + return this.leaseStatus; + } + + /** + * Get lease state of the container. Possible values include: 'Available', 'Leased', 'Expired', 'Breaking', 'Broken'. + * + * @return the leaseState value + */ + public LeaseState leaseState() { + return this.leaseState; + } + + /** + * Get specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased. Possible values include: 'Infinite', 'Fixed'. + * + * @return the leaseDuration value + */ + public LeaseDuration leaseDuration() { + return this.leaseDuration; + } + + /** + * Get a name-value pair to associate with the container as metadata. + * + * @return the metadata value + */ + public Map metadata() { + return this.metadata; + } + + /** + * Set a name-value pair to associate with the container as metadata. + * + * @param metadata the metadata value to set + * @return the BlobContainerInner object itself. + */ + public BlobContainerInner withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the ImmutabilityPolicy property of the container. + * + * @return the immutabilityPolicy value + */ + public ImmutabilityPolicyProperties immutabilityPolicy() { + return this.immutabilityPolicy; + } + + /** + * Get the LegalHold property of the container. + * + * @return the legalHold value + */ + public LegalHoldProperties legalHold() { + return this.legalHold; + } + + /** + * Get the hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. + * + * @return the hasLegalHold value + */ + public Boolean hasLegalHold() { + return this.hasLegalHold; + } + + /** + * Get the hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container. + * + * @return the hasImmutabilityPolicy value + */ + public Boolean hasImmutabilityPolicy() { + return this.hasImmutabilityPolicy; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersImpl.java new file mode 100644 index 000000000000..f2f5bc49673d --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersImpl.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_06_01.BlobContainers; +import rx.Completable; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.storage.v2019_06_01.ListContainerItem; +import com.microsoft.azure.management.storage.v2019_06_01.BlobContainer; +import com.microsoft.azure.management.storage.v2019_06_01.LegalHold; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseContainerResponse; +import java.util.List; +import com.microsoft.azure.management.storage.v2019_06_01.ImmutabilityPolicy; + +class BlobContainersImpl extends WrapperImpl implements BlobContainers { + private final StorageManager manager; + + BlobContainersImpl(StorageManager manager) { + super(manager.inner().blobContainers()); + this.manager = manager; + } + + public StorageManager manager() { + return this.manager; + } + + @Override + public BlobContainerImpl defineContainer(String name) { + return wrapContainerModel(name); + } + + @Override + public ImmutabilityPolicyImpl defineImmutabilityPolicy(String name) { + return wrapImmutabilityPolicyModel(name); + } + + private BlobContainerImpl wrapContainerModel(String name) { + return new BlobContainerImpl(name, this.manager()); + } + + private ImmutabilityPolicyImpl wrapImmutabilityPolicyModel(String name) { + return new ImmutabilityPolicyImpl(name, this.manager()); + } + + private BlobContainerImpl wrapBlobContainerModel(BlobContainerInner inner) { + return new BlobContainerImpl(inner, manager()); + } + + private ImmutabilityPolicyImpl wrapImmutabilityPolicyModel(ImmutabilityPolicyInner inner) { + return new ImmutabilityPolicyImpl(inner, manager()); + } + + private Observable getImmutabilityPolicyInnerUsingBlobContainersInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String accountName = IdParsingUtils.getValueFromIdByName(id, "storageAccounts"); + String containerName = IdParsingUtils.getValueFromIdByName(id, "containers"); + BlobContainersInner client = this.inner(); + return client.getImmutabilityPolicyAsync(resourceGroupName, accountName, containerName); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String accountName) { + BlobContainersInner client = this.inner(); + return client.listAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ListContainerItem call(ListContainerItemInner inner) { + return new ListContainerItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String containerName) { + BlobContainersInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, containerName) + .map(new Func1() { + @Override + public BlobContainer call(BlobContainerInner inner) { + return new BlobContainerImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String containerName) { + BlobContainersInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, containerName).toCompletable(); + } + + @Override + public Observable setLegalHoldAsync(String resourceGroupName, String accountName, String containerName, List tags) { + BlobContainersInner client = this.inner(); + return client.setLegalHoldAsync(resourceGroupName, accountName, containerName, tags) + .map(new Func1() { + @Override + public LegalHold call(LegalHoldInner inner) { + return new LegalHoldImpl(inner, manager()); + } + }); + } + + @Override + public Observable clearLegalHoldAsync(String resourceGroupName, String accountName, String containerName, List tags) { + BlobContainersInner client = this.inner(); + return client.clearLegalHoldAsync(resourceGroupName, accountName, containerName, tags) + .map(new Func1() { + @Override + public LegalHold call(LegalHoldInner inner) { + return new LegalHoldImpl(inner, manager()); + } + }); + } + + @Override + public Observable leaseAsync(String resourceGroupName, String accountName, String containerName) { + BlobContainersInner client = this.inner(); + return client.leaseAsync(resourceGroupName, accountName, containerName) + .map(new Func1() { + @Override + public LeaseContainerResponse call(LeaseContainerResponseInner inner) { + return new LeaseContainerResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable getImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName) { + BlobContainersInner client = this.inner(); + return client.getImmutabilityPolicyAsync(resourceGroupName, accountName, containerName) + .flatMap(new Func1>() { + @Override + public Observable call(ImmutabilityPolicyInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ImmutabilityPolicy)wrapImmutabilityPolicyModel(inner)); + } + } + }); + } + + @Override + public Completable deleteImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { + BlobContainersInner client = this.inner(); + return client.deleteImmutabilityPolicyAsync(resourceGroupName, accountName, containerName, ifMatch).toCompletable(); + } + + @Override + public Observable lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { + BlobContainersInner client = this.inner(); + return client.lockImmutabilityPolicyAsync(resourceGroupName, accountName, containerName, ifMatch) + .map(new Func1() { + @Override + public ImmutabilityPolicy call(ImmutabilityPolicyInner inner) { + return new ImmutabilityPolicyImpl(inner, manager()); + } + }); + } + + @Override + public Observable extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, int immutabilityPeriodSinceCreationInDays) { + BlobContainersInner client = this.inner(); + return client.extendImmutabilityPolicyAsync(resourceGroupName, accountName, containerName, ifMatch, immutabilityPeriodSinceCreationInDays) + .map(new Func1() { + @Override + public ImmutabilityPolicy call(ImmutabilityPolicyInner inner) { + return new ImmutabilityPolicyImpl(inner, manager()); + } + }); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersInner.java new file mode 100644 index 000000000000..3ac3d44b1170 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersInner.java @@ -0,0 +1,2156 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_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.storage.v2019_06_01.BlobContainersCreateOrUpdateImmutabilityPolicyHeaders; +import com.microsoft.azure.management.storage.v2019_06_01.BlobContainersDeleteImmutabilityPolicyHeaders; +import com.microsoft.azure.management.storage.v2019_06_01.BlobContainersExtendImmutabilityPolicyHeaders; +import com.microsoft.azure.management.storage.v2019_06_01.BlobContainersGetImmutabilityPolicyHeaders; +import com.microsoft.azure.management.storage.v2019_06_01.BlobContainersLockImmutabilityPolicyHeaders; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseContainerRequest; +import com.microsoft.azure.management.storage.v2019_06_01.PublicAccess; +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.ServiceResponseWithHeaders; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 BlobContainers. + */ +public class BlobContainersInner { + /** The Retrofit service to perform REST calls. */ + private BlobContainersService service; + /** The service client containing this operation class. */ + private StorageManagementClientImpl client; + + /** + * Initializes an instance of BlobContainersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public BlobContainersInner(Retrofit retrofit, StorageManagementClientImpl client) { + this.service = retrofit.create(BlobContainersService.class); + this.client = client; + } + + /** + * The interface defining all the services for BlobContainers to be + * used by Retrofit to perform actually REST calls. + */ + interface BlobContainersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.BlobContainers list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$maxpagesize") String maxpagesize, @Query("$filter") String filter, @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.storage.v2019_06_01.BlobContainers create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}") + Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("containerName") String containerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BlobContainerInner blobContainer, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.BlobContainers update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("containerName") String containerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BlobContainerInner blobContainer, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.BlobContainers get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @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.storage.v2019_06_01.BlobContainers delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @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.storage.v2019_06_01.BlobContainers setLegalHold" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/setLegalHold") + Observable> setLegalHold(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("containerName") String containerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body LegalHoldInner legalHold, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.BlobContainers clearLegalHold" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold") + Observable> clearLegalHold(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("containerName") String containerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body LegalHoldInner legalHold, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.BlobContainers createOrUpdateImmutabilityPolicy" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}") + Observable> createOrUpdateImmutabilityPolicy(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("containerName") String containerName, @Path("immutabilityPolicyName") String immutabilityPolicyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @Header("accept-language") String acceptLanguage, @Body ImmutabilityPolicyInner parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.BlobContainers getImmutabilityPolicy" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}") + Observable> getImmutabilityPolicy(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("containerName") String containerName, @Path("immutabilityPolicyName") String immutabilityPolicyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @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.storage.v2019_06_01.BlobContainers deleteImmutabilityPolicy" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}", method = "DELETE", hasBody = true) + Observable> deleteImmutabilityPolicy(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("containerName") String containerName, @Path("immutabilityPolicyName") String immutabilityPolicyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @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.storage.v2019_06_01.BlobContainers lockImmutabilityPolicy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/lock") + Observable> lockImmutabilityPolicy(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("containerName") String containerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @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.storage.v2019_06_01.BlobContainers extendImmutabilityPolicy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend") + Observable> extendImmutabilityPolicy(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("containerName") String containerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @Header("accept-language") String acceptLanguage, @Body ImmutabilityPolicyInner parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.BlobContainers lease" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease") + Observable> lease(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("containerName") String containerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body LeaseContainerRequest parameters, @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.storage.v2019_06_01.BlobContainers listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ListContainerItemInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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 resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ListContainerItemInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String accountName) { + return listWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ListContainerItemInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listSinglePageAsync(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(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ListContainerItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(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 maxpagesize = null; + final String filter = null; + return service.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), maxpagesize, filter, 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 all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param maxpagesize Optional. Specified maximum number of containers that can be included in the list. + * @param filter Optional. When specified, only container names starting with the filter will be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<ListContainerItemInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName, maxpagesize, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param maxpagesize Optional. Specified maximum number of containers that can be included in the list. + * @param filter Optional. When specified, only container names starting with the filter will be listed. + * @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 resourceGroupName, final String accountName, final String maxpagesize, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, accountName, maxpagesize, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param maxpagesize Optional. Specified maximum number of containers that can be included in the list. + * @param filter Optional. When specified, only container names starting with the filter will be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ListContainerItemInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter) { + return listWithServiceResponseAsync(resourceGroupName, accountName, maxpagesize, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param maxpagesize Optional. Specified maximum number of containers that can be included in the list. + * @param filter Optional. When specified, only container names starting with the filter will be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ListContainerItemInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter) { + return listSinglePageAsync(resourceGroupName, accountName, maxpagesize, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + ServiceResponse> * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + ServiceResponse> * @param maxpagesize Optional. Specified maximum number of containers that can be included in the list. + ServiceResponse> * @param filter Optional. When specified, only container names starting with the filter will be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ListContainerItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter) { + 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.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), maxpagesize, filter, 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); + } + + /** + * Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 create(String resourceGroupName, String accountName, String containerName) { + return createWithServiceResponseAsync(resourceGroupName, accountName, containerName).toBlocking().single().body(); + } + + /** + * Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @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, String containerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, containerName), serviceCallback); + } + + /** + * Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobContainerInner object + */ + public Observable createAsync(String resourceGroupName, String accountName, String containerName) { + return createWithServiceResponseAsync(resourceGroupName, accountName, containerName).map(new Func1, BlobContainerInner>() { + @Override + public BlobContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobContainerInner object + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, 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 (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."); + } + final PublicAccess publicAccess = null; + final Map metadata = null; + BlobContainerInner blobContainer = new BlobContainerInner(); + blobContainer.withPublicAccess(null); + blobContainer.withMetadata(null); + return service.create(resourceGroupName, accountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), blobContainer, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param publicAccess Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None' + * @param metadata A name-value pair to associate with the container as metadata. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 create(String resourceGroupName, String accountName, String containerName, PublicAccess publicAccess, Map metadata) { + return createWithServiceResponseAsync(resourceGroupName, accountName, containerName, publicAccess, metadata).toBlocking().single().body(); + } + + /** + * Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param publicAccess Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None' + * @param metadata A name-value pair to associate with the container as metadata. + * @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, String containerName, PublicAccess publicAccess, Map metadata, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, containerName, publicAccess, metadata), serviceCallback); + } + + /** + * Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param publicAccess Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None' + * @param metadata A name-value pair to associate with the container as metadata. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobContainerInner object + */ + public Observable createAsync(String resourceGroupName, String accountName, String containerName, PublicAccess publicAccess, Map metadata) { + return createWithServiceResponseAsync(resourceGroupName, accountName, containerName, publicAccess, metadata).map(new Func1, BlobContainerInner>() { + @Override + public BlobContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param publicAccess Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None' + * @param metadata A name-value pair to associate with the container as metadata. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobContainerInner object + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, PublicAccess publicAccess, Map metadata) { + 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 (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."); + } + Validator.validate(metadata); + BlobContainerInner blobContainer = new BlobContainerInner(); + blobContainer.withPublicAccess(publicAccess); + blobContainer.withMetadata(metadata); + return service.create(resourceGroupName, accountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), blobContainer, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 update(String resourceGroupName, String accountName, String containerName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, containerName).toBlocking().single().body(); + } + + /** + * Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @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 containerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, containerName), serviceCallback); + } + + /** + * Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobContainerInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String containerName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, containerName).map(new Func1, BlobContainerInner>() { + @Override + public BlobContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobContainerInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, 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 (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."); + } + final PublicAccess publicAccess = null; + final Map metadata = null; + BlobContainerInner blobContainer = new BlobContainerInner(); + blobContainer.withPublicAccess(null); + blobContainer.withMetadata(null); + return service.update(resourceGroupName, accountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), blobContainer, 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 container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param publicAccess Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None' + * @param metadata A name-value pair to associate with the container as metadata. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 update(String resourceGroupName, String accountName, String containerName, PublicAccess publicAccess, Map metadata) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, containerName, publicAccess, metadata).toBlocking().single().body(); + } + + /** + * Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param publicAccess Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None' + * @param metadata A name-value pair to associate with the container as metadata. + * @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 containerName, PublicAccess publicAccess, Map metadata, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, containerName, publicAccess, metadata), serviceCallback); + } + + /** + * Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param publicAccess Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None' + * @param metadata A name-value pair to associate with the container as metadata. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobContainerInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String containerName, PublicAccess publicAccess, Map metadata) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, containerName, publicAccess, metadata).map(new Func1, BlobContainerInner>() { + @Override + public BlobContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param publicAccess Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None' + * @param metadata A name-value pair to associate with the container as metadata. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobContainerInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, PublicAccess publicAccess, Map metadata) { + 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 (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."); + } + Validator.validate(metadata); + BlobContainerInner blobContainer = new BlobContainerInner(); + blobContainer.withPublicAccess(publicAccess); + blobContainer.withMetadata(metadata); + return service.update(resourceGroupName, accountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), blobContainer, 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); + } + + /** + * Gets properties of a specified container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 get(String resourceGroupName, String accountName, String containerName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, containerName).toBlocking().single().body(); + } + + /** + * Gets properties of a specified container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @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 containerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, containerName), serviceCallback); + } + + /** + * Gets properties of a specified container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobContainerInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String containerName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, containerName).map(new Func1, BlobContainerInner>() { + @Override + public BlobContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets properties of a specified container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobContainerInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, 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 (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.get(resourceGroupName, accountName, 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 = 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); + } + + /** + * Deletes specified container under its account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 containerName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, containerName).toBlocking().single().body(); + } + + /** + * Deletes specified container under its account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @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 containerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, containerName), serviceCallback); + } + + /** + * Deletes specified container under its account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String containerName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, containerName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes specified container under its account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, 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 (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.delete(resourceGroupName, accountName, 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 = 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); + } + + /** + * Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param tags Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 LegalHoldInner object if successful. + */ + public LegalHoldInner setLegalHold(String resourceGroupName, String accountName, String containerName, List tags) { + return setLegalHoldWithServiceResponseAsync(resourceGroupName, accountName, containerName, tags).toBlocking().single().body(); + } + + /** + * Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param tags Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. + * @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 setLegalHoldAsync(String resourceGroupName, String accountName, String containerName, List tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(setLegalHoldWithServiceResponseAsync(resourceGroupName, accountName, containerName, tags), serviceCallback); + } + + /** + * Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param tags Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LegalHoldInner object + */ + public Observable setLegalHoldAsync(String resourceGroupName, String accountName, String containerName, List tags) { + return setLegalHoldWithServiceResponseAsync(resourceGroupName, accountName, containerName, tags).map(new Func1, LegalHoldInner>() { + @Override + public LegalHoldInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param tags Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LegalHoldInner object + */ + public Observable> setLegalHoldWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, List tags) { + 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 (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."); + } + if (tags == null) { + throw new IllegalArgumentException("Parameter tags is required and cannot be null."); + } + Validator.validate(tags); + LegalHoldInner legalHold = new LegalHoldInner(); + legalHold.withTags(tags); + return service.setLegalHold(resourceGroupName, accountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), legalHold, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = setLegalHoldDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse setLegalHoldDelegate(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); + } + + /** + * Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param tags Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 LegalHoldInner object if successful. + */ + public LegalHoldInner clearLegalHold(String resourceGroupName, String accountName, String containerName, List tags) { + return clearLegalHoldWithServiceResponseAsync(resourceGroupName, accountName, containerName, tags).toBlocking().single().body(); + } + + /** + * Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param tags Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. + * @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 clearLegalHoldAsync(String resourceGroupName, String accountName, String containerName, List tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(clearLegalHoldWithServiceResponseAsync(resourceGroupName, accountName, containerName, tags), serviceCallback); + } + + /** + * Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param tags Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LegalHoldInner object + */ + public Observable clearLegalHoldAsync(String resourceGroupName, String accountName, String containerName, List tags) { + return clearLegalHoldWithServiceResponseAsync(resourceGroupName, accountName, containerName, tags).map(new Func1, LegalHoldInner>() { + @Override + public LegalHoldInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param tags Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LegalHoldInner object + */ + public Observable> clearLegalHoldWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, List tags) { + 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 (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."); + } + if (tags == null) { + throw new IllegalArgumentException("Parameter tags is required and cannot be null."); + } + Validator.validate(tags); + LegalHoldInner legalHold = new LegalHoldInner(); + legalHold.withTags(tags); + return service.clearLegalHold(resourceGroupName, accountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), legalHold, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = clearLegalHoldDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse clearLegalHoldDelegate(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 or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ImmutabilityPolicyInner object if successful. + */ + public ImmutabilityPolicyInner createOrUpdateImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays) { + return createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabilityPeriodSinceCreationInDays).toBlocking().single().body(); + } + + /** + * Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. + * @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 createOrUpdateImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabilityPeriodSinceCreationInDays), serviceCallback); + } + + /** + * Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable createOrUpdateImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays) { + return createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabilityPeriodSinceCreationInDays).map(new Func1, ImmutabilityPolicyInner>() { + @Override + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable> createOrUpdateImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays) { + 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 (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."); + } + final String immutabilityPolicyName = "default"; + final String ifMatch = null; + ImmutabilityPolicyInner parameters = new ImmutabilityPolicyInner(); + parameters.withImmutabilityPeriodSinceCreationInDays(immutabilityPeriodSinceCreationInDays); + return service.createOrUpdateImmutabilityPolicy(resourceGroupName, accountName, containerName, immutabilityPolicyName, this.client.subscriptionId(), this.client.apiVersion(), ifMatch, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = createOrUpdateImmutabilityPolicyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ImmutabilityPolicyInner object if successful. + */ + public ImmutabilityPolicyInner createOrUpdateImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, String ifMatch) { + return createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabilityPeriodSinceCreationInDays, ifMatch).toBlocking().single().body(); + } + + /** + * Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @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 createOrUpdateImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, String ifMatch, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabilityPeriodSinceCreationInDays, ifMatch), serviceCallback); + } + + /** + * Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable createOrUpdateImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, String ifMatch) { + return createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabilityPeriodSinceCreationInDays, ifMatch).map(new Func1, ImmutabilityPolicyInner>() { + @Override + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable> createOrUpdateImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, String ifMatch) { + 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 (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."); + } + final String immutabilityPolicyName = "default"; + ImmutabilityPolicyInner parameters = new ImmutabilityPolicyInner(); + parameters.withImmutabilityPeriodSinceCreationInDays(immutabilityPeriodSinceCreationInDays); + return service.createOrUpdateImmutabilityPolicy(resourceGroupName, accountName, containerName, immutabilityPolicyName, this.client.subscriptionId(), this.client.apiVersion(), ifMatch, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = createOrUpdateImmutabilityPolicyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders createOrUpdateImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, BlobContainersCreateOrUpdateImmutabilityPolicyHeaders.class); + } + + /** + * Gets the existing immutability policy along with the corresponding ETag in response headers and body. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ImmutabilityPolicyInner object if successful. + */ + public ImmutabilityPolicyInner getImmutabilityPolicy(String resourceGroupName, String accountName, String containerName) { + return getImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName).toBlocking().single().body(); + } + + /** + * Gets the existing immutability policy along with the corresponding ETag in response headers and body. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @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 getImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(getImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName), serviceCallback); + } + + /** + * Gets the existing immutability policy along with the corresponding ETag in response headers and body. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable getImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName) { + return getImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName).map(new Func1, ImmutabilityPolicyInner>() { + @Override + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Gets the existing immutability policy along with the corresponding ETag in response headers and body. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable> getImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, 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 (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."); + } + final String immutabilityPolicyName = "default"; + final String ifMatch = null; + return service.getImmutabilityPolicy(resourceGroupName, accountName, containerName, immutabilityPolicyName, this.client.subscriptionId(), this.client.apiVersion(), ifMatch, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = getImmutabilityPolicyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the existing immutability policy along with the corresponding ETag in response headers and body. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ImmutabilityPolicyInner object if successful. + */ + public ImmutabilityPolicyInner getImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, String ifMatch) { + return getImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).toBlocking().single().body(); + } + + /** + * Gets the existing immutability policy along with the corresponding ETag in response headers and body. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @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 getImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(getImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch), serviceCallback); + } + + /** + * Gets the existing immutability policy along with the corresponding ETag in response headers and body. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable getImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { + return getImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1, ImmutabilityPolicyInner>() { + @Override + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Gets the existing immutability policy along with the corresponding ETag in response headers and body. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable> getImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { + 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 (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."); + } + final String immutabilityPolicyName = "default"; + return service.getImmutabilityPolicy(resourceGroupName, accountName, containerName, immutabilityPolicyName, this.client.subscriptionId(), this.client.apiVersion(), ifMatch, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = getImmutabilityPolicyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders getImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, BlobContainersGetImmutabilityPolicyHeaders.class); + } + + /** + * Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, only way is to delete the container after deleting all blobs inside the container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ImmutabilityPolicyInner object if successful. + */ + public ImmutabilityPolicyInner deleteImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, String ifMatch) { + return deleteImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).toBlocking().single().body(); + } + + /** + * Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, only way is to delete the container after deleting all blobs inside the container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @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 deleteImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(deleteImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch), serviceCallback); + } + + /** + * Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, only way is to delete the container after deleting all blobs inside the container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable deleteImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { + return deleteImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1, ImmutabilityPolicyInner>() { + @Override + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, only way is to delete the container after deleting all blobs inside the container. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable> deleteImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { + 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 (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."); + } + if (ifMatch == null) { + throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); + } + final String immutabilityPolicyName = "default"; + return service.deleteImmutabilityPolicy(resourceGroupName, accountName, containerName, immutabilityPolicyName, this.client.subscriptionId(), this.client.apiVersion(), ifMatch, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = deleteImmutabilityPolicyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders deleteImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, BlobContainersDeleteImmutabilityPolicyHeaders.class); + } + + /** + * Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ImmutabilityPolicyInner object if successful. + */ + public ImmutabilityPolicyInner lockImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, String ifMatch) { + return lockImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).toBlocking().single().body(); + } + + /** + * Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @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 lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(lockImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch), serviceCallback); + } + + /** + * Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { + return lockImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1, ImmutabilityPolicyInner>() { + @Override + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable> lockImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { + 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 (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."); + } + if (ifMatch == null) { + throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); + } + return service.lockImmutabilityPolicy(resourceGroupName, accountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), ifMatch, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = lockImmutabilityPolicyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders lockImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, BlobContainersLockImmutabilityPolicyHeaders.class); + } + + /** + * Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ImmutabilityPolicyInner object if successful. + */ + public ImmutabilityPolicyInner extendImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, String ifMatch, int immutabilityPeriodSinceCreationInDays) { + return extendImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch, immutabilityPeriodSinceCreationInDays).toBlocking().single().body(); + } + + /** + * Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. + * @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 extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, int immutabilityPeriodSinceCreationInDays, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(extendImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch, immutabilityPeriodSinceCreationInDays), serviceCallback); + } + + /** + * Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, int immutabilityPeriodSinceCreationInDays) { + return extendImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch, immutabilityPeriodSinceCreationInDays).map(new Func1, ImmutabilityPolicyInner>() { + @Override + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImmutabilityPolicyInner object + */ + public Observable> extendImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, int immutabilityPeriodSinceCreationInDays) { + 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 (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."); + } + if (ifMatch == null) { + throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); + } + ImmutabilityPolicyInner parameters = new ImmutabilityPolicyInner(); + parameters.withImmutabilityPeriodSinceCreationInDays(immutabilityPeriodSinceCreationInDays); + return service.extendImmutabilityPolicy(resourceGroupName, accountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), ifMatch, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = extendImmutabilityPolicyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders extendImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, BlobContainersExtendImmutabilityPolicyHeaders.class); + } + + /** + * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 LeaseContainerResponseInner object if successful. + */ + public LeaseContainerResponseInner lease(String resourceGroupName, String accountName, String containerName) { + return leaseWithServiceResponseAsync(resourceGroupName, accountName, containerName).toBlocking().single().body(); + } + + /** + * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @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 leaseAsync(String resourceGroupName, String accountName, String containerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(leaseWithServiceResponseAsync(resourceGroupName, accountName, containerName), serviceCallback); + } + + /** + * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LeaseContainerResponseInner object + */ + public Observable leaseAsync(String resourceGroupName, String accountName, String containerName) { + return leaseWithServiceResponseAsync(resourceGroupName, accountName, containerName).map(new Func1, LeaseContainerResponseInner>() { + @Override + public LeaseContainerResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LeaseContainerResponseInner object + */ + public Observable> leaseWithServiceResponseAsync(String resourceGroupName, String accountName, 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 (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."); + } + final LeaseContainerRequest parameters = null; + return service.lease(resourceGroupName, accountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = leaseDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param parameters Lease Container request body. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 LeaseContainerResponseInner object if successful. + */ + public LeaseContainerResponseInner lease(String resourceGroupName, String accountName, String containerName, LeaseContainerRequest parameters) { + return leaseWithServiceResponseAsync(resourceGroupName, accountName, containerName, parameters).toBlocking().single().body(); + } + + /** + * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param parameters Lease Container request body. + * @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 leaseAsync(String resourceGroupName, String accountName, String containerName, LeaseContainerRequest parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(leaseWithServiceResponseAsync(resourceGroupName, accountName, containerName, parameters), serviceCallback); + } + + /** + * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param parameters Lease Container request body. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LeaseContainerResponseInner object + */ + public Observable leaseAsync(String resourceGroupName, String accountName, String containerName, LeaseContainerRequest parameters) { + return leaseWithServiceResponseAsync(resourceGroupName, accountName, containerName, parameters).map(new Func1, LeaseContainerResponseInner>() { + @Override + public LeaseContainerResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param parameters Lease Container request body. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LeaseContainerResponseInner object + */ + public Observable> leaseWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, LeaseContainerRequest 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 (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."); + } + Validator.validate(parameters); + return service.lease(resourceGroupName, accountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = leaseDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse leaseDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @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<ListContainerItemInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @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<ListContainerItemInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @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<ListContainerItemInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ListContainerItemInner> 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/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java new file mode 100644 index 000000000000..39345d01013a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.BlobServiceProperties; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.CorsRules; +import com.microsoft.azure.management.storage.v2019_06_01.DeleteRetentionPolicy; +import com.microsoft.azure.management.storage.v2019_06_01.ChangeFeed; + +class BlobServicePropertiesImpl extends CreatableUpdatableImpl implements BlobServiceProperties, BlobServiceProperties.Definition, BlobServiceProperties.Update { + private final StorageManager manager; + private String resourceGroupName; + private String accountName; + + BlobServicePropertiesImpl(String name, StorageManager manager) { + super(name, new BlobServicePropertiesInner()); + this.manager = manager; + // Set resource name + this.accountName = name; + // + } + + BlobServicePropertiesImpl(BlobServicePropertiesInner inner, StorageManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.accountName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "storageAccounts"); + // + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + BlobServicesInner client = this.manager().inner().blobServices(); + return client.setServicePropertiesAsync(this.resourceGroupName, this.accountName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + BlobServicesInner client = this.manager().inner().blobServices(); + return client.setServicePropertiesAsync(this.resourceGroupName, this.accountName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + BlobServicesInner client = this.manager().inner().blobServices(); + return client.getServicePropertiesAsync(this.resourceGroupName, this.accountName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Boolean automaticSnapshotPolicyEnabled() { + return this.inner().automaticSnapshotPolicyEnabled(); + } + + @Override + public ChangeFeed changeFeed() { + return this.inner().changeFeed(); + } + + @Override + public CorsRules cors() { + return this.inner().cors(); + } + + @Override + public String defaultServiceVersion() { + return this.inner().defaultServiceVersion(); + } + + @Override + public DeleteRetentionPolicy deleteRetentionPolicy() { + return this.inner().deleteRetentionPolicy(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public BlobServicePropertiesImpl withExistingStorageAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public BlobServicePropertiesImpl withAutomaticSnapshotPolicyEnabled(Boolean automaticSnapshotPolicyEnabled) { + this.inner().withAutomaticSnapshotPolicyEnabled(automaticSnapshotPolicyEnabled); + return this; + } + + @Override + public BlobServicePropertiesImpl withChangeFeed(ChangeFeed changeFeed) { + this.inner().withChangeFeed(changeFeed); + return this; + } + + @Override + public BlobServicePropertiesImpl withCors(CorsRules cors) { + this.inner().withCors(cors); + return this; + } + + @Override + public BlobServicePropertiesImpl withDefaultServiceVersion(String defaultServiceVersion) { + this.inner().withDefaultServiceVersion(defaultServiceVersion); + return this; + } + + @Override + public BlobServicePropertiesImpl withDeleteRetentionPolicy(DeleteRetentionPolicy deleteRetentionPolicy) { + this.inner().withDeleteRetentionPolicy(deleteRetentionPolicy); + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java new file mode 100644 index 000000000000..b34a35e06266 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.CorsRules; +import com.microsoft.azure.management.storage.v2019_06_01.DeleteRetentionPolicy; +import com.microsoft.azure.management.storage.v2019_06_01.ChangeFeed; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * The properties of a storage account’s Blob service. + */ +@JsonFlatten +public class BlobServicePropertiesInner extends ProxyResource { + /** + * Specifies CORS rules for the Blob service. You can include up to five + * CorsRule elements in the request. If no CorsRule elements are included + * in the request body, all CORS rules will be deleted, and CORS will be + * disabled for the Blob service. + */ + @JsonProperty(value = "properties.cors") + private CorsRules cors; + + /** + * DefaultServiceVersion indicates the default version to use for requests + * to the Blob service if an incoming request’s version is not specified. + * Possible values include version 2008-10-27 and all more recent versions. + */ + @JsonProperty(value = "properties.defaultServiceVersion") + private String defaultServiceVersion; + + /** + * The blob service properties for soft delete. + */ + @JsonProperty(value = "properties.deleteRetentionPolicy") + private DeleteRetentionPolicy deleteRetentionPolicy; + + /** + * Automatic Snapshot is enabled if set to true. + */ + @JsonProperty(value = "properties.automaticSnapshotPolicyEnabled") + private Boolean automaticSnapshotPolicyEnabled; + + /** + * The blob service properties for change feed events. + */ + @JsonProperty(value = "properties.changeFeed") + private ChangeFeed changeFeed; + + /** + * Get specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. + * + * @return the cors value + */ + public CorsRules cors() { + return this.cors; + } + + /** + * Set specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. + * + * @param cors the cors value to set + * @return the BlobServicePropertiesInner object itself. + */ + public BlobServicePropertiesInner withCors(CorsRules cors) { + this.cors = cors; + return this; + } + + /** + * Get defaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions. + * + * @return the defaultServiceVersion value + */ + public String defaultServiceVersion() { + return this.defaultServiceVersion; + } + + /** + * Set defaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions. + * + * @param defaultServiceVersion the defaultServiceVersion value to set + * @return the BlobServicePropertiesInner object itself. + */ + public BlobServicePropertiesInner withDefaultServiceVersion(String defaultServiceVersion) { + this.defaultServiceVersion = defaultServiceVersion; + return this; + } + + /** + * Get the blob service properties for soft delete. + * + * @return the deleteRetentionPolicy value + */ + public DeleteRetentionPolicy deleteRetentionPolicy() { + return this.deleteRetentionPolicy; + } + + /** + * Set the blob service properties for soft delete. + * + * @param deleteRetentionPolicy the deleteRetentionPolicy value to set + * @return the BlobServicePropertiesInner object itself. + */ + public BlobServicePropertiesInner withDeleteRetentionPolicy(DeleteRetentionPolicy deleteRetentionPolicy) { + this.deleteRetentionPolicy = deleteRetentionPolicy; + return this; + } + + /** + * Get automatic Snapshot is enabled if set to true. + * + * @return the automaticSnapshotPolicyEnabled value + */ + public Boolean automaticSnapshotPolicyEnabled() { + return this.automaticSnapshotPolicyEnabled; + } + + /** + * Set automatic Snapshot is enabled if set to true. + * + * @param automaticSnapshotPolicyEnabled the automaticSnapshotPolicyEnabled value to set + * @return the BlobServicePropertiesInner object itself. + */ + public BlobServicePropertiesInner withAutomaticSnapshotPolicyEnabled(Boolean automaticSnapshotPolicyEnabled) { + this.automaticSnapshotPolicyEnabled = automaticSnapshotPolicyEnabled; + return this; + } + + /** + * Get the blob service properties for change feed events. + * + * @return the changeFeed value + */ + public ChangeFeed changeFeed() { + return this.changeFeed; + } + + /** + * Set the blob service properties for change feed events. + * + * @param changeFeed the changeFeed value to set + * @return the BlobServicePropertiesInner object itself. + */ + public BlobServicePropertiesInner withChangeFeed(ChangeFeed changeFeed) { + this.changeFeed = changeFeed; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicesImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicesImpl.java new file mode 100644 index 000000000000..837340c9c4b7 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicesImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_06_01.BlobServices; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.storage.v2019_06_01.BlobServiceProperties; + +class BlobServicesImpl extends WrapperImpl implements BlobServices { + private final StorageManager manager; + + BlobServicesImpl(StorageManager manager) { + super(manager.inner().blobServices()); + this.manager = manager; + } + + public StorageManager manager() { + return this.manager; + } + + @Override + public BlobServicePropertiesImpl define(String name) { + return wrapModel(name); + } + + private BlobServicePropertiesImpl wrapModel(BlobServicePropertiesInner inner) { + return new BlobServicePropertiesImpl(inner, manager()); + } + + private BlobServicePropertiesImpl wrapModel(String name) { + return new BlobServicePropertiesImpl(name, this.manager()); + } + + @Override + public Observable listAsync(String resourceGroupName, String accountName) { + BlobServicesInner client = this.inner(); + return client.listAsync(resourceGroupName, accountName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public BlobServiceProperties call(BlobServicePropertiesInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getServicePropertiesAsync(String resourceGroupName, String accountName) { + BlobServicesInner client = this.inner(); + return client.getServicePropertiesAsync(resourceGroupName, accountName) + .flatMap(new Func1>() { + @Override + public Observable call(BlobServicePropertiesInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((BlobServiceProperties)wrapModel(inner)); + } + } + }); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicesInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicesInner.java new file mode 100644 index 000000000000..bd73f910c208 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicesInner.java @@ -0,0 +1,345 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_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 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.Path; +import retrofit2.http.PUT; +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 BlobServices. + */ +public class BlobServicesInner { + /** The Retrofit service to perform REST calls. */ + private BlobServicesService service; + /** The service client containing this operation class. */ + private StorageManagementClientImpl client; + + /** + * Initializes an instance of BlobServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public BlobServicesInner(Retrofit retrofit, StorageManagementClientImpl client) { + this.service = retrofit.create(BlobServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for BlobServices to be + * used by Retrofit to perform actually REST calls. + */ + interface BlobServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.BlobServices list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices") + Observable> list(@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.storage.v2019_06_01.BlobServices setServiceProperties" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}") + Observable> setServiceProperties(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("BlobServicesName") String blobServicesName, @Query("api-version") String apiVersion, @Body BlobServicePropertiesInner parameters, @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.storage.v2019_06_01.BlobServices getServiceProperties" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}") + Observable> getServiceProperties(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("BlobServicesName") String blobServicesName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List blob services of storage account. It returns a collection of one object named default. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 List<BlobServicePropertiesInner> object if successful. + */ + public List list(String resourceGroupName, String accountName) { + return listWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * List blob services of storage account. It returns a collection of one object named default. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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(String resourceGroupName, String accountName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * List blob services of storage account. It returns a collection of one object named default. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<BlobServicePropertiesInner> object + */ + public Observable> listAsync(String resourceGroupName, String accountName) { + return listWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List blob services of storage account. It returns a collection of one object named default. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<BlobServicePropertiesInner> object + */ + public Observable>> listWithServiceResponseAsync(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.list(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 = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.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()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) 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 BlobServicePropertiesInner object if successful. + */ + public BlobServicePropertiesInner setServiceProperties(String resourceGroupName, String accountName, BlobServicePropertiesInner parameters) { + return setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); + } + + /** + * Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) 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 setServicePropertiesAsync(String resourceGroupName, String accountName, BlobServicePropertiesInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobServicePropertiesInner object + */ + public Observable setServicePropertiesAsync(String resourceGroupName, String accountName, BlobServicePropertiesInner parameters) { + return setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, BlobServicePropertiesInner>() { + @Override + public BlobServicePropertiesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobServicePropertiesInner object + */ + public Observable> setServicePropertiesWithServiceResponseAsync(String resourceGroupName, String accountName, BlobServicePropertiesInner 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 (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."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String blobServicesName = "default"; + return service.setServiceProperties(resourceGroupName, accountName, this.client.subscriptionId(), blobServicesName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = setServicePropertiesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse setServicePropertiesDelegate(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 properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 BlobServicePropertiesInner object if successful. + */ + public BlobServicePropertiesInner getServiceProperties(String resourceGroupName, String accountName) { + return getServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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 getServicePropertiesAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobServicePropertiesInner object + */ + public Observable getServicePropertiesAsync(String resourceGroupName, String accountName) { + return getServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, BlobServicePropertiesInner>() { + @Override + public BlobServicePropertiesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobServicePropertiesInner object + */ + public Observable> getServicePropertiesWithServiceResponseAsync(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."); + } + final String blobServicesName = "default"; + return service.getServiceProperties(resourceGroupName, accountName, this.client.subscriptionId(), blobServicesName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getServicePropertiesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getServicePropertiesDelegate(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/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/CheckNameAvailabilityResultImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/CheckNameAvailabilityResultImpl.java new file mode 100644 index 000000000000..8ed42d181fd4 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/CheckNameAvailabilityResultImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.CheckNameAvailabilityResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_06_01.Reason; + +class CheckNameAvailabilityResultImpl extends WrapperImpl implements CheckNameAvailabilityResult { + private final StorageManager manager; + CheckNameAvailabilityResultImpl(CheckNameAvailabilityResultInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public Boolean nameAvailable() { + return this.inner().nameAvailable(); + } + + @Override + public Reason reason() { + return this.inner().reason(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/CheckNameAvailabilityResultInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/CheckNameAvailabilityResultInner.java new file mode 100644 index 000000000000..7fd22b4060e0 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/CheckNameAvailabilityResultInner.java @@ -0,0 +1,67 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.Reason; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The CheckNameAvailability operation response. + */ +public class CheckNameAvailabilityResultInner { + /** + * Gets a boolean value that indicates whether the name is available for + * you to use. If true, the name is available. If false, the name has + * already been taken or is invalid and cannot be used. + */ + @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY) + private Boolean nameAvailable; + + /** + * Gets the reason that a storage account name could not be used. The + * Reason element is only returned if NameAvailable is false. Possible + * values include: 'AccountNameInvalid', 'AlreadyExists'. + */ + @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) + private Reason reason; + + /** + * Gets an error message explaining the Reason value in more detail. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Get gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false. Possible values include: 'AccountNameInvalid', 'AlreadyExists'. + * + * @return the reason value + */ + public Reason reason() { + return this.reason; + } + + /** + * Get gets an error message explaining the Reason value in more detail. + * + * @return the message value + */ + public String message() { + return this.message; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServiceItemsImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServiceItemsImpl.java new file mode 100644 index 000000000000..ffe2b955887e --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServiceItemsImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.FileServiceItems; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class FileServiceItemsImpl extends WrapperImpl implements FileServiceItems { + private final StorageManager manager; + FileServiceItemsImpl(FileServiceItemsInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServiceItemsInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServiceItemsInner.java new file mode 100644 index 000000000000..d1a4568d2a85 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServiceItemsInner.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.storage.v2019_06_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The FileServiceItemsInner model. + */ +public class FileServiceItemsInner { + /** + * List of file services returned. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /** + * Get list of file services returned. + * + * @return the value value + */ + public List value() { + return this.value; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesImpl.java new file mode 100644 index 000000000000..8ccf1f0b8ae3 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesImpl.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.FileServiceProperties; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.CorsRules; +import java.util.List; +import rx.functions.Func1; + +class FileServicePropertiesImpl extends CreatableUpdatableImpl implements FileServiceProperties, FileServiceProperties.Definition, FileServiceProperties.Update { + private final StorageManager manager; + private String resourceGroupName; + private String accountName; + private CorsRules ccors; + private CorsRules ucors; + + FileServicePropertiesImpl(String name, StorageManager manager) { + super(name, new FileServicePropertiesInner()); + this.manager = manager; + // Set resource name + this.accountName = name; + // + this.ccors = new CorsRules(); + this.ucors = new CorsRules(); + } + + FileServicePropertiesImpl(FileServicePropertiesInner inner, StorageManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.accountName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "storageAccounts"); + // + this.ccors = new CorsRules(); + this.ucors = new CorsRules(); + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + FileServicesInner client = this.manager().inner().fileServices(); + return client.setServicePropertiesAsync(this.resourceGroupName, this.accountName, this.ccors) + .map(new Func1() { + @Override + public FileServicePropertiesInner call(FileServicePropertiesInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + FileServicesInner client = this.manager().inner().fileServices(); + return client.setServicePropertiesAsync(this.resourceGroupName, this.accountName, this.ucors) + .map(new Func1() { + @Override + public FileServicePropertiesInner call(FileServicePropertiesInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + FileServicesInner client = this.manager().inner().fileServices(); + return client.getServicePropertiesAsync(this.resourceGroupName, this.accountName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.ccors = new CorsRules(); + this.ucors = new CorsRules(); + } + + @Override + public CorsRules cors() { + return this.inner().cors(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public FileServicePropertiesImpl withExistingStorageAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public FileServicePropertiesImpl withCors(CorsRules cors) { + if (isInCreateMode()) { + this.ccors = cors; + } else { + this.ucors = cors; + } + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesInner.java new file mode 100644 index 000000000000..efeae6a6fc3c --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesInner.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.CorsRules; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * The properties of File services in storage account. + */ +@JsonFlatten +public class FileServicePropertiesInner extends ProxyResource { + /** + * Specifies CORS rules for the File service. You can include up to five + * CorsRule elements in the request. If no CorsRule elements are included + * in the request body, all CORS rules will be deleted, and CORS will be + * disabled for the File service. + */ + @JsonProperty(value = "properties.cors") + private CorsRules cors; + + /** + * Get specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service. + * + * @return the cors value + */ + public CorsRules cors() { + return this.cors; + } + + /** + * Set specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service. + * + * @param cors the cors value to set + * @return the FileServicePropertiesInner object itself. + */ + public FileServicePropertiesInner withCors(CorsRules cors) { + this.cors = cors; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicesImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicesImpl.java new file mode 100644 index 000000000000..417ba1d4629c --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicesImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_06_01.FileServices; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.storage.v2019_06_01.FileServiceItems; +import com.microsoft.azure.management.storage.v2019_06_01.FileServiceProperties; + +class FileServicesImpl extends WrapperImpl implements FileServices { + private final StorageManager manager; + + FileServicesImpl(StorageManager manager) { + super(manager.inner().fileServices()); + this.manager = manager; + } + + public StorageManager manager() { + return this.manager; + } + + @Override + public FileServicePropertiesImpl define(String name) { + return wrapModel(name); + } + + private FileServicePropertiesImpl wrapModel(FileServicePropertiesInner inner) { + return new FileServicePropertiesImpl(inner, manager()); + } + + private FileServicePropertiesImpl wrapModel(String name) { + return new FileServicePropertiesImpl(name, this.manager()); + } + + @Override + public Observable listAsync(String resourceGroupName, String accountName) { + FileServicesInner client = this.inner(); + return client.listAsync(resourceGroupName, accountName) + .map(new Func1() { + @Override + public FileServiceItems call(FileServiceItemsInner inner) { + return new FileServiceItemsImpl(inner, manager()); + } + }); + } + + @Override + public Observable getServicePropertiesAsync(String resourceGroupName, String accountName) { + FileServicesInner client = this.inner(); + return client.getServicePropertiesAsync(resourceGroupName, accountName) + .flatMap(new Func1>() { + @Override + public Observable call(FileServicePropertiesInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((FileServiceProperties)wrapModel(inner)); + } + } + }); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicesInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicesInner.java new file mode 100644 index 000000000000..d498d05dfd43 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicesInner.java @@ -0,0 +1,422 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.storage.v2019_06_01.CorsRules; +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 okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.PUT; +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 FileServices. + */ +public class FileServicesInner { + /** The Retrofit service to perform REST calls. */ + private FileServicesService service; + /** The service client containing this operation class. */ + private StorageManagementClientImpl client; + + /** + * Initializes an instance of FileServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public FileServicesInner(Retrofit retrofit, StorageManagementClientImpl client) { + this.service = retrofit.create(FileServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for FileServices to be + * used by Retrofit to perform actually REST calls. + */ + interface FileServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.FileServices list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices") + Observable> list(@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.storage.v2019_06_01.FileServices setServiceProperties" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}") + Observable> setServiceProperties(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("FileServicesName") String fileServicesName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body FileServicePropertiesInner parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.FileServices getServiceProperties" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}") + Observable> getServiceProperties(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("FileServicesName") String fileServicesName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List all file services in storage accounts. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 FileServiceItemsInner object if successful. + */ + public FileServiceItemsInner list(String resourceGroupName, String accountName) { + return listWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * List all file services in storage accounts. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * List all file services in storage accounts. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileServiceItemsInner object + */ + public Observable listAsync(String resourceGroupName, String accountName) { + return listWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, FileServiceItemsInner>() { + @Override + public FileServiceItemsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List all file services in storage accounts. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileServiceItemsInner object + */ + public Observable> listWithServiceResponseAsync(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.list(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 = 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); + } + + /** + * Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 FileServicePropertiesInner object if successful. + */ + public FileServicePropertiesInner setServiceProperties(String resourceGroupName, String accountName) { + return setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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 setServicePropertiesAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileServicePropertiesInner object + */ + public Observable setServicePropertiesAsync(String resourceGroupName, String accountName) { + return setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, FileServicePropertiesInner>() { + @Override + public FileServicePropertiesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileServicePropertiesInner object + */ + public Observable> setServicePropertiesWithServiceResponseAsync(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."); + } + final String fileServicesName = "default"; + final CorsRules cors = null; + FileServicePropertiesInner parameters = new FileServicePropertiesInner(); + parameters.withCors(null); + return service.setServiceProperties(resourceGroupName, accountName, this.client.subscriptionId(), fileServicesName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = setServicePropertiesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param cors Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 FileServicePropertiesInner object if successful. + */ + public FileServicePropertiesInner setServiceProperties(String resourceGroupName, String accountName, CorsRules cors) { + return setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName, cors).toBlocking().single().body(); + } + + /** + * Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param cors Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service. + * @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 setServicePropertiesAsync(String resourceGroupName, String accountName, CorsRules cors, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName, cors), serviceCallback); + } + + /** + * Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param cors Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileServicePropertiesInner object + */ + public Observable setServicePropertiesAsync(String resourceGroupName, String accountName, CorsRules cors) { + return setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName, cors).map(new Func1, FileServicePropertiesInner>() { + @Override + public FileServicePropertiesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param cors Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileServicePropertiesInner object + */ + public Observable> setServicePropertiesWithServiceResponseAsync(String resourceGroupName, String accountName, CorsRules cors) { + 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."); + } + Validator.validate(cors); + final String fileServicesName = "default"; + FileServicePropertiesInner parameters = new FileServicePropertiesInner(); + parameters.withCors(cors); + return service.setServiceProperties(resourceGroupName, accountName, this.client.subscriptionId(), fileServicesName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = setServicePropertiesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse setServicePropertiesDelegate(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 properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 FileServicePropertiesInner object if successful. + */ + public FileServicePropertiesInner getServiceProperties(String resourceGroupName, String accountName) { + return getServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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 getServicePropertiesAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileServicePropertiesInner object + */ + public Observable getServicePropertiesAsync(String resourceGroupName, String accountName) { + return getServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, FileServicePropertiesInner>() { + @Override + public FileServicePropertiesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileServicePropertiesInner object + */ + public Observable> getServicePropertiesWithServiceResponseAsync(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."); + } + final String fileServicesName = "default"; + return service.getServiceProperties(resourceGroupName, accountName, this.client.subscriptionId(), fileServicesName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getServicePropertiesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getServicePropertiesDelegate(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/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareImpl.java new file mode 100644 index 000000000000..ac9641dc378f --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.FileShare; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.Map; +import org.joda.time.DateTime; + +class FileShareImpl extends CreatableUpdatableImpl implements FileShare, FileShare.Definition, FileShare.Update { + private final StorageManager manager; + private String resourceGroupName; + private String accountName; + private String shareName; + private Map cmetadata; + private Integer cshareQuota; + private Map umetadata; + private Integer ushareQuota; + + FileShareImpl(String name, StorageManager manager) { + super(name, new FileShareInner()); + this.manager = manager; + // Set resource name + this.shareName = name; + // + } + + FileShareImpl(FileShareInner inner, StorageManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.shareName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "storageAccounts"); + this.shareName = IdParsingUtils.getValueFromIdByName(inner.id(), "shares"); + // + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + FileSharesInner client = this.manager().inner().fileShares(); + return client.createAsync(this.resourceGroupName, this.accountName, this.shareName, this.cmetadata, this.cshareQuota) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + FileSharesInner client = this.manager().inner().fileShares(); + return client.updateAsync(this.resourceGroupName, this.accountName, this.shareName, this.umetadata, this.ushareQuota) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + FileSharesInner client = this.manager().inner().fileShares(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public DateTime lastModifiedTime() { + return this.inner().lastModifiedTime(); + } + + @Override + public Map metadata() { + return this.inner().metadata(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer shareQuota() { + return this.inner().shareQuota(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public FileShareImpl withExistingFileService(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public FileShareImpl withMetadata(Map metadata) { + if (isInCreateMode()) { + this.cmetadata = metadata; + } else { + this.umetadata = metadata; + } + return this; + } + + @Override + public FileShareImpl withShareQuota(Integer shareQuota) { + if (isInCreateMode()) { + this.cshareQuota = shareQuota; + } else { + this.ushareQuota = shareQuota; + } + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareInner.java new file mode 100644 index 000000000000..491cd8b548d4 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareInner.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import org.joda.time.DateTime; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.storage.v2019_06_01.AzureEntityResource; + +/** + * Properties of the file share, including Id, resource name, resource type, + * Etag. + */ +@JsonFlatten +public class FileShareInner extends AzureEntityResource { + /** + * Returns the date and time the share was last modified. + */ + @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * A name-value pair to associate with the share as metadata. + */ + @JsonProperty(value = "properties.metadata") + private Map metadata; + + /** + * The maximum size of the share, in gigabytes. Must be greater than 0, and + * less than or equal to 5TB (5120). + */ + @JsonProperty(value = "properties.shareQuota") + private Integer shareQuota; + + /** + * Get returns the date and time the share was last modified. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get a name-value pair to associate with the share as metadata. + * + * @return the metadata value + */ + public Map metadata() { + return this.metadata; + } + + /** + * Set a name-value pair to associate with the share as metadata. + * + * @param metadata the metadata value to set + * @return the FileShareInner object itself. + */ + public FileShareInner withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * + * @return the shareQuota value + */ + public Integer shareQuota() { + return this.shareQuota; + } + + /** + * Set the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * + * @param shareQuota the shareQuota value to set + * @return the FileShareInner object itself. + */ + public FileShareInner withShareQuota(Integer shareQuota) { + this.shareQuota = shareQuota; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemImpl.java new file mode 100644 index 000000000000..9f66a7a0b941 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.FileShareItem; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; +import java.util.Map; + +class FileShareItemImpl extends WrapperImpl implements FileShareItem { + private final StorageManager manager; + FileShareItemImpl(FileShareItemInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public DateTime lastModifiedTime() { + return this.inner().lastModifiedTime(); + } + + @Override + public Map metadata() { + return this.inner().metadata(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer shareQuota() { + return this.inner().shareQuota(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemInner.java new file mode 100644 index 000000000000..4db854637865 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemInner.java @@ -0,0 +1,90 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import org.joda.time.DateTime; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.storage.v2019_06_01.AzureEntityResource; + +/** + * The file share properties be listed out. + */ +@JsonFlatten +public class FileShareItemInner extends AzureEntityResource { + /** + * Returns the date and time the share was last modified. + */ + @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * A name-value pair to associate with the share as metadata. + */ + @JsonProperty(value = "properties.metadata") + private Map metadata; + + /** + * The maximum size of the share, in gigabytes. Must be greater than 0, and + * less than or equal to 5TB (5120). + */ + @JsonProperty(value = "properties.shareQuota") + private Integer shareQuota; + + /** + * Get returns the date and time the share was last modified. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get a name-value pair to associate with the share as metadata. + * + * @return the metadata value + */ + public Map metadata() { + return this.metadata; + } + + /** + * Set a name-value pair to associate with the share as metadata. + * + * @param metadata the metadata value to set + * @return the FileShareItemInner object itself. + */ + public FileShareItemInner withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * + * @return the shareQuota value + */ + public Integer shareQuota() { + return this.shareQuota; + } + + /** + * Set the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * + * @param shareQuota the shareQuota value to set + * @return the FileShareItemInner object itself. + */ + public FileShareItemInner withShareQuota(Integer shareQuota) { + this.shareQuota = shareQuota; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesImpl.java new file mode 100644 index 000000000000..8c80b4e9bd74 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_06_01.FileShares; +import rx.Completable; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.storage.v2019_06_01.FileShareItem; +import com.microsoft.azure.management.storage.v2019_06_01.FileShare; + +class FileSharesImpl extends WrapperImpl implements FileShares { + private final StorageManager manager; + + FileSharesImpl(StorageManager manager) { + super(manager.inner().fileShares()); + this.manager = manager; + } + + public StorageManager manager() { + return this.manager; + } + + @Override + public FileShareImpl define(String name) { + return wrapModel(name); + } + + private FileShareImpl wrapModel(FileShareInner inner) { + return new FileShareImpl(inner, manager()); + } + + private FileShareImpl wrapModel(String name) { + return new FileShareImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String accountName) { + FileSharesInner client = this.inner(); + return client.listAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public FileShareItem call(FileShareItemInner inner) { + return new FileShareItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String shareName) { + FileSharesInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, shareName) + .map(new Func1() { + @Override + public FileShare call(FileShareInner inner) { + return new FileShareImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String shareName) { + FileSharesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, shareName).toCompletable(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesInner.java new file mode 100644 index 000000000000..8dc17d834450 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesInner.java @@ -0,0 +1,1033 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 FileShares. + */ +public class FileSharesInner { + /** The Retrofit service to perform REST calls. */ + private FileSharesService service; + /** The service client containing this operation class. */ + private StorageManagementClientImpl client; + + /** + * Initializes an instance of FileSharesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public FileSharesInner(Retrofit retrofit, StorageManagementClientImpl client) { + this.service = retrofit.create(FileSharesService.class); + this.client = client; + } + + /** + * The interface defining all the services for FileShares to be + * used by Retrofit to perform actually REST calls. + */ + interface FileSharesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.FileShares list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$maxpagesize") String maxpagesize, @Query("$filter") String filter, @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.storage.v2019_06_01.FileShares create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}") + Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("shareName") String shareName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body FileShareInner fileShare, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.FileShares update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("shareName") String shareName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body FileShareInner fileShare, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.FileShares get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("shareName") String shareName, @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.storage.v2019_06_01.FileShares delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("shareName") String shareName, @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.storage.v2019_06_01.FileShares listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all shares. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<FileShareItemInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all shares. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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 resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all shares. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FileShareItemInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String accountName) { + return listWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all shares. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FileShareItemInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listSinglePageAsync(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(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all shares. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FileShareItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(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 maxpagesize = null; + final String filter = null; + return service.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), maxpagesize, filter, 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 all shares. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param maxpagesize Optional. Specified maximum number of shares that can be included in the list. + * @param filter Optional. When specified, only share names starting with the filter will be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<FileShareItemInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName, maxpagesize, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all shares. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param maxpagesize Optional. Specified maximum number of shares that can be included in the list. + * @param filter Optional. When specified, only share names starting with the filter will be listed. + * @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 resourceGroupName, final String accountName, final String maxpagesize, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, accountName, maxpagesize, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all shares. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param maxpagesize Optional. Specified maximum number of shares that can be included in the list. + * @param filter Optional. When specified, only share names starting with the filter will be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FileShareItemInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter) { + return listWithServiceResponseAsync(resourceGroupName, accountName, maxpagesize, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all shares. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param maxpagesize Optional. Specified maximum number of shares that can be included in the list. + * @param filter Optional. When specified, only share names starting with the filter will be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FileShareItemInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter) { + return listSinglePageAsync(resourceGroupName, accountName, maxpagesize, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all shares. + * + ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + ServiceResponse> * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + ServiceResponse> * @param maxpagesize Optional. Specified maximum number of shares that can be included in the list. + ServiceResponse> * @param filter Optional. When specified, only share names starting with the filter will be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FileShareItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter) { + 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.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), maxpagesize, filter, 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); + } + + /** + * Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 FileShareInner object if successful. + */ + public FileShareInner create(String resourceGroupName, String accountName, String shareName) { + return createWithServiceResponseAsync(resourceGroupName, accountName, shareName).toBlocking().single().body(); + } + + /** + * Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @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, String shareName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, shareName), serviceCallback); + } + + /** + * Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileShareInner object + */ + public Observable createAsync(String resourceGroupName, String accountName, String shareName) { + return createWithServiceResponseAsync(resourceGroupName, accountName, shareName).map(new Func1, FileShareInner>() { + @Override + public FileShareInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileShareInner object + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName) { + 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 (shareName == null) { + throw new IllegalArgumentException("Parameter shareName 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 Map metadata = null; + final Integer shareQuota = null; + FileShareInner fileShare = new FileShareInner(); + fileShare.withMetadata(null); + fileShare.withShareQuota(null); + return service.create(resourceGroupName, accountName, shareName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), fileShare, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param metadata A name-value pair to associate with the share as metadata. + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 FileShareInner object if successful. + */ + public FileShareInner create(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota) { + return createWithServiceResponseAsync(resourceGroupName, accountName, shareName, metadata, shareQuota).toBlocking().single().body(); + } + + /** + * Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param metadata A name-value pair to associate with the share as metadata. + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @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, String shareName, Map metadata, Integer shareQuota, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, shareName, metadata, shareQuota), serviceCallback); + } + + /** + * Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param metadata A name-value pair to associate with the share as metadata. + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileShareInner object + */ + public Observable createAsync(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota) { + return createWithServiceResponseAsync(resourceGroupName, accountName, shareName, metadata, shareQuota).map(new Func1, FileShareInner>() { + @Override + public FileShareInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param metadata A name-value pair to associate with the share as metadata. + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileShareInner object + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota) { + 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 (shareName == null) { + throw new IllegalArgumentException("Parameter shareName 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."); + } + Validator.validate(metadata); + FileShareInner fileShare = new FileShareInner(); + fileShare.withMetadata(metadata); + fileShare.withShareQuota(shareQuota); + return service.create(resourceGroupName, accountName, shareName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), fileShare, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 FileShareInner object if successful. + */ + public FileShareInner update(String resourceGroupName, String accountName, String shareName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, shareName).toBlocking().single().body(); + } + + /** + * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @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 shareName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, shareName), serviceCallback); + } + + /** + * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileShareInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String shareName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, shareName).map(new Func1, FileShareInner>() { + @Override + public FileShareInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileShareInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName) { + 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 (shareName == null) { + throw new IllegalArgumentException("Parameter shareName 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 Map metadata = null; + final Integer shareQuota = null; + FileShareInner fileShare = new FileShareInner(); + fileShare.withMetadata(null); + fileShare.withShareQuota(null); + return service.update(resourceGroupName, accountName, shareName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), fileShare, 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 share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param metadata A name-value pair to associate with the share as metadata. + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 FileShareInner object if successful. + */ + public FileShareInner update(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, shareName, metadata, shareQuota).toBlocking().single().body(); + } + + /** + * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param metadata A name-value pair to associate with the share as metadata. + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @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 shareName, Map metadata, Integer shareQuota, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, shareName, metadata, shareQuota), serviceCallback); + } + + /** + * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param metadata A name-value pair to associate with the share as metadata. + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileShareInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, shareName, metadata, shareQuota).map(new Func1, FileShareInner>() { + @Override + public FileShareInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @param metadata A name-value pair to associate with the share as metadata. + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileShareInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota) { + 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 (shareName == null) { + throw new IllegalArgumentException("Parameter shareName 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."); + } + Validator.validate(metadata); + FileShareInner fileShare = new FileShareInner(); + fileShare.withMetadata(metadata); + fileShare.withShareQuota(shareQuota); + return service.update(resourceGroupName, accountName, shareName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), fileShare, 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); + } + + /** + * Gets properties of a specified share. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 FileShareInner object if successful. + */ + public FileShareInner get(String resourceGroupName, String accountName, String shareName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, shareName).toBlocking().single().body(); + } + + /** + * Gets properties of a specified share. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @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 shareName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, shareName), serviceCallback); + } + + /** + * Gets properties of a specified share. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileShareInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String shareName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, shareName).map(new Func1, FileShareInner>() { + @Override + public FileShareInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets properties of a specified share. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileShareInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName) { + 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 (shareName == null) { + throw new IllegalArgumentException("Parameter shareName 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.get(resourceGroupName, accountName, shareName, 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 = 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); + } + + /** + * Deletes specified share under its account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 shareName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, shareName).toBlocking().single().body(); + } + + /** + * Deletes specified share under its account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @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 shareName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, shareName), serviceCallback); + } + + /** + * Deletes specified share under its account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String shareName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, shareName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes specified share under its account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName) { + 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 (shareName == null) { + throw new IllegalArgumentException("Parameter shareName 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.delete(resourceGroupName, accountName, shareName, 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 = 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 all shares. + * + * @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<FileShareItemInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all shares. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all shares. + * + * @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<FileShareItemInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all shares. + * + * @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<FileShareItemInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all shares. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FileShareItemInner> 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/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/IdParsingUtils.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/IdParsingUtils.java new file mode 100644 index 000000000000..0940ce0e20ef --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_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.storage.v2019_06_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/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyImpl.java new file mode 100644 index 000000000000..3511e77ce5a0 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyImpl.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.ImmutabilityPolicy; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.ImmutabilityPolicyState; + +class ImmutabilityPolicyImpl extends CreatableUpdatableImpl implements ImmutabilityPolicy, ImmutabilityPolicy.Definition, ImmutabilityPolicy.Update { + private final StorageManager manager; + private String resourceGroupName; + private String accountName; + private String containerName; + private String cifMatch; + private int cimmutabilityPeriodSinceCreationInDays; + private String uifMatch; + private int uimmutabilityPeriodSinceCreationInDays; + + ImmutabilityPolicyImpl(String name, StorageManager manager) { + super(name, new ImmutabilityPolicyInner()); + this.manager = manager; + // Set resource name + this.containerName = name; + // + } + + ImmutabilityPolicyImpl(ImmutabilityPolicyInner inner, StorageManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.containerName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "storageAccounts"); + this.containerName = IdParsingUtils.getValueFromIdByName(inner.id(), "containers"); + // + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + BlobContainersInner client = this.manager().inner().blobContainers(); + return client.createOrUpdateImmutabilityPolicyAsync(this.resourceGroupName, this.accountName, this.containerName, this.cimmutabilityPeriodSinceCreationInDays, this.cifMatch) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + BlobContainersInner client = this.manager().inner().blobContainers(); + return client.createOrUpdateImmutabilityPolicyAsync(this.resourceGroupName, this.accountName, this.containerName, this.uimmutabilityPeriodSinceCreationInDays, this.uifMatch) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + BlobContainersInner client = this.manager().inner().blobContainers(); + return client.getImmutabilityPolicyAsync(this.resourceGroupName, this.accountName, this.containerName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public int immutabilityPeriodSinceCreationInDays() { + return this.inner().immutabilityPeriodSinceCreationInDays(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ImmutabilityPolicyState state() { + return this.inner().state(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ImmutabilityPolicyImpl withExistingContainer(String resourceGroupName, String accountName, String containerName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.containerName = containerName; + return this; + } + + @Override + public ImmutabilityPolicyImpl withIfMatch(String ifMatch) { + if (isInCreateMode()) { + this.cifMatch = ifMatch; + } else { + this.uifMatch = ifMatch; + } + return this; + } + + @Override + public ImmutabilityPolicyImpl withImmutabilityPeriodSinceCreationInDays(int immutabilityPeriodSinceCreationInDays) { + if (isInCreateMode()) { + this.cimmutabilityPeriodSinceCreationInDays = immutabilityPeriodSinceCreationInDays; + } else { + this.uimmutabilityPeriodSinceCreationInDays = immutabilityPeriodSinceCreationInDays; + } + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyInner.java new file mode 100644 index 000000000000..9193455899ec --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyInner.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.ImmutabilityPolicyState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.storage.v2019_06_01.AzureEntityResource; + +/** + * The ImmutabilityPolicy property of a blob container, including Id, resource + * name, resource type, Etag. + */ +@JsonFlatten +public class ImmutabilityPolicyInner extends AzureEntityResource { + /** + * The immutability period for the blobs in the container since the policy + * creation, in days. + */ + @JsonProperty(value = "properties.immutabilityPeriodSinceCreationInDays", required = true) + private int immutabilityPeriodSinceCreationInDays; + + /** + * The ImmutabilityPolicy state of a blob container, possible values + * include: Locked and Unlocked. Possible values include: 'Locked', + * 'Unlocked'. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private ImmutabilityPolicyState state; + + /** + * Get the immutability period for the blobs in the container since the policy creation, in days. + * + * @return the immutabilityPeriodSinceCreationInDays value + */ + public int immutabilityPeriodSinceCreationInDays() { + return this.immutabilityPeriodSinceCreationInDays; + } + + /** + * Set the immutability period for the blobs in the container since the policy creation, in days. + * + * @param immutabilityPeriodSinceCreationInDays the immutabilityPeriodSinceCreationInDays value to set + * @return the ImmutabilityPolicyInner object itself. + */ + public ImmutabilityPolicyInner withImmutabilityPeriodSinceCreationInDays(int immutabilityPeriodSinceCreationInDays) { + this.immutabilityPeriodSinceCreationInDays = immutabilityPeriodSinceCreationInDays; + return this; + } + + /** + * Get the ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked'. + * + * @return the state value + */ + public ImmutabilityPolicyState state() { + return this.state; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LeaseContainerResponseImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LeaseContainerResponseImpl.java new file mode 100644 index 000000000000..e5fa3a92580d --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LeaseContainerResponseImpl.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.LeaseContainerResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class LeaseContainerResponseImpl extends WrapperImpl implements LeaseContainerResponse { + private final StorageManager manager; + LeaseContainerResponseImpl(LeaseContainerResponseInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public String leaseId() { + return this.inner().leaseId(); + } + + @Override + public String leaseTimeSeconds() { + return this.inner().leaseTimeSeconds(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LeaseContainerResponseInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LeaseContainerResponseInner.java new file mode 100644 index 000000000000..abb88bb6ec69 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LeaseContainerResponseInner.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.storage.v2019_06_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Lease Container response schema. + */ +public class LeaseContainerResponseInner { + /** + * Returned unique lease ID that must be included with any request to + * delete the container, or to renew, change, or release the lease. + */ + @JsonProperty(value = "leaseId") + private String leaseId; + + /** + * Approximate time remaining in the lease period, in seconds. + */ + @JsonProperty(value = "leaseTimeSeconds") + private String leaseTimeSeconds; + + /** + * Get returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release the lease. + * + * @return the leaseId value + */ + public String leaseId() { + return this.leaseId; + } + + /** + * Set returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release the lease. + * + * @param leaseId the leaseId value to set + * @return the LeaseContainerResponseInner object itself. + */ + public LeaseContainerResponseInner withLeaseId(String leaseId) { + this.leaseId = leaseId; + return this; + } + + /** + * Get approximate time remaining in the lease period, in seconds. + * + * @return the leaseTimeSeconds value + */ + public String leaseTimeSeconds() { + return this.leaseTimeSeconds; + } + + /** + * Set approximate time remaining in the lease period, in seconds. + * + * @param leaseTimeSeconds the leaseTimeSeconds value to set + * @return the LeaseContainerResponseInner object itself. + */ + public LeaseContainerResponseInner withLeaseTimeSeconds(String leaseTimeSeconds) { + this.leaseTimeSeconds = leaseTimeSeconds; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LegalHoldImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LegalHoldImpl.java new file mode 100644 index 000000000000..0b2cb85de34e --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LegalHoldImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.LegalHold; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class LegalHoldImpl extends WrapperImpl implements LegalHold { + private final StorageManager manager; + LegalHoldImpl(LegalHoldInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public Boolean hasLegalHold() { + return this.inner().hasLegalHold(); + } + + @Override + public List tags() { + return this.inner().tags(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LegalHoldInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LegalHoldInner.java new file mode 100644 index 000000000000..c66d8befc2c8 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/LegalHoldInner.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_06_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The LegalHold property of a blob container. + */ +public class LegalHoldInner { + /** + * The hasLegalHold public property is set to true by SRP if there are at + * least one existing tag. The hasLegalHold public property is set to false + * by SRP if all existing legal hold tags are cleared out. There can be a + * maximum of 1000 blob containers with hasLegalHold=true for a given + * account. + */ + @JsonProperty(value = "hasLegalHold", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasLegalHold; + + /** + * Each tag should be 3 to 23 alphanumeric characters and is normalized to + * lower case at SRP. + */ + @JsonProperty(value = "tags", required = true) + private List tags; + + /** + * Get the hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. + * + * @return the hasLegalHold value + */ + public Boolean hasLegalHold() { + return this.hasLegalHold; + } + + /** + * Get each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. + * + * @return the tags value + */ + public List tags() { + return this.tags; + } + + /** + * Set each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. + * + * @param tags the tags value to set + * @return the LegalHoldInner object itself. + */ + public LegalHoldInner withTags(List tags) { + this.tags = tags; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListAccountSasResponseImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListAccountSasResponseImpl.java new file mode 100644 index 000000000000..875fe3b8f480 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListAccountSasResponseImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.ListAccountSasResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class ListAccountSasResponseImpl extends WrapperImpl implements ListAccountSasResponse { + private final StorageManager manager; + ListAccountSasResponseImpl(ListAccountSasResponseInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public String accountSasToken() { + return this.inner().accountSasToken(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListAccountSasResponseInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListAccountSasResponseInner.java new file mode 100644 index 000000000000..211c72cc0efa --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListAccountSasResponseInner.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.storage.v2019_06_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The List SAS credentials operation response. + */ +public class ListAccountSasResponseInner { + /** + * List SAS credentials of storage account. + */ + @JsonProperty(value = "accountSasToken", access = JsonProperty.Access.WRITE_ONLY) + private String accountSasToken; + + /** + * Get list SAS credentials of storage account. + * + * @return the accountSasToken value + */ + public String accountSasToken() { + return this.accountSasToken; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListContainerItemImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListContainerItemImpl.java new file mode 100644 index 000000000000..52ec010ebc5d --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListContainerItemImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.ListContainerItem; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_06_01.ImmutabilityPolicyProperties; +import org.joda.time.DateTime; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseDuration; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseState; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseStatus; +import com.microsoft.azure.management.storage.v2019_06_01.LegalHoldProperties; +import java.util.Map; +import com.microsoft.azure.management.storage.v2019_06_01.PublicAccess; + +class ListContainerItemImpl extends WrapperImpl implements ListContainerItem { + private final StorageManager manager; + ListContainerItemImpl(ListContainerItemInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public Boolean hasImmutabilityPolicy() { + return this.inner().hasImmutabilityPolicy(); + } + + @Override + public Boolean hasLegalHold() { + return this.inner().hasLegalHold(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public ImmutabilityPolicyProperties immutabilityPolicy() { + return this.inner().immutabilityPolicy(); + } + + @Override + public DateTime lastModifiedTime() { + return this.inner().lastModifiedTime(); + } + + @Override + public LeaseDuration leaseDuration() { + return this.inner().leaseDuration(); + } + + @Override + public LeaseState leaseState() { + return this.inner().leaseState(); + } + + @Override + public LeaseStatus leaseStatus() { + return this.inner().leaseStatus(); + } + + @Override + public LegalHoldProperties legalHold() { + return this.inner().legalHold(); + } + + @Override + public Map metadata() { + return this.inner().metadata(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public PublicAccess publicAccess() { + return this.inner().publicAccess(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListContainerItemInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListContainerItemInner.java new file mode 100644 index 000000000000..13f7ee097860 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListContainerItemInner.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.PublicAccess; +import org.joda.time.DateTime; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseStatus; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseState; +import com.microsoft.azure.management.storage.v2019_06_01.LeaseDuration; +import java.util.Map; +import com.microsoft.azure.management.storage.v2019_06_01.ImmutabilityPolicyProperties; +import com.microsoft.azure.management.storage.v2019_06_01.LegalHoldProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.storage.v2019_06_01.AzureEntityResource; + +/** + * The blob container properties be listed out. + */ +@JsonFlatten +public class ListContainerItemInner extends AzureEntityResource { + /** + * Specifies whether data in the container may be accessed publicly and the + * level of access. Possible values include: 'Container', 'Blob', 'None'. + */ + @JsonProperty(value = "properties.publicAccess") + private PublicAccess publicAccess; + + /** + * Returns the date and time the container was last modified. + */ + @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * The lease status of the container. Possible values include: 'Locked', + * 'Unlocked'. + */ + @JsonProperty(value = "properties.leaseStatus", access = JsonProperty.Access.WRITE_ONLY) + private LeaseStatus leaseStatus; + + /** + * Lease state of the container. Possible values include: 'Available', + * 'Leased', 'Expired', 'Breaking', 'Broken'. + */ + @JsonProperty(value = "properties.leaseState", access = JsonProperty.Access.WRITE_ONLY) + private LeaseState leaseState; + + /** + * Specifies whether the lease on a container is of infinite or fixed + * duration, only when the container is leased. Possible values include: + * 'Infinite', 'Fixed'. + */ + @JsonProperty(value = "properties.leaseDuration", access = JsonProperty.Access.WRITE_ONLY) + private LeaseDuration leaseDuration; + + /** + * A name-value pair to associate with the container as metadata. + */ + @JsonProperty(value = "properties.metadata") + private Map metadata; + + /** + * The ImmutabilityPolicy property of the container. + */ + @JsonProperty(value = "properties.immutabilityPolicy", access = JsonProperty.Access.WRITE_ONLY) + private ImmutabilityPolicyProperties immutabilityPolicy; + + /** + * The LegalHold property of the container. + */ + @JsonProperty(value = "properties.legalHold", access = JsonProperty.Access.WRITE_ONLY) + private LegalHoldProperties legalHold; + + /** + * The hasLegalHold public property is set to true by SRP if there are at + * least one existing tag. The hasLegalHold public property is set to false + * by SRP if all existing legal hold tags are cleared out. There can be a + * maximum of 1000 blob containers with hasLegalHold=true for a given + * account. + */ + @JsonProperty(value = "properties.hasLegalHold", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasLegalHold; + + /** + * The hasImmutabilityPolicy public property is set to true by SRP if + * ImmutabilityPolicy has been created for this container. The + * hasImmutabilityPolicy public property is set to false by SRP if + * ImmutabilityPolicy has not been created for this container. + */ + @JsonProperty(value = "properties.hasImmutabilityPolicy", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasImmutabilityPolicy; + + /** + * Get specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'. + * + * @return the publicAccess value + */ + public PublicAccess publicAccess() { + return this.publicAccess; + } + + /** + * Set specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'. + * + * @param publicAccess the publicAccess value to set + * @return the ListContainerItemInner object itself. + */ + public ListContainerItemInner withPublicAccess(PublicAccess publicAccess) { + this.publicAccess = publicAccess; + return this; + } + + /** + * Get returns the date and time the container was last modified. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get the lease status of the container. Possible values include: 'Locked', 'Unlocked'. + * + * @return the leaseStatus value + */ + public LeaseStatus leaseStatus() { + return this.leaseStatus; + } + + /** + * Get lease state of the container. Possible values include: 'Available', 'Leased', 'Expired', 'Breaking', 'Broken'. + * + * @return the leaseState value + */ + public LeaseState leaseState() { + return this.leaseState; + } + + /** + * Get specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased. Possible values include: 'Infinite', 'Fixed'. + * + * @return the leaseDuration value + */ + public LeaseDuration leaseDuration() { + return this.leaseDuration; + } + + /** + * Get a name-value pair to associate with the container as metadata. + * + * @return the metadata value + */ + public Map metadata() { + return this.metadata; + } + + /** + * Set a name-value pair to associate with the container as metadata. + * + * @param metadata the metadata value to set + * @return the ListContainerItemInner object itself. + */ + public ListContainerItemInner withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the ImmutabilityPolicy property of the container. + * + * @return the immutabilityPolicy value + */ + public ImmutabilityPolicyProperties immutabilityPolicy() { + return this.immutabilityPolicy; + } + + /** + * Get the LegalHold property of the container. + * + * @return the legalHold value + */ + public LegalHoldProperties legalHold() { + return this.legalHold; + } + + /** + * Get the hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. + * + * @return the hasLegalHold value + */ + public Boolean hasLegalHold() { + return this.hasLegalHold; + } + + /** + * Get the hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container. + * + * @return the hasImmutabilityPolicy value + */ + public Boolean hasImmutabilityPolicy() { + return this.hasImmutabilityPolicy; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListServiceSasResponseImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListServiceSasResponseImpl.java new file mode 100644 index 000000000000..f25bb8e45e8e --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListServiceSasResponseImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.ListServiceSasResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class ListServiceSasResponseImpl extends WrapperImpl implements ListServiceSasResponse { + private final StorageManager manager; + ListServiceSasResponseImpl(ListServiceSasResponseInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public String serviceSasToken() { + return this.inner().serviceSasToken(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListServiceSasResponseInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListServiceSasResponseInner.java new file mode 100644 index 000000000000..74c2c8a3c18f --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ListServiceSasResponseInner.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.storage.v2019_06_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The List service SAS credentials operation response. + */ +public class ListServiceSasResponseInner { + /** + * List service SAS credentials of specific resource. + */ + @JsonProperty(value = "serviceSasToken", access = JsonProperty.Access.WRITE_ONLY) + private String serviceSasToken; + + /** + * Get list service SAS credentials of specific resource. + * + * @return the serviceSasToken value + */ + public String serviceSasToken() { + return this.serviceSasToken; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPoliciesImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPoliciesImpl.java new file mode 100644 index 000000000000..df54a7d628dd --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPoliciesImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_06_01.ManagementPolicies; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.storage.v2019_06_01.ManagementPolicy; + +class ManagementPoliciesImpl extends WrapperImpl implements ManagementPolicies { + private final StorageManager manager; + + ManagementPoliciesImpl(StorageManager manager) { + super(manager.inner().managementPolicies()); + this.manager = manager; + } + + public StorageManager manager() { + return this.manager; + } + + @Override + public ManagementPolicyImpl define(String name) { + return wrapModel(name); + } + + private ManagementPolicyImpl wrapModel(ManagementPolicyInner inner) { + return new ManagementPolicyImpl(inner, manager()); + } + + private ManagementPolicyImpl wrapModel(String name) { + return new ManagementPolicyImpl(name, this.manager()); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName) { + ManagementPoliciesInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName) + .flatMap(new Func1>() { + @Override + public Observable call(ManagementPolicyInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ManagementPolicy)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName) { + ManagementPoliciesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName).toCompletable(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPoliciesInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPoliciesInner.java new file mode 100644 index 000000000000..bf6c9f2fd900 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPoliciesInner.java @@ -0,0 +1,345 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.storage.v2019_06_01.ManagementPolicySchema; +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 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.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ManagementPolicies. + */ +public class ManagementPoliciesInner implements InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private ManagementPoliciesService service; + /** The service client containing this operation class. */ + private StorageManagementClientImpl client; + + /** + * Initializes an instance of ManagementPoliciesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ManagementPoliciesInner(Retrofit retrofit, StorageManagementClientImpl client) { + this.service = retrofit.create(ManagementPoliciesService.class); + this.client = client; + } + + /** + * The interface defining all the services for ManagementPolicies to be + * used by Retrofit to perform actually REST calls. + */ + interface ManagementPoliciesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.ManagementPolicies get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("managementPolicyName") String managementPolicyName, @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.storage.v2019_06_01.ManagementPolicies createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("managementPolicyName") String managementPolicyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ManagementPolicyInner properties, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.ManagementPolicies delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("managementPolicyName") String managementPolicyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the managementpolicy associated with the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ManagementPolicyInner object if successful. + */ + public ManagementPolicyInner get(String resourceGroupName, String accountName) { + return getWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Gets the managementpolicy associated with the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Gets the managementpolicy associated with the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ManagementPolicyInner object + */ + public Observable getAsync(String resourceGroupName, String accountName) { + return getWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, ManagementPolicyInner>() { + @Override + public ManagementPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the managementpolicy associated with the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ManagementPolicyInner object + */ + public Observable> getWithServiceResponseAsync(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."); + } + final String managementPolicyName = "default"; + return service.get(resourceGroupName, accountName, this.client.subscriptionId(), managementPolicyName, 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); + } + + /** + * Sets the managementpolicy to the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param policy The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ManagementPolicyInner object if successful. + */ + public ManagementPolicyInner createOrUpdate(String resourceGroupName, String accountName, ManagementPolicySchema policy) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, policy).toBlocking().single().body(); + } + + /** + * Sets the managementpolicy to the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param policy The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + * @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, ManagementPolicySchema policy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, policy), serviceCallback); + } + + /** + * Sets the managementpolicy to the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param policy The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ManagementPolicyInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String accountName, ManagementPolicySchema policy) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, policy).map(new Func1, ManagementPolicyInner>() { + @Override + public ManagementPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Sets the managementpolicy to the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param policy The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ManagementPolicyInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName, ManagementPolicySchema policy) { + 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."); + } + if (policy == null) { + throw new IllegalArgumentException("Parameter policy is required and cannot be null."); + } + Validator.validate(policy); + final String managementPolicyName = "default"; + ManagementPolicyInner properties = new ManagementPolicyInner(); + properties.withPolicy(policy); + return service.createOrUpdate(resourceGroupName, accountName, this.client.subscriptionId(), managementPolicyName, this.client.apiVersion(), this.client.acceptLanguage(), properties, 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); + } + + /** + * Deletes the managementpolicy associated with the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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().single().body(); + } + + /** + * Deletes the managementpolicy associated with the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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 managementpolicy associated with the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 managementpolicy associated with the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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."); + } + final String managementPolicyName = "default"; + return service.delete(resourceGroupName, accountName, this.client.subscriptionId(), managementPolicyName, 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); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPolicyImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPolicyImpl.java new file mode 100644 index 000000000000..9bc4284fa5a0 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPolicyImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.ManagementPolicy; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.ManagementPolicySchema; +import java.util.List; +import org.joda.time.DateTime; +import rx.functions.Func1; + +class ManagementPolicyImpl extends CreatableUpdatableImpl implements ManagementPolicy, ManagementPolicy.Definition, ManagementPolicy.Update { + private final StorageManager manager; + private String resourceGroupName; + private String accountName; + private ManagementPolicySchema cpolicy; + private ManagementPolicySchema upolicy; + + ManagementPolicyImpl(String name, StorageManager manager) { + super(name, new ManagementPolicyInner()); + this.manager = manager; + // Set resource name + this.accountName = name; + // + this.cpolicy = new ManagementPolicySchema(); + this.upolicy = new ManagementPolicySchema(); + } + + ManagementPolicyImpl(ManagementPolicyInner inner, StorageManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.accountName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "storageAccounts"); + // + this.cpolicy = new ManagementPolicySchema(); + this.upolicy = new ManagementPolicySchema(); + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ManagementPoliciesInner client = this.manager().inner().managementPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName, this.accountName, this.cpolicy) + .map(new Func1() { + @Override + public ManagementPolicyInner call(ManagementPolicyInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ManagementPoliciesInner client = this.manager().inner().managementPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName, this.accountName, this.upolicy) + .map(new Func1() { + @Override + public ManagementPolicyInner call(ManagementPolicyInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ManagementPoliciesInner client = this.manager().inner().managementPolicies(); + return client.getAsync(this.resourceGroupName, this.accountName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.cpolicy = new ManagementPolicySchema(); + this.upolicy = new ManagementPolicySchema(); + } + + @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 ManagementPolicySchema policy() { + return this.inner().policy(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ManagementPolicyImpl withExistingStorageAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public ManagementPolicyImpl withPolicy(ManagementPolicySchema policy) { + if (isInCreateMode()) { + this.cpolicy = policy; + } else { + this.upolicy = policy; + } + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPolicyInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPolicyInner.java new file mode 100644 index 000000000000..745760e2efbd --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ManagementPolicyInner.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.storage.v2019_06_01.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.storage.v2019_06_01.ManagementPolicySchema; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * The Get Storage Account ManagementPolicies operation response. + */ +@JsonFlatten +public class ManagementPolicyInner extends ProxyResource { + /** + * Returns the date and time the ManagementPolicies was last modified. + */ + @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * The Storage Account ManagementPolicy, in JSON format. See more details + * in: + * https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + */ + @JsonProperty(value = "properties.policy", required = true) + private ManagementPolicySchema policy; + + /** + * Get returns the date and time the ManagementPolicies was last modified. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get the Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + * + * @return the policy value + */ + public ManagementPolicySchema policy() { + return this.policy; + } + + /** + * Set the Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + * + * @param policy the policy value to set + * @return the ManagementPolicyInner object itself. + */ + public ManagementPolicyInner withPolicy(ManagementPolicySchema policy) { + this.policy = policy; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationImpl.java new file mode 100644 index 000000000000..905cff2707d6 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.Operation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_06_01.OperationDisplay; +import com.microsoft.azure.management.storage.v2019_06_01.ServiceSpecification; + +class OperationImpl extends WrapperImpl implements Operation { + private final StorageManager manager; + OperationImpl(OperationInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public OperationDisplay display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String origin() { + return this.inner().origin(); + } + + @Override + public ServiceSpecification serviceSpecification() { + return this.inner().serviceSpecification(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationInner.java new file mode 100644 index 000000000000..13b42d48d7d1 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationInner.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.OperationDisplay; +import com.microsoft.azure.management.storage.v2019_06_01.ServiceSpecification; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Storage REST API operation definition. + */ +@JsonFlatten +public class OperationInner { + /** + * Operation name: {provider}/{resource}/{operation}. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Display metadata associated with the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * The origin of operations. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * One property of operation, include metric specifications. + */ + @JsonProperty(value = "properties.serviceSpecification") + private ServiceSpecification serviceSpecification; + + /** + * Get operation name: {provider}/{resource}/{operation}. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set operation name: {provider}/{resource}/{operation}. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get display metadata associated with the operation. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set display metadata associated with 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 origin of operations. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set the origin of operations. + * + * @param origin the origin value to set + * @return the OperationInner object itself. + */ + public OperationInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get one property of operation, include metric specifications. + * + * @return the serviceSpecification value + */ + public ServiceSpecification serviceSpecification() { + return this.serviceSpecification; + } + + /** + * Set one property of operation, include metric specifications. + * + * @param serviceSpecification the serviceSpecification value to set + * @return the OperationInner object itself. + */ + public OperationInner withServiceSpecification(ServiceSpecification serviceSpecification) { + this.serviceSpecification = serviceSpecification; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationsImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationsImpl.java new file mode 100644 index 000000000000..9d8e1eaf704a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationsImpl.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. + * abc + */ + +package com.microsoft.azure.management.storage.v2019_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_06_01.Operations; +import rx.functions.Func1; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.storage.v2019_06_01.Operation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final StorageManager manager; + + OperationsImpl(StorageManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public StorageManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public Operation call(OperationInner inner) { + return new OperationImpl(inner, manager()); + } + }); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationsInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationsInner.java new file mode 100644 index 000000000000..c6c81779c343 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/OperationsInner.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_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 java.util.List; +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 StorageManagementClientImpl 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, StorageManagementClientImpl 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.storage.v2019_06_01.Operations list" }) + @GET("providers/Microsoft.Storage/operations") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available Storage 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 List<OperationInner> object if successful. + */ + public List list() { + return listWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists all of the available Storage 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 Storage Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<OperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available Storage Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<OperationInner> 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> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.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()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PageImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PageImpl.java new file mode 100644 index 000000000000..dca1704665a2 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_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.storage.v2019_06_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("") + 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/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PageImpl1.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PageImpl1.java new file mode 100644 index 000000000000..5aaa2d676351 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PageImpl1.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.storage.v2019_06_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 PageImpl1 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 PageImpl1 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 PageImpl1 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 000000000000..ccccd2c40bc6 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionImpl.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.PrivateEndpointConnection; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.PrivateEndpoint; +import com.microsoft.azure.management.storage.v2019_06_01.PrivateLinkServiceConnectionState; +import com.microsoft.azure.management.storage.v2019_06_01.PrivateEndpointConnectionProvisioningState; + +class PrivateEndpointConnectionImpl extends CreatableUpdatableImpl implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update { + private final StorageManager manager; + private String resourceGroupName; + private String accountName; + private String privateEndpointConnectionName; + + PrivateEndpointConnectionImpl(String name, StorageManager manager) { + super(name, new PrivateEndpointConnectionInner()); + this.manager = manager; + // Set resource name + this.privateEndpointConnectionName = name; + // + } + + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner inner, StorageManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.privateEndpointConnectionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "storageAccounts"); + this.privateEndpointConnectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "privateEndpointConnections"); + // + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + PrivateEndpointConnectionsInner client = this.manager().inner().privateEndpointConnections(); + return client.putAsync(this.resourceGroupName, this.accountName, this.privateEndpointConnectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + PrivateEndpointConnectionsInner client = this.manager().inner().privateEndpointConnections(); + return client.putAsync(this.resourceGroupName, this.accountName, this.privateEndpointConnectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PrivateEndpointConnectionsInner client = this.manager().inner().privateEndpointConnections(); + return client.getAsync(this.resourceGroupName, this.accountName, this.privateEndpointConnectionName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public PrivateEndpoint privateEndpoint() { + return this.inner().privateEndpoint(); + } + + @Override + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.inner().privateLinkServiceConnectionState(); + } + + @Override + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public PrivateEndpointConnectionImpl withExistingStorageAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.inner().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + @Override + public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.inner().withPrivateEndpoint(privateEndpoint); + return this; + } + + @Override + public PrivateEndpointConnectionImpl withProvisioningState(PrivateEndpointConnectionProvisioningState provisioningState) { + this.inner().withProvisioningState(provisioningState); + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionInner.java new file mode 100644 index 000000000000..2ea891196590 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionInner.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.PrivateEndpoint; +import com.microsoft.azure.management.storage.v2019_06_01.PrivateLinkServiceConnectionState; +import com.microsoft.azure.management.storage.v2019_06_01.PrivateEndpointConnectionProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * The Private Endpoint Connection resource. + */ +@JsonFlatten +public class PrivateEndpointConnectionInner extends ProxyResource { + /** + * The resource of private end point. + */ + @JsonProperty(value = "properties.privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /** + * A collection of information about the state of the connection between + * service consumer and provider. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState", required = true) + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /** + * The provisioning state of the private endpoint connection resource. + * Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState") + private PrivateEndpointConnectionProvisioningState provisioningState; + + /** + * Get the resource of private end point. + * + * @return the privateEndpoint value + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get a collection of information about the state of the connection between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set a collection of information about the state of the connection between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed'. + * + * @param provisioningState the provisioningState value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withProvisioningState(PrivateEndpointConnectionProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionsImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionsImpl.java new file mode 100644 index 000000000000..4820ca83aad2 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionsImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_06_01.PrivateEndpointConnections; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.storage.v2019_06_01.PrivateEndpointConnection; + +class PrivateEndpointConnectionsImpl extends WrapperImpl implements PrivateEndpointConnections { + private final StorageManager manager; + + PrivateEndpointConnectionsImpl(StorageManager manager) { + super(manager.inner().privateEndpointConnections()); + this.manager = manager; + } + + public StorageManager manager() { + return this.manager; + } + + @Override + public PrivateEndpointConnectionImpl define(String name) { + return wrapModel(name); + } + + private PrivateEndpointConnectionImpl wrapModel(PrivateEndpointConnectionInner inner) { + return new PrivateEndpointConnectionImpl(inner, manager()); + } + + private PrivateEndpointConnectionImpl wrapModel(String name) { + return new PrivateEndpointConnectionImpl(name, this.manager()); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) { + PrivateEndpointConnectionsInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, privateEndpointConnectionName) + .flatMap(new Func1>() { + @Override + public Observable call(PrivateEndpointConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((PrivateEndpointConnection)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) { + PrivateEndpointConnectionsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, privateEndpointConnectionName).toCompletable(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionsInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionsInner.java new file mode 100644 index 000000000000..2807334b1d1a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateEndpointConnectionsInner.java @@ -0,0 +1,359 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.storage.v2019_06_01.ErrorResponseException; +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 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.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PrivateEndpointConnections. + */ +public class PrivateEndpointConnectionsInner { + /** The Retrofit service to perform REST calls. */ + private PrivateEndpointConnectionsService service; + /** The service client containing this operation class. */ + private StorageManagementClientImpl client; + + /** + * Initializes an instance of PrivateEndpointConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PrivateEndpointConnectionsInner(Retrofit retrofit, StorageManagementClientImpl client) { + this.service = retrofit.create(PrivateEndpointConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for PrivateEndpointConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface PrivateEndpointConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.PrivateEndpointConnections get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @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.storage.v2019_06_01.PrivateEndpointConnections put" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") + Observable> put(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Query("api-version") String apiVersion, @Body PrivateEndpointConnectionInner properties, @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.storage.v2019_06_01.PrivateEndpointConnections delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Storage Account + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String privateEndpointConnectionName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName).toBlocking().single().body(); + } + + /** + * Gets the specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the 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 getAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName), serviceCallback); + } + + /** + * Gets the specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Storage Account + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Storage Account + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) { + 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 (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName 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(resourceGroupName, accountName, this.client.subscriptionId(), privateEndpointConnectionName, 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Update the state of specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Storage Account + * @param properties The private endpoint connection properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner put(String resourceGroupName, String accountName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { + return putWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName, properties).toBlocking().single().body(); + } + + /** + * Update the state of specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Storage Account + * @param properties The private endpoint connection properties. + * @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 putAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(putWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName, properties), serviceCallback); + } + + /** + * Update the state of specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Storage Account + * @param properties The private endpoint connection properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable putAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { + return putWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName, properties).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update the state of specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Storage Account + * @param properties The private endpoint connection properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable> putWithServiceResponseAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { + 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 (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + return service.put(resourceGroupName, accountName, this.client.subscriptionId(), privateEndpointConnectionName, this.client.apiVersion(), properties, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = putDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse putDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes the specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Storage Account + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException 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 privateEndpointConnectionName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName).toBlocking().single().body(); + } + + /** + * Deletes the specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the 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 deleteAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName), serviceCallback); + } + + /** + * Deletes the specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Storage Account + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified private endpoint connection associated with the storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Storage Account + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) { + 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 (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName 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(resourceGroupName, accountName, this.client.subscriptionId(), privateEndpointConnectionName, 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourceInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourceInner.java new file mode 100644 index 000000000000..d2bcc030fa72 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourceInner.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.storage.v2019_06_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * A private link resource. + */ +@JsonFlatten +public class PrivateLinkResourceInner extends ProxyResource { + /** + * The private link resource group id. + */ + @JsonProperty(value = "properties.groupId", access = JsonProperty.Access.WRITE_ONLY) + private String groupId; + + /** + * The private link resource required member names. + */ + @JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY) + private List requiredMembers; + + /** + * The private link resource Private link DNS zone name. + */ + @JsonProperty(value = "properties.requiredZoneNames") + private List requiredZoneNames; + + /** + * Get the private link resource group id. + * + * @return the groupId value + */ + public String groupId() { + return this.groupId; + } + + /** + * Get the private link resource required member names. + * + * @return the requiredMembers value + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get the private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * Set the private link resource Private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { + this.requiredZoneNames = requiredZoneNames; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourceListResultImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourceListResultImpl.java new file mode 100644 index 000000000000..b5a18fddeced --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourceListResultImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.PrivateLinkResourceListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class PrivateLinkResourceListResultImpl extends WrapperImpl implements PrivateLinkResourceListResult { + private final StorageManager manager; + PrivateLinkResourceListResultImpl(PrivateLinkResourceListResultInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourceListResultInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourceListResultInner.java new file mode 100644 index 000000000000..d9bd2577d785 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourceListResultInner.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.storage.v2019_06_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A list of private link resources. + */ +public class PrivateLinkResourceListResultInner { + /** + * Array of private link resources. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get array of private link resources. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set array of private link resources. + * + * @param value the value value to set + * @return the PrivateLinkResourceListResultInner object itself. + */ + public PrivateLinkResourceListResultInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourcesImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourcesImpl.java new file mode 100644 index 000000000000..20a94c2c42c5 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourcesImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_06_01.PrivateLinkResources; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.PrivateLinkResourceListResult; + +class PrivateLinkResourcesImpl extends WrapperImpl implements PrivateLinkResources { + private final StorageManager manager; + + PrivateLinkResourcesImpl(StorageManager manager) { + super(manager.inner().privateLinkResources()); + this.manager = manager; + } + + public StorageManager manager() { + return this.manager; + } + + @Override + public Observable listByStorageAccountAsync(String resourceGroupName, String accountName) { + PrivateLinkResourcesInner client = this.inner(); + return client.listByStorageAccountAsync(resourceGroupName, accountName) + .map(new Func1() { + @Override + public PrivateLinkResourceListResult call(PrivateLinkResourceListResultInner inner) { + return new PrivateLinkResourceListResultImpl(inner, manager()); + } + }); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourcesInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourcesInner.java new file mode 100644 index 000000000000..384c6cfc04b0 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/PrivateLinkResourcesInner.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.storage.v2019_06_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 PrivateLinkResources. + */ +public class PrivateLinkResourcesInner { + /** The Retrofit service to perform REST calls. */ + private PrivateLinkResourcesService service; + /** The service client containing this operation class. */ + private StorageManagementClientImpl client; + + /** + * Initializes an instance of PrivateLinkResourcesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PrivateLinkResourcesInner(Retrofit retrofit, StorageManagementClientImpl client) { + this.service = retrofit.create(PrivateLinkResourcesService.class); + this.client = client; + } + + /** + * The interface defining all the services for PrivateLinkResources to be + * used by Retrofit to perform actually REST calls. + */ + interface PrivateLinkResourcesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.PrivateLinkResources listByStorageAccount" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateLinkResources") + Observable> listByStorageAccount(@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); + + } + + /** + * Gets the private link resources that need to be created for a storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 PrivateLinkResourceListResultInner object if successful. + */ + public PrivateLinkResourceListResultInner listByStorageAccount(String resourceGroupName, String accountName) { + return listByStorageAccountWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Gets the private link resources that need to be created for a storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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 listByStorageAccountAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listByStorageAccountWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Gets the private link resources that need to be created for a storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkResourceListResultInner object + */ + public Observable listByStorageAccountAsync(String resourceGroupName, String accountName) { + return listByStorageAccountWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, PrivateLinkResourceListResultInner>() { + @Override + public PrivateLinkResourceListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the private link resources that need to be created for a storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkResourceListResultInner object + */ + public Observable> listByStorageAccountWithServiceResponseAsync(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.listByStorageAccount(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 = listByStorageAccountDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listByStorageAccountDelegate(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/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuImpl.java new file mode 100644 index 000000000000..2c4610786d2e --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.Sku; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.storage.v2019_06_01.SKUCapability; +import com.microsoft.azure.management.storage.v2019_06_01.Kind; +import com.microsoft.azure.management.storage.v2019_06_01.SkuName; +import com.microsoft.azure.management.storage.v2019_06_01.Restriction; +import com.microsoft.azure.management.storage.v2019_06_01.SkuTier; + +class SkuImpl extends WrapperImpl implements Sku { + private final StorageManager manager; + + SkuImpl(SkuInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + + + @Override + public List capabilities() { + return this.inner().capabilities(); + } + + @Override + public Kind kind() { + return this.inner().kind(); + } + + @Override + public List locations() { + return this.inner().locations(); + } + + @Override + public SkuName name() { + return this.inner().name(); + } + + @Override + public String resourceType() { + return this.inner().resourceType(); + } + + @Override + public List restrictions() { + return this.inner().restrictions(); + } + + @Override + public SkuTier tier() { + return this.inner().tier(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInner.java new file mode 100644 index 000000000000..16b3eb6451c2 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInner.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.SkuName; +import com.microsoft.azure.management.storage.v2019_06_01.SkuTier; +import com.microsoft.azure.management.storage.v2019_06_01.Kind; +import java.util.List; +import com.microsoft.azure.management.storage.v2019_06_01.SKUCapability; +import com.microsoft.azure.management.storage.v2019_06_01.Restriction; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SKU of the storage account. + */ +public class SkuInner { + /** + * Gets or sets the SKU name. Required for account creation; optional for + * update. Note that in older versions, SKU name was called accountType. + * Possible values include: 'Standard_LRS', 'Standard_GRS', + * 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', 'Premium_ZRS', + * 'Standard_GZRS', 'Standard_RAGZRS'. + */ + @JsonProperty(value = "name", required = true) + private SkuName name; + + /** + * Gets the SKU tier. This is based on the SKU name. Possible values + * include: 'Standard', 'Premium'. + */ + @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY) + private SkuTier tier; + + /** + * The type of the resource, usually it is 'storageAccounts'. + */ + @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) + private String resourceType; + + /** + * Indicates the type of storage account. Possible values include: + * 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', + * 'BlockBlobStorage'. + */ + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private Kind kind; + + /** + * The set of locations that the SKU is available. This will be supported + * and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, + * etc.). + */ + @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) + private List locations; + + /** + * The capability information in the specified SKU, including file + * encryption, network ACLs, change notification, etc. + */ + @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY) + private List capabilities; + + /** + * The restrictions because of which SKU cannot be used. This is empty if + * there are no restrictions. + */ + @JsonProperty(value = "restrictions") + private List restrictions; + + /** + * Get gets or sets the SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType. Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', 'Premium_ZRS', 'Standard_GZRS', 'Standard_RAGZRS'. + * + * @return the name value + */ + public SkuName name() { + return this.name; + } + + /** + * Set gets or sets the SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType. Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', 'Premium_ZRS', 'Standard_GZRS', 'Standard_RAGZRS'. + * + * @param name the name value to set + * @return the SkuInner object itself. + */ + public SkuInner withName(SkuName name) { + this.name = name; + return this; + } + + /** + * Get gets the SKU tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium'. + * + * @return the tier value + */ + public SkuTier tier() { + return this.tier; + } + + /** + * Get the type of the resource, usually it is 'storageAccounts'. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage'. + * + * @return the kind value + */ + public Kind kind() { + return this.kind; + } + + /** + * Get the set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Get the capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. + * + * @return the capabilities value + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Get the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + * + * @return the restrictions value + */ + public List restrictions() { + return this.restrictions; + } + + /** + * Set the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + * + * @param restrictions the restrictions value to set + * @return the SkuInner object itself. + */ + public SkuInner withRestrictions(List restrictions) { + this.restrictions = restrictions; + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusImpl.java new file mode 100644 index 000000000000..8d6e0b896c08 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusImpl.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. + * jkl + */ + +package com.microsoft.azure.management.storage.v2019_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_06_01.Skus; +import rx.Observable; +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.storage.v2019_06_01.Sku; + +class SkusImpl extends WrapperImpl implements Skus { + private PagedListConverter converter; + private final StorageManager manager; + + SkusImpl(StorageManager manager) { + super(manager.inner().skus()); + this.manager = manager; + this.converter = new PagedListConverter() { + @Override + public Observable typeConvertAsync(SkuInner inner) { + return Observable.just((Sku) wrapModel(inner)); + } + }; + } + + public StorageManager manager() { + return this.manager; + } + + private SkuImpl wrapModel(SkuInner inner) { + return new SkuImpl(inner, manager()); + } + + @Override + public PagedList list() { + SkusInner client = this.inner(); + return converter.convert(client.list()); + } + + @Override + public Observable listAsync() { + SkusInner client = this.inner(); + return client.listAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public Sku call(SkuInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusInner.java new file mode 100644 index 000000000000..bc9477e3e88a --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusInner.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import 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 Skus. + */ +public class SkusInner { + /** The Retrofit service to perform REST calls. */ + private SkusService service; + /** The service client containing this operation class. */ + private StorageManagementClientImpl client; + + /** + * Initializes an instance of SkusInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public SkusInner(Retrofit retrofit, StorageManagementClientImpl client) { + this.service = retrofit.create(SkusService.class); + this.client = client; + } + + /** + * The interface defining all the services for Skus to be + * used by Retrofit to perform actually REST calls. + */ + interface SkusService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.Skus list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists the available SKUs supported by Microsoft.Storage for given subscription. + * + * @return the PagedList object if successful. + */ + public PagedList list() { + PageImpl page = new PageImpl<>(); + page.setItems(listWithServiceResponseAsync().toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Lists the available SKUs supported by Microsoft.Storage for given subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists the available SKUs supported by Microsoft.Storage for given subscription. + * + * @return the observable to the List<SkuInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Lists the available SKUs supported by Microsoft.Storage for given subscription. + * + * @return the observable to the List<SkuInner> object + */ + public Observable>> listWithServiceResponseAsync() { + 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(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.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()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountImpl.java new file mode 100644 index 000000000000..046f15699868 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountImpl.java @@ -0,0 +1,322 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccount; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccountUpdateParameters; +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccountCreateParameters; +import com.microsoft.azure.management.storage.v2019_06_01.AccessTier; +import com.microsoft.azure.management.storage.v2019_06_01.AzureFilesIdentityBasedAuthentication; +import org.joda.time.DateTime; +import com.microsoft.azure.management.storage.v2019_06_01.CustomDomain; +import com.microsoft.azure.management.storage.v2019_06_01.Encryption; +import com.microsoft.azure.management.storage.v2019_06_01.GeoReplicationStats; +import com.microsoft.azure.management.storage.v2019_06_01.Identity; +import com.microsoft.azure.management.storage.v2019_06_01.Kind; +import com.microsoft.azure.management.storage.v2019_06_01.LargeFileSharesState; +import com.microsoft.azure.management.storage.v2019_06_01.NetworkRuleSet; +import com.microsoft.azure.management.storage.v2019_06_01.Endpoints; +import java.util.ArrayList; +import com.microsoft.azure.management.storage.v2019_06_01.PrivateEndpointConnection; +import java.util.List; +import com.microsoft.azure.management.storage.v2019_06_01.ProvisioningState; +import com.microsoft.azure.management.storage.v2019_06_01.Sku; +import com.microsoft.azure.management.storage.v2019_06_01.AccountStatus; +import rx.functions.Func1; + +class StorageAccountImpl extends GroupableResourceCoreImpl implements StorageAccount, StorageAccount.Definition, StorageAccount.Update { + private StorageAccountCreateParameters createParameter; + private StorageAccountUpdateParameters updateParameter; + StorageAccountImpl(String name, StorageAccountInner inner, StorageManager manager) { + super(name, inner, manager); + this.createParameter = new StorageAccountCreateParameters(); + this.updateParameter = new StorageAccountUpdateParameters(); + } + + @Override + public Observable createResourceAsync() { + StorageAccountsInner client = this.manager().inner().storageAccounts(); + this.createParameter.withLocation(inner().location()); + this.createParameter.withTags(inner().getTags()); + return client.createAsync(this.resourceGroupName(), this.name(), this.createParameter) + .map(new Func1() { + @Override + public StorageAccountInner call(StorageAccountInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + StorageAccountsInner client = this.manager().inner().storageAccounts(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public StorageAccountInner call(StorageAccountInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + StorageAccountsInner client = this.manager().inner().storageAccounts(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createParameter = new StorageAccountCreateParameters(); + this.updateParameter = new StorageAccountUpdateParameters(); + } + + @Override + public AccessTier accessTier() { + return this.inner().accessTier(); + } + + @Override + public AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication() { + return this.inner().azureFilesIdentityBasedAuthentication(); + } + + @Override + public DateTime creationTime() { + return this.inner().creationTime(); + } + + @Override + public CustomDomain customDomain() { + return this.inner().customDomain(); + } + + @Override + public Boolean enableHttpsTrafficOnly() { + return this.inner().enableHttpsTrafficOnly(); + } + + @Override + public Encryption encryption() { + return this.inner().encryption(); + } + + @Override + public Boolean failoverInProgress() { + return this.inner().failoverInProgress(); + } + + @Override + public GeoReplicationStats geoReplicationStats() { + return this.inner().geoReplicationStats(); + } + + @Override + public Identity identity() { + return this.inner().identity(); + } + + @Override + public Boolean isHnsEnabled() { + return this.inner().isHnsEnabled(); + } + + @Override + public Kind kind() { + return this.inner().kind(); + } + + @Override + public LargeFileSharesState largeFileSharesState() { + return this.inner().largeFileSharesState(); + } + + @Override + public DateTime lastGeoFailoverTime() { + return this.inner().lastGeoFailoverTime(); + } + + @Override + public NetworkRuleSet networkRuleSet() { + return this.inner().networkRuleSet(); + } + + @Override + public Endpoints primaryEndpoints() { + return this.inner().primaryEndpoints(); + } + + @Override + public String primaryLocation() { + return this.inner().primaryLocation(); + } + + @Override + public List privateEndpointConnections() { + List lst = new ArrayList(); + if (this.inner().privateEndpointConnections() != null) { + for (PrivateEndpointConnectionInner inner : this.inner().privateEndpointConnections()) { + lst.add( new PrivateEndpointConnectionImpl(inner, manager())); + } + } + return lst; + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Endpoints secondaryEndpoints() { + return this.inner().secondaryEndpoints(); + } + + @Override + public String secondaryLocation() { + return this.inner().secondaryLocation(); + } + + @Override + public Sku sku() { + SkuInner inner = this.inner().sku(); + if (inner != null) { + return new SkuImpl(inner, manager()); + } else { + return null; + } + } + + @Override + public AccountStatus statusOfPrimary() { + return this.inner().statusOfPrimary(); + } + + @Override + public AccountStatus statusOfSecondary() { + return this.inner().statusOfSecondary(); + } + + @Override + public StorageAccountImpl withIsHnsEnabled(Boolean isHnsEnabled) { + this.createParameter.withIsHnsEnabled(isHnsEnabled); + return this; + } + + @Override + public StorageAccountImpl withKind(Kind kind) { + if (isInCreateMode()) { + this.createParameter.withKind(kind); + } else { + this.updateParameter.withKind(kind); + } + return this; + } + + @Override + public StorageAccountImpl withSku(SkuInner sku) { + if (isInCreateMode()) { + this.createParameter.withSku(sku); + } else { + this.updateParameter.withSku(sku); + } + return this; + } + + @Override + public StorageAccountImpl withAccessTier(AccessTier accessTier) { + if (isInCreateMode()) { + this.createParameter.withAccessTier(accessTier); + } else { + this.updateParameter.withAccessTier(accessTier); + } + return this; + } + + @Override + public StorageAccountImpl withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication) { + if (isInCreateMode()) { + this.createParameter.withAzureFilesIdentityBasedAuthentication(azureFilesIdentityBasedAuthentication); + } else { + this.updateParameter.withAzureFilesIdentityBasedAuthentication(azureFilesIdentityBasedAuthentication); + } + return this; + } + + @Override + public StorageAccountImpl withCustomDomain(CustomDomain customDomain) { + if (isInCreateMode()) { + this.createParameter.withCustomDomain(customDomain); + } else { + this.updateParameter.withCustomDomain(customDomain); + } + return this; + } + + @Override + public StorageAccountImpl withEnableHttpsTrafficOnly(Boolean enableHttpsTrafficOnly) { + if (isInCreateMode()) { + this.createParameter.withEnableHttpsTrafficOnly(enableHttpsTrafficOnly); + } else { + this.updateParameter.withEnableHttpsTrafficOnly(enableHttpsTrafficOnly); + } + return this; + } + + @Override + public StorageAccountImpl withEncryption(Encryption encryption) { + if (isInCreateMode()) { + this.createParameter.withEncryption(encryption); + } else { + this.updateParameter.withEncryption(encryption); + } + return this; + } + + @Override + public StorageAccountImpl withIdentity(Identity identity) { + if (isInCreateMode()) { + this.createParameter.withIdentity(identity); + } else { + this.updateParameter.withIdentity(identity); + } + return this; + } + + @Override + public StorageAccountImpl withLargeFileSharesState(LargeFileSharesState largeFileSharesState) { + if (isInCreateMode()) { + this.createParameter.withLargeFileSharesState(largeFileSharesState); + } else { + this.updateParameter.withLargeFileSharesState(largeFileSharesState); + } + return this; + } + + @Override + public StorageAccountImpl withNetworkRuleSet(NetworkRuleSet networkRuleSet) { + if (isInCreateMode()) { + this.createParameter.withNetworkRuleSet(networkRuleSet); + } else { + this.updateParameter.withNetworkRuleSet(networkRuleSet); + } + return this; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountInner.java new file mode 100644 index 000000000000..0f222411d879 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountInner.java @@ -0,0 +1,456 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.Kind; +import com.microsoft.azure.management.storage.v2019_06_01.Identity; +import com.microsoft.azure.management.storage.v2019_06_01.ProvisioningState; +import com.microsoft.azure.management.storage.v2019_06_01.Endpoints; +import com.microsoft.azure.management.storage.v2019_06_01.AccountStatus; +import org.joda.time.DateTime; +import com.microsoft.azure.management.storage.v2019_06_01.CustomDomain; +import com.microsoft.azure.management.storage.v2019_06_01.Encryption; +import com.microsoft.azure.management.storage.v2019_06_01.AccessTier; +import com.microsoft.azure.management.storage.v2019_06_01.AzureFilesIdentityBasedAuthentication; +import com.microsoft.azure.management.storage.v2019_06_01.NetworkRuleSet; +import com.microsoft.azure.management.storage.v2019_06_01.GeoReplicationStats; +import com.microsoft.azure.management.storage.v2019_06_01.LargeFileSharesState; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * The storage account. + */ +@JsonFlatten +public class StorageAccountInner extends Resource { + /** + * Gets the SKU. + */ + @JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY) + private SkuInner sku; + + /** + * Gets the Kind. Possible values include: 'Storage', 'StorageV2', + * 'BlobStorage', 'FileStorage', 'BlockBlobStorage'. + */ + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private Kind kind; + + /** + * The identity of the resource. + */ + @JsonProperty(value = "identity") + private Identity identity; + + /** + * Gets the status of the storage account at the time the operation was + * called. Possible values include: 'Creating', 'ResolvingDNS', + * 'Succeeded'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Gets the URLs that are used to perform a retrieval of a public blob, + * queue, or table object. Note that Standard_ZRS and Premium_LRS accounts + * only return the blob endpoint. + */ + @JsonProperty(value = "properties.primaryEndpoints", access = JsonProperty.Access.WRITE_ONLY) + private Endpoints primaryEndpoints; + + /** + * Gets the location of the primary data center for the storage account. + */ + @JsonProperty(value = "properties.primaryLocation", access = JsonProperty.Access.WRITE_ONLY) + private String primaryLocation; + + /** + * Gets the status indicating whether the primary location of the storage + * account is available or unavailable. Possible values include: + * 'available', 'unavailable'. + */ + @JsonProperty(value = "properties.statusOfPrimary", access = JsonProperty.Access.WRITE_ONLY) + private AccountStatus statusOfPrimary; + + /** + * Gets the timestamp of the most recent instance of a failover to the + * secondary location. Only the most recent timestamp is retained. This + * element is not returned if there has never been a failover instance. + * Only available if the accountType is Standard_GRS or Standard_RAGRS. + */ + @JsonProperty(value = "properties.lastGeoFailoverTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastGeoFailoverTime; + + /** + * Gets the location of the geo-replicated secondary for the storage + * account. Only available if the accountType is Standard_GRS or + * Standard_RAGRS. + */ + @JsonProperty(value = "properties.secondaryLocation", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryLocation; + + /** + * Gets the status indicating whether the secondary location of the storage + * account is available or unavailable. Only available if the SKU name is + * Standard_GRS or Standard_RAGRS. Possible values include: 'available', + * 'unavailable'. + */ + @JsonProperty(value = "properties.statusOfSecondary", access = JsonProperty.Access.WRITE_ONLY) + private AccountStatus statusOfSecondary; + + /** + * Gets the creation date and time of the storage account in UTC. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime creationTime; + + /** + * Gets the custom domain the user assigned to this storage account. + */ + @JsonProperty(value = "properties.customDomain", access = JsonProperty.Access.WRITE_ONLY) + private CustomDomain customDomain; + + /** + * Gets the URLs that are used to perform a retrieval of a public blob, + * queue, or table object from the secondary location of the storage + * account. Only available if the SKU name is Standard_RAGRS. + */ + @JsonProperty(value = "properties.secondaryEndpoints", access = JsonProperty.Access.WRITE_ONLY) + private Endpoints secondaryEndpoints; + + /** + * Gets the encryption settings on the account. If unspecified, the account + * is unencrypted. + */ + @JsonProperty(value = "properties.encryption", access = JsonProperty.Access.WRITE_ONLY) + private Encryption encryption; + + /** + * Required for storage accounts where kind = BlobStorage. The access tier + * used for billing. Possible values include: 'Hot', 'Cool'. + */ + @JsonProperty(value = "properties.accessTier", access = JsonProperty.Access.WRITE_ONLY) + private AccessTier accessTier; + + /** + * Provides the identity based authentication settings for Azure Files. + */ + @JsonProperty(value = "properties.azureFilesIdentityBasedAuthentication") + private AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication; + + /** + * Allows https traffic only to storage service if sets to true. + */ + @JsonProperty(value = "properties.supportsHttpsTrafficOnly") + private Boolean enableHttpsTrafficOnly; + + /** + * Network rule set. + */ + @JsonProperty(value = "properties.networkAcls", access = JsonProperty.Access.WRITE_ONLY) + private NetworkRuleSet networkRuleSet; + + /** + * Account HierarchicalNamespace enabled if sets to true. + */ + @JsonProperty(value = "properties.isHnsEnabled") + private Boolean isHnsEnabled; + + /** + * Geo Replication Stats. + */ + @JsonProperty(value = "properties.geoReplicationStats", access = JsonProperty.Access.WRITE_ONLY) + private GeoReplicationStats geoReplicationStats; + + /** + * If the failover is in progress, the value will be true, otherwise, it + * will be null. + */ + @JsonProperty(value = "properties.failoverInProgress", access = JsonProperty.Access.WRITE_ONLY) + private Boolean failoverInProgress; + + /** + * Allow large file shares if sets to Enabled. It cannot be disabled once + * it is enabled. Possible values include: 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "properties.largeFileSharesState") + private LargeFileSharesState largeFileSharesState; + + /** + * List of private endpoint connection associated with the specified + * storage account. + */ + @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /** + * Get gets the SKU. + * + * @return the sku value + */ + public SkuInner sku() { + return this.sku; + } + + /** + * Get gets the Kind. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage'. + * + * @return the kind value + */ + public Kind kind() { + return this.kind; + } + + /** + * Get the identity of the resource. + * + * @return the identity value + */ + public Identity identity() { + return this.identity; + } + + /** + * Set the identity of the resource. + * + * @param identity the identity value to set + * @return the StorageAccountInner object itself. + */ + public StorageAccountInner withIdentity(Identity identity) { + this.identity = identity; + return this; + } + + /** + * Get gets the status of the storage account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint. + * + * @return the primaryEndpoints value + */ + public Endpoints primaryEndpoints() { + return this.primaryEndpoints; + } + + /** + * Get gets the location of the primary data center for the storage account. + * + * @return the primaryLocation value + */ + public String primaryLocation() { + return this.primaryLocation; + } + + /** + * Get gets the status indicating whether the primary location of the storage account is available or unavailable. Possible values include: 'available', 'unavailable'. + * + * @return the statusOfPrimary value + */ + public AccountStatus statusOfPrimary() { + return this.statusOfPrimary; + } + + /** + * Get gets the timestamp of the most recent instance of a failover to the secondary location. Only the most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only available if the accountType is Standard_GRS or Standard_RAGRS. + * + * @return the lastGeoFailoverTime value + */ + public DateTime lastGeoFailoverTime() { + return this.lastGeoFailoverTime; + } + + /** + * Get gets the location of the geo-replicated secondary for the storage account. Only available if the accountType is Standard_GRS or Standard_RAGRS. + * + * @return the secondaryLocation value + */ + public String secondaryLocation() { + return this.secondaryLocation; + } + + /** + * Get gets the status indicating whether the secondary location of the storage account is available or unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS. Possible values include: 'available', 'unavailable'. + * + * @return the statusOfSecondary value + */ + public AccountStatus statusOfSecondary() { + return this.statusOfSecondary; + } + + /** + * Get gets the creation date and time of the storage account in UTC. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Get gets the custom domain the user assigned to this storage account. + * + * @return the customDomain value + */ + public CustomDomain customDomain() { + return this.customDomain; + } + + /** + * Get gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location of the storage account. Only available if the SKU name is Standard_RAGRS. + * + * @return the secondaryEndpoints value + */ + public Endpoints secondaryEndpoints() { + return this.secondaryEndpoints; + } + + /** + * Get gets the encryption settings on the account. If unspecified, the account is unencrypted. + * + * @return the encryption value + */ + public Encryption encryption() { + return this.encryption; + } + + /** + * Get required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'. + * + * @return the accessTier value + */ + public AccessTier accessTier() { + return this.accessTier; + } + + /** + * Get provides the identity based authentication settings for Azure Files. + * + * @return the azureFilesIdentityBasedAuthentication value + */ + public AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication() { + return this.azureFilesIdentityBasedAuthentication; + } + + /** + * Set provides the identity based authentication settings for Azure Files. + * + * @param azureFilesIdentityBasedAuthentication the azureFilesIdentityBasedAuthentication value to set + * @return the StorageAccountInner object itself. + */ + public StorageAccountInner withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication) { + this.azureFilesIdentityBasedAuthentication = azureFilesIdentityBasedAuthentication; + return this; + } + + /** + * Get allows https traffic only to storage service if sets to true. + * + * @return the enableHttpsTrafficOnly value + */ + public Boolean enableHttpsTrafficOnly() { + return this.enableHttpsTrafficOnly; + } + + /** + * Set allows https traffic only to storage service if sets to true. + * + * @param enableHttpsTrafficOnly the enableHttpsTrafficOnly value to set + * @return the StorageAccountInner object itself. + */ + public StorageAccountInner withEnableHttpsTrafficOnly(Boolean enableHttpsTrafficOnly) { + this.enableHttpsTrafficOnly = enableHttpsTrafficOnly; + return this; + } + + /** + * Get network rule set. + * + * @return the networkRuleSet value + */ + public NetworkRuleSet networkRuleSet() { + return this.networkRuleSet; + } + + /** + * Get account HierarchicalNamespace enabled if sets to true. + * + * @return the isHnsEnabled value + */ + public Boolean isHnsEnabled() { + return this.isHnsEnabled; + } + + /** + * Set account HierarchicalNamespace enabled if sets to true. + * + * @param isHnsEnabled the isHnsEnabled value to set + * @return the StorageAccountInner object itself. + */ + public StorageAccountInner withIsHnsEnabled(Boolean isHnsEnabled) { + this.isHnsEnabled = isHnsEnabled; + return this; + } + + /** + * Get geo Replication Stats. + * + * @return the geoReplicationStats value + */ + public GeoReplicationStats geoReplicationStats() { + return this.geoReplicationStats; + } + + /** + * Get if the failover is in progress, the value will be true, otherwise, it will be null. + * + * @return the failoverInProgress value + */ + public Boolean failoverInProgress() { + return this.failoverInProgress; + } + + /** + * Get allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'. + * + * @return the largeFileSharesState value + */ + public LargeFileSharesState largeFileSharesState() { + return this.largeFileSharesState; + } + + /** + * Set allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'. + * + * @param largeFileSharesState the largeFileSharesState value to set + * @return the StorageAccountInner object itself. + */ + public StorageAccountInner withLargeFileSharesState(LargeFileSharesState largeFileSharesState) { + this.largeFileSharesState = largeFileSharesState; + return this; + } + + /** + * Get list of private endpoint connection associated with the specified storage account. + * + * @return the privateEndpointConnections value + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountListKeysResultImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountListKeysResultImpl.java new file mode 100644 index 000000000000..4f037e66ccc2 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountListKeysResultImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccountListKeysResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccountKey; + +class StorageAccountListKeysResultImpl extends WrapperImpl implements StorageAccountListKeysResult { + private final StorageManager manager; + StorageAccountListKeysResultImpl(StorageAccountListKeysResultInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public List keys() { + return this.inner().keys(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountListKeysResultInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountListKeysResultInner.java new file mode 100644 index 000000000000..96d19d551a6f --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountListKeysResultInner.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.storage.v2019_06_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccountKey; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The response from the ListKeys operation. + */ +public class StorageAccountListKeysResultInner { + /** + * Gets the list of storage account keys and their properties for the + * specified storage account. + */ + @JsonProperty(value = "keys", access = JsonProperty.Access.WRITE_ONLY) + private List keys; + + /** + * Get gets the list of storage account keys and their properties for the specified storage account. + * + * @return the keys value + */ + public List keys() { + return this.keys; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountsImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountsImpl.java new file mode 100644 index 000000000000..4a1bc5209367 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountsImpl.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccounts; +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccount; +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.storage.v2019_06_01.StorageAccountListKeysResult; +import com.microsoft.azure.management.storage.v2019_06_01.ListAccountSasResponse; +import com.microsoft.azure.management.storage.v2019_06_01.ListServiceSasResponse; +import com.microsoft.azure.management.storage.v2019_06_01.CheckNameAvailabilityResult; +import com.microsoft.azure.management.storage.v2019_06_01.AccountSasParameters; +import com.microsoft.azure.management.storage.v2019_06_01.ServiceSasParameters; + +class StorageAccountsImpl extends GroupableResourcesCoreImpl implements StorageAccounts { + protected StorageAccountsImpl(StorageManager manager) { + super(manager.inner().storageAccounts(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + StorageAccountsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + StorageAccountsInner 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) { + StorageAccountsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + StorageAccountsInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public StorageAccount call(StorageAccountInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + StorageAccountsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + StorageAccountsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StorageAccount call(StorageAccountInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public StorageAccountImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable listKeysAsync(String resourceGroupName, String accountName) { + StorageAccountsInner client = this.inner(); + return client.listKeysAsync(resourceGroupName, accountName) + .map(new Func1() { + @Override + public StorageAccountListKeysResult call(StorageAccountListKeysResultInner inner) { + return new StorageAccountListKeysResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable regenerateKeyAsync(String resourceGroupName, String accountName, String keyName) { + StorageAccountsInner client = this.inner(); + return client.regenerateKeyAsync(resourceGroupName, accountName, keyName) + .map(new Func1() { + @Override + public StorageAccountListKeysResult call(StorageAccountListKeysResultInner inner) { + return new StorageAccountListKeysResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAccountSASAsync(String resourceGroupName, String accountName, AccountSasParameters parameters) { + StorageAccountsInner client = this.inner(); + return client.listAccountSASAsync(resourceGroupName, accountName, parameters) + .map(new Func1() { + @Override + public ListAccountSasResponse call(ListAccountSasResponseInner inner) { + return new ListAccountSasResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable listServiceSASAsync(String resourceGroupName, String accountName, ServiceSasParameters parameters) { + StorageAccountsInner client = this.inner(); + return client.listServiceSASAsync(resourceGroupName, accountName, parameters) + .map(new Func1() { + @Override + public ListServiceSasResponse call(ListServiceSasResponseInner inner) { + return new ListServiceSasResponseImpl(inner, manager()); + } + }); + } + + @Override + public Completable failoverAsync(String resourceGroupName, String accountName) { + StorageAccountsInner client = this.inner(); + return client.failoverAsync(resourceGroupName, accountName).toCompletable(); + } + + @Override + public Completable revokeUserDelegationKeysAsync(String resourceGroupName, String accountName) { + StorageAccountsInner client = this.inner(); + return client.revokeUserDelegationKeysAsync(resourceGroupName, accountName).toCompletable(); + } + + @Override + public Observable checkNameAvailabilityAsync(String name) { + StorageAccountsInner client = this.inner(); + return client.checkNameAvailabilityAsync(name) + .map(new Func1() { + @Override + public CheckNameAvailabilityResult call(CheckNameAvailabilityResultInner inner) { + return new CheckNameAvailabilityResultImpl(inner, manager()); + } + }); + } + + @Override + protected StorageAccountImpl wrapModel(StorageAccountInner inner) { + return new StorageAccountImpl(inner.name(), inner, manager()); + } + + @Override + protected StorageAccountImpl wrapModel(String name) { + return new StorageAccountImpl(name, new StorageAccountInner(), this.manager()); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountsInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountsInner.java new file mode 100644 index 000000000000..cd3a89468746 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountsInner.java @@ -0,0 +1,1748 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_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.storage.v2019_06_01.AccountSasParameters; +import com.microsoft.azure.management.storage.v2019_06_01.ListKeyExpand; +import com.microsoft.azure.management.storage.v2019_06_01.ServiceSasParameters; +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccountCheckNameAvailabilityParameters; +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccountCreateParameters; +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccountExpand; +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccountRegenerateKeyParameters; +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccountUpdateParameters; +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; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in StorageAccounts. + */ +public class StorageAccountsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private StorageAccountsService service; + /** The service client containing this operation class. */ + private StorageManagementClientImpl 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, StorageManagementClientImpl 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.storage.v2019_06_01.StorageAccounts checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability") + Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body StorageAccountCheckNameAvailabilityParameters accountName, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.StorageAccounts create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}") + Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body StorageAccountCreateParameters 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.storage.v2019_06_01.StorageAccounts beginCreate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}") + Observable> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body StorageAccountCreateParameters 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.storage.v2019_06_01.StorageAccounts delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{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.storage.v2019_06_01.StorageAccounts getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") StorageAccountExpand expand, @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.storage.v2019_06_01.StorageAccounts update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body StorageAccountUpdateParameters 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.storage.v2019_06_01.StorageAccounts list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts") + Observable> list(@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.storage.v2019_06_01.StorageAccounts listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.storage.v2019_06_01.StorageAccounts listKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys") + Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") ListKeyExpand expand, @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.storage.v2019_06_01.StorageAccounts regenerateKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey") + Observable> regenerateKey(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body StorageAccountRegenerateKeyParameters regenerateKey, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.StorageAccounts listAccountSAS" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas") + Observable> listAccountSAS(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body AccountSasParameters 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.storage.v2019_06_01.StorageAccounts listServiceSAS" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas") + Observable> listServiceSAS(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body ServiceSasParameters 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.storage.v2019_06_01.StorageAccounts failover" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover") + Observable> failover(@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.storage.v2019_06_01.StorageAccounts beginFailover" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover") + Observable> beginFailover(@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.storage.v2019_06_01.StorageAccounts revokeUserDelegationKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys") + Observable> revokeUserDelegationKeys(@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.storage.v2019_06_01.StorageAccounts listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Checks that the storage account name is valid and is not already in use. + * + * @param name The storage account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 CheckNameAvailabilityResultInner object if successful. + */ + public CheckNameAvailabilityResultInner checkNameAvailability(String name) { + return checkNameAvailabilityWithServiceResponseAsync(name).toBlocking().single().body(); + } + + /** + * Checks that the storage account name is valid and is not already in use. + * + * @param name The storage account name. + * @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 name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(name), serviceCallback); + } + + /** + * Checks that the storage account name is valid and is not already in use. + * + * @param name The storage account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameAvailabilityResultInner object + */ + public Observable checkNameAvailabilityAsync(String name) { + return checkNameAvailabilityWithServiceResponseAsync(name).map(new Func1, CheckNameAvailabilityResultInner>() { + @Override + public CheckNameAvailabilityResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks that the storage account name is valid and is not already in use. + * + * @param name The storage account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameAvailabilityResultInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String name) { + 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."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + StorageAccountCheckNameAvailabilityParameters accountName = new StorageAccountCheckNameAvailabilityParameters(); + accountName.withName(name); + return service.checkNameAvailability(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), accountName, 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); + } + + /** + * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide for the created 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 StorageAccountInner object if successful. + */ + public StorageAccountInner create(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().body(); + } + + /** + * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide for the created 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, StorageAccountCreateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide for the created account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, StorageAccountInner>() { + @Override + public StorageAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide for the created account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters 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 (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, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide for the created 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 StorageAccountInner object if successful. + */ + public StorageAccountInner beginCreate(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); + } + + /** + * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide for the created 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, StorageAccountCreateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide for the created account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountInner object + */ + public Observable beginCreateAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, StorageAccountInner>() { + @Override + public StorageAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide for the created account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters 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 (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, accountName, 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(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a storage account in Microsoft Azure. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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().single().body(); + } + + /** + * Deletes a storage account in Microsoft Azure. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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 a storage account in Microsoft Azure. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 a storage account in Microsoft Azure. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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."); + } + return service.delete(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 = 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); + } + + /** + * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 StorageAccountInner object if successful. + */ + public StorageAccountInner getByResourceGroup(String resourceGroupName, String accountName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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); + } + + /** + * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String accountName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, StorageAccountInner>() { + @Override + public StorageAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountInner 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."); + } + final StorageAccountExpand expand = null; + return service.getByResourceGroup(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), expand, 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); + } + } + }); + } + + /** + * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param expand May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats. Possible values include: 'geoReplicationStats' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 StorageAccountInner object if successful. + */ + public StorageAccountInner getByResourceGroup(String resourceGroupName, String accountName, StorageAccountExpand expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName, expand).toBlocking().single().body(); + } + + /** + * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param expand May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats. Possible values include: 'geoReplicationStats' + * @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, StorageAccountExpand expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName, expand), serviceCallback); + } + + /** + * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param expand May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats. Possible values include: 'geoReplicationStats' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String accountName, StorageAccountExpand expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName, expand).map(new Func1, StorageAccountInner>() { + @Override + public StorageAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param expand May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats. Possible values include: 'geoReplicationStats' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountExpand expand) { + 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(), expand, 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); + } + + /** + * The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide for the updated 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 StorageAccountInner object if successful. + */ + public StorageAccountInner update(String resourceGroupName, String accountName, StorageAccountUpdateParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); + } + + /** + * The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide for the updated 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, StorageAccountUpdateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide for the updated account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, StorageAccountUpdateParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, StorageAccountInner>() { + @Override + public StorageAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide for the updated account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountUpdateParameters 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 (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.update(resourceGroupName, accountName, 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 = 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); + } + + /** + * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<StorageAccountInner> 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 all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @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 all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageAccountInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageAccountInner> 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 all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageAccountInner> 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."); + } + return service.list(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 = 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 all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @return the PagedList object if successful. + */ + public PagedList listByResourceGroup(String resourceGroupName) { + PageImpl page = new PageImpl<>(); + page.setItems(listByResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName), serviceCallback); + } + + /** + * Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @return the observable to the List<StorageAccountInner> object + */ + public Observable> listByResourceGroupAsync(String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @return the observable to the List<StorageAccountInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(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."); + } + return service.listByResourceGroup(resourceGroupName, 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 = listByResourceGroupDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } 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 access keys or Kerberos keys (if active directory enabled) for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 StorageAccountListKeysResultInner object if successful. + */ + public StorageAccountListKeysResultInner listKeys(String resourceGroupName, String accountName) { + return listKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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 listKeysAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountListKeysResultInner object + */ + public Observable listKeysAsync(String resourceGroupName, String accountName) { + return listKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, StorageAccountListKeysResultInner>() { + @Override + public StorageAccountListKeysResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountListKeysResultInner object + */ + public Observable> listKeysWithServiceResponseAsync(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."); + } + final ListKeyExpand expand = null; + return service.listKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param expand Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 StorageAccountListKeysResultInner object if successful. + */ + public StorageAccountListKeysResultInner listKeys(String resourceGroupName, String accountName, ListKeyExpand expand) { + return listKeysWithServiceResponseAsync(resourceGroupName, accountName, expand).toBlocking().single().body(); + } + + /** + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param expand Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb' + * @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 listKeysAsync(String resourceGroupName, String accountName, ListKeyExpand expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, accountName, expand), serviceCallback); + } + + /** + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param expand Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountListKeysResultInner object + */ + public Observable listKeysAsync(String resourceGroupName, String accountName, ListKeyExpand expand) { + return listKeysWithServiceResponseAsync(resourceGroupName, accountName, expand).map(new Func1, StorageAccountListKeysResultInner>() { + @Override + public StorageAccountListKeysResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param expand Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountListKeysResultInner object + */ + public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String accountName, ListKeyExpand expand) { + 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.listKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listKeysDelegate(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); + } + + /** + * Regenerates one of the access keys or Kerberos keys for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 StorageAccountListKeysResultInner object if successful. + */ + public StorageAccountListKeysResultInner regenerateKey(String resourceGroupName, String accountName, String keyName) { + return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).toBlocking().single().body(); + } + + /** + * Regenerates one of the access keys or Kerberos keys for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. + * @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 regenerateKeyAsync(String resourceGroupName, String accountName, String keyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName), serviceCallback); + } + + /** + * Regenerates one of the access keys or Kerberos keys for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountListKeysResultInner object + */ + public Observable regenerateKeyAsync(String resourceGroupName, String accountName, String keyName) { + return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).map(new Func1, StorageAccountListKeysResultInner>() { + @Override + public StorageAccountListKeysResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerates one of the access keys or Kerberos keys for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountListKeysResultInner object + */ + public Observable> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String accountName, String keyName) { + 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."); + } + if (keyName == null) { + throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); + } + StorageAccountRegenerateKeyParameters regenerateKey = new StorageAccountRegenerateKeyParameters(); + regenerateKey.withKeyName(keyName); + return service.regenerateKey(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), regenerateKey, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = regenerateKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse regenerateKeyDelegate(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); + } + + /** + * List SAS credentials of a storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide to list SAS credentials for the 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 + * @return the ListAccountSasResponseInner object if successful. + */ + public ListAccountSasResponseInner listAccountSAS(String resourceGroupName, String accountName, AccountSasParameters parameters) { + return listAccountSASWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); + } + + /** + * List SAS credentials of a storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide to list SAS credentials for the 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 listAccountSASAsync(String resourceGroupName, String accountName, AccountSasParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listAccountSASWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * List SAS credentials of a storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide to list SAS credentials for the storage account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ListAccountSasResponseInner object + */ + public Observable listAccountSASAsync(String resourceGroupName, String accountName, AccountSasParameters parameters) { + return listAccountSASWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, ListAccountSasResponseInner>() { + @Override + public ListAccountSasResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List SAS credentials of a storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide to list SAS credentials for the storage account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ListAccountSasResponseInner object + */ + public Observable> listAccountSASWithServiceResponseAsync(String resourceGroupName, String accountName, AccountSasParameters 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 (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.listAccountSAS(resourceGroupName, accountName, 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 = listAccountSASDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listAccountSASDelegate(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); + } + + /** + * List service SAS credentials of a specific resource. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide to list service SAS credentials. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 ListServiceSasResponseInner object if successful. + */ + public ListServiceSasResponseInner listServiceSAS(String resourceGroupName, String accountName, ServiceSasParameters parameters) { + return listServiceSASWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); + } + + /** + * List service SAS credentials of a specific resource. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide to list service SAS credentials. + * @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 listServiceSASAsync(String resourceGroupName, String accountName, ServiceSasParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listServiceSASWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * List service SAS credentials of a specific resource. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide to list service SAS credentials. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ListServiceSasResponseInner object + */ + public Observable listServiceSASAsync(String resourceGroupName, String accountName, ServiceSasParameters parameters) { + return listServiceSASWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, ListServiceSasResponseInner>() { + @Override + public ListServiceSasResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List service SAS credentials of a specific resource. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide to list service SAS credentials. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ListServiceSasResponseInner object + */ + public Observable> listServiceSASWithServiceResponseAsync(String resourceGroupName, String accountName, ServiceSasParameters 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 (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.listServiceSAS(resourceGroupName, accountName, 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 = listServiceSASDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listServiceSASDelegate(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); + } + + /** + * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 failover(String resourceGroupName, String accountName) { + failoverWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); + } + + /** + * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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 failoverAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(failoverWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable failoverAsync(String resourceGroupName, String accountName) { + return failoverWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> failoverWithServiceResponseAsync(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.failover(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginFailover(String resourceGroupName, String accountName) { + beginFailoverWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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 beginFailoverAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginFailoverWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginFailoverAsync(String resourceGroupName, String accountName) { + return beginFailoverWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginFailoverWithServiceResponseAsync(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.beginFailover(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 = beginFailoverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginFailoverDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Revoke user delegation keys. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 revokeUserDelegationKeys(String resourceGroupName, String accountName) { + revokeUserDelegationKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Revoke user delegation keys. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @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 revokeUserDelegationKeysAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(revokeUserDelegationKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Revoke user delegation keys. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable revokeUserDelegationKeysAsync(String resourceGroupName, String accountName) { + return revokeUserDelegationKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Revoke user delegation keys. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> revokeUserDelegationKeysWithServiceResponseAsync(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.revokeUserDelegationKeys(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 = revokeUserDelegationKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse revokeUserDelegationKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @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<StorageAccountInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @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<StorageAccountInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @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<StorageAccountInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageAccountInner> 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/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManagementClientImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManagementClientImpl.java new file mode 100644 index 000000000000..6792784a62ec --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManagementClientImpl.java @@ -0,0 +1,336 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_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 StorageManagementClientImpl class. + */ +public class StorageManagementClientImpl 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; + } + + /** The ID of the target subscription. */ + private String subscriptionId; + + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets The ID of the target subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public StorageManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The API version to use for this operation. */ + private String apiVersion; + + /** + * Gets The API version to use for this operation. + * + * @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 StorageManagementClientImpl 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 StorageManagementClientImpl 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 StorageManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * 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 SkusInner object to access its operations. + */ + private SkusInner skus; + + /** + * Gets the SkusInner object to access its operations. + * @return the SkusInner object. + */ + public SkusInner skus() { + return this.skus; + } + + /** + * 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 UsagesInner object to access its operations. + */ + private UsagesInner usages; + + /** + * Gets the UsagesInner object to access its operations. + * @return the UsagesInner object. + */ + public UsagesInner usages() { + return this.usages; + } + + /** + * The ManagementPoliciesInner object to access its operations. + */ + private ManagementPoliciesInner managementPolicies; + + /** + * Gets the ManagementPoliciesInner object to access its operations. + * @return the ManagementPoliciesInner object. + */ + public ManagementPoliciesInner managementPolicies() { + return this.managementPolicies; + } + + /** + * The PrivateEndpointConnectionsInner object to access its operations. + */ + private PrivateEndpointConnectionsInner privateEndpointConnections; + + /** + * Gets the PrivateEndpointConnectionsInner object to access its operations. + * @return the PrivateEndpointConnectionsInner object. + */ + public PrivateEndpointConnectionsInner privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * The PrivateLinkResourcesInner object to access its operations. + */ + private PrivateLinkResourcesInner privateLinkResources; + + /** + * Gets the PrivateLinkResourcesInner object to access its operations. + * @return the PrivateLinkResourcesInner object. + */ + public PrivateLinkResourcesInner privateLinkResources() { + return this.privateLinkResources; + } + + /** + * The BlobServicesInner object to access its operations. + */ + private BlobServicesInner blobServices; + + /** + * Gets the BlobServicesInner object to access its operations. + * @return the BlobServicesInner object. + */ + public BlobServicesInner blobServices() { + return this.blobServices; + } + + /** + * The BlobContainersInner object to access its operations. + */ + private BlobContainersInner blobContainers; + + /** + * Gets the BlobContainersInner object to access its operations. + * @return the BlobContainersInner object. + */ + public BlobContainersInner blobContainers() { + return this.blobContainers; + } + + /** + * The FileServicesInner object to access its operations. + */ + private FileServicesInner fileServices; + + /** + * Gets the FileServicesInner object to access its operations. + * @return the FileServicesInner object. + */ + public FileServicesInner fileServices() { + return this.fileServices; + } + + /** + * The FileSharesInner object to access its operations. + */ + private FileSharesInner fileShares; + + /** + * Gets the FileSharesInner object to access its operations. + * @return the FileSharesInner object. + */ + public FileSharesInner fileShares() { + return this.fileShares; + } + + /** + * Initializes an instance of StorageManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public StorageManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of StorageManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public StorageManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of StorageManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public StorageManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2019-06-01"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.operations = new OperationsInner(restClient().retrofit(), this); + this.skus = new SkusInner(restClient().retrofit(), this); + this.storageAccounts = new StorageAccountsInner(restClient().retrofit(), this); + this.usages = new UsagesInner(restClient().retrofit(), this); + this.managementPolicies = new ManagementPoliciesInner(restClient().retrofit(), this); + this.privateEndpointConnections = new PrivateEndpointConnectionsInner(restClient().retrofit(), this); + this.privateLinkResources = new PrivateLinkResourcesInner(restClient().retrofit(), this); + this.blobServices = new BlobServicesInner(restClient().retrofit(), this); + this.blobContainers = new BlobContainersInner(restClient().retrofit(), this); + this.fileServices = new FileServicesInner(restClient().retrofit(), this); + this.fileShares = new FileSharesInner(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(), "StorageManagementClient", "2019-06-01"); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManager.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManager.java new file mode 100644 index 000000000000..fb50ff57405f --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManager.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_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.storage.v2019_06_01.Operations; +import com.microsoft.azure.management.storage.v2019_06_01.Skus; +import com.microsoft.azure.management.storage.v2019_06_01.StorageAccounts; +import com.microsoft.azure.management.storage.v2019_06_01.Usages; +import com.microsoft.azure.management.storage.v2019_06_01.ManagementPolicies; +import com.microsoft.azure.management.storage.v2019_06_01.PrivateEndpointConnections; +import com.microsoft.azure.management.storage.v2019_06_01.PrivateLinkResources; +import com.microsoft.azure.management.storage.v2019_06_01.BlobServices; +import com.microsoft.azure.management.storage.v2019_06_01.BlobContainers; +import com.microsoft.azure.management.storage.v2019_06_01.FileServices; +import com.microsoft.azure.management.storage.v2019_06_01.FileShares; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure Storage resource management. + */ +public final class StorageManager extends ManagerCore { + private Operations operations; + private Skus skus; + private StorageAccounts storageAccounts; + private Usages usages; + private ManagementPolicies managementPolicies; + private PrivateEndpointConnections privateEndpointConnections; + private PrivateLinkResources privateLinkResources; + private BlobServices blobServices; + private BlobContainers blobContainers; + private FileServices fileServices; + private FileShares fileShares; + /** + * Get a Configurable instance that can be used to create StorageManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new StorageManager.ConfigurableImpl(); + } + /** + * Creates an instance of StorageManager that exposes Storage resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the StorageManager + */ + public static StorageManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new StorageManager(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 StorageManager that exposes Storage resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the StorageManager + */ + public static StorageManager authenticate(RestClient restClient, String subscriptionId) { + return new StorageManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of StorageManager that exposes Storage management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing Storage management API entry points that work across subscriptions + */ + StorageManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @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 Skus. + */ + public Skus skus() { + if (this.skus == null) { + this.skus = new SkusImpl(this); + } + return this.skus; + } + + /** + * @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 Usages. + */ + public Usages usages() { + if (this.usages == null) { + this.usages = new UsagesImpl(this); + } + return this.usages; + } + + /** + * @return Entry point to manage ManagementPolicies. + */ + public ManagementPolicies managementPolicies() { + if (this.managementPolicies == null) { + this.managementPolicies = new ManagementPoliciesImpl(this); + } + return this.managementPolicies; + } + + /** + * @return Entry point to manage PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); + } + return this.privateEndpointConnections; + } + + /** + * @return Entry point to manage PrivateLinkResources. + */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(this); + } + return this.privateLinkResources; + } + + /** + * @return Entry point to manage BlobServices. + */ + public BlobServices blobServices() { + if (this.blobServices == null) { + this.blobServices = new BlobServicesImpl(this); + } + return this.blobServices; + } + + /** + * @return Entry point to manage BlobContainers. + */ + public BlobContainers blobContainers() { + if (this.blobContainers == null) { + this.blobContainers = new BlobContainersImpl(this); + } + return this.blobContainers; + } + + /** + * @return Entry point to manage FileServices. + */ + public FileServices fileServices() { + if (this.fileServices == null) { + this.fileServices = new FileServicesImpl(this); + } + return this.fileServices; + } + + /** + * @return Entry point to manage FileShares. + */ + public FileShares fileShares() { + if (this.fileShares == null) { + this.fileShares = new FileSharesImpl(this); + } + return this.fileShares; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public StorageManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return StorageManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private StorageManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new StorageManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsageImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsageImpl.java new file mode 100644 index 000000000000..40e9a06501fe --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsageImpl.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.Usage; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.storage.v2019_06_01.UsageName; +import com.microsoft.azure.management.storage.v2019_06_01.UsageUnit; + +class UsageImpl extends WrapperImpl implements Usage { + private final StorageManager manager; + + UsageImpl(UsageInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + + + @Override + public Integer currentValue() { + return this.inner().currentValue(); + } + + @Override + public Integer limit() { + return this.inner().limit(); + } + + @Override + public UsageName name() { + return this.inner().name(); + } + + @Override + public UsageUnit unit() { + return this.inner().unit(); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsageInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsageInner.java new file mode 100644 index 000000000000..2c1594015831 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsageInner.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.UsageUnit; +import com.microsoft.azure.management.storage.v2019_06_01.UsageName; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes Storage Resource Usage. + */ +public class UsageInner { + /** + * Gets the unit of measurement. Possible values include: 'Count', 'Bytes', + * 'Seconds', 'Percent', 'CountsPerSecond', 'BytesPerSecond'. + */ + @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) + private UsageUnit unit; + + /** + * Gets the current count of the allocated resources in the subscription. + */ + @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY) + private Integer currentValue; + + /** + * Gets the maximum count of the resources that can be allocated in the + * subscription. + */ + @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) + private Integer limit; + + /** + * Gets the name of the type of usage. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private UsageName name; + + /** + * Get gets the unit of measurement. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', 'BytesPerSecond'. + * + * @return the unit value + */ + public UsageUnit unit() { + return this.unit; + } + + /** + * Get gets the current count of the allocated resources in the subscription. + * + * @return the currentValue value + */ + public Integer currentValue() { + return this.currentValue; + } + + /** + * Get gets the maximum count of the resources that can be allocated in the subscription. + * + * @return the limit value + */ + public Integer limit() { + return this.limit; + } + + /** + * Get gets the name of the type of usage. + * + * @return the name value + */ + public UsageName name() { + return this.name; + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsagesImpl.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsagesImpl.java new file mode 100644 index 000000000000..195c1e83d1ae --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsagesImpl.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.storage.v2019_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_06_01.Usages; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.storage.v2019_06_01.Usage; + +class UsagesImpl extends WrapperImpl implements Usages { + private final StorageManager manager; + + UsagesImpl(StorageManager manager) { + super(manager.inner().usages()); + this.manager = manager; + } + + public StorageManager manager() { + return this.manager; + } + + private UsageImpl wrapModel(UsageInner inner) { + return new UsageImpl(inner, manager()); + } + + @Override + public Observable listByLocationAsync(String location) { + UsagesInner client = this.inner(); + return client.listByLocationAsync(location) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public Usage call(UsageInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsagesInner.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsagesInner.java new file mode 100644 index 000000000000..40946c0670a3 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/UsagesInner.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.storage.v2019_06_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 java.util.List; +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 Usages. + */ +public class UsagesInner { + /** The Retrofit service to perform REST calls. */ + private UsagesService service; + /** The service client containing this operation class. */ + private StorageManagementClientImpl client; + + /** + * Initializes an instance of UsagesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public UsagesInner(Retrofit retrofit, StorageManagementClientImpl client) { + this.service = retrofit.create(UsagesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Usages to be + * used by Retrofit to perform actually REST calls. + */ + interface UsagesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.Usages listByLocation" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages") + Observable> listByLocation(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the current usage count and the limit for the resources of the location under the subscription. + * + * @param location The location of the Azure Storage resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 List<UsageInner> object if successful. + */ + public List listByLocation(String location) { + return listByLocationWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Gets the current usage count and the limit for the resources of the location under the subscription. + * + * @param location The location of the Azure Storage resource. + * @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> listByLocationAsync(String location, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByLocationWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Gets the current usage count and the limit for the resources of the location under the subscription. + * + * @param location The location of the Azure Storage resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<UsageInner> object + */ + public Observable> listByLocationAsync(String location) { + return listByLocationWithServiceResponseAsync(location).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the current usage count and the limit for the resources of the location under the subscription. + * + * @param location The location of the Azure Storage resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<UsageInner> object + */ + public Observable>> listByLocationWithServiceResponseAsync(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.listByLocation(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> result = listByLocationDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByLocationDelegate(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/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/package-info.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/package-info.java new file mode 100644 index 000000000000..08f756cae106 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_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 StorageManagementClient. + * The Azure Storage Management API. + */ +package com.microsoft.azure.management.storage.v2019_06_01.implementation; diff --git a/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/package-info.java b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/package-info.java new file mode 100644 index 000000000000..610086814c03 --- /dev/null +++ b/storage/resource-manager/v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_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 StorageManagementClient. + * The Azure Storage Management API. + */ +package com.microsoft.azure.management.storage.v2019_06_01; From 149679fe77943665f16057ee9966786364848e15 Mon Sep 17 00:00:00 2001 From: Yaohai Zheng Date: Wed, 23 Oct 2019 15:21:22 +0800 Subject: [PATCH 48/64] Update autorest verstion to preview. (#5986) --- swagger_to_sdk_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index e24e1bf010e1..afc88f9313de 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -6,7 +6,7 @@ "verbose": "", "sdkrel:azure-libraries-for-java-folder": ".", "multiapi": "", - "use": "@microsoft.azure/autorest.java@2.1.85" + "use": "@microsoft.azure/autorest.java@preview" }, "version": "0.2.0", "advanced_options": { From d00df28ef10bb974ec9f490a9f8dc860f61c818f Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Wed, 23 Oct 2019 00:21:59 -0700 Subject: [PATCH 49/64] Identity README and release docs (#5970) * Preview 4 change log * Add README and samples for user auth * Add 1.0.0 change log * Change date & Add known issues --- sdk/identity/azure-identity/CHANGELOG.md | 22 +++++++++++ sdk/identity/azure-identity/README.md | 25 +++++++++++- .../keyvault/secrets/IdentitySamples.java | 38 +++++++++++++++---- 3 files changed, 75 insertions(+), 10 deletions(-) diff --git a/sdk/identity/azure-identity/CHANGELOG.md b/sdk/identity/azure-identity/CHANGELOG.md index 3d8a4fb1c51b..4356964d1c75 100644 --- a/sdk/identity/azure-identity/CHANGELOG.md +++ b/sdk/identity/azure-identity/CHANGELOG.md @@ -1,5 +1,27 @@ # Release History +## 1.0.0 (2019-10-25) - November 2019 SDK Release +**Breaking changes** + +- The `getToken(TokenRequest tokenRequest)` methods on all the credentials are changed to `getToken(TokenRequestContext tokenRequestContext)`. +- All credentials are moved from `com.azure.identity.credential` package to `com.azure.identity` package +- `DeviceCodeChallenge` is renamed to `DeviceCodeInfo`, with `int expiresIn()` replaced with `OffsetDateTime expiresOn()` returning the time of the device code expiration +- All methods containing `uri` is renamed to contain `url` for consistency + +**Known issues** +- Support connecting to different clouds with `AZURE_CLOUD` environment variable ([#5741](https://github.com/Azure/azure-sdk-for-java/issues/5741)) + +## 1.0.0-preview.4 (2019-10-07) +**New features** + +- A new credential `AuthorizationCodeCredential` is added. +- `DeviceCodeCredentialBuilder`, `InteractiveBrowserCredentialBuilder`, and `UsernamePasswordCredentialBuilder` now +supports single tenant apps with `.tenantId(String)` method. + +**Breaking changes** + +The `getToken(String... scopes)` methods on all the credentials are changed to `getToken(TokenRequest tokenRequest)`. + ## 1.0.0-preview.3 (2019-09-09) **New features** diff --git a/sdk/identity/azure-identity/README.md b/sdk/identity/azure-identity/README.md index d8addc35b04c..8fbd8686a363 100644 --- a/sdk/identity/azure-identity/README.md +++ b/sdk/identity/azure-identity/README.md @@ -6,6 +6,7 @@ The Azure Identity library provides Azure Active Directory token authentication - [Managed identity authentication](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview) - [Device code authentication](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-device-code) - Interactive browser authentication, based on [OAuth2 authentication code](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow) + - [Username + password authentication](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth-ropc) - Shared Token Cache credential, which shares login information with Visual Studio, Azure CLI, and more [Source code][source] | [API reference documentation][javadoc] | [Azure Active Directory documentation][aad_doc] @@ -27,6 +28,7 @@ The Azure Identity library provides Azure Active Directory token authentication - [Authenticating with `DefaultAzureCredential`](#authenticating-with-defaultazurecredential) - [Authenticating a service principal with a client secret](#authenticating-a-service-principal-with-a-client-secret) - [Authenticating a user account with device code flow](#authenticating-a-user-account-with-device-code-flow) + - [Authenticating a user account with username and password](#authenticating-a-user-account-with-username-and-password) - [Authenticating a user account with auth code flow](#authenticating-a-user-account-with-auth-code-flow) - [Chaining credentials](#chaining-credentials) - [Troubleshooting](#troubleshooting) @@ -164,7 +166,6 @@ When executing this in a development machine you need to first [configure the en ### Authenticating a service principal with a client secret This example demonstrates authenticating the `KeyClient` from the [azure-security-keyvault-keys][keys_client_library] client library using the `ClientSecretCredential`. There's also [a compilable sample](../../keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java) to create a Key Vault secret client you can copy-paste. ```java -// using a client secret import com.azure.identity.ClientSecretCredential; import com.azure.identity.ClientSecretCredentialBuilder; import com.azure.security.keyvault.keys.KeyClient; @@ -186,7 +187,6 @@ KeyClient client = new KeyClientBuilder() This example demonstrates authenticating the `KeyClient` from the [azure-security-keyvault-keys][keys_client_library] client library using the `DeviceCodeCredential` on an IoT device. There's also [a compilable sample](../../keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java) to create a Key Vault secret client you can copy-paste. ```java -// using a client secret import com.azure.identity.DeviceCodeCredential; import com.azure.identity.DeviceCodeCredentialBuilder; import com.azure.security.keyvault.keys.KeyClient; @@ -205,6 +205,27 @@ KeyClient client = new KeyClientBuilder() .buildClient(); ``` +### Authenticating a user account with username and password +This example demonstrates authenticating the `KeyClient` from the [azure-security-keyvault-keys][keys_client_library] client library using the `UsernamePasswordCredential`. The user must **not** have Multi-factor auth turned on. There's also [a compilable sample](../../keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java) to create a Key Vault secret client you can copy-paste. + +```java +import com.azure.identity.UsernamePasswordCredential; +import com.azure.identity.UsernamePasswordCredentialBuilder; +import com.azure.security.keyvault.keys.KeyClient; + +// authenticate with client secret, +UsernamePasswordCredential usernamePasswordCredential = new UsernamePasswordCredentialBuilder() + .clientId("") + .username("") + .password("") + .build(); + +KeyClient client = new KeyClientBuilder() + .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .credential(usernamePasswordCredential) + .buildClient(); +``` + ### Authenticating a user account with auth code flow This example demonstrates authenticating the `KeyClient` from the [azure-security-keyvault-keys][keys_client_library] client library using the `AuthorizationCodeCredential` on a web application. diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java index 02f290454e66..a9963ab8305c 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java @@ -13,6 +13,8 @@ import com.azure.identity.DeviceCodeCredentialBuilder; import com.azure.identity.ManagedIdentityCredential; import com.azure.identity.ManagedIdentityCredentialBuilder; +import com.azure.identity.UsernamePasswordCredential; +import com.azure.identity.UsernamePasswordCredentialBuilder; import com.azure.security.keyvault.secrets.models.Secret; /** @@ -62,16 +64,36 @@ public void authenticateWithClientSecretCredential() { public void authenticateWithDeviceCodeCredential() { // authenticate with client secret, DeviceCodeCredential deviceCodeCredential = new DeviceCodeCredentialBuilder() - .challengeConsumer(challenge -> { - // lets user know of the challenge, e.g., display the message on an IoT device - displayMessage(challenge.getMessage()); - }) - .build(); + .challengeConsumer(challenge -> { + // lets user know of the challenge, e.g., display the message on an IoT device + displayMessage(challenge.getMessage()); + }) + .build(); SecretClient client = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") - .credential(deviceCodeCredential) - .buildClient(); + .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .credential(deviceCodeCredential) + .buildClient(); + + Secret secret = client.getSecret("{SECRET_NAME}"); + System.out.println(secret.getValue()); + } + + /** + * A sample for authenticating a key vault secret client with a username password credential. + */ + public void authenticateWithUsernamePasswordCredential() { + // authenticate with client secret, + UsernamePasswordCredential usernamePasswordCredential = new UsernamePasswordCredentialBuilder() + .clientId("") + .username("") + .password("") + .build(); + + SecretClient client = new SecretClientBuilder() + .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .credential(usernamePasswordCredential) + .buildClient(); Secret secret = client.getSecret("{SECRET_NAME}"); System.out.println(secret.getValue()); From 126f19539f0d232ff1d6ce57bb1b34329f069324 Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Wed, 23 Oct 2019 10:39:22 -0700 Subject: [PATCH 50/64] Enable exponential backoff for retry policy in http pipeline (#5953) * Enable exponential backoff for retry policy in http pipeline * Fix checkstyle * minor refactoring * Update testcases * Update retry policy based on PR feedback * Fix javadoc --- .../core/http/policy/ExponentialBackoff.java | 78 +++++++++++++++++ .../azure/core/http/policy/FixedDelay.java | 42 ++++++++++ .../azure/core/http/policy/RetryPolicy.java | 50 +++++------ .../azure/core/http/policy/RetryStrategy.java | 47 +++++++++++ .../http/policy/ExponentialBackoffTest.java | 84 +++++++++++++++++++ .../core/http/policy/FixedDelayTest.java | 39 +++++++++ .../http/policy/RequestIdPolicyTests.java | 2 +- .../core/http/policy/RetryPolicyTests.java | 74 ++++++++++++++-- 8 files changed, 377 insertions(+), 39 deletions(-) create mode 100644 sdk/core/azure-core/src/main/java/com/azure/core/http/policy/ExponentialBackoff.java create mode 100644 sdk/core/azure-core/src/main/java/com/azure/core/http/policy/FixedDelay.java create mode 100644 sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryStrategy.java create mode 100644 sdk/core/azure-core/src/test/java/com/azure/core/http/policy/ExponentialBackoffTest.java create mode 100644 sdk/core/azure-core/src/test/java/com/azure/core/http/policy/FixedDelayTest.java diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/ExponentialBackoff.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/ExponentialBackoff.java new file mode 100644 index 000000000000..ab1b027838d7 --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/ExponentialBackoff.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.policy; + +import com.azure.core.util.logging.ClientLogger; +import java.time.Duration; +import java.util.Objects; +import java.util.concurrent.ThreadLocalRandom; + +/** + * A truncated exponential backoff implementation of {@link RetryStrategy} that has a delay duration that exponentially + * increases with each retry attempt until an upper bound is reached after which every retry attempt is delayed by the + * provided max delay duration. + */ +public class ExponentialBackoff implements RetryStrategy { + + private static final double JITTER_FACTOR = 0.05; + private static final int DEFAULT_MAX_RETRIES = 3; + private static final Duration DEFAULT_BASE_DELAY = Duration.ofMillis(800); + private static final Duration DEFAULT_MAX_DELAY = Duration.ofSeconds(8); + private final ClientLogger logger = new ClientLogger(ExponentialBackoff.class); + + private final int maxRetries; + private final Duration baseDelay; + private final Duration maxDelay; + + /** + * Creates an instance of {@link ExponentialBackoff} with a maximum of three retry attempts. This strategy starts + * with a delay of 800 milliseconds and exponentially increases with each additional retry attempt. + */ + public ExponentialBackoff() { + this(DEFAULT_MAX_RETRIES, DEFAULT_BASE_DELAY, DEFAULT_MAX_DELAY); + } + + /** + * Creates an instance of {@link ExponentialBackoff}. + * + * @param maxRetries The max retry attempts that can be made. + * @param baseDelay The base delay duration for retry. + * @param maxDelay The max delay duration for retry. + */ + public ExponentialBackoff(int maxRetries, Duration baseDelay, Duration maxDelay) { + if (maxRetries < 0) { + throw logger.logExceptionAsError(new IllegalArgumentException("Max retries cannot be less than 0.")); + } + Objects.requireNonNull(baseDelay, "'baseDelay' cannot be null."); + Objects.requireNonNull(maxDelay, "'maxDelay' cannot be null."); + + if (baseDelay.isZero()) { + throw logger.logExceptionAsError(new IllegalArgumentException("'baseDelay' cannot be 0.")); + } + + if (baseDelay.compareTo(maxDelay) > 0) { + throw logger + .logExceptionAsError(new IllegalArgumentException("'baseDelay' cannot be greater than 'maxDelay'.")); + } + this.maxRetries = maxRetries; + this.baseDelay = baseDelay; + this.maxDelay = maxDelay; + } + + @Override + public int getMaxRetries() { + return maxRetries; + } + + @Override + public Duration calculateRetryDelay(int retryAttempts) { + // Introduce a small amount of jitter to base delay + long delayWithJitterInNanos = ThreadLocalRandom.current() + .nextLong((long) (baseDelay.toNanos() * (1 - JITTER_FACTOR)), + (long) (baseDelay.toNanos() * (1 + JITTER_FACTOR))); + Duration delay = Duration.ofNanos(Math.min((1 << retryAttempts) * delayWithJitterInNanos, + maxDelay.toNanos())); + return delay; + } +} diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/FixedDelay.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/FixedDelay.java new file mode 100644 index 000000000000..e9d50f194f85 --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/FixedDelay.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.policy; + +import com.azure.core.util.logging.ClientLogger; +import java.time.Duration; +import java.util.Objects; + +/** + * A fixed-delay implementation of {$link RetryStrategy} that has a fixed delay duration between each retry attempt. + */ +public class FixedDelay implements RetryStrategy { + + private final ClientLogger logger = new ClientLogger(FixedDelay.class); + private final int maxRetries; + private final Duration delay; + + /** + * Creates an instance of {@link FixedDelay}. + * + * @param maxRetries The max number of retry attempts that can be made. + * @param delay The fixed delay duration between retry attempts. + */ + public FixedDelay(int maxRetries, Duration delay) { + if (maxRetries < 0) { + throw logger.logExceptionAsError(new IllegalArgumentException("Max retries cannot be less than 0.")); + } + this.maxRetries = maxRetries; + this.delay = Objects.requireNonNull(delay, "'delay' cannot be null."); + } + + @Override + public int getMaxRetries() { + return maxRetries; + } + + @Override + public Duration calculateRetryDelay(int retryAttempts) { + return delay; + } +} diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java index cb2002906592..a69ec17362e9 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java @@ -3,49 +3,42 @@ package com.azure.core.http.policy; +import static com.azure.core.implementation.util.ImplUtils.isNullOrEmpty; + import com.azure.core.http.HttpPipelineCallContext; import com.azure.core.http.HttpPipelineNextPolicy; import com.azure.core.http.HttpRequest; import com.azure.core.http.HttpResponse; +import java.util.Objects; import com.azure.core.util.logging.ClientLogger; import reactor.core.publisher.Mono; -import java.net.HttpURLConnection; import java.time.Duration; -import java.time.temporal.ChronoUnit; /** * A pipeline policy that retries when a recoverable HTTP error occurs. */ public class RetryPolicy implements HttpPipelinePolicy { - private static final int DEFAULT_MAX_RETRIES = 3; - private static final int DEFAULT_DELAY = 0; - private static final int HTTP_STATUS_TOO_MANY_REQUESTS = 429; - private static final ChronoUnit DEFAULT_TIME_UNIT = ChronoUnit.MILLIS; + private static final String RETRY_AFTER_MS_HEADER = "retry-after-ms"; private final ClientLogger logger = new ClientLogger(RetryPolicy.class); - - private final int maxRetries; - private final Duration delayDuration; + private final RetryStrategy retryStrategy; /** - * Creates a RetryPolicy with the default number of retry attempts and delay between retries. + * Creates a default {@link ExponentialBackoff} retry policy. */ public RetryPolicy() { - this.maxRetries = DEFAULT_MAX_RETRIES; - this.delayDuration = Duration.of(DEFAULT_DELAY, DEFAULT_TIME_UNIT); + this(new ExponentialBackoff()); } /** - * Creates a RetryPolicy. + * Creates a RetryPolicy with the provided {@link RetryStrategy}. * - * @param maxRetries the maximum number of retries to attempt. - * @param delayDuration the delay between retries + * @param retryStrategy The {@link RetryStrategy} used for retries. */ - public RetryPolicy(int maxRetries, Duration delayDuration) { - this.maxRetries = maxRetries; - this.delayDuration = delayDuration; + public RetryPolicy(RetryStrategy retryStrategy) { + this.retryStrategy = Objects.requireNonNull(retryStrategy, "'retryStrategy' cannot be null"); } @Override @@ -59,7 +52,7 @@ private Mono attemptAsync(final HttpPipelineCallContext context, f return next.clone().process() .flatMap(httpResponse -> { if (shouldRetry(httpResponse, tryCount)) { - final Duration delayDuration = determineDelayDuration(httpResponse); + final Duration delayDuration = determineDelayDuration(httpResponse, tryCount); logger.verbose("[Retrying] Try count: {}, Delay duration in seconds: {}", tryCount, delayDuration.getSeconds()); return attemptAsync(context, next, originalHttpRequest, tryCount + 1) @@ -69,10 +62,11 @@ private Mono attemptAsync(final HttpPipelineCallContext context, f } }) .onErrorResume(err -> { + int maxRetries = retryStrategy.getMaxRetries(); if (tryCount < maxRetries) { logger.verbose("[Error Resume] Try count: {}, Error: {}", tryCount, err); return attemptAsync(context, next, originalHttpRequest, tryCount + 1) - .delaySubscription(this.delayDuration); + .delaySubscription(retryStrategy.calculateRetryDelay(tryCount)); } else { return Mono.error(new RuntimeException( String.format("Max retries %d times exceeded. Error Details: %s", maxRetries, err.getMessage()), @@ -82,13 +76,7 @@ private Mono attemptAsync(final HttpPipelineCallContext context, f } private boolean shouldRetry(HttpResponse response, int tryCount) { - int code = response.getStatusCode(); - return tryCount < maxRetries - && (code == HttpURLConnection.HTTP_CLIENT_TIMEOUT - || code == HTTP_STATUS_TOO_MANY_REQUESTS // HttpUrlConnection does not define HTTP status 429 - || (code >= HttpURLConnection.HTTP_INTERNAL_ERROR - && code != HttpURLConnection.HTTP_NOT_IMPLEMENTED - && code != HttpURLConnection.HTTP_VERSION)); + return tryCount < retryStrategy.getMaxRetries() && retryStrategy.shouldRetry(response); } /** @@ -97,20 +85,20 @@ private boolean shouldRetry(HttpResponse response, int tryCount) { * @return If the HTTP response has a retry-after-ms header that will be returned, * otherwise the duration used during the construction of the policy. */ - private Duration determineDelayDuration(HttpResponse response) { + private Duration determineDelayDuration(HttpResponse response, int tryCount) { int code = response.getStatusCode(); // Response will not have a retry-after-ms header. if (code != 429 // too many requests && code != 503) { // service unavailable - return this.delayDuration; + return retryStrategy.calculateRetryDelay(tryCount); } String retryHeader = response.getHeaderValue(RETRY_AFTER_MS_HEADER); // Retry header is missing or empty, return the default delay duration. - if (retryHeader == null || retryHeader.isEmpty()) { - return this.delayDuration; + if (isNullOrEmpty(retryHeader)) { + return retryStrategy.calculateRetryDelay(tryCount); } // Use the response delay duration, the server returned it for a reason. diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryStrategy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryStrategy.java new file mode 100644 index 000000000000..0372e3edba9c --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryStrategy.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.policy; + +import com.azure.core.http.HttpResponse; +import java.net.HttpURLConnection; +import java.time.Duration; + +/** + * The interface for determining the retry strategy used in {@link RetryPolicy}. + */ +public interface RetryStrategy { + + int HTTP_STATUS_TOO_MANY_REQUESTS = 429; + + /** + * Max number of retry attempts to be make. + * + * @return The max number of retry attempts. + */ + int getMaxRetries(); + + /** + * Computes the delay between each retry. + * + * @param retryAttempts The number of retry attempts completed so far. + * @return The delay duration before the next retry. + */ + Duration calculateRetryDelay(int retryAttempts); + + /** + * This method is consulted to determine if a retry attempt should be made for the given {@link HttpResponse} if the + * retry attempts are less than {@link #getMaxRetries()}. + * + * @param httpResponse The response from the previous attempt. + * @return {@code true} if another retry attempt should be made. + */ + default boolean shouldRetry(HttpResponse httpResponse) { + int code = httpResponse.getStatusCode(); + return (code == HttpURLConnection.HTTP_CLIENT_TIMEOUT + || code == HTTP_STATUS_TOO_MANY_REQUESTS // HttpUrlConnection does not define HTTP status 429 + || (code >= HttpURLConnection.HTTP_INTERNAL_ERROR + && code != HttpURLConnection.HTTP_NOT_IMPLEMENTED + && code != HttpURLConnection.HTTP_VERSION)); + } +} diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/ExponentialBackoffTest.java b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/ExponentialBackoffTest.java new file mode 100644 index 000000000000..af66ee2e6d25 --- /dev/null +++ b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/ExponentialBackoffTest.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.policy; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.time.Duration; +import org.junit.Test; + +/** + * Unit tests for {@link ExponentialBackoff}. + */ +public class ExponentialBackoffTest { + + @Test(expected = IllegalArgumentException.class) + public void testZeroBaseDelay() { + ExponentialBackoff expBackoff = new ExponentialBackoff(3, Duration.ofSeconds(0), + Duration.ofMillis(1000)); + } + + @Test(expected = NullPointerException.class) + public void testNullBaseDelay() { + ExponentialBackoff expBackoff = new ExponentialBackoff(3, null, Duration.ofMillis(1000)); + } + + @Test(expected = NullPointerException.class) + public void testNullMaxDelay() { + ExponentialBackoff expBackoff = new ExponentialBackoff(3, Duration.ofSeconds(1), null); + } + + @Test(expected = IllegalArgumentException.class) + public void testBaseGreaterThanMaxDelay() { + ExponentialBackoff expBackoff = new ExponentialBackoff(3, Duration.ofSeconds(1), + Duration.ofMillis(500)); + } + + @Test(expected = IllegalArgumentException.class) + public void testNegativeMaxRetries() { + ExponentialBackoff expBackoff = new ExponentialBackoff(-1, Duration.ofSeconds(1), + Duration.ofMillis(5000)); + } + + @Test + public void testBaseEqualToMaxDelay() { + ExponentialBackoff expBackoff = new ExponentialBackoff(3, Duration.ofSeconds(1), + Duration.ofMillis(1000)); + assertEquals(expBackoff.getMaxRetries(), 3); + assertTrue(expBackoff.calculateRetryDelay(0).toMillis() <= 1000); + assertTrue(expBackoff.calculateRetryDelay(1).toMillis() == 1000); + assertTrue(expBackoff.calculateRetryDelay(2).toMillis() == 1000); + } + + @Test + public void testDefaultExponentialBackoff() { + ExponentialBackoff expBackoff = new ExponentialBackoff(); + assertEquals(3, expBackoff.getMaxRetries()); + + // exponential backoff + for (int i = 0; i < 3; i++) { + long delayMillis = expBackoff.calculateRetryDelay(i).toMillis(); + assertTrue(delayMillis >= ((1 << i) * (800 * 0.95)) && delayMillis <= ((1 << i) * (800 * 1.05))); + } + } + + @Test + public void testExponentialBackoff() { + ExponentialBackoff expBackoff = new ExponentialBackoff(10, Duration.ofSeconds(1), + Duration.ofSeconds(10)); + + // exponential backoff + for (int i = 0; i < 4; i++) { + long delayMillis = expBackoff.calculateRetryDelay(i).toMillis(); + assertTrue(delayMillis >= ((1 << i) * 950) && delayMillis <= ((1 << i) * 1050)); + } + + // max delay + for (int i = 4; i < 10; i++) { + assertEquals(expBackoff.calculateRetryDelay(i).toMillis(), 10000); + } + } + +} diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/FixedDelayTest.java b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/FixedDelayTest.java new file mode 100644 index 000000000000..e4e0c491058d --- /dev/null +++ b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/FixedDelayTest.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.policy; + +import static org.junit.Assert.assertEquals; + +import java.time.Duration; +import org.junit.Test; + +/** + * Unit tests for {@link FixedDelay}. + */ +public class FixedDelayTest { + + @Test(expected = NullPointerException.class) + public void testNullDelay() { + FixedDelay fixedDelay = new FixedDelay(3, null); + } + + @Test(expected = IllegalArgumentException.class) + public void testNegativeMaxRetries() { + FixedDelay fixedDelay = new FixedDelay(-1, Duration.ofSeconds(1)); + } + + @Test + public void testZeroDelay() { + FixedDelay fixedDelay = new FixedDelay(3, Duration.ofSeconds(0)); + assertEquals(fixedDelay.getMaxRetries(), 3); + assertEquals(fixedDelay.calculateRetryDelay(2).toMillis(), 0); + } + + @Test + public void testFixedDelay() { + FixedDelay fixedDelay = new FixedDelay(3, Duration.ofSeconds(1)); + assertEquals(fixedDelay.getMaxRetries(), 3); + assertEquals(fixedDelay.calculateRetryDelay(2).toMillis(), 1000); + } +} diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/RequestIdPolicyTests.java b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/RequestIdPolicyTests.java index 388dedabcc63..69dd3758ea13 100644 --- a/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/RequestIdPolicyTests.java +++ b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/RequestIdPolicyTests.java @@ -108,7 +108,7 @@ public Mono send(HttpRequest request) { return Mono.just(mockResponse); } }) - .policies(new RequestIdPolicy(), new RetryPolicy(1, Duration.of(0, ChronoUnit.SECONDS))) + .policies(new RequestIdPolicy(), new RetryPolicy(new FixedDelay(1, Duration.of(0, ChronoUnit.SECONDS)))) .build(); pipeline.send(new HttpRequest(HttpMethod.GET, new URL("http://localhost/"))).block(); diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/RetryPolicyTests.java b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/RetryPolicyTests.java index f064015bc069..ed83b3aa875d 100644 --- a/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/RetryPolicyTests.java +++ b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/RetryPolicyTests.java @@ -19,8 +19,9 @@ import java.time.temporal.ChronoUnit; public class RetryPolicyTests { + @Test - public void exponentialRetryEndOn501() throws Exception { + public void retryEndOn501() throws Exception { final HttpPipeline pipeline = new HttpPipelineBuilder() .httpClient(new NoOpHttpClient() { // Send 408, 500, 502, all retried, with a 501 ending @@ -32,17 +33,17 @@ public Mono send(HttpRequest request) { return Mono.just(new MockHttpResponse(request, codes[count++])); } }) - .policies(new RetryPolicy(3, Duration.of(0, ChronoUnit.MILLIS))) + .policies(new RetryPolicy(new FixedDelay(3, Duration.of(0, ChronoUnit.MILLIS)))) .build(); HttpResponse response = pipeline.send(new HttpRequest(HttpMethod.GET, - new URL("http://localhost/"))).block(); + new URL("http://localhost/"))).block(); Assert.assertEquals(501, response.getStatusCode()); } @Test - public void exponentialRetryMax() throws Exception { + public void retryMax() throws Exception { final int maxRetries = 5; final HttpPipeline pipeline = new HttpPipelineBuilder() .httpClient(new NoOpHttpClient() { @@ -54,13 +55,72 @@ public Mono send(HttpRequest request) { return Mono.just(new MockHttpResponse(request, 500)); } }) - .policies(new RetryPolicy(maxRetries, Duration.of(0, ChronoUnit.MILLIS))) + .policies(new RetryPolicy(new FixedDelay(maxRetries, Duration.of(0, ChronoUnit.MILLIS)))) .build(); - HttpResponse response = pipeline.send(new HttpRequest(HttpMethod.GET, - new URL("http://localhost/"))).block(); + new URL("http://localhost/"))).block(); Assert.assertEquals(500, response.getStatusCode()); } + + @Test + public void fixedDelayRetry() throws Exception { + final int maxRetries = 5; + final long delayMillis = 500; + final HttpPipeline pipeline = new HttpPipelineBuilder() + .httpClient(new NoOpHttpClient() { + int count = -1; + long previousAttemptMadeAt = -1; + + @Override + public Mono send(HttpRequest request) { + if (count > 0) { + Assert.assertTrue(System.currentTimeMillis() >= previousAttemptMadeAt + delayMillis); + } + Assert.assertTrue(count++ < maxRetries); + previousAttemptMadeAt = System.currentTimeMillis(); + return Mono.just(new MockHttpResponse(request, 500)); + } + }) + .policies(new RetryPolicy(new FixedDelay(maxRetries, Duration.ofMillis(delayMillis)))) + .build(); + + HttpResponse response = pipeline.send(new HttpRequest(HttpMethod.GET, + new URL("http://localhost/"))).block(); + } + + @Test + public void exponentialDelayRetry() throws Exception { + final int maxRetries = 5; + final long baseDelayMillis = 1000; + final long maxDelayMillis = 100000; + ExponentialBackoff exponentialBackoff = new ExponentialBackoff(maxRetries, Duration.ofMillis(baseDelayMillis), + Duration.ofMillis(maxDelayMillis)); + final HttpPipeline pipeline = new HttpPipelineBuilder() + .httpClient(new NoOpHttpClient() { + int count = -1; + long previousAttemptMadeAt = -1; + + @Override + public Mono send(HttpRequest request) { + if (count > 0) { + long requestMadeAt = System.currentTimeMillis(); + long expectedToBeMadeAt = + previousAttemptMadeAt + ((1 << (count - 1)) * (long) (baseDelayMillis * 0.95)); + Assert.assertTrue(requestMadeAt >= expectedToBeMadeAt); + } + Assert.assertTrue(count++ < maxRetries); + previousAttemptMadeAt = System.currentTimeMillis(); + return Mono.just(new MockHttpResponse(request, 503)); + } + }) + .policies(new RetryPolicy(exponentialBackoff)) + .build(); + + HttpResponse response = pipeline.send(new HttpRequest(HttpMethod.GET, + new URL("http://localhost/"))).block(); + } + + } From 29edd5aaf81ea94ec1b986ccbdeed0f9fbefd134 Mon Sep 17 00:00:00 2001 From: Connie Yau Date: Wed, 23 Oct 2019 13:29:44 -0700 Subject: [PATCH 51/64] Updating documentation in azure-core (#6011) * Update documentation in exceptions. * Update documentation in HTTP classes. * Update documentation in policies. * Adding headers to PagedFlux * Update documentation and snippets in PagedFluxBase. --- .../core/exception/HttpResponseException.java | 35 ++++++++++--------- .../exception/ServiceResponseException.java | 10 +++--- .../java/com/azure/core/http/HttpClient.java | 8 ++--- .../java/com/azure/core/http/HttpHeaders.java | 3 ++ .../com/azure/core/http/HttpPipeline.java | 28 ++++++++------- .../core/http/HttpPipelineCallContext.java | 18 +++++----- .../core/http/HttpPipelineNextPolicy.java | 7 +++- .../azure/core/http/policy/AddDatePolicy.java | 2 +- .../core/http/policy/AddHeadersPolicy.java | 2 +- .../BearerTokenAuthenticationPolicy.java | 2 +- .../azure/core/http/policy/CookiePolicy.java | 2 +- .../azure/core/http/policy/HostPolicy.java | 4 +-- .../core/http/policy/HttpLogOptions.java | 15 +++++--- .../core/http/policy/HttpLoggingPolicy.java | 2 +- .../core/http/policy/HttpPipelinePolicy.java | 9 +++-- .../azure/core/http/policy/PortPolicy.java | 7 ++-- .../core/http/policy/ProtocolPolicy.java | 4 +-- .../core/http/policy/RequestIdPolicy.java | 2 +- .../azure/core/http/policy/TimeoutPolicy.java | 4 +-- .../core/http/policy/UserAgentPolicy.java | 8 ++--- .../azure/core/http/rest/PagedFluxBase.java | 18 +++++----- .../PagedFluxBaseJavaDocCodeSnippets.java | 4 --- 22 files changed, 106 insertions(+), 88 deletions(-) diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/exception/HttpResponseException.java b/sdk/core/azure-core/src/main/java/com/azure/core/exception/HttpResponseException.java index 3689c873c156..e182b28b1470 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/exception/HttpResponseException.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/exception/HttpResponseException.java @@ -6,8 +6,8 @@ import com.azure.core.http.HttpResponse; /** - * The exception thrown when an unsuccessful response is received - * with http status code (e.g. 3XX, 4XX, 5XX) from the service request. + * The exception thrown when an unsuccessful response is received with http status code (e.g. 3XX, 4XX, 5XX) from the + * service request. */ public class HttpResponseException extends AzureException { @@ -22,10 +22,10 @@ public class HttpResponseException extends AzureException { private final HttpResponse response; /** - * Initializes a new instance of the HttpResponseException class. + * Initializes a new instance of the {@link HttpResponseException} class. * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response + * @param message The exception message or the response content if a message is not available. + * @param response The HTTP response associated with this exception. */ public HttpResponseException(final String message, final HttpResponse response) { super(message); @@ -34,11 +34,11 @@ public HttpResponseException(final String message, final HttpResponse response) } /** - * Initializes a new instance of the HTTPResponseException class. + * Initializes a new instance of the {@link HttpResponseException} class. * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response received from Azure service - * @param value the deserialized response value + * @param message The exception message or the response content if a message is not available. + * @param response The HTTP response associated with this exception. + * @param value The deserialized response value. */ public HttpResponseException(final String message, final HttpResponse response, final Object value) { super(message); @@ -47,11 +47,11 @@ public HttpResponseException(final String message, final HttpResponse response, } /** - * Initializes a new instance of the HttpResponseException class. + * Initializes a new instance of the {@link HttpResponseException} class. * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - * @param cause the Throwable which caused the creation of this HttpResponseException + * @param message The exception message or the response content if a message is not available. + * @param response The HTTP response associated with this exception. + * @param cause The {@link Throwable} which caused the creation of this exception. */ public HttpResponseException(final String message, final HttpResponse response, final Throwable cause) { super(message, cause); @@ -59,16 +59,19 @@ public HttpResponseException(final String message, final HttpResponse response, this.response = response; } - /** - * @return information about the associated HTTP response + * Gets the associated HTTP response that caused the exception. + * + * @return Gets the associated HTTP response. */ public HttpResponse getResponse() { return response; } /** - * @return the HTTP response value + * Gets the deserialized HTTP response value. + * + * @return The deserialized HTTP response value. */ public Object getValue() { return value; diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/exception/ServiceResponseException.java b/sdk/core/azure-core/src/main/java/com/azure/core/exception/ServiceResponseException.java index 51a60c862200..1d8e679c92a4 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/exception/ServiceResponseException.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/exception/ServiceResponseException.java @@ -5,10 +5,12 @@ /** * A runtime exception indicating service response failure caused by one of the following scenarios: - * 1. The request was sent, but the client failed to understand the response. (Not in the right format, partial response - * etc.) - * 2. The connection may have timed out. These errors can be retried for idempotent or - * safe operations. + * + *
      + *
    1. The request was sent, but the client failed to understand the response. (Not in the right format, partial + * response, etc.).
    2. + *
    3. The connection may have timed out. These errors can be retried for idempotent or safe operations.
    4. + *
    */ public class ServiceResponseException extends AzureException { diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpClient.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpClient.java index 87d7d14bc5da..1dabeee64758 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpClient.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpClient.java @@ -13,15 +13,15 @@ public interface HttpClient { /** * Send the provided request asynchronously. * - * @param request The HTTP request to send - * @return A {@link Mono} that emits response asynchronously + * @param request The HTTP request to send. + * @return A {@link Mono} that emits response asynchronously. */ Mono send(HttpRequest request); /** - * Create default HttpClient instance. + * Create default {@link HttpClient} instance. * - * @return the HttpClient + * @return A new instance of the {@link HttpClient}. */ static HttpClient createDefault() { return HttpClientProviders.createInstance(); diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpHeaders.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpHeaders.java index 429a2a82ac6d..e716d18ff9ad 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpHeaders.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpHeaders.java @@ -132,6 +132,9 @@ public Map toMap() { return result; } + /** + * {@inheritDoc} + */ @Override public Iterator iterator() { return headers.values().iterator(); diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipeline.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipeline.java index a406fd27673a..01fe1d91401f 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipeline.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipeline.java @@ -11,7 +11,7 @@ import java.util.Objects; /** - * The http pipeline. + * The HTTP pipeline that HTTP requests and responses will flow through. */ public final class HttpPipeline { private final HttpClient httpClient; @@ -36,6 +36,7 @@ public final class HttpPipeline { /** * Get the policy at the passed index in the pipeline. + * * @param index index of the the policy to retrieve. * @return the policy stored at that index. */ @@ -61,11 +62,11 @@ public HttpClient getHttpClient() { } /** - * Wraps the request in a context and send it through pipeline. + * Wraps the {@code request} in a context and sends it through pipeline. * - * @param request the request - * @return a publisher upon subscription flows the context through policies, sends the request and emits response - * upon completion + * @param request The HTTP request to send. + * @return A publisher upon subscription flows the context through policies, sends the request, and emits response + * upon completion. */ public Mono send(HttpRequest request) { return this.send(new HttpPipelineCallContext(request)); @@ -73,21 +74,22 @@ public Mono send(HttpRequest request) { /** * Wraps the request in a context with additional metadata and sends it through the pipeline. - * @param request the request - * @param data additional metadata to pass along in the request - * @return a publisher upon subscription flows the context through policies, sends the request and emits response - * upon completion + * + * @param request THe HTTP request to send. + * @param data Additional metadata to pass along with the request. + * @return A publisher upon subscription flows the context through policies, sends the request, and emits response + * upon completion. */ public Mono send(HttpRequest request, Context data) { return this.send(new HttpPipelineCallContext(request, data)); } /** - * Sends the context (containing request) through pipeline. + * Sends the context (containing an HTTP request) through pipeline. * - * @param context the request context - * @return a publisher upon subscription flows the context through policies, sends the request and emits response - * upon completion + * @param context The request context. + * @return A publisher upon subscription flows the context through policies, sends the request and emits response + * upon completion. */ public Mono send(HttpPipelineCallContext context) { // Return deferred to mono for complete lazy behaviour. diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineCallContext.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineCallContext.java index 258ebed88ca9..569ed90718bc 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineCallContext.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineCallContext.java @@ -49,8 +49,8 @@ public final class HttpPipelineCallContext { /** * Stores a key-value data in the context. * - * @param key the key - * @param value the value + * @param key The key to add. + * @param value The value to associate with that key. */ public void setData(String key, Object value) { this.data = this.data.addData(key, value); @@ -59,27 +59,27 @@ public void setData(String key, Object value) { /** * Gets a value with the given key stored in the context. * - * @param key the key - * @return the value + * @param key The key to find in the context. + * @return The value associated with the key. */ public Optional getData(String key) { return this.data.getData(key); } /** - * Get the http request. + * Gets the HTTP request. * - * @return the request. + * @return The HTTP request. */ public HttpRequest getHttpRequest() { return this.httpRequest; } /** - * Sets the http request object in the context. + * Sets the HTTP request object in the context. * - * @param request request object - * @return HttpPipelineCallContext + * @param request The HTTP request. + * @return The updated HttpPipelineCallContext object. */ public HttpPipelineCallContext setHttpRequest(HttpRequest request) { this.httpRequest = request; diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineNextPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineNextPolicy.java index bee7df13b10b..afd6a48a9cd5 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineNextPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineNextPolicy.java @@ -31,7 +31,7 @@ public class HttpPipelineNextPolicy { /** * Invokes the next {@link HttpPipelinePolicy}. * - * @return a publisher upon subscription invokes next policy and emits response from the policy. + * @return A publisher which upon subscription invokes next policy and emits response from the policy. */ public Mono process() { final int size = this.pipeline.getPolicyCount(); @@ -47,6 +47,11 @@ public Mono process() { } } + /** + * Creates a new instance of this instance. + * + * @return A new instance of this next pipeline policy. + */ @Override public HttpPipelineNextPolicy clone() { HttpPipelineNextPolicy cloned = new HttpPipelineNextPolicy(this.pipeline, this.context); diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/AddDatePolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/AddDatePolicy.java index 75d3cc4b40bb..3b9265ea31f3 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/AddDatePolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/AddDatePolicy.java @@ -14,7 +14,7 @@ import java.util.Locale; /** - * The Pipeline policy that adds Date header in RFC 1123 format when sending an HTTP request. + * The pipeline policy that adds a "Date" header in RFC 1123 format when sending an HTTP request. */ public class AddDatePolicy implements HttpPipelinePolicy { private final DateTimeFormatter format = DateTimeFormatter diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/AddHeadersPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/AddHeadersPolicy.java index 347f9c05365c..b2403e9ad987 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/AddHeadersPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/AddHeadersPolicy.java @@ -11,7 +11,7 @@ import reactor.core.publisher.Mono; /** - * The Pipeline policy that adds a particular set of headers to HTTP requests. + * The pipeline policy that adds a particular set of headers to HTTP requests. */ public class AddHeadersPolicy implements HttpPipelinePolicy { private final HttpHeaders headers; diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/BearerTokenAuthenticationPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/BearerTokenAuthenticationPolicy.java index c0b3bf1eda68..548810b0f0b2 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/BearerTokenAuthenticationPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/BearerTokenAuthenticationPolicy.java @@ -14,7 +14,7 @@ import java.util.Objects; /** - * The Pipeline policy that applies a token credential to an HTTP request + * The pipeline policy that applies a token credential to an HTTP request * with "Bearer" scheme. */ public class BearerTokenAuthenticationPolicy implements HttpPipelinePolicy { diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/CookiePolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/CookiePolicy.java index 0f84ba0d0a20..fe9f7980ec12 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/CookiePolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/CookiePolicy.java @@ -23,7 +23,7 @@ import java.util.Map; /** - * The Pipeline policy that which stores cookies based on the response Set-Cookie header and adds cookies to requests. + * The pipeline policy that which stores cookies based on the response "Set-Cookie" header and adds cookies to requests. */ public class CookiePolicy implements HttpPipelinePolicy { private final ClientLogger logger = new ClientLogger(CookiePolicy.class); diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HostPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HostPolicy.java index 0d93d809698c..4ee411323c45 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HostPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HostPolicy.java @@ -14,7 +14,7 @@ import java.net.MalformedURLException; /** - * The Pipeline policy that adds the given host to each HttpRequest. + * The pipeline policy that adds the given host to each HttpRequest. */ public class HostPolicy implements HttpPipelinePolicy { private final String host; @@ -39,7 +39,7 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN context.getHttpRequest().setUrl(urlBuilder.setHost(host).toURL()); result = next.process(); } catch (MalformedURLException e) { - result = Mono.error(new RuntimeException(String.format("Host URL '%s' is invalid.", + result = Mono.error(new RuntimeException(String.format("Host URL '%s' is invalid.", host), e)); } return result; diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogOptions.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogOptions.java index c715f925b2da..f5f3dcd553ff 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogOptions.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogOptions.java @@ -41,6 +41,9 @@ public class HttpLogOptions { "User-Agent" ); + /** + * Creates a new instance that does not log any information about HTTP requests or responses. + */ public HttpLogOptions() { logLevel = HttpLogDetailLevel.NONE; allowedHeaderNames = new HashSet<>(DEFAULT_HEADERS_WHITELIST); @@ -59,7 +62,7 @@ public HttpLogDetailLevel getLogLevel() { /** * Sets the level of detail to log on Http messages. * - *

    If logLevel is not provided, default value of {@link HttpLogDetailLevel#NONE} is set.

    + *

    If logLevel is not provided, default value of {@link HttpLogDetailLevel#NONE} is set.

    * * @param logLevel The {@link HttpLogDetailLevel}. * @return The updated HttpLogOptions object. @@ -80,12 +83,14 @@ public Set getAllowedHeaderNames() { /** * Sets the given whitelisted headers that should be logged. + * *

    - * This method sets the provided header names to be the whitelisted header names which will be logged for all http - * requests and responses, overwriting any previously configured headers, including the default set. - * Additionally, user can use {@link HttpLogOptions#addAllowedHeaderName(String)} - * or {@link HttpLogOptions#getAllowedHeaderNames()} to add or remove more headers names to the existing set of + * This method sets the provided header names to be the whitelisted header names which will be logged for all HTTP + * requests and responses, overwriting any previously configured headers, including the default set. Additionally, + * users can use {@link HttpLogOptions#addAllowedHeaderName(String)} or + * {@link HttpLogOptions#getAllowedHeaderNames()} to add or remove more headers names to the existing set of * allowed header names. + *

    * * @param allowedHeaderNames The list of whitelisted header names from the user. * @return The updated HttpLogOptions object. diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java index 98e74931be83..ba7c188e3460 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java @@ -25,7 +25,7 @@ import java.util.stream.Collectors; /** - * The Pipeline policy that handles logging of HTTP requests and responses. + * The pipeline policy that handles logging of HTTP requests and responses. */ public class HttpLoggingPolicy implements HttpPipelinePolicy { private static final ObjectMapper PRETTY_PRINTER = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT); diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpPipelinePolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpPipelinePolicy.java index e05c56f7c9fe..7ee72eb7fb17 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpPipelinePolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpPipelinePolicy.java @@ -3,13 +3,16 @@ package com.azure.core.http.policy; +import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineCallContext; import com.azure.core.http.HttpPipelineNextPolicy; import com.azure.core.http.HttpResponse; import reactor.core.publisher.Mono; /** - * Pipeline policy. + * A policy within the {@link HttpPipeline}. + * + * @see HttpPipeline */ @FunctionalInterface public interface HttpPipelinePolicy { @@ -17,8 +20,8 @@ public interface HttpPipelinePolicy { * Process provided request context and invokes the next policy. * * @param context request context - * @param next the next policy to invoke - * @return publisher that initiate the request upon subscription and emits response on completion. + * @param next The next policy to invoke. + * @return A publisher that initiates the request upon subscription and emits a response on completion. */ Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next); } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/PortPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/PortPolicy.java index ff7603a753d8..470937cb5559 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/PortPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/PortPolicy.java @@ -5,6 +5,7 @@ import com.azure.core.http.HttpPipelineCallContext; import com.azure.core.http.HttpPipelineNextPolicy; +import com.azure.core.http.HttpRequest; import com.azure.core.http.HttpResponse; import com.azure.core.implementation.http.UrlBuilder; import com.azure.core.util.logging.ClientLogger; @@ -13,7 +14,7 @@ import java.net.MalformedURLException; /** - * The Pipeline policy that adds a given port to each HttpRequest. + * The pipeline policy that adds a given port to each {@link HttpRequest}. */ public class PortPolicy implements HttpPipelinePolicy { private final int port; @@ -21,10 +22,10 @@ public class PortPolicy implements HttpPipelinePolicy { private final ClientLogger logger = new ClientLogger(PortPolicy.class); /** - * Create a new PortPolicy object. + * Creates a new PortPolicy object. * * @param port The port to set. - * @param overwrite Whether or not to overwrite a HttpRequest's port if it already has one. + * @param overwrite Whether or not to overwrite a {@link HttpRequest HttpRequest's} port if it already has one. */ public PortPolicy(int port, boolean overwrite) { this.port = port; diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/ProtocolPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/ProtocolPolicy.java index 1def3cb6f53d..601d5f6a228c 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/ProtocolPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/ProtocolPolicy.java @@ -13,7 +13,7 @@ import java.net.MalformedURLException; /** - * The Pipeline policy that adds a given protocol to each HttpRequest. + * The pipeline policy that adds a given protocol to each HttpRequest. */ public class ProtocolPolicy implements HttpPipelinePolicy { private final String protocol; @@ -21,7 +21,7 @@ public class ProtocolPolicy implements HttpPipelinePolicy { private final ClientLogger logger = new ClientLogger(ProtocolPolicy.class); /** - * Create a new ProtocolPolicy. + * Creates a new ProtocolPolicy. * * @param protocol The protocol to set. * @param overwrite Whether or not to overwrite a HttpRequest's protocol if it already has one. diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RequestIdPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RequestIdPolicy.java index 654e57611b6d..5fd67f4d3e4c 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RequestIdPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RequestIdPolicy.java @@ -11,7 +11,7 @@ import java.util.UUID; /** - * The Pipeline policy that puts a UUID in the request header. Azure uses the request id as + * The pipeline policy that puts a UUID in the request header. Azure uses the request id as * the unique identifier for the request. */ public class RequestIdPolicy implements HttpPipelinePolicy { diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/TimeoutPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/TimeoutPolicy.java index fe1c06905147..378f3cf435d7 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/TimeoutPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/TimeoutPolicy.java @@ -11,9 +11,7 @@ import java.time.Duration; /** - * The Pipeline policy that limits the time allowed between sending a request - * and receiving the response. - * + * The pipeline policy that limits the time allowed between sending a request and receiving the response. */ public class TimeoutPolicy implements HttpPipelinePolicy { private final Duration timoutDuration; diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/UserAgentPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/UserAgentPolicy.java index 8a002e13970d..38e0081f2a00 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/UserAgentPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/UserAgentPolicy.java @@ -11,10 +11,10 @@ import reactor.core.publisher.Mono; /** - * Pipeline policy that adds 'User-Agent' header to a request. + * Pipeline policy that adds "User-Agent" header to a request. * - * Format for User-Agent policy is outlined in https://azuresdkspecs.z5.web.core.windows.net/JavaSpec.html under "Client - * Library Usage Telemetry". + * The format for the "User-Agent" string is outlined in + * To process one item at a time, simply subscribe to this flux as shown below

    - *

    Code sample

    + *

    Process each item in Flux

    + *

    To process one item at a time, simply subscribe to this Flux.

    * {@codesnippet com.azure.core.http.rest.pagedfluxbase.items} * - *

    To process one page at a time, use {@link #byPage} method as shown below

    - *

    Code sample

    + *

    Process one page at a time

    + *

    To process one page at a time, starting from the beginning, use {@link #byPage() byPage()} method.

    * {@codesnippet com.azure.core.http.rest.pagedfluxbase.pages} * - *

    To process items one page at a time starting from any page associated with a continuation token, - * use {@link #byPage(String)} as shown below

    - *

    Code sample

    + *

    Process items starting from a continuation token

    + *

    To process items one page at a time starting from any page associated with a continuation token, use + * {@link #byPage(String)}.

    * {@codesnippet com.azure.core.http.rest.pagedfluxbase.pagesWithContinuationToken} * - * @param The type of items in {@code P} - * @param

    The {@link PagedResponse} holding items of type {@code T} + * @param The type of items in {@code P}. + * @param

    The {@link PagedResponse} holding items of type {@code T}. * * @see PagedResponse * @see Page diff --git a/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedFluxBaseJavaDocCodeSnippets.java b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedFluxBaseJavaDocCodeSnippets.java index da69ba025b74..2f08fa7dd1d8 100644 --- a/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedFluxBaseJavaDocCodeSnippets.java +++ b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedFluxBaseJavaDocCodeSnippets.java @@ -22,7 +22,6 @@ public final class PagedFluxBaseJavaDocCodeSnippets { public void classDocSnippet() { PagedFluxBase> pagedFluxBase = createAnInstance(); // BEGIN: com.azure.core.http.rest.pagedfluxbase.items - // Subscribe to process one item at a time pagedFluxBase .log() .subscribe(item -> System.out.println("Processing item " + item), @@ -31,7 +30,6 @@ public void classDocSnippet() { // END: com.azure.core.http.rest.pagedfluxbase.items // BEGIN: com.azure.core.http.rest.pagedfluxbase.pages - // Subscribe to process one page at a time from the beginning pagedFluxBase .byPage() .log() @@ -41,8 +39,6 @@ public void classDocSnippet() { // END: com.azure.core.http.rest.pagedfluxbase.pages // BEGIN: com.azure.core.http.rest.pagedfluxbase.pagesWithContinuationToken - // Subscribe to process one page at a time starting from a page associated with - // a continuation token String continuationToken = getContinuationToken(); pagedFluxBase .byPage(continuationToken) From ef845bef9b8162e9bd2e62e26d65fe0135432138 Mon Sep 17 00:00:00 2001 From: Sameeksha Vaity Date: Wed, 23 Oct 2019 14:00:36 -0700 Subject: [PATCH 52/64] Integration tests for Tracing (#5747) --- .../checkstyle/checkstyle-suppressions.xml | 4 - .../amqp/implementation/TracerProvider.java | 2 +- .../CHANGELOG.md | 14 +- .../azure-core-tracing-opencensus/README.md | 4 +- .../azure-core-tracing-opencensus/pom.xml | 6 + .../tracing/opencensus/OpenCensusTracer.java | 35 ++- .../implementation/AmqpTraceUtil.java | 9 +- .../src/samples/AsyncListKeyVaultSecrets.md | 6 +- .../AsyncQueueClientEnqueueMessages.md | 2 +- .../src/samples/ListeKeyVaultSecrets.md | 6 +- .../src/samples/PublishEvents.md | 2 +- .../src/samples/QueueClientEnqueueMessages.md | 2 +- .../opencensus/OpenCensusTracerTest.java | 272 ++++++++++++++++-- .../azure/core/util/tracing/ProcessKind.java | 2 +- .../com/azure/core/util/tracing/Tracer.java | 6 +- .../tracing/TracerJavaDocCodeSnippets.java | 10 +- .../eventhubs/EventHubAsyncProducer.java | 2 +- .../eventhubs/EventHubAsyncProducerTest.java | 6 +- .../eventhubs/EventHubProducerTest.java | 6 +- 19 files changed, 317 insertions(+), 79 deletions(-) diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml index ae280583bdcb..5ef1b23fd9dc 100755 --- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml +++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml @@ -76,10 +76,6 @@ - - - - diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/TracerProvider.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/TracerProvider.java index e9b5835acf6f..e9b1569471a8 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/TracerProvider.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/TracerProvider.java @@ -120,7 +120,7 @@ private String getSpanName(ProcessKind processKind) { case SEND: spanName += "send"; break; - case RECEIVE: + case MESSAGE: spanName += "message"; break; case PROCESS: diff --git a/sdk/core/azure-core-tracing-opencensus/CHANGELOG.md b/sdk/core/azure-core-tracing-opencensus/CHANGELOG.md index 98a9a77ed70d..458a736a39db 100644 --- a/sdk/core/azure-core-tracing-opencensus/CHANGELOG.md +++ b/sdk/core/azure-core-tracing-opencensus/CHANGELOG.md @@ -1,7 +1,15 @@ # Release History +## Version 1.0.0-preview.4 (2019-10-25) +For details on the Azure SDK for Java (November 2019 Preview) release refer to the [release announcement](https://aka.ms/azure-sdk-preview5-java). + +Version 1.0.0-preview.4 added tracing support for AMQP and HTTP client libraries across different languages and platforms as possible. +See this package's + [documentation](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core-tracing-opencensus/README.md) and + [samples](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/core/azure-core-tracing-opencensus/src/samples) demonstrate the new API. + ## Version 1.0.0-preview.3 (2019-10-07) -For details on the Azure SDK for Java (October 2019 Preview) release refer to the [release announcement](https://aka.ms/azure-sdk-preview3-java). +For details on the Azure SDK for Java (October 2019 Preview) release refer to the [release announcement](https://aka.ms/azure-sdk-preview4-java). Version 1.0.0-preview.3 added tracing support for AMQP client libraries across different languages and platforms as possible. See this package's @@ -9,11 +17,11 @@ See this package's [samples](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus) demonstrate the new API. ## Version 1.0.0-preview.2 (2019-09-09) -For details on the Azure SDK for Java (August 2019 Preview) release refer to the [release announcement](https://aka.ms/azure-sdk-preview2-java). +For details on the Azure SDK for Java (August 2019 Preview) release refer to the [release announcement](https://aka.ms/azure-sdk-preview3-java). Version 1.0.0-preview.2 added tracing support to all of the HTTP based Azure SDK Java libraries. -## Version 1.0.0-preview.1 +## Version 1.0.0-preview.1 (2019-08-06) Version 1.0.0-preview.1 is the first preview of our efforts to provide low level interfaces and helper methods to support tracing for Java client libraries. This library includes [OpenTelemetry](https://opentelemetry.io/) implementation of the interface, For more information about this, and preview releases of other Azure SDK libraries, please visit https://aka.ms/azure-sdk-preview2-java. diff --git a/sdk/core/azure-core-tracing-opencensus/README.md b/sdk/core/azure-core-tracing-opencensus/README.md index 6516b02747db..7a3e7556ebd3 100644 --- a/sdk/core/azure-core-tracing-opencensus/README.md +++ b/sdk/core/azure-core-tracing-opencensus/README.md @@ -53,7 +53,7 @@ Netty and include OkHTTP client in your pom.xml. com.azure azure-core-http-okhttp - 1.0.0-preview.7 + 1.0.0 ``` [//]: # ({x-version-update-end}) @@ -194,7 +194,7 @@ These following samples provide example code for additional scenarios commonly e * Create new version of an existing secret. * List versions of an existing secret. #### Publish multiple Events to an Event Hub -* [PublishEvents.java][sample_publish_events] - Contains sample for publishing multiple events with tracing support. +* [PublishEvents][sample_publish_events] - Contains sample for publishing multiple events with tracing support. ### Additional Documentation For more extensive documentation on OpenCensus, see the [API reference documentation][opencensus]. diff --git a/sdk/core/azure-core-tracing-opencensus/pom.xml b/sdk/core/azure-core-tracing-opencensus/pom.xml index fd5855497498..7790119323a3 100644 --- a/sdk/core/azure-core-tracing-opencensus/pom.xml +++ b/sdk/core/azure-core-tracing-opencensus/pom.xml @@ -43,6 +43,12 @@ + + io.opencensus + opencensus-impl + 0.20.0 + test + junit junit diff --git a/sdk/core/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/OpenCensusTracer.java b/sdk/core/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/OpenCensusTracer.java index 286f745e9211..6f38897a94ff 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/OpenCensusTracer.java +++ b/sdk/core/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/OpenCensusTracer.java @@ -29,16 +29,16 @@ * context propagation. Singleton OpenCensus tracer capable of starting and exporting spans. * *

    - * This helper class supports W3C distributed tracing protocol and injects SpanContext into the outgoing HTTP - * and AMQP requests. + * This helper class supports W3C distributed tracing protocol and injects SpanContext into the outgoing HTTP and AMQP + * requests. */ public class OpenCensusTracer implements com.azure.core.util.tracing.Tracer { private static final Tracer TRACER = Tracing.getTracer(); // standard attributes with AMQP request - private static final String COMPONENT = "component"; - private static final String MESSAGE_BUS_DESTINATION = "message_bus.destination"; - private static final String PEER_ENDPOINT = "peer.address"; + static final String COMPONENT = "component"; + static final String MESSAGE_BUS_DESTINATION = "message_bus.destination"; + static final String PEER_ENDPOINT = "peer.address"; private final ClientLogger logger = new ClientLogger(OpenCensusTracer.class); @@ -46,11 +46,11 @@ public class OpenCensusTracer implements com.azure.core.util.tracing.Tracer { * {@inheritDoc} */ @Override - public Context start(String methodName, Context context) { - Objects.requireNonNull(methodName, "'methodName' cannot be null."); + public Context start(String spanName, Context context) { + Objects.requireNonNull(spanName, "'spanName' cannot be null."); Objects.requireNonNull(context, "'context' cannot be null."); - SpanBuilder spanBuilder = getSpanBuilder(methodName, context); + SpanBuilder spanBuilder = getSpanBuilder(spanName, context); Span span = spanBuilder.startSpan(); return context.addData(PARENT_SPAN_KEY, span); @@ -61,7 +61,7 @@ public Context start(String methodName, Context context) { */ @Override public Context start(String spanName, Context context, ProcessKind processKind) { - Objects.requireNonNull(spanName, "'methodName' cannot be null."); + Objects.requireNonNull(spanName, "'spanName' cannot be null."); Objects.requireNonNull(context, "'context' cannot be null."); Objects.requireNonNull(processKind, "'processKind' cannot be null."); @@ -77,10 +77,10 @@ public Context start(String spanName, Context context, ProcessKind processKind) addSpanRequestAttributes(span, context, spanName); } return context.addData(PARENT_SPAN_KEY, span); - case RECEIVE: + case MESSAGE: spanBuilder = getSpanBuilder(spanName, context); span = spanBuilder.startSpan(); - // Add diagnostic Id and traceheaders to Context + // Add diagnostic Id and trace-headers to Context context = setContextData(span); return context.addData(PARENT_SPAN_KEY, span); case PROCESS: @@ -191,7 +191,6 @@ public Context extractContext(String diagnosticId, Context context) { * @return The returned {@link Span} and the scope in a {@link Context} object. */ private Context startScopedSpan(String spanName, Context context) { - Objects.requireNonNull(spanName, "'spanName' cannot be null."); Objects.requireNonNull(context, "'context' cannot be null."); Span span; SpanContext spanContext = getSpanContext(context); @@ -240,7 +239,6 @@ private Context setContextData(Span span) { */ private void addSpanRequestAttributes(Span span, Context context, String spanName) { Objects.requireNonNull(span, "'span' cannot be null."); - span.putAttribute(COMPONENT, AttributeValue.stringAttributeValue(parseComponentValue(spanName))); span.putAttribute( MESSAGE_BUS_DESTINATION, @@ -251,13 +249,20 @@ private void addSpanRequestAttributes(Span span, Context context, String spanNam } /** - * Extracts component name from the given span name. + * Extracts the component name from the given span name. * * @param spanName The spanName containing the component name. * @return The component name contained in the context. */ private static String parseComponentValue(String spanName) { - return spanName.substring(spanName.indexOf(".") + 1, spanName.lastIndexOf(".")); + if (spanName != null && spanName.length() > 0) { + int componentNameStartIndex = spanName.indexOf("."); + int componentNameEndIndex = spanName.lastIndexOf("."); + if (componentNameStartIndex != -1 && componentNameEndIndex != -1) { + return spanName.substring(componentNameStartIndex + 1, componentNameEndIndex); + } + } + return ""; } /** diff --git a/sdk/core/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/implementation/AmqpTraceUtil.java b/sdk/core/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/implementation/AmqpTraceUtil.java index 25c330c0d002..a5d4facc2f60 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/implementation/AmqpTraceUtil.java +++ b/sdk/core/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/implementation/AmqpTraceUtil.java @@ -24,13 +24,12 @@ public static Status parseStatusMessage(String statusMessage, Throwable error) { ? Status.UNKNOWN.withDescription(message) : Status.UNKNOWN.withDescription(error.getClass().getSimpleName()); - } else if (statusMessage.equalsIgnoreCase("success")) { + } + if (statusMessage != null && statusMessage.equalsIgnoreCase("success")) { // No error. return Status.OK; - } else { - // return status with custom error condition message - return Status.UNKNOWN.withDescription(statusMessage); } + // return status with custom error condition message + return Status.UNKNOWN.withDescription(statusMessage); } } - diff --git a/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncListKeyVaultSecrets.md b/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncListKeyVaultSecrets.md index 4233903ed827..cdcce71533da 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncListKeyVaultSecrets.md +++ b/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncListKeyVaultSecrets.md @@ -11,7 +11,7 @@ Following documentation describes instructions to run a sample program for listi com.azure azure-security-keyvault-secrets - 4.0.0-preview.5 + 4.0.0 com.azure @@ -22,12 +22,12 @@ Following documentation describes instructions to run a sample program for listi ``` [//]: # ({x-version-update-end}) [//]: # ({x-version-update-start;com.azure:azure-core-http-okhttp;current}) -``` +```xml com.azure azure-core-http-okhttp - 1.0.0-preview.4 + 1.0.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncQueueClientEnqueueMessages.md b/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncQueueClientEnqueueMessages.md index 47fb15d0d51f..8af4276d783c 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncQueueClientEnqueueMessages.md +++ b/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncQueueClientEnqueueMessages.md @@ -12,7 +12,7 @@ messages asynchronously on queue client with tracing instrumentation for Java SD com.azure azure-storage-queue - 12.0.0-preview.4 + 12.0.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-tracing-opencensus/src/samples/ListeKeyVaultSecrets.md b/sdk/core/azure-core-tracing-opencensus/src/samples/ListeKeyVaultSecrets.md index 4710e879db7c..a91cfb03be57 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/samples/ListeKeyVaultSecrets.md +++ b/sdk/core/azure-core-tracing-opencensus/src/samples/ListeKeyVaultSecrets.md @@ -11,7 +11,7 @@ Following documentation describes instructions to run a sample program for listi com.azure azure-security-keyvault-secrets - 4.0.0-preview.5 + 4.0.0 com.azure @@ -22,12 +22,12 @@ Following documentation describes instructions to run a sample program for listi ``` [//]: # ({x-version-update-end}) [//]: # ({x-version-update-start;com.azure:azure-core-http-okhttp;current}) -``` +```xml com.azure azure-core-http-okhttp - 1.0.0-preview.4 + 1.0.0 ``` ### Adding the Azure core tracing OpenCensus plugin package to your project: diff --git a/sdk/core/azure-core-tracing-opencensus/src/samples/PublishEvents.md b/sdk/core/azure-core-tracing-opencensus/src/samples/PublishEvents.md index ec9415ad92ca..336b3b37fa68 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/samples/PublishEvents.md +++ b/sdk/core/azure-core-tracing-opencensus/src/samples/PublishEvents.md @@ -7,7 +7,7 @@ Following documentation describes instructions to run a sample program for publi ### Adding the Azure client library for Event Hubs package to your project: [//]: # ({x-version-update-start;com.azure:azure-messaging-eventhubs;current}) -```XML +```xml com.azure azure-messaging-eventhubs diff --git a/sdk/core/azure-core-tracing-opencensus/src/samples/QueueClientEnqueueMessages.md b/sdk/core/azure-core-tracing-opencensus/src/samples/QueueClientEnqueueMessages.md index aa560fb967e7..9f2bb6a6ed62 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/samples/QueueClientEnqueueMessages.md +++ b/sdk/core/azure-core-tracing-opencensus/src/samples/QueueClientEnqueueMessages.md @@ -12,7 +12,7 @@ messages on queue client with tracing instrumentation for Java SDK libraries. com.azure azure-storage-queue - 12.0.0-preview.4 + 12.0.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/OpenCensusTracerTest.java b/sdk/core/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/OpenCensusTracerTest.java index 2fa52d55eae6..8913df1e4e0a 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/OpenCensusTracerTest.java +++ b/sdk/core/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/OpenCensusTracerTest.java @@ -3,29 +3,74 @@ package com.azure.core.tracing.opencensus; -import static com.azure.core.tracing.opencensus.OpenCensusTracer.DIAGNOSTIC_ID_KEY; -import com.azure.core.util.tracing.ProcessKind; -import com.azure.core.tracing.opencensus.implementation.AmqpPropagationFormatUtil; import com.azure.core.util.Context; -import static com.azure.core.util.tracing.Tracer.PARENT_SPAN_KEY; -import static com.azure.core.util.tracing.Tracer.SPAN_CONTEXT_KEY; +import com.azure.core.util.tracing.ProcessKind; +import io.opencensus.implcore.trace.RecordEventsSpanImpl; +import io.opencensus.trace.AttributeValue; +import io.opencensus.trace.Link; import io.opencensus.trace.Span; +import io.opencensus.trace.SpanId; +import io.opencensus.trace.Tracer; +import io.opencensus.trace.Tracing; +import io.opencensus.trace.config.TraceConfig; +import io.opencensus.trace.config.TraceParams; +import io.opencensus.trace.samplers.Samplers; +import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import static junit.framework.TestCase.assertEquals; -import static junit.framework.TestCase.assertNotNull; -import static junit.framework.TestCase.assertTrue; +import java.util.Map; + +import static com.azure.core.tracing.opencensus.OpenCensusTracer.COMPONENT; +import static com.azure.core.tracing.opencensus.OpenCensusTracer.MESSAGE_BUS_DESTINATION; +import static com.azure.core.tracing.opencensus.OpenCensusTracer.PEER_ENDPOINT; +import static com.azure.core.util.tracing.Tracer.DIAGNOSTIC_ID_KEY; +import static com.azure.core.util.tracing.Tracer.ENTITY_PATH_KEY; +import static com.azure.core.util.tracing.Tracer.HOST_NAME_KEY; +import static com.azure.core.util.tracing.Tracer.PARENT_SPAN_KEY; +import static com.azure.core.util.tracing.Tracer.SPAN_CONTEXT_KEY; -// TODO: samvaity - Need to add integration test - https://github.com/Azure/azure-sdk-for-java/issues/5156 +/** + * Tests OpenCensus tracing package using opencensus-impl + */ public class OpenCensusTracerTest { private static final String METHOD_NAME = "Azure.eventhubs.send"; + private static final String HOSTNAME_VALUE = "testEventDataNameSpace.servicebus.windows.net"; + private static final String ENTITY_PATH_VALUE = "test"; + private static final String COMPONENT_VALUE = "eventhubs"; private OpenCensusTracer openCensusTracer; + private Tracer tracer; + private Context tracingContext; + private Span parentSpan; + private io.opencensus.common.Scope scope; @Before - public void setup() { + public void setUp() { + System.out.println("Running: setUp"); openCensusTracer = new OpenCensusTracer(); + // Configure 100% sample rate, otherwise, few traces will be sampled. + final TraceConfig traceConfig = Tracing.getTraceConfig(); + final TraceParams activeTraceParams = traceConfig.getActiveTraceParams(); + traceConfig.updateActiveTraceParams(activeTraceParams.toBuilder().setSampler(Samplers.alwaysSample()).build()); + // Get the global singleton Tracer object. + tracer = Tracing.getTracer(); + // Start user parent span. + scope = tracer.spanBuilder(PARENT_SPAN_KEY).startScopedSpan(); + parentSpan = tracer.getCurrentSpan(); + // Add parent span to tracingContext + tracingContext = new Context(PARENT_SPAN_KEY, parentSpan); + } + + @After + public void tearDown() { + System.out.println("Running: tearDown"); + // Clear out tracer and tracingContext objects + tracer = null; + tracingContext = null; + Assert.assertNull(tracer); + Assert.assertNull(tracingContext); + scope.close(); } @Test(expected = NullPointerException.class) @@ -35,13 +80,119 @@ public void startSpanNullPointerException() { } @Test - public void startSpanReturnsNewSpanTest() { + public void startSpanParentContextFlowTest() { + // Arrange + final SpanId parentSpanId = parentSpan.getContext().getSpanId(); + + // Act + final Context updatedContext = openCensusTracer.start(METHOD_NAME, tracingContext); + + // Assert + assertSpanWithExplicitParent(updatedContext, parentSpanId); + final RecordEventsSpanImpl recordEventsSpan = + (RecordEventsSpanImpl) updatedContext.getData(PARENT_SPAN_KEY).get(); + Assert.assertNull(recordEventsSpan.getKind()); + } + + @Test + public void startSpanTestNoUserParent() { // Act final Context updatedContext = openCensusTracer.start(METHOD_NAME, Context.NONE); // Assert Assert.assertNotNull(updatedContext.getData(PARENT_SPAN_KEY)); - assertTrue(updatedContext.getData(PARENT_SPAN_KEY).get() instanceof Span); + + //verify still get a valid span implementation + Assert.assertTrue(updatedContext.getData(PARENT_SPAN_KEY).get() instanceof RecordEventsSpanImpl); + final RecordEventsSpanImpl recordEventsSpan = + (RecordEventsSpanImpl) updatedContext.getData(PARENT_SPAN_KEY).get(); + + Assert.assertEquals(METHOD_NAME, recordEventsSpan.getName()); + Assert.assertFalse(recordEventsSpan.toSpanData().getHasRemoteParent()); + Assert.assertNotNull(recordEventsSpan.toSpanData().getParentSpanId()); + } + + @Test + public void startSpanProcessKindSend() { + // Arrange + final SpanId parentSpanId = parentSpan.getContext().getSpanId(); + // Add additional metadata to spans for SEND + final Context traceContext = tracingContext.addData(ENTITY_PATH_KEY, ENTITY_PATH_VALUE) + .addData(HOST_NAME_KEY, HOSTNAME_VALUE); + + // Act + final Context updatedContext = openCensusTracer.start(METHOD_NAME, traceContext, ProcessKind.SEND); + + // Assert + // verify span created with explicit parent when for Process Kind SEND + assertSpanWithExplicitParent(updatedContext, parentSpanId); + final RecordEventsSpanImpl recordEventsSpan = + (RecordEventsSpanImpl) updatedContext.getData(PARENT_SPAN_KEY).get(); + Assert.assertEquals(Span.Kind.CLIENT, recordEventsSpan.getKind()); + + // verify span attributes + final Map attributeMap = recordEventsSpan.toSpanData().getAttributes() + .getAttributeMap(); + Assert.assertEquals(attributeMap.get(COMPONENT), AttributeValue.stringAttributeValue(COMPONENT_VALUE)); + Assert.assertEquals(attributeMap.get(MESSAGE_BUS_DESTINATION), + AttributeValue.stringAttributeValue(ENTITY_PATH_VALUE)); + Assert.assertEquals(attributeMap.get(PEER_ENDPOINT), AttributeValue.stringAttributeValue(HOSTNAME_VALUE)); + } + + @Test + public void startSpanProcessKindMessage() { + // Arrange + final SpanId parentSpanId = parentSpan.getContext().getSpanId(); + + // Act + final Context updatedContext = openCensusTracer.start(METHOD_NAME, tracingContext, ProcessKind.MESSAGE); + + // Assert + // verify span created with explicit parent when no span context in the sending Context object + assertSpanWithExplicitParent(updatedContext, parentSpanId); + // verify no kind set on Span for message + final RecordEventsSpanImpl recordEventsSpan = + (RecordEventsSpanImpl) updatedContext.getData(PARENT_SPAN_KEY).get(); + Assert.assertNull(recordEventsSpan.getKind()); + // verify diagnostic id and span context returned + Assert.assertNotNull(updatedContext.getData(SPAN_CONTEXT_KEY).get()); + Assert.assertNotNull(updatedContext.getData(DIAGNOSTIC_ID_KEY).get()); + } + + @Test + public void startSpanProcessKindProcess() { + // Arrange + final SpanId parentSpanId = parentSpan.getContext().getSpanId(); + + // Act + final Context updatedContext = openCensusTracer.start(METHOD_NAME, tracingContext, ProcessKind.PROCESS); + + // verify no parent span passed + Assert.assertFalse("When no parent span passed in context information", + tracingContext.getData(SPAN_CONTEXT_KEY).isPresent()); + // verify span created with explicit parent + assertSpanWithExplicitParent(updatedContext, parentSpanId); + // verify scope returned + Assert.assertNotNull(updatedContext.getData("scope").get()); + final RecordEventsSpanImpl recordEventsSpan = + (RecordEventsSpanImpl) updatedContext.getData(PARENT_SPAN_KEY).get(); + Assert.assertEquals(Span.Kind.SERVER, recordEventsSpan.getKind()); + } + + @Test + public void startProcessSpanWithRemoteParent() { + // Arrange + final Span testSpan = tracer.spanBuilder("child-span").startSpan(); + final SpanId testSpanId = testSpan.getContext().getSpanId(); + final Context traceContext = tracingContext.addData(SPAN_CONTEXT_KEY, testSpan.getContext()); + + // Act + final Context updatedContext = openCensusTracer.start(METHOD_NAME, traceContext, ProcessKind.PROCESS); + + // Assert + Assert.assertNotNull(updatedContext.getData("scope").get()); + // Assert new span created with remote parent context + assertSpanWithRemoteParent(updatedContext, testSpanId); } @Test(expected = NullPointerException.class) @@ -50,27 +201,100 @@ public void startSpanOverloadNullPointerException() { openCensusTracer.start("", Context.NONE, null); } + //add tests for number of child spans created and how parent span relation + @Test - public void startSpanSendOperation() { + public void addLinkTest() { + // Arrange + // Create a child-parent link between multiple spans + final RecordEventsSpanImpl testSpan = + (RecordEventsSpanImpl) tracer.spanBuilder("new-test-span").startSpan(); + final Context traceContext = tracingContext.addData(SPAN_CONTEXT_KEY, testSpan.getContext()); + final RecordEventsSpanImpl parentSpanImpl = (RecordEventsSpanImpl) parentSpan; + final Link expectedLink = Link.fromSpanContext(testSpan.getContext(), Link.Type.PARENT_LINKED_SPAN); // Act - final Context updatedContext = openCensusTracer.start(METHOD_NAME, Context.NONE, ProcessKind.SEND); + openCensusTracer.addLink(traceContext); + + //Assert + // verify parent span has the expected Link + Link createdLink = parentSpanImpl.toSpanData().getLinks().getLinks().get(0); + Assert.assertEquals(expectedLink.getTraceId(), createdLink.getTraceId()); + Assert.assertEquals(expectedLink.getSpanId(), createdLink.getSpanId()); + } + + @Test + public void endSpanNoSuccessErrorMessageTest() { + // Arrange + final RecordEventsSpanImpl recordEventsSpan = (RecordEventsSpanImpl) tracer.getCurrentSpan(); + final String expectedStatus = "UNKNOWN"; + + // Act + openCensusTracer.end(null, null, tracingContext); // Assert - assertTrue(updatedContext.getData(PARENT_SPAN_KEY).get() instanceof Span); + Assert.assertEquals(expectedStatus, recordEventsSpan.getStatus().getCanonicalCode().toString()); } @Test - public void startSpanReceiveOperation() { + public void endSpanErrorMessageTest() { + // Arrange + final RecordEventsSpanImpl recordEventsSpan = (RecordEventsSpanImpl) tracer.getCurrentSpan(); + final String throwableMessage = "custom error message"; + final String expectedStatus = "UNKNOWN"; + // Act - final Context returnedContext = openCensusTracer.start(METHOD_NAME, Context.NONE, ProcessKind.RECEIVE); + openCensusTracer.end(null, new Throwable(throwableMessage), tracingContext); // Assert - assertTrue(returnedContext.getData(PARENT_SPAN_KEY).get() instanceof Span); - assertNotNull(returnedContext.getData(DIAGNOSTIC_ID_KEY)); - assertNotNull(returnedContext.getData(SPAN_CONTEXT_KEY)); - String diagnosticId = (String) returnedContext.getData(DIAGNOSTIC_ID_KEY).get(); - Span returnedSpan = (Span) returnedContext.getData(PARENT_SPAN_KEY).get(); - // validate the span context and diagnostic Id are the same - assertEquals(diagnosticId, AmqpPropagationFormatUtil.getDiagnosticId(returnedSpan.getContext())); + Assert.assertEquals(expectedStatus, recordEventsSpan.getStatus().getCanonicalCode().toString()); + Assert.assertEquals(throwableMessage, recordEventsSpan.getStatus().getDescription()); + } + + @Test + public void endSpanTestThrowableResponseCode() { + // Arrange + final RecordEventsSpanImpl recordEventsSpan = (RecordEventsSpanImpl) tracer.getCurrentSpan(); + final String throwableMessage = "Resource not found"; + final String expectedStatus = "NOT_FOUND"; + + // Act + openCensusTracer.end(404, new Throwable(throwableMessage), tracingContext); + + // Assert + Assert.assertEquals(expectedStatus, recordEventsSpan.getStatus().getCanonicalCode().toString()); + Assert.assertEquals(throwableMessage, recordEventsSpan.getStatus().getDescription()); + + } + + private static void assertSpanWithExplicitParent(Context updatedContext, SpanId parentSpanId) { + Assert.assertNotNull(updatedContext.getData(PARENT_SPAN_KEY)); + + // verify instance created of openCensus-impl (test impl), span implementation + Assert.assertTrue(updatedContext.getData(PARENT_SPAN_KEY).get() instanceof RecordEventsSpanImpl); + + final RecordEventsSpanImpl recordEventsSpan = + (RecordEventsSpanImpl) updatedContext.getData(PARENT_SPAN_KEY).get(); + Assert.assertEquals(METHOD_NAME, recordEventsSpan.getName()); + + // verify span started with explicit parent + Assert.assertFalse(recordEventsSpan.toSpanData().getHasRemoteParent()); + Assert.assertEquals(parentSpanId, recordEventsSpan.toSpanData().getParentSpanId()); + } + + private static void assertSpanWithRemoteParent(Context updatedContext, SpanId parentSpanId) { + Assert.assertNotNull(updatedContext.getData(PARENT_SPAN_KEY)); + + // verify instance created of openCensus-impl (test impl), span implementation + Assert.assertTrue(updatedContext.getData(PARENT_SPAN_KEY).get() instanceof RecordEventsSpanImpl); + + // verify span created with provided name and kind server + final RecordEventsSpanImpl recordEventsSpan = + (RecordEventsSpanImpl) updatedContext.getData(PARENT_SPAN_KEY).get(); + Assert.assertEquals(METHOD_NAME, recordEventsSpan.getName()); + Assert.assertEquals(Span.Kind.SERVER, recordEventsSpan.getKind()); + + // verify span started with remote parent + Assert.assertTrue(recordEventsSpan.toSpanData().getHasRemoteParent()); + Assert.assertEquals(parentSpanId, recordEventsSpan.toSpanData().getParentSpanId()); } } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/ProcessKind.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/ProcessKind.java index 69f4f351e517..d0410d8e5007 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/ProcessKind.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/ProcessKind.java @@ -14,7 +14,7 @@ public enum ProcessKind { /** * Amqp message process call to receive data. */ - RECEIVE, + MESSAGE, /** * Custom process call to process received messages. */ diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/Tracer.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/Tracer.java index 631cbb7011dd..7e5b0fa62f35 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/Tracer.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/Tracer.java @@ -86,7 +86,7 @@ public interface Tracer { * *

    * Returns the diagnostic Id and span context of the returned span when {@code processKind} is - * {@link ProcessKind#RECEIVE ProcessKind.RECEIVE}. + * {@link ProcessKind#MESSAGE ProcessKind.MESSAGE}. * *

    * Creates a new tracing span with remote parent and returns that scope when the given when {@code processKind} @@ -97,8 +97,8 @@ public interface Tracer { *

    Starts a tracing span with provided method name and AMQP operation SEND

    * {@codesnippet com.azure.core.util.tracing.start#string-context-processKind-SEND} * - *

    Starts a tracing span with provided method name and AMQP operation RECEIVE

    - * {@codesnippet com.azure.core.util.tracing.start#string-context-processKind-RECEIVE} + *

    Starts a tracing span with provided method name and AMQP operation MESSAGE

    + * {@codesnippet com.azure.core.util.tracing.start#string-context-processKind-MESSAGE} * *

    Starts a tracing span with provided method name and AMQP operation PROCESS

    * {@codesnippet com.azure.core.util.tracing.start#string-context-processKind-PROCESS} diff --git a/sdk/core/azure-core/src/samples/java/com/azure/core/util/tracing/TracerJavaDocCodeSnippets.java b/sdk/core/azure-core/src/samples/java/com/azure/core/util/tracing/TracerJavaDocCodeSnippets.java index d3213fd683c4..b84e833acbd8 100644 --- a/sdk/core/azure-core/src/samples/java/com/azure/core/util/tracing/TracerJavaDocCodeSnippets.java +++ b/sdk/core/azure-core/src/samples/java/com/azure/core/util/tracing/TracerJavaDocCodeSnippets.java @@ -39,14 +39,14 @@ public void startTracingSpan() { updatedSendContext.getData(PARENT_SPAN_KEY).get()); // END: com.azure.core.util.tracing.start#string-context-processKind-SEND - // BEGIN: com.azure.core.util.tracing.start#string-context-processKind-RECEIVE + // BEGIN: com.azure.core.util.tracing.start#string-context-processKind-MESSAGE String diagnosticIdKey = "diagnostic-id"; // start a new tracing span with explicit parent, sets the diagnostic Id (traceparent headers) on the current - // context when process kind RECEIVE + // context when process kind MESSAGE Context updatedReceiveContext = tracer.start("azure.eventhubs.receive", traceContext, - ProcessKind.RECEIVE); + ProcessKind.MESSAGE); System.out.printf("Diagnostic Id: %s%n", updatedReceiveContext.getData(diagnosticIdKey).get().toString()); - // END: com.azure.core.util.tracing.start#string-context-processKind-RECEIVE + // END: com.azure.core.util.tracing.start#string-context-processKind-MESSAGE // BEGIN: com.azure.core.util.tracing.start#string-context-processKind-PROCESS String spanImplContext = "span-context"; @@ -100,7 +100,7 @@ public void addLink() { // use the parent context containing the current tracing span to start a child span Context parentContext = new Context(PARENT_SPAN_KEY, ""); // use the returned span context information of the current tracing span to link - Context spanContext = tracer.start("test.method", parentContext, ProcessKind.RECEIVE); + Context spanContext = tracer.start("test.method", parentContext, ProcessKind.MESSAGE); // Adds a link between multiple span's using the span context information of the Span // For each event processed, add a link with the created spanContext diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncProducer.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncProducer.java index 62baf6bc8f06..98d3baf353a5 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncProducer.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncProducer.java @@ -393,7 +393,7 @@ private EventData setSpanContext(EventData event, Context parentContext) { return event; } else { // Starting the span makes the sampling decision (nothing is logged at this time) - Context eventSpanContext = tracerProvider.startSpan(parentContext, ProcessKind.RECEIVE); + Context eventSpanContext = tracerProvider.startSpan(parentContext, ProcessKind.MESSAGE); if (eventSpanContext != null) { Optional eventDiagnosticIdOptional = eventSpanContext.getData(DIAGNOSTIC_ID_KEY); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncProducerTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncProducerTest.java index 3eca45e45945..34d1a60325cb 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncProducerTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncProducerTest.java @@ -200,7 +200,7 @@ public void sendStartSpanSingleMessage() { } ); - when(tracer1.start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.RECEIVE))).thenAnswer( + when(tracer1.start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.MESSAGE))).thenAnswer( invocation -> { Context passed = invocation.getArgument(1, Context.class); return passed.addData(PARENT_SPAN_KEY, "value").addData(DIAGNOSTIC_ID_KEY, "value2"); @@ -214,7 +214,7 @@ public void sendStartSpanSingleMessage() { verify(tracer1, times(1)) .start(eq("Azure.eventhubs.send"), any(), eq(ProcessKind.SEND)); verify(tracer1, times(2)) - .start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.RECEIVE)); + .start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.MESSAGE)); verify(tracer1, times(3)).end(eq("success"), isNull(), any()); } @@ -253,7 +253,7 @@ public void sendMessageAddlink() { //Assert verify(tracer1, times(1)) .start(eq("Azure.eventhubs.send"), any(), eq(ProcessKind.SEND)); - verify(tracer1, never()).start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.RECEIVE)); + verify(tracer1, never()).start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.MESSAGE)); verify(tracer1, times(2)).addLink(any()); verify(tracer1, times(1)).end(eq("success"), isNull(), any()); } diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerTest.java index fd1d470e264c..352371f0d449 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerTest.java @@ -130,7 +130,7 @@ public void sendStartSpanSingleMessage() { } ); - when(tracer1.start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.RECEIVE))).thenAnswer( + when(tracer1.start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.MESSAGE))).thenAnswer( invocation -> { Context passed = invocation.getArgument(1, Context.class); return passed.addData(PARENT_SPAN_KEY, "value").addData(DIAGNOSTIC_ID_KEY, "value2"); @@ -143,7 +143,7 @@ public void sendStartSpanSingleMessage() { verify(tracer1, times(1)) .start(eq("Azure.eventhubs.send"), any(), eq(ProcessKind.SEND)); verify(tracer1, times(1)) - .start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.RECEIVE)); + .start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.MESSAGE)); verify(tracer1, times(2)).end(eq("success"), isNull(), any()); } @@ -175,7 +175,7 @@ public void sendMessageAddlink() { //Assert verify(tracer1, times(1)).start(eq("Azure.eventhubs.send"), any(), eq(ProcessKind.SEND)); - verify(tracer1, never()).start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.RECEIVE)); + verify(tracer1, never()).start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.MESSAGE)); verify(tracer1, times(1)).addLink(any()); verify(tracer1, times(1)).end(eq("success"), isNull(), any()); } From 39a716ec220912f48d81374d1f7998d101a2a69a Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Wed, 23 Oct 2019 14:28:34 -0700 Subject: [PATCH 53/64] Fix documentation (#6010) * Fix documentation * fix package name --- .../data/appconfiguration/ConfigurationClientTestBase.java | 2 +- sdk/core/azure-core-tracing-opencensus/README.md | 2 +- .../main/java/com/azure/core/http/policy/FixedDelay.java | 2 +- sdk/storage/azure-storage-blob-batch/README.md | 2 +- sdk/storage/azure-storage-blob-cryptography/README.md | 4 ++-- sdk/storage/azure-storage-blob/README.md | 6 ++---- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java index 843db1c0141e..5436e9fe4868 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java @@ -372,7 +372,7 @@ void listRevisionsWithMultipleLabelsRunner(String key, String label, String labe public abstract void listRevisionsWithRange(); @Test - @Ignore("alzimmermsft to investigate") + @Ignore public abstract void listRevisionsInvalidRange(); @Test diff --git a/sdk/core/azure-core-tracing-opencensus/README.md b/sdk/core/azure-core-tracing-opencensus/README.md index 7a3e7556ebd3..4af401cc62d7 100644 --- a/sdk/core/azure-core-tracing-opencensus/README.md +++ b/sdk/core/azure-core-tracing-opencensus/README.md @@ -226,4 +226,4 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope [opencensus-quickstart]: https://opencensus.io/quickstart/java/tracing/ [zipkin-quickstart]: https://zipkin.io/pages/quickstart -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java/sdk/tracing/README.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java/sdk/core/azure-core-tracing-opencensus/README.png) diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/FixedDelay.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/FixedDelay.java index e9d50f194f85..45c236013e13 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/FixedDelay.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/FixedDelay.java @@ -8,7 +8,7 @@ import java.util.Objects; /** - * A fixed-delay implementation of {$link RetryStrategy} that has a fixed delay duration between each retry attempt. + * A fixed-delay implementation of {@link RetryStrategy} that has a fixed delay duration between each retry attempt. */ public class FixedDelay implements RetryStrategy { diff --git a/sdk/storage/azure-storage-blob-batch/README.md b/sdk/storage/azure-storage-blob-batch/README.md index 2f24a3070f1b..a4c368c29746 100644 --- a/sdk/storage/azure-storage-blob-batch/README.md +++ b/sdk/storage/azure-storage-blob-batch/README.md @@ -78,7 +78,7 @@ HttpClient client = new NettyAsyncHttpClientBuilder() To create a Storage Account you can use the Azure Portal or [Azure CLI][storage_account_create_cli]. ```Powershell -az stoage account create \ +az storage account create \ --resource-group \ --name \ --location diff --git a/sdk/storage/azure-storage-blob-cryptography/README.md b/sdk/storage/azure-storage-blob-cryptography/README.md index c1d8d09fc1d8..cc22896697fc 100644 --- a/sdk/storage/azure-storage-blob-cryptography/README.md +++ b/sdk/storage/azure-storage-blob-cryptography/README.md @@ -77,7 +77,7 @@ HttpClient client = new NettyAsyncHttpClientBuilder() To create a Storage Account you can use the Azure Portal or [Azure CLI][storage_account_create_cli]. ```Powershell -az stoage account create \ +az storage account create \ --resource-group \ --name \ --location @@ -159,4 +159,4 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java/sdk/tracing/README.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java/sdk/storage/azure-storage-blob-cryptography/README.png) diff --git a/sdk/storage/azure-storage-blob/README.md b/sdk/storage/azure-storage-blob/README.md index 499958423871..b05f41b75593 100644 --- a/sdk/storage/azure-storage-blob/README.md +++ b/sdk/storage/azure-storage-blob/README.md @@ -78,7 +78,7 @@ HttpClient client = new NettyAsyncHttpClientBuilder() To create a Storage Account you can use the [Azure Portal][storage_account_create_portal] or [Azure CLI][storage_account_create_cli]. ```bash -az stoage account create \ +az storage account create \ --resource-group \ --name \ --location @@ -91,7 +91,7 @@ To make this possible you'll need the Account SAS (shared access signature) stri #### Get credentials -##### **SAS Token** +##### SAS Token a. Use the Azure CLI snippet below to get the SAS token from the Storage Account. @@ -321,8 +321,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fstorage%2FAzure.Storage.Blobs%2FREADME.png) - [source]: src [docs]: http://azure.github.io/azure-sdk-for-java/ From b196a679458afc8fa72e8f39df2b94c8599f9784 Mon Sep 17 00:00:00 2001 From: Gauri Prasad <51212198+gapra-msft@users.noreply.github.com> Date: Wed, 23 Oct 2019 14:48:18 -0700 Subject: [PATCH 54/64] Added ability to not overwrite by default (#6014) --- .../EncryptedBlobAsyncClient.java | 92 +++++++++++++- .../cryptography/EncryptedBlobClient.java | 18 +++ ...tedBlobAsyncClientJavaDocCodeSnippets.java | 27 ++++ ...ncryptedBlobClientJavaDocCodeSnippets.java | 17 +++ .../EncyptedBlockBlobAPITest.groovy | 55 +++++++++ .../azure/storage/blob/BlobAsyncClient.java | 93 +++++++++++++- .../com/azure/storage/blob/BlobClient.java | 21 +++- .../specialized/AppendBlobAsyncClient.java | 28 ++++- .../blob/specialized/AppendBlobClient.java | 25 +++- .../specialized/BlockBlobAsyncClient.java | 40 +++++- .../blob/specialized/BlockBlobClient.java | 33 ++++- .../blob/specialized/PageBlobAsyncClient.java | 32 ++++- .../blob/specialized/PageBlobClient.java | 29 ++++- .../BlobAsyncClientJavaDocCodeSnippets.java | 27 ++++ .../blob/BlobClientJavaDocCodeSnippets.java | 17 +++ ...endBlobAsyncClientJavaDocCodeSnippets.java | 11 ++ .../AppendBlobClientJavaDocCodeSnippets.java | 10 ++ ...lobAsyncClientBaseJavaDocCodeSnippets.java | 4 +- .../BlobClientBaseJavaDocCodeSnippets.java | 2 +- ...ockBlobAsyncClientJavaDocCodeSnippets.java | 12 ++ .../BlockBlobClientJavaDocCodeSnippets.java | 13 ++ ...ageBlobAsyncClientJavaDocCodeSnippets.java | 13 +- .../PageBlobClientJavaDocCodeSnippets.java | 11 ++ .../blob/specialized/AppendBlobAPITest.groovy | 16 +++ .../blob/specialized/BlockBlobAPITest.groovy | 58 +++++++-- .../blob/specialized/PageBlobAPITest.groovy | 16 +++ ...AppendBlobAPITestcreateoverwritefalse.json | 109 +++++++++++++++++ .../AppendBlobAPITestcreateoverwritetrue.json | 109 +++++++++++++++++ ...ckBlobAPITestblobclientoverwritefalse.json | 4 + ...ockBlobAPITestblobclientoverwritetrue.json | 4 + ...BlobAPITestbuffereduploadnetworkerror.json | 94 +++++++------- .../BlockBlobAPITestuploadoverwritefalse.json | 113 +++++++++++++++++ .../BlockBlobAPITestuploadoverwritetrue.json | 115 ++++++++++++++++++ .../PageBlobAPITestcreateoverwritefalse.json | 109 +++++++++++++++++ .../PageBlobAPITestcreateoverwritetrue.json | 109 +++++++++++++++++ .../common/implementation/Constants.java | 5 + 36 files changed, 1403 insertions(+), 88 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateoverwritefalse.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateoverwritetrue.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestblobclientoverwritefalse.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestblobclientoverwritetrue.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadoverwritefalse.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadoverwritetrue.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateoverwritefalse.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateoverwritetrue.json diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java index 5ec355138193..2ddea85a282b 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java @@ -105,7 +105,7 @@ public class EncryptedBlobAsyncClient extends BlobAsyncClient { } /** - * Creates a new block blob, or updates the content of an existing block blob. + * Creates a new block blob. By default this method will not overwrite an existing blob. *

    * Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported * with this method; the content of the existing blob is overwritten with the new content. To perform a partial @@ -138,8 +138,59 @@ public class EncryptedBlobAsyncClient extends BlobAsyncClient { */ public Mono upload(Flux data, ParallelTransferOptions parallelTransferOptions) { try { - return this.uploadWithResponse(data, parallelTransferOptions, null, null, null, null) - .flatMap(FluxUtil::toMono); + return this.upload(data, parallelTransferOptions, false); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Creates a new block blob, or updates the content of an existing block blob. + *

    + * Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported + * with this method; the content of the existing blob is overwritten with the new content. To perform a partial + * update of block blob's, use {@link BlockBlobAsyncClient#stageBlock(String, Flux, long) stageBlock} and {@link + * BlockBlobAsyncClient#commitBlockList(List)} on a regular blob client. For more information, see the + * Azure Docs for Put Block and the + * Azure Docs for Put Block List. + *

    + * The data passed need not support multiple subscriptions/be replayable as is required in other upload methods when + * retries are enabled, and the length of the data need not be known in advance. Therefore, this method should + * support uploading any arbitrary data source, including network streams. This behavior is possible because this + * method will perform some internal buffering as configured by the blockSize and numBuffers parameters, so while + * this method may offer additional convenience, it will not be as performant as other options, which should be + * preferred when possible. + *

    + * Typically, the greater the number of buffers used, the greater the possible parallelism when transferring the + * data. Larger buffers means we will have to stage fewer blocks and therefore require fewer IO operations. The + * trade-offs between these values are context-dependent, so some experimentation may be required to optimize inputs + * for a given scenario. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.upload#Flux-ParallelTransferOptions-boolean} + * + * @param data The data to write to the blob. Unlike other upload methods, this method does not require that the + * {@code Flux} be replayable. In other words, it does not have to support multiple subscribers and is not expected + * to produce the same values across subscriptions. + * @param parallelTransferOptions {@link ParallelTransferOptions} used to configure buffered uploading. + * @param overwrite Whether or not to overwrite, should data exist on the blob. + * @return A reactive response containing the information of the uploaded block blob. + */ + public Mono upload(Flux data, ParallelTransferOptions parallelTransferOptions, + boolean overwrite) { + try { + Mono uploadTask = this.uploadWithResponse(data, parallelTransferOptions, null, null, null, + null).flatMap(FluxUtil::toMono); + + if (overwrite) { + return uploadTask; + } else { + return exists() + .flatMap(exists -> exists + ? monoError(logger, new IllegalArgumentException(Constants.BLOB_ALREADY_EXISTS)) + : uploadTask); + } } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -195,8 +246,8 @@ public Mono> uploadWithResponse(Flux data, } /** - * Creates a new block blob, or updates the content of an existing block blob, with the content of the specified - * file. + * Creates a new block blob with the content of the specified file. By default this method will not overwrite + * existing data * *

    Code Samples

    * @@ -207,7 +258,36 @@ public Mono> uploadWithResponse(Flux data, */ public Mono uploadFromFile(String filePath) { try { - return uploadFromFile(filePath, null, null, null, null, null); + return uploadFromFile(filePath, false); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Creates a new block blob, or updates the content of an existing block blob, with the content of the specified + * file. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadFromFile#String-boolean} + * + * @param filePath Path to the upload file + * @param overwrite Whether or not to overwrite should data exist on the blob. + * @return An empty response + */ + public Mono uploadFromFile(String filePath, boolean overwrite) { + try { + Mono uploadTask = uploadFromFile(filePath, null, null, null, null, null); + + if (overwrite) { + return uploadTask; + } else { + return exists() + .flatMap(exists -> exists + ? monoError(logger, new IllegalArgumentException(Constants.BLOB_ALREADY_EXISTS)) + : uploadTask); + } } catch (RuntimeException ex) { return monoError(logger, ex); } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClient.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClient.java index d14b1237899c..7beb3d6f5832 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClient.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClient.java @@ -11,6 +11,7 @@ import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.ParallelTransferOptions; +import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; @@ -65,6 +66,23 @@ public class EncryptedBlobClient extends BlobClient { * @param filePath Path of the file to upload */ public void uploadFromFile(String filePath) { + uploadFromFile(filePath, false); + } + + /** + * Creates a new block blob, or updates the content of an existing block blob. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.cryptography.EncryptedBlobClient.uploadFromFile#String-boolean} + * + * @param filePath Path of the file to upload + * @param overwrite Whether or not to overwrite should data already exist on the blob + */ + public void uploadFromFile(String filePath, boolean overwrite) { + if (!overwrite && exists()) { + throw logger.logExceptionAsError(new IllegalArgumentException(Constants.BLOB_ALREADY_EXISTS)); + } uploadFromFile(filePath, null, null, null, null, null, null); } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java index 3bad656c124b..b39505534b31 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClientJavaDocCodeSnippets.java @@ -58,6 +58,21 @@ public void upload() { // END: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.upload#Flux-ParallelTransferOptions } + /** + * Code snippet for {@link EncryptedBlobAsyncClient#upload(Flux, ParallelTransferOptions, boolean)} + */ + public void uploadWithOverwrite() { + // BEGIN: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.upload#Flux-ParallelTransferOptions-boolean + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setBlockSize(blockSize) + .setNumBuffers(numBuffers); + boolean overwrite = false; // Default behavior + client.upload(data, parallelTransferOptions, overwrite).subscribe(response -> + System.out.printf("Uploaded BlockBlob MD5 is %s%n", + Base64.getEncoder().encodeToString(response.getContentMd5()))); + // END: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.upload#Flux-ParallelTransferOptions-boolean + } + /** * Code snippet for {@link EncryptedBlobAsyncClient#uploadWithResponse(Flux, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions)} */ @@ -93,6 +108,18 @@ public void uploadFromFile() { // END: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadFromFile#String } + /** + * Code snippet for {@link EncryptedBlobAsyncClient#uploadFromFile(String, boolean)} + */ + public void uploadFromFileWithOverwrite() { + // BEGIN: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadFromFile#String-boolean + boolean overwrite = false; // Default behavior + client.uploadFromFile(filePath, overwrite) + .doOnError(throwable -> System.err.printf("Failed to upload from file %s%n", throwable.getMessage())) + .subscribe(completion -> System.out.println("Upload from file succeeded")); + // END: com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.uploadFromFile#String-boolean + } + /** * Code snippet for {@link EncryptedBlobAsyncClient#uploadFromFile(String, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions)} */ diff --git a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientJavaDocCodeSnippets.java index 65752baa7c71..e063e420c67b 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/samples/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientJavaDocCodeSnippets.java @@ -56,6 +56,23 @@ public void uploadFromFile() throws IOException { // END: com.azure.storage.blob.specialized.cryptography.EncryptedBlobClient.uploadFromFile#String } + /** + * Code snippet for {@link EncryptedBlobClient#uploadFromFile(String, boolean)} + * + * @throws IOException If an I/O error occurs + */ + public void uploadFromFileWithOverwrite() throws IOException { + // BEGIN: com.azure.storage.blob.specialized.cryptography.EncryptedBlobClient.uploadFromFile#String-boolean + try { + boolean overwrite = false; // Default value + client.uploadFromFile(filePath, overwrite); + System.out.println("Upload from file succeeded"); + } catch (UncheckedIOException ex) { + System.err.printf("Failed to upload from file %s%n", ex.getMessage()); + } + // END: com.azure.storage.blob.specialized.cryptography.EncryptedBlobClient.uploadFromFile#String-boolean + } + /** * Code snippet for {@link EncryptedBlobClient#uploadFromFile(String, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions, Duration)} * diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy index 783064cc92e5..dee663c1087f 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy @@ -547,6 +547,61 @@ class EncyptedBlockBlobAPITest extends APISpec { stream.toByteArray() == defaultData.array() } + @Requires({liveMode()}) + def "encrypted client file upload overwrite false"() { + setup: + def file = getRandomFile(KB) + + when: + beac.uploadFromFile(file.toPath().toString()).block() + + beac.uploadFromFile(file.toPath().toString()).block() + + then: + thrown(IllegalArgumentException) + } + + @Requires({liveMode()}) + def "encrypted client file upload overwrite true"() { + setup: + def file = getRandomFile(KB) + + when: + beac.uploadFromFile(file.toPath().toString()).block() + beac.uploadFromFile(file.toPath().toString(), true).block() + + then: + notThrown(Throwable) + } + + @Requires({ liveMode() }) + def "encrypted client upload overwrite false"() { + setup: + ByteBuffer byteBuffer = getRandomData(Constants.KB) + + when: + beac.upload(Flux.just(byteBuffer), null).block() + + beac.upload(Flux.just(byteBuffer), null).block() + + then: + thrown(IllegalArgumentException) + } + + @Requires({ liveMode() }) + def "encrypted client upload overwrite true"() { + setup: + ByteBuffer byteBuffer = getRandomData(Constants.KB) + + when: + beac.upload(Flux.just(byteBuffer), null).block() + + beac.upload(Flux.just(byteBuffer), null, true).block() + + then: + notThrown(Throwable) + } + def compareListToBuffer(List buffers, ByteBuffer result) { result.position(0) for (ByteBuffer buffer : buffers) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java index 873969b6d9e8..b74bbda64173 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java @@ -153,7 +153,7 @@ private SpecializedBlobClientBuilder prepareBuilder() { } /** - * Creates a new block blob, or updates the content of an existing block blob. + * Creates a new block blob. By default this method will not overwrite an existing blob. *

    * Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported * with this method; the content of the existing blob is overwritten with the new content. To perform a partial @@ -187,7 +187,60 @@ private SpecializedBlobClientBuilder prepareBuilder() { */ public Mono upload(Flux data, ParallelTransferOptions parallelTransferOptions) { try { - return uploadWithResponse(data, parallelTransferOptions, null, null, null, null).flatMap(FluxUtil::toMono); + return upload(data, parallelTransferOptions, false); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Creates a new block blob, or updates the content of an existing block blob. + *

    + * Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported + * with this method; the content of the existing blob is overwritten with the new content. To perform a partial + * update of a block blob's, use {@link BlockBlobAsyncClient#stageBlock(String, Flux, long) stageBlock} and {@link + * BlockBlobAsyncClient#commitBlockList(List)}. For more information, see the + * Azure Docs for Put Block and the + * Azure Docs for Put Block List. + *

    + * The data passed need not support multiple subscriptions/be replayable as is required in other upload methods when + * retries are enabled, and the length of the data need not be known in advance. Therefore, this method should + * support uploading any arbitrary data source, including network streams. This behavior is possible because this + * method will perform some internal buffering as configured by the blockSize and numBuffers parameters, so while + * this method may offer additional convenience, it will not be as performant as other options, which should be + * preferred when possible. + *

    + * Typically, the greater the number of buffers used, the greater the possible parallelism when transferring the + * data. Larger buffers means we will have to stage fewer blocks and therefore require fewer IO operations. The + * trade-offs between these values are context-dependent, so some experimentation may be required to optimize inputs + * for a given scenario. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.upload#Flux-ParallelTransferOptions-boolean} + * + * @param data The data to write to the blob. Unlike other upload methods, this method does not require that the + * {@code Flux} be replayable. In other words, it does not have to support multiple subscribers and is not expected + * to produce the same values across subscriptions. + * @param parallelTransferOptions {@link ParallelTransferOptions} used to configure buffered uploading. + * @param overwrite Whether or not to overwrite, should the blob already exist. + * + * @return A reactive response containing the information of the uploaded block blob. + */ + public Mono upload(Flux data, ParallelTransferOptions parallelTransferOptions, + boolean overwrite) { + try { + Mono uploadTask = uploadWithResponse(data, parallelTransferOptions, null, + null, null, null).flatMap(FluxUtil::toMono); + + if (overwrite) { + return uploadTask; + } else { + return exists() + .flatMap(exists -> exists + ? monoError(logger, new IllegalArgumentException(Constants.BLOB_ALREADY_EXISTS)) + : uploadTask); + } } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -307,8 +360,8 @@ as we can guarantee we only need at most two buffers for any call to write (two } /** - * Creates a new block blob, or updates the content of an existing block blob, with the content of the specified - * file. + * Creates a new block blob with the content of the specified file. By default this method will not overwrite an + * existing blob. * *

    Code Samples

    * @@ -320,7 +373,37 @@ as we can guarantee we only need at most two buffers for any call to write (two */ public Mono uploadFromFile(String filePath) { try { - return uploadFromFile(filePath, null, null, null, null, null); + return uploadFromFile(filePath, false); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Creates a new block blob, or updates the content of an existing block blob, with the content of the specified + * file. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-boolean} + * + * @param filePath Path to the upload file + * @param overwrite Whether or not to overwrite, should the blob already exist. + * + * @return An empty response + */ + public Mono uploadFromFile(String filePath, boolean overwrite) { + try { + Mono uploadTask = uploadFromFile(filePath, null, null, null, null, null); + + if (overwrite) { + return uploadTask; + } else { + return exists() + .flatMap(exists -> exists + ? monoError(logger, new IllegalArgumentException(Constants.BLOB_ALREADY_EXISTS)) + : uploadTask); + } } catch (RuntimeException ex) { return monoError(logger, ex); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java index bfca2aba7824..30a09d062acf 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java @@ -14,6 +14,7 @@ import com.azure.storage.blob.specialized.BlockBlobClient; import com.azure.storage.blob.specialized.PageBlobClient; import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder; +import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; @@ -98,7 +99,7 @@ public PageBlobClient getPageBlobClient() { } /** - * Creates a new block blob, or updates the content of an existing block blob. + * Creates a new block blob. By default this method will not overwrite an existing blob. * *

    Code Samples

    * @@ -108,6 +109,24 @@ public PageBlobClient getPageBlobClient() { * @throws UncheckedIOException If an I/O error occurs */ public void uploadFromFile(String filePath) { + uploadFromFile(filePath, false); + } + + /** + * Creates a new block blob, or updates the content of an existing block blob. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.BlobClient.uploadFromFile#String-boolean} + * + * @param filePath Path of the file to upload + * @param overwrite Whether or not to overwrite, should the blob already exist + * @throws UncheckedIOException If an I/O error occurs + */ + public void uploadFromFile(String filePath, boolean overwrite) { + if (!overwrite && exists()) { + throw logger.logExceptionAsError(new IllegalArgumentException(Constants.BLOB_ALREADY_EXISTS)); + } uploadFromFile(filePath, null, null, null, null, null, null); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java index 8218d2463911..3eb87888aa6f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java @@ -89,7 +89,8 @@ public final class AppendBlobAsyncClient extends BlobAsyncClientBase { } /** - * Creates a 0-length append blob. Call appendBlock to append data to an append blob. + * Creates a 0-length append blob. Call appendBlock to append data to an append blob. By default this method will + * not overwrite an existing blob. * *

    Code Samples

    * @@ -99,7 +100,30 @@ public final class AppendBlobAsyncClient extends BlobAsyncClientBase { */ public Mono create() { try { - return createWithResponse(null, null, null).flatMap(FluxUtil::toMono); + return create(false); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Creates a 0-length append blob. Call appendBlock to append data to an append blob. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobAsyncClient.create#boolean} + * + * @param overwrite Whether or not to overwrite, should data exist on the blob. + * + * @return A {@link Mono} containing the information of the created appended blob. + */ + public Mono create(boolean overwrite) { + try { + BlobRequestConditions blobRequestConditions = new BlobRequestConditions(); + if (!overwrite) { + blobRequestConditions.setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD); + } + return createWithResponse(null, null, blobRequestConditions).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 983c2c474c97..68d0eea4b621 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -18,6 +18,7 @@ import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -91,7 +92,8 @@ public BlobOutputStream getBlobOutputStream(AppendBlobRequestConditions accessCo } /** - * Creates a 0-length append blob. Call appendBlock to append data to an append blob. + * Creates a 0-length append blob. Call appendBlock to append data to an append blob. By default this method will + * not overwrite an existing blob. * *

    Code Samples

    * @@ -100,7 +102,26 @@ public BlobOutputStream getBlobOutputStream(AppendBlobRequestConditions accessCo * @return The information of the created appended blob. */ public AppendBlobItem create() { - return createWithResponse(null, null, null, null, Context.NONE).getValue(); + return create(false); + } + + /** + * Creates a 0-length append blob. Call appendBlock to append data to an append blob. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobClient.create#boolean} + * + * @param overwrite Whether or not to overwrite, should data exist on the blob. + * + * @return The information of the created appended blob. + */ + public AppendBlobItem create(boolean overwrite) { + BlobRequestConditions blobRequestConditions = new BlobRequestConditions(); + if (!overwrite) { + blobRequestConditions.setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD); + } + return createWithResponse(null, null, blobRequestConditions, null, Context.NONE).getValue(); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java index d5dc02b4767d..70c438370ce4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java @@ -88,6 +88,35 @@ public final class BlockBlobAsyncClient extends BlobAsyncClientBase { super(pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey); } + /** + * Creates a new block blob. By default this method will not overwrite an existing blob. Updating an existing block + * blob overwrites any existing metadata on the blob. Partial updates are not supported with PutBlob; the content + * of the existing blob is overwritten with the new content. To perform a partial update of a block blob's, use + * PutBlock and PutBlockList. For more information, see the + * Azure Docs. + *

    + * Note that the data passed must be replayable if retries are enabled (the default). In other words, the + * {@code Flux} must produce the same data each time it is subscribed to. + *

    + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.upload#Flux-long} + * + * @param data The data to write to the blob. Note that this {@code Flux} must be replayable if retries are enabled + * (the default). In other words, the Flux must produce the same data each time it is subscribed to. + * @param length The exact length of the data. It is important that this value match precisely the length of the + * data emitted by the {@code Flux}. + * @return A reactive response containing the information of the uploaded block blob. + */ + public Mono upload(Flux data, long length) { + try { + return upload(data, length, false); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + /** * Creates a new block blob, or updates the content of an existing block blob. Updating an existing block blob * overwrites any existing metadata on the blob. Partial updates are not supported with PutBlob; the content of the @@ -101,17 +130,22 @@ public final class BlockBlobAsyncClient extends BlobAsyncClientBase { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.upload#Flux-long} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.upload#Flux-long-boolean} * * @param data The data to write to the blob. Note that this {@code Flux} must be replayable if retries are enabled * (the default). In other words, the Flux must produce the same data each time it is subscribed to. * @param length The exact length of the data. It is important that this value match precisely the length of the * data emitted by the {@code Flux}. + * @param overwrite Whether or not to overwrite, should data exist on the blob. * @return A reactive response containing the information of the uploaded block blob. */ - public Mono upload(Flux data, long length) { + public Mono upload(Flux data, long length, boolean overwrite) { try { - return uploadWithResponse(data, length, null, null, null, null).flatMap(FluxUtil::toMono); + BlobRequestConditions blobRequestConditions = new BlobRequestConditions(); + if (!overwrite) { + blobRequestConditions.setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD); + } + return uploadWithResponse(data, length, null, null, null, blobRequestConditions).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java index 7c6f70f9cead..7dbba697ba23 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java @@ -19,6 +19,7 @@ import com.azure.storage.blob.models.BlockList; import com.azure.storage.blob.models.BlockListType; import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.Constants; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; @@ -98,6 +99,27 @@ public BlobOutputStream getBlobOutputStream(BlobRequestConditions accessConditio return BlobOutputStream.blockBlobOutputStream(client, accessConditions); } + /** + * Creates a new block blob. By default this method will not overwrite an existing blob. Updating an existing block + * blob overwrites any existing metadata on the blob. Partial updates are not supported with PutBlob; the content + * of the existing blob is overwritten with the new content. To perform a partial update of a block blob's, use + * PutBlock and PutBlockList. For more information, see the + * Azure Docs. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.upload#InputStream-long} + * + * @param data The data to write to the blob. + * @param length The exact length of the data. It is important that this value match precisely the length of the + * data provided in the {@link InputStream}. + * @return The information of the uploaded block blob. + * @throws UncheckedIOException If an I/O error occurs + */ + public BlockBlobItem upload(InputStream data, long length) { + return upload(data, length, false); + } + /** * Creates a new block blob, or updates the content of an existing block blob. Updating an existing block blob * overwrites any existing metadata on the blob. Partial updates are not supported with PutBlob; the content of the @@ -107,16 +129,21 @@ public BlobOutputStream getBlobOutputStream(BlobRequestConditions accessConditio * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.upload#InputStream-long} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.upload#InputStream-long-boolean} * * @param data The data to write to the blob. * @param length The exact length of the data. It is important that this value match precisely the length of the * data provided in the {@link InputStream}. + * @param overwrite Whether or not to overwrite, should data exist on the blob. * @return The information of the uploaded block blob. * @throws UncheckedIOException If an I/O error occurs */ - public BlockBlobItem upload(InputStream data, long length) { - return uploadWithResponse(data, length, null, null, null, null, null, Context.NONE).getValue(); + public BlockBlobItem upload(InputStream data, long length, boolean overwrite) { + BlobRequestConditions blobRequestConditions = new BlobRequestConditions(); + if (!overwrite) { + blobRequestConditions.setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD); + } + return uploadWithResponse(data, length, null, null, null, blobRequestConditions, null, Context.NONE).getValue(); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java index 4e1ec64ff878..e9608ee988cb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java @@ -90,8 +90,8 @@ public final class PageBlobAsyncClient extends BlobAsyncClientBase { } /** - * Creates a page blob of the specified length. Call PutPage to upload data data to a page blob. For more - * information, see the + * Creates a page blob of the specified length. By default this method will not overwrite an existing blob. + * Call PutPage to upload data data to a page blob. For more information, see the * Azure Docs. * *

    Code Samples

    @@ -104,7 +104,33 @@ public final class PageBlobAsyncClient extends BlobAsyncClientBase { */ public Mono create(long size) { try { - return createWithResponse(size, null, null, null, null).flatMap(FluxUtil::toMono); + return create(size, false); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Creates a page blob of the specified length. Call PutPage to upload data data to a page blob. For more + * information, see the + * Azure Docs. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.create#long-boolean} + * + * @param size Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a + * 512-byte boundary. + * @param overwrite Whether or not to overwrite, should data exist on the blob. + * @return A reactive response containing the information of the created page blob. + */ + public Mono create(long size, boolean overwrite) { + try { + BlobRequestConditions blobRequestConditions = new BlobRequestConditions(); + if (!overwrite) { + blobRequestConditions.setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD); + } + return createWithResponse(size, null, null, null, blobRequestConditions).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index 61ca21eb7503..db46b17aa6b8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -20,6 +20,7 @@ import com.azure.storage.blob.models.PageRange; import com.azure.storage.blob.models.SequenceNumberActionType; import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -96,8 +97,8 @@ public BlobOutputStream getBlobOutputStream(PageRange pageRange, BlobRequestCond } /** - * Creates a page blob of the specified length. Call PutPage to upload data data to a page blob. For more - * information, see the + * Creates a page blob of the specified length. By default this method will not overwrite an existing blob. + * Call PutPage to upload data data to a page blob. For more information, see the * Azure Docs. * *

    Code Samples

    @@ -109,7 +110,29 @@ public BlobOutputStream getBlobOutputStream(PageRange pageRange, BlobRequestCond * @return The information of the created page blob. */ public PageBlobItem create(long size) { - return createWithResponse(size, null, null, null, null, null, Context.NONE).getValue(); + return create(size, false); + } + + /** + * Creates a page blob of the specified length. Call PutPage to upload data data to a page blob. For more + * information, see the + * Azure Docs. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.PageBlobClient.create#long-boolean} + * + * @param size Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a + * 512-byte boundary. + * @param overwrite Whether or not to overwrite, should data exist on the blob. + * @return The information of the created page blob. + */ + public PageBlobItem create(long size, boolean overwrite) { + BlobRequestConditions blobRequestConditions = new BlobRequestConditions(); + if (!overwrite) { + blobRequestConditions.setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD); + } + return createWithResponse(size, null, null, null, blobRequestConditions, null, Context.NONE).getValue(); } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java index 7b5651fb8df6..d097a23db289 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java @@ -402,6 +402,21 @@ public void upload3() { // END: com.azure.storage.blob.BlobAsyncClient.upload#Flux-ParallelTransferOptions } + /** + * Code snippet for {@link BlobAsyncClient#upload(Flux, ParallelTransferOptions, boolean)} + */ + public void uploadOverwrite() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.upload#Flux-ParallelTransferOptions-boolean + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setBlockSize(blockSize) + .setNumBuffers(numBuffers); + boolean overwrite = false; // Default behavior + client.upload(data, parallelTransferOptions, overwrite).subscribe(response -> + System.out.printf("Uploaded BlockBlob MD5 is %s%n", + Base64.getEncoder().encodeToString(response.getContentMd5()))); + // END: com.azure.storage.blob.BlobAsyncClient.upload#Flux-ParallelTransferOptions-boolean + } + /** * Code snippet for {@link BlobAsyncClient#uploadWithResponse(Flux, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions)} */ @@ -465,6 +480,18 @@ public void uploadFromFile() { // END: com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String } + /** + * Code snippet for {@link BlobAsyncClient#uploadFromFile(String, boolean)} + */ + public void uploadFromFileOverwrite() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-boolean + boolean overwrite = false; // Default behavior + client.uploadFromFile(filePath, overwrite) + .doOnError(throwable -> System.err.printf("Failed to upload from file %s%n", throwable.getMessage())) + .subscribe(completion -> System.out.println("Upload from file succeeded")); + // END: com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-boolean + } + /** * Code snippet for {@link BlobAsyncClient#uploadFromFile(String, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions)} */ diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java index 17547007949e..590978709dc2 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java @@ -382,6 +382,23 @@ public void uploadFromFile() throws IOException { // END: com.azure.storage.blob.BlobClient.uploadFromFile#String } + /** + * Code snippet for {@link BlobClient#uploadFromFile(String, boolean)} + * + * @throws IOException If an I/O error occurs + */ + public void uploadFromFileOverwrite() throws IOException { + // BEGIN: com.azure.storage.blob.BlobClient.uploadFromFile#String-boolean + try { + boolean overwrite = false; + client.uploadFromFile(filePath, overwrite); + System.out.println("Upload from file succeeded"); + } catch (UncheckedIOException ex) { + System.err.printf("Failed to upload from file %s%n", ex.getMessage()); + } + // END: com.azure.storage.blob.BlobClient.uploadFromFile#String-boolean + } + /** * Code snippet for {@link BlobClient#uploadFromFile(String, ParallelTransferOptions, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions, Duration)} * diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java index 70e344362a61..e5860e8e24f5 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java @@ -39,6 +39,17 @@ public void create() { // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.create } + /** + * Code snippet for {@link AppendBlobAsyncClient#create(boolean)} + */ + public void createWithOverwrite() { + // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.create#boolean + boolean overwrite = false; // Default behavior + client.create(overwrite).subscribe(response -> + System.out.printf("Created AppendBlob at %s%n", response.getLastModified())); + // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.create#boolean + } + /** * Code snippet for {@link AppendBlobAsyncClient#createWithResponse(BlobHttpHeaders, Map, BlobRequestConditions)} */ diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java index 6f54b17ee003..5e84986b44a2 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java @@ -42,6 +42,16 @@ public void create() { // END: com.azure.storage.blob.specialized.AppendBlobClient.create } + /** + * Code snippet for {@link AppendBlobClient#create(boolean)} + */ + public void createWithOverwrite() { + // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.create#boolean + boolean overwrite = false; // Default value + System.out.printf("Created AppendBlob at %s%n", client.create(overwrite).getLastModified()); + // END: com.azure.storage.blob.specialized.AppendBlobClient.create#boolean + } + /** * Code snippet for {@link AppendBlobClient#createWithResponse(BlobHttpHeaders, Map, BlobRequestConditions, * Duration, Context)} diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java index fe0c808741e3..fe88c25742cf 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java @@ -273,8 +273,8 @@ public void abortCopyFromUrlWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClientBase#copyFromURLWithResponse(String, Map, AccessTier, - * RequestConditions, BlobRequestConditions)} + * Code snippets for {@link BlobAsyncClientBase#copyFromUrlWithResponse(String, Map, AccessTier, RequestConditions, + * BlobRequestConditions)} */ public void copyFromUrlWithResponseCodeSnippets() { diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java index e80235c1d322..a314cb322a43 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java @@ -238,7 +238,7 @@ public void abortCopyFromUrlWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClientBase#copyFromURLWithResponse(String, Map, AccessTier, RequestConditions, + * Code snippets for {@link BlobClientBase#copyFromUrlWithResponse(String, Map, AccessTier, RequestConditions, * BlobRequestConditions, Duration, Context)} */ public void copyFromUrlWithResponseCodeSnippets() { diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java index a9dbe2e84c87..2df04e0aeb5d 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java @@ -44,6 +44,18 @@ public void upload() { // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.upload#Flux-long } + /** + * Code snippet for {@link BlockBlobAsyncClient#upload(Flux, long, boolean)} + */ + public void uploadWithOverwrite() { + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.upload#Flux-long-boolean + boolean overwrite = false; // Default behavior + client.upload(data, length, overwrite).subscribe(response -> + System.out.printf("Uploaded BlockBlob MD5 is %s%n", + Base64.getEncoder().encodeToString(response.getContentMd5()))); + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.upload#Flux-long-boolean + } + /** * Code snippet for {@link BlockBlobAsyncClient#uploadWithResponse(Flux, long, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions)} */ diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java index f08226e1b8dd..47a4dcae4837 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java @@ -49,6 +49,19 @@ public void upload() throws IOException { // END: com.azure.storage.blob.specialized.BlockBlobClient.upload#InputStream-long } + /** + * Code snippet for {@link BlockBlobClient#upload(InputStream, long, boolean)} + * + * @throws IOException If an I/O error occurs + */ + public void uploadWithOverwrite() throws IOException { + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.upload#InputStream-long-boolean + boolean overwrite = false; + System.out.printf("Uploaded BlockBlob MD5 is %s%n", + Base64.getEncoder().encodeToString(client.upload(data, length, overwrite).getContentMd5())); + // END: com.azure.storage.blob.specialized.BlockBlobClient.upload#InputStream-long-boolean + } + /** * Code snippet for {@link BlockBlobClient#uploadWithResponse(InputStream, long, BlobHttpHeaders, Map, AccessTier, BlobRequestConditions, Duration, Context)} */ diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java index b5d6e21c9f38..c7f86a86854e 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java @@ -51,6 +51,17 @@ public void setCreateCodeSnippet() { // END: com.azure.storage.blob.PageBlobAsyncClient.create#long } + /** + * Code snippets for {@link PageBlobAsyncClient#create(long, boolean)} + */ + public void createWithOverwrite() { + // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.create#long-boolean + boolean overwrite = false; // Default behavior + client.create(size, overwrite).subscribe(response -> System.out.printf( + "Created page blob with sequence number %s%n", response.getBlobSequenceNumber())); + // END: com.azure.storage.blob.PageBlobAsyncClient.create#long-boolean + } + /** * Code snippets for {@link PageBlobAsyncClient#createWithResponse(long, Long, BlobHttpHeaders, Map, BlobRequestConditions)} */ @@ -114,7 +125,7 @@ public void uploadPagesFromUrl() { } /** - * Code snippets for {@link PageBlobAsyncClient#uploadPagesFromURLWithResponse(PageRange, String, Long, byte[], + * Code snippets for {@link PageBlobAsyncClient#uploadPagesFromUrlWithResponse(PageRange, String, Long, byte[], * PageBlobRequestConditions, BlobRequestConditions)} */ public void uploadPagesFromUrlWithResponseCodeSnippet() { diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java index ef60b7ee3b8d..60dca4dc58ed 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java @@ -51,6 +51,17 @@ public void createCodeSnippet() { // END: com.azure.storage.blob.PageBlobClient.create#long } + /** + * Code snippets for {@link PageBlobClient#create(long, boolean)} + */ + public void createWithOverwrite() { + // BEGIN: com.azure.storage.blob.PageBlobClient.create#long-boolean + boolean overwrite = false; // Default value + PageBlobItem pageBlob = client.create(size, overwrite); + System.out.printf("Created page blob with sequence number %s%n", pageBlob.getBlobSequenceNumber()); + // END: com.azure.storage.blob.PageBlobClient.create#long-boolean + } + /** * Code snippets for {@link PageBlobClient#createWithResponse(long, Long, BlobHttpHeaders, Map, BlobRequestConditions, Duration, Context)} */ diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy index 5c1ad45365d9..e425883875d9 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy @@ -490,4 +490,20 @@ class AppendBlobAPITest extends APISpec { expect: blobName == bc.getBlobName() } + + def "Create overwrite false"() { + when: + bc.create() + + then: + thrown(BlobStorageException) + } + + def "Create overwrite true"() { + when: + bc.create(true) + + then: + notThrown(Throwable) + } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy index 7cb4f3c44d25..08b89d70ea8c 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy @@ -991,7 +991,7 @@ class BlockBlobAPITest extends APISpec { when: ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() .setBlockSize(4).setNumBuffers(4) - blobac.upload(null, parallelTransferOptions).block() + blobac.upload(null, parallelTransferOptions, true).block() then: thrown(NullPointerException) @@ -1002,7 +1002,7 @@ class BlockBlobAPITest extends APISpec { when: ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() .setBlockSize(bufferSize).setNumBuffers(numBuffs) - blobac.upload(Flux.just(defaultData), parallelTransferOptions).block() + blobac.upload(Flux.just(defaultData), parallelTransferOptions, true).block() then: thrown(IllegalArgumentException) @@ -1021,12 +1021,12 @@ class BlockBlobAPITest extends APISpec { when: ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() .setBlockSize(10) - blobac.uploadWithResponse(defaultFlux, parallelTransferOptions, new BlobHttpHeaders().setBlobCacheControl(cacheControl) - .setBlobContentDisposition(contentDisposition) - .setBlobContentEncoding(contentEncoding) - .setBlobContentLanguage(contentLanguage) - .setBlobContentMD5(contentMD5) - .setBlobContentType(contentType), + blobac.uploadWithResponse(defaultFlux, parallelTransferOptions, new BlobHttpHeaders().setCacheControl(cacheControl) + .setContentDisposition(contentDisposition) + .setContentEncoding(contentEncoding) + .setContentLanguage(contentLanguage) + .setContentMd5(contentMD5) + .setContentType(contentType), null, null, null).block() then: @@ -1237,7 +1237,7 @@ class BlockBlobAPITest extends APISpec { // Try to upload the flowable, which will hit a retry. A normal upload would throw, but buffering prevents that. ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() .setBlockSize(1024).setNumBuffers(4) - blobac.upload(nonReplayableFlux, parallelTransferOptions).block() + blobac.upload(nonReplayableFlux, parallelTransferOptions, true).block() // TODO: It could be that duplicates aren't getting made in the retry policy? Or before the retry policy? then: @@ -1255,4 +1255,44 @@ class BlockBlobAPITest extends APISpec { expect: blobName == bc.getBlobName() } + + @Requires({liveMode()}) + def "BlobClient overwrite false"() { + setup: + def file = new File(this.getClass().getResource("/testfiles/uploadFromFileTestData.txt").getPath()) + + when: + blobClient.uploadFromFile(file.getPath()) + + then: + thrown(IllegalArgumentException) + } + + @Requires({liveMode()}) + def "BlobClient overwrite true"() { + setup: + def file = new File(this.getClass().getResource("/testfiles/uploadFromFileTestData.txt").getPath()) + + when: + blobClient.uploadFromFile(file.getPath(), true) + + then: + notThrown(Throwable) + } + + def "Upload overwrite false"() { + when: + bc.upload(defaultInputStream.get(), defaultDataSize) + + then: + thrown(BlobStorageException) + } + + def "Upload overwrite true"() { + when: + bc.upload(defaultInputStream.get(), defaultDataSize, true) + + then: + notThrown(Throwable) + } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy index 28fedb906ff7..702a8676ea31 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy @@ -1091,4 +1091,20 @@ class PageBlobAPITest extends APISpec { expect: blobName == bc.getBlobName() } + + def "Create overwrite false"() { + when: + bc.create(512) + + then: + thrown(BlobStorageException) + } + + def "Create overwrite true"() { + when: + bc.create(512, true) + + then: + notThrown(Throwable) + } } diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateoverwritefalse.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateoverwritefalse.json new file mode 100644 index 000000000000..92fb0338e84c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateoverwritefalse.json @@ -0,0 +1,109 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtccreateoverwritefalse029692540270f3cedb45b8a?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "51a8184b-4008-4fe4-bed1-1cb7b604a605" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757EC97ADE678", + "Last-Modified" : "Wed, 23 Oct 2019 19:09:56 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "604bdc80-801e-0018-0ed5-894d5c000000", + "Date" : "Wed, 23 Oct 2019 19:09:56 GMT", + "x-ms-client-request-id" : "51a8184b-4008-4fe4-bed1-1cb7b604a605" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtccreateoverwritefalse029692540270f3cedb45b8a/javablobcreateoverwritefalse19485661498ce16c084d", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "4c8c345f-6d2b-4eb2-a65b-06f3a28e9bf2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757EC97D928AF", + "Last-Modified" : "Wed, 23 Oct 2019 19:09:56 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "604bdc89-801e-0018-15d5-894d5c000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 19:09:56 GMT", + "x-ms-client-request-id" : "4c8c345f-6d2b-4eb2-a65b-06f3a28e9bf2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtccreateoverwritefalse029692540270f3cedb45b8a/javablobcreateoverwritefalse19485661498ce16c084d", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "7bf72477-c2d0-43b7-8c38-8f1eebaea7cb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "BlobAlreadyExists", + "retry-after" : "0", + "Content-Length" : "220", + "StatusCode" : "409", + "x-ms-request-id" : "604bdc8b-801e-0018-17d5-894d5c000000", + "Body" : "BlobAlreadyExistsThe specified blob already exists.\nRequestId:604bdc8b-801e-0018-17d5-894d5c000000\nTime:2019-10-23T19:09:56.8799274Z", + "Date" : "Wed, 23 Oct 2019 19:09:56 GMT", + "x-ms-client-request-id" : "7bf72477-c2d0-43b7-8c38-8f1eebaea7cb", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtccreateoverwritefalse&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "7bfc0dce-bfc0-44bf-9b7b-50748a772ea5" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "604bdc8e-801e-0018-1ad5-894d5c000000", + "Body" : "jtccreateoverwritefalsejtccreateoverwritefalse029692540270f3cedb45b8aWed, 23 Oct 2019 19:09:56 GMT\"0x8D757EC97ADE678\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 19:09:56 GMT", + "x-ms-client-request-id" : "7bfc0dce-bfc0-44bf-9b7b-50748a772ea5", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtccreateoverwritefalse029692540270f3cedb45b8a?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "bb64a365-a5b5-4409-b768-057607aceb1c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "604bdc91-801e-0018-1dd5-894d5c000000", + "Date" : "Wed, 23 Oct 2019 19:09:56 GMT", + "x-ms-client-request-id" : "bb64a365-a5b5-4409-b768-057607aceb1c" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateoverwritefalse029692540270f3cedb45b8a", "javablobcreateoverwritefalse19485661498ce16c084d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateoverwritetrue.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateoverwritetrue.json new file mode 100644 index 000000000000..85ffda6d6ace --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateoverwritetrue.json @@ -0,0 +1,109 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtccreateoverwritetrue0377565c1e4718a0974f8e9?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "6386b80f-0954-4e78-b502-2b3677614288" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757EC9C90CFFD", + "Last-Modified" : "Wed, 23 Oct 2019 19:10:04 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4472a500-901e-0014-71d5-89da54000000", + "Date" : "Wed, 23 Oct 2019 19:10:03 GMT", + "x-ms-client-request-id" : "6386b80f-0954-4e78-b502-2b3677614288" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtccreateoverwritetrue0377565c1e4718a0974f8e9/javablobcreateoverwritetrue1111141c922a1325aa4af", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "4ff642bb-df31-48ad-92d6-c5a6bdacc14e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757EC9CAE076D", + "Last-Modified" : "Wed, 23 Oct 2019 19:10:04 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4472a509-901e-0014-78d5-89da54000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 19:10:03 GMT", + "x-ms-client-request-id" : "4ff642bb-df31-48ad-92d6-c5a6bdacc14e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtccreateoverwritetrue0377565c1e4718a0974f8e9/javablobcreateoverwritetrue1111141c922a1325aa4af", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "465c7290-3045-408e-81a9-689ecbada419" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757EC9CBEA921", + "Last-Modified" : "Wed, 23 Oct 2019 19:10:04 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4472a50f-901e-0014-7bd5-89da54000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 19:10:04 GMT", + "x-ms-client-request-id" : "465c7290-3045-408e-81a9-689ecbada419" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtccreateoverwritetrue&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "7e353ddf-f4c4-4447-9229-612566e04770" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4472a513-901e-0014-7fd5-89da54000000", + "Body" : "jtccreateoverwritetruejtccreateoverwritetrue0377565c1e4718a0974f8e9Wed, 23 Oct 2019 19:10:04 GMT\"0x8D757EC9C90CFFD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 19:10:04 GMT", + "x-ms-client-request-id" : "7e353ddf-f4c4-4447-9229-612566e04770", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtccreateoverwritetrue0377565c1e4718a0974f8e9?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "6f99ef40-ca01-4c4a-9c49-5cf689f835bd" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "4472a516-901e-0014-02d5-89da54000000", + "Date" : "Wed, 23 Oct 2019 19:10:04 GMT", + "x-ms-client-request-id" : "6f99ef40-ca01-4c4a-9c49-5cf689f835bd" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateoverwritetrue0377565c1e4718a0974f8e9", "javablobcreateoverwritetrue1111141c922a1325aa4af" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestblobclientoverwritefalse.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestblobclientoverwritefalse.json new file mode 100644 index 000000000000..e00dcbab8873 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestblobclientoverwritefalse.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "jtcblobclientoverwritefalse078571ed4db1b61c394d2", "javablobblobclientoverwritefalse1034150caff0fac2a7", "javablobblobclientoverwritefalse223063fe3849af4c09" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestblobclientoverwritetrue.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestblobclientoverwritetrue.json new file mode 100644 index 000000000000..8b6ec7c1b243 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestblobclientoverwritetrue.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "jtcblobclientoverwritetrue054174a2943b7b57a84d0", "javablobblobclientoverwritetrue15026967223a94f0714", "javablobblobclientoverwritetrue201686c295426104304" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestbuffereduploadnetworkerror.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestbuffereduploadnetworkerror.json index edb59b85e482..3b5e80964994 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestbuffereduploadnetworkerror.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestbuffereduploadnetworkerror.json @@ -1,112 +1,112 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbuffereduploadnetworkerror039407532ac08b66ae48?restype=container", + "Uri" : "https://gapradev.blob.core.windows.net/jtcbuffereduploadnetworkerror0858971b221389f9404f?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "03753063-7fc3-40a7-8276-75e0100d8c0e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "87c46577-a3c2-49af-8529-fae4d9444943" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AEA8EA0BB8", - "Last-Modified" : "Tue, 15 Oct 2019 20:31:29 GMT", + "ETag" : "0x8D757F0B8B26C2B", + "Last-Modified" : "Wed, 23 Oct 2019 19:39:29 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b84a4d56-701e-013d-1697-83c305000000", - "Date" : "Tue, 15 Oct 2019 20:31:29 GMT", - "x-ms-client-request-id" : "03753063-7fc3-40a7-8276-75e0100d8c0e" + "x-ms-request-id" : "466b63b5-f01e-0002-26d9-892c83000000", + "Date" : "Wed, 23 Oct 2019 19:39:29 GMT", + "x-ms-client-request-id" : "87c46577-a3c2-49af-8529-fae4d9444943" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbuffereduploadnetworkerror039407532ac08b66ae48/javablobbuffereduploadnetworkerror177513953226a9d82", + "Uri" : "https://gapradev.blob.core.windows.net/jtcbuffereduploadnetworkerror0858971b221389f9404f/javablobbuffereduploadnetworkerror157364ee2036bc795", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9714fe5f-8f58-47ba-964a-150d54bc33ba", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "bc190497-34d2-454e-9001-b9ab5b125a19", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:31:29 GMT", + "Last-Modified" : "Wed, 23 Oct 2019 19:39:30 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:31:29 GMT", + "Date" : "Wed, 23 Oct 2019 19:39:29 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AEA8F27B22", + "ETag" : "0x8D757F0B8D821A0", "Content-Length" : "0", - "x-ms-request-id" : "83682a55-801e-004a-7497-830011000000", - "x-ms-client-request-id" : "9714fe5f-8f58-47ba-964a-150d54bc33ba" + "x-ms-request-id" : "466b63c9-f01e-0002-38d9-892c83000000", + "x-ms-client-request-id" : "bc190497-34d2-454e-9001-b9ab5b125a19" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbuffereduploadnetworkerror039407532ac08b66ae48/javablobbuffereduploadnetworkerror23648410d1cd0771f", + "Uri" : "https://gapradev.blob.core.windows.net/jtcbuffereduploadnetworkerror0858971b221389f9404f/javablobbuffereduploadnetworkerror28175306be0d34bf5", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "afed06c6-f62d-41f6-a192-e51955faa81b", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "9eb18bfa-b40e-4b21-91dc-c04f3e7cd489", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:31:29 GMT", + "Last-Modified" : "Wed, 23 Oct 2019 19:39:30 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:31:29 GMT", + "Date" : "Wed, 23 Oct 2019 19:39:30 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751AEA8F90C7D", + "ETag" : "0x8D757F0B8EEB6CA", "Content-Length" : "0", - "x-ms-request-id" : "054f874d-e01e-0015-0697-83f2ef000000", - "x-ms-client-request-id" : "afed06c6-f62d-41f6-a192-e51955faa81b" + "x-ms-request-id" : "466b63d2-f01e-0002-41d9-892c83000000", + "x-ms-client-request-id" : "9eb18bfa-b40e-4b21-91dc-c04f3e7cd489" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbuffereduploadnetworkerror039407532ac08b66ae48/javablobbuffereduploadnetworkerror23648410d1cd0771f", + "Uri" : "https://gapradev.blob.core.windows.net/jtcbuffereduploadnetworkerror0858971b221389f9404f/javablobbuffereduploadnetworkerror28175306be0d34bf5", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8d21092a-e33e-4671-8ba2-1348d8e2be2a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "57cf4d5a-3dcf-4053-aa2b-646a89e52c9f" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Tue, 15 Oct 2019 20:31:29 GMT", + "Last-Modified" : "Wed, 23 Oct 2019 19:39:30 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 15 Oct 2019 20:31:28 GMT", + "Date" : "Wed, 23 Oct 2019 19:39:30 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D751AEA8F90C7D", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:31:29 GMT", + "ETag" : "0x8D757F0B8EEB6CA", + "x-ms-creation-time" : "Wed, 23 Oct 2019 19:39:30 GMT", "Content-Length" : "7", - "x-ms-request-id" : "cf5ca9ae-001e-001f-3697-83eb66000000", + "x-ms-request-id" : "466b63dc-f01e-0002-4bd9-892c83000000", "Body" : "[100, 101, 102, 97, 117, 108, 116]", - "x-ms-client-request-id" : "8d21092a-e33e-4671-8ba2-1348d8e2be2a", + "x-ms-client-request-id" : "57cf4d5a-3dcf-4053-aa2b-646a89e52c9f", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcbuffereduploadnetworkerror&comp=list", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcbuffereduploadnetworkerror&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "cfcbc479-06b5-42a2-9384-28e369c92f5f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "6c6dac66-20ce-4e47-ba8c-d1978f9c2b7c" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -114,20 +114,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "e527a2bf-c01e-0020-1697-835cba000000", - "Body" : "jtcbuffereduploadnetworkerrorjtcbuffereduploadnetworkerror039407532ac08b66ae48Tue, 15 Oct 2019 20:31:29 GMT\"0x8D751AEA8EA0BB8\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:31:31 GMT", - "x-ms-client-request-id" : "cfcbc479-06b5-42a2-9384-28e369c92f5f", + "x-ms-request-id" : "466b6459-f01e-0002-3ed9-892c83000000", + "Body" : "jtcbuffereduploadnetworkerrorjtcbuffereduploadnetworkerror0858971b221389f9404fWed, 23 Oct 2019 19:39:29 GMT\"0x8D757F0B8B26C2B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 19:39:32 GMT", + "x-ms-client-request-id" : "6c6dac66-20ce-4e47-ba8c-d1978f9c2b7c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcbuffereduploadnetworkerror039407532ac08b66ae48?restype=container", + "Uri" : "https://gapradev.blob.core.windows.net/jtcbuffereduploadnetworkerror0858971b221389f9404f?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "3031a5ee-4b85-42c1-bd6a-3f01db304089" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "f2f6febf-8ac2-42a1-800b-26df25d0dd45" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -135,11 +135,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "9181fb04-501e-008f-3a97-837e2a000000", - "Date" : "Tue, 15 Oct 2019 20:31:31 GMT", - "x-ms-client-request-id" : "3031a5ee-4b85-42c1-bd6a-3f01db304089" + "x-ms-request-id" : "466b6465-f01e-0002-49d9-892c83000000", + "Date" : "Wed, 23 Oct 2019 19:39:32 GMT", + "x-ms-client-request-id" : "f2f6febf-8ac2-42a1-800b-26df25d0dd45" }, "Exception" : null } ], - "variables" : [ "jtcbuffereduploadnetworkerror039407532ac08b66ae48", "javablobbuffereduploadnetworkerror177513953226a9d82", "javablobbuffereduploadnetworkerror23648410d1cd0771f", "jtcbuffereduploadnetworkerror3438296e985980e07941", "javablobbuffereduploadnetworkerror4059954e4f812a0f5" ] + "variables" : [ "jtcbuffereduploadnetworkerror0858971b221389f9404f", "javablobbuffereduploadnetworkerror157364ee2036bc795", "javablobbuffereduploadnetworkerror28175306be0d34bf5", "jtcbuffereduploadnetworkerror301972d3101ed6368446", "javablobbuffereduploadnetworkerror405946c2f35445b4e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadoverwritefalse.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadoverwritefalse.json new file mode 100644 index 000000000000..f2eb8e7e9620 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadoverwritefalse.json @@ -0,0 +1,113 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcuploadoverwritefalse0840839e759a1dee6f4b4cb?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "686d533a-376d-4bab-8bb7-86de26731379" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757EF8BC84BD2", + "Last-Modified" : "Wed, 23 Oct 2019 19:31:05 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f3a8ae59-a01e-0020-0bd8-89e99c000000", + "Date" : "Wed, 23 Oct 2019 19:31:04 GMT", + "x-ms-client-request-id" : "686d533a-376d-4bab-8bb7-86de26731379" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcuploadoverwritefalse0840839e759a1dee6f4b4cb/javablobuploadoverwritefalse124209c75ab16da92a42", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "6cd9cdb4-11d9-41d0-84b9-2d64b8963231", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Wed, 23 Oct 2019 19:31:05 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 19:31:04 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D757EF8BEA81C1", + "Content-Length" : "0", + "x-ms-request-id" : "f3a8ae5c-a01e-0020-0cd8-89e99c000000", + "x-ms-client-request-id" : "6cd9cdb4-11d9-41d0-84b9-2d64b8963231" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcuploadoverwritefalse0840839e759a1dee6f4b4cb/javablobuploadoverwritefalse124209c75ab16da92a42", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "056c4747-d245-4353-8add-b0ad1d2a6bc6", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "BlobAlreadyExists", + "retry-after" : "0", + "Content-Length" : "220", + "StatusCode" : "409", + "x-ms-request-id" : "f3a8ae5f-a01e-0020-0fd8-89e99c000000", + "Body" : "BlobAlreadyExistsThe specified blob already exists.\nRequestId:f3a8ae5f-a01e-0020-0fd8-89e99c000000\nTime:2019-10-23T19:31:05.3977817Z", + "Date" : "Wed, 23 Oct 2019 19:31:04 GMT", + "x-ms-client-request-id" : "056c4747-d245-4353-8add-b0ad1d2a6bc6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcuploadoverwritefalse&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "6a8a5d04-cd94-4a61-bc24-9b99a8b71d71" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "f3a8ae60-a01e-0020-10d8-89e99c000000", + "Body" : "jtcuploadoverwritefalsejtcuploadoverwritefalse0840839e759a1dee6f4b4cbWed, 23 Oct 2019 19:31:05 GMT\"0x8D757EF8BC84BD2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 19:31:04 GMT", + "x-ms-client-request-id" : "6a8a5d04-cd94-4a61-bc24-9b99a8b71d71", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcuploadoverwritefalse0840839e759a1dee6f4b4cb?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "ae63d706-1435-45ae-b816-5264d5519639" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "f3a8ae61-a01e-0020-11d8-89e99c000000", + "Date" : "Wed, 23 Oct 2019 19:31:04 GMT", + "x-ms-client-request-id" : "ae63d706-1435-45ae-b816-5264d5519639" + }, + "Exception" : null + } ], + "variables" : [ "jtcuploadoverwritefalse0840839e759a1dee6f4b4cb", "javablobuploadoverwritefalse124209c75ab16da92a42", "javablobuploadoverwritefalse2339290af03b4a0ac641" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadoverwritetrue.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadoverwritetrue.json new file mode 100644 index 000000000000..db622ff41ce9 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadoverwritetrue.json @@ -0,0 +1,115 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcuploadoverwritetrue029187badf4797cecf44b49?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "41f0dd22-0dbb-41a1-be87-ab7405ee6dcd" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757EF913B9088", + "Last-Modified" : "Wed, 23 Oct 2019 19:31:14 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2af0d1a8-401e-0038-11d8-8936fb000000", + "Date" : "Wed, 23 Oct 2019 19:31:14 GMT", + "x-ms-client-request-id" : "41f0dd22-0dbb-41a1-be87-ab7405ee6dcd" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcuploadoverwritetrue029187badf4797cecf44b49/javablobuploadoverwritetrue1323026d24b33e7861449", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "d3e294c4-f1b6-4cb3-b31b-45b2edc5bdba", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Wed, 23 Oct 2019 19:31:14 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 19:31:14 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D757EF915A1944", + "Content-Length" : "0", + "x-ms-request-id" : "2af0d1b6-401e-0038-1ad8-8936fb000000", + "x-ms-client-request-id" : "d3e294c4-f1b6-4cb3-b31b-45b2edc5bdba" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcuploadoverwritetrue029187badf4797cecf44b49/javablobuploadoverwritetrue1323026d24b33e7861449", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "f5b456af-f6e1-47ab-a4eb-118520e9de92", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Wed, 23 Oct 2019 19:31:14 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 19:31:14 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D757EF916B3056", + "Content-Length" : "0", + "x-ms-request-id" : "2af0d1bf-401e-0038-23d8-8936fb000000", + "x-ms-client-request-id" : "f5b456af-f6e1-47ab-a4eb-118520e9de92" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcuploadoverwritetrue&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "a9c26643-da36-49e2-88b7-6897d5c03638" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "2af0d1c5-401e-0038-28d8-8936fb000000", + "Body" : "jtcuploadoverwritetruejtcuploadoverwritetrue029187badf4797cecf44b49Wed, 23 Oct 2019 19:31:14 GMT\"0x8D757EF913B9088\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 19:31:14 GMT", + "x-ms-client-request-id" : "a9c26643-da36-49e2-88b7-6897d5c03638", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcuploadoverwritetrue029187badf4797cecf44b49?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "b12a539e-1caa-47b2-94dd-635a7c64d20a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "2af0d1cb-401e-0038-2ed8-8936fb000000", + "Date" : "Wed, 23 Oct 2019 19:31:14 GMT", + "x-ms-client-request-id" : "b12a539e-1caa-47b2-94dd-635a7c64d20a" + }, + "Exception" : null + } ], + "variables" : [ "jtcuploadoverwritetrue029187badf4797cecf44b49", "javablobuploadoverwritetrue1323026d24b33e7861449", "javablobuploadoverwritetrue2575923b639a3f78d94cd" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateoverwritefalse.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateoverwritefalse.json new file mode 100644 index 000000000000..6ac833397bd1 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateoverwritefalse.json @@ -0,0 +1,109 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://gapradev.blob.core.windows.net/jtccreateoverwritefalse0106618ec853c612644d49a?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "dc40c0f2-6b9b-4173-a8d5-b2d26361e0a9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757EE536A182D", + "Last-Modified" : "Wed, 23 Oct 2019 19:22:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3f9422ab-501e-001b-7bd7-89ac38000000", + "Date" : "Wed, 23 Oct 2019 19:22:20 GMT", + "x-ms-client-request-id" : "dc40c0f2-6b9b-4173-a8d5-b2d26361e0a9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://gapradev.blob.core.windows.net/jtccreateoverwritefalse0106618ec853c612644d49a/javablobcreateoverwritefalse147441de90c8ae89b74e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "3ea299ac-ce10-4c88-9d45-ebc26c8dd937" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757EE538A23E8", + "Last-Modified" : "Wed, 23 Oct 2019 19:22:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3f9422b5-501e-001b-03d7-89ac38000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 19:22:21 GMT", + "x-ms-client-request-id" : "3ea299ac-ce10-4c88-9d45-ebc26c8dd937" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://gapradev.blob.core.windows.net/jtccreateoverwritefalse0106618ec853c612644d49a/javablobcreateoverwritefalse147441de90c8ae89b74e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "2f355091-ad01-4c6f-ad3c-7c12168cda62" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "BlobAlreadyExists", + "retry-after" : "0", + "Content-Length" : "220", + "StatusCode" : "409", + "x-ms-request-id" : "3f9422b8-501e-001b-06d7-89ac38000000", + "Body" : "BlobAlreadyExistsThe specified blob already exists.\nRequestId:3f9422b8-501e-001b-06d7-89ac38000000\nTime:2019-10-23T19:22:21.2599444Z", + "Date" : "Wed, 23 Oct 2019 19:22:21 GMT", + "x-ms-client-request-id" : "2f355091-ad01-4c6f-ad3c-7c12168cda62", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://gapradev.blob.core.windows.net?prefix=jtccreateoverwritefalse&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "ecdccdcf-edef-428f-9018-007ef1546dcf" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3f9422bb-501e-001b-09d7-89ac38000000", + "Body" : "jtccreateoverwritefalsejtccreateoverwritefalse0106618ec853c612644d49aWed, 23 Oct 2019 19:22:20 GMT\"0x8D757EE536A182D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 19:22:21 GMT", + "x-ms-client-request-id" : "ecdccdcf-edef-428f-9018-007ef1546dcf", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://gapradev.blob.core.windows.net/jtccreateoverwritefalse0106618ec853c612644d49a?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "141d89c9-298a-4dcf-bef1-3e2922ac8085" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "3f9422bd-501e-001b-0bd7-89ac38000000", + "Date" : "Wed, 23 Oct 2019 19:22:21 GMT", + "x-ms-client-request-id" : "141d89c9-298a-4dcf-bef1-3e2922ac8085" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateoverwritefalse0106618ec853c612644d49a", "javablobcreateoverwritefalse147441de90c8ae89b74e" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateoverwritetrue.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateoverwritetrue.json new file mode 100644 index 000000000000..e8176e238c48 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateoverwritetrue.json @@ -0,0 +1,109 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtccreateoverwritetrue02574566718296eb614fb68?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "eafb9099-9377-40b2-b4de-33a16d67c916" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757EE1174CAFB", + "Last-Modified" : "Wed, 23 Oct 2019 19:20:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "218e80bf-b01e-003c-4ed6-89bbfc000000", + "Date" : "Wed, 23 Oct 2019 19:20:29 GMT", + "x-ms-client-request-id" : "eafb9099-9377-40b2-b4de-33a16d67c916" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtccreateoverwritetrue02574566718296eb614fb68/javablobcreateoverwritetrue147327f739f36f331641e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "726f905f-f9d4-4bfd-88ea-53b56793b248" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757EE11941A08", + "Last-Modified" : "Wed, 23 Oct 2019 19:20:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "218e80cb-b01e-003c-57d6-89bbfc000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 19:20:29 GMT", + "x-ms-client-request-id" : "726f905f-f9d4-4bfd-88ea-53b56793b248" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtccreateoverwritetrue02574566718296eb614fb68/javablobcreateoverwritetrue147327f739f36f331641e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "9e5c310c-66de-4c20-9e8d-ff0ad7ab70f0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757EE11A3F85F", + "Last-Modified" : "Wed, 23 Oct 2019 19:20:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "218e80d0-b01e-003c-5cd6-89bbfc000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 19:20:29 GMT", + "x-ms-client-request-id" : "9e5c310c-66de-4c20-9e8d-ff0ad7ab70f0" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtccreateoverwritetrue&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "3924de5d-60bb-40a0-aa97-c7265300ecac" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "218e80d9-b01e-003c-65d6-89bbfc000000", + "Body" : "jtccreateoverwritetruejtccreateoverwritetrue02574566718296eb614fb68Wed, 23 Oct 2019 19:20:30 GMT\"0x8D757EE1174CAFB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 19:20:29 GMT", + "x-ms-client-request-id" : "3924de5d-60bb-40a0-aa97-c7265300ecac", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtccreateoverwritetrue02574566718296eb614fb68?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "a7fd2973-b0d1-459b-9434-a218d0792811" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "218e80e2-b01e-003c-6dd6-89bbfc000000", + "Date" : "Wed, 23 Oct 2019 19:20:29 GMT", + "x-ms-client-request-id" : "a7fd2973-b0d1-459b-9434-a218d0792811" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateoverwritetrue02574566718296eb614fb68", "javablobcreateoverwritetrue147327f739f36f331641e" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java index df5b6a0e3d2b..78d97ab79e2d 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java @@ -49,6 +49,9 @@ public final class Constants { public static final DateTimeFormatter ISO_8601_UTC_DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.ROOT).withZone(ZoneId.of("UTC")); + public static final String BLOB_ALREADY_EXISTS = + "Blob already exists. Specify overwrite to true to force update the blob."; + private Constants() { } @@ -195,6 +198,8 @@ public static final class HeaderConstants { public static final String REQUEST_SERVER_ENCRYPTED = "x-ms-request-server-encrypted"; + public static final String ETAG_WILDCARD = "*"; + private HeaderConstants() { // Private to prevent construction. } From e37d8a5f3e4a15c2f2ddf442ca66a18298aa322b Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Wed, 23 Oct 2019 16:57:22 -0700 Subject: [PATCH 55/64] =?UTF-8?q?Added=20UTF-8=20encoding=20for=20blob=20n?= =?UTF-8?q?ames=20in=20methods=20that=20are=20used=20to=20build=E2=80=A6?= =?UTF-8?q?=20(#5943)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added UTF-8 encoding for blob names in methods that are used to build blob clients or manipulate blobs. Also added documentation where blob names are part of the flow so that the user knows what is happening in case they are thinking of passing an already encoded name. * Added missing comments about encryption to the Javadoc of some classes. Removed the use of the Utility.urlEncoder() in a couple methods where it was not necessary and would actually cause double encoding. Added one use of said method to BlobAsyncClient. * Changed a few couple Groovy tests that were failing because the expected session records did not account for the newly added encoding * Removed a call to Utility.urlEncode() in BLobContainerAsyncClient that would make blob URLs to be encoded twice. * Broke a couple lines in BlobBatch into two parts to comply with the code style guidelines. * Added missing space to a line in BlobBatch. It was flagged by the CI style checker. * Fixed an issue that made some test cases fail: blobName needs to be encoded when putting together the blobUrl that is passed as a a constructor argument for specialized blob clients. Added blobName decoding before encoding it so that if users pass encoded names we can properly deal with them; little to no overhead was added by this. * Made sure that blob names are decoded from UTF-8 before being returned by getters and modified certain builders to account for this. Added encoding for setting the blobName in BlobServiceSasSignatureValues. Modified and added tests to account for encoding and added the generated session records as well. Corrected a test that did not compile on BlockBlobAPITest. * Because we are doing encoding blob names implicitly, there is no point in telling the user we are doing this, so I removed parts of the Javadoc that referenced the fact. For the sake of clarity, I added the the Javadoc in blob name getters so that users know the returned blob name will always be decoded (it's possible they set an encoded name and expect to see the same value from the get method). Also added a clarification that states blob names must be encoded to UTF-8 to the Javadoc of methods that take blob URLs as an argument. * Made sure that the blobName used to generate a SAS signature is decoded. According to Rick Ley from the Storage team: "storage account name and the resource name must be URL-decoded". --- .../azure/storage/blob/batch/BlobBatch.java | 22 ++- .../blob/batch/BlobBatchAsyncClient.java | 4 +- .../storage/blob/batch/BlobBatchClient.java | 8 +- .../azure/storage/blob/batch/APISpec.groovy | 2 +- .../EncryptedBlobClientBuilder.java | 6 +- .../specialized/cryptography/APISpec.groovy | 2 +- .../azure/storage/blob/BlobClientBuilder.java | 6 +- .../blob/BlobContainerAsyncClient.java | 7 +- .../com/azure/storage/blob/BlobUrlParts.java | 8 +- .../blob/specialized/BlobAsyncClientBase.java | 9 +- .../blob/specialized/BlobClientBase.java | 4 +- .../BlobServiceSasSignatureValues.java | 7 +- .../SpecializedBlobClientBuilder.java | 6 +- .../com/azure/storage/blob/APISpec.groovy | 2 +- .../com/azure/storage/blob/BlobAPITest.groovy | 17 ++ .../storage/blob/ContainerAPITest.groovy | 48 ++++- .../com/azure/storage/blob/SASTest.groovy | 12 +- .../blob/specialized/BlockBlobAPITest.groovy | 17 ++ .../blob/specialized/HelperTest.groovy | 30 ++- .../blob/specialized/PageBlobAPITest.groovy | 17 ++ .../session-records/BlobAPITestcopymin.json | 14 +- .../BlobAPITestcopypoller.json | 18 +- .../BlobAPITestgetblobnameandbuildclient.json | 90 +++++++++ ...kBlobAPITestgetblobnameandbuildclient.json | 90 +++++++++ ...tainerAPITestcreateurlspecialchars[0].json | 122 ++++++------ ...tainerAPITestcreateurlspecialchars[1].json | 122 ++++++------ ...tainerAPITestcreateurlspecialchars[2].json | 122 ++++++------ ...tainerAPITestcreateurlspecialchars[3].json | 184 ++++++++++++++++++ ...tainerAPITestcreateurlspecialchars[4].json | 184 ++++++++++++++++++ ...tainerAPITestcreateurlspecialchars[5].json | 184 ++++++++++++++++++ ...PITestcreateurlspecialcharsencoded[0].json | 184 ++++++++++++++++++ ...PITestcreateurlspecialcharsencoded[1].json | 184 ++++++++++++++++++ ...PITestcreateurlspecialcharsencoded[2].json | 184 ++++++++++++++++++ ...PITestcreateurlspecialcharsencoded[3].json | 184 ++++++++++++++++++ ...PITestcreateurlspecialcharsencoded[4].json | 184 ++++++++++++++++++ ...PITestcreateurlspecialcharsencoded[5].json | 184 ++++++++++++++++++ .../ContainerAPITestlistblobshierdelim.json | 8 +- .../HelperTestipurlparser[0].json | 42 ++-- .../HelperTestipurlparser[1].json | 42 ++-- .../HelperTestipurlparser[2].json | 42 ++-- .../HelperTestipurlparser[3].json | 42 ++-- .../HelperTestipurlparser[4].json | 42 ++-- .../HelperTestipurlparser[5].json | 42 ++-- .../HelperTestipurlparser[6].json | 65 +++++++ .../HelperTestipurlparser[7].json | 65 +++++++ .../HelperTestipurlparser[8].json | 65 +++++++ .../HelperTestipurlparser[9].json | 65 +++++++ .../session-records/HelperTesturlparser.json | 42 ++-- ...eBlobAPITestgetblobnameandbuildclient.json | 87 +++++++++ .../session-records/SASTesturlparser.json | 42 ++-- ...esturlparserblobnamespecialcharacters.json | 103 ++++++++++ .../SASTesturlparserencodedblobname.json | 65 +++++++ 52 files changed, 2898 insertions(+), 429 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetblobnameandbuildclient.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestgetblobnameandbuildclient.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[3].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[4].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[5].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[0].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[1].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[2].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[3].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[4].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[5].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[6].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[7].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[8].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[9].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetblobnameandbuildclient.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparserblobnamespecialcharacters.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparserencodedblobname.json diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java index dcee3ae36c7c..b883efaac122 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java @@ -20,6 +20,7 @@ import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; +import com.azure.storage.common.Utility; import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import reactor.core.Disposable; import reactor.core.Exceptions; @@ -136,7 +137,8 @@ public final class BlobBatch { * @throws UnsupportedOperationException If this batch has already added an operation of another type. */ public Response deleteBlob(String containerName, String blobName) { - return deleteBlobHelper(String.format(PATH_TEMPLATE, containerName, blobName), null, null); + return deleteBlobHelper(String.format(PATH_TEMPLATE, containerName, + Utility.urlEncode(Utility.urlDecode(blobName))), null, null); } /** @@ -156,8 +158,8 @@ public Response deleteBlob(String containerName, String blobName) { */ public Response deleteBlob(String containerName, String blobName, DeleteSnapshotsOptionType deleteOptions, BlobRequestConditions blobRequestConditions) { - return deleteBlobHelper(String.format(PATH_TEMPLATE, containerName, blobName), - deleteOptions, blobRequestConditions); + return deleteBlobHelper(String.format(PATH_TEMPLATE, containerName, + Utility.urlEncode(Utility.urlDecode(blobName))), deleteOptions, blobRequestConditions); } /** @@ -167,7 +169,7 @@ public Response deleteBlob(String containerName, String blobName, * * {@codesnippet com.azure.storage.blob.batch.BlobBatch.deleteBlob#String} * - * @param blobUrl URL of the blob. + * @param blobUrl URL of the blob. Blob name must be encoded to UTF-8. * @return a {@link Response} that will be used to associate this operation to the response when the batch is * submitted. * @throws UnsupportedOperationException If this batch has already added an operation of another type. @@ -183,7 +185,7 @@ public Response deleteBlob(String blobUrl) { * * {@codesnippet com.azure.storage.blob.batch.BlobBatch.deleteBlob#String-DeleteSnapshotsOptionType-BlobRequestConditions} * - * @param blobUrl URL of the blob. + * @param blobUrl URL of the blob. Blob name must be encoded to UTF-8. * @param deleteOptions Delete options for the blob and its snapshots. * @param blobRequestConditions Additional access conditions that must be met to allow this operation. * @return a {@link Response} that will be used to associate this operation to the response when the batch is @@ -217,7 +219,8 @@ private Response deleteBlobHelper(String urlPath, DeleteSnapshotsOptionTyp * @throws UnsupportedOperationException If this batch has already added an operation of another type. */ public Response setBlobAccessTier(String containerName, String blobName, AccessTier accessTier) { - return setBlobAccessTierHelper(String.format(PATH_TEMPLATE, containerName, blobName), accessTier, null); + return setBlobAccessTierHelper(String.format(PATH_TEMPLATE, containerName, + Utility.urlEncode(Utility.urlDecode(blobName))), accessTier, null); } /** @@ -237,7 +240,8 @@ public Response setBlobAccessTier(String containerName, String blobName, A */ public Response setBlobAccessTier(String containerName, String blobName, AccessTier accessTier, String leaseId) { - return setBlobAccessTierHelper(String.format(PATH_TEMPLATE, containerName, blobName), accessTier, leaseId); + return setBlobAccessTierHelper(String.format(PATH_TEMPLATE, containerName, + Utility.urlEncode(Utility.urlDecode(blobName))), accessTier, leaseId); } /** @@ -247,7 +251,7 @@ public Response setBlobAccessTier(String containerName, String blobName, A * * {@codesnippet com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-AccessTier} * - * @param blobUrl URL of the blob. + * @param blobUrl URL of the blob. Blob name must be encoded to UTF-8. * @param accessTier The tier to set on the blob. * @return a {@link Response} that will be used to associate this operation to the response when the batch is * submitted. @@ -264,7 +268,7 @@ public Response setBlobAccessTier(String blobUrl, AccessTier accessTier) { * * {@codesnippet com.azure.storage.blob.batch.BlobBatch.setBlobAccessTier#String-AccessTier-String} * - * @param blobUrl URL of the blob. + * @param blobUrl URL of the blob. Blob name must be encoded to UTF-8. * @param accessTier The tier to set on the blob. * @param leaseId The lease ID the active lease on the blob must match. * @return a {@link Response} that will be used to associate this operation to the response when the batch is diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java index 58c20f41c43a..996da9237ac1 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java @@ -128,7 +128,7 @@ Mono> submitBatchWithResponse(BlobBatch batch, boolean throwOnAny * * {@codesnippet com.azure.storage.blob.batch.BlobBatchAsyncClient.deleteBlobs#List-DeleteSnapshotsOptionType} * - * @param blobUrls Urls of the blobs to delete. + * @param blobUrls Urls of the blobs to delete. Blob names must be encoded to UTF-8. * @param deleteOptions The deletion option for all blobs. * @return The status of each delete operation. * @throws BlobStorageException If the batch request is malformed. @@ -162,7 +162,7 @@ private Mono>> submitDeleteBlobsBatch(List * * {@codesnippet com.azure.storage.blob.batch.BlobBatchAsyncClient.setBlobsAccessTier#List-AccessTier} * - * @param blobUrls Urls of the blobs to set their access tier. + * @param blobUrls Urls of the blobs to set their access tier. Blob names must be encoded to UTF-8. * @param accessTier {@link AccessTier} to set on each blob. * @return The status of each set tier operation. * @throws BlobStorageException If the batch request is malformed. diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClient.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClient.java index 1d650ee037f7..f49c1a1d49b3 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClient.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchClient.java @@ -95,7 +95,7 @@ public Response submitBatchWithResponse(BlobBatch batch, boolean throwOnAn * * {@codesnippet com.azure.storage.blob.batch.BlobBatchClient.deleteBlobs#List-DeleteSnapshotsOptionType} * - * @param blobUrls Urls of the blobs to delete. + * @param blobUrls Urls of the blobs to delete. Blob names must be encoded to UTF-8. * @param deleteOptions The deletion option for all blobs. * @return The status of each delete operation. * @throws BlobStorageException If the batch request is malformed. @@ -113,7 +113,7 @@ public PagedIterable> deleteBlobs(List blobUrls, DeleteSn * * {@codesnippet com.azure.storage.blob.batch.BlobBatchClient.deleteBlobs#List-DeleteSnapshotsOptionType-Duration-Context} * - * @param blobUrls Urls of the blobs to delete. + * @param blobUrls Urls of the blobs to delete. Blob names must be encoded to UTF-8. * @param deleteOptions The deletion option for all blobs. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. @@ -135,7 +135,7 @@ public PagedIterable> deleteBlobs(List blobUrls, DeleteSn * * {@codesnippet com.azure.storage.blob.batch.BlobBatchClient.setBlobsAccessTier#List-AccessTier} * - * @param blobUrls Urls of the blobs to set their access tier. + * @param blobUrls Urls of the blobs to set their access tier. Blob names must be encoded to UTF-8. * @param accessTier {@link AccessTier} to set on each blob. * @return The status of each set tier operation. * @throws BlobStorageException If the batch request is malformed. @@ -153,7 +153,7 @@ public PagedIterable> setBlobsAccessTier(List blobUrls, A * * {@codesnippet com.azure.storage.blob.batch.BlobBatchClient.setBlobsAccessTier#List-AccessTier-Duration-Context} * - * @param blobUrls Urls of the blobs to set their access tier. + * @param blobUrls Urls of the blobs to set their access tier. Blob names must be encoded to UTF-8. * @param accessTier {@link AccessTier} to set on each blob. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. diff --git a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy index acee3d36a6c3..b7df32f2aa89 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy +++ b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy @@ -151,7 +151,7 @@ class APISpec extends Specification { accountName = Configuration.getGlobalConfiguration().get(accountType + "ACCOUNT_NAME") accountKey = Configuration.getGlobalConfiguration().get(accountType + "ACCOUNT_KEY") } else { - accountName = "storageaccount" + accountName = "azstoragesdkaccount" accountKey = "astorageaccountkey" } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java index 01e9e9222897..1aa0187081dd 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java @@ -24,6 +24,7 @@ import com.azure.storage.blob.BlobContainerAsyncClient; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.BlobUrlParts; +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; @@ -336,7 +337,7 @@ public EncryptedBlobClientBuilder endpoint(String endpoint) { this.accountName = parts.getAccountName(); this.endpoint = parts.getScheme() + "://" + parts.getHost(); this.containerName = parts.getBlobContainerName(); - this.blobName = parts.getBlobName(); + this.blobName = Utility.urlEncode(parts.getBlobName()); this.snapshot = parts.getSnapshot(); String sasToken = parts.getSasQueryParameters().encode(); @@ -370,7 +371,8 @@ public EncryptedBlobClientBuilder containerName(String containerName) { * @throws NullPointerException If {@code blobName} is {@code null} */ public EncryptedBlobClientBuilder blobName(String blobName) { - this.blobName = Objects.requireNonNull(blobName, "'blobName' cannot be null."); + this.blobName = Utility.urlEncode(Utility.urlDecode(Objects.requireNonNull(blobName, + "'blobName' cannot be null."))); return this; } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy index ba4b76194a1c..c45c8578fc73 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy @@ -149,7 +149,7 @@ class APISpec extends Specification { accountName = Configuration.getGlobalConfiguration().get(accountType + "ACCOUNT_NAME") accountKey = Configuration.getGlobalConfiguration().get(accountType + "ACCOUNT_KEY") } else { - accountName = "storageaccount" + accountName = "azstoragesdkaccount" accountKey = "astorageaccountkey" } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java index 2c0c03a2072c..58505cefcbc2 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java @@ -16,6 +16,7 @@ import com.azure.storage.blob.implementation.util.BuilderHelper; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; +import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; @@ -263,7 +264,7 @@ public BlobClientBuilder endpoint(String endpoint) { this.accountName = parts.getAccountName(); this.endpoint = parts.getScheme() + "://" + parts.getHost(); this.containerName = parts.getBlobContainerName(); - this.blobName = parts.getBlobName(); + this.blobName = Utility.urlEncode(parts.getBlobName()); this.snapshot = parts.getSnapshot(); String sasToken = parts.getSasQueryParameters().encode(); @@ -297,7 +298,8 @@ public BlobClientBuilder containerName(String containerName) { * @throws NullPointerException If {@code blobName} is {@code null} */ public BlobClientBuilder blobName(String blobName) { - this.blobName = Objects.requireNonNull(blobName, "'blobName' cannot be null."); + this.blobName = Utility.urlEncode(Utility.urlDecode(Objects.requireNonNull(blobName, + "'blobName' cannot be null."))); return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index 4b16e1d5615b..94840206641c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -30,6 +30,7 @@ import com.azure.storage.blob.models.ListBlobsOptions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; @@ -139,9 +140,9 @@ public BlobAsyncClient getBlobAsyncClient(String blobName) { * @return A new {@link BlobAsyncClient} object which references the blob with the specified name in this container. */ public BlobAsyncClient getBlobAsyncClient(String blobName, String snapshot) { - return new BlobAsyncClient(getHttpPipeline(), - StorageImplUtils.appendToUrlPath(getBlobContainerUrl(), blobName).toString(), getServiceVersion(), - getAccountName(), getBlobContainerName(), blobName, snapshot, getCustomerProvidedKey()); + return new BlobAsyncClient(getHttpPipeline(), StorageImplUtils.appendToUrlPath(getBlobContainerUrl(), + Utility.urlEncode(Utility.urlDecode(blobName))).toString(), getServiceVersion(), getAccountName(), + getBlobContainerName(), blobName, snapshot, getCustomerProvidedKey()); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java index ac0225a68d0d..b887b932c86f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java @@ -127,12 +127,12 @@ public BlobUrlParts setContainerName(String containerName) { } /** - * Gets the blob name that will be used as part of the URL path. + * Decodes and gets the blob name that will be used as part of the URL path. * - * @return the blob name. + * @return the decoded blob name. */ public String getBlobName() { - return blobName; + return (blobName == null) ? null : Utility.urlDecode(blobName); } /** @@ -142,7 +142,7 @@ public String getBlobName() { * @return the updated BlobUrlParts object. */ public BlobUrlParts setBlobName(String blobName) { - this.blobName = blobName; + this.blobName = Utility.urlEncode(Utility.urlDecode(blobName)); return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index 2e094145e6e7..3f1444313efd 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -40,6 +40,7 @@ import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.ReliableDownloadOptions; import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Flux; @@ -113,7 +114,7 @@ protected BlobAsyncClientBase(HttpPipeline pipeline, String url, BlobServiceVers this.accountName = accountName; this.containerName = containerName; - this.blobName = blobName; + this.blobName = Utility.urlEncode(Utility.urlDecode(blobName)); this.snapshot = snapshot; this.customerProvidedKey = customerProvidedKey; } @@ -160,16 +161,16 @@ public final String getContainerName() { } /** - * Get the blob name. + * Decodes and gets the blob name. * *

    Code Samples

    * * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.getBlobName} * - * @return The name of the blob. + * @return The decoded name of the blob. */ public final String getBlobName() { - return blobName; + return (blobName == null) ? null : Utility.urlDecode(blobName); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index babd7a826b1a..bca40cb49283 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -103,13 +103,13 @@ public final String getContainerName() { } /** - * Get the blob name. + * Decodes and gets the blob name. * *

    Code Samples

    * * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.getBlobName} * - * @return The name of the blob. + * @return The decoded name of the blob. */ public final String getBlobName() { return client.getBlobName(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java index 5a1bf6cfe944..7b776f40b619 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java @@ -9,6 +9,7 @@ import com.azure.storage.blob.BlobSasPermission; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.StorageSharedKeyCredential; @@ -280,10 +281,10 @@ public BlobServiceSasSignatureValues setContainerName(String containerName) { } /** - * Gets the name of the blob the SAS user may access. {@code null} or an empty string is returned when a + * Decodes and gets the name of the blob the SAS user may access. {@code null} or an empty string is returned when a * creating a container SAS. * - * @return The name of the blob the SAS user may access. {@code null} or an empty string is returned when a + * @return The decoded name of the blob the SAS user may access. {@code null} or an empty string is returned when a * creating a container SAS. */ public String getBlobName() { @@ -297,7 +298,7 @@ public String getBlobName() { * @return The updated BlobServiceSASSignatureValues object. */ public BlobServiceSasSignatureValues setBlobName(String blobName) { - this.blobName = blobName; + this.blobName = (blobName == null) ? null : Utility.urlDecode(blobName); return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java index 43adc25583f8..f892e358f956 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java @@ -21,6 +21,7 @@ import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; import com.azure.storage.blob.models.PageRange; +import com.azure.storage.common.Utility; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; @@ -291,7 +292,7 @@ public SpecializedBlobClientBuilder endpoint(String endpoint) { this.accountName = parts.getAccountName(); this.endpoint = parts.getScheme() + "://" + parts.getHost(); this.containerName = parts.getBlobContainerName(); - this.blobName = parts.getBlobName(); + this.blobName = Utility.urlEncode(parts.getBlobName()); this.snapshot = parts.getSnapshot(); String sasToken = parts.getSasQueryParameters().encode(); @@ -435,7 +436,8 @@ public SpecializedBlobClientBuilder containerName(String containerName) { * @throws NullPointerException If {@code blobName} is {@code null} */ public SpecializedBlobClientBuilder blobName(String blobName) { - this.blobName = Objects.requireNonNull(blobName, "'blobName' cannot be null."); + this.blobName = Utility.urlEncode(Utility.urlDecode(Objects.requireNonNull(blobName, + "'blobName' cannot be null."))); return this; } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index 096f2cc49810..bc146490cc32 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -214,7 +214,7 @@ class APISpec extends Specification { accountName = Configuration.getGlobalConfiguration().get(accountType + "ACCOUNT_NAME") accountKey = Configuration.getGlobalConfiguration().get(accountType + "ACCOUNT_KEY") } else { - accountName = "storageaccount" + accountName = "azstoragesdkaccount" accountKey = "astorageaccountkey" } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy index c2277dfcf436..6bcdeec9870a 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy @@ -1582,4 +1582,21 @@ class BlobAPITest extends APISpec { expect: blobName == bc.getBlobName() } + + def "Get Blob Name and Build Client"() { + when: + BlobClient client = cc.getBlobClient(originalBlobName) + BlobClientBase baseClient = cc.getBlobClient(client.getBlobName()).getBlockBlobClient() + + then: + baseClient.getBlobName() == finalBlobName + + where: + originalBlobName | finalBlobName + "blob" | "blob" + "path/to]a blob" | "path/to]a blob" + "path%2Fto%5Da%20blob" | "path/to]a blob" + "斑點" | "斑點" + "%E6%96%91%E9%BB%9E" | "斑點" + } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy index 2bacd54e754a..defefdab45cb 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy @@ -21,6 +21,7 @@ import com.azure.storage.blob.models.ListBlobsOptions import com.azure.storage.blob.models.PublicAccessType import com.azure.storage.blob.specialized.AppendBlobClient import com.azure.storage.blob.specialized.BlobClientBase +import com.azure.storage.common.Utility import spock.lang.Unroll import java.time.Duration @@ -1169,13 +1170,46 @@ class ContainerAPITest extends APISpec { blobs.next().getName() == name + "3" where: - name | _ - // "中文" | _ TODO: requires blob name to be url encoded, deferred for post preview-1, storage team to decide on encoding story across SDKS - "az[]" | _ - // "hello world" | _ TODO: see previous TODO - "hello/world" | _ - "hello&world" | _ - // "!*'();:@&=+\$,/?#[]" | _ TODO: see previous TODO + name | _ + "中文" | _ + "az[]" | _ + "hello world" | _ + "hello/world" | _ + "hello&world" | _ + "!*'();:@&=+\$,/?#[]" | _ + } + + @Unroll + def "Create URL special chars encoded"() { + // This test checks that we handle blob names with encoded special characters correctly. + setup: + def bu2 = cc.getBlobClient(name).getAppendBlobClient() + def bu3 = cc.getBlobClient(name + "2").getPageBlobClient() + def bu4 = cc.getBlobClient(name + "3").getBlockBlobClient() + def bu5 = cc.getBlobClient(name).getBlockBlobClient() + + expect: + bu2.createWithResponse(null, null, null, null, null).getStatusCode() == 201 + bu5.getPropertiesWithResponse(null, null, null).getStatusCode() == 200 + bu3.createWithResponse(512, null, null, null, null, null, null).getStatusCode() == 201 + bu4.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null, null, null, null).getStatusCode() == 201 + + when: + def blobs = cc.listBlobs().iterator() + + then: + blobs.next().getName() == Utility.urlDecode(name) + blobs.next().getName() == Utility.urlDecode(name) + "2" + blobs.next().getName() == Utility.urlDecode(name) + "3" + + where: + name | _ + "%E4%B8%AD%E6%96%87" | _ + "az%5B%5D" | _ + "hello%20world" | _ + "hello%2Fworld" | _ + "hello%26world" | _ + "%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%23%5B%5D" | _ } def "Root explicit"() { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy index a0cba57c40f9..fe425d7adc9d 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy @@ -1182,17 +1182,25 @@ class SASTest extends APISpec { def "URLParser"() { when: - def parts = BlobUrlParts.parse(new URL("http://host/container/blob?snapshot=snapshot&sv=" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "&sr=c&sp=r&sig=Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D")) + def parts = BlobUrlParts.parse(new URL("http://host/container/" + originalBlobName + "?snapshot=snapshot&sv=" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "&sr=c&sp=r&sig=Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D")) then: parts.getScheme() == "http" parts.getHost() == "host" parts.getBlobContainerName() == "container" - parts.getBlobName() == "blob" + parts.getBlobName() == finalBlobName parts.getSnapshot() == "snapshot" parts.getSasQueryParameters().getPermissions() == "r" parts.getSasQueryParameters().getVersion() == Constants.HeaderConstants.TARGET_STORAGE_VERSION parts.getSasQueryParameters().getResource() == "c" parts.getSasQueryParameters().getSignature() == Utility.urlDecode("Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D") + + where: + originalBlobName | finalBlobName + "blob" | "blob" + "path/to]a blob" | "path/to]a blob" + "path%2Fto%5Da%20blob" | "path/to]a blob" + "斑點" | "斑點" + "%E6%96%91%E9%BB%9E" | "斑點" } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy index 08b89d70ea8c..613bb5cc23fc 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy @@ -1256,6 +1256,23 @@ class BlockBlobAPITest extends APISpec { blobName == bc.getBlobName() } + def "Get Blob Name and Build Client"() { + when: + def client = cc.getBlobClient(originalBlobName) + def blockClient = cc.getBlobClient(client.getBlobName()).getBlockBlobClient() + + then: + blockClient.getBlobName() == finalBlobName + + where: + originalBlobName | finalBlobName + "blob" | "blob" + "path/to]a blob" | "path/to]a blob" + "path%2Fto%5Da%20blob" | "path/to]a blob" + "斑點" | "斑點" + "%E6%96%91%E9%BB%9E" | "斑點" + } + @Requires({liveMode()}) def "BlobClient overwrite false"() { setup: diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy index 44cf23c6aa5f..937962dd3625 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy @@ -654,18 +654,26 @@ class HelperTest extends APISpec { def "URLParser"() { when: - BlobUrlParts parts = BlobUrlParts.parse(new URL("http://host/container/blob?snapshot=snapshot&sv=" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "&sr=c&sp=r&sig=Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D")) + BlobUrlParts parts = BlobUrlParts.parse(new URL("http://host/container/" + originalBlobName + "?snapshot=snapshot&sv=" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "&sr=c&sp=r&sig=Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D")) then: parts.getScheme() == "http" parts.getHost() == "host" parts.getBlobContainerName() == "container" - parts.getBlobName() == "blob" + parts.getBlobName() == finalBlobName parts.getSnapshot() == "snapshot" parts.getSasQueryParameters().getPermissions() == "r" parts.getSasQueryParameters().getVersion() == Constants.HeaderConstants.TARGET_STORAGE_VERSION parts.getSasQueryParameters().getResource() == "c" parts.getSasQueryParameters().getSignature() == Utility.urlDecode("Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D") + + where: + originalBlobName | finalBlobName + "blob" | "blob" + "path/to]a blob" | "path/to]a blob" + "path%2Fto%5Da%20blob" | "path/to]a blob" + "斑點" | "斑點" + "%E6%96%91%E9%BB%9E" | "斑點" } @Unroll @@ -681,12 +689,16 @@ class HelperTest extends APISpec { parts.getBlobName() == blobName where: - endpoint | scheme | host | accountName | blobContainerName | blobName - "http://127.0.0.1:10000/devstoreaccount1" | "http" | "127.0.0.1:10000" | "devstoreaccount1" | null | null - "http://127.0.0.1:10000/devstoreaccount1/container" | "http" | "127.0.0.1:10000" | "devstoreaccount1" | "container" | null - "http://127.0.0.1:10000/devstoreaccount1/container/blob" | "http" | "127.0.0.1:10000" | "devstoreaccount1" | "container" | "blob" - "http://localhost:10000/devstoreaccount1" | "http" | "localhost:10000" | "devstoreaccount1" | null | null - "http://localhost:10000/devstoreaccount1/container" | "http" | "localhost:10000" | "devstoreaccount1" | "container" | null - "http://localhost:10000/devstoreaccount1/container/blob" | "http" | "localhost:10000" | "devstoreaccount1" | "container" | "blob" + endpoint | scheme | host | accountName | blobContainerName | blobName + "http://127.0.0.1:10000/devstoreaccount1" | "http" | "127.0.0.1:10000" | "devstoreaccount1" | null | null + "http://127.0.0.1:10000/devstoreaccount1/container" | "http" | "127.0.0.1:10000" | "devstoreaccount1" | "container" | null + "http://127.0.0.1:10000/devstoreaccount1/container/blob" | "http" | "127.0.0.1:10000" | "devstoreaccount1" | "container" | "blob" + "http://localhost:10000/devstoreaccount1" | "http" | "localhost:10000" | "devstoreaccount1" | null | null + "http://localhost:10000/devstoreaccount1/container" | "http" | "localhost:10000" | "devstoreaccount1" | "container" | null + "http://localhost:10000/devstoreaccount1/container/blob" | "http" | "localhost:10000" | "devstoreaccount1" | "container" | "blob" + "http://localhost:10000/devstoreaccount1/container/path/to]a blob" | "http" | "localhost:10000" | "devstoreaccount1" | "container" | "path/to]a blob" + "http://localhost:10000/devstoreaccount1/container/path%2Fto%5Da%20blob" | "http" | "localhost:10000" | "devstoreaccount1" | "container" | "path/to]a blob" + "http://localhost:10000/devstoreaccount1/container/斑點" | "http" | "localhost:10000" | "devstoreaccount1" | "container" | "斑點" + "http://localhost:10000/devstoreaccount1/container/%E6%96%91%E9%BB%9E" | "http" | "localhost:10000" | "devstoreaccount1" | "container" | "斑點" } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy index 702a8676ea31..b2f22af24c6b 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy @@ -1092,6 +1092,23 @@ class PageBlobAPITest extends APISpec { blobName == bc.getBlobName() } + def "Get Blob Name and Build Client"() { + when: + def client = cc.getBlobClient(originalBlobName) + def blockClient = cc.getBlobClient(client.getBlobName()).getPageBlobClient() + + then: + blockClient.getBlobName() == finalBlobName + + where: + originalBlobName | finalBlobName + "blob" | "blob" + "path/to]a blob" | "path/to]a blob" + "path%2Fto%5Da%20blob" | "path/to]a blob" + "斑點" | "斑點" + "%E6%96%91%E9%BB%9E" | "斑點" + } + def "Create overwrite false"() { when: bc.create(512) diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymin.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymin.json index ee43e429b769..92444cca1602 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymin.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopymin.json @@ -1,7 +1,7 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", @@ -22,7 +22,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674/javablobcopymin1blobapitestcopymin2d369168cc897f8e91", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674/javablobcopymin1blobapitestcopymin2d369168cc897f8e91", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", @@ -47,7 +47,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674/javablobcopymin2blobapitestcopymin2d374351eee8a25358", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674/javablobcopymin2blobapitestcopymin2d374351eee8a25358", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", @@ -70,7 +70,7 @@ "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674/javablobcopymin2blobapitestcopymin2d374351eee8a25358", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674/javablobcopymin2blobapitestcopymin2d374351eee8a25358", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", @@ -92,7 +92,7 @@ "Content-Type" : "application/octet-stream", "x-ms-version" : "2019-02-02", "x-ms-copy-id" : "4f0c2a5d-549e-4f4a-bc4b-cd8cac86c16a", - "x-ms-copy-source" : "https://storageaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674/javablobcopymin1blobapitestcopymin2d369168cc897f8e91", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674/javablobcopymin1blobapitestcopymin2d369168cc897f8e91", "x-ms-copy-progress" : "7/7", "Date" : "Mon, 21 Oct 2019 17:04:00 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", @@ -119,7 +119,7 @@ "retry-after" : "0", "StatusCode" : "200", "x-ms-request-id" : "0a1015d3-f01e-012c-1931-88f41e000000", - "Body" : "jtccopyminjtccopymin0blobapitestcopymin2d384169a9b8e78655674Mon, 21 Oct 2019 17:03:59 GMT\"0x8D75648AAB11901\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Body" : "jtccopyminjtccopymin0blobapitestcopymin2d384169a9b8e78655674Mon, 21 Oct 2019 17:03:59 GMT\"0x8D75648AAB11901\"unlockedavailable$account-encryption-keyfalsefalsefalse", "Date" : "Mon, 21 Oct 2019 17:04:00 GMT", "x-ms-client-request-id" : "ff978f7a-403e-4ac1-bc71-606104da21ee", "Content-Type" : "application/xml" @@ -127,7 +127,7 @@ "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopymin0blobapitestcopymin2d384169a9b8e78655674?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopypoller.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopypoller.json index d5aeeb5ce8fd..2cd560f0fcc4 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopypoller.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopypoller.json @@ -1,7 +1,7 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", @@ -22,7 +22,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller1blobapitestcopypoller4c77708991b060a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller1blobapitestcopypoller4c77708991b060a", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", @@ -47,7 +47,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller2blobapitestcopypoller4c7989982b85210", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller2blobapitestcopypoller4c7989982b85210", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", @@ -70,7 +70,7 @@ "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller2blobapitestcopypoller4c7989982b85210", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller2blobapitestcopypoller4c7989982b85210", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", @@ -92,7 +92,7 @@ "Content-Type" : "application/octet-stream", "x-ms-version" : "2019-02-02", "x-ms-copy-id" : "96961cc0-f791-4c6f-91e0-1d6fc92f1cf3", - "x-ms-copy-source" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller1blobapitestcopypoller4c77708991b060a", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller1blobapitestcopypoller4c77708991b060a", "x-ms-copy-progress" : "7/7", "Date" : "Mon, 21 Oct 2019 17:04:02 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", @@ -106,7 +106,7 @@ "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller2blobapitestcopypoller4c7989982b85210", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller2blobapitestcopypoller4c7989982b85210", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", @@ -128,7 +128,7 @@ "Content-Type" : "application/octet-stream", "x-ms-version" : "2019-02-02", "x-ms-copy-id" : "96961cc0-f791-4c6f-91e0-1d6fc92f1cf3", - "x-ms-copy-source" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller1blobapitestcopypoller4c77708991b060a", + "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040/javablobcopypoller1blobapitestcopypoller4c77708991b060a", "x-ms-copy-progress" : "7/7", "Date" : "Mon, 21 Oct 2019 17:04:02 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", @@ -155,7 +155,7 @@ "retry-after" : "0", "StatusCode" : "200", "x-ms-request-id" : "0a101878-f01e-012c-4031-88f41e000000", - "Body" : "jtccopypollerjtccopypoller0blobapitestcopypoller4c77667741fdc13040Mon, 21 Oct 2019 17:04:01 GMT\"0x8D75648AB963243\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Body" : "jtccopypollerjtccopypoller0blobapitestcopypoller4c77667741fdc13040Mon, 21 Oct 2019 17:04:01 GMT\"0x8D75648AB963243\"unlockedavailable$account-encryption-keyfalsefalsefalse", "Date" : "Mon, 21 Oct 2019 17:04:02 GMT", "x-ms-client-request-id" : "395ea55c-19ac-4c21-b8d8-87309a6d952a", "Content-Type" : "application/xml" @@ -163,7 +163,7 @@ "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://storageaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopypoller0blobapitestcopypoller4c77667741fdc13040?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetblobnameandbuildclient.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetblobnameandbuildclient.json new file mode 100644 index 000000000000..7606a17fac64 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetblobnameandbuildclient.json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcgetblobnameandbuildclient092877bd0c97f13f3943?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "ced578ab-39aa-41cc-8e13-3b56390d7188" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7579653D9F61A", + "Last-Modified" : "Wed, 23 Oct 2019 08:52:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2c1fe2b9-f01e-006c-637f-899ba5000000", + "Date" : "Wed, 23 Oct 2019 08:52:25 GMT", + "x-ms-client-request-id" : "ced578ab-39aa-41cc-8e13-3b56390d7188" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcgetblobnameandbuildclient092877bd0c97f13f3943/javablobgetblobnameandbuildclient1138474a253e8f026d", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "6f55203d-47e0-473d-bab7-6132dbc1d066", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Wed, 23 Oct 2019 08:52:26 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 08:52:25 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D7579653E9AF52", + "Content-Length" : "0", + "x-ms-request-id" : "2c1fe2de-f01e-006c-057f-899ba5000000", + "x-ms-client-request-id" : "6f55203d-47e0-473d-bab7-6132dbc1d066" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcgetblobnameandbuildclient&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "fe69bfd4-1358-4bc6-b5f0-b047fd7e5f1d" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "2c1fe2f3-f01e-006c-167f-899ba5000000", + "Body" : "jtcgetblobnameandbuildclientjtcgetblobnameandbuildclient092877bd0c97f13f3943Wed, 23 Oct 2019 08:52:25 GMT\"0x8D7579653D9F61A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:52:25 GMT", + "x-ms-client-request-id" : "fe69bfd4-1358-4bc6-b5f0-b047fd7e5f1d", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcgetblobnameandbuildclient092877bd0c97f13f3943?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "e435b675-e5cf-477e-9f43-85bf9254fd9e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "2c1fe30d-f01e-006c-287f-899ba5000000", + "Date" : "Wed, 23 Oct 2019 08:52:25 GMT", + "x-ms-client-request-id" : "e435b675-e5cf-477e-9f43-85bf9254fd9e" + }, + "Exception" : null + } ], + "variables" : [ "jtcgetblobnameandbuildclient092877bd0c97f13f3943", "javablobgetblobnameandbuildclient1138474a253e8f026d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestgetblobnameandbuildclient.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestgetblobnameandbuildclient.json new file mode 100644 index 000000000000..cc33413e20ca --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestgetblobnameandbuildclient.json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcgetblobnameandbuildclient0789916a127758344542?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "d65de6c5-bb9a-447c-9897-dbb994ea5491" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757968050AF9B", + "Last-Modified" : "Wed, 23 Oct 2019 08:53:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b887b34c-301e-0131-3f7f-892df4000000", + "Date" : "Wed, 23 Oct 2019 08:53:40 GMT", + "x-ms-client-request-id" : "d65de6c5-bb9a-447c-9897-dbb994ea5491" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcgetblobnameandbuildclient0789916a127758344542/javablobgetblobnameandbuildclient169574ac148ecd11d7", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "278309ae-dda2-4f20-bd8e-b13e93199b7a", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Wed, 23 Oct 2019 08:53:40 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 08:53:40 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D75796805DCF0E", + "Content-Length" : "0", + "x-ms-request-id" : "b887b37d-301e-0131-657f-892df4000000", + "x-ms-client-request-id" : "278309ae-dda2-4f20-bd8e-b13e93199b7a" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcgetblobnameandbuildclient&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "b844ee16-2f1f-456c-b251-eee5abdef92a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b887b3e4-301e-0131-407f-892df4000000", + "Body" : "jtcgetblobnameandbuildclientjtcgetblobnameandbuildclient0789916a127758344542Wed, 23 Oct 2019 08:53:40 GMT\"0x8D757968050AF9B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:53:40 GMT", + "x-ms-client-request-id" : "b844ee16-2f1f-456c-b251-eee5abdef92a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcgetblobnameandbuildclient0789916a127758344542?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "60f731e7-bd3e-4ebf-8811-0742e8d5fdfe" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "b887b416-301e-0131-6c7f-892df4000000", + "Date" : "Wed, 23 Oct 2019 08:53:40 GMT", + "x-ms-client-request-id" : "60f731e7-bd3e-4ebf-8811-0742e8d5fdfe" + }, + "Exception" : null + } ], + "variables" : [ "jtcgetblobnameandbuildclient0789916a127758344542", "javablobgetblobnameandbuildclient169574ac148ecd11d7", "javablobgetblobnameandbuildclient298659dd6bad56794e" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[0].json index 951375b570ff..3cdfb8b8ec0e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[0].json @@ -1,54 +1,54 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0949712d53f50aaceb478f?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0381340b62612cae434cfd?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6a560916-1292-4713-93ee-a96529f51d70" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "63006b82-297b-43e0-9be2-c03a6be15182" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFEE642C7", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:44 GMT", + "ETag" : "0x8D7566CCE5A759E", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "807451f2-501e-002e-3e96-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:26:43 GMT", - "x-ms-client-request-id" : "6a560916-1292-4713-93ee-a96529f51d70" + "x-ms-request-id" : "3ebe424a-f01e-0105-1b55-88825c000000", + "Date" : "Mon, 21 Oct 2019 21:22:41 GMT", + "x-ms-client-request-id" : "63006b82-297b-43e0-9be2-c03a6be15182" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0949712d53f50aaceb478f/az[]", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0381340b62612cae434cfd/%E4%B8%AD%E6%96%87", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "aaf7a2a8-e5ae-49e1-a8a8-7d2d28e98620" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "edcc4484-db69-4e09-96b1-f458b684f86f" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFEECA5D6", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:44 GMT", + "ETag" : "0x8D7566CCE8DD94C", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f956f1-c01e-012f-1796-83f719000000", + "x-ms-request-id" : "3ebe4283-f01e-0105-4955-88825c000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "aaf7a2a8-e5ae-49e1-a8a8-7d2d28e98620" + "Date" : "Mon, 21 Oct 2019 21:22:41 GMT", + "x-ms-client-request-id" : "edcc4484-db69-4e09-96b1-f458b684f86f" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0949712d53f50aaceb478f/az[]", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0381340b62612cae434cfd/%E4%B8%AD%E6%96%87", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6da67fac-dd7c-49ac-8f10-9c56916b0c85" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "fa79c750-66c9-41c0-8ea7-251920ab893e" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -56,75 +56,75 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", "x-ms-blob-committed-block-count" : "0", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:44 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 15 Oct 2019 20:26:43 GMT", + "Date" : "Mon, 21 Oct 2019 21:22:41 GMT", "x-ms-blob-type" : "AppendBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D751ADFEECA5D6", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:26:44 GMT", + "ETag" : "0x8D7566CCE8DD94C", + "x-ms-creation-time" : "Mon, 21 Oct 2019 21:22:41 GMT", "Content-Length" : "0", - "x-ms-request-id" : "80745218-501e-002e-6196-83b0b1000000", - "x-ms-client-request-id" : "6da67fac-dd7c-49ac-8f10-9c56916b0c85", + "x-ms-request-id" : "3ebe42a5-f01e-0105-6555-88825c000000", + "x-ms-client-request-id" : "fa79c750-66c9-41c0-8ea7-251920ab893e", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0949712d53f50aaceb478f/az[]2", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0381340b62612cae434cfd/%E4%B8%AD%E6%96%872", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ef5027e1-307a-458d-a919-50340620f7a0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "19ccf569-e491-4dcb-ba91-27bf7f919f9c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFEF904EE", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:44 GMT", + "ETag" : "0x8D7566CCEB47D93", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f9574b-c01e-012f-6996-83f719000000", + "x-ms-request-id" : "3ebe42c7-f01e-0105-7e55-88825c000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "ef5027e1-307a-458d-a919-50340620f7a0" + "Date" : "Mon, 21 Oct 2019 21:22:41 GMT", + "x-ms-client-request-id" : "19ccf569-e491-4dcb-ba91-27bf7f919f9c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0949712d53f50aaceb478f/az[]3", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0381340b62612cae434cfd/%E4%B8%AD%E6%96%873", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "fac65889-6975-4962-b0db-dcab9955436a", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "f78ef54b-45ac-4440-ac56-5b0d4beba290", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:44 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:42 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", + "Date" : "Mon, 21 Oct 2019 21:22:41 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751ADFF00CF09", + "ETag" : "0x8D7566CCECC9F5A", "Content-Length" : "0", - "x-ms-request-id" : "80745237-501e-002e-7d96-83b0b1000000", - "x-ms-client-request-id" : "fac65889-6975-4962-b0db-dcab9955436a" + "x-ms-request-id" : "3ebe4308-f01e-0105-2f55-88825c000000", + "x-ms-client-request-id" : "f78ef54b-45ac-4440-ac56-5b0d4beba290" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0949712d53f50aaceb478f?include=&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0381340b62612cae434cfd?include=&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5e41f399-5674-435c-82c4-6d41ab826cf0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "382b9e53-1981-4f91-a437-8fbd30a11a50" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -132,10 +132,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f957b5-c01e-012f-4096-83f719000000", - "Body" : "az[]Tue, 15 Oct 2019 20:26:44 GMTTue, 15 Oct 2019 20:26:44 GMT0x8D751ADFEECA5D60application/octet-streamAppendBlobunlockedavailabletrueaz[]2Tue, 15 Oct 2019 20:26:44 GMTTue, 15 Oct 2019 20:26:44 GMT0x8D751ADFEF904EE512application/octet-stream0PageBlobunlockedavailabletrueaz[]3Tue, 15 Oct 2019 20:26:44 GMTTue, 15 Oct 2019 20:26:44 GMT0x8D751ADFF00CF097application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "5e41f399-5674-435c-82c4-6d41ab826cf0", + "x-ms-request-id" : "3ebe4335-f01e-0105-5155-88825c000000", + "Body" : "中文Mon, 21 Oct 2019 21:22:41 GMTMon, 21 Oct 2019 21:22:41 GMT0x8D7566CCE8DD94C0application/octet-streamAppendBlobunlockedavailabletrue中文2Mon, 21 Oct 2019 21:22:42 GMTMon, 21 Oct 2019 21:22:42 GMT0x8D7566CCEB47D93512application/octet-stream0PageBlobunlockedavailabletrue中文3Mon, 21 Oct 2019 21:22:42 GMTMon, 21 Oct 2019 21:22:42 GMT0x8D7566CCECC9F5A7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Mon, 21 Oct 2019 21:22:42 GMT", + "x-ms-client-request-id" : "382b9e53-1981-4f91-a437-8fbd30a11a50", "Content-Type" : "application/xml" }, "Exception" : null @@ -144,8 +144,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccreateurlspecialchars&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d9f84ea4-4eff-4db4-99b1-52c20ff7aff3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "14fca68d-5b5c-4cd5-b2ad-f6233895794c" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -153,20 +153,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "80745263-501e-002e-2296-83b0b1000000", - "Body" : "jtccreateurlspecialcharsjtccreateurlspecialchars0949712d53f50aaceb478fTue, 15 Oct 2019 20:26:44 GMT\"0x8D751ADFEE642C7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "d9f84ea4-4eff-4db4-99b1-52c20ff7aff3", + "x-ms-request-id" : "3ebe437e-f01e-0105-0855-88825c000000", + "Body" : "jtccreateurlspecialcharsjtccreateurlspecialchars0381340b62612cae434cfdMon, 21 Oct 2019 21:22:41 GMT\"0x8D7566CCE5A759E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 21:22:42 GMT", + "x-ms-client-request-id" : "14fca68d-5b5c-4cd5-b2ad-f6233895794c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0949712d53f50aaceb478f?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0381340b62612cae434cfd?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4277b681-70a8-407d-b81b-e1fd4b815a1f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "a6db2bd9-9322-4019-94b4-27673d26754b" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -174,11 +174,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f957f8-c01e-012f-0196-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "4277b681-70a8-407d-b81b-e1fd4b815a1f" + "x-ms-request-id" : "3ebe43a1-f01e-0105-2355-88825c000000", + "Date" : "Mon, 21 Oct 2019 21:22:42 GMT", + "x-ms-client-request-id" : "a6db2bd9-9322-4019-94b4-27673d26754b" }, "Exception" : null } ], - "variables" : [ "jtccreateurlspecialchars0949712d53f50aaceb478f" ] + "variables" : [ "jtccreateurlspecialchars0381340b62612cae434cfd" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[1].json index 487c1def26a7..b9a94543c75c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[1].json @@ -1,54 +1,54 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars021049c2ee6feb21a84766?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars048370a5aff40147ad46ac?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "97676bd0-7fec-4211-bef4-6bfb6b142197" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "8f972b99-05c2-4ccb-997e-159233ef8f83" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFF177105", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:44 GMT", + "ETag" : "0x8D7566CCF3F40DB", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "80745279-501e-002e-3496-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "97676bd0-7fec-4211-bef4-6bfb6b142197" + "x-ms-request-id" : "3ebe43bb-f01e-0105-3b55-88825c000000", + "Date" : "Mon, 21 Oct 2019 21:22:42 GMT", + "x-ms-client-request-id" : "8f972b99-05c2-4ccb-997e-159233ef8f83" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars021049c2ee6feb21a84766/hello/world", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars048370a5aff40147ad46ac/az%5B%5D", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4bcbb5a2-cb4a-48e5-b44a-a646369cd4a4" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "fb3bcdc6-d1e1-43cc-9b56-6ad918729183" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFF1EBE9E", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:44 GMT", + "ETag" : "0x8D7566CCF518054", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f9583f-c01e-012f-4696-83f719000000", + "x-ms-request-id" : "3ebe43e6-f01e-0105-6155-88825c000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "4bcbb5a2-cb4a-48e5-b44a-a646369cd4a4" + "Date" : "Mon, 21 Oct 2019 21:22:42 GMT", + "x-ms-client-request-id" : "fb3bcdc6-d1e1-43cc-9b56-6ad918729183" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars021049c2ee6feb21a84766/hello/world", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars048370a5aff40147ad46ac/az%5B%5D", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0cdc8003-04bc-4340-81cd-109dc9e8adaa" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "92389c7d-47b8-46db-ba62-fa36d7b19fbc" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -56,75 +56,75 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", "x-ms-blob-committed-block-count" : "0", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:44 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", + "Date" : "Mon, 21 Oct 2019 21:22:42 GMT", "x-ms-blob-type" : "AppendBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D751ADFF1EBE9E", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:26:44 GMT", + "ETag" : "0x8D7566CCF518054", + "x-ms-creation-time" : "Mon, 21 Oct 2019 21:22:43 GMT", "Content-Length" : "0", - "x-ms-request-id" : "807452b9-501e-002e-6c96-83b0b1000000", - "x-ms-client-request-id" : "0cdc8003-04bc-4340-81cd-109dc9e8adaa", + "x-ms-request-id" : "3ebe43ff-f01e-0105-7555-88825c000000", + "x-ms-client-request-id" : "92389c7d-47b8-46db-ba62-fa36d7b19fbc", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars021049c2ee6feb21a84766/hello/world2", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars048370a5aff40147ad46ac/az%5B%5D2", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "edb546d9-873f-4491-a782-5ca0c1201ea9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "4b09f006-b5cd-4a20-8fa0-d74eca90c2b6" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFF3447BE", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:44 GMT", + "ETag" : "0x8D7566CCF6FE536", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f958c9-c01e-012f-4696-83f719000000", + "x-ms-request-id" : "3ebe441c-f01e-0105-0e55-88825c000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "edb546d9-873f-4491-a782-5ca0c1201ea9" + "Date" : "Mon, 21 Oct 2019 21:22:43 GMT", + "x-ms-client-request-id" : "4b09f006-b5cd-4a20-8fa0-d74eca90c2b6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars021049c2ee6feb21a84766/hello/world3", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars048370a5aff40147ad46ac/az%5B%5D3", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "98f88a2d-d211-432a-b329-4402068a7767", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "0c276d18-229a-46a2-bd20-ce0e24d24e56", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:44 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:43 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", + "Date" : "Mon, 21 Oct 2019 21:22:43 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751ADFF3B9C86", + "ETag" : "0x8D7566CCF7E8ED3", "Content-Length" : "0", - "x-ms-request-id" : "807452f6-501e-002e-2596-83b0b1000000", - "x-ms-client-request-id" : "98f88a2d-d211-432a-b329-4402068a7767" + "x-ms-request-id" : "3ebe4432-f01e-0105-2055-88825c000000", + "x-ms-client-request-id" : "0c276d18-229a-46a2-bd20-ce0e24d24e56" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars021049c2ee6feb21a84766?include=&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars048370a5aff40147ad46ac?include=&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "bfcd4836-f2a2-4e32-ac89-741cf870c3bf" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "c975219a-2c56-4ab8-bec9-79a289eb44ef" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -132,10 +132,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f9590c-c01e-012f-7d96-83f719000000", - "Body" : "hello/worldTue, 15 Oct 2019 20:26:44 GMTTue, 15 Oct 2019 20:26:44 GMT0x8D751ADFF1EBE9E0application/octet-streamAppendBlobunlockedavailabletruehello/world2Tue, 15 Oct 2019 20:26:44 GMTTue, 15 Oct 2019 20:26:44 GMT0x8D751ADFF3447BE512application/octet-stream0PageBlobunlockedavailabletruehello/world3Tue, 15 Oct 2019 20:26:44 GMTTue, 15 Oct 2019 20:26:44 GMT0x8D751ADFF3B9C867application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "bfcd4836-f2a2-4e32-ac89-741cf870c3bf", + "x-ms-request-id" : "3ebe443d-f01e-0105-2b55-88825c000000", + "Body" : "az[]Mon, 21 Oct 2019 21:22:43 GMTMon, 21 Oct 2019 21:22:43 GMT0x8D7566CCF5180540application/octet-streamAppendBlobunlockedavailabletrueaz[]2Mon, 21 Oct 2019 21:22:43 GMTMon, 21 Oct 2019 21:22:43 GMT0x8D7566CCF6FE536512application/octet-stream0PageBlobunlockedavailabletrueaz[]3Mon, 21 Oct 2019 21:22:43 GMTMon, 21 Oct 2019 21:22:43 GMT0x8D7566CCF7E8ED37application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Mon, 21 Oct 2019 21:22:43 GMT", + "x-ms-client-request-id" : "c975219a-2c56-4ab8-bec9-79a289eb44ef", "Content-Type" : "application/xml" }, "Exception" : null @@ -144,8 +144,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccreateurlspecialchars&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "da42f665-e09f-4820-8f4a-a3bb14c3187e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "6bf1c782-ff47-4bee-a1c3-75cd5a30e2e8" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -153,20 +153,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "80745348-501e-002e-6f96-83b0b1000000", - "Body" : "jtccreateurlspecialcharsjtccreateurlspecialchars021049c2ee6feb21a84766Tue, 15 Oct 2019 20:26:44 GMT\"0x8D751ADFF177105\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "da42f665-e09f-4820-8f4a-a3bb14c3187e", + "x-ms-request-id" : "3ebe4452-f01e-0105-3e55-88825c000000", + "Body" : "jtccreateurlspecialcharsjtccreateurlspecialchars048370a5aff40147ad46acMon, 21 Oct 2019 21:22:42 GMT\"0x8D7566CCF3F40DB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 21:22:43 GMT", + "x-ms-client-request-id" : "6bf1c782-ff47-4bee-a1c3-75cd5a30e2e8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars021049c2ee6feb21a84766?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars048370a5aff40147ad46ac?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "4725f319-b38c-40af-8ae0-63750f5d337a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "695bacea-3f8d-41c8-b990-6e822a336d9d" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -174,11 +174,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f95995-c01e-012f-7f96-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "4725f319-b38c-40af-8ae0-63750f5d337a" + "x-ms-request-id" : "3ebe4469-f01e-0105-4f55-88825c000000", + "Date" : "Mon, 21 Oct 2019 21:22:43 GMT", + "x-ms-client-request-id" : "695bacea-3f8d-41c8-b990-6e822a336d9d" }, "Exception" : null } ], - "variables" : [ "jtccreateurlspecialchars021049c2ee6feb21a84766" ] + "variables" : [ "jtccreateurlspecialchars048370a5aff40147ad46ac" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[2].json index f22e0ebbd87a..5df386be8ce0 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[2].json @@ -1,54 +1,54 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars069059e912dba033824157?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0296122c50392891b94a93?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "64be4886-7a52-421b-8d9d-920a46132486" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "51e78779-5389-4ab3-95c1-4eada474ce1d" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFF5F130B", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:45 GMT", + "ETag" : "0x8D7566CCFB417FC", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8074536d-501e-002e-0d96-83b0b1000000", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "64be4886-7a52-421b-8d9d-920a46132486" + "x-ms-request-id" : "3ebe4484-f01e-0105-6655-88825c000000", + "Date" : "Mon, 21 Oct 2019 21:22:43 GMT", + "x-ms-client-request-id" : "51e78779-5389-4ab3-95c1-4eada474ce1d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars069059e912dba033824157/hello&world", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0296122c50392891b94a93/hello%20world", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "0c145142-c352-4adc-a211-4b36b9ab8606" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "e4e4bc97-35b4-444f-bbb7-6acaff5b354a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFF674B1F", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:45 GMT", + "ETag" : "0x8D7566CCFC1E9E1", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f959ff-c01e-012f-6396-83f719000000", + "x-ms-request-id" : "3ebe449e-f01e-0105-7d55-88825c000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:45 GMT", - "x-ms-client-request-id" : "0c145142-c352-4adc-a211-4b36b9ab8606" + "Date" : "Mon, 21 Oct 2019 21:22:43 GMT", + "x-ms-client-request-id" : "e4e4bc97-35b4-444f-bbb7-6acaff5b354a" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars069059e912dba033824157/hello&world", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0296122c50392891b94a93/hello%20world", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "c256f3cf-9e0c-4c96-abe0-b4cbfe026c06" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "53f99d06-dea2-46bb-a8c1-9b59cdd8b3b4" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -56,75 +56,75 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", "x-ms-blob-committed-block-count" : "0", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:45 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", + "Date" : "Mon, 21 Oct 2019 21:22:43 GMT", "x-ms-blob-type" : "AppendBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D751ADFF674B1F", - "x-ms-creation-time" : "Tue, 15 Oct 2019 20:26:45 GMT", + "ETag" : "0x8D7566CCFC1E9E1", + "x-ms-creation-time" : "Mon, 21 Oct 2019 21:22:43 GMT", "Content-Length" : "0", - "x-ms-request-id" : "80745394-501e-002e-3096-83b0b1000000", - "x-ms-client-request-id" : "c256f3cf-9e0c-4c96-abe0-b4cbfe026c06", + "x-ms-request-id" : "3ebe44b5-f01e-0105-1355-88825c000000", + "x-ms-client-request-id" : "53f99d06-dea2-46bb-a8c1-9b59cdd8b3b4", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars069059e912dba033824157/hello&world2", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0296122c50392891b94a93/hello%20world2", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5b1b136d-5afe-4c02-901a-7aa6aa57b57f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "551f3c20-5c51-42c8-8955-fe9e255a049a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751ADFF777BB8", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:45 GMT", + "ETag" : "0x8D7566CCFD99666", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f95a67-c01e-012f-4396-83f719000000", + "x-ms-request-id" : "3ebe44d2-f01e-0105-2955-88825c000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:45 GMT", - "x-ms-client-request-id" : "5b1b136d-5afe-4c02-901a-7aa6aa57b57f" + "Date" : "Mon, 21 Oct 2019 21:22:43 GMT", + "x-ms-client-request-id" : "551f3c20-5c51-42c8-8955-fe9e255a049a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars069059e912dba033824157/hello&world3", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0296122c50392891b94a93/hello%20world3", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ce4249a9-1e4b-49df-af34-1f941f0d9764", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "a5e74ea8-4ed9-4ebe-bb56-20eb5e9ba5c1", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Tue, 15 Oct 2019 20:26:45 GMT", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:44 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", + "Date" : "Mon, 21 Oct 2019 21:22:43 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D751ADFF7D498A", + "ETag" : "0x8D7566CCFE5CE60", "Content-Length" : "0", - "x-ms-request-id" : "807453af-501e-002e-4a96-83b0b1000000", - "x-ms-client-request-id" : "ce4249a9-1e4b-49df-af34-1f941f0d9764" + "x-ms-request-id" : "3ebe44fc-f01e-0105-4b55-88825c000000", + "x-ms-client-request-id" : "a5e74ea8-4ed9-4ebe-bb56-20eb5e9ba5c1" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars069059e912dba033824157?include=&restype=container&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0296122c50392891b94a93?include=&restype=container&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a6937baa-a0a7-4e1f-8fbe-039d5aafa0d7" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "2d39c178-d448-4eaf-a29c-356ba195d518" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -132,10 +132,10 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f95aa6-c01e-012f-7d96-83f719000000", - "Body" : "hello&worldTue, 15 Oct 2019 20:26:45 GMTTue, 15 Oct 2019 20:26:45 GMT0x8D751ADFF674B1F0application/octet-streamAppendBlobunlockedavailabletruehello&world2Tue, 15 Oct 2019 20:26:45 GMTTue, 15 Oct 2019 20:26:45 GMT0x8D751ADFF777BB8512application/octet-stream0PageBlobunlockedavailabletruehello&world3Tue, 15 Oct 2019 20:26:45 GMTTue, 15 Oct 2019 20:26:45 GMT0x8D751ADFF7D498A7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", - "Date" : "Tue, 15 Oct 2019 20:26:45 GMT", - "x-ms-client-request-id" : "a6937baa-a0a7-4e1f-8fbe-039d5aafa0d7", + "x-ms-request-id" : "3ebe4520-f01e-0105-6e55-88825c000000", + "Body" : "hello worldMon, 21 Oct 2019 21:22:43 GMTMon, 21 Oct 2019 21:22:43 GMT0x8D7566CCFC1E9E10application/octet-streamAppendBlobunlockedavailabletruehello world2Mon, 21 Oct 2019 21:22:43 GMTMon, 21 Oct 2019 21:22:43 GMT0x8D7566CCFD99666512application/octet-stream0PageBlobunlockedavailabletruehello world3Mon, 21 Oct 2019 21:22:44 GMTMon, 21 Oct 2019 21:22:44 GMT0x8D7566CCFE5CE607application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Mon, 21 Oct 2019 21:22:43 GMT", + "x-ms-client-request-id" : "2d39c178-d448-4eaf-a29c-356ba195d518", "Content-Type" : "application/xml" }, "Exception" : null @@ -144,8 +144,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccreateurlspecialchars&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8e01e53b-85a0-4762-9435-592b7ec5ff7a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "f7fcdc9d-b506-45ee-bad3-7738eebd1698" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -153,20 +153,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "807453d2-501e-002e-6a96-83b0b1000000", - "Body" : "jtccreateurlspecialcharsjtccreateurlspecialchars069059e912dba033824157Tue, 15 Oct 2019 20:26:45 GMT\"0x8D751ADFF5F130B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:26:44 GMT", - "x-ms-client-request-id" : "8e01e53b-85a0-4762-9435-592b7ec5ff7a", + "x-ms-request-id" : "3ebe456a-f01e-0105-3255-88825c000000", + "Body" : "jtccreateurlspecialcharsjtccreateurlspecialchars0296122c50392891b94a93Mon, 21 Oct 2019 21:22:43 GMT\"0x8D7566CCFB417FC\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 21:22:44 GMT", + "x-ms-client-request-id" : "f7fcdc9d-b506-45ee-bad3-7738eebd1698", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars069059e912dba033824157?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars0296122c50392891b94a93?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9f072c6e-7981-45b1-ba1e-6d289f9c354e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "92165591-d1f2-4b16-9541-38549fbec248" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -174,11 +174,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69f95b23-c01e-012f-6d96-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:26:45 GMT", - "x-ms-client-request-id" : "9f072c6e-7981-45b1-ba1e-6d289f9c354e" + "x-ms-request-id" : "3ebe45a7-f01e-0105-6755-88825c000000", + "Date" : "Mon, 21 Oct 2019 21:22:44 GMT", + "x-ms-client-request-id" : "92165591-d1f2-4b16-9541-38549fbec248" }, "Exception" : null } ], - "variables" : [ "jtccreateurlspecialchars069059e912dba033824157" ] + "variables" : [ "jtccreateurlspecialchars0296122c50392891b94a93" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[3].json new file mode 100644 index 000000000000..628875660f03 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[3].json @@ -0,0 +1,184 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars055413dcdce762bc5244c2?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "f5ed0c3b-b5d4-4022-a7b2-2397cd127192" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7566CD025E127", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:44 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3ebe45c7-f01e-0105-0155-88825c000000", + "Date" : "Mon, 21 Oct 2019 21:22:44 GMT", + "x-ms-client-request-id" : "f5ed0c3b-b5d4-4022-a7b2-2397cd127192" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars055413dcdce762bc5244c2/hello%2Fworld", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "a022f782-a2d9-443f-8ea7-510e64cf25b2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7566CD076C03E", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3ebe4666-f01e-0105-0255-88825c000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 21 Oct 2019 21:22:44 GMT", + "x-ms-client-request-id" : "a022f782-a2d9-443f-8ea7-510e64cf25b2" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars055413dcdce762bc5244c2/hello%2Fworld", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "3b61bbb9-775a-4c4a-b6f0-68febe8c8116" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-committed-block-count" : "0", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:45 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 21 Oct 2019 21:22:44 GMT", + "x-ms-blob-type" : "AppendBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D7566CD076C03E", + "x-ms-creation-time" : "Mon, 21 Oct 2019 21:22:45 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "3ebe4682-f01e-0105-1b55-88825c000000", + "x-ms-client-request-id" : "3b61bbb9-775a-4c4a-b6f0-68febe8c8116", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars055413dcdce762bc5244c2/hello%2Fworld2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "efbbdc5d-ef3d-481b-bbd0-2917f0590c20" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7566CD091F008", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3ebe4694-f01e-0105-2955-88825c000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 21 Oct 2019 21:22:44 GMT", + "x-ms-client-request-id" : "efbbdc5d-ef3d-481b-bbd0-2917f0590c20" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars055413dcdce762bc5244c2/hello%2Fworld3", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "f2c64eda-904f-40bc-81fb-e13ccb6ddc5f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:45 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 21 Oct 2019 21:22:45 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D7566CD09EC473", + "Content-Length" : "0", + "x-ms-request-id" : "3ebe46a6-f01e-0105-3a55-88825c000000", + "x-ms-client-request-id" : "f2c64eda-904f-40bc-81fb-e13ccb6ddc5f" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars055413dcdce762bc5244c2?include=&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "b2da18be-9518-4bd6-9130-3124dc7c80f5" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3ebe46b9-f01e-0105-4b55-88825c000000", + "Body" : "hello/worldMon, 21 Oct 2019 21:22:45 GMTMon, 21 Oct 2019 21:22:45 GMT0x8D7566CD076C03E0application/octet-streamAppendBlobunlockedavailabletruehello/world2Mon, 21 Oct 2019 21:22:45 GMTMon, 21 Oct 2019 21:22:45 GMT0x8D7566CD091F008512application/octet-stream0PageBlobunlockedavailabletruehello/world3Mon, 21 Oct 2019 21:22:45 GMTMon, 21 Oct 2019 21:22:45 GMT0x8D7566CD09EC4737application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Mon, 21 Oct 2019 21:22:45 GMT", + "x-ms-client-request-id" : "b2da18be-9518-4bd6-9130-3124dc7c80f5", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccreateurlspecialchars&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "32be8edd-4260-4059-bc3c-f16af2b17174" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3ebe46de-f01e-0105-6a55-88825c000000", + "Body" : "jtccreateurlspecialcharsjtccreateurlspecialchars055413dcdce762bc5244c2Mon, 21 Oct 2019 21:22:44 GMT\"0x8D7566CD025E127\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 21:22:45 GMT", + "x-ms-client-request-id" : "32be8edd-4260-4059-bc3c-f16af2b17174", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars055413dcdce762bc5244c2?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "f21ae3cb-81c0-4250-8d5f-a3da9685b9c6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "3ebe46f3-f01e-0105-7c55-88825c000000", + "Date" : "Mon, 21 Oct 2019 21:22:45 GMT", + "x-ms-client-request-id" : "f21ae3cb-81c0-4250-8d5f-a3da9685b9c6" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateurlspecialchars055413dcdce762bc5244c2" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[4].json new file mode 100644 index 000000000000..52b69fbb1254 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[4].json @@ -0,0 +1,184 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars02718758ae99ad2581438d?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "c25f18a5-e100-43e6-ac51-8b2172e9d683" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7566CD0DD76F0", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3ebe4702-f01e-0105-0b55-88825c000000", + "Date" : "Mon, 21 Oct 2019 21:22:45 GMT", + "x-ms-client-request-id" : "c25f18a5-e100-43e6-ac51-8b2172e9d683" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars02718758ae99ad2581438d/hello%26world", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "488e4cd9-d15f-41dc-8862-cf34281a18ff" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7566CD0EBBEDC", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3ebe471d-f01e-0105-1d55-88825c000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 21 Oct 2019 21:22:45 GMT", + "x-ms-client-request-id" : "488e4cd9-d15f-41dc-8862-cf34281a18ff" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars02718758ae99ad2581438d/hello%26world", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "22b88d1a-7e4c-4555-82d6-7d04ea5448bd" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-committed-block-count" : "0", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:45 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 21 Oct 2019 21:22:45 GMT", + "x-ms-blob-type" : "AppendBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D7566CD0EBBEDC", + "x-ms-creation-time" : "Mon, 21 Oct 2019 21:22:45 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "3ebe4733-f01e-0105-2e55-88825c000000", + "x-ms-client-request-id" : "22b88d1a-7e4c-4555-82d6-7d04ea5448bd", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars02718758ae99ad2581438d/hello%26world2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "76d3d172-451c-4736-9326-7af7d6afe32c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7566CD1051979", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3ebe473d-f01e-0105-3655-88825c000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 21 Oct 2019 21:22:45 GMT", + "x-ms-client-request-id" : "76d3d172-451c-4736-9326-7af7d6afe32c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars02718758ae99ad2581438d/hello%26world3", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "9e8eab29-1d03-49bc-96d3-40e0ec9b8c03", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:46 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 21 Oct 2019 21:22:45 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D7566CD112631B", + "Content-Length" : "0", + "x-ms-request-id" : "3ebe4752-f01e-0105-4655-88825c000000", + "x-ms-client-request-id" : "9e8eab29-1d03-49bc-96d3-40e0ec9b8c03" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars02718758ae99ad2581438d?include=&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "cdf92b9a-1c71-4169-be11-3408bf485946" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3ebe476f-f01e-0105-6155-88825c000000", + "Body" : "hello&worldMon, 21 Oct 2019 21:22:45 GMTMon, 21 Oct 2019 21:22:45 GMT0x8D7566CD0EBBEDC0application/octet-streamAppendBlobunlockedavailabletruehello&world2Mon, 21 Oct 2019 21:22:45 GMTMon, 21 Oct 2019 21:22:45 GMT0x8D7566CD1051979512application/octet-stream0PageBlobunlockedavailabletruehello&world3Mon, 21 Oct 2019 21:22:46 GMTMon, 21 Oct 2019 21:22:46 GMT0x8D7566CD112631B7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Mon, 21 Oct 2019 21:22:45 GMT", + "x-ms-client-request-id" : "cdf92b9a-1c71-4169-be11-3408bf485946", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccreateurlspecialchars&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "9f00c822-8f9c-4da8-bdb3-804522fd8ab0" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3ebe479c-f01e-0105-0b55-88825c000000", + "Body" : "jtccreateurlspecialcharsjtccreateurlspecialchars02718758ae99ad2581438dMon, 21 Oct 2019 21:22:45 GMT\"0x8D7566CD0DD76F0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 21:22:45 GMT", + "x-ms-client-request-id" : "9f00c822-8f9c-4da8-bdb3-804522fd8ab0", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars02718758ae99ad2581438d?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "988182ef-bb47-4490-9150-25443338181b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "3ebe47b8-f01e-0105-1f55-88825c000000", + "Date" : "Mon, 21 Oct 2019 21:22:46 GMT", + "x-ms-client-request-id" : "988182ef-bb47-4490-9150-25443338181b" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateurlspecialchars02718758ae99ad2581438d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[5].json new file mode 100644 index 000000000000..f077e4b09446 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialchars[5].json @@ -0,0 +1,184 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars00855438fa59e89e4742c2?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "9038666e-fd39-4691-a665-afcab7506616" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7566CD1549890", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:46 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3ebe47d7-f01e-0105-3c55-88825c000000", + "Date" : "Mon, 21 Oct 2019 21:22:46 GMT", + "x-ms-client-request-id" : "9038666e-fd39-4691-a665-afcab7506616" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars00855438fa59e89e4742c2/%21*%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%23%5B%5D", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "808c06a4-946e-48bc-b7f4-49030486492e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7566CD1641992", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:46 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3ebe47f9-f01e-0105-5655-88825c000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 21 Oct 2019 21:22:46 GMT", + "x-ms-client-request-id" : "808c06a4-946e-48bc-b7f4-49030486492e" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars00855438fa59e89e4742c2/%21*%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%23%5B%5D", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "7c04892a-0ce7-4867-b623-aff3486a25e9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-committed-block-count" : "0", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:46 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 21 Oct 2019 21:22:46 GMT", + "x-ms-blob-type" : "AppendBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D7566CD1641992", + "x-ms-creation-time" : "Mon, 21 Oct 2019 21:22:46 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "3ebe481a-f01e-0105-7355-88825c000000", + "x-ms-client-request-id" : "7c04892a-0ce7-4867-b623-aff3486a25e9", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars00855438fa59e89e4742c2/%21*%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%23%5B%5D2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "5bb83a6d-db81-4b55-9364-a6f34f135d82" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7566CD18453A7", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:46 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3ebe4825-f01e-0105-7b55-88825c000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 21 Oct 2019 21:22:46 GMT", + "x-ms-client-request-id" : "5bb83a6d-db81-4b55-9364-a6f34f135d82" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars00855438fa59e89e4742c2/%21*%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%23%5B%5D3", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "85358d5a-a579-4e0f-b752-196a895e2c61", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 21 Oct 2019 21:22:46 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 21 Oct 2019 21:22:46 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D7566CD1917644", + "Content-Length" : "0", + "x-ms-request-id" : "3ebe4832-f01e-0105-0855-88825c000000", + "x-ms-client-request-id" : "85358d5a-a579-4e0f-b752-196a895e2c61" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars00855438fa59e89e4742c2?include=&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "ee8fcf0e-21f4-4ce8-ad6d-ff0dea8d23b8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3ebe4851-f01e-0105-2355-88825c000000", + "Body" : "!*'();:@&=+$,/?#[]Mon, 21 Oct 2019 21:22:46 GMTMon, 21 Oct 2019 21:22:46 GMT0x8D7566CD16419920application/octet-streamAppendBlobunlockedavailabletrue!*'();:@&=+$,/?#[]2Mon, 21 Oct 2019 21:22:46 GMTMon, 21 Oct 2019 21:22:46 GMT0x8D7566CD18453A7512application/octet-stream0PageBlobunlockedavailabletrue!*'();:@&=+$,/?#[]3Mon, 21 Oct 2019 21:22:46 GMTMon, 21 Oct 2019 21:22:46 GMT0x8D7566CD19176447application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Mon, 21 Oct 2019 21:22:46 GMT", + "x-ms-client-request-id" : "ee8fcf0e-21f4-4ce8-ad6d-ff0dea8d23b8", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccreateurlspecialchars&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "2db0e21f-923e-41e7-8e38-ac70794a577d" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3ebe4882-f01e-0105-4b55-88825c000000", + "Body" : "jtccreateurlspecialcharsjtccreateurlspecialchars00855438fa59e89e4742c2Mon, 21 Oct 2019 21:22:46 GMT\"0x8D7566CD1549890\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 21 Oct 2019 21:22:46 GMT", + "x-ms-client-request-id" : "2db0e21f-923e-41e7-8e38-ac70794a577d", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialchars00855438fa59e89e4742c2?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "806025ba-2aff-408c-8394-3df961c2e730" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "3ebe489c-f01e-0105-5a55-88825c000000", + "Date" : "Mon, 21 Oct 2019 21:22:46 GMT", + "x-ms-client-request-id" : "806025ba-2aff-408c-8394-3df961c2e730" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateurlspecialchars00855438fa59e89e4742c2" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[0].json new file mode 100644 index 000000000000..09b33b7955ce --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[0].json @@ -0,0 +1,184 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0146097ec796adde914?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "c5e22a37-c450-437c-9226-770478e7fbac" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75774FEEC7233", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:50 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "dd38b5e7-e01e-0037-6f5d-899cd9000000", + "Date" : "Wed, 23 Oct 2019 04:53:49 GMT", + "x-ms-client-request-id" : "c5e22a37-c450-437c-9226-770478e7fbac" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0146097ec796adde914/%E4%B8%AD%E6%96%87", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "d350a511-ec41-4d50-bc13-fce794fb4c17" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75774FEFAE88D", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:50 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "122651cc-d01e-0095-7b5d-895145000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:49 GMT", + "x-ms-client-request-id" : "d350a511-ec41-4d50-bc13-fce794fb4c17" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0146097ec796adde914/%E4%B8%AD%E6%96%87", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "80b63147-0bb0-4ce6-a7d2-49fc4e9f15bf" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-committed-block-count" : "0", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:50 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 23 Oct 2019 04:53:49 GMT", + "x-ms-blob-type" : "AppendBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D75774FEFAE88D", + "x-ms-creation-time" : "Wed, 23 Oct 2019 04:53:50 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "dd38b60a-e01e-0037-0d5d-899cd9000000", + "x-ms-client-request-id" : "80b63147-0bb0-4ce6-a7d2-49fc4e9f15bf", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0146097ec796adde914/%E4%B8%AD%E6%96%872", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "8e69d768-da61-4479-b7e2-d6f388c4ec3b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75774FF170301", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:50 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "122651ee-d01e-0095-175d-895145000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:49 GMT", + "x-ms-client-request-id" : "8e69d768-da61-4479-b7e2-d6f388c4ec3b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0146097ec796adde914/%E4%B8%AD%E6%96%873", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "42996322-9e6b-4529-8afc-5e786fd3075b", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:50 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:49 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D75774FF25D3B1", + "Content-Length" : "0", + "x-ms-request-id" : "dd38b62c-e01e-0037-2e5d-899cd9000000", + "x-ms-client-request-id" : "42996322-9e6b-4529-8afc-5e786fd3075b" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0146097ec796adde914?include=&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "f6e94d13-6d0b-419f-9ac2-a39ad99b32d2" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "12265208-d01e-0095-2b5d-895145000000", + "Body" : "中文Wed, 23 Oct 2019 04:53:50 GMTWed, 23 Oct 2019 04:53:50 GMT0x8D75774FEFAE88D0application/octet-streamAppendBlobunlockedavailabletrue中文2Wed, 23 Oct 2019 04:53:50 GMTWed, 23 Oct 2019 04:53:50 GMT0x8D75774FF170301512application/octet-stream0PageBlobunlockedavailabletrue中文3Wed, 23 Oct 2019 04:53:50 GMTWed, 23 Oct 2019 04:53:50 GMT0x8D75774FF25D3B17application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Wed, 23 Oct 2019 04:53:50 GMT", + "x-ms-client-request-id" : "f6e94d13-6d0b-419f-9ac2-a39ad99b32d2", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccreateurlspecialcharsencoded&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "3b160bd4-be12-4395-9a21-f5efe2e576f1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "dd38b663-e01e-0037-5d5d-899cd9000000", + "Body" : "jtccreateurlspecialcharsencodedjtccreateurlspecialcharsencoded0146097ec796adde914Wed, 23 Oct 2019 04:53:50 GMT\"0x8D75774FEEC7233\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 04:53:50 GMT", + "x-ms-client-request-id" : "3b160bd4-be12-4395-9a21-f5efe2e576f1", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0146097ec796adde914?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "dafd79de-a17a-4233-8c4f-6730a099442d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "1226521f-d01e-0095-3d5d-895145000000", + "Date" : "Wed, 23 Oct 2019 04:53:50 GMT", + "x-ms-client-request-id" : "dafd79de-a17a-4233-8c4f-6730a099442d" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateurlspecialcharsencoded0146097ec796adde914" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[1].json new file mode 100644 index 000000000000..60cc7001b334 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[1].json @@ -0,0 +1,184 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded01068870034ba5e1174?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "684570e9-402d-4800-91bf-2e931b491b19" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75774FF693AE6", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:50 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "dd38b696-e01e-0037-065d-899cd9000000", + "Date" : "Wed, 23 Oct 2019 04:53:50 GMT", + "x-ms-client-request-id" : "684570e9-402d-4800-91bf-2e931b491b19" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded01068870034ba5e1174/az%5B%5D", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "0a212ce5-39bf-4b3f-8a04-9a6806707f62" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75774FF7566C7", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:50 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "12265232-d01e-0095-4c5d-895145000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:50 GMT", + "x-ms-client-request-id" : "0a212ce5-39bf-4b3f-8a04-9a6806707f62" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded01068870034ba5e1174/az%5B%5D", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "caff9afb-9e54-47f6-b3ab-1cee241e6e04" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-committed-block-count" : "0", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:50 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 23 Oct 2019 04:53:50 GMT", + "x-ms-blob-type" : "AppendBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D75774FF7566C7", + "x-ms-creation-time" : "Wed, 23 Oct 2019 04:53:50 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "dd38b6ce-e01e-0037-365d-899cd9000000", + "x-ms-client-request-id" : "caff9afb-9e54-47f6-b3ab-1cee241e6e04", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded01068870034ba5e1174/az%5B%5D2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "c77c27db-d00e-44dd-8146-32372384f5ef" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75774FF93A48D", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:51 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "12265266-d01e-0095-705d-895145000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:50 GMT", + "x-ms-client-request-id" : "c77c27db-d00e-44dd-8146-32372384f5ef" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded01068870034ba5e1174/az%5B%5D3", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "7bc3e06d-38a3-4cab-be91-e321e31b9d83", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:51 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:50 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D75774FFA0EE42", + "Content-Length" : "0", + "x-ms-request-id" : "dd38b715-e01e-0037-685d-899cd9000000", + "x-ms-client-request-id" : "7bc3e06d-38a3-4cab-be91-e321e31b9d83" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded01068870034ba5e1174?include=&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "12744829-89ce-4b1d-8ec5-bab0e0e03bf0" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "12265284-d01e-0095-0d5d-895145000000", + "Body" : "az[]Wed, 23 Oct 2019 04:53:50 GMTWed, 23 Oct 2019 04:53:50 GMT0x8D75774FF7566C70application/octet-streamAppendBlobunlockedavailabletrueaz[]2Wed, 23 Oct 2019 04:53:51 GMTWed, 23 Oct 2019 04:53:51 GMT0x8D75774FF93A48D512application/octet-stream0PageBlobunlockedavailabletrueaz[]3Wed, 23 Oct 2019 04:53:51 GMTWed, 23 Oct 2019 04:53:51 GMT0x8D75774FFA0EE427application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Wed, 23 Oct 2019 04:53:50 GMT", + "x-ms-client-request-id" : "12744829-89ce-4b1d-8ec5-bab0e0e03bf0", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccreateurlspecialcharsencoded&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "da28d8fd-d89e-4b0c-b209-50d5866a4390" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "dd38b77b-e01e-0037-305d-899cd9000000", + "Body" : "jtccreateurlspecialcharsencodedjtccreateurlspecialcharsencoded01068870034ba5e1174Wed, 23 Oct 2019 04:53:50 GMT\"0x8D75774FF693AE6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 04:53:50 GMT", + "x-ms-client-request-id" : "da28d8fd-d89e-4b0c-b209-50d5866a4390", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded01068870034ba5e1174?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "d266c1bc-ec9e-4ab7-995d-37c318ebfd4d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "122652a1-d01e-0095-245d-895145000000", + "Date" : "Wed, 23 Oct 2019 04:53:51 GMT", + "x-ms-client-request-id" : "d266c1bc-ec9e-4ab7-995d-37c318ebfd4d" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateurlspecialcharsencoded01068870034ba5e1174" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[2].json new file mode 100644 index 000000000000..aba44d3f51a6 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[2].json @@ -0,0 +1,184 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0377836edf49a795cc4?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "343f984e-45aa-470a-a9e2-caa787e84ea4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75774FFE0AB1F", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:51 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "dd38b7a5-e01e-0037-535d-899cd9000000", + "Date" : "Wed, 23 Oct 2019 04:53:51 GMT", + "x-ms-client-request-id" : "343f984e-45aa-470a-a9e2-caa787e84ea4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0377836edf49a795cc4/hello%20world", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "bab09923-3042-4281-99b3-1b5aaf27cb6d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75774FFED9A93", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:51 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "122652b6-d01e-0095-375d-895145000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:51 GMT", + "x-ms-client-request-id" : "bab09923-3042-4281-99b3-1b5aaf27cb6d" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0377836edf49a795cc4/hello%20world", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "c92223fb-1e3c-44db-b5ee-b4257f36cbef" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-committed-block-count" : "0", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:51 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 23 Oct 2019 04:53:51 GMT", + "x-ms-blob-type" : "AppendBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D75774FFED9A93", + "x-ms-creation-time" : "Wed, 23 Oct 2019 04:53:51 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "dd38b7ba-e01e-0037-655d-899cd9000000", + "x-ms-client-request-id" : "c92223fb-1e3c-44db-b5ee-b4257f36cbef", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0377836edf49a795cc4/hello%20world2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "5c7f6f71-352e-408d-a1fe-ec945525a7c7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7577500043559", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:51 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "122652cd-d01e-0095-485d-895145000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:51 GMT", + "x-ms-client-request-id" : "5c7f6f71-352e-408d-a1fe-ec945525a7c7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0377836edf49a795cc4/hello%20world3", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "5e29981e-a135-4871-9856-4a255f112d84", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:52 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:51 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D757750010E2AD", + "Content-Length" : "0", + "x-ms-request-id" : "dd38b7dc-e01e-0037-045d-899cd9000000", + "x-ms-client-request-id" : "5e29981e-a135-4871-9856-4a255f112d84" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0377836edf49a795cc4?include=&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "4b28f6d9-e5c5-4d8b-8fe5-9e51ac4cc3e2" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "122652ea-d01e-0095-605d-895145000000", + "Body" : "hello worldWed, 23 Oct 2019 04:53:51 GMTWed, 23 Oct 2019 04:53:51 GMT0x8D75774FFED9A930application/octet-streamAppendBlobunlockedavailabletruehello world2Wed, 23 Oct 2019 04:53:51 GMTWed, 23 Oct 2019 04:53:51 GMT0x8D7577500043559512application/octet-stream0PageBlobunlockedavailabletruehello world3Wed, 23 Oct 2019 04:53:52 GMTWed, 23 Oct 2019 04:53:52 GMT0x8D757750010E2AD7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Wed, 23 Oct 2019 04:53:51 GMT", + "x-ms-client-request-id" : "4b28f6d9-e5c5-4d8b-8fe5-9e51ac4cc3e2", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccreateurlspecialcharsencoded&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "d5ee6feb-2d52-45ef-a23d-046a9d7afb83" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "dd38b7ef-e01e-0037-175d-899cd9000000", + "Body" : "jtccreateurlspecialcharsencodedjtccreateurlspecialcharsencoded0377836edf49a795cc4Wed, 23 Oct 2019 04:53:51 GMT\"0x8D75774FFE0AB1F\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 04:53:51 GMT", + "x-ms-client-request-id" : "d5ee6feb-2d52-45ef-a23d-046a9d7afb83", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0377836edf49a795cc4?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "bb1cceef-3a15-49e7-8a55-73c82bac28b4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "1226530c-d01e-0095-785d-895145000000", + "Date" : "Wed, 23 Oct 2019 04:53:51 GMT", + "x-ms-client-request-id" : "bb1cceef-3a15-49e7-8a55-73c82bac28b4" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateurlspecialcharsencoded0377836edf49a795cc4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[3].json new file mode 100644 index 000000000000..02582f5ffa5f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[3].json @@ -0,0 +1,184 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0432041d31d3dbc17f4?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "6ae32fda-2ec4-4fb2-b0b5-f7b9aa39922c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7577500524D83", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:52 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "dd38b824-e01e-0037-385d-899cd9000000", + "Date" : "Wed, 23 Oct 2019 04:53:51 GMT", + "x-ms-client-request-id" : "6ae32fda-2ec4-4fb2-b0b5-f7b9aa39922c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0432041d31d3dbc17f4/hello%2Fworld", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "db1f1320-d626-4e91-9cf1-90989d7fa540" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7577500624B1D", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:52 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "12265336-d01e-0095-155d-895145000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:52 GMT", + "x-ms-client-request-id" : "db1f1320-d626-4e91-9cf1-90989d7fa540" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0432041d31d3dbc17f4/hello%2Fworld", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "20ad8845-94fe-4208-ba1a-77f201360987" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-committed-block-count" : "0", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:52 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 23 Oct 2019 04:53:51 GMT", + "x-ms-blob-type" : "AppendBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D7577500624B1D", + "x-ms-creation-time" : "Wed, 23 Oct 2019 04:53:52 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "dd38b844-e01e-0037-505d-899cd9000000", + "x-ms-client-request-id" : "20ad8845-94fe-4208-ba1a-77f201360987", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0432041d31d3dbc17f4/hello%2Fworld2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "5b2e2df7-a091-42d7-84c1-c5bfffdf7f19" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75775007B5783", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:52 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "12265350-d01e-0095-2d5d-895145000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:52 GMT", + "x-ms-client-request-id" : "5b2e2df7-a091-42d7-84c1-c5bfffdf7f19" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0432041d31d3dbc17f4/hello%2Fworld3", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "d43b1413-c170-4864-aba4-b3e77dfa1c94", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:52 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:52 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D75775008804D7", + "Content-Length" : "0", + "x-ms-request-id" : "dd38b872-e01e-0037-775d-899cd9000000", + "x-ms-client-request-id" : "d43b1413-c170-4864-aba4-b3e77dfa1c94" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0432041d31d3dbc17f4?include=&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "8a3c6d81-c2e6-4697-a216-b23e6f04ea1f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "12265377-d01e-0095-485d-895145000000", + "Body" : "hello/worldWed, 23 Oct 2019 04:53:52 GMTWed, 23 Oct 2019 04:53:52 GMT0x8D7577500624B1D0application/octet-streamAppendBlobunlockedavailabletruehello/world2Wed, 23 Oct 2019 04:53:52 GMTWed, 23 Oct 2019 04:53:52 GMT0x8D75775007B5783512application/octet-stream0PageBlobunlockedavailabletruehello/world3Wed, 23 Oct 2019 04:53:52 GMTWed, 23 Oct 2019 04:53:52 GMT0x8D75775008804D77application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Wed, 23 Oct 2019 04:53:52 GMT", + "x-ms-client-request-id" : "8a3c6d81-c2e6-4697-a216-b23e6f04ea1f", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccreateurlspecialcharsencoded&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "e81074c0-0ae0-4364-b96b-fdee1456cdba" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "dd38b8c4-e01e-0037-445d-899cd9000000", + "Body" : "jtccreateurlspecialcharsencodedjtccreateurlspecialcharsencoded0432041d31d3dbc17f4Wed, 23 Oct 2019 04:53:52 GMT\"0x8D7577500524D83\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 04:53:52 GMT", + "x-ms-client-request-id" : "e81074c0-0ae0-4364-b96b-fdee1456cdba", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded0432041d31d3dbc17f4?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "6207fbcd-fe87-4387-bf01-d03c8c21dcbd" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "1226539c-d01e-0095-5c5d-895145000000", + "Date" : "Wed, 23 Oct 2019 04:53:52 GMT", + "x-ms-client-request-id" : "6207fbcd-fe87-4387-bf01-d03c8c21dcbd" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateurlspecialcharsencoded0432041d31d3dbc17f4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[4].json new file mode 100644 index 000000000000..ea4629f61c49 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[4].json @@ -0,0 +1,184 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded081883079d956d1a194?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "2301770f-aaca-4a43-bbb1-8652ff1d20f0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7577500C9BDEC", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:53 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "dd38b8fd-e01e-0037-755d-899cd9000000", + "Date" : "Wed, 23 Oct 2019 04:53:52 GMT", + "x-ms-client-request-id" : "2301770f-aaca-4a43-bbb1-8652ff1d20f0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded081883079d956d1a194/hello%26world", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "094851a2-48d7-4590-a684-2e03e20fba1e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7577500D85B91", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:53 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "122653b1-d01e-0095-6b5d-895145000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:52 GMT", + "x-ms-client-request-id" : "094851a2-48d7-4590-a684-2e03e20fba1e" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded081883079d956d1a194/hello%26world", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "9d13bb97-357f-4ea7-af06-f57e555528b4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-committed-block-count" : "0", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:53 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 23 Oct 2019 04:53:52 GMT", + "x-ms-blob-type" : "AppendBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D7577500D85B91", + "x-ms-creation-time" : "Wed, 23 Oct 2019 04:53:53 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "dd38b91e-e01e-0037-0f5d-899cd9000000", + "x-ms-client-request-id" : "9d13bb97-357f-4ea7-af06-f57e555528b4", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded081883079d956d1a194/hello%26world2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "bf115d49-31df-4ee7-86f8-9b3601077697" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7577500F8E3E2", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:53 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "122653d0-d01e-0095-045d-895145000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:52 GMT", + "x-ms-client-request-id" : "bf115d49-31df-4ee7-86f8-9b3601077697" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded081883079d956d1a194/hello%26world3", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "58a5bdb2-b389-45e4-b6b9-f9d8000850c6", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:53 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:52 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D75775010AC28D", + "Content-Length" : "0", + "x-ms-request-id" : "dd38b948-e01e-0037-335d-899cd9000000", + "x-ms-client-request-id" : "58a5bdb2-b389-45e4-b6b9-f9d8000850c6" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded081883079d956d1a194?include=&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "5933fcf7-9faa-4af3-9ea0-38b026e03190" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "122653fc-d01e-0095-285d-895145000000", + "Body" : "hello&worldWed, 23 Oct 2019 04:53:53 GMTWed, 23 Oct 2019 04:53:53 GMT0x8D7577500D85B910application/octet-streamAppendBlobunlockedavailabletruehello&world2Wed, 23 Oct 2019 04:53:53 GMTWed, 23 Oct 2019 04:53:53 GMT0x8D7577500F8E3E2512application/octet-stream0PageBlobunlockedavailabletruehello&world3Wed, 23 Oct 2019 04:53:53 GMTWed, 23 Oct 2019 04:53:53 GMT0x8D75775010AC28D7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Wed, 23 Oct 2019 04:53:53 GMT", + "x-ms-client-request-id" : "5933fcf7-9faa-4af3-9ea0-38b026e03190", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccreateurlspecialcharsencoded&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "ebf41214-da34-4367-bd09-1e6435a0b646" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "dd38b977-e01e-0037-605d-899cd9000000", + "Body" : "jtccreateurlspecialcharsencodedjtccreateurlspecialcharsencoded081883079d956d1a194Wed, 23 Oct 2019 04:53:53 GMT\"0x8D7577500C9BDEC\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 04:53:53 GMT", + "x-ms-client-request-id" : "ebf41214-da34-4367-bd09-1e6435a0b646", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded081883079d956d1a194?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "0766f34b-47fb-451c-93de-5915d3050c4f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "1226543b-d01e-0095-555d-895145000000", + "Date" : "Wed, 23 Oct 2019 04:53:53 GMT", + "x-ms-client-request-id" : "0766f34b-47fb-451c-93de-5915d3050c4f" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateurlspecialcharsencoded081883079d956d1a194" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[5].json new file mode 100644 index 000000000000..0e22e35e8712 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestcreateurlspecialcharsencoded[5].json @@ -0,0 +1,184 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded062515cd8e913f1ea24?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "eb416f02-b85f-4371-aa74-8bc93fc98ff9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75775014D3F12", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:54 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "dd38b996-e01e-0037-755d-899cd9000000", + "Date" : "Wed, 23 Oct 2019 04:53:53 GMT", + "x-ms-client-request-id" : "eb416f02-b85f-4371-aa74-8bc93fc98ff9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded062515cd8e913f1ea24/%21*%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%23%5B%5D", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "fad7c552-4c5a-49f4-a73d-1e91b77b7339" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75775015B6758", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:54 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "12265477-d01e-0095-7e5d-895145000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:53 GMT", + "x-ms-client-request-id" : "fad7c552-4c5a-49f4-a73d-1e91b77b7339" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded062515cd8e913f1ea24/%21*%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%23%5B%5D", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "57abaa23-76cd-4b0c-bd24-c9ce4c010ee3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-committed-block-count" : "0", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:54 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 23 Oct 2019 04:53:53 GMT", + "x-ms-blob-type" : "AppendBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D75775015B6758", + "x-ms-creation-time" : "Wed, 23 Oct 2019 04:53:54 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "dd38b9af-e01e-0037-075d-899cd9000000", + "x-ms-client-request-id" : "57abaa23-76cd-4b0c-bd24-c9ce4c010ee3", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded062515cd8e913f1ea24/%21*%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%23%5B%5D2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "e43feb4b-fd2d-44b3-983f-8e58e9b0c47c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75775017A8FB7", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:54 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "122654cc-d01e-0095-3d5d-895145000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:53 GMT", + "x-ms-client-request-id" : "e43feb4b-fd2d-44b3-983f-8e58e9b0c47c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded062515cd8e913f1ea24/%21*%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%23%5B%5D3", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "01b492a0-7885-499a-b575-f6f65ed95296", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Wed, 23 Oct 2019 04:53:54 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 04:53:53 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D7577501889CEF", + "Content-Length" : "0", + "x-ms-request-id" : "dd38b9cb-e01e-0037-1b5d-899cd9000000", + "x-ms-client-request-id" : "01b492a0-7885-499a-b575-f6f65ed95296" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded062515cd8e913f1ea24?include=&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "49cfe96a-dc8e-4efc-a526-6a4f1178c078" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "122654f9-d01e-0095-645d-895145000000", + "Body" : "!*'();:@&=+$,/?#[]Wed, 23 Oct 2019 04:53:54 GMTWed, 23 Oct 2019 04:53:54 GMT0x8D75775015B67580application/octet-streamAppendBlobunlockedavailabletrue!*'();:@&=+$,/?#[]2Wed, 23 Oct 2019 04:53:54 GMTWed, 23 Oct 2019 04:53:54 GMT0x8D75775017A8FB7512application/octet-stream0PageBlobunlockedavailabletrue!*'();:@&=+$,/?#[]3Wed, 23 Oct 2019 04:53:54 GMTWed, 23 Oct 2019 04:53:54 GMT0x8D7577501889CEF7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Wed, 23 Oct 2019 04:53:54 GMT", + "x-ms-client-request-id" : "49cfe96a-dc8e-4efc-a526-6a4f1178c078", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtccreateurlspecialcharsencoded&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "06b2c095-8df0-4c0e-a0e8-6379de2f89f4" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "dd38b9f4-e01e-0037-3b5d-899cd9000000", + "Body" : "jtccreateurlspecialcharsencodedjtccreateurlspecialcharsencoded062515cd8e913f1ea24Wed, 23 Oct 2019 04:53:54 GMT\"0x8D75775014D3F12\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 04:53:54 GMT", + "x-ms-client-request-id" : "06b2c095-8df0-4c0e-a0e8-6379de2f89f4", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtccreateurlspecialcharsencoded062515cd8e913f1ea24?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "cc1f9bc0-ba3e-4c00-a433-ab3fca986b2f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "12265547-d01e-0095-265d-895145000000", + "Date" : "Wed, 23 Oct 2019 04:53:54 GMT", + "x-ms-client-request-id" : "cc1f9bc0-ba3e-4c00-a433-ab3fca986b2f" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateurlspecialcharsencoded062515cd8e913f1ea24" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierdelim.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierdelim.json index a99e1fbb99ee..7a7c5af72856 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierdelim.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierdelim.json @@ -44,7 +44,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81/b/a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81/b%2Fa", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", @@ -88,7 +88,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81/d/a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81/d%2Fa", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", @@ -154,7 +154,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81/g/a", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtclistblobshierdelim054357d768cc943e724d6f81/g%2Fa", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_222; Windows 10 10.0", @@ -237,4 +237,4 @@ "Exception" : null } ], "variables" : [ "jtclistblobshierdelim054357d768cc943e724d6f81" ] -} \ No newline at end of file +} diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[0].json index 229cad827add..03fdc78610fe 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[0].json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparsercbe38650eefd2b3db?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser64c15631461d4f788?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "07c9f837-eb52-433a-acb5-3ea2082bfe39" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "d61e2814-cd0f-4b48-b336-cd758e643e2d" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7536D4C596D57", - "Last-Modified" : "Fri, 18 Oct 2019 01:48:39 GMT", + "ETag" : "0x8D75793B0CFF020", + "Last-Modified" : "Wed, 23 Oct 2019 08:33:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "e803f3cb-601e-0129-3056-850061000000", - "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", - "x-ms-client-request-id" : "07c9f837-eb52-433a-acb5-3ea2082bfe39" + "x-ms-request-id" : "dde8b066-401e-0057-3d7c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:33 GMT", + "x-ms-client-request-id" : "d61e2814-cd0f-4b48-b336-cd758e643e2d" }, "Exception" : null }, { @@ -25,8 +25,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "03bbce88-2e54-4326-96f7-d3f85a4a68b6" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "f3f2a6c1-b647-4f9f-8cb0-3fff55590560" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "e803f3e6-601e-0129-4156-850061000000", - "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparsercbe38650eefd2b3dbFri, 18 Oct 2019 01:48:39 GMT\"0x8D7536D4C596D57\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", - "x-ms-client-request-id" : "03bbce88-2e54-4326-96f7-d3f85a4a68b6", + "x-ms-request-id" : "dde8b0d2-401e-0057-167c-89d9fb000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparser64c15631461d4f788Wed, 23 Oct 2019 08:33:33 GMT\"0x8D75793B0CFF020\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:33:33 GMT", + "x-ms-client-request-id" : "f3f2a6c1-b647-4f9f-8cb0-3fff55590560", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparsercbe38650eefd2b3db?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser64c15631461d4f788?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "b9bcf2e4-b7de-4edb-9779-8e56920d10cd" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "7b963dfb-13ef-4ac7-b9b2-b936d2270bf1" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "e803f3f1-601e-0129-4b56-850061000000", - "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", - "x-ms-client-request-id" : "b9bcf2e4-b7de-4edb-9779-8e56920d10cd" + "x-ms-request-id" : "dde8b104-401e-0057-457c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:33 GMT", + "x-ms-client-request-id" : "7b963dfb-13ef-4ac7-b9b2-b936d2270bf1" }, "Exception" : null } ], - "variables" : [ "jtcipurlparser0helpertestipurlparsercbe38650eefd2b3db" ] + "variables" : [ "jtcipurlparser0helpertestipurlparser64c15631461d4f788" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[1].json index 2e5b7264535c..4eeb51fedb38 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[1].json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparserdcd885757bf71270f?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser10171229eca98a3ef?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "21008819-8ba9-470c-993c-d1c632c92ff5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "6e4fa228-f790-4228-a858-4d9a72a8c2b5" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7536D4CA6DECA", - "Last-Modified" : "Fri, 18 Oct 2019 01:48:39 GMT", + "ETag" : "0x8D75793B135CF86", + "Last-Modified" : "Wed, 23 Oct 2019 08:33:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "e803f3fe-601e-0129-5256-850061000000", - "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", - "x-ms-client-request-id" : "21008819-8ba9-470c-993c-d1c632c92ff5" + "x-ms-request-id" : "dde8b12c-401e-0057-697c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:33 GMT", + "x-ms-client-request-id" : "6e4fa228-f790-4228-a858-4d9a72a8c2b5" }, "Exception" : null }, { @@ -25,8 +25,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "7242a3d7-9eaa-4627-985f-65bee741cfb5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "1dc41197-4b3e-40cd-973b-366f06b48078" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "e803f413-601e-0129-6056-850061000000", - "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparserdcd885757bf71270fFri, 18 Oct 2019 01:48:39 GMT\"0x8D7536D4CA6DECA\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", - "x-ms-client-request-id" : "7242a3d7-9eaa-4627-985f-65bee741cfb5", + "x-ms-request-id" : "dde8b143-401e-0057-7b7c-89d9fb000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparser10171229eca98a3efWed, 23 Oct 2019 08:33:34 GMT\"0x8D75793B135CF86\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:33:34 GMT", + "x-ms-client-request-id" : "1dc41197-4b3e-40cd-973b-366f06b48078", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparserdcd885757bf71270f?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser10171229eca98a3ef?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "9dfc2d69-9150-4ad8-b042-48116d3a8fe0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "2ea69ccd-061f-49a6-96e9-3742d53dd3e9" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "e803f425-601e-0129-6c56-850061000000", - "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", - "x-ms-client-request-id" : "9dfc2d69-9150-4ad8-b042-48116d3a8fe0" + "x-ms-request-id" : "dde8b160-401e-0057-147c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:34 GMT", + "x-ms-client-request-id" : "2ea69ccd-061f-49a6-96e9-3742d53dd3e9" }, "Exception" : null } ], - "variables" : [ "jtcipurlparser0helpertestipurlparserdcd885757bf71270f" ] + "variables" : [ "jtcipurlparser0helpertestipurlparser10171229eca98a3ef" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[2].json index 66816d6dc24a..d45a23653aba 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[2].json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser0ca19990074741782?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparsere9e76003b8e7df988?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "ee4677b7-bf8d-4038-af01-e47887e2d597" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "b74ef790-58ec-403f-ad70-326f6709e676" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7536D4CC4F62D", - "Last-Modified" : "Fri, 18 Oct 2019 01:48:40 GMT", + "ETag" : "0x8D75793B165EBE3", + "Last-Modified" : "Wed, 23 Oct 2019 08:33:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "e803f436-601e-0129-7656-850061000000", - "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", - "x-ms-client-request-id" : "ee4677b7-bf8d-4038-af01-e47887e2d597" + "x-ms-request-id" : "dde8b185-401e-0057-367c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:34 GMT", + "x-ms-client-request-id" : "b74ef790-58ec-403f-ad70-326f6709e676" }, "Exception" : null }, { @@ -25,8 +25,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "43e0a7f4-301b-4514-afb2-7f73eec11835" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "7df90275-fd52-4507-be2a-e77d991aabd5" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "edcef28f-f01e-0089-6356-858952000000", - "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparser0ca19990074741782Fri, 18 Oct 2019 01:48:40 GMT\"0x8D7536D4CC4F62D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", - "x-ms-client-request-id" : "43e0a7f4-301b-4514-afb2-7f73eec11835", + "x-ms-request-id" : "dde8b1a7-401e-0057-507c-89d9fb000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparsere9e76003b8e7df988Wed, 23 Oct 2019 08:33:34 GMT\"0x8D75793B165EBE3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:33:34 GMT", + "x-ms-client-request-id" : "7df90275-fd52-4507-be2a-e77d991aabd5", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser0ca19990074741782?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparsere9e76003b8e7df988?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "251fa9cb-8f30-4103-8a4e-500a0c139788" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "2228adb3-2aac-4628-8789-7845d60a72e1" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "e803f47d-601e-0129-2356-850061000000", - "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", - "x-ms-client-request-id" : "251fa9cb-8f30-4103-8a4e-500a0c139788" + "x-ms-request-id" : "dde8b1be-401e-0057-637c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:34 GMT", + "x-ms-client-request-id" : "2228adb3-2aac-4628-8789-7845d60a72e1" }, "Exception" : null } ], - "variables" : [ "jtcipurlparser0helpertestipurlparser0ca19990074741782" ] + "variables" : [ "jtcipurlparser0helpertestipurlparsere9e76003b8e7df988" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[3].json index 820afbc32436..e3a40a74adbe 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[3].json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser2564658662180fcf8?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser7ce463622a47679ed?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "2d21ccc2-d255-461f-b70d-8ce1c0fb9a24" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "4b2b4c39-e1c2-4847-95b4-7eced1e7c1a2" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7536D4D070889", - "Last-Modified" : "Fri, 18 Oct 2019 01:48:40 GMT", + "ETag" : "0x8D75793B19AEB70", + "Last-Modified" : "Wed, 23 Oct 2019 08:33:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "edcef2a6-f01e-0089-7556-858952000000", - "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", - "x-ms-client-request-id" : "2d21ccc2-d255-461f-b70d-8ce1c0fb9a24" + "x-ms-request-id" : "dde8b1ec-401e-0057-0a7c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:34 GMT", + "x-ms-client-request-id" : "4b2b4c39-e1c2-4847-95b4-7eced1e7c1a2" }, "Exception" : null }, { @@ -25,8 +25,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6074de00-97bf-4617-b985-90602e2c2f92" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "93403ef6-d43e-4748-9554-e4deea8812c7" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "e803f48f-601e-0129-3056-850061000000", - "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparser2564658662180fcf8Fri, 18 Oct 2019 01:48:40 GMT\"0x8D7536D4D070889\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", - "x-ms-client-request-id" : "6074de00-97bf-4617-b985-90602e2c2f92", + "x-ms-request-id" : "dde8b206-401e-0057-207c-89d9fb000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparser7ce463622a47679edWed, 23 Oct 2019 08:33:34 GMT\"0x8D75793B19AEB70\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:33:34 GMT", + "x-ms-client-request-id" : "93403ef6-d43e-4748-9554-e4deea8812c7", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser2564658662180fcf8?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser7ce463622a47679ed?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "bec9b4ba-3fc7-4c86-b392-6ec64a660af1" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "bb28a809-e590-4ae3-9993-3f035141a9d3" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "edcef2cd-f01e-0089-1356-858952000000", - "Date" : "Fri, 18 Oct 2019 01:48:39 GMT", - "x-ms-client-request-id" : "bec9b4ba-3fc7-4c86-b392-6ec64a660af1" + "x-ms-request-id" : "dde8b21e-401e-0057-327c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:34 GMT", + "x-ms-client-request-id" : "bb28a809-e590-4ae3-9993-3f035141a9d3" }, "Exception" : null } ], - "variables" : [ "jtcipurlparser0helpertestipurlparser2564658662180fcf8" ] + "variables" : [ "jtcipurlparser0helpertestipurlparser7ce463622a47679ed" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[4].json index 67c746092450..fb3e51e7d2a3 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[4].json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser74641933e75cfe7b5?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser644098858e6cf048a?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "1adae2d9-a26a-40f3-bdde-abe5e5ef4747" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "61ee7814-e31b-4beb-8e56-d8427f8aa117" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7536D4D1D670D", - "Last-Modified" : "Fri, 18 Oct 2019 01:48:40 GMT", + "ETag" : "0x8D75793B1CDA072", + "Last-Modified" : "Wed, 23 Oct 2019 08:33:35 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "e803f4b2-601e-0129-4556-850061000000", - "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", - "x-ms-client-request-id" : "1adae2d9-a26a-40f3-bdde-abe5e5ef4747" + "x-ms-request-id" : "dde8b258-401e-0057-647c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:34 GMT", + "x-ms-client-request-id" : "61ee7814-e31b-4beb-8e56-d8427f8aa117" }, "Exception" : null }, { @@ -25,8 +25,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a2652f5b-7d03-452e-8d36-5efaef30b20a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "1e19108f-13b2-49e8-8bac-4904e015f247" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "edcef2ec-f01e-0089-2f56-858952000000", - "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparser74641933e75cfe7b5Fri, 18 Oct 2019 01:48:40 GMT\"0x8D7536D4D1D670D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", - "x-ms-client-request-id" : "a2652f5b-7d03-452e-8d36-5efaef30b20a", + "x-ms-request-id" : "dde8b26b-401e-0057-747c-89d9fb000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparser644098858e6cf048aWed, 23 Oct 2019 08:33:35 GMT\"0x8D75793B1CDA072\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:33:35 GMT", + "x-ms-client-request-id" : "1e19108f-13b2-49e8-8bac-4904e015f247", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser74641933e75cfe7b5?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser644098858e6cf048a?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "a48584fa-b948-47e0-8755-e4b73c4748b4" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "992e13aa-0b46-4988-9d3e-39756e799604" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "e803f4c6-601e-0129-5556-850061000000", - "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", - "x-ms-client-request-id" : "a48584fa-b948-47e0-8755-e4b73c4748b4" + "x-ms-request-id" : "dde8b283-401e-0057-087c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:35 GMT", + "x-ms-client-request-id" : "992e13aa-0b46-4988-9d3e-39756e799604" }, "Exception" : null } ], - "variables" : [ "jtcipurlparser0helpertestipurlparser74641933e75cfe7b5" ] + "variables" : [ "jtcipurlparser0helpertestipurlparser644098858e6cf048a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[5].json index 8734697e9be4..15b7daab8547 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[5].json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparsere7c691883442c6c8e?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser3e9326264c2e1cdae?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "bf574c1c-8c28-49be-909d-bbfa8bb27c46" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "11b5a6cb-c227-4b38-9d48-f2ea6f8ee552" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7536D4D380FB1", - "Last-Modified" : "Fri, 18 Oct 2019 01:48:40 GMT", + "ETag" : "0x8D75793B1F72B85", + "Last-Modified" : "Wed, 23 Oct 2019 08:33:35 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "edcef2f8-f01e-0089-3856-858952000000", - "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", - "x-ms-client-request-id" : "bf574c1c-8c28-49be-909d-bbfa8bb27c46" + "x-ms-request-id" : "dde8b29d-401e-0057-1d7c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:35 GMT", + "x-ms-client-request-id" : "11b5a6cb-c227-4b38-9d48-f2ea6f8ee552" }, "Exception" : null }, { @@ -25,8 +25,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "91fe2630-a544-4560-8338-e295ea5b440b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "3298df08-0f31-424d-bdf4-15478a4484d4" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "e803f4db-601e-0129-6456-850061000000", - "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparsere7c691883442c6c8eFri, 18 Oct 2019 01:48:40 GMT\"0x8D7536D4D380FB1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", - "x-ms-client-request-id" : "91fe2630-a544-4560-8338-e295ea5b440b", + "x-ms-request-id" : "dde8b2bf-401e-0057-3a7c-89d9fb000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparser3e9326264c2e1cdaeWed, 23 Oct 2019 08:33:35 GMT\"0x8D75793B1F72B85\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:33:35 GMT", + "x-ms-client-request-id" : "3298df08-0f31-424d-bdf4-15478a4484d4", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparsere7c691883442c6c8e?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser3e9326264c2e1cdae?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "8a1440b3-7e19-4c03-b2db-edcb0303eb9b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "181417cd-38a1-4f37-bfc0-a9eb8aae5d94" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "edcef311-f01e-0089-4c56-858952000000", - "Date" : "Fri, 18 Oct 2019 01:48:40 GMT", - "x-ms-client-request-id" : "8a1440b3-7e19-4c03-b2db-edcb0303eb9b" + "x-ms-request-id" : "dde8b2d7-401e-0057-4d7c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:35 GMT", + "x-ms-client-request-id" : "181417cd-38a1-4f37-bfc0-a9eb8aae5d94" }, "Exception" : null } ], - "variables" : [ "jtcipurlparser0helpertestipurlparsere7c691883442c6c8e" ] + "variables" : [ "jtcipurlparser0helpertestipurlparser3e9326264c2e1cdae" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[6].json new file mode 100644 index 000000000000..811724731d13 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[6].json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser4942004182e03cb24?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "3f89f221-be64-4a1a-a2d8-28c4771c9016" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75793B231D1BE", + "Last-Modified" : "Wed, 23 Oct 2019 08:33:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "dde8b309-401e-0057-777c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:35 GMT", + "x-ms-client-request-id" : "3f89f221-be64-4a1a-a2d8-28c4771c9016" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "af8fda8b-bc4d-436d-a8f2-f148e9762504" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "dde8b31c-401e-0057-067c-89d9fb000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparser4942004182e03cb24Wed, 23 Oct 2019 08:33:35 GMT\"0x8D75793B231D1BE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:33:35 GMT", + "x-ms-client-request-id" : "af8fda8b-bc4d-436d-a8f2-f148e9762504", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser4942004182e03cb24?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "a7fc79c3-5b86-41c9-98cd-ab9c6057d642" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "dde8b33d-401e-0057-217c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:35 GMT", + "x-ms-client-request-id" : "a7fc79c3-5b86-41c9-98cd-ab9c6057d642" + }, + "Exception" : null + } ], + "variables" : [ "jtcipurlparser0helpertestipurlparser4942004182e03cb24" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[7].json new file mode 100644 index 000000000000..0508c1b6c558 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[7].json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparserc2623851bc247a6af?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "ec86590b-83db-4b85-aa21-5fc4bdc3f51a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75793B260B553", + "Last-Modified" : "Wed, 23 Oct 2019 08:33:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "dde8b379-401e-0057-5a7c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:35 GMT", + "x-ms-client-request-id" : "ec86590b-83db-4b85-aa21-5fc4bdc3f51a" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "8629a6fe-710c-4d07-a69f-527d54bc1870" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "dde8b3a7-401e-0057-807c-89d9fb000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparserc2623851bc247a6afWed, 23 Oct 2019 08:33:36 GMT\"0x8D75793B260B553\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:33:35 GMT", + "x-ms-client-request-id" : "8629a6fe-710c-4d07-a69f-527d54bc1870", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparserc2623851bc247a6af?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "465e87d7-3e1e-4513-867a-ee55015b5ba5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "dde8b3c6-401e-0057-1d7c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:36 GMT", + "x-ms-client-request-id" : "465e87d7-3e1e-4513-867a-ee55015b5ba5" + }, + "Exception" : null + } ], + "variables" : [ "jtcipurlparser0helpertestipurlparserc2623851bc247a6af" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[8].json new file mode 100644 index 000000000000..aa1ed8953297 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[8].json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser708652267aa04a72c?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "d1491fb3-1357-4def-9997-755b9cefab52" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75793B2931C31", + "Last-Modified" : "Wed, 23 Oct 2019 08:33:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "dde8b3e8-401e-0057-3c7c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:36 GMT", + "x-ms-client-request-id" : "d1491fb3-1357-4def-9997-755b9cefab52" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "a879b939-87f0-4fd3-adce-1b25d0a34fe4" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "dde8b3f6-401e-0057-477c-89d9fb000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparser708652267aa04a72cWed, 23 Oct 2019 08:33:36 GMT\"0x8D75793B2931C31\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:33:36 GMT", + "x-ms-client-request-id" : "a879b939-87f0-4fd3-adce-1b25d0a34fe4", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparser708652267aa04a72c?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "fa904bba-2b86-494e-b41c-7bd037116bd9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "dde8b403-401e-0057-547c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:36 GMT", + "x-ms-client-request-id" : "fa904bba-2b86-494e-b41c-7bd037116bd9" + }, + "Exception" : null + } ], + "variables" : [ "jtcipurlparser0helpertestipurlparser708652267aa04a72c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[9].json new file mode 100644 index 000000000000..39315e9b061f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestipurlparser[9].json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparserbd2448518c8d58565?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "a01d7560-0666-4e7c-8653-f3753231794e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75793B2C3D4EF", + "Last-Modified" : "Wed, 23 Oct 2019 08:33:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "dde8b42b-401e-0057-727c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:36 GMT", + "x-ms-client-request-id" : "a01d7560-0666-4e7c-8653-f3753231794e" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcipurlparser&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "89365d99-b3eb-4153-b679-10df440b15d9" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "dde8b447-401e-0057-0c7c-89d9fb000000", + "Body" : "jtcipurlparserjtcipurlparser0helpertestipurlparserbd2448518c8d58565Wed, 23 Oct 2019 08:33:36 GMT\"0x8D75793B2C3D4EF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:33:36 GMT", + "x-ms-client-request-id" : "89365d99-b3eb-4153-b679-10df440b15d9", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcipurlparser0helpertestipurlparserbd2448518c8d58565?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "c58e33a0-c86c-4c9a-860b-77a846de518a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "dde8b464-401e-0057-257c-89d9fb000000", + "Date" : "Wed, 23 Oct 2019 08:33:36 GMT", + "x-ms-client-request-id" : "c58e33a0-c86c-4c9a-860b-77a846de518a" + }, + "Exception" : null + } ], + "variables" : [ "jtcipurlparser0helpertestipurlparserbd2448518c8d58565" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTesturlparser.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTesturlparser.json index a9f1bbb62d88..a8ae83740914 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTesturlparser.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTesturlparser.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparser0helpertesturlparser02006273cc416310486?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparser0helpertesturlparserbf4178062e932afa893?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "15646251-0399-4305-88e4-b01373fe162f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "80a70e3a-9371-4fca-80f9-ea8490d34beb" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AEB52BA1A5", - "Last-Modified" : "Tue, 15 Oct 2019 20:31:50 GMT", + "ETag" : "0x8D75795F33B897C", + "Last-Modified" : "Wed, 23 Oct 2019 08:49:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5cb43fc-d01e-00da-6597-83955d000000", - "Date" : "Tue, 15 Oct 2019 20:31:50 GMT", - "x-ms-client-request-id" : "15646251-0399-4305-88e4-b01373fe162f" + "x-ms-request-id" : "fe9d662b-b01e-006b-247e-896d20000000", + "Date" : "Wed, 23 Oct 2019 08:49:43 GMT", + "x-ms-client-request-id" : "80a70e3a-9371-4fca-80f9-ea8490d34beb" }, "Exception" : null }, { @@ -25,8 +25,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcurlparser&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "178e2295-73f7-44cf-b357-d942a2f2ae8b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "1accf6d9-9874-430f-a4f6-fa8651c0ef5b" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "83684882-801e-004a-2497-830011000000", - "Body" : "jtcurlparserjtcurlparser0helpertesturlparser02006273cc416310486Tue, 15 Oct 2019 20:31:50 GMT\"0x8D751AEB52BA1A5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:31:50 GMT", - "x-ms-client-request-id" : "178e2295-73f7-44cf-b357-d942a2f2ae8b", + "x-ms-request-id" : "fe9d664e-b01e-006b-3f7e-896d20000000", + "Body" : "jtcurlparserjtcurlparser0helpertesturlparserbf4178062e932afa893Wed, 23 Oct 2019 08:49:43 GMT\"0x8D75795F33B897C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:49:43 GMT", + "x-ms-client-request-id" : "1accf6d9-9874-430f-a4f6-fa8651c0ef5b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparser0helpertesturlparser02006273cc416310486?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparser0helpertesturlparserbf4178062e932afa893?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "d9be20d7-bef7-4849-a706-8c714121e583" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "931bfce9-f532-489f-995a-0d530d0eb150" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "87149064-401e-011c-1097-83ae34000000", - "Date" : "Tue, 15 Oct 2019 20:31:49 GMT", - "x-ms-client-request-id" : "d9be20d7-bef7-4849-a706-8c714121e583" + "x-ms-request-id" : "fe9d665e-b01e-006b-4c7e-896d20000000", + "Date" : "Wed, 23 Oct 2019 08:49:43 GMT", + "x-ms-client-request-id" : "931bfce9-f532-489f-995a-0d530d0eb150" }, "Exception" : null } ], - "variables" : [ "jtcurlparser0helpertesturlparser02006273cc416310486" ] + "variables" : [ "jtcurlparser0helpertesturlparserbf4178062e932afa893" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetblobnameandbuildclient.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetblobnameandbuildclient.json new file mode 100644 index 000000000000..48e0cbee261c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetblobnameandbuildclient.json @@ -0,0 +1,87 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcgetblobnameandbuildclient0284911891af2314414f?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "9192fd1e-7565-4db7-a096-57f5cabc548f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757969A854FC8", + "Last-Modified" : "Wed, 23 Oct 2019 08:54:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a11dbdb4-801e-0063-647f-897653000000", + "Date" : "Wed, 23 Oct 2019 08:54:23 GMT", + "x-ms-client-request-id" : "9192fd1e-7565-4db7-a096-57f5cabc548f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcgetblobnameandbuildclient0284911891af2314414f/javablobgetblobnameandbuildclient108874019327de134e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "2620b8f2-ef09-435e-99bc-26bdb97082bd" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D757969A95BE3E", + "Last-Modified" : "Wed, 23 Oct 2019 08:54:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a11dbddc-801e-0063-7f7f-897653000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 23 Oct 2019 08:54:23 GMT", + "x-ms-client-request-id" : "2620b8f2-ef09-435e-99bc-26bdb97082bd" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcgetblobnameandbuildclient&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "f3ca6d95-cde6-44fe-8b39-bdcb87588160" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a11dbdef-801e-0063-0c7f-897653000000", + "Body" : "jtcgetblobnameandbuildclientjtcgetblobnameandbuildclient0284911891af2314414fWed, 23 Oct 2019 08:54:24 GMT\"0x8D757969A854FC8\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:54:23 GMT", + "x-ms-client-request-id" : "f3ca6d95-cde6-44fe-8b39-bdcb87588160", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcgetblobnameandbuildclient0284911891af2314414f?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "bafd2878-1410-4173-8748-16bf046e44be" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a11dbe12-801e-0063-227f-897653000000", + "Date" : "Wed, 23 Oct 2019 08:54:23 GMT", + "x-ms-client-request-id" : "bafd2878-1410-4173-8748-16bf046e44be" + }, + "Exception" : null + } ], + "variables" : [ "jtcgetblobnameandbuildclient0284911891af2314414f", "javablobgetblobnameandbuildclient108874019327de134e" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparser.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparser.json index 1935e196e21c..4f5d03422af3 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparser.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparser.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparser0sastesturlparser89827358ba646427f1bc4?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparser0sastesturlparser089052061c2b316d8cd34?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "6b868edc-44ff-41a3-ad4d-1e6a159b4840" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "ad241e8d-64a0-4e32-8c20-1e617484d677" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D751AE29BEC1BD", - "Last-Modified" : "Tue, 15 Oct 2019 20:27:56 GMT", + "ETag" : "0x8D75793302B4707", + "Last-Modified" : "Wed, 23 Oct 2019 08:29:57 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69fa6f15-c01e-012f-4597-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:27:56 GMT", - "x-ms-client-request-id" : "6b868edc-44ff-41a3-ad4d-1e6a159b4840" + "x-ms-request-id" : "71b318fe-d01e-0059-457c-8935f0000000", + "Date" : "Wed, 23 Oct 2019 08:29:57 GMT", + "x-ms-client-request-id" : "ad241e8d-64a0-4e32-8c20-1e617484d677" }, "Exception" : null }, { @@ -25,8 +25,8 @@ "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcurlparser&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "780c0518-df7c-48ff-9417-0c742436cccb" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "69580b81-f805-43b2-a74a-5377be21baab" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8074be64-501e-002e-7497-83b0b1000000", - "Body" : "jtcurlparserjtcurlparser0sastesturlparser89827358ba646427f1bc4Tue, 15 Oct 2019 20:27:56 GMT\"0x8D751AE29BEC1BD\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 15 Oct 2019 20:27:55 GMT", - "x-ms-client-request-id" : "780c0518-df7c-48ff-9417-0c742436cccb", + "x-ms-request-id" : "71b31918-d01e-0059-577c-8935f0000000", + "Body" : "jtcurlparserjtcurlparser0sastesturlparser089052061c2b316d8cd34Wed, 23 Oct 2019 08:29:57 GMT\"0x8D75793302B4707\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:29:57 GMT", + "x-ms-client-request-id" : "69580b81-f805-43b2-a74a-5377be21baab", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparser0sastesturlparser89827358ba646427f1bc4?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparser0sastesturlparser089052061c2b316d8cd34?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 11.0.4; Windows 10 10.0", - "x-ms-client-request-id" : "5bc7d752-c6ab-4f10-8efe-34c4b1870363" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "1a4b0b77-4eb7-49c5-8814-9c696f40bbfd" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69fa6f74-c01e-012f-1297-83f719000000", - "Date" : "Tue, 15 Oct 2019 20:27:56 GMT", - "x-ms-client-request-id" : "5bc7d752-c6ab-4f10-8efe-34c4b1870363" + "x-ms-request-id" : "71b31933-d01e-0059-6c7c-8935f0000000", + "Date" : "Wed, 23 Oct 2019 08:29:57 GMT", + "x-ms-client-request-id" : "1a4b0b77-4eb7-49c5-8814-9c696f40bbfd" }, "Exception" : null } ], - "variables" : [ "jtcurlparser0sastesturlparser89827358ba646427f1bc4" ] + "variables" : [ "jtcurlparser0sastesturlparser089052061c2b316d8cd34" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparserblobnamespecialcharacters.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparserblobnamespecialcharacters.json new file mode 100644 index 000000000000..a10b882e3eaf --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparserblobnamespecialcharacters.json @@ -0,0 +1,103 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparserblobnamespecialcharacters082998e6c9b8d395?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "cf66438b-dbbd-45a1-95c8-ebbb21585912" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D75790B1729006", + "Last-Modified" : "Wed, 23 Oct 2019 08:12:06 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1aad7bd8-501e-012a-1079-890366000000", + "Date" : "Wed, 23 Oct 2019 08:12:05 GMT", + "x-ms-client-request-id" : "cf66438b-dbbd-45a1-95c8-ebbb21585912" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcurlparserblobnamespecialcharacters&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "594b5d5a-9d7b-4f35-ac02-fcfbc7bf436c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1aad7c0d-501e-012a-3679-890366000000", + "Body" : "jtcurlparserblobnamespecialcharactersjtcurlparserblobnamespecialcharacters01600310439ad4eeWed, 23 Oct 2019 08:11:15 GMT\"0x8D75790935A87B1\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcurlparserblobnamespecialcharacters04653122222038f2Wed, 23 Oct 2019 08:11:38 GMT\"0x8D75790A13F7308\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcurlparserblobnamespecialcharacters082998e6c9b8d395Wed, 23 Oct 2019 08:12:06 GMT\"0x8D75790B1729006\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:12:06 GMT", + "x-ms-client-request-id" : "594b5d5a-9d7b-4f35-ac02-fcfbc7bf436c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparserblobnamespecialcharacters01600310439ad4ee?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "ab10836a-fae1-4744-815e-364526c19880" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "1aad7c3c-501e-012a-5479-890366000000", + "Date" : "Wed, 23 Oct 2019 08:12:06 GMT", + "x-ms-client-request-id" : "ab10836a-fae1-4744-815e-364526c19880" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparserblobnamespecialcharacters04653122222038f2?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "700aa09e-6115-4c46-bf62-848111bd4178" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "1aad7c57-501e-012a-6279-890366000000", + "Date" : "Wed, 23 Oct 2019 08:12:06 GMT", + "x-ms-client-request-id" : "700aa09e-6115-4c46-bf62-848111bd4178" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparserblobnamespecialcharacters082998e6c9b8d395?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "c1dd5837-d0b6-46a8-b458-a313656eab2b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "1aad7c69-501e-012a-7179-890366000000", + "Date" : "Wed, 23 Oct 2019 08:12:06 GMT", + "x-ms-client-request-id" : "c1dd5837-d0b6-46a8-b458-a313656eab2b" + }, + "Exception" : null + } ], + "variables" : [ "jtcurlparserblobnamespecialcharacters082998e6c9b8d395" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparserencodedblobname.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparserencodedblobname.json new file mode 100644 index 000000000000..9c9aa0d2204b --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparserencodedblobname.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparserencodedblobname07623313c8cdb76e9f411?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "24510e67-d118-4630-8196-fb6dcab7a2fd" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7578FB2BA51D9", + "Last-Modified" : "Wed, 23 Oct 2019 08:04:58 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "717ff5ac-601e-00a5-7478-890b6f000000", + "Date" : "Wed, 23 Oct 2019 08:04:58 GMT", + "x-ms-client-request-id" : "24510e67-d118-4630-8196-fb6dcab7a2fd" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcurlparserencodedblobname&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "6c4bba91-9144-4988-a21d-bec0141a8cd8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "717ff629-601e-00a5-5d78-890b6f000000", + "Body" : "jtcurlparserencodedblobnamejtcurlparserencodedblobname07623313c8cdb76e9f411Wed, 23 Oct 2019 08:04:58 GMT\"0x8D7578FB2BA51D9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 23 Oct 2019 08:04:58 GMT", + "x-ms-client-request-id" : "6c4bba91-9144-4988-a21d-bec0141a8cd8", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcurlparserencodedblobname07623313c8cdb76e9f411?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "fcf5a489-ddd4-4fcc-824a-7107c6fb33ff" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "717ff66e-601e-00a5-1978-890b6f000000", + "Date" : "Wed, 23 Oct 2019 08:04:58 GMT", + "x-ms-client-request-id" : "fcf5a489-ddd4-4fcc-824a-7107c6fb33ff" + }, + "Exception" : null + } ], + "variables" : [ "jtcurlparserencodedblobname07623313c8cdb76e9f411" ] +} \ No newline at end of file From 6073879e308293a9f87efdf05a9f5bbabfbf7c34 Mon Sep 17 00:00:00 2001 From: Rick Ley Date: Wed, 23 Oct 2019 17:45:38 -0700 Subject: [PATCH 56/64] Revert "Optimizations for default block size on HTBB" (#5997) This reverts commit b8206459115c469fae4a34a12d68213e31c260d9. --- .../azure/storage/blob/BlobAsyncClient.java | 71 ++++++++----------- .../blob/models/ParallelTransferOptions.java | 60 +++++----------- .../blob/specialized/BlobAsyncClientBase.java | 16 +++-- .../com/azure/storage/blob/APISpec.groovy | 12 ---- .../blob/specialized/BlockBlobAPITest.groovy | 55 ++------------ 5 files changed, 64 insertions(+), 150 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java index b74bbda64173..784ad7df5246 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java @@ -63,20 +63,13 @@ * #getPageBlobAsyncClient() getPageBlobAsyncClient} to construct a client that allows blob specific operations. * *

    - * Please refer to the - * Azure + * Please refer to the Azure * Docs for more information. */ public class BlobAsyncClient extends BlobAsyncClientBase { public static final int BLOB_DEFAULT_UPLOAD_BLOCK_SIZE = 4 * Constants.MB; - public static final int BLOB_DEFAULT_NUMBER_OF_BUFFERS = 8; - /** - * If a blob is known to be greater than 100MB, using a larger block size will trigger some server-side - * optimizations. If the block size is not set and the size of the blob is known to be greater than 100MB, this - * value will be used. - */ - public static final int BLOB_DEFAULT_HTBB_UPLOAD_BLOCK_SIZE = 8 * Constants.MB; static final int BLOB_MAX_UPLOAD_BLOCK_SIZE = 100 * Constants.MB; + private final ClientLogger logger = new ClientLogger(BlobAsyncClient.class); /** @@ -101,7 +94,6 @@ protected BlobAsyncClient(HttpPipeline pipeline, String url, BlobServiceVersion * Creates a new {@link BlobAsyncClient} linked to the {@code snapshot} of this blob resource. * * @param snapshot the identifier for a specific snapshot of this blob - * * @return a {@link BlobAsyncClient} used to interact with the specific snapshot. */ @Override @@ -182,7 +174,6 @@ private SpecializedBlobClientBuilder prepareBuilder() { * {@code Flux} be replayable. In other words, it does not have to support multiple subscribers and is not expected * to produce the same values across subscriptions. * @param parallelTransferOptions {@link ParallelTransferOptions} used to configure buffered uploading. - * * @return A reactive response containing the information of the uploaded block blob. */ public Mono upload(Flux data, ParallelTransferOptions parallelTransferOptions) { @@ -255,8 +246,8 @@ public Mono upload(Flux data, ParallelTransferOptions * see the Azure Docs for Put Block and * the Azure Docs for Put Block List. *

    - * The data passed need not support multiple subscriptions/be replayable as is required in other upload methods - * when retries are enabled, and the length of the data need not be known in advance. Therefore, this method should + * The data passed need not support multiple subscriptions/be replayable as is required in other upload methods when + * retries are enabled, and the length of the data need not be known in advance. Therefore, this method should * support uploading any arbitrary data source, including network streams. This behavior is possible because this * method will perform some internal buffering as configured by the blockSize and numBuffers parameters, so while * this method may offer additional convenience, it will not be as performant as other options, which should be @@ -264,8 +255,8 @@ public Mono upload(Flux data, ParallelTransferOptions *

    * Typically, the greater the number of buffers used, the greater the possible parallelism when transferring the * data. Larger buffers means we will have to stage fewer blocks and therefore require fewer IO operations. The - * trade-offs between these values are context-dependent, so some experimentation may be required to optimize - * inputs for a given scenario. + * trade-offs between these values are context-dependent, so some experimentation may be required to optimize inputs + * for a given scenario. * *

    Code Samples

    * @@ -294,16 +285,18 @@ public Mono> uploadWithResponse(Flux data, Objects.requireNonNull(data, "'data' must not be null"); BlobRequestConditions accessConditionsFinal = accessConditions == null ? new BlobRequestConditions() : accessConditions; - final ParallelTransferOptions finalParallelTransferOptions = new ParallelTransferOptions(); - finalParallelTransferOptions.populateAndApplyDefaults(parallelTransferOptions); + final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null + ? new ParallelTransferOptions() : parallelTransferOptions; + int blockSize = finalParallelTransferOptions.getBlockSize(); + int numBuffers = finalParallelTransferOptions.getNumBuffers(); + ProgressReceiver progressReceiver = finalParallelTransferOptions.getProgressReceiver(); // See ProgressReporter for an explanation on why this lock is necessary and why we use AtomicLong. AtomicLong totalProgress = new AtomicLong(0); Lock progressLock = new ReentrantLock(); // Validation done in the constructor. - UploadBufferPool pool = new UploadBufferPool(finalParallelTransferOptions.getNumBuffers(), - finalParallelTransferOptions.getBlockSize()); + UploadBufferPool pool = new UploadBufferPool(numBuffers, blockSize); /* Break the source Flux into chunks that are <= chunk size. This makes filling the pooled buffers much easier @@ -314,30 +307,29 @@ as we can guarantee we only need at most two buffers for any call to write (two Flux chunkedSource = data .filter(ByteBuffer::hasRemaining) .flatMapSequential(buffer -> { - if (buffer.remaining() <= finalParallelTransferOptions.getBlockSize()) { + if (buffer.remaining() <= blockSize) { return Flux.just(buffer); } - int numSplits = - (int) Math.ceil(buffer.remaining() / (double) finalParallelTransferOptions.getBlockSize()); + int numSplits = (int) Math.ceil(buffer.remaining() / (double) blockSize); return Flux.range(0, numSplits) .map(i -> { ByteBuffer duplicate = buffer.duplicate().asReadOnlyBuffer(); - duplicate.position(i * finalParallelTransferOptions.getBlockSize()); - duplicate.limit(Math.min(duplicate.limit(), - (i + 1) * finalParallelTransferOptions.getBlockSize())); + duplicate.position(i * blockSize); + duplicate.limit(Math.min(duplicate.limit(), (i + 1) * blockSize)); return duplicate; }); }); - /* - Write to the pool and upload the output. - */ + /* + Write to the pool and upload the output. + */ return chunkedSource.concatMap(pool::write) .concatWith(Flux.defer(pool::flush)) .flatMapSequential(buffer -> { // Report progress as necessary. Flux progressData = ProgressReporter.addParallelProgressReporting(Flux.just(buffer), - finalParallelTransferOptions.getProgressReceiver(), progressLock, totalProgress); + progressReceiver, progressLock, totalProgress); + final String blockId = Base64.getEncoder().encodeToString( UUID.randomUUID().toString().getBytes(UTF_8)); @@ -357,6 +349,7 @@ as we can guarantee we only need at most two buffers for any call to write (two } catch (RuntimeException ex) { return monoError(logger, ex); } + } /** @@ -368,7 +361,6 @@ as we can guarantee we only need at most two buffers for any call to write (two * {@codesnippet com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String} * * @param filePath Path to the upload file - * * @return An empty response */ public Mono uploadFromFile(String filePath) { @@ -425,7 +417,6 @@ public Mono uploadFromFile(String filePath, boolean overwrite) { * @param tier {@link AccessTier} for the destination blob. * @param accessConditions {@link BlobRequestConditions} * @return An empty response - * * @throws IllegalArgumentException If {@code blockSize} is less than 0 or greater than 100MB * @throws UncheckedIOException If an I/O error occurs */ @@ -434,8 +425,10 @@ public Mono uploadFromFile(String filePath, ParallelTransferOptions parall BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobRequestConditions accessConditions) { try { - ParallelTransferOptions finalParallelTransferOptions = new ParallelTransferOptions(); - finalParallelTransferOptions.populateAndApplyDefaults(parallelTransferOptions); + final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null + ? new ParallelTransferOptions() + : parallelTransferOptions; + ProgressReceiver progressReceiver = finalParallelTransferOptions.getProgressReceiver(); // See ProgressReporter for an explanation on why this lock is necessary and why we use AtomicLong. AtomicLong totalProgress = new AtomicLong(0); @@ -444,15 +437,14 @@ public Mono uploadFromFile(String filePath, ParallelTransferOptions parall return Mono.using(() -> uploadFileResourceSupplier(filePath), channel -> { final SortedMap blockIds = new TreeMap<>(); - return Flux.fromIterable(sliceFile(filePath, finalParallelTransferOptions.getBlockSize(), - parallelTransferOptions == null || parallelTransferOptions.getBlockSize() == null)) + return Flux.fromIterable(sliceFile(filePath, finalParallelTransferOptions.getBlockSize())) .doOnNext(chunk -> blockIds.put(chunk.getOffset(), getBlockID())) .flatMap(chunk -> { String blockId = blockIds.get(chunk.getOffset()); Flux progressData = ProgressReporter.addParallelProgressReporting( FluxUtil.readFile(channel, chunk.getOffset(), chunk.getCount()), - finalParallelTransferOptions.getProgressReceiver(), progressLock, totalProgress); + progressReceiver, progressLock, totalProgress); return getBlockBlobAsyncClient() .stageBlockWithResponse(blockId, progressData, chunk.getCount(), null); @@ -477,9 +469,7 @@ public Mono uploadFromFile(String filePath, ParallelTransferOptions parall * Resource Supplier for UploadFile * * @param filePath The path for the file - * * @return {@code AsynchronousFileChannel} - * * @throws UncheckedIOException an input output exception. */ protected AsynchronousFileChannel uploadFileResourceSupplier(String filePath) { @@ -502,12 +492,9 @@ private String getBlockID() { return Base64.getEncoder().encodeToString(UUID.randomUUID().toString().getBytes(StandardCharsets.UTF_8)); } - private List sliceFile(String path, int blockSize, boolean enableHtbbOptimizations) { + private List sliceFile(String path, int blockSize) { File file = new File(path); assert file.exists(); - if (file.length() > 100 * Constants.MB && enableHtbbOptimizations) { - blockSize = BLOB_DEFAULT_HTBB_UPLOAD_BLOCK_SIZE; - } List ranges = new ArrayList<>(); for (long pos = 0; pos < file.length(); pos += blockSize) { long count = blockSize; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java index c4eae55a8e45..9bce7e90712d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java @@ -5,36 +5,40 @@ import com.azure.core.annotation.Fluent; import com.azure.storage.blob.ProgressReceiver; -import com.azure.storage.blob.specialized.BlockBlobAsyncClient; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; -import static com.azure.storage.blob.BlobAsyncClient.BLOB_DEFAULT_NUMBER_OF_BUFFERS; -import static com.azure.storage.blob.BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE; - /** * This class contains configuration used to parallelize data transfer operations. */ @Fluent -public final class ParallelTransferOptions { +public class ParallelTransferOptions { + + private static final int BLOB_DEFAULT_UPLOAD_BLOCK_SIZE = 4 * Constants.MB; + private static final int BLOB_MAX_BLOCK_SIZE = 100 * Constants.MB; - private static final int BLOB_MAX_UPLOAD_BLOCK_SIZE = 100 * Constants.MB; + private static final int BLOB_DEFAULT_NUMBER_OF_PARALLEL_TRANSFERS = 8; - private Integer blockSize; - private Integer numBuffers; + private int blockSize; + private int numBuffers; private ProgressReceiver progressReceiver; /** * Creates a new {@link ParallelTransferOptions} with default parameters applied. + * blockSize = 4MB + * numBuffers = 8 */ public ParallelTransferOptions() { + this.blockSize = BLOB_DEFAULT_UPLOAD_BLOCK_SIZE; + this.numBuffers = BLOB_DEFAULT_NUMBER_OF_PARALLEL_TRANSFERS; + this.progressReceiver = null; } /** * Gets the block size (chunk size) to transfer at a time. * @return The block size. */ - public Integer getBlockSize() { + public int getBlockSize() { return this.blockSize; } @@ -42,7 +46,7 @@ public Integer getBlockSize() { * Gets the number of buffers being used for a transfer operation. * @return The number of buffers. */ - public Integer getNumBuffers() { + public int getNumBuffers() { return this.numBuffers; } @@ -64,10 +68,8 @@ public ProgressReceiver getProgressReceiver() { * @return The updated ParallelTransferOptions object. * @throws IllegalArgumentException when block size is less than 0 or greater than max blob block size (10MB). */ - public ParallelTransferOptions setBlockSize(Integer blockSize) { - if (blockSize != null) { - StorageImplUtils.assertInBounds("blockSize", blockSize, 0, BlockBlobAsyncClient.MAX_STAGE_BLOCK_BYTES); - } + public ParallelTransferOptions setBlockSize(int blockSize) { + StorageImplUtils.assertInBounds("blockSize", blockSize, 0, BLOB_MAX_BLOCK_SIZE); this.blockSize = blockSize; return this; } @@ -75,45 +77,21 @@ public ParallelTransferOptions setBlockSize(Integer blockSize) { /** * Sets the number of buffers being used for an upload/download operation. * @param numBuffers The number of buffers. - * For buffered upload only, the number of buffers is the maximum number of buffers this method should allocate. + * For upload, The number of buffers is the maximum number of buffers this method should allocate. * Must be at least two. Typically, the larger the number of buffers, the more parallel, and thus faster, the * upload portion of this operation will be. The amount of memory consumed by this method may be up to * blockSize * numBuffers. * @return The updated ParallelTransferOptions object. * @throws IllegalArgumentException when numBuffers is less than 2. */ - public ParallelTransferOptions setNumBuffers(Integer numBuffers) { - if (numBuffers != null) { - StorageImplUtils.assertInBounds("numBuffers", numBuffers, 2, Integer.MAX_VALUE); - } + public ParallelTransferOptions setNumBuffers(int numBuffers) { + StorageImplUtils.assertInBounds("numBuffers", numBuffers, 2, Integer.MAX_VALUE); this.numBuffers = numBuffers; return this; } - /** - * Sets the progress receiver for parallel reporting. - * @param progressReceiver The progress receiver. - * @return The updated ParallelTransferOptions object. - */ public ParallelTransferOptions setProgressReceiver(ProgressReceiver progressReceiver) { this.progressReceiver = progressReceiver; return this; } - - /** - * RESERVED FOR INTERNAL USE. - * - * @param other The customer provided transfer options. If it has non-null values, they will be used, otherwise - * defaults will be set. - */ - public void populateAndApplyDefaults(ParallelTransferOptions other) { - if (other == null) { - other = new ParallelTransferOptions(); - } - this.setBlockSize(other.getBlockSize() == null - ? Integer.valueOf(BLOB_DEFAULT_UPLOAD_BLOCK_SIZE) : other.getBlockSize()); - this.setNumBuffers(other.getNumBuffers() == null - ? Integer.valueOf(BLOB_DEFAULT_NUMBER_OF_BUFFERS) : other.getNumBuffers()); - this.setProgressReceiver(other.getProgressReceiver()); - } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index 3f1444313efd..865f612ff639 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -3,7 +3,6 @@ package com.azure.storage.blob.specialized; -import static com.azure.core.implementation.util.FluxUtil.withContext; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; import com.azure.core.http.RequestConditions; @@ -67,6 +66,7 @@ import static com.azure.core.implementation.util.FluxUtil.fluxError; import static com.azure.core.implementation.util.FluxUtil.monoError; +import static com.azure.core.implementation.util.FluxUtil.withContext; /** * This class provides a client that contains all operations that apply to any blob type. @@ -748,9 +748,11 @@ public Mono> downloadToFileWithResponse(String filePath // TODO (gapra) : Investigate if this is can be parallelized, and include the parallelTransfers parameter. Mono> downloadToFileWithResponse(String filePath, BlobRange range, ParallelTransferOptions parallelTransferOptions, ReliableDownloadOptions options, - BlobRequestConditions accessConditions, boolean rangeGetContentMD5, Context context) { - ParallelTransferOptions finalParallelTransferOptions = new ParallelTransferOptions(); - finalParallelTransferOptions.populateAndApplyDefaults(parallelTransferOptions); + BlobRequestConditions accessConditions, boolean rangeGetContentMd5, Context context) { + final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null + ? new ParallelTransferOptions() + : parallelTransferOptions; + ProgressReceiver progressReceiver = finalParallelTransferOptions.getProgressReceiver(); // See ProgressReporter for an explanation on why this lock is necessary and why we use AtomicLong. AtomicLong totalProgress = new AtomicLong(0); @@ -759,9 +761,9 @@ Mono> downloadToFileWithResponse(String filePath, BlobR return Mono.using(() -> downloadToFileResourceSupplier(filePath), channel -> getPropertiesWithResponse(accessConditions) .flatMap(response -> processInRange(channel, response, - range, finalParallelTransferOptions.getBlockSize(), options, accessConditions, rangeGetContentMD5, - context, totalProgress, progressLock, finalParallelTransferOptions.getProgressReceiver())), - this::downloadToFileCleanup); + range, finalParallelTransferOptions.getBlockSize(), options, accessConditions, rangeGetContentMd5, + context, totalProgress, progressLock, progressReceiver)), this::downloadToFileCleanup); + } private Mono> processInRange(AsynchronousFileChannel channel, diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index bc146490cc32..325cc91d08f6 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -475,18 +475,6 @@ class APISpec extends Specification { return ByteBuffer.wrap(getRandomByteArray(size)) } - /* - We only allow int because anything larger than 2GB (which would require a long) is left to stress/perf. - */ - File getRandomFile(int size) { - File file = File.createTempFile(UUID.randomUUID().toString(), ".txt") - file.deleteOnExit() - FileOutputStream fos = new FileOutputStream(file) - fos.write(getRandomData(size).array()) - fos.close() - return file - } - /** * This will retrieve the etag to be used in testing match conditions. The result will typically be assigned to * the ifMatch condition when testing success and the ifNoneMatch condition when testing failure. diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy index 613bb5cc23fc..81f754392c82 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy @@ -35,10 +35,7 @@ import spock.lang.Requires import spock.lang.Unroll import java.nio.ByteBuffer -import java.nio.channels.AsynchronousFileChannel import java.nio.charset.StandardCharsets -import java.nio.file.Paths -import java.nio.file.StandardOpenOption import java.security.MessageDigest class BlockBlobAPITest extends APISpec { @@ -596,56 +593,17 @@ class BlockBlobAPITest extends APISpec { */ @Requires({ liveMode() }) - @Unroll def "Upload from file"() { - setup: - def file = getRandomFile(fileSize) - def channel = AsynchronousFileChannel.open(file.toPath()) + given: + def file = new File(this.getClass().getResource("/testfiles/uploadFromFileTestData.txt").getPath()) + def outStream = new ByteArrayOutputStream() when: - // Block length will be ignored for single shot. - blobac.uploadFromFile(file.toPath().toString(), new ParallelTransferOptions().setBlockSize(blockSize), - null, null, null, null).block() + blobClient.uploadFromFile(file.getAbsolutePath()) then: - def outFile = file.getPath().toString() + "result" - def outChannel = AsynchronousFileChannel.open(Paths.get(outFile), StandardOpenOption.CREATE, StandardOpenOption.WRITE) - FluxUtil.writeFile(blobac.download(), outChannel).block() == null - - compareFiles(file, new File(outFile)) - blobac.getBlockBlobAsyncClient().listBlocks(BlockListType.COMMITTED).block().getCommittedBlocks().size() == - commitedBlockCount - - cleanup: - channel.close() - - where: - fileSize | blockSize || commitedBlockCount - 0 | null || 0 - 10 | null || 1 - 10 * 1024 | null || 1 - 50 * 1024 * 1024 | null || Math.ceil((50 * 1024 * 1024) / BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE) - BlockBlobAsyncClient.MAX_UPLOAD_BLOB_BYTES + 1 | null || Math.ceil((BlockBlobClient.MAX_UPLOAD_BLOB_BYTES + 1) / BlobAsyncClient.BLOB_DEFAULT_HTBB_UPLOAD_BLOCK_SIZE) // HTBB optimizations should trigger when file size is >100MB and defaults are used. - 101 * 1024 * 1024 | 4 * 1024 * 1024 || 26 // Making the block size explicit should cancel the optimization - } - - def compareFiles(File file1, File file2) { - FileInputStream fis1 = new FileInputStream(file1) - FileInputStream fis2 = new FileInputStream(file2) - - byte b1 = fis1.read() - byte b2 = fis2.read() - - while (b1 != -1 && b2 != -1) { - if (b1 != b2) { - return false - } - b1 = fis1.read() - b2 = fis2.read() - } - fis1.close() - fis2.close() - return b1 == b2 + bc.download(outStream) + outStream.toByteArray() == new Scanner(file).useDelimiter("\\z").next().getBytes(StandardCharsets.UTF_8) } @Requires({ liveMode() }) @@ -766,6 +724,7 @@ class BlockBlobAPITest extends APISpec { .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + expect: bc.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null, bac, null, null).getStatusCode() == 201 From bec6aee2a2da0f64f611543c7d2b17109207b818 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Wed, 23 Oct 2019 21:30:57 -0700 Subject: [PATCH 57/64] Add Deserialized Headers to Download Returns (#5990) * Update Blobs download to return deserialized headers * Update Files download to return deserialized headers * Fix build and linting issue * Split response and reliable download into two classes * Fix linting issue, regenerated File swagger to move model class out of implementation * Updated tests to use deserialized headers and reverted accidental class renaming --- .../resources/spotbugs/spotbugs-exclude.xml | 2 +- .../models/BlobDownloadAsyncResponse.java | 30 ++++ .../blob/models/BlobDownloadResponse.java | 21 +++ .../blob/models/ReliableDownloadOptions.java | 4 +- .../blob/specialized/BlobAsyncClientBase.java | 62 +++----- .../blob/specialized/BlobClientBase.java | 10 +- .../specialized/DownloadAsyncResponse.java | 143 ------------------ .../blob/specialized/ReliableDownload.java | 117 ++++++++++++++ .../com/azure/storage/blob/BlobAPITest.groovy | 54 +++---- .../blob/specialized/BlockBlobAPITest.groovy | 3 +- .../specialized/DownloadResponseMockFlux.java | 11 +- .../specialized/DownloadResponseTest.groovy | 29 ++-- .../azure/storage/file/FileAsyncClient.java | 12 +- .../com/azure/storage/file/FileClient.java | 8 +- .../models/FilesDownloadResponse.java | 4 +- .../models/FileDownloadAsyncResponse.java | 30 ++++ .../models/FileDownloadHeaders.java | 21 ++- .../file/models/FileDownloadResponse.java | 21 +++ .../azure/storage/file/FileAPITests.groovy | 24 +-- .../storage/file/FileAsyncAPITests.groovy | 25 ++- .../azure-storage-file/swagger/README.md | 4 +- 21 files changed, 347 insertions(+), 288 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadAsyncResponse.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadResponse.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/ReliableDownload.java create mode 100644 sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadAsyncResponse.java rename sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/{implementation => }/models/FileDownloadHeaders.java (98%) create mode 100644 sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadResponse.java diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml index 4f6c9b11de96..c34f9024fdd6 100755 --- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml +++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml @@ -638,7 +638,7 @@ - + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadAsyncResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadAsyncResponse.java new file mode 100644 index 000000000000..61728779297e --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadAsyncResponse.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import reactor.core.publisher.Flux; + +import java.nio.ByteBuffer; + +/** + * This class contains the response information returned from the server when downloading a blob. + */ +public final class BlobDownloadAsyncResponse extends ResponseBase> { + /** + * Constructs a {@link BlobDownloadAsyncResponse}. + * + * @param request Request sent to the service. + * @param statusCode Response status code returned by the service. + * @param headers Raw headers returned in the response. + * @param value Stream of download data being returned by the service. + * @param deserializedHeaders Headers deserialized into an object. + */ + public BlobDownloadAsyncResponse(HttpRequest request, int statusCode, HttpHeaders headers, Flux value, + BlobDownloadHeaders deserializedHeaders) { + super(request, statusCode, headers, value, deserializedHeaders); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadResponse.java new file mode 100644 index 000000000000..64247319e0f8 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadResponse.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.models; + +import com.azure.core.http.rest.ResponseBase; + +/** + * This class contains the response information return from the server when downloading a blob. + */ +public final class BlobDownloadResponse extends ResponseBase { + /** + * Constructs a {@link BlobDownloadResponse}. + * + * @param response Response returned from the service. + */ + public BlobDownloadResponse(BlobDownloadAsyncResponse response) { + super(response.getRequest(), response.getStatusCode(), response.getHeaders(), null, + response.getDeserializedHeaders()); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java index 3d2b58d4ee95..abe39ff83680 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java @@ -5,13 +5,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.blob.specialized.DownloadAsyncResponse; import java.util.Locale; /** - * {@code ReliableDownloadOptions} contains properties which help the {@code Flux} returned from {@link - * DownloadAsyncResponse#body(ReliableDownloadOptions)} determine when to retry. + * This class contains the configuration options used to reliably download from the blob service. */ @Fluent public final class ReliableDownloadOptions { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index 865f612ff639..9fc783d3e53c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -15,7 +15,6 @@ import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.PollResponse.OperationStatus; import com.azure.core.util.polling.Poller; -import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.HttpGetterInfo; import com.azure.storage.blob.ProgressReceiver; @@ -28,7 +27,9 @@ import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.ArchiveStatus; import com.azure.storage.blob.models.BlobCopyInfo; +import com.azure.storage.blob.models.BlobDownloadAsyncResponse; import com.azure.storage.blob.models.BlobHttpHeaders; +import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobStorageException; @@ -589,7 +590,7 @@ Mono> copyFromUrlWithResponse(String copySource, Map download() { try { return downloadWithResponse(null, null, null, false) - .flatMapMany(Response::getValue); + .flatMapMany(BlobDownloadAsyncResponse::getValue); } catch (RuntimeException ex) { return fluxError(logger, ex); } @@ -612,43 +613,25 @@ public Flux download() { * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. * @return A reactive response containing the blob data. */ - public Mono>> downloadWithResponse(BlobRange range, ReliableDownloadOptions options, + public Mono downloadWithResponse(BlobRange range, ReliableDownloadOptions options, BlobRequestConditions accessConditions, boolean rangeGetContentMD5) { try { - return withContext(context -> downloadWithResponse(range, options, accessConditions, rangeGetContentMD5, - context)); + return withContext(context -> + downloadWithResponse(range, options, accessConditions, rangeGetContentMD5, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono>> downloadWithResponse(BlobRange range, ReliableDownloadOptions options, + Mono downloadWithResponse(BlobRange range, ReliableDownloadOptions options, BlobRequestConditions accessConditions, boolean rangeGetContentMD5, Context context) { - return download(range, accessConditions, rangeGetContentMD5, context) - .map(response -> new SimpleResponse<>( - response.getRawResponse(), - response.body(options).switchIfEmpty(Flux.just(ByteBuffer.wrap(new byte[0]))))); + return downloadHelper(range, options, accessConditions, rangeGetContentMD5, context) + .map(response -> new BlobDownloadAsyncResponse(response.getRequest(), response.getStatusCode(), + response.getHeaders(), response.getValue(), response.getDeserializedHeaders())); } - /** - * Reads a range of bytes from a blob. The response also includes the blob's properties and metadata. For more - * information, see the Azure Docs. - *

    - * Note that the response body has reliable download functionality built in, meaning that a failed download stream - * will be automatically retried. This behavior may be configured with {@link ReliableDownloadOptions}. - * - * @param range {@link BlobRange} - * @param accessConditions {@link BlobRequestConditions} - * @param rangeGetContentMd5 Whether the content MD5 for the specified blob range should be returned. - * @return Emits the successful response. - */ - Mono download(BlobRange range, BlobRequestConditions accessConditions, - boolean rangeGetContentMd5) { - return withContext(context -> download(range, accessConditions, rangeGetContentMd5, context)); - } - - Mono download(BlobRange range, BlobRequestConditions accessConditions, - boolean rangeGetContentMd5, Context context) { + private Mono downloadHelper(BlobRange range, ReliableDownloadOptions options, + BlobRequestConditions accessConditions, boolean rangeGetContentMd5, Context context) { range = range == null ? new BlobRange(0) : range; Boolean getMD5 = rangeGetContentMd5 ? rangeGetContentMd5 : null; accessConditions = accessConditions == null ? new BlobRequestConditions() : accessConditions; @@ -657,25 +640,18 @@ Mono download(BlobRange range, BlobRequestConditions acce .setCount(range.getCount()) .setETag(accessConditions.getIfMatch()); - // TODO: range is BlobRange but expected as String - // TODO: figure out correct response - return this.azureBlobStorage.blobs().downloadWithRestResponseAsync(null, null, snapshot, null, - range.toHeaderValue(), accessConditions.getLeaseId(), getMD5, null, accessConditions.getIfModifiedSince(), + return azureBlobStorage.blobs().downloadWithRestResponseAsync(null, null, snapshot, null, range.toHeaderValue(), + accessConditions.getLeaseId(), getMD5, null, accessConditions.getIfModifiedSince(), accessConditions.getIfUnmodifiedSince(), accessConditions.getIfMatch(), accessConditions.getIfNoneMatch(), null, customerProvidedKey, context) - // Convert the autorest response to a DownloadAsyncResponse, which enable reliable download. .map(response -> { - // If there wasn't an etag originally specified, lock on the one returned. info.setETag(response.getDeserializedHeaders().getETag()); - return new DownloadAsyncResponse(response, info, - // In the event of a stream failure, make a new request to pick up where we left off. - newInfo -> - this.download(new BlobRange(newInfo.getOffset(), newInfo.getCount()), - new BlobRequestConditions().setIfMatch(info.getETag()), false, context)); + return new ReliableDownload(response, options, info, updatedInfo -> + downloadHelper(new BlobRange(updatedInfo.getOffset(), updatedInfo.getCount()), options, + new BlobRequestConditions().setIfMatch(info.getETag()), false, context)); }); } - /** * Downloads the entire blob into a file specified by the path. * @@ -773,11 +749,11 @@ private Mono> processInRange(AsynchronousFileChannel ch return Mono.justOrEmpty(range).switchIfEmpty(Mono.just(new BlobRange(0, blobPropertiesResponse.getValue().getBlobSize()))).flatMapMany(rg -> Flux.fromIterable(sliceBlobRange(rg, blockSize))) - .flatMap(chunk -> this.download(chunk, accessConditions, rangeGetContentMd5, context) + .flatMap(chunk -> this.downloadWithResponse(chunk, options, accessConditions, rangeGetContentMd5, context) .subscribeOn(Schedulers.elastic()) .flatMap(dar -> { Flux progressData = ProgressReporter.addParallelProgressReporting( - dar.body(options), progressReceiver, progressLock, totalProgress); + dar.getValue(), progressReceiver, progressLock, totalProgress); return FluxUtil.writeFile(progressData, channel, chunk.getOffset() - ((range == null) ? 0 : range.getOffset())); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index bca40cb49283..ff042a9012c8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -22,6 +22,7 @@ import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; +import com.azure.storage.blob.models.BlobDownloadResponse; import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.ReliableDownloadOptions; @@ -396,10 +397,11 @@ public void download(OutputStream stream) { * @throws UncheckedIOException If an I/O error occurs. * @throws NullPointerException if {@code stream} is null */ - public Response downloadWithResponse(OutputStream stream, BlobRange range, ReliableDownloadOptions options, - BlobRequestConditions accessConditions, boolean rangeGetContentMD5, Duration timeout, Context context) { + public BlobDownloadResponse downloadWithResponse(OutputStream stream, BlobRange range, + ReliableDownloadOptions options, BlobRequestConditions accessConditions, boolean rangeGetContentMD5, + Duration timeout, Context context) { StorageImplUtils.assertNotNull("stream", stream); - Mono> download = client + Mono download = client .downloadWithResponse(range, options, accessConditions, rangeGetContentMD5, context) .flatMap(response -> response.getValue().reduce(stream, (outputStream, buffer) -> { try { @@ -408,7 +410,7 @@ public Response downloadWithResponse(OutputStream stream, BlobRange range, } catch (IOException ex) { throw logger.logExceptionAsError(Exceptions.propagate(new UncheckedIOException(ex))); } - }).thenReturn(new SimpleResponse<>(response, null))); + }).thenReturn(new BlobDownloadResponse(response))); return blockWithOptionalTimeout(download, timeout); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java deleted file mode 100644 index c6bbe08a67a3..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob.specialized; - -import com.azure.core.http.rest.ResponseBase; -import com.azure.storage.blob.HttpGetterInfo; -import com.azure.storage.blob.models.BlobDownloadHeaders; -import com.azure.storage.blob.models.ReliableDownloadOptions; -import com.azure.storage.common.implementation.StorageImplUtils; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -import java.io.IOException; -import java.nio.ByteBuffer; -import java.util.Map; -import java.util.function.Function; - -/** - * {@code DownloadAsyncResponse} automatically retries failed reads from the body as appropriate. If the download is - * interrupted, the {@code DownloadAsyncResponse} will make a request to resume the download from where it left off, - * allowing the user to consume the data as one continuous stream, for any interruptions are hidden. The retry behavior - * is defined by the options passed to the {@link #body(ReliableDownloadOptions)}. The download will also lock on the - * blob's etag to ensure consistency. - *

    - * Note that the retries performed as a part of this reader are composed with those of any retries in an {@link - * com.azure.core.http.HttpPipeline} used in conjunction with this reader. That is, if this object issues a request to - * resume a download, an underlying pipeline may issue several retries as a part of that request. Furthermore, this - * reader only retries on network errors; timeouts and unexpected status codes are not retried. Therefore, the behavior - * of this reader is entirely independent of and in no way coupled to an {@link com.azure.core.http.HttpPipeline}'s - * retry mechanism. - */ -public final class DownloadAsyncResponse { - private final HttpGetterInfo info; - - private final ResponseBase> rawResponse; - - private final Function> getter; - - - // The constructor is package-private because customers should not be creating their own responses. - DownloadAsyncResponse(ResponseBase> response, - HttpGetterInfo info, Function> getter) { - StorageImplUtils.assertNotNull("getter", getter); - StorageImplUtils.assertNotNull("info", info); - StorageImplUtils.assertNotNull("info.eTag", info.getETag()); - this.rawResponse = response; - this.info = info; - this.getter = getter; - } - - /** - * Returns the response body which has been modified to enable reliably reading data if desired (if - * {@code options.maxRetryRequests > 0}. If retries are enabled, if a connection fails while reading, the stream - * will make additional requests to reestablish a connection and continue reading. - * - * @param options {@link ReliableDownloadOptions} - * @return A {@link Flux} which emits the data as {@link ByteBuffer ByteBuffers} - */ - public Flux body(ReliableDownloadOptions options) { - ReliableDownloadOptions optionsReal = options == null ? new ReliableDownloadOptions() : options; - if (optionsReal.maxRetryRequests() == 0) { - return this.rawResponse.getValue(); - } - - /* - We pass -1 for currentRetryCount because we want tryContinueFlux to receive a value of 0 for number of - retries as we have not actually retried yet, only made the initial try. Because applyReliableDownload() will - add 1 before calling into tryContinueFlux, we set the initial value to -1. - */ - return this.applyReliableDownload(this.rawResponse.getValue(), -1, optionsReal); - } - - private Flux tryContinueFlux(Throwable t, int retryCount, ReliableDownloadOptions options) { - // If all the errors are exhausted, return this error to the user. - if (retryCount > options.maxRetryRequests() || !(t instanceof IOException)) { - return Flux.error(t); - } else { - /* - We wrap this in a try catch because we don't know the behavior of the getter. Most errors would probably - come from an unsuccessful request, which would be propagated through the onError methods. However, it is - possible the method call that returns a Single is what throws (like how our apis throw some exceptions at - call time rather than at subscription time. - */ - try { - /*Get a new response and try reading from it. - Do not compound the number of retries by passing in another set of downloadOptions; just get - the raw body. - */ - return getter.apply(this.info).flatMapMany(response -> this - .applyReliableDownload(this.rawResponse.getValue(), retryCount, options)); - } catch (Exception e) { - // If the getter fails, return the getter failure to the user. - return Flux.error(e); - } - } - } - - private Flux applyReliableDownload(Flux data, int currentRetryCount, - ReliableDownloadOptions options) { - return data.doOnNext(buffer -> { - /* - Update how much data we have received in case we need to retry and propagate to the user the data we - have received. - */ - this.info.setOffset(this.info.getOffset() + buffer.remaining()); - if (this.info.getCount() != null) { - this.info.setCount(this.info.getCount() - buffer.remaining()); - } - }).onErrorResume(t2 -> { - // Increment the retry count and try again with the new exception. - return tryContinueFlux(t2, currentRetryCount + 1, options); - }); - } - - /** - * @return HTTP status of the download - */ - public int getStatusCode() { - return this.rawResponse.getStatusCode(); - } - - /** - * @return HTTP headers associated to the download - */ - public BlobDownloadHeaders getHeaders() { - return this.rawResponse.getDeserializedHeaders(); - } - - /** - * @return all HTTP headers from the response - */ - public Map getRawHeaders() { - return this.rawResponse.getHeaders().toMap(); - } - - /** - * @return the raw response - */ - public ResponseBase> getRawResponse() { - return this.rawResponse; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/ReliableDownload.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/ReliableDownload.java new file mode 100644 index 000000000000..5593019ef715 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/ReliableDownload.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.specialized; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.storage.blob.HttpGetterInfo; +import com.azure.storage.blob.implementation.models.BlobsDownloadResponse; +import com.azure.storage.blob.models.BlobDownloadHeaders; +import com.azure.storage.blob.models.ReliableDownloadOptions; +import com.azure.storage.common.implementation.StorageImplUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.function.Function; + +/** + * This class automatically retries failed reads from a blob download stream. + * + *

    + * Failed downloads are automatically retied based on the {@link ReliableDownloadOptions download options}, the retry + * will be resumed from the point where the download failed. This allows for the download to be consumed as one + * continuous stream. + *

    + */ +final class ReliableDownload { + private final BlobsDownloadResponse rawResponse; + private final ReliableDownloadOptions options; + private final HttpGetterInfo info; + private final Function> getter; + + ReliableDownload(BlobsDownloadResponse rawResponse, ReliableDownloadOptions options, HttpGetterInfo info, + Function> getter) { + StorageImplUtils.assertNotNull("getter", getter); + StorageImplUtils.assertNotNull("info", info); + StorageImplUtils.assertNotNull("info.eTag", info.getETag()); + + this.rawResponse = rawResponse; + this.options = (options == null) ? new ReliableDownloadOptions() : options; + this.info = info; + this.getter = getter; + } + + HttpRequest getRequest() { + return rawResponse.getRequest(); + } + + int getStatusCode() { + return rawResponse.getStatusCode(); + } + + HttpHeaders getHeaders() { + return rawResponse.getHeaders(); + } + + BlobDownloadHeaders getDeserializedHeaders() { + return rawResponse.getDeserializedHeaders(); + } + + Flux getValue() { + /* + We pass -1 for currentRetryCount because we want tryContinueFlux to receive a value of 0 for number of + retries as we have not actually retried yet, only made the initial try. Because applyReliableDownload() will + add 1 before calling into tryContinueFlux, we set the initial value to -1. + */ + Flux value = (options.maxRetryRequests() == 0) + ? rawResponse.getValue() + : applyReliableDownload(rawResponse.getValue(), -1, options); + + return value.switchIfEmpty(Flux.just(ByteBuffer.wrap(new byte[0]))); + } + + private Flux tryContinueFlux(Throwable t, int retryCount, ReliableDownloadOptions options) { + // If all the errors are exhausted, return this error to the user. + if (retryCount > options.maxRetryRequests() || !(t instanceof IOException)) { + return Flux.error(t); + } else { + /* + We wrap this in a try catch because we don't know the behavior of the getter. Most errors would probably + come from an unsuccessful request, which would be propagated through the onError methods. However, it is + possible the method call that returns a Single is what throws (like how our apis throw some exceptions at + call time rather than at subscription time. + */ + try { + /*Get a new response and try reading from it. + Do not compound the number of retries by passing in another set of downloadOptions; just get + the raw body. + */ + return getter.apply(info) + .flatMapMany(ignored -> applyReliableDownload(rawResponse.getValue(), retryCount, options)); + } catch (Exception e) { + // If the getter fails, return the getter failure to the user. + return Flux.error(e); + } + } + } + + private Flux applyReliableDownload(Flux data, int currentRetryCount, + ReliableDownloadOptions options) { + return data.doOnNext(buffer -> { + /* + Update how much data we have received in case we need to retry and propagate to the user the data we + have received. + */ + this.info.setOffset(this.info.getOffset() + buffer.remaining()); + if (this.info.getCount() != null) { + this.info.setCount(this.info.getCount() - buffer.remaining()); + } + }).onErrorResume(t2 -> { + // Increment the retry count and try again with the new exception. + return tryContinueFlux(t2, currentRetryCount + 1, options); + }); + } +} diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy index 6bcdeec9870a..334a88907dce 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy @@ -51,34 +51,34 @@ class BlobAPITest extends APISpec { def stream = new ByteArrayOutputStream() def response = bc.downloadWithResponse(stream, null, null, null, false, null, null) def body = ByteBuffer.wrap(stream.toByteArray()) - def headers = response.getHeaders() + def headers = response.getDeserializedHeaders() then: body == defaultData - headers.toMap().keySet().stream().noneMatch({ it.startsWith("x-ms-meta-") }) - headers.getValue("Content-Length") != null - headers.getValue("Content-Type") != null - headers.getValue("Content-Range") == null - headers.getValue("Content-MD5") != null - headers.getValue("Content-Encoding") == null - headers.getValue("Cache-Control") == null - headers.getValue("Content-Disposition") == null - headers.getValue("Content-Language") == null - headers.getValue("x-ms-blob-sequence-number") == null - headers.getValue("x-ms-blob-type") == BlobType.BLOCK_BLOB.toString() - headers.getValue("x-ms-copy-completion-time") == null - headers.getValue("x-ms-copy-status-description") == null - headers.getValue("x-ms-copy-id") == null - headers.getValue("x-ms-copy-progress") == null - headers.getValue("x-ms-copy-source") == null - headers.getValue("x-ms-copy-status") == null - headers.getValue("x-ms-lease-duration") == null - headers.getValue("x-ms-lease-state") == LeaseStateType.AVAILABLE.toString() - headers.getValue("x-ms-lease-status") == LeaseStatusType.UNLOCKED.toString() - headers.getValue("Accept-Ranges") == "bytes" - headers.getValue("x-ms-blob-committed-block-count") == null - headers.getValue("x-ms-server-encrypted") != null - headers.getValue("x-ms-blob-content-md5") == null + ImplUtils.isNullOrEmpty(headers.getMetadata()) + headers.getContentLength() != null + headers.getContentType() != null + headers.getContentRange() == null + headers.getContentMd5() != null + headers.getContentEncoding() == null + headers.getCacheControl() == null + headers.getContentDisposition() == null + headers.getContentLanguage() == null + headers.getBlobSequenceNumber() == null + headers.getBlobType() == BlobType.BLOCK_BLOB + headers.getCopyCompletionTime() == null + headers.getCopyStatusDescription() == null + headers.getCopyId() == null + headers.getCopyProgress() == null + headers.getCopySource() == null + headers.getCopyStatus() == null + headers.getLeaseDuration() == null + headers.getLeaseState() == LeaseStateType.AVAILABLE + headers.getLeaseStatus() == LeaseStatusType.UNLOCKED + headers.getAcceptRanges() == "bytes" + headers.getBlobCommittedBlockCount() == null + headers.isServerEncrypted() != null + headers.getBlobContentMD5() == null } def "Download empty file"() { @@ -214,10 +214,10 @@ class BlobAPITest extends APISpec { def "Download md5"() { when: def response = bc.downloadWithResponse(new ByteArrayOutputStream(), new BlobRange(0, 3), null, null, true, null, null) - def contentMD5 = response.getHeaders().getValue("content-md5").getBytes() + def contentMD5 = response.getDeserializedHeaders().getContentMd5() then: - contentMD5 == Base64.getEncoder().encode(MessageDigest.getInstance("MD5").digest(defaultText.substring(0, 3).getBytes())) + contentMD5 == MessageDigest.getInstance("MD5").digest(defaultText.substring(0, 3).getBytes()) } def "Download error"() { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy index 81f754392c82..0d553b1f865e 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy @@ -980,7 +980,8 @@ class BlockBlobAPITest extends APISpec { when: ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() .setBlockSize(10) - blobac.uploadWithResponse(defaultFlux, parallelTransferOptions, new BlobHttpHeaders().setCacheControl(cacheControl) + blobac.uploadWithResponse(defaultFlux, parallelTransferOptions, new BlobHttpHeaders() + .setCacheControl(cacheControl) .setContentDisposition(contentDisposition) .setContentEncoding(contentEncoding) .setContentLanguage(contentLanguage) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java index dcb02d66a759..818061fa48eb 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java @@ -10,6 +10,7 @@ import com.azure.storage.blob.implementation.models.BlobsDownloadResponse; import com.azure.storage.blob.models.BlobDownloadHeaders; import com.azure.storage.blob.models.BlobStorageException; +import com.azure.storage.blob.models.ReliableDownloadOptions; import reactor.core.CoreSubscriber; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -32,6 +33,7 @@ class DownloadResponseMockFlux extends Flux { private int tryNumber; private HttpGetterInfo info; private ByteBuffer scenarioData; + private ReliableDownloadOptions options; DownloadResponseMockFlux(int scenario, APISpec apiSpec) { this.scenario = scenario; @@ -62,6 +64,11 @@ int getTryNumber() { return this.tryNumber; } + DownloadResponseMockFlux setOptions(ReliableDownloadOptions options) { + this.options = options; + return this; + } + @Override public void subscribe(CoreSubscriber subscriber) { switch (this.scenario) { @@ -147,11 +154,11 @@ public void subscribe(CoreSubscriber subscriber) { } } - Mono getter(HttpGetterInfo info) { + Mono getter(HttpGetterInfo info) { this.tryNumber++; this.info = info; BlobsDownloadResponse rawResponse = new BlobsDownloadResponse(null, 200, new HttpHeaders(), this, new BlobDownloadHeaders()); - DownloadAsyncResponse response = new DownloadAsyncResponse(rawResponse, info, this::getter); + ReliableDownload response = new ReliableDownload(rawResponse, options, info, this::getter); switch (this.scenario) { case DR_TEST_SCENARIO_ERROR_GETTER_MIDDLE: diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseTest.groovy index c5d5697e4046..1545cdc3107b 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseTest.groovy @@ -6,8 +6,8 @@ package com.azure.storage.blob.specialized import com.azure.core.implementation.util.FluxUtil import com.azure.storage.blob.APISpec import com.azure.storage.blob.HttpGetterInfo -import com.azure.storage.blob.models.ReliableDownloadOptions import com.azure.storage.blob.models.BlobStorageException +import com.azure.storage.blob.models.ReliableDownloadOptions import spock.lang.Unroll class DownloadResponseTest extends APISpec { @@ -43,10 +43,10 @@ class DownloadResponseTest extends APISpec { ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5) when: - DownloadAsyncResponse response = flux.getter(info).block() + ReliableDownload response = flux.setOptions(options).getter(info).block() then: - FluxUtil.collectBytesInByteBufferStream(response.body(options)).block() == flux.getScenarioData().array() + FluxUtil.collectBytesInByteBufferStream(response.getValue()).block() == flux.getScenarioData().array() flux.getTryNumber() == tryNumber @@ -65,8 +65,8 @@ class DownloadResponseTest extends APISpec { HttpGetterInfo info = new HttpGetterInfo().setETag("etag") when: - DownloadAsyncResponse response = flux.getter(info).block() - response.body(options).blockFirst() + ReliableDownload response = flux.setOptions(options).getter(info).block() + response.getValue().blockFirst() then: def e = thrown(Throwable) // Blocking subscribe will sometimes wrap the IOException in a RuntimeException. @@ -81,9 +81,9 @@ class DownloadResponseTest extends APISpec { which is when retryCount=6 and therefore tryNumber=7 */ where: - scenario | exceptionType | tryNumber - DownloadResponseMockFlux.DR_TEST_SCENARIO_MAX_RETRIES_EXCEEDED | IOException | 7 - DownloadResponseMockFlux.DR_TEST_SCENARIO_NON_RETRYABLE_ERROR | Exception | 1 + scenario | exceptionType | tryNumber + DownloadResponseMockFlux.DR_TEST_SCENARIO_MAX_RETRIES_EXCEEDED | IOException | 7 + DownloadResponseMockFlux.DR_TEST_SCENARIO_NON_RETRYABLE_ERROR | Exception | 1 DownloadResponseMockFlux.DR_TEST_SCENARIO_ERROR_GETTER_MIDDLE | BlobStorageException | 2 } @@ -93,7 +93,7 @@ class DownloadResponseTest extends APISpec { DownloadResponseMockFlux flux = new DownloadResponseMockFlux(DownloadResponseMockFlux.DR_TEST_SCENARIO_SUCCESSFUL_ONE_CHUNK, this) when: - new DownloadAsyncResponse(flux.getter(info).block().getRawResponse(), info, { HttpGetterInfo newInfo -> flux.getter(newInfo) }) + new ReliableDownload(null, null, info, { HttpGetterInfo newInfo -> flux.getter(newInfo) }) then: thrown(NullPointerException) @@ -113,13 +113,8 @@ class DownloadResponseTest extends APISpec { } def "Getter IA"() { - setup: - DownloadResponseMockFlux flux = new DownloadResponseMockFlux(DownloadResponseMockFlux.DR_TEST_SCENARIO_SUCCESSFUL_ONE_CHUNK, this) - when: - DownloadAsyncResponse response = new DownloadAsyncResponse(flux.getter(new HttpGetterInfo()).block() - .getRawResponse(), new HttpGetterInfo().setETag("etag"), null) - response.body(null).blockFirst() + new ReliableDownload(null, null, new HttpGetterInfo().setETag("etag"), null) then: thrown(NullPointerException) @@ -136,8 +131,8 @@ class DownloadResponseTest extends APISpec { ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5) when: - DownloadAsyncResponse response = flux.getter(info).block() - response.body(options).blockFirst() + ReliableDownload response = flux.setOptions(options).getter(info).block() + response.getValue().blockFirst() then: flux.getTryNumber() == 3 diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java index 21bc3da3fa94..12c3de39c537 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java @@ -34,6 +34,7 @@ import com.azure.storage.file.implementation.models.FilesUploadRangeResponse; import com.azure.storage.file.models.CopyStatusType; import com.azure.storage.file.models.FileCopyInfo; +import com.azure.storage.file.models.FileDownloadAsyncResponse; import com.azure.storage.file.models.FileHttpHeaders; import com.azure.storage.file.models.FileInfo; import com.azure.storage.file.models.FileMetadataInfo; @@ -461,7 +462,7 @@ private Mono> downloadResponseInChunk(Response downloadWithResponse(chunk, false, context) - .map(Response::getValue) + .map(FileDownloadAsyncResponse::getValue) .subscribeOn(Schedulers.elastic()) .flatMap(fbb -> FluxUtil .writeFile(fbb, channel, chunk.getStart() - (range == null ? 0 : range.getStart())) @@ -504,7 +505,7 @@ private void channelCleanUp(AsynchronousFileChannel channel) { */ public Flux download() { try { - return downloadWithResponse(null, null).flatMapMany(Response::getValue); + return downloadWithResponse(null, null).flatMapMany(FileDownloadAsyncResponse::getValue); } catch (RuntimeException ex) { return fluxError(logger, ex); } @@ -527,7 +528,7 @@ public Flux download() { * true, as long as the range is less than or equal to 4 MB in size. * @return A reactive response containing response data and the file data. */ - public Mono>> downloadWithResponse(FileRange range, Boolean rangeGetContentMD5) { + public Mono downloadWithResponse(FileRange range, Boolean rangeGetContentMD5) { try { return withContext(context -> downloadWithResponse(range, rangeGetContentMD5, context)); } catch (RuntimeException ex) { @@ -535,13 +536,14 @@ public Mono>> downloadWithResponse(FileRange range, Bo } } - Mono>> downloadWithResponse(FileRange range, Boolean rangeGetContentMD5, + Mono downloadWithResponse(FileRange range, Boolean rangeGetContentMD5, Context context) { String rangeString = range == null ? null : range.toString(); return azureFileStorageClient.files() .downloadWithRestResponseAsync(shareName, filePath, null, rangeString, rangeGetContentMD5, context) - .map(response -> new SimpleResponse<>(response, response.getValue())); + .map(response -> new FileDownloadAsyncResponse(response.getRequest(), response.getStatusCode(), + response.getHeaders(), response.getValue(), response.getDeserializedHeaders())); } /** diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java index b1eef3cadb2e..87a507ec6f13 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; @@ -15,6 +14,7 @@ import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.file.models.FileCopyInfo; +import com.azure.storage.file.models.FileDownloadResponse; import com.azure.storage.file.models.FileHttpHeaders; import com.azure.storage.file.models.FileInfo; import com.azure.storage.file.models.FileMetadataInfo; @@ -343,11 +343,11 @@ public void download(OutputStream stream) { * @throws NullPointerException If {@code stream} is {@code null}. * @throws RuntimeException if the operation doesn't complete before the timeout concludes. */ - public Response downloadWithResponse(OutputStream stream, FileRange range, Boolean rangeGetContentMD5, + public FileDownloadResponse downloadWithResponse(OutputStream stream, FileRange range, Boolean rangeGetContentMD5, Duration timeout, Context context) { Objects.requireNonNull(stream, "'stream' cannot be null."); - Mono> download = fileAsyncClient.downloadWithResponse(range, rangeGetContentMD5, context) + Mono download = fileAsyncClient.downloadWithResponse(range, rangeGetContentMD5, context) .flatMap(response -> response.getValue().reduce(stream, (outputStream, buffer) -> { try { outputStream.write(FluxUtil.byteBufferToArray(buffer)); @@ -355,7 +355,7 @@ public Response downloadWithResponse(OutputStream stream, FileRange range, } catch (IOException ex) { throw logger.logExceptionAsError(Exceptions.propagate(new UncheckedIOException(ex))); } - }).thenReturn(new SimpleResponse<>(response, null))); + }).thenReturn(new FileDownloadResponse(response))); return StorageImplUtils.blockWithOptionalTimeout(download, timeout); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesDownloadResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesDownloadResponse.java index 4511f387a448..0d005f32de7e 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesDownloadResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesDownloadResponse.java @@ -7,9 +7,11 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.file.models.FileDownloadHeaders; +import reactor.core.publisher.Flux; + import java.io.Closeable; import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; /** * Contains all response data for the download operation. diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadAsyncResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadAsyncResponse.java new file mode 100644 index 000000000000..fc95a154f5b4 --- /dev/null +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadAsyncResponse.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.file.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import reactor.core.publisher.Flux; + +import java.nio.ByteBuffer; + +/** + * This class contains the response information returned from the server when downloading a file. + */ +public class FileDownloadAsyncResponse extends ResponseBase> { + /** + * Constructs a {@link FileDownloadAsyncResponse}. + * + * @param request Request sent to the service. + * @param statusCode Response status code returned by the service. + * @param headers Raw headers returned in the response. + * @param value Stream of download data being returned by the service. + * @param deserializedHeaders Headers deserialized into an object. + */ + public FileDownloadAsyncResponse(HttpRequest request, int statusCode, HttpHeaders headers, Flux value, + FileDownloadHeaders deserializedHeaders) { + super(request, statusCode, headers, value, deserializedHeaders); + } +} diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileDownloadHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileDownloadHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadHeaders.java index f45679be1930..706469a9e81a 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileDownloadHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadHeaders.java @@ -2,13 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.implementation.models; +package com.azure.storage.file.models; import com.azure.core.annotation.Fluent; import com.azure.core.annotation.HeaderCollection; import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; -import com.azure.storage.file.models.CopyStatusType; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -70,7 +69,7 @@ public final class FileDownloadHeaders { * then no value is returned for the 'Content-MD5' header. */ @JsonProperty(value = "Content-MD5") - private byte[] contentMD5; + private byte[] contentMd5; /* * Returns the value that was specified for the Content-Encoding request @@ -378,7 +377,7 @@ public FileDownloadHeaders setETag(String eTag) { } /** - * Get the contentMD5 property: If the file has an MD5 hash and the request + * Get the contentMd5 property: If the file has an MD5 hash and the request * is to read the full file, this response header is returned so that the * client can check for message content integrity. If the request is to * read a specified range and the 'x-ms-range-get-content-md5' is set to @@ -387,14 +386,14 @@ public FileDownloadHeaders setETag(String eTag) { * conditions is true, then no value is returned for the 'Content-MD5' * header. * - * @return the contentMD5 value. + * @return the contentMd5 value. */ - public byte[] getContentMD5() { - return ImplUtils.clone(this.contentMD5); + public byte[] getContentMd5() { + return ImplUtils.clone(this.contentMd5); } /** - * Set the contentMD5 property: If the file has an MD5 hash and the request + * Set the contentMd5 property: If the file has an MD5 hash and the request * is to read the full file, this response header is returned so that the * client can check for message content integrity. If the request is to * read a specified range and the 'x-ms-range-get-content-md5' is set to @@ -403,11 +402,11 @@ public byte[] getContentMD5() { * conditions is true, then no value is returned for the 'Content-MD5' * header. * - * @param contentMD5 the contentMD5 value to set. + * @param contentMd5 the contentMd5 value to set. * @return the FileDownloadHeaders object itself. */ - public FileDownloadHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = ImplUtils.clone(contentMD5); + public FileDownloadHeaders setContentMd5(byte[] contentMd5) { + this.contentMd5 = ImplUtils.clone(contentMd5); return this; } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadResponse.java new file mode 100644 index 000000000000..24009dfbe4d7 --- /dev/null +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadResponse.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.file.models; + +import com.azure.core.http.rest.ResponseBase; + +/** + * This class contains the response information returned from the server when downloading a file. + */ +public class FileDownloadResponse extends ResponseBase { + /** + * Constructs a {@link FileDownloadResponse}. + * + * @param response Response returned from the service. + */ + public FileDownloadResponse(FileDownloadAsyncResponse response) { + super(response.getRequest(), response.getStatusCode(), response.getHeaders(), null, + response.getDeserializedHeaders()); + } +} diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy index bd2eb3cfbb2d..417fd6620864 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy @@ -166,21 +166,21 @@ class FileAPITests extends APISpec { def uploadResponse = primaryFileClient.uploadWithResponse(defaultData, dataLength, null, null, null) def stream = new ByteArrayOutputStream() def downloadResponse = primaryFileClient.downloadWithResponse(stream, null, null, null, null) - def headers = downloadResponse.getHeaders() + def headers = downloadResponse.getDeserializedHeaders() then: FileTestHelper.assertResponseStatusCode(uploadResponse, 201) FileTestHelper.assertResponseStatusCode(downloadResponse, 200) - Long.parseLong(headers.getValue("Content-Length")) == dataLength - headers.getValue("ETag") - headers.getValue("Last-Modified") - headers.getValue("x-ms-file-permission-key") - headers.getValue("x-ms-file-attributes") - headers.getValue("x-ms-file-last-write-time") - headers.getValue("x-ms-file-creation-time") - headers.getValue("x-ms-file-change-time") - headers.getValue("x-ms-file-parent-id") - headers.getValue("x-ms-file-id") + headers.getContentLength() == dataLength + headers.getETag() + headers.getLastModified() + headers.getFilePermissionKey() + headers.getFileAttributes() + headers.getFileLastWriteTime() + headers.getFileCreationTime() + headers.getFileChangeTime() + headers.getFileParentId() + headers.getFileId() data == stream.toByteArray() } @@ -197,7 +197,7 @@ class FileAPITests extends APISpec { then: FileTestHelper.assertResponseStatusCode(uploadResponse, 201) FileTestHelper.assertResponseStatusCode(downloadResponse, 206) - Long.parseLong(downloadResponse.getHeaders().getValue("Content-Length")) == dataLength + downloadResponse.getDeserializedHeaders().getContentLength() == dataLength data == stream.toByteArray() } diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy index dd84609df0f7..404ad0d001ce 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy @@ -8,7 +8,6 @@ import com.azure.core.exception.UnexpectedLengthException import com.azure.core.implementation.util.FluxUtil import com.azure.core.util.polling.Poller import com.azure.storage.common.StorageSharedKeyCredential -import com.azure.storage.common.implementation.Constants import com.azure.storage.file.models.FileCopyInfo import com.azure.storage.file.models.FileErrorCode import com.azure.storage.file.models.FileHttpHeaders @@ -152,17 +151,17 @@ class FileAsyncAPITests extends APISpec { downloadVerifier.assertNext({ response -> assert FileTestHelper.assertResponseStatusCode(response, 200) - def headers = response.getHeaders() - assert Long.parseLong(headers.getValue("Content-Length")) == dataLength - assert headers.getValue("ETag") - assert headers.getValue("Last-Modified") - assert headers.getValue("x-ms-file-permission-key") - assert headers.getValue("x-ms-file-attributes") - assert headers.getValue("x-ms-file-last-write-time") - assert headers.getValue("x-ms-file-creation-time") - assert headers.getValue("x-ms-file-change-time") - assert headers.getValue("x-ms-file-parent-id") - assert headers.getValue("x-ms-file-id") + def headers = response.getDeserializedHeaders() + assert headers.getContentLength() == dataLength + assert headers.getETag() + assert headers.getLastModified() + assert headers.getFilePermissionKey() + assert headers.getFileAttributes() + assert headers.getFileLastWriteTime() + assert headers.getFileCreationTime() + assert headers.getFileChangeTime() + assert headers.getFileParentId() + assert headers.getFileId() FluxUtil.collectBytesInByteBufferStream(response.getValue()) .flatMap({ data -> assert defaultData.array() == data }) @@ -188,7 +187,7 @@ class FileAsyncAPITests extends APISpec { downloadVerifier.assertNext { assert FileTestHelper.assertResponseStatusCode(it, 206) - assert Long.parseLong(it.getHeaders().getValue("Content-Length")) == dataLength + assert it.getDeserializedHeaders().getContentLength() == dataLength FluxUtil.collectBytesInByteBufferStream(it.getValue()) .flatMap({ data -> assert data == defaultData.array()}) }.verifyComplete() diff --git a/sdk/storage/azure-storage-file/swagger/README.md b/sdk/storage/azure-storage-file/swagger/README.md index d4dc7c54bbb3..2d40d83ad278 100644 --- a/sdk/storage/azure-storage-file/swagger/README.md +++ b/sdk/storage/azure-storage-file/swagger/README.md @@ -35,7 +35,7 @@ license-header: MICROSOFT_MIT_SMALL add-context-parameter: true models-subpackage: implementation.models custom-types-subpackage: models -custom-types: HandleItem,FileHttpHeaders,ShareItem,FileServiceProperties,FileCorsRule,ShareProperties,Range,CopyStatusType,FileSignedIdentifier,SourceModifiedAccessConditions,FileErrorCode,StorageServiceProperties,FileMetrics,FileAccessPolicy +custom-types: HandleItem,FileHttpHeaders,ShareItem,FileServiceProperties,FileCorsRule,ShareProperties,Range,CopyStatusType,FileSignedIdentifier,SourceModifiedAccessConditions,FileErrorCode,StorageServiceProperties,FileMetrics,FileAccessPolicy,FileDownloadHeaders ``` ### Query Parameters @@ -294,6 +294,8 @@ directive: op.put.parameters.splice(1, 0, { "$ref": path + "FilePath" }); op.get.parameters.splice(0, 0, { "$ref": path + "ShareName" }); op.get.parameters.splice(1, 0, { "$ref": path + "FilePath" }); + op.get.responses["200"].headers["Content-MD5"]["x-ms-client-name"] = "contentMd5"; + op.get.responses["206"].headers["Content-MD5"]["x-ms-client-name"] = "contentMd5"; op.head.parameters.splice(0, 0, { "$ref": path + "ShareName" }); op.head.parameters.splice(1, 0, { "$ref": path + "FilePath" }); delete op.head.responses.default.schema; From 838c9f31796930ca2ebb2482ba3fd49115e67bbe Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Wed, 23 Oct 2019 22:47:55 -0700 Subject: [PATCH 58/64] EventGrid: generate package-2020-01-priview (#6021) --- .../v2020_01_01_preview/pom.xml | 135 + .../v2020_01_01_preview/AdvancedFilter.java | 66 + ...eFunctionEventSubscriptionDestination.java | 102 + .../BoolEqualsAdvancedFilter.java | 47 + .../DeadLetterDestination.java | 28 + .../eventgrid/v2020_01_01_preview/Domain.java | 141 + .../DomainProvisioningState.java | 53 + .../DomainRegenerateKeyRequest.java | 43 + .../DomainSharedAccessKeys.java | 30 + .../v2020_01_01_preview/DomainTopic.java | 93 + .../DomainTopicProvisioningState.java | 53 + .../v2020_01_01_preview/DomainTopics.java | 56 + .../DomainUpdateParameters.java | 44 + .../v2020_01_01_preview/Domains.java | 48 + .../EventDeliverySchema.java | 44 + .../EventHubEventSubscriptionDestination.java | 50 + .../EventSubscription.java | 302 ++ .../EventSubscriptionDestination.java | 30 + .../EventSubscriptionFilter.java | 166 + .../EventSubscriptionFullUrl.java | 25 + .../EventSubscriptionProvisioningState.java | 56 + .../EventSubscriptionUpdateParameters.java | 204 + .../EventSubscriptions.java | 146 + .../v2020_01_01_preview/EventType.java | 55 + ...onnectionEventSubscriptionDestination.java | 51 + .../v2020_01_01_preview/InputSchema.java | 44 + .../InputSchemaMapping.java | 27 + .../v2020_01_01_preview/JsonField.java | 47 + .../JsonFieldWithDefault.java | 79 + .../JsonInputSchemaMapping.java | 185 + .../NumberGreaterThanAdvancedFilter.java | 47 + ...mberGreaterThanOrEqualsAdvancedFilter.java | 47 + .../NumberInAdvancedFilter.java | 48 + .../NumberLessThanAdvancedFilter.java | 47 + .../NumberLessThanOrEqualsAdvancedFilter.java | 47 + .../NumberNotInAdvancedFilter.java | 48 + .../v2020_01_01_preview/Operation.java | 40 + .../v2020_01_01_preview/OperationInfo.java | 121 + .../v2020_01_01_preview/Operations.java | 28 + .../ResourceRegionType.java | 41 + .../v2020_01_01_preview/RetryPolicy.java | 69 + ...eBusQueueEventSubscriptionDestination.java | 50 + ...eBusTopicEventSubscriptionDestination.java | 51 + .../StorageBlobDeadLetterDestination.java | 77 + ...rageQueueEventSubscriptionDestination.java | 77 + .../StringBeginsWithAdvancedFilter.java | 48 + .../StringContainsAdvancedFilter.java | 48 + .../StringEndsWithAdvancedFilter.java | 48 + .../StringInAdvancedFilter.java | 48 + .../StringNotInAdvancedFilter.java | 48 + .../eventgrid/v2020_01_01_preview/Topic.java | 141 + .../TopicProvisioningState.java | 53 + .../TopicRegenerateKeyRequest.java | 43 + .../TopicSharedAccessKeys.java | 30 + .../v2020_01_01_preview/TopicTypeInfo.java | 66 + .../TopicTypeProvisioningState.java | 53 + .../v2020_01_01_preview/TopicTypes.java | 48 + .../TopicUpdateParameters.java | 44 + .../eventgrid/v2020_01_01_preview/Topics.java | 61 + .../WebHookEventSubscriptionDestination.java | 145 + .../implementation/DomainImpl.java | 86 + .../implementation/DomainInner.java | 124 + .../DomainSharedAccessKeysImpl.java | 36 + .../DomainSharedAccessKeysInner.java | 69 + .../implementation/DomainTopicImpl.java | 100 + .../implementation/DomainTopicInner.java | 48 + .../implementation/DomainTopicsImpl.java | 85 + .../implementation/DomainTopicsInner.java | 919 ++++ .../implementation/DomainsImpl.java | 163 + .../implementation/DomainsInner.java | 1790 +++++++ .../EventGridManagementClientImpl.java | 266 + .../implementation/EventGridManager.java | 159 + .../EventSubscriptionFullUrlImpl.java | 31 + .../EventSubscriptionFullUrlInner.java | 44 + .../implementation/EventSubscriptionImpl.java | 237 + .../EventSubscriptionInner.java | 245 + .../EventSubscriptionsImpl.java | 277 + .../EventSubscriptionsInner.java | 4614 +++++++++++++++++ .../implementation/EventTypeImpl.java | 65 + .../implementation/EventTypeInner.java | 124 + .../implementation/IdParsingUtils.java | 57 + .../implementation/OperationImpl.java | 47 + .../implementation/OperationInner.java | 122 + .../implementation/OperationsImpl.java | 49 + .../implementation/OperationsInner.java | 138 + .../implementation/PageImpl.java | 75 + .../implementation/PageImpl1.java | 75 + .../implementation/TopicImpl.java | 86 + .../implementation/TopicInner.java | 126 + .../TopicSharedAccessKeysImpl.java | 36 + .../TopicSharedAccessKeysInner.java | 69 + .../implementation/TopicTypeInfoImpl.java | 74 + .../implementation/TopicTypeInfoInner.java | 181 + .../implementation/TopicTypesImpl.java | 84 + .../implementation/TopicTypesInner.java | 312 ++ .../implementation/TopicsImpl.java | 183 + .../implementation/TopicsInner.java | 1903 +++++++ .../implementation/package-info.java | 11 + .../v2020_01_01_preview/package-info.java | 11 + 99 files changed, 17333 insertions(+) create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/pom.xml create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/AdvancedFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/AzureFunctionEventSubscriptionDestination.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/BoolEqualsAdvancedFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DeadLetterDestination.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Domain.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainProvisioningState.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainRegenerateKeyRequest.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainSharedAccessKeys.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainTopic.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainTopicProvisioningState.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainTopics.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainUpdateParameters.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Domains.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventDeliverySchema.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventHubEventSubscriptionDestination.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscription.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionDestination.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionFullUrl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionProvisioningState.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionUpdateParameters.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptions.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventType.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/HybridConnectionEventSubscriptionDestination.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/InputSchema.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/InputSchemaMapping.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/JsonField.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/JsonFieldWithDefault.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/JsonInputSchemaMapping.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberGreaterThanAdvancedFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberGreaterThanOrEqualsAdvancedFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberInAdvancedFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberLessThanAdvancedFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberLessThanOrEqualsAdvancedFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberNotInAdvancedFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Operation.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/OperationInfo.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Operations.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/ResourceRegionType.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/RetryPolicy.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/ServiceBusQueueEventSubscriptionDestination.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/ServiceBusTopicEventSubscriptionDestination.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StorageBlobDeadLetterDestination.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StorageQueueEventSubscriptionDestination.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringBeginsWithAdvancedFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringContainsAdvancedFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringEndsWithAdvancedFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringInAdvancedFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringNotInAdvancedFilter.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Topic.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicProvisioningState.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicRegenerateKeyRequest.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicSharedAccessKeys.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicTypeInfo.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicTypeProvisioningState.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicTypes.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicUpdateParameters.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Topics.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/WebHookEventSubscriptionDestination.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainSharedAccessKeysImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainSharedAccessKeysInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicsImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicsInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainsImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainsInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventGridManagementClientImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventGridManager.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionFullUrlImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionFullUrlInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionsImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionsInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventTypeImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventTypeInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/IdParsingUtils.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationsImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationsInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/PageImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/PageImpl1.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicSharedAccessKeysImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicSharedAccessKeysInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypeInfoImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypeInfoInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypesImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypesInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicsImpl.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicsInner.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/package-info.java create mode 100644 eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/package-info.java diff --git a/eventgrid/resource-manager/v2020_01_01_preview/pom.xml b/eventgrid/resource-manager/v2020_01_01_preview/pom.xml new file mode 100644 index 000000000000..7d28288777fe --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.eventgrid.v2020_01_01_preview + + com.microsoft.azure + azure-arm-parent + 1.1.0 + ../../../pom.management.xml + + azure-mgmt-eventgrid + 1.0.0-beta + jar + Microsoft Azure SDK for EventGrid Management + This package contains Microsoft EventGrid 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 + + 1.6.5 + + + + + + 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/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/AdvancedFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/AdvancedFilter.java new file mode 100644 index 000000000000..9c82ff26a379 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/AdvancedFilter.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * This is the base type that represents an advanced filter. To configure an + * advanced filter, do not directly instantiate an object of this class. + * Instead, instantiate an object of a derived class such as + * BoolEqualsAdvancedFilter, NumberInAdvancedFilter, StringEqualsAdvancedFilter + * etc. depending on the type of the key based on which you want to filter. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("AdvancedFilter") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "NumberIn", value = NumberInAdvancedFilter.class), + @JsonSubTypes.Type(name = "NumberNotIn", value = NumberNotInAdvancedFilter.class), + @JsonSubTypes.Type(name = "NumberLessThan", value = NumberLessThanAdvancedFilter.class), + @JsonSubTypes.Type(name = "NumberGreaterThan", value = NumberGreaterThanAdvancedFilter.class), + @JsonSubTypes.Type(name = "NumberLessThanOrEquals", value = NumberLessThanOrEqualsAdvancedFilter.class), + @JsonSubTypes.Type(name = "NumberGreaterThanOrEquals", value = NumberGreaterThanOrEqualsAdvancedFilter.class), + @JsonSubTypes.Type(name = "BoolEquals", value = BoolEqualsAdvancedFilter.class), + @JsonSubTypes.Type(name = "StringIn", value = StringInAdvancedFilter.class), + @JsonSubTypes.Type(name = "StringNotIn", value = StringNotInAdvancedFilter.class), + @JsonSubTypes.Type(name = "StringBeginsWith", value = StringBeginsWithAdvancedFilter.class), + @JsonSubTypes.Type(name = "StringEndsWith", value = StringEndsWithAdvancedFilter.class), + @JsonSubTypes.Type(name = "StringContains", value = StringContainsAdvancedFilter.class) +}) +public class AdvancedFilter { + /** + * The field/property in the event based on which you want to filter. + */ + @JsonProperty(value = "key") + private String key; + + /** + * Get the field/property in the event based on which you want to filter. + * + * @return the key value + */ + public String key() { + return this.key; + } + + /** + * Set the field/property in the event based on which you want to filter. + * + * @param key the key value to set + * @return the AdvancedFilter object itself. + */ + public AdvancedFilter withKey(String key) { + this.key = key; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/AzureFunctionEventSubscriptionDestination.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/AzureFunctionEventSubscriptionDestination.java new file mode 100644 index 000000000000..7bd77d3db827 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/AzureFunctionEventSubscriptionDestination.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information about the azure function destination for an event subscription. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("AzureFunction") +@JsonFlatten +public class AzureFunctionEventSubscriptionDestination extends EventSubscriptionDestination { + /** + * The Azure Resource Id that represents the endpoint of the Azure Function + * destination of an event subscription. + */ + @JsonProperty(value = "properties.resourceId") + private String resourceId; + + /** + * Maximum number of events per batch. + */ + @JsonProperty(value = "properties.maxEventsPerBatch") + private Integer maxEventsPerBatch; + + /** + * Preferred batch size in Kilobytes. + */ + @JsonProperty(value = "properties.preferredBatchSizeInKilobytes") + private Integer preferredBatchSizeInKilobytes; + + /** + * Get the Azure Resource Id that represents the endpoint of the Azure Function destination of an event subscription. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the Azure Resource Id that represents the endpoint of the Azure Function destination of an event subscription. + * + * @param resourceId the resourceId value to set + * @return the AzureFunctionEventSubscriptionDestination object itself. + */ + public AzureFunctionEventSubscriptionDestination withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get maximum number of events per batch. + * + * @return the maxEventsPerBatch value + */ + public Integer maxEventsPerBatch() { + return this.maxEventsPerBatch; + } + + /** + * Set maximum number of events per batch. + * + * @param maxEventsPerBatch the maxEventsPerBatch value to set + * @return the AzureFunctionEventSubscriptionDestination object itself. + */ + public AzureFunctionEventSubscriptionDestination withMaxEventsPerBatch(Integer maxEventsPerBatch) { + this.maxEventsPerBatch = maxEventsPerBatch; + return this; + } + + /** + * Get preferred batch size in Kilobytes. + * + * @return the preferredBatchSizeInKilobytes value + */ + public Integer preferredBatchSizeInKilobytes() { + return this.preferredBatchSizeInKilobytes; + } + + /** + * Set preferred batch size in Kilobytes. + * + * @param preferredBatchSizeInKilobytes the preferredBatchSizeInKilobytes value to set + * @return the AzureFunctionEventSubscriptionDestination object itself. + */ + public AzureFunctionEventSubscriptionDestination withPreferredBatchSizeInKilobytes(Integer preferredBatchSizeInKilobytes) { + this.preferredBatchSizeInKilobytes = preferredBatchSizeInKilobytes; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/BoolEqualsAdvancedFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/BoolEqualsAdvancedFilter.java new file mode 100644 index 000000000000..8ebcecf43104 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/BoolEqualsAdvancedFilter.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * BoolEquals Advanced Filter. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("BoolEquals") +public class BoolEqualsAdvancedFilter extends AdvancedFilter { + /** + * The boolean filter value. + */ + @JsonProperty(value = "value") + private Boolean value; + + /** + * Get the boolean filter value. + * + * @return the value value + */ + public Boolean value() { + return this.value; + } + + /** + * Set the boolean filter value. + * + * @param value the value value to set + * @return the BoolEqualsAdvancedFilter object itself. + */ + public BoolEqualsAdvancedFilter withValue(Boolean value) { + this.value = value; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DeadLetterDestination.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DeadLetterDestination.java new file mode 100644 index 000000000000..c94a22a4536c --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DeadLetterDestination.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Information about the dead letter destination for an event subscription. To + * configure a deadletter destination, do not directly instantiate an object of + * this class. Instead, instantiate an object of a derived class. Currently, + * StorageBlobDeadLetterDestination is the only class that derives from this + * class. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("DeadLetterDestination") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "StorageBlob", value = StorageBlobDeadLetterDestination.class) +}) +public class DeadLetterDestination { +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Domain.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Domain.java new file mode 100644 index 000000000000..ceae489a5066 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Domain.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_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.eventgrid.v2020_01_01_preview.implementation.EventGridManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.DomainInner; + +/** + * Type representing Domain. + */ +public interface Domain extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the endpoint value. + */ + String endpoint(); + + /** + * @return the inputSchema value. + */ + InputSchema inputSchema(); + + /** + * @return the inputSchemaMapping value. + */ + InputSchemaMapping inputSchemaMapping(); + + /** + * @return the metricResourceId value. + */ + String metricResourceId(); + + /** + * @return the provisioningState value. + */ + DomainProvisioningState provisioningState(); + + /** + * The entirety of the Domain definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of Domain definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Domain definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the Domain definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the domain definition allowing to specify InputSchema. + */ + interface WithInputSchema { + /** + * Specifies inputSchema. + * @param inputSchema This determines the format that Event Grid should expect for incoming events published to the domain. Possible values include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventSchemaV1_0' + * @return the next definition stage + */ + WithCreate withInputSchema(InputSchema inputSchema); + } + + /** + * The stage of the domain definition allowing to specify InputSchemaMapping. + */ + interface WithInputSchemaMapping { + /** + * Specifies inputSchemaMapping. + * @param inputSchemaMapping Information about the InputSchemaMapping which specified the info about mapping event payload + * @return the next definition stage + */ + WithCreate withInputSchemaMapping(InputSchemaMapping inputSchemaMapping); + } + + /** + * 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.WithInputSchema, DefinitionStages.WithInputSchemaMapping { + } + } + /** + * The template for a Domain update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithInputSchema, UpdateStages.WithInputSchemaMapping { + } + + /** + * Grouping of Domain update stages. + */ + interface UpdateStages { + /** + * The stage of the domain update allowing to specify InputSchema. + */ + interface WithInputSchema { + /** + * Specifies inputSchema. + * @param inputSchema This determines the format that Event Grid should expect for incoming events published to the domain. Possible values include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventSchemaV1_0' + * @return the next update stage + */ + Update withInputSchema(InputSchema inputSchema); + } + + /** + * The stage of the domain update allowing to specify InputSchemaMapping. + */ + interface WithInputSchemaMapping { + /** + * Specifies inputSchemaMapping. + * @param inputSchemaMapping Information about the InputSchemaMapping which specified the info about mapping event payload + * @return the next update stage + */ + Update withInputSchemaMapping(InputSchemaMapping inputSchemaMapping); + } + + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainProvisioningState.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainProvisioningState.java new file mode 100644 index 000000000000..e850c5a99069 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainProvisioningState.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.eventgrid.v2020_01_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DomainProvisioningState. + */ +public final class DomainProvisioningState extends ExpandableStringEnum { + /** Static value Creating for DomainProvisioningState. */ + public static final DomainProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for DomainProvisioningState. */ + public static final DomainProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for DomainProvisioningState. */ + public static final DomainProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for DomainProvisioningState. */ + public static final DomainProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for DomainProvisioningState. */ + public static final DomainProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for DomainProvisioningState. */ + public static final DomainProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a DomainProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding DomainProvisioningState + */ + @JsonCreator + public static DomainProvisioningState fromString(String name) { + return fromString(name, DomainProvisioningState.class); + } + + /** + * @return known DomainProvisioningState values + */ + public static Collection values() { + return values(DomainProvisioningState.class); + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainRegenerateKeyRequest.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainRegenerateKeyRequest.java new file mode 100644 index 000000000000..926d42626797 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainRegenerateKeyRequest.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Domain regenerate share access key request. + */ +public class DomainRegenerateKeyRequest { + /** + * Key name to regenerate key1 or key2. + */ + @JsonProperty(value = "keyName", required = true) + private String keyName; + + /** + * Get key name to regenerate key1 or key2. + * + * @return the keyName value + */ + public String keyName() { + return this.keyName; + } + + /** + * Set key name to regenerate key1 or key2. + * + * @param keyName the keyName value to set + * @return the DomainRegenerateKeyRequest object itself. + */ + public DomainRegenerateKeyRequest withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainSharedAccessKeys.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainSharedAccessKeys.java new file mode 100644 index 000000000000..0a6add551340 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainSharedAccessKeys.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.eventgrid.v2020_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.EventGridManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.DomainSharedAccessKeysInner; + +/** + * Type representing DomainSharedAccessKeys. + */ +public interface DomainSharedAccessKeys extends HasInner, HasManager { + /** + * @return the key1 value. + */ + String key1(); + + /** + * @return the key2 value. + */ + String key2(); + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainTopic.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainTopic.java new file mode 100644 index 000000000000..e89bc27655f0 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainTopic.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.eventgrid.v2020_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.DomainTopicInner; +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.eventgrid.v2020_01_01_preview.implementation.EventGridManager; + +/** + * Type representing DomainTopic. + */ +public interface DomainTopic extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + DomainTopicProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the DomainTopic definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithDomain, DefinitionStages.WithCreate { + } + + /** + * Grouping of DomainTopic definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DomainTopic definition. + */ + interface Blank extends WithDomain { + } + + /** + * The stage of the domaintopic definition allowing to specify Domain. + */ + interface WithDomain { + /** + * Specifies resourceGroupName, domainName. + * @param resourceGroupName The name of the resource group within the user's subscription + * @param domainName Name of the domain + * @return the next definition stage + */ + WithCreate withExistingDomain(String resourceGroupName, String domainName); + } + + /** + * 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 DomainTopic update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of DomainTopic update stages. + */ + interface UpdateStages { + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainTopicProvisioningState.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainTopicProvisioningState.java new file mode 100644 index 000000000000..d8a49b5f5066 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainTopicProvisioningState.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.eventgrid.v2020_01_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DomainTopicProvisioningState. + */ +public final class DomainTopicProvisioningState extends ExpandableStringEnum { + /** Static value Creating for DomainTopicProvisioningState. */ + public static final DomainTopicProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for DomainTopicProvisioningState. */ + public static final DomainTopicProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for DomainTopicProvisioningState. */ + public static final DomainTopicProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for DomainTopicProvisioningState. */ + public static final DomainTopicProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for DomainTopicProvisioningState. */ + public static final DomainTopicProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for DomainTopicProvisioningState. */ + public static final DomainTopicProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a DomainTopicProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding DomainTopicProvisioningState + */ + @JsonCreator + public static DomainTopicProvisioningState fromString(String name) { + return fromString(name, DomainTopicProvisioningState.class); + } + + /** + * @return known DomainTopicProvisioningState values + */ + public static Collection values() { + return values(DomainTopicProvisioningState.class); + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainTopics.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainTopics.java new file mode 100644 index 000000000000..94fe0048f9fa --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainTopics.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.eventgrid.v2020_01_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.DomainTopicsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DomainTopics. + */ +public interface DomainTopics extends SupportsCreating, HasInner { + /** + * Get a domain topic. + * Get properties of a domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String domainName, String domainTopicName); + + /** + * List domain topics. + * List all the topics in a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByDomainAsync(final String resourceGroupName, final String domainName); + + /** + * Delete a domain topic. + * Delete existing domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String domainName, String domainTopicName); + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainUpdateParameters.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainUpdateParameters.java new file mode 100644 index 000000000000..0d2dd92ccd2e --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/DomainUpdateParameters.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.eventgrid.v2020_01_01_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the Domain update. + */ +public class DomainUpdateParameters { + /** + * Tags of the domains resource. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get tags of the domains resource. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set tags of the domains resource. + * + * @param tags the tags value to set + * @return the DomainUpdateParameters object itself. + */ + public DomainUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Domains.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Domains.java new file mode 100644 index 000000000000..907634798ff6 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Domains.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.eventgrid.v2020_01_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 com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.DomainsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Domains. + */ +public interface Domains extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * List keys for a domain. + * List the two keys used to publish to a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listSharedAccessKeysAsync(String resourceGroupName, String domainName); + + /** + * Regenerate key for a domain. + * Regenerate a shared access key for a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param keyName Key name to regenerate key1 or key2 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable regenerateKeyAsync(String resourceGroupName, String domainName, String keyName); + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventDeliverySchema.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventDeliverySchema.java new file mode 100644 index 000000000000..0c8281ea87e4 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventDeliverySchema.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.eventgrid.v2020_01_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for EventDeliverySchema. + */ +public final class EventDeliverySchema extends ExpandableStringEnum { + /** Static value EventGridSchema for EventDeliverySchema. */ + public static final EventDeliverySchema EVENT_GRID_SCHEMA = fromString("EventGridSchema"); + + /** Static value CustomInputSchema for EventDeliverySchema. */ + public static final EventDeliverySchema CUSTOM_INPUT_SCHEMA = fromString("CustomInputSchema"); + + /** Static value CloudEventSchemaV1_0 for EventDeliverySchema. */ + public static final EventDeliverySchema CLOUD_EVENT_SCHEMA_V1_0 = fromString("CloudEventSchemaV1_0"); + + /** + * Creates or finds a EventDeliverySchema from its string representation. + * @param name a name to look for + * @return the corresponding EventDeliverySchema + */ + @JsonCreator + public static EventDeliverySchema fromString(String name) { + return fromString(name, EventDeliverySchema.class); + } + + /** + * @return known EventDeliverySchema values + */ + public static Collection values() { + return values(EventDeliverySchema.class); + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventHubEventSubscriptionDestination.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventHubEventSubscriptionDestination.java new file mode 100644 index 000000000000..f6d9f2110067 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventHubEventSubscriptionDestination.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information about the event hub destination for an event subscription. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("EventHub") +@JsonFlatten +public class EventHubEventSubscriptionDestination extends EventSubscriptionDestination { + /** + * The Azure Resource Id that represents the endpoint of an Event Hub + * destination of an event subscription. + */ + @JsonProperty(value = "properties.resourceId") + private String resourceId; + + /** + * Get the Azure Resource Id that represents the endpoint of an Event Hub destination of an event subscription. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the Azure Resource Id that represents the endpoint of an Event Hub destination of an event subscription. + * + * @param resourceId the resourceId value to set + * @return the EventHubEventSubscriptionDestination object itself. + */ + public EventHubEventSubscriptionDestination withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscription.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscription.java new file mode 100644 index 000000000000..3fc9a8b53776 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscription.java @@ -0,0 +1,302 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.EventSubscriptionInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.EventGridManager; +import java.util.List; +import org.joda.time.DateTime; + +/** + * Type representing EventSubscription. + */ +public interface EventSubscription extends HasInner, Indexable, Updatable, Refreshable, HasManager { + /** + * @return the deadLetterDestination value. + */ + DeadLetterDestination deadLetterDestination(); + + /** + * @return the destination value. + */ + EventSubscriptionDestination destination(); + + /** + * @return the eventDeliverySchema value. + */ + EventDeliverySchema eventDeliverySchema(); + + /** + * @return the expirationTimeUtc value. + */ + DateTime expirationTimeUtc(); + + /** + * @return the filter value. + */ + EventSubscriptionFilter filter(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the labels value. + */ + List labels(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + EventSubscriptionProvisioningState provisioningState(); + + /** + * @return the retryPolicy value. + */ + RetryPolicy retryPolicy(); + + /** + * @return the topic value. + */ + String topic(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the EventSubscription definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScope, DefinitionStages.WithCreate { + } + + /** + * Grouping of EventSubscription definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a EventSubscription definition. + */ + interface Blank extends WithScope { + } + + /** + * The stage of the eventsubscription definition allowing to specify Scope. + */ + interface WithScope { + /** + * Specifies scope. + * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic + * @return the next definition stage + */ + WithCreate withScope(String scope); + } + + /** + * The stage of the eventsubscription definition allowing to specify DeadLetterDestination. + */ + interface WithDeadLetterDestination { + /** + * Specifies deadLetterDestination. + * @param deadLetterDestination The DeadLetter destination of the event subscription + * @return the next definition stage + */ + WithCreate withDeadLetterDestination(DeadLetterDestination deadLetterDestination); + } + + /** + * The stage of the eventsubscription definition allowing to specify Destination. + */ + interface WithDestination { + /** + * Specifies destination. + * @param destination Information about the destination where events have to be delivered for the event subscription + * @return the next definition stage + */ + WithCreate withDestination(EventSubscriptionDestination destination); + } + + /** + * The stage of the eventsubscription definition allowing to specify EventDeliverySchema. + */ + interface WithEventDeliverySchema { + /** + * Specifies eventDeliverySchema. + * @param eventDeliverySchema The event delivery schema for the event subscription. Possible values include: 'EventGridSchema', 'CustomInputSchema', 'CloudEventSchemaV1_0' + * @return the next definition stage + */ + WithCreate withEventDeliverySchema(EventDeliverySchema eventDeliverySchema); + } + + /** + * The stage of the eventsubscription definition allowing to specify ExpirationTimeUtc. + */ + interface WithExpirationTimeUtc { + /** + * Specifies expirationTimeUtc. + * @param expirationTimeUtc Expiration time of the event subscription + * @return the next definition stage + */ + WithCreate withExpirationTimeUtc(DateTime expirationTimeUtc); + } + + /** + * The stage of the eventsubscription definition allowing to specify Filter. + */ + interface WithFilter { + /** + * Specifies filter. + * @param filter Information about the filter for the event subscription + * @return the next definition stage + */ + WithCreate withFilter(EventSubscriptionFilter filter); + } + + /** + * The stage of the eventsubscription definition allowing to specify Labels. + */ + interface WithLabels { + /** + * Specifies labels. + * @param labels List of user defined labels + * @return the next definition stage + */ + WithCreate withLabels(List labels); + } + + /** + * The stage of the eventsubscription definition allowing to specify RetryPolicy. + */ + interface WithRetryPolicy { + /** + * Specifies retryPolicy. + * @param retryPolicy The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events + * @return the next definition stage + */ + WithCreate withRetryPolicy(RetryPolicy retryPolicy); + } + + /** + * 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.WithDeadLetterDestination, DefinitionStages.WithDestination, DefinitionStages.WithEventDeliverySchema, DefinitionStages.WithExpirationTimeUtc, DefinitionStages.WithFilter, DefinitionStages.WithLabels, DefinitionStages.WithRetryPolicy { + } + } + /** + * The template for a EventSubscription update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithDeadLetterDestination, UpdateStages.WithDestination, UpdateStages.WithEventDeliverySchema, UpdateStages.WithExpirationTimeUtc, UpdateStages.WithFilter, UpdateStages.WithLabels, UpdateStages.WithRetryPolicy { + } + + /** + * Grouping of EventSubscription update stages. + */ + interface UpdateStages { + /** + * The stage of the eventsubscription update allowing to specify DeadLetterDestination. + */ + interface WithDeadLetterDestination { + /** + * Specifies deadLetterDestination. + * @param deadLetterDestination The DeadLetter destination of the event subscription + * @return the next update stage + */ + Update withDeadLetterDestination(DeadLetterDestination deadLetterDestination); + } + + /** + * The stage of the eventsubscription update allowing to specify Destination. + */ + interface WithDestination { + /** + * Specifies destination. + * @param destination Information about the destination where events have to be delivered for the event subscription + * @return the next update stage + */ + Update withDestination(EventSubscriptionDestination destination); + } + + /** + * The stage of the eventsubscription update allowing to specify EventDeliverySchema. + */ + interface WithEventDeliverySchema { + /** + * Specifies eventDeliverySchema. + * @param eventDeliverySchema The event delivery schema for the event subscription. Possible values include: 'EventGridSchema', 'CustomInputSchema', 'CloudEventSchemaV1_0' + * @return the next update stage + */ + Update withEventDeliverySchema(EventDeliverySchema eventDeliverySchema); + } + + /** + * The stage of the eventsubscription update allowing to specify ExpirationTimeUtc. + */ + interface WithExpirationTimeUtc { + /** + * Specifies expirationTimeUtc. + * @param expirationTimeUtc Information about the expiration time for the event subscription + * @return the next update stage + */ + Update withExpirationTimeUtc(DateTime expirationTimeUtc); + } + + /** + * The stage of the eventsubscription update allowing to specify Filter. + */ + interface WithFilter { + /** + * Specifies filter. + * @param filter Information about the filter for the event subscription + * @return the next update stage + */ + Update withFilter(EventSubscriptionFilter filter); + } + + /** + * The stage of the eventsubscription update allowing to specify Labels. + */ + interface WithLabels { + /** + * Specifies labels. + * @param labels List of user defined labels + * @return the next update stage + */ + Update withLabels(List labels); + } + + /** + * The stage of the eventsubscription update allowing to specify RetryPolicy. + */ + interface WithRetryPolicy { + /** + * Specifies retryPolicy. + * @param retryPolicy The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events + * @return the next update stage + */ + Update withRetryPolicy(RetryPolicy retryPolicy); + } + + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionDestination.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionDestination.java new file mode 100644 index 000000000000..48cf28928f0c --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionDestination.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Information about the destination for an event subscription. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("EventSubscriptionDestination") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "WebHook", value = WebHookEventSubscriptionDestination.class), + @JsonSubTypes.Type(name = "EventHub", value = EventHubEventSubscriptionDestination.class), + @JsonSubTypes.Type(name = "StorageQueue", value = StorageQueueEventSubscriptionDestination.class), + @JsonSubTypes.Type(name = "HybridConnection", value = HybridConnectionEventSubscriptionDestination.class), + @JsonSubTypes.Type(name = "ServiceBusQueue", value = ServiceBusQueueEventSubscriptionDestination.class), + @JsonSubTypes.Type(name = "ServiceBusTopic", value = ServiceBusTopicEventSubscriptionDestination.class), + @JsonSubTypes.Type(name = "AzureFunction", value = AzureFunctionEventSubscriptionDestination.class) +}) +public class EventSubscriptionDestination { +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionFilter.java new file mode 100644 index 000000000000..5ccf3298b597 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionFilter.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Filter for the Event Subscription. + */ +public class EventSubscriptionFilter { + /** + * An optional string to filter events for an event subscription based on a + * resource path prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + */ + @JsonProperty(value = "subjectBeginsWith") + private String subjectBeginsWith; + + /** + * An optional string to filter events for an event subscription based on a + * resource path suffix. + * Wildcard characters are not supported in this path. + */ + @JsonProperty(value = "subjectEndsWith") + private String subjectEndsWith; + + /** + * A list of applicable event types that need to be part of the event + * subscription. If it is desired to subscribe to all default event types, + * set the IncludedEventTypes to null. + */ + @JsonProperty(value = "includedEventTypes") + private List includedEventTypes; + + /** + * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the + * filter + * should be compared in a case sensitive manner. + */ + @JsonProperty(value = "isSubjectCaseSensitive") + private Boolean isSubjectCaseSensitive; + + /** + * An array of advanced filters that are used for filtering event + * subscriptions. + */ + @JsonProperty(value = "advancedFilters") + private List advancedFilters; + + /** + * Get an optional string to filter events for an event subscription based on a resource path prefix. + The format of this depends on the publisher of the events. + Wildcard characters are not supported in this path. + * + * @return the subjectBeginsWith value + */ + public String subjectBeginsWith() { + return this.subjectBeginsWith; + } + + /** + * Set an optional string to filter events for an event subscription based on a resource path prefix. + The format of this depends on the publisher of the events. + Wildcard characters are not supported in this path. + * + * @param subjectBeginsWith the subjectBeginsWith value to set + * @return the EventSubscriptionFilter object itself. + */ + public EventSubscriptionFilter withSubjectBeginsWith(String subjectBeginsWith) { + this.subjectBeginsWith = subjectBeginsWith; + return this; + } + + /** + * Get an optional string to filter events for an event subscription based on a resource path suffix. + Wildcard characters are not supported in this path. + * + * @return the subjectEndsWith value + */ + public String subjectEndsWith() { + return this.subjectEndsWith; + } + + /** + * Set an optional string to filter events for an event subscription based on a resource path suffix. + Wildcard characters are not supported in this path. + * + * @param subjectEndsWith the subjectEndsWith value to set + * @return the EventSubscriptionFilter object itself. + */ + public EventSubscriptionFilter withSubjectEndsWith(String subjectEndsWith) { + this.subjectEndsWith = subjectEndsWith; + return this; + } + + /** + * Get a list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all default event types, set the IncludedEventTypes to null. + * + * @return the includedEventTypes value + */ + public List includedEventTypes() { + return this.includedEventTypes; + } + + /** + * Set a list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all default event types, set the IncludedEventTypes to null. + * + * @param includedEventTypes the includedEventTypes value to set + * @return the EventSubscriptionFilter object itself. + */ + public EventSubscriptionFilter withIncludedEventTypes(List includedEventTypes) { + this.includedEventTypes = includedEventTypes; + return this; + } + + /** + * Get specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter + should be compared in a case sensitive manner. + * + * @return the isSubjectCaseSensitive value + */ + public Boolean isSubjectCaseSensitive() { + return this.isSubjectCaseSensitive; + } + + /** + * Set specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter + should be compared in a case sensitive manner. + * + * @param isSubjectCaseSensitive the isSubjectCaseSensitive value to set + * @return the EventSubscriptionFilter object itself. + */ + public EventSubscriptionFilter withIsSubjectCaseSensitive(Boolean isSubjectCaseSensitive) { + this.isSubjectCaseSensitive = isSubjectCaseSensitive; + return this; + } + + /** + * Get an array of advanced filters that are used for filtering event subscriptions. + * + * @return the advancedFilters value + */ + public List advancedFilters() { + return this.advancedFilters; + } + + /** + * Set an array of advanced filters that are used for filtering event subscriptions. + * + * @param advancedFilters the advancedFilters value to set + * @return the EventSubscriptionFilter object itself. + */ + public EventSubscriptionFilter withAdvancedFilters(List advancedFilters) { + this.advancedFilters = advancedFilters; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionFullUrl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionFullUrl.java new file mode 100644 index 000000000000..756d784aefd0 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionFullUrl.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.eventgrid.v2020_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.EventGridManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.EventSubscriptionFullUrlInner; + +/** + * Type representing EventSubscriptionFullUrl. + */ +public interface EventSubscriptionFullUrl extends HasInner, HasManager { + /** + * @return the endpointUrl value. + */ + String endpointUrl(); + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionProvisioningState.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionProvisioningState.java new file mode 100644 index 000000000000..000c518c5c58 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionProvisioningState.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.eventgrid.v2020_01_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for EventSubscriptionProvisioningState. + */ +public final class EventSubscriptionProvisioningState extends ExpandableStringEnum { + /** Static value Creating for EventSubscriptionProvisioningState. */ + public static final EventSubscriptionProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for EventSubscriptionProvisioningState. */ + public static final EventSubscriptionProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for EventSubscriptionProvisioningState. */ + public static final EventSubscriptionProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for EventSubscriptionProvisioningState. */ + public static final EventSubscriptionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for EventSubscriptionProvisioningState. */ + public static final EventSubscriptionProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for EventSubscriptionProvisioningState. */ + public static final EventSubscriptionProvisioningState FAILED = fromString("Failed"); + + /** Static value AwaitingManualAction for EventSubscriptionProvisioningState. */ + public static final EventSubscriptionProvisioningState AWAITING_MANUAL_ACTION = fromString("AwaitingManualAction"); + + /** + * Creates or finds a EventSubscriptionProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding EventSubscriptionProvisioningState + */ + @JsonCreator + public static EventSubscriptionProvisioningState fromString(String name) { + return fromString(name, EventSubscriptionProvisioningState.class); + } + + /** + * @return known EventSubscriptionProvisioningState values + */ + public static Collection values() { + return values(EventSubscriptionProvisioningState.class); + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionUpdateParameters.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionUpdateParameters.java new file mode 100644 index 000000000000..5d768d3762be --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptionUpdateParameters.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventgrid.v2020_01_01_preview; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the Event Subscription update. + */ +public class EventSubscriptionUpdateParameters { + /** + * Information about the destination where events have to be delivered for + * the event subscription. + */ + @JsonProperty(value = "destination") + private EventSubscriptionDestination destination; + + /** + * Information about the filter for the event subscription. + */ + @JsonProperty(value = "filter") + private EventSubscriptionFilter filter; + + /** + * List of user defined labels. + */ + @JsonProperty(value = "labels") + private List labels; + + /** + * Information about the expiration time for the event subscription. + */ + @JsonProperty(value = "expirationTimeUtc") + private DateTime expirationTimeUtc; + + /** + * The event delivery schema for the event subscription. Possible values + * include: 'EventGridSchema', 'CustomInputSchema', 'CloudEventSchemaV1_0'. + */ + @JsonProperty(value = "eventDeliverySchema") + private EventDeliverySchema eventDeliverySchema; + + /** + * The retry policy for events. This can be used to configure maximum + * number of delivery attempts and time to live for events. + */ + @JsonProperty(value = "retryPolicy") + private RetryPolicy retryPolicy; + + /** + * The DeadLetter destination of the event subscription. + */ + @JsonProperty(value = "deadLetterDestination") + private DeadLetterDestination deadLetterDestination; + + /** + * Get information about the destination where events have to be delivered for the event subscription. + * + * @return the destination value + */ + public EventSubscriptionDestination destination() { + return this.destination; + } + + /** + * Set information about the destination where events have to be delivered for the event subscription. + * + * @param destination the destination value to set + * @return the EventSubscriptionUpdateParameters object itself. + */ + public EventSubscriptionUpdateParameters withDestination(EventSubscriptionDestination destination) { + this.destination = destination; + return this; + } + + /** + * Get information about the filter for the event subscription. + * + * @return the filter value + */ + public EventSubscriptionFilter filter() { + return this.filter; + } + + /** + * Set information about the filter for the event subscription. + * + * @param filter the filter value to set + * @return the EventSubscriptionUpdateParameters object itself. + */ + public EventSubscriptionUpdateParameters withFilter(EventSubscriptionFilter filter) { + this.filter = filter; + return this; + } + + /** + * Get list of user defined labels. + * + * @return the labels value + */ + public List labels() { + return this.labels; + } + + /** + * Set list of user defined labels. + * + * @param labels the labels value to set + * @return the EventSubscriptionUpdateParameters object itself. + */ + public EventSubscriptionUpdateParameters withLabels(List labels) { + this.labels = labels; + return this; + } + + /** + * Get information about the expiration time for the event subscription. + * + * @return the expirationTimeUtc value + */ + public DateTime expirationTimeUtc() { + return this.expirationTimeUtc; + } + + /** + * Set information about the expiration time for the event subscription. + * + * @param expirationTimeUtc the expirationTimeUtc value to set + * @return the EventSubscriptionUpdateParameters object itself. + */ + public EventSubscriptionUpdateParameters withExpirationTimeUtc(DateTime expirationTimeUtc) { + this.expirationTimeUtc = expirationTimeUtc; + return this; + } + + /** + * Get the event delivery schema for the event subscription. Possible values include: 'EventGridSchema', 'CustomInputSchema', 'CloudEventSchemaV1_0'. + * + * @return the eventDeliverySchema value + */ + public EventDeliverySchema eventDeliverySchema() { + return this.eventDeliverySchema; + } + + /** + * Set the event delivery schema for the event subscription. Possible values include: 'EventGridSchema', 'CustomInputSchema', 'CloudEventSchemaV1_0'. + * + * @param eventDeliverySchema the eventDeliverySchema value to set + * @return the EventSubscriptionUpdateParameters object itself. + */ + public EventSubscriptionUpdateParameters withEventDeliverySchema(EventDeliverySchema eventDeliverySchema) { + this.eventDeliverySchema = eventDeliverySchema; + return this; + } + + /** + * Get the retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. + * + * @return the retryPolicy value + */ + public RetryPolicy retryPolicy() { + return this.retryPolicy; + } + + /** + * Set the retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. + * + * @param retryPolicy the retryPolicy value to set + * @return the EventSubscriptionUpdateParameters object itself. + */ + public EventSubscriptionUpdateParameters withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Get the DeadLetter destination of the event subscription. + * + * @return the deadLetterDestination value + */ + public DeadLetterDestination deadLetterDestination() { + return this.deadLetterDestination; + } + + /** + * Set the DeadLetter destination of the event subscription. + * + * @param deadLetterDestination the deadLetterDestination value to set + * @return the EventSubscriptionUpdateParameters object itself. + */ + public EventSubscriptionUpdateParameters withDeadLetterDestination(DeadLetterDestination deadLetterDestination) { + this.deadLetterDestination = deadLetterDestination; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptions.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptions.java new file mode 100644 index 000000000000..fa1544501dab --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventSubscriptions.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.eventgrid.v2020_01_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.EventSubscriptionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing EventSubscriptions. + */ +public interface EventSubscriptions extends SupportsCreating, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Get an event subscription. + * Get properties of an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String scope, String eventSubscriptionName); + + /** + * Delete an event subscription. + * Delete an existing event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String scope, String eventSubscriptionName); + + /** + * Get full URL of an event subscription. + * Get the full endpoint URL for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getFullUrlAsync(String scope, String eventSubscriptionName); + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listGlobalBySubscriptionForTopicTypeAsync(final String topicTypeName); + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listGlobalByResourceGroupForTopicTypeAsync(final String resourceGroupName, final String topicTypeName); + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @param location Name of the location + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listRegionalBySubscriptionAsync(final String location); + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listRegionalByResourceGroupAsync(final String resourceGroupName, final String location); + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listRegionalBySubscriptionForTopicTypeAsync(final String location, final String topicTypeName); + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listRegionalByResourceGroupForTopicTypeAsync(final String resourceGroupName, final String location, final String topicTypeName); + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the resource type + * @param resourceName Name of the resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceAsync(final String resourceGroupName, final String providerNamespace, final String resourceTypeName, final String resourceName); + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain + * @param topicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByDomainTopicAsync(final String resourceGroupName, final String domainName, final String topicName); + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventType.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventType.java new file mode 100644 index 000000000000..b293d9a50af7 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/EventType.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.eventgrid.v2020_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.EventTypeInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.EventGridManager; + +/** + * Type representing EventType. + */ +public interface EventType extends HasInner, HasManager { + /** + * @return the description value. + */ + String description(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the isInDefaultSet value. + */ + Boolean isInDefaultSet(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the schemaUrl value. + */ + String schemaUrl(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/HybridConnectionEventSubscriptionDestination.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/HybridConnectionEventSubscriptionDestination.java new file mode 100644 index 000000000000..c088ec46c1f3 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/HybridConnectionEventSubscriptionDestination.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information about the HybridConnection destination for an event + * subscription. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("HybridConnection") +@JsonFlatten +public class HybridConnectionEventSubscriptionDestination extends EventSubscriptionDestination { + /** + * The Azure Resource ID of an hybrid connection that is the destination of + * an event subscription. + */ + @JsonProperty(value = "properties.resourceId") + private String resourceId; + + /** + * Get the Azure Resource ID of an hybrid connection that is the destination of an event subscription. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the Azure Resource ID of an hybrid connection that is the destination of an event subscription. + * + * @param resourceId the resourceId value to set + * @return the HybridConnectionEventSubscriptionDestination object itself. + */ + public HybridConnectionEventSubscriptionDestination withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/InputSchema.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/InputSchema.java new file mode 100644 index 000000000000..69c27472c900 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/InputSchema.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.eventgrid.v2020_01_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for InputSchema. + */ +public final class InputSchema extends ExpandableStringEnum { + /** Static value EventGridSchema for InputSchema. */ + public static final InputSchema EVENT_GRID_SCHEMA = fromString("EventGridSchema"); + + /** Static value CustomEventSchema for InputSchema. */ + public static final InputSchema CUSTOM_EVENT_SCHEMA = fromString("CustomEventSchema"); + + /** Static value CloudEventSchemaV1_0 for InputSchema. */ + public static final InputSchema CLOUD_EVENT_SCHEMA_V1_0 = fromString("CloudEventSchemaV1_0"); + + /** + * Creates or finds a InputSchema from its string representation. + * @param name a name to look for + * @return the corresponding InputSchema + */ + @JsonCreator + public static InputSchema fromString(String name) { + return fromString(name, InputSchema.class); + } + + /** + * @return known InputSchema values + */ + public static Collection values() { + return values(InputSchema.class); + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/InputSchemaMapping.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/InputSchemaMapping.java new file mode 100644 index 000000000000..a2e522f1f6ac --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/InputSchemaMapping.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * By default, Event Grid expects events to be in the Event Grid event schema. + * Specifying an input schema mapping enables publishing to Event Grid using a + * custom input schema. Currently, the only supported type of + * InputSchemaMapping is 'JsonInputSchemaMapping'. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inputSchemaMappingType") +@JsonTypeName("InputSchemaMapping") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Json", value = JsonInputSchemaMapping.class) +}) +public class InputSchemaMapping { +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/JsonField.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/JsonField.java new file mode 100644 index 000000000000..57a5a404677c --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/JsonField.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This is used to express the source of an input schema mapping for a single + * target field in the Event Grid Event schema. This is currently used in the + * mappings for the 'id', 'topic' and 'eventtime' properties. This represents a + * field in the input event schema. + */ +public class JsonField { + /** + * Name of a field in the input event schema that's to be used as the + * source of a mapping. + */ + @JsonProperty(value = "sourceField") + private String sourceField; + + /** + * Get name of a field in the input event schema that's to be used as the source of a mapping. + * + * @return the sourceField value + */ + public String sourceField() { + return this.sourceField; + } + + /** + * Set name of a field in the input event schema that's to be used as the source of a mapping. + * + * @param sourceField the sourceField value to set + * @return the JsonField object itself. + */ + public JsonField withSourceField(String sourceField) { + this.sourceField = sourceField; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/JsonFieldWithDefault.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/JsonFieldWithDefault.java new file mode 100644 index 000000000000..a2dc4a6da509 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/JsonFieldWithDefault.java @@ -0,0 +1,79 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This is used to express the source of an input schema mapping for a single + * target field + * in the Event Grid Event schema. This is currently used in the mappings for + * the 'subject', + * 'eventtype' and 'dataversion' properties. This represents a field in the + * input event schema + * along with a default value to be used, and at least one of these two + * properties should be provided. + */ +public class JsonFieldWithDefault { + /** + * Name of a field in the input event schema that's to be used as the + * source of a mapping. + */ + @JsonProperty(value = "sourceField") + private String sourceField; + + /** + * The default value to be used for mapping when a SourceField is not + * provided or if there's no property with the specified name in the + * published JSON event payload. + */ + @JsonProperty(value = "defaultValue") + private String defaultValue; + + /** + * Get name of a field in the input event schema that's to be used as the source of a mapping. + * + * @return the sourceField value + */ + public String sourceField() { + return this.sourceField; + } + + /** + * Set name of a field in the input event schema that's to be used as the source of a mapping. + * + * @param sourceField the sourceField value to set + * @return the JsonFieldWithDefault object itself. + */ + public JsonFieldWithDefault withSourceField(String sourceField) { + this.sourceField = sourceField; + return this; + } + + /** + * Get the default value to be used for mapping when a SourceField is not provided or if there's no property with the specified name in the published JSON event payload. + * + * @return the defaultValue value + */ + public String defaultValue() { + return this.defaultValue; + } + + /** + * Set the default value to be used for mapping when a SourceField is not provided or if there's no property with the specified name in the published JSON event payload. + * + * @param defaultValue the defaultValue value to set + * @return the JsonFieldWithDefault object itself. + */ + public JsonFieldWithDefault withDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/JsonInputSchemaMapping.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/JsonInputSchemaMapping.java new file mode 100644 index 000000000000..c45e1eaec21f --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/JsonInputSchemaMapping.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * This enables publishing to Event Grid using a custom input schema. This can + * be used to map properties from a custom input JSON schema to the Event Grid + * event schema. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inputSchemaMappingType") +@JsonTypeName("Json") +@JsonFlatten +public class JsonInputSchemaMapping extends InputSchemaMapping { + /** + * The mapping information for the Id property of the Event Grid Event. + */ + @JsonProperty(value = "properties.id") + private JsonField id; + + /** + * The mapping information for the Topic property of the Event Grid Event. + */ + @JsonProperty(value = "properties.topic") + private JsonField topic; + + /** + * The mapping information for the EventTime property of the Event Grid + * Event. + */ + @JsonProperty(value = "properties.eventTime") + private JsonField eventTime; + + /** + * The mapping information for the EventType property of the Event Grid + * Event. + */ + @JsonProperty(value = "properties.eventType") + private JsonFieldWithDefault eventType; + + /** + * The mapping information for the Subject property of the Event Grid + * Event. + */ + @JsonProperty(value = "properties.subject") + private JsonFieldWithDefault subject; + + /** + * The mapping information for the DataVersion property of the Event Grid + * Event. + */ + @JsonProperty(value = "properties.dataVersion") + private JsonFieldWithDefault dataVersion; + + /** + * Get the mapping information for the Id property of the Event Grid Event. + * + * @return the id value + */ + public JsonField id() { + return this.id; + } + + /** + * Set the mapping information for the Id property of the Event Grid Event. + * + * @param id the id value to set + * @return the JsonInputSchemaMapping object itself. + */ + public JsonInputSchemaMapping withId(JsonField id) { + this.id = id; + return this; + } + + /** + * Get the mapping information for the Topic property of the Event Grid Event. + * + * @return the topic value + */ + public JsonField topic() { + return this.topic; + } + + /** + * Set the mapping information for the Topic property of the Event Grid Event. + * + * @param topic the topic value to set + * @return the JsonInputSchemaMapping object itself. + */ + public JsonInputSchemaMapping withTopic(JsonField topic) { + this.topic = topic; + return this; + } + + /** + * Get the mapping information for the EventTime property of the Event Grid Event. + * + * @return the eventTime value + */ + public JsonField eventTime() { + return this.eventTime; + } + + /** + * Set the mapping information for the EventTime property of the Event Grid Event. + * + * @param eventTime the eventTime value to set + * @return the JsonInputSchemaMapping object itself. + */ + public JsonInputSchemaMapping withEventTime(JsonField eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * Get the mapping information for the EventType property of the Event Grid Event. + * + * @return the eventType value + */ + public JsonFieldWithDefault eventType() { + return this.eventType; + } + + /** + * Set the mapping information for the EventType property of the Event Grid Event. + * + * @param eventType the eventType value to set + * @return the JsonInputSchemaMapping object itself. + */ + public JsonInputSchemaMapping withEventType(JsonFieldWithDefault eventType) { + this.eventType = eventType; + return this; + } + + /** + * Get the mapping information for the Subject property of the Event Grid Event. + * + * @return the subject value + */ + public JsonFieldWithDefault subject() { + return this.subject; + } + + /** + * Set the mapping information for the Subject property of the Event Grid Event. + * + * @param subject the subject value to set + * @return the JsonInputSchemaMapping object itself. + */ + public JsonInputSchemaMapping withSubject(JsonFieldWithDefault subject) { + this.subject = subject; + return this; + } + + /** + * Get the mapping information for the DataVersion property of the Event Grid Event. + * + * @return the dataVersion value + */ + public JsonFieldWithDefault dataVersion() { + return this.dataVersion; + } + + /** + * Set the mapping information for the DataVersion property of the Event Grid Event. + * + * @param dataVersion the dataVersion value to set + * @return the JsonInputSchemaMapping object itself. + */ + public JsonInputSchemaMapping withDataVersion(JsonFieldWithDefault dataVersion) { + this.dataVersion = dataVersion; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberGreaterThanAdvancedFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberGreaterThanAdvancedFilter.java new file mode 100644 index 000000000000..45b4f5975830 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberGreaterThanAdvancedFilter.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NumberGreaterThan Advanced Filter. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberGreaterThan") +public class NumberGreaterThanAdvancedFilter extends AdvancedFilter { + /** + * The filter value. + */ + @JsonProperty(value = "value") + private Double value; + + /** + * Get the filter value. + * + * @return the value value + */ + public Double value() { + return this.value; + } + + /** + * Set the filter value. + * + * @param value the value value to set + * @return the NumberGreaterThanAdvancedFilter object itself. + */ + public NumberGreaterThanAdvancedFilter withValue(Double value) { + this.value = value; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberGreaterThanOrEqualsAdvancedFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberGreaterThanOrEqualsAdvancedFilter.java new file mode 100644 index 000000000000..335892c47244 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberGreaterThanOrEqualsAdvancedFilter.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NumberGreaterThanOrEquals Advanced Filter. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberGreaterThanOrEquals") +public class NumberGreaterThanOrEqualsAdvancedFilter extends AdvancedFilter { + /** + * The filter value. + */ + @JsonProperty(value = "value") + private Double value; + + /** + * Get the filter value. + * + * @return the value value + */ + public Double value() { + return this.value; + } + + /** + * Set the filter value. + * + * @param value the value value to set + * @return the NumberGreaterThanOrEqualsAdvancedFilter object itself. + */ + public NumberGreaterThanOrEqualsAdvancedFilter withValue(Double value) { + this.value = value; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberInAdvancedFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberInAdvancedFilter.java new file mode 100644 index 000000000000..1491fc7647fa --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberInAdvancedFilter.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.eventgrid.v2020_01_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NumberIn Advanced Filter. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberIn") +public class NumberInAdvancedFilter extends AdvancedFilter { + /** + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** + * Get the set of filter values. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set the set of filter values. + * + * @param values the values value to set + * @return the NumberInAdvancedFilter object itself. + */ + public NumberInAdvancedFilter withValues(List values) { + this.values = values; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberLessThanAdvancedFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberLessThanAdvancedFilter.java new file mode 100644 index 000000000000..f605edf6b693 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberLessThanAdvancedFilter.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NumberLessThan Advanced Filter. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberLessThan") +public class NumberLessThanAdvancedFilter extends AdvancedFilter { + /** + * The filter value. + */ + @JsonProperty(value = "value") + private Double value; + + /** + * Get the filter value. + * + * @return the value value + */ + public Double value() { + return this.value; + } + + /** + * Set the filter value. + * + * @param value the value value to set + * @return the NumberLessThanAdvancedFilter object itself. + */ + public NumberLessThanAdvancedFilter withValue(Double value) { + this.value = value; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberLessThanOrEqualsAdvancedFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberLessThanOrEqualsAdvancedFilter.java new file mode 100644 index 000000000000..6a15857a5340 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberLessThanOrEqualsAdvancedFilter.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NumberLessThanOrEquals Advanced Filter. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberLessThanOrEquals") +public class NumberLessThanOrEqualsAdvancedFilter extends AdvancedFilter { + /** + * The filter value. + */ + @JsonProperty(value = "value") + private Double value; + + /** + * Get the filter value. + * + * @return the value value + */ + public Double value() { + return this.value; + } + + /** + * Set the filter value. + * + * @param value the value value to set + * @return the NumberLessThanOrEqualsAdvancedFilter object itself. + */ + public NumberLessThanOrEqualsAdvancedFilter withValue(Double value) { + this.value = value; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberNotInAdvancedFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberNotInAdvancedFilter.java new file mode 100644 index 000000000000..e91d6343bb47 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/NumberNotInAdvancedFilter.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.eventgrid.v2020_01_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NumberNotIn Advanced Filter. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberNotIn") +public class NumberNotInAdvancedFilter extends AdvancedFilter { + /** + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** + * Get the set of filter values. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set the set of filter values. + * + * @param values the values value to set + * @return the NumberNotInAdvancedFilter object itself. + */ + public NumberNotInAdvancedFilter withValues(List values) { + this.values = values; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Operation.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Operation.java new file mode 100644 index 000000000000..c09f138c61f7 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Operation.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.EventGridManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.OperationInner; + +/** + * Type representing Operation. + */ +public interface Operation extends HasInner, HasManager { + /** + * @return the display value. + */ + OperationInfo display(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the origin value. + */ + String origin(); + + /** + * @return the properties value. + */ + Object properties(); + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/OperationInfo.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/OperationInfo.java new file mode 100644 index 000000000000..b28f49ecb27c --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/OperationInfo.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about an operation. + */ +public class OperationInfo { + /** + * Name of the provider. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * Name of the resource type. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * Name of the operation. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * Description of the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get name of the provider. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set name of the provider. + * + * @param provider the provider value to set + * @return the OperationInfo object itself. + */ + public OperationInfo withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get name of the resource type. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set name of the resource type. + * + * @param resource the resource value to set + * @return the OperationInfo object itself. + */ + public OperationInfo withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get name of the operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set name of the operation. + * + * @param operation the operation value to set + * @return the OperationInfo object itself. + */ + public OperationInfo withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the operation. + * + * @param description the description value to set + * @return the OperationInfo object itself. + */ + public OperationInfo withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Operations.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Operations.java new file mode 100644 index 000000000000..322ec98fd74c --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Operations.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.eventgrid.v2020_01_01_preview; + +import rx.Observable; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * List available operations. + * List the available operations supported by the Microsoft.EventGrid resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/ResourceRegionType.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/ResourceRegionType.java new file mode 100644 index 000000000000..23fe98fb5afa --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/ResourceRegionType.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.eventgrid.v2020_01_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ResourceRegionType. + */ +public final class ResourceRegionType extends ExpandableStringEnum { + /** Static value RegionalResource for ResourceRegionType. */ + public static final ResourceRegionType REGIONAL_RESOURCE = fromString("RegionalResource"); + + /** Static value GlobalResource for ResourceRegionType. */ + public static final ResourceRegionType GLOBAL_RESOURCE = fromString("GlobalResource"); + + /** + * Creates or finds a ResourceRegionType from its string representation. + * @param name a name to look for + * @return the corresponding ResourceRegionType + */ + @JsonCreator + public static ResourceRegionType fromString(String name) { + return fromString(name, ResourceRegionType.class); + } + + /** + * @return known ResourceRegionType values + */ + public static Collection values() { + return values(ResourceRegionType.class); + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/RetryPolicy.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/RetryPolicy.java new file mode 100644 index 000000000000..f8df7d045ae9 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/RetryPolicy.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about the retry policy for an event subscription. + */ +public class RetryPolicy { + /** + * Maximum number of delivery retry attempts for events. + */ + @JsonProperty(value = "maxDeliveryAttempts") + private Integer maxDeliveryAttempts; + + /** + * Time To Live (in minutes) for events. + */ + @JsonProperty(value = "eventTimeToLiveInMinutes") + private Integer eventTimeToLiveInMinutes; + + /** + * Get maximum number of delivery retry attempts for events. + * + * @return the maxDeliveryAttempts value + */ + public Integer maxDeliveryAttempts() { + return this.maxDeliveryAttempts; + } + + /** + * Set maximum number of delivery retry attempts for events. + * + * @param maxDeliveryAttempts the maxDeliveryAttempts value to set + * @return the RetryPolicy object itself. + */ + public RetryPolicy withMaxDeliveryAttempts(Integer maxDeliveryAttempts) { + this.maxDeliveryAttempts = maxDeliveryAttempts; + return this; + } + + /** + * Get time To Live (in minutes) for events. + * + * @return the eventTimeToLiveInMinutes value + */ + public Integer eventTimeToLiveInMinutes() { + return this.eventTimeToLiveInMinutes; + } + + /** + * Set time To Live (in minutes) for events. + * + * @param eventTimeToLiveInMinutes the eventTimeToLiveInMinutes value to set + * @return the RetryPolicy object itself. + */ + public RetryPolicy withEventTimeToLiveInMinutes(Integer eventTimeToLiveInMinutes) { + this.eventTimeToLiveInMinutes = eventTimeToLiveInMinutes; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/ServiceBusQueueEventSubscriptionDestination.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/ServiceBusQueueEventSubscriptionDestination.java new file mode 100644 index 000000000000..7d3ee1b765d1 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/ServiceBusQueueEventSubscriptionDestination.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information about the service bus destination for an event subscription. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("ServiceBusQueue") +@JsonFlatten +public class ServiceBusQueueEventSubscriptionDestination extends EventSubscriptionDestination { + /** + * The Azure Resource Id that represents the endpoint of the Service Bus + * destination of an event subscription. + */ + @JsonProperty(value = "properties.resourceId") + private String resourceId; + + /** + * Get the Azure Resource Id that represents the endpoint of the Service Bus destination of an event subscription. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the Azure Resource Id that represents the endpoint of the Service Bus destination of an event subscription. + * + * @param resourceId the resourceId value to set + * @return the ServiceBusQueueEventSubscriptionDestination object itself. + */ + public ServiceBusQueueEventSubscriptionDestination withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/ServiceBusTopicEventSubscriptionDestination.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/ServiceBusTopicEventSubscriptionDestination.java new file mode 100644 index 000000000000..3e289db5ec08 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/ServiceBusTopicEventSubscriptionDestination.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information about the service bus topic destination for an event + * subscription. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("ServiceBusTopic") +@JsonFlatten +public class ServiceBusTopicEventSubscriptionDestination extends EventSubscriptionDestination { + /** + * The Azure Resource Id that represents the endpoint of the Service Bus + * Topic destination of an event subscription. + */ + @JsonProperty(value = "properties.resourceId") + private String resourceId; + + /** + * Get the Azure Resource Id that represents the endpoint of the Service Bus Topic destination of an event subscription. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the Azure Resource Id that represents the endpoint of the Service Bus Topic destination of an event subscription. + * + * @param resourceId the resourceId value to set + * @return the ServiceBusTopicEventSubscriptionDestination object itself. + */ + public ServiceBusTopicEventSubscriptionDestination withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StorageBlobDeadLetterDestination.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StorageBlobDeadLetterDestination.java new file mode 100644 index 000000000000..fac117f4ec2f --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StorageBlobDeadLetterDestination.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information about the storage blob based dead letter destination. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("StorageBlob") +@JsonFlatten +public class StorageBlobDeadLetterDestination extends DeadLetterDestination { + /** + * The Azure Resource ID of the storage account that is the destination of + * the deadletter events. + */ + @JsonProperty(value = "properties.resourceId") + private String resourceId; + + /** + * The name of the Storage blob container that is the destination of the + * deadletter events. + */ + @JsonProperty(value = "properties.blobContainerName") + private String blobContainerName; + + /** + * Get the Azure Resource ID of the storage account that is the destination of the deadletter events. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the Azure Resource ID of the storage account that is the destination of the deadletter events. + * + * @param resourceId the resourceId value to set + * @return the StorageBlobDeadLetterDestination object itself. + */ + public StorageBlobDeadLetterDestination withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the name of the Storage blob container that is the destination of the deadletter events. + * + * @return the blobContainerName value + */ + public String blobContainerName() { + return this.blobContainerName; + } + + /** + * Set the name of the Storage blob container that is the destination of the deadletter events. + * + * @param blobContainerName the blobContainerName value to set + * @return the StorageBlobDeadLetterDestination object itself. + */ + public StorageBlobDeadLetterDestination withBlobContainerName(String blobContainerName) { + this.blobContainerName = blobContainerName; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StorageQueueEventSubscriptionDestination.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StorageQueueEventSubscriptionDestination.java new file mode 100644 index 000000000000..38a387b1484f --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StorageQueueEventSubscriptionDestination.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information about the storage queue destination for an event subscription. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("StorageQueue") +@JsonFlatten +public class StorageQueueEventSubscriptionDestination extends EventSubscriptionDestination { + /** + * The Azure Resource ID of the storage account that contains the queue + * that is the destination of an event subscription. + */ + @JsonProperty(value = "properties.resourceId") + private String resourceId; + + /** + * The name of the Storage queue under a storage account that is the + * destination of an event subscription. + */ + @JsonProperty(value = "properties.queueName") + private String queueName; + + /** + * Get the Azure Resource ID of the storage account that contains the queue that is the destination of an event subscription. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the Azure Resource ID of the storage account that contains the queue that is the destination of an event subscription. + * + * @param resourceId the resourceId value to set + * @return the StorageQueueEventSubscriptionDestination object itself. + */ + public StorageQueueEventSubscriptionDestination withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the name of the Storage queue under a storage account that is the destination of an event subscription. + * + * @return the queueName value + */ + public String queueName() { + return this.queueName; + } + + /** + * Set the name of the Storage queue under a storage account that is the destination of an event subscription. + * + * @param queueName the queueName value to set + * @return the StorageQueueEventSubscriptionDestination object itself. + */ + public StorageQueueEventSubscriptionDestination withQueueName(String queueName) { + this.queueName = queueName; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringBeginsWithAdvancedFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringBeginsWithAdvancedFilter.java new file mode 100644 index 000000000000..baff614e5bb2 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringBeginsWithAdvancedFilter.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.eventgrid.v2020_01_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * StringBeginsWith Advanced Filter. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("StringBeginsWith") +public class StringBeginsWithAdvancedFilter extends AdvancedFilter { + /** + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** + * Get the set of filter values. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set the set of filter values. + * + * @param values the values value to set + * @return the StringBeginsWithAdvancedFilter object itself. + */ + public StringBeginsWithAdvancedFilter withValues(List values) { + this.values = values; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringContainsAdvancedFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringContainsAdvancedFilter.java new file mode 100644 index 000000000000..8e67bc0ad064 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringContainsAdvancedFilter.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.eventgrid.v2020_01_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * StringContains Advanced Filter. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("StringContains") +public class StringContainsAdvancedFilter extends AdvancedFilter { + /** + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** + * Get the set of filter values. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set the set of filter values. + * + * @param values the values value to set + * @return the StringContainsAdvancedFilter object itself. + */ + public StringContainsAdvancedFilter withValues(List values) { + this.values = values; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringEndsWithAdvancedFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringEndsWithAdvancedFilter.java new file mode 100644 index 000000000000..4beddc4e671d --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringEndsWithAdvancedFilter.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.eventgrid.v2020_01_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * StringEndsWith Advanced Filter. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("StringEndsWith") +public class StringEndsWithAdvancedFilter extends AdvancedFilter { + /** + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** + * Get the set of filter values. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set the set of filter values. + * + * @param values the values value to set + * @return the StringEndsWithAdvancedFilter object itself. + */ + public StringEndsWithAdvancedFilter withValues(List values) { + this.values = values; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringInAdvancedFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringInAdvancedFilter.java new file mode 100644 index 000000000000..50ba855dfcd2 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringInAdvancedFilter.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.eventgrid.v2020_01_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * StringIn Advanced Filter. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("StringIn") +public class StringInAdvancedFilter extends AdvancedFilter { + /** + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** + * Get the set of filter values. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set the set of filter values. + * + * @param values the values value to set + * @return the StringInAdvancedFilter object itself. + */ + public StringInAdvancedFilter withValues(List values) { + this.values = values; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringNotInAdvancedFilter.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringNotInAdvancedFilter.java new file mode 100644 index 000000000000..d7ea53172725 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/StringNotInAdvancedFilter.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.eventgrid.v2020_01_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * StringNotIn Advanced Filter. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("StringNotIn") +public class StringNotInAdvancedFilter extends AdvancedFilter { + /** + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** + * Get the set of filter values. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set the set of filter values. + * + * @param values the values value to set + * @return the StringNotInAdvancedFilter object itself. + */ + public StringNotInAdvancedFilter withValues(List values) { + this.values = values; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Topic.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Topic.java new file mode 100644 index 000000000000..f9599ed1c27f --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Topic.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_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.eventgrid.v2020_01_01_preview.implementation.EventGridManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.TopicInner; + +/** + * Type representing Topic. + */ +public interface Topic extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the endpoint value. + */ + String endpoint(); + + /** + * @return the inputSchema value. + */ + InputSchema inputSchema(); + + /** + * @return the inputSchemaMapping value. + */ + InputSchemaMapping inputSchemaMapping(); + + /** + * @return the metricResourceId value. + */ + String metricResourceId(); + + /** + * @return the provisioningState value. + */ + TopicProvisioningState provisioningState(); + + /** + * The entirety of the Topic definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of Topic definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Topic definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the Topic definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the topic definition allowing to specify InputSchema. + */ + interface WithInputSchema { + /** + * Specifies inputSchema. + * @param inputSchema This determines the format that Event Grid should expect for incoming events published to the topic. Possible values include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventSchemaV1_0' + * @return the next definition stage + */ + WithCreate withInputSchema(InputSchema inputSchema); + } + + /** + * The stage of the topic definition allowing to specify InputSchemaMapping. + */ + interface WithInputSchemaMapping { + /** + * Specifies inputSchemaMapping. + * @param inputSchemaMapping This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema + * @return the next definition stage + */ + WithCreate withInputSchemaMapping(InputSchemaMapping inputSchemaMapping); + } + + /** + * 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.WithInputSchema, DefinitionStages.WithInputSchemaMapping { + } + } + /** + * The template for a Topic update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithInputSchema, UpdateStages.WithInputSchemaMapping { + } + + /** + * Grouping of Topic update stages. + */ + interface UpdateStages { + /** + * The stage of the topic update allowing to specify InputSchema. + */ + interface WithInputSchema { + /** + * Specifies inputSchema. + * @param inputSchema This determines the format that Event Grid should expect for incoming events published to the topic. Possible values include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventSchemaV1_0' + * @return the next update stage + */ + Update withInputSchema(InputSchema inputSchema); + } + + /** + * The stage of the topic update allowing to specify InputSchemaMapping. + */ + interface WithInputSchemaMapping { + /** + * Specifies inputSchemaMapping. + * @param inputSchemaMapping This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema + * @return the next update stage + */ + Update withInputSchemaMapping(InputSchemaMapping inputSchemaMapping); + } + + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicProvisioningState.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicProvisioningState.java new file mode 100644 index 000000000000..5eca362633b3 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicProvisioningState.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.eventgrid.v2020_01_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for TopicProvisioningState. + */ +public final class TopicProvisioningState extends ExpandableStringEnum { + /** Static value Creating for TopicProvisioningState. */ + public static final TopicProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for TopicProvisioningState. */ + public static final TopicProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for TopicProvisioningState. */ + public static final TopicProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for TopicProvisioningState. */ + public static final TopicProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for TopicProvisioningState. */ + public static final TopicProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for TopicProvisioningState. */ + public static final TopicProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a TopicProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding TopicProvisioningState + */ + @JsonCreator + public static TopicProvisioningState fromString(String name) { + return fromString(name, TopicProvisioningState.class); + } + + /** + * @return known TopicProvisioningState values + */ + public static Collection values() { + return values(TopicProvisioningState.class); + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicRegenerateKeyRequest.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicRegenerateKeyRequest.java new file mode 100644 index 000000000000..db1d0e9dccbf --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicRegenerateKeyRequest.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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Topic regenerate share access key request. + */ +public class TopicRegenerateKeyRequest { + /** + * Key name to regenerate key1 or key2. + */ + @JsonProperty(value = "keyName", required = true) + private String keyName; + + /** + * Get key name to regenerate key1 or key2. + * + * @return the keyName value + */ + public String keyName() { + return this.keyName; + } + + /** + * Set key name to regenerate key1 or key2. + * + * @param keyName the keyName value to set + * @return the TopicRegenerateKeyRequest object itself. + */ + public TopicRegenerateKeyRequest withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicSharedAccessKeys.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicSharedAccessKeys.java new file mode 100644 index 000000000000..94f1774f4491 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicSharedAccessKeys.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.eventgrid.v2020_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.EventGridManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.TopicSharedAccessKeysInner; + +/** + * Type representing TopicSharedAccessKeys. + */ +public interface TopicSharedAccessKeys extends HasInner, HasManager { + /** + * @return the key1 value. + */ + String key1(); + + /** + * @return the key2 value. + */ + String key2(); + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicTypeInfo.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicTypeInfo.java new file mode 100644 index 000000000000..fe9b24edcdc2 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicTypeInfo.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.eventgrid.v2020_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.EventGridManager; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.TopicTypeInfoInner; +import java.util.List; + +/** + * Type representing TopicTypeInfo. + */ +public interface TopicTypeInfo extends HasInner, HasManager { + /** + * @return the description value. + */ + String description(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provider value. + */ + String provider(); + + /** + * @return the provisioningState value. + */ + TopicTypeProvisioningState provisioningState(); + + /** + * @return the resourceRegionType value. + */ + ResourceRegionType resourceRegionType(); + + /** + * @return the supportedLocations value. + */ + List supportedLocations(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicTypeProvisioningState.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicTypeProvisioningState.java new file mode 100644 index 000000000000..c49eee139177 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicTypeProvisioningState.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.eventgrid.v2020_01_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for TopicTypeProvisioningState. + */ +public final class TopicTypeProvisioningState extends ExpandableStringEnum { + /** Static value Creating for TopicTypeProvisioningState. */ + public static final TopicTypeProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for TopicTypeProvisioningState. */ + public static final TopicTypeProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for TopicTypeProvisioningState. */ + public static final TopicTypeProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for TopicTypeProvisioningState. */ + public static final TopicTypeProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for TopicTypeProvisioningState. */ + public static final TopicTypeProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for TopicTypeProvisioningState. */ + public static final TopicTypeProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a TopicTypeProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding TopicTypeProvisioningState + */ + @JsonCreator + public static TopicTypeProvisioningState fromString(String name) { + return fromString(name, TopicTypeProvisioningState.class); + } + + /** + * @return known TopicTypeProvisioningState values + */ + public static Collection values() { + return values(TopicTypeProvisioningState.class); + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicTypes.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicTypes.java new file mode 100644 index 000000000000..42870a79d036 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicTypes.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.eventgrid.v2020_01_01_preview; + +import rx.Observable; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.TopicTypesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing TopicTypes. + */ +public interface TopicTypes extends HasInner { + /** + * List event types. + * List event types for a topic type. + * + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listEventTypesAsync(String topicTypeName); + + /** + * Get a topic type. + * Get information about a topic type. + * + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String topicTypeName); + + /** + * List topic types. + * List all registered topic types. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicUpdateParameters.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicUpdateParameters.java new file mode 100644 index 000000000000..990d0b91b256 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/TopicUpdateParameters.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.eventgrid.v2020_01_01_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the Topic update. + */ +public class TopicUpdateParameters { + /** + * Tags of the resource. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get tags of the resource. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set tags of the resource. + * + * @param tags the tags value to set + * @return the TopicUpdateParameters object itself. + */ + public TopicUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Topics.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Topics.java new file mode 100644 index 000000000000..0614d8009bcd --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/Topics.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_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 com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation.TopicsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Topics. + */ +public interface Topics extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * List keys for a topic. + * List the two keys used to publish to a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listSharedAccessKeysAsync(String resourceGroupName, String topicName); + + /** + * Regenerate key for a topic. + * Regenerate a shared access key for a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param keyName Key name to regenerate key1 or key2 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable regenerateKeyAsync(String resourceGroupName, String topicName, String keyName); + + /** + * List topic event types. + * List event types for a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the topic type + * @param resourceName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listEventTypesAsync(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName); + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/WebHookEventSubscriptionDestination.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/WebHookEventSubscriptionDestination.java new file mode 100644 index 000000000000..33ae3b9dbda7 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/WebHookEventSubscriptionDestination.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information about the webhook destination for an event subscription. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("WebHook") +@JsonFlatten +public class WebHookEventSubscriptionDestination extends EventSubscriptionDestination { + /** + * The URL that represents the endpoint of the destination of an event + * subscription. + */ + @JsonProperty(value = "properties.endpointUrl") + private String endpointUrl; + + /** + * The base URL that represents the endpoint of the destination of an event + * subscription. + */ + @JsonProperty(value = "properties.endpointBaseUrl", access = JsonProperty.Access.WRITE_ONLY) + private String endpointBaseUrl; + + /** + * Maximum number of events per batch. + */ + @JsonProperty(value = "properties.maxEventsPerBatch") + private Integer maxEventsPerBatch; + + /** + * Preferred batch size in Kilobytes. + */ + @JsonProperty(value = "properties.preferredBatchSizeInKilobytes") + private Integer preferredBatchSizeInKilobytes; + + /** + * The AAD application ID or URI to get the access token that will be + * included as the bearer token in delivery requests. + */ + @JsonProperty(value = "properties.azureActiveDirectoryApplicationIdOrUri") + private String azureActiveDirectoryApplicationIdOrUri; + + /** + * Get the URL that represents the endpoint of the destination of an event subscription. + * + * @return the endpointUrl value + */ + public String endpointUrl() { + return this.endpointUrl; + } + + /** + * Set the URL that represents the endpoint of the destination of an event subscription. + * + * @param endpointUrl the endpointUrl value to set + * @return the WebHookEventSubscriptionDestination object itself. + */ + public WebHookEventSubscriptionDestination withEndpointUrl(String endpointUrl) { + this.endpointUrl = endpointUrl; + return this; + } + + /** + * Get the base URL that represents the endpoint of the destination of an event subscription. + * + * @return the endpointBaseUrl value + */ + public String endpointBaseUrl() { + return this.endpointBaseUrl; + } + + /** + * Get maximum number of events per batch. + * + * @return the maxEventsPerBatch value + */ + public Integer maxEventsPerBatch() { + return this.maxEventsPerBatch; + } + + /** + * Set maximum number of events per batch. + * + * @param maxEventsPerBatch the maxEventsPerBatch value to set + * @return the WebHookEventSubscriptionDestination object itself. + */ + public WebHookEventSubscriptionDestination withMaxEventsPerBatch(Integer maxEventsPerBatch) { + this.maxEventsPerBatch = maxEventsPerBatch; + return this; + } + + /** + * Get preferred batch size in Kilobytes. + * + * @return the preferredBatchSizeInKilobytes value + */ + public Integer preferredBatchSizeInKilobytes() { + return this.preferredBatchSizeInKilobytes; + } + + /** + * Set preferred batch size in Kilobytes. + * + * @param preferredBatchSizeInKilobytes the preferredBatchSizeInKilobytes value to set + * @return the WebHookEventSubscriptionDestination object itself. + */ + public WebHookEventSubscriptionDestination withPreferredBatchSizeInKilobytes(Integer preferredBatchSizeInKilobytes) { + this.preferredBatchSizeInKilobytes = preferredBatchSizeInKilobytes; + return this; + } + + /** + * Get the AAD application ID or URI to get the access token that will be included as the bearer token in delivery requests. + * + * @return the azureActiveDirectoryApplicationIdOrUri value + */ + public String azureActiveDirectoryApplicationIdOrUri() { + return this.azureActiveDirectoryApplicationIdOrUri; + } + + /** + * Set the AAD application ID or URI to get the access token that will be included as the bearer token in delivery requests. + * + * @param azureActiveDirectoryApplicationIdOrUri the azureActiveDirectoryApplicationIdOrUri value to set + * @return the WebHookEventSubscriptionDestination object itself. + */ + public WebHookEventSubscriptionDestination withAzureActiveDirectoryApplicationIdOrUri(String azureActiveDirectoryApplicationIdOrUri) { + this.azureActiveDirectoryApplicationIdOrUri = azureActiveDirectoryApplicationIdOrUri; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainImpl.java new file mode 100644 index 000000000000..da36ca2d063b --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainImpl.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Domain; +import rx.Observable; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.DomainProvisioningState; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.InputSchema; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.InputSchemaMapping; + +class DomainImpl extends GroupableResourceCoreImpl implements Domain, Domain.Definition, Domain.Update { + DomainImpl(String name, DomainInner inner, EventGridManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + DomainsInner client = this.manager().inner().domains(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DomainsInner client = this.manager().inner().domains(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DomainsInner client = this.manager().inner().domains(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String endpoint() { + return this.inner().endpoint(); + } + + @Override + public InputSchema inputSchema() { + return this.inner().inputSchema(); + } + + @Override + public InputSchemaMapping inputSchemaMapping() { + return this.inner().inputSchemaMapping(); + } + + @Override + public String metricResourceId() { + return this.inner().metricResourceId(); + } + + @Override + public DomainProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public DomainImpl withInputSchema(InputSchema inputSchema) { + this.inner().withInputSchema(inputSchema); + return this; + } + + @Override + public DomainImpl withInputSchemaMapping(InputSchemaMapping inputSchemaMapping) { + this.inner().withInputSchemaMapping(inputSchemaMapping); + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainInner.java new file mode 100644 index 000000000000..fc79f9168ee1 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainInner.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.DomainProvisioningState; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.InputSchema; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.InputSchemaMapping; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * EventGrid Domain. + */ +@JsonFlatten +public class DomainInner extends Resource { + /** + * Provisioning state of the domain. Possible values include: 'Creating', + * 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private DomainProvisioningState provisioningState; + + /** + * Endpoint for the domain. + */ + @JsonProperty(value = "properties.endpoint", access = JsonProperty.Access.WRITE_ONLY) + private String endpoint; + + /** + * This determines the format that Event Grid should expect for incoming + * events published to the domain. Possible values include: + * 'EventGridSchema', 'CustomEventSchema', 'CloudEventSchemaV1_0'. + */ + @JsonProperty(value = "properties.inputSchema") + private InputSchema inputSchema; + + /** + * Information about the InputSchemaMapping which specified the info about + * mapping event payload. + */ + @JsonProperty(value = "properties.inputSchemaMapping") + private InputSchemaMapping inputSchemaMapping; + + /** + * Metric resource id for the domain. + */ + @JsonProperty(value = "properties.metricResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String metricResourceId; + + /** + * Get provisioning state of the domain. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'. + * + * @return the provisioningState value + */ + public DomainProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get endpoint for the domain. + * + * @return the endpoint value + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Get this determines the format that Event Grid should expect for incoming events published to the domain. Possible values include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventSchemaV1_0'. + * + * @return the inputSchema value + */ + public InputSchema inputSchema() { + return this.inputSchema; + } + + /** + * Set this determines the format that Event Grid should expect for incoming events published to the domain. Possible values include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventSchemaV1_0'. + * + * @param inputSchema the inputSchema value to set + * @return the DomainInner object itself. + */ + public DomainInner withInputSchema(InputSchema inputSchema) { + this.inputSchema = inputSchema; + return this; + } + + /** + * Get information about the InputSchemaMapping which specified the info about mapping event payload. + * + * @return the inputSchemaMapping value + */ + public InputSchemaMapping inputSchemaMapping() { + return this.inputSchemaMapping; + } + + /** + * Set information about the InputSchemaMapping which specified the info about mapping event payload. + * + * @param inputSchemaMapping the inputSchemaMapping value to set + * @return the DomainInner object itself. + */ + public DomainInner withInputSchemaMapping(InputSchemaMapping inputSchemaMapping) { + this.inputSchemaMapping = inputSchemaMapping; + return this; + } + + /** + * Get metric resource id for the domain. + * + * @return the metricResourceId value + */ + public String metricResourceId() { + return this.metricResourceId; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainSharedAccessKeysImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainSharedAccessKeysImpl.java new file mode 100644 index 000000000000..ac4b1f0e63de --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainSharedAccessKeysImpl.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.DomainSharedAccessKeys; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class DomainSharedAccessKeysImpl extends WrapperImpl implements DomainSharedAccessKeys { + private final EventGridManager manager; + DomainSharedAccessKeysImpl(DomainSharedAccessKeysInner inner, EventGridManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public EventGridManager manager() { + return this.manager; + } + + @Override + public String key1() { + return this.inner().key1(); + } + + @Override + public String key2() { + return this.inner().key2(); + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainSharedAccessKeysInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainSharedAccessKeysInner.java new file mode 100644 index 000000000000..a3dee3146799 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainSharedAccessKeysInner.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.eventgrid.v2020_01_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Shared access keys of the Domain. + */ +public class DomainSharedAccessKeysInner { + /** + * Shared access key1 for the domain. + */ + @JsonProperty(value = "key1") + private String key1; + + /** + * Shared access key2 for the domain. + */ + @JsonProperty(value = "key2") + private String key2; + + /** + * Get shared access key1 for the domain. + * + * @return the key1 value + */ + public String key1() { + return this.key1; + } + + /** + * Set shared access key1 for the domain. + * + * @param key1 the key1 value to set + * @return the DomainSharedAccessKeysInner object itself. + */ + public DomainSharedAccessKeysInner withKey1(String key1) { + this.key1 = key1; + return this; + } + + /** + * Get shared access key2 for the domain. + * + * @return the key2 value + */ + public String key2() { + return this.key2; + } + + /** + * Set shared access key2 for the domain. + * + * @param key2 the key2 value to set + * @return the DomainSharedAccessKeysInner object itself. + */ + public DomainSharedAccessKeysInner withKey2(String key2) { + this.key2 = key2; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicImpl.java new file mode 100644 index 000000000000..9417497506c4 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicImpl.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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.DomainTopic; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.DomainTopicProvisioningState; + +class DomainTopicImpl extends CreatableUpdatableImpl implements DomainTopic, DomainTopic.Definition, DomainTopic.Update { + private final EventGridManager manager; + private String resourceGroupName; + private String domainName; + private String domainTopicName; + + DomainTopicImpl(String name, EventGridManager manager) { + super(name, new DomainTopicInner()); + this.manager = manager; + // Set resource name + this.domainTopicName = name; + // + } + + DomainTopicImpl(DomainTopicInner inner, EventGridManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.domainTopicName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.domainName = IdParsingUtils.getValueFromIdByName(inner.id(), "domains"); + this.domainTopicName = IdParsingUtils.getValueFromIdByName(inner.id(), "topics"); + // + } + + @Override + public EventGridManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + DomainTopicsInner client = this.manager().inner().domainTopics(); + return client.createOrUpdateAsync(this.resourceGroupName, this.domainName, this.domainTopicName) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DomainTopicsInner client = this.manager().inner().domainTopics(); + return client.createOrUpdateAsync(this.resourceGroupName, this.domainName, this.domainTopicName) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DomainTopicsInner client = this.manager().inner().domainTopics(); + return client.getAsync(this.resourceGroupName, this.domainName, this.domainTopicName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public DomainTopicProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DomainTopicImpl withExistingDomain(String resourceGroupName, String domainName) { + this.resourceGroupName = resourceGroupName; + this.domainName = domainName; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicInner.java new file mode 100644 index 000000000000..bb9e4ab69175 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicInner.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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.DomainTopicProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Domain Topic. + */ +@JsonFlatten +public class DomainTopicInner extends ProxyResource { + /** + * Provisioning state of the domain topic. Possible values include: + * 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState") + private DomainTopicProvisioningState provisioningState; + + /** + * Get provisioning state of the domain topic. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'. + * + * @return the provisioningState value + */ + public DomainTopicProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set provisioning state of the domain topic. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'. + * + * @param provisioningState the provisioningState value to set + * @return the DomainTopicInner object itself. + */ + public DomainTopicInner withProvisioningState(DomainTopicProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicsImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicsImpl.java new file mode 100644 index 000000000000..c286766e00e6 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.DomainTopics; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.DomainTopic; + +class DomainTopicsImpl extends WrapperImpl implements DomainTopics { + private final EventGridManager manager; + + DomainTopicsImpl(EventGridManager manager) { + super(manager.inner().domainTopics()); + this.manager = manager; + } + + public EventGridManager manager() { + return this.manager; + } + + @Override + public DomainTopicImpl define(String name) { + return wrapModel(name); + } + + private DomainTopicImpl wrapModel(DomainTopicInner inner) { + return new DomainTopicImpl(inner, manager()); + } + + private DomainTopicImpl wrapModel(String name) { + return new DomainTopicImpl(name, this.manager()); + } + + @Override + public Observable listByDomainAsync(final String resourceGroupName, final String domainName) { + DomainTopicsInner client = this.inner(); + return client.listByDomainAsync(resourceGroupName, domainName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DomainTopic call(DomainTopicInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String domainName, String domainTopicName) { + DomainTopicsInner client = this.inner(); + return client.getAsync(resourceGroupName, domainName, domainTopicName) + .flatMap(new Func1>() { + @Override + public Observable call(DomainTopicInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DomainTopic)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String domainName, String domainTopicName) { + DomainTopicsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, domainName, domainTopicName).toCompletable(); + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicsInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicsInner.java new file mode 100644 index 000000000000..e5d61b46c2a0 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainTopicsInner.java @@ -0,0 +1,919 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +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 DomainTopics. + */ +public class DomainTopicsInner { + /** The Retrofit service to perform REST calls. */ + private DomainTopicsService service; + /** The service client containing this operation class. */ + private EventGridManagementClientImpl client; + + /** + * Initializes an instance of DomainTopicsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DomainTopicsInner(Retrofit retrofit, EventGridManagementClientImpl client) { + this.service = retrofit.create(DomainTopicsService.class); + this.client = client; + } + + /** + * The interface defining all the services for DomainTopics to be + * used by Retrofit to perform actually REST calls. + */ + interface DomainTopicsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_01_01_preview.DomainTopics get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("domainTopicName") String domainTopicName, @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.eventgrid.v2020_01_01_preview.DomainTopics createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("domainTopicName") String domainTopicName, @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.eventgrid.v2020_01_01_preview.DomainTopics beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("domainTopicName") String domainTopicName, @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.eventgrid.v2020_01_01_preview.DomainTopics delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("domainTopicName") String domainTopicName, @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.eventgrid.v2020_01_01_preview.DomainTopics beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("domainTopicName") String domainTopicName, @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.eventgrid.v2020_01_01_preview.DomainTopics listByDomain" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics") + Observable> listByDomain(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.DomainTopics listByDomainNext" }) + @GET + Observable> listByDomainNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get a domain topic. + * Get properties of a domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DomainTopicInner object if successful. + */ + public DomainTopicInner get(String resourceGroupName, String domainName, String domainTopicName) { + return getWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName).toBlocking().single().body(); + } + + /** + * Get a domain topic. + * Get properties of a domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the topic + * @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 domainName, String domainTopicName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName), serviceCallback); + } + + /** + * Get a domain topic. + * Get properties of a domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainTopicInner object + */ + public Observable getAsync(String resourceGroupName, String domainName, String domainTopicName) { + return getWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName).map(new Func1, DomainTopicInner>() { + @Override + public DomainTopicInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a domain topic. + * Get properties of a domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainTopicInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String domainName, String domainTopicName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); + } + if (domainTopicName == null) { + throw new IllegalArgumentException("Parameter domainTopicName 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, domainName, domainTopicName, 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); + } + + /** + * Create or update a domain topic. + * Asynchronously creates or updates a new domain topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DomainTopicInner object if successful. + */ + public DomainTopicInner createOrUpdate(String resourceGroupName, String domainName, String domainTopicName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName).toBlocking().last().body(); + } + + /** + * Create or update a domain topic. + * Asynchronously creates or updates a new domain topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @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 domainName, String domainTopicName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName), serviceCallback); + } + + /** + * Create or update a domain topic. + * Asynchronously creates or updates a new domain topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String domainName, String domainTopicName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName).map(new Func1, DomainTopicInner>() { + @Override + public DomainTopicInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a domain topic. + * Asynchronously creates or updates a new domain topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String domainName, String domainTopicName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); + } + if (domainTopicName == null) { + throw new IllegalArgumentException("Parameter domainTopicName 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.createOrUpdate(this.client.subscriptionId(), resourceGroupName, domainName, domainTopicName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a domain topic. + * Asynchronously creates or updates a new domain topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DomainTopicInner object if successful. + */ + public DomainTopicInner beginCreateOrUpdate(String resourceGroupName, String domainName, String domainTopicName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName).toBlocking().single().body(); + } + + /** + * Create or update a domain topic. + * Asynchronously creates or updates a new domain topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String domainName, String domainTopicName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName), serviceCallback); + } + + /** + * Create or update a domain topic. + * Asynchronously creates or updates a new domain topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainTopicInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String domainName, String domainTopicName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName).map(new Func1, DomainTopicInner>() { + @Override + public DomainTopicInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a domain topic. + * Asynchronously creates or updates a new domain topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainTopicInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String domainName, String domainTopicName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); + } + if (domainTopicName == null) { + throw new IllegalArgumentException("Parameter domainTopicName 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.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, domainName, domainTopicName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a domain topic. + * Delete existing domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 domainName, String domainTopicName) { + deleteWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName).toBlocking().last().body(); + } + + /** + * Delete a domain topic. + * Delete existing domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @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 domainName, String domainTopicName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName), serviceCallback); + } + + /** + * Delete a domain topic. + * Delete existing domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String domainName, String domainTopicName) { + return deleteWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a domain topic. + * Delete existing domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String domainName, String domainTopicName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); + } + if (domainTopicName == null) { + throw new IllegalArgumentException("Parameter domainTopicName 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, domainName, domainTopicName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a domain topic. + * Delete existing domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 domainName, String domainTopicName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName).toBlocking().single().body(); + } + + /** + * Delete a domain topic. + * Delete existing domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @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 domainName, String domainTopicName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName), serviceCallback); + } + + /** + * Delete a domain topic. + * Delete existing domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String domainName, String domainTopicName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, domainName, domainTopicName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a domain topic. + * Delete existing domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainTopicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String domainName, String domainTopicName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); + } + if (domainTopicName == null) { + throw new IllegalArgumentException("Parameter domainTopicName 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, domainName, domainTopicName, 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(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List domain topics. + * List all the topics in a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<DomainTopicInner> object if successful. + */ + public PagedList listByDomain(final String resourceGroupName, final String domainName) { + ServiceResponse> response = listByDomainSinglePageAsync(resourceGroupName, domainName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByDomainNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List domain topics. + * List all the topics in a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Domain name. + * @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> listByDomainAsync(final String resourceGroupName, final String domainName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByDomainSinglePageAsync(resourceGroupName, domainName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByDomainNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List domain topics. + * List all the topics in a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainTopicInner> object + */ + public Observable> listByDomainAsync(final String resourceGroupName, final String domainName) { + return listByDomainWithServiceResponseAsync(resourceGroupName, domainName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List domain topics. + * List all the topics in a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainTopicInner> object + */ + public Observable>> listByDomainWithServiceResponseAsync(final String resourceGroupName, final String domainName) { + return listByDomainSinglePageAsync(resourceGroupName, domainName) + .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(listByDomainNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List domain topics. + * List all the topics in a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DomainTopicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByDomainSinglePageAsync(final String resourceGroupName, final String domainName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName 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; + return service.listByDomain(this.client.subscriptionId(), resourceGroupName, domainName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByDomainDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List domain topics. + * List all the topics in a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Domain name. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<DomainTopicInner> object if successful. + */ + public PagedList listByDomain(final String resourceGroupName, final String domainName, final String filter, final Integer top) { + ServiceResponse> response = listByDomainSinglePageAsync(resourceGroupName, domainName, filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByDomainNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List domain topics. + * List all the topics in a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Domain name. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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> listByDomainAsync(final String resourceGroupName, final String domainName, final String filter, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByDomainSinglePageAsync(resourceGroupName, domainName, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByDomainNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List domain topics. + * List all the topics in a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Domain name. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainTopicInner> object + */ + public Observable> listByDomainAsync(final String resourceGroupName, final String domainName, final String filter, final Integer top) { + return listByDomainWithServiceResponseAsync(resourceGroupName, domainName, filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List domain topics. + * List all the topics in a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Domain name. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainTopicInner> object + */ + public Observable>> listByDomainWithServiceResponseAsync(final String resourceGroupName, final String domainName, final String filter, final Integer top) { + return listByDomainSinglePageAsync(resourceGroupName, domainName, filter, top) + .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(listByDomainNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List domain topics. + * List all the topics in a domain. + * + ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription. + ServiceResponse> * @param domainName Domain name. + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DomainTopicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByDomainSinglePageAsync(final String resourceGroupName, final String domainName, final String filter, final Integer top) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName 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.listByDomain(this.client.subscriptionId(), resourceGroupName, domainName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByDomainDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByDomainDelegate(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); + } + + /** + * List domain topics. + * List all the topics in a domain. + * + * @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<DomainTopicInner> object if successful. + */ + public PagedList listByDomainNext(final String nextPageLink) { + ServiceResponse> response = listByDomainNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByDomainNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List domain topics. + * List all the topics in a domain. + * + * @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> listByDomainNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByDomainNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByDomainNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List domain topics. + * List all the topics in a domain. + * + * @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<DomainTopicInner> object + */ + public Observable> listByDomainNextAsync(final String nextPageLink) { + return listByDomainNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List domain topics. + * List all the topics in a domain. + * + * @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<DomainTopicInner> object + */ + public Observable>> listByDomainNextWithServiceResponseAsync(final String nextPageLink) { + return listByDomainNextSinglePageAsync(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(listByDomainNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List domain topics. + * List all the topics in a domain. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DomainTopicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByDomainNextSinglePageAsync(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.listByDomainNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByDomainNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByDomainNextDelegate(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/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainsImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainsImpl.java new file mode 100644 index 000000000000..a349dcf79580 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainsImpl.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Domains; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Domain; +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.eventgrid.v2020_01_01_preview.DomainSharedAccessKeys; + +class DomainsImpl extends GroupableResourcesCoreImpl implements Domains { + protected DomainsImpl(EventGridManager manager) { + super(manager.inner().domains(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + DomainsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + DomainsInner 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) { + DomainsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + DomainsInner 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 Domain call(DomainInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + DomainsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + DomainsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Domain call(DomainInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public DomainImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable listSharedAccessKeysAsync(String resourceGroupName, String domainName) { + DomainsInner client = this.inner(); + return client.listSharedAccessKeysAsync(resourceGroupName, domainName) + .map(new Func1() { + @Override + public DomainSharedAccessKeys call(DomainSharedAccessKeysInner inner) { + return new DomainSharedAccessKeysImpl(inner, manager()); + } + }); + } + + @Override + public Observable regenerateKeyAsync(String resourceGroupName, String domainName, String keyName) { + DomainsInner client = this.inner(); + return client.regenerateKeyAsync(resourceGroupName, domainName, keyName) + .map(new Func1() { + @Override + public DomainSharedAccessKeys call(DomainSharedAccessKeysInner inner) { + return new DomainSharedAccessKeysImpl(inner, manager()); + } + }); + } + + @Override + protected DomainImpl wrapModel(DomainInner inner) { + return new DomainImpl(inner.name(), inner, manager()); + } + + @Override + protected DomainImpl wrapModel(String name) { + return new DomainImpl(name, new DomainInner(), this.manager()); + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainsInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainsInner.java new file mode 100644 index 000000000000..60a00576bf9f --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/DomainsInner.java @@ -0,0 +1,1790 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_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.eventgrid.v2020_01_01_preview.DomainRegenerateKeyRequest; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.DomainUpdateParameters; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 Domains. + */ +public class DomainsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private DomainsService service; + /** The service client containing this operation class. */ + private EventGridManagementClientImpl client; + + /** + * Initializes an instance of DomainsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DomainsInner(Retrofit retrofit, EventGridManagementClientImpl client) { + this.service = retrofit.create(DomainsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Domains to be + * used by Retrofit to perform actually REST calls. + */ + interface DomainsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Domains getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @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.eventgrid.v2020_01_01_preview.Domains createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Body DomainInner domainInfo, @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.eventgrid.v2020_01_01_preview.Domains beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Body DomainInner domainInfo, @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.eventgrid.v2020_01_01_preview.Domains delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @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.eventgrid.v2020_01_01_preview.Domains beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @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.eventgrid.v2020_01_01_preview.Domains update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DomainUpdateParameters domainUpdateParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Domains beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DomainUpdateParameters domainUpdateParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Domains list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/domains") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.Domains listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.Domains listSharedAccessKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/listKeys") + Observable> listSharedAccessKeys(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @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.eventgrid.v2020_01_01_preview.Domains regenerateKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/regenerateKey") + Observable> regenerateKey(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DomainRegenerateKeyRequest regenerateKeyRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Domains 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.eventgrid.v2020_01_01_preview.Domains listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get a domain. + * Get properties of a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DomainInner object if successful. + */ + public DomainInner getByResourceGroup(String resourceGroupName, String domainName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, domainName).toBlocking().single().body(); + } + + /** + * Get a domain. + * Get properties of a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @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 domainName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, domainName), serviceCallback); + } + + /** + * Get a domain. + * Get properties of a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String domainName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1, DomainInner>() { + @Override + public DomainInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a domain. + * Get properties of a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String domainName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName 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, domainName, 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); + } + + /** + * Create or update a domain. + * Asynchronously creates or updates a new domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainInfo Domain information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DomainInner object if successful. + */ + public DomainInner createOrUpdate(String resourceGroupName, String domainName, DomainInner domainInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainInfo).toBlocking().last().body(); + } + + /** + * Create or update a domain. + * Asynchronously creates or updates a new domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainInfo Domain information + * @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 domainName, DomainInner domainInfo, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainInfo), serviceCallback); + } + + /** + * Create or update a domain. + * Asynchronously creates or updates a new domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainInfo Domain information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String domainName, DomainInner domainInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainInfo).map(new Func1, DomainInner>() { + @Override + public DomainInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a domain. + * Asynchronously creates or updates a new domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainInfo Domain information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String domainName, DomainInner domainInfo) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); + } + if (domainInfo == null) { + throw new IllegalArgumentException("Parameter domainInfo 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(domainInfo); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, domainName, domainInfo, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a domain. + * Asynchronously creates or updates a new domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainInfo Domain information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DomainInner object if successful. + */ + public DomainInner beginCreateOrUpdate(String resourceGroupName, String domainName, DomainInner domainInfo) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainInfo).toBlocking().single().body(); + } + + /** + * Create or update a domain. + * Asynchronously creates or updates a new domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainInfo Domain information + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String domainName, DomainInner domainInfo, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainInfo), serviceCallback); + } + + /** + * Create or update a domain. + * Asynchronously creates or updates a new domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainInfo Domain information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String domainName, DomainInner domainInfo) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainInfo).map(new Func1, DomainInner>() { + @Override + public DomainInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a domain. + * Asynchronously creates or updates a new domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param domainInfo Domain information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String domainName, DomainInner domainInfo) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); + } + if (domainInfo == null) { + throw new IllegalArgumentException("Parameter domainInfo 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(domainInfo); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, domainName, domainInfo, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a domain. + * Delete existing domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 domainName) { + deleteWithServiceResponseAsync(resourceGroupName, domainName).toBlocking().last().body(); + } + + /** + * Delete a domain. + * Delete existing domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @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 domainName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, domainName), serviceCallback); + } + + /** + * Delete a domain. + * Delete existing domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String domainName) { + return deleteWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a domain. + * Delete existing domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String domainName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName 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, domainName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a domain. + * Delete existing domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 domainName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, domainName).toBlocking().single().body(); + } + + /** + * Delete a domain. + * Delete existing domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @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 domainName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, domainName), serviceCallback); + } + + /** + * Delete a domain. + * Delete existing domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String domainName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a domain. + * Delete existing domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String domainName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName 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, domainName, 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(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DomainInner object if successful. + */ + public DomainInner update(String resourceGroupName, String domainName) { + return updateWithServiceResponseAsync(resourceGroupName, domainName).toBlocking().last().body(); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @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 domainName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, domainName), serviceCallback); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String domainName) { + return updateWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1, DomainInner>() { + @Override + public DomainInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String domainName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName 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 Map tags = null; + DomainUpdateParameters domainUpdateParameters = new DomainUpdateParameters(); + domainUpdateParameters.withTags(null); + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, domainName, this.client.apiVersion(), this.client.acceptLanguage(), domainUpdateParameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param tags Tags of the domains resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DomainInner object if successful. + */ + public DomainInner update(String resourceGroupName, String domainName, Map tags) { + return updateWithServiceResponseAsync(resourceGroupName, domainName, tags).toBlocking().last().body(); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param tags Tags of the domains resource + * @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 domainName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, domainName, tags), serviceCallback); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param tags Tags of the domains resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String domainName, Map tags) { + return updateWithServiceResponseAsync(resourceGroupName, domainName, tags).map(new Func1, DomainInner>() { + @Override + public DomainInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param tags Tags of the domains resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String domainName, Map tags) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName 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(tags); + DomainUpdateParameters domainUpdateParameters = new DomainUpdateParameters(); + domainUpdateParameters.withTags(tags); + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, domainName, this.client.apiVersion(), this.client.acceptLanguage(), domainUpdateParameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DomainInner object if successful. + */ + public DomainInner beginUpdate(String resourceGroupName, String domainName) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, domainName).toBlocking().single().body(); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @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 domainName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, domainName), serviceCallback); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String domainName) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1, DomainInner>() { + @Override + public DomainInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String domainName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName 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 Map tags = null; + DomainUpdateParameters domainUpdateParameters = new DomainUpdateParameters(); + domainUpdateParameters.withTags(null); + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, domainName, this.client.apiVersion(), this.client.acceptLanguage(), domainUpdateParameters, 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); + } + } + }); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param tags Tags of the domains resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DomainInner object if successful. + */ + public DomainInner beginUpdate(String resourceGroupName, String domainName, Map tags) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, domainName, tags).toBlocking().single().body(); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param tags Tags of the domains resource + * @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 domainName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, domainName, tags), serviceCallback); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param tags Tags of the domains resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String domainName, Map tags) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, domainName, tags).map(new Func1, DomainInner>() { + @Override + public DomainInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a domain. + * Asynchronously updates a domain with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param tags Tags of the domains resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String domainName, Map tags) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName 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(tags); + DomainUpdateParameters domainUpdateParameters = new DomainUpdateParameters(); + domainUpdateParameters.withTags(tags); + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, domainName, this.client.apiVersion(), this.client.acceptLanguage(), domainUpdateParameters, 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(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<DomainInner> 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(); + } + }; + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + * @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); + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> 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)); + } + }); + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DomainInner> 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; + return service.list(this.client.subscriptionId(), this.client.apiVersion(), filter, top, 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); + } + } + }); + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<DomainInner> object if successful. + */ + public PagedList list(final String filter, final Integer top) { + ServiceResponse> response = listSinglePageAsync(filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> object + */ + public Observable> listAsync(final String filter, final Integer top) { + return listWithServiceResponseAsync(filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> object + */ + public Observable>> listWithServiceResponseAsync(final String filter, final Integer top) { + return listSinglePageAsync(filter, top) + .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)); + } + }); + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DomainInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String filter, final Integer top) { + 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(), this.client.apiVersion(), filter, top, 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); + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<DomainInner> 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(); + } + }; + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @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); + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> 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)); + } + }); + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DomainInner> 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; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), filter, top, 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); + } + } + }); + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<DomainInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, final String filter, final Integer top) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, final String filter, final Integer top) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String filter, final Integer top) { + return listByResourceGroupSinglePageAsync(resourceGroupName, filter, top) + .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)); + } + }); + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription. + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DomainInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String filter, final Integer top) { + 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, this.client.apiVersion(), filter, top, 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); + } + + /** + * List keys for a domain. + * List the two keys used to publish to a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DomainSharedAccessKeysInner object if successful. + */ + public DomainSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String domainName) { + return listSharedAccessKeysWithServiceResponseAsync(resourceGroupName, domainName).toBlocking().single().body(); + } + + /** + * List keys for a domain. + * List the two keys used to publish to a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @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 listSharedAccessKeysAsync(String resourceGroupName, String domainName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listSharedAccessKeysWithServiceResponseAsync(resourceGroupName, domainName), serviceCallback); + } + + /** + * List keys for a domain. + * List the two keys used to publish to a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainSharedAccessKeysInner object + */ + public Observable listSharedAccessKeysAsync(String resourceGroupName, String domainName) { + return listSharedAccessKeysWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1, DomainSharedAccessKeysInner>() { + @Override + public DomainSharedAccessKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List keys for a domain. + * List the two keys used to publish to a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainSharedAccessKeysInner object + */ + public Observable> listSharedAccessKeysWithServiceResponseAsync(String resourceGroupName, String domainName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName 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.listSharedAccessKeys(this.client.subscriptionId(), resourceGroupName, domainName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listSharedAccessKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSharedAccessKeysDelegate(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); + } + + /** + * Regenerate key for a domain. + * Regenerate a shared access key for a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param keyName Key name to regenerate key1 or key2 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 DomainSharedAccessKeysInner object if successful. + */ + public DomainSharedAccessKeysInner regenerateKey(String resourceGroupName, String domainName, String keyName) { + return regenerateKeyWithServiceResponseAsync(resourceGroupName, domainName, keyName).toBlocking().single().body(); + } + + /** + * Regenerate key for a domain. + * Regenerate a shared access key for a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param keyName Key name to regenerate key1 or key2 + * @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 regenerateKeyAsync(String resourceGroupName, String domainName, String keyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regenerateKeyWithServiceResponseAsync(resourceGroupName, domainName, keyName), serviceCallback); + } + + /** + * Regenerate key for a domain. + * Regenerate a shared access key for a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param keyName Key name to regenerate key1 or key2 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainSharedAccessKeysInner object + */ + public Observable regenerateKeyAsync(String resourceGroupName, String domainName, String keyName) { + return regenerateKeyWithServiceResponseAsync(resourceGroupName, domainName, keyName).map(new Func1, DomainSharedAccessKeysInner>() { + @Override + public DomainSharedAccessKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerate key for a domain. + * Regenerate a shared access key for a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain + * @param keyName Key name to regenerate key1 or key2 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainSharedAccessKeysInner object + */ + public Observable> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String domainName, String keyName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (keyName == null) { + throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); + } + DomainRegenerateKeyRequest regenerateKeyRequest = new DomainRegenerateKeyRequest(); + regenerateKeyRequest.withKeyName(keyName); + return service.regenerateKey(this.client.subscriptionId(), resourceGroupName, domainName, this.client.apiVersion(), this.client.acceptLanguage(), regenerateKeyRequest, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = regenerateKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse regenerateKeyDelegate(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); + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + * @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<DomainInner> 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(); + } + }; + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + * @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); + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + * @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<DomainInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + * @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<DomainInner> 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)); + } + }); + } + + /** + * List domains under an Azure subscription. + * List all the domains under an Azure subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DomainInner> 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); + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + * @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<DomainInner> 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(); + } + }; + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + * @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); + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + * @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<DomainInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + * @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<DomainInner> 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)); + } + }); + } + + /** + * List domains under a resource group. + * List all the domains under a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DomainInner> 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/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventGridManagementClientImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventGridManagementClientImpl.java new file mode 100644 index 000000000000..15cb0a581b86 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventGridManagementClientImpl.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.eventgrid.v2020_01_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 EventGridManagementClientImpl class. + */ +public class EventGridManagementClientImpl 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; + } + + /** Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ + private String subscriptionId; + + /** + * Gets Subscription credentials that uniquely identify a 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 Subscription credentials that uniquely identify a 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 EventGridManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** Version of the API to be used with the client request. */ + private String apiVersion; + + /** + * Gets Version of the API to be used with the client request. + * + * @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 EventGridManagementClientImpl 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 EventGridManagementClientImpl 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 EventGridManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The DomainsInner object to access its operations. + */ + private DomainsInner domains; + + /** + * Gets the DomainsInner object to access its operations. + * @return the DomainsInner object. + */ + public DomainsInner domains() { + return this.domains; + } + + /** + * The DomainTopicsInner object to access its operations. + */ + private DomainTopicsInner domainTopics; + + /** + * Gets the DomainTopicsInner object to access its operations. + * @return the DomainTopicsInner object. + */ + public DomainTopicsInner domainTopics() { + return this.domainTopics; + } + + /** + * The EventSubscriptionsInner object to access its operations. + */ + private EventSubscriptionsInner eventSubscriptions; + + /** + * Gets the EventSubscriptionsInner object to access its operations. + * @return the EventSubscriptionsInner object. + */ + public EventSubscriptionsInner eventSubscriptions() { + return this.eventSubscriptions; + } + + /** + * 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 TopicsInner object to access its operations. + */ + private TopicsInner topics; + + /** + * Gets the TopicsInner object to access its operations. + * @return the TopicsInner object. + */ + public TopicsInner topics() { + return this.topics; + } + + /** + * The TopicTypesInner object to access its operations. + */ + private TopicTypesInner topicTypes; + + /** + * Gets the TopicTypesInner object to access its operations. + * @return the TopicTypesInner object. + */ + public TopicTypesInner topicTypes() { + return this.topicTypes; + } + + /** + * Initializes an instance of EventGridManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public EventGridManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of EventGridManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public EventGridManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of EventGridManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public EventGridManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2020-01-01-preview"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.domains = new DomainsInner(restClient().retrofit(), this); + this.domainTopics = new DomainTopicsInner(restClient().retrofit(), this); + this.eventSubscriptions = new EventSubscriptionsInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.topics = new TopicsInner(restClient().retrofit(), this); + this.topicTypes = new TopicTypesInner(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(), "EventGridManagementClient", "2020-01-01-preview"); + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventGridManager.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventGridManager.java new file mode 100644 index 000000000000..3e213af21745 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventGridManager.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.eventgrid.v2020_01_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.eventgrid.v2020_01_01_preview.Domains; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.DomainTopics; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscriptions; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Operations; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Topics; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.TopicTypes; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure EventGrid resource management. + */ +public final class EventGridManager extends ManagerCore { + private Domains domains; + private DomainTopics domainTopics; + private EventSubscriptions eventSubscriptions; + private Operations operations; + private Topics topics; + private TopicTypes topicTypes; + /** + * Get a Configurable instance that can be used to create EventGridManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new EventGridManager.ConfigurableImpl(); + } + /** + * Creates an instance of EventGridManager that exposes EventGrid resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the EventGridManager + */ + public static EventGridManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new EventGridManager(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 EventGridManager that exposes EventGrid resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the EventGridManager + */ + public static EventGridManager authenticate(RestClient restClient, String subscriptionId) { + return new EventGridManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of EventGridManager that exposes EventGrid management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing EventGrid management API entry points that work across subscriptions + */ + EventGridManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage Domains. + */ + public Domains domains() { + if (this.domains == null) { + this.domains = new DomainsImpl(this); + } + return this.domains; + } + + /** + * @return Entry point to manage DomainTopics. + */ + public DomainTopics domainTopics() { + if (this.domainTopics == null) { + this.domainTopics = new DomainTopicsImpl(this); + } + return this.domainTopics; + } + + /** + * @return Entry point to manage EventSubscriptions. + */ + public EventSubscriptions eventSubscriptions() { + if (this.eventSubscriptions == null) { + this.eventSubscriptions = new EventSubscriptionsImpl(this); + } + return this.eventSubscriptions; + } + + /** + * @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 Topics. + */ + public Topics topics() { + if (this.topics == null) { + this.topics = new TopicsImpl(this); + } + return this.topics; + } + + /** + * @return Entry point to manage TopicTypes. + */ + public TopicTypes topicTypes() { + if (this.topicTypes == null) { + this.topicTypes = new TopicTypesImpl(this); + } + return this.topicTypes; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public EventGridManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return EventGridManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private EventGridManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new EventGridManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionFullUrlImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionFullUrlImpl.java new file mode 100644 index 000000000000..0e7afda7a5f7 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionFullUrlImpl.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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscriptionFullUrl; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class EventSubscriptionFullUrlImpl extends WrapperImpl implements EventSubscriptionFullUrl { + private final EventGridManager manager; + EventSubscriptionFullUrlImpl(EventSubscriptionFullUrlInner inner, EventGridManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public EventGridManager manager() { + return this.manager; + } + + @Override + public String endpointUrl() { + return this.inner().endpointUrl(); + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionFullUrlInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionFullUrlInner.java new file mode 100644 index 000000000000..f35877892c33 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionFullUrlInner.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.eventgrid.v2020_01_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Full endpoint url of an event subscription. + */ +public class EventSubscriptionFullUrlInner { + /** + * The URL that represents the endpoint of the destination of an event + * subscription. + */ + @JsonProperty(value = "endpointUrl") + private String endpointUrl; + + /** + * Get the URL that represents the endpoint of the destination of an event subscription. + * + * @return the endpointUrl value + */ + public String endpointUrl() { + return this.endpointUrl; + } + + /** + * Set the URL that represents the endpoint of the destination of an event subscription. + * + * @param endpointUrl the endpointUrl value to set + * @return the EventSubscriptionFullUrlInner object itself. + */ + public EventSubscriptionFullUrlInner withEndpointUrl(String endpointUrl) { + this.endpointUrl = endpointUrl; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionImpl.java new file mode 100644 index 000000000000..257fddd46073 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionImpl.java @@ -0,0 +1,237 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscription; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscriptionUpdateParameters; +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscriptionProvisioningState; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscriptionDestination; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscriptionFilter; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventDeliverySchema; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.RetryPolicy; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.DeadLetterDestination; +import rx.functions.Func1; + +class EventSubscriptionImpl extends CreatableUpdatableImpl implements EventSubscription, EventSubscription.Definition, EventSubscription.Update { + private String scope; + private String eventSubscriptionName; + private EventSubscriptionUpdateParameters updateParameter; + private final EventGridManager manager; + + EventSubscriptionImpl(String name, EventGridManager manager) { + super(name, new EventSubscriptionInner()); + this.manager = manager; + // Set resource name + this.eventSubscriptionName = name; + // + this.updateParameter = new EventSubscriptionUpdateParameters(); + } + + EventSubscriptionImpl(EventSubscriptionInner inner, EventGridManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.eventSubscriptionName = inner.name(); + // set resource ancestor and positional variables + this.eventSubscriptionName = IdParsingUtils.getValueFromIdByName(inner.id(), "eventSubscriptions"); + this.scope = IdParsingUtils.getValueFromIdByPosition(inner.id(), 0); + // set other parameters for create and update + this.updateParameter = new EventSubscriptionUpdateParameters(); + } + + @Override + public EventGridManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + EventSubscriptionsInner client = this.manager().inner().eventSubscriptions(); + return client.createOrUpdateAsync(this.scope, this.eventSubscriptionName, this.inner()) + .map(new Func1() { + @Override + public EventSubscriptionInner call(EventSubscriptionInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + EventSubscriptionsInner client = this.manager().inner().eventSubscriptions(); + return client.updateAsync(this.scope, this.eventSubscriptionName, this.updateParameter) + .map(new Func1() { + @Override + public EventSubscriptionInner call(EventSubscriptionInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + EventSubscriptionsInner client = this.manager().inner().eventSubscriptions(); + return client.getAsync(this.scope, this.eventSubscriptionName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new EventSubscriptionUpdateParameters(); + } + + @Override + public DeadLetterDestination deadLetterDestination() { + return this.inner().deadLetterDestination(); + } + + @Override + public EventSubscriptionDestination destination() { + return this.inner().destination(); + } + + @Override + public EventDeliverySchema eventDeliverySchema() { + return this.inner().eventDeliverySchema(); + } + + @Override + public DateTime expirationTimeUtc() { + return this.inner().expirationTimeUtc(); + } + + @Override + public EventSubscriptionFilter filter() { + return this.inner().filter(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public List labels() { + return this.inner().labels(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public EventSubscriptionProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public RetryPolicy retryPolicy() { + return this.inner().retryPolicy(); + } + + @Override + public String topic() { + return this.inner().topic(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public EventSubscriptionImpl withScope(String scope) { + this.scope = scope; + return this; + } + + @Override + public EventSubscriptionImpl withDeadLetterDestination(DeadLetterDestination deadLetterDestination) { + if (isInCreateMode()) { + this.inner().withDeadLetterDestination(deadLetterDestination); + } else { + this.updateParameter.withDeadLetterDestination(deadLetterDestination); + } + return this; + } + + @Override + public EventSubscriptionImpl withDestination(EventSubscriptionDestination destination) { + if (isInCreateMode()) { + this.inner().withDestination(destination); + } else { + this.updateParameter.withDestination(destination); + } + return this; + } + + @Override + public EventSubscriptionImpl withEventDeliverySchema(EventDeliverySchema eventDeliverySchema) { + if (isInCreateMode()) { + this.inner().withEventDeliverySchema(eventDeliverySchema); + } else { + this.updateParameter.withEventDeliverySchema(eventDeliverySchema); + } + return this; + } + + @Override + public EventSubscriptionImpl withExpirationTimeUtc(DateTime expirationTimeUtc) { + if (isInCreateMode()) { + this.inner().withExpirationTimeUtc(expirationTimeUtc); + } else { + this.updateParameter.withExpirationTimeUtc(expirationTimeUtc); + } + return this; + } + + @Override + public EventSubscriptionImpl withFilter(EventSubscriptionFilter filter) { + if (isInCreateMode()) { + this.inner().withFilter(filter); + } else { + this.updateParameter.withFilter(filter); + } + return this; + } + + @Override + public EventSubscriptionImpl withLabels(List labels) { + if (isInCreateMode()) { + this.inner().withLabels(labels); + } else { + this.updateParameter.withLabels(labels); + } + return this; + } + + @Override + public EventSubscriptionImpl withRetryPolicy(RetryPolicy retryPolicy) { + if (isInCreateMode()) { + this.inner().withRetryPolicy(retryPolicy); + } else { + this.updateParameter.withRetryPolicy(retryPolicy); + } + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionInner.java new file mode 100644 index 000000000000..b9a9f954e6cf --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionInner.java @@ -0,0 +1,245 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscriptionProvisioningState; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscriptionDestination; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscriptionFilter; +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventDeliverySchema; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.RetryPolicy; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.DeadLetterDestination; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Event Subscription. + */ +@JsonFlatten +public class EventSubscriptionInner extends ProxyResource { + /** + * Name of the topic of the event subscription. + */ + @JsonProperty(value = "properties.topic", access = JsonProperty.Access.WRITE_ONLY) + private String topic; + + /** + * Provisioning state of the event subscription. Possible values include: + * 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed', + * 'AwaitingManualAction'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private EventSubscriptionProvisioningState provisioningState; + + /** + * Information about the destination where events have to be delivered for + * the event subscription. + */ + @JsonProperty(value = "properties.destination") + private EventSubscriptionDestination destination; + + /** + * Information about the filter for the event subscription. + */ + @JsonProperty(value = "properties.filter") + private EventSubscriptionFilter filter; + + /** + * List of user defined labels. + */ + @JsonProperty(value = "properties.labels") + private List labels; + + /** + * Expiration time of the event subscription. + */ + @JsonProperty(value = "properties.expirationTimeUtc") + private DateTime expirationTimeUtc; + + /** + * The event delivery schema for the event subscription. Possible values + * include: 'EventGridSchema', 'CustomInputSchema', 'CloudEventSchemaV1_0'. + */ + @JsonProperty(value = "properties.eventDeliverySchema") + private EventDeliverySchema eventDeliverySchema; + + /** + * The retry policy for events. This can be used to configure maximum + * number of delivery attempts and time to live for events. + */ + @JsonProperty(value = "properties.retryPolicy") + private RetryPolicy retryPolicy; + + /** + * The DeadLetter destination of the event subscription. + */ + @JsonProperty(value = "properties.deadLetterDestination") + private DeadLetterDestination deadLetterDestination; + + /** + * Get name of the topic of the event subscription. + * + * @return the topic value + */ + public String topic() { + return this.topic; + } + + /** + * Get provisioning state of the event subscription. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed', 'AwaitingManualAction'. + * + * @return the provisioningState value + */ + public EventSubscriptionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get information about the destination where events have to be delivered for the event subscription. + * + * @return the destination value + */ + public EventSubscriptionDestination destination() { + return this.destination; + } + + /** + * Set information about the destination where events have to be delivered for the event subscription. + * + * @param destination the destination value to set + * @return the EventSubscriptionInner object itself. + */ + public EventSubscriptionInner withDestination(EventSubscriptionDestination destination) { + this.destination = destination; + return this; + } + + /** + * Get information about the filter for the event subscription. + * + * @return the filter value + */ + public EventSubscriptionFilter filter() { + return this.filter; + } + + /** + * Set information about the filter for the event subscription. + * + * @param filter the filter value to set + * @return the EventSubscriptionInner object itself. + */ + public EventSubscriptionInner withFilter(EventSubscriptionFilter filter) { + this.filter = filter; + return this; + } + + /** + * Get list of user defined labels. + * + * @return the labels value + */ + public List labels() { + return this.labels; + } + + /** + * Set list of user defined labels. + * + * @param labels the labels value to set + * @return the EventSubscriptionInner object itself. + */ + public EventSubscriptionInner withLabels(List labels) { + this.labels = labels; + return this; + } + + /** + * Get expiration time of the event subscription. + * + * @return the expirationTimeUtc value + */ + public DateTime expirationTimeUtc() { + return this.expirationTimeUtc; + } + + /** + * Set expiration time of the event subscription. + * + * @param expirationTimeUtc the expirationTimeUtc value to set + * @return the EventSubscriptionInner object itself. + */ + public EventSubscriptionInner withExpirationTimeUtc(DateTime expirationTimeUtc) { + this.expirationTimeUtc = expirationTimeUtc; + return this; + } + + /** + * Get the event delivery schema for the event subscription. Possible values include: 'EventGridSchema', 'CustomInputSchema', 'CloudEventSchemaV1_0'. + * + * @return the eventDeliverySchema value + */ + public EventDeliverySchema eventDeliverySchema() { + return this.eventDeliverySchema; + } + + /** + * Set the event delivery schema for the event subscription. Possible values include: 'EventGridSchema', 'CustomInputSchema', 'CloudEventSchemaV1_0'. + * + * @param eventDeliverySchema the eventDeliverySchema value to set + * @return the EventSubscriptionInner object itself. + */ + public EventSubscriptionInner withEventDeliverySchema(EventDeliverySchema eventDeliverySchema) { + this.eventDeliverySchema = eventDeliverySchema; + return this; + } + + /** + * Get the retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. + * + * @return the retryPolicy value + */ + public RetryPolicy retryPolicy() { + return this.retryPolicy; + } + + /** + * Set the retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. + * + * @param retryPolicy the retryPolicy value to set + * @return the EventSubscriptionInner object itself. + */ + public EventSubscriptionInner withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Get the DeadLetter destination of the event subscription. + * + * @return the deadLetterDestination value + */ + public DeadLetterDestination deadLetterDestination() { + return this.deadLetterDestination; + } + + /** + * Set the DeadLetter destination of the event subscription. + * + * @param deadLetterDestination the deadLetterDestination value to set + * @return the EventSubscriptionInner object itself. + */ + public EventSubscriptionInner withDeadLetterDestination(DeadLetterDestination deadLetterDestination) { + this.deadLetterDestination = deadLetterDestination; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionsImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionsImpl.java new file mode 100644 index 000000000000..86af6edb7219 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionsImpl.java @@ -0,0 +1,277 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * jkl + */ + +package com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscriptions; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import rx.Completable; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscription; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscriptionFullUrl; +import com.microsoft.azure.arm.utils.PagedListConverter; + +class EventSubscriptionsImpl extends WrapperImpl implements EventSubscriptions { + private PagedListConverter converter; + private final EventGridManager manager; + + EventSubscriptionsImpl(EventGridManager manager) { + super(manager.inner().eventSubscriptions()); + this.manager = manager; + this.converter = new PagedListConverter() { + @Override + public Observable typeConvertAsync(EventSubscriptionInner inner) { + return Observable.just((EventSubscription) wrapModel(inner)); + } + }; + } + + public EventGridManager manager() { + return this.manager; + } + + @Override + public EventSubscriptionImpl define(String name) { + return wrapModel(name); + } + + private EventSubscriptionImpl wrapModel(EventSubscriptionInner inner) { + return new EventSubscriptionImpl(inner, manager()); + } + + private EventSubscriptionImpl wrapModel(String name) { + return new EventSubscriptionImpl(name, this.manager()); + } + + @Override + public Observable getAsync(String scope, String eventSubscriptionName) { + EventSubscriptionsInner client = this.inner(); + return client.getAsync(scope, eventSubscriptionName) + .map(new Func1() { + @Override + public EventSubscription call(EventSubscriptionInner inner) { + return new EventSubscriptionImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String scope, String eventSubscriptionName) { + EventSubscriptionsInner client = this.inner(); + return client.deleteAsync(scope, eventSubscriptionName).toCompletable(); + } + + @Override + public Observable getFullUrlAsync(String scope, String eventSubscriptionName) { + EventSubscriptionsInner client = this.inner(); + return client.getFullUrlAsync(scope, eventSubscriptionName) + .map(new Func1() { + @Override + public EventSubscriptionFullUrl call(EventSubscriptionFullUrlInner inner) { + return new EventSubscriptionFullUrlImpl(inner, manager()); + } + }); + } + + @Override + public Observable listGlobalBySubscriptionForTopicTypeAsync(final String topicTypeName) { + EventSubscriptionsInner client = this.inner(); + return client.listGlobalBySubscriptionForTopicTypeAsync(topicTypeName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public EventSubscription call(EventSubscriptionInner inner) { + return new EventSubscriptionImpl(inner, manager()); + } + }); + } + + @Override + public Observable listGlobalByResourceGroupForTopicTypeAsync(final String resourceGroupName, final String topicTypeName) { + EventSubscriptionsInner client = this.inner(); + return client.listGlobalByResourceGroupForTopicTypeAsync(resourceGroupName, topicTypeName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public EventSubscription call(EventSubscriptionInner inner) { + return new EventSubscriptionImpl(inner, manager()); + } + }); + } + + @Override + public Observable listRegionalBySubscriptionAsync(final String location) { + EventSubscriptionsInner client = this.inner(); + return client.listRegionalBySubscriptionAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public EventSubscription call(EventSubscriptionInner inner) { + return new EventSubscriptionImpl(inner, manager()); + } + }); + } + + @Override + public Observable listRegionalByResourceGroupAsync(final String resourceGroupName, final String location) { + EventSubscriptionsInner client = this.inner(); + return client.listRegionalByResourceGroupAsync(resourceGroupName, location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public EventSubscription call(EventSubscriptionInner inner) { + return new EventSubscriptionImpl(inner, manager()); + } + }); + } + + @Override + public Observable listRegionalBySubscriptionForTopicTypeAsync(final String location, final String topicTypeName) { + EventSubscriptionsInner client = this.inner(); + return client.listRegionalBySubscriptionForTopicTypeAsync(location, topicTypeName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public EventSubscription call(EventSubscriptionInner inner) { + return new EventSubscriptionImpl(inner, manager()); + } + }); + } + + @Override + public Observable listRegionalByResourceGroupForTopicTypeAsync(final String resourceGroupName, final String location, final String topicTypeName) { + EventSubscriptionsInner client = this.inner(); + return client.listRegionalByResourceGroupForTopicTypeAsync(resourceGroupName, location, topicTypeName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public EventSubscription call(EventSubscriptionInner inner) { + return new EventSubscriptionImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByResourceAsync(final String resourceGroupName, final String providerNamespace, final String resourceTypeName, final String resourceName) { + EventSubscriptionsInner client = this.inner(); + return client.listByResourceAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public EventSubscription call(EventSubscriptionInner inner) { + return new EventSubscriptionImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByDomainTopicAsync(final String resourceGroupName, final String domainName, final String topicName) { + EventSubscriptionsInner client = this.inner(); + return client.listByDomainTopicAsync(resourceGroupName, domainName, topicName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public EventSubscription call(EventSubscriptionInner inner) { + return new EventSubscriptionImpl(inner, manager()); + } + }); + } + + @Override + public PagedList list() { + EventSubscriptionsInner client = this.inner(); + return converter.convert(client.list()); + } + + @Override + public Observable listAsync() { + EventSubscriptionsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public EventSubscription call(EventSubscriptionInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + EventSubscriptionsInner client = this.inner(); + return converter.convert(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + EventSubscriptionsInner 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 EventSubscription call(EventSubscriptionInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionsInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionsInner.java new file mode 100644 index 000000000000..a0b5375db9bc --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventSubscriptionsInner.java @@ -0,0 +1,4614 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.implementation; + +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.eventgrid.v2020_01_01_preview.EventSubscriptionUpdateParameters; +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 EventSubscriptions. + */ +public class EventSubscriptionsInner implements InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private EventSubscriptionsService service; + /** The service client containing this operation class. */ + private EventGridManagementClientImpl client; + + /** + * Initializes an instance of EventSubscriptionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public EventSubscriptionsInner(Retrofit retrofit, EventGridManagementClientImpl client) { + this.service = retrofit.create(EventSubscriptionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for EventSubscriptions to be + * used by Retrofit to perform actually REST calls. + */ + interface EventSubscriptionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventSubscriptions get" }) + @GET("{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") + Observable> get(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @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.eventgrid.v2020_01_01_preview.EventSubscriptions createOrUpdate" }) + @PUT("{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") + Observable> createOrUpdate(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @Body EventSubscriptionInner eventSubscriptionInfo, @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.eventgrid.v2020_01_01_preview.EventSubscriptions beginCreateOrUpdate" }) + @PUT("{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") + Observable> beginCreateOrUpdate(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @Body EventSubscriptionInner eventSubscriptionInfo, @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.eventgrid.v2020_01_01_preview.EventSubscriptions delete" }) + @HTTP(path = "{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @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.eventgrid.v2020_01_01_preview.EventSubscriptions beginDelete" }) + @HTTP(path = "{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @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.eventgrid.v2020_01_01_preview.EventSubscriptions update" }) + @PATCH("{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") + Observable> update(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @Body EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, @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.eventgrid.v2020_01_01_preview.EventSubscriptions beginUpdate" }) + @PATCH("{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") + Observable> beginUpdate(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @Body EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, @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.eventgrid.v2020_01_01_preview.EventSubscriptions getFullUrl" }) + @POST("{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + Observable> getFullUrl(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @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.eventgrid.v2020_01_01_preview.EventSubscriptions list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/eventSubscriptions") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.EventSubscriptions listGlobalBySubscriptionForTopicType" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions") + Observable> listGlobalBySubscriptionForTopicType(@Path("subscriptionId") String subscriptionId, @Path("topicTypeName") String topicTypeName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.EventSubscriptions listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/eventSubscriptions") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.EventSubscriptions listGlobalByResourceGroupForTopicType" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions") + Observable> listGlobalByResourceGroupForTopicType(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("topicTypeName") String topicTypeName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.EventSubscriptions listRegionalBySubscription" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions") + Observable> listRegionalBySubscription(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.EventSubscriptions listRegionalByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions") + Observable> listRegionalByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("location") String location, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.EventSubscriptions listRegionalBySubscriptionForTopicType" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions") + Observable> listRegionalBySubscriptionForTopicType(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Path("topicTypeName") String topicTypeName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.EventSubscriptions listRegionalByResourceGroupForTopicType" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions") + Observable> listRegionalByResourceGroupForTopicType(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("location") String location, @Path("topicTypeName") String topicTypeName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.EventSubscriptions listByResource" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions") + Observable> listByResource(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("providerNamespace") String providerNamespace, @Path("resourceTypeName") String resourceTypeName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.EventSubscriptions listByDomainTopic" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions") + Observable> listByDomainTopic(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("topicName") String topicName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.EventSubscriptions 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.eventgrid.v2020_01_01_preview.EventSubscriptions listGlobalBySubscriptionForTopicTypeNext" }) + @GET + Observable> listGlobalBySubscriptionForTopicTypeNext(@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.eventgrid.v2020_01_01_preview.EventSubscriptions 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.eventgrid.v2020_01_01_preview.EventSubscriptions listGlobalByResourceGroupForTopicTypeNext" }) + @GET + Observable> listGlobalByResourceGroupForTopicTypeNext(@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.eventgrid.v2020_01_01_preview.EventSubscriptions listRegionalBySubscriptionNext" }) + @GET + Observable> listRegionalBySubscriptionNext(@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.eventgrid.v2020_01_01_preview.EventSubscriptions listRegionalByResourceGroupNext" }) + @GET + Observable> listRegionalByResourceGroupNext(@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.eventgrid.v2020_01_01_preview.EventSubscriptions listRegionalBySubscriptionForTopicTypeNext" }) + @GET + Observable> listRegionalBySubscriptionForTopicTypeNext(@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.eventgrid.v2020_01_01_preview.EventSubscriptions listRegionalByResourceGroupForTopicTypeNext" }) + @GET + Observable> listRegionalByResourceGroupForTopicTypeNext(@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.eventgrid.v2020_01_01_preview.EventSubscriptions listByResourceNext" }) + @GET + Observable> listByResourceNext(@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.eventgrid.v2020_01_01_preview.EventSubscriptions listByDomainTopicNext" }) + @GET + Observable> listByDomainTopicNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get an event subscription. + * Get properties of an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 EventSubscriptionInner object if successful. + */ + public EventSubscriptionInner get(String scope, String eventSubscriptionName) { + return getWithServiceResponseAsync(scope, eventSubscriptionName).toBlocking().single().body(); + } + + /** + * Get an event subscription. + * Get properties of an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @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 scope, String eventSubscriptionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(scope, eventSubscriptionName), serviceCallback); + } + + /** + * Get an event subscription. + * Get properties of an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventSubscriptionInner object + */ + public Observable getAsync(String scope, String eventSubscriptionName) { + return getWithServiceResponseAsync(scope, eventSubscriptionName).map(new Func1, EventSubscriptionInner>() { + @Override + public EventSubscriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get an event subscription. + * Get properties of an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventSubscriptionInner object + */ + public Observable> getWithServiceResponseAsync(String scope, String eventSubscriptionName) { + if (scope == null) { + throw new IllegalArgumentException("Parameter scope is required and cannot be null."); + } + if (eventSubscriptionName == null) { + throw new IllegalArgumentException("Parameter eventSubscriptionName 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(scope, eventSubscriptionName, 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); + } + + /** + * Create or update an event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. + * + * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 EventSubscriptionInner object if successful. + */ + public EventSubscriptionInner createOrUpdate(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { + return createOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo).toBlocking().last().body(); + } + + /** + * Create or update an event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. + * + * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information + * @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 scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo), serviceCallback); + } + + /** + * Create or update an event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. + * + * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { + return createOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo).map(new Func1, EventSubscriptionInner>() { + @Override + public EventSubscriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update an event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. + * + * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { + if (scope == null) { + throw new IllegalArgumentException("Parameter scope is required and cannot be null."); + } + if (eventSubscriptionName == null) { + throw new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null."); + } + if (eventSubscriptionInfo == null) { + throw new IllegalArgumentException("Parameter eventSubscriptionInfo 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(eventSubscriptionInfo); + Observable> observable = service.createOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update an event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. + * + * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 EventSubscriptionInner object if successful. + */ + public EventSubscriptionInner beginCreateOrUpdate(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { + return beginCreateOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo).toBlocking().single().body(); + } + + /** + * Create or update an event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. + * + * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information + * @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 beginCreateOrUpdateAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo), serviceCallback); + } + + /** + * Create or update an event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. + * + * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventSubscriptionInner object + */ + public Observable beginCreateOrUpdateAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { + return beginCreateOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo).map(new Func1, EventSubscriptionInner>() { + @Override + public EventSubscriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update an event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. + * + * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventSubscriptionInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { + if (scope == null) { + throw new IllegalArgumentException("Parameter scope is required and cannot be null."); + } + if (eventSubscriptionName == null) { + throw new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null."); + } + if (eventSubscriptionInfo == null) { + throw new IllegalArgumentException("Parameter eventSubscriptionInfo 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(eventSubscriptionInfo); + return service.beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete an event subscription. + * Delete an existing event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 scope, String eventSubscriptionName) { + deleteWithServiceResponseAsync(scope, eventSubscriptionName).toBlocking().last().body(); + } + + /** + * Delete an event subscription. + * Delete an existing event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @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 scope, String eventSubscriptionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(scope, eventSubscriptionName), serviceCallback); + } + + /** + * Delete an event subscription. + * Delete an existing event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String scope, String eventSubscriptionName) { + return deleteWithServiceResponseAsync(scope, eventSubscriptionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete an event subscription. + * Delete an existing event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String scope, String eventSubscriptionName) { + if (scope == null) { + throw new IllegalArgumentException("Parameter scope is required and cannot be null."); + } + if (eventSubscriptionName == null) { + throw new IllegalArgumentException("Parameter eventSubscriptionName 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(scope, eventSubscriptionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete an event subscription. + * Delete an existing event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 scope, String eventSubscriptionName) { + beginDeleteWithServiceResponseAsync(scope, eventSubscriptionName).toBlocking().single().body(); + } + + /** + * Delete an event subscription. + * Delete an existing event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @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 scope, String eventSubscriptionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(scope, eventSubscriptionName), serviceCallback); + } + + /** + * Delete an event subscription. + * Delete an existing event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String scope, String eventSubscriptionName) { + return beginDeleteWithServiceResponseAsync(scope, eventSubscriptionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete an event subscription. + * Delete an existing event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String scope, String eventSubscriptionName) { + if (scope == null) { + throw new IllegalArgumentException("Parameter scope is required and cannot be null."); + } + if (eventSubscriptionName == null) { + throw new IllegalArgumentException("Parameter eventSubscriptionName 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(scope, eventSubscriptionName, 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); + } + + /** + * Update an event subscription. + * Asynchronously updates an existing event subscription. + * + * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription to be updated + * @param eventSubscriptionUpdateParameters Updated event subscription information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 EventSubscriptionInner object if successful. + */ + public EventSubscriptionInner update(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return updateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).toBlocking().last().body(); + } + + /** + * Update an event subscription. + * Asynchronously updates an existing event subscription. + * + * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription to be updated + * @param eventSubscriptionUpdateParameters Updated event subscription information + * @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 scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters), serviceCallback); + } + + /** + * Update an event subscription. + * Asynchronously updates an existing event subscription. + * + * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription to be updated + * @param eventSubscriptionUpdateParameters Updated event subscription information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return updateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).map(new Func1, EventSubscriptionInner>() { + @Override + public EventSubscriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update an event subscription. + * Asynchronously updates an existing event subscription. + * + * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription to be updated + * @param eventSubscriptionUpdateParameters Updated event subscription information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + if (scope == null) { + throw new IllegalArgumentException("Parameter scope is required and cannot be null."); + } + if (eventSubscriptionName == null) { + throw new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null."); + } + if (eventSubscriptionUpdateParameters == null) { + throw new IllegalArgumentException("Parameter eventSubscriptionUpdateParameters 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(eventSubscriptionUpdateParameters); + Observable> observable = service.update(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update an event subscription. + * Asynchronously updates an existing event subscription. + * + * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription to be updated + * @param eventSubscriptionUpdateParameters Updated event subscription information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 EventSubscriptionInner object if successful. + */ + public EventSubscriptionInner beginUpdate(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return beginUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).toBlocking().single().body(); + } + + /** + * Update an event subscription. + * Asynchronously updates an existing event subscription. + * + * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription to be updated + * @param eventSubscriptionUpdateParameters Updated event subscription information + * @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 scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters), serviceCallback); + } + + /** + * Update an event subscription. + * Asynchronously updates an existing event subscription. + * + * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription to be updated + * @param eventSubscriptionUpdateParameters Updated event subscription information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventSubscriptionInner object + */ + public Observable beginUpdateAsync(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return beginUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).map(new Func1, EventSubscriptionInner>() { + @Override + public EventSubscriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update an event subscription. + * Asynchronously updates an existing event subscription. + * + * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription to be updated + * @param eventSubscriptionUpdateParameters Updated event subscription information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventSubscriptionInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + if (scope == null) { + throw new IllegalArgumentException("Parameter scope is required and cannot be null."); + } + if (eventSubscriptionName == null) { + throw new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null."); + } + if (eventSubscriptionUpdateParameters == null) { + throw new IllegalArgumentException("Parameter eventSubscriptionUpdateParameters 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(eventSubscriptionUpdateParameters); + return service.beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, 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(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get full URL of an event subscription. + * Get the full endpoint URL for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 EventSubscriptionFullUrlInner object if successful. + */ + public EventSubscriptionFullUrlInner getFullUrl(String scope, String eventSubscriptionName) { + return getFullUrlWithServiceResponseAsync(scope, eventSubscriptionName).toBlocking().single().body(); + } + + /** + * Get full URL of an event subscription. + * Get the full endpoint URL for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @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 getFullUrlAsync(String scope, String eventSubscriptionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getFullUrlWithServiceResponseAsync(scope, eventSubscriptionName), serviceCallback); + } + + /** + * Get full URL of an event subscription. + * Get the full endpoint URL for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventSubscriptionFullUrlInner object + */ + public Observable getFullUrlAsync(String scope, String eventSubscriptionName) { + return getFullUrlWithServiceResponseAsync(scope, eventSubscriptionName).map(new Func1, EventSubscriptionFullUrlInner>() { + @Override + public EventSubscriptionFullUrlInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get full URL of an event subscription. + * Get the full endpoint URL for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventSubscriptionFullUrlInner object + */ + public Observable> getFullUrlWithServiceResponseAsync(String scope, String eventSubscriptionName) { + if (scope == null) { + throw new IllegalArgumentException("Parameter scope is required and cannot be null."); + } + if (eventSubscriptionName == null) { + throw new IllegalArgumentException("Parameter eventSubscriptionName 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.getFullUrl(scope, eventSubscriptionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getFullUrlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getFullUrlDelegate(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); + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> 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(); + } + }; + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + * @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); + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> 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)); + } + }); + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> 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; + return service.list(this.client.subscriptionId(), this.client.apiVersion(), filter, top, 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); + } + } + }); + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList list(final String filter, final Integer top) { + ServiceResponse> response = listSinglePageAsync(filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listAsync(final String filter, final Integer top) { + return listWithServiceResponseAsync(filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listWithServiceResponseAsync(final String filter, final Integer top) { + return listSinglePageAsync(filter, top) + .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)); + } + }); + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String filter, final Integer top) { + 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(), this.client.apiVersion(), filter, top, 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); + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listGlobalBySubscriptionForTopicType(final String topicTypeName) { + ServiceResponse> response = listGlobalBySubscriptionForTopicTypeSinglePageAsync(topicTypeName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @param topicTypeName Name of the topic type + * @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> listGlobalBySubscriptionForTopicTypeAsync(final String topicTypeName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGlobalBySubscriptionForTopicTypeSinglePageAsync(topicTypeName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listGlobalBySubscriptionForTopicTypeAsync(final String topicTypeName) { + return listGlobalBySubscriptionForTopicTypeWithServiceResponseAsync(topicTypeName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listGlobalBySubscriptionForTopicTypeWithServiceResponseAsync(final String topicTypeName) { + return listGlobalBySubscriptionForTopicTypeSinglePageAsync(topicTypeName) + .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(listGlobalBySubscriptionForTopicTypeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGlobalBySubscriptionForTopicTypeSinglePageAsync(final String topicTypeName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (topicTypeName == null) { + throw new IllegalArgumentException("Parameter topicTypeName 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; + return service.listGlobalBySubscriptionForTopicType(this.client.subscriptionId(), topicTypeName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGlobalBySubscriptionForTopicTypeDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listGlobalBySubscriptionForTopicType(final String topicTypeName, final String filter, final Integer top) { + ServiceResponse> response = listGlobalBySubscriptionForTopicTypeSinglePageAsync(topicTypeName, filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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> listGlobalBySubscriptionForTopicTypeAsync(final String topicTypeName, final String filter, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGlobalBySubscriptionForTopicTypeSinglePageAsync(topicTypeName, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listGlobalBySubscriptionForTopicTypeAsync(final String topicTypeName, final String filter, final Integer top) { + return listGlobalBySubscriptionForTopicTypeWithServiceResponseAsync(topicTypeName, filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listGlobalBySubscriptionForTopicTypeWithServiceResponseAsync(final String topicTypeName, final String filter, final Integer top) { + return listGlobalBySubscriptionForTopicTypeSinglePageAsync(topicTypeName, filter, top) + .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(listGlobalBySubscriptionForTopicTypeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + ServiceResponse> * @param topicTypeName Name of the topic type + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGlobalBySubscriptionForTopicTypeSinglePageAsync(final String topicTypeName, final String filter, final Integer top) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (topicTypeName == null) { + throw new IllegalArgumentException("Parameter topicTypeName 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.listGlobalBySubscriptionForTopicType(this.client.subscriptionId(), topicTypeName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGlobalBySubscriptionForTopicTypeDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGlobalBySubscriptionForTopicTypeDelegate(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); + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> 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(); + } + }; + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @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); + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> 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)); + } + }); + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> 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; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), filter, top, 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); + } + } + }); + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, final String filter, final Integer top) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, final String filter, final Integer top) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String filter, final Integer top) { + return listByResourceGroupSinglePageAsync(resourceGroupName, filter, top) + .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)); + } + }); + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription. + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String filter, final Integer top) { + 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, this.client.apiVersion(), filter, top, 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); + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listGlobalByResourceGroupForTopicType(final String resourceGroupName, final String topicTypeName) { + ServiceResponse> response = listGlobalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, topicTypeName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicTypeName Name of the topic type + * @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> listGlobalByResourceGroupForTopicTypeAsync(final String resourceGroupName, final String topicTypeName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGlobalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, topicTypeName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listGlobalByResourceGroupForTopicTypeAsync(final String resourceGroupName, final String topicTypeName) { + return listGlobalByResourceGroupForTopicTypeWithServiceResponseAsync(resourceGroupName, topicTypeName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listGlobalByResourceGroupForTopicTypeWithServiceResponseAsync(final String resourceGroupName, final String topicTypeName) { + return listGlobalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, topicTypeName) + .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(listGlobalByResourceGroupForTopicTypeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGlobalByResourceGroupForTopicTypeSinglePageAsync(final String resourceGroupName, final String topicTypeName) { + 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 (topicTypeName == null) { + throw new IllegalArgumentException("Parameter topicTypeName 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; + return service.listGlobalByResourceGroupForTopicType(this.client.subscriptionId(), resourceGroupName, topicTypeName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGlobalByResourceGroupForTopicTypeDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listGlobalByResourceGroupForTopicType(final String resourceGroupName, final String topicTypeName, final String filter, final Integer top) { + ServiceResponse> response = listGlobalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, topicTypeName, filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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> listGlobalByResourceGroupForTopicTypeAsync(final String resourceGroupName, final String topicTypeName, final String filter, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGlobalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, topicTypeName, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listGlobalByResourceGroupForTopicTypeAsync(final String resourceGroupName, final String topicTypeName, final String filter, final Integer top) { + return listGlobalByResourceGroupForTopicTypeWithServiceResponseAsync(resourceGroupName, topicTypeName, filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listGlobalByResourceGroupForTopicTypeWithServiceResponseAsync(final String resourceGroupName, final String topicTypeName, final String filter, final Integer top) { + return listGlobalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, topicTypeName, filter, top) + .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(listGlobalByResourceGroupForTopicTypeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription. + ServiceResponse> * @param topicTypeName Name of the topic type + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGlobalByResourceGroupForTopicTypeSinglePageAsync(final String resourceGroupName, final String topicTypeName, final String filter, final Integer top) { + 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 (topicTypeName == null) { + throw new IllegalArgumentException("Parameter topicTypeName 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.listGlobalByResourceGroupForTopicType(this.client.subscriptionId(), resourceGroupName, topicTypeName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGlobalByResourceGroupForTopicTypeDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGlobalByResourceGroupForTopicTypeDelegate(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); + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @param location Name of the location + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listRegionalBySubscription(final String location) { + ServiceResponse> response = listRegionalBySubscriptionSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRegionalBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @param location Name of the location + * @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> listRegionalBySubscriptionAsync(final String location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRegionalBySubscriptionSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRegionalBySubscriptionNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @param location Name of the location + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listRegionalBySubscriptionAsync(final String location) { + return listRegionalBySubscriptionWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @param location Name of the location + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listRegionalBySubscriptionWithServiceResponseAsync(final String location) { + return listRegionalBySubscriptionSinglePageAsync(location) + .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(listRegionalBySubscriptionNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @param location Name of the location + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRegionalBySubscriptionSinglePageAsync(final 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."); + } + final String filter = null; + final Integer top = null; + return service.listRegionalBySubscription(this.client.subscriptionId(), location, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRegionalBySubscriptionDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @param location Name of the location + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listRegionalBySubscription(final String location, final String filter, final Integer top) { + ServiceResponse> response = listRegionalBySubscriptionSinglePageAsync(location, filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRegionalBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @param location Name of the location + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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> listRegionalBySubscriptionAsync(final String location, final String filter, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRegionalBySubscriptionSinglePageAsync(location, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRegionalBySubscriptionNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @param location Name of the location + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listRegionalBySubscriptionAsync(final String location, final String filter, final Integer top) { + return listRegionalBySubscriptionWithServiceResponseAsync(location, filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @param location Name of the location + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listRegionalBySubscriptionWithServiceResponseAsync(final String location, final String filter, final Integer top) { + return listRegionalBySubscriptionSinglePageAsync(location, filter, top) + .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(listRegionalBySubscriptionNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + ServiceResponse> * @param location Name of the location + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRegionalBySubscriptionSinglePageAsync(final String location, final String filter, final Integer top) { + 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.listRegionalBySubscription(this.client.subscriptionId(), location, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRegionalBySubscriptionDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRegionalBySubscriptionDelegate(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); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listRegionalByResourceGroup(final String resourceGroupName, final String location) { + ServiceResponse> response = listRegionalByResourceGroupSinglePageAsync(resourceGroupName, location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRegionalByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @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> listRegionalByResourceGroupAsync(final String resourceGroupName, final String location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRegionalByResourceGroupSinglePageAsync(resourceGroupName, location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRegionalByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listRegionalByResourceGroupAsync(final String resourceGroupName, final String location) { + return listRegionalByResourceGroupWithServiceResponseAsync(resourceGroupName, location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listRegionalByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String location) { + return listRegionalByResourceGroupSinglePageAsync(resourceGroupName, location) + .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(listRegionalByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRegionalByResourceGroupSinglePageAsync(final String resourceGroupName, final String location) { + 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 (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."); + } + final String filter = null; + final Integer top = null; + return service.listRegionalByResourceGroup(this.client.subscriptionId(), resourceGroupName, location, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRegionalByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listRegionalByResourceGroup(final String resourceGroupName, final String location, final String filter, final Integer top) { + ServiceResponse> response = listRegionalByResourceGroupSinglePageAsync(resourceGroupName, location, filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRegionalByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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> listRegionalByResourceGroupAsync(final String resourceGroupName, final String location, final String filter, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRegionalByResourceGroupSinglePageAsync(resourceGroupName, location, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRegionalByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listRegionalByResourceGroupAsync(final String resourceGroupName, final String location, final String filter, final Integer top) { + return listRegionalByResourceGroupWithServiceResponseAsync(resourceGroupName, location, filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listRegionalByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String location, final String filter, final Integer top) { + return listRegionalByResourceGroupSinglePageAsync(resourceGroupName, location, filter, top) + .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(listRegionalByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription. + ServiceResponse> * @param location Name of the location + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRegionalByResourceGroupSinglePageAsync(final String resourceGroupName, final String location, final String filter, final Integer top) { + 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 (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.listRegionalByResourceGroup(this.client.subscriptionId(), resourceGroupName, location, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRegionalByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRegionalByResourceGroupDelegate(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); + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listRegionalBySubscriptionForTopicType(final String location, final String topicTypeName) { + ServiceResponse> response = listRegionalBySubscriptionForTopicTypeSinglePageAsync(location, topicTypeName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @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> listRegionalBySubscriptionForTopicTypeAsync(final String location, final String topicTypeName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRegionalBySubscriptionForTopicTypeSinglePageAsync(location, topicTypeName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listRegionalBySubscriptionForTopicTypeAsync(final String location, final String topicTypeName) { + return listRegionalBySubscriptionForTopicTypeWithServiceResponseAsync(location, topicTypeName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listRegionalBySubscriptionForTopicTypeWithServiceResponseAsync(final String location, final String topicTypeName) { + return listRegionalBySubscriptionForTopicTypeSinglePageAsync(location, topicTypeName) + .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(listRegionalBySubscriptionForTopicTypeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRegionalBySubscriptionForTopicTypeSinglePageAsync(final String location, final String topicTypeName) { + 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 (topicTypeName == null) { + throw new IllegalArgumentException("Parameter topicTypeName 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; + return service.listRegionalBySubscriptionForTopicType(this.client.subscriptionId(), location, topicTypeName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRegionalBySubscriptionForTopicTypeDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listRegionalBySubscriptionForTopicType(final String location, final String topicTypeName, final String filter, final Integer top) { + ServiceResponse> response = listRegionalBySubscriptionForTopicTypeSinglePageAsync(location, topicTypeName, filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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> listRegionalBySubscriptionForTopicTypeAsync(final String location, final String topicTypeName, final String filter, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRegionalBySubscriptionForTopicTypeSinglePageAsync(location, topicTypeName, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listRegionalBySubscriptionForTopicTypeAsync(final String location, final String topicTypeName, final String filter, final Integer top) { + return listRegionalBySubscriptionForTopicTypeWithServiceResponseAsync(location, topicTypeName, filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listRegionalBySubscriptionForTopicTypeWithServiceResponseAsync(final String location, final String topicTypeName, final String filter, final Integer top) { + return listRegionalBySubscriptionForTopicTypeSinglePageAsync(location, topicTypeName, filter, top) + .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(listRegionalBySubscriptionForTopicTypeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + ServiceResponse> * @param location Name of the location + ServiceResponse> * @param topicTypeName Name of the topic type + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRegionalBySubscriptionForTopicTypeSinglePageAsync(final String location, final String topicTypeName, final String filter, final Integer top) { + 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 (topicTypeName == null) { + throw new IllegalArgumentException("Parameter topicTypeName 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.listRegionalBySubscriptionForTopicType(this.client.subscriptionId(), location, topicTypeName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRegionalBySubscriptionForTopicTypeDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRegionalBySubscriptionForTopicTypeDelegate(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); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listRegionalByResourceGroupForTopicType(final String resourceGroupName, final String location, final String topicTypeName) { + ServiceResponse> response = listRegionalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, location, topicTypeName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @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> listRegionalByResourceGroupForTopicTypeAsync(final String resourceGroupName, final String location, final String topicTypeName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRegionalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, location, topicTypeName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listRegionalByResourceGroupForTopicTypeAsync(final String resourceGroupName, final String location, final String topicTypeName) { + return listRegionalByResourceGroupForTopicTypeWithServiceResponseAsync(resourceGroupName, location, topicTypeName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listRegionalByResourceGroupForTopicTypeWithServiceResponseAsync(final String resourceGroupName, final String location, final String topicTypeName) { + return listRegionalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, location, topicTypeName) + .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(listRegionalByResourceGroupForTopicTypeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRegionalByResourceGroupForTopicTypeSinglePageAsync(final String resourceGroupName, final String location, final String topicTypeName) { + 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 (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (topicTypeName == null) { + throw new IllegalArgumentException("Parameter topicTypeName 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; + return service.listRegionalByResourceGroupForTopicType(this.client.subscriptionId(), resourceGroupName, location, topicTypeName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRegionalByResourceGroupForTopicTypeDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listRegionalByResourceGroupForTopicType(final String resourceGroupName, final String location, final String topicTypeName, final String filter, final Integer top) { + ServiceResponse> response = listRegionalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, location, topicTypeName, filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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> listRegionalByResourceGroupForTopicTypeAsync(final String resourceGroupName, final String location, final String topicTypeName, final String filter, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRegionalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, location, topicTypeName, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listRegionalByResourceGroupForTopicTypeAsync(final String resourceGroupName, final String location, final String topicTypeName, final String filter, final Integer top) { + return listRegionalByResourceGroupForTopicTypeWithServiceResponseAsync(resourceGroupName, location, topicTypeName, filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param location Name of the location + * @param topicTypeName Name of the topic type + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listRegionalByResourceGroupForTopicTypeWithServiceResponseAsync(final String resourceGroupName, final String location, final String topicTypeName, final String filter, final Integer top) { + return listRegionalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, location, topicTypeName, filter, top) + .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(listRegionalByResourceGroupForTopicTypeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription. + ServiceResponse> * @param location Name of the location + ServiceResponse> * @param topicTypeName Name of the topic type + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRegionalByResourceGroupForTopicTypeSinglePageAsync(final String resourceGroupName, final String location, final String topicTypeName, final String filter, final Integer top) { + 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 (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (topicTypeName == null) { + throw new IllegalArgumentException("Parameter topicTypeName 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.listRegionalByResourceGroupForTopicType(this.client.subscriptionId(), resourceGroupName, location, topicTypeName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRegionalByResourceGroupForTopicTypeDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRegionalByResourceGroupForTopicTypeDelegate(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); + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the resource type + * @param resourceName Name of the resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listByResource(final String resourceGroupName, final String providerNamespace, final String resourceTypeName, final String resourceName) { + ServiceResponse> response = listByResourceSinglePageAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the resource type + * @param resourceName Name of the resource + * @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> listByResourceAsync(final String resourceGroupName, final String providerNamespace, final String resourceTypeName, final String resourceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceSinglePageAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the resource type + * @param resourceName Name of the resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listByResourceAsync(final String resourceGroupName, final String providerNamespace, final String resourceTypeName, final String resourceName) { + return listByResourceWithServiceResponseAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the resource type + * @param resourceName Name of the resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listByResourceWithServiceResponseAsync(final String resourceGroupName, final String providerNamespace, final String resourceTypeName, final String resourceName) { + return listByResourceSinglePageAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName) + .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(listByResourceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the resource type + * @param resourceName Name of the resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceSinglePageAsync(final String resourceGroupName, final String providerNamespace, final String resourceTypeName, final String resourceName) { + 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 (providerNamespace == null) { + throw new IllegalArgumentException("Parameter providerNamespace is required and cannot be null."); + } + if (resourceTypeName == null) { + throw new IllegalArgumentException("Parameter resourceTypeName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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; + return service.listByResource(this.client.subscriptionId(), resourceGroupName, providerNamespace, resourceTypeName, resourceName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the resource type + * @param resourceName Name of the resource + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listByResource(final String resourceGroupName, final String providerNamespace, final String resourceTypeName, final String resourceName, final String filter, final Integer top) { + ServiceResponse> response = listByResourceSinglePageAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName, filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the resource type + * @param resourceName Name of the resource + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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> listByResourceAsync(final String resourceGroupName, final String providerNamespace, final String resourceTypeName, final String resourceName, final String filter, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceSinglePageAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the resource type + * @param resourceName Name of the resource + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listByResourceAsync(final String resourceGroupName, final String providerNamespace, final String resourceTypeName, final String resourceName, final String filter, final Integer top) { + return listByResourceWithServiceResponseAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName, filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the resource type + * @param resourceName Name of the resource + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listByResourceWithServiceResponseAsync(final String resourceGroupName, final String providerNamespace, final String resourceTypeName, final String resourceName, final String filter, final Integer top) { + return listByResourceSinglePageAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName, filter, top) + .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(listByResourceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription. + ServiceResponse> * @param providerNamespace Namespace of the provider of the topic + ServiceResponse> * @param resourceTypeName Name of the resource type + ServiceResponse> * @param resourceName Name of the resource + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceSinglePageAsync(final String resourceGroupName, final String providerNamespace, final String resourceTypeName, final String resourceName, final String filter, final Integer top) { + 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 (providerNamespace == null) { + throw new IllegalArgumentException("Parameter providerNamespace is required and cannot be null."); + } + if (resourceTypeName == null) { + throw new IllegalArgumentException("Parameter resourceTypeName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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.listByResource(this.client.subscriptionId(), resourceGroupName, providerNamespace, resourceTypeName, resourceName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceDelegate(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); + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain + * @param topicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listByDomainTopic(final String resourceGroupName, final String domainName, final String topicName) { + ServiceResponse> response = listByDomainTopicSinglePageAsync(resourceGroupName, domainName, topicName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByDomainTopicNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain + * @param topicName Name of the domain topic + * @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> listByDomainTopicAsync(final String resourceGroupName, final String domainName, final String topicName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByDomainTopicSinglePageAsync(resourceGroupName, domainName, topicName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByDomainTopicNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain + * @param topicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listByDomainTopicAsync(final String resourceGroupName, final String domainName, final String topicName) { + return listByDomainTopicWithServiceResponseAsync(resourceGroupName, domainName, topicName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain + * @param topicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listByDomainTopicWithServiceResponseAsync(final String resourceGroupName, final String domainName, final String topicName) { + return listByDomainTopicSinglePageAsync(resourceGroupName, domainName, topicName) + .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(listByDomainTopicNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain + * @param topicName Name of the domain topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByDomainTopicSinglePageAsync(final String resourceGroupName, final String domainName, final String topicName) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); + } + if (topicName == null) { + throw new IllegalArgumentException("Parameter topicName 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; + return service.listByDomainTopic(this.client.subscriptionId(), resourceGroupName, domainName, topicName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByDomainTopicDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain + * @param topicName Name of the domain topic + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listByDomainTopic(final String resourceGroupName, final String domainName, final String topicName, final String filter, final Integer top) { + ServiceResponse> response = listByDomainTopicSinglePageAsync(resourceGroupName, domainName, topicName, filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByDomainTopicNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain + * @param topicName Name of the domain topic + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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> listByDomainTopicAsync(final String resourceGroupName, final String domainName, final String topicName, final String filter, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByDomainTopicSinglePageAsync(resourceGroupName, domainName, topicName, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByDomainTopicNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain + * @param topicName Name of the domain topic + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable> listByDomainTopicAsync(final String resourceGroupName, final String domainName, final String topicName, final String filter, final Integer top) { + return listByDomainTopicWithServiceResponseAsync(resourceGroupName, domainName, topicName, filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain + * @param topicName Name of the domain topic + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventSubscriptionInner> object + */ + public Observable>> listByDomainTopicWithServiceResponseAsync(final String resourceGroupName, final String domainName, final String topicName, final String filter, final Integer top) { + return listByDomainTopicSinglePageAsync(resourceGroupName, domainName, topicName, filter, top) + .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(listByDomainTopicNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription. + ServiceResponse> * @param domainName Name of the top level domain + ServiceResponse> * @param topicName Name of the domain topic + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByDomainTopicSinglePageAsync(final String resourceGroupName, final String domainName, final String topicName, final String filter, final Integer top) { + 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 (domainName == null) { + throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); + } + if (topicName == null) { + throw new IllegalArgumentException("Parameter topicName 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.listByDomainTopic(this.client.subscriptionId(), resourceGroupName, domainName, topicName, this.client.apiVersion(), filter, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByDomainTopicDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByDomainTopicDelegate(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); + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + * @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<EventSubscriptionInner> 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(); + } + }; + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + * @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); + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + * @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<EventSubscriptionInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + * @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<EventSubscriptionInner> 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)); + } + }); + } + + /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> 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); + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listGlobalBySubscriptionForTopicTypeNext(final String nextPageLink) { + ServiceResponse> response = listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @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> listGlobalBySubscriptionForTopicTypeNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @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<EventSubscriptionInner> object + */ + public Observable> listGlobalBySubscriptionForTopicTypeNextAsync(final String nextPageLink) { + return listGlobalBySubscriptionForTopicTypeNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @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<EventSubscriptionInner> object + */ + public Observable>> listGlobalBySubscriptionForTopicTypeNextWithServiceResponseAsync(final String nextPageLink) { + return listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(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(listGlobalBySubscriptionForTopicTypeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all global event subscriptions for a topic type. + * List all global event subscriptions under an Azure subscription for a topic type. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(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.listGlobalBySubscriptionForTopicTypeNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGlobalBySubscriptionForTopicTypeNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGlobalBySubscriptionForTopicTypeNextDelegate(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); + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @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<EventSubscriptionInner> 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(); + } + }; + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @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); + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @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<EventSubscriptionInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @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<EventSubscriptionInner> 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)); + } + }); + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a specific Azure subscription and resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> 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); + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listGlobalByResourceGroupForTopicTypeNext(final String nextPageLink) { + ServiceResponse> response = listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @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> listGlobalByResourceGroupForTopicTypeNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @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<EventSubscriptionInner> object + */ + public Observable> listGlobalByResourceGroupForTopicTypeNextAsync(final String nextPageLink) { + return listGlobalByResourceGroupForTopicTypeNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + * @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<EventSubscriptionInner> object + */ + public Observable>> listGlobalByResourceGroupForTopicTypeNextWithServiceResponseAsync(final String nextPageLink) { + return listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(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(listGlobalByResourceGroupForTopicTypeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all global event subscriptions under a resource group for a topic type. + * List all global event subscriptions under a resource group for a specific topic type. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(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.listGlobalByResourceGroupForTopicTypeNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGlobalByResourceGroupForTopicTypeNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGlobalByResourceGroupForTopicTypeNextDelegate(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); + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listRegionalBySubscriptionNext(final String nextPageLink) { + ServiceResponse> response = listRegionalBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRegionalBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @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> listRegionalBySubscriptionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRegionalBySubscriptionNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRegionalBySubscriptionNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @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<EventSubscriptionInner> object + */ + public Observable> listRegionalBySubscriptionNextAsync(final String nextPageLink) { + return listRegionalBySubscriptionNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + * @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<EventSubscriptionInner> object + */ + public Observable>> listRegionalBySubscriptionNextWithServiceResponseAsync(final String nextPageLink) { + return listRegionalBySubscriptionNextSinglePageAsync(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(listRegionalBySubscriptionNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription. + * List all event subscriptions from the given location under a specific Azure subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRegionalBySubscriptionNextSinglePageAsync(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.listRegionalBySubscriptionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRegionalBySubscriptionNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRegionalBySubscriptionNextDelegate(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); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listRegionalByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listRegionalByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRegionalByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @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> listRegionalByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRegionalByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRegionalByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @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<EventSubscriptionInner> object + */ + public Observable> listRegionalByResourceGroupNextAsync(final String nextPageLink) { + return listRegionalByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + * @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<EventSubscriptionInner> object + */ + public Observable>> listRegionalByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listRegionalByResourceGroupNextSinglePageAsync(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(listRegionalByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRegionalByResourceGroupNextSinglePageAsync(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.listRegionalByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRegionalByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRegionalByResourceGroupNextDelegate(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); + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listRegionalBySubscriptionForTopicTypeNext(final String nextPageLink) { + ServiceResponse> response = listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @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> listRegionalBySubscriptionForTopicTypeNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @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<EventSubscriptionInner> object + */ + public Observable> listRegionalBySubscriptionForTopicTypeNextAsync(final String nextPageLink) { + return listRegionalBySubscriptionForTopicTypeNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + * @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<EventSubscriptionInner> object + */ + public Observable>> listRegionalBySubscriptionForTopicTypeNextWithServiceResponseAsync(final String nextPageLink) { + return listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(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(listRegionalBySubscriptionForTopicTypeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(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.listRegionalBySubscriptionForTopicTypeNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRegionalBySubscriptionForTopicTypeNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRegionalBySubscriptionForTopicTypeNextDelegate(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); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listRegionalByResourceGroupForTopicTypeNext(final String nextPageLink) { + ServiceResponse> response = listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @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> listRegionalByResourceGroupForTopicTypeNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @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<EventSubscriptionInner> object + */ + public Observable> listRegionalByResourceGroupForTopicTypeNextAsync(final String nextPageLink) { + return listRegionalByResourceGroupForTopicTypeNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + * @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<EventSubscriptionInner> object + */ + public Observable>> listRegionalByResourceGroupForTopicTypeNextWithServiceResponseAsync(final String nextPageLink) { + return listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(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(listRegionalByResourceGroupForTopicTypeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(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.listRegionalByResourceGroupForTopicTypeNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRegionalByResourceGroupForTopicTypeNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRegionalByResourceGroupForTopicTypeNextDelegate(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); + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listByResourceNext(final String nextPageLink) { + ServiceResponse> response = listByResourceNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @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> listByResourceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @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<EventSubscriptionInner> object + */ + public Observable> listByResourceNextAsync(final String nextPageLink) { + return listByResourceNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + * @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<EventSubscriptionInner> object + */ + public Observable>> listByResourceNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceNextSinglePageAsync(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(listByResourceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all event subscriptions for a specific topic. + * List all event subscriptions that have been created for a specific topic. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceNextSinglePageAsync(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.listByResourceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceNextDelegate(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); + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @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<EventSubscriptionInner> object if successful. + */ + public PagedList listByDomainTopicNext(final String nextPageLink) { + ServiceResponse> response = listByDomainTopicNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByDomainTopicNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @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> listByDomainTopicNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByDomainTopicNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByDomainTopicNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @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<EventSubscriptionInner> object + */ + public Observable> listByDomainTopicNextAsync(final String nextPageLink) { + return listByDomainTopicNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @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<EventSubscriptionInner> object + */ + public Observable>> listByDomainTopicNextWithServiceResponseAsync(final String nextPageLink) { + return listByDomainTopicNextSinglePageAsync(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(listByDomainTopicNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all event subscriptions for a specific domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventSubscriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByDomainTopicNextSinglePageAsync(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.listByDomainTopicNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByDomainTopicNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByDomainTopicNextDelegate(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/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventTypeImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventTypeImpl.java new file mode 100644 index 000000000000..3e0bb80a03c5 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventTypeImpl.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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventType; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class EventTypeImpl extends WrapperImpl implements EventType { + private final EventGridManager manager; + + EventTypeImpl(EventTypeInner inner, EventGridManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public EventGridManager manager() { + return this.manager; + } + + + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean isInDefaultSet() { + return this.inner().isInDefaultSet(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String schemaUrl() { + return this.inner().schemaUrl(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventTypeInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventTypeInner.java new file mode 100644 index 000000000000..7e28cf1f0b81 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/EventTypeInner.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Event Type for a subject under a topic. + */ +@JsonFlatten +public class EventTypeInner extends ProxyResource { + /** + * Display name of the event type. + */ + @JsonProperty(value = "properties.displayName") + private String displayName; + + /** + * Description of the event type. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * Url of the schema for this event type. + */ + @JsonProperty(value = "properties.schemaUrl") + private String schemaUrl; + + /** + * IsInDefaultSet flag of the event type. + */ + @JsonProperty(value = "properties.isInDefaultSet") + private Boolean isInDefaultSet; + + /** + * Get display name of the event type. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set display name of the event type. + * + * @param displayName the displayName value to set + * @return the EventTypeInner object itself. + */ + public EventTypeInner withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get description of the event type. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the event type. + * + * @param description the description value to set + * @return the EventTypeInner object itself. + */ + public EventTypeInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get url of the schema for this event type. + * + * @return the schemaUrl value + */ + public String schemaUrl() { + return this.schemaUrl; + } + + /** + * Set url of the schema for this event type. + * + * @param schemaUrl the schemaUrl value to set + * @return the EventTypeInner object itself. + */ + public EventTypeInner withSchemaUrl(String schemaUrl) { + this.schemaUrl = schemaUrl; + return this; + } + + /** + * Get isInDefaultSet flag of the event type. + * + * @return the isInDefaultSet value + */ + public Boolean isInDefaultSet() { + return this.isInDefaultSet; + } + + /** + * Set isInDefaultSet flag of the event type. + * + * @param isInDefaultSet the isInDefaultSet value to set + * @return the EventTypeInner object itself. + */ + public EventTypeInner withIsInDefaultSet(Boolean isInDefaultSet) { + this.isInDefaultSet = isInDefaultSet; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/IdParsingUtils.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/IdParsingUtils.java new file mode 100644 index 000000000000..a76566ea4f65 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_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.eventgrid.v2020_01_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/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationImpl.java new file mode 100644 index 000000000000..b26937559390 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationImpl.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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Operation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.OperationInfo; + +class OperationImpl extends WrapperImpl implements Operation { + private final EventGridManager manager; + OperationImpl(OperationInner inner, EventGridManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public EventGridManager manager() { + return this.manager; + } + + @Override + public OperationInfo display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String origin() { + return this.inner().origin(); + } + + @Override + public Object properties() { + return this.inner().properties(); + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationInner.java new file mode 100644 index 000000000000..d20069ee973a --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationInner.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.OperationInfo; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Represents an operation returned by the GetOperations request. + */ +public class OperationInner { + /** + * Name of the operation. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Display name of the operation. + */ + @JsonProperty(value = "display") + private OperationInfo display; + + /** + * Origin of the operation. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * Properties of the operation. + */ + @JsonProperty(value = "properties") + private Object properties; + + /** + * Get name of the operation. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the operation. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get display name of the operation. + * + * @return the display value + */ + public OperationInfo display() { + return this.display; + } + + /** + * Set display name of the operation. + * + * @param display the display value to set + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationInfo display) { + this.display = display; + return this; + } + + /** + * Get origin of the operation. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set origin of the operation. + * + * @param origin the origin value to set + * @return the OperationInner object itself. + */ + public OperationInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get properties of the operation. + * + * @return the properties value + */ + public Object properties() { + return this.properties; + } + + /** + * Set properties of the operation. + * + * @param properties the properties value to set + * @return the OperationInner object itself. + */ + public OperationInner withProperties(Object properties) { + this.properties = properties; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationsImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationsImpl.java new file mode 100644 index 000000000000..4eff3312ced7 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationsImpl.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. + * abc + */ + +package com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Operations; +import rx.functions.Func1; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Operation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final EventGridManager manager; + + OperationsImpl(EventGridManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public EventGridManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public Operation call(OperationInner inner) { + return new OperationImpl(inner, manager()); + } + }); + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationsInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationsInner.java new file mode 100644 index 000000000000..e060e10108be --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/OperationsInner.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.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 java.util.List; +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 EventGridManagementClientImpl 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, EventGridManagementClientImpl 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.eventgrid.v2020_01_01_preview.Operations list" }) + @GET("providers/Microsoft.EventGrid/operations") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List available operations. + * List the available operations supported by the Microsoft.EventGrid resource 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 List<OperationInner> object if successful. + */ + public List list() { + return listWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * List available operations. + * List the available operations supported by the Microsoft.EventGrid resource 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> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * List available operations. + * List the available operations supported by the Microsoft.EventGrid resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<OperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List available operations. + * List the available operations supported by the Microsoft.EventGrid resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<OperationInner> 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> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.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()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/PageImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/PageImpl.java new file mode 100644 index 000000000000..39310c09041e --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_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.eventgrid.v2020_01_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/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/PageImpl1.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/PageImpl1.java new file mode 100644 index 000000000000..c2a2abc429fa --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/PageImpl1.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.eventgrid.v2020_01_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 PageImpl1 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("") + 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 PageImpl1 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 PageImpl1 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicImpl.java new file mode 100644 index 000000000000..186203cff85f --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicImpl.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Topic; +import rx.Observable; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.TopicProvisioningState; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.InputSchema; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.InputSchemaMapping; + +class TopicImpl extends GroupableResourceCoreImpl implements Topic, Topic.Definition, Topic.Update { + TopicImpl(String name, TopicInner inner, EventGridManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + TopicsInner client = this.manager().inner().topics(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + TopicsInner client = this.manager().inner().topics(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + TopicsInner client = this.manager().inner().topics(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String endpoint() { + return this.inner().endpoint(); + } + + @Override + public InputSchema inputSchema() { + return this.inner().inputSchema(); + } + + @Override + public InputSchemaMapping inputSchemaMapping() { + return this.inner().inputSchemaMapping(); + } + + @Override + public String metricResourceId() { + return this.inner().metricResourceId(); + } + + @Override + public TopicProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public TopicImpl withInputSchema(InputSchema inputSchema) { + this.inner().withInputSchema(inputSchema); + return this; + } + + @Override + public TopicImpl withInputSchemaMapping(InputSchemaMapping inputSchemaMapping) { + this.inner().withInputSchemaMapping(inputSchemaMapping); + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicInner.java new file mode 100644 index 000000000000..6c5f5a7b860d --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicInner.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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.TopicProvisioningState; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.InputSchema; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.InputSchemaMapping; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * EventGrid Topic. + */ +@JsonFlatten +public class TopicInner extends Resource { + /** + * Provisioning state of the topic. Possible values include: 'Creating', + * 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private TopicProvisioningState provisioningState; + + /** + * Endpoint for the topic. + */ + @JsonProperty(value = "properties.endpoint", access = JsonProperty.Access.WRITE_ONLY) + private String endpoint; + + /** + * This determines the format that Event Grid should expect for incoming + * events published to the topic. Possible values include: + * 'EventGridSchema', 'CustomEventSchema', 'CloudEventSchemaV1_0'. + */ + @JsonProperty(value = "properties.inputSchema") + private InputSchema inputSchema; + + /** + * This enables publishing using custom event schemas. An + * InputSchemaMapping can be specified to map various properties of a + * source schema to various required properties of the EventGridEvent + * schema. + */ + @JsonProperty(value = "properties.inputSchemaMapping") + private InputSchemaMapping inputSchemaMapping; + + /** + * Metric resource id for the topic. + */ + @JsonProperty(value = "properties.metricResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String metricResourceId; + + /** + * Get provisioning state of the topic. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'. + * + * @return the provisioningState value + */ + public TopicProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get endpoint for the topic. + * + * @return the endpoint value + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Get this determines the format that Event Grid should expect for incoming events published to the topic. Possible values include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventSchemaV1_0'. + * + * @return the inputSchema value + */ + public InputSchema inputSchema() { + return this.inputSchema; + } + + /** + * Set this determines the format that Event Grid should expect for incoming events published to the topic. Possible values include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventSchemaV1_0'. + * + * @param inputSchema the inputSchema value to set + * @return the TopicInner object itself. + */ + public TopicInner withInputSchema(InputSchema inputSchema) { + this.inputSchema = inputSchema; + return this; + } + + /** + * Get this enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema. + * + * @return the inputSchemaMapping value + */ + public InputSchemaMapping inputSchemaMapping() { + return this.inputSchemaMapping; + } + + /** + * Set this enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema. + * + * @param inputSchemaMapping the inputSchemaMapping value to set + * @return the TopicInner object itself. + */ + public TopicInner withInputSchemaMapping(InputSchemaMapping inputSchemaMapping) { + this.inputSchemaMapping = inputSchemaMapping; + return this; + } + + /** + * Get metric resource id for the topic. + * + * @return the metricResourceId value + */ + public String metricResourceId() { + return this.metricResourceId; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicSharedAccessKeysImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicSharedAccessKeysImpl.java new file mode 100644 index 000000000000..6bb40a371983 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicSharedAccessKeysImpl.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.TopicSharedAccessKeys; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class TopicSharedAccessKeysImpl extends WrapperImpl implements TopicSharedAccessKeys { + private final EventGridManager manager; + TopicSharedAccessKeysImpl(TopicSharedAccessKeysInner inner, EventGridManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public EventGridManager manager() { + return this.manager; + } + + @Override + public String key1() { + return this.inner().key1(); + } + + @Override + public String key2() { + return this.inner().key2(); + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicSharedAccessKeysInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicSharedAccessKeysInner.java new file mode 100644 index 000000000000..7bfdd7f74e0d --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicSharedAccessKeysInner.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.eventgrid.v2020_01_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Shared access keys of the Topic. + */ +public class TopicSharedAccessKeysInner { + /** + * Shared access key1 for the topic. + */ + @JsonProperty(value = "key1") + private String key1; + + /** + * Shared access key2 for the topic. + */ + @JsonProperty(value = "key2") + private String key2; + + /** + * Get shared access key1 for the topic. + * + * @return the key1 value + */ + public String key1() { + return this.key1; + } + + /** + * Set shared access key1 for the topic. + * + * @param key1 the key1 value to set + * @return the TopicSharedAccessKeysInner object itself. + */ + public TopicSharedAccessKeysInner withKey1(String key1) { + this.key1 = key1; + return this; + } + + /** + * Get shared access key2 for the topic. + * + * @return the key2 value + */ + public String key2() { + return this.key2; + } + + /** + * Set shared access key2 for the topic. + * + * @param key2 the key2 value to set + * @return the TopicSharedAccessKeysInner object itself. + */ + public TopicSharedAccessKeysInner withKey2(String key2) { + this.key2 = key2; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypeInfoImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypeInfoImpl.java new file mode 100644 index 000000000000..983f42961570 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypeInfoImpl.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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.TopicTypeInfo; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.TopicTypeProvisioningState; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.ResourceRegionType; +import java.util.List; + +class TopicTypeInfoImpl extends WrapperImpl implements TopicTypeInfo { + private final EventGridManager manager; + TopicTypeInfoImpl(TopicTypeInfoInner inner, EventGridManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public EventGridManager manager() { + return this.manager; + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String provider() { + return this.inner().provider(); + } + + @Override + public TopicTypeProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public ResourceRegionType resourceRegionType() { + return this.inner().resourceRegionType(); + } + + @Override + public List supportedLocations() { + return this.inner().supportedLocations(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypeInfoInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypeInfoInner.java new file mode 100644 index 000000000000..b42ab0129141 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypeInfoInner.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.ResourceRegionType; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.TopicTypeProvisioningState; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Properties of a topic type info. + */ +@JsonFlatten +public class TopicTypeInfoInner extends ProxyResource { + /** + * Namespace of the provider of the topic type. + */ + @JsonProperty(value = "properties.provider") + private String provider; + + /** + * Display Name for the topic type. + */ + @JsonProperty(value = "properties.displayName") + private String displayName; + + /** + * Description of the topic type. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * Region type of the resource. Possible values include: + * 'RegionalResource', 'GlobalResource'. + */ + @JsonProperty(value = "properties.resourceRegionType") + private ResourceRegionType resourceRegionType; + + /** + * Provisioning state of the topic type. Possible values include: + * 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState") + private TopicTypeProvisioningState provisioningState; + + /** + * List of locations supported by this topic type. + */ + @JsonProperty(value = "properties.supportedLocations") + private List supportedLocations; + + /** + * Get namespace of the provider of the topic type. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set namespace of the provider of the topic type. + * + * @param provider the provider value to set + * @return the TopicTypeInfoInner object itself. + */ + public TopicTypeInfoInner withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get display Name for the topic type. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set display Name for the topic type. + * + * @param displayName the displayName value to set + * @return the TopicTypeInfoInner object itself. + */ + public TopicTypeInfoInner withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get description of the topic type. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the topic type. + * + * @param description the description value to set + * @return the TopicTypeInfoInner object itself. + */ + public TopicTypeInfoInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get region type of the resource. Possible values include: 'RegionalResource', 'GlobalResource'. + * + * @return the resourceRegionType value + */ + public ResourceRegionType resourceRegionType() { + return this.resourceRegionType; + } + + /** + * Set region type of the resource. Possible values include: 'RegionalResource', 'GlobalResource'. + * + * @param resourceRegionType the resourceRegionType value to set + * @return the TopicTypeInfoInner object itself. + */ + public TopicTypeInfoInner withResourceRegionType(ResourceRegionType resourceRegionType) { + this.resourceRegionType = resourceRegionType; + return this; + } + + /** + * Get provisioning state of the topic type. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'. + * + * @return the provisioningState value + */ + public TopicTypeProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set provisioning state of the topic type. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'. + * + * @param provisioningState the provisioningState value to set + * @return the TopicTypeInfoInner object itself. + */ + public TopicTypeInfoInner withProvisioningState(TopicTypeProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get list of locations supported by this topic type. + * + * @return the supportedLocations value + */ + public List supportedLocations() { + return this.supportedLocations; + } + + /** + * Set list of locations supported by this topic type. + * + * @param supportedLocations the supportedLocations value to set + * @return the TopicTypeInfoInner object itself. + */ + public TopicTypeInfoInner withSupportedLocations(List supportedLocations) { + this.supportedLocations = supportedLocations; + return this; + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypesImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypesImpl.java new file mode 100644 index 000000000000..fd86150a950f --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypesImpl.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.TopicTypes; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventType; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.TopicTypeInfo; + +class TopicTypesImpl extends WrapperImpl implements TopicTypes { + private final EventGridManager manager; + + TopicTypesImpl(EventGridManager manager) { + super(manager.inner().topicTypes()); + this.manager = manager; + } + + public EventGridManager manager() { + return this.manager; + } + + private EventTypeImpl wrapModel(EventTypeInner inner) { + return new EventTypeImpl(inner, manager()); + } + + @Override + public Observable listEventTypesAsync(String topicTypeName) { + TopicTypesInner client = this.inner(); + return client.listEventTypesAsync(topicTypeName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public EventType call(EventTypeInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String topicTypeName) { + TopicTypesInner client = this.inner(); + return client.getAsync(topicTypeName) + .map(new Func1() { + @Override + public TopicTypeInfo call(TopicTypeInfoInner inner) { + return new TopicTypeInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync() { + TopicTypesInner client = this.inner(); + return client.listAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public TopicTypeInfo call(TopicTypeInfoInner inner) { + return new TopicTypeInfoImpl(inner, manager()); + } + }); + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypesInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypesInner.java new file mode 100644 index 000000000000..4a822267522b --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicTypesInner.java @@ -0,0 +1,312 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_01_preview.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 java.util.List; +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 TopicTypes. + */ +public class TopicTypesInner { + /** The Retrofit service to perform REST calls. */ + private TopicTypesService service; + /** The service client containing this operation class. */ + private EventGridManagementClientImpl client; + + /** + * Initializes an instance of TopicTypesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public TopicTypesInner(Retrofit retrofit, EventGridManagementClientImpl client) { + this.service = retrofit.create(TopicTypesService.class); + this.client = client; + } + + /** + * The interface defining all the services for TopicTypes to be + * used by Retrofit to perform actually REST calls. + */ + interface TopicTypesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_01_01_preview.TopicTypes list" }) + @GET("providers/Microsoft.EventGrid/topicTypes") + Observable> list(@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.eventgrid.v2020_01_01_preview.TopicTypes get" }) + @GET("providers/Microsoft.EventGrid/topicTypes/{topicTypeName}") + Observable> get(@Path("topicTypeName") String topicTypeName, @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.eventgrid.v2020_01_01_preview.TopicTypes listEventTypes" }) + @GET("providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventTypes") + Observable> listEventTypes(@Path("topicTypeName") String topicTypeName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List topic types. + * List all registered topic types. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<TopicTypeInfoInner> object if successful. + */ + public List list() { + return listWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * List topic types. + * List all registered topic types. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * List topic types. + * List all registered topic types. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<TopicTypeInfoInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List topic types. + * List all registered topic types. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<TopicTypeInfoInner> 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> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.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()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a topic type. + * Get information about a topic type. + * + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TopicTypeInfoInner object if successful. + */ + public TopicTypeInfoInner get(String topicTypeName) { + return getWithServiceResponseAsync(topicTypeName).toBlocking().single().body(); + } + + /** + * Get a topic type. + * Get information about a topic type. + * + * @param topicTypeName Name of the topic type + * @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 topicTypeName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(topicTypeName), serviceCallback); + } + + /** + * Get a topic type. + * Get information about a topic type. + * + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicTypeInfoInner object + */ + public Observable getAsync(String topicTypeName) { + return getWithServiceResponseAsync(topicTypeName).map(new Func1, TopicTypeInfoInner>() { + @Override + public TopicTypeInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a topic type. + * Get information about a topic type. + * + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicTypeInfoInner object + */ + public Observable> getWithServiceResponseAsync(String topicTypeName) { + if (topicTypeName == null) { + throw new IllegalArgumentException("Parameter topicTypeName 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(topicTypeName, 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); + } + + /** + * List event types. + * List event types for a topic type. + * + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 List<EventTypeInner> object if successful. + */ + public List listEventTypes(String topicTypeName) { + return listEventTypesWithServiceResponseAsync(topicTypeName).toBlocking().single().body(); + } + + /** + * List event types. + * List event types for a topic type. + * + * @param topicTypeName Name of the topic type + * @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> listEventTypesAsync(String topicTypeName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listEventTypesWithServiceResponseAsync(topicTypeName), serviceCallback); + } + + /** + * List event types. + * List event types for a topic type. + * + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<EventTypeInner> object + */ + public Observable> listEventTypesAsync(String topicTypeName) { + return listEventTypesWithServiceResponseAsync(topicTypeName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List event types. + * List event types for a topic type. + * + * @param topicTypeName Name of the topic type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<EventTypeInner> object + */ + public Observable>> listEventTypesWithServiceResponseAsync(String topicTypeName) { + if (topicTypeName == null) { + throw new IllegalArgumentException("Parameter topicTypeName 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.listEventTypes(topicTypeName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listEventTypesDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listEventTypesDelegate(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/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicsImpl.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicsImpl.java new file mode 100644 index 000000000000..a7254b334716 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicsImpl.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. + * def + */ + +package com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Topics; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Topic; +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.eventgrid.v2020_01_01_preview.TopicSharedAccessKeys; +import java.util.List; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.EventType; + +class TopicsImpl extends GroupableResourcesCoreImpl implements Topics { + protected TopicsImpl(EventGridManager manager) { + super(manager.inner().topics(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + TopicsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + TopicsInner 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) { + TopicsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + TopicsInner 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 Topic call(TopicInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + TopicsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + TopicsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Topic call(TopicInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public TopicImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable listSharedAccessKeysAsync(String resourceGroupName, String topicName) { + TopicsInner client = this.inner(); + return client.listSharedAccessKeysAsync(resourceGroupName, topicName) + .map(new Func1() { + @Override + public TopicSharedAccessKeys call(TopicSharedAccessKeysInner inner) { + return new TopicSharedAccessKeysImpl(inner, manager()); + } + }); + } + + @Override + public Observable regenerateKeyAsync(String resourceGroupName, String topicName, String keyName) { + TopicsInner client = this.inner(); + return client.regenerateKeyAsync(resourceGroupName, topicName, keyName) + .map(new Func1() { + @Override + public TopicSharedAccessKeys call(TopicSharedAccessKeysInner inner) { + return new TopicSharedAccessKeysImpl(inner, manager()); + } + }); + } + + @Override + protected TopicImpl wrapModel(TopicInner inner) { + return new TopicImpl(inner.name(), inner, manager()); + } + + @Override + protected TopicImpl wrapModel(String name) { + return new TopicImpl(name, new TopicInner(), this.manager()); + } + + @Override + public Observable listEventTypesAsync(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { + TopicsInner client = this.inner(); + return client.listEventTypesAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public EventType call(EventTypeInner inner) { + return new EventTypeImpl(inner, manager()); + } + }); + } + +} diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicsInner.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicsInner.java new file mode 100644 index 000000000000..8e957479a8fc --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/TopicsInner.java @@ -0,0 +1,1903 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.eventgrid.v2020_01_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.eventgrid.v2020_01_01_preview.TopicRegenerateKeyRequest; +import com.microsoft.azure.management.eventgrid.v2020_01_01_preview.TopicUpdateParameters; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +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 Topics. + */ +public class TopicsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private TopicsService service; + /** The service client containing this operation class. */ + private EventGridManagementClientImpl client; + + /** + * Initializes an instance of TopicsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public TopicsInner(Retrofit retrofit, EventGridManagementClientImpl client) { + this.service = retrofit.create(TopicsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Topics to be + * used by Retrofit to perform actually REST calls. + */ + interface TopicsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Topics getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("topicName") String topicName, @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.eventgrid.v2020_01_01_preview.Topics createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("topicName") String topicName, @Body TopicInner topicInfo, @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.eventgrid.v2020_01_01_preview.Topics beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("topicName") String topicName, @Body TopicInner topicInfo, @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.eventgrid.v2020_01_01_preview.Topics delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("topicName") String topicName, @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.eventgrid.v2020_01_01_preview.Topics beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("topicName") String topicName, @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.eventgrid.v2020_01_01_preview.Topics update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("topicName") String topicName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TopicUpdateParameters topicUpdateParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Topics beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("topicName") String topicName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TopicUpdateParameters topicUpdateParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Topics list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.Topics listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @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.eventgrid.v2020_01_01_preview.Topics listSharedAccessKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/listKeys") + Observable> listSharedAccessKeys(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("topicName") String topicName, @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.eventgrid.v2020_01_01_preview.Topics regenerateKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/regenerateKey") + Observable> regenerateKey(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("topicName") String topicName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TopicRegenerateKeyRequest regenerateKeyRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_01_01_preview.Topics listEventTypes" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventTypes") + Observable> listEventTypes(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("providerNamespace") String providerNamespace, @Path("resourceTypeName") String resourceTypeName, @Path("resourceName") String resourceName, @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.eventgrid.v2020_01_01_preview.Topics 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.eventgrid.v2020_01_01_preview.Topics listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get a topic. + * Get properties of a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TopicInner object if successful. + */ + public TopicInner getByResourceGroup(String resourceGroupName, String topicName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, topicName).toBlocking().single().body(); + } + + /** + * Get a topic. + * Get properties of a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @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 topicName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, topicName), serviceCallback); + } + + /** + * Get a topic. + * Get properties of a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String topicName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, topicName).map(new Func1, TopicInner>() { + @Override + public TopicInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a topic. + * Get properties of a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String topicName) { + 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 (topicName == null) { + throw new IllegalArgumentException("Parameter topicName 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, topicName, 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); + } + + /** + * Create a topic. + * Asynchronously creates a new topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param topicInfo Topic information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TopicInner object if successful. + */ + public TopicInner createOrUpdate(String resourceGroupName, String topicName, TopicInner topicInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, topicName, topicInfo).toBlocking().last().body(); + } + + /** + * Create a topic. + * Asynchronously creates a new topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param topicInfo Topic information + * @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 topicName, TopicInner topicInfo, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, topicName, topicInfo), serviceCallback); + } + + /** + * Create a topic. + * Asynchronously creates a new topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param topicInfo Topic information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String topicName, TopicInner topicInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, topicName, topicInfo).map(new Func1, TopicInner>() { + @Override + public TopicInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a topic. + * Asynchronously creates a new topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param topicInfo Topic information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String topicName, TopicInner topicInfo) { + 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 (topicName == null) { + throw new IllegalArgumentException("Parameter topicName is required and cannot be null."); + } + if (topicInfo == null) { + throw new IllegalArgumentException("Parameter topicInfo 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(topicInfo); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, topicName, topicInfo, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create a topic. + * Asynchronously creates a new topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param topicInfo Topic information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TopicInner object if successful. + */ + public TopicInner beginCreateOrUpdate(String resourceGroupName, String topicName, TopicInner topicInfo) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, topicName, topicInfo).toBlocking().single().body(); + } + + /** + * Create a topic. + * Asynchronously creates a new topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param topicInfo Topic information + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String topicName, TopicInner topicInfo, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, topicName, topicInfo), serviceCallback); + } + + /** + * Create a topic. + * Asynchronously creates a new topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param topicInfo Topic information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String topicName, TopicInner topicInfo) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, topicName, topicInfo).map(new Func1, TopicInner>() { + @Override + public TopicInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a topic. + * Asynchronously creates a new topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param topicInfo Topic information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String topicName, TopicInner topicInfo) { + 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 (topicName == null) { + throw new IllegalArgumentException("Parameter topicName is required and cannot be null."); + } + if (topicInfo == null) { + throw new IllegalArgumentException("Parameter topicInfo 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(topicInfo); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, topicName, topicInfo, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a topic. + * Delete existing topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 topicName) { + deleteWithServiceResponseAsync(resourceGroupName, topicName).toBlocking().last().body(); + } + + /** + * Delete a topic. + * Delete existing topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @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 topicName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, topicName), serviceCallback); + } + + /** + * Delete a topic. + * Delete existing topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String topicName) { + return deleteWithServiceResponseAsync(resourceGroupName, topicName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a topic. + * Delete existing topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String topicName) { + 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 (topicName == null) { + throw new IllegalArgumentException("Parameter topicName 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, topicName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a topic. + * Delete existing topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 topicName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, topicName).toBlocking().single().body(); + } + + /** + * Delete a topic. + * Delete existing topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @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 topicName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, topicName), serviceCallback); + } + + /** + * Delete a topic. + * Delete existing topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String topicName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, topicName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a topic. + * Delete existing topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String topicName) { + 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 (topicName == null) { + throw new IllegalArgumentException("Parameter topicName 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, topicName, 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(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TopicInner object if successful. + */ + public TopicInner update(String resourceGroupName, String topicName) { + return updateWithServiceResponseAsync(resourceGroupName, topicName).toBlocking().last().body(); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @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 topicName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, topicName), serviceCallback); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String topicName) { + return updateWithServiceResponseAsync(resourceGroupName, topicName).map(new Func1, TopicInner>() { + @Override + public TopicInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String topicName) { + 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 (topicName == null) { + throw new IllegalArgumentException("Parameter topicName 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 Map tags = null; + TopicUpdateParameters topicUpdateParameters = new TopicUpdateParameters(); + topicUpdateParameters.withTags(null); + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, topicName, this.client.apiVersion(), this.client.acceptLanguage(), topicUpdateParameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param tags Tags of the resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TopicInner object if successful. + */ + public TopicInner update(String resourceGroupName, String topicName, Map tags) { + return updateWithServiceResponseAsync(resourceGroupName, topicName, tags).toBlocking().last().body(); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param tags Tags of the resource + * @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 topicName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, topicName, tags), serviceCallback); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param tags Tags of the resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String topicName, Map tags) { + return updateWithServiceResponseAsync(resourceGroupName, topicName, tags).map(new Func1, TopicInner>() { + @Override + public TopicInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param tags Tags of the resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String topicName, Map tags) { + 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 (topicName == null) { + throw new IllegalArgumentException("Parameter topicName 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(tags); + TopicUpdateParameters topicUpdateParameters = new TopicUpdateParameters(); + topicUpdateParameters.withTags(tags); + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, topicName, this.client.apiVersion(), this.client.acceptLanguage(), topicUpdateParameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TopicInner object if successful. + */ + public TopicInner beginUpdate(String resourceGroupName, String topicName) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, topicName).toBlocking().single().body(); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @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 topicName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, topicName), serviceCallback); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String topicName) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, topicName).map(new Func1, TopicInner>() { + @Override + public TopicInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String topicName) { + 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 (topicName == null) { + throw new IllegalArgumentException("Parameter topicName 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 Map tags = null; + TopicUpdateParameters topicUpdateParameters = new TopicUpdateParameters(); + topicUpdateParameters.withTags(null); + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, topicName, this.client.apiVersion(), this.client.acceptLanguage(), topicUpdateParameters, 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); + } + } + }); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param tags Tags of the resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TopicInner object if successful. + */ + public TopicInner beginUpdate(String resourceGroupName, String topicName, Map tags) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, topicName, tags).toBlocking().single().body(); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param tags Tags of the resource + * @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 topicName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, topicName, tags), serviceCallback); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param tags Tags of the resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String topicName, Map tags) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, topicName, tags).map(new Func1, TopicInner>() { + @Override + public TopicInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a topic. + * Asynchronously updates a topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param tags Tags of the resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String topicName, Map tags) { + 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 (topicName == null) { + throw new IllegalArgumentException("Parameter topicName 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(tags); + TopicUpdateParameters topicUpdateParameters = new TopicUpdateParameters(); + topicUpdateParameters.withTags(tags); + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, topicName, this.client.apiVersion(), this.client.acceptLanguage(), topicUpdateParameters, 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(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<TopicInner> 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(); + } + }; + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + * @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); + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TopicInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TopicInner> 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)); + } + }); + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TopicInner> 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; + return service.list(this.client.subscriptionId(), this.client.apiVersion(), filter, top, 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); + } + } + }); + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<TopicInner> object if successful. + */ + public PagedList list(final String filter, final Integer top) { + ServiceResponse> response = listSinglePageAsync(filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TopicInner> object + */ + public Observable> listAsync(final String filter, final Integer top) { + return listWithServiceResponseAsync(filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TopicInner> object + */ + public Observable>> listWithServiceResponseAsync(final String filter, final Integer top) { + return listSinglePageAsync(filter, top) + .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)); + } + }); + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TopicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String filter, final Integer top) { + 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(), this.client.apiVersion(), filter, top, 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); + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<TopicInner> 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(); + } + }; + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @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); + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TopicInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TopicInner> 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)); + } + }); + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TopicInner> 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; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), filter, top, 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); + } + } + }); + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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<TopicInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, final String filter, final Integer top) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, filter, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TopicInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, final String filter, final Integer top) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TopicInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String filter, final Integer top) { + return listByResourceGroupSinglePageAsync(resourceGroupName, filter, top) + .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)); + } + }); + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription. + ServiceResponse> * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + ServiceResponse> * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TopicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String filter, final Integer top) { + 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, this.client.apiVersion(), filter, top, 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); + } + + /** + * List keys for a topic. + * List the two keys used to publish to a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TopicSharedAccessKeysInner object if successful. + */ + public TopicSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String topicName) { + return listSharedAccessKeysWithServiceResponseAsync(resourceGroupName, topicName).toBlocking().single().body(); + } + + /** + * List keys for a topic. + * List the two keys used to publish to a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @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 listSharedAccessKeysAsync(String resourceGroupName, String topicName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listSharedAccessKeysWithServiceResponseAsync(resourceGroupName, topicName), serviceCallback); + } + + /** + * List keys for a topic. + * List the two keys used to publish to a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicSharedAccessKeysInner object + */ + public Observable listSharedAccessKeysAsync(String resourceGroupName, String topicName) { + return listSharedAccessKeysWithServiceResponseAsync(resourceGroupName, topicName).map(new Func1, TopicSharedAccessKeysInner>() { + @Override + public TopicSharedAccessKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List keys for a topic. + * List the two keys used to publish to a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicSharedAccessKeysInner object + */ + public Observable> listSharedAccessKeysWithServiceResponseAsync(String resourceGroupName, String topicName) { + 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 (topicName == null) { + throw new IllegalArgumentException("Parameter topicName 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.listSharedAccessKeys(this.client.subscriptionId(), resourceGroupName, topicName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listSharedAccessKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSharedAccessKeysDelegate(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); + } + + /** + * Regenerate key for a topic. + * Regenerate a shared access key for a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param keyName Key name to regenerate key1 or key2 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TopicSharedAccessKeysInner object if successful. + */ + public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String topicName, String keyName) { + return regenerateKeyWithServiceResponseAsync(resourceGroupName, topicName, keyName).toBlocking().single().body(); + } + + /** + * Regenerate key for a topic. + * Regenerate a shared access key for a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param keyName Key name to regenerate key1 or key2 + * @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 regenerateKeyAsync(String resourceGroupName, String topicName, String keyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regenerateKeyWithServiceResponseAsync(resourceGroupName, topicName, keyName), serviceCallback); + } + + /** + * Regenerate key for a topic. + * Regenerate a shared access key for a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param keyName Key name to regenerate key1 or key2 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicSharedAccessKeysInner object + */ + public Observable regenerateKeyAsync(String resourceGroupName, String topicName, String keyName) { + return regenerateKeyWithServiceResponseAsync(resourceGroupName, topicName, keyName).map(new Func1, TopicSharedAccessKeysInner>() { + @Override + public TopicSharedAccessKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerate key for a topic. + * Regenerate a shared access key for a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic + * @param keyName Key name to regenerate key1 or key2 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopicSharedAccessKeysInner object + */ + public Observable> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String topicName, String keyName) { + 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 (topicName == null) { + throw new IllegalArgumentException("Parameter topicName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (keyName == null) { + throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); + } + TopicRegenerateKeyRequest regenerateKeyRequest = new TopicRegenerateKeyRequest(); + regenerateKeyRequest.withKeyName(keyName); + return service.regenerateKey(this.client.subscriptionId(), resourceGroupName, topicName, this.client.apiVersion(), this.client.acceptLanguage(), regenerateKeyRequest, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = regenerateKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse regenerateKeyDelegate(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); + } + + /** + * List topic event types. + * List event types for a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the topic type + * @param resourceName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 List<EventTypeInner> object if successful. + */ + public List listEventTypes(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { + return listEventTypesWithServiceResponseAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName).toBlocking().single().body(); + } + + /** + * List topic event types. + * List event types for a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the topic type + * @param resourceName Name of the topic + * @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> listEventTypesAsync(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listEventTypesWithServiceResponseAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName), serviceCallback); + } + + /** + * List topic event types. + * List event types for a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the topic type + * @param resourceName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<EventTypeInner> object + */ + public Observable> listEventTypesAsync(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { + return listEventTypesWithServiceResponseAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List topic event types. + * List event types for a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param providerNamespace Namespace of the provider of the topic + * @param resourceTypeName Name of the topic type + * @param resourceName Name of the topic + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<EventTypeInner> object + */ + public Observable>> listEventTypesWithServiceResponseAsync(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { + 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 (providerNamespace == null) { + throw new IllegalArgumentException("Parameter providerNamespace is required and cannot be null."); + } + if (resourceTypeName == null) { + throw new IllegalArgumentException("Parameter resourceTypeName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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.listEventTypes(this.client.subscriptionId(), resourceGroupName, providerNamespace, resourceTypeName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listEventTypesDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listEventTypesDelegate(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); + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + * @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<TopicInner> 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(); + } + }; + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + * @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); + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + * @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<TopicInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + * @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<TopicInner> 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)); + } + }); + } + + /** + * List topics under an Azure subscription. + * List all the topics under an Azure subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TopicInner> 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); + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + * @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<TopicInner> 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(); + } + }; + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + * @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); + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + * @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<TopicInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + * @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<TopicInner> 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)); + } + }); + } + + /** + * List topics under a resource group. + * List all the topics under a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TopicInner> 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/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/package-info.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/implementation/package-info.java new file mode 100644 index 000000000000..c26b415a3b8f --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_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 EventGridManagementClient. + * Azure EventGrid Management Client. + */ +package com.microsoft.azure.management.eventgrid.v2020_01_01_preview.implementation; diff --git a/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/package-info.java b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_01_preview/package-info.java new file mode 100644 index 000000000000..3d99b2f88e33 --- /dev/null +++ b/eventgrid/resource-manager/v2020_01_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_01_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 EventGridManagementClient. + * Azure EventGrid Management Client. + */ +package com.microsoft.azure.management.eventgrid.v2020_01_01_preview; From 9fd2933a5e69cfa514add06f434def429cb0a253 Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Thu, 24 Oct 2019 11:10:02 -0700 Subject: [PATCH 59/64] Include test packages in javadocs (#6022) --- pom.client.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pom.client.xml b/pom.client.xml index f17348254b22..e77291e5aff4 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -347,9 +347,7 @@ *.impl*: *.implementation*: - com.azure.tools.checkstyle*: - com.azure.core.test: - com.azure.core.test.* + com.azure.tools.checkstyle* From 12dc345876e6115c3f065697243871355947b891 Mon Sep 17 00:00:00 2001 From: Connie Yau Date: Thu, 24 Oct 2019 13:40:48 -0700 Subject: [PATCH 60/64] Identity documentation (#6016) * Fix naming for MSI credential. * Adding documentation to azure-identity. * Rename MSI -> Msi. * Clarifying documentation. --- .../identity/AadCredentialBuilderBase.java | 4 +++- ...tial.java => AppServiceMsiCredential.java} | 24 +++++++++++-------- .../AuthorizationCodeCredentialBuilder.java | 2 ++ .../ChainedTokenCredentialBuilder.java | 3 +++ .../identity/ClientCertificateCredential.java | 2 +- .../ClientCertificateCredentialBuilder.java | 2 ++ .../ClientSecretCredentialBuilder.java | 2 ++ .../azure/identity/CredentialBuilderBase.java | 3 +++ .../identity/DefaultAzureCredential.java | 13 ++++++++-- .../DefaultAzureCredentialBuilder.java | 2 ++ .../identity/DeviceCodeCredentialBuilder.java | 4 +++- .../com/azure/identity/DeviceCodeInfo.java | 11 ++++++++- .../azure/identity/EnvironmentCredential.java | 11 +++++++-- .../EnvironmentCredentialBuilder.java | 2 ++ .../InteractiveBrowserCredentialBuilder.java | 2 ++ .../identity/ManagedIdentityCredential.java | 11 +++++---- .../ManagedIdentityCredentialBuilder.java | 6 +++-- .../identity/SharedTokenCacheCredential.java | 19 +++++++-------- .../SharedTokenCacheCredentialBuilder.java | 17 +++++++------ .../UsernamePasswordCredentialBuilder.java | 2 ++ ....java => VirtualMachineMsiCredential.java} | 13 +++++----- 21 files changed, 105 insertions(+), 50 deletions(-) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{AppServiceMSICredential.java => AppServiceMsiCredential.java} (64%) rename sdk/identity/azure-identity/src/main/java/com/azure/identity/{VirtualMachineMSICredential.java => VirtualMachineMsiCredential.java} (76%) diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AadCredentialBuilderBase.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AadCredentialBuilderBase.java index 5d003fce0442..696fdf00f815 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AadCredentialBuilderBase.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AadCredentialBuilderBase.java @@ -4,7 +4,7 @@ package com.azure.identity; /** - * The base class for credential builders that allow specifying a client id and tenant ID for an Azure Active Directory. + * The base class for credential builders that allow specifying a client ID and tenant ID for an Azure Active Directory. * @param the type of the credential builder */ public abstract class AadCredentialBuilderBase> extends CredentialBuilderBase { @@ -24,6 +24,7 @@ public T authorityHost(String authorityHost) { /** * Sets the client ID of the application. + * * @param clientId the client ID of the application. * @return itself */ @@ -35,6 +36,7 @@ public T clientId(String clientId) { /** * Sets the tenant ID of the application. + * * @param tenantId the tenant ID of the application. * @return itself */ diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AppServiceMSICredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AppServiceMsiCredential.java similarity index 64% rename from sdk/identity/azure-identity/src/main/java/com/azure/identity/AppServiceMSICredential.java rename to sdk/identity/azure-identity/src/main/java/com/azure/identity/AppServiceMsiCredential.java index cfbe7388610f..4aa556a47550 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AppServiceMSICredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AppServiceMsiCredential.java @@ -11,21 +11,22 @@ import reactor.core.publisher.Mono; /** - * The Managed Service Identity credential for App Service. + * The Managed Service Identity credential for Azure App Service. */ @Immutable -class AppServiceMSICredential { +class AppServiceMsiCredential { private final String msiEndpoint; private final String msiSecret; private final IdentityClient identityClient; private final String clientId; /** - * Creates an instance of AppServiceMSICredential. - * @param clientId the client id of user assigned or system assigned identity - * @param identityClient the identity client to acquire a token with. + * Creates an instance of {@link AppServiceMsiCredential}. + * + * @param clientId The client ID of user assigned or system assigned identity. + * @param identityClient The identity client to acquire a token with. */ - AppServiceMSICredential(String clientId, IdentityClient identityClient) { + AppServiceMsiCredential(String clientId, IdentityClient identityClient) { Configuration configuration = Configuration.getGlobalConfiguration(); this.msiEndpoint = configuration.get(Configuration.PROPERTY_MSI_ENDPOINT); this.msiSecret = configuration.get(Configuration.PROPERTY_MSI_SECRET); @@ -34,16 +35,19 @@ class AppServiceMSICredential { } /** - * @return the client id of user assigned or system assigned identity. + * Gets the client ID of the user assigned or system assigned identity. + * + * @return The client ID of user assigned or system assigned identity. */ public String getClientId() { return this.clientId; } /** - * Gets the token for a list of scopes. - * @param request the details of the token request - * @return a Publisher that emits an AccessToken + * Gets an access token for a token request. + * + * @param request The details of the token request. + * @return A publisher that emits an {@link AccessToken}. */ public Mono authenticate(TokenRequestContext request) { return identityClient.authenticateToManagedIdentityEndpoint(msiEndpoint, msiSecret, request); diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java index 6bff7aa7b363..c9a00e6c9c4d 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java @@ -48,6 +48,8 @@ public AuthorizationCodeCredentialBuilder redirectUrl(String redirectUrl) { } /** + * Creates a new {@link AuthorizationCodeCredential} with the current configurations. + * * @return a {@link AuthorizationCodeCredential} with the current configurations. */ public AuthorizationCodeCredential build() { diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredentialBuilder.java index 261a8aeb0d97..87b554b7f22f 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredentialBuilder.java @@ -25,6 +25,7 @@ public ChainedTokenCredentialBuilder() { /** * Adds a credential to try to authenticate at the front of the chain. + * * @param credential the credential to be added to the front of chain * @return the ChainedTokenCredential itself */ @@ -44,6 +45,8 @@ public ChainedTokenCredentialBuilder addLast(TokenCredential credential) { } /** + * Creates a new {@link ChainedTokenCredential} with the current configurations. + * * @return a {@link ChainedTokenCredential} with the current configurations. */ public ChainedTokenCredential build() { diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredential.java index 0a916ea46859..44dfd883582c 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredential.java @@ -33,7 +33,7 @@ public class ClientCertificateCredential implements TokenCredential { * Creates a ClientSecretCredential with default identity client options. * @param tenantId the tenant ID of the application * @param clientId the client ID of the application - * @param certificatePath the PEM file / PFX file containing the certificate + * @param certificatePath the PEM file or PFX file containing the certificate * @param certificatePassword the password protecting the PFX file * @param identityClientOptions the options to configure the identity client */ diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java index 920fdb5af7c5..b49acb935439 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java @@ -41,6 +41,8 @@ public ClientCertificateCredentialBuilder pfxCertificate(String certificatePath, } /** + * Creates a new {@link ClientCertificateCredential} with the current configurations. + * * @return a {@link ClientCertificateCredential} with the current configurations. */ public ClientCertificateCredential build() { diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java index 6475ffcb5552..d8061398d5e7 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java @@ -26,6 +26,8 @@ public ClientSecretCredentialBuilder clientSecret(String clientSecret) { } /** + * Creates a new {@link ClientCertificateCredential} with the current configurations. + * * @return a {@link ClientSecretCredentialBuilder} with the current configurations. */ public ClientSecretCredential build() { diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/CredentialBuilderBase.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/CredentialBuilderBase.java index 1438a461e779..11ec1cb80671 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/CredentialBuilderBase.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/CredentialBuilderBase.java @@ -22,6 +22,7 @@ public abstract class CredentialBuilderBase> /** * Specifies the max number of retries when an authentication request fails. + * * @param maxRetry the number of retries * @return itself */ @@ -33,6 +34,7 @@ public T maxRetry(int maxRetry) { /** * Specifies a Function to calculate seconds of timeout on every retried request. + * * @param retryTimeout the Function that returns a timeout in seconds given the number of retry * @return itself */ @@ -44,6 +46,7 @@ public T retryTimeout(Function retryTimeout) { /** * Specifies he options for proxy configuration. + * * @param proxyOptions the options for proxy configuration * @return itself */ diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java index 4a80331a7654..3d3803535938 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java @@ -10,7 +10,15 @@ import java.util.Arrays; /** - * The base class for a token credential to be used in an Azure client library. + * Creates a credential using environment variables or the shared token cache. It tries to create a valid credential in + * the following order: + * + *
      + *
    1. {@link EnvironmentCredential}
    2. + *
    3. {@link ManagedIdentityCredential}
    4. + *
    5. {@link SharedTokenCacheCredential}
    6. + *
    7. Fails if none of the credentials above could be created.
    8. + *
    */ @Immutable public final class DefaultAzureCredential extends ChainedTokenCredential { @@ -28,6 +36,7 @@ public final class DefaultAzureCredential extends ChainedTokenCredential { DefaultAzureCredential(IdentityClientOptions identityClientOptions) { super(new ArrayDeque<>(Arrays.asList(new EnvironmentCredential(identityClientOptions), new ManagedIdentityCredential(null, identityClientOptions), - new SharedTokenCacheCredential(null, "04b07795-8ddb-461a-bbee-02f9e1bf7b46", identityClientOptions)))); + new SharedTokenCacheCredential(null, "04b07795-8ddb-461a-bbee-02f9e1bf7b46", + identityClientOptions)))); } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java index 91f3f90597b8..9acc5b7e9abe 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java @@ -10,6 +10,8 @@ */ public class DefaultAzureCredentialBuilder extends CredentialBuilderBase { /** + * Creates new {@link DefaultAzureCredential} with the configured options set. + * * @return a {@link DefaultAzureCredential} with the current configurations. */ public DefaultAzureCredential build() { diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java index 1fd197572a4c..08d74b043a1a 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java @@ -20,7 +20,7 @@ public class DeviceCodeCredentialBuilder extends AadCredentialBuilderBase + *
      + *
    • {@link Configuration#PROPERTY_AZURE_CLIENT_ID AZURE_CLIENT_ID}
    • + *
    • {@link Configuration#PROPERTY_AZURE_CLIENT_SECRET AZURE_CLIENT_SECRET}
    • + *
    • {@link Configuration#PROPERTY_AZURE_TENANT_ID AZURE_TENANT_ID}
    • + *
    */ @Immutable public class EnvironmentCredential implements TokenCredential { @@ -25,6 +31,7 @@ public class EnvironmentCredential implements TokenCredential { /** * Creates an instance of the default environment credential provider. + * * @param identityClientOptions the options for configuring the identity client */ EnvironmentCredential(IdentityClientOptions identityClientOptions) { diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/EnvironmentCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/EnvironmentCredentialBuilder.java index 52df6b0b2c9e..9b501d46bf0d 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/EnvironmentCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/EnvironmentCredentialBuilder.java @@ -20,6 +20,8 @@ public EnvironmentCredentialBuilder authorityHost(String authorityHost) { } /** + * Creates a new {@link EnvironmentCredential} with the current configurations. + * * @return a {@link EnvironmentCredential} with the current configurations. */ public EnvironmentCredential build() { diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java index 19e054181fc0..d0ef8e3a863f 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java @@ -28,6 +28,8 @@ public InteractiveBrowserCredentialBuilder port(int port) { } /** + * Creates a new {@link InteractiveBrowserCredential} with the current configurations. + * * @return a {@link InteractiveBrowserCredential} with the current configurations. */ public InteractiveBrowserCredential build() { diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredential.java index aa28841227e2..1cff3f761a17 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredential.java @@ -18,8 +18,8 @@ */ @Immutable public final class ManagedIdentityCredential implements TokenCredential { - private final AppServiceMSICredential appServiceMSICredential; - private final VirtualMachineMSICredential virtualMachineMSICredential; + private final AppServiceMsiCredential appServiceMSICredential; + private final VirtualMachineMsiCredential virtualMachineMSICredential; /** * Creates an instance of the ManagedIdentityCredential. @@ -33,16 +33,17 @@ public final class ManagedIdentityCredential implements TokenCredential { .build(); Configuration configuration = Configuration.getGlobalConfiguration(); if (configuration.contains(Configuration.PROPERTY_MSI_ENDPOINT)) { - appServiceMSICredential = new AppServiceMSICredential(clientId, identityClient); + appServiceMSICredential = new AppServiceMsiCredential(clientId, identityClient); virtualMachineMSICredential = null; } else { - virtualMachineMSICredential = new VirtualMachineMSICredential(clientId, identityClient); + virtualMachineMSICredential = new VirtualMachineMsiCredential(clientId, identityClient); appServiceMSICredential = null; } } /** - * @return the client id of user assigned or system assigned identity. + * Gets the client ID of user assigned or system assigned identity. + * @return the client ID of user assigned or system assigned identity. */ public String getClientId() { return this.appServiceMSICredential != null diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredentialBuilder.java index 6102cdeff4e4..9a6e43b8db66 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredentialBuilder.java @@ -12,9 +12,9 @@ public class ManagedIdentityCredentialBuilder extends CredentialBuilderBase getToken(TokenRequestContext request) { if (pubClient == null) { try { PersistentTokenCacheAccessAspect accessAspect = new PersistentTokenCacheAccessAspect(); - pubClient = PublicClientApplication.builder(this.clientID) + pubClient = PublicClientApplication.builder(this.clientId) .setTokenCacheAccessAspect(accessAspect) .build(); } catch (Exception e) { diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredentialBuilder.java index 42ea2a2faefc..d0f5528baf32 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredentialBuilder.java @@ -12,13 +12,12 @@ public class SharedTokenCacheCredentialBuilder extends CredentialBuilderBase authenticate(TokenRequestContext request) { return identityClient.authenticateToIMDSEndpoint(request); From c978dbcd535f8350cacacbf02e2186997d692dda Mon Sep 17 00:00:00 2001 From: Vinay Gera Date: Thu, 24 Oct 2019 15:07:59 -0700 Subject: [PATCH 61/64] Kv api updates preivew5 (#5910) KV Keys and Secrets API updates --- .../checkstyle/checkstyle-suppressions.xml | 4 +- .../resources/spotbugs/spotbugs-exclude.xml | 14 +- .../src/samples/AsyncListKeyVaultSecrets.md | 2 +- .../src/samples/ListeKeyVaultSecrets.md | 2 +- .../README.md | 6 +- ...ificateAsyncClientJavaDocCodeSnippets.java | 19 +- .../azure-security-keyvault-keys/README.md | 100 +- .../keyvault/keys/KeyAsyncClient.java | 510 ++-- .../security/keyvault/keys/KeyClient.java | 344 +-- .../keyvault/keys/KeyClientBuilder.java | 47 +- .../keys/KeyImportRequestParameters.java | 2 +- .../keyvault/keys/KeyRequestAttributes.java | 14 +- .../keyvault/keys/KeyRequestParameters.java | 6 +- .../security/keyvault/keys/KeyService.java | 108 +- .../cryptography/CryptographyAsyncClient.java | 204 +- .../keys/cryptography/CryptographyClient.java | 133 +- .../CryptographyClientBuilder.java | 40 +- .../cryptography/CryptographyService.java | 16 +- .../CryptographyServiceClient.java | 55 +- .../cryptography/EcKeyCryptographyClient.java | 26 +- .../KeyEncryptionKeyAsyncClient.java | 2 +- .../KeyEncryptionKeyClientBuilder.java | 115 +- .../LocalKeyCryptographyClient.java | 20 +- .../RsaKeyCryptographyClient.java | 41 +- .../SymmetricKeyCryptographyClient.java | 85 +- .../cryptography/models/DecryptResult.java | 34 +- .../cryptography/models/EncryptResult.java | 48 +- .../cryptography/models/KeyUnwrapResult.java | 32 - .../keys/cryptography/models/SignResult.java | 31 +- .../cryptography/models/UnwrapResult.java | 68 + .../cryptography/models/VerifyResult.java | 35 +- .../{KeyWrapResult.java => WrapResult.java} | 40 +- .../KeyVaultCredentialPolicy.java | 2 +- .../{ => implementation}/ScopeTokenCache.java | 2 +- .../Base64UrlJsonDeserializer.java | 2 +- .../{webkey => }/Base64UrlJsonSerializer.java | 2 +- .../models/{webkey => }/ByteExtensions.java | 2 +- ...teOptions.java => CreateEcKeyOptions.java} | 52 +- ...eateOptions.java => CreateKeyOptions.java} | 34 +- ...eOptions.java => CreateRsaKeyOptions.java} | 40 +- .../keyvault/keys/models/DeletedKey.java | 15 +- ...portOptions.java => ImportKeyOptions.java} | 31 +- .../keys/models/{webkey => }/JsonWebKey.java | 205 +- .../models/{webkey => }/KeyCurveName.java | 2 +- .../models/{webkey => }/KeyOperation.java | 2 +- .../keyvault/keys/models/KeyProperties.java | 45 +- .../keys/models/{webkey => }/KeyType.java | 2 +- .../models/{Key.java => KeyVaultKey.java} | 30 +- .../keys/models/webkey/package-info.java | 7 - .../src/main/java/module-info.java | 2 - .../keys/BackupAndRestoreOperations.java | 32 +- .../keys/BackupAndRestoreOperationsAsync.java | 21 +- .../security/keyvault/keys/HelloWorld.java | 44 +- .../keyvault/keys/HelloWorldAsync.java | 35 +- .../KeyAsyncClientJavaDocCodeSnippets.java | 170 +- .../keys/KeyClientJavaDocCodeSnippets.java | 224 +- .../keyvault/keys/ListOperations.java | 32 +- .../keyvault/keys/ListOperationsAsync.java | 36 +- .../keyvault/keys/ManagingDeletedKeys.java | 97 +- .../keys/ManagingDeletedKeysAsync.java | 60 +- ...ographyAsyncClientJavaDocCodeSnippets.java | 38 +- ...CryptographyClientJavaDocCodeSnippets.java | 81 +- .../EncryptDecryptOperations.java | 29 - .../EncryptDecryptOperationsAsync.java | 33 - .../cryptography/KeyWrapUnwrapOperations.java | 33 +- .../KeyWrapUnwrapOperationsAsync.java | 29 - .../keyvault/keys/KeyAsyncClientTest.java | 134 +- .../security/keyvault/keys/KeyClientTest.java | 119 +- .../keyvault/keys/KeyClientTestBase.java | 116 +- .../cryptography/CryptographyClientTest.java | 318 +-- .../CryptographyClientTestBase.java | 24 - .../resources/session-records/deleteKey.json | 463 +++- .../session-records/deleteKeyNotFound.json | 39 +- .../session-records/encryptDecryptRsa.json | 331 ++- .../session-records/getDeletedKey.json | 585 ++-- .../session-records/listDeletedKeys.json | 2410 ++++++++++++----- .../session-records/listKeyVersions.json | 747 +++-- .../session-records/recoverDeletedKey.json | 1224 +++++++-- .../recoverDeletedKeyNotFound.json | 39 +- .../resources/session-records/restoreKey.json | 787 ++++-- .../session-records/signVerifyEc.json | 1018 ++++--- .../session-records/signVerifyRsa.json | 419 ++- .../session-records/wrapUnwraptRsa.json | 387 ++- .../azure-security-keyvault-secrets/README.md | 62 +- .../keyvault/secrets/SecretAsyncClient.java | 303 +-- .../keyvault/secrets/SecretClient.java | 195 +- .../keyvault/secrets/SecretClientBuilder.java | 41 +- .../secrets/SecretRequestAttributes.java | 4 +- .../keyvault/secrets/SecretService.java | 76 +- .../KeyVaultCredentialPolicy.java | 2 +- .../{ => implementation}/ScopeTokenCache.java | 2 +- .../secrets/models/DeletedSecret.java | 14 +- .../{Secret.java => KeyVaultSecret.java} | 10 +- .../secrets/models/SecretProperties.java | 34 +- .../secrets/BackupAndRestoreOperations.java | 32 +- .../BackupAndRestoreOperationsAsync.java | 19 +- .../security/keyvault/secrets/HelloWorld.java | 40 +- .../keyvault/secrets/HelloWorldAsync.java | 23 +- .../keyvault/secrets/IdentitySamples.java | 26 +- .../keyvault/secrets/ListOperations.java | 20 +- .../keyvault/secrets/ListOperationsAsync.java | 26 +- .../secrets/ManagingDeletedSecrets.java | 98 +- .../secrets/ManagingDeletedSecretsAsync.java | 50 +- .../secrets/PersistentTokenCacheDemo.java | 6 +- .../SecretAsyncClientJavaDocCodeSnippets.java | 131 +- .../SecretClientJavaDocCodeSnippets.java | 166 +- .../secrets/SecretAsyncClientTest.java | 112 +- .../keyvault/secrets/SecretClientTest.java | 85 +- .../secrets/SecretClientTestBase.java | 110 +- .../session-records/deleteSecret.json | 586 +++- .../session-records/deleteSecretNotFound.json | 39 +- .../session-records/getDeletedSecret.json | 565 ++-- .../session-records/listDeletedSecrets.json | 2139 +++++++++------ .../session-records/listSecretVersions.json | 814 ++++-- .../session-records/recoverDeletedSecret.json | 917 ++++++- .../recoverDeletedSecretNotFound.json | 39 +- .../session-records/restoreSecret.json | 697 +++-- 117 files changed, 12512 insertions(+), 7805 deletions(-) delete mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/KeyUnwrapResult.java create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/UnwrapResult.java rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/{KeyWrapResult.java => WrapResult.java} (67%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/{ => implementation}/KeyVaultCredentialPolicy.java (98%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/{ => implementation}/ScopeTokenCache.java (97%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/{webkey => }/Base64UrlJsonDeserializer.java (93%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/{webkey => }/Base64UrlJsonSerializer.java (94%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/{webkey => }/ByteExtensions.java (90%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/{EcKeyCreateOptions.java => CreateEcKeyOptions.java} (62%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/{KeyCreateOptions.java => CreateKeyOptions.java} (80%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/{RsaKeyCreateOptions.java => CreateRsaKeyOptions.java} (68%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/{KeyImportOptions.java => ImportKeyOptions.java} (51%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/{webkey => }/JsonWebKey.java (84%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/{webkey => }/KeyCurveName.java (96%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/{webkey => }/KeyOperation.java (96%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/{webkey => }/KeyType.java (96%) rename sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/{Key.java => KeyVaultKey.java} (73%) delete mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/package-info.java rename sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/{ => implementation}/KeyVaultCredentialPolicy.java (98%) rename sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/{ => implementation}/ScopeTokenCache.java (97%) rename sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/{Secret.java => KeyVaultSecret.java} (93%) diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml index 5ef1b23fd9dc..9a67d82bf090 100755 --- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml +++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml @@ -90,7 +90,7 @@ - + @@ -218,6 +218,8 @@ + + diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml index c34f9024fdd6..5ed539f6d813 100755 --- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml +++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml @@ -474,14 +474,14 @@ - - + + - - + + - + @@ -509,11 +509,11 @@ - + - + diff --git a/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncListKeyVaultSecrets.md b/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncListKeyVaultSecrets.md index cdcce71533da..2f7adb57fa87 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncListKeyVaultSecrets.md +++ b/sdk/core/azure-core-tracing-opencensus/src/samples/AsyncListKeyVaultSecrets.md @@ -118,7 +118,7 @@ public class ListOperationsAsync { semaphore.acquire(); // You need to check if any of the secrets are sharing same values. Let's list the secrets and print their values. // List operations don't return the secrets with value information. So, for each returned secret we call getSecret to get the secret with its value information. - client.listSecrets() + client.listPropertiesOfSecrets() .subscriberContext(traceContext) .subscribe(secretBase -> client.getSecret(secretBase) .subscriberContext(traceContext) diff --git a/sdk/core/azure-core-tracing-opencensus/src/samples/ListeKeyVaultSecrets.md b/sdk/core/azure-core-tracing-opencensus/src/samples/ListeKeyVaultSecrets.md index a91cfb03be57..5fffb7183b92 100644 --- a/sdk/core/azure-core-tracing-opencensus/src/samples/ListeKeyVaultSecrets.md +++ b/sdk/core/azure-core-tracing-opencensus/src/samples/ListeKeyVaultSecrets.md @@ -104,7 +104,7 @@ public class ListOperations { // You need to check if any of the secrets are sharing same values. Let's list the secrets and print their values. // List operations don't return the secrets with value information. So, for each returned secret we call getSecret to get the secret with its value information. - for (SecretProperties secret : client.listSecrets(traceContext)) { + for (SecretProperties secret : client.listPropertiesOfSecrets(traceContext)) { Secret secretWithValue = client.getSecretWithResponse(secret, traceContext).getValue(); System.out.printf("Received secret with name %s and value %s%n", secretWithValue.getName(), secretWithValue.getValue()); } diff --git a/sdk/keyvault/azure-security-keyvault-certificates/README.md b/sdk/keyvault/azure-security-keyvault-certificates/README.md index 22d64cc989dd..71dad66c21fb 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/README.md +++ b/sdk/keyvault/azure-security-keyvault-certificates/README.md @@ -109,7 +109,7 @@ Here is [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to * Grant the above mentioned application authorization to perform key operations on the keyvault: ```Bash - az keyvault set-policy --name --spn $AZURE_CLIENT_ID --certificate-permissions backup delete get list set + az keyvault set-policy --name --spn $AZURE_CLIENT_ID --certificate-permissions backup delete get list create ``` > --certificate-permissions: > Accepted values: backup, create, delete, deleteissuers, get, getissuers, import, list, listissuers, managecontacts, manageissuers, purge, recover, restore, setissuers, update @@ -182,7 +182,7 @@ System.out.printf("Certificate is returned with name %s and secret id %s \n", ce Retrieve a previously stored Certificate by calling `getCertificate` or `getCertificateWithPolicy`. ```Java Certificate certificate = certificateClient.getCertificateWithPolicy("certificateName"); -System.out.printf("Recevied certificate with name %s and version %s and secret id", certificate.getName(), +System.out.printf("Recevied certificate with name %s and version %s and secret id %s", certificate.getName(), certificate.getProperties().getVersion(), certificate.getSecretId()); ``` @@ -230,6 +230,8 @@ The following sections provide several code snippets covering some of the most c - [Delete a Certficate Asynchronously](#delete-a-certificate-asynchronously) - [List Certificates Asynchronously](#list-certificates-asynchronously) +> Note : You should add "System.in.read()" or "Thread.Sleep()" after the function calls in the main class/thread to allow Async functions/operations to execute and finish before the main application/thread exits. + ### Create a Certificate Asynchronously Create a Certificate to be stored in the Azure Key Vault. diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateAsyncClientJavaDocCodeSnippets.java index 05fc03c76752..fd7da944685b 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateAsyncClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateAsyncClientJavaDocCodeSnippets.java @@ -42,16 +42,14 @@ public final class CertificateAsyncClientJavaDocCodeSnippets { */ public CertificateAsyncClient createAsyncClientWithHttpclient() { // BEGIN: com.azure.security.keyvault.certificates.CertificateAsyncClient.withhttpclient.instantiation - HttpPipeline pipeline = new HttpPipelineBuilder().policies(new RetryPolicy()).build(); - CertificateAsyncClient keyClient = new CertificateClientBuilder() - .pipeline(pipeline) + CertificateAsyncClient certificateAsyncClient = new CertificateClientBuilder() .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) .endpoint("https://myvault.azure.net/") .credential(new DefaultAzureCredentialBuilder().build()) .httpClient(HttpClient.createDefault()) .buildAsyncClient(); // END: com.azure.security.keyvault.certificates.CertificateAsyncClient.withhttpclient.instantiation - return keyClient; + return certificateAsyncClient; } /** @@ -60,13 +58,13 @@ public CertificateAsyncClient createAsyncClientWithHttpclient() { */ private CertificateAsyncClient getCertificateAsyncClient() { // BEGIN: com.azure.security.keyvault.certificates.CertificateAsyncClient.instantiation - CertificateAsyncClient secretAsyncClient = new CertificateClientBuilder() + CertificateAsyncClient certificateAsyncClient = new CertificateClientBuilder() .credential(new DefaultAzureCredentialBuilder().build()) .endpoint("https://myvault.vault.azure.net/") .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) .buildAsyncClient(); // END: com.azure.security.keyvault.certificates.CertificateAsyncClient.instantiation - return secretAsyncClient; + return certificateAsyncClient; } /** @@ -75,14 +73,15 @@ private CertificateAsyncClient getCertificateAsyncClient() { */ public CertificateAsyncClient createAsyncClientWithPipeline() { // BEGIN: com.azure.security.keyvault.certificates.CertificateAsyncClient.pipeline.instantiation - HttpPipeline pipeline = new HttpPipelineBuilder().build(); - CertificateAsyncClient secretAsyncClient = new CertificateClientBuilder() + HttpPipeline pipeline = new HttpPipelineBuilder() + .policies(new KeyVaultCredentialPolicy(new DefaultAzureCredentialBuilder().build()), new RetryPolicy()) + .build(); + CertificateAsyncClient certificateAsyncClient = new CertificateClientBuilder() .pipeline(pipeline) .endpoint("https://myvault.azure.net/") - .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); // END: com.azure.security.keyvault.certificates.CertificateAsyncClient.pipeline.instantiation - return secretAsyncClient; + return certificateAsyncClient; } /** diff --git a/sdk/keyvault/azure-security-keyvault-keys/README.md b/sdk/keyvault/azure-security-keyvault-keys/README.md index 03c26e0c3dea..83e15f5dae64 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/README.md +++ b/sdk/keyvault/azure-security-keyvault-keys/README.md @@ -110,7 +110,7 @@ Here is [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to * Grant the above mentioned application authorization to perform key operations on the keyvault: ```Bash - az keyvault set-policy --name --spn $AZURE_CLIENT_ID --key-permissions backup delete get list set + az keyvault set-policy --name --spn $AZURE_CLIENT_ID --key-permissions backup delete get list create ``` > --key-permissions: > Accepted values: backup, delete, get, list, purge, recover, restore, create @@ -128,7 +128,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.KeyClient; KeyClient client = new KeyClientBuilder() - .endpoint() + .vaultUrl() .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); ``` @@ -142,14 +142,8 @@ Once you've populated the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET** and **AZU import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.cryptography.CryptographyClient; -// 1. Create client with json web key. +// Create client with key identifier from key vault. CryptographyClient cryptoClient = new CryptographyClientBuilder() - .credential(new DefaultAzureCredentialBuilder().build()) - .jsonWebKey("") - .buildClient(); - -// 2. Create client with key identifier from key vault. -cryptoClient = new CryptographyClientBuilder() .credential(new DefaultAzureCredentialBuilder().build()) .keyIdentifier("") .buildClient(); @@ -193,18 +187,18 @@ import com.azure.security.keyvault.keys.models.Key; import com.azure.security.keyvault.keys.KeyClient; KeyClient keyClient = new KeyClientBuilder() - .endpoint() + .vaultUrl() .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); -Key rsaKey = keyClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey") - .setExpires(OffsetDateTime.now().plusYears(1)) - .setKeySize(2048)); +KeyVaultKey rsaKey = keyClient.createRsaKey(new CreateRsaKeyOptions("CloudRsaKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1)) + .setKeySize(2048)); System.out.printf("Key is created with name %s and id %s \n", rsaKey.getName(), rsaKey.getId()); -Key ecKey = keyClient.createEcKey(new EcKeyCreateOptions("CloudEcKey") - .setCurve(KeyCurveName.P_256) - .setExpires(OffsetDateTime.now().plusYears(1))); +KeyVaultKey ecKey = keyClient.createEcKey(new CreateEcKeyOptions("CloudEcKey") + .setCurveName(KeyCurveName.P_256) + .setExpiresOn(OffsetDateTime.now().plusYears(1))); System.out.printf("Key is created with name %s and id %s \n", ecKey.getName(), ecKey.getId()); ``` @@ -212,7 +206,7 @@ System.out.printf("Key is created with name %s and id %s \n", ecKey.getName(), e Retrieve a previously stored Key by calling `getKey`. ```Java -Key key = keyClient.getKey("key_name"); +KeyVaultKey key = keyClient.getKey("key_name"); System.out.printf("Key is returned with name %s and id %s \n", key.getName(), key.getId()); ``` @@ -221,19 +215,34 @@ System.out.printf("Key is returned with name %s and id %s \n", key.getName(), ke Update an existing Key by calling `updateKey`. ```Java // Get the key to update. -Key key = keyClient.getKey("key_name"); +KeyVaultKey key = keyClient.getKey("key_name"); // Update the expiry time of the key. -key.getProperties().setExpires(OffsetDateTime.now().plusDays(30)); -Key updatedKey = keyClient.updateKeyProperties(key.getProperties()); -System.out.printf("Key's updated expiry time %s \n", updatedKey.getProperties().getExpires().toString()); +key.getProperties().setExpiresOn(OffsetDateTime.now().plusDays(30)); +KeyVaultKey updatedKey = keyClient.updateKeyProperties(key.getProperties()); +System.out.printf("Key's updated expiry time %s \n", updatedKey.getProperties().getExpiresOn().toString()); ``` ### Delete a Key Delete an existing Key by calling `deleteKey`. ```Java -DeletedKey deletedKey = client.deleteKey("key_name"); -System.out.printf("Deleted Key's deletion date %s", deletedKey.getDeletedDate().toString()); +Poller deletedKeyPoller = keyClient.beginDeleteKey("keyName"); + +while (deletedKeyPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS) { + System.out.println(deletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); +} + +DeletedKey deletedKey = deletedKeyPoller.getLastPollResponse().getValue(); +System.out.println("Deleted Date %s" + deletedKey.getDeletedOn().toString()); +System.out.printf("Deleted Key's deletion date %s", deletedKey.getDeletedOn().toString()); + +// Key is being deleted on server. +while (!deletedKeyPoller.isComplete()) { + System.out.println(deletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); +} +System.out.println(deletedKeyPoller.getStatus().toString()); ``` ### List Keys @@ -241,11 +250,10 @@ System.out.printf("Deleted Key's deletion date %s", deletedKey.getDeletedDate(). List the keys in the key vault by calling `listKeys`. ```java // List operations don't return the keys with key material information. So, for each returned key we call getKey to get the key with its key material information. -for (KeyProperties keyProperties : keyClient.listKeys()) { - Key keyWithMaterial = keyClient.getKey(keyProperties); - System.out.printf("Received key with name %s and type %s", keyWithMaterial.getName(), keyWithMaterial.getKeyMaterial().getKty()); +for (KeyProperties keyProperties : keyClient.listPropertiesOfKeys()) { + KeyVaultKey keyWithMaterial = keyClient.getKey(keyProperties.getName(), keyProperties.getVersion()); + System.out.printf("Received key with name %s and type %s %n", keyWithMaterial.getName(), keyWithMaterial.getKey().getKeyType()); } - ``` ### Encrypt @@ -289,6 +297,7 @@ The following sections provide several code snippets covering some of the most c - [Encrypt Asynchronously](#encryp-asynchronously) - [Decrypt Asynchronously](#decrypt-asynchronously) +> Note : You should add "System.in.read()" or "Thread.Sleep()" after the function calls in the main class/thread to allow Async functions/operations to execute and finish before the main application/thread exits. ### Create a Key Asynchronously @@ -300,20 +309,20 @@ import com.azure.security.keyvault.keys.models.Key; import com.azure.security.keyvault.keys.KeyAsyncClient; KeyAsyncClient keyAsyncClient = new KeyClientBuilder() - .endpoint() + .vaultUrl() .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); -keyAsyncClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey") - .setExpires(OffsetDateTime.now().plusYears(1)) +keyAsyncClient.createRsaKey(new CreateRsaKeyOptions("CloudRsaKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1)) .setKeySize(2048)) .subscribe(key -> - System.out.printf("Key is created with name %s and id %s \n", key.getName(), key.getId())); + System.out.printf("Key is created with name %s and id %s \n", key.getName(), key.getId())); -keyAsyncClient.createEcKey(new EcKeyCreateOptions("CloudEcKey") - .setExpires(OffsetDateTime.now().plusYears(1))) +keyAsyncClient.createEcKey(new CreateEcKeyOptions("CloudEcKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1))) .subscribe(key -> - System.out.printf("Key is created with name %s and id %s \n", key.getName(), key.getId())); + System.out.printf("Key is created with name %s and id %s \n", key.getName(), key.getId())); ``` ### Retrieve a Key Asynchronously @@ -330,11 +339,11 @@ Update an existing Key by calling `updateKey`. ```Java keyAsyncClient.getKey("keyName").subscribe(keyResponse -> { // Get the Key - Key key = keyResponse; + KeyVaultKey key = keyResponse; // Update the expiry time of the key. - key.getProperties().setExpires(OffsetDateTime.now().plusDays(50)); + key.getProperties().setExpiresOn(OffsetDateTime.now().plusDays(50)); keyAsyncClient.updateKeyProperties(key.getProperties()).subscribe(updatedKey -> - System.out.printf("Key's updated expiry time %s \n", updatedKey.getProperties().getExpires().toString())); + System.out.printf("Key's updated expiry time %s \n", updatedKey.getProperties().getExpiresOn().toString())); }); ``` @@ -342,8 +351,13 @@ keyAsyncClient.getKey("keyName").subscribe(keyResponse -> { Delete an existing Key by calling `deleteKey`. ```java -keyAsyncClient.deleteKey("keyName").subscribe(deletedKey -> - System.out.printf("Deleted Key's deletion time %s \n", deletedKey.getDeletedDate().toString())); +keyAsyncClient.beginDeleteKey("keyName") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Delete Key Name: " + pollResponse.getValue().getName()); + System.out.println("Key Delete Date: " + pollResponse.getValue().getDeletedOn().toString()); + }); ``` ### List Keys Asynchronously @@ -351,9 +365,11 @@ keyAsyncClient.deleteKey("keyName").subscribe(deletedKey -> List the keys in the key vault by calling `listKeys`. ```Java // The List Keys operation returns keys without their value, so for each key returned we call `getKey` to get its // value as well. -keyAsyncClient.listKeys() - .flatMap(keyAsyncClient::getKey).subscribe(key -> - System.out.printf("Key returned with name %s and id %s \n", key.getName(), key.getId())); +keyAsyncClient.listPropertiesOfKeys() + .subscribe(keyProperties -> keyAsyncClient.getKey(keyProperties.getName(), keyProperties.getVersion()) + .subscribe(keyResponse -> System.out.printf("Received key with name %s and type %s", + keyResponse.getName(), + keyResponse.getKeyType()))); ``` ### Encrypt Asynchronously diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyAsyncClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyAsyncClient.java index 3afb9d1d0684..5cccc057a3fa 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyAsyncClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyAsyncClient.java @@ -18,21 +18,27 @@ import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; import com.azure.security.keyvault.keys.models.DeletedKey; -import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; -import com.azure.security.keyvault.keys.models.Key; -import com.azure.security.keyvault.keys.models.KeyCreateOptions; -import com.azure.security.keyvault.keys.models.KeyImportOptions; -import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; +import com.azure.security.keyvault.keys.models.CreateEcKeyOptions; +import com.azure.security.keyvault.keys.models.KeyVaultKey; import com.azure.security.keyvault.keys.models.KeyProperties; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; -import com.azure.security.keyvault.keys.models.webkey.KeyCurveName; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; +import com.azure.security.keyvault.keys.models.CreateKeyOptions; +import com.azure.security.keyvault.keys.models.ImportKeyOptions; +import com.azure.security.keyvault.keys.models.CreateRsaKeyOptions; +import com.azure.security.keyvault.keys.models.JsonWebKey; +import com.azure.security.keyvault.keys.models.KeyCurveName; +import com.azure.security.keyvault.keys.models.KeyOperation; +import com.azure.security.keyvault.keys.models.KeyType; + +import java.net.HttpURLConnection; import java.net.URL; +import java.time.Duration; import java.util.Arrays; import java.util.Objects; import java.util.function.Function; +import java.util.function.Supplier; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -41,8 +47,8 @@ import static com.azure.core.implementation.util.FluxUtil.withContext; /** - * The KeyAsyncClient provides asynchronous methods to manage {@link Key keys} in the Azure Key Vault. The client - * supports creating, retrieving, updating, deleting, purging, backing up, restoring and listing the {@link Key keys}. + * The KeyAsyncClient provides asynchronous methods to manage {@link KeyVaultKey keys} in the Azure Key Vault. The client + * supports creating, retrieving, updating, deleting, purging, backing up, restoring and listing the {@link KeyVaultKey keys}. * The client also supports listing {@link DeletedKey deleted keys} for a soft-delete enabled Azure Key Vault. * *

    Samples to construct the async client

    @@ -60,7 +66,7 @@ public final class KeyAsyncClient { static final String CONTENT_TYPE_HEADER_VALUE = "application/json"; static final String KEY_VAULT_SCOPE = "https://vault.azure.net/.default"; - private final String endpoint; + private final String vaultUrl; private final KeyService service; private final ClientLogger logger = new ClientLogger(KeyAsyncClient.class); @@ -68,17 +74,25 @@ public final class KeyAsyncClient { /** * Creates a KeyAsyncClient that uses {@code pipeline} to service requests * - * @param endpoint URL for the Azure KeyVault service. + * @param vaultUrl URL for the Azure KeyVault service. * @param pipeline HttpPipeline that the HTTP requests and responses flow through. * @param version {@link KeyServiceVersion} of the service to be used when making requests. */ - KeyAsyncClient(URL endpoint, HttpPipeline pipeline, KeyServiceVersion version) { - Objects.requireNonNull(endpoint, + KeyAsyncClient(URL vaultUrl, HttpPipeline pipeline, KeyServiceVersion version) { + Objects.requireNonNull(vaultUrl, KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED)); - this.endpoint = endpoint.toString(); + this.vaultUrl = vaultUrl.toString(); this.service = RestProxy.create(KeyService.class, pipeline); } + /** + * Get the vault endpoint url to which service requests are sent to. + * @return the vault endpoint url + */ + public String getVaultUrl() { + return vaultUrl; + } + /** * Creates a new key and stores it in the key vault. The create key operation can be used to create any key type in * key vault. If the named key already exists, Azure Key Vault creates a new version of the key. It requires the @@ -96,12 +110,12 @@ public final class KeyAsyncClient { * * @param name The name of the key being created. * @param keyType The type of key to create. For valid values, see {@link KeyType KeyType}. - * @return A {@link Mono} containing the {@link Key created key}. + * @return A {@link Mono} containing the {@link KeyVaultKey created key}. * @throws ResourceModifiedException if {@code name} or {@code keyType} is null. * @throws HttpRequestException if {@code name} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createKey(String name, KeyType keyType) { + public Mono createKey(String name, KeyType keyType) { try { return withContext(context -> createKeyWithResponse(name, keyType, context)).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { @@ -124,24 +138,24 @@ public Mono createKey(String name, KeyType keyType) { * * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.createKeyWithResponse#keyCreateOptions} * - * @param keyCreateOptions The key configuration object containing information about the key being created. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link Key + * @param createKeyOptions The key configuration object containing information about the key being created. + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultKey * created key}. * @throws ResourceModifiedException if {@code name} or {@code keyType} is null. * @throws HttpRequestException if {@code name} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createKeyWithResponse(KeyCreateOptions keyCreateOptions) { + public Mono> createKeyWithResponse(CreateKeyOptions createKeyOptions) { try { - return withContext(context -> createKeyWithResponse(keyCreateOptions, context)); + return withContext(context -> createKeyWithResponse(createKeyOptions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> createKeyWithResponse(String name, KeyType keyType, Context context) { + Mono> createKeyWithResponse(String name, KeyType keyType, Context context) { KeyRequestParameters parameters = new KeyRequestParameters().setKty(keyType); - return service.createKey(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, + return service.createKey(vaultUrl, name, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Creating key - {}", name)) .doOnSuccess(response -> logger.info("Created key - {}", response.getValue().getName())) @@ -153,11 +167,11 @@ Mono> createKeyWithResponse(String name, KeyType keyType, Context * key vault. If the named key already exists, Azure Key Vault creates a new version of the key. It requires the * {@code keys/create} permission. * - *

    The {@link KeyCreateOptions} is required. The {@link KeyCreateOptions#getExpires() expires} and {@link - * KeyCreateOptions#getNotBefore() notBefore} values are optional. The {@link KeyCreateOptions#isEnabled() enabled} + *

    The {@link CreateKeyOptions} is required. The {@link CreateKeyOptions#getExpiresOn() expires} and {@link + * CreateKeyOptions#getNotBefore() notBefore} values are optional. The {@link CreateKeyOptions#isEnabled() enabled} * field is set to true by Azure Key Vault, if not specified.

    * - *

    The {@link KeyCreateOptions#getKeyType() keyType} indicates the type of key to create. Possible values include: + *

    The {@link CreateKeyOptions#getKeyType() keyType} indicates the type of key to create. Possible values include: * {@link KeyType#EC EC}, {@link KeyType#EC_HSM EC-HSM}, {@link KeyType#RSA RSA}, {@link KeyType#RSA_HSM RSA-HSM} * and {@link KeyType#OCT OCT}.

    * @@ -167,31 +181,31 @@ Mono> createKeyWithResponse(String name, KeyType keyType, Context * * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.createKey#keyCreateOptions} * - * @param keyCreateOptions The key configuration object containing information about the key being created. - * @return A {@link Mono} containing the {@link Key created key}. + * @param createKeyOptions The key configuration object containing information about the key being created. + * @return A {@link Mono} containing the {@link KeyVaultKey created key}. * @throws NullPointerException if {@code keyCreateOptions} is {@code null}. * @throws ResourceModifiedException if {@code keyCreateOptions} is malformed. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createKey(KeyCreateOptions keyCreateOptions) { + public Mono createKey(CreateKeyOptions createKeyOptions) { try { - return createKeyWithResponse(keyCreateOptions).flatMap(FluxUtil::toMono); + return createKeyWithResponse(createKeyOptions).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> createKeyWithResponse(KeyCreateOptions keyCreateOptions, Context context) { - Objects.requireNonNull(keyCreateOptions, "The key create options parameter cannot be null."); + Mono> createKeyWithResponse(CreateKeyOptions createKeyOptions, Context context) { + Objects.requireNonNull(createKeyOptions, "The key create options parameter cannot be null."); KeyRequestParameters parameters = new KeyRequestParameters() - .setKty(keyCreateOptions.getKeyType()) - .setKeyOps(keyCreateOptions.keyOperations()) - .setKeyAttributes(new KeyRequestAttributes(keyCreateOptions)); - return service.createKey(endpoint, keyCreateOptions.getName(), API_VERSION, ACCEPT_LANGUAGE, parameters, + .setKty(createKeyOptions.getKeyType()) + .setKeyOps(createKeyOptions.getKeyOperations()) + .setKeyAttributes(new KeyRequestAttributes(createKeyOptions)); + return service.createKey(vaultUrl, createKeyOptions.getName(), API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) - .doOnRequest(ignored -> logger.info("Creating key - {}", keyCreateOptions.getName())) + .doOnRequest(ignored -> logger.info("Creating key - {}", createKeyOptions.getName())) .doOnSuccess(response -> logger.info("Created key - {}", response.getValue().getName())) - .doOnError(error -> logger.warning("Failed to create key - {}", keyCreateOptions.getName(), error)); + .doOnError(error -> logger.warning("Failed to create key - {}", createKeyOptions.getName(), error)); } /** @@ -199,12 +213,12 @@ Mono> createKeyWithResponse(KeyCreateOptions keyCreateOptions, Con * key type in key vault. If the named key already exists, Azure Key Vault creates a new version of the key. It * requires the {@code keys/create} permission. * - *

    The {@link RsaKeyCreateOptions} is required. The {@link RsaKeyCreateOptions#getKeySize() keySize} can be - * optionally specified. The {@link RsaKeyCreateOptions#getExpires() expires} and - * {@link RsaKeyCreateOptions#getNotBefore() notBefore} values are optional. The - * {@link RsaKeyCreateOptions#isEnabled() enabled} field is set to true by Azure Key Vault, if not specified.

    + *

    The {@link CreateRsaKeyOptions} is required. The {@link CreateRsaKeyOptions#getKeySize() keySize} can be + * optionally specified. The {@link CreateRsaKeyOptions#getExpiresOn() expires} and + * {@link CreateRsaKeyOptions#getNotBefore() notBefore} values are optional. The + * {@link CreateRsaKeyOptions#isEnabled() enabled} field is set to true by Azure Key Vault, if not specified.

    * - *

    The {@link RsaKeyCreateOptions#getKeyType() keyType} indicates the type of key to create. Possible values + *

    The {@link CreateRsaKeyOptions#getKeyType() keyType} indicates the type of key to create. Possible values * include: {@link KeyType#RSA RSA} and {@link KeyType#RSA_HSM RSA-HSM}.

    * *

    Code Samples

    @@ -213,16 +227,16 @@ Mono> createKeyWithResponse(KeyCreateOptions keyCreateOptions, Con * * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.createRsaKey#RsaKeyCreateOptions} * - * @param rsaKeyCreateOptions The key configuration object containing information about the rsa key being + * @param createRsaKeyOptions The key configuration object containing information about the rsa key being * created. - * @return A {@link Mono} containing the {@link Key created key}. + * @return A {@link Mono} containing the {@link KeyVaultKey created key}. * @throws NullPointerException if {@code rsaKeyCreateOptions} is {@code null}. * @throws ResourceModifiedException if {@code rsaKeyCreateOptions} is malformed. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createRsaKey(RsaKeyCreateOptions rsaKeyCreateOptions) { + public Mono createRsaKey(CreateRsaKeyOptions createRsaKeyOptions) { try { - return createRsaKeyWithResponse(rsaKeyCreateOptions).flatMap(FluxUtil::toMono); + return createRsaKeyWithResponse(createRsaKeyOptions).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -233,44 +247,44 @@ public Mono createRsaKey(RsaKeyCreateOptions rsaKeyCreateOptions) { * key type in key vault. If the named key already exists, Azure Key Vault creates a new version of the key. It * requires the {@code keys/create} permission. * - *

    The {@link RsaKeyCreateOptions} is required. The {@link RsaKeyCreateOptions#getKeySize() keySize} can be - * optionally specified. The {@link RsaKeyCreateOptions#getExpires() expires} and - * {@link RsaKeyCreateOptions#getNotBefore() notBefore} values are optional. The {@link - * RsaKeyCreateOptions#isEnabled() enabled} field is set to true by Azure Key Vault, if not specified.

    + *

    The {@link CreateRsaKeyOptions} is required. The {@link CreateRsaKeyOptions#getKeySize() keySize} can be + * optionally specified. The {@link CreateRsaKeyOptions#getExpiresOn() expires} and + * {@link CreateRsaKeyOptions#getNotBefore() notBefore} values are optional. The {@link + * CreateRsaKeyOptions#isEnabled() enabled} field is set to true by Azure Key Vault, if not specified.

    * - *

    The {@link RsaKeyCreateOptions#getKeyType() keyType} indicates the type of key to create. Possible values + *

    The {@link CreateRsaKeyOptions#getKeyType() keyType} indicates the type of key to create. Possible values * include: {@link KeyType#RSA RSA} and {@link KeyType#RSA_HSM RSA-HSM}.

    * * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.createRsaKeyWithResponse#RsaKeyCreateOptions} * - * @param rsaKeyCreateOptions The key configuration object containing information about the rsa key being + * @param createRsaKeyOptions The key configuration object containing information about the rsa key being * created. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link Key + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultKey * created key}. * @throws NullPointerException if {@code rsaKeyCreateOptions} is {@code null}. * @throws ResourceModifiedException if {@code rsaKeyCreateOptions} is malformed. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createRsaKeyWithResponse(RsaKeyCreateOptions rsaKeyCreateOptions) { + public Mono> createRsaKeyWithResponse(CreateRsaKeyOptions createRsaKeyOptions) { try { - return withContext(context -> createRsaKeyWithResponse(rsaKeyCreateOptions, context)); + return withContext(context -> createRsaKeyWithResponse(createRsaKeyOptions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> createRsaKeyWithResponse(RsaKeyCreateOptions rsaKeyCreateOptions, Context context) { - Objects.requireNonNull(rsaKeyCreateOptions, "The Rsa key options parameter cannot be null."); + Mono> createRsaKeyWithResponse(CreateRsaKeyOptions createRsaKeyOptions, Context context) { + Objects.requireNonNull(createRsaKeyOptions, "The Rsa key options parameter cannot be null."); KeyRequestParameters parameters = new KeyRequestParameters() - .setKty(rsaKeyCreateOptions.getKeyType()) - .setKeySize(rsaKeyCreateOptions.getKeySize()) - .setKeyOps(rsaKeyCreateOptions.keyOperations()) - .setKeyAttributes(new KeyRequestAttributes(rsaKeyCreateOptions)); - return service.createKey(endpoint, rsaKeyCreateOptions.getName(), API_VERSION, ACCEPT_LANGUAGE, parameters, + .setKty(createRsaKeyOptions.getKeyType()) + .setKeySize(createRsaKeyOptions.getKeySize()) + .setKeyOps(createRsaKeyOptions.getKeyOperations()) + .setKeyAttributes(new KeyRequestAttributes(createRsaKeyOptions)); + return service.createKey(vaultUrl, createRsaKeyOptions.getName(), API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) - .doOnRequest(ignored -> logger.info("Creating Rsa key - {}", rsaKeyCreateOptions.getName())) + .doOnRequest(ignored -> logger.info("Creating Rsa key - {}", createRsaKeyOptions.getName())) .doOnSuccess(response -> logger.info("Created Rsa key - {}", response.getValue().getName())) - .doOnError(error -> logger.warning("Failed to create Rsa key - {}", rsaKeyCreateOptions.getName(), error)); + .doOnError(error -> logger.warning("Failed to create Rsa key - {}", createRsaKeyOptions.getName(), error)); } /** @@ -278,13 +292,13 @@ Mono> createRsaKeyWithResponse(RsaKeyCreateOptions rsaKeyCreateOpt * type in key vault. If the named key already exists, Azure Key Vault creates a new version of the key. It requires * the {@code keys/create} permission. * - *

    The {@link EcKeyCreateOptions} parameter is required. The {@link EcKeyCreateOptions#getCurve() key curve} can be + *

    The {@link CreateEcKeyOptions} parameter is required. The {@link CreateEcKeyOptions#getCurveName() key curve} can be * optionally specified. If not specified, default value of {@link KeyCurveName#P_256 P-256} is used by Azure Key - * Vault. The {@link EcKeyCreateOptions#getExpires() expires} and {@link EcKeyCreateOptions#getNotBefore() notBefore} - * values are optional. The {@link EcKeyCreateOptions#isEnabled() enabled} field is set to true by Azure Key Vault, + * Vault. The {@link CreateEcKeyOptions#getExpiresOn() expires} and {@link CreateEcKeyOptions#getNotBefore() notBefore} + * values are optional. The {@link CreateEcKeyOptions#isEnabled() enabled} field is set to true by Azure Key Vault, * if not specified.

    * - *

    The {@link EcKeyCreateOptions#getKeyType() keyType} indicates the type of key to create. Possible values include: + *

    The {@link CreateEcKeyOptions#getKeyType() keyType} indicates the type of key to create. Possible values include: * {@link KeyType#EC EC} and {@link KeyType#EC_HSM EC-HSM}.

    * *

    Code Samples

    @@ -294,15 +308,15 @@ Mono> createRsaKeyWithResponse(RsaKeyCreateOptions rsaKeyCreateOpt * * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.createEcKey#EcKeyCreateOptions} * - * @param ecKeyCreateOptions The key options object containing information about the ec key being created. - * @return A {@link Mono} containing the {@link Key created key}. + * @param createEcKeyOptions The key options object containing information about the ec key being created. + * @return A {@link Mono} containing the {@link KeyVaultKey created key}. * @throws NullPointerException if {@code ecKeyCreateOptions} is {@code null}. * @throws ResourceModifiedException if {@code ecKeyCreateOptions} is malformed. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createEcKey(EcKeyCreateOptions ecKeyCreateOptions) { + public Mono createEcKey(CreateEcKeyOptions createEcKeyOptions) { try { - return createEcKeyWithResponse(ecKeyCreateOptions).flatMap(FluxUtil::toMono); + return createEcKeyWithResponse(createEcKeyOptions).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -313,13 +327,13 @@ public Mono createEcKey(EcKeyCreateOptions ecKeyCreateOptions) { * type in key vault. If the named key already exists, Azure Key Vault creates a new version of the key. It requires * the {@code keys/create} permission. * - *

    The {@link EcKeyCreateOptions} parameter is required. The {@link EcKeyCreateOptions#getCurve() key curve} can be + *

    The {@link CreateEcKeyOptions} parameter is required. The {@link CreateEcKeyOptions#getCurveName() key curve} can be * optionally specified. If not specified, default value of {@link KeyCurveName#P_256 P-256} is used by Azure Key - * Vault. The {@link EcKeyCreateOptions#getExpires() expires} and {@link EcKeyCreateOptions#getNotBefore() notBefore} - * values are optional. The {@link EcKeyCreateOptions#isEnabled() enabled} field is set to true by Azure Key Vault, if + * Vault. The {@link CreateEcKeyOptions#getExpiresOn() expires} and {@link CreateEcKeyOptions#getNotBefore() notBefore} + * values are optional. The {@link CreateEcKeyOptions#isEnabled() enabled} field is set to true by Azure Key Vault, if * not specified.

    * - *

    The {@link EcKeyCreateOptions#getKeyType() keyType} indicates the type of key to create. Possible values include: + *

    The {@link CreateEcKeyOptions#getKeyType() keyType} indicates the type of key to create. Possible values include: * {@link KeyType#EC EC} and {@link KeyType#EC_HSM EC-HSM}.

    * *

    Code Samples

    @@ -329,33 +343,33 @@ public Mono createEcKey(EcKeyCreateOptions ecKeyCreateOptions) { * * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.createEcKeyWithResponse#EcKeyCreateOptions} * - * @param ecKeyCreateOptions The key options object containing information about the ec key being created. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link Key + * @param createEcKeyOptions The key options object containing information about the ec key being created. + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultKey * created key}. * @throws NullPointerException if {@code ecKeyCreateOptions} is {@code null}. * @throws ResourceModifiedException if {@code ecKeyCreateOptions} is malformed. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createEcKeyWithResponse(EcKeyCreateOptions ecKeyCreateOptions) { + public Mono> createEcKeyWithResponse(CreateEcKeyOptions createEcKeyOptions) { try { - return withContext(context -> createEcKeyWithResponse(ecKeyCreateOptions, context)); + return withContext(context -> createEcKeyWithResponse(createEcKeyOptions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> createEcKeyWithResponse(EcKeyCreateOptions ecKeyCreateOptions, Context context) { - Objects.requireNonNull(ecKeyCreateOptions, "The Ec key options options cannot be null."); + Mono> createEcKeyWithResponse(CreateEcKeyOptions createEcKeyOptions, Context context) { + Objects.requireNonNull(createEcKeyOptions, "The Ec key options cannot be null."); KeyRequestParameters parameters = new KeyRequestParameters() - .setKty(ecKeyCreateOptions.getKeyType()) - .setCurve(ecKeyCreateOptions.getCurve()) - .setKeyOps(ecKeyCreateOptions.keyOperations()) - .setKeyAttributes(new KeyRequestAttributes(ecKeyCreateOptions)); - return service.createKey(endpoint, ecKeyCreateOptions.getName(), API_VERSION, ACCEPT_LANGUAGE, parameters, + .setKty(createEcKeyOptions.getKeyType()) + .setCurve(createEcKeyOptions.getCurveName()) + .setKeyOps(createEcKeyOptions.getKeyOperations()) + .setKeyAttributes(new KeyRequestAttributes(createEcKeyOptions)); + return service.createKey(vaultUrl, createEcKeyOptions.getName(), API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) - .doOnRequest(ignored -> logger.info("Creating Ec key - {}", ecKeyCreateOptions.getName())) + .doOnRequest(ignored -> logger.info("Creating Ec key - {}", createEcKeyOptions.getName())) .doOnSuccess(response -> logger.info("Created Ec key - {}", response.getValue().getName())) - .doOnError(error -> logger.warning("Failed to create Ec key - {}", ecKeyCreateOptions.getName(), error)); + .doOnError(error -> logger.warning("Failed to create Ec key - {}", createEcKeyOptions.getName(), error)); } /** @@ -375,12 +389,12 @@ Mono> createEcKeyWithResponse(EcKeyCreateOptions ecKeyCreateOption * * @param name The name for the imported key. * @param keyMaterial The Json web key being imported. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link Key + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultKey * imported key}. * @throws HttpRequestException if {@code name} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono importKey(String name, JsonWebKey keyMaterial) { + public Mono importKey(String name, JsonWebKey keyMaterial) { try { return withContext(context -> importKeyWithResponse(name, keyMaterial, context)).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { @@ -388,9 +402,9 @@ public Mono importKey(String name, JsonWebKey keyMaterial) { } } - Mono> importKeyWithResponse(String name, JsonWebKey keyMaterial, Context context) { + Mono> importKeyWithResponse(String name, JsonWebKey keyMaterial, Context context) { KeyImportRequestParameters parameters = new KeyImportRequestParameters().setKey(keyMaterial); - return service.importKey(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, + return service.importKey(vaultUrl, name, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Importing key - {}", name)) .doOnSuccess(response -> logger.info("Imported key - {}", response.getValue().getName())) @@ -402,11 +416,11 @@ Mono> importKeyWithResponse(String name, JsonWebKey keyMaterial, C * key type into the Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the * key. This operation requires the {@code keys/import} permission. * - *

    The {@code keyImportOptions} is required and its fields {@link KeyImportOptions#getName() name} and {@link - * KeyImportOptions#getKeyMaterial() key material} cannot be null. The {@link KeyImportOptions#getExpires() expires} and - * {@link KeyImportOptions#getNotBefore() notBefore} values in {@code keyImportOptions} are optional. If not specified, - * no values are set for the fields. The {@link KeyImportOptions#isEnabled() enabled} field is set to true and the - * {@link KeyImportOptions#isHsm() hsm} field is set to false by Azure Key Vault, if they are not specified.

    + *

    The {@code keyImportOptions} is required and its fields {@link ImportKeyOptions#getName() name} and {@link + * ImportKeyOptions#getKey() key material} cannot be null. The {@link ImportKeyOptions#getExpiresOn() expires} and + * {@link ImportKeyOptions#getNotBefore() notBefore} values in {@code keyImportOptions} are optional. If not specified, + * no values are set for the fields. The {@link ImportKeyOptions#isEnabled() enabled} field is set to true and the + * {@link ImportKeyOptions#isHardwareProtected() hsm} field is set to false by Azure Key Vault, if they are not specified.

    * *

    Code Samples

    *

    Imports a new key into key vault. Subscribes to the call asynchronously and prints out the newly imported key @@ -421,15 +435,15 @@ Mono> importKeyWithResponse(String name, JsonWebKey keyMaterial, C * keyResponse.value().getId())); * * - * @param keyImportOptions The key import configuration object containing information about the json web key + * @param importKeyOptions The key import configuration object containing information about the json web key * being imported. - * @return A {@link Mono} containing the {@link Key imported key}. + * @return A {@link Mono} containing the {@link KeyVaultKey imported key}. * @throws NullPointerException if {@code keyImportOptions} is {@code null}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono importKey(KeyImportOptions keyImportOptions) { + public Mono importKey(ImportKeyOptions importKeyOptions) { try { - return importKeyWithResponse(keyImportOptions).flatMap(FluxUtil::toMono); + return importKeyWithResponse(importKeyOptions).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -440,11 +454,11 @@ public Mono importKey(KeyImportOptions keyImportOptions) { * key type into the Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the * key. This operation requires the {@code keys/import} permission. * - *

    The {@code keyImportOptions} is required and its fields {@link KeyImportOptions#getName() name} and {@link - * KeyImportOptions#getKeyMaterial() key material} cannot be null. The {@link KeyImportOptions#getExpires() expires} and - * {@link KeyImportOptions#getNotBefore() notBefore} values in {@code keyImportOptions} are optional. If not specified, - * no values are set for the fields. The {@link KeyImportOptions#isEnabled() enabled} - * field is set to true and the {@link KeyImportOptions#isHsm() hsm} field is set to false by Azure Key Vault, if they + *

    The {@code keyImportOptions} is required and its fields {@link ImportKeyOptions#getName() name} and {@link + * ImportKeyOptions#getKey() key material} cannot be null. The {@link ImportKeyOptions#getExpiresOn() expires} and + * {@link ImportKeyOptions#getNotBefore() notBefore} values in {@code keyImportOptions} are optional. If not specified, + * no values are set for the fields. The {@link ImportKeyOptions#isEnabled() enabled} + * field is set to true and the {@link ImportKeyOptions#isHardwareProtected() hsm} field is set to false by Azure Key Vault, if they * are not specified.

    * *

    Code Samples

    @@ -461,32 +475,32 @@ public Mono importKey(KeyImportOptions keyImportOptions) { * keyResponse.value().getId())); * * - * @param keyImportOptions The key import configuration object containing information about the json web key + * @param importKeyOptions The key import configuration object containing information about the json web key * being imported. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link Key + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultKey * imported key}. * @throws NullPointerException if {@code keyImportOptions} is {@code null}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> importKeyWithResponse(KeyImportOptions keyImportOptions) { + public Mono> importKeyWithResponse(ImportKeyOptions importKeyOptions) { try { - return withContext(context -> importKeyWithResponse(keyImportOptions, context)); + return withContext(context -> importKeyWithResponse(importKeyOptions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> importKeyWithResponse(KeyImportOptions keyImportOptions, Context context) { - Objects.requireNonNull(keyImportOptions, "The key import configuration parameter cannot be null."); + Mono> importKeyWithResponse(ImportKeyOptions importKeyOptions, Context context) { + Objects.requireNonNull(importKeyOptions, "The key import configuration parameter cannot be null."); KeyImportRequestParameters parameters = new KeyImportRequestParameters() - .setKey(keyImportOptions.getKeyMaterial()) - .setHsm(keyImportOptions.isHsm()) - .setKeyAttributes(new KeyRequestAttributes(keyImportOptions)); - return service.importKey(endpoint, keyImportOptions.getName(), API_VERSION, ACCEPT_LANGUAGE, parameters, + .setKey(importKeyOptions.getKey()) + .setHsm(importKeyOptions.isHardwareProtected()) + .setKeyAttributes(new KeyRequestAttributes(importKeyOptions)); + return service.importKey(vaultUrl, importKeyOptions.getName(), API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) - .doOnRequest(ignored -> logger.info("Importing key - {}", keyImportOptions.getName())) + .doOnRequest(ignored -> logger.info("Importing key - {}", importKeyOptions.getName())) .doOnSuccess(response -> logger.info("Imported key - {}", response.getValue().getName())) - .doOnError(error -> logger.warning("Failed to import key - {}", keyImportOptions.getName(), error)); + .doOnError(error -> logger.warning("Failed to import key - {}", importKeyOptions.getName(), error)); } /** @@ -502,13 +516,13 @@ Mono> importKeyWithResponse(KeyImportOptions keyImportOptions, Con * @param name The name of the key, cannot be null * @param version The version of the key to retrieve. If this is an empty String or null, this call is * equivalent to calling {@link KeyAsyncClient#getKey(String)}, with the latest version being retrieved. - * @return A {@link Mono} containing the requested {@link Key key}. + * @return A {@link Mono} containing the requested {@link KeyVaultKey key}. * @throws ResourceNotFoundException when a key with {@code name} and {@code version} doesn't exist in the key * vault. * @throws HttpRequestException if {@code name} or {@code version} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getKey(String name, String version) { + public Mono getKey(String name, String version) { try { return getKeyWithResponse(name, version).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { @@ -530,13 +544,13 @@ public Mono getKey(String name, String version) { * @param version The version of the key to retrieve. If this is an empty String or null, this call is * equivalent to calling {@link KeyAsyncClient#getKey(String)}, with the latest version being retrieved. * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the requested - * {@link Key key}. + * {@link KeyVaultKey key}. * @throws ResourceNotFoundException when a key with {@code name} and {@code version} doesn't exist in the key * vault. * @throws HttpRequestException if {@code name} or {@code version} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getKeyWithResponse(String name, String version) { + public Mono> getKeyWithResponse(String name, String version) { try { return withContext(context -> getKeyWithResponse(name, version == null ? "" : version, context)); } catch (RuntimeException ex) { @@ -544,8 +558,8 @@ public Mono> getKeyWithResponse(String name, String version) { } } - Mono> getKeyWithResponse(String name, String version, Context context) { - return service.getKey(endpoint, name, version, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + Mono> getKeyWithResponse(String name, String version, Context context) { + return service.getKey(vaultUrl, name, version, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Retrieving key - {}", name)) .doOnSuccess(response -> logger.info("Retrieved key - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to get key - {}", name, error)); @@ -562,12 +576,12 @@ Mono> getKeyWithResponse(String name, String version, Context cont * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.getKey#string} * * @param name The name of the key. - * @return A {@link Mono} containing the requested {@link Key key}. + * @return A {@link Mono} containing the requested {@link KeyVaultKey key}. * @throws ResourceNotFoundException when a key with {@code name} doesn't exist in the key vault. * @throws HttpRequestException if {@code name} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getKey(String name) { + public Mono getKey(String name) { try { return getKeyWithResponse(name, "").flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { @@ -575,61 +589,6 @@ public Mono getKey(String name) { } } - /** - * Get public part of the key which represents {@link KeyProperties keyProperties} from the key vault. The get key operation is - * applicable to all key types and it requires the {@code keys/get} permission. - * - *

    The list operations {@link KeyAsyncClient#listKeys()} and {@link KeyAsyncClient#listKeyVersions(String)} - * return the {@link Flux} containing {@link KeyProperties key properties} as output excluding the key material of the key. - * This operation can then be used to get the full key with its key material from {@code keyProperties}.

    - * - * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.getKey#KeyProperties} - * - * @param keyProperties The {@link KeyProperties key properties} holding attributes of the key being requested. - * @return A {@link Mono} containing the requested {@link Key key}. - * @throws ResourceNotFoundException when a key with {@link KeyProperties#getName() name} and {@link KeyProperties#getVersion() - * version} doesn't exist in the key vault. - * @throws HttpRequestException if {@link KeyProperties#getName()} name} or {@link KeyProperties#getVersion() version} is empty - * string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getKey(KeyProperties keyProperties) { - try { - return getKeyWithResponse(keyProperties).flatMap(FluxUtil::toMono); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Get public part of the key which represents {@link KeyProperties keyProperties} from the key vault. The get key operation is - * applicable to all key types and it requires the {@code keys/get} permission. - * - *

    The list operations {@link KeyAsyncClient#listKeys()} and {@link KeyAsyncClient#listKeyVersions(String)} - * return the {@link Flux} containing {@link KeyProperties key properties} as output excluding the key material of the key. - * This operation can then be used to get the full key with its key material from {@code keyProperties}.

    - * - * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.getKeyWithResponse#KeyProperties} - * - * @param keyProperties The {@link KeyProperties key properties} holding attributes of the key being requested. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the requested - * {@link Key key}. - * @throws ResourceNotFoundException when a key with {@link KeyProperties#getName() name} and {@link KeyProperties#getVersion() - * version} doesn't exist in the key vault. - * @throws HttpRequestException if {@link KeyProperties#getName()} name} or {@link KeyProperties#getVersion() version} is empty - * string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getKeyWithResponse(KeyProperties keyProperties) { - try { - Objects.requireNonNull(keyProperties, "The Key Properties parameter cannot be null."); - return withContext(context -> getKeyWithResponse(keyProperties.getName(), keyProperties.getVersion() == null ? "" - : keyProperties.getVersion(), context)); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - /** * Updates the attributes and key operations associated with the specified key, but not the cryptographic key * material of the specified key in the key vault. The update operation changes specified attributes of an existing @@ -646,7 +605,7 @@ public Mono> getKeyWithResponse(KeyProperties keyProperties) { * @param keyProperties The {@link KeyProperties key properties} object with updated properties. * @param keyOperations The updated key operations to associate with the key. * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link - * Key updated key}. + * KeyVaultKey updated key}. * @throws NullPointerException if {@code key} is {@code null}. * @throws ResourceNotFoundException when a key with {@link KeyProperties#getName() name} and {@link KeyProperties#getVersion() * version} doesn't exist in the key vault. @@ -654,7 +613,7 @@ public Mono> getKeyWithResponse(KeyProperties keyProperties) { * string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateKeyPropertiesWithResponse(KeyProperties keyProperties, KeyOperation... keyOperations) { + public Mono> updateKeyPropertiesWithResponse(KeyProperties keyProperties, KeyOperation... keyOperations) { try { return withContext(context -> updateKeyPropertiesWithResponse(keyProperties, context, keyOperations)); } catch (RuntimeException ex) { @@ -677,7 +636,7 @@ public Mono> updateKeyPropertiesWithResponse(KeyProperties keyProp * * @param keyProperties The {@link KeyProperties key properties} object with updated properties. * @param keyOperations The updated key operations to associate with the key. - * @return A {@link Mono} containing the {@link Key updated key}. + * @return A {@link Mono} containing the {@link KeyVaultKey updated key}. * @throws NullPointerException if {@code key} is {@code null}. * @throws ResourceNotFoundException when a key with {@link KeyProperties#getName() name} and {@link KeyProperties#getVersion() * version} doesn't exist in the key vault. @@ -685,7 +644,7 @@ public Mono> updateKeyPropertiesWithResponse(KeyProperties keyProp * string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateKeyProperties(KeyProperties keyProperties, KeyOperation... keyOperations) { + public Mono updateKeyProperties(KeyProperties keyProperties, KeyOperation... keyOperations) { try { return updateKeyPropertiesWithResponse(keyProperties, keyOperations).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { @@ -693,7 +652,7 @@ public Mono updateKeyProperties(KeyProperties keyProperties, KeyOperation.. } } - Mono> updateKeyPropertiesWithResponse(KeyProperties keyProperties, Context context, KeyOperation... keyOperations) { + Mono> updateKeyPropertiesWithResponse(KeyProperties keyProperties, Context context, KeyOperation... keyOperations) { Objects.requireNonNull(keyProperties, "The key properties input parameter cannot be null."); KeyRequestParameters parameters = new KeyRequestParameters() .setTags(keyProperties.getTags()) @@ -701,7 +660,7 @@ Mono> updateKeyPropertiesWithResponse(KeyProperties keyProperties, if (keyOperations.length > 0) { parameters.setKeyOps(Arrays.asList(keyOperations)); } - return service.updateKey(endpoint, keyProperties.getName(), keyProperties.getVersion(), API_VERSION, ACCEPT_LANGUAGE, parameters, + return service.updateKey(vaultUrl, keyProperties.getName(), keyProperties.getVersion(), API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Updating key - {}", keyProperties.getName())) .doOnSuccess(response -> logger.info("Updated key - {}", response.getValue().getName())) @@ -723,50 +682,39 @@ Mono> updateKeyPropertiesWithResponse(KeyProperties keyProperties, * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.deleteKey#string} * * @param name The name of the key to be deleted. - * @return A {@link Mono} containing the {@link DeletedKey deleted key}. + * @return A {@link Poller} to poll on the {@link DeletedKey deleted key} status. * @throws ResourceNotFoundException when a key with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a key with {@code name} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteKey(String name) { - try { - return deleteKeyWithResponse(name).flatMap(FluxUtil::toMono); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } + public Poller beginDeleteKey(String name) { + return new Poller<>(Duration.ofSeconds(1), createPollOperation(name), () -> Mono.empty(), activationOperation(name), null); } - /** - * Deletes a key of any type from the key vault. If soft-delete is enabled on the key vault then the key is placed - * in the deleted state and requires to be purged for permanent deletion else the key is permanently deleted. The - * delete operation applies to any key stored in Azure Key Vault but it cannot be applied to an individual version - * of a key. This operation removes the cryptographic material associated with the key, which means the key is not - * usable for Sign/Verify, Wrap/Unwrap or Encrypt/Decrypt operations. This operation requires the - * {@code keys/delete} permission. - * - *

    Code Samples

    - *

    Deletes the key in the Azure Key Vault. Subscribes to the call asynchronously and prints out the deleted key - * details when a response has been received.

    - * - * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.deleteKeyWithResponse#string} - * - * @param name The name of the key to be deleted. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link - * DeletedKey deleted key}. - * @throws ResourceNotFoundException when a key with {@code name} doesn't exist in the key vault. - * @throws HttpRequestException when a key with {@code name} is empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteKeyWithResponse(String name) { - try { - return withContext(context -> deleteKeyWithResponse(name, context)); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } + private Supplier> activationOperation(String name) { + return () -> withContext(context -> deleteKeyWithResponse(name, context) + .flatMap(deletedKeyResponse -> Mono.just(deletedKeyResponse.getValue()))); + } + + /* + Polling operation to poll on create delete key operation status. + */ + private Function, Mono>> createPollOperation(String keyName) { + return prePollResponse -> + withContext(context -> service.getDeletedKeyPoller(vaultUrl, keyName, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + .flatMap(deletedKeyResponse -> { + if (deletedKeyResponse.getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND) { + return Mono.defer(() -> Mono.just(new PollResponse<>(PollResponse.OperationStatus.IN_PROGRESS, prePollResponse.getValue()))); + } + return Mono.defer(() -> Mono.just(new PollResponse<>(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED, deletedKeyResponse.getValue()))); + })) + // This means either vault has soft-delete disabled or permission is not granted for the get deleted key operation. + // In both cases deletion operation was successful when activation operation succeeded before reaching here. + .onErrorReturn(new PollResponse<>(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED, prePollResponse.getValue())); } Mono> deleteKeyWithResponse(String name, Context context) { - return service.deleteKey(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + return service.deleteKey(vaultUrl, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Deleting key - {}", name)) .doOnSuccess(response -> logger.info("Deleted key - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to delete key - {}", name, error)); @@ -824,7 +772,7 @@ public Mono> getDeletedKeyWithResponse(String name) { } Mono> getDeletedKeyWithResponse(String name, Context context) { - return service.getDeletedKey(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + return service.getDeletedKey(vaultUrl, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Retrieving deleted key - {}", name)) .doOnSuccess(response -> logger.info("Retrieved deleted key - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to get key - {}", name, error)); @@ -881,7 +829,7 @@ public Mono> purgeDeletedKeyWithResponse(String name) { } Mono> purgeDeletedKeyWithResponse(String name, Context context) { - return service.purgeDeletedKey(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + return service.purgeDeletedKey(vaultUrl, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Purging deleted key - {}", name)) .doOnSuccess(response -> logger.info("Purged deleted key - {}", name)) .doOnError(error -> logger.warning("Failed to purge deleted key - {}", name, error)); @@ -899,47 +847,39 @@ Mono> purgeDeletedKeyWithResponse(String name, Context context) { * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.recoverDeletedKey#string} * * @param name The name of the deleted key to be recovered. - * @return A {@link Mono} containing the {@link Key recovered key}. + * @return A {@link Poller} to poll on the {@link KeyVaultKey recovered key} status. * @throws ResourceNotFoundException when a key with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a key with {@code name} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono recoverDeletedKey(String name) { - try { - return recoverDeletedKeyWithResponse(name).flatMap(FluxUtil::toMono); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } + public Poller beginRecoverDeletedKey(String name) { + return new Poller<>(Duration.ofSeconds(1), createRecoverPollOperation(name), () -> Mono.empty(), recoverActivationOperation(name), null); } - /** - * Recovers the deleted key in the key vault to its latest version and can only be performed on a soft-delete - * enabled vault. An attempt to recover an non-deleted key will return an error. Consider this the inverse of the - * delete operation on soft-delete enabled vaults. This operation requires the {@code keys/recover} permission. - * - *

    Code Samples

    - *

    Recovers the deleted key from the key vault enabled for soft-delete. Subscribes to the call asynchronously and - * prints out the recovered key details when a response has been received.

    - * //Assuming key is deleted on a soft-delete enabled vault. - * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.recoverDeletedKeyWithResponse#string} - * - * @param name The name of the deleted key to be recovered. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link Key - * recovered key}. - * @throws ResourceNotFoundException when a key with {@code name} doesn't exist in the key vault. - * @throws HttpRequestException when a key with {@code name} is empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> recoverDeletedKeyWithResponse(String name) { - try { - return withContext(context -> recoverDeletedKeyWithResponse(name, context)); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } + private Supplier> recoverActivationOperation(String name) { + return () -> withContext(context -> recoverDeletedKeyWithResponse(name, context) + .flatMap(keyResponse -> Mono.just(keyResponse.getValue()))); + } + + /* + Polling operation to poll on create delete key operation status. + */ + private Function, Mono>> createRecoverPollOperation(String keyName) { + return prePollResponse -> + withContext(context -> service.getKeyPoller(vaultUrl, keyName, "", API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + .flatMap(keyResponse -> { + if (keyResponse.getStatusCode() == 404) { + return Mono.defer(() -> Mono.just(new PollResponse<>(PollResponse.OperationStatus.IN_PROGRESS, prePollResponse.getValue()))); + } + return Mono.defer(() -> Mono.just(new PollResponse<>(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED, keyResponse.getValue()))); + })) + // This means permission is not granted for the get deleted key operation. + // In both cases deletion operation was successful when activation operation succeeded before reaching here. + .onErrorReturn(new PollResponse<>(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED, prePollResponse.getValue())); } - Mono> recoverDeletedKeyWithResponse(String name, Context context) { - return service.recoverDeletedKey(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, + Mono> recoverDeletedKeyWithResponse(String name, Context context) { + return service.recoverDeletedKey(vaultUrl, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Recovering deleted key - {}", name)) .doOnSuccess(response -> logger.info("Recovered deleted key - {}", response.getValue().getName())) @@ -1012,7 +952,7 @@ public Mono> backupKeyWithResponse(String name) { } Mono> backupKeyWithResponse(String name, Context context) { - return service.backupKey(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + return service.backupKey(vaultUrl, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Backing up key - {}", name)) .doOnSuccess(response -> logger.info("Backed up key - {}", name)) .doOnError(error -> logger.warning("Failed to backup key - {}", name, error)) @@ -1036,16 +976,16 @@ Mono> backupKeyWithResponse(String name, Context context) { * restored key details when a response has been received.

    * //Pass the Key Backup Byte array to the restore operation. * - * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.restoreKey#byte} + * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.restoreKeyBackup#byte} * * @param backup The backup blob associated with the key. - * @return A {@link Mono} containing the {@link Key restored key}. + * @return A {@link Mono} containing the {@link KeyVaultKey restored key}. * @throws ResourceModifiedException when {@code backup} blob is malformed. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono restoreKey(byte[] backup) { + public Mono restoreKeyBackup(byte[] backup) { try { - return restoreKeyWithResponse(backup).flatMap(FluxUtil::toMono); + return restoreKeyBackupWithResponse(backup).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -1067,25 +1007,25 @@ public Mono restoreKey(byte[] backup) { * restored key details when a response has been received.

    * //Pass the Key Backup Byte array to the restore operation. * - * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.restoreKeyWithResponse#byte} + * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.restoreKeyBackupWithResponse#byte} * * @param backup The backup blob associated with the key. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link Key + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultKey * restored key}. * @throws ResourceModifiedException when {@code backup} blob is malformed. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> restoreKeyWithResponse(byte[] backup) { + public Mono> restoreKeyBackupWithResponse(byte[] backup) { try { - return withContext(context -> restoreKeyWithResponse(backup, context)); + return withContext(context -> restoreKeyBackupWithResponse(backup, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> restoreKeyWithResponse(byte[] backup, Context context) { + Mono> restoreKeyBackupWithResponse(byte[] backup, Context context) { KeyRestoreRequestParameters parameters = new KeyRestoreRequestParameters().setKeyBackup(backup); - return service.restoreKey(endpoint, API_VERSION, parameters, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, + return service.restoreKey(vaultUrl, API_VERSION, parameters, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Attempting to restore key")) .doOnSuccess(response -> logger.info("Restored Key - {}", response.getValue().getName())) @@ -1100,15 +1040,15 @@ Mono> restoreKeyWithResponse(byte[] backup, Context context) { * operation requires the {@code keys/list} permission. * *

    It is possible to get full keys with key material from this information. Convert the {@link Flux} containing - * {@link KeyProperties key properties} to {@link Flux} containing {@link Key key} using - * {@link KeyAsyncClient#getKey(KeyProperties key properties)} within {@link Flux#flatMap(Function)}.

    + * {@link KeyProperties key properties} to {@link Flux} containing {@link KeyVaultKey key} using + * {@link KeyAsyncClient#getKey(String, String)} within {@link Flux#flatMap(Function)}.

    * * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.listKeys} * * @return A {@link PagedFlux} containing {@link KeyProperties key} of all the keys in the vault. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listKeys() { + public PagedFlux listPropertiesOfKeys() { try { return new PagedFlux<>( () -> withContext(context -> listKeysFirstPage(context)), @@ -1118,7 +1058,7 @@ public PagedFlux listKeys() { } } - PagedFlux listKeys(Context context) { + PagedFlux listPropertiesOfKeys(Context context) { return new PagedFlux<>( () -> listKeysFirstPage(context), continuationToken -> listKeysNextPage(continuationToken, context)); @@ -1134,7 +1074,7 @@ PagedFlux listKeys(Context context) { */ private Mono> listKeysNextPage(String continuationToken, Context context) { try { - return service.getKeys(endpoint, continuationToken, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + return service.getKeys(vaultUrl, continuationToken, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Listing next keys page - Page {} ", continuationToken)) .doOnSuccess(response -> logger.info("Listed next keys page - Page {} ", continuationToken)) .doOnError(error -> logger.warning("Failed to list next keys page - Page {} ", continuationToken, error)); @@ -1149,7 +1089,7 @@ private Mono> listKeysNextPage(String continuationT */ private Mono> listKeysFirstPage(Context context) { try { - return service.getKeys(endpoint, DEFAULT_MAX_PAGE_RESULTS, API_VERSION, ACCEPT_LANGUAGE, + return service.getKeys(vaultUrl, DEFAULT_MAX_PAGE_RESULTS, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Listing keys")) .doOnSuccess(response -> logger.info("Listed keys")) @@ -1199,7 +1139,7 @@ PagedFlux listDeletedKeys(Context context) { */ private Mono> listDeletedKeysNextPage(String continuationToken, Context context) { try { - return service.getDeletedKeys(endpoint, continuationToken, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + return service.getDeletedKeys(vaultUrl, continuationToken, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Listing next deleted keys page - Page {} ", continuationToken)) .doOnSuccess(response -> logger.info("Listed next deleted keys page - Page {} ", continuationToken)) .doOnError(error -> logger.warning("Failed to list next deleted keys page - Page {} ", continuationToken, @@ -1215,7 +1155,7 @@ private Mono> listDeletedKeysNextPage(String continuat */ private Mono> listDeletedKeysFirstPage(Context context) { try { - return service.getDeletedKeys(endpoint, DEFAULT_MAX_PAGE_RESULTS, API_VERSION, ACCEPT_LANGUAGE, + return service.getDeletedKeys(vaultUrl, DEFAULT_MAX_PAGE_RESULTS, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Listing deleted keys")) .doOnSuccess(response -> logger.info("Listed deleted keys")) @@ -1231,8 +1171,8 @@ private Mono> listDeletedKeysFirstPage(Context context * not provided in the response. This operation requires the {@code keys/list} permission. * *

    It is possible to get the keys with key material of all the versions from this information. Convert the {@link - * Flux} containing {@link KeyProperties key properties} to {@link Flux} containing {@link Key key} using - * {@link KeyAsyncClient#getKey(KeyProperties key properties)} within {@link Flux#flatMap(Function)}.

    + * Flux} containing {@link KeyProperties key properties} to {@link Flux} containing {@link KeyVaultKey key} using + * {@link KeyAsyncClient#getKey(String, String)} within {@link Flux#flatMap(Function)}.

    * * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.listKeyVersions} * @@ -1243,7 +1183,7 @@ private Mono> listDeletedKeysFirstPage(Context context * @throws HttpRequestException when a key with {@code name} is empty string. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listKeyVersions(String name) { + public PagedFlux listPropertiesOfKeyVersions(String name) { try { return new PagedFlux<>( () -> withContext(context -> listKeyVersionsFirstPage(name, context)), @@ -1253,7 +1193,7 @@ public PagedFlux listKeyVersions(String name) { } } - PagedFlux listKeyVersions(String name, Context context) { + PagedFlux listPropertiesOfKeyVersions(String name, Context context) { return new PagedFlux<>( () -> listKeyVersionsFirstPage(name, context), continuationToken -> listKeyVersionsNextPage(continuationToken, context)); @@ -1261,7 +1201,7 @@ PagedFlux listKeyVersions(String name, Context context) { private Mono> listKeyVersionsFirstPage(String name, Context context) { try { - return service.getKeyVersions(endpoint, name, DEFAULT_MAX_PAGE_RESULTS, API_VERSION, ACCEPT_LANGUAGE, + return service.getKeyVersions(vaultUrl, name, DEFAULT_MAX_PAGE_RESULTS, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Listing key versions - {}", name)) .doOnSuccess(response -> logger.info("Listed key versions - {}", name)) @@ -1281,7 +1221,7 @@ private Mono> listKeyVersionsFirstPage(String name, */ private Mono> listKeyVersionsNextPage(String continuationToken, Context context) { try { - return service.getKeys(endpoint, continuationToken, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + return service.getKeys(vaultUrl, continuationToken, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Listing next key versions page - Page {} ", continuationToken)) .doOnSuccess(response -> logger.info("Listed next key versions page - Page {} ", continuationToken)) .doOnError(error -> logger.warning("Failed to list next key versions page - Page {} ", continuationToken, diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClient.java index 351433bf6cc3..45ab49a09fb8 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClient.java @@ -10,24 +10,22 @@ import com.azure.core.http.rest.Response; import com.azure.core.annotation.ServiceClient; import com.azure.core.util.Context; +import com.azure.core.util.polling.Poller; import com.azure.security.keyvault.keys.models.DeletedKey; -import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; -import com.azure.security.keyvault.keys.models.Key; +import com.azure.security.keyvault.keys.models.CreateEcKeyOptions; +import com.azure.security.keyvault.keys.models.KeyVaultKey; import com.azure.security.keyvault.keys.models.KeyProperties; -import com.azure.security.keyvault.keys.models.KeyCreateOptions; -import com.azure.security.keyvault.keys.models.KeyImportOptions; -import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; -import com.azure.security.keyvault.keys.models.webkey.KeyCurveName; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; - -import java.util.List; -import java.util.Objects; +import com.azure.security.keyvault.keys.models.CreateKeyOptions; +import com.azure.security.keyvault.keys.models.ImportKeyOptions; +import com.azure.security.keyvault.keys.models.CreateRsaKeyOptions; +import com.azure.security.keyvault.keys.models.JsonWebKey; +import com.azure.security.keyvault.keys.models.KeyCurveName; +import com.azure.security.keyvault.keys.models.KeyOperation; +import com.azure.security.keyvault.keys.models.KeyType; /** - * The KeyClient provides synchronous methods to manage {@link Key keys} in the Azure Key Vault. The client supports - * creating, retrieving, updating, deleting, purging, backing up, restoring and listing the {@link Key keys}. The client + * The KeyClient provides synchronous methods to manage {@link KeyVaultKey keys} in the Azure Key Vault. The client supports + * creating, retrieving, updating, deleting, purging, backing up, restoring and listing the {@link KeyVaultKey keys}. The client * also supports listing {@link DeletedKey deleted keys} for a soft-delete enabled Azure Key Vault. * *

    Samples to construct the sync client

    @@ -49,6 +47,14 @@ public final class KeyClient { this.client = client; } + /** + * Get the vault endpoint url + * @return the vault endpoint url + */ + public String getVaultUrl() { + return client.getVaultUrl(); + } + /** * Creates a new key and stores it in the key vault. The create key operation can be used to create any key type in * key vault. If the named key already exists, Azure Key Vault creates a new version of the key. It requires the @@ -64,12 +70,12 @@ public final class KeyClient { * * @param name The name of the key being created. * @param keyType The type of key to create. For valid values, see {@link KeyType KeyType}. - * @return The {@link Key created key}. + * @return The {@link KeyVaultKey created key}. * @throws ResourceModifiedException if {@code name} or {@code keyType} is null. * @throws HttpRequestException if {@code name} is empty string. */ - public Key createKey(String name, KeyType keyType) { - return createKeyWithResponse(new KeyCreateOptions(name, keyType), Context.NONE).getValue(); + public KeyVaultKey createKey(String name, KeyType keyType) { + return createKeyWithResponse(new CreateKeyOptions(name, keyType), Context.NONE).getValue(); } /** @@ -77,11 +83,11 @@ public Key createKey(String name, KeyType keyType) { * key vault. If the named key already exists, Azure Key Vault creates a new version of the key. It requires the * {@code keys/create} permission. * - *

    The {@link KeyCreateOptions} is required. The {@link KeyCreateOptions#getExpires() expires} and {@link - * KeyCreateOptions#getNotBefore() notBefore} values are optional. The {@link KeyCreateOptions#isEnabled()} enabled} field + *

    The {@link CreateKeyOptions} is required. The {@link CreateKeyOptions#getExpiresOn() expires} and {@link + * CreateKeyOptions#getNotBefore() notBefore} values are optional. The {@link CreateKeyOptions#isEnabled()} enabled} field * is set to true by Azure Key Vault, if not specified.

    * - *

    The {@link KeyCreateOptions#getKeyType() keyType} indicates the type of key to create. Possible values include: + *

    The {@link CreateKeyOptions#getKeyType() keyType} indicates the type of key to create. Possible values include: * {@link KeyType#EC EC}, {@link KeyType#EC_HSM EC-HSM}, {@link KeyType#RSA RSA}, {@link KeyType#RSA_HSM RSA-HSM} * and {@link KeyType#OCT OCT}.

    * @@ -89,13 +95,13 @@ public Key createKey(String name, KeyType keyType) { *

    Creates a new RSA key which activates in one day and expires in one year. Prints out the details of the * created key.

    {@codesnippet com.azure.keyvault.keys.keyclient.createKey#keyOptions} * - * @param keyCreateOptions The key options object containing information about the key being created. - * @return The {@link Key created key}. + * @param createKeyOptions The key options object containing information about the key being created. + * @return The {@link KeyVaultKey created key}. * @throws NullPointerException if {@code keyCreateOptions} is {@code null}. * @throws ResourceModifiedException if {@code keyCreateOptions} is malformed. */ - public Key createKey(KeyCreateOptions keyCreateOptions) { - return createKeyWithResponse(keyCreateOptions, Context.NONE).getValue(); + public KeyVaultKey createKey(CreateKeyOptions createKeyOptions) { + return createKeyWithResponse(createKeyOptions, Context.NONE).getValue(); } /** @@ -103,11 +109,11 @@ public Key createKey(KeyCreateOptions keyCreateOptions) { * key vault. If the named key already exists, Azure Key Vault creates a new version of the key. It requires the * {@code keys/create} permission. * - *

    The {@link KeyCreateOptions} is required. The {@link KeyCreateOptions#getExpires() expires} and {@link - * KeyCreateOptions#getNotBefore() notBefore} values are optional. The {@link KeyCreateOptions#isEnabled() enabled} field + *

    The {@link CreateKeyOptions} is required. The {@link CreateKeyOptions#getExpiresOn() expires} and {@link + * CreateKeyOptions#getNotBefore() notBefore} values are optional. The {@link CreateKeyOptions#isEnabled() enabled} field * is set to true by Azure Key Vault, if not specified.

    * - *

    The {@link KeyCreateOptions#getKeyType() keyType} indicates the type of key to create. Possible values include: + *

    The {@link CreateKeyOptions#getKeyType() keyType} indicates the type of key to create. Possible values include: * {@link KeyType#EC EC}, {@link KeyType#EC_HSM EC-HSM}, {@link KeyType#RSA RSA}, {@link KeyType#RSA_HSM RSA-HSM} * and {@link KeyType#OCT OCT}.

    * @@ -115,14 +121,14 @@ public Key createKey(KeyCreateOptions keyCreateOptions) { *

    Creates a new RSA key which activates in one day and expires in one year. Prints out the details of the * created key.

    {@codesnippet com.azure.keyvault.keys.keyclient.createKeyWithResponse#keyCreateOptions-Context} * - * @param keyCreateOptions The key options object containing information about the key being created. + * @param createKeyOptions The key options object containing information about the key being created. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link Key created key}. + * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultKey created key}. * @throws NullPointerException if {@code keyCreateOptions} is {@code null}. * @throws ResourceModifiedException if {@code keyCreateOptions} is malformed. */ - public Response createKeyWithResponse(KeyCreateOptions keyCreateOptions, Context context) { - return client.createKeyWithResponse(keyCreateOptions, context).block(); + public Response createKeyWithResponse(CreateKeyOptions createKeyOptions, Context context) { + return client.createKeyWithResponse(createKeyOptions, context).block(); } /** @@ -130,12 +136,12 @@ public Response createKeyWithResponse(KeyCreateOptions keyCreateOptions, Co * key type in key vault. If the named key already exists, Azure Key Vault creates a new version of the key. It * requires the {@code keys/create} permission. * - *

    The {@link RsaKeyCreateOptions} is required. The {@link RsaKeyCreateOptions#getKeySize() keySize} can be - * optionally specified. The {@link RsaKeyCreateOptions#getExpires() expires} and {@link - * RsaKeyCreateOptions#getNotBefore() notBefore} values are optional. The {@link RsaKeyCreateOptions#isEnabled() enabled} + *

    The {@link CreateRsaKeyOptions} is required. The {@link CreateRsaKeyOptions#getKeySize() keySize} can be + * optionally specified. The {@link CreateRsaKeyOptions#getExpiresOn() expires} and {@link + * CreateRsaKeyOptions#getNotBefore() notBefore} values are optional. The {@link CreateRsaKeyOptions#isEnabled() enabled} * field is set to true by Azure Key Vault, if not specified.

    * - *

    The {@link RsaKeyCreateOptions#getKeyType() keyType} indicates the type of key to create. Possible values + *

    The {@link CreateRsaKeyOptions#getKeyType() keyType} indicates the type of key to create. Possible values * include: {@link KeyType#RSA RSA} and {@link KeyType#RSA_HSM RSA-HSM}.

    * *

    Code Samples

    @@ -143,14 +149,14 @@ public Response createKeyWithResponse(KeyCreateOptions keyCreateOptions, Co * details of the created key.

    * {@codesnippet com.azure.keyvault.keys.keyclient.createRsaKey#keyOptions} * - * @param rsaKeyCreateOptions The key options object containing information about the rsa key being created. - * @return The {@link Key created key}. + * @param createRsaKeyOptions The key options object containing information about the rsa key being created. + * @return The {@link KeyVaultKey created key}. * @throws NullPointerException if {@code rsaKeyCreateOptions} is {@code null}. * @throws ResourceModifiedException if {@code rsaKeyCreateOptions} is malformed. * @throws HttpRequestException if {@code name} is empty string. */ - public Key createRsaKey(RsaKeyCreateOptions rsaKeyCreateOptions) { - return createRsaKeyWithResponse(rsaKeyCreateOptions, Context.NONE).getValue(); + public KeyVaultKey createRsaKey(CreateRsaKeyOptions createRsaKeyOptions) { + return createRsaKeyWithResponse(createRsaKeyOptions, Context.NONE).getValue(); } /** @@ -158,12 +164,12 @@ public Key createRsaKey(RsaKeyCreateOptions rsaKeyCreateOptions) { * key type in key vault. If the named key already exists, Azure Key Vault creates a new version of the key. It * requires the {@code keys/create} permission. * - *

    The {@link RsaKeyCreateOptions} is required. The {@link RsaKeyCreateOptions#getKeySize() keySize} can be - * optionally specified. The {@link RsaKeyCreateOptions#getExpires() expires} and {@link - * RsaKeyCreateOptions#getNotBefore() notBefore} values are optional. The {@link RsaKeyCreateOptions#isEnabled() enabled} + *

    The {@link CreateRsaKeyOptions} is required. The {@link CreateRsaKeyOptions#getKeySize() keySize} can be + * optionally specified. The {@link CreateRsaKeyOptions#getExpiresOn() expires} and {@link + * CreateRsaKeyOptions#getNotBefore() notBefore} values are optional. The {@link CreateRsaKeyOptions#isEnabled() enabled} * field is set to true by Azure Key Vault, if not specified.

    * - *

    The {@link RsaKeyCreateOptions#getKeyType() keyType} indicates the type of key to create. Possible values + *

    The {@link CreateRsaKeyOptions#getKeyType() keyType} indicates the type of key to create. Possible values * include: {@link KeyType#RSA RSA} and {@link KeyType#RSA_HSM RSA-HSM}.

    * *

    Code Samples

    @@ -171,14 +177,14 @@ public Key createRsaKey(RsaKeyCreateOptions rsaKeyCreateOptions) { * details of the created key.

    * {@codesnippet com.azure.keyvault.keys.keyclient.createRsaKeyWithResponse#keyOptions-Context} * - * @param rsaKeyCreateOptions The key options object containing information about the rsa key being created. + * @param createRsaKeyOptions The key options object containing information about the rsa key being created. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link Key created key}. + * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultKey created key}. * @throws NullPointerException if {@code rsaKeyCreateOptions} is {@code null}. * @throws ResourceModifiedException if {@code rsaKeyCreateOptions} is malformed. */ - public Response createRsaKeyWithResponse(RsaKeyCreateOptions rsaKeyCreateOptions, Context context) { - return client.createRsaKeyWithResponse(rsaKeyCreateOptions, context).block(); + public Response createRsaKeyWithResponse(CreateRsaKeyOptions createRsaKeyOptions, Context context) { + return client.createRsaKeyWithResponse(createRsaKeyOptions, context).block(); } /** @@ -186,13 +192,13 @@ public Response createRsaKeyWithResponse(RsaKeyCreateOptions rsaKeyCreateOp * key type in key vault. If the named key already exists, Azure Key Vault creates a new version of the key. It * requires the {@code keys/create} permission. * - *

    The {@link EcKeyCreateOptions} parameter is required. The {@link EcKeyCreateOptions#getCurve() key curve} can be + *

    The {@link CreateEcKeyOptions} parameter is required. The {@link CreateEcKeyOptions#getCurveName() key curve} can be * optionally specified. If not specified, default value of {@link KeyCurveName#P_256 P-256} is used by Azure Key - * Vault. The {@link EcKeyCreateOptions#getExpires() expires} and {@link EcKeyCreateOptions#getNotBefore() notBefore} - * values are optional. The {@link EcKeyCreateOptions#isEnabled() enabled} field is set to true by Azure Key Vault, if + * Vault. The {@link CreateEcKeyOptions#getExpiresOn() expires} and {@link CreateEcKeyOptions#getNotBefore() notBefore} + * values are optional. The {@link CreateEcKeyOptions#isEnabled() enabled} field is set to true by Azure Key Vault, if * not specified.

    * - *

    The {@link EcKeyCreateOptions#getKeyType() keyType} indicates the type of key to create. Possible values + *

    The {@link CreateEcKeyOptions#getKeyType() keyType} indicates the type of key to create. Possible values * include: {@link KeyType#EC EC} and {@link KeyType#EC_HSM EC-HSM}.

    * *

    Code Samples

    @@ -200,13 +206,13 @@ public Response createRsaKeyWithResponse(RsaKeyCreateOptions rsaKeyCreateOp * out the details of the created key.

    * {@codesnippet com.azure.keyvault.keys.keyclient.createEcKey#keyOptions} * - * @param ecKeyCreateOptions The key options object containing information about the ec key being created. - * @return The {@link Key created key}. + * @param createEcKeyOptions The key options object containing information about the ec key being created. + * @return The {@link KeyVaultKey created key}. * @throws NullPointerException if {@code ecKeyCreateOptions} is {@code null}. * @throws ResourceModifiedException if {@code ecKeyCreateOptions} is malformed. */ - public Key createEcKey(EcKeyCreateOptions ecKeyCreateOptions) { - return createEcKeyWithResponse(ecKeyCreateOptions, Context.NONE).getValue(); + public KeyVaultKey createEcKey(CreateEcKeyOptions createEcKeyOptions) { + return createEcKeyWithResponse(createEcKeyOptions, Context.NONE).getValue(); } /** @@ -214,13 +220,13 @@ public Key createEcKey(EcKeyCreateOptions ecKeyCreateOptions) { * key type in key vault. If the named key already exists, Azure Key Vault creates a new version of the key. It * requires the {@code keys/create} permission. * - *

    The {@link EcKeyCreateOptions} parameter is required. The {@link EcKeyCreateOptions#getCurve() key curve} can be + *

    The {@link CreateEcKeyOptions} parameter is required. The {@link CreateEcKeyOptions#getCurveName() key curve} can be * optionally specified. If not specified, default value of {@link KeyCurveName#P_256 P-256} is used by Azure Key - * Vault. The {@link EcKeyCreateOptions#getExpires() expires} and {@link EcKeyCreateOptions#getNotBefore() notBefore} - * values are optional. The {@link EcKeyCreateOptions#isEnabled()} enabled} field is set to true by Azure Key Vault, if + * Vault. The {@link CreateEcKeyOptions#getExpiresOn() expires} and {@link CreateEcKeyOptions#getNotBefore() notBefore} + * values are optional. The {@link CreateEcKeyOptions#isEnabled()} enabled} field is set to true by Azure Key Vault, if * not specified.

    * - *

    The {@link EcKeyCreateOptions#getKeyType() keyType} indicates the type of key to create. Possible values + *

    The {@link CreateEcKeyOptions#getKeyType() keyType} indicates the type of key to create. Possible values * include: * {@link KeyType#EC EC} and {@link KeyType#EC_HSM EC-HSM}.

    * @@ -229,14 +235,14 @@ public Key createEcKey(EcKeyCreateOptions ecKeyCreateOptions) { * out the details of the created key.

    * {@codesnippet com.azure.keyvault.keys.keyclient.createEcKeyWithResponse#keyOptions-Context} * - * @param ecKeyCreateOptions The key options object containing information about the ec key being created. + * @param createEcKeyOptions The key options object containing information about the ec key being created. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link Key created key}. + * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultKey created key}. * @throws NullPointerException if {@code ecKeyCreateOptions} is {@code null}. * @throws ResourceModifiedException if {@code ecKeyCreateOptions} is malformed. */ - public Response createEcKeyWithResponse(EcKeyCreateOptions ecKeyCreateOptions, Context context) { - return client.createEcKeyWithResponse(ecKeyCreateOptions, context).block(); + public Response createEcKeyWithResponse(CreateEcKeyOptions createEcKeyOptions, Context context) { + return client.createEcKeyWithResponse(createEcKeyOptions, context).block(); } /** @@ -253,11 +259,11 @@ public Response createEcKeyWithResponse(EcKeyCreateOptions ecKeyCreateOptio * * @param name The name for the imported key. * @param keyMaterial The Json web key being imported. - * @return The {@link Key imported key}. + * @return The {@link KeyVaultKey imported key}. * @throws HttpRequestException if {@code name} is empty string. */ - public Key importKey(String name, JsonWebKey keyMaterial) { - return importKeyWithResponse(new KeyImportOptions(name, keyMaterial), Context.NONE).getValue(); + public KeyVaultKey importKey(String name, JsonWebKey keyMaterial) { + return importKeyWithResponse(new ImportKeyOptions(name, keyMaterial), Context.NONE).getValue(); } /** @@ -265,11 +271,11 @@ public Key importKey(String name, JsonWebKey keyMaterial) { * key type into the Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the * key. This operation requires the {@code keys/import} permission. * - *

    The {@code keyImportOptions} is required and its fields {@link KeyImportOptions#getName() name} and {@link - * KeyImportOptions#getKeyMaterial() key material} cannot be null. The {@link KeyImportOptions#getExpires() expires} and - * {@link KeyImportOptions#getNotBefore() notBefore} values in {@code keyImportOptions} are optional. If not specified, - * no values are set for the fields. The {@link KeyImportOptions#isEnabled() enabled} field is set to true and the - * {@link KeyImportOptions#isHsm() hsm} field is set to false by Azure Key Vault, if they are not specified.

    + *

    The {@code keyImportOptions} is required and its fields {@link ImportKeyOptions#getName() name} and {@link + * ImportKeyOptions#getKey() key material} cannot be null. The {@link ImportKeyOptions#getExpiresOn() expires} and + * {@link ImportKeyOptions#getNotBefore() notBefore} values in {@code keyImportOptions} are optional. If not specified, + * no values are set for the fields. The {@link ImportKeyOptions#isEnabled() enabled} field is set to true and the + * {@link ImportKeyOptions#isHardwareProtected() hsm} field is set to false by Azure Key Vault, if they are not specified.

    * *

    Code Samples

    *

    Imports a new key into key vault. Prints out the details of the imported key.

    @@ -282,14 +288,14 @@ public Key importKey(String name, JsonWebKey keyMaterial) { * System.out.printf("Key is imported with name %s and id %s \n", importedKey.getName(), importedKey.getId()); * * - * @param keyImportOptions The key import configuration object containing information about the json web key + * @param importKeyOptions The key import configuration object containing information about the json web key * being imported. - * @return The {@link Key imported key}. + * @return The {@link KeyVaultKey imported key}. * @throws NullPointerException if {@code keyImportOptions} is {@code null}. * @throws HttpRequestException if {@code name} is empty string. */ - public Key importKey(KeyImportOptions keyImportOptions) { - return importKeyWithResponse(keyImportOptions, Context.NONE).getValue(); + public KeyVaultKey importKey(ImportKeyOptions importKeyOptions) { + return importKeyWithResponse(importKeyOptions, Context.NONE).getValue(); } /** @@ -297,11 +303,11 @@ public Key importKey(KeyImportOptions keyImportOptions) { * key type into the Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the * key. This operation requires the {@code keys/import} permission. * - *

    The {@code keyImportOptions} is required and its fields {@link KeyImportOptions#getName() name} and {@link - * KeyImportOptions#getKeyMaterial() key material} cannot be null. The {@link KeyImportOptions#getExpires() expires} and - * {@link KeyImportOptions#getNotBefore() notBefore} values in {@code keyImportOptions} are optional. If not specified, - * no values are set for the fields. The {@link KeyImportOptions#isEnabled() enabled} field is set to true and the - * {@link KeyImportOptions#isHsm() hsm} field is set to false by Azure Key Vault, if they are not specified.

    + *

    The {@code keyImportOptions} is required and its fields {@link ImportKeyOptions#getName() name} and {@link + * ImportKeyOptions#getKey() key material} cannot be null. The {@link ImportKeyOptions#getExpiresOn() expires} and + * {@link ImportKeyOptions#getNotBefore() notBefore} values in {@code keyImportOptions} are optional. If not specified, + * no values are set for the fields. The {@link ImportKeyOptions#isEnabled() enabled} field is set to true and the + * {@link ImportKeyOptions#isHardwareProtected() hsm} field is set to false by Azure Key Vault, if they are not specified.

    * *

    Code Samples

    *

    Imports a new key into key vault. Prints out the details of the imported key.

    @@ -314,15 +320,15 @@ public Key importKey(KeyImportOptions keyImportOptions) { * System.out.printf("Key is imported with name %s and id %s \n", importedKey.getName(), importedKey.getId()); * * - * @param keyImportOptions The key import configuration object containing information about the json web key + * @param importKeyOptions The key import configuration object containing information about the json web key * being imported. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link Key imported key}. + * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultKey imported key}. * @throws NullPointerException if {@code keyImportOptions} is {@code null}. * @throws HttpRequestException if {@code name} is empty string. */ - public Response importKeyWithResponse(KeyImportOptions keyImportOptions, Context context) { - return client.importKeyWithResponse(keyImportOptions, context).block(); + public Response importKeyWithResponse(ImportKeyOptions importKeyOptions, Context context) { + return client.importKeyWithResponse(importKeyOptions, context).block(); } /** @@ -336,12 +342,12 @@ public Response importKeyWithResponse(KeyImportOptions keyImportOptions, Co * @param name The name of the key, cannot be null * @param version The version of the key to retrieve. If this is an empty String or null, this call is * equivalent to calling {@link KeyClient#getKey(String)}, with the latest version being retrieved. - * @return The requested {@link Key key}. + * @return The requested {@link KeyVaultKey key}. * @throws ResourceNotFoundException when a key with {@code name} and {@code version} doesn't exist in the key * vault. * @throws HttpRequestException if {@code name} or {@code version} is empty string. */ - public Key getKey(String name, String version) { + public KeyVaultKey getKey(String name, String version) { return getKeyWithResponse(name, version, Context.NONE).getValue(); } @@ -357,12 +363,12 @@ public Key getKey(String name, String version) { * @param context Additional context that is passed through the Http pipeline during the service call. * @param version The version of the key to retrieve. If this is an empty String or null, this call is * equivalent to calling {@link KeyClient#getKey(String)}, with the latest version being retrieved. - * @return A {@link Response} whose {@link Response#getValue() value} contains the requested {@link Key key}. + * @return A {@link Response} whose {@link Response#getValue() value} contains the requested {@link KeyVaultKey key}. * @throws ResourceNotFoundException when a key with {@code name} and {@code version} doesn't exist in the key * vault. * @throws HttpRequestException if {@code name} or {@code version} is empty string. */ - public Response getKeyWithResponse(String name, String version, Context context) { + public Response getKeyWithResponse(String name, String version, Context context) { return client.getKeyWithResponse(name, version, context).block(); } @@ -375,57 +381,14 @@ public Response getKeyWithResponse(String name, String version, Context con * {@codesnippet com.azure.keyvault.keys.keyclient.getKey#string} * * @param name The name of the key. - * @return The requested {@link Key key}. + * @return The requested {@link KeyVaultKey key}. * @throws ResourceNotFoundException when a key with {@code name} doesn't exist in the key vault. * @throws HttpRequestException if {@code name} is empty string. */ - public Key getKey(String name) { + public KeyVaultKey getKey(String name) { return getKeyWithResponse(name, "", Context.NONE).getValue(); } - /** - * Get public part of the key which represents {@link KeyProperties keyProperties} from the key vault. The get key operation is - * applicable to all key types and it requires the {@code keys/get} permission. - * - *

    The list operations {@link KeyClient#listKeys()} and {@link KeyClient#listKeyVersions(String)} return - * the {@link List} containing {@link KeyProperties key properties} as output excluding the key material of the key. This - * operation can then be used to get the full key with its key material from {@code keyProperties}.

    - * {@codesnippet com.azure.keyvault.keys.keyclient.getKey#KeyProperties} - * - * @param keyProperties The {@link KeyProperties key properties} holding attributes of the key being requested. - * @return The requested {@link Key key}. - * @throws ResourceNotFoundException when a key with {@link KeyProperties#getName() name} and {@link KeyProperties#getVersion() - * version} doesn't exist in the key vault. - * @throws HttpRequestException if {@link KeyProperties#getName()} name} or {@link KeyProperties#getVersion() version} is empty - * string. - */ - public Key getKey(KeyProperties keyProperties) { - return getKeyWithResponse(keyProperties, Context.NONE).getValue(); - } - - /** - * Get public part of the key which represents {@link KeyProperties keyProperties} from the key vault. The get key operation is - * applicable to all key types and it requires the {@code keys/get} permission. - * - *

    The list operations {@link KeyClient#listKeys()} and {@link KeyClient#listKeyVersions(String)} return - * the {@link List} containing {@link KeyProperties key properties} as output excluding the key material of the key. This - * operation can then be used to get the full key with its key material from {@code keyProperties}.

    - * {@codesnippet com.azure.keyvault.keys.keyclient.getKeyWithResponse#KeyProperties-Context} - * - * @param keyProperties The {@link KeyProperties key properties} holding attributes of the key being requested. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the requested {@link Key key}. - * @throws ResourceNotFoundException when a key with {@link KeyProperties#getName() name} and {@link KeyProperties#getVersion() - * version} doesn't exist in the key vault. - * @throws HttpRequestException if {@link KeyProperties#getName() name} or {@link KeyProperties#getVersion() version} is empty - * string. - */ - public Response getKeyWithResponse(KeyProperties keyProperties, Context context) { - Objects.requireNonNull(keyProperties, "The Key properties parameter cannot be null."); - return client - .getKeyWithResponse(keyProperties.getName(), keyProperties.getVersion() == null ? "" : keyProperties.getVersion(), context).block(); - } - /** * Updates the attributes and key operations associated with the specified key, but not the cryptographic key * material of the specified key in the key vault. The update operation changes specified attributes of an existing @@ -439,14 +402,14 @@ public Response getKeyWithResponse(KeyProperties keyProperties, Context con * * @param keyProperties The {@link KeyProperties key properties} object with updated properties. * @param keyOperations The updated key operations to associate with the key. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link Key updated key}. + * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultKey updated key}. * @throws NullPointerException if {@code key} is {@code null}. * @throws ResourceNotFoundException when a key with {@link KeyProperties#getName() name} and {@link KeyProperties#getVersion() * version} doesn't exist in the key vault. * @throws HttpRequestException if {@link KeyProperties#getName() name} or {@link KeyProperties#getVersion() version} is empty * string. */ - public Key updateKeyProperties(KeyProperties keyProperties, KeyOperation... keyOperations) { + public KeyVaultKey updateKeyProperties(KeyProperties keyProperties, KeyOperation... keyOperations) { return updateKeyPropertiesWithResponse(keyProperties, Context.NONE, keyOperations).getValue(); } @@ -464,14 +427,14 @@ public Key updateKeyProperties(KeyProperties keyProperties, KeyOperation... keyO * @param keyProperties The {@link KeyProperties key properties} object with updated properties. * @param context Additional context that is passed through the Http pipeline during the service call. * @param keyOperations The updated key operations to associate with the key. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link Key updated key}. + * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultKey updated key}. * @throws NullPointerException if {@code key} is {@code null}. * @throws ResourceNotFoundException when a key with {@link KeyProperties#getName() name} and {@link KeyProperties#getVersion() * version} doesn't exist in the key vault. * @throws HttpRequestException if {@link KeyProperties#getName() name} or {@link KeyProperties#getVersion() version} is empty * string. */ - public Response updateKeyPropertiesWithResponse(KeyProperties keyProperties, Context context, KeyOperation... keyOperations) { + public Response updateKeyPropertiesWithResponse(KeyProperties keyProperties, Context context, KeyOperation... keyOperations) { return client.updateKeyPropertiesWithResponse(keyProperties, context, keyOperations).block(); } @@ -489,35 +452,12 @@ public Response updateKeyPropertiesWithResponse(KeyProperties keyProperties * {@codesnippet com.azure.keyvault.keys.keyclient.deleteKey#string} * * @param name The name of the key to be deleted. - * @return The {@link DeletedKey deleted key}. - * @throws ResourceNotFoundException when a key with {@code name} doesn't exist in the key vault. - * @throws HttpRequestException when a key with {@code name} is empty string. - */ - public DeletedKey deleteKey(String name) { - return deleteKeyWithResponse(name, Context.NONE).getValue(); - } - - /** - * Deletes a key of any type from the key vault. If soft-delete is enabled on the key vault then the key is placed - * in the deleted state and requires to be purged for permanent deletion else the key is permanently deleted. The - * delete operation applies to any key stored in Azure Key Vault but it cannot be applied to an individual version - * of a key. This operation removes the cryptographic material associated with the key, which means the key is not - * usable for Sign/Verify, Wrap/Unwrap or Encrypt/Decrypt operations. This operation requires the {@code - * keys/delete} permission. - * - *

    Code Samples

    - *

    Deletes the key from the keyvault. Prints out the recovery id of the deleted key returned in the - * response.

    - * {@codesnippet com.azure.keyvault.keys.keyclient.deleteKeyWithResponse#string-Context} - * - * @param name The name of the key to be deleted. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link DeletedKey deleted key}. + * @return A {@link Poller} to poll on and retrieve {@link DeletedKey deleted key} * @throws ResourceNotFoundException when a key with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a key with {@code name} is empty string. */ - public Response deleteKeyWithResponse(String name, Context context) { - return client.deleteKeyWithResponse(name, context).block(); + public Poller beginDeleteKey(String name) { + return client.beginDeleteKey(name); } /** @@ -608,32 +548,12 @@ public Response purgeDeletedKeyWithResponse(String name, Context context) * {@codesnippet com.azure.keyvault.keys.keyclient.recoverDeletedKey#string} * * @param name The name of the deleted key to be recovered. - * @return The {@link Key recovered key}. - * @throws ResourceNotFoundException when a key with {@code name} doesn't exist in the key vault. - * @throws HttpRequestException when a key with {@code name} is empty string. - */ - public Key recoverDeletedKey(String name) { - return recoverDeletedKeyWithResponse(name, Context.NONE).getValue(); - } - - /** - * Recovers the deleted key in the key vault to its latest version and can only be performed on a soft-delete - * enabled vault. An attempt to recover an non-deleted key will return an error. Consider this the inverse of the - * delete operation on soft-delete enabled vaults. This operation requires the {@code keys/recover} permission. - * - *

    Code Samples

    - *

    Recovers the deleted key from the key vault enabled for soft-delete.

    - * //Assuming key is deleted on a soft-delete enabled key vault. - * {@codesnippet com.azure.keyvault.keys.keyclient.recoverDeletedKeyWithResponse#string-Context} - * - * @param name The name of the deleted key to be recovered. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link Key recovered key}. + * @return A {@link Poller} to poll on and retrieve {@link KeyVaultKey recovered key}. * @throws ResourceNotFoundException when a key with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a key with {@code name} is empty string. */ - public Response recoverDeletedKeyWithResponse(String name, Context context) { - return client.recoverDeletedKeyWithResponse(name, context).block(); + public Poller beginRecoverDeletedKey(String name) { + return client.beginRecoverDeletedKey(name); } /** @@ -704,14 +624,14 @@ public Response backupKeyWithResponse(String name, Context context) { *

    Restores the key in the key vault from its backup. Prints out the details of the restored key returned in the * response.

    * //Pass the Key Backup Byte array to the restore operation. - * {@codesnippet com.azure.keyvault.keys.keyclient.restoreKey#byte} + * {@codesnippet com.azure.keyvault.keys.keyclient.restoreKeyBackup#byte} * * @param backup The backup blob associated with the key. - * @return The {@link Key restored key}. + * @return The {@link KeyVaultKey restored key}. * @throws ResourceModifiedException when {@code backup} blob is malformed. */ - public Key restoreKey(byte[] backup) { - return restoreKeyWithResponse(backup, Context.NONE).getValue(); + public KeyVaultKey restoreKeyBackup(byte[] backup) { + return restoreKeyBackupWithResponse(backup, Context.NONE).getValue(); } /** @@ -729,15 +649,15 @@ public Key restoreKey(byte[] backup) { *

    Restores the key in the key vault from its backup. Prints out the details of the restored key returned in the * response.

    * //Pass the Key Backup Byte array to the restore operation. - * {@codesnippet com.azure.keyvault.keys.keyclient.restoreKeyWithResponse#byte-Context} + * {@codesnippet com.azure.keyvault.keys.keyclient.restoreKeyBackupWithResponse#byte-Context} * * @param backup The backup blob associated with the key. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link Key restored key}. + * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultKey restored key}. * @throws ResourceModifiedException when {@code backup} blob is malformed. */ - public Response restoreKeyWithResponse(byte[] backup, Context context) { - return client.restoreKeyWithResponse(backup, context).block(); + public Response restoreKeyBackupWithResponse(byte[] backup, Context context) { + return client.restoreKeyBackupWithResponse(backup, context).block(); } /** @@ -748,20 +668,20 @@ public Response restoreKeyWithResponse(byte[] backup, Context context) { * operation requires the {@code keys/list} permission. * *

    It is possible to get full keys with key material from this information. Loop over the {@link KeyProperties key} - * and call {@link KeyClient#getKey(KeyProperties key properties)}. This will return the {@link Key key} with key material + * and call {@link KeyClient#getKey(String, String)}. This will return the {@link KeyVaultKey key} with key material * included of its latest version.

    * {@codesnippet com.azure.keyvault.keys.keyclient.listKeys} * *

    Code Samples to iterate keys by page

    *

    It is possible to get full keys with key material from this information. Iterate over all the {@link KeyProperties - * key} by page and call {@link KeyClient#getKey(KeyProperties key properties)}. This will return the {@link Key key} with key + * key} by page and call {@link KeyClient#getKey(String, String)}. This will return the {@link KeyVaultKey key} with key * material included of its latest version.

    * {@codesnippet com.azure.keyvault.keys.keyclient.listKeys.iterableByPage} * * @return {@link PagedIterable} of {@link KeyProperties key} of all the keys in the vault. */ - public PagedIterable listKeys() { - return listKeys(Context.NONE); + public PagedIterable listPropertiesOfKeys() { + return listPropertiesOfKeys(Context.NONE); } /** @@ -772,21 +692,21 @@ public PagedIterable listKeys() { * operation requires the {@code keys/list} permission. * *

    It is possible to get full keys with key material from this information. Loop over the {@link KeyProperties key} - * and call {@link KeyClient#getKey(KeyProperties key properties)}. This will return the {@link Key key} with key material + * and call {@link KeyClient#getKey(String, String)}. This will return the {@link KeyVaultKey key} with key material * included of its latest version.

    * {@codesnippet com.azure.keyvault.keys.keyclient.listKeys#Context} * *

    Code Samples to iterate keys by page

    *

    It is possible to get full keys with key material from this information. Iterate over all the {@link KeyProperties - * key} by page and call {@link KeyClient#getKey(KeyProperties key properties)}. This will return the {@link Key key} with key + * key} by page and call {@link KeyClient#getKey(String, String)}. This will return the {@link KeyVaultKey key} with key * material included of its latest version.

    * {@codesnippet com.azure.keyvault.keys.keyclient.listKeys.iterableByPage} * * @param context Additional context that is passed through the Http pipeline during the service call. * @return {@link PagedIterable} of {@link KeyProperties key} of all the keys in the vault. */ - public PagedIterable listKeys(Context context) { - return new PagedIterable<>(client.listKeys(context)); + public PagedIterable listPropertiesOfKeys(Context context) { + return new PagedIterable<>(client.listPropertiesOfKeys(context)); } /** @@ -836,14 +756,14 @@ public PagedIterable listDeletedKeys(Context context) { * not provided in the response. This operation requires the {@code keys/list} permission. * *

    It is possible to get full keys with key material for each version from this information. Loop over the - * {@link KeyProperties key} and call {@link KeyClient#getKey(KeyProperties key properties)}. This will return the {@link Key keys} + * {@link KeyProperties key} and call {@link KeyClient#getKey(String, String)}. This will return the {@link KeyVaultKey keys} * with key material included of the specified versions.

    * {@codesnippet com.azure.keyvault.keys.keyclient.listKeyVersions} * *

    Code Samples to iterate over key versions by page

    *

    It is possible to get full keys with key material for each version from this information. Iterate over all - * the {@link KeyProperties key} by page and call {@link KeyClient#getKey(KeyProperties key properties)}. This will return the {@link - * Key keys} with key material included of the specified versions.

    + * the {@link KeyProperties key} by page and call {@link KeyClient#getKey(String, String)}. This will return the {@link + * KeyVaultKey keys} with key material included of the specified versions.

    * {@codesnippet com.azure.keyvault.keys.keyclient.listKeyVersions.iterableByPage} * * @param name The name of the key. @@ -852,8 +772,8 @@ public PagedIterable listDeletedKeys(Context context) { * @throws ResourceNotFoundException when a key with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a key with {@code name} is empty string. */ - public PagedIterable listKeyVersions(String name) { - return listKeyVersions(name, Context.NONE); + public PagedIterable listPropertiesOfKeyVersions(String name) { + return listPropertiesOfKeyVersions(name, Context.NONE); } /** @@ -862,14 +782,14 @@ public PagedIterable listKeyVersions(String name) { * not provided in the response. This operation requires the {@code keys/list} permission. * *

    It is possible to get full keys with key material for each version from this information. Loop over the - * {@link KeyProperties key} and call {@link KeyClient#getKey(KeyProperties key properties)}. This will return the {@link Key keys} + * {@link KeyProperties key} and call {@link KeyClient#getKey(String, String)}. This will return the {@link KeyVaultKey keys} * with key material included of the specified versions.

    * {@codesnippet com.azure.keyvault.keys.keyclient.listKeyVersions} * *

    Code Samples to iterate over key versions by page

    *

    It is possible to get full keys with key material for each version from this information. Iterate over all - * the {@link KeyProperties key} by page and call {@link KeyClient#getKey(KeyProperties key properties)}. This will return the - * {@link Key keys} with key material included of the specified versions.

    + * the {@link KeyProperties key} by page and call {@link KeyClient#getKey(String, String)}. This will return the + * {@link KeyVaultKey keys} with key material included of the specified versions.

    * * {@codesnippet com.azure.keyvault.keys.keyclient.listKeyVersions.iterableByPage} * @@ -880,7 +800,7 @@ public PagedIterable listKeyVersions(String name) { * @throws ResourceNotFoundException when a key with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a key with {@code name} is empty string. */ - public PagedIterable listKeyVersions(String name, Context context) { - return new PagedIterable<>(client.listKeyVersions(name, context)); + public PagedIterable listPropertiesOfKeyVersions(String name, Context context) { + return new PagedIterable<>(client.listPropertiesOfKeyVersions(name, context)); } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java index a17a919e94c9..e0b57f2cb52d 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java @@ -19,6 +19,7 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.util.logging.ClientLogger; import com.azure.security.keyvault.keys.implementation.AzureKeyVaultConfiguration; +import com.azure.security.keyvault.keys.implementation.KeyVaultCredentialPolicy; import java.net.MalformedURLException; import java.net.URL; @@ -33,7 +34,7 @@ * respectively. It constructs an instance of the desired client. * *

    The minimal configuration options required by {@link KeyClientBuilder} to build {@link KeyAsyncClient} are - * {@link String endpoint} and {@link TokenCredential credential}.

    + * {@link String vaultUrl} and {@link TokenCredential credential}.

    * * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.instantiation} * @@ -43,13 +44,13 @@ * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.withhttpclient.instantiation} * *

    Alternatively, custom {@link HttpPipeline http pipeline} with custom {@link HttpPipelinePolicy} policies and - * {@link String endpoint} can be specified. It provides finer control over the construction of {@link KeyAsyncClient} + * {@link String vaultUrl} can be specified. It provides finer control over the construction of {@link KeyAsyncClient} * and {@link KeyClient}

    * * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.pipeline.instantiation} * *

    The minimal configuration options required by {@link KeyClientBuilder secretClientBuilder} to build {@link - * KeyClient} are {@link String endpoint} and {@link TokenCredential credential}.

    + * KeyClient} are {@link String vaultUrl} and {@link TokenCredential credential}.

    * * {@codesnippet com.azure.security.keyvault.keys.keyclient.instantiation} * @@ -63,7 +64,7 @@ public final class KeyClientBuilder { private final List policies; private TokenCredential credential; private HttpPipeline pipeline; - private URL endpoint; + private URL vaultUrl; private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final RetryPolicy retryPolicy; @@ -84,14 +85,14 @@ public KeyClientBuilder() { * Every time {@code buildClient()} is called, a new instance of {@link KeyClient} is created. * *

    If {@link KeyClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and - * {@link KeyClientBuilder#endpoint(String) serviceEndpoint} are used to create the {@link KeyClientBuilder client}. + * {@link KeyClientBuilder#vaultUrl(String) vaultUrl} are used to create the {@link KeyClientBuilder client}. * All other builder settings are ignored. If {@code pipeline} is not set, then {@link * KeyClientBuilder#credential(TokenCredential) key vault credential} and {@link - * KeyClientBuilder#endpoint(String) key vault endpoint} are required to build the {@link KeyClient client}.

    + * KeyClientBuilder#vaultUrl(String) key vault url} are required to build the {@link KeyClient client}.

    * * @return A {@link KeyClient} with the options set from the builder. * @throws IllegalStateException If {@link KeyClientBuilder#credential(TokenCredential)} or - * {@link KeyClientBuilder#endpoint(String)} have not been set. + * {@link KeyClientBuilder#vaultUrl(String)} have not been set. */ public KeyClient buildClient() { return new KeyClient(buildAsyncClient()); @@ -102,14 +103,14 @@ public KeyClient buildClient() { * Every time {@code buildAsyncClient()} is called, a new instance of {@link KeyAsyncClient} is created. * *

    If {@link KeyClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and - * {@link KeyClientBuilder#endpoint(String) serviceEndpoint} are used to create the {@link KeyClientBuilder client}. + * {@link KeyClientBuilder#vaultUrl(String) vaultUrl} are used to create the {@link KeyClientBuilder client}. * All other builder settings are ignored. If {@code pipeline} is not set, then {@link - * KeyClientBuilder#credential(TokenCredential) key vault credential and {@link KeyClientBuilder#endpoint(String)} - * key vault endpoint are required to build the {@link KeyAsyncClient client}.}

    + * KeyClientBuilder#credential(TokenCredential) key vault credential and {@link KeyClientBuilder#vaultUrl(String)} + * key vault url are required to build the {@link KeyAsyncClient client}.}

    * * @return A {@link KeyAsyncClient} with the options set from the builder. * @throws IllegalStateException If {@link KeyClientBuilder#credential(TokenCredential)} or - * {@link KeyClientBuilder#endpoint(String)} have not been set. + * {@link KeyClientBuilder#vaultUrl(String)} have not been set. */ public KeyAsyncClient buildAsyncClient() { Configuration buildConfiguration = @@ -124,7 +125,7 @@ public KeyAsyncClient buildAsyncClient() { KeyServiceVersion serviceVersion = version != null ? version : KeyServiceVersion.getLatest(); if (pipeline != null) { - return new KeyAsyncClient(endpoint, pipeline, serviceVersion); + return new KeyAsyncClient(vaultUrl, pipeline, serviceVersion); } if (credential == null) { @@ -149,22 +150,22 @@ public KeyAsyncClient buildAsyncClient() { .httpClient(httpClient) .build(); - return new KeyAsyncClient(endpoint, pipeline, serviceVersion); + return new KeyAsyncClient(vaultUrl, pipeline, serviceVersion); } /** - * Sets the vault endpoint url to send HTTP requests to. + * Sets the vault url to send HTTP requests to. * - * @param endpoint The vault endpoint url is used as destination on Azure to send requests to. + * @param vaultUrl The vault url is used as destination on Azure to send requests to. * @return the updated ServiceClientBuilder object. - * @throws IllegalArgumentException if {@code endpoint} is null or it cannot be parsed into a valid URL. + * @throws IllegalArgumentException if {@code vaultUrl} is null or it cannot be parsed into a valid URL. */ - public KeyClientBuilder endpoint(String endpoint) { + public KeyClientBuilder vaultUrl(String vaultUrl) { try { - this.endpoint = new URL(endpoint); - } catch (MalformedURLException e) { + this.vaultUrl = new URL(vaultUrl); + } catch (MalformedURLException ex) { throw logger.logExceptionAsError(new IllegalArgumentException( - "The Azure Key Vault endpoint url is malformed.")); + "The Azure Key Vault url is malformed.", ex)); } return this; } @@ -226,7 +227,7 @@ public KeyClientBuilder httpClient(HttpClient client) { * Sets the HTTP pipeline to use for the service client. * * If {@code pipeline} is set, all other settings are ignored, aside from - * {@link KeyClientBuilder#endpoint(String) endpoint} to build {@link KeyClient} or {@link KeyAsyncClient}. + * {@link KeyClientBuilder#vaultUrl(String) vaultUrl} to build {@link KeyClient} or {@link KeyAsyncClient}. * * @param pipeline The HTTP pipeline to use for sending service requests and receiving responses. * @return the updated {@link KeyClientBuilder} object. @@ -267,8 +268,8 @@ public KeyClientBuilder configuration(Configuration configuration) { } private URL getBuildEndpoint(Configuration configuration) { - if (endpoint != null) { - return endpoint; + if (vaultUrl != null) { + return vaultUrl; } String configEndpoint = configuration.get("AZURE_KEYVAULT_ENDPOINT"); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyImportRequestParameters.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyImportRequestParameters.java index 36ec0e136f3d..64b0285c3cf7 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyImportRequestParameters.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyImportRequestParameters.java @@ -4,7 +4,7 @@ package com.azure.security.keyvault.keys; import com.azure.core.annotation.Fluent; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; +import com.azure.security.keyvault.keys.models.JsonWebKey; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyRequestAttributes.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyRequestAttributes.java index b997359f5d82..45bd4de2605a 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyRequestAttributes.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyRequestAttributes.java @@ -4,7 +4,7 @@ package com.azure.security.keyvault.keys; import com.azure.security.keyvault.keys.models.KeyProperties; -import com.azure.security.keyvault.keys.models.KeyCreateOptions; +import com.azure.security.keyvault.keys.models.CreateKeyOptions; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Instant; @@ -22,8 +22,8 @@ class KeyRequestAttributes { if (keyProperties.getNotBefore() != null) { this.notBefore = keyProperties.getNotBefore().toEpochSecond(); } - if (keyProperties.getExpires() != null) { - this.expires = keyProperties.getExpires().toEpochSecond(); + if (keyProperties.getExpiresOn() != null) { + this.expires = keyProperties.getExpiresOn().toEpochSecond(); } this.enabled = keyProperties.isEnabled(); } @@ -32,14 +32,14 @@ class KeyRequestAttributes { * Creates an instance of KeyRequestAttributes. Reads KeyCreateOptions.getNotBefore, KeyCreateOptions.getExpires and * KeyCreateOptions.isEnabled fields * from {@code keyOptions} - * @param keyOptions the {@link KeyCreateOptions} object with populated attributes + * @param keyOptions the {@link CreateKeyOptions} object with populated attributes */ - KeyRequestAttributes(KeyCreateOptions keyOptions) { + KeyRequestAttributes(CreateKeyOptions keyOptions) { if (keyOptions.getNotBefore() != null) { this.notBefore = keyOptions.getNotBefore().toEpochSecond(); } - if (keyOptions.getExpires() != null) { - this.expires = keyOptions.getExpires().toEpochSecond(); + if (keyOptions.getExpiresOn() != null) { + this.expires = keyOptions.getExpiresOn().toEpochSecond(); } this.enabled = keyOptions.isEnabled(); } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyRequestParameters.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyRequestParameters.java index 63569c40d67f..94c1734e9599 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyRequestParameters.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyRequestParameters.java @@ -4,9 +4,9 @@ package com.azure.security.keyvault.keys; import com.azure.core.annotation.Fluent; -import com.azure.security.keyvault.keys.models.webkey.KeyCurveName; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; +import com.azure.security.keyvault.keys.models.KeyCurveName; +import com.azure.security.keyvault.keys.models.KeyOperation; +import com.azure.security.keyvault.keys.models.KeyType; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyService.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyService.java index 0554b65c49e4..4a68d7bfecb8 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyService.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyService.java @@ -27,7 +27,7 @@ import com.azure.security.keyvault.keys.implementation.DeletedKeyPage; import com.azure.security.keyvault.keys.implementation.KeyPropertiesPage; import com.azure.security.keyvault.keys.models.DeletedKey; -import com.azure.security.keyvault.keys.models.Key; +import com.azure.security.keyvault.keys.models.KeyVaultKey; import com.azure.security.keyvault.keys.models.KeyProperties; import reactor.core.publisher.Mono; @@ -45,37 +45,49 @@ interface KeyService { @ExpectedResponses({200}) @UnexpectedResponseExceptionType(code = {400}, value = ResourceModifiedException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> createKey(@HostParam("url") String url, - @PathParam("key-name") String keyName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("accept-language") String acceptLanguage, - @BodyParam("body") KeyRequestParameters parameters, - @HeaderParam("Content-Type") String type, - Context context); + Mono> createKey(@HostParam("url") String url, + @PathParam("key-name") String keyName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @BodyParam("body") KeyRequestParameters parameters, + @HeaderParam("Content-Type") String type, + Context context); @Get("keys/{key-name}/{key-version}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(code = {404}, value = ResourceNotFoundException.class) @UnexpectedResponseExceptionType(code = {403}, value = ResourceModifiedException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> getKey(@HostParam("url") String url, - @PathParam("key-name") String keyName, - @PathParam("key-version") String keyVersion, - @QueryParam("api-version") String apiVersion, - @HeaderParam("accept-language") String acceptLanguage, - @HeaderParam("Content-Type") String type, - Context context); + Mono> getKey(@HostParam("url") String url, + @PathParam("key-name") String keyName, + @PathParam("key-version") String keyVersion, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @HeaderParam("Content-Type") String type, + Context context); + + @Get("keys/{key-name}/{key-version}") + @ExpectedResponses({200, 404}) + @UnexpectedResponseExceptionType(code = {403}, value = ResourceModifiedException.class) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getKeyPoller(@HostParam("url") String url, + @PathParam("key-name") String keyName, + @PathParam("key-version") String keyVersion, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @HeaderParam("Content-Type") String type, + Context context); @Put("keys/{key-name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> importKey(@HostParam("url") String url, - @PathParam("key-name") String keyName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("accept-language") String acceptLanguage, - @BodyParam("body") KeyImportRequestParameters parameters, - @HeaderParam("Content-Type") String type, - Context context); + Mono> importKey(@HostParam("url") String url, + @PathParam("key-name") String keyName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @BodyParam("body") KeyImportRequestParameters parameters, + @HeaderParam("Content-Type") String type, + Context context); @Delete("keys/{key-name}") @@ -92,14 +104,14 @@ Mono> deleteKey(@HostParam("url") String url, @Patch("keys/{key-name}/{key-version}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> updateKey(@HostParam("url") String url, - @PathParam("key-name") String keyName, - @PathParam("key-version") String keyVersion, - @QueryParam("api-version") String apiVersion, - @HeaderParam("accept-language") String acceptLanguage, - @BodyParam("body") KeyRequestParameters parameters, - @HeaderParam("Content-Type") String type, - Context context); + Mono> updateKey(@HostParam("url") String url, + @PathParam("key-name") String keyName, + @PathParam("key-version") String keyVersion, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @BodyParam("body") KeyRequestParameters parameters, + @HeaderParam("Content-Type") String type, + Context context); @Get("keys/{key-name}/versions") @ExpectedResponses({200}) @@ -129,12 +141,12 @@ Mono> backupKey(@HostParam("url") String url, @ExpectedResponses({200}) @UnexpectedResponseExceptionType(code = {400}, value = ResourceModifiedException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> restoreKey(@HostParam("url") String url, - @QueryParam("api-version") String apiVersion, - @BodyParam("body") KeyRestoreRequestParameters parameters, - @HeaderParam("accept-language") String acceptLanguage, - @HeaderParam("Content-Type") String type, - Context context); + Mono> restoreKey(@HostParam("url") String url, + @QueryParam("api-version") String apiVersion, + @BodyParam("body") KeyRestoreRequestParameters parameters, + @HeaderParam("accept-language") String acceptLanguage, + @HeaderParam("Content-Type") String type, + Context context); @Get("keys") @@ -192,6 +204,18 @@ Mono> getDeletedKey(@HostParam("url") String url, @HeaderParam("Content-Type") String type, Context context); + + @Get("deletedkeys/{key-name}") + @ExpectedResponses({200, 404}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDeletedKeyPoller(@HostParam("url") String url, + @PathParam("key-name") String keyName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @HeaderParam("Content-Type") String type, + Context context); + + @Delete("deletedkeys/{key-name}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(code = {404}, value = ResourceNotFoundException.class) @@ -208,10 +232,10 @@ Mono> purgeDeletedKey(@HostParam("url") String url, @ExpectedResponses({200}) @UnexpectedResponseExceptionType(code = {404}, value = ResourceNotFoundException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> recoverDeletedKey(@HostParam("url") String url, - @PathParam("key-name") String keyName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("accept-language") String acceptLanguage, - @HeaderParam("Content-Type") String type, - Context context); + Mono> recoverDeletedKey(@HostParam("url") String url, + @PathParam("key-name") String keyName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @HeaderParam("Content-Type") String type, + Context context); } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClient.java index c6eaa5e3b0c4..635d8f954c61 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClient.java @@ -18,15 +18,15 @@ import com.azure.security.keyvault.keys.cryptography.models.DecryptResult; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.EncryptResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyUnwrapResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyWrapResult; +import com.azure.security.keyvault.keys.cryptography.models.UnwrapResult; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignResult; import com.azure.security.keyvault.keys.cryptography.models.VerifyResult; -import com.azure.security.keyvault.keys.models.Key; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; +import com.azure.security.keyvault.keys.cryptography.models.WrapResult; +import com.azure.security.keyvault.keys.models.KeyVaultKey; +import com.azure.security.keyvault.keys.models.JsonWebKey; +import com.azure.security.keyvault.keys.models.KeyOperation; import reactor.core.publisher.Mono; import java.net.MalformedURLException; @@ -36,11 +36,11 @@ import static com.azure.core.implementation.util.FluxUtil.monoError; import static com.azure.core.implementation.util.FluxUtil.withContext; -import static com.azure.security.keyvault.keys.models.webkey.KeyType.EC; -import static com.azure.security.keyvault.keys.models.webkey.KeyType.EC_HSM; -import static com.azure.security.keyvault.keys.models.webkey.KeyType.RSA; -import static com.azure.security.keyvault.keys.models.webkey.KeyType.RSA_HSM; -import static com.azure.security.keyvault.keys.models.webkey.KeyType.OCT; +import static com.azure.security.keyvault.keys.models.KeyType.EC; +import static com.azure.security.keyvault.keys.models.KeyType.EC_HSM; +import static com.azure.security.keyvault.keys.models.KeyType.RSA; +import static com.azure.security.keyvault.keys.models.KeyType.RSA_HSM; +import static com.azure.security.keyvault.keys.models.KeyType.OCT; /** * The CryptographyAsyncClient provides asynchronous methods to perform cryptographic operations using asymmetric and @@ -77,14 +77,14 @@ public class CryptographyAsyncClient { throw new IllegalArgumentException("Json Web Key's key operations property is not configured"); } - if (key.getKty() == null) { + if (key.getKeyType() == null) { throw new IllegalArgumentException("Json Web Key's key type property is not configured"); } this.key = key; service = RestProxy.create(CryptographyService.class, pipeline); - if (!Strings.isNullOrEmpty(key.getKid())) { - unpackAndValidateId(key.getKid()); - cryptographyServiceClient = new CryptographyServiceClient(key.getKid(), service); + if (!Strings.isNullOrEmpty(key.getId())) { + unpackAndValidateId(key.getId()); + cryptographyServiceClient = new CryptographyServiceClient(key.getId(), service); } else { cryptographyServiceClient = null; } @@ -94,14 +94,14 @@ public class CryptographyAsyncClient { /** * Creates a CryptographyAsyncClient that uses {@code pipeline} to service requests * - * @param kid THe Azure Key vault key identifier to use for cryptography operations. + * @param keyId THe Azure Key vault key identifier to use for cryptography operations. * @param pipeline HttpPipeline that the HTTP requests and responses flow through. * @param version {@link CryptographyServiceVersion} of the service to be used when making requests. */ - CryptographyAsyncClient(String kid, HttpPipeline pipeline, CryptographyServiceVersion version) { - unpackAndValidateId(kid); + CryptographyAsyncClient(String keyId, HttpPipeline pipeline, CryptographyServiceVersion version) { + unpackAndValidateId(keyId); service = RestProxy.create(CryptographyService.class, pipeline); - cryptographyServiceClient = new CryptographyServiceClient(kid, service); + cryptographyServiceClient = new CryptographyServiceClient(keyId, service); this.key = null; } @@ -109,15 +109,15 @@ private void initializeCryptoClients() { if (localKeyCryptographyClient != null) { return; } - if (key.getKty().equals(RSA) || key.getKty().equals(RSA_HSM)) { + if (key.getKeyType().equals(RSA) || key.getKeyType().equals(RSA_HSM)) { localKeyCryptographyClient = new RsaKeyCryptographyClient(key, cryptographyServiceClient); - } else if (key.getKty().equals(EC) || key.getKty().equals(EC_HSM)) { + } else if (key.getKeyType().equals(EC) || key.getKeyType().equals(EC_HSM)) { localKeyCryptographyClient = new EcKeyCryptographyClient(key, cryptographyServiceClient); - } else if (key.getKty().equals(OCT)) { + } else if (key.getKeyType().equals(OCT)) { localKeyCryptographyClient = new SymmetricKeyCryptographyClient(key, cryptographyServiceClient); } else { throw logger.logExceptionAsError(new IllegalArgumentException(String.format( - "The Json Web Key Type: %s is not supported.", key.getKty().toString()))); + "The Json Web Key Type: %s is not supported.", key.getKeyType().toString()))); } } @@ -131,11 +131,11 @@ private void initializeCryptoClients() { * {@codesnippet com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.getKeyWithResponse} * * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the requested - * {@link Key key}. + * {@link KeyVaultKey key}. * @throws ResourceNotFoundException when the configured key doesn't exist in the key vault. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getKeyWithResponse() { + Mono> getKeyWithResponse() { try { return withContext(context -> getKeyWithResponse(context)); } catch (RuntimeException ex) { @@ -152,11 +152,11 @@ public Mono> getKeyWithResponse() { * details when a response has been received.

    * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.getKey} * - * @return A {@link Mono} containing the requested {@link Key key}. + * @return A {@link Mono} containing the requested {@link KeyVaultKey key}. * @throws ResourceNotFoundException when the configured key doesn't exist in the key vault. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getKey() { + Mono getKey() { try { return getKeyWithResponse().flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { @@ -164,7 +164,7 @@ public Mono getKey() { } } - Mono> getKeyWithResponse(Context context) { + Mono> getKeyWithResponse(Context context) { return cryptographyServiceClient.getKey(context); } @@ -194,59 +194,20 @@ Mono> getKeyWithResponse(Context context) { * @return A {@link Mono} containing a {@link EncryptResult} whose {@link EncryptResult#getCipherText() cipher text} * contains the encrypted content. * @throws ResourceNotFoundException if the key cannot be found for encryption. + * @throws UnsupportedOperationException if the encrypt operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code plainText} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono encrypt(EncryptionAlgorithm algorithm, byte[] plaintext) { try { - return withContext(context -> encrypt(algorithm, plaintext, context, null, null)); + return withContext(context -> encrypt(algorithm, plaintext, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - /** - * Encrypts an arbitrary sequence of bytes using the configured key. Note that the encrypt operation only supports a - * single block of data, the size of which is dependent on the target key and the encryption algorithm to be used. - * The encrypt operation is supported for both symmetric keys and asymmetric keys. In case of asymmetric keys public - * portion of the key is used for encryption. This operation requires the keys/encrypt permission. - * - *

    The {@link EncryptionAlgorithm encryption algorithm} indicates the type of algorithm to use for encrypting the - * specified {@code plaintext}. Possible values for assymetric keys include: - * {@link EncryptionAlgorithm#RSA1_5 RSA1_5}, {@link EncryptionAlgorithm#RSA_OAEP RSA_OAEP} and - * {@link EncryptionAlgorithm#RSA_OAEP_256 RSA_OAEP_256}. - * - * Possible values for symmetric keys include: {@link EncryptionAlgorithm#A128CBC A128CBC}, {@link - * EncryptionAlgorithm#A128CBC_HS256 A128CBC-HS256}, {@link EncryptionAlgorithm#A192CBC A192CBC}, {@link - * EncryptionAlgorithm#A192CBC_HS384 A192CBC-HS384}, {@link EncryptionAlgorithm#A256CBC A256CBC} and - * {@link EncryptionAlgorithm#A256CBC_HS512 A256CBC-HS512}

    - * - *

    Code Samples

    - *

    Encrypts the content. Subscribes to the call asynchronously and prints out the encrypted content details when - * a response has been received.

    - * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.encrypt#EncryptionAlgorithm-byte-byte-byte} - * - * @param algorithm The algorithm to be used for encryption. - * @param plaintext The content to be encrypted. - * @param iv The initialization vector - * @param authenticationData The authentication data - * @return A {@link Mono} containing a {@link EncryptResult} whose {@link EncryptResult#getCipherText() cipher text} - * contains the encrypted content. - * @throws ResourceNotFoundException if the key cannot be found for encryption. - * @throws NullPointerException if {@code algorithm} or {@code plainText} is null. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, byte[] iv, - byte[] authenticationData) { - try { - return withContext(context -> encrypt(algorithm, plaintext, context, iv, authenticationData)); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - Mono encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, Context context, byte[] iv, - byte[] authenticationData) { + Mono encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, Context context) { Objects.requireNonNull(algorithm, "Encryption algorithm cannot be null."); Objects.requireNonNull(plaintext, "Plain text content to be encrypted cannot be null."); @@ -257,10 +218,10 @@ Mono encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, Con } if (!checkKeyPermissions(this.key.getKeyOps(), KeyOperation.ENCRYPT)) { - return Mono.error(new UnsupportedOperationException(String.format("Encrypt Operation is missing " - + "permission/not supported for key with id %s", key.getKid()))); + return Mono.error(logger.logExceptionAsError(new UnsupportedOperationException(String.format("Encrypt Operation is missing " + + "permission/not supported for key with id %s", key.getId())))); } - return localKeyCryptographyClient.encryptAsync(algorithm, plaintext, iv, authenticationData, context, key); + return localKeyCryptographyClient.encryptAsync(algorithm, plaintext, context, key); } /** @@ -288,59 +249,19 @@ Mono encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, Con * @param cipherText The content to be decrypted. * @return A {@link Mono} containing the decrypted blob. * @throws ResourceNotFoundException if the key cannot be found for decryption. + * @throws UnsupportedOperationException if the decrypt operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code cipherText} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono decrypt(EncryptionAlgorithm algorithm, byte[] cipherText) { try { - return withContext(context -> decrypt(algorithm, cipherText, null, null, null, context)); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Decrypts a single block of encrypted data using the configured key and specified algorithm. Note that only a - * single block of data may be decrypted, the size of this block is dependent on the target key and the algorithm to - * be used. The decrypt operation is supported for both asymmetric and symmetric keys. This operation requires the - * keys/decrypt permission. - * - *

    The {@link EncryptionAlgorithm encryption algorithm} indicates the type of algorithm to use for decrypting the - * specified encrypted content. Possible values - * for assymetric keys include: {@link EncryptionAlgorithm#RSA1_5 RSA1_5}, {@link EncryptionAlgorithm#RSA_OAEP - * RSA_OAEP} and {@link EncryptionAlgorithm#RSA_OAEP_256 RSA_OAEP_256}. - * Possible values for symmetric keys include: {@link EncryptionAlgorithm#A128CBC A128CBC}, {@link - * EncryptionAlgorithm#A128CBC_HS256 A128CBC-HS256}, - * {@link EncryptionAlgorithm#A192CBC A192CBC}, {@link EncryptionAlgorithm#A192CBC_HS384 A192CBC-HS384}, {@link - * EncryptionAlgorithm#A256CBC A256CBC} and {@link EncryptionAlgorithm#A256CBC_HS512 A256CBC-HS512}

    - * - *

    Code Samples

    - *

    Decrypts the encrypted content. Subscribes to the call asynchronously and prints out the decrypted content - * details when a response has been received.

    - * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte} - * - * @param algorithm The algorithm to be used for decryption. - * @param cipherText The content to be decrypted. - * @param iv The initialization vector. - * @param authenticationData The authentication data. - * @param authenticationTag The authentication tag. - * @return A {@link Mono} containing the decrypted blob. - * @throws ResourceNotFoundException if the key cannot be found for decryption. - * @throws NullPointerException if {@code algorithm} or {@code cipherText} is null. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, byte[] iv, - byte[] authenticationData, byte[] authenticationTag) { - try { - return withContext(context -> decrypt(algorithm, cipherText, iv, authenticationData, authenticationTag, - context)); + return withContext(context -> decrypt(algorithm, cipherText, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, byte[] iv, byte[] authenticationData, - byte[] authenticationTag, Context context) { + Mono decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, Context context) { Objects.requireNonNull(algorithm, "Encryption algorithm cannot be null."); Objects.requireNonNull(cipherText, "Cipher text content to be decrypted cannot be null."); boolean keyAvailableLocally = ensureValidKeyAvailable(); @@ -350,11 +271,10 @@ Mono decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, by } if (!checkKeyPermissions(this.key.getKeyOps(), KeyOperation.DECRYPT)) { - return Mono.error(new UnsupportedOperationException(String.format("Decrypt Operation is not allowed for " - + "key with id %s", key.getKid()))); + return Mono.error(logger.logExceptionAsError(new UnsupportedOperationException(String.format("Decrypt Operation is not allowed for " + + "key with id %s", key.getId())))); } - return localKeyCryptographyClient.decryptAsync(algorithm, cipherText, iv, authenticationData, - authenticationTag, context, key); + return localKeyCryptographyClient.decryptAsync(algorithm, cipherText, context, key); } /** @@ -379,6 +299,7 @@ Mono decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, by * @return A {@link Mono} containing a {@link SignResult} whose {@link SignResult#getSignature() signature} contains * the created signature. * @throws ResourceNotFoundException if the key cannot be found for signing. + * @throws UnsupportedOperationException if the sign operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code digest} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -400,8 +321,8 @@ Mono sign(SignatureAlgorithm algorithm, byte[] digest, Context conte } if (!checkKeyPermissions(this.key.getKeyOps(), KeyOperation.SIGN)) { - return Mono.error(new UnsupportedOperationException(String.format("Sign Operation is not allowed for key " - + "with id %s", key.getKid()))); + return Mono.error(logger.logExceptionAsError(new UnsupportedOperationException(String.format("Sign Operation is not allowed for key " + + "with id %s", key.getId())))); } return localKeyCryptographyClient.signAsync(algorithm, digest, context, key); @@ -429,6 +350,7 @@ Mono sign(SignatureAlgorithm algorithm, byte[] digest, Context conte * @param signature The signature to be verified. * @return A {@link Mono} containing a {@link Boolean} indicating the signature verification result. * @throws ResourceNotFoundException if the key cannot be found for verifying. + * @throws UnsupportedOperationException if the verify operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm}, {@code digest} or {@code signature} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -451,8 +373,8 @@ Mono verify(SignatureAlgorithm algorithm, byte[] digest, byte[] si } if (!checkKeyPermissions(this.key.getKeyOps(), KeyOperation.VERIFY)) { - return Mono.error(new UnsupportedOperationException(String.format("Verify Operation is not allowed for " - + "key with id %s", key.getKid()))); + return Mono.error(logger.logExceptionAsError(new UnsupportedOperationException(String.format("Verify Operation is not allowed for " + + "key with id %s", key.getId())))); } return localKeyCryptographyClient.verifyAsync(algorithm, digest, signature, context, key); } @@ -473,13 +395,14 @@ Mono verify(SignatureAlgorithm algorithm, byte[] digest, byte[] si * * @param algorithm The encryption algorithm to use for wrapping the key. * @param key The key content to be wrapped - * @return A {@link Mono} containing a {@link KeyWrapResult} whose {@link KeyWrapResult#getEncryptedKey() encrypted + * @return A {@link Mono} containing a {@link WrapResult} whose {@link WrapResult#getEncryptedKey() encrypted * key} contains the wrapped key result. * @throws ResourceNotFoundException if the key cannot be found for wrap operation. + * @throws UnsupportedOperationException if the wrap operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code key} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono wrapKey(KeyWrapAlgorithm algorithm, byte[] key) { + public Mono wrapKey(KeyWrapAlgorithm algorithm, byte[] key) { try { return withContext(context -> wrapKey(algorithm, key, context)); } catch (RuntimeException ex) { @@ -487,7 +410,7 @@ public Mono wrapKey(KeyWrapAlgorithm algorithm, byte[] key) { } } - Mono wrapKey(KeyWrapAlgorithm algorithm, byte[] key, Context context) { + Mono wrapKey(KeyWrapAlgorithm algorithm, byte[] key, Context context) { Objects.requireNonNull(algorithm, "Key Wrap algorithm cannot be null."); Objects.requireNonNull(key, "Key content to be wrapped cannot be null."); boolean keyAvailableLocally = ensureValidKeyAvailable(); @@ -497,8 +420,8 @@ Mono wrapKey(KeyWrapAlgorithm algorithm, byte[] key, Context cont } if (!checkKeyPermissions(this.key.getKeyOps(), KeyOperation.WRAP_KEY)) { - return Mono.error(new UnsupportedOperationException(String.format("Wrap Key Operation is not allowed for " - + "key with id %s", this.key.getKid()))); + return Mono.error(logger.logExceptionAsError(new UnsupportedOperationException(String.format("Wrap Key Operation is not allowed for " + + "key with id %s", this.key.getId())))); } return localKeyCryptographyClient.wrapKeyAsync(algorithm, key, context, this.key); @@ -526,10 +449,11 @@ Mono wrapKey(KeyWrapAlgorithm algorithm, byte[] key, Context cont * @param encryptedKey The encrypted key content to unwrap. * @return A {@link Mono} containing a the unwrapped key content. * @throws ResourceNotFoundException if the key cannot be found for wrap operation. + * @throws UnsupportedOperationException if the unwrap operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code encryptedKey} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey) { + public Mono unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey) { try { return withContext(context -> unwrapKey(algorithm, encryptedKey, context)); } catch (RuntimeException ex) { @@ -537,7 +461,7 @@ public Mono unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryp } } - Mono unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context) { + Mono unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context) { Objects.requireNonNull(algorithm, "Key Wrap algorithm cannot be null."); Objects.requireNonNull(encryptedKey, "Encrypted key content to be unwrapped cannot be null."); @@ -548,8 +472,8 @@ Mono unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey, } if (!checkKeyPermissions(this.key.getKeyOps(), KeyOperation.WRAP_KEY)) { - return Mono.error(new UnsupportedOperationException(String.format("Unwrap Key Operation is not allowed " - + "for key with id %s", this.key.getKid()))); + return Mono.error(logger.logExceptionAsError(new UnsupportedOperationException(String.format("Unwrap Key Operation is not allowed " + + "for key with id %s", this.key.getId())))); } return localKeyCryptographyClient.unwrapKeyAsync(algorithm, encryptedKey, context, key); } @@ -576,6 +500,7 @@ Mono unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey, * @return A {@link Mono} containing a {@link SignResult} whose {@link SignResult#getSignature() signature} contains * the created signature. * @throws ResourceNotFoundException if the key cannot be found for signing. + * @throws UnsupportedOperationException if the sign operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code data} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -598,8 +523,8 @@ Mono signData(SignatureAlgorithm algorithm, byte[] data, Context con } if (!checkKeyPermissions(this.key.getKeyOps(), KeyOperation.SIGN)) { - return Mono.error(new UnsupportedOperationException(String.format("Sign Operation is not allowed for key " - + "with id %s", this.key.getKid()))); + return Mono.error(logger.logExceptionAsError(new UnsupportedOperationException(String.format("Sign Operation is not allowed for key " + + "with id %s", this.key.getId())))); } return localKeyCryptographyClient.signDataAsync(algorithm, data, context, key); } @@ -627,6 +552,7 @@ Mono signData(SignatureAlgorithm algorithm, byte[] data, Context con * @param signature The signature to be verified. * @return The {@link Boolean} indicating the signature verification result. * @throws ResourceNotFoundException if the key cannot be found for verifying. + * @throws UnsupportedOperationException if the verify operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm}, {@code data} or {@code signature} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -649,8 +575,8 @@ Mono verifyData(SignatureAlgorithm algorithm, byte[] data, byte[] } if (!checkKeyPermissions(this.key.getKeyOps(), KeyOperation.VERIFY)) { - return Mono.error(new UnsupportedOperationException(String.format( - "Verify Operation is not allowed for key with id %s", this.key.getKid()))); + return Mono.error(logger.logExceptionAsError(new UnsupportedOperationException(String.format( + "Verify Operation is not allowed for key with id %s", this.key.getId())))); } return localKeyCryptographyClient.verifyDataAsync(algorithm, data, signature, context, key); } @@ -685,11 +611,13 @@ private boolean ensureValidKeyAvailable() { boolean keyAvailableLocally = true; if (this.key == null) { try { - this.key = getKey().block().getKeyMaterial(); + KeyVaultKey keyVaultKey = getKey().block(); + this.key = keyVaultKey.getKey(); keyAvailableLocally = this.key.isValid(); initializeCryptoClients(); } catch (HttpResponseException | NullPointerException e) { - logger.info("Failed to retrieve key from key vault"); + logger.warning("Failed to retrieve key from key vault"); + logger.logExceptionAsWarning(e); keyAvailableLocally = false; } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClient.java index 8d35c89d769f..fbd5a989d526 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClient.java @@ -12,13 +12,13 @@ import com.azure.security.keyvault.keys.cryptography.models.DecryptResult; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.EncryptResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyUnwrapResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyWrapResult; +import com.azure.security.keyvault.keys.cryptography.models.UnwrapResult; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignResult; import com.azure.security.keyvault.keys.cryptography.models.VerifyResult; -import com.azure.security.keyvault.keys.models.Key; +import com.azure.security.keyvault.keys.cryptography.models.WrapResult; +import com.azure.security.keyvault.keys.models.KeyVaultKey; /** @@ -52,11 +52,11 @@ public class CryptographyClient { *

    Gets the key configured in the client. Prints out the returned key details.

    * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.getKey} * - * @return The requested {@link Key key}. + * @return The requested {@link KeyVaultKey key}. * @throws ResourceNotFoundException when the configured key doesn't exist in the key vault. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Key getKey() { + public KeyVaultKey getKey() { return getKeyWithResponse(Context.NONE).getValue(); } @@ -69,48 +69,14 @@ public Key getKey() { * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.getKeyWithResponse#Context} * * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the requested {@link Key key}. + * @return A {@link Response} whose {@link Response#getValue() value} contains the requested {@link KeyVaultKey key}. * @throws ResourceNotFoundException when the configured key doesn't exist in the key vault. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getKeyWithResponse(Context context) { + public Response getKeyWithResponse(Context context) { return client.getKeyWithResponse(context).block(); } - /** - * Encrypts an arbitrary sequence of bytes using the configured key. Note that the encrypt operation only supports a - * single block of data, the size of which is dependent on the target key and the encryption algorithm to be used. - * The encrypt operation is supported for both symmetric keys and asymmetric keys. In case of asymmetric keys public - * portion of the key is used for encryption. This operation requires the keys/encrypt permission. - * - *

    The {@link EncryptionAlgorithm encryption algorithm} indicates the type of algorithm to use for decrypting the - * specified encrypted content. Possible values for assymetric keys include: - * {@link EncryptionAlgorithm#RSA1_5 RSA1_5}, {@link EncryptionAlgorithm#RSA_OAEP RSA_OAEP} and - * {@link EncryptionAlgorithm#RSA_OAEP_256 RSA_OAEP_256}. - * - * Possible values for symmetric keys include: {@link EncryptionAlgorithm#A128CBC A128CBC}, {@link - * EncryptionAlgorithm#A128CBC_HS256 A128CBC-HS256}, - * {@link EncryptionAlgorithm#A192CBC A192CBC}, {@link EncryptionAlgorithm#A192CBC_HS384 A192CBC-HS384}, {@link - * EncryptionAlgorithm#A256CBC A256CBC} and {@link EncryptionAlgorithm#A256CBC_HS512 A256CBC-HS512}

    - * - *

    Code Samples

    - *

    Encrypts the content. Prints out the encrypted content details.

    - * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-byte-byte} - * - * @param algorithm The algorithm to be used for encryption. - * @param plaintext The content to be encrypted. - * @param iv The initialization vector - * @param authenticationData The authentication data - * @return A {@link EncryptResult} whose {@link EncryptResult#getCipherText() cipher text} contains the encrypted - * content. - * @throws ResourceNotFoundException if the key cannot be found for encryption. - * @throws NullPointerException if {@code algorithm} or {@code plainText} is null. - */ - public EncryptResult encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, byte[] iv, - byte[] authenticationData) { - return encrypt(algorithm, plaintext, iv, authenticationData, Context.NONE); - } - /** * Encrypts an arbitrary sequence of bytes using the configured key. Note that the encrypt operation only supports a * single block of data, the size of which is dependent on the target key and the encryption algorithm to be used. @@ -131,21 +97,19 @@ public EncryptResult encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, by *

    Code Samples

    *

    Encrypts the content. Subscribes to the call asynchronously and prints out the encrypted content details when * a response has been received.

    - * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-byte-byte-Context} + * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-Context} * * @param algorithm The algorithm to be used for encryption. * @param plaintext The content to be encrypted. - * @param iv The initialization vector - * @param authenticationData The authentication data * @param context Additional context that is passed through the Http pipeline during the service call. * @return A {@link EncryptResult} whose {@link EncryptResult#getCipherText() cipher text} contains the encrypted * content. * @throws ResourceNotFoundException if the key cannot be found for encryption. + * @throws UnsupportedOperationException if the encrypt operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code plainText} is null. */ - public EncryptResult encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, byte[] iv, byte[] authenticationData, - Context context) { - return client.encrypt(algorithm, plaintext, context, iv, authenticationData).block(); + public EncryptResult encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, Context context) { + return client.encrypt(algorithm, plaintext, context).block(); } /** @@ -173,44 +137,11 @@ public EncryptResult encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, by * @return The {@link EncryptResult} whose {@link EncryptResult#getCipherText() cipher text} contains the encrypted * content. * @throws ResourceNotFoundException if the key cannot be found for encryption. + * @throws UnsupportedOperationException if the encrypt operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code plainText} is null. */ public EncryptResult encrypt(EncryptionAlgorithm algorithm, byte[] plaintext) { - return encrypt(algorithm, plaintext, null, null, Context.NONE); - } - - /** - * Decrypts a single block of encrypted data using the configured key and specified algorithm. Note that only a - * single block of data may be decrypted, the size of this block is dependent on the target key and the algorithm to - * be used. The decrypt operation is supported for both asymmetric and symmetric keys. This operation requires the - * keys/decrypt permission. - * - *

    The {@link EncryptionAlgorithm encryption algorithm} indicates the type of algorithm to use for decrypting the - * specified encrypted content. Possible values - * for assymetric keys include: {@link EncryptionAlgorithm#RSA1_5 RSA1_5}, {@link EncryptionAlgorithm#RSA_OAEP - * RSA_OAEP} and {@link EncryptionAlgorithm#RSA_OAEP_256 RSA_OAEP_256}. - * Possible values for symmetric keys include: {@link EncryptionAlgorithm#A128CBC A128CBC}, {@link - * EncryptionAlgorithm#A128CBC_HS256 A128CBC-HS256}, - * {@link EncryptionAlgorithm#A192CBC A192CBC}, {@link EncryptionAlgorithm#A192CBC_HS384 A192CBC-HS384}, {@link - * EncryptionAlgorithm#A256CBC A256CBC} and {@link EncryptionAlgorithm#A256CBC_HS512 A256CBC-HS512}

    - * - *

    Code Samples

    - *

    Decrypts the encrypted content. Subscribes to the call asynchronously and prints out the decrypted content - * details when a response has been received.

    - * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte} - * - * @param algorithm The algorithm to be used for decryption. - * @param cipherText The content to be decrypted. - * @param iv The initialization vector. - * @param authenticationData The authentication data. - * @param authenticationTag The authentication tag. - * @return The decrypted blob. - * @throws ResourceNotFoundException if the key cannot be found for decryption. - * @throws NullPointerException if {@code algorithm} or {@code cipherText} is null. - */ - public DecryptResult decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, byte[] iv, byte[] authenticationData, - byte[] authenticationTag) { - return decrypt(algorithm, cipherText, iv, authenticationData, authenticationTag, Context.NONE); + return encrypt(algorithm, plaintext, Context.NONE); } /** @@ -231,21 +162,18 @@ public DecryptResult decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, b *

    Code Samples

    *

    Decrypts the encrypted content. Subscribes to the call asynchronously and prints out the decrypted content * details when a response has been received.

    - * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte-Context} + * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-Context} * * @param algorithm The algorithm to be used for decryption. * @param cipherText The content to be decrypted. - * @param iv The initialization vector. - * @param authenticationData The authentication data. - * @param authenticationTag The authentication tag. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The decrypted blob. * @throws ResourceNotFoundException if the key cannot be found for decryption. + * @throws UnsupportedOperationException if the decrypt operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code cipherText} is null. */ - public DecryptResult decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, byte[] iv, byte[] authenticationData, - byte[] authenticationTag, Context context) { - return client.decrypt(algorithm, cipherText, iv, authenticationData, authenticationTag, context).block(); + public DecryptResult decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, Context context) { + return client.decrypt(algorithm, cipherText, context).block(); } /** @@ -272,10 +200,11 @@ public DecryptResult decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, b * @param cipherText The content to be decrypted. * @return The decrypted blob. * @throws ResourceNotFoundException if the key cannot be found for decryption. + * @throws UnsupportedOperationException if the decrypt operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code cipherText} is null. */ public DecryptResult decrypt(EncryptionAlgorithm algorithm, byte[] cipherText) { - return decrypt(algorithm, cipherText, null, null, null, Context.NONE); + return decrypt(algorithm, cipherText, Context.NONE); } /** @@ -300,6 +229,7 @@ public DecryptResult decrypt(EncryptionAlgorithm algorithm, byte[] cipherText) { * @param context Additional context that is passed through the Http pipeline during the service call. * @return A {@link SignResult} whose {@link SignResult#getSignature() signature} contains the created signature. * @throws ResourceNotFoundException if the key cannot be found for signing. + * @throws UnsupportedOperationException if the sign operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code digest} is null. */ public SignResult sign(SignatureAlgorithm algorithm, byte[] digest, Context context) { @@ -327,6 +257,7 @@ public SignResult sign(SignatureAlgorithm algorithm, byte[] digest, Context cont * @param digest The content from which signature is to be created. * @return A {@link SignResult} whose {@link SignResult#getSignature() signature} contains the created signature. * @throws ResourceNotFoundException if the key cannot be found for signing. + * @throws UnsupportedOperationException if the sign operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code digest} is null. */ public SignResult sign(SignatureAlgorithm algorithm, byte[] digest) { @@ -357,6 +288,7 @@ public SignResult sign(SignatureAlgorithm algorithm, byte[] digest) { * @param signature The signature to be verified. * @return The {@link Boolean} indicating the signature verification result. * @throws ResourceNotFoundException if the key cannot be found for verifying. + * @throws UnsupportedOperationException if the verify operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm}, {@code digest} or {@code signature} is null. */ public VerifyResult verify(SignatureAlgorithm algorithm, byte[] digest, byte[] signature) { @@ -388,6 +320,7 @@ public VerifyResult verify(SignatureAlgorithm algorithm, byte[] digest, byte[] s * @param context Additional context that is passed through the Http pipeline during the service call. * @return The {@link Boolean} indicating the signature verification result. * @throws ResourceNotFoundException if the key cannot be found for verifying. + * @throws UnsupportedOperationException if the verify operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm}, {@code digest} or {@code signature} is null. */ public VerifyResult verify(SignatureAlgorithm algorithm, byte[] digest, byte[] signature, Context context) { @@ -410,12 +343,13 @@ public VerifyResult verify(SignatureAlgorithm algorithm, byte[] digest, byte[] s * * @param algorithm The encryption algorithm to use for wrapping the key. * @param key The key content to be wrapped - * @return The {@link KeyWrapResult} whose {@link KeyWrapResult#getEncryptedKey() encrypted key} contains the wrapped + * @return The {@link WrapResult} whose {@link WrapResult#getEncryptedKey() encrypted key} contains the wrapped * key result. * @throws ResourceNotFoundException if the key cannot be found for wrap operation. + * @throws UnsupportedOperationException if the wrap operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code key} is null. */ - public KeyWrapResult wrapKey(KeyWrapAlgorithm algorithm, byte[] key) { + public WrapResult wrapKey(KeyWrapAlgorithm algorithm, byte[] key) { return wrapKey(algorithm, key, Context.NONE); } @@ -436,12 +370,13 @@ public KeyWrapResult wrapKey(KeyWrapAlgorithm algorithm, byte[] key) { * @param algorithm The encryption algorithm to use for wrapping the key. * @param key The key content to be wrapped * @param context Additional context that is passed through the Http pipeline during the service call. - * @return The {@link KeyWrapResult} whose {@link KeyWrapResult#getEncryptedKey() encrypted key} contains the wrapped + * @return The {@link WrapResult} whose {@link WrapResult#getEncryptedKey() encrypted key} contains the wrapped * key result. * @throws ResourceNotFoundException if the key cannot be found for wrap operation. + * @throws UnsupportedOperationException if the wrap operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code key} is null. */ - public KeyWrapResult wrapKey(KeyWrapAlgorithm algorithm, byte[] key, Context context) { + public WrapResult wrapKey(KeyWrapAlgorithm algorithm, byte[] key, Context context) { return client.wrapKey(algorithm, key, context).block(); } @@ -466,9 +401,10 @@ public KeyWrapResult wrapKey(KeyWrapAlgorithm algorithm, byte[] key, Context con * @param encryptedKey The encrypted key content to unwrap. * @return The unwrapped key content. * @throws ResourceNotFoundException if the key cannot be found for wrap operation. + * @throws UnsupportedOperationException if the unwrap operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code encryptedKey} is null. */ - public KeyUnwrapResult unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey) { + public UnwrapResult unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey) { return unwrapKey(algorithm, encryptedKey, Context.NONE); } @@ -495,9 +431,10 @@ public KeyUnwrapResult unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey * @param context Additional context that is passed through the Http pipeline during the service call. * @return The unwrapped key content. * @throws ResourceNotFoundException if the key cannot be found for wrap operation. + * @throws UnsupportedOperationException if the unwrap operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code encryptedKey} is null. */ - public KeyUnwrapResult unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context) { + public UnwrapResult unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context) { return client.unwrapKey(algorithm, encryptedKey, context).block(); } @@ -522,6 +459,7 @@ public KeyUnwrapResult unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey * @param data The content from which signature is to be created. * @return A {@link SignResult} whose {@link SignResult#getSignature() signature} contains the created signature. * @throws ResourceNotFoundException if the key cannot be found for signing. + * @throws UnsupportedOperationException if the sign operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code data} is null. */ public SignResult signData(SignatureAlgorithm algorithm, byte[] data) { @@ -551,6 +489,7 @@ public SignResult signData(SignatureAlgorithm algorithm, byte[] data) { * @param context Additional context that is passed through the Http pipeline during the service call. * @return A {@link SignResult} whose {@link SignResult#getSignature() signature} contains the created signature. * @throws ResourceNotFoundException if the key cannot be found for signing. + * @throws UnsupportedOperationException if the sign operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm} or {@code data} is null. */ public SignResult signData(SignatureAlgorithm algorithm, byte[] data, Context context) { @@ -581,6 +520,7 @@ public SignResult signData(SignatureAlgorithm algorithm, byte[] data, Context co * @param signature The signature to be verified. * @return The {@link Boolean} indicating the signature verification result. * @throws ResourceNotFoundException if the key cannot be found for verifying. + * @throws UnsupportedOperationException if the verify operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm}, {@code data} or {@code signature} is null. */ public VerifyResult verifyData(SignatureAlgorithm algorithm, byte[] data, byte[] signature) { @@ -612,6 +552,7 @@ public VerifyResult verifyData(SignatureAlgorithm algorithm, byte[] data, byte[] * @param context Additional context that is passed through the Http pipeline during the service call. * @return The {@link Boolean} indicating the signature verification result. * @throws ResourceNotFoundException if the key cannot be found for verifying. + * @throws UnsupportedOperationException if the verify operation is not supported or configured on the key. * @throws NullPointerException if {@code algorithm}, {@code data} or {@code signature} is null. */ public VerifyResult verifyData(SignatureAlgorithm algorithm, byte[] data, byte[] signature, Context context) { diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientBuilder.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientBuilder.java index 0dd286c3de88..a6278a600839 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientBuilder.java @@ -17,9 +17,9 @@ import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.security.keyvault.keys.KeyVaultCredentialPolicy; +import com.azure.security.keyvault.keys.implementation.KeyVaultCredentialPolicy; import com.azure.security.keyvault.keys.implementation.AzureKeyVaultConfiguration; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; +import com.azure.security.keyvault.keys.models.JsonWebKey; import java.util.ArrayList; import java.util.List; @@ -61,7 +61,7 @@ * @see CryptographyClient */ @ServiceClientBuilder(serviceClients = CryptographyClient.class) -public class CryptographyClientBuilder { +public final class CryptographyClientBuilder { final List policies; private final ClientLogger logger = new ClientLogger(CryptographyClientBuilder.class); private TokenCredential credential; @@ -88,19 +88,16 @@ public CryptographyClientBuilder() { * Every time {@code buildClient()} is called, a new instance of {@link CryptographyClient} is created. * *

    If {@link CryptographyClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and - * ({@link CryptographyClientBuilder#keyIdentifier(String) jsonWebKey identifier} or {@link - * CryptographyClientBuilder#jsonWebKey(JsonWebKey) json web jsonWebKey}) - * are used to create the {@link CryptographyClient client}. All other builder settings are ignored. If + * ({@link CryptographyClientBuilder#keyIdentifier(String) jsonWebKey identifier} + * are used to create the {@link CryptographyClient client}. All other builder settings are ignored. If * {@code pipeline} is not set, then * ({@link CryptographyClientBuilder#credential(TokenCredential) jsonWebKey vault credential} and - * ({@link CryptographyClientBuilder#keyIdentifier(String) jsonWebKey identifier} or {@link - * CryptographyClientBuilder#jsonWebKey(JsonWebKey) json web jsonWebKey}) are required to build the + * ({@link CryptographyClientBuilder#keyIdentifier(String) jsonWebKey identifier} are required to build the * {@link CryptographyClient client}.

    * * @return A {@link CryptographyClient} with the options set from the builder. * @throws IllegalStateException If {@link CryptographyClientBuilder#credential(TokenCredential)} or - * either of ({@link CryptographyClientBuilder#keyIdentifier(String)} or {@link - * CryptographyClientBuilder#jsonWebKey(JsonWebKey)} have not been set. + * either of ({@link CryptographyClientBuilder#keyIdentifier(String)} have not been set. */ public CryptographyClient buildClient() { return new CryptographyClient(buildAsyncClient()); @@ -110,19 +107,16 @@ public CryptographyClient buildClient() { * Every time {@code buildAsyncClient()} is called, a new instance of {@link CryptographyAsyncClient} is created. * *

    If {@link CryptographyClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and - * ({@link CryptographyClientBuilder#keyIdentifier(String) jsonWebKey identifier} or {@link - * CryptographyClientBuilder#jsonWebKey(JsonWebKey) json web jsonWebKey}) + * ({@link CryptographyClientBuilder#keyIdentifier(String) jsonWebKey identifier}) * are used to create the {@link CryptographyAsyncClient async client}. All other builder settings are ignored. If * {@code pipeline} is not set, then * ({@link CryptographyClientBuilder#credential(TokenCredential) jsonWebKey vault credential} and - * ({@link CryptographyClientBuilder#keyIdentifier(String) jsonWebKey identifier} or {@link - * CryptographyClientBuilder#jsonWebKey(JsonWebKey) json web jsonWebKey}) are required to build the + * ({@link CryptographyClientBuilder#keyIdentifier(String) jsonWebKey identifier} are required to build the * {@link CryptographyAsyncClient async client}.

    * * @return A {@link CryptographyAsyncClient} with the options set from the builder. * @throws IllegalStateException If {@link CryptographyClientBuilder#credential(TokenCredential)} or - * either of ({@link CryptographyClientBuilder#keyIdentifier(String)} or {@link - * CryptographyClientBuilder#jsonWebKey(JsonWebKey)} have not been set. + * ({@link CryptographyClientBuilder#keyIdentifier(String)} have not been set. */ public CryptographyAsyncClient buildAsyncClient() { if (jsonWebKey == null && Strings.isNullOrEmpty(keyId)) { @@ -200,20 +194,6 @@ public CryptographyClientBuilder keyIdentifier(String keyId) { return this; } - /** - * Sets the jsonWebKey to be used for cryptography operations. - * - *

    If {@code jsonWebKey} is provided then it takes precedence over key identifier and gets used for cryptography - * operations.

    - * - * @param jsonWebKey The Json web jsonWebKey to be used for cryptography operations. - * @return the updated builder object. - */ - public CryptographyClientBuilder jsonWebKey(JsonWebKey jsonWebKey) { - this.jsonWebKey = jsonWebKey; - return this; - } - /** * Sets the credential to use when authenticating HTTP requests. * diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyService.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyService.java index 2f4b61371b95..c8943ae83226 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyService.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyService.java @@ -19,7 +19,7 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.UnexpectedResponseExceptionType; import com.azure.core.util.Context; -import com.azure.security.keyvault.keys.models.Key; +import com.azure.security.keyvault.keys.models.KeyVaultKey; import reactor.core.publisher.Mono; /** @@ -123,11 +123,11 @@ Mono> unwrapKey(@HostParam("url") String url, @UnexpectedResponseExceptionType(code = {404}, value = ResourceNotFoundException.class) @UnexpectedResponseExceptionType(code = {403}, value = ResourceModifiedException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> getKey(@HostParam("url") String url, - @PathParam("key-name") String keyName, - @PathParam("key-version") String keyVersion, - @QueryParam("api-version") String apiVersion, - @HeaderParam("accept-language") String acceptLanguage, - @HeaderParam("Content-Type") String type, - Context context); + Mono> getKey(@HostParam("url") String url, + @PathParam("key-name") String keyName, + @PathParam("key-version") String keyVersion, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @HeaderParam("Content-Type") String type, + Context context); } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyServiceClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyServiceClient.java index 66345b7489ba..5c6f6eea0494 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyServiceClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyServiceClient.java @@ -9,13 +9,13 @@ import com.azure.security.keyvault.keys.cryptography.models.DecryptResult; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.EncryptResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyUnwrapResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyWrapResult; +import com.azure.security.keyvault.keys.cryptography.models.UnwrapResult; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignResult; import com.azure.security.keyvault.keys.cryptography.models.VerifyResult; -import com.azure.security.keyvault.keys.models.Key; +import com.azure.security.keyvault.keys.cryptography.models.WrapResult; +import com.azure.security.keyvault.keys.models.KeyVaultKey; import reactor.core.publisher.Mono; import java.net.MalformedURLException; @@ -31,34 +31,27 @@ class CryptographyServiceClient { private final ClientLogger logger = new ClientLogger(CryptographyServiceClient.class); private final CryptographyService service; - private String endpoint; + private String vaultUrl; private String version; private String keyName; - - /* - * Creates a CryptographyServiceClient that uses {@code service} to service requests - * - * @param service the service to use for cryptography operations. - */ - CryptographyServiceClient(CryptographyService service) { - this.service = service; - } + private final String keyId; CryptographyServiceClient(String keyId, CryptographyService service) { Objects.requireNonNull(keyId); unpackId(keyId); + this.keyId = keyId; this.service = service; } - Mono> getKey(Context context) { + Mono> getKey(Context context) { if (version == null) { version = ""; } return getKey(keyName, version, context); } - private Mono> getKey(String name, String version, Context context) { - return service.getKey(endpoint, name, version, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + private Mono> getKey(String name, String version, Context context) { + return service.getKey(vaultUrl, name, version, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Retrieving key - {}", name)) .doOnSuccess(response -> logger.info("Retrieved key - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to get key - {}", name, error)); @@ -67,7 +60,7 @@ private Mono> getKey(String name, String version, Context context) Mono encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, Context context) { KeyOperationParameters parameters = new KeyOperationParameters().setAlgorithm(algorithm).setValue(plaintext); - return service.encrypt(endpoint, keyName, version, API_VERSION, ACCEPT_LANGUAGE, parameters, + return service.encrypt(vaultUrl, keyName, version, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Encrypting content with algorithm - {}", algorithm.toString())) .doOnSuccess(response -> logger.info("Retrieved encrypted content with algorithm- {}", @@ -75,12 +68,12 @@ Mono encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, Con .doOnError(error -> logger.warning("Failed to encrypt content with algorithm - {}", algorithm.toString(), error)) .flatMap(keyOperationResultResponse -> - Mono.just(new EncryptResult(keyOperationResultResponse.getValue().getResult(), null, algorithm))); + Mono.just(new EncryptResult(keyOperationResultResponse.getValue().getResult(), algorithm, keyId))); } Mono decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, Context context) { KeyOperationParameters parameters = new KeyOperationParameters().setAlgorithm(algorithm).setValue(cipherText); - return service.decrypt(endpoint, keyName, version, API_VERSION, ACCEPT_LANGUAGE, parameters, + return service.decrypt(vaultUrl, keyName, version, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Decrypting content with algorithm - {}", algorithm.toString())) .doOnSuccess(response -> logger.info("Retrieved decrypted content with algorithm- {}", @@ -88,38 +81,38 @@ Mono decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, Co .doOnError(error -> logger.warning("Failed to decrypt content with algorithm - {}", algorithm.toString(), error)) .flatMap(keyOperationResultResponse -> Mono.just( - new DecryptResult(keyOperationResultResponse.getValue().getResult()))); + new DecryptResult(keyOperationResultResponse.getValue().getResult(), algorithm, keyId))); } Mono sign(SignatureAlgorithm algorithm, byte[] digest, Context context) { KeySignRequest parameters = new KeySignRequest().setAlgorithm(algorithm).setValue(digest); - return service.sign(endpoint, keyName, version, API_VERSION, ACCEPT_LANGUAGE, parameters, + return service.sign(vaultUrl, keyName, version, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Signing content with algorithm - {}", algorithm.toString())) .doOnSuccess(response -> logger.info("Retrieved signed content with algorithm- {}", algorithm.toString())) .doOnError(error -> logger.warning("Failed to sign content with algorithm - {}", algorithm.toString(), error)) .flatMap(keyOperationResultResponse -> - Mono.just(new SignResult(keyOperationResultResponse.getValue().getResult(), algorithm))); + Mono.just(new SignResult(keyOperationResultResponse.getValue().getResult(), algorithm, keyId))); } Mono verify(SignatureAlgorithm algorithm, byte[] digest, byte[] signature, Context context) { KeyVerifyRequest parameters = new KeyVerifyRequest().setAlgorithm(algorithm).setDigest(digest).setSignature(signature); - return service.verify(endpoint, keyName, version, API_VERSION, ACCEPT_LANGUAGE, parameters, + return service.verify(vaultUrl, keyName, version, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Verifying content with algorithm - {}", algorithm.toString())) .doOnSuccess(response -> logger.info("Retrieved verified content with algorithm- {}", algorithm.toString())) .doOnError(error -> logger.warning("Failed to verify content with algorithm - {}", algorithm.toString(), error)) .flatMap(response -> - Mono.just(new VerifyResult(response.getValue().getValue()))); + Mono.just(new VerifyResult(response.getValue().getValue(), algorithm, keyId))); } - Mono wrapKey(KeyWrapAlgorithm algorithm, byte[] key, Context context) { + Mono wrapKey(KeyWrapAlgorithm algorithm, byte[] key, Context context) { KeyWrapUnwrapRequest parameters = new KeyWrapUnwrapRequest().setAlgorithm(algorithm).setValue(key); - return service.wrapKey(endpoint, keyName, version, API_VERSION, ACCEPT_LANGUAGE, parameters, + return service.wrapKey(vaultUrl, keyName, version, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Wrapping key content with algorithm - {}", algorithm.toString())) .doOnSuccess(response -> logger.info("Retrieved wrapped key content with algorithm- {}", @@ -127,13 +120,13 @@ Mono wrapKey(KeyWrapAlgorithm algorithm, byte[] key, Context cont .doOnError(error -> logger.warning("Failed to verify content with algorithm - {}", algorithm.toString(), error)) .flatMap(keyOperationResultResponse -> - Mono.just(new KeyWrapResult(keyOperationResultResponse.getValue().getResult(), algorithm))); + Mono.just(new WrapResult(keyOperationResultResponse.getValue().getResult(), algorithm, keyId))); } - Mono unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context) { + Mono unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context) { KeyWrapUnwrapRequest parameters = new KeyWrapUnwrapRequest().setAlgorithm(algorithm).setValue(encryptedKey); - return service.unwrapKey(endpoint, keyName, version, API_VERSION, ACCEPT_LANGUAGE, parameters, + return service.unwrapKey(vaultUrl, keyName, version, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Unwrapping key content with algorithm - {}", algorithm.toString())) .doOnSuccess(response -> logger.info("Retrieved unwrapped key content with algorithm- {}", @@ -141,7 +134,7 @@ Mono unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey, .doOnError(error -> logger.warning("Failed to unwrap key content with algorithm - {}", algorithm.toString(), error)) .flatMap(response -> - Mono.just(new KeyUnwrapResult(response.getValue().getResult()))); + Mono.just(new UnwrapResult(response.getValue().getResult(), algorithm, keyId))); } @@ -175,7 +168,7 @@ private void unpackId(String keyId) { try { URL url = new URL(keyId); String[] tokens = url.getPath().split("/"); - this.endpoint = url.getProtocol() + "://" + url.getHost(); + this.vaultUrl = url.getProtocol() + "://" + url.getHost(); this.keyName = (tokens.length >= 3 ? tokens[2] : null); this.version = (tokens.length >= 4 ? tokens[3] : null); } catch (MalformedURLException e) { diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/EcKeyCryptographyClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/EcKeyCryptographyClient.java index 087f090ea44d..10119b94b6ec 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/EcKeyCryptographyClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/EcKeyCryptographyClient.java @@ -8,13 +8,13 @@ import com.azure.security.keyvault.keys.cryptography.models.DecryptResult; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.EncryptResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyUnwrapResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyWrapResult; +import com.azure.security.keyvault.keys.cryptography.models.UnwrapResult; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignResult; import com.azure.security.keyvault.keys.cryptography.models.VerifyResult; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; +import com.azure.security.keyvault.keys.cryptography.models.WrapResult; +import com.azure.security.keyvault.keys.models.JsonWebKey; import reactor.core.publisher.Mono; import java.security.KeyPair; @@ -44,27 +44,25 @@ class EcKeyCryptographyClient extends LocalKeyCryptographyClient { EcKeyCryptographyClient(JsonWebKey key, CryptographyServiceClient serviceClient) { super(serviceClient); this.provider = Security.getProvider("SunEC"); - this.keyPair = key.toEC(key.hasPrivateKey(), provider); + this.keyPair = key.toEc(key.hasPrivateKey(), provider); this.serviceClient = serviceClient; } private KeyPair getKeyPair(JsonWebKey key) { if (keyPair == null) { - keyPair = key.toEC(key.hasPrivateKey()); + keyPair = key.toEc(key.hasPrivateKey()); } return keyPair; } @Override - Mono encryptAsync(EncryptionAlgorithm algorithm, byte[] plaintext, byte[] iv, - byte[] authenticationData, Context context, JsonWebKey key) { + Mono encryptAsync(EncryptionAlgorithm algorithm, byte[] plaintext, Context context, JsonWebKey key) { throw logger.logExceptionAsError(new UnsupportedOperationException( "Encrypt operation is not supported for EC key")); } @Override - Mono decryptAsync(EncryptionAlgorithm algorithm, byte[] cipherText, byte[] iv, - byte[] authenticationData, byte[] authenticationTag, Context context, + Mono decryptAsync(EncryptionAlgorithm algorithm, byte[] cipherText, Context context, JsonWebKey key) { throw logger.logExceptionAsError(new UnsupportedOperationException( "Decrypt operation is not supported for EC key")); @@ -104,7 +102,7 @@ Mono signAsync(SignatureAlgorithm algorithm, byte[] digest, Context ISignatureTransform signer = algo.createSignatureTransform(keyPair, provider); try { - return Mono.just(new SignResult(signer.sign(digest), algorithm)); + return Mono.just(new SignResult(signer.sign(digest), algorithm, key.getId())); } catch (Exception e) { return Mono.error(e); } @@ -146,20 +144,20 @@ Mono verifyAsync(SignatureAlgorithm algorithm, byte[] digest, byte ISignatureTransform signer = algo.createSignatureTransform(keyPair, provider); try { - return Mono.just(new VerifyResult(signer.verify(digest, signature))); + return Mono.just(new VerifyResult(signer.verify(digest, signature), algorithm, key.getId())); } catch (Exception e) { return Mono.error(e); } } @Override - Mono wrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] key, Context context, JsonWebKey webKey) { + Mono wrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] key, Context context, JsonWebKey webKey) { return Mono.error(new UnsupportedOperationException("Wrap key operation is not supported for EC key")); } @Override - Mono unwrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context, - JsonWebKey key) { + Mono unwrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context, + JsonWebKey key) { throw logger.logExceptionAsError(new UnsupportedOperationException( "Unwrap key operation is not supported for Ec key")); } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyAsyncClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyAsyncClient.java index c9b59d886e95..b04922192a60 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyAsyncClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyAsyncClient.java @@ -35,7 +35,7 @@ public final class KeyEncryptionKeyAsyncClient extends CryptographyAsyncClient i @Override public Mono getKeyId() { try { - return Mono.just(key.getKid()); + return Mono.just(key.getId()); } catch (RuntimeException ex) { return monoError(logger, ex); } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClientBuilder.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClientBuilder.java index 3fe0b035143a..f701f5278f34 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClientBuilder.java @@ -45,18 +45,31 @@ * @see KeyEncryptionKeyClient */ @ServiceClientBuilder(serviceClients = {KeyEncryptionKeyClient.class, KeyEncryptionKeyAsyncClient.class}) -public final class KeyEncryptionKeyClientBuilder extends CryptographyClientBuilder implements KeyEncryptionKeyResolver, AsyncKeyEncryptionKeyResolver { +public final class KeyEncryptionKeyClientBuilder implements KeyEncryptionKeyResolver, AsyncKeyEncryptionKeyResolver { private final ClientLogger logger = new ClientLogger(KeyEncryptionKeyClientBuilder.class); + private final CryptographyClientBuilder builder; /** * The constructor with defaults. */ public KeyEncryptionKeyClientBuilder() { - super(); + builder = new CryptographyClientBuilder(); } /** - * {@inheritDoc} + * Creates a {@link KeyEncryptionKey} based on options set in the builder. + * Every time {@code buildKeyEncryptionKey(String)} is called, a new instance of {@link KeyEncryptionKey} + * is created. + * + *

    If {@link KeyEncryptionKeyClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} + * and {@code keyId} are used to create the {@link KeyEncryptionKeyClient client}. + * All other builder settings are ignored. If {@code pipeline} is not set, then + * {@link KeyEncryptionKeyClientBuilder#credential(TokenCredential) vault credential} and {@code keyId} + * are required to build the {@link KeyEncryptionKeyClient client}.

    + * + * @return A {@link KeyEncryptionKeyClient} with the options set from the builder. + * @throws IllegalStateException If {@link KeyEncryptionKeyClientBuilder#credential(TokenCredential)} or + * {@code keyId} have not been set. */ @Override public KeyEncryptionKey buildKeyEncryptionKey(String keyId) { @@ -64,89 +77,133 @@ public KeyEncryptionKey buildKeyEncryptionKey(String keyId) { } /** - * {@inheritDoc} + * Creates a {@link KeyEncryptionKeyAsyncClient} based on options set in the builder. + * Every time {@code buildAsyncKeyEncryptionKey(String)} is called, a new instance of + * {@link KeyEncryptionKeyAsyncClient} is created. + * + *

    If {@link KeyEncryptionKeyClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} + * and {@code keyId} are used to create the {@link KeyEncryptionKeyAsyncClient async client}. + * All other builder settings are ignored. If {@code pipeline} is not set, then + * ({@link KeyEncryptionKeyClientBuilder#credential(TokenCredential) jsonWebKey vault credential} and + * {@code keyId} are required to build the {@link KeyEncryptionKeyAsyncClient async client}.

    + * + * @return A {@link KeyEncryptionKeyAsyncClient} with the options set from the builder. + * @throws IllegalStateException If {@link KeyEncryptionKeyClientBuilder#credential(TokenCredential)} or + * {@code keyId} have not been set. */ @Override public Mono buildAsyncKeyEncryptionKey(String keyId) { - this.keyIdentifier(keyId); + builder.keyIdentifier(keyId); if (Strings.isNullOrEmpty(keyId)) { throw logger.logExceptionAsError(new IllegalStateException( "Json Web Key or jsonWebKey identifier are required to create key encryption key async client")); } - CryptographyServiceVersion serviceVersion = this.getServiceVersion() != null ? this.getServiceVersion() : CryptographyServiceVersion.getLatest(); + CryptographyServiceVersion serviceVersion = builder.getServiceVersion() != null ? builder.getServiceVersion() : CryptographyServiceVersion.getLatest(); - if (this.getPipeline() != null) { - return Mono.defer(() -> Mono.just(new KeyEncryptionKeyAsyncClient(keyId, this.getPipeline(), serviceVersion))); + if (builder.getPipeline() != null) { + return Mono.defer(() -> Mono.just(new KeyEncryptionKeyAsyncClient(keyId, builder.getPipeline(), serviceVersion))); } - if (this.getCredential() == null) { + if (builder.getCredential() == null) { throw logger.logExceptionAsError(new IllegalStateException( "Key Vault credentials are required to build the key encryption key async client")); } - HttpPipeline pipeline = setupPipeline(serviceVersion); + HttpPipeline pipeline = builder.setupPipeline(serviceVersion); return Mono.defer(() -> Mono.just(new KeyEncryptionKeyAsyncClient(keyId, pipeline, serviceVersion))); } /** - * {@inheritDoc} + * Sets the credential to use when authenticating HTTP requests. + * + * @param credential The credential to use for authenticating HTTP requests. + * @return the updated builder object. + * @throws NullPointerException if {@code credential} is {@code null}. */ - @Override public KeyEncryptionKeyClientBuilder credential(TokenCredential credential) { - super.credential(credential); + builder.credential(credential); return this; } /** - * {@inheritDoc} + * Sets the logging configuration for HTTP requests and responses. + * + *

    If logLevel is not provided, default value of {@link HttpLogDetailLevel#NONE} is set.

    + * + * @param logOptions The logging configuration to use when sending and receiving HTTP requests/responses. + * @return the updated builder object. */ - @Override public KeyEncryptionKeyClientBuilder httpLogOptions(HttpLogOptions logOptions) { - super.httpLogOptions(logOptions); + builder.httpLogOptions(logOptions); return this; } /** - * {@inheritDoc} + * Adds a policy to the set of existing policies that are executed after the client required policies. + * + * @param policy The {@link HttpPipelinePolicy policy} to be added. + * @return the updated builder object. + * @throws NullPointerException if {@code policy} is {@code null}. */ - @Override public KeyEncryptionKeyClientBuilder addPolicy(HttpPipelinePolicy policy) { - super.addPolicy(policy); + builder.addPolicy(policy); return this; } /** - * {@inheritDoc} + * Sets the HTTP client to use for sending and receiving requests to and from the service. + * + * @param client The HTTP client to use for requests. + * @return the updated builder object. + * @throws NullPointerException If {@code client} is {@code null}. */ public KeyEncryptionKeyClientBuilder httpClient(HttpClient client) { - super.httpClient(client); + builder.httpClient(client); return this; } /** - * {@inheritDoc} + * Sets the HTTP pipeline to use for the service client. + * + * If {@code pipeline} is set, all other settings are ignored, aside from jsonWebKey identifier + * or jsonWebKey to build the clients. + * + * @param pipeline The HTTP pipeline to use for sending service requests and receiving responses. + * @return the updated builder object. */ public KeyEncryptionKeyClientBuilder pipeline(HttpPipeline pipeline) { - super.pipeline(pipeline); + builder.pipeline(pipeline); return this; } /** - * {@inheritDoc} + * Sets the configuration store that is used during construction of the service client. + * + * The default configuration store is a clone of the {@link Configuration#getGlobalConfiguration() global + * configuration store}, use {@link Configuration#NONE} to bypass using configuration settings during construction. + * + * @param configuration The configuration store used to + * @return the updated builder object. */ - @Override public KeyEncryptionKeyClientBuilder configuration(Configuration configuration) { - super.configuration(configuration); + builder.configuration(configuration); return this; } + /** - * {@inheritDoc} + * Sets the {@link CryptographyServiceVersion} that is used when making API requests. + *

    + * If a service version is not provided, the service version that will be used will be the latest known service + * version based on the version of the client library being used. If no service version is specified, updating to a + * newer version the client library will have the result of potentially moving to a newer service version. + * + * @param version {@link CryptographyServiceVersion} of the service to be used when making requests. + * @return The updated builder object. */ - @Override public KeyEncryptionKeyClientBuilder serviceVersion(CryptographyServiceVersion version) { - super.serviceVersion(version); + builder.serviceVersion(version); return this; } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/LocalKeyCryptographyClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/LocalKeyCryptographyClient.java index adc2255f8e51..a38f935b7c0b 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/LocalKeyCryptographyClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/LocalKeyCryptographyClient.java @@ -7,13 +7,13 @@ import com.azure.security.keyvault.keys.cryptography.models.DecryptResult; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.EncryptResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyUnwrapResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyWrapResult; +import com.azure.security.keyvault.keys.cryptography.models.UnwrapResult; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignResult; import com.azure.security.keyvault.keys.cryptography.models.VerifyResult; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; +import com.azure.security.keyvault.keys.cryptography.models.WrapResult; +import com.azure.security.keyvault.keys.models.JsonWebKey; import reactor.core.publisher.Mono; abstract class LocalKeyCryptographyClient { @@ -27,11 +27,9 @@ abstract class LocalKeyCryptographyClient { this.serviceClient = serviceClient; } - abstract Mono encryptAsync(EncryptionAlgorithm algorithm, byte[] plaintext, byte[] iv, - byte[] authenticationData, Context context, JsonWebKey jsonWebKey); + abstract Mono encryptAsync(EncryptionAlgorithm algorithm, byte[] plaintext, Context context, JsonWebKey jsonWebKey); - abstract Mono decryptAsync(EncryptionAlgorithm algorithm, byte[] cipherText, byte[] iv, - byte[] authenticationData, byte[] authenticationTag, Context context, + abstract Mono decryptAsync(EncryptionAlgorithm algorithm, byte[] cipherText, Context context, JsonWebKey jsonWebKey); abstract Mono signAsync(SignatureAlgorithm algorithm, byte[] digest, Context context, JsonWebKey key); @@ -39,11 +37,11 @@ abstract Mono decryptAsync(EncryptionAlgorithm algorithm, byte[] abstract Mono verifyAsync(SignatureAlgorithm algorithm, byte[] digest, byte[] signature, Context context, JsonWebKey key); - abstract Mono wrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] key, Context context, - JsonWebKey jsonWebKey); + abstract Mono wrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] key, Context context, + JsonWebKey jsonWebKey); - abstract Mono unwrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context, - JsonWebKey jsonWebKey); + abstract Mono unwrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context, + JsonWebKey jsonWebKey); abstract Mono signDataAsync(SignatureAlgorithm algorithm, byte[] data, Context context, JsonWebKey key); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/RsaKeyCryptographyClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/RsaKeyCryptographyClient.java index 5671b1094053..c4424340cb02 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/RsaKeyCryptographyClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/RsaKeyCryptographyClient.java @@ -7,13 +7,13 @@ import com.azure.security.keyvault.keys.cryptography.models.DecryptResult; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.EncryptResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyUnwrapResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyWrapResult; +import com.azure.security.keyvault.keys.cryptography.models.UnwrapResult; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignResult; import com.azure.security.keyvault.keys.cryptography.models.VerifyResult; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; +import com.azure.security.keyvault.keys.cryptography.models.WrapResult; +import com.azure.security.keyvault.keys.models.JsonWebKey; import reactor.core.publisher.Mono; import javax.crypto.BadPaddingException; @@ -38,26 +38,21 @@ class RsaKeyCryptographyClient extends LocalKeyCryptographyClient { RsaKeyCryptographyClient(JsonWebKey key, CryptographyServiceClient serviceClient) { super(serviceClient); - keyPair = key.toRSA(key.hasPrivateKey()); + keyPair = key.toRsa(key.hasPrivateKey()); } private KeyPair getKeyPair(JsonWebKey key) { if (keyPair == null) { - keyPair = key.toRSA(key.hasPrivateKey()); + keyPair = key.toRsa(key.hasPrivateKey()); } return keyPair; } @Override - Mono encryptAsync(EncryptionAlgorithm algorithm, byte[] plaintext, byte[] iv, - byte[] authenticationData, Context context, JsonWebKey jsonWebKey) { + Mono encryptAsync(EncryptionAlgorithm algorithm, byte[] plaintext, Context context, + JsonWebKey jsonWebKey) { keyPair = getKeyPair(jsonWebKey); - if (iv != null || authenticationData != null) { - Mono.error(new IllegalArgumentException( - "iv and authenticationData parameters are not allowed for Rsa encrypt operation")); - } - // Interpret the requested algorithm Algorithm baseAlgorithm = AlgorithmResolver.Default.get(algorithm.toString()); @@ -84,7 +79,7 @@ Mono encryptAsync(EncryptionAlgorithm algorithm, byte[] plaintext try { transform = algo.createEncryptor(keyPair); - return Mono.just(new EncryptResult(transform.doFinal(plaintext), (byte[]) null, algorithm)); + return Mono.just(new EncryptResult(transform.doFinal(plaintext), algorithm, jsonWebKey.getId())); } catch (InvalidKeyException | NoSuchAlgorithmException | NoSuchPaddingException @@ -95,15 +90,9 @@ Mono encryptAsync(EncryptionAlgorithm algorithm, byte[] plaintext } @Override - Mono decryptAsync(EncryptionAlgorithm algorithm, byte[] cipherText, byte[] iv, - byte[] authenticationData, byte[] authenticationTag, Context context, + Mono decryptAsync(EncryptionAlgorithm algorithm, byte[] cipherText, Context context, JsonWebKey jsonWebKey) { - if (iv != null || authenticationData != null || authenticationTag != null) { - return Mono.error(new IllegalArgumentException( - "iv, authenticationData and authenticationTag parameters are not supported for Rsa decrypt operation")); - } - keyPair = getKeyPair(jsonWebKey); Algorithm baseAlgorithm = AlgorithmResolver.Default.get(algorithm.toString()); @@ -131,7 +120,7 @@ Mono decryptAsync(EncryptionAlgorithm algorithm, byte[] cipherTex try { transform = algo.createDecryptor(keyPair); - return Mono.just(new DecryptResult(transform.doFinal(cipherText))); + return Mono.just(new DecryptResult(transform.doFinal(cipherText), algorithm, jsonWebKey.getId())); } catch (InvalidKeyException | NoSuchAlgorithmException | NoSuchPaddingException @@ -156,7 +145,7 @@ Mono verifyAsync(SignatureAlgorithm algorithm, byte[] digest, byte } @Override - Mono wrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] key, Context context, JsonWebKey jsonWebKey) { + Mono wrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] key, Context context, JsonWebKey jsonWebKey) { keyPair = getKeyPair(jsonWebKey); @@ -185,7 +174,7 @@ Mono wrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] key, Context try { transform = algo.createEncryptor(keyPair); - return Mono.just(new KeyWrapResult(transform.doFinal(key), algorithm)); + return Mono.just(new WrapResult(transform.doFinal(key), algorithm, jsonWebKey.getId())); } catch (InvalidKeyException | NoSuchAlgorithmException | NoSuchPaddingException @@ -196,8 +185,8 @@ Mono wrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] key, Context } @Override - Mono unwrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context, - JsonWebKey jsonWebKey) { + Mono unwrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context, + JsonWebKey jsonWebKey) { keyPair = getKeyPair(jsonWebKey); @@ -227,7 +216,7 @@ Mono unwrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] encrypte try { transform = algo.createDecryptor(keyPair); - return Mono.just(new KeyUnwrapResult(transform.doFinal(encryptedKey))); + return Mono.just(new UnwrapResult(transform.doFinal(encryptedKey), algorithm, jsonWebKey.getId())); } catch (InvalidKeyException | NoSuchAlgorithmException | NoSuchPaddingException diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SymmetricKeyCryptographyClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SymmetricKeyCryptographyClient.java index f45c964ca4c4..8f0143869260 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SymmetricKeyCryptographyClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SymmetricKeyCryptographyClient.java @@ -8,13 +8,13 @@ import com.azure.security.keyvault.keys.cryptography.models.DecryptResult; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.EncryptResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyUnwrapResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyWrapResult; +import com.azure.security.keyvault.keys.cryptography.models.UnwrapResult; +import com.azure.security.keyvault.keys.cryptography.models.WrapResult; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignResult; import com.azure.security.keyvault.keys.cryptography.models.VerifyResult; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; +import com.azure.security.keyvault.keys.models.JsonWebKey; import reactor.core.publisher.Mono; import java.security.NoSuchAlgorithmException; @@ -46,75 +46,14 @@ private byte[] getKey(JsonWebKey key) { } @Override - Mono encryptAsync(EncryptionAlgorithm algorithm, byte[] plaintext, byte[] iv, - byte[] authenticationData, Context context, JsonWebKey jsonWebKey) { - key = getKey(jsonWebKey); - - Algorithm baseAlgorithm = AlgorithmResolver.Default.get(algorithm.toString()); - - if (baseAlgorithm == null || !(baseAlgorithm instanceof SymmetricEncryptionAlgorithm)) { - return Mono.error(new NoSuchAlgorithmException(algorithm.toString())); - } - - SymmetricEncryptionAlgorithm algo = (SymmetricEncryptionAlgorithm) baseAlgorithm; - - ICryptoTransform transform; - - try { - transform = algo.createEncryptor(key, iv, authenticationData); - } catch (Exception e) { - return Mono.error(e); - } - - byte[] cipherText; - - try { - cipherText = transform.doFinal(plaintext); - } catch (Exception e) { - return Mono.error(e); - } - - byte[] authenticationTag = null; - - if (transform instanceof IAuthenticatedCryptoTransform) { - - IAuthenticatedCryptoTransform authenticatedTransform = (IAuthenticatedCryptoTransform) transform; - - authenticationTag = authenticatedTransform.getTag().clone(); - } - - return Mono.just(new EncryptResult(cipherText, authenticationTag, algorithm)); + Mono encryptAsync(EncryptionAlgorithm algorithm, byte[] plaintext, Context context, JsonWebKey jsonWebKey) { + return Mono.error(new UnsupportedOperationException("encrypt operation not supported for AES/OCT/Symmetric key")); } @Override - Mono decryptAsync(EncryptionAlgorithm algorithm, byte[] cipherText, byte[] iv, - byte[] authenticationData, byte[] authenticationTag, Context context, + Mono decryptAsync(EncryptionAlgorithm algorithm, byte[] cipherText, Context context, JsonWebKey jsonWebKey) { - - key = getKey(jsonWebKey); - - // Interpret the algorithm - Algorithm baseAlgorithm = AlgorithmResolver.Default.get(algorithm.toString()); - - if (baseAlgorithm == null || !(baseAlgorithm instanceof SymmetricEncryptionAlgorithm)) { - return Mono.error(new NoSuchAlgorithmException(algorithm.toString())); - } - - SymmetricEncryptionAlgorithm algo = (SymmetricEncryptionAlgorithm) baseAlgorithm; - - ICryptoTransform transform; - - try { - transform = algo.createDecryptor(key, iv, authenticationData, authenticationTag); - } catch (Exception e) { - return Mono.error(e); - } - - try { - return Mono.just(new DecryptResult(transform.doFinal(cipherText))); - } catch (Exception e) { - return Mono.error(e); - } + return Mono.error(new UnsupportedOperationException("decrypt operation not supported for AES/OCT/Symmetric key")); } @Override @@ -129,7 +68,7 @@ Mono verifyAsync(SignatureAlgorithm algorithm, byte[] digest, byte } @Override - Mono wrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] key, Context context, JsonWebKey jsonWebKey) { + Mono wrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] key, Context context, JsonWebKey jsonWebKey) { this.key = getKey(jsonWebKey); @@ -162,12 +101,12 @@ Mono wrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] key, Context return Mono.error(e); } - return Mono.just(new KeyWrapResult(encrypted, algorithm)); + return Mono.just(new WrapResult(encrypted, algorithm, jsonWebKey.getId())); } @Override - Mono unwrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context, - JsonWebKey jsonWebKey) { + Mono unwrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] encryptedKey, Context context, + JsonWebKey jsonWebKey) { key = getKey(jsonWebKey); Algorithm baseAlgorithm = AlgorithmResolver.Default.get(algorithm.toString()); @@ -194,7 +133,7 @@ Mono unwrapKeyAsync(KeyWrapAlgorithm algorithm, byte[] encrypte return Mono.error(e); } - return Mono.just(new KeyUnwrapResult(decrypted)); + return Mono.just(new UnwrapResult(decrypted, algorithm, jsonWebKey.getId())); } @Override diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/DecryptResult.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/DecryptResult.java index 38002881692e..982ddc8defe6 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/DecryptResult.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/DecryptResult.java @@ -3,23 +3,47 @@ package com.azure.security.keyvault.keys.cryptography.models; +import com.azure.core.annotation.Immutable; import com.azure.core.implementation.util.ImplUtils; /** * Represents the details of decrypt operation result. */ +@Immutable public final class DecryptResult { /** * The decrypted content. */ private final byte[] plainText; + /** + * The encrypyion algorithm used for the encryption operation. + */ + private final EncryptionAlgorithm algorithm; + + /** + * The identifier of the key used for the decryption operation. + */ + private final String keyId; + /** * Creates the instance of Decrypt Result holding decrypted content. * @param plainText The decrypted content. + * @param algorithm The algorithm used to decrypt the content. + * @param keyId The identifier of the key usd for the decryption operation. */ - public DecryptResult(byte[] plainText) { + public DecryptResult(byte[] plainText, EncryptionAlgorithm algorithm, String keyId) { this.plainText = ImplUtils.clone(plainText); + this.algorithm = algorithm; + this.keyId = keyId; + } + + /** + * Get the identifier of the key used for the decryption operation + * @return the key identifier + */ + public String getKeyId() { + return keyId; } /** @@ -29,4 +53,12 @@ public DecryptResult(byte[] plainText) { public byte[] getPlainText() { return ImplUtils.clone(plainText); } + + /** + * Get the algorithm used for decryption. + * @return The algorithm used. + */ + public EncryptionAlgorithm getAlgorithm() { + return algorithm; + } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/EncryptResult.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/EncryptResult.java index 6a007da6cd17..08b5d29d72cf 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/EncryptResult.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/EncryptResult.java @@ -3,39 +3,48 @@ package com.azure.security.keyvault.keys.cryptography.models; +import com.azure.core.annotation.Immutable; import com.azure.core.implementation.util.ImplUtils; /** * Represents the details of encrypt operation result. */ +@Immutable public final class EncryptResult { + /** + * The encrypted content. + */ + private final byte[] cipherText; /** - * Creates the instance of Encrypt Result holding encryption operation response information. - * @param cipherText The encrypted content. - * @param authenticationTag The authentication tag. - * @param algorithm The algorithm used to encrypt the content. + * The algorithm used for the encryption operation. */ - public EncryptResult(byte[] cipherText, byte[] authenticationTag, EncryptionAlgorithm algorithm) { - this.cipherText = ImplUtils.clone(cipherText); - this.authenticationTag = ImplUtils.clone(authenticationTag); - this.algorithm = algorithm; - } + private final EncryptionAlgorithm algorithm; /** - * THe encrypted content. + * The identifier of the key used for the encryption operation. */ - private final byte[] cipherText; + private final String keyId; /** - * The authentication tag. + * Creates the instance of Encrypt Result holding encryption operation response information. + * @param cipherText The encrypted content. + * @param algorithm The algorithm used to encrypt the content. + * @param keyId The identifier of the key usd for the encryption operation. */ - private final byte[] authenticationTag; + public EncryptResult(byte[] cipherText, EncryptionAlgorithm algorithm, String keyId) { + this.cipherText = ImplUtils.clone(cipherText); + this.algorithm = algorithm; + this.keyId = keyId; + } /** - * The encrypyion algorithm used for the encryption operation. + * Get the identifier of the key used to do encryption + * @return the key identifier */ - private final EncryptionAlgorithm algorithm; + public String getKeyId() { + return keyId; + } /** * Get the encrypted content. @@ -45,14 +54,6 @@ public byte[] getCipherText() { return ImplUtils.clone(cipherText); } - /** - * Get the authentication tag. - * @return The authentication tag. - */ - public byte[] getAuthenticationTag() { - return ImplUtils.clone(authenticationTag); - } - /** * Get the encryption algorithm used for encryption. * @return The encryption algorithm used. @@ -60,5 +61,4 @@ public byte[] getAuthenticationTag() { public EncryptionAlgorithm getAlgorithm() { return algorithm; } - } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/KeyUnwrapResult.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/KeyUnwrapResult.java deleted file mode 100644 index 024b16a82891..000000000000 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/KeyUnwrapResult.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.security.keyvault.keys.cryptography.models; - -import com.azure.core.implementation.util.ImplUtils; - -/** - * Represents the details of key unwrap operation result. - */ -public final class KeyUnwrapResult { - /** - * The unwrapped key content. - */ - private final byte[] key; - - /** - * Creates the instance of KeyUnwrap Result holding the unwrapped key content. - * @param key The unwrapped key content. - */ - public KeyUnwrapResult(byte[] key) { - this.key = ImplUtils.clone(key); - } - - /** - * Get the unwrapped key content. - * @return The unwrapped key content. - */ - public byte[] getKey() { - return ImplUtils.clone(key); - } -} diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/SignResult.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/SignResult.java index 274db5fb8422..6b7ad1d86345 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/SignResult.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/SignResult.java @@ -3,32 +3,49 @@ package com.azure.security.keyvault.keys.cryptography.models; +import com.azure.core.annotation.Immutable; import com.azure.core.implementation.util.ImplUtils; /** * Represents the details of sign operation result. */ +@Immutable public final class SignResult { + /** + * The signature created from the digest. + */ + private final byte[] signature; + + /** + * The algorithm used to create the signature. + */ + private final SignatureAlgorithm algorithm; + + /** + * The identifier of the key used for the verify operation. + */ + private final String keyId; /** * Creates the instance of SignResult holding the sign operation response details. * @param signature The signature created from the digest. * @param algorithm The algorithm used to sign the digest. + * @param keyId The identifier of the key usd for the sign operation. */ - public SignResult(byte[] signature, SignatureAlgorithm algorithm) { + public SignResult(byte[] signature, SignatureAlgorithm algorithm, String keyId) { this.signature = ImplUtils.clone(signature); this.algorithm = algorithm; + this.keyId = keyId; } - /** - * The signature created from the digest. - */ - private final byte[] signature; /** - * The algorithm used to create the signature. + * Get the identifier of the key used for the verify operation + * @return the key identifier */ - private final SignatureAlgorithm algorithm; + public String getKeyId() { + return keyId; + } /** * Get the signature created from the digest. diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/UnwrapResult.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/UnwrapResult.java new file mode 100644 index 000000000000..7b5d8ef3da3a --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/UnwrapResult.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.keys.cryptography.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.implementation.util.ImplUtils; + +/** + * Represents the details of key unwrap operation result. + */ +@Immutable +public final class UnwrapResult { + /** + * The unwrapped key content. + */ + private final byte[] key; + + /** + * The algorithm used for the key wrap operation. + */ + private final KeyWrapAlgorithm algorithm; + + /** + * The identifier of the key used for the key wrap operation. + */ + private final String keyId; + + /** + * Creates the instance of KeyUnwrap Result holding the unwrapped key content. + * + * @param key The unwrapped key content. + * @param algorithm The algorithm used for the operation + * @param keyId The id of key used for the operation + */ + public UnwrapResult(byte[] key, KeyWrapAlgorithm algorithm, String keyId) { + this.key = ImplUtils.clone(key); + this.algorithm = algorithm; + this.keyId = keyId; + } + + /** + * Get the unwrapped key content. + * + * @return The unwrapped key content. + */ + public byte[] getKey() { + return ImplUtils.clone(key); + } + + /** + * Get the algorithm used for key wrap operation. + * + * @return The encryption algorithm used. + */ + public KeyWrapAlgorithm getAlgorithm() { + return algorithm; + } + + /** + * Get the identifier of the key used for the key wrap encryption + * + * @return the key identifier + */ + public String getKeyId() { + return keyId; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/VerifyResult.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/VerifyResult.java index cc600e5ff0df..5c3cb60154f3 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/VerifyResult.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/VerifyResult.java @@ -3,21 +3,38 @@ package com.azure.security.keyvault.keys.cryptography.models; +import com.azure.core.annotation.Immutable; + /** * Represents the details of verify operation result. */ +@Immutable public final class VerifyResult { /** * THe verify operation result. */ private final Boolean isValid; + /** + * The identifier of the key used for the verify operation. + */ + private final String keyId; + + /** + * The algorithm used to verify the signature. + */ + private final SignatureAlgorithm algorithm; + /** * Creates the instance of Verify Result holding the verification response information. * @param isValid The verification info. + * @param algorithm The algorithm used to verify the signature. + * @param keyId The identifier of the key usd for the verify operation. */ - public VerifyResult(Boolean isValid) { + public VerifyResult(Boolean isValid, SignatureAlgorithm algorithm, String keyId) { this.isValid = isValid; + this.keyId = keyId; + this.algorithm = algorithm; } /** @@ -27,4 +44,20 @@ public VerifyResult(Boolean isValid) { public Boolean isValid() { return isValid; } + + /** + * Get the signature algorithm used to verify the signature. + * @return The signature algorithm. + */ + public SignatureAlgorithm getAlgorithm() { + return algorithm; + } + + /** + * Get the identifier of the key used for the verify operation + * @return the key identifier + */ + public String getKeyId() { + return keyId; + } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/KeyWrapResult.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/WrapResult.java similarity index 67% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/KeyWrapResult.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/WrapResult.java index 8ffa05f855e4..1f0d75a5b30e 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/KeyWrapResult.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/WrapResult.java @@ -3,33 +3,43 @@ package com.azure.security.keyvault.keys.cryptography.models; +import com.azure.core.annotation.Immutable; import com.azure.core.implementation.util.ImplUtils; /** * Represents the details of wrap operation result. */ -public final class KeyWrapResult { - +@Immutable +public final class WrapResult { /** - * Creates the instance of KeyWrapResult holding the key wrap operation response details. - * @param encryptedKey The unwrapped key content. - * @param algorithm The algorithm used to wrap the key content. + * The encrypted key content */ - public KeyWrapResult(byte[] encryptedKey, KeyWrapAlgorithm algorithm) { - this.encryptedKey = ImplUtils.clone(encryptedKey); - this.algorithm = algorithm; - } + private final byte[] encryptedKey; /** - * The encrypted key content + * The identifier of the key used for the encryption operation. */ - private final byte[] encryptedKey; + private final String keyId; + /** * The key wrap algorithm used to wrap the key content. */ private final KeyWrapAlgorithm algorithm; + + /** + * Creates the instance of KeyWrapResult holding the key wrap operation response details. + * @param encryptedKey The unwrapped key content. + * @param algorithm The algorithm used to wrap the key content. + * @param keyId The identifier of the key usd for the key wrap operation. + */ + public WrapResult(byte[] encryptedKey, KeyWrapAlgorithm algorithm, String keyId) { + this.encryptedKey = ImplUtils.clone(encryptedKey); + this.keyId = keyId; + this.algorithm = algorithm; + } + /** * Get the encrypted key content. * @return The encrypted key. @@ -45,4 +55,12 @@ public byte[] getEncryptedKey() { public KeyWrapAlgorithm getAlgorithm() { return algorithm; } + + /** + * Get the identifier of the key used to do encryption + * @return the key identifier + */ + public String getKeyId() { + return keyId; + } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyVaultCredentialPolicy.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/KeyVaultCredentialPolicy.java similarity index 98% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyVaultCredentialPolicy.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/KeyVaultCredentialPolicy.java index 9d2b489e3d80..270670edce10 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyVaultCredentialPolicy.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/KeyVaultCredentialPolicy.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.keys; +package com.azure.security.keyvault.keys.implementation; import com.azure.core.credential.TokenCredential; import com.azure.core.credential.TokenRequestContext; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/ScopeTokenCache.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/ScopeTokenCache.java similarity index 97% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/ScopeTokenCache.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/ScopeTokenCache.java index 0f4050cd6ee0..c46bcb5127d3 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/ScopeTokenCache.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/ScopeTokenCache.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.keys; +package com.azure.security.keyvault.keys.implementation; import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenRequestContext; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/Base64UrlJsonDeserializer.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonDeserializer.java similarity index 93% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/Base64UrlJsonDeserializer.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonDeserializer.java index 77921e4da5cd..c60696153dfe 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/Base64UrlJsonDeserializer.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonDeserializer.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.keys.models.webkey; +package com.azure.security.keyvault.keys.models; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/Base64UrlJsonSerializer.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonSerializer.java similarity index 94% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/Base64UrlJsonSerializer.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonSerializer.java index 8dd663a03c97..153c81a5767e 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/Base64UrlJsonSerializer.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonSerializer.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.keys.models.webkey; +package com.azure.security.keyvault.keys.models; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/ByteExtensions.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/ByteExtensions.java similarity index 90% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/ByteExtensions.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/ByteExtensions.java index 7f4c500adf4a..5e1200dc853b 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/ByteExtensions.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/ByteExtensions.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.keys.models.webkey; +package com.azure.security.keyvault.keys.models; class ByteExtensions { /** diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/EcKeyCreateOptions.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateEcKeyOptions.java similarity index 62% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/EcKeyCreateOptions.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateEcKeyOptions.java index f2095262bde8..2f41f8010084 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/EcKeyCreateOptions.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateEcKeyOptions.java @@ -3,31 +3,30 @@ package com.azure.security.keyvault.keys.models; -import com.azure.security.keyvault.keys.models.webkey.KeyCurveName; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; +import com.azure.core.annotation.Fluent; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Map; -public class EcKeyCreateOptions extends KeyCreateOptions { +@Fluent +public class CreateEcKeyOptions extends CreateKeyOptions { /** * The Ec key curve. */ - private KeyCurveName curve; + private KeyCurveName curveName; /** - * The hsm indicator for the key. + * The hardware protected indicator for the key. */ - private boolean hsm; + private boolean hardwareProtected; /** * Creates a EcKeyCreateOptions with {@code name} as name of the Ec key. * @param name The name of the Ec key. */ - public EcKeyCreateOptions(String name) { + public CreateEcKeyOptions(String name) { super.name = name; this.keyType = KeyType.EC; } @@ -37,18 +36,18 @@ public EcKeyCreateOptions(String name) { * * @return the curve. */ - public KeyCurveName getCurve() { - return this.curve; + public KeyCurveName getCurveName() { + return this.curveName; } /** * Set the curve. * - * @param curve The curve to set + * @param curveName The curve to set * @return the EcKeyCreateOptions object itself. */ - public EcKeyCreateOptions setCurve(KeyCurveName curve) { - this.curve = curve; + public CreateEcKeyOptions setCurveName(KeyCurveName curveName) { + this.curveName = curveName; return this; } @@ -59,7 +58,7 @@ public EcKeyCreateOptions setCurve(KeyCurveName curve) { * @return the EcKeyCreateOptions object itself. */ @Override - public EcKeyCreateOptions setKeyOperations(KeyOperation... keyOperations) { + public CreateEcKeyOptions setKeyOperations(KeyOperation... keyOperations) { this.keyOperations = Arrays.asList(keyOperations); return this; } @@ -71,7 +70,7 @@ public EcKeyCreateOptions setKeyOperations(KeyOperation... keyOperations) { * @return the EcKeyCreateOptions object itself. */ @Override - public EcKeyCreateOptions setNotBefore(OffsetDateTime notBefore) { + public CreateEcKeyOptions setNotBefore(OffsetDateTime notBefore) { super.setNotBefore(notBefore); return this; } @@ -79,12 +78,12 @@ public EcKeyCreateOptions setNotBefore(OffsetDateTime notBefore) { /** * Set the {@link OffsetDateTime expires} UTC time. * - * @param expires The expiry time to set for the key. + * @param expiresOn The expiry time to set for the key. * @return the EcKeyCreateOptions object itself. */ @Override - public EcKeyCreateOptions setExpires(OffsetDateTime expires) { - super.setExpires(expires); + public CreateEcKeyOptions setExpiresOn(OffsetDateTime expiresOn) { + super.setExpiresOn(expiresOn); return this; } @@ -95,7 +94,7 @@ public EcKeyCreateOptions setExpires(OffsetDateTime expires) { * @return the EcKeyCreateOptions object itself. */ @Override - public EcKeyCreateOptions setTags(Map tags) { + public CreateEcKeyOptions setTags(Map tags) { super.setTags(tags); return this; } @@ -106,19 +105,20 @@ public EcKeyCreateOptions setTags(Map tags) { * @param enabled The enabled value to set * @return the EcKeyCreateOptions object itself. */ - public KeyCreateOptions setEnabled(Boolean enabled) { + @Override + public CreateEcKeyOptions setEnabled(Boolean enabled) { super.setEnabled(enabled); return this; } /** * Set whether the key being created is of hsm type or not. - * @param hsm The hsm value to set. + * @param hardwareProtected The hsm value to set. * @return the EcKeyCreateOptions object itself. */ - public EcKeyCreateOptions setHsm(Boolean hsm) { - this.hsm = hsm; - this.keyType = hsm ? KeyType.EC_HSM : KeyType.EC; + public CreateEcKeyOptions setHardwareProtected(Boolean hardwareProtected) { + this.hardwareProtected = hardwareProtected; + this.keyType = hardwareProtected ? KeyType.EC_HSM : KeyType.EC; return this; } @@ -126,7 +126,7 @@ public EcKeyCreateOptions setHsm(Boolean hsm) { * Get the hsm value of the key being created. * @return the hsm value. */ - public Boolean isHsm() { - return this.hsm; + public Boolean isHardwareProtected() { + return this.hardwareProtected; } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyCreateOptions.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateKeyOptions.java similarity index 80% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyCreateOptions.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateKeyOptions.java index fbfc1fdc6bcf..d03d58464a8b 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyCreateOptions.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateKeyOptions.java @@ -3,15 +3,15 @@ package com.azure.security.keyvault.keys.models; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; +import com.azure.core.annotation.Fluent; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.List; import java.util.Map; -public class KeyCreateOptions { +@Fluent +public class CreateKeyOptions { /** * Determines whether the object is enabled. @@ -26,7 +26,7 @@ public class KeyCreateOptions { /** * Expiry date in UTC. */ - private OffsetDateTime expires; + private OffsetDateTime expiresOn; /** * Application specific metadata in the form of key-value pairs. @@ -48,16 +48,14 @@ public class KeyCreateOptions { */ String name; - KeyCreateOptions() { - - } + CreateKeyOptions() { } /** * Creates instance of KeyCreateOptions with {@code name} as key name and {@code keyType} as type of the key. * @param name The name of the key to create. * @param keyType The type of the key to create. */ - public KeyCreateOptions(String name, KeyType keyType) { + public CreateKeyOptions(String name, KeyType keyType) { this.name = name; this.keyType = keyType; } @@ -67,7 +65,7 @@ public KeyCreateOptions(String name, KeyType keyType) { * * @return the key operations. */ - public List keyOperations() { + public List getKeyOperations() { return this.keyOperations; } @@ -77,7 +75,7 @@ public List keyOperations() { * @param keyOperations The key operations value to set * @return the KeyCreateOptions object itself. */ - public KeyCreateOptions setKeyOperations(KeyOperation... keyOperations) { + public CreateKeyOptions setKeyOperations(KeyOperation... keyOperations) { this.keyOperations = Arrays.asList(keyOperations); return this; } @@ -97,7 +95,7 @@ public KeyType getKeyType() { * @param notBefore The notBefore UTC time to set * @return the KeyCreateOptions object itself. */ - public KeyCreateOptions setNotBefore(OffsetDateTime notBefore) { + public CreateKeyOptions setNotBefore(OffsetDateTime notBefore) { this.notBefore = notBefore; return this; } @@ -114,11 +112,11 @@ public OffsetDateTime getNotBefore() { /** * Set the {@link OffsetDateTime expires} UTC time. * - * @param expires The expiry time to set for the key. + * @param expiresOn The expiry time to set for the key. * @return the KeyCreateOptions object itself. */ - public KeyCreateOptions setExpires(OffsetDateTime expires) { - this.expires = expires; + public CreateKeyOptions setExpiresOn(OffsetDateTime expiresOn) { + this.expiresOn = expiresOn; return this; } @@ -127,8 +125,8 @@ public KeyCreateOptions setExpires(OffsetDateTime expires) { * * @return the expires UTC time. */ - public OffsetDateTime getExpires() { - return this.expires; + public OffsetDateTime getExpiresOn() { + return this.expiresOn; } /** @@ -137,7 +135,7 @@ public OffsetDateTime getExpires() { * @param tags The tags to set * @return the KeyCreateOptions object itself. */ - public KeyCreateOptions setTags(Map tags) { + public CreateKeyOptions setTags(Map tags) { this.tags = tags; return this; } @@ -157,7 +155,7 @@ public Map getTags() { * @param enabled The enabled value to set * @return the KeyCreateOptions object itself. */ - public KeyCreateOptions setEnabled(Boolean enabled) { + public CreateKeyOptions setEnabled(Boolean enabled) { this.enabled = enabled; return this; } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/RsaKeyCreateOptions.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateRsaKeyOptions.java similarity index 68% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/RsaKeyCreateOptions.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateRsaKeyOptions.java index 4f52e946502d..bf6ef2b87199 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/RsaKeyCreateOptions.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateRsaKeyOptions.java @@ -3,14 +3,14 @@ package com.azure.security.keyvault.keys.models; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; +import com.azure.core.annotation.Fluent; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Map; -public class RsaKeyCreateOptions extends KeyCreateOptions { +@Fluent +public class CreateRsaKeyOptions extends CreateKeyOptions { /** * The Rsa key size. @@ -18,15 +18,15 @@ public class RsaKeyCreateOptions extends KeyCreateOptions { private Integer keySize; /** - * The hsm indicator for the key. + * The hardware protected indicator for the key. */ - private boolean hsm; + private boolean hardwareProtected; /** * Creates a RsaKeyCreateOptions with {@code name} as name of the Rsa key. * @param name The name of the key. */ - public RsaKeyCreateOptions(String name) { + public CreateRsaKeyOptions(String name) { super.name = name; this.keyType = KeyType.RSA; } @@ -46,7 +46,7 @@ public Integer getKeySize() { * @param keySize The keySize value to set * @return the RsaKeyCreateOptions object itself. */ - public RsaKeyCreateOptions setKeySize(Integer keySize) { + public CreateRsaKeyOptions setKeySize(Integer keySize) { this.keySize = keySize; return this; } @@ -58,7 +58,7 @@ public RsaKeyCreateOptions setKeySize(Integer keySize) { * @return the RsaKeyCreateOptions object itself. */ @Override - public RsaKeyCreateOptions setKeyOperations(KeyOperation... keyOperations) { + public CreateRsaKeyOptions setKeyOperations(KeyOperation... keyOperations) { this.keyOperations = Arrays.asList(keyOperations); return this; } @@ -70,7 +70,7 @@ public RsaKeyCreateOptions setKeyOperations(KeyOperation... keyOperations) { * @return the RsaKeyCreateOptions object itself. */ @Override - public RsaKeyCreateOptions setNotBefore(OffsetDateTime notBefore) { + public CreateRsaKeyOptions setNotBefore(OffsetDateTime notBefore) { super.setNotBefore(notBefore); return this; } @@ -78,12 +78,12 @@ public RsaKeyCreateOptions setNotBefore(OffsetDateTime notBefore) { /** * Set the {@link OffsetDateTime expires} UTC time. * - * @param expires The expiry time to set for the key. + * @param expiresOn The expiry time to set for the key. * @return the RsaKeyCreateOptions object itself. */ @Override - public RsaKeyCreateOptions setExpires(OffsetDateTime expires) { - super.setExpires(expires); + public CreateRsaKeyOptions setExpiresOn(OffsetDateTime expiresOn) { + super.setExpiresOn(expiresOn); return this; } @@ -94,7 +94,7 @@ public RsaKeyCreateOptions setExpires(OffsetDateTime expires) { * @return the RsaKeyCreateOptions object itself. */ @Override - public RsaKeyCreateOptions setTags(Map tags) { + public CreateRsaKeyOptions setTags(Map tags) { super.setTags(tags); return this; } @@ -105,19 +105,19 @@ public RsaKeyCreateOptions setTags(Map tags) { * @param enabled The enabled value to set * @return the RsaKeyCreateOptions object itself. */ - public RsaKeyCreateOptions setEnabled(Boolean enabled) { + public CreateRsaKeyOptions setEnabled(Boolean enabled) { super.setEnabled(enabled); return this; } /** * Set whether the key being created is of hsm type or not. - * @param hsm The hsm value to set. + * @param hardwareProtected The hsm value to set. * @return the RsaKeyCreateOptions object itself. */ - public RsaKeyCreateOptions setHsm(Boolean hsm) { - this.hsm = hsm; - this.keyType = hsm ? KeyType.RSA_HSM : KeyType.RSA; + public CreateRsaKeyOptions setHardwareProtected(Boolean hardwareProtected) { + this.hardwareProtected = hardwareProtected; + this.keyType = hardwareProtected ? KeyType.RSA_HSM : KeyType.RSA; return this; } @@ -125,7 +125,7 @@ public RsaKeyCreateOptions setHsm(Boolean hsm) { * Get the hsm value of the key being created. * @return the hsm value. */ - public Boolean isHsm() { - return this.hsm; + public Boolean isHardwareProtected() { + return this.hardwareProtected; } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/DeletedKey.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/DeletedKey.java index 5a94af03b142..ff11ec11d18a 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/DeletedKey.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/DeletedKey.java @@ -5,7 +5,6 @@ import com.azure.security.keyvault.keys.KeyAsyncClient; import com.azure.security.keyvault.keys.KeyClient; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Instant; import java.time.OffsetDateTime; @@ -14,13 +13,13 @@ /** * Deleted Key is the resource consisting of name, recovery id, deleted date, scheduled purge date and its attributes - * inherited from {@link Key}. + * inherited from {@link KeyVaultKey}. * It is managed by Key Service. * * @see KeyClient * @see KeyAsyncClient */ -public final class DeletedKey extends Key { +public final class DeletedKey extends KeyVaultKey { /** * The url of the recovery object, used to identify and recover the deleted @@ -43,7 +42,7 @@ public final class DeletedKey extends Key { /** * The time when the key was deleted, in UTC. */ - private OffsetDateTime deletedDate; + private OffsetDateTime deletedOn; /** * Get the recoveryId identifier. @@ -68,8 +67,8 @@ public OffsetDateTime getScheduledPurgeDate() { * * @return the deletedDate UTC time. */ - public OffsetDateTime getDeletedDate() { - return this.deletedDate; + public OffsetDateTime getDeletedOn() { + return this.deletedOn; } /** @@ -88,7 +87,7 @@ private void unpackScheduledPurgeDate(Long scheduledPurgeDate) { */ @JsonProperty("deletedDate") private void unpackDeletedDate(Long deletedDate) { - this.deletedDate = OffsetDateTime.ofInstant(Instant.ofEpochMilli(deletedDate * 1000L), ZoneOffset.UTC); + this.deletedOn = OffsetDateTime.ofInstant(Instant.ofEpochMilli(deletedDate * 1000L), ZoneOffset.UTC); } /** @@ -105,7 +104,7 @@ private void unpackKeyMaterial(Map key) { * * @return the key value */ - public JsonWebKey getKeyMaterial() { + public JsonWebKey getKey() { return this.keyMaterial; } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyImportOptions.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/ImportKeyOptions.java similarity index 51% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyImportOptions.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/ImportKeyOptions.java index 5a3194197444..6719c557d088 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyImportOptions.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/ImportKeyOptions.java @@ -3,37 +3,38 @@ package com.azure.security.keyvault.keys.models; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; +import com.azure.core.annotation.Fluent; -public class KeyImportOptions extends KeyProperties { +@Fluent +public class ImportKeyOptions extends KeyProperties { /** * The Key Material. */ - private final JsonWebKey keyMaterial; + private final JsonWebKey key; /** - * The hsm indicator for the key. + * The hardware protected indicator for the key. */ - private Boolean hsm; + private Boolean hardwareProtected; /** * Creates instance of KeyImportOptions. * @param name The name of the key. - * @param keyMaterial The key material to import. + * @param key The key material to import. */ - public KeyImportOptions(String name, JsonWebKey keyMaterial) { + public ImportKeyOptions(String name, JsonWebKey key) { super.name = name; - this.keyMaterial = keyMaterial; + this.key = key; } /** * Set whether the key being imported is of hsm type or not. - * @param hsm The hsm value to set. + * @param hardwareProtected The hsm value to set. * @return the KeyImportOptions object itself. */ - public KeyImportOptions setHsm(Boolean hsm) { - this.hsm = hsm; + public ImportKeyOptions setHardwareProtected(Boolean hardwareProtected) { + this.hardwareProtected = hardwareProtected; return this; } @@ -41,16 +42,16 @@ public KeyImportOptions setHsm(Boolean hsm) { * Get the hsm value of the key being imported. * @return the hsm value. */ - public Boolean isHsm() { - return this.hsm; + public Boolean isHardwareProtected() { + return this.hardwareProtected; } /** * Get the key material of the key being imported. * @return the key material. */ - public JsonWebKey getKeyMaterial() { - return keyMaterial; + public JsonWebKey getKey() { + return key; } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/JsonWebKey.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/JsonWebKey.java similarity index 84% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/JsonWebKey.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/JsonWebKey.java index 38c07ba436b1..05ac32b52268 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/JsonWebKey.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/JsonWebKey.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.keys.models.webkey; +package com.azure.security.keyvault.keys.models; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonAutoDetect; @@ -42,6 +42,8 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Collections; +import java.util.ArrayList; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; @@ -57,14 +59,14 @@ public class JsonWebKey { * Key Identifier. */ @JsonProperty(value = "kid") - private String kid; + private String keyId; /** * JsonWebKey key type (kty). Possible values include: 'EC', 'EC-HSM', 'RSA', * 'RSA-HSM', 'oct'. */ @JsonProperty(value = "kty") - private KeyType kty; + private KeyType keyType; /** * The keyOps property. @@ -157,18 +159,18 @@ public class JsonWebKey { * @return the kid value */ @JsonProperty("kid") - public String getKid() { - return this.kid; + public String getId() { + return this.keyId; } /** * Set the key identifier value. * - * @param kid The kid value to set + * @param keyId The kid value to set * @return the JsonWebKey object itself. */ - public JsonWebKey setKid(String kid) { - this.kid = kid; + JsonWebKey setId(String keyId) { + this.keyId = keyId; return this; } @@ -178,29 +180,30 @@ public JsonWebKey setKid(String kid) { * @return the kty value */ @JsonProperty("kty") - public KeyType getKty() { - return this.kty; + public KeyType getKeyType() { + return this.keyType; } /** * Set the key type value. * - * @param kty The key type + * @param keyType The key type * @return the JsonWebKey object itself. */ - public JsonWebKey setKty(KeyType kty) { - this.kty = kty; + JsonWebKey setKeyType(KeyType keyType) { + this.keyType = keyType; return this; } /** - * Get the keyOps value. + * Get the immutable key operations list. The list cannot be modified. * - * @return the keyOps value + * @return the key operations list */ @JsonProperty("key_ops") public List getKeyOps() { - return this.keyOps; + return this.keyOps == null ? Collections.unmodifiableList(new ArrayList()) + : Collections.unmodifiableList(this.keyOps); } /** @@ -209,7 +212,7 @@ public List getKeyOps() { * @param keyOps The keyOps value to set * @return the JsonWebKey object itself. */ - public JsonWebKey setKeyOps(List keyOps) { + JsonWebKey setKeyOps(List keyOps) { this.keyOps = keyOps; return this; } @@ -232,7 +235,7 @@ public byte[] getN() { * @param n The n value to set * @return the JsonWebKey object itself. */ - public JsonWebKey setN(byte[] n) { + JsonWebKey setN(byte[] n) { this.n = ByteExtensions.clone(n); return this; } @@ -255,7 +258,7 @@ public byte[] getE() { * @param e The e value to set * @return the JsonWebKey object itself. */ - public JsonWebKey setE(byte[] e) { + JsonWebKey setE(byte[] e) { this.e = ByteExtensions.clone(e); return this; } @@ -278,7 +281,7 @@ public byte[] getD() { * @param d The d value to set * @return the JsonWebKey object itself. */ - public JsonWebKey setD(byte[] d) { + JsonWebKey setD(byte[] d) { this.d = ByteExtensions.clone(d); return this; } @@ -301,7 +304,7 @@ public byte[] getDp() { * @param dp The RSA Private Key Parameter value to set. * @return the JsonWebKey object itself. */ - public JsonWebKey setDp(byte[] dp) { + JsonWebKey setDp(byte[] dp) { this.dp = ByteExtensions.clone(dp); return this; } @@ -324,7 +327,7 @@ public byte[] getDq() { * @param dq The RSA Private Key Parameter value to set. * @return the JsonWebKey object itself. */ - public JsonWebKey setDq(byte[] dq) { + JsonWebKey setDq(byte[] dq) { this.dq = ByteExtensions.clone(dq); return this; } @@ -347,7 +350,7 @@ public byte[] getQi() { * @param qi The RSA Private Key Parameter value to set. * @return the JsonWebKey object itself. */ - public JsonWebKey setQi(byte[] qi) { + JsonWebKey setQi(byte[] qi) { this.qi = ByteExtensions.clone(qi); return this; } @@ -370,7 +373,7 @@ public byte[] getP() { * @param p The RSA secret prime value. * @return the JsonWebKey object itself. */ - public JsonWebKey setP(byte[] p) { + JsonWebKey setP(byte[] p) { this.p = ByteExtensions.clone(p); return this; } @@ -393,7 +396,7 @@ public byte[] getQ() { * @param q The the RSA secret prime, with p < q value to be set. * @return the JsonWebKey object itself. */ - public JsonWebKey setQ(byte[] q) { + JsonWebKey setQ(byte[] q) { this.q = ByteExtensions.clone(q); return this; } @@ -416,7 +419,7 @@ public byte[] getK() { * @param k The symmetric key value to set. * @return the JsonWebKey object itself. */ - public JsonWebKey setK(byte[] k) { + JsonWebKey setK(byte[] k) { this.k = ByteExtensions.clone(k); return this; } @@ -439,7 +442,7 @@ public byte[] getT() { * @param t The HSM Token value to set, used with Bring Your Own Key * @return the JsonWebKey object itself. */ - public JsonWebKey setT(byte[] t) { + JsonWebKey setT(byte[] t) { this.t = ByteExtensions.clone(t); return this; } @@ -464,7 +467,7 @@ public String toString() { * @return the crv value */ @JsonProperty("crv") - public KeyCurveName getCrv() { + public KeyCurveName getCurveName() { return this.crv; } @@ -474,7 +477,7 @@ public KeyCurveName getCrv() { * @param crv The crv value to set * @return the JsonWebKey object itself. */ - public JsonWebKey setCrv(KeyCurveName crv) { + JsonWebKey setCurveName(KeyCurveName crv) { this.crv = crv; return this; } @@ -497,7 +500,7 @@ public byte[] getX() { * @param x The x value to set * @return the JsonWebKey object itself. */ - public JsonWebKey setX(byte[] x) { + JsonWebKey setX(byte[] x) { this.x = ByteExtensions.clone(x); return this; } @@ -520,7 +523,7 @@ public byte[] getY() { * @param y The y value to set * @return the JsonWebKey object itself. */ - public JsonWebKey setY(byte[] y) { + JsonWebKey setY(byte[] y) { this.y = ByteExtensions.clone(y); return this; } @@ -530,7 +533,7 @@ public JsonWebKey setY(byte[] y) { * * @return the RSA public key spec value */ - private RSAPublicKeySpec getRSAPublicKeySpec() { + private RSAPublicKeySpec getRsaPublicKeySpec() { return new RSAPublicKeySpec(toBigInteger(n), toBigInteger(e)); } @@ -540,7 +543,7 @@ private RSAPublicKeySpec getRSAPublicKeySpec() { * * @return the RSA private key spec value */ - private RSAPrivateKeySpec getRSAPrivateKeySpec() { + private RSAPrivateKeySpec getRsaPrivateKeySpec() { return new RSAPrivateCrtKeySpec(toBigInteger(n), toBigInteger(e), toBigInteger(d), toBigInteger(p), toBigInteger(q), toBigInteger(dp), toBigInteger(dq), toBigInteger(qi)); @@ -552,10 +555,10 @@ private RSAPrivateKeySpec getRSAPrivateKeySpec() { * @param provider The Java security provider. * @return the RSA public key value */ - private PublicKey getRSAPublicKey(Provider provider) { + private PublicKey getRsaPublicKey(Provider provider) { try { - RSAPublicKeySpec publicKeySpec = getRSAPublicKeySpec(); + RSAPublicKeySpec publicKeySpec = getRsaPublicKeySpec(); KeyFactory factory = provider != null ? KeyFactory.getInstance("RSA", provider) : KeyFactory.getInstance("RSA"); @@ -571,10 +574,10 @@ private PublicKey getRSAPublicKey(Provider provider) { * @param provider The Java security provider. * @return the RSA private key value */ - private PrivateKey getRSAPrivateKey(Provider provider) { + private PrivateKey getRsaPrivateKey(Provider provider) { try { - RSAPrivateKeySpec privateKeySpec = getRSAPrivateKeySpec(); + RSAPrivateKeySpec privateKeySpec = getRsaPrivateKeySpec(); KeyFactory factory = provider != null ? KeyFactory.getInstance("RSA", provider) : KeyFactory.getInstance("RSA"); @@ -584,7 +587,7 @@ private PrivateKey getRSAPrivateKey(Provider provider) { } } - private static PublicKey getECPublicKey(ECPoint ecPoint, ECParameterSpec curveSpec, Provider provider) { + private static PublicKey getEcPublicKey(ECPoint ecPoint, ECParameterSpec curveSpec, Provider provider) { // Create public key spec with given point try { ECPublicKeySpec pubSpec = new ECPublicKeySpec(ecPoint, curveSpec); @@ -596,7 +599,7 @@ private static PublicKey getECPublicKey(ECPoint ecPoint, ECParameterSpec curveSp } } - private static PrivateKey getECPrivateKey(byte[] d, ECParameterSpec curveSpec, Provider provider) { + private static PrivateKey getEcPrivateKey(byte[] d, ECParameterSpec curveSpec, Provider provider) { try { ECPrivateKeySpec priSpec = new ECPrivateKeySpec(new BigInteger(1, d), curveSpec); KeyFactory kf = provider != null ? KeyFactory.getInstance("EC", provider) @@ -610,8 +613,8 @@ private static PrivateKey getECPrivateKey(byte[] d, ECParameterSpec curveSpec, P /** * Verifies if the key is an RSA key. */ - private void checkRSACompatible() { - if (!KeyType.RSA.equals(kty) && !KeyType.RSA_HSM.equals(kty)) { + private void checkRsaCompatible() { + if (!KeyType.RSA.equals(keyType) && !KeyType.RSA_HSM.equals(keyType)) { throw logger.logExceptionAsError(new UnsupportedOperationException("Not an RSA key")); } } @@ -644,14 +647,14 @@ private static BigInteger toBigInteger(byte[] b) { * @param keyPair Tbe RSA key pair * @return the JSON web key, converted from RSA key pair. */ - public static JsonWebKey fromRSA(KeyPair keyPair) { + public static JsonWebKey fromRsa(KeyPair keyPair) { RSAPrivateCrtKey privateKey = (RSAPrivateCrtKey) keyPair.getPrivate(); JsonWebKey key = null; if (privateKey != null) { - key = new JsonWebKey().setKty(KeyType.RSA).setN(toByteArray(privateKey.getModulus())) + key = new JsonWebKey().setKeyType(KeyType.RSA).setN(toByteArray(privateKey.getModulus())) .setE(toByteArray(privateKey.getPublicExponent())) .setD(toByteArray(privateKey.getPrivateExponent())).setP(toByteArray(privateKey.getPrimeP())) .setQ(toByteArray(privateKey.getPrimeQ())).setDp(toByteArray(privateKey.getPrimeExponentP())) @@ -661,7 +664,7 @@ public static JsonWebKey fromRSA(KeyPair keyPair) { RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic(); - key = new JsonWebKey().setKty(KeyType.RSA).setN(toByteArray(publicKey.getModulus())) + key = new JsonWebKey().setKeyType(KeyType.RSA).setN(toByteArray(publicKey.getModulus())) .setE(toByteArray(publicKey.getPublicExponent())).setD(null).setP(null).setQ(null).setDp(null) .setDq(null).setQi(null); } @@ -669,13 +672,24 @@ public static JsonWebKey fromRSA(KeyPair keyPair) { return key; } + /** + * Converts RSA key pair to JSON web key. + * + * @param keyPair Tbe RSA key pair + * @param keyOperations The key operations to set on the key + * @return the JSON web key, converted from RSA key pair. + */ + public static JsonWebKey fromRsa(KeyPair keyPair, List keyOperations) { + return fromRsa(keyPair).setKeyOps(keyOperations); + } + /** * Converts JSON web key to RSA key pair. * * @return RSA key pair */ - public KeyPair toRSA() { - return this.toRSA(false); + public KeyPair toRsa() { + return this.toRsa(false); } /** @@ -685,8 +699,8 @@ public KeyPair toRSA() { * @param includePrivateParameters true if the RSA key pair should include the private key. False otherwise. * @return RSA key pair */ - public KeyPair toRSA(boolean includePrivateParameters) { - return toRSA(includePrivateParameters, null); + public KeyPair toRsa(boolean includePrivateParameters) { + return toRsa(includePrivateParameters, null); } /** @@ -697,15 +711,15 @@ public KeyPair toRSA(boolean includePrivateParameters) { * @param includePrivateParameters true if the RSA key pair should include the private key. False otherwise. * @return RSA key pair */ - public KeyPair toRSA(boolean includePrivateParameters, Provider provider) { + public KeyPair toRsa(boolean includePrivateParameters, Provider provider) { // Must be RSA - checkRSACompatible(); + checkRsaCompatible(); if (includePrivateParameters) { - return new KeyPair(getRSAPublicKey(provider), getRSAPrivateKey(provider)); + return new KeyPair(getRsaPublicKey(provider), getRsaPrivateKey(provider)); } else { - return new KeyPair(getRSAPublicKey(provider), null); + return new KeyPair(getRsaPublicKey(provider), null); } } @@ -715,8 +729,8 @@ public KeyPair toRSA(boolean includePrivateParameters, Provider provider) { * * @return EC key pair */ - public KeyPair toEC() { - return toEC(false, null); + public KeyPair toEc() { + return toEc(false, null); } /** @@ -726,8 +740,8 @@ public KeyPair toEC() { * @param includePrivateParameters true if the EC key pair should include the private key. False otherwise. * @return EC key pair */ - public KeyPair toEC(boolean includePrivateParameters) { - return toEC(includePrivateParameters, null); + public KeyPair toEc(boolean includePrivateParameters) { + return toEc(includePrivateParameters, null); } /** @@ -740,14 +754,14 @@ public KeyPair toEC(boolean includePrivateParameters) { * @throws IllegalArgumentException if the key type is not EC or EC HSM * @throws IllegalStateException if an instance of EC key pair cannot be generated */ - public KeyPair toEC(boolean includePrivateParameters, Provider provider) { + public KeyPair toEc(boolean includePrivateParameters, Provider provider) { if (provider == null) { // Our default provider for this class provider = Security.getProvider("SunEC"); } - if (!KeyType.EC.equals(kty) && !KeyType.EC_HSM.equals(kty)) { + if (!KeyType.EC.equals(keyType) && !KeyType.EC_HSM.equals(keyType)) { throw logger.logExceptionAsError(new IllegalArgumentException("Not an EC key.")); } @@ -767,10 +781,10 @@ public KeyPair toEC(boolean includePrivateParameters, Provider provider) { KeyPair realKeyPair; if (includePrivateParameters) { - realKeyPair = new KeyPair(getECPublicKey(ecPoint, aspec, provider), - getECPrivateKey(d, aspec, provider)); + realKeyPair = new KeyPair(getEcPublicKey(ecPoint, aspec, provider), + getEcPrivateKey(d, aspec, provider)); } else { - realKeyPair = new KeyPair(getECPublicKey(ecPoint, aspec, provider), null); + realKeyPair = new KeyPair(getEcPublicKey(ecPoint, aspec, provider), null); } return realKeyPair; @@ -786,23 +800,35 @@ public KeyPair toEC(boolean includePrivateParameters, Provider provider) { * @param provider The Java security provider * @return the JSON web key, converted from EC key pair. */ - public static JsonWebKey fromEC(KeyPair keyPair, Provider provider) { + public static JsonWebKey fromEc(KeyPair keyPair, Provider provider) { ECPublicKey apub = (ECPublicKey) keyPair.getPublic(); ECPoint point = apub.getW(); ECPrivateKey apriv = (ECPrivateKey) keyPair.getPrivate(); if (apriv != null) { - return new JsonWebKey().setKty(KeyType.EC).setCrv(getCurveFromKeyPair(keyPair, provider)) + return new JsonWebKey().setKeyType(KeyType.EC).setCurveName(getCurveFromKeyPair(keyPair, provider)) .setX(point.getAffineX().toByteArray()).setY(point.getAffineY().toByteArray()) - .setD(apriv.getS().toByteArray()).setKty(KeyType.EC); + .setD(apriv.getS().toByteArray()).setKeyType(KeyType.EC); } else { - return new JsonWebKey().setKty(KeyType.EC).setCrv(getCurveFromKeyPair(keyPair, provider)) + return new JsonWebKey().setKeyType(KeyType.EC).setCurveName(getCurveFromKeyPair(keyPair, provider)) .setX(point.getAffineX().toByteArray()).setY(point.getAffineY().toByteArray()) - .setKty(KeyType.EC); + .setKeyType(KeyType.EC); } } + /** + * Converts EC key pair to JSON web key. + * + * @param keyPair The EC key pair + * @param provider The Java security provider + * @param keyOperations The key operations to set. + * @return the JSON web key, converted from EC key pair. + */ + public static JsonWebKey fromEc(KeyPair keyPair, Provider provider, List keyOperations) { + return fromEc(keyPair, provider).setKeyOps(keyOperations); + } + // Matches the curve of the keyPair to supported curves. private static KeyCurveName getCurveFromKeyPair(KeyPair keyPair, Provider provider) { @@ -849,7 +875,18 @@ public static JsonWebKey fromAes(SecretKey secretKey) { return null; } - return new JsonWebKey().setK(secretKey.getEncoded()).setKty(KeyType.OCT); + return new JsonWebKey().setK(secretKey.getEncoded()).setKeyType(KeyType.OCT); + } + + /** + * Converts AES key to JSON web key. + * + * @param secretKey The AES key + * @param keyOperations The key operations to set + * @return the JSON web key, converted from AES key. + */ + public static JsonWebKey fromAes(SecretKey secretKey, List keyOperations) { + return fromAes(secretKey).setKeyOps(keyOperations); } /** @@ -889,11 +926,11 @@ public boolean equals(JsonWebKey jwk) { return false; } - if (!objectEquals(kid, jwk.kid)) { + if (!objectEquals(keyId, jwk.keyId)) { return false; } - if (!objectEquals(kty, jwk.kty)) { + if (!objectEquals(keyType, jwk.keyType)) { return false; } @@ -958,11 +995,11 @@ public boolean equals(JsonWebKey jwk) { */ public boolean hasPrivateKey() { - if (KeyType.OCT.equals(kty)) { + if (KeyType.OCT.equals(keyType)) { return k != null; - } else if (KeyType.RSA.equals(kty) || KeyType.RSA_HSM.equals(kty)) { + } else if (KeyType.RSA.equals(keyType) || KeyType.RSA_HSM.equals(keyType)) { return (d != null && dp != null && dq != null && qi != null && p != null && q != null); - } else if (KeyType.EC.equals(kty) || KeyType.EC_HSM.equals(kty)) { + } else if (KeyType.EC.equals(keyType) || KeyType.EC_HSM.equals(keyType)) { return (d != null); } @@ -976,7 +1013,7 @@ public boolean hasPrivateKey() { */ @JsonIgnore public boolean isValid() { - if (kty == null) { + if (keyType == null) { return false; } @@ -990,15 +1027,15 @@ public boolean isValid() { } } - if (KeyType.OCT.equals(kty)) { + if (KeyType.OCT.equals(keyType)) { return isValidOctet(); - } else if (KeyType.RSA.equals(kty)) { + } else if (KeyType.RSA.equals(keyType)) { return isValidRsa(); - } else if (KeyType.RSA_HSM.equals(kty)) { + } else if (KeyType.RSA_HSM.equals(keyType)) { return isValidRsaHsm(); - } else if (KeyType.EC.equals(kty)) { + } else if (KeyType.EC.equals(keyType)) { return isValidEc(); - } else if (KeyType.EC_HSM.equals(kty)) { + } else if (KeyType.EC_HSM.equals(keyType)) { return isValidEcHsm(); } @@ -1113,19 +1150,19 @@ private static void zeroArray(byte[] bytes) { @Override public int hashCode() { int hashCode = 48313; // setting it to a random prime number - if (kid != null) { - hashCode += kid.hashCode(); + if (keyId != null) { + hashCode += keyId.hashCode(); } - if (KeyType.OCT.equals(kty)) { + if (KeyType.OCT.equals(keyType)) { hashCode += hashCode(k); - } else if (KeyType.RSA.equals(kty)) { + } else if (KeyType.RSA.equals(keyType)) { hashCode += hashCode(n); - } else if (KeyType.EC.equals(kty)) { + } else if (KeyType.EC.equals(keyType)) { hashCode += hashCode(x); hashCode += hashCode(y); hashCode += crv.hashCode(); - } else if (KeyType.RSA_HSM.equals(kty) || KeyType.EC_HSM.equals(kty)) { + } else if (KeyType.RSA_HSM.equals(keyType) || KeyType.EC_HSM.equals(keyType)) { hashCode += hashCode(t); } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/KeyCurveName.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyCurveName.java similarity index 96% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/KeyCurveName.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyCurveName.java index ee9ffed7b6e2..d85d015adbdf 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/KeyCurveName.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyCurveName.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator -package com.azure.security.keyvault.keys.models.webkey; +package com.azure.security.keyvault.keys.models; import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/KeyOperation.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyOperation.java similarity index 96% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/KeyOperation.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyOperation.java index 65a272186db1..9173f0fef252 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/KeyOperation.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyOperation.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.keys.models.webkey; +package com.azure.security.keyvault.keys.models; import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyProperties.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyProperties.java index 3a18c156cea6..fe2fdde69910 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyProperties.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyProperties.java @@ -3,10 +3,7 @@ package com.azure.security.keyvault.keys.models; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; -import com.azure.security.keyvault.keys.models.webkey.KeyCurveName; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; +import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.codec.binary.Base64; @@ -19,6 +16,7 @@ import java.util.List; import java.util.Map; +@Fluent public class KeyProperties { /** @@ -39,17 +37,17 @@ public class KeyProperties { /** * Expiry date in UTC. */ - private OffsetDateTime expires; + private OffsetDateTime expiresOn; /** * Creation time in UTC. */ - private OffsetDateTime created; + private OffsetDateTime createdOn; /** * Last updated time in UTC. */ - private OffsetDateTime updated; + private OffsetDateTime updatedOn; /** * Reflects the deletion recovery level currently in effect for keys in @@ -149,21 +147,18 @@ public KeyProperties setNotBefore(OffsetDateTime notBefore) { * * @return the expires UTC time. */ - public OffsetDateTime getExpires() { - if (this.expires == null) { - return null; - } - return this.expires; + public OffsetDateTime getExpiresOn() { + return this.expiresOn; } /** * Set the {@link OffsetDateTime expires} UTC time. * - * @param expires The expiry time to set for the key. + * @param expiresOn The expiry time to set for the key. * @return the updated KeyProperties object itself. */ - public KeyProperties setExpires(OffsetDateTime expires) { - this.expires = expires; + public KeyProperties setExpiresOn(OffsetDateTime expiresOn) { + this.expiresOn = expiresOn; return this; } @@ -172,8 +167,8 @@ public KeyProperties setExpires(OffsetDateTime expires) { * * @return the created UTC time. */ - public OffsetDateTime getCreated() { - return created; + public OffsetDateTime getCreatedOn() { + return createdOn; } /** @@ -181,8 +176,8 @@ public OffsetDateTime getCreated() { * * @return the last updated UTC time. */ - public OffsetDateTime getUpdated() { - return updated; + public OffsetDateTime getUpdatedOn() { + return updatedOn; } /** @@ -244,9 +239,9 @@ public String getVersion() { void unpackAttributes(Map attributes) { this.enabled = (Boolean) attributes.get("enabled"); this.notBefore = epochToOffsetDateTime(attributes.get("nbf")); - this.expires = epochToOffsetDateTime(attributes.get("exp")); - this.created = epochToOffsetDateTime(attributes.get("created")); - this.updated = epochToOffsetDateTime(attributes.get("updated")); + this.expiresOn = epochToOffsetDateTime(attributes.get("exp")); + this.createdOn = epochToOffsetDateTime(attributes.get("created")); + this.updatedOn = epochToOffsetDateTime(attributes.get("updated")); this.recoveryLevel = (String) attributes.get("recoveryLevel"); this.tags = (Map) lazyValueSelection(attributes.get("tags"), this.tags); this.managed = (Boolean) lazyValueSelection(attributes.get("managed"), this.managed); @@ -297,7 +292,7 @@ JsonWebKey createKeyMaterialFromJson(Map key) { JsonWebKey outputKey = new JsonWebKey() .setY(base64.decode((String) key.get("y"))) .setX(base64.decode((String) key.get("x"))) - .setCrv(KeyCurveName.fromString((String) key.get("crv"))) + .setCurveName(KeyCurveName.fromString((String) key.get("crv"))) .setKeyOps(getKeyOperations((List) key.get("key_ops"))) .setT(base64.decode((String) key.get("key_hsm"))) .setK(base64.decode((String) key.get("k"))) @@ -309,8 +304,8 @@ JsonWebKey createKeyMaterialFromJson(Map key) { .setD(base64.decode((String) key.get("d"))) .setE(base64.decode((String) key.get("e"))) .setN(base64.decode((String) key.get("n"))) - .setKty(KeyType.fromString((String) key.get("kty"))) - .setKid((String) key.get("kid")); + .setKeyType(KeyType.fromString((String) key.get("kty"))) + .setId((String) key.get("kid")); unpackId((String) key.get("kid")); return outputKey; } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/KeyType.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyType.java similarity index 96% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/KeyType.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyType.java index 3c217f513f8f..98b8c7864422 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/KeyType.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyType.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.keys.models.webkey; +package com.azure.security.keyvault.keys.models; import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Key.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyVaultKey.java similarity index 73% rename from sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Key.java rename to sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyVaultKey.java index 7cc72feec819..187b2b7de587 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Key.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyVaultKey.java @@ -3,20 +3,20 @@ package com.azure.security.keyvault.keys.models; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; import java.util.Map; -public class Key { +public class KeyVaultKey { /** * The Json Web Key */ @JsonProperty(value = "key") - private JsonWebKey keyMaterial; + private JsonWebKey key; - Key() { + KeyVaultKey() { properties = new KeyProperties(); } @@ -25,8 +25,8 @@ public class Key { * * @return the key value */ - public JsonWebKey getKeyMaterial() { - return this.keyMaterial; + public JsonWebKey getKey() { + return this.key; } /** @@ -60,13 +60,29 @@ public KeyProperties getProperties() { return this.properties; } + /** + * Get the key type of the key + * @return the key type + */ + public KeyType getKeyType() { + return key.getKeyType(); + } + + /** + * Get the key operations of the key + * @return the key operations + */ + public List getKeyOperations() { + return key.getKeyOps(); + } + /** * Unpacks the key material json response and updates the variables in the Key Base object. * @param key The key value mapping of the key material */ @JsonProperty("key") private void unpackKeyMaterial(Map key) { - keyMaterial = properties.createKeyMaterialFromJson(key); + this.key = properties.createKeyMaterialFromJson(key); } @JsonProperty(value = "kid") diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/package-info.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/package-info.java deleted file mode 100644 index 46fad7900171..000000000000 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/webkey/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -/** - * Package containing classes for key vault JSON web key. - */ -package com.azure.security.keyvault.keys.models.webkey; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/module-info.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/module-info.java index 55fe9165529e..e0f59d6ce7f3 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/module-info.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/module-info.java @@ -9,12 +9,10 @@ exports com.azure.security.keyvault.keys.cryptography; exports com.azure.security.keyvault.keys.cryptography.models; exports com.azure.security.keyvault.keys.models; - exports com.azure.security.keyvault.keys.models.webkey; opens com.azure.security.keyvault.keys to com.fasterxml.jackson.databind; opens com.azure.security.keyvault.keys.cryptography to com.fasterxml.jackson.databind; opens com.azure.security.keyvault.keys.cryptography.models to com.fasterxml.jackson.databind; opens com.azure.security.keyvault.keys.implementation to com.fasterxml.jackson.databind; opens com.azure.security.keyvault.keys.models to com.fasterxml.jackson.databind; - opens com.azure.security.keyvault.keys.models.webkey to com.fasterxml.jackson.databind; } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperations.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperations.java index 4fd7190fc49a..3913b54f9ac7 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperations.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperations.java @@ -3,9 +3,12 @@ package com.azure.security.keyvault.keys; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; +import com.azure.security.keyvault.keys.models.DeletedKey; +import com.azure.security.keyvault.keys.models.KeyVaultKey; +import com.azure.security.keyvault.keys.models.CreateRsaKeyOptions; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.keys.models.Key; -import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; import java.io.File; import java.io.FileOutputStream; @@ -32,14 +35,14 @@ public static void main(String[] args) throws IOException, InterruptedException, // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. KeyClient keyClient = new KeyClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // Let's create a Rsa key valid for 1 year. if the key // already exists in the key vault, then a new version of the key is created. - keyClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey") - .setExpires(OffsetDateTime.now().plusYears(1)) + keyClient.createRsaKey(new CreateRsaKeyOptions("CloudRsaKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1)) .setKeySize(2048)); // Backups are good to have, if in case keys get accidentally deleted by you. @@ -49,7 +52,22 @@ public static void main(String[] args) throws IOException, InterruptedException, writeBackupToFile(keyBackup, backupFilePath); // The Cloud Rsa key is no longer in use, so you delete it. - keyClient.deleteKey("CloudRsaKey"); + Poller rsaDeletedKeyPoller = keyClient.beginDeleteKey("CloudRsaKey"); + + while (rsaDeletedKeyPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS) { + System.out.println(rsaDeletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } + + DeletedKey rsaDeletedKey = rsaDeletedKeyPoller.getLastPollResponse().getValue(); + System.out.println("Deleted Date %s" + rsaDeletedKey.getDeletedOn().toString()); + System.out.printf("Deleted Key's Recovery Id %s", rsaDeletedKey.getRecoveryId()); + + // Key is being deleted on server. + while (rsaDeletedKeyPoller.getStatus() != PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED) { + System.out.println(rsaDeletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } //To ensure key is deleted on server side. Thread.sleep(30000); @@ -62,7 +80,7 @@ public static void main(String[] args) throws IOException, InterruptedException, // After sometime, the key is required again. We can use the backup value to restore it in the key vault. byte[] backupFromFile = Files.readAllBytes(new File(backupFilePath).toPath()); - Key restoredKey = keyClient.restoreKey(backupFromFile); + KeyVaultKey restoredKey = keyClient.restoreKeyBackup(backupFromFile); } private static void writeBackupToFile(byte[] bytes, String filePath) { diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperationsAsync.java index c5afb752eed4..939cee032e4a 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/BackupAndRestoreOperationsAsync.java @@ -3,8 +3,8 @@ package com.azure.security.keyvault.keys; +import com.azure.security.keyvault.keys.models.CreateRsaKeyOptions; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; import java.io.File; import java.io.FileOutputStream; @@ -31,17 +31,17 @@ public static void main(String[] args) throws IOException, InterruptedException, // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. KeyAsyncClient keyAsyncClient = new KeyClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); // Let's create Cloud Rsa key valid for 1 year. if the key // already exists in the key vault, then a new version of the key is created. - keyAsyncClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey") - .setExpires(OffsetDateTime.now().plusYears(1)) + keyAsyncClient.createRsaKey(new CreateRsaKeyOptions("CloudRsaKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1)) .setKeySize(2048)) .subscribe(keyResponse -> - System.out.printf("Key is created with name %s and type %s %n", keyResponse.getName(), keyResponse.getKeyMaterial().getKty())); + System.out.printf("Key is created with name %s and type %s %n", keyResponse.getName(), keyResponse.getKeyType())); Thread.sleep(2000); @@ -56,8 +56,13 @@ public static void main(String[] args) throws IOException, InterruptedException, Thread.sleep(7000); // The Cloud Rsa key is no longer in use, so you delete it. - keyAsyncClient.deleteKey("CloudRsaKey").subscribe(deletedKeyResponse -> - System.out.printf("Deleted Key's Recovery Id %s %n", deletedKeyResponse.getRecoveryId())); + keyAsyncClient.beginDeleteKey("CloudRsaKey") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Delete Key Name: " + pollResponse.getValue().getName()); + System.out.println("Key Delete Date: " + pollResponse.getValue().getDeletedOn().toString()); + }); //To ensure file is deleted on server side. Thread.sleep(30000); @@ -71,7 +76,7 @@ public static void main(String[] args) throws IOException, InterruptedException, // After sometime, the key is required again. We can use the backup value to restore it in the key vault. byte[] backupFromFile = Files.readAllBytes(new File(backupFilePath).toPath()); - keyAsyncClient.restoreKey(backupFromFile).subscribe(keyResponse -> + keyAsyncClient.restoreKeyBackup(backupFromFile).subscribe(keyResponse -> System.out.printf("Restored Key with name %s %n", keyResponse.getName())); //To ensure key is restored on server side. diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorld.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorld.java index 81559e77de57..4927d0e1c747 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorld.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorld.java @@ -5,9 +5,12 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; +import com.azure.security.keyvault.keys.models.CreateRsaKeyOptions; +import com.azure.security.keyvault.keys.models.DeletedKey; +import com.azure.security.keyvault.keys.models.KeyVaultKey; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.keys.models.Key; -import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; import java.time.OffsetDateTime; @@ -29,38 +32,53 @@ public static void main(String[] args) throws InterruptedException, IllegalArgum // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. KeyClient keyClient = new KeyClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // Let's create a Rsa key valid for 1 year. if the key // already exists in the key vault, then a new version of the key is created. - Response createKeyResponse = keyClient.createRsaKeyWithResponse(new RsaKeyCreateOptions("CloudRsaKey") - .setExpires(OffsetDateTime.now().plusYears(1)) + Response createKeyResponse = keyClient.createRsaKeyWithResponse(new CreateRsaKeyOptions("CloudRsaKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1)) .setKeySize(2048), new Context("key1", "value1")); // Let's validate create key operation succeeded using the status code information in the response. System.out.printf("Create Key operation succeeded with status code %s \n", createKeyResponse.getStatusCode()); // Let's Get the Cloud Rsa Key from the key vault. - Key cloudRsaKey = keyClient.getKey("CloudRsaKey"); + KeyVaultKey cloudRsaKey = keyClient.getKey("CloudRsaKey"); System.out.printf("Key is returned with name %s and type %s \n", cloudRsaKey.getName(), - cloudRsaKey.getKeyMaterial().getKty()); + cloudRsaKey.getKeyType()); // After one year, the Cloud Rsa Key is still required, we need to update the expiry time of the key. // The update method can be used to update the expiry attribute of the key. - cloudRsaKey.getProperties().setExpires(cloudRsaKey.getProperties().getExpires().plusYears(1)); - Key updatedKey = keyClient.updateKeyProperties(cloudRsaKey.getProperties()); - System.out.printf("Key's updated expiry time %s \n", updatedKey.getProperties().getExpires()); + cloudRsaKey.getProperties().setExpiresOn(cloudRsaKey.getProperties().getExpiresOn().plusYears(1)); + KeyVaultKey updatedKey = keyClient.updateKeyProperties(cloudRsaKey.getProperties()); + System.out.printf("Key's updated expiry time %s \n", updatedKey.getProperties().getExpiresOn()); // We need the Cloud Rsa key with bigger key size, so you want to update the key in key vault to ensure it has the required size. // Calling createRsaKey on an existing key creates a new version of the key in the key vault with the new specified size. - keyClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey") - .setExpires(OffsetDateTime.now().plusYears(1)) + keyClient.createRsaKey(new CreateRsaKeyOptions("CloudRsaKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1)) .setKeySize(4096)); // The Cloud Rsa Key is no longer needed, need to delete it from the key vault. - keyClient.deleteKey("CloudRsaKey"); + Poller rsaDeletedKeyPoller = keyClient.beginDeleteKey("CloudRsaKey"); + + while (rsaDeletedKeyPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS) { + System.out.println(rsaDeletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } + + DeletedKey rsaDeletedKey = rsaDeletedKeyPoller.getLastPollResponse().getValue(); + System.out.println("Deleted Date %s" + rsaDeletedKey.getDeletedOn().toString()); + System.out.printf("Deleted Key's Recovery Id %s", rsaDeletedKey.getRecoveryId()); + + // Key is being deleted on server. + while (rsaDeletedKeyPoller.getStatus() != PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED) { + System.out.println(rsaDeletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } // To ensure key is deleted on server side. Thread.sleep(30000); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorldAsync.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorldAsync.java index 8b14e5ad3992..a18a249ce58e 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorldAsync.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorldAsync.java @@ -4,9 +4,9 @@ package com.azure.security.keyvault.keys; import com.azure.core.http.rest.Response; +import com.azure.security.keyvault.keys.models.CreateRsaKeyOptions; +import com.azure.security.keyvault.keys.models.KeyVaultKey; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.keys.models.Key; -import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; import java.time.OffsetDateTime; @@ -27,25 +27,25 @@ public static void main(String[] args) throws InterruptedException { // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. KeyAsyncClient keyAsyncClient = new KeyClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); // Let's create Cloud Rsa key valid for 1 year. if the key // already exists in the key vault, then a new version of the key is created. - Response createKeyResponse = keyAsyncClient.createRsaKeyWithResponse(new RsaKeyCreateOptions("CloudRsaKey") - .setExpires(OffsetDateTime.now().plusYears(1)) + Response createKeyResponse = keyAsyncClient.createRsaKeyWithResponse(new CreateRsaKeyOptions("CloudRsaKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1)) .setKeySize(2048)).block(); // Let's validate create key operation succeeded using the status code information in the response. System.out.printf("Create Key operation succeeded with status code %s \n", createKeyResponse.getStatusCode()); - System.out.printf("Key is created with name %s and type %s \n", createKeyResponse.getValue().getName(), createKeyResponse.getValue().getKeyMaterial().getKty()); + System.out.printf("Key is created with name %s and type %s \n", createKeyResponse.getValue().getName(), createKeyResponse.getValue().getKeyType()); Thread.sleep(2000); // Let's Get the Cloud Rsa Key from the key vault. keyAsyncClient.getKey("CloudRsaKey").subscribe(keyResponse -> - System.out.printf("Key returned with name %s and type %s \n", keyResponse.getName(), keyResponse.getKeyMaterial().getKty())); + System.out.printf("Key returned with name %s and type %s \n", keyResponse.getName(), keyResponse.getKeyType())); Thread.sleep(2000); @@ -53,28 +53,33 @@ public static void main(String[] args) throws InterruptedException { // After one year, the Cloud Rsa Key is still required, we need to update the expiry time of the key. // The update method can be used to update the expiry attribute of the key. keyAsyncClient.getKey("CloudRsaKey").subscribe(keyResponse -> { - Key key = keyResponse; + KeyVaultKey key = keyResponse; //Update the expiry time of the key. - key.getProperties().setExpires(key.getProperties().getExpires().plusYears(1)); + key.getProperties().setExpiresOn(key.getProperties().getExpiresOn().plusYears(1)); keyAsyncClient.updateKeyProperties(key.getProperties()).subscribe(updatedKeyResponse -> - System.out.printf("Key's updated expiry time %s \n", updatedKeyResponse.getProperties().getExpires().toString())); + System.out.printf("Key's updated expiry time %s \n", updatedKeyResponse.getProperties().getExpiresOn().toString())); }); Thread.sleep(2000); // We need the Cloud Rsa key with bigger key size, so you want to update the key in key vault to ensure it has the required size. // Calling createRsaKey on an existing key creates a new version of the key in the key vault with the new specified size. - keyAsyncClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey") - .setExpires(OffsetDateTime.now().plusYears(1)) + keyAsyncClient.createRsaKey(new CreateRsaKeyOptions("CloudRsaKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1)) .setKeySize(4096)) .subscribe(keyResponse -> - System.out.printf("Key is created with name %s and type %s \n", keyResponse.getName(), keyResponse.getKeyMaterial().getKty())); + System.out.printf("Key is created with name %s and type %s \n", keyResponse.getName(), keyResponse.getKeyType())); Thread.sleep(2000); // The Cloud Rsa Key is no longer needed, need to delete it from the key vault. - keyAsyncClient.deleteKey("CloudRsaKey").subscribe(deletedKeyResponse -> - System.out.printf("Deleted Key's Recovery Id %s \n", deletedKeyResponse.getRecoveryId())); + keyAsyncClient.beginDeleteKey("CloudRsaKey") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Delete Key Name: " + pollResponse.getValue().getName()); + System.out.println("Key Delete Date: " + pollResponse.getValue().getDeletedOn().toString()); + }); //To ensure key is deleted on server side. Thread.sleep(30000); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java index a31be3596438..887bdd8f383f 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java @@ -9,14 +9,16 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.security.keyvault.keys.implementation.KeyVaultCredentialPolicy; +import com.azure.security.keyvault.keys.models.CreateEcKeyOptions; +import com.azure.security.keyvault.keys.models.CreateKeyOptions; +import com.azure.security.keyvault.keys.models.CreateRsaKeyOptions; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; import com.azure.security.keyvault.keys.models.KeyProperties; -import com.azure.security.keyvault.keys.models.KeyCreateOptions; -import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; -import com.azure.security.keyvault.keys.models.webkey.KeyCurveName; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; +import com.azure.security.keyvault.keys.models.KeyCurveName; +import com.azure.security.keyvault.keys.models.KeyOperation; +import com.azure.security.keyvault.keys.models.KeyType; import reactor.util.context.Context; import java.time.OffsetDateTime; @@ -38,9 +40,9 @@ public final class KeyAsyncClientJavaDocCodeSnippets { public KeyAsyncClient createAsyncClientWithHttpClient() { // BEGIN: com.azure.security.keyvault.keys.async.keyclient.withhttpclient.instantiation KeyAsyncClient keyAsyncClient = new KeyClientBuilder() - .endpoint("https://myvault.azure.net/") - .credential(new DefaultAzureCredentialBuilder().build()) + .vaultUrl("https://myvault.azure.net/") .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) + .addPolicy(new KeyVaultCredentialPolicy(new DefaultAzureCredentialBuilder().build())) .httpClient(HttpClient.createDefault()) .buildAsyncClient(); // END: com.azure.security.keyvault.keys.async.keyclient.withhttpclient.instantiation @@ -54,7 +56,7 @@ public KeyAsyncClient createAsyncClientWithHttpClient() { public KeyAsyncClient createAsyncClient() { // BEGIN: com.azure.security.keyvault.keys.async.keyclient.instantiation KeyAsyncClient keyAsyncClient = new KeyClientBuilder() - .endpoint("https://myvault.azure.net/") + .vaultUrl("https://myvault.azure.net/") .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); // END: com.azure.security.keyvault.keys.async.keyclient.instantiation @@ -67,11 +69,12 @@ public KeyAsyncClient createAsyncClient() { */ public KeyAsyncClient createAsyncClientWithPipeline() { // BEGIN: com.azure.security.keyvault.keys.async.keyclient.pipeline.instantiation - HttpPipeline pipeline = new HttpPipelineBuilder().build(); + HttpPipeline pipeline = new HttpPipelineBuilder() + .policies(new KeyVaultCredentialPolicy(new DefaultAzureCredentialBuilder().build()), new RetryPolicy()) + .build(); KeyAsyncClient keyAsyncClient = new KeyClientBuilder() .pipeline(pipeline) - .endpoint("https://myvault.azure.net/") - .credential(new DefaultAzureCredentialBuilder().build()) + .vaultUrl("https://myvault.azure.net/") .buildAsyncClient(); // END: com.azure.security.keyvault.keys.async.keyclient.pipeline.instantiation return keyAsyncClient; @@ -92,10 +95,10 @@ public void createKey() { // END: com.azure.security.keyvault.keys.async.keyclient.createKey#string-keyType // BEGIN: com.azure.security.keyvault.keys.async.keyclient.createKey#keyCreateOptions - KeyCreateOptions keyCreateOptions = new KeyCreateOptions("keyName", KeyType.RSA) + CreateKeyOptions createKeyOptions = new CreateKeyOptions("keyName", KeyType.RSA) .setNotBefore(OffsetDateTime.now().plusDays(1)) - .setExpires(OffsetDateTime.now().plusYears(1)); - keyAsyncClient.createKey(keyCreateOptions) + .setExpiresOn(OffsetDateTime.now().plusYears(1)); + keyAsyncClient.createKey(createKeyOptions) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(keyResponse -> System.out.printf("Key is created with name %s and id %s %n", keyResponse.getName(), @@ -103,11 +106,11 @@ public void createKey() { // END: com.azure.security.keyvault.keys.async.keyclient.createKey#keyCreateOptions // BEGIN: com.azure.security.keyvault.keys.async.keyclient.createRsaKey#RsaKeyCreateOptions - RsaKeyCreateOptions rsaKeyCreateOptions = new RsaKeyCreateOptions("keyName") + CreateRsaKeyOptions createRsaKeyOptions = new CreateRsaKeyOptions("keyName") .setKeySize(2048) .setNotBefore(OffsetDateTime.now().plusDays(1)) - .setExpires(OffsetDateTime.now().plusYears(1)); - keyAsyncClient.createRsaKey(rsaKeyCreateOptions) + .setExpiresOn(OffsetDateTime.now().plusYears(1)); + keyAsyncClient.createRsaKey(createRsaKeyOptions) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(keyResponse -> System.out.printf("Key is created with name %s and id %s %n", keyResponse.getName(), @@ -115,11 +118,11 @@ public void createKey() { // END: com.azure.security.keyvault.keys.async.keyclient.createRsaKey#RsaKeyCreateOptions // BEGIN: com.azure.security.keyvault.keys.async.keyclient.createEcKey#EcKeyCreateOptions - EcKeyCreateOptions ecKeyCreateOptions = new EcKeyCreateOptions("keyName") - .setCurve(KeyCurveName.P_384) + CreateEcKeyOptions createEcKeyOptions = new CreateEcKeyOptions("keyName") + .setCurveName(KeyCurveName.P_384) .setNotBefore(OffsetDateTime.now().plusDays(1)) - .setExpires(OffsetDateTime.now().plusYears(1)); - keyAsyncClient.createEcKey(ecKeyCreateOptions) + .setExpiresOn(OffsetDateTime.now().plusYears(1)); + keyAsyncClient.createEcKey(createEcKeyOptions) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(keyResponse -> System.out.printf("Key is created with name %s and id %s %n", keyResponse.getName(), @@ -128,15 +131,18 @@ public void createKey() { } /** - * Generates a code sample for using {@link KeyAsyncClient#deleteKey(String)} + * Generates a code sample for using {@link KeyAsyncClient#beginDeleteKey(String)} */ public void deleteKeySnippets() { KeyAsyncClient keyAsyncClient = createAsyncClient(); // BEGIN: com.azure.security.keyvault.keys.async.keyclient.deleteKey#string - keyAsyncClient.deleteKey("keyName") - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(keyResponse -> - System.out.printf("Deleted Key's Recovery Id %s", keyResponse.getRecoveryId())); + keyAsyncClient.beginDeleteKey("keyName") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Delete Key Name: " + pollResponse.getValue().getName()); + System.out.println("Key Delete Date: " + pollResponse.getValue().getDeletedOn().toString()); + }); // END: com.azure.security.keyvault.keys.async.keyclient.deleteKey#string } @@ -154,15 +160,15 @@ public void getDeletedKeySnippets() { } /** - * Generates a code sample for using {@link KeyAsyncClient#createKeyWithResponse(KeyCreateOptions)} + * Generates a code sample for using {@link KeyAsyncClient#createKeyWithResponse(CreateKeyOptions)} */ public void createKeyWithResponses() { KeyAsyncClient keyAsyncClient = createAsyncClient(); // BEGIN: com.azure.security.keyvault.keys.async.keyclient.createKeyWithResponse#keyCreateOptions - KeyCreateOptions keyCreateOptions = new KeyCreateOptions("keyName", KeyType.RSA) + CreateKeyOptions createKeyOptions = new CreateKeyOptions("keyName", KeyType.RSA) .setNotBefore(OffsetDateTime.now().plusDays(1)) - .setExpires(OffsetDateTime.now().plusYears(1)); - keyAsyncClient.createKeyWithResponse(keyCreateOptions) + .setExpiresOn(OffsetDateTime.now().plusYears(1)); + keyAsyncClient.createKeyWithResponse(createKeyOptions) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(keyResponse -> System.out.printf("Key is created with name %s and id %s %n", keyResponse.getValue().getName(), @@ -170,11 +176,11 @@ public void createKeyWithResponses() { // END: com.azure.security.keyvault.keys.async.keyclient.createKeyWithResponse#keyCreateOptions // BEGIN: com.azure.security.keyvault.keys.async.keyclient.createRsaKeyWithResponse#RsaKeyCreateOptions - RsaKeyCreateOptions rsaKeyCreateOptions = new RsaKeyCreateOptions("keyName") + CreateRsaKeyOptions createRsaKeyOptions = new CreateRsaKeyOptions("keyName") .setKeySize(2048) .setNotBefore(OffsetDateTime.now().plusDays(1)) - .setExpires(OffsetDateTime.now().plusYears(1)); - keyAsyncClient.createRsaKeyWithResponse(rsaKeyCreateOptions) + .setExpiresOn(OffsetDateTime.now().plusYears(1)); + keyAsyncClient.createRsaKeyWithResponse(createRsaKeyOptions) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(keyResponse -> System.out.printf("Key is created with name %s and id %s %n", keyResponse.getValue().getName(), @@ -182,11 +188,11 @@ public void createKeyWithResponses() { // END: com.azure.security.keyvault.keys.async.keyclient.createRsaKeyWithResponse#RsaKeyCreateOptions // BEGIN: com.azure.security.keyvault.keys.async.keyclient.createEcKeyWithResponse#EcKeyCreateOptions - EcKeyCreateOptions ecKeyCreateOptions = new EcKeyCreateOptions("keyName") - .setCurve(KeyCurveName.P_384) + CreateEcKeyOptions createEcKeyOptions = new CreateEcKeyOptions("keyName") + .setCurveName(KeyCurveName.P_384) .setNotBefore(OffsetDateTime.now().plusDays(1)) - .setExpires(OffsetDateTime.now().plusYears(1)); - keyAsyncClient.createEcKeyWithResponse(ecKeyCreateOptions) + .setExpiresOn(OffsetDateTime.now().plusYears(1)); + keyAsyncClient.createEcKeyWithResponse(createEcKeyOptions) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(keyResponse -> System.out.printf("Key is created with name %s and id %s %n", keyResponse.getValue().getName(), @@ -207,15 +213,6 @@ public void getKeyWithResponseSnippets() { System.out.printf("Key is created with name %s and id %s %n", keyResponse.getValue().getName(), keyResponse.getValue().getId())); // END: com.azure.security.keyvault.keys.async.keyclient.getKeyWithResponse#string-string - - // BEGIN: com.azure.security.keyvault.keys.async.keyclient.getKeyWithResponse#KeyProperties - keyAsyncClient.listKeys().subscribe(keyProperties -> - keyAsyncClient.getKeyWithResponse(keyProperties) - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(keyResponse -> - System.out.printf("Key with name %s and value %s %n", keyResponse.getValue().getName(), - keyResponse.getValue().getId()))); - // END: com.azure.security.keyvault.keys.async.keyclient.getKeyWithResponse#KeyProperties } /** @@ -239,14 +236,6 @@ public void getKeySnippets() { System.out.printf("Key is created with name %s and id %s %n", keyResponse.getName(), keyResponse.getId())); // END: com.azure.security.keyvault.keys.async.keyclient.getKey#string - - // BEGIN: com.azure.security.keyvault.keys.async.keyclient.getKey#KeyProperties - keyAsyncClient.listKeys().subscribe(keyProperties -> - keyAsyncClient.getKey(keyProperties) - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(keyResponse -> - System.out.printf("Key with name %s and value %s %n", keyResponse.getName(), keyResponse.getId()))); - // END: com.azure.security.keyvault.keys.async.keyclient.getKey#KeyProperties } /** @@ -304,19 +293,6 @@ public void updateKeySnippets() { // END: com.azure.security.keyvault.keys.async.keyclient.updateKeyProperties#KeyProperties } - /** - * Generates a code sample for using {@link KeyAsyncClient#deleteKeyWithResponse(String)} - */ - public void deleteKeyWithResponseSnippets() { - KeyAsyncClient keyAsyncClient = createAsyncClient(); - // BEGIN: com.azure.security.keyvault.keys.async.keyclient.deleteKeyWithResponse#string - keyAsyncClient.deleteKeyWithResponse("keyName") - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(deletedKeyResponse -> - System.out.printf("Deleted Key's Recovery Id %s", deletedKeyResponse.getValue().getRecoveryId())); - // END: com.azure.security.keyvault.keys.async.keyclient.deleteKeyWithResponse#string - } - /** * Generates a code sample for using {@link KeyAsyncClient#getDeletedKeyWithResponse(String)} */ @@ -356,28 +332,18 @@ public void purgeDeletedKeyWithResponseSnippets() { } /** - * Generates a code sample for using {@link KeyAsyncClient#recoverDeletedKeyWithResponse(String)} - */ - public void recoverDeletedKeyWithResponseSnippets() { - KeyAsyncClient keyAsyncClient = createAsyncClient(); - // BEGIN: com.azure.security.keyvault.keys.async.keyclient.recoverDeletedKeyWithResponse#string - keyAsyncClient.recoverDeletedKeyWithResponse("deletedKeyName") - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(recoveredKeyResponse -> - System.out.printf("Recovered Key with name %s %n", recoveredKeyResponse.getValue().getName())); - // END: com.azure.security.keyvault.keys.async.keyclient.recoverDeletedKeyWithResponse#string - } - - /** - * Generates a code sample for using {@link KeyAsyncClient#recoverDeletedKey(String)} + * Generates a code sample for using {@link KeyAsyncClient#beginRecoverDeletedKey(String)} */ public void recoverDeletedKeySnippets() { KeyAsyncClient keyAsyncClient = createAsyncClient(); // BEGIN: com.azure.security.keyvault.keys.async.keyclient.recoverDeletedKey#string - keyAsyncClient.recoverDeletedKey("deletedKeyName") - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(recoveredKeyResponse -> - System.out.printf("Recovered Key with name %s %n", recoveredKeyResponse.getName())); + keyAsyncClient.beginRecoverDeletedKey("deletedKeyName") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Recovery Status: " + pollResponse.getStatus().toString()); + System.out.println("Recover Key Name: " + pollResponse.getValue().getName()); + System.out.println("Recover Key Type: " + pollResponse.getValue().getKeyType()); + }); // END: com.azure.security.keyvault.keys.async.keyclient.recoverDeletedKey#string } @@ -408,47 +374,47 @@ public void backupKeyWithResponseSnippets() { } /** - * Generates a code sample for using {@link KeyAsyncClient#restoreKey} + * Generates a code sample for using {@link KeyAsyncClient#restoreKeyBackup} */ public void restoreKeySnippets() { KeyAsyncClient keyAsyncClient = createAsyncClient(); - // BEGIN: com.azure.security.keyvault.keys.async.keyclient.restoreKey#byte + // BEGIN: com.azure.security.keyvault.keys.async.keyclient.restoreKeyBackup#byte byte[] keyBackupByteArray = {}; - keyAsyncClient.restoreKey(keyBackupByteArray) + keyAsyncClient.restoreKeyBackup(keyBackupByteArray) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(keyResponse -> System.out.printf("Restored Key with name %s and id %s %n", keyResponse.getName(), keyResponse.getId())); - // END: com.azure.security.keyvault.keys.async.keyclient.restoreKey#byte + // END: com.azure.security.keyvault.keys.async.keyclient.restoreKeyBackup#byte } /** - * Generates a code sample for using {@link KeyAsyncClient#restoreKeyWithResponse(byte[])} + * Generates a code sample for using {@link KeyAsyncClient#restoreKeyBackupWithResponse(byte[])} */ public void restoreKeyWithResponseSnippets() { KeyAsyncClient keyAsyncClient = createAsyncClient(); - // BEGIN: com.azure.security.keyvault.keys.async.keyclient.restoreKeyWithResponse#byte + // BEGIN: com.azure.security.keyvault.keys.async.keyclient.restoreKeyBackupWithResponse#byte byte[] keyBackupByteArray = {}; - keyAsyncClient.restoreKeyWithResponse(keyBackupByteArray) + keyAsyncClient.restoreKeyBackupWithResponse(keyBackupByteArray) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(keyResponse -> System.out.printf("Restored Key with name %s and id %s %n", keyResponse.getValue().getName(), keyResponse.getValue().getId())); - // END: com.azure.security.keyvault.keys.async.keyclient.restoreKeyWithResponse#byte + // END: com.azure.security.keyvault.keys.async.keyclient.restoreKeyBackupWithResponse#byte } /** - * Generates a code sample for using {@link KeyAsyncClient#listKeys} + * Generates a code sample for using {@link KeyAsyncClient#listPropertiesOfKeys} */ public void listKeySnippets() { KeyAsyncClient keyAsyncClient = createAsyncClient(); // BEGIN: com.azure.security.keyvault.keys.async.keyclient.listKeys - keyAsyncClient.listKeys() + keyAsyncClient.listPropertiesOfKeys() .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(keyProperties -> keyAsyncClient.getKey(keyProperties) + .subscribe(keyProperties -> keyAsyncClient.getKey(keyProperties.getName(), keyProperties.getVersion()) .subscribe(keyResponse -> System.out.printf("Received key with name %s and type %s", keyResponse.getName(), - keyResponse.getKeyMaterial().getKty()))); + keyResponse.getKeyType()))); // END: com.azure.security.keyvault.keys.async.keyclient.listKeys } @@ -466,18 +432,18 @@ public void listDeletedKeysSnippets() { } /** - * Generates code sample for using {@link KeyAsyncClient#listKeyVersions(String)} + * Generates code sample for using {@link KeyAsyncClient#listPropertiesOfKeyVersions(String)} */ public void listKeyVersions() { KeyAsyncClient keyAsyncClient = createAsyncClient(); // BEGIN: com.azure.security.keyvault.keys.async.keyclient.listKeyVersions - keyAsyncClient.listKeyVersions("keyName") + keyAsyncClient.listPropertiesOfKeyVersions("keyName") .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(keyProperties -> keyAsyncClient.getKey(keyProperties) + .subscribe(keyProperties -> keyAsyncClient.getKey(keyProperties.getName(), keyProperties.getVersion()) .subscribe(keyResponse -> System.out.printf("Received key's version with name %s, type %s and version %s", keyResponse.getName(), - keyResponse.getKeyMaterial().getKty(), keyResponse.getProperties().getVersion()))); + keyResponse.getKeyType(), keyResponse.getProperties().getVersion()))); // END: com.azure.security.keyvault.keys.async.keyclient.listKeyVersions } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyClientJavaDocCodeSnippets.java index a362703af2fa..96f1c4dea2f1 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyClientJavaDocCodeSnippets.java @@ -6,16 +6,18 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; import com.azure.security.keyvault.keys.models.DeletedKey; -import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; -import com.azure.security.keyvault.keys.models.Key; -import com.azure.security.keyvault.keys.models.KeyCreateOptions; -import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; -import com.azure.security.keyvault.keys.models.webkey.KeyCurveName; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; +import com.azure.security.keyvault.keys.models.CreateEcKeyOptions; +import com.azure.security.keyvault.keys.models.KeyVaultKey; +import com.azure.security.keyvault.keys.models.CreateKeyOptions; +import com.azure.security.keyvault.keys.models.CreateRsaKeyOptions; +import com.azure.security.keyvault.keys.models.KeyCurveName; +import com.azure.security.keyvault.keys.models.KeyOperation; +import com.azure.security.keyvault.keys.models.KeyType; import com.azure.security.keyvault.keys.models.KeyProperties; +import com.azure.identity.DefaultAzureCredentialBuilder; import java.time.OffsetDateTime; @@ -36,7 +38,7 @@ public final class KeyClientJavaDocCodeSnippets { public KeyClient createClient() { // BEGIN: com.azure.security.keyvault.keys.keyclient.instantiation KeyClient keyClient = new KeyClientBuilder() - .endpoint("https://myvault.azure.net/") + .vaultUrl("https://myvault.azure.net/") .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // END: com.azure.security.keyvault.keys.keyclient.instantiation @@ -49,33 +51,33 @@ public KeyClient createClient() { public void createKey() { KeyClient keyClient = createClient(); // BEGIN: com.azure.keyvault.keys.keyclient.createKey#string-keyType - Key key = keyClient.createKey("keyName", KeyType.EC); + KeyVaultKey key = keyClient.createKey("keyName", KeyType.EC); System.out.printf("Key is created with name %s and id %s %n", key.getName(), key.getId()); // END: com.azure.keyvault.keys.keyclient.createKey#string-keyType // BEGIN: com.azure.keyvault.keys.keyclient.createKey#keyOptions - KeyCreateOptions keyCreateOptions = new KeyCreateOptions("keyName", KeyType.RSA) + CreateKeyOptions createKeyOptions = new CreateKeyOptions("keyName", KeyType.RSA) .setNotBefore(OffsetDateTime.now().plusDays(1)) - .setExpires(OffsetDateTime.now().plusYears(1)); - Key optionsKey = keyClient.createKey(keyCreateOptions); + .setExpiresOn(OffsetDateTime.now().plusYears(1)); + KeyVaultKey optionsKey = keyClient.createKey(createKeyOptions); System.out.printf("Key is created with name %s and id %s %n", optionsKey.getName(), optionsKey.getId()); // END: com.azure.keyvault.keys.keyclient.createKey#keyOptions // BEGIN: com.azure.keyvault.keys.keyclient.createRsaKey#keyOptions - RsaKeyCreateOptions rsaKeyCreateOptions = new RsaKeyCreateOptions("keyName") + CreateRsaKeyOptions createRsaKeyOptions = new CreateRsaKeyOptions("keyName") .setKeySize(2048) .setNotBefore(OffsetDateTime.now().plusDays(1)) - .setExpires(OffsetDateTime.now().plusYears(1)); - Key rsaKey = keyClient.createRsaKey(rsaKeyCreateOptions); + .setExpiresOn(OffsetDateTime.now().plusYears(1)); + KeyVaultKey rsaKey = keyClient.createRsaKey(createRsaKeyOptions); System.out.printf("Key is created with name %s and id %s %n", rsaKey.getName(), rsaKey.getId()); // END: com.azure.keyvault.keys.keyclient.createRsaKey#keyOptions // BEGIN: com.azure.keyvault.keys.keyclient.createEcKey#keyOptions - EcKeyCreateOptions ecKeyCreateOptions = new EcKeyCreateOptions("keyName") - .setCurve(KeyCurveName.P_384) + CreateEcKeyOptions createEcKeyOptions = new CreateEcKeyOptions("keyName") + .setCurveName(KeyCurveName.P_384) .setNotBefore(OffsetDateTime.now().plusDays(1)) - .setExpires(OffsetDateTime.now().plusYears(1)); - Key ecKey = keyClient.createEcKey(ecKeyCreateOptions); + .setExpiresOn(OffsetDateTime.now().plusYears(1)); + KeyVaultKey ecKey = keyClient.createEcKey(createEcKeyOptions); System.out.printf("Key is created with name %s and id %s %n", ecKey.getName(), ecKey.getId()); // END: com.azure.keyvault.keys.keyclient.createEcKey#keyOptions @@ -83,14 +85,29 @@ public void createKey() { } /** - * Generates a code sample for using {@link KeyClient#deleteKey(String)} + * Generates a code sample for using {@link KeyClient#beginDeleteKey(String)} + * @throws InterruptedException when the thread is interrupted in sleep mode. */ - public void deleteKeySnippets() { + public void deleteKeySnippets() throws InterruptedException { KeyClient keyClient = createClient(); // BEGIN: com.azure.keyvault.keys.keyclient.deleteKey#string - Key key = keyClient.getKey("keyName"); - DeletedKey deletedKey = keyClient.deleteKey("keyName"); + Poller deletedKeyPoller = keyClient.beginDeleteKey("keyName"); + + while (deletedKeyPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS) { + System.out.println(deletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } + + DeletedKey deletedKey = deletedKeyPoller.getLastPollResponse().getValue(); + System.out.println("Deleted Date %s" + deletedKey.getDeletedOn().toString()); System.out.printf("Deleted Key's Recovery Id %s", deletedKey.getRecoveryId()); + + // Key is being deleted on server. + while (!deletedKeyPoller.isComplete()) { + System.out.println(deletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } + // Key is deleted // END: com.azure.keyvault.keys.keyclient.deleteKey#string } @@ -106,33 +123,33 @@ public void getDeletedKeySnippets() { } /** - * Generates a code sample for using {@link KeyClient#createKeyWithResponse(KeyCreateOptions, Context)} + * Generates a code sample for using {@link KeyClient#createKeyWithResponse(CreateKeyOptions, Context)} */ public void createKeyWithResponses() { KeyClient keyClient = createClient(); // BEGIN: com.azure.keyvault.keys.keyclient.createKeyWithResponse#keyCreateOptions-Context - KeyCreateOptions keyCreateOptions = new KeyCreateOptions("keyName", KeyType.RSA) + CreateKeyOptions createKeyOptions = new CreateKeyOptions("keyName", KeyType.RSA) .setNotBefore(OffsetDateTime.now().plusDays(1)) - .setExpires(OffsetDateTime.now().plusYears(1)); - Key optionsKey = keyClient.createKeyWithResponse(keyCreateOptions, new Context(key1, value1)).getValue(); + .setExpiresOn(OffsetDateTime.now().plusYears(1)); + KeyVaultKey optionsKey = keyClient.createKeyWithResponse(createKeyOptions, new Context(key1, value1)).getValue(); System.out.printf("Key is created with name %s and id %s %n", optionsKey.getName(), optionsKey.getId()); // END: com.azure.keyvault.keys.keyclient.createKeyWithResponse#keyCreateOptions-Context // BEGIN: com.azure.keyvault.keys.keyclient.createRsaKeyWithResponse#keyOptions-Context - RsaKeyCreateOptions rsaKeyCreateOptions = new RsaKeyCreateOptions("keyName") + CreateRsaKeyOptions createRsaKeyOptions = new CreateRsaKeyOptions("keyName") .setKeySize(2048) .setNotBefore(OffsetDateTime.now().plusDays(1)) - .setExpires(OffsetDateTime.now().plusYears(1)); - Key rsaKey = keyClient.createRsaKeyWithResponse(rsaKeyCreateOptions, new Context(key1, value1)).getValue(); + .setExpiresOn(OffsetDateTime.now().plusYears(1)); + KeyVaultKey rsaKey = keyClient.createRsaKeyWithResponse(createRsaKeyOptions, new Context(key1, value1)).getValue(); System.out.printf("Key is created with name %s and id %s %n", rsaKey.getName(), rsaKey.getId()); // END: com.azure.keyvault.keys.keyclient.createRsaKeyWithResponse#keyOptions-Context // BEGIN: com.azure.keyvault.keys.keyclient.createEcKeyWithResponse#keyOptions-Context - EcKeyCreateOptions ecKeyCreateOptions = new EcKeyCreateOptions("keyName") - .setCurve(KeyCurveName.P_384) + CreateEcKeyOptions createEcKeyOptions = new CreateEcKeyOptions("keyName") + .setCurveName(KeyCurveName.P_384) .setNotBefore(OffsetDateTime.now().plusDays(1)) - .setExpires(OffsetDateTime.now().plusYears(1)); - Key ecKey = keyClient.createEcKeyWithResponse(ecKeyCreateOptions, new Context(key1, value1)).getValue(); + .setExpiresOn(OffsetDateTime.now().plusYears(1)); + KeyVaultKey ecKey = keyClient.createEcKeyWithResponse(createEcKeyOptions, new Context(key1, value1)).getValue(); System.out.printf("Key is created with name %s and id %s %n", ecKey.getName(), ecKey.getId()); // END: com.azure.keyvault.keys.keyclient.createEcKeyWithResponse#keyOptions-Context } @@ -144,19 +161,11 @@ public void getKeyWithResponseSnippets() { KeyClient keyClient = createClient(); // BEGIN: com.azure.keyvault.keys.keyclient.getKeyWithResponse#string-string-Context String keyVersion = "6A385B124DEF4096AF1361A85B16C204"; - Key keyWithVersion = keyClient.getKeyWithResponse("keyName", keyVersion, + KeyVaultKey keyWithVersion = keyClient.getKeyWithResponse("keyName", keyVersion, new Context(key1, value1)).getValue(); System.out.printf("Key is returned with name %s and id %s %n", keyWithVersion.getName(), keyWithVersion.getId()); // END: com.azure.keyvault.keys.keyclient.getKeyWithResponse#string-string-Context - - // BEGIN: com.azure.keyvault.keys.keyclient.getKeyWithResponse#KeyProperties-Context - for (KeyProperties key : keyClient.listKeys()) { - Key keyResponse = keyClient.getKeyWithResponse(key, new Context(key1, value1)).getValue(); - System.out.printf("Received key with name %s and type %s", keyResponse.getName(), - keyResponse.getKeyMaterial().getKty()); - } - // END: com.azure.keyvault.keys.keyclient.getKeyWithResponse#KeyProperties-Context } /** @@ -166,24 +175,16 @@ public void getKeySnippets() { KeyClient keyClient = createClient(); // BEGIN: com.azure.keyvault.keys.keyclient.getKey#string-string String keyVersion = "6A385B124DEF4096AF1361A85B16C204"; - Key keyWithVersion = keyClient.getKey("keyName", keyVersion); + KeyVaultKey keyWithVersion = keyClient.getKey("keyName", keyVersion); System.out.printf("Key is returned with name %s and id %s %n", keyWithVersion.getName(), keyWithVersion.getId()); // END: com.azure.keyvault.keys.keyclient.getKey#string-string // BEGIN: com.azure.keyvault.keys.keyclient.getKey#string - Key keyWithVersionValue = keyClient.getKey("keyName"); + KeyVaultKey keyWithVersionValue = keyClient.getKey("keyName"); System.out.printf("Key is returned with name %s and id %s %n", keyWithVersionValue.getName(), keyWithVersionValue.getId()); // END: com.azure.keyvault.keys.keyclient.getKey#string - - // BEGIN: com.azure.keyvault.keys.keyclient.getKey#KeyProperties - for (KeyProperties key : keyClient.listKeys()) { - Key keyResponse = keyClient.getKey(key); - System.out.printf("Received key with name %s and type %s", keyResponse.getName(), - keyResponse.getKeyMaterial().getKty()); - } - // END: com.azure.keyvault.keys.keyclient.getKey#KeyProperties } /** @@ -193,9 +194,9 @@ public void updateKeyWithResponseSnippets() { KeyClient keyClient = createClient(); // BEGIN: com.azure.keyvault.keys.keyclient.updateKeyPropertiesWithResponse#KeyProperties-keyOperations-Context - Key key = keyClient.getKey("keyName"); - key.getProperties().setExpires(OffsetDateTime.now().plusDays(60)); - Key updatedKey = keyClient.updateKeyPropertiesWithResponse(key.getProperties(), + KeyVaultKey key = keyClient.getKey("keyName"); + key.getProperties().setExpiresOn(OffsetDateTime.now().plusDays(60)); + KeyVaultKey updatedKey = keyClient.updateKeyPropertiesWithResponse(key.getProperties(), new Context(key1, value1), KeyOperation.ENCRYPT, KeyOperation.DECRYPT).getValue(); System.out.printf("Key is updated with name %s and id %s %n", updatedKey.getName(), updatedKey.getId()); // END: com.azure.keyvault.keys.keyclient.updateKeyPropertiesWithResponse#KeyProperties-keyOperations-Context @@ -208,26 +209,14 @@ public void updateKeySnippets() { KeyClient keyClient = createClient(); // BEGIN: com.azure.keyvault.keys.keyclient.updateKeyProperties#KeyProperties-keyOperations - Key key = keyClient.getKey("keyName"); - key.getProperties().setExpires(OffsetDateTime.now().plusDays(60)); - Key updatedKey = keyClient.updateKeyProperties(key.getProperties(), KeyOperation.ENCRYPT, KeyOperation.DECRYPT); + KeyVaultKey key = keyClient.getKey("keyName"); + key.getProperties().setExpiresOn(OffsetDateTime.now().plusDays(60)); + KeyVaultKey updatedKey = keyClient.updateKeyProperties(key.getProperties(), KeyOperation.ENCRYPT, + KeyOperation.DECRYPT); System.out.printf("Key is updated with name %s and id %s %n", updatedKey.getName(), updatedKey.getId()); // END: com.azure.keyvault.keys.keyclient.updateKeyProperties#KeyProperties-keyOperations } - /** - * Generates a code sample for using {@link KeyClient#deleteKeyWithResponse(String, Context)} - */ - public void deleteKeyWithResponseSnippets() { - KeyClient keyClient = createClient(); - // BEGIN: com.azure.keyvault.keys.keyclient.deleteKeyWithResponse#string-Context - Key key = keyClient.getKey("keyName"); - DeletedKey deletedKey = keyClient.deleteKeyWithResponse("keyName", new Context(key1, value1)) - .getValue(); - System.out.printf("Deleted Key's Recovery Id %s", deletedKey.getRecoveryId()); - // END: com.azure.keyvault.keys.keyclient.deleteKeyWithResponse#string-Context - } - /** * Generates a code sample for using {@link KeyClient#getDeletedKeyWithResponse(String, Context)} */ @@ -264,25 +253,29 @@ public void purgeDeletedKeyWithResponseSnippets() { } /** - * Generates a code sample for using {@link KeyClient#recoverDeletedKeyWithResponse(String, Context)} - */ - public void recoverDeletedKeyWithResponseSnippets() { - KeyClient keyClient = createClient(); - // BEGIN: com.azure.keyvault.keys.keyclient.recoverDeletedKeyWithResponse#string-Context - Key recoveredKey = keyClient.recoverDeletedKeyWithResponse("deletedKeyName", - new Context(key2, value2)).getValue(); - System.out.printf("Recovered key with name %s", recoveredKey.getName()); - // END: com.azure.keyvault.keys.keyclient.recoverDeletedKeyWithResponse#string-Context - } - - /** - * Generates a code sample for using {@link KeyClient#recoverDeletedKey(String)} + * Generates a code sample for using {@link KeyClient#beginRecoverDeletedKey(String)} + * @throws InterruptedException when the thread is interrupted in sleep mode. */ - public void recoverDeletedKeySnippets() { + public void recoverDeletedKeySnippets() throws InterruptedException { KeyClient keyClient = createClient(); // BEGIN: com.azure.keyvault.keys.keyclient.recoverDeletedKey#string - Key recoveredKey = keyClient.recoverDeletedKey("deletedKeyName"); - System.out.printf("Recovered key with name %s", recoveredKey.getName()); + Poller recoverKeyPoller = keyClient.beginRecoverDeletedKey("deletedKeyName"); + + while (recoverKeyPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS) { + System.out.println(recoverKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } + + KeyVaultKey recoveredKey = recoverKeyPoller.getLastPollResponse().getValue(); + System.out.println("Recovered Key Name %s" + recoveredKey.getName()); + System.out.printf("Recovered Key's Id %s", recoveredKey.getId()); + + // Key is being recovered on server. + while (recoverKeyPoller.getStatus() != PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED) { + System.out.println(recoverKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } + // Key is recovered // END: com.azure.keyvault.keys.keyclient.recoverDeletedKey#string } @@ -309,59 +302,60 @@ public void backupKeyWithResponseSnippets() { } /** - * Generates a code sample for using {@link KeyClient#restoreKey} + * Generates a code sample for using {@link KeyClient#restoreKeyBackup} */ public void restoreKeySnippets() { KeyClient keyClient = createClient(); - // BEGIN: com.azure.keyvault.keys.keyclient.restoreKey#byte + // BEGIN: com.azure.keyvault.keys.keyclient.restoreKeyBackup#byte byte[] keyBackupByteArray = {}; - Key keyResponse = keyClient.restoreKey(keyBackupByteArray); + KeyVaultKey keyResponse = keyClient.restoreKeyBackup(keyBackupByteArray); System.out.printf("Restored Key with name %s and id %s %n", keyResponse.getName(), keyResponse.getId()); - // END: com.azure.keyvault.keys.keyclient.restoreKey#byte + // END: com.azure.keyvault.keys.keyclient.restoreKeyBackup#byte } /** - * Generates a code sample for using {@link KeyClient#restoreKeyWithResponse(byte[], Context)} + * Generates a code sample for using {@link KeyClient#restoreKeyBackupWithResponse(byte[], Context)} */ public void restoreKeyWithResponseSnippets() { KeyClient keyClient = createClient(); - // BEGIN: com.azure.keyvault.keys.keyclient.restoreKeyWithResponse#byte-Context + // BEGIN: com.azure.keyvault.keys.keyclient.restoreKeyBackupWithResponse#byte-Context byte[] keyBackupByteArray = {}; - Response keyResponse = keyClient.restoreKeyWithResponse(keyBackupByteArray, new Context(key1, value1)); + Response keyResponse = keyClient.restoreKeyBackupWithResponse(keyBackupByteArray, + new Context(key1, value1)); System.out.printf("Restored Key with name %s and id %s %n", keyResponse.getValue().getName(), keyResponse.getValue().getId()); - // END: com.azure.keyvault.keys.keyclient.restoreKeyWithResponse#byte-Context + // END: com.azure.keyvault.keys.keyclient.restoreKeyBackupWithResponse#byte-Context } /** - * Generates a code sample for using {@link KeyClient#listKeys} + * Generates a code sample for using {@link KeyClient#listPropertiesOfKeys} */ public void listKeySnippets() { KeyClient keyClient = createClient(); // BEGIN: com.azure.keyvault.keys.keyclient.listKeys - for (KeyProperties key : keyClient.listKeys()) { - Key keyWithMaterial = keyClient.getKey(key); + for (KeyProperties key : keyClient.listPropertiesOfKeys()) { + KeyVaultKey keyWithMaterial = keyClient.getKey(key.getName(), key.getVersion()); System.out.printf("Received key with name %s and type %s", keyWithMaterial.getName(), - keyWithMaterial.getKeyMaterial().getKty()); + keyWithMaterial.getKeyType()); } // END: com.azure.keyvault.keys.keyclient.listKeys // BEGIN: com.azure.keyvault.keys.keyclient.listKeys#Context - for (KeyProperties key : keyClient.listKeys(new Context(key2, value2))) { - Key keyWithMaterial = keyClient.getKey(key); + for (KeyProperties key : keyClient.listPropertiesOfKeys(new Context(key2, value2))) { + KeyVaultKey keyWithMaterial = keyClient.getKey(key.getName(), key.getVersion()); System.out.printf("Received key with name %s and type %s", keyWithMaterial.getName(), - keyWithMaterial.getKeyMaterial().getKty()); + keyWithMaterial.getKeyType()); } // END: com.azure.keyvault.keys.keyclient.listKeys#Context // BEGIN: com.azure.keyvault.keys.keyclient.listKeys.iterableByPage - keyClient.listKeys().iterableByPage().forEach(resp -> { + keyClient.listPropertiesOfKeys().iterableByPage().forEach(resp -> { System.out.printf("Got response headers . Url: %s, Status code: %d %n", resp.getRequest().getUrl(), resp.getStatusCode()); resp.getItems().forEach(value -> { - Key keyWithMaterial = keyClient.getKey(value); + KeyVaultKey keyWithMaterial = keyClient.getKey(value.getName(), value.getVersion()); System.out.printf("Received key with name %s and type %s %n", keyWithMaterial.getName(), - keyWithMaterial.getKeyMaterial().getKty()); + keyWithMaterial.getKeyType()); }); }); // END: com.azure.keyvault.keys.keyclient.listKeys.iterableByPage @@ -396,30 +390,30 @@ public void listDeletedKeysSnippets() { } /** - * Generates code sample for using {@link KeyClient#listKeyVersions(String)} + * Generates code sample for using {@link KeyClient#listPropertiesOfKeyVersions(String)} */ public void listKeyVersions() { KeyClient keyClient = createClient(); // BEGIN: com.azure.keyvault.keys.keyclient.listKeyVersions - for (KeyProperties key : keyClient.listKeyVersions("keyName")) { - Key keyWithMaterial = keyClient.getKey(key); + for (KeyProperties key : keyClient.listPropertiesOfKeyVersions("keyName")) { + KeyVaultKey keyWithMaterial = keyClient.getKey(key.getName(), key.getVersion()); System.out.printf("Received key's version with name %s, type %s and version %s", keyWithMaterial.getName(), - keyWithMaterial.getKeyMaterial().getKty(), keyWithMaterial.getProperties().getVersion()); + keyWithMaterial.getKeyType(), keyWithMaterial.getProperties().getVersion()); } // END: com.azure.keyvault.keys.keyclient.listKeyVersions // BEGIN: com.azure.keyvault.keys.keyclient.listKeyVersions#Context - for (KeyProperties key : keyClient.listKeyVersions("keyName", new Context(key2, value2))) { - Key keyWithMaterial = keyClient.getKey(key); + for (KeyProperties key : keyClient.listPropertiesOfKeyVersions("keyName", new Context(key2, value2))) { + KeyVaultKey keyWithMaterial = keyClient.getKey(key.getName(), key.getVersion()); System.out.printf("Received key's version with name %s, type %s and version %s", keyWithMaterial.getName(), - keyWithMaterial.getKeyMaterial().getKty(), keyWithMaterial.getProperties().getVersion()); + keyWithMaterial.getKeyType(), keyWithMaterial.getProperties().getVersion()); } // END: com.azure.keyvault.keys.keyclient.listKeyVersions#Context // BEGIN: com.azure.keyvault.keys.keyclient.listKeyVersions.iterableByPage - keyClient.listKeyVersions("keyName").iterableByPage().forEach(resp -> { + keyClient.listPropertiesOfKeyVersions("keyName").iterableByPage().forEach(resp -> { System.out.printf("Got response headers . Url: %s, Status code: %d %n", resp.getRequest().getUrl(), resp.getStatusCode()); resp.getItems().forEach(value -> { diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperations.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperations.java index 5431248a824c..3d0ed3295223 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperations.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperations.java @@ -3,11 +3,11 @@ package com.azure.security.keyvault.keys; +import com.azure.security.keyvault.keys.models.CreateEcKeyOptions; +import com.azure.security.keyvault.keys.models.CreateRsaKeyOptions; +import com.azure.security.keyvault.keys.models.KeyVaultKey; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; -import com.azure.security.keyvault.keys.models.Key; import com.azure.security.keyvault.keys.models.KeyProperties; -import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; import java.time.OffsetDateTime; @@ -27,36 +27,36 @@ public static void main(String[] args) throws IllegalArgumentException { // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. KeyClient keyClient = new KeyClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // Let's create Ec and Rsa keys valid for 1 year. if the key // already exists in the key vault, then a new version of the key is created. - keyClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey") - .setExpires(OffsetDateTime.now().plusYears(1)) + keyClient.createRsaKey(new CreateRsaKeyOptions("CloudRsaKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1)) .setKeySize(2048)); - keyClient.createEcKey(new EcKeyCreateOptions("CloudEcKey") - .setExpires(OffsetDateTime.now().plusYears(1))); + keyClient.createEcKey(new CreateEcKeyOptions("CloudEcKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1))); // You need to check te type of keys already exist in your key vault. Let's list the keys and print their types. // List operations don't return the keys with key material information. So, for each returned key we call getKey to get the key with its key material information. - for (KeyProperties key : keyClient.listKeys()) { - Key keyWithMaterial = keyClient.getKey(key); - System.out.printf("Received key with name %s and type %s", keyWithMaterial.getName(), keyWithMaterial.getKeyMaterial().getKty()); + for (KeyProperties key : keyClient.listPropertiesOfKeys()) { + KeyVaultKey keyWithMaterial = keyClient.getKey(key.getName(), key.getVersion()); + System.out.printf("Received key with name %s and type %s", keyWithMaterial.getName(), keyWithMaterial.getKeyType()); } // We need the Cloud Rsa key with bigger key size, so you want to update the key in key vault to ensure it has the required size. // Calling createRsaKey on an existing key creates a new version of the key in the key vault with the new specified size. - keyClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey") - .setExpires(OffsetDateTime.now().plusYears(1)) + keyClient.createRsaKey(new CreateRsaKeyOptions("CloudRsaKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1)) .setKeySize(4096)); // You need to check all the different versions Cloud Rsa key had previously. Lets print all the versions of this key. - for (KeyProperties key : keyClient.listKeyVersions("CloudRsaKey")) { - Key keyWithMaterial = keyClient.getKey(key); - System.out.printf("Received key's version with name %s, type %s and verison %s", keyWithMaterial.getName(), keyWithMaterial.getKeyMaterial().getKty(), keyWithMaterial.getProperties().getVersion()); + for (KeyProperties key : keyClient.listPropertiesOfKeyVersions("CloudRsaKey")) { + KeyVaultKey keyWithMaterial = keyClient.getKey(key.getName(), key.getVersion()); + System.out.printf("Received key's version with name %s, type %s and verison %s", keyWithMaterial.getName(), keyWithMaterial.getKeyType(), keyWithMaterial.getProperties().getVersion()); } } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperationsAsync.java index 8b4aa1fe80ab..99ef7486cee2 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperationsAsync.java @@ -3,9 +3,9 @@ package com.azure.security.keyvault.keys; +import com.azure.security.keyvault.keys.models.CreateEcKeyOptions; +import com.azure.security.keyvault.keys.models.CreateRsaKeyOptions; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; -import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; import java.time.OffsetDateTime; @@ -26,49 +26,49 @@ public static void main(String[] args) throws InterruptedException { // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. KeyAsyncClient keyAsyncClient = new KeyClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); // Let's create Ec and Rsa keys valid for 1 year. if the key // already exists in the key vault, then a new version of the key is created. - keyAsyncClient.createEcKey(new EcKeyCreateOptions("CloudEcKey") - .setExpires(OffsetDateTime.now().plusYears(1))) + keyAsyncClient.createEcKey(new CreateEcKeyOptions("CloudEcKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1))) .subscribe(keyResponse -> - System.out.printf("Key is created with name %s and type %s \n", keyResponse.getName(), keyResponse.getKeyMaterial().getKty())); + System.out.printf("Key is created with name %s and type %s \n", keyResponse.getName(), keyResponse.getKeyType())); Thread.sleep(2000); - keyAsyncClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey") - .setExpires(OffsetDateTime.now().plusYears(1))) + keyAsyncClient.createRsaKey(new CreateRsaKeyOptions("CloudRsaKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1))) .subscribe(keyResponse -> - System.out.printf("Key is created with name %s and type %s \n", keyResponse.getName(), keyResponse.getKeyMaterial().getKty())); + System.out.printf("Key is created with name %s and type %s \n", keyResponse.getName(), keyResponse.getKeyType())); Thread.sleep(2000); // You need to check te type of keys already exist in your key vault. Let's list the keys and print their types. // List operations don't return the keys with key material information. So, for each returned key we call getKey to get the key with its key material information. - keyAsyncClient.listKeys() + keyAsyncClient.listPropertiesOfKeys() .subscribe(keyBase -> - keyAsyncClient.getKey(keyBase).subscribe(keyResponse -> - System.out.printf("Received key with name %s and type %s \n", keyResponse.getName(), keyResponse.getKeyMaterial().getKty()))); + keyAsyncClient.getKey(keyBase.getName(), keyBase.getVersion()).subscribe(keyResponse -> + System.out.printf("Received key with name %s and type %s \n", keyResponse.getName(), keyResponse.getKeyType()))); Thread.sleep(15000); // We need the Cloud Rsa key with bigger key size, so you want to update the key in key vault to ensure it has the required size. // Calling createRsaKey on an existing key creates a new version of the key in the key vault with the new specified size. - keyAsyncClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey") + keyAsyncClient.createRsaKey(new CreateRsaKeyOptions("CloudRsaKey") .setKeySize(4096) - .setExpires(OffsetDateTime.now().plusYears(1))).subscribe(keyResponse -> - System.out.printf("Key is created with name %s and type %s \n", keyResponse.getName(), keyResponse.getKeyMaterial().getKty())); + .setExpiresOn(OffsetDateTime.now().plusYears(1))).subscribe(keyResponse -> + System.out.printf("Key is created with name %s and type %s \n", keyResponse.getName(), keyResponse.getKeyType())); Thread.sleep(2000); // You need to check all the different versions Cloud Rsa key had previously. Lets print all the versions of this key. - keyAsyncClient.listKeyVersions("CloudRsaKey").subscribe(keyBase -> - keyAsyncClient.getKey(keyBase).subscribe(keyResponse -> + keyAsyncClient.listPropertiesOfKeyVersions("CloudRsaKey").subscribe(keyBase -> + keyAsyncClient.getKey(keyBase.getName(), keyBase.getVersion()).subscribe(keyResponse -> System.out.printf("Received key's version with name %s, type %s and version %s \n", keyResponse.getName(), - keyResponse.getKeyMaterial().getKty(), keyResponse.getProperties().getVersion()))); + keyResponse.getKeyType(), keyResponse.getProperties().getVersion()))); Thread.sleep(15000); } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeys.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeys.java index 24869db89421..711b340efed6 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeys.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeys.java @@ -3,10 +3,13 @@ package com.azure.security.keyvault.keys; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; +import com.azure.security.keyvault.keys.models.CreateEcKeyOptions; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.models.DeletedKey; -import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; -import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; +import com.azure.security.keyvault.keys.models.CreateRsaKeyOptions; +import com.azure.security.keyvault.keys.models.KeyVaultKey; import java.time.OffsetDateTime; @@ -31,42 +34,98 @@ public static void main(String[] args) throws IllegalArgumentException, Interrup // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. KeyClient keyClient = new KeyClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // Let's create Ec and Rsa keys valid for 1 year. if the key // already exists in the key vault, then a new version of the key is created. - keyClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey") - .setExpires(OffsetDateTime.now().plusYears(1)) + keyClient.createRsaKey(new CreateRsaKeyOptions("CloudRsaKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1)) .setKeySize(2048)); - keyClient.createEcKey(new EcKeyCreateOptions("CloudEcKey") - .setExpires(OffsetDateTime.now().plusYears(1))); + keyClient.createEcKey(new CreateEcKeyOptions("CloudEcKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1))); // The Cloud Rsa Key is no longer needed, need to delete it from the key vault. - keyClient.deleteKey("CloudEcKey"); + Poller deletedKeyPoller = keyClient.beginDeleteKey("CloudEcKey"); + + while (deletedKeyPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS) { + System.out.println(deletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } + + DeletedKey deletedKey = deletedKeyPoller.getLastPollResponse().getValue(); + System.out.println("Deleted Date %s" + deletedKey.getDeletedOn().toString()); + System.out.printf("Deleted Key's Recovery Id %s", deletedKey.getRecoveryId()); + + // Key is being deleted on server. + while (deletedKeyPoller.getStatus() != PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED) { + System.out.println(deletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } - //To ensure key is deleted on server side. - Thread.sleep(30000); // We accidentally Cloud Ec key. Let's recover it. // A deleted key can only be recovered if the key vault is soft-delete enabled. - keyClient.recoverDeletedKey("CloudEcKey"); + Poller recoverEcKeyPoller = keyClient.beginRecoverDeletedKey("CloudEcKey"); + while (recoverEcKeyPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS) { + System.out.println(recoverEcKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } + + KeyVaultKey recoveredKey = recoverEcKeyPoller.getLastPollResponse().getValue(); + System.out.println("Recovered Key Name %s" + recoveredKey.getName()); + System.out.printf("Recovered Key's Id %s", recoveredKey.getId()); + + // Key is being recovered on server. + while (recoverEcKeyPoller.getStatus() != PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED) { + System.out.println(recoverEcKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } + - //To ensure key is recovered on server side. - Thread.sleep(30000); // The Cloud Ec and Rsa keys are no longer needed, need to delete them from the key vault. - keyClient.deleteKey("CloudEcKey"); - keyClient.deleteKey("CloudRsaKey"); + Poller ecDeletedKeyPoller = keyClient.beginDeleteKey("CloudEcKey"); + + while (ecDeletedKeyPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS) { + System.out.println(ecDeletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } + + DeletedKey ecDeletedKey = ecDeletedKeyPoller.getLastPollResponse().getValue(); + System.out.println("Deleted Date %s" + ecDeletedKey.getDeletedOn().toString()); + System.out.printf("Deleted Key's Recovery Id %s", ecDeletedKey.getRecoveryId()); + + // Key is being deleted on server. + while (ecDeletedKeyPoller.getStatus() != PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED) { + System.out.println(ecDeletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } + + + Poller rsaDeletedKeyPoller = keyClient.beginDeleteKey("CloudRsaKey"); + + while (rsaDeletedKeyPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS) { + System.out.println(rsaDeletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } + + DeletedKey rsaDeletedKey = rsaDeletedKeyPoller.getLastPollResponse().getValue(); + System.out.println("Deleted Date %s" + rsaDeletedKey.getDeletedOn().toString()); + System.out.printf("Deleted Key's Recovery Id %s", rsaDeletedKey.getRecoveryId()); + + // Key is being deleted on server. + while (rsaDeletedKeyPoller.getStatus() != PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED) { + System.out.println(rsaDeletedKeyPoller.getStatus().toString()); + Thread.sleep(2000); + } - //To ensure key is deleted on server side. - Thread.sleep(30000); // You can list all the deleted and non-purged keys, assuming key vault is soft-delete enabled. - for (DeletedKey deletedKey : keyClient.listDeletedKeys()) { - System.out.printf("Deleted key's recovery Id %s", deletedKey.getRecoveryId()); + for (DeletedKey delKey : keyClient.listDeletedKeys()) { + System.out.printf("Deleted key's recovery Id %s", delKey.getRecoveryId()); } // If the keyvault is soft-delete enabled, then for permanent deletion deleted keys need to be purged. diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeysAsync.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeysAsync.java index 2252459f404b..6dbba67aa5c8 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeysAsync.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ManagingDeletedKeysAsync.java @@ -3,9 +3,9 @@ package com.azure.security.keyvault.keys; +import com.azure.security.keyvault.keys.models.CreateEcKeyOptions; +import com.azure.security.keyvault.keys.models.CreateRsaKeyOptions; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.keys.models.EcKeyCreateOptions; -import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions; import java.time.OffsetDateTime; @@ -30,47 +30,67 @@ public static void main(String[] args) throws InterruptedException { // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. KeyAsyncClient keyAsyncClient = new KeyClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); // Let's create Ec and Rsa keys valid for 1 year. if the key // already exists in the key vault, then a new version of the key is created. - keyAsyncClient.createEcKey(new EcKeyCreateOptions("CloudEcKey") - .setExpires(OffsetDateTime.now().plusYears(1))) + keyAsyncClient.createEcKey(new CreateEcKeyOptions("CloudEcKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1))) .subscribe(keyResponse -> - System.out.printf("Key is created with name %s and type %s %n", keyResponse.getName(), keyResponse.getKeyMaterial().getKty())); + System.out.printf("Key is created with name %s and type %s %n", keyResponse.getName(), keyResponse.getKeyType())); Thread.sleep(2000); - keyAsyncClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey") - .setExpires(OffsetDateTime.now().plusYears(1))) + keyAsyncClient.createRsaKey(new CreateRsaKeyOptions("CloudRsaKey") + .setExpiresOn(OffsetDateTime.now().plusYears(1))) .subscribe(keyResponse -> - System.out.printf("Key is created with name %s and type %s %n", keyResponse.getName(), keyResponse.getKeyMaterial().getKty())); + System.out.printf("Key is created with name %s and type %s %n", keyResponse.getName(), keyResponse.getKeyType())); Thread.sleep(2000); // The Cloud Rsa Key is no longer needed, need to delete it from the key vault. - keyAsyncClient.deleteKey("CloudEcKey").subscribe(deletedKeyResponse -> - System.out.printf("Deleted Key's Recovery Id %s %n", deletedKeyResponse.getRecoveryId())); + keyAsyncClient.beginDeleteKey("CloudEcKey") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Delete Key Name: " + pollResponse.getValue().getName()); + System.out.println("Key Delete Date: " + pollResponse.getValue().getDeletedOn().toString()); + }); //To ensure key is deleted on server side. Thread.sleep(30000); // We accidentally deleted Cloud Ec key. Let's recover it. // A deleted key can only be recovered if the key vault is soft-delete enabled. - keyAsyncClient.recoverDeletedKey("CloudEcKey").subscribe(recoveredKeyResponse -> - System.out.printf("Recovered Key with name %s %n", recoveredKeyResponse.getName())); - - //To ensure key is recovered on server side. + keyAsyncClient.beginRecoverDeletedKey("CloudEcKey") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Recovery Status: " + pollResponse.getStatus().toString()); + System.out.println("Recover Key Name: " + pollResponse.getValue().getName()); + System.out.println("Recover Key Type: " + pollResponse.getValue().getKeyType()); + }); + + //To ensure key is recovered on server side before moving forward. Thread.sleep(10000); // The Cloud Ec and Rsa keys are no longer needed, need to delete them from the key vault. - keyAsyncClient.deleteKey("CloudEcKey").subscribe(deletedKeyResponse -> - System.out.printf("Deleted Key's Recovery Id %s %n", deletedKeyResponse.getRecoveryId())); - - keyAsyncClient.deleteKey("CloudRsaKey").subscribe(deletedKeyResponse -> - System.out.printf("Deleted Key's Recovery Id %s %n", deletedKeyResponse.getRecoveryId())); + keyAsyncClient.beginDeleteKey("CloudEcKey") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Delete Key Name: " + pollResponse.getValue().getName()); + System.out.println("Key Delete Date: " + pollResponse.getValue().getDeletedOn().toString()); + }); + + keyAsyncClient.beginDeleteKey("CloudRsaKey") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Delete Key Name: " + pollResponse.getValue().getName()); + System.out.println("Key Delete Date: " + pollResponse.getValue().getDeletedOn().toString()); + }); // To ensure key is deleted on server side. Thread.sleep(30000); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java index b30ee0690672..c850d06544a4 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java @@ -9,8 +9,10 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.RetryPolicy; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.KeyAsyncClient; +import com.azure.security.keyvault.keys.implementation.KeyVaultCredentialPolicy; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm; @@ -37,8 +39,8 @@ public CryptographyAsyncClient createAsyncClientWithHttpClient() { // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.withhttpclient.instantiation CryptographyAsyncClient cryptographyAsyncClient = new CryptographyClientBuilder() .keyIdentifier("") - .credential(new DefaultAzureCredentialBuilder().build()) .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) + .addPolicy(new KeyVaultCredentialPolicy(new DefaultAzureCredentialBuilder().build())) .httpClient(HttpClient.createDefault()) .buildAsyncClient(); // END: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.withhttpclient.instantiation @@ -65,11 +67,12 @@ public CryptographyAsyncClient createAsyncClient() { */ public CryptographyAsyncClient createAsyncClientWithPipeline() { // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.pipeline.instantiation - HttpPipeline pipeline = new HttpPipelineBuilder().build(); + HttpPipeline pipeline = new HttpPipelineBuilder() + .policies(new KeyVaultCredentialPolicy(new DefaultAzureCredentialBuilder().build()), new RetryPolicy()) + .build(); CryptographyAsyncClient cryptographyAsyncClient = new CryptographyClientBuilder() .pipeline(pipeline) .keyIdentifier(" - System.out.printf("Received encrypted content of length %d with algorithm %s \n", - encryptResult.getCipherText().length, encryptResult.getAlgorithm().toString())); - - // END: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.encrypt#EncryptionAlgorithm-byte-byte-byte } /** * Generates a code sample for using {@link CryptographyAsyncClient#decrypt(EncryptionAlgorithm, byte[])} and - * {@link CryptographyAsyncClient#decrypt(EncryptionAlgorithm, byte[], byte[], byte[], byte[])} + * {@link CryptographyAsyncClient#decrypt(EncryptionAlgorithm, byte[])} */ public void decrypt() { CryptographyAsyncClient cryptographyAsyncClient = createAsyncClient(); - byte[] iv = {(byte) 0x1a, (byte) 0xf3, (byte) 0x8c, (byte) 0x2d, (byte) 0xc2, (byte) 0xb9, (byte) 0x6f, (byte) 0xfd, (byte) 0xd8, (byte) 0x66, (byte) 0x94, (byte) 0x09, (byte) 0x23, (byte) 0x41, (byte) 0xbc, (byte) 0x04}; - byte[] authData = { - (byte) 0x54, (byte) 0x68, (byte) 0x65, (byte) 0x20, (byte) 0x73, (byte) 0x65, (byte) 0x63, (byte) 0x6f, (byte) 0x6e, (byte) 0x64, (byte) 0x20, (byte) 0x70, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x63, - (byte) 0x69, (byte) 0x70, (byte) 0x6c, (byte) 0x65, (byte) 0x20, (byte) 0x6f, (byte) 0x66, (byte) 0x20, (byte) 0x41, (byte) 0x75, (byte) 0x67, (byte) 0x75, (byte) 0x73, (byte) 0x74, (byte) 0x65, (byte) 0x20, - (byte) 0x4b, (byte) 0x65, (byte) 0x72, (byte) 0x63, (byte) 0x6b, (byte) 0x68, (byte) 0x6f, (byte) 0x66, (byte) 0x66, (byte) 0x73 - }; - byte[] authTag = {(byte) 0x65, (byte) 0x2c, (byte) 0x3f, (byte) 0xa3, (byte) 0x6b, (byte) 0x0a, (byte) 0x7c, (byte) 0x5b, (byte) 0x32, (byte) 0x19, (byte) 0xfa, (byte) 0xb3, (byte) 0xa3, (byte) 0x0b, (byte) 0xc1, (byte) 0xc4}; // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.decrypt#EncryptionAlgorithm-byte byte[] plainText = new byte[100]; new Random(0x1234567L).nextBytes(plainText); @@ -155,15 +142,6 @@ public void decrypt() { .subscribe(decryptResult -> System.out.printf("Received decrypted content of length %d\n", decryptResult.getPlainText().length)); // END: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.decrypt#EncryptionAlgorithm-byte - - // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte - cryptographyAsyncClient.decrypt(EncryptionAlgorithm.A192CBC_HS384, plainText, iv, authData, authTag) - .subscriberContext(reactor.util.context.Context.of(key1, value1, key2, value2)) - .subscribe(encryptResult -> - System.out.printf("Received decrypted content of length %d with algorithm %s \n", - encryptResult.getPlainText().length)); - - // END: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte } /** diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientJavaDocCodeSnippets.java index e07fb3c9b083..757975b6aba6 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientJavaDocCodeSnippets.java @@ -7,16 +7,16 @@ import com.azure.core.util.Context; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.KeyClient; -import com.azure.security.keyvault.keys.cryptography.models.EncryptResult; import com.azure.security.keyvault.keys.cryptography.models.DecryptResult; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; +import com.azure.security.keyvault.keys.cryptography.models.EncryptResult; +import com.azure.security.keyvault.keys.cryptography.models.UnwrapResult; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm; -import com.azure.security.keyvault.keys.cryptography.models.KeyWrapResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyUnwrapResult; import com.azure.security.keyvault.keys.cryptography.models.SignResult; import com.azure.security.keyvault.keys.cryptography.models.VerifyResult; -import com.azure.security.keyvault.keys.models.Key; +import com.azure.security.keyvault.keys.cryptography.models.WrapResult; +import com.azure.security.keyvault.keys.models.KeyVaultKey; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; @@ -52,7 +52,7 @@ public CryptographyClient createClient() { public void getKeyWithResponseSnippets() { CryptographyClient cryptographyClient = createClient(); // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.getKeyWithResponse#Context - Key keyWithVersion = cryptographyClient.getKeyWithResponse(new Context(key1, value1)).getValue(); + KeyVaultKey keyWithVersion = cryptographyClient.getKeyWithResponse(new Context(key1, value1)).getValue(); System.out.printf("Key is returned with name %s and id %s \n", keyWithVersion.getName(), keyWithVersion.getId()); // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.getKeyWithResponse#Context } @@ -63,14 +63,14 @@ public void getKeyWithResponseSnippets() { public void getKeySnippets() { CryptographyClient cryptographyClient = createClient(); // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.getKey - Key key = cryptographyClient.getKey(); + KeyVaultKey key = cryptographyClient.getKey(); System.out.printf("Key is returned with name %s and id %s \n", key.getName(), key.getId()); // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.getKey } /** * Generates a code sample for using {@link CryptographyClient#encrypt(EncryptionAlgorithm, byte[])} and - * {@link CryptographyClient#encrypt(EncryptionAlgorithm, byte[], byte[], byte[])} + * {@link CryptographyClient#encrypt(EncryptionAlgorithm, byte[])} */ public void encrypt() { CryptographyClient cryptographyClient = createClient(); @@ -88,56 +88,33 @@ public void encrypt() { encryptResult.getCipherText().length, encryptResult.getAlgorithm().toString()); // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte - // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-byte-byte - EncryptResult encryptionResult = cryptographyClient.encrypt(EncryptionAlgorithm.A192CBC_HS384, plainText, - iv, authData); - System.out.printf("Received encrypted content of length %d with algorithm %s \n", - encryptionResult.getCipherText().length, encryptResult.getAlgorithm().toString()); - - // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-byte-byte - - // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-byte-byte-Context - EncryptResult encryptionResponse = cryptographyClient.encrypt(EncryptionAlgorithm.A192CBC_HS384, plainText, - iv, authData, new Context(key1, value1)); + // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-Context + byte[] plainTextToEncrypt = new byte[100]; + new Random(0x1234567L).nextBytes(plainTextToEncrypt); + EncryptResult encryptionResult = cryptographyClient.encrypt(EncryptionAlgorithm.RSA_OAEP, plainTextToEncrypt, + new Context(key1, value1)); System.out.printf("Received encrypted content of length %d with algorithm %s \n", - encryptionResponse.getCipherText().length, encryptResult.getAlgorithm().toString()); - - // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-byte-byte-Context + encryptionResult.getCipherText().length, encryptionResult.getAlgorithm().toString()); + // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-Context } /** * Generates a code sample for using {@link CryptographyClient#decrypt(EncryptionAlgorithm, byte[])} and - * {@link CryptographyClient#decrypt(EncryptionAlgorithm, byte[], byte[], byte[], byte[])} + * {@link CryptographyClient#decrypt(EncryptionAlgorithm, byte[])} */ public void decrypt() { CryptographyClient cryptographyClient = createClient(); - byte[] iv = {(byte) 0x1a, (byte) 0xf3, (byte) 0x8c, (byte) 0x2d, (byte) 0xc2, (byte) 0xb9, (byte) 0x6f, (byte) 0xfd, (byte) 0xd8, (byte) 0x66, (byte) 0x94, (byte) 0x09, (byte) 0x23, (byte) 0x41, (byte) 0xbc, (byte) 0x04}; - byte[] authData = { - (byte) 0x54, (byte) 0x68, (byte) 0x65, (byte) 0x20, (byte) 0x73, (byte) 0x65, (byte) 0x63, (byte) 0x6f, (byte) 0x6e, (byte) 0x64, (byte) 0x20, (byte) 0x70, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x63, - (byte) 0x69, (byte) 0x70, (byte) 0x6c, (byte) 0x65, (byte) 0x20, (byte) 0x6f, (byte) 0x66, (byte) 0x20, (byte) 0x41, (byte) 0x75, (byte) 0x67, (byte) 0x75, (byte) 0x73, (byte) 0x74, (byte) 0x65, (byte) 0x20, - (byte) 0x4b, (byte) 0x65, (byte) 0x72, (byte) 0x63, (byte) 0x6b, (byte) 0x68, (byte) 0x6f, (byte) 0x66, (byte) 0x66, (byte) 0x73 - }; - byte[] authTag = {(byte) 0x65, (byte) 0x2c, (byte) 0x3f, (byte) 0xa3, (byte) 0x6b, (byte) 0x0a, (byte) 0x7c, (byte) 0x5b, (byte) 0x32, (byte) 0x19, (byte) 0xfa, (byte) 0xb3, (byte) 0xa3, (byte) 0x0b, (byte) 0xc1, (byte) 0xc4}; + byte[] encryptedData = new byte[100]; // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte - byte[] plainText = new byte[100]; - new Random(0x1234567L).nextBytes(plainText); - DecryptResult decryptResult = cryptographyClient.decrypt(EncryptionAlgorithm.RSA_OAEP, plainText); + DecryptResult decryptResult = cryptographyClient.decrypt(EncryptionAlgorithm.RSA_OAEP, encryptedData); System.out.printf("Received decrypted content of length %d\n", decryptResult.getPlainText().length); // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte - // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte - DecryptResult decryptionResult = cryptographyClient.decrypt(EncryptionAlgorithm.A192CBC_HS384, plainText, - iv, authData, authTag); - System.out.printf("Received decrypted content of length %d with algorithm %s \n", - decryptionResult.getPlainText().length); - // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte - - // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte-Context - DecryptResult decryptionResponse = cryptographyClient.decrypt(EncryptionAlgorithm.A192CBC_HS384, plainText, - iv, authData, authTag, new Context(key2, value2)); - System.out.printf("Received decrypted content of length %d with algorithm %s \n", - decryptionResponse.getPlainText().length); - // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte-Context + // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-Context + DecryptResult decryptionResult = cryptographyClient.decrypt(EncryptionAlgorithm.RSA_OAEP, encryptedData, + new Context(key1, value1)); + System.out.printf("Received decrypted content of length %d\n", decryptionResult.getPlainText().length); + // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-Context } /** @@ -228,26 +205,26 @@ public void wrapKeyUnwrapKey() { // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.wrapKey#KeyWrapAlgorithm-byte byte[] key = new byte[100]; new Random(0x1234567L).nextBytes(key); - KeyWrapResult keyWrapResult = cryptographyClient.wrapKey(KeyWrapAlgorithm.RSA_OAEP, key); - System.out.printf("Received encypted key of length %d with algorithm %s", keyWrapResult.getEncryptedKey().length, - keyWrapResult.getAlgorithm().toString()); + WrapResult wrapResult = cryptographyClient.wrapKey(KeyWrapAlgorithm.RSA_OAEP, key); + System.out.printf("Received encypted key of length %d with algorithm %s", wrapResult.getEncryptedKey().length, + wrapResult.getAlgorithm().toString()); // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.wrapKey#KeyWrapAlgorithm-byte // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.wrapKey#KeyWrapAlgorithm-byte-Context byte[] keyContent = new byte[100]; new Random(0x1234567L).nextBytes(keyContent); - KeyWrapResult keyWrapResponse = cryptographyClient.wrapKey(KeyWrapAlgorithm.RSA_OAEP, keyContent); + WrapResult keyWrapResponse = cryptographyClient.wrapKey(KeyWrapAlgorithm.RSA_OAEP, keyContent); System.out.printf("Received encypted key of length %d with algorithm %s", keyWrapResponse.getEncryptedKey().length, keyWrapResponse.getAlgorithm().toString(), new Context(key1, value1)); // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.wrapKey#KeyWrapAlgorithm-byte-Context // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.unwrapKey#KeyWrapAlgorithm-byte - KeyUnwrapResult keyUnwrapResult = cryptographyClient.unwrapKey(KeyWrapAlgorithm.RSA_OAEP, encryptedKey); - System.out.printf("Received key of length %d", keyUnwrapResult.getKey().length); + UnwrapResult unwrapResult = cryptographyClient.unwrapKey(KeyWrapAlgorithm.RSA_OAEP, encryptedKey); + System.out.printf("Received key of length %d", unwrapResult.getKey().length); // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.unwrapKey#KeyWrapAlgorithm-byte // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.unwrapKey#KeyWrapAlgorithm-byte-Context - KeyUnwrapResult keyUnwrapResponse = cryptographyClient.unwrapKey(KeyWrapAlgorithm.RSA_OAEP, encryptedKey, + UnwrapResult keyUnwrapResponse = cryptographyClient.unwrapKey(KeyWrapAlgorithm.RSA_OAEP, encryptedKey, new Context(key2, value2)); System.out.printf("Received key of length %d", keyUnwrapResponse.getKey().length); // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.unwrapKey#KeyWrapAlgorithm-byte-Context diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperations.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperations.java index 1acc9c758c82..28d82461f630 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperations.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperations.java @@ -7,12 +7,7 @@ import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.EncryptResult; import com.azure.security.keyvault.keys.cryptography.models.DecryptResult; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; -import javax.crypto.spec.SecretKeySpec; -import java.util.Arrays; import java.util.Random; /** @@ -47,30 +42,6 @@ public static void main(String[] args) throws InterruptedException, IllegalArgum //Let's decrypt the encrypted response. DecryptResult decryptResult = cryptoClient.decrypt(EncryptionAlgorithm.RSA_OAEP, encryptResult.getCipherText()); System.out.printf("Returned plainText size is %d bytes \n", decryptResult.getPlainText().length); - - // Let's do Encrypt and Decrypt operations with a symmetric key. - byte[] keyContent = { 0x06, (byte) 0xa9, 0x21, 0x40, 0x36, (byte) 0xb8, (byte) 0xa1, 0x5b, 0x51, 0x2e, 0x03, (byte) 0xd5, 0x34, 0x12, 0x00, 0x06 }; - byte[] plaintext = "Single block msg".getBytes(); - byte[] initializationVector = { 0x3d, (byte) 0xaf, (byte) 0xba, 0x42, (byte) 0x9d, (byte) 0x9e, (byte) 0xb4, 0x30, (byte) 0xb4, 0x22, (byte) 0xda, (byte) 0x80, 0x2c, (byte) 0x9f, (byte) 0xac, 0x41 }; - - // Convert the symmetric key encoded content to Json Web key. - JsonWebKey symmetricKey = JsonWebKey.fromAes(new SecretKeySpec(keyContent, "AES")) - .setKty(KeyType.OCT) - .setKeyOps(Arrays.asList(KeyOperation.ENCRYPT, KeyOperation.DECRYPT)); - - // Configure the symmetric key in a new crypto client. - CryptographyClient symmetricKeyCryptoClient = new CryptographyClientBuilder() - .jsonWebKey(symmetricKey) - .credential(new DefaultAzureCredentialBuilder().build()) - .buildClient(); - - // Note the implementation of A128CBC in this library uses PKCS7 padding. - EncryptResult encryptionResult = symmetricKeyCryptoClient.encrypt(EncryptionAlgorithm.A128CBC, plaintext, initializationVector, null); - System.out.printf("Returned cipherText size is %d bytes with algorithm %s\n", encryptionResult.getCipherText().length, encryptionResult.getAlgorithm().toString()); - - DecryptResult decryptionResult = symmetricKeyCryptoClient.decrypt(EncryptionAlgorithm.A128CBC, encryptionResult.getCipherText(), initializationVector, null, null); - System.out.printf("Returned unwrapped key size is %d bytes\n", decryptionResult.getPlainText().length); - } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperationsAsync.java index b540456837be..71245048a385 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/EncryptDecryptOperationsAsync.java @@ -5,12 +5,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; -import javax.crypto.spec.SecretKeySpec; -import java.util.Arrays; import java.util.Random; /** @@ -48,34 +43,6 @@ public static void main(String[] args) throws InterruptedException, IllegalArgum }); Thread.sleep(5000); - - // Let's do Encrypt and Decrypt operations with a symmetric key. - byte[] keyContent = { 0x06, (byte) 0xa9, 0x21, 0x40, 0x36, (byte) 0xb8, (byte) 0xa1, 0x5b, 0x51, 0x2e, 0x03, (byte) 0xd5, 0x34, 0x12, 0x00, 0x06 }; - byte[] plaintext = "Single block msg".getBytes(); - byte[] initializationVector = { 0x3d, (byte) 0xaf, (byte) 0xba, 0x42, (byte) 0x9d, (byte) 0x9e, (byte) 0xb4, 0x30, (byte) 0xb4, 0x22, (byte) 0xda, (byte) 0x80, 0x2c, (byte) 0x9f, (byte) 0xac, 0x41 }; - - // Convert the symmetric key encoded content to Json Web key. - JsonWebKey symmetricKey = JsonWebKey.fromAes(new SecretKeySpec(keyContent, "AES")) - .setKty(KeyType.OCT) - .setKeyOps(Arrays.asList(KeyOperation.ENCRYPT, KeyOperation.DECRYPT)); - - // Configure the symmetric key in a new crypto client. - CryptographyAsyncClient symmetricKeyCryptoAsyncClient = new CryptographyClientBuilder() - .jsonWebKey(symmetricKey) - .credential(new DefaultAzureCredentialBuilder().build()) - .buildAsyncClient(); - - // Note the implementation of A128CBC in this library uses PKCS7 padding. - symmetricKeyCryptoAsyncClient.encrypt(EncryptionAlgorithm.A128CBC, plaintext, initializationVector, null) - .subscribe(encryptResult -> { - System.out.printf("Returned cipherText size is %d bytes with algorithm %s\n", encryptResult.getCipherText().length, encryptResult.getAlgorithm().toString()); - //Let's decrypt the encrypted response. - symmetricKeyCryptoAsyncClient.decrypt(EncryptionAlgorithm.A128CBC, encryptResult.getCipherText(), initializationVector, null, null) - .subscribe(decryptResult -> System.out.printf("Returned plainText size is %d bytes\n", decryptResult.getPlainText().length)); - }); - - //Block main thread to let async operations finish - Thread.sleep(5000); } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperations.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperations.java index 133dcec99c45..08bbdd99684d 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperations.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperations.java @@ -4,15 +4,10 @@ package com.azure.security.keyvault.keys.cryptography; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.keys.cryptography.models.KeyUnwrapResult; -import com.azure.security.keyvault.keys.cryptography.models.KeyWrapResult; +import com.azure.security.keyvault.keys.cryptography.models.UnwrapResult; +import com.azure.security.keyvault.keys.cryptography.models.WrapResult; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; -import javax.crypto.spec.SecretKeySpec; -import java.util.Arrays; import java.util.Random; @@ -42,33 +37,17 @@ public static void main(String[] args) throws InterruptedException, IllegalArgum new Random(0x1234567L).nextBytes(plainText); // Let's wrap a simple dummy key content. - KeyWrapResult keyWrapResult = cryptoClient.wrapKey(KeyWrapAlgorithm.RSA_OAEP, plainText); - System.out.printf("Returned encrypted key size is %d bytes with algorithm %s\n", keyWrapResult.getEncryptedKey().length, keyWrapResult.getAlgorithm().toString()); + WrapResult wrapResult = cryptoClient.wrapKey(KeyWrapAlgorithm.RSA_OAEP, plainText); + System.out.printf("Returned encrypted key size is %d bytes with algorithm %s\n", wrapResult.getEncryptedKey().length, wrapResult.getAlgorithm().toString()); //Let's unwrap the encrypted key response. - KeyUnwrapResult keyUnwrapResult = cryptoClient.unwrapKey(KeyWrapAlgorithm.RSA_OAEP, keyWrapResult.getEncryptedKey()); - System.out.printf("Returned unwrapped key size is %d bytes\n", keyUnwrapResult.getKey().length); + UnwrapResult unwrapResult = cryptoClient.unwrapKey(KeyWrapAlgorithm.RSA_OAEP, wrapResult.getEncryptedKey()); + System.out.printf("Returned unwrapped key size is %d bytes\n", unwrapResult.getKey().length); // Let's do Key Wrap and Unwrap operations with a symmetric key. byte[] symmetrickeyContent = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }; byte[] keyContentToWrap = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB, (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF }; - // Convert the symmetric key encoded content to Json Web key. - JsonWebKey symmetricKey = JsonWebKey.fromAes(new SecretKeySpec(symmetrickeyContent, "AES")) - .setKty(KeyType.OCT) - .setKeyOps(Arrays.asList(KeyOperation.WRAP_KEY, KeyOperation.UNWRAP_KEY)); - - // Configure the symmetric key in a new crypto client. - CryptographyClient symmetricKeyCryptoClient = new CryptographyClientBuilder() - .jsonWebKey(symmetricKey) - .credential(new DefaultAzureCredentialBuilder().build()) - .buildClient(); - - KeyWrapResult symKeyWrapResult = symmetricKeyCryptoClient.wrapKey(KeyWrapAlgorithm.A128KW, keyContentToWrap); - System.out.printf("Returned encrypted key size is %d bytes with algorithm %s\n", keyWrapResult.getEncryptedKey().length, keyWrapResult.getAlgorithm().toString()); - - KeyUnwrapResult symKeyUnwrapResult = symmetricKeyCryptoClient.unwrapKey(KeyWrapAlgorithm.A128KW, symKeyWrapResult.getEncryptedKey()); - System.out.printf("Returned unwrapped key size is %d bytes\n", symKeyUnwrapResult.getKey().length); } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperationsAsync.java index 897b5722ca5f..5d62757f9a0f 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/KeyWrapUnwrapOperationsAsync.java @@ -5,12 +5,6 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; - -import javax.crypto.spec.SecretKeySpec; -import java.util.Arrays; import java.util.Random; /** @@ -52,29 +46,6 @@ public static void main(String[] args) throws InterruptedException, IllegalArgum // Let's do Key Wrap and Unwrap operations with a symmetric key. byte[] symmetrickeyContent = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }; byte[] keyContentToWrap = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB, (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF }; - - // Convert the symmetric key encoded content to Json Web key. - JsonWebKey symmetricKey = JsonWebKey.fromAes(new SecretKeySpec(symmetrickeyContent, "AES")) - .setKty(KeyType.OCT) - .setKeyOps(Arrays.asList(KeyOperation.WRAP_KEY, KeyOperation.UNWRAP_KEY)); - - // Configure the symmetric key in a new crypto client. - CryptographyAsyncClient symmetricKeyCryptoAsyncClient = new CryptographyClientBuilder() - .jsonWebKey(symmetricKey) - .credential(new DefaultAzureCredentialBuilder().build()) - .buildAsyncClient(); - - // Note the implementation of A128CBC in this library uses PKCS7 padding. - symmetricKeyCryptoAsyncClient.wrapKey(KeyWrapAlgorithm.A128KW, keyContentToWrap) - .subscribe(symKeyWrapResult -> { - System.out.printf("Returned encrypted key size is %d bytes with algorithm %s\n", symKeyWrapResult.getEncryptedKey().length, symKeyWrapResult.getAlgorithm().toString()); - //Let's decrypt the encrypted response. - symmetricKeyCryptoAsyncClient.unwrapKey(KeyWrapAlgorithm.A128KW, symKeyWrapResult.getEncryptedKey()) - .subscribe(symKeyUnwrapResult -> System.out.printf("Returned unwrapped key size is %d bytes\n", symKeyUnwrapResult.getKey().length)); - }); - - //Block main thread to let async operations finish - Thread.sleep(5000); } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyAsyncClientTest.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyAsyncClientTest.java index 822cf9b3e5c0..0af8694b7cea 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyAsyncClientTest.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyAsyncClientTest.java @@ -5,12 +5,13 @@ import com.azure.core.exception.ResourceModifiedException; import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; +import com.azure.security.keyvault.keys.models.CreateKeyOptions; import com.azure.security.keyvault.keys.models.DeletedKey; -import com.azure.security.keyvault.keys.models.Key; +import com.azure.security.keyvault.keys.models.KeyVaultKey; import com.azure.security.keyvault.keys.models.KeyProperties; -import com.azure.security.keyvault.keys.models.KeyCreateOptions; -import com.azure.security.keyvault.keys.models.webkey.KeyType; -import org.junit.Assert; +import com.azure.security.keyvault.keys.models.KeyType; import reactor.test.StepVerifier; import java.net.HttpURLConnection; @@ -19,7 +20,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; public class KeyAsyncClientTest extends KeyClientTestBase { @@ -31,13 +31,13 @@ protected void beforeTest() { if (interceptorManager.isPlaybackMode()) { client = clientSetup(pipeline -> new KeyClientBuilder() - .endpoint(getEndpoint()) + .vaultUrl(getEndpoint()) .pipeline(pipeline) .buildAsyncClient()); } else { client = clientSetup(pipeline -> new KeyClientBuilder() .pipeline(pipeline) - .endpoint(getEndpoint()) + .vaultUrl(getEndpoint()) .buildAsyncClient()); } } @@ -87,9 +87,9 @@ public void updateKey() { StepVerifier.create(client.createKey(original)) .assertNext(response -> assertKeyEquals(original, response)) .verifyComplete(); - Key keyToUpdate = client.getKey(original.getName()).block(); + KeyVaultKey keyToUpdate = client.getKey(original.getName()).block(); - StepVerifier.create(client.updateKeyProperties(keyToUpdate.getProperties().setExpires(updated.getExpires()))) + StepVerifier.create(client.updateKeyProperties(keyToUpdate.getProperties().setExpiresOn(updated.getExpiresOn()))) .assertNext(response -> { assertNotNull(response); assertEquals(original.getName(), response.getName()); @@ -109,9 +109,9 @@ public void updateDisabledKey() { StepVerifier.create(client.createKey(original)) .assertNext(response -> assertKeyEquals(original, response)) .verifyComplete(); - Key keyToUpdate = client.getKey(original.getName()).block(); + KeyVaultKey keyToUpdate = client.getKey(original.getName()).block(); - StepVerifier.create(client.updateKeyProperties(keyToUpdate.getProperties().setExpires(updated.getExpires()))) + StepVerifier.create(client.updateKeyProperties(keyToUpdate.getProperties().setExpiresOn(updated.getExpiresOn()))) .assertNext(response -> { assertNotNull(response); assertEquals(original.getName(), response.getName()); @@ -141,8 +141,8 @@ public void getKey() { */ public void getKeySpecificVersion() { getKeySpecificVersionRunner((key, keyWithNewVal) -> { - final Key keyVersionOne = client.createKey(key).block(); - final Key keyVersionTwo = client.createKey(keyWithNewVal).block(); + final KeyVaultKey keyVersionOne = client.createKey(key).block(); + final KeyVaultKey keyVersionTwo = client.createKey(keyWithNewVal).block(); StepVerifier.create(client.getKey(key.getName(), keyVersionOne.getProperties().getVersion())) .assertNext(response -> assertKeyEquals(key, response)) @@ -171,14 +171,13 @@ public void deleteKey() { StepVerifier.create(client.createKey(keyToDelete)) .assertNext(keyResponse -> assertKeyEquals(keyToDelete, keyResponse)).verifyComplete(); - StepVerifier.create(client.deleteKey(keyToDelete.getName())) - .assertNext(deletedKeyResponse -> { - assertNotNull(deletedKeyResponse.getDeletedDate()); - assertNotNull(deletedKeyResponse.getRecoveryId()); - assertNotNull(deletedKeyResponse.getScheduledPurgeDate()); - assertEquals(keyToDelete.getName(), deletedKeyResponse.getName()); - }).verifyComplete(); - sleepInRecordMode(30000); + Poller poller = client.beginDeleteKey(keyToDelete.getName()); + poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); + DeletedKey deletedKeyResponse = poller.getLastPollResponse().getValue(); + assertNotNull(deletedKeyResponse.getDeletedOn()); + assertNotNull(deletedKeyResponse.getRecoveryId()); + assertNotNull(deletedKeyResponse.getScheduledPurgeDate()); + assertEquals(keyToDelete.getName(), deletedKeyResponse.getName()); StepVerifier.create(client.purgeDeletedKeyWithResponse(keyToDelete.getName())) .assertNext(voidResponse -> { @@ -189,8 +188,9 @@ public void deleteKey() { } public void deleteKeyNotFound() { - StepVerifier.create(client.deleteKey("non-existing")) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND)); + Poller deletedKeyPoller = client.beginDeleteKey("non-existing"); + while (!deletedKeyPoller.isComplete()) { sleepInRecordMode(1000); } + assertEquals(deletedKeyPoller.getLastPollResponse().getStatus(), PollResponse.OperationStatus.FAILED); } /** @@ -209,16 +209,16 @@ public void recoverDeletedKey() { StepVerifier.create(client.createKey(keyToDeleteAndRecover)) .assertNext(keyResponse -> assertKeyEquals(keyToDeleteAndRecover, keyResponse)).verifyComplete(); - StepVerifier.create(client.deleteKey(keyToDeleteAndRecover.getName())) - .assertNext(Assert::assertNotNull).verifyComplete(); - sleepInRecordMode(30000); + Poller poller = client.beginDeleteKey(keyToDeleteAndRecover.getName()); + poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); + assertNotNull(poller.getLastPollResponse().getValue()); - StepVerifier.create(client.recoverDeletedKey(keyToDeleteAndRecover.getName())) - .assertNext(keyResponse -> { - assertEquals(keyToDeleteAndRecover.getName(), keyResponse.getName()); - assertEquals(keyToDeleteAndRecover.getNotBefore(), keyResponse.getProperties().getNotBefore()); - assertEquals(keyToDeleteAndRecover.getExpires(), keyResponse.getProperties().getExpires()); - }).verifyComplete(); + Poller recoverPoller = client.beginRecoverDeletedKey(keyToDeleteAndRecover.getName()); + recoverPoller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); + KeyVaultKey keyResponse = recoverPoller.getLastPollResponse().getValue(); + assertEquals(keyToDeleteAndRecover.getName(), keyResponse.getName()); + assertEquals(keyToDeleteAndRecover.getNotBefore(), keyResponse.getProperties().getNotBefore()); + assertEquals(keyToDeleteAndRecover.getExpiresOn(), keyResponse.getProperties().getExpiresOn()); }); } @@ -226,24 +226,18 @@ public void recoverDeletedKey() { * Tests that an attempt to recover a non existing deleted key throws an error on a soft-delete enabled vault. */ public void recoverDeletedKeyNotFound() { - StepVerifier.create(client.recoverDeletedKey("non-existing")) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND)); + Poller poller = client.beginRecoverDeletedKey("non-existing"); + while (!poller.isComplete()) { sleepInRecordMode(1000); } + assertEquals(poller.getStatus(), PollResponse.OperationStatus.FAILED); } /** * Tests that a key can be backed up in the key vault. */ public void backupKey() { - backupKeyRunner((keyToBackup) -> { - StepVerifier.create(client.createKey(keyToBackup)) - .assertNext(keyResponse -> assertKeyEquals(keyToBackup, keyResponse)).verifyComplete(); - - StepVerifier.create(client.backupKey(keyToBackup.getName())) - .assertNext(response -> { - assertNotNull(response); - assertTrue(response.length > 0); - }).verifyComplete(); - }); + Poller poller = client.beginRecoverDeletedKey("non-existing"); + while (!poller.isComplete()) { sleepInRecordMode(1000); } + assertEquals(poller.getStatus(), PollResponse.OperationStatus.FAILED); } /** @@ -263,9 +257,9 @@ public void restoreKey() { .assertNext(keyResponse -> assertKeyEquals(keyToBackupAndRestore, keyResponse)).verifyComplete(); byte[] backup = client.backupKey(keyToBackupAndRestore.getName()).block(); - StepVerifier.create(client.deleteKey(keyToBackupAndRestore.getName())) - .assertNext(Assert::assertNotNull).verifyComplete(); - pollOnKeyDeletion(keyToBackupAndRestore.getName()); + Poller poller = client.beginDeleteKey(keyToBackupAndRestore.getName()); + poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); + assertNotNull(poller.getLastPollResponse().getValue()); StepVerifier.create(client.purgeDeletedKeyWithResponse(keyToBackupAndRestore.getName())) .assertNext(voidResponse -> { @@ -275,11 +269,11 @@ public void restoreKey() { sleepInRecordMode(60000); - StepVerifier.create(client.restoreKey(backup)) + StepVerifier.create(client.restoreKeyBackup(backup)) .assertNext(response -> { assertEquals(keyToBackupAndRestore.getName(), response.getName()); assertEquals(keyToBackupAndRestore.getNotBefore(), response.getProperties().getNotBefore()); - assertEquals(keyToBackupAndRestore.getExpires(), response.getProperties().getExpires()); + assertEquals(keyToBackupAndRestore.getExpiresOn(), response.getProperties().getExpiresOn()); }).verifyComplete(); }); } @@ -289,7 +283,7 @@ public void restoreKey() { */ public void restoreKeyFromMalformedBackup() { byte[] keyBackupBytes = "non-existing".getBytes(); - StepVerifier.create(client.restoreKey(keyBackupBytes)) + StepVerifier.create(client.restoreKeyBackup(keyBackupBytes)) .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceModifiedException.class, HttpURLConnection.HTTP_BAD_REQUEST)); } @@ -302,14 +296,13 @@ public void getDeletedKey() { StepVerifier.create(client.createKey(keyToDeleteAndGet)) .assertNext(keyResponse -> assertKeyEquals(keyToDeleteAndGet, keyResponse)).verifyComplete(); - StepVerifier.create(client.deleteKey(keyToDeleteAndGet.getName())) - .assertNext(Assert::assertNotNull).verifyComplete(); - pollOnKeyDeletion(keyToDeleteAndGet.getName()); - sleepInRecordMode(30000); + Poller poller = client.beginDeleteKey(keyToDeleteAndGet.getName()); + poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); + assertNotNull(poller.getLastPollResponse().getValue()); StepVerifier.create(client.getDeletedKey(keyToDeleteAndGet.getName())) .assertNext(deletedKeyResponse -> { - assertNotNull(deletedKeyResponse.getDeletedDate()); + assertNotNull(deletedKeyResponse.getDeletedOn()); assertNotNull(deletedKeyResponse.getRecoveryId()); assertNotNull(deletedKeyResponse.getScheduledPurgeDate()); assertEquals(keyToDeleteAndGet.getName(), deletedKeyResponse.getName()); @@ -332,16 +325,16 @@ public void listDeletedKeys() { listDeletedKeysRunner((keys) -> { List deletedKeys = new ArrayList<>(); - for (KeyCreateOptions key : keys.values()) { + for (CreateKeyOptions key : keys.values()) { StepVerifier.create(client.createKey(key)) .assertNext(keyResponse -> assertKeyEquals(key, keyResponse)).verifyComplete(); } sleepInRecordMode(10000); - for (KeyCreateOptions key : keys.values()) { - StepVerifier.create(client.deleteKey(key.getName())) - .assertNext(Assert::assertNotNull).verifyComplete(); - pollOnKeyDeletion(key.getName()); + for (CreateKeyOptions key : keys.values()) { + Poller poller = client.beginDeleteKey(key.getName()); + poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); + assertNotNull(poller.getLastPollResponse().getValue()); } sleepInRecordMode(60000); @@ -350,7 +343,7 @@ public void listDeletedKeys() { for (DeletedKey actualKey : deletedKeys) { if (keys.containsKey(actualKey.getName())) { - assertNotNull(actualKey.getDeletedDate()); + assertNotNull(actualKey.getDeletedOn()); assertNotNull(actualKey.getRecoveryId()); keys.remove(actualKey.getName()); } @@ -376,21 +369,20 @@ public void listKeyVersions() { listKeyVersionsRunner((keys) -> { List output = new ArrayList<>(); String keyName = null; - for (KeyCreateOptions key : keys) { + for (CreateKeyOptions key : keys) { keyName = key.getName(); client.createKey(key).subscribe(keyResponse -> assertKeyEquals(key, keyResponse)); sleepInRecordMode(1000); } sleepInRecordMode(30000); - client.listKeyVersions(keyName).subscribe(output::add); + client.listPropertiesOfKeyVersions(keyName).subscribe(output::add); sleepInRecordMode(30000); assertEquals(keys.size(), output.size()); - StepVerifier.create(client.deleteKey(keyName)) - .assertNext(Assert::assertNotNull).verifyComplete(); - pollOnKeyDeletion(keyName); - + Poller poller = client.beginDeleteKey(keyName); + poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); + assertNotNull(poller.getLastPollResponse().getValue()); StepVerifier.create(client.purgeDeletedKeyWithResponse(keyName)) .assertNext(voidResponse -> { @@ -407,18 +399,18 @@ public void listKeyVersions() { public void listKeys() { listKeysRunner((keys) -> { List output = new ArrayList<>(); - for (KeyCreateOptions key : keys.values()) { + for (CreateKeyOptions key : keys.values()) { client.createKey(key).subscribe(keyResponse -> assertKeyEquals(key, keyResponse)); sleepInRecordMode(1000); } sleepInRecordMode(30000); - client.listKeys().subscribe(output::add); + client.listPropertiesOfKeys().subscribe(output::add); sleepInRecordMode(30000); for (KeyProperties actualKey : output) { if (keys.containsKey(actualKey.getName())) { - KeyCreateOptions expectedKey = keys.get(actualKey.getName()); - assertEquals(expectedKey.getExpires(), actualKey.getExpires()); + CreateKeyOptions expectedKey = keys.get(actualKey.getName()); + assertEquals(expectedKey.getExpiresOn(), actualKey.getExpiresOn()); assertEquals(expectedKey.getNotBefore(), actualKey.getNotBefore()); keys.remove(actualKey.getName()); } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTest.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTest.java index 924d0610b984..3682028f0562 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTest.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTest.java @@ -5,11 +5,13 @@ import com.azure.core.exception.ResourceModifiedException; import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; +import com.azure.security.keyvault.keys.models.CreateKeyOptions; import com.azure.security.keyvault.keys.models.DeletedKey; -import com.azure.security.keyvault.keys.models.Key; +import com.azure.security.keyvault.keys.models.KeyVaultKey; import com.azure.security.keyvault.keys.models.KeyProperties; -import com.azure.security.keyvault.keys.models.KeyCreateOptions; -import com.azure.security.keyvault.keys.models.webkey.KeyType; +import com.azure.security.keyvault.keys.models.KeyType; import java.net.HttpURLConnection; import java.util.ArrayList; @@ -30,12 +32,12 @@ protected void beforeTest() { if (interceptorManager.isPlaybackMode()) { client = clientSetup(pipeline -> new KeyClientBuilder() - .endpoint(getEndpoint()) + .vaultUrl(getEndpoint()) .pipeline(pipeline) .buildClient()); } else { client = clientSetup(pipeline -> new KeyClientBuilder() - .endpoint(getEndpoint()) + .vaultUrl(getEndpoint()) .pipeline(pipeline) .buildClient()); } @@ -69,6 +71,7 @@ public void setKeyNullType() { */ public void setKeyNull() { assertRunnableThrowsException(() -> client.createKey(null), NullPointerException.class); + assertRunnableThrowsException(() -> client.createKey(null), NullPointerException.class); } /** @@ -77,8 +80,8 @@ public void setKeyNull() { public void updateKey() { updateKeyRunner((original, updated) -> { assertKeyEquals(original, client.createKey(original)); - Key keyToUpdate = client.getKey(original.getName()); - client.updateKeyProperties(keyToUpdate.getProperties().setExpires(updated.getExpires())); + KeyVaultKey keyToUpdate = client.getKey(original.getName()); + client.updateKeyProperties(keyToUpdate.getProperties().setExpiresOn(updated.getExpiresOn())); assertKeyEquals(updated, client.getKey(original.getName())); }); } @@ -89,8 +92,8 @@ public void updateKey() { public void updateDisabledKey() { updateDisabledKeyRunner((original, updated) -> { assertKeyEquals(original, client.createKey(original)); - Key keyToUpdate = client.getKey(original.getName()); - client.updateKeyProperties(keyToUpdate.getProperties().setExpires(updated.getExpires())); + KeyVaultKey keyToUpdate = client.getKey(original.getName()); + client.updateKeyProperties(keyToUpdate.getProperties().setExpiresOn(updated.getExpiresOn())); assertKeyEquals(updated, client.getKey(original.getName())); }); } @@ -110,8 +113,8 @@ public void getKey() { */ public void getKeySpecificVersion() { getKeySpecificVersionRunner((key, keyWithNewVal) -> { - Key keyVersionOne = client.createKey(key); - Key keyVersionTwo = client.createKey(keyWithNewVal); + KeyVaultKey keyVersionOne = client.createKey(key); + KeyVaultKey keyVersionTwo = client.createKey(keyWithNewVal); assertKeyEquals(key, client.getKey(keyVersionOne.getName(), keyVersionOne.getProperties().getVersion())); assertKeyEquals(keyWithNewVal, client.getKey(keyVersionTwo.getName(), keyVersionTwo.getProperties().getVersion())); }); @@ -130,9 +133,22 @@ public void getKeyNotFound() { public void deleteKey() { deleteKeyRunner((keyToDelete) -> { assertKeyEquals(keyToDelete, client.createKey(keyToDelete)); - DeletedKey deletedKey = client.deleteKey(keyToDelete.getName()); - pollOnKeyDeletion(keyToDelete.getName()); - assertNotNull(deletedKey.getDeletedDate()); + + Poller deletedKeyPoller = client.beginDeleteKey(keyToDelete.getName()); + + while (deletedKeyPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS + && !deletedKeyPoller.isComplete()) { + sleepInRecordMode(2000); + } + + DeletedKey deletedKey = deletedKeyPoller.getLastPollResponse().getValue(); + + // Key is being deleted on server. + while (!deletedKeyPoller.isComplete()) { + sleepInRecordMode(2000); + } + + assertNotNull(deletedKey.getDeletedOn()); assertNotNull(deletedKey.getRecoveryId()); assertNotNull(deletedKey.getScheduledPurgeDate()); assertEquals(keyToDelete.getName(), deletedKey.getName()); @@ -142,10 +158,11 @@ public void deleteKey() { } public void deleteKeyNotFound() { - assertRestException(() -> client.deleteKey("non-existing"), ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND); + Poller deletedKeyPoller = client.beginDeleteKey("non-existing"); + while (!deletedKeyPoller.isComplete()) { sleepInRecordMode(1000); } + assertEquals(deletedKeyPoller.getLastPollResponse().getStatus(), PollResponse.OperationStatus.FAILED); } - /** * Tests that an attempt to retrieve a non existing deleted key throws an error on a soft-delete enabled vault. */ @@ -160,12 +177,17 @@ public void getDeletedKeyNotFound() { public void recoverDeletedKey() { recoverDeletedKeyRunner((keyToDeleteAndRecover) -> { assertKeyEquals(keyToDeleteAndRecover, client.createKey(keyToDeleteAndRecover)); - assertNotNull(client.deleteKey(keyToDeleteAndRecover.getName())); - pollOnKeyDeletion(keyToDeleteAndRecover.getName()); - Key recoveredKey = client.recoverDeletedKey(keyToDeleteAndRecover.getName()); + Poller poller = client.beginDeleteKey(keyToDeleteAndRecover.getName()); + while (!poller.isComplete()) { sleepInRecordMode(1000); } + assertNotNull(poller.getLastPollResponse().getValue()); + Poller recoverPoller = client.beginRecoverDeletedKey(keyToDeleteAndRecover.getName()); + while (recoverPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS + && !recoverPoller.isComplete()) { sleepInRecordMode(1000); } + KeyVaultKey recoveredKey = recoverPoller.getLastPollResponse().getValue(); + while (!recoverPoller.isComplete()) { sleepInRecordMode(1000); } assertEquals(keyToDeleteAndRecover.getName(), recoveredKey.getName()); assertEquals(keyToDeleteAndRecover.getNotBefore(), recoveredKey.getProperties().getNotBefore()); - assertEquals(keyToDeleteAndRecover.getExpires(), recoveredKey.getProperties().getExpires()); + assertEquals(keyToDeleteAndRecover.getExpiresOn(), recoveredKey.getProperties().getExpiresOn()); }); } @@ -173,7 +195,9 @@ public void recoverDeletedKey() { * Tests that an attempt to recover a non existing deleted key throws an error on a soft-delete enabled vault. */ public void recoverDeletedKeyNotFound() { - assertRestException(() -> client.recoverDeletedKey("non-existing"), ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND); + Poller poller = client.beginRecoverDeletedKey("non-existing"); + while (!poller.isComplete()) { sleepInRecordMode(1000); } + assertEquals(poller.getStatus(), PollResponse.OperationStatus.FAILED); } /** @@ -204,14 +228,14 @@ public void restoreKey() { byte[] backupBytes = (client.backupKey(keyToBackupAndRestore.getName())); assertNotNull(backupBytes); assertTrue(backupBytes.length > 0); - client.deleteKey(keyToBackupAndRestore.getName()); - pollOnKeyDeletion(keyToBackupAndRestore.getName()); + Poller poller = client.beginDeleteKey(keyToBackupAndRestore.getName()); + while (!poller.isComplete()) { sleepInRecordMode(1000); } client.purgeDeletedKey(keyToBackupAndRestore.getName()); pollOnKeyPurge(keyToBackupAndRestore.getName()); sleepInRecordMode(60000); - Key restoredKey = client.restoreKey(backupBytes); + KeyVaultKey restoredKey = client.restoreKeyBackup(backupBytes); assertEquals(keyToBackupAndRestore.getName(), restoredKey.getName()); - assertEquals(keyToBackupAndRestore.getExpires(), restoredKey.getProperties().getExpires()); + assertEquals(keyToBackupAndRestore.getExpiresOn(), restoredKey.getProperties().getExpiresOn()); }); } @@ -220,7 +244,7 @@ public void restoreKey() { */ public void restoreKeyFromMalformedBackup() { byte[] keyBackupBytes = "non-existing".getBytes(); - assertRestException(() -> client.restoreKey(keyBackupBytes), ResourceModifiedException.class, HttpURLConnection.HTTP_BAD_REQUEST); + assertRestException(() -> client.restoreKeyBackup(keyBackupBytes), ResourceModifiedException.class, HttpURLConnection.HTTP_BAD_REQUEST); } /** @@ -228,16 +252,16 @@ public void restoreKeyFromMalformedBackup() { */ public void listKeys() { listKeysRunner((keys) -> { - HashMap keysToList = keys; - for (KeyCreateOptions key : keysToList.values()) { + HashMap keysToList = keys; + for (CreateKeyOptions key : keysToList.values()) { assertKeyEquals(key, client.createKey(key)); sleepInRecordMode(5000); } - for (KeyProperties actualKey : client.listKeys()) { + for (KeyProperties actualKey : client.listPropertiesOfKeys()) { if (keys.containsKey(actualKey.getName())) { - KeyCreateOptions expectedKey = keys.get(actualKey.getName()); - assertEquals(expectedKey.getExpires(), actualKey.getExpires()); + CreateKeyOptions expectedKey = keys.get(actualKey.getName()); + assertEquals(expectedKey.getExpiresOn(), actualKey.getExpiresOn()); assertEquals(expectedKey.getNotBefore(), actualKey.getNotBefore()); keys.remove(actualKey.getName()); } @@ -252,11 +276,11 @@ public void listKeys() { public void getDeletedKey() { getDeletedKeyRunner((keyToDeleteAndGet) -> { assertKeyEquals(keyToDeleteAndGet, client.createKey(keyToDeleteAndGet)); - assertNotNull(client.deleteKey(keyToDeleteAndGet.getName())); - pollOnKeyDeletion(keyToDeleteAndGet.getName()); + Poller poller = client.beginDeleteKey(keyToDeleteAndGet.getName()); + while (!poller.isComplete()) { sleepInRecordMode(1000); } sleepInRecordMode(30000); DeletedKey deletedKey = client.getDeletedKey(keyToDeleteAndGet.getName()); - assertNotNull(deletedKey.getDeletedDate()); + assertNotNull(deletedKey.getDeletedOn()); assertNotNull(deletedKey.getRecoveryId()); assertNotNull(deletedKey.getScheduledPurgeDate()); assertEquals(keyToDeleteAndGet.getName(), deletedKey.getName()); @@ -265,28 +289,28 @@ public void getDeletedKey() { sleepInRecordMode(10000); }); } -// -// + + /** * Tests that deleted keys can be listed in the key vault. */ @Override public void listDeletedKeys() { listDeletedKeysRunner((keys) -> { - HashMap keysToDelete = keys; - for (KeyCreateOptions key : keysToDelete.values()) { + HashMap keysToDelete = keys; + for (CreateKeyOptions key : keysToDelete.values()) { assertKeyEquals(key, client.createKey(key)); } - for (KeyCreateOptions key : keysToDelete.values()) { - client.deleteKey(key.getName()); - pollOnKeyDeletion(key.getName()); + for (CreateKeyOptions key : keysToDelete.values()) { + Poller poller = client.beginDeleteKey(key.getName()); + while (!poller.isComplete()) { sleepInRecordMode(1000); } } sleepInRecordMode(60000); Iterable deletedKeys = client.listDeletedKeys(); for (DeletedKey actualKey : deletedKeys) { if (keysToDelete.containsKey(actualKey.getName())) { - assertNotNull(actualKey.getDeletedDate()); + assertNotNull(actualKey.getDeletedOn()); assertNotNull(actualKey.getRecoveryId()); keysToDelete.remove(actualKey.getName()); } @@ -308,25 +332,24 @@ public void listDeletedKeys() { @Override public void listKeyVersions() { listKeyVersionsRunner((keys) -> { - List keyVersions = keys; + List keyVersions = keys; String keyName = null; - for (KeyCreateOptions key : keyVersions) { + for (CreateKeyOptions key : keyVersions) { keyName = key.getName(); assertKeyEquals(key, client.createKey(key)); } - Iterable keyVersionsOutput = client.listKeyVersions(keyName); + Iterable keyVersionsOutput = client.listPropertiesOfKeyVersions(keyName); List keyVersionsList = new ArrayList<>(); keyVersionsOutput.forEach(keyVersionsList::add); assertEquals(keyVersions.size(), keyVersionsList.size()); - client.deleteKey(keyName); - pollOnKeyDeletion(keyName); + Poller poller = client.beginDeleteKey(keyName); + while (!poller.isComplete()) { sleepInRecordMode(1000); } client.purgeDeletedKey(keyName); pollOnKeyPurge(keyName); }); - } private DeletedKey pollOnKeyDeletion(String keyName) { diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java index 6b763ed6c5ab..d667b3636b3c 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java @@ -16,10 +16,10 @@ import com.azure.core.test.TestBase; import com.azure.core.util.Configuration; import com.azure.security.keyvault.keys.implementation.AzureKeyVaultConfiguration; +import com.azure.security.keyvault.keys.models.CreateKeyOptions; +import com.azure.security.keyvault.keys.models.KeyVaultKey; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.keys.models.Key; -import com.azure.security.keyvault.keys.models.KeyCreateOptions; -import com.azure.security.keyvault.keys.models.webkey.KeyType; +import com.azure.security.keyvault.keys.models.KeyType; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; @@ -102,13 +102,13 @@ T clientSetup(Function clientBuilder) { @Test public abstract void setKey(); - void setKeyRunner(Consumer testRunner) { + void setKeyRunner(Consumer testRunner) { final Map tags = new HashMap<>(); tags.put("foo", "baz"); - final KeyCreateOptions keyOptions = new KeyCreateOptions(KEY_NAME, RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2050, 1, 30, 0, 0, 0, 0, ZoneOffset.UTC)) + final CreateKeyOptions keyOptions = new CreateKeyOptions(KEY_NAME, RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2050, 1, 30, 0, 0, 0, 0, ZoneOffset.UTC)) .setNotBefore(OffsetDateTime.of(2000, 1, 30, 12, 59, 59, 0, ZoneOffset.UTC)) .setTags(tags); @@ -121,8 +121,8 @@ void setKeyRunner(Consumer testRunner) { @Test public abstract void setKeyNullType(); - void setKeyEmptyValueRunner(Consumer testRunner) { - KeyCreateOptions key = new KeyCreateOptions(KEY_NAME, null); + void setKeyEmptyValueRunner(Consumer testRunner) { + CreateKeyOptions key = new CreateKeyOptions(KEY_NAME, null); testRunner.accept(key); } @@ -132,17 +132,17 @@ void setKeyEmptyValueRunner(Consumer testRunner) { @Test public abstract void updateKey(); - void updateKeyRunner(BiConsumer testRunner) { + void updateKeyRunner(BiConsumer testRunner) { final Map tags = new HashMap<>(); tags.put("first tag", "first value"); tags.put("second tag", "second value"); - final KeyCreateOptions originalKey = new KeyCreateOptions("testKey1", RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) + final CreateKeyOptions originalKey = new CreateKeyOptions("testKey1", RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) .setTags(tags); - final KeyCreateOptions updatedKey = new KeyCreateOptions("testKey1", RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2060, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) + final CreateKeyOptions updatedKey = new CreateKeyOptions("testKey1", RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2060, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) .setTags(tags); testRunner.accept(originalKey, updatedKey); @@ -152,16 +152,16 @@ void updateKeyRunner(BiConsumer testRunner) @Test public abstract void updateDisabledKey(); - void updateDisabledKeyRunner(BiConsumer testRunner) { + void updateDisabledKeyRunner(BiConsumer testRunner) { final Map tags = new HashMap<>(); - final KeyCreateOptions originalKey = new KeyCreateOptions("testKey2", EC_KEY_TYPE) - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) + final CreateKeyOptions originalKey = new CreateKeyOptions("testKey2", EC_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) .setEnabled(false); - final KeyCreateOptions updatedKey = new KeyCreateOptions("testKey2", EC_KEY_TYPE) - .setExpires(OffsetDateTime.of(2060, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); + final CreateKeyOptions updatedKey = new CreateKeyOptions("testKey2", EC_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2060, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); testRunner.accept(originalKey, updatedKey); } @@ -169,9 +169,9 @@ void updateDisabledKeyRunner(BiConsumer test @Test public abstract void getKey(); - void getKeyRunner(Consumer testRunner) { - final KeyCreateOptions originalKey = new KeyCreateOptions("testKey4", RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); + void getKeyRunner(Consumer testRunner) { + final CreateKeyOptions originalKey = new CreateKeyOptions("testKey4", RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); testRunner.accept(originalKey); } @@ -179,12 +179,12 @@ void getKeyRunner(Consumer testRunner) { @Test public abstract void getKeySpecificVersion(); - void getKeySpecificVersionRunner(BiConsumer testRunner) { - final KeyCreateOptions key = new KeyCreateOptions("testKey3", RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); + void getKeySpecificVersionRunner(BiConsumer testRunner) { + final CreateKeyOptions key = new CreateKeyOptions("testKey3", RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); - final KeyCreateOptions keyWithNewVal = new KeyCreateOptions("testKey3", RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); + final CreateKeyOptions keyWithNewVal = new CreateKeyOptions("testKey3", RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); testRunner.accept(key, keyWithNewVal); } @@ -195,9 +195,9 @@ void getKeySpecificVersionRunner(BiConsumer @Test public abstract void deleteKey(); - void deleteKeyRunner(Consumer testRunner) { - final KeyCreateOptions keyToDelete = new KeyCreateOptions("testKey5", RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); + void deleteKeyRunner(Consumer testRunner) { + final CreateKeyOptions keyToDelete = new CreateKeyOptions("testKey5", RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); testRunner.accept(keyToDelete); } @@ -208,9 +208,9 @@ void deleteKeyRunner(Consumer testRunner) { @Test public abstract void getDeletedKey(); - void getDeletedKeyRunner(Consumer testRunner) { - final KeyCreateOptions keyToDeleteAndGet = new KeyCreateOptions("testKey6", RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); + void getDeletedKeyRunner(Consumer testRunner) { + final CreateKeyOptions keyToDeleteAndGet = new CreateKeyOptions("testKey6", RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); testRunner.accept(keyToDeleteAndGet); } @@ -220,9 +220,9 @@ void getDeletedKeyRunner(Consumer testRunner) { @Test public abstract void recoverDeletedKey(); - void recoverDeletedKeyRunner(Consumer testRunner) { - final KeyCreateOptions keyToDeleteAndRecover = new KeyCreateOptions("testKey7", RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); + void recoverDeletedKeyRunner(Consumer testRunner) { + final CreateKeyOptions keyToDeleteAndRecover = new CreateKeyOptions("testKey7", RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); testRunner.accept(keyToDeleteAndRecover); } @@ -232,9 +232,9 @@ void recoverDeletedKeyRunner(Consumer testRunner) { @Test public abstract void backupKey(); - void backupKeyRunner(Consumer testRunner) { - final KeyCreateOptions keyToBackup = new KeyCreateOptions("testKey8", RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); + void backupKeyRunner(Consumer testRunner) { + final CreateKeyOptions keyToBackup = new CreateKeyOptions("testKey8", RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); testRunner.accept(keyToBackup); } @@ -244,9 +244,9 @@ void backupKeyRunner(Consumer testRunner) { @Test public abstract void restoreKey(); - void restoreKeyRunner(Consumer testRunner) { - final KeyCreateOptions keyToBackupAndRestore = new KeyCreateOptions("testKey9", RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); + void restoreKeyRunner(Consumer testRunner) { + final CreateKeyOptions keyToBackupAndRestore = new CreateKeyOptions("testKey9", RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); testRunner.accept(keyToBackupAndRestore); } @@ -256,13 +256,13 @@ void restoreKeyRunner(Consumer testRunner) { @Test public abstract void listKeys(); - void listKeysRunner(Consumer> testRunner) { - HashMap keys = new HashMap<>(); + void listKeysRunner(Consumer> testRunner) { + HashMap keys = new HashMap<>(); String keyName; for (int i = 0; i < 30; i++) { keyName = "listKey" + i; - KeyCreateOptions key = new KeyCreateOptions(keyName, RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); + CreateKeyOptions key = new CreateKeyOptions(keyName, RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)); keys.put(keyName, key); } testRunner.accept(keys); @@ -271,13 +271,13 @@ void listKeysRunner(Consumer> testRunner) { @Test public abstract void listKeyVersions(); - void listKeyVersionsRunner(Consumer> testRunner) { - List keys = new ArrayList<>(); + void listKeyVersionsRunner(Consumer> testRunner) { + List keys = new ArrayList<>(); String keyName; for (int i = 1; i < 5; i++) { keyName = "listKeyVersion"; - keys.add(new KeyCreateOptions(keyName, RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2090, 5, i, 0, 0, 0, 0, ZoneOffset.UTC))); + keys.add(new CreateKeyOptions(keyName, RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2090, 5, i, 0, 0, 0, 0, ZoneOffset.UTC))); } testRunner.accept(keys); @@ -286,13 +286,13 @@ void listKeyVersionsRunner(Consumer> testRunner) { @Test public abstract void listDeletedKeys(); - void listDeletedKeysRunner(Consumer> testRunner) { - HashMap keys = new HashMap<>(); + void listDeletedKeysRunner(Consumer> testRunner) { + HashMap keys = new HashMap<>(); String keyName; for (int i = 0; i < 3; i++) { keyName = "listDeletedKeysTest" + i; - keys.put(keyName, new KeyCreateOptions(keyName, RSA_KEY_TYPE) - .setExpires(OffsetDateTime.of(2090, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); + keys.put(keyName, new CreateKeyOptions(keyName, RSA_KEY_TYPE) + .setExpiresOn(OffsetDateTime.of(2090, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); } testRunner.accept(keys); @@ -304,7 +304,7 @@ void listDeletedKeysRunner(Consumer> testRunne * @param expected Key expected to be returned by the service * @param response Response returned by the service, the body should contain a Key */ - static void assertKeyEquals(KeyCreateOptions expected, Response response) { + static void assertKeyEquals(CreateKeyOptions expected, Response response) { assertKeyEquals(expected, response, 200); } @@ -315,7 +315,7 @@ static void assertKeyEquals(KeyCreateOptions expected, Response response) { * @param response RestResponse returned from the service, the body should contain a ConfigurationSetting * @param expectedStatusCode Expected HTTP status code returned by the service */ - static void assertKeyEquals(KeyCreateOptions expected, Response response, final int expectedStatusCode) { + static void assertKeyEquals(CreateKeyOptions expected, Response response, final int expectedStatusCode) { assertNotNull(response); assertEquals(expectedStatusCode, response.getStatusCode()); @@ -328,10 +328,10 @@ static void assertKeyEquals(KeyCreateOptions expected, Response response, f * @param expected ConfigurationSetting expected to be returned by the service * @param actual ConfigurationSetting contained in the RestResponse body */ - static void assertKeyEquals(KeyCreateOptions expected, Key actual) { + static void assertKeyEquals(CreateKeyOptions expected, KeyVaultKey actual) { assertEquals(expected.getName(), actual.getName()); - assertEquals(expected.getKeyType(), actual.getKeyMaterial().getKty()); - assertEquals(expected.getExpires(), actual.getProperties().getExpires()); + assertEquals(expected.getKeyType(), actual.getKey().getKeyType()); + assertEquals(expected.getExpiresOn(), actual.getProperties().getExpiresOn()); assertEquals(expected.getNotBefore(), actual.getProperties().getNotBefore()); } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTest.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTest.java index d94b3030cf08..f36778bdb4be 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTest.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTest.java @@ -12,13 +12,10 @@ import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; import com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm; import com.azure.security.keyvault.keys.models.DeletedKey; -import com.azure.security.keyvault.keys.models.Key; -import com.azure.security.keyvault.keys.models.webkey.JsonWebKey; -import com.azure.security.keyvault.keys.models.webkey.KeyCurveName; -import com.azure.security.keyvault.keys.models.webkey.KeyOperation; -import com.azure.security.keyvault.keys.models.webkey.KeyType; +import com.azure.security.keyvault.keys.models.KeyVaultKey; +import com.azure.security.keyvault.keys.models.JsonWebKey; +import com.azure.security.keyvault.keys.models.KeyCurveName; -import javax.crypto.spec.SecretKeySpec; import java.security.*; import java.security.spec.ECGenParameterSpec; import java.util.*; @@ -38,7 +35,7 @@ protected void beforeTest() { this.pipeline = pipeline; return new KeyClientBuilder() .pipeline(pipeline) - .endpoint(getEndpoint()) + .vaultUrl(getEndpoint()) .buildClient(); }); } else { @@ -46,7 +43,7 @@ protected void beforeTest() { this.pipeline = pipeline; return new KeyClientBuilder() .pipeline(pipeline) - .endpoint(getEndpoint()) + .vaultUrl(getEndpoint()) .buildClient(); }); } @@ -55,14 +52,12 @@ protected void beforeTest() { @Override public void encryptDecryptRsa() throws Exception { encryptDecryptRsaRunner(keyPair -> { - JsonWebKey key = JsonWebKey.fromRSA(keyPair); + JsonWebKey key = JsonWebKey.fromRsa(keyPair); String keyName = "testRsaKey"; - Key importedKey = client.importKey(keyName, key); - key.setKid(importedKey.getId()); - key.setKeyOps(importedKey.getKeyMaterial().getKeyOps()); + KeyVaultKey importedKey = client.importKey(keyName, key); CryptographyClient cryptoClient = new CryptographyClientBuilder() .pipeline(pipeline) - .jsonWebKey(key) + .keyIdentifier(importedKey.getId()) .buildClient(); CryptographyServiceClient serviceClient = cryptoClient.getServiceClient(); @@ -83,7 +78,7 @@ public void encryptDecryptRsa() throws Exception { assertArrayEquals(decryptedText, plainText); } - client.deleteKey(keyName); + client.beginDeleteKey(keyName); pollOnKeyDeletion(keyName); client.purgeDeletedKey(keyName); pollOnKeyPurge(keyName); @@ -93,14 +88,12 @@ public void encryptDecryptRsa() throws Exception { @Override public void wrapUnwraptRsa() throws Exception { encryptDecryptRsaRunner(keyPair -> { - JsonWebKey key = JsonWebKey.fromRSA(keyPair); + JsonWebKey key = JsonWebKey.fromRsa(keyPair); String keyName = "testRsaKeyWrapUnwrap"; - Key importedKey = client.importKey(keyName, key); - key.setKid(importedKey.getId()); - key.setKeyOps(importedKey.getKeyMaterial().getKeyOps()); + KeyVaultKey importedKey = client.importKey(keyName, key); CryptographyClient cryptoClient = new CryptographyClientBuilder() .pipeline(pipeline) - .jsonWebKey(key) + .keyIdentifier(importedKey.getId()) .buildClient(); CryptographyServiceClient serviceClient = cryptoClient.getServiceClient(); @@ -121,7 +114,7 @@ public void wrapUnwraptRsa() throws Exception { assertArrayEquals(decryptedKey, plainText); } - client.deleteKey(keyName); + client.beginDeleteKey(keyName); pollOnKeyDeletion(keyName); client.purgeDeletedKey(keyName); pollOnKeyPurge(keyName); @@ -132,14 +125,12 @@ public void wrapUnwraptRsa() throws Exception { @Override public void signVerifyRsa() throws Exception { encryptDecryptRsaRunner(keyPair -> { - JsonWebKey key = JsonWebKey.fromRSA(keyPair); + JsonWebKey key = JsonWebKey.fromRsa(keyPair); String keyName = "testRsaKeySignVerify"; - Key importedKey = client.importKey(keyName, key); - key.setKid(importedKey.getId()); - key.setKeyOps(importedKey.getKeyMaterial().getKeyOps()); + KeyVaultKey importedKey = client.importKey(keyName, key); CryptographyClient cryptoClient = new CryptographyClientBuilder() .pipeline(pipeline) - .jsonWebKey(key) + .keyIdentifier(importedKey.getId()) .buildClient(); CryptographyServiceClient serviceClient = cryptoClient.getServiceClient(); @@ -160,7 +151,7 @@ public void signVerifyRsa() throws Exception { assertTrue(verifyStatus); } - client.deleteKey(keyName); + client.beginDeleteKey(keyName); pollOnKeyDeletion(keyName); client.purgeDeletedKey(keyName); pollOnKeyPurge(keyName); @@ -190,14 +181,12 @@ public void signVerifyEc() throws NoSuchAlgorithmException, InvalidAlgorithmPara generator.initialize(gps); KeyPair keyPair = generator.generateKeyPair(); - JsonWebKey key = JsonWebKey.fromEC(keyPair, provider); + JsonWebKey key = JsonWebKey.fromEc(keyPair, provider); String keyName = "testEcKey" + crv.toString(); - Key imported = client.importKey(keyName, key); - key.setKid(imported.getId()); - key.setKeyOps(imported.getKeyMaterial().getKeyOps()); + KeyVaultKey imported = client.importKey(keyName, key); CryptographyClient cryptoClient = new CryptographyClientBuilder() .pipeline(pipeline) - .jsonWebKey(key) + .keyIdentifier(imported.getId()) .buildClient(); CryptographyServiceClient serviceClient = cryptoClient.getServiceClient(); @@ -215,7 +204,7 @@ public void signVerifyEc() throws NoSuchAlgorithmException, InvalidAlgorithmPara assertTrue(verifyStatus); } - client.deleteKey(keyName); + client.beginDeleteKey(keyName); pollOnKeyDeletion(keyName); client.purgeDeletedKey(keyName); pollOnKeyPurge(keyName); @@ -223,271 +212,6 @@ public void signVerifyEc() throws NoSuchAlgorithmException, InvalidAlgorithmPara } - @Override - public void wrapUnwrapSymmetricKeyAES128Kw() { - // Arrange - byte[] kek = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F}; - byte[] cek = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB, (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF}; - byte[] ek = {0x1F, (byte) 0xA6, (byte) 0x8B, 0x0A, (byte) 0x81, 0x12, (byte) 0xB4, 0x47, (byte) 0xAE, (byte) 0xF3, 0x4B, (byte) 0xD8, (byte) 0xFB, 0x5A, 0x7B, (byte) 0x82, (byte) 0x9D, 0x3E, (byte) 0x86, 0x23, 0x71, (byte) 0xD2, (byte) 0xCF, (byte) 0xE5}; - - CryptographyClient cryptoClient = new CryptographyClientBuilder() - .pipeline(pipeline) - .jsonWebKey(JsonWebKey.fromAes(new SecretKeySpec(kek, "AES")) - .setKty(KeyType.OCT) - .setKeyOps(Arrays.asList(KeyOperation.WRAP_KEY, KeyOperation.UNWRAP_KEY))) - .buildClient(); - - byte[] encrypted = cryptoClient.wrapKey(KeyWrapAlgorithm.A128KW, cek).getEncryptedKey(); - - assertArrayEquals(ek, encrypted); - - byte[] decrypted = cryptoClient.unwrapKey(KeyWrapAlgorithm.A128KW, encrypted).getKey(); - - assertArrayEquals(cek, decrypted); - } - - @Override - public void wrapUnwrapSymmetricKeyAES192Kw() { - // Arrange - byte[] kek = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 }; - byte[] cek = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB, (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF }; - byte[] ek = { (byte) 0x96, 0x77, (byte) 0x8B, 0x25, (byte) 0xAE, 0x6C, (byte) 0xA4, 0x35, (byte) 0xF9, 0x2B, 0x5B, (byte) 0x97, (byte) 0xC0, 0x50, (byte) 0xAE, (byte) 0xD2, 0x46, (byte) 0x8A, (byte) 0xB8, (byte) 0xA1, 0x7A, (byte) 0xD8, 0x4E, 0x5D }; - - CryptographyClient cryptoClient = new CryptographyClientBuilder() - .pipeline(pipeline) - .jsonWebKey(JsonWebKey.fromAes(new SecretKeySpec(kek, "AES")) - .setKty(KeyType.OCT) - .setKeyOps(Arrays.asList(KeyOperation.WRAP_KEY, KeyOperation.UNWRAP_KEY))) - .buildClient(); - - byte[] encrypted = cryptoClient.wrapKey(KeyWrapAlgorithm.A192KW, cek).getEncryptedKey(); - - assertArrayEquals(ek, encrypted); - - byte[] decrypted = cryptoClient.unwrapKey(KeyWrapAlgorithm.A192KW, encrypted).getKey(); - - assertArrayEquals(cek, decrypted); - } - - @Override - public void wrapUnwrapSymmetricKeyAES256Kw() { - // Arrange - byte[] kek = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F }; - byte[] cek = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB, (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF }; - byte[] ek = { 0x64, (byte) 0xE8, (byte) 0xC3, (byte) 0xF9, (byte) 0xCE, 0x0F, 0x5B, (byte) 0xA2, 0x63, (byte) 0xE9, 0x77, 0x79, 0x05, (byte) 0x81, (byte) 0x8A, 0x2A, (byte) 0x93, (byte) 0xC8, 0x19, 0x1E, 0x7D, 0x6E, (byte) 0x8A, (byte) 0xE7 }; - - CryptographyClient cryptoClient = new CryptographyClientBuilder() - .pipeline(pipeline) - .jsonWebKey(JsonWebKey.fromAes(new SecretKeySpec(kek, "AES")) - .setKty(KeyType.OCT) - .setKeyOps(Arrays.asList(KeyOperation.WRAP_KEY, KeyOperation.UNWRAP_KEY))) - .buildClient(); - - byte[] encrypted = cryptoClient.wrapKey(KeyWrapAlgorithm.A256KW, cek).getEncryptedKey(); - - assertArrayEquals(ek, encrypted); - - byte[] decrypted = cryptoClient.unwrapKey(KeyWrapAlgorithm.A256KW, encrypted).getKey(); - - assertArrayEquals(cek, decrypted); - } - - @Override - public void encryptDecryptSymmetricKeyAes128CbcHmacSha256() { - byte[] key = { - (byte) 0x00, (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04, (byte) 0x05, (byte) 0x06, (byte) 0x07, (byte) 0x08, (byte) 0x09, (byte) 0x0a, (byte) 0x0b, (byte) 0x0c, (byte) 0x0d, (byte) 0x0e, (byte) 0x0f, - (byte) 0x10, (byte) 0x11, (byte) 0x12, (byte) 0x13, (byte) 0x14, (byte) 0x15, (byte) 0x16, (byte) 0x17, (byte) 0x18, (byte) 0x19, (byte) 0x1a, (byte) 0x1b, (byte) 0x1c, (byte) 0x1d, (byte) 0x1e, (byte) 0x1f - }; - byte[] plaintext = {(byte) 0x41, (byte) 0x20, (byte) 0x63, (byte) 0x69, (byte) 0x70, (byte) 0x68, (byte) 0x65, (byte) 0x72, (byte) 0x20, (byte) 0x73, (byte) 0x79, (byte) 0x73, (byte) 0x74, (byte) 0x65, (byte) 0x6d, (byte) 0x20, - (byte) 0x6d, (byte) 0x75, (byte) 0x73, (byte) 0x74, (byte) 0x20, (byte) 0x6e, (byte) 0x6f, (byte) 0x74, (byte) 0x20, (byte) 0x62, (byte) 0x65, (byte) 0x20, (byte) 0x72, (byte) 0x65, (byte) 0x71, (byte) 0x75, - (byte) 0x69, (byte) 0x72, (byte) 0x65, (byte) 0x64, (byte) 0x20, (byte) 0x74, (byte) 0x6f, (byte) 0x20, (byte) 0x62, (byte) 0x65, (byte) 0x20, (byte) 0x73, (byte) 0x65, (byte) 0x63, (byte) 0x72, (byte) 0x65, - (byte) 0x74, (byte) 0x2c, (byte) 0x20, (byte) 0x61, (byte) 0x6e, (byte) 0x64, (byte) 0x20, (byte) 0x69, (byte) 0x74, (byte) 0x20, (byte) 0x6d, (byte) 0x75, (byte) 0x73, (byte) 0x74, (byte) 0x20, (byte) 0x62, - (byte) 0x65, (byte) 0x20, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x20, (byte) 0x74, (byte) 0x6f, (byte) 0x20, (byte) 0x66, (byte) 0x61, (byte) 0x6c, (byte) 0x6c, (byte) 0x20, (byte) 0x69, - (byte) 0x6e, (byte) 0x74, (byte) 0x6f, (byte) 0x20, (byte) 0x74, (byte) 0x68, (byte) 0x65, (byte) 0x20, (byte) 0x68, (byte) 0x61, (byte) 0x6e, (byte) 0x64, (byte) 0x73, (byte) 0x20, (byte) 0x6f, (byte) 0x66, - (byte) 0x20, (byte) 0x74, (byte) 0x68, (byte) 0x65, (byte) 0x20, (byte) 0x65, (byte) 0x6e, (byte) 0x65, (byte) 0x6d, (byte) 0x79, (byte) 0x20, (byte) 0x77, (byte) 0x69, (byte) 0x74, (byte) 0x68, (byte) 0x6f, - (byte) 0x75, (byte) 0x74, (byte) 0x20, (byte) 0x69, (byte) 0x6e, (byte) 0x63, (byte) 0x6f, (byte) 0x6e, (byte) 0x76, (byte) 0x65, (byte) 0x6e, (byte) 0x69, (byte) 0x65, (byte) 0x6e, (byte) 0x63, (byte) 0x65 - }; - byte[] iv = {(byte) 0x1a, (byte) 0xf3, (byte) 0x8c, (byte) 0x2d, (byte) 0xc2, (byte) 0xb9, (byte) 0x6f, (byte) 0xfd, (byte) 0xd8, (byte) 0x66, (byte) 0x94, (byte) 0x09, (byte) 0x23, (byte) 0x41, (byte) 0xbc, (byte) 0x04}; - byte[] authData = { - (byte) 0x54, (byte) 0x68, (byte) 0x65, (byte) 0x20, (byte) 0x73, (byte) 0x65, (byte) 0x63, (byte) 0x6f, (byte) 0x6e, (byte) 0x64, (byte) 0x20, (byte) 0x70, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x63, - (byte) 0x69, (byte) 0x70, (byte) 0x6c, (byte) 0x65, (byte) 0x20, (byte) 0x6f, (byte) 0x66, (byte) 0x20, (byte) 0x41, (byte) 0x75, (byte) 0x67, (byte) 0x75, (byte) 0x73, (byte) 0x74, (byte) 0x65, (byte) 0x20, - (byte) 0x4b, (byte) 0x65, (byte) 0x72, (byte) 0x63, (byte) 0x6b, (byte) 0x68, (byte) 0x6f, (byte) 0x66, (byte) 0x66, (byte) 0x73 - }; - byte[] expected = { - (byte) 0xc8, (byte) 0x0e, (byte) 0xdf, (byte) 0xa3, (byte) 0x2d, (byte) 0xdf, (byte) 0x39, (byte) 0xd5, (byte) 0xef, (byte) 0x00, (byte) 0xc0, (byte) 0xb4, (byte) 0x68, (byte) 0x83, (byte) 0x42, (byte) 0x79, - (byte) 0xa2, (byte) 0xe4, (byte) 0x6a, (byte) 0x1b, (byte) 0x80, (byte) 0x49, (byte) 0xf7, (byte) 0x92, (byte) 0xf7, (byte) 0x6b, (byte) 0xfe, (byte) 0x54, (byte) 0xb9, (byte) 0x03, (byte) 0xa9, (byte) 0xc9, - (byte) 0xa9, (byte) 0x4a, (byte) 0xc9, (byte) 0xb4, (byte) 0x7a, (byte) 0xd2, (byte) 0x65, (byte) 0x5c, (byte) 0x5f, (byte) 0x10, (byte) 0xf9, (byte) 0xae, (byte) 0xf7, (byte) 0x14, (byte) 0x27, (byte) 0xe2, - (byte) 0xfc, (byte) 0x6f, (byte) 0x9b, (byte) 0x3f, (byte) 0x39, (byte) 0x9a, (byte) 0x22, (byte) 0x14, (byte) 0x89, (byte) 0xf1, (byte) 0x63, (byte) 0x62, (byte) 0xc7, (byte) 0x03, (byte) 0x23, (byte) 0x36, - (byte) 0x09, (byte) 0xd4, (byte) 0x5a, (byte) 0xc6, (byte) 0x98, (byte) 0x64, (byte) 0xe3, (byte) 0x32, (byte) 0x1c, (byte) 0xf8, (byte) 0x29, (byte) 0x35, (byte) 0xac, (byte) 0x40, (byte) 0x96, (byte) 0xc8, - (byte) 0x6e, (byte) 0x13, (byte) 0x33, (byte) 0x14, (byte) 0xc5, (byte) 0x40, (byte) 0x19, (byte) 0xe8, (byte) 0xca, (byte) 0x79, (byte) 0x80, (byte) 0xdf, (byte) 0xa4, (byte) 0xb9, (byte) 0xcf, (byte) 0x1b, - (byte) 0x38, (byte) 0x4c, (byte) 0x48, (byte) 0x6f, (byte) 0x3a, (byte) 0x54, (byte) 0xc5, (byte) 0x10, (byte) 0x78, (byte) 0x15, (byte) 0x8e, (byte) 0xe5, (byte) 0xd7, (byte) 0x9d, (byte) 0xe5, (byte) 0x9f, - (byte) 0xbd, (byte) 0x34, (byte) 0xd8, (byte) 0x48, (byte) 0xb3, (byte) 0xd6, (byte) 0x95, (byte) 0x50, (byte) 0xa6, (byte) 0x76, (byte) 0x46, (byte) 0x34, (byte) 0x44, (byte) 0x27, (byte) 0xad, (byte) 0xe5, - (byte) 0x4b, (byte) 0x88, (byte) 0x51, (byte) 0xff, (byte) 0xb5, (byte) 0x98, (byte) 0xf7, (byte) 0xf8, (byte) 0x00, (byte) 0x74, (byte) 0xb9, (byte) 0x47, (byte) 0x3c, (byte) 0x82, (byte) 0xe2, (byte) 0xdb - }; - byte[] authTag = {(byte) 0x65, (byte) 0x2c, (byte) 0x3f, (byte) 0xa3, (byte) 0x6b, (byte) 0x0a, (byte) 0x7c, (byte) 0x5b, (byte) 0x32, (byte) 0x19, (byte) 0xfa, (byte) 0xb3, (byte) 0xa3, (byte) 0x0b, (byte) 0xc1, (byte) 0xc4}; - - CryptographyClient cryptoClient = new CryptographyClientBuilder() - .pipeline(pipeline) - .jsonWebKey(JsonWebKey.fromAes(new SecretKeySpec(key, "AES")) - .setKty(KeyType.OCT) - .setKeyOps(Arrays.asList(KeyOperation.ENCRYPT, KeyOperation.DECRYPT))) - .buildClient(); - - byte[] encrypted = cryptoClient.encrypt(EncryptionAlgorithm.A128CBC_HS256, plaintext, iv, authData).getCipherText(); - - assertArrayEquals(expected, encrypted); - - byte[] decrypted = cryptoClient.decrypt(EncryptionAlgorithm.A128CBC_HS256, encrypted, iv, authData, authTag).getPlainText(); - - assertArrayEquals(plaintext, decrypted); - } - - @Override - public void encryptDecryptSymmetricKeyAes128CbcHmacSha384() { - // Arrange: These values are taken from Appendix B of the JWE specification at - // https://tools.ietf.org/html/draft-ietf-jose-json-web-encryption-40#appendix-B - byte[] key = {(byte) 0x00, (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04, (byte) 0x05, (byte) 0x06, (byte) 0x07, (byte) 0x08, (byte) 0x09, (byte) 0x0a, (byte) 0x0b, (byte) 0x0c, (byte) 0x0d, (byte) 0x0e, (byte) 0x0f, - (byte) 0x10, (byte) 0x11, (byte) 0x12, (byte) 0x13, (byte) 0x14, (byte) 0x15, (byte) 0x16, (byte) 0x17, (byte) 0x18, (byte) 0x19, (byte) 0x1a, (byte) 0x1b, (byte) 0x1c, (byte) 0x1d, (byte) 0x1e, (byte) 0x1f, - (byte) 0x20, (byte) 0x21, (byte) 0x22, (byte) 0x23, (byte) 0x24, (byte) 0x25, (byte) 0x26, (byte) 0x27, (byte) 0x28, (byte) 0x29, (byte) 0x2a, (byte) 0x2b, (byte) 0x2c, (byte) 0x2d, (byte) 0x2e, (byte) 0x2f}; - byte[] plaintext = {(byte) 0x41, (byte) 0x20, (byte) 0x63, (byte) 0x69, (byte) 0x70, (byte) 0x68, (byte) 0x65, (byte) 0x72, (byte) 0x20, (byte) 0x73, (byte) 0x79, (byte) 0x73, (byte) 0x74, (byte) 0x65, (byte) 0x6d, (byte) 0x20, - (byte) 0x6d, (byte) 0x75, (byte) 0x73, (byte) 0x74, (byte) 0x20, (byte) 0x6e, (byte) 0x6f, (byte) 0x74, (byte) 0x20, (byte) 0x62, (byte) 0x65, (byte) 0x20, (byte) 0x72, (byte) 0x65, (byte) 0x71, (byte) 0x75, - (byte) 0x69, (byte) 0x72, (byte) 0x65, (byte) 0x64, (byte) 0x20, (byte) 0x74, (byte) 0x6f, (byte) 0x20, (byte) 0x62, (byte) 0x65, (byte) 0x20, (byte) 0x73, (byte) 0x65, (byte) 0x63, (byte) 0x72, (byte) 0x65, - (byte) 0x74, (byte) 0x2c, (byte) 0x20, (byte) 0x61, (byte) 0x6e, (byte) 0x64, (byte) 0x20, (byte) 0x69, (byte) 0x74, (byte) 0x20, (byte) 0x6d, (byte) 0x75, (byte) 0x73, (byte) 0x74, (byte) 0x20, (byte) 0x62, - (byte) 0x65, (byte) 0x20, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x20, (byte) 0x74, (byte) 0x6f, (byte) 0x20, (byte) 0x66, (byte) 0x61, (byte) 0x6c, (byte) 0x6c, (byte) 0x20, (byte) 0x69, - (byte) 0x6e, (byte) 0x74, (byte) 0x6f, (byte) 0x20, (byte) 0x74, (byte) 0x68, (byte) 0x65, (byte) 0x20, (byte) 0x68, (byte) 0x61, (byte) 0x6e, (byte) 0x64, (byte) 0x73, (byte) 0x20, (byte) 0x6f, (byte) 0x66, - (byte) 0x20, (byte) 0x74, (byte) 0x68, (byte) 0x65, (byte) 0x20, (byte) 0x65, (byte) 0x6e, (byte) 0x65, (byte) 0x6d, (byte) 0x79, (byte) 0x20, (byte) 0x77, (byte) 0x69, (byte) 0x74, (byte) 0x68, (byte) 0x6f, - (byte) 0x75, (byte) 0x74, (byte) 0x20, (byte) 0x69, (byte) 0x6e, (byte) 0x63, (byte) 0x6f, (byte) 0x6e, (byte) 0x76, (byte) 0x65, (byte) 0x6e, (byte) 0x69, (byte) 0x65, (byte) 0x6e, (byte) 0x63, (byte) 0x65}; - byte[] iv = {(byte) 0x1a, (byte) 0xf3, (byte) 0x8c, (byte) 0x2d, (byte) 0xc2, (byte) 0xb9, (byte) 0x6f, (byte) 0xfd, (byte) 0xd8, (byte) 0x66, (byte) 0x94, (byte) 0x09, (byte) 0x23, (byte) 0x41, (byte) 0xbc, (byte) 0x04}; - byte[] authData = {(byte) 0x54, (byte) 0x68, (byte) 0x65, (byte) 0x20, (byte) 0x73, (byte) 0x65, (byte) 0x63, (byte) 0x6f, (byte) 0x6e, (byte) 0x64, (byte) 0x20, (byte) 0x70, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x63, - (byte) 0x69, (byte) 0x70, (byte) 0x6c, (byte) 0x65, (byte) 0x20, (byte) 0x6f, (byte) 0x66, (byte) 0x20, (byte) 0x41, (byte) 0x75, (byte) 0x67, (byte) 0x75, (byte) 0x73, (byte) 0x74, (byte) 0x65, (byte) 0x20, - (byte) 0x4b, (byte) 0x65, (byte) 0x72, (byte) 0x63, (byte) 0x6b, (byte) 0x68, (byte) 0x6f, (byte) 0x66, (byte) 0x66, (byte) 0x73}; - byte[] expected = {(byte) 0xea, (byte) 0x65, (byte) 0xda, (byte) 0x6b, (byte) 0x59, (byte) 0xe6, (byte) 0x1e, (byte) 0xdb, (byte) 0x41, (byte) 0x9b, (byte) 0xe6, (byte) 0x2d, (byte) 0x19, (byte) 0x71, (byte) 0x2a, (byte) 0xe5, - (byte) 0xd3, (byte) 0x03, (byte) 0xee, (byte) 0xb5, (byte) 0x00, (byte) 0x52, (byte) 0xd0, (byte) 0xdf, (byte) 0xd6, (byte) 0x69, (byte) 0x7f, (byte) 0x77, (byte) 0x22, (byte) 0x4c, (byte) 0x8e, (byte) 0xdb, - (byte) 0x00, (byte) 0x0d, (byte) 0x27, (byte) 0x9b, (byte) 0xdc, (byte) 0x14, (byte) 0xc1, (byte) 0x07, (byte) 0x26, (byte) 0x54, (byte) 0xbd, (byte) 0x30, (byte) 0x94, (byte) 0x42, (byte) 0x30, (byte) 0xc6, - (byte) 0x57, (byte) 0xbe, (byte) 0xd4, (byte) 0xca, (byte) 0x0c, (byte) 0x9f, (byte) 0x4a, (byte) 0x84, (byte) 0x66, (byte) 0xf2, (byte) 0x2b, (byte) 0x22, (byte) 0x6d, (byte) 0x17, (byte) 0x46, (byte) 0x21, - (byte) 0x4b, (byte) 0xf8, (byte) 0xcf, (byte) 0xc2, (byte) 0x40, (byte) 0x0a, (byte) 0xdd, (byte) 0x9f, (byte) 0x51, (byte) 0x26, (byte) 0xe4, (byte) 0x79, (byte) 0x66, (byte) 0x3f, (byte) 0xc9, (byte) 0x0b, - (byte) 0x3b, (byte) 0xed, (byte) 0x78, (byte) 0x7a, (byte) 0x2f, (byte) 0x0f, (byte) 0xfc, (byte) 0xbf, (byte) 0x39, (byte) 0x04, (byte) 0xbe, (byte) 0x2a, (byte) 0x64, (byte) 0x1d, (byte) 0x5c, (byte) 0x21, - (byte) 0x05, (byte) 0xbf, (byte) 0xe5, (byte) 0x91, (byte) 0xba, (byte) 0xe2, (byte) 0x3b, (byte) 0x1d, (byte) 0x74, (byte) 0x49, (byte) 0xe5, (byte) 0x32, (byte) 0xee, (byte) 0xf6, (byte) 0x0a, (byte) 0x9a, - (byte) 0xc8, (byte) 0xbb, (byte) 0x6c, (byte) 0x6b, (byte) 0x01, (byte) 0xd3, (byte) 0x5d, (byte) 0x49, (byte) 0x78, (byte) 0x7b, (byte) 0xcd, (byte) 0x57, (byte) 0xef, (byte) 0x48, (byte) 0x49, (byte) 0x27, - (byte) 0xf2, (byte) 0x80, (byte) 0xad, (byte) 0xc9, (byte) 0x1a, (byte) 0xc0, (byte) 0xc4, (byte) 0xe7, (byte) 0x9c, (byte) 0x7b, (byte) 0x11, (byte) 0xef, (byte) 0xc6, (byte) 0x00, (byte) 0x54, (byte) 0xe3}; - byte[] authTags = {(byte) 0x84, (byte) 0x90, (byte) 0xac, (byte) 0x0e, (byte) 0x58, (byte) 0x94, (byte) 0x9b, (byte) 0xfe, (byte) 0x51, (byte) 0x87, (byte) 0x5d, (byte) 0x73, (byte) 0x3f, (byte) 0x93, (byte) 0xac, (byte) 0x20, - (byte) 0x75, (byte) 0x16, (byte) 0x80, (byte) 0x39, (byte) 0xcc, (byte) 0xc7, (byte) 0x33, (byte) 0xd7}; - - CryptographyClient cryptoClient = new CryptographyClientBuilder() - .pipeline(pipeline) - .jsonWebKey(JsonWebKey.fromAes(new SecretKeySpec(key, "AES")) - .setKty(KeyType.OCT) - .setKeyOps(Arrays.asList(KeyOperation.ENCRYPT, KeyOperation.DECRYPT))) - .buildClient(); - - byte[] encrypted = cryptoClient.encrypt(EncryptionAlgorithm.A192CBC_HS384, plaintext, iv, authData).getCipherText(); - - assertArrayEquals(expected, encrypted); - - byte[] decrypted = cryptoClient.decrypt(EncryptionAlgorithm.A192CBC_HS384, encrypted, iv, authData, authTags).getPlainText(); - - assertArrayEquals(plaintext, decrypted); - } - - @Override - public void encryptDecryptSymmetricKeyAes128CbcHmacSha512() { - // Arrange: These values are taken from Appendix B of the JWE specification at - // https://tools.ietf.org/html/draft-ietf-jose-json-web-encryption-40#appendix-B - byte[] key = {(byte) 0x00, (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04, (byte) 0x05, (byte) 0x06, (byte) 0x07, (byte) 0x08, (byte) 0x09, (byte) 0x0a, (byte) 0x0b, (byte) 0x0c, (byte) 0x0d, (byte) 0x0e, (byte) 0x0f, - (byte) 0x10, (byte) 0x11, (byte) 0x12, (byte) 0x13, (byte) 0x14, (byte) 0x15, (byte) 0x16, (byte) 0x17, (byte) 0x18, (byte) 0x19, (byte) 0x1a, (byte) 0x1b, (byte) 0x1c, (byte) 0x1d, (byte) 0x1e, (byte) 0x1f, - (byte) 0x20, (byte) 0x21, (byte) 0x22, (byte) 0x23, (byte) 0x24, (byte) 0x25, (byte) 0x26, (byte) 0x27, (byte) 0x28, (byte) 0x29, (byte) 0x2a, (byte) 0x2b, (byte) 0x2c, (byte) 0x2d, (byte) 0x2e, (byte) 0x2f, - (byte) 0x30, (byte) 0x31, (byte) 0x32, (byte) 0x33, (byte) 0x34, (byte) 0x35, (byte) 0x36, (byte) 0x37, (byte) 0x38, (byte) 0x39, (byte) 0x3a, (byte) 0x3b, (byte) 0x3c, (byte) 0x3d, (byte) 0x3e, (byte) 0x3f}; - byte[] plaintext = {(byte) 0x41, (byte) 0x20, (byte) 0x63, (byte) 0x69, (byte) 0x70, (byte) 0x68, (byte) 0x65, (byte) 0x72, (byte) 0x20, (byte) 0x73, (byte) 0x79, (byte) 0x73, (byte) 0x74, (byte) 0x65, (byte) 0x6d, (byte) 0x20, - (byte) 0x6d, (byte) 0x75, (byte) 0x73, (byte) 0x74, (byte) 0x20, (byte) 0x6e, (byte) 0x6f, (byte) 0x74, (byte) 0x20, (byte) 0x62, (byte) 0x65, (byte) 0x20, (byte) 0x72, (byte) 0x65, (byte) 0x71, (byte) 0x75, - (byte) 0x69, (byte) 0x72, (byte) 0x65, (byte) 0x64, (byte) 0x20, (byte) 0x74, (byte) 0x6f, (byte) 0x20, (byte) 0x62, (byte) 0x65, (byte) 0x20, (byte) 0x73, (byte) 0x65, (byte) 0x63, (byte) 0x72, (byte) 0x65, - (byte) 0x74, (byte) 0x2c, (byte) 0x20, (byte) 0x61, (byte) 0x6e, (byte) 0x64, (byte) 0x20, (byte) 0x69, (byte) 0x74, (byte) 0x20, (byte) 0x6d, (byte) 0x75, (byte) 0x73, (byte) 0x74, (byte) 0x20, (byte) 0x62, - (byte) 0x65, (byte) 0x20, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x20, (byte) 0x74, (byte) 0x6f, (byte) 0x20, (byte) 0x66, (byte) 0x61, (byte) 0x6c, (byte) 0x6c, (byte) 0x20, (byte) 0x69, - (byte) 0x6e, (byte) 0x74, (byte) 0x6f, (byte) 0x20, (byte) 0x74, (byte) 0x68, (byte) 0x65, (byte) 0x20, (byte) 0x68, (byte) 0x61, (byte) 0x6e, (byte) 0x64, (byte) 0x73, (byte) 0x20, (byte) 0x6f, (byte) 0x66, - (byte) 0x20, (byte) 0x74, (byte) 0x68, (byte) 0x65, (byte) 0x20, (byte) 0x65, (byte) 0x6e, (byte) 0x65, (byte) 0x6d, (byte) 0x79, (byte) 0x20, (byte) 0x77, (byte) 0x69, (byte) 0x74, (byte) 0x68, (byte) 0x6f, - (byte) 0x75, (byte) 0x74, (byte) 0x20, (byte) 0x69, (byte) 0x6e, (byte) 0x63, (byte) 0x6f, (byte) 0x6e, (byte) 0x76, (byte) 0x65, (byte) 0x6e, (byte) 0x69, (byte) 0x65, (byte) 0x6e, (byte) 0x63, (byte) 0x65}; - byte[] iv = {(byte) 0x1a, (byte) 0xf3, (byte) 0x8c, (byte) 0x2d, (byte) 0xc2, (byte) 0xb9, (byte) 0x6f, (byte) 0xfd, (byte) 0xd8, (byte) 0x66, (byte) 0x94, (byte) 0x09, (byte) 0x23, (byte) 0x41, (byte) 0xbc, (byte) 0x04}; - byte[] authData = {(byte) 0x54, (byte) 0x68, (byte) 0x65, (byte) 0x20, (byte) 0x73, (byte) 0x65, (byte) 0x63, (byte) 0x6f, (byte) 0x6e, (byte) 0x64, (byte) 0x20, (byte) 0x70, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x63, - (byte) 0x69, (byte) 0x70, (byte) 0x6c, (byte) 0x65, (byte) 0x20, (byte) 0x6f, (byte) 0x66, (byte) 0x20, (byte) 0x41, (byte) 0x75, (byte) 0x67, (byte) 0x75, (byte) 0x73, (byte) 0x74, (byte) 0x65, (byte) 0x20, - (byte) 0x4b, (byte) 0x65, (byte) 0x72, (byte) 0x63, (byte) 0x6b, (byte) 0x68, (byte) 0x6f, (byte) 0x66, (byte) 0x66, (byte) 0x73}; - byte[] expected = {(byte) 0x4a, (byte) 0xff, (byte) 0xaa, (byte) 0xad, (byte) 0xb7, (byte) 0x8c, (byte) 0x31, (byte) 0xc5, (byte) 0xda, (byte) 0x4b, (byte) 0x1b, (byte) 0x59, (byte) 0x0d, (byte) 0x10, (byte) 0xff, (byte) 0xbd, - (byte) 0x3d, (byte) 0xd8, (byte) 0xd5, (byte) 0xd3, (byte) 0x02, (byte) 0x42, (byte) 0x35, (byte) 0x26, (byte) 0x91, (byte) 0x2d, (byte) 0xa0, (byte) 0x37, (byte) 0xec, (byte) 0xbc, (byte) 0xc7, (byte) 0xbd, - (byte) 0x82, (byte) 0x2c, (byte) 0x30, (byte) 0x1d, (byte) 0xd6, (byte) 0x7c, (byte) 0x37, (byte) 0x3b, (byte) 0xcc, (byte) 0xb5, (byte) 0x84, (byte) 0xad, (byte) 0x3e, (byte) 0x92, (byte) 0x79, (byte) 0xc2, - (byte) 0xe6, (byte) 0xd1, (byte) 0x2a, (byte) 0x13, (byte) 0x74, (byte) 0xb7, (byte) 0x7f, (byte) 0x07, (byte) 0x75, (byte) 0x53, (byte) 0xdf, (byte) 0x82, (byte) 0x94, (byte) 0x10, (byte) 0x44, (byte) 0x6b, - (byte) 0x36, (byte) 0xeb, (byte) 0xd9, (byte) 0x70, (byte) 0x66, (byte) 0x29, (byte) 0x6a, (byte) 0xe6, (byte) 0x42, (byte) 0x7e, (byte) 0xa7, (byte) 0x5c, (byte) 0x2e, (byte) 0x08, (byte) 0x46, (byte) 0xa1, - (byte) 0x1a, (byte) 0x09, (byte) 0xcc, (byte) 0xf5, (byte) 0x37, (byte) 0x0d, (byte) 0xc8, (byte) 0x0b, (byte) 0xfe, (byte) 0xcb, (byte) 0xad, (byte) 0x28, (byte) 0xc7, (byte) 0x3f, (byte) 0x09, (byte) 0xb3, - (byte) 0xa3, (byte) 0xb7, (byte) 0x5e, (byte) 0x66, (byte) 0x2a, (byte) 0x25, (byte) 0x94, (byte) 0x41, (byte) 0x0a, (byte) 0xe4, (byte) 0x96, (byte) 0xb2, (byte) 0xe2, (byte) 0xe6, (byte) 0x60, (byte) 0x9e, - (byte) 0x31, (byte) 0xe6, (byte) 0xe0, (byte) 0x2c, (byte) 0xc8, (byte) 0x37, (byte) 0xf0, (byte) 0x53, (byte) 0xd2, (byte) 0x1f, (byte) 0x37, (byte) 0xff, (byte) 0x4f, (byte) 0x51, (byte) 0x95, (byte) 0x0b, - (byte) 0xbe, (byte) 0x26, (byte) 0x38, (byte) 0xd0, (byte) 0x9d, (byte) 0xd7, (byte) 0xa4, (byte) 0x93, (byte) 0x09, (byte) 0x30, (byte) 0x80, (byte) 0x6d, (byte) 0x07, (byte) 0x03, (byte) 0xb1, (byte) 0xf6}; - byte[] authTags = {(byte) 0x4d, (byte) 0xd3, (byte) 0xb4, (byte) 0xc0, (byte) 0x88, (byte) 0xa7, (byte) 0xf4, (byte) 0x5c, (byte) 0x21, (byte) 0x68, (byte) 0x39, (byte) 0x64, (byte) 0x5b, (byte) 0x20, (byte) 0x12, (byte) 0xbf, - (byte) 0x2e, (byte) 0x62, (byte) 0x69, (byte) 0xa8, (byte) 0xc5, (byte) 0x6a, (byte) 0x81, (byte) 0x6d, (byte) 0xbc, (byte) 0x1b, (byte) 0x26, (byte) 0x77, (byte) 0x61, (byte) 0x95, (byte) 0x5b, (byte) 0xc5}; - - CryptographyClient cryptoClient = new CryptographyClientBuilder() - .pipeline(pipeline) - .jsonWebKey(JsonWebKey.fromAes(new SecretKeySpec(key, "AES")) - .setKty(KeyType.OCT) - .setKeyOps(Arrays.asList(KeyOperation.ENCRYPT, KeyOperation.DECRYPT))) - .buildClient(); - - byte[] encrypted = cryptoClient.encrypt(EncryptionAlgorithm.A256CBC_HS512, plaintext, iv, authData).getCipherText(); - - assertArrayEquals(expected, encrypted); - - byte[] decrypted = cryptoClient.decrypt(EncryptionAlgorithm.A256CBC_HS512, encrypted, iv, authData, authTags).getPlainText(); - - assertArrayEquals(plaintext, decrypted); - } - - @Override - public void encryptDecryptSymmetricKeyaes128CbcOneBlock() { - // Note that AES128CBC as implemented in this library uses PKCS7 padding mode where the test - // vectors from RFC3602 do not use padding. - byte[] keyContent = { 0x06, (byte) 0xa9, 0x21, 0x40, 0x36, (byte) 0xb8, (byte) 0xa1, 0x5b, 0x51, 0x2e, 0x03, (byte) 0xd5, 0x34, 0x12, 0x00, 0x06 }; - byte[] plaintext = "Single block msg".getBytes(); - byte[] initializationVector = { 0x3d, (byte) 0xaf, (byte) 0xba, 0x42, (byte) 0x9d, (byte) 0x9e, (byte) 0xb4, 0x30, (byte) 0xb4, 0x22, (byte) 0xda, (byte) 0x80, 0x2c, (byte) 0x9f, (byte) 0xac, 0x41 }; - byte[] expected = { (byte) 0xe3, 0x53, 0x77, (byte) 0x9c, 0x10, 0x79, (byte) 0xae, (byte) 0xb8, 0x27, 0x08, (byte) 0x94, 0x2d, (byte) 0xbe, 0x77, 0x18, 0x1a }; - - CryptographyClient cryptoClient = new CryptographyClientBuilder() - .pipeline(pipeline) - .jsonWebKey(JsonWebKey.fromAes(new SecretKeySpec(keyContent, "AES")) - .setKty(KeyType.OCT) - .setKeyOps(Arrays.asList(KeyOperation.ENCRYPT, KeyOperation.DECRYPT))) - .buildClient(); - - byte[] encrypted = cryptoClient.encrypt(EncryptionAlgorithm.A128CBC, plaintext, initializationVector, null).getCipherText(); - - assertArrayEquals(Arrays.copyOfRange(encrypted, 0, 16), expected); - - byte[] decrypted = cryptoClient.decrypt(EncryptionAlgorithm.A128CBC, encrypted, initializationVector, null, null).getPlainText(); - - assertArrayEquals(Arrays.copyOfRange(decrypted, 0, 16), plaintext); - } - - @Override - public void encryptDecryptSymmetricKeyaes128CbcTwoBlock() { - // Note that AES128CBC as implemented in this library uses PKCS7 padding mode where the test - // vectors do not use padding. - byte[] keyContent = { (byte) 0xc2, (byte) 0x86, 0x69, 0x6d, (byte) 0x88, 0x7c, (byte) 0x9a, (byte) 0xa0, 0x61, 0x1b, (byte) 0xbb, 0x3e, 0x20, 0x25, (byte) 0xa4, 0x5a }; - byte[] plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }; - byte[] initializationVector = { 0x56, 0x2e, 0x17, (byte) 0x99, 0x6d, 0x09, 0x3d, 0x28, (byte) 0xdd, (byte) 0xb3, (byte) 0xba, 0x69, 0x5a, 0x2e, 0x6f, 0x58 }; - byte[] expected = { (byte) 0xd2, (byte) 0x96, (byte) 0xcd, (byte) 0x94, (byte) 0xc2, (byte) 0xcc, (byte) 0xcf, (byte) 0x8a, 0x3a, (byte) 0x86, 0x30, 0x28, (byte) 0xb5, (byte) 0xe1, (byte) 0xdc, 0x0a, 0x75, (byte) 0x86, 0x60, 0x2d, 0x25, 0x3c, (byte) 0xff, (byte) 0xf9, 0x1b, (byte) 0x82, 0x66, (byte) 0xbe, (byte) 0xa6, (byte) 0xd6, 0x1a, (byte) 0xb1 }; - - CryptographyClient cryptoClient = new CryptographyClientBuilder() - .pipeline(pipeline) - .jsonWebKey(JsonWebKey.fromAes(new SecretKeySpec(keyContent, "AES")) - .setKty(KeyType.OCT) - .setKeyOps(Arrays.asList(KeyOperation.ENCRYPT, KeyOperation.DECRYPT))) - .buildClient(); - - byte[] encrypted = cryptoClient.encrypt(EncryptionAlgorithm.A128CBC, plaintext, initializationVector, null).getCipherText(); - - assertArrayEquals(Arrays.copyOfRange(encrypted, 0, 32), expected); - - byte[] decrypted = cryptoClient.decrypt(EncryptionAlgorithm.A128CBC, encrypted, initializationVector, null, null).getPlainText(); - - assertArrayEquals(Arrays.copyOfRange(decrypted, 0, 32), plaintext); - } - - private void pollOnKeyDeletion(String keyName) { int pendingPollCount = 0; while (pendingPollCount < 30) { diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTestBase.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTestBase.java index 8f9a0e20f083..81a5fffcdc13 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTestBase.java @@ -120,30 +120,6 @@ void encryptDecryptRsaRunner(Consumer testRunner) throws Exception { @Test public abstract void signVerifyRsa() throws Exception; - @Test - public abstract void wrapUnwrapSymmetricKeyAES128Kw(); - - @Test - public abstract void wrapUnwrapSymmetricKeyAES192Kw(); - - @Test - public abstract void wrapUnwrapSymmetricKeyAES256Kw(); - - @Test - public abstract void encryptDecryptSymmetricKeyAes128CbcHmacSha256(); - - @Test - public abstract void encryptDecryptSymmetricKeyAes128CbcHmacSha384(); - - @Test - public abstract void encryptDecryptSymmetricKeyAes128CbcHmacSha512(); - - @Test - public abstract void encryptDecryptSymmetricKeyaes128CbcOneBlock(); - - @Test - public abstract void encryptDecryptSymmetricKeyaes128CbcTwoBlock(); - private static KeyPair getWellKnownKey() throws Exception { BigInteger modulus = new BigInteger("27266783713040163753473734334021230592631652450892850648620119914958066181400432364213298181846462385257448168605902438305568194683691563208578540343969522651422088760509452879461613852042845039552547834002168737350264189810815735922734447830725099163869215360401162450008673869707774119785881115044406101346450911054819448375712432746968301739007624952483347278954755460152795801894283389540036131881712321193750961817346255102052653789197325341350920441746054233522546543768770643593655942246891652634114922277138937273034902434321431672058220631825053788262810480543541597284376261438324665363067125951152574540779"); BigInteger publicExponent = new BigInteger("65537"); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/deleteKey.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/deleteKey.json index cad69f7a7ef6..b7d40075ae58 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/deleteKey.json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/deleteKey.json @@ -1,190 +1,393 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey5/create?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey5/create?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:11:05 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "684", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "9f086099-48da-4c87-8eae-c0153a08aa18", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey5/97900d0158f241d7907d11722667ea80\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"vX607pKfPTMSoBTOkcO0XLREMM8CHyUs4_FTItN4ThGFwwA1kI2I7AVTtbHcXrHyDvX8sUyWJ8xJsNK5vRT8EVyOz08WgCKVXj0UletkDSY8DDvihKpxghd6_EE_PuEX9jSZkzj24Rg74YPesCiU_bSSRdJKTdbCNhhERE-URFeI75DrXc54S7NRmdr3cxP-nCAKGYz_X3MlPSRtAoUF-eSBB60au-6NVk5t02LaYhDyxOEpn4l6Cz5DuzNxiJi7xAi-9qFQdnLf8_3cmB_3T8q2PLybFnktPr8Jl40fR9VNHGDsppZsjne3jNj6qrEqg5vyKt0Y47FZ-EpuhN41Ew\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561363865,\"updated\":1561363865,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "671", + "x-ms-request-id" : "c3d5dd19-599d-42f7-9e1f-4b7e0062e32d", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey5/4494356d65c64b588f6dc54c3f851ea4\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"y9KEdzvWi-lQtRpdvHOxr3Hni0SdYmr4ohejeqlvBcsVq9gijwrK7LT8aPvQf6jVsWTT7nqzejEHMxxqyaRcRkddgeTTCeje0gpxtQ763GqaLwEvDjq8ZqlG6bPHGMfKG6LFR7q5hm-9nOlQZsl-2v39_jRb-3Hxb0aI_FcvKPTC-4qi8L6D-QLmJDTUeVorEr_BAj5lsUxiNvCT7kc4Ra5SzvSc-89DOiky0RlWywR8gxUHy39_nONFnhbhmKDLv_mLdkPk94SrIjw7XPsqpyS1EPy6wPF9lUy0YWWDuae7aJtu_ON0RtaMysnmIb2WmDX8kTdsGQ8vfz-4E-hw1w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886167,\"updated\":1571886167,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey5?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey5?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:11:13 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "826", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "687fbba6-bbc2-4860-b0a0-54ced194a40c", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey5\",\"deletedDate\":1561363874,\"scheduledPurgeDate\":1569139874,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey5/97900d0158f241d7907d11722667ea80\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"vX607pKfPTMSoBTOkcO0XLREMM8CHyUs4_FTItN4ThGFwwA1kI2I7AVTtbHcXrHyDvX8sUyWJ8xJsNK5vRT8EVyOz08WgCKVXj0UletkDSY8DDvihKpxghd6_EE_PuEX9jSZkzj24Rg74YPesCiU_bSSRdJKTdbCNhhERE-URFeI75DrXc54S7NRmdr3cxP-nCAKGYz_X3MlPSRtAoUF-eSBB60au-6NVk5t02LaYhDyxOEpn4l6Cz5DuzNxiJi7xAi-9qFQdnLf8_3cmB_3T8q2PLybFnktPr8Jl40fR9VNHGDsppZsjne3jNj6qrEqg5vyKt0Y47FZ-EpuhN41Ew\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561363865,\"updated\":1561363865,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "800", + "x-ms-request-id" : "6f567b37-05f9-429b-abae-fba146cee545", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testKey5\",\"deletedDate\":1571886167,\"scheduledPurgeDate\":1579662167,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey5/4494356d65c64b588f6dc54c3f851ea4\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"y9KEdzvWi-lQtRpdvHOxr3Hni0SdYmr4ohejeqlvBcsVq9gijwrK7LT8aPvQf6jVsWTT7nqzejEHMxxqyaRcRkddgeTTCeje0gpxtQ763GqaLwEvDjq8ZqlG6bPHGMfKG6LFR7q5hm-9nOlQZsl-2v39_jRb-3Hxb0aI_FcvKPTC-4qi8L6D-QLmJDTUeVorEr_BAj5lsUxiNvCT7kc4Ra5SzvSc-89DOiky0RlWywR8gxUHy39_nONFnhbhmKDLv_mLdkPk94SrIjw7XPsqpyS1EPy6wPF9lUy0YWWDuae7aJtu_ON0RtaMysnmIb2WmDX8kTdsGQ8vfz-4E-hw1w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886167,\"updated\":1571886167,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "2c0ab8d3-47c4-4f86-acb2-a7ffad365e13", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey5\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:49 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "715ba2a9-4300-4e55-adfc-257f11ba4ebf", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey5\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:50 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "9cbd99e0-9c5d-41f5-9442-5ac0618106d6", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey5\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:51 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "6a273919-514f-4868-a917-35ce924df378", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey5\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:52 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "aad52b50-a16e-48fc-bf11-03e7ea29ac97", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey5\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:11:14 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "8cf4f9aa-57de-4c81-be9a-cf39c07d07ba", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey5\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:53 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "6f474c61-3820-4f30-87b6-bb0029205559", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey5\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:11:16 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "b2d4f3bc-3abd-447b-a4b6-bc68135cbe09", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey5\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:54 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "f01638d7-45d4-4732-9fb1-45a9f1833ce0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey5\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:11:17 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "826", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:55 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "af5af72a-0295-4917-b07c-17425084775c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey5\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:56 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "998349ee-507c-436b-b00f-6f84932f9099", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey5\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "bbc16082-bf4a-4da4-8c09-94aabddab18c", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey5\",\"deletedDate\":1561363874,\"scheduledPurgeDate\":1569139874,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey5/97900d0158f241d7907d11722667ea80\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"vX607pKfPTMSoBTOkcO0XLREMM8CHyUs4_FTItN4ThGFwwA1kI2I7AVTtbHcXrHyDvX8sUyWJ8xJsNK5vRT8EVyOz08WgCKVXj0UletkDSY8DDvihKpxghd6_EE_PuEX9jSZkzj24Rg74YPesCiU_bSSRdJKTdbCNhhERE-URFeI75DrXc54S7NRmdr3cxP-nCAKGYz_X3MlPSRtAoUF-eSBB60au-6NVk5t02LaYhDyxOEpn4l6Cz5DuzNxiJi7xAi-9qFQdnLf8_3cmB_3T8q2PLybFnktPr8Jl40fR9VNHGDsppZsjne3jNj6qrEqg5vyKt0Y47FZ-EpuhN41Ew\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561363865,\"updated\":1561363865,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:57 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "800", + "x-ms-request-id" : "c362b57b-61de-498c-b184-db2d0f54b2b2", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testKey5\",\"deletedDate\":1571886167,\"scheduledPurgeDate\":1579662167,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey5/4494356d65c64b588f6dc54c3f851ea4\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"y9KEdzvWi-lQtRpdvHOxr3Hni0SdYmr4ohejeqlvBcsVq9gijwrK7LT8aPvQf6jVsWTT7nqzejEHMxxqyaRcRkddgeTTCeje0gpxtQ763GqaLwEvDjq8ZqlG6bPHGMfKG6LFR7q5hm-9nOlQZsl-2v39_jRb-3Hxb0aI_FcvKPTC-4qi8L6D-QLmJDTUeVorEr_BAj5lsUxiNvCT7kc4Ra5SzvSc-89DOiky0RlWywR8gxUHy39_nONFnhbhmKDLv_mLdkPk94SrIjw7XPsqpyS1EPy6wPF9lUy0YWWDuae7aJtu_ON0RtaMysnmIb2WmDX8kTdsGQ8vfz-4E-hw1w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886167,\"updated\":1571886167,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:11:19 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "3efa4b8b-74b5-47d5-a232-b9185dd7736a", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:02:58 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "dd0884d3-3be3-4b9a-8402-5feb9b8c1d31", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey5?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:11:19 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "fc3fd52b-e17c-4bff-8147-a241a0695fa6", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey5\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:58 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "d9484555-84fc-4dfc-9f1f-2d5c1f78dd45", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey5\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/deleteKeyNotFound.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/deleteKeyNotFound.json index af52f0f5c634..f694fb20f722 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/deleteKeyNotFound.json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/deleteKeyNotFound.json @@ -1,31 +1,32 @@ { "networkCallRecords" : [ { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/non-existing?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/non-existing?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:11:37 GMT", - "content-length" : "72", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "ddf85bad-dd37-486d-90db-a6ac4217585d", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: non-existing\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:59 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "72", + "x-ms-request-id" : "cc25f8ae-d84a-4b0f-876c-78d4de9b6751", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: non-existing\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/encryptDecryptRsa.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/encryptDecryptRsa.json index cb9d004aae4d..b92e5ee92d6e 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/encryptDecryptRsa.json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/encryptDecryptRsa.json @@ -3,7 +3,7 @@ "Method" : "PUT", "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -12,7 +12,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:04:51 GMT", + "Date" : "Thu, 17 Oct 2019 22:16:56 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -20,17 +20,46 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "656", - "x-ms-request-id" : "e19f71c3-5d28-4aa8-8d60-f621691f2baa", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1565067891,\"updated\":1565067891,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "x-ms-request-id" : "ce3afe63-5c54-4d27-b666-eaae4d2b8e3c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1571350616,\"updated\":1571350616,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:16:56 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "656", + "x-ms-request-id" : "879f8f58-8e26-4ab5-9170-f8aaa534e8e1", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1571350616,\"updated\":1571350616,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188/decrypt?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c/decrypt?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -39,7 +68,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:04:51 GMT", + "Date" : "Thu, 17 Oct 2019 22:16:56 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -47,17 +76,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "239", - "x-ms-request-id" : "b56bd43f-a534-4321-80b0-f894e45983d6", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", + "x-ms-request-id" : "e279dc48-337a-41db-8285-9c6a4fff24bb", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188/encrypt?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c/encrypt?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -66,7 +96,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:04:51 GMT", + "Date" : "Thu, 17 Oct 2019 22:16:56 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -74,17 +104,46 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "447", - "x-ms-request-id" : "d709251f-8da3-40c4-8b7a-f4fd814ea096", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188\",\"value\":\"cILD_WRyl5tkQGcOJOiyyhVziBTFlcl25NXvaZ20lkKdQ8C8qwnMQuywE72F657Pb3r7fjWr0HBQ-GdFQUL0zdSKukqfQeJRTi4oFkNTzG2dVvi33_I8TZgEt_AdoM2Gf8jjp29-R8BdI-QnkR6A7cukzKus5sNWn9gIp2B5bCCyPKK_2ybdC0mTATq7jOLv-6x6LIhTI3MAuhC2Ik1M97Y6RlRO-PlS96TLqrGN4M5ZSHekX95iqi6WOIQvRJN06FTQq7dNq_cXG1QGfBxN0rZY9rcwthqKKRE4XCT8Kx9af8Pb68WpiHBwC0AFVZAjqdmMg-N-lbJZ-fbg06ZHAg\"}", + "x-ms-request-id" : "a4d36388-7d38-45bf-bd05-8aff1379f9c3", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"value\":\"T-Bx9psnfTXINYGS4xE-YrSdTlgsCkpQbG8IH1xAn9cEfXAcNVFaSDscLYuj0FAxH0w2_E6eMJ0SQbgkcSeiIg1vBD3yrpD2Pw5AnH3rkYr0RYZVb4wFDHJmRjwJfX0emqJIso3CsfNpsyWA1PZ5WzVYAld_QAa9C0R_5BL8tAznLHUopzWyYIc3chdw6QB9slaz57kyamAd8NZd9DxdIbmAwCUAghmERa3v4fnhNX0K9YCtogtFxSiCqzUrLVZPPTZAbBMkwc6o_a7LjpZA1ARN4Y2BlMhZs4zdfNpIxB_fRBSGh1o0PyKU6eX8E-M4UFvLGu5mtxxh4CAfk_OUPg\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c/decrypt?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:16:56 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "239", + "x-ms-request-id" : "3260df4a-9f03-42ba-888b-7b0d236f2e25", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188/decrypt?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c/decrypt?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -93,7 +152,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:04:51 GMT", + "Date" : "Thu, 17 Oct 2019 22:16:56 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -101,17 +160,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "239", - "x-ms-request-id" : "623e1eec-3e07-4783-8913-e1ade90f04a0", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", + "x-ms-request-id" : "8d1f73f9-eefc-4a8c-8bfc-3c845e3ef0bc", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188/encrypt?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c/encrypt?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -120,7 +180,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:04:51 GMT", + "Date" : "Thu, 17 Oct 2019 22:16:56 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -128,17 +188,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "447", - "x-ms-request-id" : "58492b26-9c11-4063-9555-c9f9e352ae69", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188\",\"value\":\"GjLhGNBcnHFHV1GB-xyhGPfCLppg1ZlCF_ecYQkiLaTbGcX64bxIOZIQzlMcL14mKh34Un715q162hgCEIdiBpwwvpNIOJ7Rba3uotjoyHKJFsJ74Gmy4uLa7EbOkrLp6lv1hDLLLRc-JH6cAKpcrAxYrhWqpJSobq_NoFbdBrizUwx9l7ei-eDeJhk5zb3y4SO5mLlkcfn_ae_yOlTEkSMGFiYcRKXa2nS4V3Ogqc_yogOCQskdhUcR8v7XL9wJVrZMoPRbsagpVFRvWMo44tRitJKIUFNeI6LI_0JKIkCFCZO27iZm-2MYLCVLI5NNicsnzgdjNejsk3FqtlC-ug\"}", + "x-ms-request-id" : "6c27b126-8d8a-4e6a-8f7c-1ced4dab2e70", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"value\":\"WU-dtpbkwh6dLlCVIJA2PwRX_9LqNq3UTEX1akr7Pnv8-3PuGkar1FF9UU_7w5iiGKx3AZWZqufAeHdpY9wb5yks3uPag8htjV-nn9_5VXpAxyuzr1fAgj-_TDZNFxTtE9Dd6M6gtQApG7uixBMYqOmSobX6fye55Wj7gFZLprbe2qpYLXeKeIkrWVjX76iWN1XQew_DP2XxJaFs_l6hc2oaNy7o-Z7Ah5B0xSOdS9jACZLNVp4-MZCciMYbgXsST-aqDr42fsEqQd_PiikmaGt20rx34mReWyqjjBgF4KrYjdrGc22OAcutFoxSzgdVrPrDAI2pTYPOY7-YmBTSvw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188/encrypt?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c/decrypt?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -147,7 +208,35 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:04:51 GMT", + "Date" : "Thu, 17 Oct 2019 22:16:56 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "239", + "x-ms-request-id" : "6e28bf79-be15-4d3a-88a0-0db65bbb96b0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c/encrypt?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:16:56 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -155,17 +244,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "447", - "x-ms-request-id" : "518fdea8-5d04-4669-a0fd-7b15edad3b64", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188\",\"value\":\"e5XNN_HK5AvtaGgLQi8_cFm5_zRUKueBJe9N-GDKzDVFdA27iSWdiRLAzzouFtsqCLIxXQV-y1J68RjlQNR90R-XEX1QhEt7lCxWyqkmlRrk_aCl44eqga1aEBsz1nUyvz6uYdTO33d2wNexKUmcZCvNWIHeL8zg6M9NLs8ncpXAH5LFbVH1YDz73WvaTr1wYUFg2Srl0MHQyHwA0bnnQRP3Gcg55RTCSGzA_ONzXpxKPG2iGukZ9tWA6EBIahaIXBZSsa-_ZK__0Am8zwb2rBRxYLAb3DCSb-xOpZqXpWevJbQDIoYog1byjUJUx1hO5GMhCpqMubhsyCjxO51UJA\"}", + "x-ms-request-id" : "9a49a350-1c5e-4930-9e05-b4e85491972a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"value\":\"qphuABw_RqXJ5_l3cRF3EVkS31zzjp_23ggJeB7LYoJstSzrHdNigZHgFvsSGLIjWvSKpra6Pfh_9bg04AsDDkB_vj-s682hPjj3yUFi6UX7tzO_8icLnrzCNUnMdHHL-xFeR3pjoeciM6lEIW3Tyx84_Rvw3lkBB7Kcart7D62CCMOaMxRlYGdxUfNXe5VZHcaYkdFY6Pf9D8Q_bV2jrtB8TRzrhHTh86FP74Zf-V5nqqvusu3kuKy2GgNwnhsid78mf4CVadYqZ69mGG3aZWRBmyLA43VS_fhjEBffxoVn00PhJUVn1xiWmsvdHPoKV7aKOKNzfIP20T8Z2Vehsw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188/decrypt?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c/decrypt?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -174,7 +264,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:04:51 GMT", + "Date" : "Thu, 17 Oct 2019 22:16:56 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -182,17 +272,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "239", - "x-ms-request-id" : "20d351c8-aedb-44d1-95b8-404f21e0cfd0", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", + "x-ms-request-id" : "b2f85ab5-262f-4695-b356-1626e7cfc346", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188/encrypt?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c/encrypt?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -201,7 +292,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:04:52 GMT", + "Date" : "Thu, 17 Oct 2019 22:16:57 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -209,17 +300,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "447", - "x-ms-request-id" : "1ed2f433-43bd-4488-8120-e4dbd5237ffb", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188\",\"value\":\"fi6752qevRN_Dr9zphO2C4vlHB3UIdzjCHrH5Wo0pBWyhpiPgqBbPL4h2U4JjBaIf-BBiRQpw2pIsIJE-F05LxYPixryvLhZBWQWBq02Hu1lAN0Rjndq5j6Fwgyg_7IWwJS-U75W82FEvnYQF-T0rqEpTOVlEvXsRjfVlyHCcvEbU6vQurPEJ2nia1i8cVA4I5xvjN6-v2vh9v1NVJMxlQGhnAcm3LR9tWwYiqZEcBOXj1CpsmyCKiXDJks9NAj5yJ1vBLzmbqc2q2Kz__CwpVmgPUyZK_bKejbMITi4BM7cAnMGvRrwkhjp18ZWNPR6W2r9WmW7sov1JksrIwT4cA\"}", + "x-ms-request-id" : "06a3f5fb-dcad-4528-a3be-77a55b934e7d", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"value\":\"co8-X6OFSe4mKpYtMQDmvLg13EePUAyQczsOEWS1tP8_FE320k0y8d8SnAMyyq8V3_me9VSLgFHYXb_j1Mo43GT8HXsLPf182eZH4DQJ5fCUUioMCd_pGh1VpwhaYG2Ret4v6gDtfkINBG2vfLMlBYmNgXbRgCZlmIYgMs0ZiGqRTSxWSI_CbN8fK03VoCgn8xi7cNzfUMAakFIurcO58sMvrFi3Z9QNLdKDy8zCp2ROa1npGh27opwFW6jubrTsiQF0s-8leS_ekveYrwBDX2dBj6G45Es_0EDtlBhf9iPhQBypRNPcyoq7lIVtCGvoIg-KVev0erGSD4e-OPlYtQ\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188/decrypt?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c/decrypt?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -228,7 +320,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:04:52 GMT", + "Date" : "Thu, 17 Oct 2019 22:16:57 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -236,17 +328,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "239", - "x-ms-request-id" : "611efd29-0789-42b5-94e6-8929d9a3f8cc", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", + "x-ms-request-id" : "2a67d878-f091-4ad2-9bf0-9c0804cbb048", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -255,7 +348,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:04:52 GMT", + "Date" : "Thu, 17 Oct 2019 22:16:57 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -263,17 +356,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "787", - "x-ms-request-id" : "1cc66170-576b-4708-942a-e80f6ec457db", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testRsaKey\",\"deletedDate\":1565067892,\"scheduledPurgeDate\":1572843892,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1565067891,\"updated\":1565067891,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "x-ms-request-id" : "571f3a1a-30b9-4cfc-9a84-d138a36366a7", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testRsaKey\",\"deletedDate\":1571350617,\"scheduledPurgeDate\":1579126617,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1571350616,\"updated\":1571350616,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -282,7 +376,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:04:52 GMT", + "Date" : "Thu, 17 Oct 2019 22:16:57 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -290,17 +384,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "78", - "x-ms-request-id" : "dff91a12-b89a-41db-af08-be3fcbeb5781", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "311bfbd7-d92e-4cff-b8e9-196b73bb939b", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKey\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -309,7 +404,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:04:54 GMT", + "Date" : "Thu, 17 Oct 2019 22:16:59 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -317,17 +412,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "78", - "x-ms-request-id" : "d2614df2-46e0-4f1b-82bd-8cc9ec07fc51", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "04ef35ea-0204-4091-a6c6-830e53ee16d6", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKey\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -336,7 +432,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:04:56 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:01 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -344,17 +440,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "78", - "x-ms-request-id" : "ce9ec89f-e743-4340-ac08-fd5c4f850bb2", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "05aa3c13-e095-4fc2-830a-aae8df552da0", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKey\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -363,7 +460,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:04:58 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:03 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -371,17 +468,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "78", - "x-ms-request-id" : "30af27df-ebe5-47eb-b9e7-b46bba2cfa61", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "f132f8dd-627c-4252-a0da-c24f75dcf60e", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKey\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -390,7 +488,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:00 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:05 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -398,17 +496,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "78", - "x-ms-request-id" : "9377448e-83b5-4d5f-b097-6eae1d15d043", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "5ea91ce8-cdf2-44c9-9058-39515bb741b5", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKey\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -417,7 +516,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:02 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:07 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -425,17 +524,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "78", - "x-ms-request-id" : "36cbe3e4-8e83-449f-938d-c3bcb5a8890a", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "b48da2ec-3c97-4528-970f-3b9db2ec0cf0", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKey\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -444,7 +544,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:04 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:09 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -452,17 +552,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "787", - "x-ms-request-id" : "b8613a85-8c62-43c5-804e-f40409c13e50", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testRsaKey\",\"deletedDate\":1565067892,\"scheduledPurgeDate\":1572843892,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/239aa15e13fe42739dc8e7153c84e188\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1565067891,\"updated\":1565067891,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "x-ms-request-id" : "357f5bcb-03ec-4764-a62a-c4967b486ec4", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testRsaKey\",\"deletedDate\":1571350617,\"scheduledPurgeDate\":1579126617,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKey/528bc49e1d1c49b1a099f824a9d4ae4c\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1571350616,\"updated\":1571350616,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -471,22 +572,23 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Tue, 06 Aug 2019 05:05:04 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:09 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "74456005-1861-417d-92b0-e1cd11719a21", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "dd32029e-fe11-4f39-9333-8769c3a13312", + "x-ms-keyvault-service-version" : "1.1.0.879", "X-Powered-By" : "ASP.NET" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -495,7 +597,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:04 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:09 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -503,12 +605,13 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "78", - "x-ms-request-id" : "8b3b3e08-1fce-4eaf-875c-72cc11c179fd", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "d4b1ce5d-57c9-4326-bc4b-c3d04da16874", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKey\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/getDeletedKey.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/getDeletedKey.json index dd4a775b843b..8087427b29bc 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/getDeletedKey.json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/getDeletedKey.json @@ -1,352 +1,449 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey6/create?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey6/create?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:17:19 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "684", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "c7d3a365-d863-49da-9854-6e150fa9f274", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey6/cc358ac69f3b4d9fad4c69036048743e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"s5F652zCycyFfH8nQG657ZcC3xHRXJoUITiRocxZplJBGtRwDAgVTqifktJ2UhNfRqOtMBDfOHdelCX4Q6CxOeTjSNf-JgWXdfDiUYGX0Mc_qLDQMNaH6ouJ05zT_oJYk7aY4o4WTUO847E95dLckJmCCq2Js5lEbFXV251lZtBRF4ZoHSRukk3zKxIubsKmRBs5cwQ_i3CSEtwItTxvYVLQEP2UrBrXz4SPNhHPhFMZSXVFiyWh1v5HC2-k_tphZC4eVfyyH3pfSMEmtfhkZwzA4iRTUzp6IGjbsf8bZrybQf4PG7880qAUNaehL3R9akD_U4v-h2ba8gtVdSeDNw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561364239,\"updated\":1561364239,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:07:39 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "671", + "x-ms-request-id" : "20e24068-b737-4d2d-8b9b-1a65d4f58482", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey6/4bb21fbe4dbb4966a55ca49d5e0fb423\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"y9Kw2wkR7O8Iqbznb22lQOpR5FSXhgmhOEs4wQu7PirV7iNXXItgIZ5g2t3_ZhGdQgXjGks4SSOD3V8ZR-FaKkjzlEPnECL1LjtegpgKvwp3gZStYP5Ekqpxniz-aws3hHLVa_BcbwxyZgfssOTpew_Y_kcXaba47rGjXninkpjMZJMmcI6UH6cnxuUitQQWl4vi55wluy2I3FFhDaQ2WDU6HT1m-fQLJkzeJd-lRWkrHZKX2LwUoaUrx4vua7yBMmXG-Fd_bjKxJzuVaa2JWl-yLnXuLdc33okQ3kYIGJSMhhmSBkodv-447oZ-cDmdZSIrmV12csZwMXzfzGbYqw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886459,\"updated\":1571886459,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey6?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey6?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:17:28 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "826", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "381b81b0-be6f-46fb-b4cc-52e46a5624a9", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6\",\"deletedDate\":1561364248,\"scheduledPurgeDate\":1569140248,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey6/cc358ac69f3b4d9fad4c69036048743e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"s5F652zCycyFfH8nQG657ZcC3xHRXJoUITiRocxZplJBGtRwDAgVTqifktJ2UhNfRqOtMBDfOHdelCX4Q6CxOeTjSNf-JgWXdfDiUYGX0Mc_qLDQMNaH6ouJ05zT_oJYk7aY4o4WTUO847E95dLckJmCCq2Js5lEbFXV251lZtBRF4ZoHSRukk3zKxIubsKmRBs5cwQ_i3CSEtwItTxvYVLQEP2UrBrXz4SPNhHPhFMZSXVFiyWh1v5HC2-k_tphZC4eVfyyH3pfSMEmtfhkZwzA4iRTUzp6IGjbsf8bZrybQf4PG7880qAUNaehL3R9akD_U4v-h2ba8gtVdSeDNw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561364239,\"updated\":1561364239,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:07:39 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "800", + "x-ms-request-id" : "5a9bbe94-ce92-4a8b-aee5-6890e007d1a2", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testKey6\",\"deletedDate\":1571886459,\"scheduledPurgeDate\":1579662459,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey6/4bb21fbe4dbb4966a55ca49d5e0fb423\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"y9Kw2wkR7O8Iqbznb22lQOpR5FSXhgmhOEs4wQu7PirV7iNXXItgIZ5g2t3_ZhGdQgXjGks4SSOD3V8ZR-FaKkjzlEPnECL1LjtegpgKvwp3gZStYP5Ekqpxniz-aws3hHLVa_BcbwxyZgfssOTpew_Y_kcXaba47rGjXninkpjMZJMmcI6UH6cnxuUitQQWl4vi55wluy2I3FFhDaQ2WDU6HT1m-fQLJkzeJd-lRWkrHZKX2LwUoaUrx4vua7yBMmXG-Fd_bjKxJzuVaa2JWl-yLnXuLdc33okQ3kYIGJSMhhmSBkodv-447oZ-cDmdZSIrmV12csZwMXzfzGbYqw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886459,\"updated\":1571886459,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:07:39 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "681a9eb8-28da-4ff7-aab5-385b1fad0cdb", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:07:41 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "7635000c-0aaa-4648-a159-62fc3db60a71", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:17:28 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "df50cba7-769f-4142-9c56-f720d90a5973", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:07:42 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "0c8541bf-b5ea-4562-85a0-1c991cdb8aba", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:07:42 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "5a977a2a-5ed3-4847-b9b5-bb3945fca58c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:17:30 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "a76ae6a9-ed90-43d4-97d8-59310c022dbe", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:07:44 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "19f848c9-69f7-44ca-9d03-821e43715299", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:17:32 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "ca7071d3-c547-4e8c-bfd7-9291b6c8bad4", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:07:45 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "82bb0f9f-6833-46da-812e-32b912b2173c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:17:34 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "13891cf0-8f71-4d92-9df8-b898223823bf", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:07:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "f1fd7fd9-6c15-4996-80e6-da8b1592ebc9", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:17:36 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "a7e4db1f-32c2-4784-9570-b107bfdecd9e", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:07:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "c1bdaa4e-8534-44a4-9b44-30aab89aae5b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:17:38 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "52c8b92f-2bcf-4f8b-abb5-b94451a087c4", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:07:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "4e599c7d-0fe7-4587-90f8-4b587a7648eb", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:17:41 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "4b2042b0-aa55-489b-a379-0ceaf571622a", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:07:49 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "802abec2-471b-4168-ae0f-b49280182a5a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:17:43 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "826", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "f65dcfb6-c9cd-4d14-b1d1-b3971b33cd6c", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6\",\"deletedDate\":1561364248,\"scheduledPurgeDate\":1569140248,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey6/cc358ac69f3b4d9fad4c69036048743e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"s5F652zCycyFfH8nQG657ZcC3xHRXJoUITiRocxZplJBGtRwDAgVTqifktJ2UhNfRqOtMBDfOHdelCX4Q6CxOeTjSNf-JgWXdfDiUYGX0Mc_qLDQMNaH6ouJ05zT_oJYk7aY4o4WTUO847E95dLckJmCCq2Js5lEbFXV251lZtBRF4ZoHSRukk3zKxIubsKmRBs5cwQ_i3CSEtwItTxvYVLQEP2UrBrXz4SPNhHPhFMZSXVFiyWh1v5HC2-k_tphZC4eVfyyH3pfSMEmtfhkZwzA4iRTUzp6IGjbsf8bZrybQf4PG7880qAUNaehL3R9akD_U4v-h2ba8gtVdSeDNw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561364239,\"updated\":1561364239,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:07:50 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "800", + "x-ms-request-id" : "bedaa9b4-876c-486e-8766-e2e9e72f46b1", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testKey6\",\"deletedDate\":1571886459,\"scheduledPurgeDate\":1579662459,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey6/4bb21fbe4dbb4966a55ca49d5e0fb423\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"y9Kw2wkR7O8Iqbznb22lQOpR5FSXhgmhOEs4wQu7PirV7iNXXItgIZ5g2t3_ZhGdQgXjGks4SSOD3V8ZR-FaKkjzlEPnECL1LjtegpgKvwp3gZStYP5Ekqpxniz-aws3hHLVa_BcbwxyZgfssOTpew_Y_kcXaba47rGjXninkpjMZJMmcI6UH6cnxuUitQQWl4vi55wluy2I3FFhDaQ2WDU6HT1m-fQLJkzeJd-lRWkrHZKX2LwUoaUrx4vua7yBMmXG-Fd_bjKxJzuVaa2JWl-yLnXuLdc33okQ3kYIGJSMhhmSBkodv-447oZ-cDmdZSIrmV12csZwMXzfzGbYqw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886459,\"updated\":1571886459,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:18:13 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "826", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "1483a6b7-3ee5-44bc-b8af-fef55e56d9e3", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6\",\"deletedDate\":1561364248,\"scheduledPurgeDate\":1569140248,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey6/cc358ac69f3b4d9fad4c69036048743e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"s5F652zCycyFfH8nQG657ZcC3xHRXJoUITiRocxZplJBGtRwDAgVTqifktJ2UhNfRqOtMBDfOHdelCX4Q6CxOeTjSNf-JgWXdfDiUYGX0Mc_qLDQMNaH6ouJ05zT_oJYk7aY4o4WTUO847E95dLckJmCCq2Js5lEbFXV251lZtBRF4ZoHSRukk3zKxIubsKmRBs5cwQ_i3CSEtwItTxvYVLQEP2UrBrXz4SPNhHPhFMZSXVFiyWh1v5HC2-k_tphZC4eVfyyH3pfSMEmtfhkZwzA4iRTUzp6IGjbsf8bZrybQf4PG7880qAUNaehL3R9akD_U4v-h2ba8gtVdSeDNw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561364239,\"updated\":1561364239,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:08:21 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "800", + "x-ms-request-id" : "e0f8b982-6a54-4e2f-a96b-078a8450a02c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testKey6\",\"deletedDate\":1571886459,\"scheduledPurgeDate\":1579662459,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey6/4bb21fbe4dbb4966a55ca49d5e0fb423\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"y9Kw2wkR7O8Iqbznb22lQOpR5FSXhgmhOEs4wQu7PirV7iNXXItgIZ5g2t3_ZhGdQgXjGks4SSOD3V8ZR-FaKkjzlEPnECL1LjtegpgKvwp3gZStYP5Ekqpxniz-aws3hHLVa_BcbwxyZgfssOTpew_Y_kcXaba47rGjXninkpjMZJMmcI6UH6cnxuUitQQWl4vi55wluy2I3FFhDaQ2WDU6HT1m-fQLJkzeJd-lRWkrHZKX2LwUoaUrx4vua7yBMmXG-Fd_bjKxJzuVaa2JWl-yLnXuLdc33okQ3kYIGJSMhhmSBkodv-447oZ-cDmdZSIrmV12csZwMXzfzGbYqw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886459,\"updated\":1571886459,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:18:13 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "2df859c3-f079-49ca-a5d0-73622f54a630", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:08:20 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "befa970f-052d-4416-9b86-76a1321e2d63", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey6?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:18:13 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "b095b6bf-5ed4-4b96-aa8e-fc9ee0258537", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:08:21 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "e4880512-2da1-4408-b8d7-1a2d3120437f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey6\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/listDeletedKeys.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/listDeletedKeys.json index 53bb000b62fe..3590ed92278a 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/listDeletedKeys.json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/listDeletedKeys.json @@ -1,1075 +1,1983 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest2/create?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/listDeletedKeysTest2/create?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:02 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "696", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "f7287998-f118-4a86-8973-3dcfb54cad10", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest2/e4f9857a773f4a29b0b3d8075218d740\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"j6bCRpWs-VsLfLwyoM4ujNYc8Bpw_pAP5CltlrOfkWkY1123rzXNp8C3gcq6U5sCTIzcwAYoUn4ICPG5MOLv_ywDwOdXT6_ScFxQI0rRWR-jbVYq4OjYKWC0mshBiebWiM56lbom-sRLceG8rFprAPrxRiAepaU3QO7fd0aepBg9hu86_soA--mzmcMhK7BDtdfeGGA3D3SS7K9tZhuctDHdjBwYmQt5YjLqyfCPDlQd8METfZ2mRgaX5tsLxHmfor7ASJsWJ08SXzUs5OzTltnklxiJIOlT0UNEjB7Paflf2SGankL1z9s2FkhmkkK-r-BWAQIvxBYXjjOWrdP3lw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363923,\"updated\":1561363923,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:59 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "683", + "x-ms-request-id" : "f0ef5a45-0a47-477f-8f88-1bacac47295f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest2/dbbc3bfa8a554e55bc1193f807d3567e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"u8QZq6welPeB7GWRJYoMTROi26O7P3w6ADTaBo5B2DSnEuGz9iG3b7z8v1ntX2oNCiMVGmzmybkFdrPoM5nEO9K1GpQT7cmW1PF0OBjVl9n3_BHDXLyKwYUv2eEDmcuEOeVy_zUOCCh1OtgmCfD9E9sT1k2xjsQ9TlzWp6Xkym6AtVtxZ1S_sGfB2fQ-mULaEOwgaUrN3zzH8C1qnXlJ9_YwKLXwFvvHkWPsmxcDc25otvhwqKNf8QXdceue3Xsq2ZwKzY3WtQBkLRD_T6E50lLmvtmafr-zSR3cwLkkgRaVMzMdzt4iiiobVCCUNLvtAsh65VlaSCqXDcy2u7ygvQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest1/create?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/listDeletedKeysTest1/create?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:12 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "696", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "4c2e60d5-f660-4e40-964e-2f6f18c63a6d", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest1/9bce6782d47c4762a7298d3964db46c1\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"yrurZ3_wqsCpdT5g0_imLL021xzI0iTKqmnysWFIm2zWrhswoGxhdEWA2ulQ9BEVtKyivc3ltQ-ol6a-yWuqLq6-asGYvmagod2MNBeCvp03m3E0OjVEo7bO_HrKaZFg7vevSk3b7yjesCG5yBJjPI1diJWUEK_qxX-95yMi782vULPCztwi6HKGfsIR3Oggi_1wwTbCb273XbZ0oQAumSUrxuEswXKtBJj4eEcfN4oGfbsi4yzeq-Ikvb3i8tybJdQ5tYByI7qm6uqckT-zGQ6hOoyCXK1r129K6iJJP3OlB0ZvMBMiwIiNbx0fnWH6s4liTzxA76QSQxiSOEQ7DQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363932,\"updated\":1561363932,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:59 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "683", + "x-ms-request-id" : "0b37357d-000a-439c-af88-7f4e17882ae3", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest1/3c564ad8b7564dd4880e60f5b3140f77\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"r_BWuXUdemwryVo4PnfK7gjp8RuXeKE-hGt_okWzeZ8o0ifwuCapGP2s0cU3_Qew4OTaGTYypgw-N632toOjKGlQV7MvXrTWygCh1ArD60_r14racH6NVm9CT3Qc0rJs6pp5UiCqS0Wu1Fa5ImGSZuvo3sTi8D-3ZbQdiWERMxRGrrPs-LK2YL_tNU8cnWbGrzUwLaTgxFBIXIt8_aCrQsh8AI6mHOv40OGn-KmsKo-BbC8JL_Wfane8jRiqhwDGkF-3-6eI10YIeiOnytsQ2ASzdsCPu3zy7hqZK-vdItLrmywAsUKRQOZ06KkJv-eKCq7F7W8TZsvT2OLRHE50dw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest0/create?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/listDeletedKeysTest0/create?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:12 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "696", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "e71cf3e8-ccd7-44b0-85d4-7313a680430f", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest0/a74494bdad604c27bb90b169038f850e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"4YAT1dBKKn7GJYRY7cYpOitoLJihPPP0ammkV7I0Phr_f7VbC9Q4R4V3lp9Ql071p31hLjh3Si67Owd6JuyiWm64dDMkmno9xRH1efDSjEbsCGpCmXb0CUwEKF9vFz_1V3q5m-OyeOepHX70Mvv85TP1S6xj4F87mK3wz1xuSuHKiY_3S0rzRPhoSyaJGJ-NIOogPE14Z2FU07l3PU8-_63QOEVQHI16CHk6x8JwqI8EXE2iqQ76SuFS1VkJjlikRSl2Zo0kpZtbTdhDfFklhhN55KL-nIsyXUn-8fY4e_JAe6VyeFtUCVK2sajqU3XHncCdMi_uY9HaGdXxKGz6aw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363932,\"updated\":1561363932,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:00 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "683", + "x-ms-request-id" : "63a2ec04-ed79-41c1-8802-8f0ad2ba6ae3", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest0/c1d0c6b1cb164d46b1bda16041e30429\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"q5jDQ5Ndw6mJohWBdPLXOlrgGaj9BMVjcAlY6OZoK9fi3xBRwYwU-eObuvV9T8d2oAMA7RAT1MWpM6OuSu2cRgKybCzsEDMNhWEcUomrWooQlwEKyEooERJLImCBp0vQEtUVUP3y8xeQnO5uuOwSN7Iv0wqazHTgbhjIBz1woOr8viG5bmN5agk0QQOLSqNOLoy6VJ62NDA5CIX-5jMdTRFjwOY6-aNbtlrxx2Smg--r3X42o3kR68zd_z6x9IVutbfAEhkdooiRP2DLoErMQJoCdGT_X2XFuwcyNmyVM5olacTw4vDwpm9nubcroHFfYHiEeA7Nx5w88lYIRa3NsQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/listDeletedKeysTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:12 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "850", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "7d6f3846-21c2-413c-8e2f-2555a4e62fa8", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest2\",\"deletedDate\":1561363932,\"scheduledPurgeDate\":1569139932,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest2/e4f9857a773f4a29b0b3d8075218d740\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"j6bCRpWs-VsLfLwyoM4ujNYc8Bpw_pAP5CltlrOfkWkY1123rzXNp8C3gcq6U5sCTIzcwAYoUn4ICPG5MOLv_ywDwOdXT6_ScFxQI0rRWR-jbVYq4OjYKWC0mshBiebWiM56lbom-sRLceG8rFprAPrxRiAepaU3QO7fd0aepBg9hu86_soA--mzmcMhK7BDtdfeGGA3D3SS7K9tZhuctDHdjBwYmQt5YjLqyfCPDlQd8METfZ2mRgaX5tsLxHmfor7ASJsWJ08SXzUs5OzTltnklxiJIOlT0UNEjB7Paflf2SGankL1z9s2FkhmkkK-r-BWAQIvxBYXjjOWrdP3lw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363923,\"updated\":1561363923,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:00 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "824", + "x-ms-request-id" : "fc95f3a3-0cbf-4976-aa9d-b712ab8dd876", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2\",\"deletedDate\":1571886180,\"scheduledPurgeDate\":1579662180,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest2/dbbc3bfa8a554e55bc1193f807d3567e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"u8QZq6welPeB7GWRJYoMTROi26O7P3w6ADTaBo5B2DSnEuGz9iG3b7z8v1ntX2oNCiMVGmzmybkFdrPoM5nEO9K1GpQT7cmW1PF0OBjVl9n3_BHDXLyKwYUv2eEDmcuEOeVy_zUOCCh1OtgmCfD9E9sT1k2xjsQ9TlzWp6Xkym6AtVtxZ1S_sGfB2fQ-mULaEOwgaUrN3zzH8C1qnXlJ9_YwKLXwFvvHkWPsmxcDc25otvhwqKNf8QXdceue3Xsq2ZwKzY3WtQBkLRD_T6E50lLmvtmafr-zSR3cwLkkgRaVMzMdzt4iiiobVCCUNLvtAsh65VlaSCqXDcy2u7ygvQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:01 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "3b84d929-eeba-4a77-b8df-617b8084a6d7", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:02 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "541720d6-1135-4e22-8296-8e52fd2b4717", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:03 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "e530274b-0514-4781-a9a2-b4ef8012b1d6", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:04 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "80ded9f0-bcce-4e3f-a5c9-fdb1b0b0bc8b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:05 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "b1778edf-abb1-49ee-afbd-50980906cd42", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:07 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "e06efafa-f1f5-4504-b526-98987288b7b6", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:07 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "33b9534d-7179-40c7-8d27-843f6dd9364c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:09 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "6af71ae6-3287-43ce-b93c-e025abaf0a66", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:09 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "73a3ec45-310d-49ff-984e-4589ea9bfded", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:11 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "d3d25cd0-f3f4-443b-802e-a25c22394afc", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:11 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "0d16f547-b341-4fdf-96c5-7b9ecd3157ef", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:12 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "47c3eef8-c694-4cd9-97e6-0d36c982186e", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:13 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "192ee412-7029-4488-8fa8-0ca0503c5821", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:14 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "e765ee75-80f0-41f1-870f-f539ac3e230c", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:13 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "2477f4fa-5b68-4f11-98f6-a2bb52c10de7", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:16 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "feada710-a504-4dfc-88eb-56c733c299f1", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:15 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "0efcdeb7-9444-46ab-bf69-d347c2819477", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:19 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "850", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "94864965-761d-48cb-aeb6-7288309e9642", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest2\",\"deletedDate\":1561363932,\"scheduledPurgeDate\":1569139932,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest2/e4f9857a773f4a29b0b3d8075218d740\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"j6bCRpWs-VsLfLwyoM4ujNYc8Bpw_pAP5CltlrOfkWkY1123rzXNp8C3gcq6U5sCTIzcwAYoUn4ICPG5MOLv_ywDwOdXT6_ScFxQI0rRWR-jbVYq4OjYKWC0mshBiebWiM56lbom-sRLceG8rFprAPrxRiAepaU3QO7fd0aepBg9hu86_soA--mzmcMhK7BDtdfeGGA3D3SS7K9tZhuctDHdjBwYmQt5YjLqyfCPDlQd8METfZ2mRgaX5tsLxHmfor7ASJsWJ08SXzUs5OzTltnklxiJIOlT0UNEjB7Paflf2SGankL1z9s2FkhmkkK-r-BWAQIvxBYXjjOWrdP3lw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363923,\"updated\":1561363923,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:15 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "824", + "x-ms-request-id" : "1784045c-b3d4-4c30-ba3b-9bf108650e5e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2\",\"deletedDate\":1571886180,\"scheduledPurgeDate\":1579662180,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest2/dbbc3bfa8a554e55bc1193f807d3567e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"u8QZq6welPeB7GWRJYoMTROi26O7P3w6ADTaBo5B2DSnEuGz9iG3b7z8v1ntX2oNCiMVGmzmybkFdrPoM5nEO9K1GpQT7cmW1PF0OBjVl9n3_BHDXLyKwYUv2eEDmcuEOeVy_zUOCCh1OtgmCfD9E9sT1k2xjsQ9TlzWp6Xkym6AtVtxZ1S_sGfB2fQ-mULaEOwgaUrN3zzH8C1qnXlJ9_YwKLXwFvvHkWPsmxcDc25otvhwqKNf8QXdceue3Xsq2ZwKzY3WtQBkLRD_T6E50lLmvtmafr-zSR3cwLkkgRaVMzMdzt4iiiobVCCUNLvtAsh65VlaSCqXDcy2u7ygvQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/listDeletedKeysTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:19 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "850", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "d95eb311-d314-421b-97f8-338d6abb60a6", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1\",\"deletedDate\":1561363939,\"scheduledPurgeDate\":1569139939,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest1/9bce6782d47c4762a7298d3964db46c1\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"yrurZ3_wqsCpdT5g0_imLL021xzI0iTKqmnysWFIm2zWrhswoGxhdEWA2ulQ9BEVtKyivc3ltQ-ol6a-yWuqLq6-asGYvmagod2MNBeCvp03m3E0OjVEo7bO_HrKaZFg7vevSk3b7yjesCG5yBJjPI1diJWUEK_qxX-95yMi782vULPCztwi6HKGfsIR3Oggi_1wwTbCb273XbZ0oQAumSUrxuEswXKtBJj4eEcfN4oGfbsi4yzeq-Ikvb3i8tybJdQ5tYByI7qm6uqckT-zGQ6hOoyCXK1r129K6iJJP3OlB0ZvMBMiwIiNbx0fnWH6s4liTzxA76QSQxiSOEQ7DQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363932,\"updated\":1561363932,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:16 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "824", + "x-ms-request-id" : "d2c13309-055d-44e5-ad4e-a32299758c7a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1\",\"deletedDate\":1571886196,\"scheduledPurgeDate\":1579662196,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest1/3c564ad8b7564dd4880e60f5b3140f77\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"r_BWuXUdemwryVo4PnfK7gjp8RuXeKE-hGt_okWzeZ8o0ifwuCapGP2s0cU3_Qew4OTaGTYypgw-N632toOjKGlQV7MvXrTWygCh1ArD60_r14racH6NVm9CT3Qc0rJs6pp5UiCqS0Wu1Fa5ImGSZuvo3sTi8D-3ZbQdiWERMxRGrrPs-LK2YL_tNU8cnWbGrzUwLaTgxFBIXIt8_aCrQsh8AI6mHOv40OGn-KmsKo-BbC8JL_Wfane8jRiqhwDGkF-3-6eI10YIeiOnytsQ2ASzdsCPu3zy7hqZK-vdItLrmywAsUKRQOZ06KkJv-eKCq7F7W8TZsvT2OLRHE50dw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:18 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "935baedb-610d-41a2-979a-41323a208492", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:18 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "eb792455-ee27-454f-bc6f-1997bc4aa69a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:20 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "6db7c79b-728c-47d0-884c-7c946df8fcb4", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:20 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "d1ad2a0b-4536-4406-8dde-f040071246b2", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:22 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "b6e49337-dfed-4fcd-b491-d79f4d0b7956", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:19 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "beff262b-99b6-4614-8e55-13813d100da1", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:22 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "9f700c52-c03e-4c0c-a7a4-a9411713ca40", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:21 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "052fd1e1-c095-407f-95eb-bdcb5dbce714", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:24 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "1f6e688a-6c61-4872-9325-ea75bdf0598c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:23 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "f8ab930f-00dd-415f-90c6-8143d8dc02e9", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:24 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "ad03fb8a-9b28-401e-a3dd-6af572332fc7", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:25 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "d359d08b-c943-41fe-beb6-463bc8423351", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:26 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "851c5082-7406-4c17-8dc5-3f01e226147f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:27 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "fc1f58b4-8045-4aa2-b678-cafa41e73c80", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:26 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "ba98dd09-2f28-4f8b-b273-a8f8fcc65329", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:29 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "bf4a43bb-3f3e-4341-8ad3-04c2c19b0c56", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:28 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "da75a79a-05b1-4279-bd66-a9e111fd6652", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:32 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "08da4a2e-5bd7-4af1-ab7f-15bff6ea03b1", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:29 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "5772d575-e6ab-4360-9759-cbdf31640aec", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:34 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "850", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:30 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "47188b6e-7185-4eac-ad42-15ee0a6c8a66", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "fca0fb0f-c8f5-4b33-8a44-64e9bd743806", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1\",\"deletedDate\":1561363939,\"scheduledPurgeDate\":1569139939,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest1/9bce6782d47c4762a7298d3964db46c1\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"yrurZ3_wqsCpdT5g0_imLL021xzI0iTKqmnysWFIm2zWrhswoGxhdEWA2ulQ9BEVtKyivc3ltQ-ol6a-yWuqLq6-asGYvmagod2MNBeCvp03m3E0OjVEo7bO_HrKaZFg7vevSk3b7yjesCG5yBJjPI1diJWUEK_qxX-95yMi782vULPCztwi6HKGfsIR3Oggi_1wwTbCb273XbZ0oQAumSUrxuEswXKtBJj4eEcfN4oGfbsi4yzeq-Ikvb3i8tybJdQ5tYByI7qm6uqckT-zGQ6hOoyCXK1r129K6iJJP3OlB0ZvMBMiwIiNbx0fnWH6s4liTzxA76QSQxiSOEQ7DQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363932,\"updated\":1561363932,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:31 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "824", + "x-ms-request-id" : "9e037b84-425b-4d4a-8245-fbf78f0cd595", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1\",\"deletedDate\":1571886196,\"scheduledPurgeDate\":1579662196,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest1/3c564ad8b7564dd4880e60f5b3140f77\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"r_BWuXUdemwryVo4PnfK7gjp8RuXeKE-hGt_okWzeZ8o0ifwuCapGP2s0cU3_Qew4OTaGTYypgw-N632toOjKGlQV7MvXrTWygCh1ArD60_r14racH6NVm9CT3Qc0rJs6pp5UiCqS0Wu1Fa5ImGSZuvo3sTi8D-3ZbQdiWERMxRGrrPs-LK2YL_tNU8cnWbGrzUwLaTgxFBIXIt8_aCrQsh8AI6mHOv40OGn-KmsKo-BbC8JL_Wfane8jRiqhwDGkF-3-6eI10YIeiOnytsQ2ASzdsCPu3zy7hqZK-vdItLrmywAsUKRQOZ06KkJv-eKCq7F7W8TZsvT2OLRHE50dw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/listDeletedKeysTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:34 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "850", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "e4956f4a-d436-48e1-8c5b-987b3f9e0f92", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0\",\"deletedDate\":1561363954,\"scheduledPurgeDate\":1569139954,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest0/a74494bdad604c27bb90b169038f850e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"4YAT1dBKKn7GJYRY7cYpOitoLJihPPP0ammkV7I0Phr_f7VbC9Q4R4V3lp9Ql071p31hLjh3Si67Owd6JuyiWm64dDMkmno9xRH1efDSjEbsCGpCmXb0CUwEKF9vFz_1V3q5m-OyeOepHX70Mvv85TP1S6xj4F87mK3wz1xuSuHKiY_3S0rzRPhoSyaJGJ-NIOogPE14Z2FU07l3PU8-_63QOEVQHI16CHk6x8JwqI8EXE2iqQ76SuFS1VkJjlikRSl2Zo0kpZtbTdhDfFklhhN55KL-nIsyXUn-8fY4e_JAe6VyeFtUCVK2sajqU3XHncCdMi_uY9HaGdXxKGz6aw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363932,\"updated\":1561363932,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:31 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "824", + "x-ms-request-id" : "cc6da341-ef30-4d52-9132-7c792fab09df", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0\",\"deletedDate\":1571886211,\"scheduledPurgeDate\":1579662211,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest0/c1d0c6b1cb164d46b1bda16041e30429\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"q5jDQ5Ndw6mJohWBdPLXOlrgGaj9BMVjcAlY6OZoK9fi3xBRwYwU-eObuvV9T8d2oAMA7RAT1MWpM6OuSu2cRgKybCzsEDMNhWEcUomrWooQlwEKyEooERJLImCBp0vQEtUVUP3y8xeQnO5uuOwSN7Iv0wqazHTgbhjIBz1woOr8viG5bmN5agk0QQOLSqNOLoy6VJ62NDA5CIX-5jMdTRFjwOY6-aNbtlrxx2Smg--r3X42o3kR68zd_z6x9IVutbfAEhkdooiRP2DLoErMQJoCdGT_X2XFuwcyNmyVM5olacTw4vDwpm9nubcroHFfYHiEeA7Nx5w88lYIRa3NsQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "ee914881-53e5-4e6d-8512-f792737ae9fd", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:33 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "3c5d7820-7485-4135-9ce7-8cd5901f9993", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:34 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "56f0958d-967d-4dda-8b5b-0ed60bbbbf6f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:35 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "09f4ca75-d8af-4a5f-9781-ab234bb26229", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:36 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "f52f50e2-f5ed-4bef-9901-f715de22e42e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:03:37 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "9c8d7f91-d9bb-48d5-9413-b7fce1ea0805", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:35 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "8281fd7c-4238-421d-a06e-5ba231ad15b4", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:38 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "fe73538b-2861-4a9d-934b-531c25458d23", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:37 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "4a8f32ce-b985-4074-80a9-1e2db7cd9a79", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:39 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "b2d8e9bb-8fb3-4951-b610-d74f4c9030c2", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:39 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "8822ce41-399e-4727-8856-f41688805289", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:40 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "fa64a675-176e-4e8f-9f3d-62b2951337d8", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:41 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "ca7bec90-1b09-463d-af4b-dc8592a45f58", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:41 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "453c361f-1393-43ed-8aa5-34875a96665c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:42 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "2b507a2f-65e0-4c70-bfe9-46ba50395f7a", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:42 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "acfecab8-04c0-439e-bda4-fbe57497b4ee", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:45 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "4a710a72-4992-43f4-bcd4-63ce85473944", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:43 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "1dc634c9-40e5-473b-89a0-f67a1b77d9d9", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:47 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "e61a393a-65c5-4d4c-9f63-cfe237776156", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:44 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "6f4a3339-dfc9-491b-bb57-6d3833fba86f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:12:49 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "850", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "9b9a43cd-707e-4f2d-96b2-7961b1b86114", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0\",\"deletedDate\":1561363954,\"scheduledPurgeDate\":1569139954,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest0/a74494bdad604c27bb90b169038f850e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"4YAT1dBKKn7GJYRY7cYpOitoLJihPPP0ammkV7I0Phr_f7VbC9Q4R4V3lp9Ql071p31hLjh3Si67Owd6JuyiWm64dDMkmno9xRH1efDSjEbsCGpCmXb0CUwEKF9vFz_1V3q5m-OyeOepHX70Mvv85TP1S6xj4F87mK3wz1xuSuHKiY_3S0rzRPhoSyaJGJ-NIOogPE14Z2FU07l3PU8-_63QOEVQHI16CHk6x8JwqI8EXE2iqQ76SuFS1VkJjlikRSl2Zo0kpZtbTdhDfFklhhN55KL-nIsyXUn-8fY4e_JAe6VyeFtUCVK2sajqU3XHncCdMi_uY9HaGdXxKGz6aw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363932,\"updated\":1561363932,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:03:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "824", + "x-ms-request-id" : "bcc1dd95-f472-4fd3-8bf8-4f97556af833", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0\",\"deletedDate\":1571886211,\"scheduledPurgeDate\":1579662211,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest0/c1d0c6b1cb164d46b1bda16041e30429\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"q5jDQ5Ndw6mJohWBdPLXOlrgGaj9BMVjcAlY6OZoK9fi3xBRwYwU-eObuvV9T8d2oAMA7RAT1MWpM6OuSu2cRgKybCzsEDMNhWEcUomrWooQlwEKyEooERJLImCBp0vQEtUVUP3y8xeQnO5uuOwSN7Iv0wqazHTgbhjIBz1woOr8viG5bmN5agk0QQOLSqNOLoy6VJ62NDA5CIX-5jMdTRFjwOY6-aNbtlrxx2Smg--r3X42o3kR68zd_z6x9IVutbfAEhkdooiRP2DLoErMQJoCdGT_X2XFuwcyNmyVM5olacTw4vDwpm9nubcroHFfYHiEeA7Nx5w88lYIRa3NsQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys?maxresults=25&api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys?maxresults=25&api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:49 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "1451", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "ccf9b800-747c-46a4-8dec-e2b42a60069b", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0\",\"deletedDate\":1561363954,\"scheduledPurgeDate\":1569139954,\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest0\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363932,\"updated\":1561363932,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1\",\"deletedDate\":1561363939,\"scheduledPurgeDate\":1569139939,\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest1\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363932,\"updated\":1561363932,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest2\",\"deletedDate\":1561363932,\"scheduledPurgeDate\":1569139932,\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest2\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363923,\"updated\":1561363923,\"recoveryLevel\":\"Recoverable+Purgeable\"}}],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTJJV3RsZVM5TVNWTlVTMFZaTVRZdk1EWkRORVExTXprMVF6RkVOREpDTmtFMk1USkNORVk1TVRBeE1ETTVRVFFoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:04:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "341", + "x-ms-request-id" : "72cd1ba1-0f63-45c3-8fc4-c5445ed3f0af", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjQhTURBd01EUTVJV3RsZVM5RFRFOVZSRVZEUzBWWk16Z3ZPREJGTlRBd1JUQXpPRU5ETkRWRk5EaEZRVVkwTTBRME1EWkZSVEJETTBVaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTJJV3RsZVM5TVNWTlVTMFZaTVRZdk1EWkRORVExTXprMVF6RkVOREpDTmtFMk1USkNORVk1TVRBeE1ETTVRVFFoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjQhTURBd01EUTVJV3RsZVM5RFRFOVZSRVZEUzBWWk16Z3ZPREJGTlRBd1JUQXpPRU5ETkRWRk5EaEZRVVkwTTBRME1EWkZSVEJETTBVaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:50 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "288", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "da868cd0-6f22-44de-a7e0-e93a06c41eb7", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeklXdGxlUzlNU1ZOVVMwVlpNamdoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:04:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "275", + "x-ms-request-id" : "9d253f89-fef8-4671-bec3-71af11853c98", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeUlXdGxlUzlHU1ZKVFZFdEZXU0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeklXdGxlUzlNU1ZOVVMwVlpNamdoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeUlXdGxlUzlHU1ZKVFZFdEZXU0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:50 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "348", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "60a17101-9339-48f2-ab90-14be7dfab216", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTFJV3RsZVM5VVJWTlVTMFZaTkM4MU56WXdNalZHTWpNeVJrUTBNMFZDT1RVeE5rTXpSRUV6TnpneE9FTTJNQ0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:04:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "1360", + "x-ms-request-id" : "62512d52-757c-467d-8d62-98e7bd13c1a0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0\",\"deletedDate\":1571886211,\"scheduledPurgeDate\":1579662211,\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest0\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1\",\"deletedDate\":1571886196,\"scheduledPurgeDate\":1579662196,\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest1\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2\",\"deletedDate\":1571886180,\"scheduledPurgeDate\":1579662180,\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest2\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}}],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTJJV3RsZVM5TVNWTlVTMFZaTVRFdk5EWTBRell3TWtSRlFUUkJORVZDUlVFME1ERTNRekUxUmtORU16QkZRakFoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTFJV3RsZVM5VVJWTlVTMFZaTkM4MU56WXdNalZHTWpNeVJrUTBNMFZDT1RVeE5rTXpSRUV6TnpneE9FTTJNQ0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTJJV3RsZVM5TVNWTlVTMFZaTVRFdk5EWTBRell3TWtSRlFUUkJORVZDUlVFME1ERTNRekUxUmtORU16QkZRakFoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:50 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "28", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "c24bbc8b-12c6-4008-9489-033968d50fef", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":null}" - } + "Date" : "Thu, 24 Oct 2019 03:04:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "275", + "x-ms-request-id" : "91281464-fc25-40f3-8959-730e84a58c62", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeklXdGxlUzlNU1ZOVVMwVlpNak1oTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys?maxresults=25&api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeklXdGxlUzlNU1ZOVVMwVlpNak1oTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12 azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:50 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "1451", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "41af5097-55c2-4cdc-97ba-28094f969cc8", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0\",\"deletedDate\":1561363954,\"scheduledPurgeDate\":1569139954,\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest0\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363932,\"updated\":1561363932,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1\",\"deletedDate\":1561363939,\"scheduledPurgeDate\":1569139939,\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest1\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363932,\"updated\":1561363932,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest2\",\"deletedDate\":1561363932,\"scheduledPurgeDate\":1569139932,\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listDeletedKeysTest2\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561363923,\"updated\":1561363923,\"recoveryLevel\":\"Recoverable+Purgeable\"}}],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTJJV3RsZVM5TVNWTlVTMFZaTVRZdk1EWkRORVExTXprMVF6RkVOREpDTmtFMk1USkNORVk1TVRBeE1ETTVRVFFoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:04:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "335", + "x-ms-request-id" : "056d2048-0dd9-4e12-b8eb-d39ee1c34589", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTFJV3RsZVM5TVNWTlVTMFZaT0M4d01rRkdPVEJHT1VOQk1rRTBPVFl4T1VWRU1qTkZSRVF3UWpjeFJERTNRaUV3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTJJV3RsZVM5TVNWTlVTMFZaTVRZdk1EWkRORVExTXprMVF6RkVOREpDTmtFMk1USkNORVk1TVRBeE1ETTVRVFFoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTFJV3RsZVM5TVNWTlVTMFZaT0M4d01rRkdPVEJHT1VOQk1rRTBPVFl4T1VWRU1qTkZSRVF3UWpjeFJERTNRaUV3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:52 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "288", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "00372ae9-250b-4233-8cd5-e63a21cc33aa", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeklXdGxlUzlNU1ZOVVMwVlpNamdoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:04:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "275", + "x-ms-request-id" : "2cbef178-703c-4373-afd8-56fac39044db", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeklXdGxlUzlVUlUxUVEwVlNWREloTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeklXdGxlUzlNU1ZOVVMwVlpNamdoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeklXdGxlUzlVUlUxUVEwVlNWREloTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:52 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "348", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "dc65ff97-9768-430b-b0df-b7496f03b1ca", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTFJV3RsZVM5VVJWTlVTMFZaTkM4MU56WXdNalZHTWpNeVJrUTBNMFZDT1RVeE5rTXpSRUV6TnpneE9FTTJNQ0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:04:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "335", + "x-ms-request-id" : "8297c60c-7041-43ad-8f58-cbf58cdaa016", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTJJV3RsZVM5VlUwVlNRMFZTVkRRdk1ETTFNamczTVVZd1JqVTJORVJDUVRsR05rUTROemt3TlRjM01VSkNSa0VoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTFJV3RsZVM5VVJWTlVTMFZaTkM4MU56WXdNalZHTWpNeVJrUTBNMFZDT1RVeE5rTXpSRUV6TnpneE9FTTJNQ0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTJJV3RsZVM5VlUwVlNRMFZTVkRRdk1ETTFNamczTVVZd1JqVTJORVJDUVRsR05rUTROemt3TlRjM01VSkNSa0VoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:52 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "28", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "5665d250-4c79-43f2-b73d-f4f0e4f07565", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":null}" - } + "Date" : "Thu, 24 Oct 2019 03:04:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "28", + "x-ms-request-id" : "63725c6d-acdd-484e-a5d1-f4e88f314bcf", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys?maxresults=25&api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:04:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "341", + "x-ms-request-id" : "ccb37fb9-f651-4d29-9565-0a41a2ec59aa", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjQhTURBd01EUTVJV3RsZVM5RFRFOVZSRVZEUzBWWk16Z3ZPREJGTlRBd1JUQXpPRU5ETkRWRk5EaEZRVVkwTTBRME1EWkZSVEJETTBVaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjQhTURBd01EUTVJV3RsZVM5RFRFOVZSRVZEUzBWWk16Z3ZPREJGTlRBd1JUQXpPRU5ETkRWRk5EaEZRVVkwTTBRME1EWkZSVEJETTBVaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:04:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "275", + "x-ms-request-id" : "be13750e-7f87-46e4-9496-2ce0170b3cae", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeUlXdGxlUzlHU1ZKVFZFdEZXU0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeUlXdGxlUzlHU1ZKVFZFdEZXU0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:04:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "1360", + "x-ms-request-id" : "4572d6c9-500f-4356-9d0a-38e72e8bab67", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0\",\"deletedDate\":1571886211,\"scheduledPurgeDate\":1579662211,\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest0\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1\",\"deletedDate\":1571886196,\"scheduledPurgeDate\":1579662196,\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest1\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2\",\"deletedDate\":1571886180,\"scheduledPurgeDate\":1579662180,\"kid\":\"https://cameravault.vault.azure.net/keys/listDeletedKeysTest2\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571886180,\"updated\":1571886180,\"recoveryLevel\":\"Recoverable+Purgeable\"}}],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTJJV3RsZVM5TVNWTlVTMFZaTVRFdk5EWTBRell3TWtSRlFUUkJORVZDUlVFME1ERTNRekUxUmtORU16QkZRakFoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTJJV3RsZVM5TVNWTlVTMFZaTVRFdk5EWTBRell3TWtSRlFUUkJORVZDUlVFME1ERTNRekUxUmtORU16QkZRakFoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:04:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "275", + "x-ms-request-id" : "23a90bde-ec63-46c8-be23-3a8211087320", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeklXdGxlUzlNU1ZOVVMwVlpNak1oTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:51 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "2cc7e29d-1b9e-4144-acba-6de97e134ff7", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:04:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "1e3922be-edb6-489f-8ae4-f77b0ee600d1", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:51 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "a0522b57-c3b4-4f06-8465-384481a2d057", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:04:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "322548a2-8216-43d4-b751-36d0c97586b1", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:53 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "e57a953f-8d58-4ba1-9e68-e68ddd487beb", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:04:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "6362fa8d-d4db-42ee-acca-16040af4b477", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:53 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "e280ed24-5a99-4e1e-b077-cc0da40aca97", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:04:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "73acb711-fe52-42a6-b53e-067326b3e3f9", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:53 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "64b65d87-c670-4f98-964b-08601c8f5e16", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:04:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "6c9721af-1d24-483c-8e95-2a57c10315fc", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listDeletedKeysTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:13:53 GMT", - "content-length" : "88", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "12a6a3b2-8381-45b4-abe2-2623c8938052", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:04:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "456feb91-4e67-4977-922c-cafd6a3756be", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listDeletedKeysTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeklXdGxlUzlNU1ZOVVMwVlpNak1oTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:04:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "335", + "x-ms-request-id" : "00fc7ef5-5365-4e1b-b762-d6dea7bab850", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTFJV3RsZVM5TVNWTlVTMFZaT0M4d01rRkdPVEJHT1VOQk1rRTBPVFl4T1VWRU1qTkZSRVF3UWpjeFJERTNRaUV3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTFJV3RsZVM5TVNWTlVTMFZaT0M4d01rRkdPVEJHT1VOQk1rRTBPVFl4T1VWRU1qTkZSRVF3UWpjeFJERTNRaUV3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:04:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "275", + "x-ms-request-id" : "06e688d1-2b9f-4cb4-bed8-895b83ad178e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeklXdGxlUzlVUlUxUVEwVlNWREloTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeklXdGxlUzlVUlUxUVEwVlNWREloTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:04:49 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "335", + "x-ms-request-id" : "d3c16313-fdc9-4bfa-896d-8dd753fcb600", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTJJV3RsZVM5VlUwVlNRMFZTVkRRdk1ETTFNamczTVVZd1JqVTJORVJDUVRsR05rUTROemt3TlRjM01VSkNSa0VoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net:443/deletedkeys?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjAhTURBd01EUTJJV3RsZVM5VlUwVlNRMFZTVkRRdk1ETTFNamczTVVZd1JqVTJORVJDUVRsR05rUTROemt3TlRjM01VSkNSa0VoTURBd01ESTRJVGs1T1RrdE1USXRNekZVTWpNNk5UazZOVGt1T1RrNU9UazVPVm9oIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:04:49 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "28", + "x-ms-request-id" : "14bf710c-9eb2-4438-b8cd-fa0cb95bea0d", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/listKeyVersions.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/listKeyVersions.json index 4f0810935b07..59ebc77de301 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/listKeyVersions.json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/listKeyVersions.json @@ -1,406 +1,589 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/create?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/listKeyVersion/create?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:43 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "690", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "9ae43d7e-31c2-4db3-9b15-ea3095c91eaa", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/dd840346473b483482c75d535ea34a94\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"pc5tXWBerNJv_sK8PqmBT7lJEBS3ZqbrRRQwBQrJbnku-rE2z2IEmKpKhTOtkzeCbTId3g_pvEmbWcTu6JrfNnMyj7QC9g7Z-Ye8cheH8OVjT6aueB6c6ZZ2NxElZpdEWFLufOi4_Cx3mZc3UHzEqPywk1XDYdqwmIfoFRTo6tdqbCyYlCHlseDCMXxAzZXcLTWoFpf0KQNODZX11t6X__Vl_U_Hfy_s8RTHbko6SpipsT6oDmMHazvmA8ESbYX1LRWYqP6dp5A7aEmBozAMEPYMQ52-rt0Q_mp9Yooa3EAxS5db2GoQ8CxIfpFqSQeHzxCbuhcTkpkFF9mOsHkzQw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3797280000,\"created\":1561363843,\"updated\":1561363843,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "677", + "x-ms-request-id" : "46f31d4e-5c76-4676-9a82-9be87779eed6", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listKeyVersion/da966191d70a4c95a22b48d75456767b\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"qr9Jh_J718XXRC292yiGR8Fr1Toy56AVjOQtJKpILhMCmMFwPx-fAxXeglaPMKaxeLsBPyUqqHubzt7jns-LouMbJUmlX5L9V_bscWw-a4PkbpK1uRMfg4QzA_w4RaSuxFSrj0ewyG6s-VzdH-eVdspWEbQWoRLekLh0zbOqqkvRI2KKkO4T5XeVTeQb2YF-t4O018dwtl2E6vxRMBxjQPDOE13OoFSD-WomNOq9aPZ9yaAj_tPlJNyNFXw3yQs788nYLSrcxpQph-eJ93DVyct9l-_j41_fbNEhHOLDeAjYaI58qWT2ZdZF90AuPNXvpPc1JLrs_xU5lyla1Kux3w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3797280000,\"created\":1571886152,\"updated\":1571886152,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/create?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/listKeyVersion/create?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:49 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "690", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "6e0fc3fa-56bb-4969-a604-a169ea67a820", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/f7910f68f2994edd91e46e2df7250e08\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"sBVl_hWMhR3F-OQi87Pp6BmCdvnBP_jTtyBEPPfyB2ygvf29Y2aybYKDGQDHQqDN1mu68B3h6Kk6i4AJjCof2hRFeL2EnzxlfyXMg3luKP8DXHRR-vbhWtCvHDq-uRRUSlnzcFrtOrYOgStrqqyBzdqIHv1GjE9rkSelQY2lck2dSg-1ICZYi1CP54enR7J6rhojAR99NJiWDt3o29GGTHy2h_vHPjIbRifE2toj5VYqYgxi6GpdgZAvvuKBoXHQWMnvg9uZHcPUQpIfso7x_oKRJJSdGjFF4ydLxWRjRJ_6bCmXxqRfwHV9ZIlLU3qYRmj_YNeL5V2J5OeVO73zFQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3797366400,\"created\":1561363850,\"updated\":1561363850,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:31 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "677", + "x-ms-request-id" : "835dcd3e-2470-4766-b727-3a94d2941c4c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listKeyVersion/6eaf2d6aced641be8f3333b1cb12dc56\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"i3Gj2EqF_zj8rZ7d_GkqNRgNTsklUQXVz-8C9KwAMYFxgMQOd6lYRyZ6NuS8akv0iGQhPHh9yLXUV56UL3ZAHNYSEvAjob4eo1nAFstLfUKIsixLYBnr94POD1uSDc0mOdq9gbafqs7VT2aKCnfbPIA06y-pllsnOP-G91MlBeIDUwj7EaWgtSr-8Rrem-pRjwDPe5K4lleYOXzZ9p16qH-GbgYnd7BR4AEpFMzxde6yuSRcHGSPpA2X28wfouhFGuQp9-uYLQ9OG198ZxX-w26U8JVPf13sniRvQwcD37Ri_oWFVOyUuhVfdRh06pTtPQ_vSAxSk2reUshYwWINqQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3797366400,\"created\":1571886152,\"updated\":1571886152,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/create?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/listKeyVersion/create?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:50 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "690", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "eaea21b4-8696-4114-915d-98959363a3f0", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/34227d5c265f460f857b9d6a9e6a3a59\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"rH5BFWspuREN65Bh0H7mWTs02U9mMqFjqhw6d9z3a-wtni0yrOsgQKez4XfVqyPnY8vPXn-T2wSDETy2J3VH0mmzV6Cbvtvzvg8Os11KfqetQ4IK7xslm0OswpMct3HDELzCYkcLhOlPXrE6WLQI-MqCCmstExEilXZBFZxdoRJaKWoBEsXQONToHk8jycwnnQz9Ojnp3muA2k1Rpfgpm1B8MXtL5kfnkKQM3X4oawZrNK14v8TeasHMQ-N8HUYvZ6d6CMNGopQ5P6EEZ4Qg-_mu5jf1bjEO0Kt3QpwqvgzjpBhg-EAKJ03VOqzJ04Cr2bFCvwPyQ654usdqI6Zo-w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3797452800,\"created\":1561363851,\"updated\":1561363851,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "677", + "x-ms-request-id" : "43adba6e-d03d-47af-bfc3-0574ffebe6d1", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listKeyVersion/6fe79aeda53c46c88890bcca38cb3e56\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"vWsCD1WalQVUjFmCD2qJDS7mPFpWV-8w7DZliHaIM5tNJiRm9mkIohVeyMMkII_O0vdGT1H3I7eJhzKNOlL-8W57pX90SaFXOEwaNb_iZzTjVrF-5nrK370RWCduLiEjOFRXoa7qzaBLTFD69uNhOpsJpJXg5jdmj-YIgmLlEkzYsej2Qkk6l5DxvrTR3psMsGNMc29w4ZIPhl8FNOqKQgckLlWNi_fkiFQhBpj51aUwvmDBwevCohYWpjf3bSa1Lxnin7Igd-neCduQayEPwacCPHNXhuRY3lhPfaiuShbnClaDK68SBnqOx8_UHcHLgbPsq9bAXEBOhC-ntu04AQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3797452800,\"created\":1571886152,\"updated\":1571886152,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/create?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/listKeyVersion/create?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:50 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "690", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "dca53e67-f834-4505-a41e-936199404171", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/202650ac1b61476985b24641247df6ec\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"ncyZdJtyyCNkTphUClH-rDAby-wTueqjeR9GlMKLhIZsMoZSqRcQ3c8MJ99M8noK0mfqROHubzEEyZEZT9LUkVkakYVEI7VN6ZN9seqsMzU-VgNq78DkpW3IK7gb8_ogEOW96-V8CHGtHDBxgaDXXHvjsUIn8jr8v5ndbAdhTA6ZExQatB9R0lFhucM8hXX8KTiXXbLyf83ZD_0x9SXSkb4vie6d_kcnHPoIBFXN-n3y5hVDOEDtKpyaoNtqJLzMGHJS2XIThlglnXhO-d-LC47tZZOKQHtmZC9zgXe7GoS3NUKb4u8xh-uLZKxKmRAvgUfviVnEagSquBxAS3L4Nw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1561363851,\"updated\":1561363851,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "677", + "x-ms-request-id" : "a57a29df-a015-48e2-b9d5-d70053046dae", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listKeyVersion/2c5e9c9a342743c093b6533cc640fe51\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"pms90W5Sb-arnt-KxwlmKYzwDGl6khLrhxuudjKHWjGZhYWOBb2pmmnnkVzH7xXMySQRzH8M5-gZc4_U1ieo5s2ibK4IKfJ61jjWSJ0io8a2dnm7Izrg1uUEgD7XBVYdEYfabXUehesC4zJfApO4S_Dk58L8X2elLM94BWasH6-YMx17QXmpYeaNycy8wslGtMSya13bPyzhXFBMgeqzWEiYXsMI3zdHdIAUCwWtkvCnc2ipsFBa66kui1l4gFOIFXVBFgw8YOrRh3Sz-UNLMNHWM-rZJ94gyxIKkX-mE0HpjjbqVhODA0ZlDc--0RFwL2gXGfRlFsKsESLWrN51Tw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1571886152,\"updated\":1571886152,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/versions?maxresults=25&api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/listKeyVersion/versions?maxresults=25&api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:50 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "991", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "d9eda5cd-cbc4-40ed-92f5-be7af0fd1b2f", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/202650ac1b61476985b24641247df6ec\",\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1561363851,\"updated\":1561363851,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/34227d5c265f460f857b9d6a9e6a3a59\",\"attributes\":{\"enabled\":true,\"exp\":3797452800,\"created\":1561363851,\"updated\":1561363851,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/dd840346473b483482c75d535ea34a94\",\"attributes\":{\"enabled\":true,\"exp\":3797280000,\"created\":1561363843,\"updated\":1561363843,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/f7910f68f2994edd91e46e2df7250e08\",\"attributes\":{\"enabled\":true,\"exp\":3797366400,\"created\":1561363850,\"updated\":1561363850,\"recoveryLevel\":\"Recoverable+Purgeable\"}}],\"nextLink\":null}" - } + "Date" : "Thu, 24 Oct 2019 03:02:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "939", + "x-ms-request-id" : "0b46151c-d1a9-4fcf-baeb-99e97b369360", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[{\"kid\":\"https://cameravault.vault.azure.net/keys/listKeyVersion/2c5e9c9a342743c093b6533cc640fe51\",\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1571886152,\"updated\":1571886152,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"kid\":\"https://cameravault.vault.azure.net/keys/listKeyVersion/6eaf2d6aced641be8f3333b1cb12dc56\",\"attributes\":{\"enabled\":true,\"exp\":3797366400,\"created\":1571886152,\"updated\":1571886152,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"kid\":\"https://cameravault.vault.azure.net/keys/listKeyVersion/6fe79aeda53c46c88890bcca38cb3e56\",\"attributes\":{\"enabled\":true,\"exp\":3797452800,\"created\":1571886152,\"updated\":1571886152,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"kid\":\"https://cameravault.vault.azure.net/keys/listKeyVersion/da966191d70a4c95a22b48d75456767b\",\"attributes\":{\"enabled\":true,\"exp\":3797280000,\"created\":1571886152,\"updated\":1571886152,\"recoveryLevel\":\"Recoverable+Purgeable\"}}],\"nextLink\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/listKeyVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:50 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "838", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "cf6f7936-7599-4507-9ab7-68045920b3f6", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listKeyVersion\",\"deletedDate\":1561363851,\"scheduledPurgeDate\":1569139851,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/202650ac1b61476985b24641247df6ec\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"ncyZdJtyyCNkTphUClH-rDAby-wTueqjeR9GlMKLhIZsMoZSqRcQ3c8MJ99M8noK0mfqROHubzEEyZEZT9LUkVkakYVEI7VN6ZN9seqsMzU-VgNq78DkpW3IK7gb8_ogEOW96-V8CHGtHDBxgaDXXHvjsUIn8jr8v5ndbAdhTA6ZExQatB9R0lFhucM8hXX8KTiXXbLyf83ZD_0x9SXSkb4vie6d_kcnHPoIBFXN-n3y5hVDOEDtKpyaoNtqJLzMGHJS2XIThlglnXhO-d-LC47tZZOKQHtmZC9zgXe7GoS3NUKb4u8xh-uLZKxKmRAvgUfviVnEagSquBxAS3L4Nw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1561363851,\"updated\":1561363851,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "812", + "x-ms-request-id" : "704d5137-985a-4414-86ec-ddba8a766b0a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listKeyVersion\",\"deletedDate\":1571886152,\"scheduledPurgeDate\":1579662152,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listKeyVersion/2c5e9c9a342743c093b6533cc640fe51\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"pms90W5Sb-arnt-KxwlmKYzwDGl6khLrhxuudjKHWjGZhYWOBb2pmmnnkVzH7xXMySQRzH8M5-gZc4_U1ieo5s2ibK4IKfJ61jjWSJ0io8a2dnm7Izrg1uUEgD7XBVYdEYfabXUehesC4zJfApO4S_Dk58L8X2elLM94BWasH6-YMx17QXmpYeaNycy8wslGtMSya13bPyzhXFBMgeqzWEiYXsMI3zdHdIAUCwWtkvCnc2ipsFBa66kui1l4gFOIFXVBFgw8YOrRh3Sz-UNLMNHWM-rZJ94gyxIKkX-mE0HpjjbqVhODA0ZlDc--0RFwL2gXGfRlFsKsESLWrN51Tw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1571886152,\"updated\":1571886152,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:50 GMT", - "content-length" : "82", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "2da56f90-caa1-4ba5-8f9c-b4dcb4c7ba6d", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:33 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "ed4b9f2f-6a72-4a1c-8c77-3e3fa2c3dd06", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:53 GMT", - "content-length" : "82", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "b628ef74-1764-44fc-a84c-e749c531f8e8", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:34 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "00d51bf5-d202-4b28-ab1e-bf2d4f9ec745", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:55 GMT", - "content-length" : "82", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "d034f45d-f818-4bec-96c1-0a3733e84bed", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:35 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "e62d26a1-e286-4624-951a-2961eef9dfec", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:57 GMT", - "content-length" : "82", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "840f341e-860b-4d3e-8882-c18e9aae9066", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:36 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "2e73718d-1b1f-4e85-8441-393403566994", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:59 GMT", - "content-length" : "82", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "cdf2a58d-b35e-4328-a1b1-df9c82cd49d5", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:37 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "a96779db-597d-4a4c-820d-796758e0a133", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:11:01 GMT", - "content-length" : "82", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "f29429bf-71b8-48c8-9835-032aa830e9cf", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:38 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "e985e066-edb8-4151-8fd7-d40bbe151a59", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:11:04 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "838", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:39 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "c284a70e-b56b-4bf7-8419-cf5b3e8a3c3d", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:40 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "ad461212-516f-45fb-ac3b-b81731981c19", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:41 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "ac443a71-8902-47b1-841c-6c2aac251a41", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:42 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "b17f8d6f-49b6-425a-a3b2-3559604a2fb3", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:43 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "566ee09c-eb96-4a81-a953-b1cc3c123d6b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:44 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "23f3a71e-ce3c-4b47-ba0e-ef8201412168", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "31fde498-4171-45d2-9fd7-5f0321b1d8a9", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listKeyVersion\",\"deletedDate\":1561363851,\"scheduledPurgeDate\":1569139851,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/listKeyVersion/202650ac1b61476985b24641247df6ec\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"ncyZdJtyyCNkTphUClH-rDAby-wTueqjeR9GlMKLhIZsMoZSqRcQ3c8MJ99M8noK0mfqROHubzEEyZEZT9LUkVkakYVEI7VN6ZN9seqsMzU-VgNq78DkpW3IK7gb8_ogEOW96-V8CHGtHDBxgaDXXHvjsUIn8jr8v5ndbAdhTA6ZExQatB9R0lFhucM8hXX8KTiXXbLyf83ZD_0x9SXSkb4vie6d_kcnHPoIBFXN-n3y5hVDOEDtKpyaoNtqJLzMGHJS2XIThlglnXhO-d-LC47tZZOKQHtmZC9zgXe7GoS3NUKb4u8xh-uLZKxKmRAvgUfviVnEagSquBxAS3L4Nw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1561363851,\"updated\":1561363851,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "812", + "x-ms-request-id" : "f8b62fac-ea68-43dd-8dbf-5edda8fc3df2", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/listKeyVersion\",\"deletedDate\":1571886152,\"scheduledPurgeDate\":1579662152,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/listKeyVersion/2c5e9c9a342743c093b6533cc640fe51\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"pms90W5Sb-arnt-KxwlmKYzwDGl6khLrhxuudjKHWjGZhYWOBb2pmmnnkVzH7xXMySQRzH8M5-gZc4_U1ieo5s2ibK4IKfJ61jjWSJ0io8a2dnm7Izrg1uUEgD7XBVYdEYfabXUehesC4zJfApO4S_Dk58L8X2elLM94BWasH6-YMx17QXmpYeaNycy8wslGtMSya13bPyzhXFBMgeqzWEiYXsMI3zdHdIAUCwWtkvCnc2ipsFBa66kui1l4gFOIFXVBFgw8YOrRh3Sz-UNLMNHWM-rZJ94gyxIKkX-mE0HpjjbqVhODA0ZlDc--0RFwL2gXGfRlFsKsESLWrN51Tw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1571886152,\"updated\":1571886152,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:11:04 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "52944526-7b3a-4ea0-bd2e-83de5662b600", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:02:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "cb0e9aca-6f80-4fee-b275-be8e678ae390", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/listKeyVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:11:04 GMT", - "content-length" : "82", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "0bf9fb3a-e29f-4437-bb3f-957d97acb068", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "a62bc33d-2c79-443f-987f-d8044f337627", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: listKeyVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/recoverDeletedKey.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/recoverDeletedKey.json index 40d5682d4257..25dda7130280 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/recoverDeletedKey.json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/recoverDeletedKey.json @@ -1,328 +1,1096 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey7/create?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/create?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:06 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "684", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "10640d66-d61d-49e7-bc88-5f1daee6cde4", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey7/9dbcf6ff3e704171940353bf7214af93\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"og4GdBQTcmljuWdSP-1kkJQGv69lUZ_t_icfE8KukTIKMwKJQMzxgy2unlTJc0JqUqLQxSo65tVw_tR5Mv9-l4cUq_sY5aDBcfVD5YP17DLUp2wAxGg4v_BHaPuxcYeqIFApWIX7Nibo742gZPAkZkag-U26PTgNxdRKWsHJ3p-4GQtVG7Qd7NsBcSm9vq-Aaoce93qUzTDFWa8ObfNK4aCDymZ6dArzcCKaZ7Qj8kObUoe6I4SPz4BSCwFz5JKoniYaxXUa8oidhL15nc_i5oxR_BYhL1mzWaqiUAS6Gaz8OYHShGh6F28YCOV5e3UrCYDxWfbRYAqYgXWRDaLBJQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561363806,\"updated\":1561363806,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:01:53 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "671", + "x-ms-request-id" : "9455fa49-9429-4720-8f9d-beae3217a2aa", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey7/6192b69238054d2ba0f7b429bae5c87e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tbIGu502kWmCKsAb5HgUerC0P5NHPWdcPMUqSSKebZx42ELoxlgpozLr_XN8X3XStp0G1oAWHdviuDC3hU9hKGJ-RHqy_wdclbYiUlocVwBnVr2M0YX4_-YjTExgoSzQWC8R411UOR_kuMFv7uSGe-VGBTgBULrQHn9kmrputNUuUCNYZeHe1HlKoroWGqUrq8rsf0b_UaA21IIkYiF2s3bTmf-T3FeBKYUm2G2fb3x2gOkXEwsCqFsfwRelwfHh-eyBSvMJYcYTxY40nTFynB7EcWScKNoIP3tL6b136io4WkKmkRmWJLhU40nT2cwnC0sbSFH9PxpjtuQ-iosJIw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886113,\"updated\":1571886113,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey7?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:15 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "826", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "5ac3d61c-4500-439e-b55c-ecef83acee94", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey7\",\"deletedDate\":1561363815,\"scheduledPurgeDate\":1569139815,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey7/9dbcf6ff3e704171940353bf7214af93\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"og4GdBQTcmljuWdSP-1kkJQGv69lUZ_t_icfE8KukTIKMwKJQMzxgy2unlTJc0JqUqLQxSo65tVw_tR5Mv9-l4cUq_sY5aDBcfVD5YP17DLUp2wAxGg4v_BHaPuxcYeqIFApWIX7Nibo742gZPAkZkag-U26PTgNxdRKWsHJ3p-4GQtVG7Qd7NsBcSm9vq-Aaoce93qUzTDFWa8ObfNK4aCDymZ6dArzcCKaZ7Qj8kObUoe6I4SPz4BSCwFz5JKoniYaxXUa8oidhL15nc_i5oxR_BYhL1mzWaqiUAS6Gaz8OYHShGh6F28YCOV5e3UrCYDxWfbRYAqYgXWRDaLBJQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561363806,\"updated\":1561363806,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:01:53 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "800", + "x-ms-request-id" : "28ee99e4-cf53-4c51-8d42-1aae30e97179", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testKey7\",\"deletedDate\":1571886113,\"scheduledPurgeDate\":1579662113,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey7/6192b69238054d2ba0f7b429bae5c87e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tbIGu502kWmCKsAb5HgUerC0P5NHPWdcPMUqSSKebZx42ELoxlgpozLr_XN8X3XStp0G1oAWHdviuDC3hU9hKGJ-RHqy_wdclbYiUlocVwBnVr2M0YX4_-YjTExgoSzQWC8R411UOR_kuMFv7uSGe-VGBTgBULrQHn9kmrputNUuUCNYZeHe1HlKoroWGqUrq8rsf0b_UaA21IIkYiF2s3bTmf-T3FeBKYUm2G2fb3x2gOkXEwsCqFsfwRelwfHh-eyBSvMJYcYTxY40nTFynB7EcWScKNoIP3tL6b136io4WkKmkRmWJLhU40nT2cwnC0sbSFH9PxpjtuQ-iosJIw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886113,\"updated\":1571886113,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:01:54 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "0a161822-2936-47e9-b78a-3f8c796f89a9", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:01:55 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "65e2a056-422d-4a94-8c8f-c3000693b624", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:01:56 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "1011ac1a-fc31-4bd0-87b4-c016754a9a3e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:01:57 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "d521a325-8b0e-4f3c-90c2-13176168931f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:01:58 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "d50c1f51-ebb9-4c7f-bda0-855b0ba1760c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:01:59 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "2b6e43ff-3df0-4e5e-8b4f-7b7c0df66778", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:00 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "4fd05e78-bdac-40c6-9a76-ad8fd9f12691", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:01 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "0054b46d-a75e-4380-b875-95cab45341fc", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:02 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "83bbb781-5c43-4c0b-b14c-26d6c56a3d14", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:03 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "7d66a943-c3f3-4946-94b0-88bb2b245c20", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:15 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "fcba4e0b-60fc-4ef5-af55-73e3614d8849", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:04 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "1ed1abb9-a851-46ef-a31b-b7b4858b70ec", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:18 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "7d5b023f-1872-4fee-b432-2849e15605ae", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:05 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "adb63b9a-bf8e-4948-8d10-acf95506757c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:20 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "87851198-8df4-41c6-b3a4-9cead20cea74", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:06 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "a9a3ede5-ea4d-472a-9805-9395bd128e45", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:22 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "a0ecf845-c6e1-44be-8b82-3406e98272bb", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:07 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "d62d3f8b-426d-49b2-b257-465b510d3095", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:24 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "0f64658c-4753-482b-9882-ec6e0b1d68b1", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:09 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "8c5e755f-c3ba-43e9-86cf-6f4bc9b17b48", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:26 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "456118dc-7c39-4463-8b30-4eac56260187", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:09 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "fdf553bc-7b19-49d2-9aee-778cf8828467", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:28 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "1fb46ac7-59ab-47e7-9788-6e70064bc0a5", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:11 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "6999e81f-6804-40a8-98ce-99ad13c06b4b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:30 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "9c0f6a10-b510-4bea-a3bb-21cf5e228c09", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:11 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "a48dd07b-49e3-4533-89e6-7a77ea233ee4", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:33 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "826", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "793978e7-f704-4e6e-8763-78730ac78b89", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey7\",\"deletedDate\":1561363815,\"scheduledPurgeDate\":1569139815,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey7/9dbcf6ff3e704171940353bf7214af93\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"og4GdBQTcmljuWdSP-1kkJQGv69lUZ_t_icfE8KukTIKMwKJQMzxgy2unlTJc0JqUqLQxSo65tVw_tR5Mv9-l4cUq_sY5aDBcfVD5YP17DLUp2wAxGg4v_BHaPuxcYeqIFApWIX7Nibo742gZPAkZkag-U26PTgNxdRKWsHJ3p-4GQtVG7Qd7NsBcSm9vq-Aaoce93qUzTDFWa8ObfNK4aCDymZ6dArzcCKaZ7Qj8kObUoe6I4SPz4BSCwFz5JKoniYaxXUa8oidhL15nc_i5oxR_BYhL1mzWaqiUAS6Gaz8OYHShGh6F28YCOV5e3UrCYDxWfbRYAqYgXWRDaLBJQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561363806,\"updated\":1561363806,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:13 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "800", + "x-ms-request-id" : "a7164ce4-6a5b-4fa0-af06-0b6d35b1358c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testKey7\",\"deletedDate\":1571886113,\"scheduledPurgeDate\":1579662113,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey7/6192b69238054d2ba0f7b429bae5c87e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tbIGu502kWmCKsAb5HgUerC0P5NHPWdcPMUqSSKebZx42ELoxlgpozLr_XN8X3XStp0G1oAWHdviuDC3hU9hKGJ-RHqy_wdclbYiUlocVwBnVr2M0YX4_-YjTExgoSzQWC8R411UOR_kuMFv7uSGe-VGBTgBULrQHn9kmrputNUuUCNYZeHe1HlKoroWGqUrq8rsf0b_UaA21IIkYiF2s3bTmf-T3FeBKYUm2G2fb3x2gOkXEwsCqFsfwRelwfHh-eyBSvMJYcYTxY40nTFynB7EcWScKNoIP3tL6b136io4WkKmkRmWJLhU40nT2cwnC0sbSFH9PxpjtuQ-iosJIw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886113,\"updated\":1571886113,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey7/recover?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey7/recover?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:10:33 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "684", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "2b210f45-069a-468f-8dec-1fadd1068e5d", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey7/9dbcf6ff3e704171940353bf7214af93\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"og4GdBQTcmljuWdSP-1kkJQGv69lUZ_t_icfE8KukTIKMwKJQMzxgy2unlTJc0JqUqLQxSo65tVw_tR5Mv9-l4cUq_sY5aDBcfVD5YP17DLUp2wAxGg4v_BHaPuxcYeqIFApWIX7Nibo742gZPAkZkag-U26PTgNxdRKWsHJ3p-4GQtVG7Qd7NsBcSm9vq-Aaoce93qUzTDFWa8ObfNK4aCDymZ6dArzcCKaZ7Qj8kObUoe6I4SPz4BSCwFz5JKoniYaxXUa8oidhL15nc_i5oxR_BYhL1mzWaqiUAS6Gaz8OYHShGh6F28YCOV5e3UrCYDxWfbRYAqYgXWRDaLBJQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561363806,\"updated\":1561363806,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:02:12 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "671", + "x-ms-request-id" : "4b7fb30c-dd2a-4f1e-bbca-5db4ede53a53", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey7/6192b69238054d2ba0f7b429bae5c87e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tbIGu502kWmCKsAb5HgUerC0P5NHPWdcPMUqSSKebZx42ELoxlgpozLr_XN8X3XStp0G1oAWHdviuDC3hU9hKGJ-RHqy_wdclbYiUlocVwBnVr2M0YX4_-YjTExgoSzQWC8R411UOR_kuMFv7uSGe-VGBTgBULrQHn9kmrputNUuUCNYZeHe1HlKoroWGqUrq8rsf0b_UaA21IIkYiF2s3bTmf-T3FeBKYUm2G2fb3x2gOkXEwsCqFsfwRelwfHh-eyBSvMJYcYTxY40nTFynB7EcWScKNoIP3tL6b136io4WkKmkRmWJLhU40nT2cwnC0sbSFH9PxpjtuQ-iosJIw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886113,\"updated\":1571886113,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:14 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "a91b6445-bffc-4ab1-8677-84d24275c046", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:14 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "50c57dc5-1e53-4d8e-974f-f10cc33106b0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:16 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "9eef3664-021b-447c-903e-0fb5066cb8c7", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:16 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "f0f0ef7f-8042-49c1-a5ce-601f49a5e3f9", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:18 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "f1f88a78-4af8-4d6e-ac05-5acd9ad548f3", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:20 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "a4fb6df0-0693-41f5-9bd0-abd9fc98a5a0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:20 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "6592dcb7-5ad8-420e-a32f-381f2eae8e06", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:22 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "bbc2489d-da35-4730-b8a4-d597e8e1441b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:22 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "c22c4278-0c32-4cbb-a4e7-e3863660676a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:24 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "67187645-2693-4d8c-96ce-5c39e20e5203", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:24 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "ff78345b-8209-403c-b74f-38f6078b4530", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:26 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "c4283acc-781f-4e0a-8fcc-95e462556d98", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:26 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "50978d24-58a7-4254-93c6-c7172a7ccbd4", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:28 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "c24814ee-c23c-443a-8447-a87e9b2b5fc4", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:29 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "769d941d-c0c7-451b-9834-bd326fbf4727", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:02:30 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "68", + "x-ms-request-id" : "f53f0e52-2908-405f-a3f9-c5a738a4efaf", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: testKey7\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey7/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:02:31 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "671", + "x-ms-request-id" : "3d2de5fa-dc03-4f44-8c35-e4db2fe2c256", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey7/6192b69238054d2ba0f7b429bae5c87e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tbIGu502kWmCKsAb5HgUerC0P5NHPWdcPMUqSSKebZx42ELoxlgpozLr_XN8X3XStp0G1oAWHdviuDC3hU9hKGJ-RHqy_wdclbYiUlocVwBnVr2M0YX4_-YjTExgoSzQWC8R411UOR_kuMFv7uSGe-VGBTgBULrQHn9kmrputNUuUCNYZeHe1HlKoroWGqUrq8rsf0b_UaA21IIkYiF2s3bTmf-T3FeBKYUm2G2fb3x2gOkXEwsCqFsfwRelwfHh-eyBSvMJYcYTxY40nTFynB7EcWScKNoIP3tL6b136io4WkKmkRmWJLhU40nT2cwnC0sbSFH9PxpjtuQ-iosJIw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886113,\"updated\":1571886113,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/recoverDeletedKeyNotFound.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/recoverDeletedKeyNotFound.json index 6b35769ada9f..decd2138bdbf 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/recoverDeletedKeyNotFound.json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/recoverDeletedKeyNotFound.json @@ -1,31 +1,32 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/non-existing/recover?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/non-existing/recover?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:08:20 GMT", - "content-length" : "72", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "3a16a6c0-6ce9-4f73-8546-b84ff25f7747", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: non-existing\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:00:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "72", + "x-ms-request-id" : "881e4c9d-0932-45c5-9299-d684f6a4f992", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key not found: non-existing\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/restoreKey.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/restoreKey.json index 47769793f62b..403cccb8b5f8 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/restoreKey.json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/restoreKey.json @@ -1,298 +1,673 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey9/create?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey9/create?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:08:29 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "684", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "07099c9e-7f4a-4948-82d4-423ed7ec43e7", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey9/26cd12397be04a2e933ee3d7e8ba4570\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"yalxhcwqX79a6i8gXucFY0Gc5twq1Ew74_02BTAuTwdrII_rxoU5ALdRjW2oulF8NwwzNyIFm744Psfl2gOBf-sEJyNhueV-LDr3uAmkfDOIfcFmKuhNWTRPzBVXUlDEldpOgjzQmOkdrhnRGSpu0zB5v4_RONjp4jbtCdK0i-Ta5lHiQQY_9zRqUBbGttAUejeWA7noqWuLEnLq-nZcpmHFXMTI9cG4Hy5iVTFkcDVvlV6oPgWG22q-NG9Zn_ooRPMYw3mM4-K-yStp9yIMxYLgkSRO6tY2iFJ8wKUcobkiS72Aa6fOFJRTVLKkUuAYwQgYJ65ZmhW7fAOBLjJxFw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561363709,\"updated\":1561363709,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:00:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "671", + "x-ms-request-id" : "ace71f04-d9fb-4f95-8a6b-991f94f342a0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey9/add39d0bef3546148d70e6814db305e4\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"sqdbIk8KTOK_m5LUUGN33aFJk2X0FecS6EtnVbJlr_cwXs8NY9AWKUkVDOFvNFhbSEL4FK8uPKvyueZjW-IhRK7rj_9fZ47C1aVetKBsiKgJvjTsFcp6kc3E_2a0ANIM-PjkUoz6J6q7S1vFgejsID5GO8IypVsUHqRq5eTgvxzdPmkRS43Q60GLIyCfn3AHdxWCzXkF_DAUeYKbPyl3SU0Zfr58kDm1JcuT-ZMwGlGwym55eKI5w1v0WCZghOsPQFyVERNeWUk0oHFK18eDyiioBq8jkqSz68yCyqcwWPDbI3in1vbRW8O-DqY-5jX7msk7Xh5FdI5c2xN28GugQQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886032,\"updated\":1571886032,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey9/backup?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey9/backup?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:08:38 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "19710", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "3fc0a2ce-7f02-4b3e-8349-173a67e8c25c", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":\"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLnBfdE5HRHlscDJkaXVWM21XWWZYY1FKck8wNklhSjRFWkJoRzJxdDdpTU9tU1IzOUxOYnhsZWF6RFFpcWZrbGNScGV4SEZqWUttYTZhRHEtSlZvXzlKc2ZsOFBNeWZXUnBQNkFvYlk1MTM2Wnh1UHBlTVg4anl6aHdpUVluaWZNNlBDazJHTkRzaXUwM3V2d050ZUZCM093aXVhMkd6NXR0TGl5U2lZdWNhbFpWeUZndjRRcmdYc1FVWVNWQ041VFQ1Q3VvenFpbmc0S1licjJDaGs1V2pPcGlaeWlpYXFRYUdFR0lROGhMc0JMM19US25iTV9UX2dzb01DUWdLcTVmTHQtRzNiMHlrQ1pJYUJjWEc2eGx1cGg4QlJXWW5qcGtseXNobVFVMW1scUN2STNzQlJHaUY1MUF3Xy1oRlM0dW9qbHRLLVN5azIxVkh1ZkJzc1FCZy5YTGdZSElvbTFlZnhrQWpEQU9LMWJ3LmxiVUdFRUt3TG5SNW16U3FMbzl0cnhudko5M3ZhbkcwNG9Hb2FhcjJfNFB1Mks3NFBzTlhoRVhQcUVKZUIyLXZMck0zZkdiREFBRjlYM0tza01ITkE1bUlmbTdYMVQzME5IWTlUYWFGYWFXaGpXcUVxODg5VEpkNC0zSXBpSjJVMHNfSE5ubDZWVDRUdk9yTFZQdXh0ekxOeHRrcHBPdVowTjJSVEh0ZVhUVklPa3E4dDhWOHg1RFdwWjh0ZklnaVJ1dmkzYjJrUnVrQlI3X2pwc0E0RVJlUi1TMWUzU0Y2WFVaYWZzd3hLSzZpS3ByVlBldnlGekxzbWYzbnJxc1doTkZoTldhNzdjSUtneGc2SjVsakIyeWc0TFQxeklmNWFQTWMwbXNJR3BSWUI1aUttZ1ROeDNTeVFCV1BHMXRZSVlqcHVOUS05cGthQWFrWGxCNkdBSzYyNDZGOFA4SnlMNGNVOGRYN001d3JVT282WWxvZGM5V2NGZ19wWTFiZ253akdRV1FxaFJkbE1SZlhlUnR5RFlTblZXZW14bDM3WGtmR3RpdDZEWEY0bGR6S3psMWZRWFp2cDgwWUFOMTZGcWZPazBfNTNCVDdKN1pQSVY0OVF5cUJUbHU4T1pQMzZDaHpTOERNLXkzdmZ6WVNlZ2V2U0RrT0NkdUY0bmRyMlF1a0YtT241MU1OcDh3aU5YRE5zdFFmV3NwWWh2a2JYWlJVYkxLRkIyeEJSLTNHLVhVQTdNZTNmaXJYX1dzdjBhT290NnVRSC1ER09EUEpvUF9UX3M2dWpyYUNlWEVoNnVQeVZsNlBqemIyQUN0RjZyNF9QUUU2Y2hJM3A0WkpZaTBfcERod2hGRkNoVWYxd2J0OUVlc0g4cDJVSWJLcmhQZk1qUVYteVE0NW9GN0tlY3MyXzBJakdKUnZxSzRlV1dBYVJWRWtlSTFqOTZYZXBWMndRWVZwb2JXaXg4QV9aUjY1RU9OY3h6M3BlU2RoQWVrdHN2eW1OVUJXZXd0WU9FYldmWnNURTRCRm9vcFRvcHJwTmNYZUlvdWdmQVNQSzZldnNnNFNiRGxsd2pseF9TTng4Y0I2UjNCUkdYYzV0YTdYM18tR1JRdExjR2ppd2locXJQUGVNTjlpdXIybEZpbm5jOFQyMVNRNVA4LUYzOUFOYmNvbzhRUlFUNDd6WDdrOUgwM3BmS1Zkc0QtWUtvY1U3ZVU2SUdrS0xQeG9Sd19zTE9ZTEpHU0ZfSlkxNmt3MzFLMFg5cUhGTlAxY3BCbFl2cDFpVkREY19kcmRuWUd6VTNtU2FBZFkwNHZYZ0FFTHhqVFdkRFpZRzJxakpkRVdUVUpyM1lnRS11Mm9JRWVaTDJfUllNM0JMSjEyTEViZlEwZVNpZmpGM0psWWVPbXI5Y0NQbDVTa3A5bHpCZG9kRXNCU1VLWTRhanBKMS13Y3BjaHBXWElWNUc3YnE1TTItWldHR0ZKeXowWWVnTzdYZmFTSHJjal9oSGlWVGNLVnNDNHpheTcwbTRMMkhpZzdKUkw5NEJ3Mk5heUxJc3FyQllZT1JrRXl1Zmh3RXRwdlFiU3FhdE9SdUJjLWhBSVdDbGN5UDNhbl80Z1hYYjhKaVY2ZG81RWx6bG00cGhLVmJtSjJjR0ljX1pnVUh4THJWMmxGbFVHQkVDdzNUam1lWkJUeHMxcTEyZEljUGdsMWRhbWtWRjVZTm1VUjZ5UHBXM3g3Q1RPdU5ndW5KVkZDYk41ZWxUb1MwSzh4UG51WlhxU1JLVkZ2emFIRUN2WHAyakZXb1BYc1pTdzVUTzljSl9YbFVkUF9tbmR5YXRoR3dzNlFPX005VnEtREJscGkybFdaeUZrWXV2X051OEdfZTJzODNROHNEZVZSMldWU3JzNXBDTVRXTUFlS2tqSW81QlU3cW43M1NMSTE5OGZGUTJ6b2JxU2FaMzFNeWlRbzFvLWJVSlZ3QnluZE5aNEh4TGo5V1dRMklqZFZmcmlyYnQ2Vko3RG5qOXlpQVhwVU5ZbDdWSkZ1ODl1Q3JodGpCeUIxNl9oVWZkSktXZFh4Vk5qemZ0U2xhVUJsbTRYLWc4V1oyVlpYcFBwN29XVmVoTG1TOExPdHAzN01MZFRGTDNOV3ZTbHBqUGdYZmdqdE4zV0wxclozd2lDLTVTV3dKeGtnR2tCVjZBRjVfUzc3dVZNWTFqcy1ZWENnbTVfTGxMZGJoSXY4a3FaSXlnT1A3elBDZUJnbE02bEpOTHRoSlluY2pyX3kzQ09kdEUyeC1fRXNmMTZLZldmanBJaS1fRVRSRjRnaDRHZ19ucWhfV3Z0UmJOVlNaMlJDai1JQ1ZHTDNVajhXeW9LZmJUelVsUmY4RTFGUmxXbnhfYjNJdHFVZG5FSTIwTk5BSGwtQmJKVzlPa3ZZWTRSMU43RmNQUlJTY09xVHN4NE52akdpdUUxNThDOW03MDA2aE1GaTgxLVRUSEppRFVrV0xxRW9xVzlPblRfWU9qYnV0TFVOUHNQUXBLbmNGOTliX3RicnZISUVHSkhpb1RQb2gycG5RZDU4RDJkUzNFcGZQdDNKcy1vSEt6U3JwamVmb3B6bWQ1Rko1NVZaR3hCMVZTWHRQSG1JdVJxRGxkVHN2MEdkSkd2ZlE2MWpxRFdad3dxM2ZpRDdHUEdGM2lMLWtMdXM3X1FQY2tEQTRseVdQX20tdWdkMHdyWlRlQXNqZjktanpESWJ5QmFpWkhFa2xJc2V0THpNbGJVWTJrbi1Sa3BzRUZGOEtETjdSVV9Sek9BeUVhMjJaZHJkMmZLc2VSaU81TjJScVdCZGd3Tjg2dGk3TXlRTFlRTFJranlqTXp4cldCTVVKOUNtZHFGdU1ZTGtYY08wOGFDRXBPX2VzQ2wxMG9yTy0tU01KYjQ4ZDloTFJ2aFF1eE80dXFWWjkwbWYwdlE3Sl9BLS05S3JmRDlNcWJ3Mml6ZEduajh3d0RKTzBoZjVqa1dTaDhBeEYtZnZzcXlQdXhRVVpaQ24xcTExakUxQWE0TEJLQ3VlVzd6RVM4M0MtdkktcHNsZ2tBTmZNVXNTcWx6Z0hJMFlFd2ZIZEU1V05wbUFDN1NhQWxMWms5Z1BLMHplYnJ4X2NWWjcxVmRRelZWT0JMc213N2VUb1RobWl4ZnZ1WGVjZHplX2Q5ZV9jZ191eks4a1ZOZW1NUEpRSW1VZDNxWHJIX3c5Nm5JRFB0X2w4clN0cUFlNTlpZ2dJTnpLRW04YVFTbkZlZGhuNElMaWk1bWViNmpXMjdaSUZpbXNsR25wVzVBdk9QYW1iMWVRM29vRHVCNXJZTDFFcy1pdHEtMzUyUnJDVWVJQks2YlYtelRaX3ZrQTZkTjgxSnBTMFg1YmpwVjJqeHlsd1VocW1lclRaTmstUy1iVU41VjhDMndOR25kM0Zwck93STAyZDNKeFBHb0NPUWczNVFJaFcwbGNBZE82UC1BOWR5dHZWWFhsdWVZbHlIdDFiYVZ4N05vdk5iaDQ1RDBXMXg3cGd3WktObWxjTDhFUDBtOVB2cHJfdFBIN29kc2l4b2pEM0lDY1BjeDhveDBybG1zaG9pNmZsR0VvcnpPOVk5OF9ySEtkZUZ2dEZwbWxaS0NmaUNOaHpqVDVaRC1IVExURGd4c1BzYU1RcU9aWlRpck5wQ1dQdlVBaUlqNnBmQXpjYmFINk8zYjN2UmhZR2c4dGV1blZySHRoX3R0NW9PSHp2QVN0NnFNZERZaHlRRzdYUUhkNFZlQVVETTA5NUJLdVBBbzdqT3ZVV1hnaWthM3JpcUk4OVNaU0xoSjZKT253X0tZdk1VUFozYkNmMkMyR1M1OXRtWHkya1lRazJZSkMxSEJERFMyUHhBcDNlNUc1d3FKeVlxZGR5UUJNb0NpQnJzd2ZpWXJRUlIyZDNPWTRvekZaM0dtNVJqUEx0RTVMcWt5dDlEVEVWd2s0c1ozVnhUc0x0bkRYQXgyTlRPM2pMMDNWNEhLYTViYjhWelA0ZHZRd3Jua3N3aEwwQjl1ZmFvbV9OQ1NEbWhIamE0YnMwQjlyWFBfOUZURDdiNnBqUW9HNDZqWUtIWXhHTXE0c0lBT09zdHZDT0VDbWVHcXlRQ0tXU3RkbjVjNzdVTkJ0aXBCWk8zclF3MERfN0QxWlFJZkFjZDhMZHNuV2JKVHlCYjR0UnhyRDZVejJJV3lTQk5iS0kxQnh1bmF3dUZwbE41SmluQkRURkhyb1g3U1Z1MUZnUXZvNUcyMzM4RjNEa1J1ejk1Q0RDa3EyZmlvaUNUd3EtNTVyMDZhcWR4RkNqX3RWU0l2VkZzNzRUUExHdlVSZ1FBcnRhWXpGT2UzeWxKMUF2SUU3MWRyWURWbTVobnNYNGY5Y2k2UThuNHFSY05ZZFhvZjhOVXlSYTNXLWJQTDRhczQxYjRYbTE2X1FWaEsyNEFrN05lS2x2Ym5KTkZkV01vTXBNTmpnU3E2Q3ZnVHFKMEpLTWZHWXJJWEptbFdJQzFpTTFmdE5vMUYtdGo5d1FyQ0ROT0NJYTRuenp4MzhUbUlWMDhfSGZCSExMal9NRkFCT0xhTm1pX0ozWWtmTmdsYWpGSW9jMFV5b3BwNmw4WHV6VEJaMlNiZ0xkY0lZM2F0X1h5V3pKcWFvaFNKOEU3WEg0bkdkMTRLcFFHeTZvc0s3WFFwWld5RDFzTURLbVJnVTRCaVNabkp6Q0Z6SFV0NHU3Wk1SRTJ0QXZqWW42MXdjcWlhWGFoTDFXX0dDazFobmJNVDRDa0pIUnpNcWZ0RDhjNFJrUU9TRXdTeml3Mlo3TWZRTW0xcjQtOXBFUzVoM3VjZWRBbGp3ZHh0YmxlcWRVTnF1Y3d0bjlMaVROdDZJSkZIRFktc01FckR4aC1VTmlqLVRGUExNbmpGaEppN3RvSkd3YlU5WWdMVjZYbEJBVU9IYnc3Q0NTVk15eHgwd0gzQW92NGhIajFNV1d5WGlJLUdCaUZNVkxwOVVMNXFRWXFNbDByRmY3bEFTS21kYlZIWW53S2hVdTVsRmIxMUhwX1ZpSVl4OU52eFBMd0VlbkZCeDFQQVJpOGg3c1lhdHJwS3l5N0VuZllXUjUtc3o0ZHQ0RjItM0dBN1hGckJEZFFac2ltZWYtR0J5WGNRT0JGd1g2YTNzeERzbF8xR18yRFJGUUtTMjBIaVEyaGdXVGFSVXNnVGg5V1RRMDFwVXFnRjl0eGthRUtRYkRrRnJWd0hJaG1GX2wzZE1OaEJ3TzUwWVZrWTlucU1HOWVQTy1CRW9wVzh0TlMxVDNMdlpNV3pOdG9TcEIxSUVsN2VjV2U2TlRVU1JEMElLdkltMkZ2TTRVN183dDc3RE9TVnRzNnFRX0JBNjVFTUhtSnlIaVVGbXc1WmRPMmp1X2RrX3JxMmVFWEVfT09Mb05GUXVnVm92RThaNGdiTE1HcDh5VlBPSWFkMWU2Y1VVZEVzbEs4X25FdlBlS3Y3eG9tUy1pRkhXR0FHOVlGcFZHdVQ4LXVraXZab0xyT3hpWm5vaUNUd01rd1lyTUNjZE5NR1JCSWpERUNWRnZJQXlmREdfeVZKV3NXcnRPcUFZVFZwaDFmcmtpbnhfbzMzWEpKRnltU1pYalBDY211QTRDVXB1Q0lyb2JxSG1YTHJ6Y2FBZ2pfS3B2SE5RNzUxSHI3V05keE9zQWVYbUJqeXhuQlpKU3dmMjBuSDJqVFUyVnFHTDRReGNSR3dUZ1JHMGNGUlBUSTJBSzFReWFUcGNSeHY5X25sUklwc2lfQ1hGQlFsNGwzUlBDWlktZ2lDempwaFQzc1FjbUZpNkRTb25nZnNWOFByZUlhUllvbFdObXpwQ3FkWFlRN2ZSUEFyRXkwWkh5amxtNnV4dUM0RlJnbVh5NFUyZkpNZDFQLWp0UVE4N2s2ZlhndlhxcGd0R2JqWXJieXNhTHU0UkdQVnN3SEZmRWNmaFFSUGcwa2s1Z2ROS3FZQjlKak5EVy1pcHlmUXdycXM1eXJGa2ZoLVNVNUU5SkNwOGtQWWw4b2g2LUhTZkRtcmlwS2g4MnZ4eXFTdXBpdUpNNXRDaVNaZlRQb3hmNkJKajlNalFDTDhzT01sbFc3bmJPMXU1ZWRMay1hbG9lWVlwZlRGTlJ0cldLTVJJWnVpbENfWVdEQkdoVGpjbnE5TzVUMmhfM1lEeXhfVnFKOURzbWtlMWxmYjd3TjNpbWdtYmV3SXBKR3U4akl1UG5naDJFME1CVFhnQnBQMGlORnVSQ1hvTl9hZWZsLUFWZ3BzMFM5Y0ZHYkFneGZtMGZSN0htVlp6VkFDQnZpbDJhZTFwZk9xd1JrbnhTY0Zxc2pQaW5nMEF5VHh4bEwtQ3g2QzlGNHNaTUdWaVB3bXVrRjZhbWt0QWg1bkxRTmIxYWNZOEhQZTNBLTFsbmMzQ3JUZ3dMTEk4eTNxNktYZDV5ZmYyYW9QanJKQWR0M1B5YlB6b0RISjJLcUxGdTMzUzVCRHJLWmdfczlCTjRmd0c1TE9mcV81dkxEZWtHeGltUzBBcFFKVExjbnRtZmIyQk9vbk5oM1RYSElyVmRfajVmUVhxdVo4OUJuN0t1dENxdFgxcTNyZTRFSHI4U0FkUUhwZDZINjM1anBrNFRoSFNMSU5kWFN5VXZkQTVHRklkbjFPaGNWMWlyUlVoYU1NdTJVS0QwMWRDT1NwM1IzdmFVdGtGelVhYzBnVi1LNFhNNGI1ZjhQSUFENWNkcThBYTVjcmZ2bUkwemRyX2JpVFJlVjhYb3NjS3B4ZEFKSVg3dHJVTVQzMWp2NGNHYVlVc1kzWURuYlBKQXJsWkc2NTR3U1MzMDNzRjJpa2FMZlVIN2xTaGVCMnJzeWRvYXVldFBkaTl6UDI4S0ZuTFBsZWxvcEZpRlkwTldVVzdpTWw0R2dCeGwxVlA4UDNhUXpzMG1yZWlNWWF3d3JkUlA5ZE5NaUJrM2oyZTBzdGNTTWcyZC1WRTR4TngtZlNiclNSYjZmckk0U0d0UzhZLVpzS3FXR2sta1VuajI2YnVrZWpkLWRpQUd5ek4wbzNMVHVRTy1BaGpna3NGUGR5MEJ6cG1NQVpqbDk1ck0zSUV1SVV5WEhwX3NWTG9oM085VTdvbURZODJNTGRsSlB6TXUwZDQ3OF9uaHlBa09wZm9pdTZwYnVveHNMUEFXUjFrWlZiVExuUU5aMFZfYVhETVRDdkQteTAwaGlLa2lOZXI3OTd1cmdiMm1UaW5BUXJOWWxCR19vRlNMLTRCMkN4Qnk0UXAzNVNDOU1BaE1qMjBSREZTZmJZQXhkRmpHQlRRZzhtSXB5ZUtfazRHNWhXNXI3elpCWDFFVkFqZi16X1F6eHJqU3A1SWtZQ0xxX3lyaVBMR2Q3TERYUUxWTk1JakZqckU3UWpINllzV0hsb0V1ZHlpeU5EcWplcF9kRV8xQldRamg0eEFyZnJQckJHV05RNnFiM18wYzlPSm5ZN2VMZG9SdmVQQ2F5anhIR2M5OFJpWEVGUUZTYjc4aWhzYU1CcmhYdkVMaU8yam9sa3M3QjQwT0YyUDU5VWhDSkZsNFNWUllSN0hDbWNnZ0xnZTJEUlJGUHdzWnFvcmJjN3VJZG52cGlBd2pIck1xTm9zN2JWTWc2YWczRENZTUlDOGp4cm4zN3NodlhfWDdBVVd1UW1TeGNBNnNMNUVfWGtqSlY5RXNLRnJaZy1hNVQyQ1NMVFY1eGtuV1FVSVZJU0F6UFhuMWw4TDJPRW91YjlaSk9MSnppbG5zUFAtX1ZYNHQtYThSNUk5UnhvX2taVER0dmpNWWxGMFFjeHA4Wk56eUFhSlNPdV90RUxfNmJrXy1yb01Ma090NjF6dVpLSFd4dUgxa3pDRTNFOUV6Ty1hUVNDdU10QlAyUEI3b01IUXN5VWxIQm9yaG1LQ0N0ME1BUEZSYkFPYmNNSzR2ZmZSTXo1UzRxcTQxRjVQUG9DNE53V1ZjR0RmYW5YUHpiZ2hhWlNEWWlEUGZjTDBhX2FtQmZSSGtPclVESWZzQVBQb2ZBZG1qMjdLOHpWcFdTeXNPU3l6bk83SHRiQkVmQlM1S2tIMzlpZDExTGx6UG1QS0xjaXdHZTNPOExVZmtpazg1RVg3Qy1XRE9EVmtZZ1V2bllxcjduV3pyQmU4Szd1eU9NZHRmS29ZdVhPamdNYzlzN3hZek9pR2RfS0F6b0VjemwzSWFCMGN1TEJWY3ZUQlJKS2tSeFlvWTAyWkVLM0F5a0RnWVJFcWVDOHZvWFQtYXNTMzlkckxBX2pITW02OHRRdVI0VndGZGhZZkY0TUFJVEhhazI0ZWpyLUNOMllGQ1Nwc2xXMnd6SkF6QXVfZURTUWg4S3NBakNRaFpkODRkNHQ3Sm5JRWJCbFJ2NzhpVlE1bFhVLXBPVVB5QWZIUUMwRXc1N0lUWF95cWdxZlB5eERwaS14SnRjdmxpSEMyVUt0SFN3YWtiQlNGV2cwRS1aX2N6R1lJa2liSFBwSm5IckZaQ0xTZzFXamJyVFBoOVBhSUtBWGw3MlhqYlE3bzZmVlpxeXpWR3VETWhnaTFiVWtEMk95V1VQMlFZWU93TnBCQ3VlVEVPcFIxSkRmR1RPVTRKTF8tLXE2dHhGNHNWQ0t3d3lKbko2Z1R2cjBGTUg4V09VamRHd2NXRUNHZFlOcE1XQV9IYmxlV0FsT3NxSktPbmdKQnVsaWg0U2pkLVRzS2F4R0g0bmFXYk5xdjRuRl9XaEQ5WjFFalN2dUNSSUViVUQ3RmxOOWFVRlpHTXpQVnpwSTh3aldoVEpxRVhFUmhHc0lKOGh6Um13aFRmVnNoSHk1V2lleEh3T2dXZE44WUtTLXNBSmNaQ18zWk56bGVpWE1jQVp3MzNWWHJvc19RY1I2MExOMzhpdGxaclMyejFmRUtIQV94Wjdjc1NYQ2JxT0dWcnJuUEgyVTZIUzJmV2xzOEpqc0JoNDVsRDBQN3ZCUkdSMlVaOGp5SkpURk9lZ00wc1RZRlBNRExpSV94eFpQM09DNEJpbFk1OHhkTU13M3U3QXYzcWVJbHpsSlNrdTIyb3JsWXIxcEdlWGJUX1pLT1Z0ZVg2SU1iUTl1ZEgxZXZ3WWlPaTJtRDNlUm51cFl0TE1xVFloTVdWbFY3OS1NNU90OUdab29qUTVySklHN1RPWFZyeDFHS1IzeDFmRExPRzUtak03NVpkYldXTjdmbmo1VW1va3dLaHpnbDdRRk5GRUc3eU9acHNmcTRsTVJnWURuYVNvR2NMNllJR1BkeWdfOEZWdi11LTdDVy0tN1JOOG9EUXliT2dteHFhZ2ZFajRkT1RSSzFYcDVoOFdERTYwU3lwOU9DS0FUYjUzbnRadlVmbHBUSkx1SXZpSldKS0Z5Y1VHX290b3o0d045SThGR1UzeXAxNDdGeUV4cHUtWGRKLVVQcVVWZEViVjk5eW5xdXJoM2ZrM0l4WWVUeVhCVlZHdWI1X3Nqd3hUOS0tZ2FoVEk2bFdrOGNlNnRoZWZmalo1U1FVS1hSUENPS0REUDZ1QXNYckhQbkhjLXR1aDhtVjBwMVhqa1UxVUZTM2Y1aWpwUVE1SHNlT0prV0NhWWVuZHZyVWxOa29BaUVJdkpMbk5VOWhOd0p4Rl9zaFEtMFUwaGVrc0VSU2l3YThoNzg4V0pMcmZnZG9GWlJjVmN6VnFLYkJZX2FwS3lsdG0zRW12c2lHYXZUZVdNOXVYSkpwS3BrSTlLUDRveVZUUlZJRm1tNUxrRDdwd2JCZFktWFNjX1RENmozd0pqdWVWWG9FQnZvNnhaSEpxNzRMR0E0dloxcjhrNGNEOG9PTnJLTmlEMmpDYmhpdnFuQnh0REVHM0J0VmRFZWhZQ2NnTU9ldFVVcUxTX24tdExtd1I5ZlhfVmMzZXRGUmkyNHNNREFKckJ2ckYwVEF5OHNCamF0QTl0TjVWRExpRVFIdllXdHNodE85T2toQUFac2didjZUcGJpOE1DV2Z2S2kxLXQ5WXptOUtSN3dobllMOVV5LUZkRm5reDBqR3FfYjc2REtDV05QT3lCUHlNVkZ5cS1kd1RfT1F5WVEtM0hBeHVEemd6cmg0d0dZQnlCazBLTW9jcWsyS1RCbEZjS0FpSF9UNXQzWlFZN2dsYnQ1SG1PQ3FJakVFeEZ6NmRYX09WNVpzTEpiVWZUWGpYZml3YzdjUjZTc3padFhmRWZ4M2cwOW9BaWlaTzNpZG0xVGVsUnRVdjBzMzZlYm5scDA4M3lGNHVDSUduaGVsSTJZUlNpQ2JISTJnN2UweWtDZ1JKV0JlaXRxcUxxS3ItMjlKNUtmbzNRMHdVYW5ySkgwZEpHNzBILW9UamlCWm1rR3lVWjhRSVdFLUFqYWZrQzZtYTU0SUc5Wmx6OHFMZU9YX05YaTcxdVBUMnMzQ3ViVTlycGFWMURCUDd2Z1ktc1loWmJ5YkJZVl9ManpGOVhUWUJoSll2dng0R3dyWng3Z1pneWZha0cwWlBYMHZ6X0Znd2pqd2lyNkpVR2w2Z2xnWjlrSnN1TktpbDM0NEtNTWVYVFdHNE5FbnNhTUZsbmZKaEc1VXNSN3hENE03MXNZaFNJSlUweVdKQzFraml2eG95US1WS0VXWldrWEpfYUxNcEFBajhVV1cwMV9kZEx0b2FPZnp3cU5RbzJRUkRGbU5zTlE5dWJZeThZbWZzd3lUQmczS0NjUS1TclhaaE5ScGdKYTF5UE1RWklQX1gyNmQ1Q0I4bXYtN0d4RU5hY05tUk9EWGlhdTlKRmRIR3F6SUtseDNpRW1sVDAyT2lLLTNVaUdDanRkd3c3UzJhRFB2ZlotNDgyYlV4V2ZSLXNmZmNMVUczeHFnR2ZCMzNSNlNQbURPbzFraVQtRE04dlRCWU5kbkxRaGRtVm5tUGg3QlRFdlJseHp3WDFpRHhVTEk5b1dwbnptNkJFMFJFRFNZc3ppZjNDaTNCeEFNejJFbDVXVDJHc1Y1WjBlcnpaUDNkWmkzSHExem1Pelk0anpqOEg3Zl9xR0NvUDBoMUhBLVVfaFNwbFVoZXNmVTd0YWJ3SkdRakNYWUFmdFZXZ3REaENOZks5WmhIYU5jX1V4X05PeHJ3Q1UtdlFkU0N2TEl1QlJmOTU5cU1fYm9hdVZtVE5CUVRBUHlVbUJ5dk5VQkhsUEp6S2dPdks4YXdlYVB4RDNyWGRvR0VBVVpFVk4zRDV5dHR2bTFXeWdGbFp2WHM5SzVTelAtT1FfdFhlVFhnZHk5VDdqZWxqYnFGeFo4am9mVGhiNGVFYldIOFdZMnN4b0poSXhoNXpOTF9hR2llV0UzYUl5SG5FcTNNUnY2MTVJMGJnSHJRV2hwcFg4WnA2T2R4bDBaZDNvMFV4QzdId0wzYVNJU2Rkb3dEMXVqSl9vdlBYQVRrVDJnb0wzRy1GSGRwb2haQUhqaThXSDY5M0RnTmJPeGt2TGVQOFBDX3ZHeVNrWVZ2Z3Fwdm5XY2t2WmdGX0prQzVlWkNMbG5aUEY1Y1NjQjJmazZFdDZTbTBmMW1yMUhlSXhUaG1vZjYwNDNPUGFBbEdLdWhtdWpvV1VsbzcxWEYxMmh4N0NfQ182ZklYX1kxZFg0VFFpb0R3aHVfTXBfXzlqYUR5TDE1UEhMcngtOXFLNkw5aXlOQ0dVTl9hajcwZTdic2VQU1Mxc2RVbXhxR3Z3Y2NzVi1FT0FQdkF1aHU3MTNpUU1OOERmQUxHekpEQnpjUFRjT2dwVTBxOHRhTkFoWjRjYWlrNHhyN055MTBoODB0T1pIaEM5WmRhXzVZSTZQYXpxeW1qTkJEWWJ1MG5IMDVTWXoxT3ZYT3ZPNzQ3b3lzNDBmUWNJVWptTGs1WHFRcC1rMUc5aWhiek1la1pNdkMxcDkyeUNObDJHbDZRRldMRmRmUGFPcEpnS0dCSlVWMHM2NnM4X0JsTmpXSkJEWGNHU1N5Tkp2em9kVEZDYmU4bEpQU3M1Wko4NjJDaWVha3JDZmF0bWhiMXR3MlR6V1UtUkEwM29FTGoyOUFBR1ZHamJSclJIM0RZQ3RmUmd3ZzM4Y2xVVUNSZnh3Rndadm50UzFZQzNzcGFmbG1iWlR3dDgzSjFGUmF5dmY4SElRZlUxa3FVcUdUWUFVd19jMEljcFlhRlhHNnJob3E5Yk9qYTRNMVJpTkNaWi1ncU5well4cmlWQ0NZS091RGdSMWRIY25heDJtalFtNVU2eFp0eGM1WmpBMEZzMi1OckZpRF9hWWlyQllXZWhDa0sxTFpuYndSSElGa09vaEV5ajVXZndFQkpjUEJWbUI0VmxQckFycUUtbTNqcG1LNzFZalNvVEVPbmpQdDYxQlRYVHZqaF9yRkFHaFJxZnJ1QW82eHozZDNva19zSm9HOGRSUHJGbVBvZngzOHVXNzk0V0c0cXVrMHBud2xpLWpYNm1TdFdkSW5XYmJsSlJOUHNtVENRQk01cl96aTRiTFRBdGRkYXFpZGIwekpOTzEwMzJyTndBenR6UUY1cG1tazdpOFFHazNLQXpiX1o3R3VjZXdWelJpUUNTbmx0cHY2R25Jaml0X3RKa2QwTzkwSUJZaDB0VlAyeGNULU04N3RaLXpLcXUwMzZXMTdIXzctREFnc1dZLXJwNUhIZVpiOHBMNGF0TkVRd25teFJIT0NtdU5LRlliUDRNa2NmWkhOVXl1NEQ1NURiVWhmVHNBbURXRnBXdnNzRVV3Z1huVlNVWFE3M2ctMFlsYVFCczFCajNlQ18zY2JKWFFmaW5fSzZQVmJWNGd6TzFXNU5aOFJsN3phSVcyd1BxV3BDcGExRHZ0NGRrbWZERlJzQ3QyQ3VMQlRQeGFwMUFDT05hcmVHVDc5U2Z1MHpKLTAzdy1qd0ZvWDQ0bTNjVzljNEo2clI4SVo1cklpa2VMUDVvSlNjam1NR1BmVWJHUE50VUo3VGtsalhhVzNyMUhoLVdvd09VbjBfRVNaRGF1V2VXb2FjSXhFcXhfNWhtVWlWZU5lNGpSS1BWb0FMNFE0bUlZeExzbUdjejVLOExTekhKLWtodk9faGRnM0VCNHRKSDNhTFdLSklSeUNfR1llWERTQjhhNjlQM0V2U0l3RGM5eEl5elVtSTJJeHhfWjBhMm9NLTQwRXduYk9lTXVsVUgyMnNxRVdfSkY4blJnb09EWGxfdEUyemY3ZUdnTVhFbTZEcG1vVUpGNllLNkNPMWozcmRWc3RSalFIRXBSOWFDQ21VREZJZkpSYzBiOWMzSWVNN2VFel9zWWptc3gtVk5wWDQ0WE9WNU1oRWwxZG1fbW5kdDhFdW4zQTY1b1RPV0VwNmM5VXBIV05KajJQaC1UaVpFZUxPSmUxVmY5NjNzWDNYZlhBYV9WRzZzWFAyRVRkZVhFNDhQNTlvRFBOOTB6NldwaVBQTGt1a2Q3eG5kV3hFZGZWYjd1TVZEUVhRclUyR25SZDlKZjlza1NqTk03VFBteUxQZ2dsMFZoOV9DQ3E0ZDJFdkpHLW1mRmhZc1g4cjIxRUhQaFFCSlMxN0RfUDZTbW83NTFZclBhaDgya2JYM0stVTRwSlYtNkc2b0RNUFZpdzR2STIzaUk2YldlUVlzUmxWVXpFMzYtQk9RaEV6NjJuYVQ1YXpNeklJNXh0d2VDOEtjMkw3TE8zN1RyQUdWZzdiRWFzQlZab1BuZUxsRWR2X3lMWXZGMVZudWFUTFJLX1d1SUlUNXl4MDJHdlVhcUJ3NVdvOFlEeG1PSERlTUl2UGo4cVg3ZFNSM05PUlBidVdReGEtY2J5SkdoVnRYblQ3RTU1SnFWSDZWXzJXSFRRYUd5SG1EWFhtOUo1VWMzWEJIWFB2YXoyazk0N0tkWVkxckEzMGN1RmJ2WlJjMlY4a0h0N0dyN1U4LVI5b0YxNDk1OVRuRWkzUzZKakFCd2xaT2V5R1NpMnRqc3cwbkxLTlZUaU5UMWlQcGFabFlJVnAxc2xQRWc4X0ExQ3cwMVdaM2hxNWhPMEFNYTUxc0RCdzlCeU1QMlFaRjU2aTR3MGRRSFRTVHlqUlBqZWxTNGl2OXRyS1loOHFWQjJONFQzRkphNXk1dGhBTXFQTGlHd3JXUDlpYTE3a2RWS0ZXOTVyUmxFYmQ1T1lvSXFWbF9Pa01jaldqeTFjVWpERFJRejF3UHJwWGJPYXVOSVZ5Q20yZEZ3QUI1MUlyc3AzUGNYS0hfZUpZcDJkUnZHU19jcDhoSGNXRE1ZeFNIbEFBWjFuWUlvY1lZZUFROGo2ZHpqQVBQaENXYWZ0UUI3aE0wU2VXakVmaVFBUTZ5RUpDTGpraTlGQ1V2UEFoQ284OXJoSC1MUkM3WmVaNkE5c0dvbkhRdU9DOVpGSzhmRHVwMnBaQmNwNGwyQklnX2xCbWJrendlSG9VdndOYXRxRDZORUVjZ0JqU0xLdmRRNnBVMFJNbWFtSGVsRzZrYVpWN3ZXQ0JDWExNMGlCMmZiMHQzaW1WbDlkZF91VVQ3VUdMc2U1b3NfeWRtSjVWS3J3SHJOVjBxeXVhTDhPU3lCcnNtY0FDM3FPOVp6UUZjeGkxaDl2dUZfUDFJWWdtZUpJVk5DbDg1TzE0OG5SX0Y4NkZ0UkZudGF2c1FJNFlIWHFmbEM5cldnZ0VnRGl2TW1jSG5XMTRqREprNllPcHdRQ3I1VW1BZ2swdkRrMlNTYjZuQkdOZDM3dXhIM2IzNXRqeFVKU1hNV2VLZkR2N01vSzRtMEI5aEpZZ003WFFPWTZlUXZiMkI1dm5pb2ZvMEQ1M3IxVUVkY2ljTzUwd3NVVnJFODhEcTlkV09xTFY0ZmVZTW9QM01oRjNRZEdVcVh1d28wY2c4U1RFVGRHWGU3clMxY2J2aGh6cWhHZVRXQktqbHJKak5hd0V0c2U5NGdZLWF4VmRFYlJrQWRrQVpEREZ6STA2VkxRWTc5OHQ2ZTBiblAzOFVCclFqMnR6VXo4ME5aS2VGei1rN29sWXdlbDBZR2tzb1lOaTlXTGs0cVNXV08zMGxCT1FpeXpzNXZUeDVVZGdhUDVfOUE2YVlrcXRQdHZGS1pXcGJsOGtnT3VybmR4ZVVNT3hyMEVsbUp4UXk3V0thZWRJLXVmQzdNS21vUU9aNHNCS2ZhSzN2Q0lRa2tfcU44c2NSdW1MNFZzY0FRb3oxdlRuVW1vWVlZVEcxMmVBU3Z0TUZacC1nRFBHb1ZyNllndEo1dzNpWkpHcjRUTzkxUmJ4cF90aFBmYmJWMi16MXVMejBVQ05EM04xZE1XOHBzS1dad3psN21hc0N6QVhDR3Q4Yi1oNjdsUHJfZ1lBVUJJekszQWFETUVlQ0tCWjNEUzUyMlJJNXY1RUtxdFlDNXdCNXFOdktmcER1a2kyM0ZOMGVhUVJjR1dpMlNUdXRLQVFTWDExVnltcXZLaC11b0tCS05qOUR6MzZBWHNsOEZ4NWdDZ2FZajAzSlpVYlRGNVRvcjlGQkZVUEttVDZnbUZheXpzczhybFA1aDdmaUl0U1FFZGZxd3ViS0xEY1VOaWR0R1ZFOW9idmhEN3hWV25lX2QyR3VkV25KUzVPWjd1bUFWZ0NJdENFc3V1bndLQXk1RGV1V3ZrMTE4YWtmVzBhcUpsM0hfRnFDNDJ6RWRobGVQV0lISmtqVlZvWGtNTkdRQ2RwUjJZSnRxM2VfQW5jamc0ZU9ZdUhNUzVKS0hvdTdmeEc5ZlVjSEYwUWJtcTNkMmpsT1VkUG5KMFZUZjNtM192OVg1UEdLVS1mOHlRV2kybHhCVi1YU2tZQ0I4YWloYm54MTZsOWtERDJKRHVQR05MZWNOY012RTYwQWJQWGMxN2tLamRYc1RDN1pTdzlPZi1JX1FZMzRHUHBadzNkLWJvbDViWklLZUdrVUtiQWpTLUVpcUVnaFdzZHJxd0dDcm1HTldaeE5sX2JXLTNxNVNwQ0hySEZyV1diLXo5ZUJrZFZzU0UyTFhZV0ZTeTlhcmEyV3FZOXp6UVdnNUxJeHN3VXh2emIyeE83bjZ2bDFtdjgtOE5pa3ZFLTdhYkFLUzRsX2JVaWR3YjFzTFo4bWJyWlpmaExzLWpJaWk5V0JLZGF1MTJwb1VTZWtnTTM5MVNPMTRrcDl0ZnFud3Z2QnVwMy1ieHk0aDNhUE4ycGRTT3JHQkpHWjIyLUxEVTRPVTZDLVlUcWZsUkhxSlB4WWV2UUtSRVlJMUZzXzVmaWd0a0RyWGtFeXFYRlFqdGZFOTZOaGhXU0xvVjlnUXR3Q2FVMkxmY3NKdTg1UUxJOEJYYlAzdXdIVl9tZjd3UE45WG1nZS1pdWZ6RzhiS2JWWlk5ZDRTRW5rb09oQlJLaE1RV19oSHF6NGtUeEpYZ0V3VnFqREdaYS1TdHR2eExUTWdEVV9MaHFLZHA1SGhpRmF6ZE5pMXhGMnNycG9ib3QwcXdOOGx5TWFNSW1OYjRtWWk5X19HVkN6SGM1MjgybzV5TUZvR2pOQlZpcng2bU9ubVFRTW5wbE1oRERhT2MtRWpXTmhoaTZxZjFtQ3NpU0JqYTh4SjNMNXZzUmJvalppdFEzZU0xYkZnR21XXzZRdGpzb0ptUElFc3JCX2UxVC05aWN2aVlnZWVwSmNOZWFOdDhIWWJqZ3IyUW1iTVd3R1d1Z3hHbVNGMHRBTl9xMEdBdERtUGlRenpncTh5MUh6RzZ4VTdkUFR0REtQeXdLWkFYemNKSEg1UGRoSDdFOUVjVHladUtBZVFxVmhjekcxX2dMU0dRNHNHdmw3ZC1XMFVpUDVhUFYtZkN6dUVKa1ktNzZ5cUlxVk9GWUhPWVBuTlNpdUFsV3NFVjJRQWlpaEpQUTc3d0NlYV9uTG5BZEV6ZmJ3ZFZLdlFCVENJS2lSTDRfUTVYYllSclVmZks2TnVxMjZJTXBmbTc2aW5jSExqVWhhd1dSTUplSVhBOFpJRmNYZjRLcHpsSHBCN1oxX0ZYSWloY09TOGZuclhMMGc2U2hZZVJzeEZQVnRnTmFYZGpDNHFzU2c5R0MyYUdGXzJseDY4bVdPN0R6UHg3ZVZYcW4wQ3dyQ2xkN2N6TEhKWG5pc2NJUXkyNEZaZ2RJNFBsdHowdEMwUEVMMFYtX3BFM2ZyNzA1SktsNF9SSEpCTVlnV2VmcS0yRnZqMVNjMUhZQ3NfQTJrajk1TFUtX1R2RVFTa2lKd291MXpOc0g5dWJBUjFTeVBhOFpqT19oeTFJNE81dUlFM3RMb1R4c2dNQjJ2TlZILVhZYS1MREM3eXdYZlBCZjR3Z3ZwUTR4ZklhZTZEZklxbDdnTGVtQXRzM19Xbnc2ZXNGZXRsMThNbU5hM3BsVUxxM3pFNTNhdEVDZ0Z3RGZuaW1UMEJyYVBfM2xJazBXRy1nMHBQQVc5dVh6ZXhJcWlhSDQ3aXhOcERxSl9zNUJST193UVZYNE90cWkzelZ4VjdiY3dDeno4dXF0Uzk2d3o1MGYxMEF2bGo0T3Y2YTZLblpBak1sY1pUdVdJeVVyOFdqQmttQ0QxbVlDX0FPOGhYUWVMbnVyeG1VZDhLay1PdjJ1dS1NN1AxdFhESlplZzVCS1RnVHNkeFA2R1pNMWdrYjdVeTM1UWg1UTEtNjAtV1gwZFhsc3pNcHJuY09VWDFMU3dLalU3VGZhMk1PX2dzdllKdFM3Vk41UUR1QkljNDFyQU1xRTNQaDNHRDNBSy1aYmM1R245Q3Z2R0JIN2gtWThxVVo1bXpISjZpeFNOSFZoLVYyekxaQVdfMVlUaXdKRm1BOGwzd1RJZWlac1RPYks3RGNWWGFqME1PVXRvWkNIUzJoOHc1M2RZempIRFBzMWJlS3BZdnhQZE54UXRaeHJIOC04THM5bEgtZjlJV0ZBbkctUUNpd091bTQ2MlRId0x2TFFreGZWVlBzUmlrbjQ5WUo1bEpxYlg5R2Q4aDhNSW1kNU9vQmx3clBUd2xMYU1mUkFsX0JvYWoxaHRPTm1SUGQwaGgzVXJWaUdzMlMta3h4akpSSWNYNEI0ekhuRERUTy1QOUUtdE5qOG1YeHE4ckZyWks5NGJsMmpJbmFIbjhja2ozeTh5d21RQ2I3dnZEc1FOcVYyWG1ISHp4YXZuYXZhSGE5dVRMX3RCbjFfYXh6Vm9KVVFic3Y2QzZhT2xpNjB6TmlzbGl1bk5Bd3JuajFMeEE2aGltTFcwMnRnWjNlS01IV185X0Z3TURpMWhYemhwM2xkRWpVYWg0NUVRdks0am03MHFEeFdiZ2JMOW9JengzMENtZVBjR2NwN1g4Uk9LVGhTLXRFdGZ4NG5ONTRDd2FqelZvMF9tX0hzdm4ta1k4Si1YT0JxT01VUlVNWlV4a3ZVak5kUnRxY1ZaeE5kV3lNZ0FzOXUwUkZxR0pNNkJ2Qzk5NlRkMjR0Vy1YYy1yQVpjMXRFLVVLUTNabmdiVXZIa2hLYXN3bmU4aU9vd25nbVZWb2h1TktGSDRIT3lNX19uUUVFMTRjQm5nUGNEWGlnbHZmSVhKM1lsN2xyRjVxU3NxTWItSFNWd3BHUVpEdGJrX05vVkdsdkFSNkFPMkcyODh4S1RsdzJDMmN2TThyUl9aQjZSbG5TSVJtSHJBMUN5bl9CWnZsZl9PM05CZHRDS3l2dmZYU0NWRVJ5eEswZlBGSzBqWlhPTkVIV0Vqd2pGdHBaSDBiNG5MTzNfQ0k2S0xQcTZGY3BxdWJPV1E0UzdQRnlicGQweEJNTnhXYlVVS210Tmt5R0phSmhnU19XanVKVko3SlhoRHJpTS1jYWpiQXBXMDNLZjJyRUthWkphaDhoWVpGV0sxazRCeEg5NlNOc0tNeU1JaXZFdFRQcXppd3BYZEYzM2tLN0p5RlBVQTIwZEVmcGduWG82VlpIU1VyQXlOR2FJSXc0eHd0ckV4TjhoelEuV3dUckdQMXBMdDdLTjB4NktmRU5ydw\"}" - } + "Date" : "Thu, 24 Oct 2019 03:00:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "26991", + "x-ms-request-id" : "f6ab15f2-79d7-4265-805c-11e806ca137d", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmVlTzlMUDdLWVJIcG9QZ2hSclQ0ZHpWVE4tV0VyZTJETEk0ZGJiTzFxalM2MkxKUDN3SXdFR3BVSlRnRU9USmhWWl9EVmtrVE5YSmNyWnVUbHpaY01CbEUtTmZCSU9ZOXZGZFhwTXU5OEh1bGJoNnFwU1JXU0tZckVTeVJGcWp3M2tsYlIzWnhIOXRXaGtRNDk5QnRXTEN2UG1TQjRoM3hkTmVfamY2djVhb2d3MHNub3kzWWczaC1YcTBWN3VVVldhSmo5VEZtS0hibFp5R0NpazRkSEpUZVltajJUb3RJdExSbUJiUWtJVnpGLWZpSEt4d3R2U3JGeXdGYmlhem1rV1JNUkJJWm5HU2FfRmRrbnZ6d0I2c1FNaDdScXdjUHo2VllteVRnaUg3c0FVVkJFVXZqNER2TmVCX2ZHRm9LUlI4WE9NZzVnWmlXQ1Izd3A3N2d2US42Z0xlS1p5aVVfdWxVczFKUzVGZFN3LnJFNXJMVTgxWWo1SHdTMC1TVUV6cW9mbVl1LWNEZzVwS1JFUGtUZ3RHa2F4OWxOYUpaOXlScUk3VDctRi1LalhONk96VWJlQm5WeW1GU3JWeUFyY25USWVvUERUcnU3bVhXVV9ia0FfU1FjbjJJS1JhX29fLU9FM01PMVNSY01NVUhBT3cxeWFrZll6N3dISnhJM1IxVjNfVXFVWnVsaV9tWmN1eUtvSEtNaS1RNjVmSHlPNXNMdDBDdm1ENG14ZTFGelI5S0RuelJFa204Q0o5dlRzQ0pLbFRWdnM3TTFiUjNnRE1oLU5rRmpSSVRCd3U1QnR5Q2hfMklNaDgtUl9EWUhlS2dDS3paMzZZNEd2TExIU3BLVlBNRldWU2VEcjNwSTBNUnVSb0NYdmhQckxUb3F4a1Zib3ZhUUlMTVhRSEtWcExpRWFkbFZueG5Ub1E3UlBZQ0kxdWNuRkRMMXhTWnJQbnBwUDBFdjRGRDJpTGJXNTNEaHRsejhBYTc3VjNMV0VCN2JkUFR3OE5RN2U3OFp3ZWVVb21xZUhwS0RxX182c1ZjMlFZb0tDaTV1LVhXZEFlRnNhMFBOZ18xSEpEWWpQdVBOa0xHTzFSX01yUzdzNUpLd0VLZ0lFblE1dTRuNTU0ZElGSUF5a0FyRURrT0xKcGQySWd1SUlqTzFCeERiT2xuTGNWc3lwMXV5VHhtY3dxeExmUmFpUDctbXZBbWctUnlyU3ZtQWV4MXRDQWxRNEFVQVVEVXZHYkQzamh3U0ZmTjM4WC1fc19fQlNXMVY4VFFvbGNOTDlEeFYtd1NfUzlVYXlWbkZJOTZ4cXFvWmhUWE53SzQ4bmtiREM4dTFaejZHV1l6dTFHQTUxWEVKU0RSUU5PZXRMMjQ4YnJSM0Nld2pIRTN3MmMwVGxOV0Q1d09Idll6b1lSY18zcExqNTdtcms3clJ0NTBJcHZMN1pybm5qV3ZTT3U3LWVfQWtGM0dCdjdFUWhGVEdhVVN6dnVBMEtkVFpxdHptRlp1NFNSX2gxSUx5TFlvdXp5OGNldWYwVmNRaV9ZSHdKekRGQWNHWGY5WU8xZHdXcmdLMVNSN1lIVzBlaDZ4WkthRGxEUHdWYmxFYUtfTGwzSXo5RkV4WVIzdzh0NXJGTzhEbldQbXE2Q2F0RFVfdTExNndZdERDTzZITDdoTndGa2UzMUxmZVRfWTB1OHpDV0MtQ3RYdkgyN0hhd1J4b1h4LWpjbkN2WVF0cWhXeF9CREpuZWNnOFVXNEozSU4wQW5HU2hHVHZMTDVKRzRnd1FYNTRVb2ctNy1xUXBHUFRsQkRRdUdKTHVaWkhvTGJTSFJOaFFCbHhYWTFFS2RCQ2xoMVlOdU55ZjEwaHhOSGQwTnBSLUxsbmZHTDZrVktTaHo3TDE4ZndDR0pUazQ1V1g4elhiUnZCYW1iMzc4aThmVjlOOGtpeEZWdnEwTzdZWm5pZUtMMFNSdW51ZzBEbGp4VGR2SWxTRkVLU0ZQUzRVczQ5MmVmbEFRZkxKQ0hlY0FxRklpMlZZM2xYUVF0bFdWR0pjYjRFeU5XcWZ0V1MyN0pFLTBGaFh3aDlyd2czbUZ0eFpNN2FEWFpobEdMakRORVJNNGltVEpHR3UzcFI1WTZMSDNwVmJrX2hQSzZpZzhlWjZrajRZNWhMZXQxOFZUcmtOT0JBLV9mSmV0aVZiRDZLUkMtZzlOdkdiSzNlNGI2UDFYZ2dBLVlzN1lHOEg5UWF2a080T2JNZm1wblVBWVJRNDB6UWlaSG95R2drbXpFZzFtaWtEWGdnbXEzS0JDV2VJMHZwVmswZ1UwcWlYRjFxaGZHaEdQS3NMRW5SdDl0QWlZMjBlYzRudy1NMldaMGVNR0plSldDclZsQXoyVnBMWFkxSVhxZVMxMkFwX2JyV282dzlLam43Zm5TLVRHYjlLNEFabUtNQkh1SG5ZSmt5aTZtVHdhUTg4ZHluZGNNaUxqZ2VxTW5ObGd4ZFUwVnMyUTlJZzFhOF92TFBVZGpmdkJwVms4OU1ONFVybm56bENVNU1YWFROTk9mVzRmNVo0aDVURGtmRFF6MHNSVjdHUW4yOEl6SW5tTzB2TUotYTZMVDhIdU5POTZ6alRsSVZUSFgzZndpV2xvbk5VMnY5UExrWVJER21xYzl6VXFTNVB1NnZ0bUVQcVJBbnhBUTFrRTFURXdJaWdVQ3VnU2d2dW10ZFRWclpuQVl4cG1rT0oyRVpZRTEweTFFdUZUV0ZJdm1uZWRPMnpCQlF0MHAteElXbnRBV3ZiTzFoTkV2azBIb0Y5dkwtMjZJY0xfcktUQTRIMzF4Zzdua0dxZlpBS3JhRXlJMElKWEZDdmcyWVFDQUhkejJHZ21EWlltSE45UXNicGJ3MXduQ3ZEakFqMTluU3NNcXNHV3ZEakY1Xy1VeV9Nci1uQWlMSEhlZE45VEJDM3A4d2ZneHYyNkM3d2Z4NTV6SURCb0hFZi1BSlJwTWR1MERvWXdYMzlLUlNKVXVfSnJIY1JHc0FHZ2E3NGZucjlQdjl0Z0FhdWJ5clBqUnlWdkJEYVdGTVFJWk9INlA4YjNSU1lPYkNVRWk2cUx1RVAxQjljNDJid29nT2dRcGUtWGczRlFLc09YMmxyZGdKaVJjcm5meHZiaFctc3NzUzcyaDA4c284OHl2Wk5JaS0wVEc4R3MzM0xacjBhamkwX1Q2VmNlSi01aDloZ3NmUHFrYU1oWEsyRFdWaFpDUE16XzBsUF9VUXdFQkdaVFZSbGdqdGRhWFdiN0ZkLUk1dW1OUFNQNWNPemR0MXdSWEd0ekIxRmFTbU94bWJlVUNCMENQQUhUQjRhcmlfSTVtNTJwRFNvdlplOGRRbmpSQUtqbF9ieHJlNXVuS0RfYngtRkNqSHJSMkVkbEo2Y1NuZmNsZk9WU0RsTks0SnBGMEhOakNFcm0xaG1KRkRhU3FKSEpnS2Q1bzNKaWZSa2VOcVdaSU1qeW1aLW9wSnNxbFBOOThZWWpvZ2dBSkdkaE5ISlRFRlNBUkJsd3kyNHczWDY5R3VzRlByM2FkdnpQdlA4UmdyckdJaHBmbjRKOVhJTUJsZldhazU5TlNaZGQ5UWlZaU53akpoX0RfVzZxei1veTY4U21NYjFmUmZOeGxJTWZDTjM1WVNRdy1CTUZmQVZ1aVhoQTZSVkltT21saDE3dkg0NzV2akNvbnYzUi1ENHh4U2JwcHhxaHMwd2xBTTFjcTRiSU5taUxHcURfRm5EQXpGcUlvcVVSSEl5Rlk4anpvZy1tbktTNFpIUUF3dXB0T0VMaXlnTUNrUlBIVlZFamtWMXh1TDJsekduM29nWlNJX1JiRzNhRk5MR05wVDltVmltWkFoTEpEbmx6bzdFWEQtTk1tS3huQnhXOThpeTBST2ZnaWlpdERjMzB4cnZSQlNSVjZXQmdYUlFqQWFlVDVwNlYtX2VpRERKS1ZiY2ZnTWhOMV9SUnVPUWswb21INmEwcUpqZU9zcFpHeHlha1JMamJsa1h3dEppbVE1Y291a3Z2NjJEWHAyMXZ5Tkp1NGNFeXdwX254dlRZcTNQYW1BWGktT1F2MUhESkZDa1l2NTJTQ2VlNjFpZEdNS3NhOVN3R3kyMHVUaEQ2OVNESk5NT1FaaXVGanpHaWdiMmpEclpqNkVka09xLWhoUzlFMk9qbUZwQ3hQU0FQQkpFdmcwblNYRDhmVDE1dHVOMHFxX3FUTW1LQkZ5eW5xUl9aNlNKVkJLZXFVcVdUYnp4WXFKczRsbTNqbmwzLVJXQVU0VFhIY1JqODY1QVhhek4ySVpjNEptY0htbnl4TExaemdQUWV4bzVqVXBZTUNnNkE5TTQ1OUdPa3ZsaWNhX3ItNkZ4SFczalNyUjVfUWN0QjM5aXNSSFloc0g5V29RMG5YU01HVTNXdFJpOG5kUHAzZ1daMDRscHJWdnZPUFpNaGJ4cXJweXBTQ2U1SG1idFZaLU1TRUxBOWw3amFjQ3ZFQi1MRHkyUHdiaG5vczd3ZE5iRlo5TmkxZXhGanJiRDRBaDlRcjczLUloYXR3SjFmVldHdmQtbV90NlZjdUlGRzBoVU5RUmVhM2J5aVdBVTQyZG05dTR5ckJGdmo5YzRtQTdhVUNiQkhFR2RMTGpaX1daWkF2eUdabFNGdTBWc2cwNWVsdVFyWTU4cWRCcGxTQ2I4WnliU2k0NDUxdHdlZUdDV182MjhqTnN2Q05ESWM2cVE1MGdzSzUwR1lOYmV6WlhiZlpZMVl2cHNfeEVmTGtMT200Y3hQRFhWbGhnWjhjR2hPcjVuREZ0S3BtT0habWhmcXVHV192S0dlZUxGNk9HMnRjMWRVRmhJQlQ5VUMzSUZHekJxeElnRENjTXFtNjhXM1BFUVFwY0tWRG96ZGtvMkdKeUJIUHRGd0Y1cHpmWl9TUjlOZF9BOGZ0b1hHZkdmVXBYVFBGbmpLM2VJNjFERnpOV3VDQmVQU1pUeFM1LVJLVV93TlhXUjZyNVF1VjVtaUQ4V0kxZWRwZTd0YXA5aERNOGUtRG5FcURjbjU0eFpvcE5SLWJtOHZvY2NlT2dIbXVvMmctb0J0SVBRTWVVdEFYRmlmZ0gwUzhiQlVUeGNDazUtdy12UkRQdGpaMVRaY3RsSk9iVTVpMzdjOHA2c2hNOWo5OWdVQ0diWWJVTWlobVZ1OTA5TmV1b0ZON09OWEdjQ0JsX2VrTWxIeDc1aDJJWVk1T0Z6ZVNGeGdNdy1EZHNEQWtlM3FjcjgweEdrbDN1QWNHQXBLX2l0YmRvT2d0Vk9DQjU2MkVEZ2NZWXM5QUg2VTdxSmRNRzZXMFRUZUtlZDZUQ2ZNWk9tYkRaZVdLU2ozbGpRdk9Uc0lQMm5YRnQ1bjk3aEdUamJackdweDVrS0ZRLVFURWlWSlVGYzRudGcxQ2N5UGxjTmlwaEV1eDZPMm85UjEzSDJ4cVdRQXFzcWVONVN6QXVjcHRiclFyTlhoUllWcEZZQ0R2OU5KNjVta0h1SS04Q2xXNGtsbjNxbVpINGtiNEN6SE9rV0EtOC1aRjhmd2FVZjUwV3FxV0N4YVM5cVd5TUUxVENWeFBOeUZvNFBGaEV3SHBwUjlPQW1udGdqV3FJVXB6djBMV0lhNEMwR3hpOXg3T2NkSUUzV1NLczg5OE96N21KbW1jY1c4cWUtNUlzUUVzQnMyYWN3UmQyYWV1SGlmMUFtcDBJRlBoM2FKcDRhc1FheV8za2NCUXhoYWk4eG1vUmtacnd2N2xsNTRhMm1MR2VKM2UwUmtBZGhkYWljaUl5NWNMaHpTZjFQWm94MlVHLVQyNXhsM25BcjJzVFNkZDlqYWRDZWxMOGo0Y1ZIOXZoalE2OEVZdUU0cFBNQ1JYT050aWZ6bWNzREZTZV90OTJ6bUNfaGY3LWg1VUxTWDA0MmJ4VXZWLUxXbDFnRWdKQ1YtcjlvOXhFZXV6WVFRYk5HVTVDTnhaNVpEZHpnenM0eVFkY3d2Tk5maFUwRktZR280dGdqUUVGazRPcmExV3NVajFTMDNxTEwzcFJCRFlYYnhWTHBCaU9tRDZkQVFYekdRM0ViQURvN2R5NWNnQWtQemlvZkRsRk05cWZXRlFJTUF0ZjdmTXlWSGhvM1dmSE9NU0J1TmpIZHBBRVFCcU5xSElsdlBCc3YyZjdLQzkwRHlVQU9CRmc3OGlXN2JxN2c2ajJSV0pMeThDQVlzZmNLTlZ6UTVjdWx3Y0EwdGxRYm4tZWd1Wkk2R3VGNEh3eG5QckdpRXpKbTQwbjdTa0lTSXFHU25xRlVsY0tUdXBsOWNnU0xLNkIyUFFSZkkxT2wtWkdJVEdhN0syczl5dlhZcUxzSG1ZeHdsRDgxN1RrandjVzRFOVpEVklFa1k1cXd3X2Y5Zm9TbG9EaXl1YlJkaTN4U1RsaHNTVkF6cVhxcElBN2FQTU9DdzVVQnMzT2pPallmYUV6QmpQM3BwTWFad040aUZtUGFod1NmazZ1UWVBZEREbmdTZFBzWE05X3VkeXRwVGNxV296UmdEaVNBN1lWUEFQU0tlSU1XaldldFJvQ3FfUVozbFpYNENiVVl3OGtySnd5ZmhBQkd2NW95dEVYTU1PRTR0Q3FmZkQ0ZmIwYUFqb2ltakNsT29TNWhiZ1NxemJOY1pDMV94dUxRRjI1c3NXR2JqMEhZd01xZVI2ZXpNQ1pmcWFvVlB3aTQ3THRPSkRVLUJsM254Vlg5ZjRDYld6N055STBSWktVS3JFOElPNFQwYUxQZWtlYWxsejd1MlRvSWJxXzdFeWJEZno4UkZlZWRfUVRNQTN0V3FTZ0xtcDBFOEZGV01FYm5PaG1UdTllR2NGdlU1SmZGcS1OLWx4YTQwVjV4TVMxcGpKOS05ZTNvalo4Y3FIWGhlQUdvTjhOMXZtQWxqZzFNOWxyOVdEVjZGLUp6bERMU2k2X3dhZHJjczNsNWxkRWtIVGIxUTlSWFNhcV9UQVZnQmJSUlNQYk9YQ0hMelVEWGxUNU9ZQWZZbGthOVVLbGtFdl8tekdiVjhMVnRTOEFabG1lMWJfZ3cwSHJCdHNoRjlMWGVWZHVlWnZXRXBNQ2hDckEwSDVLRXdwZjVqQUJ5LWxUd2pzUWJ5UFFXN3NYUTc2bnhlVVgzNk9vMUY3TF9iSEdNbnNrMnFhaHB3bWIxOEJmajJ1SC1JT2Z1dmc5RFUyQzlMU29IeWdwQl93Q3hOMmt6dDdKNTZqRmMyX0pQU2FwaV9MUDY0NjB1Zm4tRzhRQUZzLUlQeTEweEJSUWVKTk1HbzA2Vjg0UkMzcnJVVDQ1akIxa1pOQzlDcGp1VnBoY3FaNUVDU2NYanZRRzJzUmlxVE9VS1lKZTlCYk1vZFViN0J2V0twZ3VIdVY3UlB1MHd4bjBzNElvU3BQVUZDNzVJQW0ta3Vlc0lpbVpoOE53b3JZNDZ3RzFkc3U3Z2U1NXd0U0RidGlkSnhGR3JTaFpXdGc4SUhDU2pCMzlrelpCaWRObVV3R01HMVdTUnJMLUZiWDd0Y2ctMV9lSGhKYm1FZzZYSlN6bTFkRVgtVlFFTnhGVkt2c3RzMUZkMnhadVI3SXhrcXhzbEh2WnhuZVJ1Wm5iQ0pzTUNrc3NHVnR1Y2ZuU1ptQmItb1dVNGxXaWp4RXNQS3FwdzVCMlN0dDQzYV9qSG1fcUZTZVJBQTF2UEVMVGpVQlh2U0Z4YWpFRkFuczNEaWdjTWhkNjNHY2d0cFNIN1k3Ymg0d0ZFdFhNRWE4TkpQN1hWUUdFX3BQVDZTci1adlFja0c4aWE0VEFYZk5KbjBld0dkQ1pqWFkzcG5mTWdxSGZTNzBBUlFZY3lsWWVtMmJnSW5ySkdxbkwzUURIUUJucmhEMEs0d2VnUDFHdHdLUm56YTZKOHBEckM2Z2dzTU9ic3hETlpvXzZzYUYxMDdKd3dPYVJyTkxKcFdjNkE1YmlzSHVKNEV0cmF6cm5GcU1sZ2NrbWFVWnhLT1ZHN0lhM3FxOWVodFE1VXptT2pYNWhsNjhxcGVBaFY0b2oydzN6Wmp2OEpGaGtsNTJMcVM1cTd2OVlSZzZjVWItV2FFVDVVNk5Ha2NQUHNlMmk1NjF5OG9Wa0lJT0pUdG15WTVGQUx5NklHUHpsUUFwTWotN0NadkUxLXZ3T19WblNWUHJoUi1vS1pRSzV0S0lkUGdxZWpSQjctZnNIVzFnbXdaUmhyZUh6LUx1Q1lydXI1R0RYN1NKTkNVOWxxMjFQVTFqNGpLajZTSEdPNW95NjZxZUNra2plZHlGdXkwS2wwXzFUbzRkeHVCNGZDelU5VlhZdThEenptQ0llTEFxQTFpRndua2ZJTFIwdWhtd2xMWlg4UG80TDFreGZYZTVGVXNsLW1ya0VfbGM4OEUtYmtXUFpJd19SbkhfRFk4ZHMtbTR5OWs5Vy02bjhLcmJFckUzNGVuX1BjS2EzN0szUlAtNUNQNzVPeXhFelh4N3B2ODZSekRLRndzdUZqbUhwY2xFSHZoZHBZdTBtdTdrNFBEODBzaUFRMVdnQVoxZUVadXNGbFlNbnNOa2EyUVpMTktUWEJMQ0o3TVBZZ1FMTnBURFBRRzRGM3d5NUhMSlhSZHZKN1ZpMG83RG90dHc4QWlxNUVBZGVpalpHbzdUZnVrbTdIU1ZjR3hpTEtDSHNiQUJjMURrNW1HQ0REUUZrM0FVLTRzQ2U0a2VkZXAxX0g0VlZDd2k4bmltdzA3QjItRXhibFdyMG83bXU2Y04tdlljOUhVZFhGTkxRT0lmQ09oOEd4dUR3WUlTMDB0SXcxbXNqNW9DMzlPLWlNLTR2QnE3X203aEFvbDVqTkE4QkYtZUUxd21GZ216UGw2ZjlKZVFRZm9kNmx0MDBuak51Smx1WmNBUENNTjdUOXRONXJ0U0xscnNmN2EwQjlWYmt6endnY3B0bktfeUk3YmNVbTBFWjRkOXNVYm55b3pNX2FOZkJHRkZzTGV3eTY0SzVpc3JPUllxZFdFRy1hU2s4M3k4dFNHMmVEc3VsZUVVdUh0THROVkFMeEJSVVp6ZUhPeFJGWUxXU2lGZFFNZmp1YnlvVUs2NUdfWWxQM09jVFl0N3FsN29sTTV6WWYxcGtFQ0owazI0VmtVUG1xUzF5NjVfcDdMTnZaTGhhaUVmOU1Bb0d4U1Fpa1Y0OS14cHFLdUQwMG1fZlhESFRiT2JDV2UwNEh0b2k2a1VmMkxNVDBHb2I4TEg4M01uSEpVZWgzQnQ5Unh4bVpZUUNTanQ0Y0RrZWlQWWhlc0FhemZSU2RNRVNTVXREdUF4MHNzcE1CQ0Z0R0Q2c2w1Ql9NcmhHQW1XRlhzakV4alRKdDBDczB1V0FTVWN4dFRDOEJDN3VFQWtpVW05M2U0SzExQmFvVC1QaGlHYklpallNdE5nUnJoenBzQTdOWUJPblVOckRONUtEclZhT2JxM0lwaTBLUHNITDNGY2FXTkVsY29XWnVpR3V3NWhWcXlDWDZ6bHIxMm5HNFBaR3R2WmhQNXpTMGlBTVVDMDdacXFMM09fMTEwRHRfRVQtTHFxM09ndE92WlNtY1NvTVZjcTM2QjR1LXFrdVZRWklOa2xNbS1oZ1ZjNTF6bHI0WjlaZnZCSi1Pbkt2MUNmR2dickhSTU80dHBUZHhJckt1NjUza1VxWW95dXM1eVdQSzBEQU9ZUDNrVTBkcnI3NzViUTBRSDV0azdCMVFhOFJYc3k0X1o4UnYtOVVGd3d6QTNKNEVRd3Y3WENaajlEZ3ZRdkkwMTNhdlUwTnRKb3ZvemhrQ0EtV3o0RURHZG5zamxlU3ZuZThtbG9QSTAzZWF6RmhkbF9JTFBpZTdIc29wOEppVWs2Q0NPQTNLQmZNNGpKeDI5WEljNkJzcGxPNDE3dHM1Zy1YanROQ0tsWlEwUVZUNWVWaENTQlNnUFhfZXV2OWI5b2Z0Z292UVgxTzNGMDVZc3dxa3YtcXVmbXc0NW5qcUttalpFVy1ZRmFRUm0ycFZJYnVVc3REa0kwZGlObm9MYWNrVl8zTmx2S3BpSTR3WEh5ZXFaMVFmT2lKZmJNMHJ1UlU4RXdmZzhzMjBSM002LUVUTFNJR1pUOHlwOXhMak80d3E4MXlxb1g3cUQxVnNOcXlOcnJkZ01aRWZud2gtZU5DMWwxUEdST0xBRV9xN283UnpSbFdMcUtCSS1ZQjN1NTI4U25SNm41NTUyRXhpU1k0UjJsOGZZc05HQUZiV1ZJVjNRVWZEa1FWUEt2d3FGeEZoVTBuaDNNTlU2eEEtQ3RqNmdPT1ZONC1YQ2d1elhtSnYtWmlVRE04Wkt2QmpEQlNNLXp6MUsydkk1WVNvT1NQd0dvaU8tN2hwcmF6WV9HaWdVZ05GVkxkRjB3N21lTDhiNERDaVFuQWNnaFVoUFQ0clRHdUVMc2N1YTV6MzIybGlWQnp3UTFESGR5TXQ5VXY0WGc3ZWVLUmV0bUd0d0dDZXZINmZCMnVZNktndnpqWHdUM1dSVHNXUWlXbno4clZBOVhuOVZZdXo5UE9ScVFJaU9vWWdmQmZMa0VQV2pBN2dldE9BYVh6RlNqUUpjRmRCSGFMOWxIVklTandKQlN4MUcwbUhsY3dSTmRsREtiRDVDSWUwVUxvVXhBWU1CMjBLajBoeVJKYkYzWkhheWp4WG5zcGIxcGJfVTJXcmtKcmxTMlQyQ0E2ZXlYbkhGclVYX3dvY2xfM1RxX3FQdG9RamkyNlNzaERYOXVtQ3VmLUNZeGZBM1ZvejZMV1RwRGlVLVJlaWtYRmJnUzZIV29PY2czRXRGQWVOZUM3U1lfcHFsaHdOa1NtY05ZWWxyTTdoQlBQbElrTmJETU4tT1RFNEVrVHVzaDBMTWNtQTVEVzhCb012ZzJWdHFsbkFsQkVlUEJKX0t1dWlCQ2NyYl90bVVKLTBSZ2V0VVozREhodEo5MXhJSE8tLXhCZW5ZbUdYc25WSEZudHRYSFNQaC1CcWJOcHptbnFUQldZcHpUNTA1eWtGcWZRbkxJQk84LWNxQ1lsSW9Ycl9qVDlaUTJHWlhEeWxOQ0MxZFgwYzY1dHVOT2QzMHhObk5kRzc0Z2xYc01XNVF3aXJ3TFBRRlVfRW9IbmFrVDZzd29Cc21SM3FGNE5kaXVaaHg5SXI0amNRamMyWkduTWtCaTRVc1g0WWJGZWczdnhQOG51RGlTUW45WVVCVGZUNVo4MFhaUDB4WkdYNjRfSjJZV1g5T3Bua3Jwdy1XUE0tNXdlclJZVFE2ckF3NVJTb3dKM0pfOEs5Smt5cktXb0IxdGJhRlRZMDlCUlN1SEFiTmNOUl9ITDljNEc4eWlmV3ZQVlktNWQ1cmJGY25ucVE1SUtpUmx6TlloLXFGeG04cWpUdUwyZU5zUzhwZ1lEeV9wY2NKRkFmTU1IcGZJWU41Q1VBWE96RXdyakFia1haQTI5VXNneWNMYWxHdkZZeDNHRW92LXJvNzhLajZGaEdDbzZHZnJsM2hoel8wd1BUZ1drckZRVUVuSVA3aFNWS3Z2SUlfeVcwLWI1TXdjVHlpcUJkNnY5S2ZBa2dHR3VuUnBKTm4zQTZHc3pDUjk4U0kyTUtPVENzeEo2OWRVTm43S19Vd1Q1SzExOGRGWVRXZHQ1ZkdFbjAxVS02bWlBc1ljOEJTMC1NVUxlQ0dqTTJLUEo5TE5wYzhvaVJsSnM3MS1YQWNFd3ZfRXp1eVVfeXBKTlJTR0p4VjJkcF81a2RsbFBVazBDVkNsTG9KRUx0TTlRQUtpTWdoQXVCOWVweVRYd1A2OFNjdlhtYjFJNDY4ZWk5Y3kzcEhqc0tEX1NMa0lIVjRXUGZwNjF1ZnVkY1FyajdOWkpSTnRBVUFsZ0dSMjBmM3lVNnVPN0UwX1M2ZGttQ1k1RDQ3aHpqX1V5ZktsQjFCbThNZnNRQy1KUWZuNUZNOENnTXZ5VVN2cUY4blY5cEJyNHlNZ2FUcmptaXQteWVyRDNmQkszM1BDWkVwYjgzYUlrdjIzcW5aZHB3VkhGQ21ZVVJJakJBLUExVmdOcjZZZmpxNkhKOUFPWVZwY29JVFMxU2hlakR6REVLWWtxUVhBVk9oeTlSX1lZZEFCelBqZXF4ejlTUnBfV25hNXEyXzl2VUw5MXFwdTMtdGQ3VndYbE52TlFqa3o0ajFsXzVual9VYUxJMVdLeWczTG51VHIzYV9YbDJLX0ltcnc0ZVl5S3ZsbVZTTU5nODQ1c0EzaFpsT1pLYXlvNk5LNUNiYlZWNWFfX1g2U05Lejh1RVR1d3BzeUdFR2J2STN6MnJhSWhGM0lNc3FlaFZ5TW1GaXczcFd2T1ZUSTFvRUVBU3M5aHNRd0FFbEpfaXBsVVJjc1pQQXltZWpYckJxdW1nUThLYjQ5TGJvbXlNMXJkY1QtOEstaXAxeHZWZ2hsVWFwdWN0czNZTHB5Vzh5aFV0VGdyUjNLeDUyWlp4Y2xBZ0pCTktvRi1CZEpCUWtkSlNvM0FKbUg1YWFIWXNjNTZwSFNzMXFyTHdwZlhYMVI2M2FieUx4eF9vNUdHTzdnTUp5Tm1ra0NwdEx0NUs3cTJYVEpsWTZIcW5tWWRLN3RfTFhsc0xjTkJxNjdFdHplU1RLT0s0eWxLQWhCajJnUEl2bjVvdXBBU19BYVVwaEVrSDJhSUY5M2YyUmdWbHhqTTgxeDhIUWlIcXZtLXhObUw3Q1VlRW5WZ0RkMk4tdHFWMHlCMjUta2xXSXZzeWhCRFREWFVtREM1YjJwMVZQclBtcUUxaFpib0REUkdSYzhSa19VRHlWQjdaa1c5MkVYWjNQWXI5dEx5cWJuX1BTOGJrZm0ya29nVkZoS1FNR2xnVDkyQU12UlJjbjN2V3NMRGxTdG0yWVoxUExnaDV5Y3ZaVE45OG5SNXdqVFpyVTFGOUw2b3NaNk9ORy1iMW9zdWN1eWt3Nm5nV2lIU1NlNTczQ2k0X0h0WFFmZDdURlJLUi16ZjBja1cxaEpaYWthYUo0V0xIcTJXYnduY0praGk0SUEybll2emxwalNXRWxER3FvSG1MTld2VDc3X1I4czRPdnlhV3Z2RzJpTHkzMkRNNEpubkQ1bnJqaEx1SEFybHh3MHJablRmNU1yZmhiOGxUekNXaFJkdFJGM3g4MWliaEFGY3dOdjA3QjRaSFVpVjROeXdQYUtSLTd2ZklXOUQxeXdnMVNQMVNQT1FPMi1yM2NweUo3RHB0aXF4N0h3dDUzZndUaEhHZmRtTDkxMVZCMzVxVnRsQnk4NVh5OG9QekdTMFd3QkFNSHZja1NGT19HaEFQNm5Wc2dtRk10d0I1TFRoaGN1cEpSLTR5WE9zby1lOUp3WGhjRWJ2ZjFDNVVVbmNuWWFDU1FyV25tOVZwbl93VWlSWmJzZEY1U3M0R3FpZXhCRi1aaHZ3VFpnN0tQdFVOU3FuczFDdGpVS1R0N1lITzBOWmJRTHpxZlFMSGUyODZ6UlVyQXZQMUdpbVBQQklqMExubTN4bFo0QUxRUzNKOWdFQnY5aXZqVHBLcElKeVh0MTBiWXJGdzFGMHlMZ0F4N25WRElER2h5NWZWd3FmX2RCVzlubjhEM3FtU1p1UjVHUnZ2bDYxVG9Kc01CeUpLd3l1UmhHOHZtVUVVaTl2d3hjd25INnVHdDZXU0pSUTE4cHh4T3NKMDgtLWRwd3R3NFVpWTBOWXNNcDZyYmVFc21JYTdwZFZRalMxOFN4OVRKWjU0LVVHcTcyMHRveDJCTjRyUTRFVDhPaUpaa1Q1MkxmWjhWZlNkSVg3TDFlWmx3WkZHejY3TWZjQXZqcVItQzZhVlBRemE0cXlXcEJYSHJTWjBYeGF1Xzl6c0FkbEMtR1FianhiRHNYVkxhT1VMb0pUc3EwWERUUmNWRVN1WTZkUUMwWWtYZ3FBWkNBaXVUamxtRHNBQWJ2OUZKc2FWODFRUGxmSWM4ZVVGeEdSa1hnSGxvVVBpRmRmaFE0dE9HenZreUlmQWdJN2Y3ZXdVb2F3RDFZSkpYYmZLQW1NLXpmVzBVS0FuYjhHOXRNeU05Y0hBc0R1M2w4b1I0bHo3Q1RLQjNTYjR3dGpaMmtIT0hWTzRsS2FwQTk2QnJ1VE9pcU95NEEzaWNMem5jOGNseWZHbGNEX01KcmMxUkxLc1MtV2ZuUTljZGc5c2FZbUxZWWVobFNwQUhIOFB1eUxWZE5nSzJJc3MzZVhJTTJJMDlVanJnSDA4NWxyQlBidHFnRzlqLVRfMnBOdmc2NFpwWmFwS2gzSHdjMFZKZ3FjTEpCbkxTVnQ3SHFUSkNvVlpadEFTclFBcUR5TElSWm5jd0VNVkdCLTM3S2R1RTgwdkktWk1UU3lKanZrWmQ4LU52RlhSUVp1LTZoQUd4WVNISlV4Q29xTFRMakNQY2UyaHpnT2Y0UDdjWjZiSy0tWjg1Uk9lS1RJMG55YzVodldUYmdwT0FXMjV3a1JnUUdPXzlSbGVSRFBVMjY4cDZfX0w2RC02NmFRa25yNDRVcHRCTVc4M3N5Wk44ZzVqOVB3NFdDR1dzRkpsVFlGZEpTNmZPSm53aWFPcC1Cem45WlJBcElXT3l5eWwzNVFsNTBwQm1sMmc2RUVnd2VaNU94V0Q0bkZ1Q2hvU3pNaEZMN1Z1NDZydGZhdzVRRVgtdzRDWWlJRkpPM0VaNVFvbjRhUllnazFaanhmdjNYNmJONE9ydlV5TkNOMno4NFZoYXVQUnhaMEI1Q3d4Z2lCTUhmbUZOcmdzMUpBbUZibTBhV3dhdzVUb1AyTnVJbS1kMy1KU1h5SjhrVElSbU1TcmVTc2V3T1dmTmszYVc4d0lWUFhnQ0hPS1BIaDFPZHRWU0tNLVREczBtM2VmOHIycWQ5QU1JN25Edm9fc0JSQ0oySmN6UHdHZXl5bzNiMXlWWTVGMDUySHdteFBlcDdOQWNOWUpsUWxabXdOSXZQclpZNkZwZFphaDJlb3pXeGYwSlZMYXkwc2Q1dHpCVkJ3dkJFbGlBTjBJM1NNMnJVMzhVNGNVZU9IdW56VlNsWnpkRi1HWWVLQVZHUFZYZkQyeFZ3VkIwRXRUYlMtV21hUEUwS2lQNTBZVTV5UzlaYWg2Q1lCN1NrMEVDUmpCZThkd3UzV0NqNTdMY3piY2VuT25zQ2k5U1ZLdUdfVXFzLTFOU0xaUFN0MG5BaWJkcUJaTmlDVHRuSDU3SWFtRy0ta1R6T3NYTWlkSkRudWN2M1BUZF8xbFFZN0lSMUtqZG5rOGlsMHlhd0oxTkdlWUhTcFh3bVlGQmYzWXNLUlR1M0JpZHBhcXdieC1XX3BhR1FROWxRVk05blh3RHI4R254SnROYUV6T0RYVE5Edm1GRWFlNkZkTXNlWTlQQ2JFVU5GT243WWtPNHhZcGxZOE01MF9XOHNBTXR5aXp1MEhTTVhpUk9vQ1V0bk11SU0wTlFLZHZ2OTlUSHEwRVBpdUp4ZmoyLTlpemxjTGI1WlVXc0VFUml2bkRjSk1oMjhuV3VvcGJNeGhqdkRDX1doTnI0VzlZLW1GOUYyWlBMTnhaUFpxUFpSd2hWVEtXY0V4SmlJQUtyazlyZmdiOGVRMnZ0NHhmME9Vc0FwWHdyYnJmbUFtclVpNGk4LUs4VldjTnlxaWxrUnhFMldUREVDNXNkNTZvdGZ4dk5CRFFGVjBISW9tTUREVmRfY0ZZdkxUYXhDbkwtTXdkUWVRcVlMckhfbmJSTjFZUjZWbEg1cHZTeXJKZEVzQlFNMFRCSERHdElCdXBmMG4zR2toemtTc1lCVmxXaUpmRXdDZU14X1ZGVEV1Ujh1M09vWUcxb2taY2lETnh1MEZ2bmZrejBPSGdTZHJTLU9fdWNpSkhabU5SUXNSMFNaTm10cUczZHQ3TDdERmtDaVZpOEVUczMyamdEV1hsX21OYXdkdDFjV29WX0NYS2tWeWM4SU9RUkYtQUEwRlpjLU12WXlyV2tnZEpfMnBacWlESEJtaGFZNGVZdF9uaGdvWkY1NS1YWkdXT0xmSnFyd2IwWDYzTDlnamZGS09hVjF4MVRNcWRjLUZad3VLU3dNTlMwaHJCUDZ0YTBacklRaWotVTk1X3hwMXNvSVJOZmVxVlc4U054NFk1Mk5VbVBVWGtkaTJPandPVlR0R05hb0VFN2U3VEM4d1N3VU8tNllXaEFjMFIxSk9OTmlBa1QyUk1IZG1WdElTWTFRSUJyNnJRaUpiWmlyZVJ5N0VzYW5hcGlaVFF0SE1kdFJWVTVIRUthdkZvZVNERkk3cjJzS1pPeU5MS0hKQVBybzdJOUtzS0gwNWZPX1pEXzBHMjFRRTZ4cnkzOG1tSTdZaEpuR3ZDXzZFVHZmSmc3VkVFdWFRRldYd2sybWlXTFlmaWJ2Yl9vMlNfR21CYmR6MDJSQVpQd3doS01QaUFaWGlGYVM3RVJlUkdhNUdDME1wal9DcEFhdFQxV3YzOEpTY2lmakhNUFdqdU1mZEFxVVJRc1Rpb1ZKVWk2Q3pQWFcxMV9qbThCbTBTdVJyZ1R0NUwyMm95RW5pZkx2aTd1WXFnR0plWW5ocmQ1ZHpyLUg0dTNiNHBqb0VEOGhra0lUbHBlUnMwZ0NUMG1oNWxhUC1xVF9iREdjRVRaa2VVZlNYc1hla01lYzhQMGRVLUNnQTNQaFJHbXNnb2I3Mkt5NHo2WWEwWlVUSmk2M29NU04zb2RrSVF5cGZtYlRQVzJkU2FZVkJZcERHdVlpNGpXRExJZ3hfUUMzeU00eGhnWjA0QVNwbzB0VzVSTUxNTktWdThkY3hMamJ3Q0tqX2lyMFZ1N0V5R1QxTzhZeThKOGZUdXZISkl4dnI0amdJM2dWMTYtNGhMdzhvSndBY013TFlaU1NWNlo3RzgxNmpjTWlPRjZEYVp0U0pLTmRJcGxLTlZGQ1RRaHVIOGppUDN0aW5mWEhBRHJ4LXZIWTlsb3J4NXBiaHRZbGhvRGttVThheFhRT25ZUVZQUkpyMGlRYXlCRHFSTVhBcF9CQlRJN2dXVDRvMjhMSXFIQ3NmRWluMVMxemQxejlUVFF5dGZkMFlVal9Sa2FIWmxsVzlFMXlQSTRYRDg1S3l0QUZBZkpSeDZnNW5fNGRfMFJ6eTJOc3BFYnI4NFFKZDhWNjROVFA2M1V5VkpNLUdqRllJeVpvYkdxQ2tvSDRKdmROWGVqWHF4RzFVVmp2UUVPT3JhZl9XWG0yMG5GZ2JTdGVsY1lYcUwybVNGWU8yTzVNb2J1WEx0Q3A3dVhfZExCaHl2SnFzZ0dfWE9hMEhVSUwtbHN4eDBZeVpIUFV4Ymo0RWVCTXloT20xNlBpTzNDWl81Sm9aSkxyMWZPLVUxaDRTVWl2cGtiLUZWLTltaDhhTm5neF92Qlc3d3BxR1NFREkta1Rha2xkTnZCQzVTWHI2cmxhMFVOR0poSktZdDhWaU1Jb1R1V3ZFb1VqN0hvWWxiU2NrZXFtYW8xRWVFb2xPUEFlVTRwcmE4bmhCTzNhajZzTVJMYnFOYzBhZTIzR1JlSTZKbW4xLVRSNzRiMU1Pb0dKZ1dvUDlUd0NJclM3VUZ1YXhxUXh1X0M1VTllOGs4YkNYQ1JWbllSRk9XMURiQ3NBTFYwWVpkQ0JmZEczbURKbWNkaEJvWk91RWF5eVk4Z184c1EtckZaVnQyS0cxSnJzSlU1ck5qXzA0VC1PQzBzaW5hOHF0VVdrNjBjQllwaVFCNDcxRFlYS0xNTmlCV2d2ODBfbUpFZzVadmszN2RySjQ5NHJ6cWU2Z0JrWGw2WFdUYmdUVGtORndoY0xiamthSzZUTTlxNFJ6MWpSNWVhNlFNLWtZcnptWWVMdXN1Sm5MOE93M1pVUkZOTUtVY01wTW1OcmYzV0RrX054Y2xUUmpDMGFFM0VOU3hrQm1LUExqZjI5SWpxdGVwQmxDX0dhS3g1c0F2d3lCeE5Sd1lvcGhueDVWRFVEZ2tPSmJrbnI0emp1bGJwY3ZVMG5Vc0c0d28tR2JxQVJpLTEwRV9jRm9CT21IWVJDUG5yLVNyQXJXWXo0ckJhLWJ2RHkxZ2RLN29VWlMzSkhKbDRIYUxGYXFMdkNpSjg1UVNjSEVWQnZGOTVXMFdTeEdlaC1ieXd0UFhWRmZiYlJ2NjJVSE1hOFJZTk1VZHYzcXdyazFDc3E5ckttcUhFXzNpcDdHNFRXdUJKU0pEeGFLWVpZeXJKYXNud1hEaGlmMi1HcFJCZ2Nlc2F5WVdKUzgxaktxUnFxVFlSOGg0TGVNbDVxajg3dnB6TUtBeUZ2MXRMX3Fpam5NSlpjWDFQemFiS3Q0LVpYZlpfLW1fYlBwWERWaXZGLXRjbXpjMWc3cllLUjFyOWhOV3FPU1NvaktzWnZ1d2FCOGU2ZjZNZHRHdGRWek1KZHFZTVJ2dWR2d1dvQlQ0RVdpY0t3VjhvOTBLNmUxZVFad3N4MGdQQ3JOamVvZDNMSWJ2VHZaM3hLX3ZSUnQtTnZWRV9XM0paQ1NCT0tzNS1aMEtTWW4zNDJpdkRtY3NPVDVINGwtVEE5cDktYVZtc3lUMzhEZzVJb01jMmZTMG4xQmV3bXJaSzhaNmEwdklOVDJDTUhkYmxwbXpSYm1OQjVJNk9FdGlHZmFaNzN3ZEJzU3c1Q1k5TnJ3YzhEWEFZcVh3cWZJY3lzTnBjOVV4QWFLMDR6cy1DN2JPanFaLTFBNExvNmE1dzBXSmNRZlY0NTJtcDlzbXhtM05qWFFWbjYyczE3cnNxZTJkNGZVVDdEREdYZno0azRSd2tEbVdpeEJyUU9PeTFMYjBxUUd4c29uRVZVZVE3Vm4tbkt3cGpVLTl5Q2s2WHV1dXhWd0lmREtjVXB6YnV6dE9zVEdMMDhNTWRsUGhRX2hhVG92X3JJN2NzTXlKbkpycU92dE9WZ1NfNWZMVDF1c3dxckZ6ZjN5QXlSVnZkdml4NlphOEVOLXRYVmJtRF9Cb0R4TFlyZ0RPYy11OGxPUXVPZWRxMnoxSXhWNFJBWWxDNGhFckUyN0RaU19iRWtUNnZ6YzZHUE45TndZbmJDbUhWUEwydVZONENrclhzUTljRjhDekhYNlJiLWJ0WVVCVHROcWRYaHlzVkcxaXpiUEZXM2xoRTF6QmQ0QWJndWZobjhaRy0tUlhJaUtMYWJTY3FNU24yb3o1c3NnV280TVlLQTBuaWx1MGZtOFM1UFN4TzhhTWdQNk02MWNBVG9UUjhtdjJvTHlBd0lGWHhwNkEyYVhFTVVSTl84N3ROUHM5LWxETFZQTjRpeXV1MGo0SjRGZVZKVG0zVEJzMWV5b2ZHMEhJTjdKTTlDX2xxb2FwS3c2OHhNM2lpbXEzRTl0T09adlJMdXRvdlNCV3hVXzBCYkc4aGFwVi1IWXBkOUg1VktfY1A0VUdiTUZQdDlNcnFMNVBCd0tVTV96NlU5eW5uaklRNkJkVUVBUmdxTlJ5TlNyN0pUSk1DTHZaTkk2bkU3Rk5ITkJQVnRfX3J1b0NyWVBQOFRxa1JXczl4Z2R3UHQyV0xtN2JFa2Y4emV3SE44TXlZMUVSYkpNR2tORVRxaU5xUHd6N0ozT0IzZHIzdThMeldJV3pVdmdNRWh1d05DbHkxTy1kMTVyYkNjMFp6dVBzdHVFdzQ1UkxQODVYSG96enV6TnNFQUN5MHY1Ti1uMHpFX3gzZ3Nhd0YyVnVTV05uV0tTRWs2TU5semRLSjZ1NW43WDg0Q0VpZnpoS1V5VDVMNXNZZ2xzYnVZMWdtclRHVlJDTkNKTzd5aTFycnNZa2ZDeThkVGFDVzl5Sm1hcXc2THozTGlzUHY3RVpzSkVjNWYzMktqNTBybXJDcWF3V0lIZG9tUlZsVmZZMlhXREpRa3VMdUQ1aG9VU00yTnZ1TTJwUGlMZmwxUjE0NVNFUF9IMUF6SWNmVjk3SWh6TjJ5VThCdjlmdEw4cjVpRmZGanJaT3NPRjRxcGpqRHJtZ3kwTXRQTTNFTGtIZ1hGTXdtYXgyU0JPMmFBYjhlcVF2Q014MWgxYXFKMmRlLVBqaE5pdWxqWTFtNFZoLTM0UE1CMHdNMF9zbmkyb1hfZTVYYzJsTWRZaXR3UTczTUxQV3hySUpLaFloTVp4clhLOHZ6OXlDNlBTX1B3Z1FabHRidFFVdGpVWFdLSjcyejBxOGpMeXVyc3dqSDQ2UUhQZWVvM1VCVzBRZXBWblJXMFJmRmhvUWVKcld5SnhLTmk5RmtScmktcEdXaHQwRDFnRC00anFJbHpJY2pUVmZJNE1HbUxOeUpHNEVncVJMZF9odDFLRkRkckliNmlTcXFFMkt1TE1MbUlKNFE5cERoZjA3eEJLa3RmRE1MX0oxV1Y3VkFBeXB6S1VxVl90VjVZWHFuOXBaNG8zZWZiQXB0bmxnbkZ4MThEelZJbnJ1U0Z4UnJjNVFqMzZwelctSm9TaFF1QWxDMzVreEZNWFNGdjVwOW9rM3ZjS3h3WDEyNVZPZmxYTHdwb1dZOEt6dHExR3BfSThUY3c0eGNmWHpUU3ZGNF9VS3Z3Q3ZTd0Rha3ZKZ1lLR1c0ZEt5X1hSZ09zTG1jOEhTeTU3dmoyS3JMWnNSU1NPQldYMFVyT1M3V3EwMWtUTWpLeWNsUG9iWEhIVlpBVk9helplTXVxMGhpSlFuOGxjOEJ3Z0FxNjQ1LUhIdlJ5RTVoaW5jdFRpdFJQdG1sX0FLempyb1I2dm5mSXgzZDR2Z2hxUlJIOUExdHNfUXZnQWpBUjQzWTB6RFpzVnBsd2VqbGQtZXFtWjFkOU40NDRKeVJZVzVzYUR5RklvZFZGTE9OMFUwV0FYbnoxdjZuMUVGZC1Yb0JrWTVPYXV6dU9RVjhVV0JJLUd1NzN5UHRCV0gzMldYODhDNHE2UWpQOWx2UktqWTZhSjFwNmx5QTZ4azZRWXFUT3FmU2tqRG41M0ZsU1pXME80dVlQODZURThPM0pySEFteVI4WklWc3lMQkx5YjZsZ2pFZW5zSzh1dmlaTVEyMVYyOW1aNkZjOGp6WWJPWXMzeG1HYWFWUE5XY2pLakpzM2JZNGdoc1JpZzgwZlBLbE5zR1NOaUQ2XzdNVHZyanYyaThNbnI5a0p1b3VmRlZCVDhma0d1UjBmYWgtLTBPSHFlX0otdk52aVdXUEJ4LVYwSjB0dUN0aklaTFNoWGs3cnE2VmtIRHdqMDhUYk9yTnRYTVY4OWZmM3VNOUpsR0w4WDUwa2ZqYm95R0hZaU5aeVlReHJMWUlYbklLMHNrNmRyTHZiVjdSV2Y1cXdZeGNDZ2dHQzA2TExLTHJlMVA3SWZXMG5UaE8yNlVOSzdhLVVWMTkybE00bVJGVGYyWjRWaW5VZGxZeXJqczBRaGhadVVTYVEzeUg0ZnJBQWFjYlN6blQzcGxUakJacTdkYXZzWnA5cDFvUVpOM1drU2dPT1dLZHBBSDVVTkxvbkxNODA1WEtjZngxWlhJQUVlQk9zY2Etc01mU3ktSmhJYk1obDk2N2FLX2VCS3FwSWFoVVVMSTVuWGpYWmFfaHdsUl9teHhlVWk4dUpIVG5YemRuVHdUQ28tWDZmakE0aGFnYm5DMTRyRDhyNWJNbi1XUW5LM3k0M0hnYWlLVlU0akxGZHZjWDJ3NXk4YkI2UWxrdkw0bURyemNyYy00SmJxUXhEYUZxdWo3alJNVWlOVFpZTWxSNUFMT2xWNFI5WHJiNzdVWkZkUnJmMTVVZkJqblNGc3NHT1hUbzZITHMtNXU3bG8tdGN5d0ppMzJfcm9rOTdNeHVheFRQZTVhaWxJRTVjRWRMQW83VFpSdmNIMVVFTEE2WVBBakcyZVhXNGx5aFRKWVo1RlMyTjJ2VWZCQjZ5MmpENkFyTk9GLTFoYjB3X1Y4cDdvV3lfRWdEQ25VenRvNU5LdXlsaHZRVG1zRnNUWVZWZkpUUHZKREpBR2w5YUM4TW5UeXBKZnpYMUtmWGlhSkR0V25UN05IQ3NLbkZTNVB4Ny1YZVdlM2JMZFFlbFMzd2NXbmprR3g0ZFg3VWdnM1B5RVBfX0swbTNmYlJuRmkzR1EyZW1HRm5WdFpxUGxaOGJmZm80WmxlajA4MTVYbVJjWnNhekJENHZnMzVmdzlzYjdZaktiTWd5cFRnb2tRNzJZbnhoTjdLZWZuNDgtOWlJVWozb1VucE9RelI3ejVsUWhaMDY4ZHM1RUhKV3MzZldReVpLVERWZWhJR3cza3p2RFV0endDUTh6SkFYbGJIckg0OUJQVEVjZV9OUFdGOGZBb2dVcXlBbFJtb2F1M3NNQVFIaTlpbno0QUtSa1AyUVluWjZlVmd3Y05lWlpmdmFMdEZ2RUVmZU5TZnFqSjRrd3pyQlludVVEblRrRkVDbnM1OTU0cm1iS2Z1a0tvLTJua2h6aTBTN0c5M3QxOUdCMVJGY19VcXE4Z1J1WFNKbzRmdmtGUzRrNF91NTJjRGRsRnBIa2xrZkdtLW41U1dfaXF3TzhGak1FMUtKMTk0RzN5eTVtU0dwM25BVGYxTE1hSk91YzVhQW5yYkFCVlF2amotUkRSa0U5M3V3Qjl3T256eUxHXzIyaVRNWUdsSW5CcTh3UEx6R3BNMHl1YlROZUFOMjRpa1dvTEwxOXhWV1NTWFRZR1FaRzRxRUtlak1NVnRkTVNOSTdsb0ZIWTRZbnhJQ1NwSHhZV3lNZEJXMl91QUhMb1hBcjB1RFROZ2dMb2RTUENwS1BDZi1uRTZmeERESzJyWWZ5VnpaMnNhbkh4UTdId25sV2JpY3NIQnNxN3ZDU0pQRkVYeERtejRlQXJjRzdpc21IanFjXzB0d1dUem4wcE5yVVRfejdQTWZuR0k5bEFTa3RJUlVHVUZteF9FWU1SRHNWTTFCTzBfMVdacFJTTWtmaXk2bnRYSUp6VnhDay1KRWNKZXBnamVySGdieUplUjhvWk1RY012TXlicmt0Y0MtamNPQzF0Z05KcjJJaWEwTDkxbnIyeGtxN1BBTUlDbW9jQ0ExcmJZRTV4cHllUmotNXVXc1hEaDY5ajctR0JobkJ0TVcwUnJETW1WTkJZWnFEaU5wZk5QYlRfWjFSeFBqcnZTWk10MGZYVHBVZG5XLUpCcTRWM0JFcmdvLXU4Q0RzZEJkN2tjQmlOMGw0U1NFWHJZXzM3cXBaLV9HVDlUb0lQTnl1clVydFJvRW02cFJleGprT0IxQzd6c3VINFM4MlBnVU0zUTRDUkt1MXVkbGRmcldvMHRyRU53TGh6Tm9SYi1ZRnhMaWU0Q1c3dzQzajBmSTVGOXVITUVqUFBfaVM4d2YyNUNsRVZHZ1lISmNOVjNsSzJpRWRlcHRBeTlKZ3IyelNfOVg1S2Q3aUhsQ21BdDlaQXNkU3FsY1VOTTZrREJtYXhUa2ttaDByY2hLbFpSeGhOaVliY3VpSTZ3Ql9vT1BkOFdlX1hCeTRrZ0I5WVJxMDRSblhuXzNxQmhsaDVjcmh1ZUdCSy13bVZkZHNvMEdyMS15bzNVV3IxaDFQbGZVUUVmbEJmWFotSUJTSllwSTFsYVdoc09POU1JcThpUmhYWUltdnRabVYwcFBuTFhQcnBxNTVwdHp1WFlYRkl4TVpoRC1YVW45SVR4QmVLOFNjcFpoZTFiQi11aXFCQ3J4SVhHaGJGUWJXTEZYUGRESlcwY2toTTZMelJwdjNLd2dwblZta3RvZ1YtclpVellPQUUtRkU1LVI3aDNKajNhVFc0MTdEUkFkWnJWaS1uR2dPUWRyTkw0TEVBU2tQWWhfTW1DVTNYcW1zckg5Z1NrNnpKdDZOMGFGeF9GWlVmdEhHV3drdi1OOS1oNTUxNHhqbWtsVUxwajlqTHh5RHZoQjVnYXFKRkpWeE9SY3EtNDFlN1BjOUtpYVJVbkFDRW1MVlh4VGVCdTFPdXlpcTlMMllCZGJXV0R1ZmVxTnQ5TmZkM0VlVUNBZU45akF4bEx6dElKbzlpTEFvbGh5c0FOU3duSjV2ejVHWUVGN25pc2tCZ1hkcm5fenA4Rm54MzBEU1YtakNrcG0yZU5QM192aXJhSXQ0a3YzZGk5d1dNY2p6S19pajY1Qk4xVFJJZVNVMFZMZU5STGFKY25SYkl3UVNJdGdlRXJkX3I1V2ZEbUNKRk1nNEw5cWtOeEtkMXR3VHJ6VkN5TEp6OGhlZ0M2amJJdXpEWWJFcnQyVFlnZnRTZ3FLUTdoTzJVN1ZDai1iQUdBTmJkbEM3Y2lxM0RiSE8zMThPaUg5b0lpNUp0R0g5VzBHcFhpaVE0Q3d6NFBPb1N3WVdJOTUybnVBRUE4OGc1VjlyZFF5bF84c2VXSDRPamxIc0EzMVhjcVBSd21NRVlkVmE0VEh5bkNOcHZxcTZvSmphbS1ZcnJQVWZyRml5dlNMRlduMk5wcnhSdEc4X3k0OHBNMWNWdi15VVpYR2Jtb1ZheXY4a3BfRkdpTzBUTWx1SGRWalYwOS1QaGsxdFNfTC00X1ZjRUtfMHBQekVKOWM4YnVPeGlhVUczUmpHdk1SSEN6NXVwR3RYc3drLWF2TklrRi1yYjhabFVKMnFDTEtvM3JjeVgyNkJTMUVXRk90ZjF4c0FkVnFNb0tfem5vTXV0T01iTWw4bVR3T0NaVVVqT2V5OE95a3FwVG9UNjhRbG5JQzgtTF92SWtMd2I5QTREbzBDdXBWTTN2a0FFZG5hSzBnbTJyUDZNeW9pYjM4QnZBa0RUUktWbVJyb2oxaXhfMUlSMGVyT0pkYmlIUWpaUFhwTm1Sa3Boc3lhZVltVHVjUkx3T0pTTERrQk5lR3RLZ2lTRTF3MG85UFljNXM0ZFhKM2VhSFBBZ3FDNTFLTjd1WERJLTFPY1JOQVpVNEcxMUE5S1FZME94QVZXejU5ZFNwZkdReDNESmRhelNiY3JsZXBKS192R3p1dzZGVVpDLUF2NS12LTEzaGxWblVuNkhrTWgzdDdrS1c4aHY1Y2lzNHgtZHplZTNmVVZNYk9yQ0xPS2tkVW9ud2RHaUlyVmNXbWZmWnpaT25fOVhsZnhlY0dHR3FBVlcxcmRTalA5YWNsbFZwMHY2dm42cFRxMFZLekRDSllva2I1Qkk0S3psS2pfQUV3Vy01bTJEeTFRamFiUFVQZlg1OWt0THNUUjhrUkJUUURvUnFDblpORUpyR1JRWWk0cW5IcGtHUFFSaFY5RjFnVW93bzJtZ3dQUmJVOTJhMDhKZXNmZzI2WFIxcW5Zc3JGZ2FnM2puV0sxSUtpWmd6TV9ONk9IcklMYW0zR1ZqbnExZUNXZGtrR3NZYU5nLVJiMXBTbnhDbklMUnFjNllzd0NIVk9zUWR0X1dOYmRkQzJkd3pNTm9ZSDgySVdZZVBEY0x5U2U0VjlubHV3ZmxkSHdaaUtzb1J5Wm8yVm51M3F2ZHZwQnoxYmJUMjBPang1cS1JN1RRbFdKZTVZSV9Cck9GZ184RDBlZ2FrUmV3U2pDVzlVNk5qT1pheUtRaWR4UERHV1hLdmtzcFQ4REgyUFBDTlpvVzZibU5XWkpCUWdwVjlXckZtT1dzbmNfWkdxcGZSajdJdF9RekJqR2lNN21oVU0yR3VFTnpBcTF5Z3VyNHkxQkFLVHltNTJFWmd5QUx3UXJFTS05RDJpY1RvZnBBcWZ5bUhxaUxnOXZHekgtTWhTckpQNGdTUlpkcm16UnJxcWtJQnpWaUF2bmtubWprdWJwVGx6TlF4UWNCQmhrcjJkR0Q1bUpQQ1gySWpabTdFYktRMFU4SXJTZ2hHQTRrdHdJcFNzdlgtLTVTUE9kUk9PN01NOGd0UjV4Z04wVkNKMmdIdUl3bjRKdmdoMk9XZkN2TW9PbDZNbjluTnNLVThzRU9ldTJNamFRNmhNNU84bm1iWVpDejdoM1RCXzFPaVZ5UmRzMnQyd2Q5UC1mV3h6Yl9WWWUtSllzQlhvRmxVdFdhdHhkMzZTajM0dkMwZzBaV3FRLVdObTB0bW5sbklyTHFpZWFWOFpVNXJzRXcxMV9TcDFCZTRoWkd5Sk5zM0dGbmJobDBDZnhHRlRUbVBxajRobmp0dlVhaWo0cklfd191dlN2dUMwRDNsSjhrZzR4dFFRM1NkQ0Jfc0Q3cHZpa2xJNzRBV1l2WVJONDhfRnpGbFZ4aVVrY3dIeS1lNHdBXzk3ZkpnTENQSWFnRUZwdXZNd0tLallBYVFCTFMxdG9vR3lYczVBNm4yUjE1TldmWkxKREdSOHhITHBibWRIT21kNndJM1AyQzJ4cEhfZzVlVS1DZ3MyZjI3bTZxU2JfaFhSaURkaUlXZ0R4WktJZmtjaHA1MHFpLWtranA2S2FYSXl2SDRlOFdQdWVSQXZSeVBZV3FiZU96UzhoRkF5ZE5Ea3poRzZsdjNsVUxsQmp5LXF3Y3lWeTc4OGJvQzB1N29HTWJhMGdLUjR1dzB1QmNzTEMtYjJTR0JCcXRKS0ZVaFNSbUh2VzBTVUsweUN5cTFGSi1LS01tR3RkOVMwaTdDVGpqbWQ1bFU4R29pUWswSllNUnRxUEwwSXIyTkgyQkpnaG8yR2I3clRJa3hLWURFYkU4VExNdUVGVV9YSHJxRXRCNU1zRWNWcVFJMzl1SXZkZ0RQZWZldHBHTEdYajRyQjAzY3VDR3M5ZmU0RlA0LmJRbVRLWk9JLVlYTU9uQ2tzZ1FYY0E\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey9?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testKey9?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:08:38 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "826", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "17d15dd3-83fa-4aae-80d4-62700f08ad02", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey9\",\"deletedDate\":1561363718,\"scheduledPurgeDate\":1569139718,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey9/26cd12397be04a2e933ee3d7e8ba4570\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"yalxhcwqX79a6i8gXucFY0Gc5twq1Ew74_02BTAuTwdrII_rxoU5ALdRjW2oulF8NwwzNyIFm744Psfl2gOBf-sEJyNhueV-LDr3uAmkfDOIfcFmKuhNWTRPzBVXUlDEldpOgjzQmOkdrhnRGSpu0zB5v4_RONjp4jbtCdK0i-Ta5lHiQQY_9zRqUBbGttAUejeWA7noqWuLEnLq-nZcpmHFXMTI9cG4Hy5iVTFkcDVvlV6oPgWG22q-NG9Zn_ooRPMYw3mM4-K-yStp9yIMxYLgkSRO6tY2iFJ8wKUcobkiS72Aa6fOFJRTVLKkUuAYwQgYJ65ZmhW7fAOBLjJxFw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561363709,\"updated\":1561363709,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:00:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "800", + "x-ms-request-id" : "c8c415c0-d49b-4fac-9786-ede2a22e233d", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testKey9\",\"deletedDate\":1571886033,\"scheduledPurgeDate\":1579662033,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey9/add39d0bef3546148d70e6814db305e4\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"sqdbIk8KTOK_m5LUUGN33aFJk2X0FecS6EtnVbJlr_cwXs8NY9AWKUkVDOFvNFhbSEL4FK8uPKvyueZjW-IhRK7rj_9fZ47C1aVetKBsiKgJvjTsFcp6kc3E_2a0ANIM-PjkUoz6J6q7S1vFgejsID5GO8IypVsUHqRq5eTgvxzdPmkRS43Q60GLIyCfn3AHdxWCzXkF_DAUeYKbPyl3SU0Zfr58kDm1JcuT-ZMwGlGwym55eKI5w1v0WCZghOsPQFyVERNeWUk0oHFK18eDyiioBq8jkqSz68yCyqcwWPDbI3in1vbRW8O-DqY-5jX7msk7Xh5FdI5c2xN28GugQQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886032,\"updated\":1571886032,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:00:33 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "e28abeee-8585-4aec-b578-7077fb183ffe", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:00:34 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "41500516-1a05-4363-b470-cb238f278c1a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:00:36 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "8aeef61d-6104-4e99-b27f-374744799da3", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:00:36 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "d13b970a-71c3-44ae-898b-d43d1d083127", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:00:38 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "b1b4132c-f9bc-4d35-862a-45837c7da619", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:00:38 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "e4a76c8a-2127-4d45-b8a7-a24c3c5bc9af", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:00:40 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "64c8c031-f06f-41fc-b065-cb8302240d13", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:00:40 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "fb8ef725-531d-418b-9dbe-de305b0612fb", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:00:42 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "d3e3caaa-8e5a-4098-89b4-cddcb1fb3e6a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:00:43 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "bd8812a4-a9f8-4f75-88d0-6b99006e6f00", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:00:44 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "283a1d7e-2a54-4627-ae24-7387e7389169", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:00:45 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "dcf7c6c9-6837-4ed2-b334-78b5c7a920c1", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:00:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "9d2d3184-ae71-430b-b5b3-1427700fa2a3", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:08:38 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "dca4a2b5-18c3-41d7-96a8-88479fb26f00", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:00:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "dabe46a9-d614-4d6a-b46a-58b6cd439e61", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:08:40 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "0b67f3a2-2cd5-467f-8642-1c42bdefd0e6", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:00:49 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "e87895d3-c988-4cbe-be87-cb64e99696e0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:08:42 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "2b381d4b-084f-4a2d-a897-dbc7159a179a", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:00:50 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "c6f29012-6111-440d-9127-d571b575fbf3", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:08:45 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "31e03845-1b07-4345-aff5-b4ba4394bbd6", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:00:51 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "5d4dbba7-c928-48e0-b654-2a0b3064e8a3", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:08:47 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "826", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "cb145bc7-4c77-4b68-a5f6-0ae387792681", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey9\",\"deletedDate\":1561363718,\"scheduledPurgeDate\":1569139718,\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey9/26cd12397be04a2e933ee3d7e8ba4570\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"yalxhcwqX79a6i8gXucFY0Gc5twq1Ew74_02BTAuTwdrII_rxoU5ALdRjW2oulF8NwwzNyIFm744Psfl2gOBf-sEJyNhueV-LDr3uAmkfDOIfcFmKuhNWTRPzBVXUlDEldpOgjzQmOkdrhnRGSpu0zB5v4_RONjp4jbtCdK0i-Ta5lHiQQY_9zRqUBbGttAUejeWA7noqWuLEnLq-nZcpmHFXMTI9cG4Hy5iVTFkcDVvlV6oPgWG22q-NG9Zn_ooRPMYw3mM4-K-yStp9yIMxYLgkSRO6tY2iFJ8wKUcobkiS72Aa6fOFJRTVLKkUuAYwQgYJ65ZmhW7fAOBLjJxFw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561363709,\"updated\":1561363709,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:00:52 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "800", + "x-ms-request-id" : "aa126764-b6b1-4185-b557-43d8a372849a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testKey9\",\"deletedDate\":1571886033,\"scheduledPurgeDate\":1579662033,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey9/add39d0bef3546148d70e6814db305e4\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"sqdbIk8KTOK_m5LUUGN33aFJk2X0FecS6EtnVbJlr_cwXs8NY9AWKUkVDOFvNFhbSEL4FK8uPKvyueZjW-IhRK7rj_9fZ47C1aVetKBsiKgJvjTsFcp6kc3E_2a0ANIM-PjkUoz6J6q7S1vFgejsID5GO8IypVsUHqRq5eTgvxzdPmkRS43Q60GLIyCfn3AHdxWCzXkF_DAUeYKbPyl3SU0Zfr58kDm1JcuT-ZMwGlGwym55eKI5w1v0WCZghOsPQFyVERNeWUk0oHFK18eDyiioBq8jkqSz68yCyqcwWPDbI3in1vbRW8O-DqY-5jX7msk7Xh5FdI5c2xN28GugQQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886032,\"updated\":1571886032,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:08:47 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "c6f2293a-cbb8-418f-b41f-20f50eb2d4ef", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:00:52 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "b2ef312b-bc3c-4d82-b24e-3ece5a0c0b83", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testKey9?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:08:47 GMT", - "content-length" : "76", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "e0fdae16-30fe-407e-9846-9c756424a78c", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:00:52 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "76", + "x-ms-request-id" : "ec3f5999-a753-4fd6-8935-d5498fcf3d9e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testKey9\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/keys/restore?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/restore?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:09:47 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "684", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "08879e7f-2324-4819-8964-0052a13c1463", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"key\":{\"kid\":\"https://azure-sdk-java-key-vault.vault.azure.net/keys/testKey9/26cd12397be04a2e933ee3d7e8ba4570\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"yalxhcwqX79a6i8gXucFY0Gc5twq1Ew74_02BTAuTwdrII_rxoU5ALdRjW2oulF8NwwzNyIFm744Psfl2gOBf-sEJyNhueV-LDr3uAmkfDOIfcFmKuhNWTRPzBVXUlDEldpOgjzQmOkdrhnRGSpu0zB5v4_RONjp4jbtCdK0i-Ta5lHiQQY_9zRqUBbGttAUejeWA7noqWuLEnLq-nZcpmHFXMTI9cG4Hy5iVTFkcDVvlV6oPgWG22q-NG9Zn_ooRPMYw3mM4-K-yStp9yIMxYLgkSRO6tY2iFJ8wKUcobkiS72Aa6fOFJRTVLKkUuAYwQgYJ65ZmhW7fAOBLjJxFw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561363709,\"updated\":1561363709,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:01:52 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "671", + "x-ms-request-id" : "0794724c-1de1-4c2f-ae7f-d625b6f53911", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testKey9/add39d0bef3546148d70e6814db305e4\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"sqdbIk8KTOK_m5LUUGN33aFJk2X0FecS6EtnVbJlr_cwXs8NY9AWKUkVDOFvNFhbSEL4FK8uPKvyueZjW-IhRK7rj_9fZ47C1aVetKBsiKgJvjTsFcp6kc3E_2a0ANIM-PjkUoz6J6q7S1vFgejsID5GO8IypVsUHqRq5eTgvxzdPmkRS43Q60GLIyCfn3AHdxWCzXkF_DAUeYKbPyl3SU0Zfr58kDm1JcuT-ZMwGlGwym55eKI5w1v0WCZghOsPQFyVERNeWUk0oHFK18eDyiioBq8jkqSz68yCyqcwWPDbI3in1vbRW8O-DqY-5jX7msk7Xh5FdI5c2xN28GugQQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571886032,\"updated\":1571886032,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/signVerifyEc.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/signVerifyEc.json index 5ce9f1050ce4..56c3203f6292 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/signVerifyEc.json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/signVerifyEc.json @@ -3,7 +3,7 @@ "Method" : "PUT", "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -12,25 +12,54 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:28 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "Content-Length" : "372", - "x-ms-request-id" : "bcabbb43-4932-4dea-a94f-43b543611c2b", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256/4fafc9bd7b474c75b3fea6bcb424995f\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"Hj-u2Ql1512cmLN4ee4jI7m72tKkct_yCGSxM8FijVA\",\"y\":\"ALmmYPv6wBLVak_7C2k40DqlXZfndGhH4-XoGx4g10Ul\"},\"attributes\":{\"enabled\":true,\"created\":1565067919,\"updated\":1565067919,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "Content-Length" : "373", + "x-ms-request-id" : "d9de774d-736f-4960-b993-1c6fcb084701", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256/b9cebc9453db4884a8dfc138fe710e8e\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"AIfWigoJFwM0j_lJsKYqPjNBWimWZG9hVHZcvNnAYFRv\",\"y\":\"AKO5ByrxHj1Yj_uaBEwO73rR3JHFfzLcR4Z3NUtmy58w\"},\"attributes\":{\"enabled\":true,\"created\":1571350648,\"updated\":1571350648,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256/b9cebc9453db4884a8dfc138fe710e8e?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:17:28 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "373", + "x-ms-request-id" : "9b62f00a-6195-456c-bbd4-925bc30975ba", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256/b9cebc9453db4884a8dfc138fe710e8e\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"AIfWigoJFwM0j_lJsKYqPjNBWimWZG9hVHZcvNnAYFRv\",\"y\":\"AKO5ByrxHj1Yj_uaBEwO73rR3JHFfzLcR4Z3NUtmy58w\"},\"attributes\":{\"enabled\":true,\"created\":1571350648,\"updated\":1571350648,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256/4fafc9bd7b474c75b3fea6bcb424995f/verify?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256/b9cebc9453db4884a8dfc138fe710e8e/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -39,7 +68,35 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:28 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "195", + "x-ms-request-id" : "76f2a3c5-3476-4f20-9d37-c3fb5659f9dd", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256/b9cebc9453db4884a8dfc138fe710e8e\",\"value\":\"ocsO5s4SldW5JNMTmzOR655QFFq-Q3TDTNs_Wi_4P30Cs3zoYSrDCBDOGagds-UjOFmF-bqfna3ob19SJK1hSw\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256/b9cebc9453db4884a8dfc138fe710e8e/verify?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:17:28 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -47,17 +104,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "14", - "x-ms-request-id" : "75464d93-c0c4-447f-914c-2a0384900513", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "3f2a5beb-0a44-4a76-b412-cc2d393a0229", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"value\":true}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256/4fafc9bd7b474c75b3fea6bcb424995f/sign?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256/b9cebc9453db4884a8dfc138fe710e8e/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -66,7 +124,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:28 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -74,17 +132,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "195", - "x-ms-request-id" : "7c9af7b5-e5b4-440e-999a-8f0cac326075", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256/4fafc9bd7b474c75b3fea6bcb424995f\",\"value\":\"cNs1HtHfjw3UYclDXdNyzpBQtWRIqzK25tXe7DZ3VuB375Y3IVQi4T-kGdBzF6ME_Ul6PBpjHOwvuKD-UIdwPg\"}", + "x-ms-request-id" : "8a5b1ea3-0153-4060-acb4-f33e7536dc5e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256/b9cebc9453db4884a8dfc138fe710e8e\",\"value\":\"D8isUifHxCbPvPVAvHrbhBcSzwnzW6tpn_7u8VwBt1Z_Eb620Dhjmyour50kiptcv4nh83xNYRdHGXV06sBQ_w\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -93,25 +152,26 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:28 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "Content-Length" : "507", - "x-ms-request-id" : "63beadb2-b75c-409c-8255-2f59fca65b36", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256\",\"deletedDate\":1565067919,\"scheduledPurgeDate\":1572843919,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256/4fafc9bd7b474c75b3fea6bcb424995f\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"Hj-u2Ql1512cmLN4ee4jI7m72tKkct_yCGSxM8FijVA\",\"y\":\"ALmmYPv6wBLVak_7C2k40DqlXZfndGhH4-XoGx4g10Ul\"},\"attributes\":{\"enabled\":true,\"created\":1565067919,\"updated\":1565067919,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "Content-Length" : "508", + "x-ms-request-id" : "1fa8e1f4-c2f1-4ced-9919-7c9eea41f9a1", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256\",\"deletedDate\":1571350649,\"scheduledPurgeDate\":1579126649,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256/b9cebc9453db4884a8dfc138fe710e8e\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"AIfWigoJFwM0j_lJsKYqPjNBWimWZG9hVHZcvNnAYFRv\",\"y\":\"AKO5ByrxHj1Yj_uaBEwO73rR3JHFfzLcR4Z3NUtmy58w\"},\"attributes\":{\"enabled\":true,\"created\":1571350648,\"updated\":1571350648,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -120,7 +180,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:28 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -128,17 +188,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "dcafce8c-93aa-4727-a148-df902f0f22b3", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "a62f0fd4-9f61-495b-984a-96b3f679e573", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -147,7 +208,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:20 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:30 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -155,17 +216,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "faf5c5a5-9db1-494c-bbb2-b4515534245d", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "d78d9702-3ab7-4f3a-8670-065be6a3c8a3", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -174,7 +236,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:22 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:32 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -182,17 +244,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "60427f33-8f3e-4928-a15d-722d46f099ef", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "b1b935f3-6b6f-4f3b-89c9-e49ed9927301", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -201,7 +264,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:24 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:34 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -209,17 +272,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "f69438d5-69b9-48a9-b69a-69907442b871", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "df9bb6ed-b59d-4534-8cdb-442064ffbda3", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -228,7 +292,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:26 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:36 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -236,17 +300,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "3feb899a-d73a-4299-983e-fabd089aeb5d", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "3c2afa71-8a66-40eb-9c7e-969e7d26c3ad", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -255,7 +320,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:29 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:38 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -263,17 +328,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "c1e04a8d-d867-442f-a54c-dc069b213be5", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "f0346cc2-dac3-403a-9358-a53634332d2b", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -282,7 +348,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:31 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:40 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -290,17 +356,46 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "83f0cd3e-9d8a-439e-a5d7-fc628d6c50cf", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "0df77dc5-b732-4a0a-8dc6-ba109afbbbd1", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 17 Oct 2019 22:17:43 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "73afea3a-e46d-44ed-a1f1-8e9d7d271775", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -309,25 +404,26 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:33 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:45 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "Content-Length" : "507", - "x-ms-request-id" : "1c2f28b4-1652-4bf9-95ce-5de06b9e81c2", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256\",\"deletedDate\":1565067919,\"scheduledPurgeDate\":1572843919,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256/4fafc9bd7b474c75b3fea6bcb424995f\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"Hj-u2Ql1512cmLN4ee4jI7m72tKkct_yCGSxM8FijVA\",\"y\":\"ALmmYPv6wBLVak_7C2k40DqlXZfndGhH4-XoGx4g10Ul\"},\"attributes\":{\"enabled\":true,\"created\":1565067919,\"updated\":1565067919,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "Content-Length" : "508", + "x-ms-request-id" : "4db55bb3-3d94-4056-bdac-082fc7de4a98", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256\",\"deletedDate\":1571350649,\"scheduledPurgeDate\":1579126649,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256/b9cebc9453db4884a8dfc138fe710e8e\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"AIfWigoJFwM0j_lJsKYqPjNBWimWZG9hVHZcvNnAYFRv\",\"y\":\"AKO5ByrxHj1Yj_uaBEwO73rR3JHFfzLcR4Z3NUtmy58w\"},\"attributes\":{\"enabled\":true,\"created\":1571350648,\"updated\":1571350648,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -336,22 +432,23 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Tue, 06 Aug 2019 05:05:33 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:45 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "7c118b87-1d3b-418a-9e12-a460cd8fa0e2", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "7fb38f4b-6431-4a93-861d-d94f978a032f", + "x-ms-keyvault-service-version" : "1.1.0.879", "X-Powered-By" : "ASP.NET" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -360,7 +457,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:33 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:45 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -368,17 +465,46 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "05271b98-0dcc-4369-aac3-be21a4137fb0", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "9ca8000f-baed-4001-9b1a-4add97440f52", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-384?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:17:45 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "417", + "x-ms-request-id" : "a421d234-0e80-4815-8a6f-e9330f45c58f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-384/df40371c63ed4d23bdae93f71e02f8d2\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-384\",\"x\":\"ANoR72kPAJLzS6KxD3eIsooKiqQQyGMHu4-wQV18n1k0yLu7W0c2q5wIoqDVl3BL_w\",\"y\":\"AN3y97LCfFGag1Y76L-OZrJD6NoGbLx1c8RdPUaOmsDpJPkdIUhuaeXpLhFE4yApPQ\"},\"attributes\":{\"enabled\":true,\"created\":1571350665,\"updated\":1571350665,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-384/df40371c63ed4d23bdae93f71e02f8d2?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -387,7 +513,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:33 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:45 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -395,17 +521,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "417", - "x-ms-request-id" : "9f6cd0ca-008b-44bd-bb49-7f4c2a4d5ee4", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-384/030c64353e4042159c25a02855d3a5d9\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-384\",\"x\":\"ALLpJ-Ws5nMeDupEooytQOAifZcUV1i67-DJSfxGR-9er-0N1eL0yxiwQuARWraZ1Q\",\"y\":\"AIwn4DpsJc7bSACXB7JoWqlI5-GOKlU7nLDhdlWb83JgLjDos3BWTqC1Hp8U5yN9ug\"},\"attributes\":{\"enabled\":true,\"created\":1565067934,\"updated\":1565067934,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "x-ms-request-id" : "16dd174b-8391-4e70-8ed7-8605cb9f0f7b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-384/df40371c63ed4d23bdae93f71e02f8d2\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-384\",\"x\":\"ANoR72kPAJLzS6KxD3eIsooKiqQQyGMHu4-wQV18n1k0yLu7W0c2q5wIoqDVl3BL_w\",\"y\":\"AN3y97LCfFGag1Y76L-OZrJD6NoGbLx1c8RdPUaOmsDpJPkdIUhuaeXpLhFE4yApPQ\"},\"attributes\":{\"enabled\":true,\"created\":1571350665,\"updated\":1571350665,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-384/030c64353e4042159c25a02855d3a5d9/verify?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-384/df40371c63ed4d23bdae93f71e02f8d2/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -414,7 +541,35 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:33 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "237", + "x-ms-request-id" : "1df296ec-d957-4022-9ba3-26de31d89c8e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-384/df40371c63ed4d23bdae93f71e02f8d2\",\"value\":\"6l69cntfGCBrL3qJv_A-a7ym1Q3QeKPlsuQu-Tx230H_b9q69KqRpGqnliQMn4HD-fDb1ItwkTv0vDnCAdh35W3j8HqhIqAwTFbd_tYuckUr8XQiaHE3rjoP8blcO0yi\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-384/df40371c63ed4d23bdae93f71e02f8d2/verify?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:17:46 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -422,17 +577,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "14", - "x-ms-request-id" : "f942b7cf-e079-4d90-ab55-91c72c75a373", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "9a698dea-4acf-4404-895d-4c16714e12b8", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"value\":true}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-384/030c64353e4042159c25a02855d3a5d9/sign?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-384/df40371c63ed4d23bdae93f71e02f8d2/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -441,7 +597,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:33 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:46 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -449,17 +605,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "237", - "x-ms-request-id" : "8d9d6a9a-788a-4b57-9a7b-4b68ab152f25", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-384/030c64353e4042159c25a02855d3a5d9\",\"value\":\"lIbUJVURGNQmQoxspY9zBOgABryS3mZCLNI9ri-T4Y7iWDVQoNa0AQqEcLLLaU-Bi2JZE9u3FM0Js5XpugKTWT6xt8j2tBYA5OWLdN6IqkItLnhCUfo4tN7uDgSGJVhb\"}", + "x-ms-request-id" : "4fb29458-f6f7-4880-859b-dd5e49a762b4", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-384/df40371c63ed4d23bdae93f71e02f8d2\",\"value\":\"rwx2hZzOIiFI4EHuDfv-sD39E1DpTSQOqC5leIQv_RfAuN5O1wRE_hVs5MvrV5gmsj0Ih9AG8c3pUzyGk2snsVDwLI53wHbjOXOTwS0SPw3wTGYWG7fdY1cs962RIaTW\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-384?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -468,7 +625,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:34 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:46 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -476,17 +633,74 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "552", - "x-ms-request-id" : "a036f2f3-0e25-40dc-a073-5f604a091b3c", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384\",\"deletedDate\":1565067934,\"scheduledPurgeDate\":1572843934,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-384/030c64353e4042159c25a02855d3a5d9\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-384\",\"x\":\"ALLpJ-Ws5nMeDupEooytQOAifZcUV1i67-DJSfxGR-9er-0N1eL0yxiwQuARWraZ1Q\",\"y\":\"AIwn4DpsJc7bSACXB7JoWqlI5-GOKlU7nLDhdlWb83JgLjDos3BWTqC1Hp8U5yN9ug\"},\"attributes\":{\"enabled\":true,\"created\":1565067934,\"updated\":1565067934,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "x-ms-request-id" : "e538fd29-ba1d-4e0c-83e5-a635c4f28ef0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384\",\"deletedDate\":1571350666,\"scheduledPurgeDate\":1579126666,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-384/df40371c63ed4d23bdae93f71e02f8d2\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-384\",\"x\":\"ANoR72kPAJLzS6KxD3eIsooKiqQQyGMHu4-wQV18n1k0yLu7W0c2q5wIoqDVl3BL_w\",\"y\":\"AN3y97LCfFGag1Y76L-OZrJD6NoGbLx1c8RdPUaOmsDpJPkdIUhuaeXpLhFE4yApPQ\"},\"attributes\":{\"enabled\":true,\"created\":1571350665,\"updated\":1571350665,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 17 Oct 2019 22:17:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "90745eae-aded-4d92-8a48-fedd68a66528", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-384\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 17 Oct 2019 22:17:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "82", + "x-ms-request-id" : "00d35c76-3ce2-4530-a0c6-6e16041f1667", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-384\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -495,7 +709,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:34 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:50 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -503,17 +717,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "689200f1-eb13-4f52-a38b-65610e7e93f0", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "a377860c-52f9-40a1-bfac-d47ebfa4ab8b", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-384\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -522,7 +737,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:36 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:52 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -530,17 +745,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "f31a624d-90af-4c0a-a01e-d148f29763a0", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "b0711ac5-c87a-4e00-8901-c509de54b681", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-384\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -549,7 +765,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:38 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:54 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -557,17 +773,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "fc16c56b-206d-4f38-8d77-c3bb1442c2d4", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "22a893fd-5d38-465a-8226-578fea4a083d", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-384\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -576,7 +793,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:40 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:56 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -584,17 +801,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "d8b86129-a0ba-49a3-a16b-d031914ea51d", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "29659a95-5d6d-489c-bfeb-b05a073a8709", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-384\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -603,7 +821,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:42 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:58 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -611,17 +829,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "2c9bbdfe-dcfa-472b-8d82-212b516f3a2d", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "f7482500-f905-48c9-92c0-3f014ae51ada", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-384\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -630,7 +849,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:44 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:00 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -638,17 +857,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "a86de40c-9b8f-4a5e-b5f6-3e4f9a57cf6e", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "846ce851-717b-4e3e-95fd-f5f7482df411", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-384\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -657,7 +877,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:47 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:02 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -665,17 +885,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "a4292cb8-dc2f-4a7d-a540-66d8a30ac77f", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "62ee7ba2-a0db-4266-9cac-d856866813c1", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-384\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -684,7 +905,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:48 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:04 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -692,17 +913,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "552", - "x-ms-request-id" : "b45357fb-07b0-4adb-8a43-a1940af86d40", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384\",\"deletedDate\":1565067934,\"scheduledPurgeDate\":1572843934,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-384/030c64353e4042159c25a02855d3a5d9\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-384\",\"x\":\"ALLpJ-Ws5nMeDupEooytQOAifZcUV1i67-DJSfxGR-9er-0N1eL0yxiwQuARWraZ1Q\",\"y\":\"AIwn4DpsJc7bSACXB7JoWqlI5-GOKlU7nLDhdlWb83JgLjDos3BWTqC1Hp8U5yN9ug\"},\"attributes\":{\"enabled\":true,\"created\":1565067934,\"updated\":1565067934,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "x-ms-request-id" : "6bafbfa4-2a61-4279-a05d-0a2128a10e36", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384\",\"deletedDate\":1571350666,\"scheduledPurgeDate\":1579126666,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-384/df40371c63ed4d23bdae93f71e02f8d2\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-384\",\"x\":\"ANoR72kPAJLzS6KxD3eIsooKiqQQyGMHu4-wQV18n1k0yLu7W0c2q5wIoqDVl3BL_w\",\"y\":\"AN3y97LCfFGag1Y76L-OZrJD6NoGbLx1c8RdPUaOmsDpJPkdIUhuaeXpLhFE4yApPQ\"},\"attributes\":{\"enabled\":true,\"created\":1571350665,\"updated\":1571350665,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -711,22 +933,23 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Tue, 06 Aug 2019 05:05:49 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:04 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "9832d106-b476-49f0-bd32-f5baa4aca2cc", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "43dbbb3c-ea56-444d-8895-484c365b8775", + "x-ms-keyvault-service-version" : "1.1.0.879", "X-Powered-By" : "ASP.NET" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-384?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -735,7 +958,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:49 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:04 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -743,17 +966,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "0cc9231d-fdb0-4170-bce0-c4f83f5357e4", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "696b0e5f-f5c6-4ca2-8f8d-bf81c537d53a", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-384\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-521?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -762,25 +986,54 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:49 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:04 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "Content-Length" : "460", - "x-ms-request-id" : "f341a939-8517-4125-8b5c-8ee16790e73a", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-521/ac62d5af24774f8eade5ec1ebba680ed\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-521\",\"x\":\"AJb1yjC1egLlYeiI35DdIHQEJNx9Y9r7XQ-XobIetL_FrdnA1AYlAlYA432lXO2Iw452kbSTc-JdN-cUMJ97TvfM\",\"y\":\"c0kPQhIuDOFWCOOxSUR1oCjZMM_-bknl9B55HPc7wlge291AaZtPNHmqemWs6NJdQyrnzLVa95HWQCu9xLcLysI\"},\"attributes\":{\"enabled\":true,\"created\":1565067949,\"updated\":1565067949,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "Content-Length" : "461", + "x-ms-request-id" : "19f5b2cd-adbb-4f5b-9aff-a4c0e87aa7fd", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-521/d573f14a01ca485bad59d70b43fb3583\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-521\",\"x\":\"AUDCIyT7bBYx-DJXIhUOzsJD_uBFKQNKhwF0rjXlOb16WOraMBmRIGrI-jp3iQXRtQgRGTQCQZ_x0lqWoWXuxlWu\",\"y\":\"Af2x7PfPYmeCsF-lzhdhRKU4MiI5p-o5-mhlXH8QrUEM-kpCEkwCeIbuxc3iFcQc_AbCLEPj5HV6gFi6Uuji9gdX\"},\"attributes\":{\"enabled\":true,\"created\":1571350685,\"updated\":1571350685,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-521/d573f14a01ca485bad59d70b43fb3583?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:18:04 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "461", + "x-ms-request-id" : "1056cd82-88c4-4c0b-8d06-59ae04bce0e0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-521/d573f14a01ca485bad59d70b43fb3583\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-521\",\"x\":\"AUDCIyT7bBYx-DJXIhUOzsJD_uBFKQNKhwF0rjXlOb16WOraMBmRIGrI-jp3iQXRtQgRGTQCQZ_x0lqWoWXuxlWu\",\"y\":\"Af2x7PfPYmeCsF-lzhdhRKU4MiI5p-o5-mhlXH8QrUEM-kpCEkwCeIbuxc3iFcQc_AbCLEPj5HV6gFi6Uuji9gdX\"},\"attributes\":{\"enabled\":true,\"created\":1571350685,\"updated\":1571350685,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-521/ac62d5af24774f8eade5ec1ebba680ed/verify?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-521/d573f14a01ca485bad59d70b43fb3583/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -789,7 +1042,35 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:49 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:04 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "285", + "x-ms-request-id" : "d97a4390-6841-4a4b-bb47-6627e72936d6", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-521/d573f14a01ca485bad59d70b43fb3583\",\"value\":\"Ac5VzqgkbAvwxcE68pusWQ_SCM0CN775T4LcK7ERB0RGEqc9CAMLzXdJxAZvUwDzqWOUsJyYXHZSmNrbkusY3W2FAf2q0m-9qUzPZIDszXlXHl4NfIXkxISXt3L04bCAKWvYNny2sWYtepA2F6BIBY7qdvviZr8PmeY3-XfFZcyWYEnP\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-521/d573f14a01ca485bad59d70b43fb3583/verify?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:18:04 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -797,17 +1078,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "14", - "x-ms-request-id" : "d0efe0d1-9af7-4d0d-98e4-a7f303769acd", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "407e751b-3bcb-4e97-bd2c-fa40cf3bc1d2", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"value\":true}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-521/ac62d5af24774f8eade5ec1ebba680ed/sign?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-521/d573f14a01ca485bad59d70b43fb3583/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -816,7 +1098,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:49 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:04 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -824,17 +1106,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "285", - "x-ms-request-id" : "7731b6f5-eff8-4e15-a4a8-fa074b9c7a0d", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-521/ac62d5af24774f8eade5ec1ebba680ed\",\"value\":\"AeXq-Ej2xzmdR11P0gPXeBP1vQwkXYwuQpmhwC9v53sH75r7b_paDSxd7g1h8t5Gp4vA2vfKlWVxomfRxzM35-XLAN1BKyNowY-k6ZnxVNEv_OSFHZDdzF7yCnjbVY9l_JGTZx9djjC0kaE3nhds2bgQN2kZZK0A6xTXmO6daRGL4DZg\"}", + "x-ms-request-id" : "bfb9e028-22ae-48f7-911e-83aae5a4d778", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-521/d573f14a01ca485bad59d70b43fb3583\",\"value\":\"ALtn00vAy0okArBQYTzSVYIxjud1qjxpq4Rxomyh1xGvidgj2OZyBgPkPN79FKia4l-RpQs8aw12ePhfba4-vcTVAcnNLi43SURDq0eCUfCZkU6JH7T5qwmWnkDIcsWhLLB7fp8XmOImgNyqS-imD4xr60t47gO-PsNiUGWzeiJY8wHm\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-521?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -843,25 +1126,54 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:49 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:05 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "596", + "x-ms-request-id" : "b3376df0-c8cf-498b-a913-eca0107a5ce4", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521\",\"deletedDate\":1571350685,\"scheduledPurgeDate\":1579126685,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-521/d573f14a01ca485bad59d70b43fb3583\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-521\",\"x\":\"AUDCIyT7bBYx-DJXIhUOzsJD_uBFKQNKhwF0rjXlOb16WOraMBmRIGrI-jp3iQXRtQgRGTQCQZ_x0lqWoWXuxlWu\",\"y\":\"Af2x7PfPYmeCsF-lzhdhRKU4MiI5p-o5-mhlXH8QrUEM-kpCEkwCeIbuxc3iFcQc_AbCLEPj5HV6gFi6Uuji9gdX\"},\"attributes\":{\"enabled\":true,\"created\":1571350685,\"updated\":1571350685,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 17 Oct 2019 22:18:05 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "Content-Length" : "595", - "x-ms-request-id" : "9d10f17b-db6f-4e45-a641-beae86678f54", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521\",\"deletedDate\":1565067949,\"scheduledPurgeDate\":1572843949,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-521/ac62d5af24774f8eade5ec1ebba680ed\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-521\",\"x\":\"AJb1yjC1egLlYeiI35DdIHQEJNx9Y9r7XQ-XobIetL_FrdnA1AYlAlYA432lXO2Iw452kbSTc-JdN-cUMJ97TvfM\",\"y\":\"c0kPQhIuDOFWCOOxSUR1oCjZMM_-bknl9B55HPc7wlge291AaZtPNHmqemWs6NJdQyrnzLVa95HWQCu9xLcLysI\"},\"attributes\":{\"enabled\":true,\"created\":1565067949,\"updated\":1565067949,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "Content-Length" : "82", + "x-ms-request-id" : "be4818c4-cffe-4f59-8fb3-f4e9fc4e96e5", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-521\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -870,7 +1182,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:49 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:07 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -878,17 +1190,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "8de8734d-e2aa-43d7-985d-fe72b4baac1e", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "622527f8-7c38-42d5-a675-56bc986faa5e", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-521\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -897,7 +1210,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:51 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:09 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -905,17 +1218,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "2cee9a66-4155-4fda-93d4-69f0d48e1cf1", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "84389838-0372-4f6f-ab31-e6e10596cdeb", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-521\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -924,7 +1238,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:53 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:11 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -932,17 +1246,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "26837117-99c6-40ce-9014-bc3b84df10e4", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "8a520350-89d0-4299-86d5-f4e0395a6e2c", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-521\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -951,7 +1266,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:55 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:13 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -959,17 +1274,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "47b172fe-32ea-429a-97f2-bb7d77a33ef1", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "9f21c681-374a-4c60-a6b4-e8618e41a293", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-521\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -978,7 +1294,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:57 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:15 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -986,17 +1302,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "5fd4da2e-5267-44bf-a278-60ccb9ae82eb", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "b57304d1-47e9-443f-9474-6d2755c500ce", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-521\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1005,7 +1322,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:59 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:18 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -1013,17 +1330,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "25d49dcb-e2bc-421c-8704-042d81917f3e", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "ea6ed51e-3b92-45a1-833c-d529a5a11652", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-521\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1032,7 +1350,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:06:01 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:20 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -1040,17 +1358,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "5aeeddd5-6f5d-463c-b7cf-9461b8cb43ff", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "a4fcd65a-090f-4d3e-8d1b-b66774bf5cf3", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-521\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1059,25 +1378,26 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:06:03 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:22 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "Content-Length" : "595", - "x-ms-request-id" : "969be4ec-ec4b-49bf-9312-509658d9f705", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521\",\"deletedDate\":1565067949,\"scheduledPurgeDate\":1572843949,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-521/ac62d5af24774f8eade5ec1ebba680ed\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-521\",\"x\":\"AJb1yjC1egLlYeiI35DdIHQEJNx9Y9r7XQ-XobIetL_FrdnA1AYlAlYA432lXO2Iw452kbSTc-JdN-cUMJ97TvfM\",\"y\":\"c0kPQhIuDOFWCOOxSUR1oCjZMM_-bknl9B55HPc7wlge291AaZtPNHmqemWs6NJdQyrnzLVa95HWQCu9xLcLysI\"},\"attributes\":{\"enabled\":true,\"created\":1565067949,\"updated\":1565067949,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "Content-Length" : "596", + "x-ms-request-id" : "41cb74ae-7a07-4263-9ece-cfa322622f86", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521\",\"deletedDate\":1571350685,\"scheduledPurgeDate\":1579126685,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-521/d573f14a01ca485bad59d70b43fb3583\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-521\",\"x\":\"AUDCIyT7bBYx-DJXIhUOzsJD_uBFKQNKhwF0rjXlOb16WOraMBmRIGrI-jp3iQXRtQgRGTQCQZ_x0lqWoWXuxlWu\",\"y\":\"Af2x7PfPYmeCsF-lzhdhRKU4MiI5p-o5-mhlXH8QrUEM-kpCEkwCeIbuxc3iFcQc_AbCLEPj5HV6gFi6Uuji9gdX\"},\"attributes\":{\"enabled\":true,\"created\":1571350685,\"updated\":1571350685,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1086,22 +1406,23 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Tue, 06 Aug 2019 05:06:03 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:22 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "e3fa4507-4811-4a91-972b-2e789debaa2c", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "ea83fab7-d851-4b1b-92e7-93a93ae91b27", + "x-ms-keyvault-service-version" : "1.1.0.879", "X-Powered-By" : "ASP.NET" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-521?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1110,7 +1431,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:06:03 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:22 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -1118,17 +1439,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "82", - "x-ms-request-id" : "4b684eb9-d109-4f69-ad6a-9668d930e5d1", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "add5d5b7-b11c-484f-a20a-69f2e9fd15ad", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-521\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256K?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1137,25 +1459,54 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:06:03 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:22 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "Content-Length" : "373", - "x-ms-request-id" : "18a4c166-92d5-4089-9ee8-cb30ccb40fd1", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256K/d6b01ac55f6941969636ed61e5f6b720\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256K\",\"x\":\"Tgz0jB9SHUaEPuEnLXoZ9rrazgXHyO-aC0hRFt3vxH0\",\"y\":\"bCgJMpFjwLVKSTCgeVt2gc_d34ELNud4jRJ1rwFbbYo\"},\"attributes\":{\"enabled\":true,\"created\":1565067964,\"updated\":1565067964,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "Content-Length" : "375", + "x-ms-request-id" : "ebfacc8c-b3c6-4216-8967-74884f9f7fec", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256K/9c532e0a7a9c499c962dee06c01f0e61\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256K\",\"x\":\"AJezaEj5_RUerFlC8zS8GFhhQFAQAp0OBeUETvAVDHJ5\",\"y\":\"APEQlqySuadPTiCw-LytqM_U8dVBkhHf15ndAOxNqM64\"},\"attributes\":{\"enabled\":true,\"created\":1571350702,\"updated\":1571350702,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256K/9c532e0a7a9c499c962dee06c01f0e61?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:18:22 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "375", + "x-ms-request-id" : "dcdfe519-2baa-43c6-ba5b-3014f42774a0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256K/9c532e0a7a9c499c962dee06c01f0e61\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256K\",\"x\":\"AJezaEj5_RUerFlC8zS8GFhhQFAQAp0OBeUETvAVDHJ5\",\"y\":\"APEQlqySuadPTiCw-LytqM_U8dVBkhHf15ndAOxNqM64\"},\"attributes\":{\"enabled\":true,\"created\":1571350702,\"updated\":1571350702,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256K/d6b01ac55f6941969636ed61e5f6b720/verify?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256K/9c532e0a7a9c499c962dee06c01f0e61/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1164,7 +1515,35 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:06:03 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:22 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "196", + "x-ms-request-id" : "61b91368-da73-49a5-8147-ae6e668df093", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256K/9c532e0a7a9c499c962dee06c01f0e61\",\"value\":\"a60KVooaoWcK-pb1qofYb7zliDmyEy-BCjI_YGy1RPb2c4guYOWlZeykIbKB7d_zOOU_ykdpX1ujRZs94KkDsg\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256K/9c532e0a7a9c499c962dee06c01f0e61/verify?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:18:22 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -1172,17 +1551,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "14", - "x-ms-request-id" : "e86a4ec1-799f-495e-955f-027adb1ff0ef", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "5062fdcd-9064-4fc7-b510-d80053abe943", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"value\":true}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256K/d6b01ac55f6941969636ed61e5f6b720/sign?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256K/9c532e0a7a9c499c962dee06c01f0e61/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1191,7 +1571,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:06:03 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:22 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -1199,17 +1579,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "196", - "x-ms-request-id" : "1bf894fe-b2ab-4c22-ada9-3d326f6b12b1", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256K/d6b01ac55f6941969636ed61e5f6b720\",\"value\":\"5wdtsUIpnWfiuPTnT0B4zcMJx33s2h7a0kDIxzzaee7mzuG7XkGvGA3Fv7fMXpB4QsJcIA0DqhmR_6cWvh-6Ew\"}", + "x-ms-request-id" : "c4591d79-0f1b-4d8e-b0d4-149365b3e340", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256K/9c532e0a7a9c499c962dee06c01f0e61\",\"value\":\"fR_gw8jOSfKPCWuLPufuu5nWmmpnCs8fLVSxz7T87hMq57d_r5X8vnQX6olKTkQWG_chDvNR4ZcC8AqRSQawsA\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/keys/testEcKeyP-256K?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1218,25 +1599,26 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:06:03 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:22 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "Content-Length" : "509", - "x-ms-request-id" : "e3d45690-b96b-4084-9cba-c588ed2a8927", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K\",\"deletedDate\":1565067964,\"scheduledPurgeDate\":1572843964,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256K/d6b01ac55f6941969636ed61e5f6b720\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256K\",\"x\":\"Tgz0jB9SHUaEPuEnLXoZ9rrazgXHyO-aC0hRFt3vxH0\",\"y\":\"bCgJMpFjwLVKSTCgeVt2gc_d34ELNud4jRJ1rwFbbYo\"},\"attributes\":{\"enabled\":true,\"created\":1565067964,\"updated\":1565067964,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "Content-Length" : "511", + "x-ms-request-id" : "a0582a5f-93c2-41b5-801d-43cb50d7e82b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K\",\"deletedDate\":1571350702,\"scheduledPurgeDate\":1579126702,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256K/9c532e0a7a9c499c962dee06c01f0e61\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256K\",\"x\":\"AJezaEj5_RUerFlC8zS8GFhhQFAQAp0OBeUETvAVDHJ5\",\"y\":\"APEQlqySuadPTiCw-LytqM_U8dVBkhHf15ndAOxNqM64\"},\"attributes\":{\"enabled\":true,\"created\":1571350702,\"updated\":1571350702,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1245,7 +1627,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:06:03 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:22 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -1253,17 +1635,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "83", - "x-ms-request-id" : "41874a22-1f7d-42cd-ad6b-dfdf10b3310a", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "85d3c4bd-c1d0-4e0d-a266-6e37d6184874", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256K\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1272,7 +1655,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:06:06 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:24 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -1280,17 +1663,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "83", - "x-ms-request-id" : "98b2cda6-92b9-4dd3-993e-b836c611859c", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "f435b937-5742-4aa2-b2be-482bcfa12ac1", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256K\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1299,7 +1683,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:06:08 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:26 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -1307,17 +1691,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "83", - "x-ms-request-id" : "a7dfd138-9972-4bb5-8cc1-03f8cab2b538", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "edfe7785-5ce9-4fbf-ad03-cb9e05d9ef38", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256K\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1326,7 +1711,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:06:10 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:28 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -1334,17 +1719,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "83", - "x-ms-request-id" : "2d95bcd0-1962-437c-9bc1-565a2862b8b2", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "45941fb9-7fe0-4d9f-b658-f26101dabad2", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256K\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1353,7 +1739,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:06:12 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:30 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -1361,17 +1747,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "83", - "x-ms-request-id" : "c36e5004-4b1c-48ea-8686-d4c92d05cb6d", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "7ada375a-0fd3-4a07-816e-0d98f7ac25ac", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256K\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1380,7 +1767,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:06:14 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:32 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -1388,17 +1775,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "83", - "x-ms-request-id" : "d0c732a1-706d-4b8b-afea-866688ec06f1", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "d4b8ebe6-514d-4da4-b52a-4bdf45ebbe73", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256K\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1407,7 +1795,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:06:16 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:34 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -1415,17 +1803,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "83", - "x-ms-request-id" : "a14606ff-c2cf-44e5-adb8-cc6b4e7d5869", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "23286c9d-7f1f-45df-a9f1-b65c1389b440", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256K\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1434,25 +1823,26 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:06:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:36 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "Content-Length" : "509", - "x-ms-request-id" : "5b022123-102f-49e4-b766-64ddf5064f62", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K\",\"deletedDate\":1565067964,\"scheduledPurgeDate\":1572843964,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256K/d6b01ac55f6941969636ed61e5f6b720\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256K\",\"x\":\"Tgz0jB9SHUaEPuEnLXoZ9rrazgXHyO-aC0hRFt3vxH0\",\"y\":\"bCgJMpFjwLVKSTCgeVt2gc_d34ELNud4jRJ1rwFbbYo\"},\"attributes\":{\"enabled\":true,\"created\":1565067964,\"updated\":1565067964,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "Content-Length" : "511", + "x-ms-request-id" : "bf96d74a-e214-471d-8156-398ef06ecf0f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K\",\"deletedDate\":1571350702,\"scheduledPurgeDate\":1579126702,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testEcKeyP-256K/9c532e0a7a9c499c962dee06c01f0e61\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256K\",\"x\":\"AJezaEj5_RUerFlC8zS8GFhhQFAQAp0OBeUETvAVDHJ5\",\"y\":\"APEQlqySuadPTiCw-LytqM_U8dVBkhHf15ndAOxNqM64\"},\"attributes\":{\"enabled\":true,\"created\":1571350702,\"updated\":1571350702,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1461,22 +1851,23 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Tue, 06 Aug 2019 05:06:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:36 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "6743ad35-948a-4736-888c-b3b6cbef5792", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "e97ab775-386b-446e-b284-a7445d5af6e2", + "x-ms-keyvault-service-version" : "1.1.0.879", "X-Powered-By" : "ASP.NET" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testEcKeyP-256K?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -1485,7 +1876,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:06:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -1493,12 +1884,13 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "83", - "x-ms-request-id" : "1ad41b84-54b0-4618-82dc-78605230f7dc", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "9e948f6c-2b7c-4e52-a444-8d22cf56e163", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testEcKeyP-256K\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/signVerifyRsa.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/signVerifyRsa.json index d39d561e045d..aaec315f8e42 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/signVerifyRsa.json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/signVerifyRsa.json @@ -3,7 +3,7 @@ "Method" : "PUT", "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -12,7 +12,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:12 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -20,17 +20,46 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "666", - "x-ms-request-id" : "298b2b1d-70a0-48e9-a60c-a608b34b66b2", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1565078533,\"updated\":1565078533,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "x-ms-request-id" : "c238ffe7-0d9d-4a96-81af-9760fe081c51", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1571350717,\"updated\":1571350717,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "666", + "x-ms-request-id" : "9987bf57-452c-45a2-b061-c207330401d5", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1571350717,\"updated\":1571350717,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646/sign?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -39,7 +68,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:12 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -47,17 +76,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "457", - "x-ms-request-id" : "26cc1280-66b1-4143-bf6b-0837bd90d7e4", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646\",\"value\":\"VycNS2AleyY425cgT02DdqHgz0r95vm0UDEsnG8uQiT7IfxflrjKM_d8PvOeV6JA6kamk6lhvFKnJqXyNmFaPcI7RcibAW-e3-9k91TEegUNl4dZpPeuy6AY5-CkafXBBTHCCOAfGuyCeNnr8jJF7teQa_Z246wgoOiGACQx37C2m9jb2x-Q3-mxo8utyi3NFu8LCJs7C9h_AlcszRJ0l9a0dP97YnNFW75GtBpfjt7frZFUGdJNeWvZXBhCzhtYN9ynN6SHIKKVfZEe-Uqc3HvY63oEGvVGcPnWeV2wY8NfQn04gji3hdKKyRH0VLSkwHJpSA7V42EDaPbaQCriQA\"}", + "x-ms-request-id" : "022e9996-515b-403e-8f4a-31bb11f17f61", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc\",\"value\":\"VycNS2AleyY425cgT02DdqHgz0r95vm0UDEsnG8uQiT7IfxflrjKM_d8PvOeV6JA6kamk6lhvFKnJqXyNmFaPcI7RcibAW-e3-9k91TEegUNl4dZpPeuy6AY5-CkafXBBTHCCOAfGuyCeNnr8jJF7teQa_Z246wgoOiGACQx37C2m9jb2x-Q3-mxo8utyi3NFu8LCJs7C9h_AlcszRJ0l9a0dP97YnNFW75GtBpfjt7frZFUGdJNeWvZXBhCzhtYN9ynN6SHIKKVfZEe-Uqc3HvY63oEGvVGcPnWeV2wY8NfQn04gji3hdKKyRH0VLSkwHJpSA7V42EDaPbaQCriQA\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646/verify?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc/verify?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -66,7 +96,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:13 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -74,17 +104,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "14", - "x-ms-request-id" : "6e39a0ae-cc98-4dbe-a583-cbcc3086e500", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "18ecaae3-c597-4191-8ed7-a4d8cd0136f1", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"value\":true}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646/sign?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -93,7 +124,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:13 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -101,17 +132,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "457", - "x-ms-request-id" : "ce3593b5-af4c-409f-b9b6-b3173ad8c617", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646\",\"value\":\"VycNS2AleyY425cgT02DdqHgz0r95vm0UDEsnG8uQiT7IfxflrjKM_d8PvOeV6JA6kamk6lhvFKnJqXyNmFaPcI7RcibAW-e3-9k91TEegUNl4dZpPeuy6AY5-CkafXBBTHCCOAfGuyCeNnr8jJF7teQa_Z246wgoOiGACQx37C2m9jb2x-Q3-mxo8utyi3NFu8LCJs7C9h_AlcszRJ0l9a0dP97YnNFW75GtBpfjt7frZFUGdJNeWvZXBhCzhtYN9ynN6SHIKKVfZEe-Uqc3HvY63oEGvVGcPnWeV2wY8NfQn04gji3hdKKyRH0VLSkwHJpSA7V42EDaPbaQCriQA\"}", + "x-ms-request-id" : "0e6f0172-8100-4832-809e-05cd6ba3f232", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc\",\"value\":\"VycNS2AleyY425cgT02DdqHgz0r95vm0UDEsnG8uQiT7IfxflrjKM_d8PvOeV6JA6kamk6lhvFKnJqXyNmFaPcI7RcibAW-e3-9k91TEegUNl4dZpPeuy6AY5-CkafXBBTHCCOAfGuyCeNnr8jJF7teQa_Z246wgoOiGACQx37C2m9jb2x-Q3-mxo8utyi3NFu8LCJs7C9h_AlcszRJ0l9a0dP97YnNFW75GtBpfjt7frZFUGdJNeWvZXBhCzhtYN9ynN6SHIKKVfZEe-Uqc3HvY63oEGvVGcPnWeV2wY8NfQn04gji3hdKKyRH0VLSkwHJpSA7V42EDaPbaQCriQA\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646/verify?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc/verify?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -120,7 +152,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:13 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -128,17 +160,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "14", - "x-ms-request-id" : "e4c8bcac-7cc0-4f0d-960c-a8da2e11a29e", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "271b2ee4-18e4-480a-b12e-faf63f8aea0b", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"value\":true}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646/sign?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -147,7 +180,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:13 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -155,17 +188,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "457", - "x-ms-request-id" : "7e3463e0-ae30-498a-88ae-2f706dbeb24e", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646\",\"value\":\"pgnnttZnG0DrXoJdN4rv-GMtHEnAa7FFXfIKNlC0wXIlXhGHNy_5bq4CUZgd5RO-56gNYr1rJ44nQJoBqS33t4rLjguIkcBMGyJ02ymSpvCaexHEYPh6XiFWeK9ivPXGxc4Sbu08Y387c-xRRLb5e6uw4MOC1VnInyNRwrqFVHho7cEK-n9CXi__U7oSSAG3n98i8id-oX-sWnxuMu7-G601wPa7T42XIZz_cg-0crE3oFFRO467cuFSNSiOy6f6YDPEJK58KBN5i-BomYhwnNKc1Z4ATRvTtUKs2YT-8jHu4yIkN0-LGmd8tQdRWwaoqQiDueJVSAAzp-T7LERbmg\"}", + "x-ms-request-id" : "4c555f2f-46c4-4cdb-bba1-38bc7c0b821f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc\",\"value\":\"pgnnttZnG0DrXoJdN4rv-GMtHEnAa7FFXfIKNlC0wXIlXhGHNy_5bq4CUZgd5RO-56gNYr1rJ44nQJoBqS33t4rLjguIkcBMGyJ02ymSpvCaexHEYPh6XiFWeK9ivPXGxc4Sbu08Y387c-xRRLb5e6uw4MOC1VnInyNRwrqFVHho7cEK-n9CXi__U7oSSAG3n98i8id-oX-sWnxuMu7-G601wPa7T42XIZz_cg-0crE3oFFRO467cuFSNSiOy6f6YDPEJK58KBN5i-BomYhwnNKc1Z4ATRvTtUKs2YT-8jHu4yIkN0-LGmd8tQdRWwaoqQiDueJVSAAzp-T7LERbmg\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646/verify?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc/verify?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -174,7 +208,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:13 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -182,17 +216,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "14", - "x-ms-request-id" : "74ec3430-c81f-4f0e-95f0-30ff1ec17bc9", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "f0c8b730-0bff-4b9f-b25c-e653c401c2e2", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"value\":true}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646/sign?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -201,7 +236,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:13 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -209,17 +244,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "457", - "x-ms-request-id" : "b8bd9551-96ff-469a-aef3-641035b74c10", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646\",\"value\":\"pgnnttZnG0DrXoJdN4rv-GMtHEnAa7FFXfIKNlC0wXIlXhGHNy_5bq4CUZgd5RO-56gNYr1rJ44nQJoBqS33t4rLjguIkcBMGyJ02ymSpvCaexHEYPh6XiFWeK9ivPXGxc4Sbu08Y387c-xRRLb5e6uw4MOC1VnInyNRwrqFVHho7cEK-n9CXi__U7oSSAG3n98i8id-oX-sWnxuMu7-G601wPa7T42XIZz_cg-0crE3oFFRO467cuFSNSiOy6f6YDPEJK58KBN5i-BomYhwnNKc1Z4ATRvTtUKs2YT-8jHu4yIkN0-LGmd8tQdRWwaoqQiDueJVSAAzp-T7LERbmg\"}", + "x-ms-request-id" : "b082e19e-fcf1-4e2e-a5f1-97940daf15ff", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc\",\"value\":\"pgnnttZnG0DrXoJdN4rv-GMtHEnAa7FFXfIKNlC0wXIlXhGHNy_5bq4CUZgd5RO-56gNYr1rJ44nQJoBqS33t4rLjguIkcBMGyJ02ymSpvCaexHEYPh6XiFWeK9ivPXGxc4Sbu08Y387c-xRRLb5e6uw4MOC1VnInyNRwrqFVHho7cEK-n9CXi__U7oSSAG3n98i8id-oX-sWnxuMu7-G601wPa7T42XIZz_cg-0crE3oFFRO467cuFSNSiOy6f6YDPEJK58KBN5i-BomYhwnNKc1Z4ATRvTtUKs2YT-8jHu4yIkN0-LGmd8tQdRWwaoqQiDueJVSAAzp-T7LERbmg\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646/verify?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc/verify?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -228,7 +264,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:13 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -236,17 +272,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "14", - "x-ms-request-id" : "5da9d647-61a9-43d7-8170-40a84dc71d48", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "979d4240-93d0-4209-96c3-46f3a3522872", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"value\":true}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646/sign?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -255,7 +292,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:13 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -263,17 +300,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "457", - "x-ms-request-id" : "d2baa6be-7a74-4183-809f-0850094a0918", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646\",\"value\":\"EhVnpxaFb6gJcMjT3CJ4P2cOCn45FZFFpfGe3xIXtAX7oDzOeqFxpLKuRoZrXz9B4f2YzP-YwNNwBPISceE6JsA_WZHgOBbn3mnl3U90Z3u9HG5zNLfLOyfcjQ5EcoZ3591By9KHGAy4L1YOVIKdm70XqHCY6Xkm00_LBIZRQEjhsrnOLJ84Yxij5gI6n-TrbCyNxubnpRrb1MMSNkziK5mWFulYMC9p_fppWTDKGcog4s4mS6pg4emCBStPiN2TG4WER_T0oV6aYf9GKrAhZEy_7PhQcRxVFb2oe885iM-GPNXbWfzu4lAc_O7TNAi3aZtcPvBFSkfzPk8e7kVkAA\"}", + "x-ms-request-id" : "f48bd306-9333-4447-a895-dd0c3c3ce739", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc\",\"value\":\"EhVnpxaFb6gJcMjT3CJ4P2cOCn45FZFFpfGe3xIXtAX7oDzOeqFxpLKuRoZrXz9B4f2YzP-YwNNwBPISceE6JsA_WZHgOBbn3mnl3U90Z3u9HG5zNLfLOyfcjQ5EcoZ3591By9KHGAy4L1YOVIKdm70XqHCY6Xkm00_LBIZRQEjhsrnOLJ84Yxij5gI6n-TrbCyNxubnpRrb1MMSNkziK5mWFulYMC9p_fppWTDKGcog4s4mS6pg4emCBStPiN2TG4WER_T0oV6aYf9GKrAhZEy_7PhQcRxVFb2oe885iM-GPNXbWfzu4lAc_O7TNAi3aZtcPvBFSkfzPk8e7kVkAA\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646/verify?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc/verify?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -282,7 +320,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:13 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -290,17 +328,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "14", - "x-ms-request-id" : "7569e457-7919-40b0-b0f7-4d2548bcc43c", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "7e0bea70-7f54-4984-85aa-ff0fe3d1ac2d", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"value\":true}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646/sign?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc/sign?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -309,7 +348,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:13 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -317,17 +356,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "457", - "x-ms-request-id" : "94f0d3c2-35e7-4c13-bc8b-7feec222c008", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646\",\"value\":\"EhVnpxaFb6gJcMjT3CJ4P2cOCn45FZFFpfGe3xIXtAX7oDzOeqFxpLKuRoZrXz9B4f2YzP-YwNNwBPISceE6JsA_WZHgOBbn3mnl3U90Z3u9HG5zNLfLOyfcjQ5EcoZ3591By9KHGAy4L1YOVIKdm70XqHCY6Xkm00_LBIZRQEjhsrnOLJ84Yxij5gI6n-TrbCyNxubnpRrb1MMSNkziK5mWFulYMC9p_fppWTDKGcog4s4mS6pg4emCBStPiN2TG4WER_T0oV6aYf9GKrAhZEy_7PhQcRxVFb2oe885iM-GPNXbWfzu4lAc_O7TNAi3aZtcPvBFSkfzPk8e7kVkAA\"}", + "x-ms-request-id" : "4dac415e-cd45-4621-a2ee-bc05106e8111", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc\",\"value\":\"EhVnpxaFb6gJcMjT3CJ4P2cOCn45FZFFpfGe3xIXtAX7oDzOeqFxpLKuRoZrXz9B4f2YzP-YwNNwBPISceE6JsA_WZHgOBbn3mnl3U90Z3u9HG5zNLfLOyfcjQ5EcoZ3591By9KHGAy4L1YOVIKdm70XqHCY6Xkm00_LBIZRQEjhsrnOLJ84Yxij5gI6n-TrbCyNxubnpRrb1MMSNkziK5mWFulYMC9p_fppWTDKGcog4s4mS6pg4emCBStPiN2TG4WER_T0oV6aYf9GKrAhZEy_7PhQcRxVFb2oe885iM-GPNXbWfzu4lAc_O7TNAi3aZtcPvBFSkfzPk8e7kVkAA\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646/verify?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc/verify?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -336,7 +376,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:13 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -344,17 +384,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "14", - "x-ms-request-id" : "f7d437f8-9b0a-42d2-99b2-962b0d360f7b", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "adf3a1d7-44d4-4664-876f-ed2fc89e357a", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"value\":true}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeySignVerify?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -363,7 +404,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:13 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:37 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -371,17 +412,46 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "807", - "x-ms-request-id" : "440da0c0-da98-49d3-92a5-d1589621264d", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify\",\"deletedDate\":1565078534,\"scheduledPurgeDate\":1572854534,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1565078533,\"updated\":1565078533,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "x-ms-request-id" : "68e82a91-06f6-4a5a-8808-9bc76555580a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify\",\"deletedDate\":1571350718,\"scheduledPurgeDate\":1579126718,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1571350717,\"updated\":1571350717,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 17 Oct 2019 22:18:38 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "7d4c2d4b-8e29-4344-a6a8-bb2a1ab05f97", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeySignVerify\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -390,7 +460,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 08:02:13 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:40 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -398,17 +468,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "88", - "x-ms-request-id" : "ae165d65-667c-49fa-9f27-b0e82e1c61b4", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "04b2e2bb-ecb3-42e9-af57-306a3a417c73", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeySignVerify\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -417,7 +488,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 08:02:16 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:42 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -425,17 +496,130 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "88", - "x-ms-request-id" : "5072e633-11c5-4c9f-8244-43f003ac97a6", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "069ec553-7522-4aa9-9993-5568fecda38e", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeySignVerify\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 17 Oct 2019 22:18:44 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "7feb1f55-4f69-4bee-8ee4-0cab264d3307", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeySignVerify\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 17 Oct 2019 22:18:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "52ac9f3d-9330-41d4-a0d2-7102d09ef612", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeySignVerify\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 17 Oct 2019 22:18:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "e7de9566-9283-4c50-8a54-864248f452ef", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeySignVerify\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 17 Oct 2019 22:18:50 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "771313e6-3b65-45b3-b7d9-595a7fe9a999", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeySignVerify\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -444,7 +628,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 08:02:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:52 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -452,17 +636,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "807", - "x-ms-request-id" : "88293fc6-ee52-44c7-80dd-80517bf37e56", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify\",\"deletedDate\":1565078534,\"scheduledPurgeDate\":1572854534,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/dcd6a6e47f504485a450b38f83bcc646\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1565078533,\"updated\":1565078533,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "x-ms-request-id" : "d2ceed12-9811-4fab-a014-cd5da36209f1", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify\",\"deletedDate\":1571350718,\"scheduledPurgeDate\":1579126718,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeySignVerify/4d6d1160384c418ea5925269b0685bcc\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1571350717,\"updated\":1571350717,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -471,22 +656,23 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Tue, 06 Aug 2019 08:02:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:52 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "ce3a8d54-36aa-45ba-b3fa-234e1d8044f2", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "9f2a95b5-216e-46d7-9828-15e1f27b55d5", + "x-ms-keyvault-service-version" : "1.1.0.879", "X-Powered-By" : "ASP.NET" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeySignVerify?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -495,7 +681,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 08:02:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:18:52 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -503,12 +689,13 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "88", - "x-ms-request-id" : "91d79062-fcf2-4570-8793-dd96d7cda986", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "6feedba7-2afe-49da-8feb-2e736f7aefe4", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeySignVerify\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/wrapUnwraptRsa.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/wrapUnwraptRsa.json index d2857b01d3cd..9de3fcf60b6b 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/wrapUnwraptRsa.json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/wrapUnwraptRsa.json @@ -3,7 +3,7 @@ "Method" : "PUT", "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -12,7 +12,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:04 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:09 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -20,17 +20,46 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "666", - "x-ms-request-id" : "19807c34-9fed-4593-9fac-a064ad42f2c7", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1565067905,\"updated\":1565067905,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "x-ms-request-id" : "d4bcb9e9-85a7-4e9f-a681-6b45cdd15bd9", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1571350630,\"updated\":1571350630,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:17:09 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "666", + "x-ms-request-id" : "cff1944d-7fcc-49ea-ad80-9c204c536469", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1571350630,\"updated\":1571350630,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596/unwrapkey?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40/unwrapkey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -39,7 +68,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:04 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:09 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -47,17 +76,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "249", - "x-ms-request-id" : "7db9af63-b9f4-461f-a840-b65300a01133", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", + "x-ms-request-id" : "2078f821-d1b9-4737-a7f1-bca2c8899359", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596/wrapkey?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40/wrapkey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -66,7 +96,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:04 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:10 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -74,17 +104,46 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "457", - "x-ms-request-id" : "3c4972ad-35be-4067-93ff-b47bfa996080", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596\",\"value\":\"o3r6EuT5M8me6TdyhkkB0TnHxs_T3HJm-ucQ2hJgCZ7d6dt5CgN9v2trxBqjbsB79kyRpPbDgvdbgIhVOuLoYYdQLIw-HmJOd2OA8kj10WmHwYe-_Tr0vq9uOh1g--mbA4gtoKddsAXOHSvrfLUfUTS_O3hMmvj4qlEVGIdb5yOn1avG7XAu64apN4jzHONP3oj3eA4gUTcTEVDFUk18Sw3j3RQuNZQqd9FAOjg-uGLHeoHwXKkIQ30V0cBaW5yWhi_M5jndYbee7COBtsauvrVvq0V9Q7jaGTL-kIM5tiKxr--UTIxcQpN-u_b9MUt94a9ep6pccMeK3iaxLRa-Sg\"}", + "x-ms-request-id" : "334217ff-8b79-419e-a27a-e17c16c9f3ed", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"value\":\"V6zh2wocmB0iWleEOelLXPyPLfQGc8FkCn-q3mj_D4f0he8eCVNLiuGb6-__LSjMh09saCNa91vhaeLKTT-zmY2FAr9Cu8D6-FMIvuTjieM9zrf_mPJMRdNxEPjC5977OQEO9HmJ-O52kZbWu3slHu2Fc8KHUl5hY5N5_LHK1fLMapCDAROwIhsjU1flb6gsq4RZtrqJu7gugfkn213RWGm9RfSJiza0BtJCneZ7aZefRGpaeBIaxfqBcc8xL87lx1lJ7gNUBXz-6sjgHF2L6UYR6W39-SF2MmYg6gO-LBIATHhoKwkhmm7RzgkJos1zSIQQPpmA_TWnc8O56_x1yw\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40/unwrapkey?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:17:10 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "249", + "x-ms-request-id" : "9e144f8c-0886-4798-8d8d-cc6d39e341f3", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596/unwrapkey?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40/unwrapkey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -93,7 +152,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:04 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:10 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -101,17 +160,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "249", - "x-ms-request-id" : "bf42e341-6dab-4588-b980-92449a4a5af2", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", + "x-ms-request-id" : "46f9a4e0-36a5-460c-b01f-60e354dd32b5", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596/wrapkey?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40/wrapkey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -120,7 +180,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:04 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:10 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -128,17 +188,46 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "457", - "x-ms-request-id" : "b1c165f7-a98a-4880-b4f5-c03ce19c6004", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596\",\"value\":\"U2Sg-6qTuk3du7PcYBHA9AbxvMDGTFKRsmYMbLNE8OZDyKlJTcqBGjhEJXXZsRnNcpo8hu1X8haVEUvoDFv5Cmg1t4PISjUz5Sa-18FDmh4S2DgSalKImonLHpWawHhsU0w-MMFitTu9zhhI7v5sHUqI_at9mUv8_AKK3DWTUV4dLnuGYS1m2nK8KSVr9ece2CciRHmMMvqMLDFhQoq2bp65oJ1PkPmUQj6gBzauW77vlcJQQDX7tXIM8Az1YQG1yxwEvYwVGq-FqT5O5PWtfQgbHK3gGBgQ0AGx1MttCP-1wMmmSTiTT1-kbPSgcx77XFrJ_SY_HGKP171j991LdA\"}", + "x-ms-request-id" : "f1792b9b-54a4-4d6b-801a-e172bd2fe366", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"value\":\"RlDGi95b61Ux32mAPAembklzm5ycJu-WaKLYlVs87h9rAqKoOZ7sk-ZiqYKO2_J3BfHzoKwFd2x67k6zyP3bXD8mnkbRBdciymTaSdUAugooNVGGiPrkfjYW1kQlOZyVFL5EdBdquvvzXSL-sWxwnwZfrNT0CLjnBPuxMWaNfFwgeqz4zIKgJzhVK91z2tkTyBxWlGs683T3VSjKbG1JDLdqgA5IhjYRtC8xwUZ5iPi_YhaIwqocqQFnvXfY7sUYn7fEXlbznE1t1lKykPKh6NbpNiCLkuuFzIk2rA5JF0OMqk3InEIYs9TkjQOImILCaQEZ_81EXdKWFD903qDYpQ\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40/unwrapkey?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 17 Oct 2019 22:17:10 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "249", + "x-ms-request-id" : "ea7e9658-f780-4828-a2b3-b3d45487c98f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596/wrapkey?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40/wrapkey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -147,7 +236,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:05 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:10 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -155,17 +244,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "457", - "x-ms-request-id" : "afcf9de4-a06a-49b2-8146-e13ee22efacc", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596\",\"value\":\"VoXFr1CMmPS-nODyeHLbckO21Yvs2izzC6ro6tB3rGPcQ8lHpEY2ZF4JbI8xuoCUdB6PJjMkWMo1O2h8HPVHGznfV-W6ce051W_p9nsstAs8ahP5Vc6PkxOwkIebYUjZWt6L-suzzLd_Uvb2T5P_xQPrL_kUJkGuxQsQgwGd8smy5k7YuV96sZ5v7szcB8OiYXiUpYZjI5prBNuEnGFYvVF0QPgILgDWDRL3qHPl1RSWn0iiGHkFFu9bivhjmKO2m49ScqRuO5FCW4-RgxYRnvFxNWjQChG0wfY-2gtLd8xKsziA4z7yiLn2_dGvC9kuA_list_R_LmFrpRjypf12g\"}", + "x-ms-request-id" : "d2b5de34-0abf-49c7-892d-fa2692935f17", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"value\":\"kCIwG7RwfI2KXIYBFLi2Cq45_Yu0sw5jGvWfUMWnGvNL7Gef4_ZPCEvQBFgoeiPkYS48OVEhnesDAc8tncdV37qNkJBjSfYDyBaeGTWvagLsEUpL1-oc-_z-aFROZpe9P8weBrtr6TQ-69kHnGDGNoEJCeFQht1k600hqIMBqwJM1e966VbY57Wy0zK_k35kogAaKgdJcIaqWOTcvoDivk8GTOlS87RzY1JTceUR2R0JEBNkHtUOw-VM1ukbT4HPtGAmpvIBX3bIaQFG4_kf9HGbtwQl6KXyYoS5361beZBO6oQgNQoGSxyyJ80eiSlr82cdBhJwik7beVpX-m_RHw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596/unwrapkey?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40/unwrapkey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -174,7 +264,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:05 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:10 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -182,17 +272,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "249", - "x-ms-request-id" : "73b9e0c3-33ca-4d1e-89f1-8f79d15deae0", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", + "x-ms-request-id" : "a9348c29-5078-47b2-b33c-887c2ed04dd8", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596/wrapkey?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40/wrapkey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -201,7 +292,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:05 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:10 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -209,17 +300,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "457", - "x-ms-request-id" : "79f862a1-cf69-4639-a94b-67a4f6af07ac", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596\",\"value\":\"LmUdngYH9D84bzKRwyTiVDoYr9R_3UjH-A2YjJEJGqfZ6TgK6ghZXxQAEgL3Aij_EQ0U2b9fBwFcxkSTk5Ge6GrI7Ztrr-G5-DB30CkAHyVmlTkf55ccjmZ-vFSuPXyorYPWn92bv8pXk95mpfJS2cmaRScYpG-FZ_0QDTeFCoAWCWM39kjwSvevPyx6syTGL3IE8xLqtQzeTBAA4kz03jtCDvPdqJYYvPFBMjSQhDDNsVW5JleypKMAm0lPXf1NK2QLn5-BzUCV8jtHMcm_tKQi1S6vg7OEvGE_uADOLEIxsemZrtvxO7d6mlds31qMuaQyumQt5dVSoMvIB9CNtQ\"}", + "x-ms-request-id" : "f1723005-0e76-4afe-a350-3ad2bb643236", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"value\":\"eP8YpUT2HlFYc9sNJwvHmcqwBqxCZxnymEhXcT6E0svWt10iTY1zbUL4MSXLPGCyYM9E4KZSEB9ssfkQ18NwCTIDGbbwc0PdiuoHMuY8VAQBNliTTaKZFlSeKFrVrwSK_bH9yN8Ei9sIoyLqyN0489uNxelTWuiPjDoY2ohQhdteN3J-l4YSDjFtm-fiJKkh_3MFSmoHbcA1vnJ8qKwiSEfQNO8VDZX0V6tN_uMwmsRLK9KdUVlj_0IL9jp8nKYkm42YgA4nu5aMWz2Js0elpvHSkenWCrzjY3ygxiRCCfMju3fdOMmBpwIRNHDNrIOFkKEPKvTueRI3ZlwgAhI7jA\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596/unwrapkey?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40/unwrapkey?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -228,7 +320,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:05 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:10 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -236,17 +328,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "249", - "x-ms-request-id" : "9cdc90aa-4aca-4696-8d6e-a1820df5e131", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", + "x-ms-request-id" : "687da3c7-d57e-4a40-bd95-3630ca9220aa", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"value\":\"G9GT23aoJ9lUS5WtxwlS9igODCiTObv_Z7U9HhTbk99t_24WdBcngS2ycvtJ7_VQ6ESEKt1QdoI8UMRwh2UOMalPrw1leEgbwgpOtCPjmzCk2fhuxCHyinA3x0iGnD2jyYaXiw\"}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -255,7 +348,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:05 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:10 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -263,17 +356,74 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "807", - "x-ms-request-id" : "80c907cc-0b80-440a-ba57-890f4505827f", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap\",\"deletedDate\":1565067906,\"scheduledPurgeDate\":1572843906,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1565067905,\"updated\":1565067905,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "x-ms-request-id" : "2b577250-de2c-41af-a02c-c00be71370e9", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap\",\"deletedDate\":1571350631,\"scheduledPurgeDate\":1579126631,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1571350630,\"updated\":1571350630,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 17 Oct 2019 22:17:10 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "36492b24-ba1b-44e0-bbe5-4526d77c73d1", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeyWrapUnwrap\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 17 Oct 2019 22:17:12 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "88", + "x-ms-request-id" : "9cbe9db6-be95-40a1-b2cc-6a6a377b0d49", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeyWrapUnwrap\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -282,7 +432,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:05 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:15 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -290,17 +440,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "88", - "x-ms-request-id" : "f2eb4e92-4def-4565-abe0-d4912f591a20", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "557da0e8-98af-4dec-8810-e25cd2b25541", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeyWrapUnwrap\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -309,7 +460,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:08 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:17 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -317,17 +468,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "88", - "x-ms-request-id" : "88fe746d-d5ec-405a-92cb-0a0fb0393f33", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "bf0ca0cf-b8e3-4364-909b-c9fd516c2b37", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeyWrapUnwrap\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -336,7 +488,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:10 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:19 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -344,17 +496,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "88", - "x-ms-request-id" : "de43892e-92cc-4492-8557-de3f75203f8d", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "efdbb539-feee-477b-aeb8-1cb0082b5179", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeyWrapUnwrap\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -363,7 +516,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:12 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:21 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -371,17 +524,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "88", - "x-ms-request-id" : "783f3db8-44dd-409f-b296-b910784a3b07", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "2edc2ad5-763e-43dc-a95e-be1dfdd116be", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeyWrapUnwrap\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -390,7 +544,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:14 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:23 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -398,17 +552,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "88", - "x-ms-request-id" : "f8b77156-60ab-427c-b853-2f350080b0cc", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "9401fedf-be31-4faa-845e-203f35933975", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeyWrapUnwrap\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -417,7 +572,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:16 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:25 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -425,17 +580,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "88", - "x-ms-request-id" : "a83346a8-8915-4965-98d5-ca2c6f4fb249", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "fcc59146-76a1-4ad2-8eb1-f288ce2ac490", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeyWrapUnwrap\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -444,7 +600,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 06 Aug 2019 05:05:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:27 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -452,17 +608,18 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "807", - "x-ms-request-id" : "900d0469-9ffa-4d57-8496-15e691d0b835", - "x-ms-keyvault-service-version" : "1.1.0.875", - "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap\",\"deletedDate\":1565067906,\"scheduledPurgeDate\":1572843906,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/3fe4a2a45118463aae244c367f736596\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1565067905,\"updated\":1565067905,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "x-ms-request-id" : "f2df89c5-5932-4bf2-ba12-a0f6dabd0a59", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap\",\"deletedDate\":1571350631,\"scheduledPurgeDate\":1579126631,\"key\":{\"kid\":\"https://cameravault.vault.azure.net/keys/testRsaKeyWrapUnwrap/2e2385702ac843a4a6323bb65430dc40\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1571350630,\"updated\":1571350630,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -471,22 +628,23 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Tue, 06 Aug 2019 05:05:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:27 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", "x-ms-keyvault-region" : "centralus", "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "ff513db1-2278-442a-b7bd-c17f1f5e5325", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "0b13cbdb-8c3e-47f4-8d29-3f933ad503c7", + "x-ms-keyvault-service-version" : "1.1.0.879", "X-Powered-By" : "ASP.NET" - } + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "https://cameravault.vault.azure.net/deletedkeys/testRsaKeyWrapUnwrap?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0 azsdk-java-Azure-Keyvault/4.0.0-preview.2 1.8.0_211; Windows 10 10.0", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.6 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { @@ -495,7 +653,7 @@ "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "Date" : "Tue, 06 Aug 2019 05:05:18 GMT", + "Date" : "Thu, 17 Oct 2019 22:17:28 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", "X-AspNet-Version" : "4.0.30319", @@ -503,12 +661,13 @@ "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", "Expires" : "-1", "Content-Length" : "88", - "x-ms-request-id" : "f4c689f1-e38e-4ef6-bf65-3cf3b643b54f", - "x-ms-keyvault-service-version" : "1.1.0.875", + "x-ms-request-id" : "fbd6ee21-d316-45f8-ad8a-99bdef0c913b", + "x-ms-keyvault-service-version" : "1.1.0.879", "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: testRsaKeyWrapUnwrap\"}}", "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" - } + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-secrets/README.md b/sdk/keyvault/azure-security-keyvault-secrets/README.md index d75e13adc4cb..ea21ac956ffe 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/README.md +++ b/sdk/keyvault/azure-security-keyvault-secrets/README.md @@ -129,7 +129,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.SecretClient; SecretClient client = new SecretClientBuilder() - .endpoint() + .vaultUrl() .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); ``` @@ -167,11 +167,11 @@ import com.azure.security.keyvault.secrets.SecretClient; import com.azure.security.keyvault.secrets.models.Secret; SecretClient secretClient = new SecretClientBuilder() - .endpoint() + .vaultUrl() .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); -Secret secret = secretClient.setSecret("secret_name", "secret_value"); +KeyVaultSecret secret = secretClient.setSecret("secret_name", "secret_value"); System.out.printf("Secret is created with name %s and value %s \n", secret.getName(), secret.getValue()); ``` @@ -179,7 +179,7 @@ System.out.printf("Secret is created with name %s and value %s \n", secret.getNa Retrieve a previously stored Secret by calling `getSecret`. ```Java -Secret secret = secretClient.getSecret("secret_name"); +KeyVaultSecret secret = secretClient.getSecret("secret_name"); System.out.printf("Secret is returned with name %s and value %s \n", secret.getName(), secret.getValue()); ``` @@ -188,19 +188,36 @@ System.out.printf("Secret is returned with name %s and value %s \n", secret.getN Update an existing Secret by calling `updateSecret`. ```Java // Get the secret to update. -Secret secret = secretClient.getSecret("secret_name"); +KeyVaultSecret secret = secretClient.getSecret("secret_name"); // Update the expiry time of the secret. -secret.getProperties().setExpires(OffsetDateTime.now().plusDays(30)); +secret.getProperties().setExpiresOn(OffsetDateTime.now().plusDays(30)); SecretProperties updatedSecretProperties = secretClient.updateSecretProperties(secret.getProperties()); -System.out.printf("Secret's updated expiry time %s \n", updatedSecretProperties.getExpires().toString()); +System.out.printf("Secret's updated expiry time %s \n", updatedSecretProperties.getExpiresOn().toString()); ``` ### Delete a Secret Delete an existing Secret by calling `deleteSecret`. ```Java -DeletedSecret deletedSecret = client.deleteSecret("secret_name"); -System.out.printf("Deleted Secret's deletion date %s", deletedSecret.getDeletedDate().toString()); +Poller deletedSecretPoller = secretClient.beginDeleteSecret("secretName"); + +while (deletedSecretPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS + && !deletedSecretPoller.isComplete()) { + System.out.println(deletedSecretPoller.getStatus().toString()); + Thread.sleep(2000); +} + +// Deleted Secret is accessible as soon as polling begins +DeletedSecret deletedSecret = deletedSecretPoller.getLastPollResponse().getValue(); +System.out.println("Deleted Date %s" + deletedSecret.getDeletedOn().toString()); +System.out.printf("Deleted Secret's deletion date %s", deletedSecret.getDeletedOn().toString()); + +// Ensure Secret gets completely deleted on the server. +while (!deletedSecretPoller.isComplete()) { + System.out.println("Delete Status" + deletedSecretPoller.getStatus().toString()); + Thread.sleep(2000); +} +System.out.println("Delete Status " + deletedSecretPoller.getStatus().toString()); ``` ### List Secrets @@ -208,8 +225,8 @@ System.out.printf("Deleted Secret's deletion date %s", deletedSecret.getDeletedD List the secrets in the key vault by calling `listSecrets`. ```Java // List operations don't return the secrets with value information. So, for each returned secret we call getSecret to get the secret with its value information. -for (SecretProperties secretProperties : client.listSecrets()) { - Secret secretWithValue = client.getSecret(secretProperties); +for (SecretProperties secretProperties : client.listPropertiesOfSecrets()) { + KeyVaultSecret secretWithValue = client.getSecret(secretProperties.getName(), secretProperties.getVersion()); System.out.printf("Received secret with name %s and value %s \n", secretWithValue.getName(), secretWithValue.getValue()); } ``` @@ -234,7 +251,7 @@ import com.azure.security.keyvault.secrets.SecretAsyncClient; import com.azure.security.keyvault.secrets.models.Secret; SecretAsyncClient secretAsyncClient = new SecretClientBuilder() - .endpoint() + .vaultUrl() .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); @@ -257,9 +274,9 @@ Update an existing Secret by calling `updateSecret`. ```Java secretAsyncClient.getSecret("secretName").subscribe(secret -> { // Update the expiry time of the secret. - secret.getProperties().setExpires(OffsetDateTime.now().plusDays(50)); + secret.getProperties().setExpiresOn(OffsetDateTime.now().plusDays(50)); secretAsyncClient.updateSecretProperties(secret.getProperties()).subscribe(updatedSecretProperties -> - System.out.printf("Secret's updated expiry time %s \n", updatedSecretProperties.getExpires().toString())); + System.out.printf("Secret's updated expiry time %s \n", updatedSecretProperties.getExpiresOn().toString())); }); ``` @@ -267,8 +284,13 @@ secretAsyncClient.getSecret("secretName").subscribe(secret -> { Delete an existing Secret by calling `deleteSecret`. ```Java -secretAsyncClient.deleteSecret("secretName").subscribe(deletedSecret -> - System.out.printf("Deleted Secret's deletion time %s \n", deletedSecret.getDeletedDate().toString())); +secretAsyncClient.beginDeleteSecret("secretName") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Deleted Secret Name: " + pollResponse.getValue().getName()); + System.out.println("Deleted Secret Value: " + pollResponse.getValue().getValue()); + }); ``` ### List Secrets Asynchronously @@ -276,9 +298,11 @@ secretAsyncClient.deleteSecret("secretName").subscribe(deletedSecret -> List the secrets in the key vault by calling `listSecrets`. ```Java // The List Secrets operation returns secrets without their value, so for each secret returned we call `getSecret` to get its // value as well. -secretAsyncClient.listSecrets() - .flatMap(secretAsyncClient::getSecret).subscribe(secret -> - System.out.printf("Secret with name %s , value %s \n", secret.getName(), secret.getValue())); +secretAsyncClient.listPropertiesOfSecrets() + .subscribe(secretProperties -> secretAsyncClient + .getSecret(secretProperties.getName(), secretProperties.getVersion()) + .subscribe(secretResponse -> System.out.printf("Received secret with name %s and value %s", + secretResponse.getName(), secretResponse.getValue()))); ``` ## Troubleshooting diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretAsyncClient.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretAsyncClient.java index 9ff8c08e138c..7785c882b5dc 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretAsyncClient.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretAsyncClient.java @@ -16,15 +16,21 @@ import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; import com.azure.security.keyvault.secrets.models.DeletedSecret; -import com.azure.security.keyvault.secrets.models.Secret; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.security.keyvault.secrets.models.SecretProperties; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import java.net.HttpURLConnection; import java.net.URL; +import java.time.Duration; import java.util.Objects; import java.util.function.Function; +import java.util.function.Supplier; + import com.azure.core.exception.ResourceNotFoundException; import com.azure.core.exception.ResourceModifiedException; import com.azure.core.exception.HttpRequestException; @@ -33,9 +39,9 @@ import static com.azure.core.implementation.util.FluxUtil.withContext; /** - * The SecretAsyncClient provides asynchronous methods to manage {@link Secret secrets} in the Azure Key Vault. The + * The SecretAsyncClient provides asynchronous methods to manage {@link KeyVaultSecret secrets} in the Azure Key Vault. The * client supports creating, retrieving, updating, deleting, purging, backing up, restoring and listing the {@link - * Secret secrets}. The client also supports listing {@link DeletedSecret deleted secrets} for a soft-delete enabled + * KeyVaultSecret secrets}. The client also supports listing {@link DeletedSecret deleted secrets} for a soft-delete enabled * Azure Key Vault. * *

    Samples to construct the async client

    @@ -52,29 +58,37 @@ public final class SecretAsyncClient { static final String CONTENT_TYPE_HEADER_VALUE = "application/json"; static final String KEY_VAULT_SCOPE = "https://vault.azure.net/.default"; - private final String endpoint; + private final String vaultUrl; private final SecretService service; private final ClientLogger logger = new ClientLogger(SecretAsyncClient.class); /** * Creates a SecretAsyncClient that uses {@code pipeline} to service requests * - * @param endpoint URL for the Azure KeyVault service. + * @param vaultUrl URL for the Azure KeyVault service. * @param pipeline HttpPipeline that the HTTP requests and responses flow through. * @param version {@link SecretServiceVersion} of the service to be used when making requests. */ - SecretAsyncClient(URL endpoint, HttpPipeline pipeline, SecretServiceVersion version) { - Objects.requireNonNull(endpoint, + SecretAsyncClient(URL vaultUrl, HttpPipeline pipeline, SecretServiceVersion version) { + Objects.requireNonNull(vaultUrl, KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED)); - this.endpoint = endpoint.toString(); + this.vaultUrl = vaultUrl.toString(); this.service = RestProxy.create(SecretService.class, pipeline); } + /** + * Get the vault endpoint url to which service requests are sent to. + * @return the vault endpoint url + */ + public String getVaultUrl() { + return vaultUrl; + } + /** * The set operation adds a secret to the key vault. If the named secret already exists, Azure Key Vault creates * a new version of that secret. This operation requires the {@code secrets/set} permission. * - *

    The {@link Secret} is required. The {@link SecretProperties#getExpires() expires}, + *

    The {@link KeyVaultSecret} is required. The {@link SecretProperties#getExpiresOn() expires}, * {@link SecretProperties#getContentType() contentType} and {@link SecretProperties#getNotBefore() notBefore} * values in {@code secret} are optional. The {@link SecretProperties#isEnabled() enabled} field is set to true * by key vault, if not specified.

    @@ -86,13 +100,13 @@ public final class SecretAsyncClient { * * @param secret The Secret object containing information about the secret and its properties. The properties * secret.name and secret.value must be non null. - * @return A {@link Mono} containing the {@link Secret created secret}. + * @return A {@link Mono} containing the {@link KeyVaultSecret created secret}. * @throws NullPointerException if {@code secret} is {@code null}. * @throws ResourceModifiedException if {@code secret} is malformed. - * @throws HttpRequestException if {@link Secret#getName() name} or {@link Secret#getValue() value} is empty string. + * @throws HttpRequestException if {@link KeyVaultSecret#getName() name} or {@link KeyVaultSecret#getValue() value} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setSecret(Secret secret) { + public Mono setSecret(KeyVaultSecret secret) { try { return setSecretWithResponse(secret).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { @@ -104,7 +118,7 @@ public Mono setSecret(Secret secret) { * The set operation adds a secret to the key vault. If the named secret already exists, Azure Key Vault creates * a new version of that secret. This operation requires the {@code secrets/set} permission. * - *

    The {@link Secret} is required. The {@link SecretProperties#getExpires() expires}, + *

    The {@link KeyVaultSecret} is required. The {@link SecretProperties#getExpiresOn() expires}, * {@link SecretProperties#getContentType() contentType} and {@link SecretProperties#getNotBefore() notBefore} * values in {@code secret} are optional. The {@link SecretProperties#isEnabled() enabled} field is set to true by * key vault, if not specified.

    @@ -117,13 +131,13 @@ public Mono setSecret(Secret secret) { * @param secret The Secret object containing information about the secret and its properties. The properties * secret.name and secret.value must be non null. * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link - * Secret created secret}. + * KeyVaultSecret created secret}. * @throws NullPointerException if {@code secret} is {@code null}. * @throws ResourceModifiedException if {@code secret} is malformed. - * @throws HttpRequestException if {@link Secret#getName() name} or {@link Secret#getValue() value} is empty string. + * @throws HttpRequestException if {@link KeyVaultSecret#getName() name} or {@link KeyVaultSecret#getValue() value} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setSecretWithResponse(Secret secret) { + public Mono> setSecretWithResponse(KeyVaultSecret secret) { try { return withContext(context -> setSecretWithResponse(secret, context)); } catch (RuntimeException ex) { @@ -131,7 +145,7 @@ public Mono> setSecretWithResponse(Secret secret) { } } - Mono> setSecretWithResponse(Secret secret, Context context) { + Mono> setSecretWithResponse(KeyVaultSecret secret, Context context) { Objects.requireNonNull(secret, "The Secret input parameter cannot be null."); SecretRequestParameters parameters = new SecretRequestParameters() .setValue(secret.getValue()) @@ -139,7 +153,7 @@ Mono> setSecretWithResponse(Secret secret, Context context) { .setContentType(secret.getProperties().getContentType()) .setSecretAttributes(new SecretRequestAttributes(secret.getProperties())); - return service.setSecret(endpoint, secret.getName(), API_VERSION, ACCEPT_LANGUAGE, parameters, + return service.setSecret(vaultUrl, secret.getName(), API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Setting secret - {}", secret.getName())) .doOnSuccess(response -> logger.info("Set secret - {}", response.getValue().getName())) @@ -158,12 +172,12 @@ Mono> setSecretWithResponse(Secret secret, Context context) { * * @param name The name of the secret. It is required and cannot be null. * @param value The value of the secret. It is required and cannot be null. - * @return A {@link Mono} containing the {@link Secret created secret}. + * @return A {@link Mono} containing the {@link KeyVaultSecret created secret}. * @throws ResourceModifiedException if invalid {@code name} or {@code value} are specified. * @throws HttpRequestException if {@code name} or {@code value} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setSecret(String name, String value) { + public Mono setSecret(String name, String value) { try { return withContext(context -> setSecretWithResponse(name, value, context)).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { @@ -171,9 +185,9 @@ public Mono setSecret(String name, String value) { } } - Mono> setSecretWithResponse(String name, String value, Context context) { + Mono> setSecretWithResponse(String name, String value, Context context) { SecretRequestParameters parameters = new SecretRequestParameters().setValue(value); - return service.setSecret(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, + return service.setSecret(vaultUrl, name, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Setting secret - {}", name)) .doOnSuccess(response -> logger.info("Set secret - {}", response.getValue().getName())) @@ -194,13 +208,13 @@ Mono> setSecretWithResponse(String name, String value, Context * call is equivalent to calling {@link #getSecret(String)}, with the latest version being * retrieved. * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} - * contains the requested {@link Secret secret}. + * contains the requested {@link KeyVaultSecret secret}. * @throws ResourceNotFoundException when a secret with {@code name} and {@code version} doesn't * exist in the key vault. * @throws HttpRequestException if {@code name} name} or {@code version} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getSecret(String name, String version) { + public Mono getSecret(String name, String version) { try { return getSecretWithResponse(name, version).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { @@ -221,13 +235,13 @@ public Mono getSecret(String name, String version) { * @param version The version of the secret to retrieve. If this is an empty String or null, this call is equivalent * to calling {@link #getSecret(String)}, with the latest version being retrieved. * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the requested - * {@link Secret secret}. + * {@link KeyVaultSecret secret}. * @throws ResourceNotFoundException when a secret with {@code name} and {@code version} doesn't exist in the key * vault. * @throws HttpRequestException if {@code name} name} or {@code version} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getSecretWithResponse(String name, String version) { + public Mono> getSecretWithResponse(String name, String version) { try { return withContext(context -> getSecretWithResponse(name, version, context)); } catch (RuntimeException ex) { @@ -235,78 +249,14 @@ public Mono> getSecretWithResponse(String name, String version) } } - Mono> getSecretWithResponse(String name, String version, Context context) { - return service.getSecret(endpoint, name, version == null ? "" : version, API_VERSION, ACCEPT_LANGUAGE, + Mono> getSecretWithResponse(String name, String version, Context context) { + return service.getSecret(vaultUrl, name, version == null ? "" : version, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignoredValue -> logger.info("Retrieving secret - {}", name)) .doOnSuccess(response -> logger.info("Retrieved secret - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to get secret - {}", name, error)); } - /** - * Get the secret which represents {@link SecretProperties secretProperties} from the key vault. The get - * operation is applicable to any secret stored in Azure Key Vault. This operation requires the - * {@code secrets/get} permission. - * - *

    The list operations {@link SecretAsyncClient#listSecrets()} and {@link - * SecretAsyncClient#listSecretVersions(String)} return the {@link Flux} containing {@link SecretProperties secret properties} - * as output. This operation can then be used to get the full secret with its value from {@code secretProperties}.

    - * - *

    Code Samples

    - * {@codesnippet com.azure.keyvault.secrets.secretclient.getSecret#secretProperties} - * - * @param secretProperties The {@link SecretProperties secret properties} holding attributes of the secret being - * requested. - * @return A {@link Mono} containing the requested {@link Secret secret}. - * @throws ResourceNotFoundException when a secret with {@link SecretProperties#getName() name} and {@link - * SecretProperties#getVersion() version} doesn't exist in the key vault. - * @throws HttpRequestException if {@link SecretProperties#getName()} name} or {@link SecretProperties#getVersion() version} is empty - * string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getSecret(SecretProperties secretProperties) { - try { - return getSecretWithResponse(secretProperties).flatMap(FluxUtil::toMono); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Get the secret which represents {@link SecretProperties secretProperties} from the key vault. The get - * operation is applicable to any secret stored in Azure Key Vault. This operation requires the - * {@code secrets/get} permission. - * - *

    The list operations {@link SecretAsyncClient#listSecrets()} and {@link - * SecretAsyncClient#listSecretVersions(String)} return the {@link Flux} containing {@link SecretProperties secret properties} - * as output. This operation can then be used to get the full secret with its value from {@code secretProperties}.

    - * - *

    Code Samples

    - * {@codesnippet com.azure.keyvault.secrets.secretclient.getSecretWithResponse#secretProperties} - * - * @param secretProperties The {@link SecretProperties secret properties} holding attributes of the secret being - * requested. - * @return A {@link Response} whose {@link Response#getValue() value} contains the requested {@link Secret secret}. - * @throws ResourceNotFoundException when a secret with {@link SecretProperties#getName() name} and {@link - * SecretProperties#getVersion() version} doesn't exist in the key vault. - * @throws HttpRequestException if {@link SecretProperties#getName()} name} or {@link SecretProperties#getVersion() version} is empty - * string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getSecretWithResponse(SecretProperties secretProperties) { - try { - return withContext(context -> getSecretWithResponse(secretProperties, context)); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - Mono> getSecretWithResponse(SecretProperties secretProperties, Context context) { - Objects.requireNonNull(secretProperties, "The Secret Base parameter cannot be null."); - return getSecretWithResponse(secretProperties.getName(), secretProperties.getVersion() == null ? "" : secretProperties.getVersion(), - context); - } - /** * Get the latest version of the specified secret from the key vault. The get operation is applicable to any secret * stored in Azure Key Vault. @@ -318,12 +268,12 @@ Mono> getSecretWithResponse(SecretProperties secretProperties, * {@codesnippet com.azure.keyvault.secrets.secretclient.getSecret#string} * * @param name The name of the secret. - * @return A {@link Mono} containing the requested {@link Secret secret}. + * @return A {@link Mono} containing the requested {@link KeyVaultSecret secret}. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException if {@code name} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getSecret(String name) { + public Mono getSecret(String name) { try { return getSecretWithResponse(name, "").flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { @@ -401,7 +351,7 @@ Mono> updateSecretPropertiesWithResponse(SecretProper .setContentType(secretProperties.getContentType()) .setSecretAttributes(new SecretRequestAttributes(secretProperties)); - return service.updateSecret(endpoint, secretProperties.getName(), secretProperties.getVersion(), API_VERSION, ACCEPT_LANGUAGE, + return service.updateSecret(vaultUrl, secretProperties.getName(), secretProperties.getVersion(), API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Updating secret - {}", secretProperties.getName())) .doOnSuccess(response -> logger.info("Updated secret - {}", response.getValue().getName())) @@ -420,47 +370,39 @@ Mono> updateSecretPropertiesWithResponse(SecretProper * {@codesnippet com.azure.keyvault.secrets.secretclient.deleteSecret#string} * * @param name The name of the secret to be deleted. - * @return A {@link Mono} containing the {@link DeletedSecret deleted secret}. + * @return A {@link Poller} to poll on and retrieve {@link DeletedSecret deleted secret}. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a secret with {@code name} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteSecret(String name) { - try { - return deleteSecretWithResponse(name).flatMap(FluxUtil::toMono); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } + public Poller beginDeleteSecret(String name) { + return new Poller<>(Duration.ofSeconds(1), createPollOperation(name), () -> Mono.empty(), activationOperation(name), null); } - /** - * Deletes a secret from the key vault. If soft-delete is enabled on the key vault then the secret is placed in the - * deleted state and requires to be purged for permanent deletion else the secret is permanently deleted. The delete - * operation applies to any secret stored in Azure Key Vault but it cannot be applied to an individual version of a - * secret. This operation requires the {@code secrets/delete} permission. - * - *

    Code Samples

    - *

    Deletes the secret in the Azure Key Vault. Subscribes to the call asynchronously and prints out the - * deleted secret details when a response is received.

    - * {@codesnippet com.azure.keyvault.secrets.secretclient.deleteSecretWithResponse#string} - * - * @param name The name of the secret to be deleted. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link - * DeletedSecret deleted secret}. - * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. - * @throws HttpRequestException when a secret with {@code name} is empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteSecretWithResponse(String name) { - try { - return withContext(context -> deleteSecretWithResponse(name, context)); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } + private Supplier> activationOperation(String name) { + return () -> withContext(context -> deleteSecretWithResponse(name, context) + .flatMap(deletedSecretResponse -> Mono.just(deletedSecretResponse.getValue()))); + } + + /* + Polling operation to poll on create delete key operation status. + */ + private Function, Mono>> createPollOperation(String keyName) { + return prePollResponse -> + withContext(context -> service.getDeletedSecretPoller(vaultUrl, keyName, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + .flatMap(deletedSecretResponse -> { + if (deletedSecretResponse.getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND) { + return Mono.defer(() -> Mono.just(new PollResponse<>(PollResponse.OperationStatus.IN_PROGRESS, prePollResponse.getValue()))); + } + return Mono.defer(() -> Mono.just(new PollResponse<>(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED, deletedSecretResponse.getValue()))); + })) + // This means either vault has soft-delete disabled or permission is not granted for the get deleted key operation. + // In both cases deletion operation was successful when activation operation succeeded before reaching here. + .onErrorReturn(new PollResponse<>(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED, prePollResponse.getValue())); } Mono> deleteSecretWithResponse(String name, Context context) { - return service.deleteSecret(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + return service.deleteSecret(vaultUrl, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Deleting secret - {}", name)) .doOnSuccess(response -> logger.info("Deleted secret - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to delete secret - {}", name, error)); @@ -518,7 +460,7 @@ public Mono> getDeletedSecretWithResponse(String name) { } Mono> getDeletedSecretWithResponse(String name, Context context) { - return service.getDeletedSecret(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, + return service.getDeletedSecret(vaultUrl, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Retrieving deleted secret - {}", name)) .doOnSuccess(response -> logger.info("Retrieved deleted secret - {}", response.getValue().getName())) @@ -578,7 +520,7 @@ public Mono> purgeDeletedSecretWithResponse(String name) { } Mono> purgeDeletedSecretWithResponse(String name, Context context) { - return service.purgeDeletedSecret(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, + return service.purgeDeletedSecret(vaultUrl, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Purging deleted secret - {}", name)) .doOnSuccess(response -> logger.info("Purged deleted secret - {}", name)) @@ -598,48 +540,39 @@ Mono> purgeDeletedSecretWithResponse(String name, Context context * {@codesnippet com.azure.keyvault.secrets.secretclient.recoverDeletedSecret#string} * * @param name The name of the deleted secret to be recovered. - * @return A {@link Mono} containing the {@link Secret recovered secret}. + * @return A {@link Poller} to poll on and retrieve the {@link KeyVaultSecret recovered secret}. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a secret with {@code name} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono recoverDeletedSecret(String name) { - try { - return recoverDeletedSecretWithResponse(name).flatMap(FluxUtil::toMono); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } + public Poller beginRecoverDeletedSecret(String name) { + return new Poller<>(Duration.ofSeconds(1), createRecoverPollOperation(name), () -> Mono.empty(), recoverActivationOperation(name), null); } - /** - * Recovers the deleted secret in the key vault to its latest version and can only be performed on a soft-delete - * enabled vault. - * This operation requires the {@code secrets/recover} permission. - * - *

    Code Samples

    - *

    Recovers the deleted secret from the key vault enabled for soft-delete. Subscribes to the call asynchronously - * and prints out the recovered secret details when a response is received.

    - * - * //Assuming secret is deleted on a soft-delete enabled vault. - * {@codesnippet com.azure.keyvault.secrets.secretclient.recoverDeletedSecretWithResponse#string} - * - * @param name The name of the deleted secret to be recovered. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the {@link - * Secret recovered secret}. - * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. - * @throws HttpRequestException when a secret with {@code name} is empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> recoverDeletedSecretWithResponse(String name) { - try { - return withContext(context -> recoverDeletedSecretWithResponse(name, context)); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } + private Supplier> recoverActivationOperation(String name) { + return () -> withContext(context -> recoverDeletedSecretWithResponse(name, context) + .flatMap(keyResponse -> Mono.just(keyResponse.getValue()))); } - Mono> recoverDeletedSecretWithResponse(String name, Context context) { - return service.recoverDeletedSecret(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, + /* + Polling operation to poll on create delete key operation status. + */ + private Function, Mono>> createRecoverPollOperation(String secretName) { + return prePollResponse -> + withContext(context -> service.getSecretPoller(vaultUrl, secretName, "", API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + .flatMap(secretResponse -> { + if (secretResponse.getStatusCode() == 404) { + return Mono.defer(() -> Mono.just(new PollResponse<>(PollResponse.OperationStatus.IN_PROGRESS, prePollResponse.getValue()))); + } + return Mono.defer(() -> Mono.just(new PollResponse<>(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED, secretResponse.getValue()))); + })) + // This means permission is not granted for the get deleted key operation. + // In both cases deletion operation was successful when activation operation succeeded before reaching here. + .onErrorReturn(new PollResponse<>(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED, prePollResponse.getValue())); + } + + Mono> recoverDeletedSecretWithResponse(String name, Context context) { + return service.recoverDeletedSecret(vaultUrl, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Recovering deleted secret - {}", name)) .doOnSuccess(response -> logger.info("Recovered deleted secret - {}", response.getValue().getName())) @@ -696,7 +629,7 @@ public Mono> backupSecretWithResponse(String name) { } Mono> backupSecretWithResponse(String name, Context context) { - return service.backupSecret(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + return service.backupSecret(vaultUrl, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Backing up secret - {}", name)) .doOnSuccess(response -> logger.info("Backed up secret - {}", name)) .doOnError(error -> logger.warning("Failed to back up secret - {}", name, error)) @@ -716,13 +649,13 @@ Mono> backupSecretWithResponse(String name, Context context) { * {@codesnippet com.azure.keyvault.secrets.secretclient.restoreSecret#byte} * * @param backup The backup blob associated with the secret. - * @return A {@link Mono} containing the {@link Secret restored secret}. + * @return A {@link Mono} containing the {@link KeyVaultSecret restored secret}. * @throws ResourceModifiedException when {@code backup} blob is malformed. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono restoreSecret(byte[] backup) { + public Mono restoreSecretBackup(byte[] backup) { try { - return restoreSecretWithResponse(backup).flatMap(FluxUtil::toMono); + return restoreSecretBackupWithResponse(backup).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -741,21 +674,21 @@ public Mono restoreSecret(byte[] backup) { * * @param backup The backup blob associated with the secret. * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} - * contains the {@link Secret restored secret}. + * contains the {@link KeyVaultSecret restored secret}. * @throws ResourceModifiedException when {@code backup} blob is malformed. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> restoreSecretWithResponse(byte[] backup) { + public Mono> restoreSecretBackupWithResponse(byte[] backup) { try { - return withContext(context -> restoreSecretWithResponse(backup, context)); + return withContext(context -> restoreSecretBackupWithResponse(backup, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> restoreSecretWithResponse(byte[] backup, Context context) { + Mono> restoreSecretBackupWithResponse(byte[] backup, Context context) { SecretRestoreRequestParameters parameters = new SecretRestoreRequestParameters().setSecretBackup(backup); - return service.restoreSecret(endpoint, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, + return service.restoreSecret(vaultUrl, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Attempting to restore secret")) .doOnSuccess(response -> logger.info("Restored secret - {}", response.getValue().getName())) @@ -771,14 +704,14 @@ Mono> restoreSecretWithResponse(byte[] backup, Context context) *

    Code Samples

    *

    It is possible to get full Secrets with values from this information. Convert the {@link Flux} containing * {@link SecretProperties secret properties} to - * {@link Flux} containing {@link Secret secret} using {@link SecretAsyncClient#getSecret(SecretProperties secretProperties)} + * {@link Flux} containing {@link KeyVaultSecret secret} using {@link SecretAsyncClient#getSecret(String, String)} * within {@link Flux#flatMap(Function)}.

    * {@codesnippet com.azure.keyvault.secrets.secretclient.listSecrets} * * @return A {@link PagedFlux} containing {@link SecretProperties secret} of all the secrets in the vault. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listSecrets() { + public PagedFlux listPropertiesOfSecrets() { try { return new PagedFlux<>( () -> withContext(context -> listSecretsFirstPage(context)), @@ -788,7 +721,7 @@ public PagedFlux listSecrets() { } } - PagedFlux listSecrets(Context context) { + PagedFlux listPropertiesOfSecrets(Context context) { return new PagedFlux<>( () -> listSecretsFirstPage(context), continuationToken -> listSecretsNextPage(continuationToken, context)); @@ -804,7 +737,7 @@ PagedFlux listSecrets(Context context) { */ private Mono> listSecretsNextPage(String continuationToken, Context context) { try { - return service.getSecrets(endpoint, continuationToken, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + return service.getSecrets(vaultUrl, continuationToken, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignoredValue -> logger.info("Retrieving the next secrets page - Page {}", continuationToken)) .doOnSuccess(response -> logger.info("Retrieved the next secrets page - Page {}", continuationToken)) .doOnError(error -> logger.warning("Failed to retrieve the next secrets page - Page {}", @@ -820,7 +753,7 @@ private Mono> listSecretsNextPage(String continu */ private Mono> listSecretsFirstPage(Context context) { try { - return service.getSecrets(endpoint, DEFAULT_MAX_PAGE_RESULTS, API_VERSION, ACCEPT_LANGUAGE, + return service.getSecrets(vaultUrl, DEFAULT_MAX_PAGE_RESULTS, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Listing secrets")) .doOnSuccess(response -> logger.info("Listed secrets")) @@ -871,7 +804,7 @@ PagedFlux listDeletedSecrets(Context context) { */ private Mono> listDeletedSecretsNextPage(String continuationToken, Context context) { try { - return service.getDeletedSecrets(endpoint, continuationToken, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, + return service.getDeletedSecrets(vaultUrl, continuationToken, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignoredValue -> logger.info("Retrieving the next deleted secrets page - Page {}", continuationToken)) @@ -890,7 +823,7 @@ private Mono> listDeletedSecretsNextPage(String con */ private Mono> listDeletedSecretsFirstPage(Context context) { try { - return service.getDeletedSecrets(endpoint, DEFAULT_MAX_PAGE_RESULTS, API_VERSION, ACCEPT_LANGUAGE, + return service.getDeletedSecrets(vaultUrl, DEFAULT_MAX_PAGE_RESULTS, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Listing deleted secrets")) .doOnSuccess(response -> logger.info("Listed deleted secrets")) @@ -906,8 +839,8 @@ private Mono> listDeletedSecretsFirstPage(Context c * are not provided in the response. This operation requires the {@code secrets/list} permission. * *

    It is possible to get the Secret with value of all the versions from this information. Convert the {@link - * Flux} containing {@link SecretProperties secret} to {@link Flux} containing {@link Secret secret} using - * {@link SecretAsyncClient#getSecret(SecretProperties secretProperties)} within {@link Flux#flatMap(Function)}.

    + * Flux} containing {@link SecretProperties secret} to {@link Flux} containing {@link KeyVaultSecret secret} using + * {@link SecretAsyncClient#getSecret(String, String)} within {@link Flux#flatMap(Function)}.

    * * {@codesnippet com.azure.keyvault.secrets.secretclient.listSecretVersions#string} * @@ -918,7 +851,7 @@ private Mono> listDeletedSecretsFirstPage(Context c * @throws HttpRequestException when a secret with {@code name} is empty string. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listSecretVersions(String name) { + public PagedFlux listPropertiesOfSecretVersions(String name) { try { return new PagedFlux<>( () -> withContext(context -> listSecretVersionsFirstPage(name, context)), @@ -928,7 +861,7 @@ public PagedFlux listSecretVersions(String name) { } } - PagedFlux listSecretVersions(String name, Context context) { + PagedFlux listPropertiesOfSecretVersions(String name, Context context) { return new PagedFlux<>( () -> listSecretVersionsFirstPage(name, context), continuationToken -> listSecretVersionsNextPage(continuationToken, context)); @@ -945,7 +878,7 @@ PagedFlux listSecretVersions(String name, Context context) { */ private Mono> listSecretVersionsNextPage(String continuationToken, Context context) { try { - return service.getSecrets(endpoint, continuationToken, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + return service.getSecrets(vaultUrl, continuationToken, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignoredValue -> logger.info("Retrieving the next secrets versions page - Page {}", continuationToken)) .doOnSuccess(response -> logger.info("Retrieved the next secrets versions page - Page {}", @@ -963,7 +896,7 @@ private Mono> listSecretVersionsNextPage(String */ private Mono> listSecretVersionsFirstPage(String name, Context context) { try { - return service.getSecretVersions(endpoint, name, DEFAULT_MAX_PAGE_RESULTS, API_VERSION, ACCEPT_LANGUAGE, + return service.getSecretVersions(vaultUrl, name, DEFAULT_MAX_PAGE_RESULTS, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Listing secret versions - {}", name)) .doOnSuccess(response -> logger.info("Listed secret versions - {}", name)) diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java index a912b93774a8..adb76c151090 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java @@ -10,15 +10,14 @@ import com.azure.core.http.rest.Response; import com.azure.core.annotation.ServiceClient; import com.azure.core.util.Context; +import com.azure.core.util.polling.Poller; import com.azure.security.keyvault.secrets.models.DeletedSecret; -import com.azure.security.keyvault.secrets.models.Secret; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.security.keyvault.secrets.models.SecretProperties; -import java.util.List; - /** - * The SecretClient provides synchronous methods to manage {@link Secret secrets} in the Azure Key Vault. The client - * supports creating, retrieving, updating, deleting, purging, backing up, restoring and listing the {@link Secret + * The SecretClient provides synchronous methods to manage {@link KeyVaultSecret secrets} in the Azure Key Vault. The client + * supports creating, retrieving, updating, deleting, purging, backing up, restoring and listing the {@link KeyVaultSecret * secrets}. The client also supports listing {@link DeletedSecret deleted secrets} for a soft-delete enabled Azure Key * Vault. * @@ -32,6 +31,13 @@ public final class SecretClient { private final SecretAsyncClient client; + /** + * Get the vault endpoint url + * @return the vault endpoint url + */ + public String getVaultUrl() { + return client.getVaultUrl(); + } /** * Creates a SecretClient that uses {@code pipeline} to service requests @@ -46,7 +52,7 @@ public final class SecretClient { * The set operation adds a secret to the Azure Key Vault. If the named secret already exists, a new version of the * secret is created in the key vault. This operation requires the {@code secrets/set} permission. * - *

    The {@link Secret} is required. The {@link SecretProperties#getExpires() expires}, {@link SecretProperties#getContentType() contentType} + *

    The {@link KeyVaultSecret} is required. The {@link SecretProperties#getExpiresOn() expires}, {@link SecretProperties#getContentType() contentType} * and * {@link SecretProperties#getNotBefore() notBefore} values in {@code secret} are optional. The {@link SecretProperties#isEnabled() enabled} * field is set to true by key vault, if not specified.

    @@ -56,12 +62,12 @@ public final class SecretClient { * * @param secret The Secret object containing information about the secret and its properties. The properties * secret.name and secret.value must be non null. - * @return The {@link Secret created secret}. + * @return The {@link KeyVaultSecret created secret}. * @throws NullPointerException if {@code secret} is {@code null}. * @throws ResourceModifiedException if {@code secret} is malformed. - * @throws HttpRequestException if {@link Secret#getName() name} or {@link Secret#getValue() value} is empty string. + * @throws HttpRequestException if {@link KeyVaultSecret#getName() name} or {@link KeyVaultSecret#getValue() value} is empty string. */ - public Secret setSecret(Secret secret) { + public KeyVaultSecret setSecret(KeyVaultSecret secret) { return setSecretWithResponse(secret, Context.NONE).getValue(); } @@ -77,12 +83,12 @@ public Secret setSecret(Secret secret) { * * @param name The name of the secret. It is required and cannot be null. * @param value The value of the secret. It is required and cannot be null. - * @return The {@link Secret created secret}. + * @return The {@link KeyVaultSecret created secret}. * @throws ResourceModifiedException if invalid {@code name} or {@code value} is specified. * @throws HttpRequestException if {@code name} or {@code value} is empty string. */ - public Secret setSecret(String name, String value) { - return setSecretWithResponse(new Secret(name, value), Context.NONE).getValue(); + public KeyVaultSecret setSecret(String name, String value) { + return setSecretWithResponse(new KeyVaultSecret(name, value), Context.NONE).getValue(); } /** @@ -98,11 +104,11 @@ public Secret setSecret(String name, String value) { * @param secret The Secret object containing information about the secret and its properties. The properties * secret.name and secret.value must be non null. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link Secret created secret}. + * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultSecret created secret}. * @throws ResourceModifiedException if invalid {@code name} or {@code value} is specified. * @throws HttpRequestException if {@code name} or {@code value} is empty string. */ - public Response setSecretWithResponse(Secret secret, Context context) { + public Response setSecretWithResponse(KeyVaultSecret secret, Context context) { return client.setSecretWithResponse(secret, context).block(); } @@ -118,60 +124,15 @@ public Response setSecretWithResponse(Secret secret, Context context) { * @param name The name of the secret, cannot be null. * @param version The version of the secret to retrieve. If this is an empty String or null, this call is * equivalent to calling {@link #getSecret(String)}, with the latest version being retrieved. - * @return The requested {@link Secret secret}. + * @return The requested {@link KeyVaultSecret secret}. * @throws ResourceNotFoundException when a secret with {@code name} and {@code version} doesn't exist in the * key vault. * @throws HttpRequestException if {@code name} or {@code version} is empty string. */ - public Secret getSecret(String name, String version) { + public KeyVaultSecret getSecret(String name, String version) { return getSecretWithResponse(name, version, Context.NONE).getValue(); } - /** - * Get the secret which represents {@link SecretProperties secretProperties} from the key vault. The get operation is applicable - * to any secret stored in Azure Key Vault. This operation requires the {@code secrets/get} permission. - * - *

    The list operations {@link SecretClient#listSecrets()} and {@link SecretClient#listSecretVersions(String)} - * return the {@link List} containing {@link SecretProperties secret properties} as output excluding the include the value of - * the secret. - * This operation can then be used to get the full secret with its value from {@code secretProperties}.

    - *

    Code Samples

    - * {@codesnippet com.azure.security.keyvault.secretclient.getSecretWithResponse#secretProperties} - * - * @param secretProperties The {@link SecretProperties secret properties} holding attributes of the secret being requested. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the requested {@link Secret secret}. - * @throws ResourceNotFoundException when a secret with {@link SecretProperties#getName() name} and {@link - * SecretProperties#getVersion() version} doesn't exist in the key vault. - * @throws HttpRequestException if {@link SecretProperties#getName() name} or {@link SecretProperties#getVersion() version} is empty - * string. - */ - public Response getSecretWithResponse(SecretProperties secretProperties, Context context) { - return client.getSecretWithResponse(secretProperties, context).block(); - } - - /** - * Get the secret which represents {@link SecretProperties secretProperties} from the key vault. The get operation is applicable - * to any secret stored in Azure Key Vault. This operation requires the {@code secrets/get} permission. - * - *

    The list operations {@link SecretClient#listSecrets()} and {@link SecretClient#listSecretVersions(String)} - * return the {@link List} containing {@link SecretProperties secret properties} as output excluding the include the value of - * the secret. - * This operation can then be used to get the full secret with its value from {@code secretProperties}.

    - *

    Code Samples

    - * {@codesnippet com.azure.security.keyvault.secretclient.getSecret#secretProperties} - * - * @param secretProperties The {@link SecretProperties secret properties} holding attributes of the secret being requested. - * @return The requested {@link Secret secret}. - * @throws ResourceNotFoundException when a secret with {@link SecretProperties#getName() name} and {@link - * SecretProperties#getVersion() version} doesn't exist in the key vault. - * @throws HttpRequestException if {@link SecretProperties#getName() name} or {@link SecretProperties#getVersion() version} is - * empty string. - */ - public Secret getSecret(SecretProperties secretProperties) { - return getSecretWithResponse(secretProperties, Context.NONE).getValue(); - } - /** * Get the latest version of the specified secret from the key vault. The get operation is applicable to any secret * stored in Azure Key Vault. @@ -182,11 +143,11 @@ public Secret getSecret(SecretProperties secretProperties) { * {@codesnippet com.azure.security.keyvault.secretclient.getSecret#string} * * @param name The name of the secret. - * @return The requested {@link Secret}. + * @return The requested {@link KeyVaultSecret}. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException if {@code name} is empty string. */ - public Secret getSecret(String name) { + public KeyVaultSecret getSecret(String name) { return getSecretWithResponse(name, "", Context.NONE).getValue(); } @@ -203,12 +164,12 @@ public Secret getSecret(String name) { * @param version The version of the secret to retrieve. If this is an empty String or null, this call is equivalent * to calling {@link #getSecret(String)}, with the latest version being retrieved. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the requested {@link Secret}. + * @return A {@link Response} whose {@link Response#getValue() value} contains the requested {@link KeyVaultSecret}. * @throws ResourceNotFoundException when a secret with {@code name} and {@code version} doesn't exist in the key * vault. * @throws HttpRequestException if {@code name} name} or {@code version} is empty string. */ - public Response getSecretWithResponse(String name, String version, Context context) { + public Response getSecretWithResponse(String name, String version, Context context) { return client.getSecretWithResponse(name, version, context).block(); } @@ -277,35 +238,12 @@ public SecretProperties updateSecretProperties(SecretProperties secretProperties * {@codesnippet com.azure.security.keyvault.secretclient.deleteSecret#string} * * @param name The name of the secret to be deleted. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link DeletedSecret deleted - * secret}. - * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. - * @throws HttpRequestException when a secret with {@code name} is empty string. - */ - public DeletedSecret deleteSecret(String name) { - return deleteSecretWithResponse(name, Context.NONE).getValue(); - } - - /** - * Deletes a secret from the key vault. If soft-delete is enabled on the key vault then the secret is placed in the - * deleted state and requires to be purged for permanent deletion else the secret is permanently deleted. The delete - * operation applies to any secret stored in Azure Key Vault but it cannot be applied to an individual version of a - * secret. This operation requires the {@code secrets/delete} permission. - * - *

    Code Samples

    - *

    Deletes the secret from the keyvault. Prints out the recovery id of the deleted secret returned in the - * response.

    - * {@codesnippet com.azure.security.keyvault.secretclient.deleteSecretWithResponse#string-Context} - * - * @param name The name of the secret to be deleted. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link DeletedSecret deleted - * secret}. + * @return A {@link Poller} to poll on and retrieve the {@link DeletedSecret deleted secret}. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a secret with {@code name} is empty string. */ - public Response deleteSecretWithResponse(String name, Context context) { - return client.deleteSecretWithResponse(name, context).block(); + public Poller beginDeleteSecret(String name) { + return client.beginDeleteSecret(name); } /** @@ -400,33 +338,12 @@ public Response purgeDeletedSecretWithResponse(String name, Context contex * {@codesnippet com.azure.security.keyvault.secretclient.recoverDeletedSecret#string} * * @param name The name of the deleted secret to be recovered. - * @return The {@link Secret recovered secret}. - * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. - * @throws HttpRequestException when a secret with {@code name} is empty string. - */ - public Secret recoverDeletedSecret(String name) { - return recoverDeletedSecretWithResponse(name, Context.NONE).getValue(); - } - - /** - * Recovers the deleted secret in the key vault to its latest version and can only be performed on a soft-delete - * enabled vault. - * This operation requires the {@code secrets/recover} permission. - * - *

    Code Samples

    - *

    Recovers the deleted secret from the key vault enabled for soft-delete. Prints out the details of the - * recovered secret returned in the response.

    - * //Assuming secret is deleted on a soft-delete enabled key vault. - * {@codesnippet com.azure.security.keyvault.secretclient.recoverDeletedSecretWithResponse#string-Context} - * - * @param name The name of the deleted secret to be recovered. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link Secret recovered secret}. + * @return A {@link Poller} to poll on and retrieve the {@link KeyVaultSecret recovered secret}. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a secret with {@code name} is empty string. */ - public Response recoverDeletedSecretWithResponse(String name, Context context) { - return client.recoverDeletedSecretWithResponse(name, context).block(); + public Poller beginRecoverDeletedSecret(String name) { + return client.beginRecoverDeletedSecret(name); } /** @@ -479,11 +396,11 @@ public Response backupSecretWithResponse(String name, Context context) { * {@codesnippet com.azure.security.keyvault.secretclient.restoreSecret#byte} * * @param backup The backup blob associated with the secret. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link Secret restored secret}. + * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultSecret restored secret}. * @throws ResourceModifiedException when {@code backup} blob is malformed. */ - public Secret restoreSecret(byte[] backup) { - return restoreSecretWithResponse(backup, Context.NONE).getValue(); + public KeyVaultSecret restoreSecretBackup(byte[] backup) { + return restoreSecretBackupWithResponse(backup, Context.NONE).getValue(); } /** @@ -498,11 +415,11 @@ public Secret restoreSecret(byte[] backup) { * * @param backup The backup blob associated with the secret. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link Secret restored secret}. + * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link KeyVaultSecret restored secret}. * @throws ResourceModifiedException when {@code backup} blob is malformed. */ - public Response restoreSecretWithResponse(byte[] backup, Context context) { - return client.restoreSecretWithResponse(backup, context).block(); + public Response restoreSecretBackupWithResponse(byte[] backup, Context context) { + return client.restoreSecretBackupWithResponse(backup, context).block(); } /** @@ -512,21 +429,21 @@ public Response restoreSecretWithResponse(byte[] backup, Context context * response. This operation requires the {@code secrets/list} permission. * *

    It is possible to get full secrets with values from this information. Loop over the {@link SecretProperties secret} - * and call {@link SecretClient#getSecret(SecretProperties baseSecret)} . This will return the {@link Secret secret} with + * and call {@link SecretClient#getSecret(String, String)}. This will return the {@link KeyVaultSecret secret} with * value included of its latest version.

    * {@codesnippet com.azure.security.keyvault.secretclient.listSecrets} * *

    Code Samples to iterate over secrets by page

    *

    It is possible to get full secrets with values from this information. Iterate over all the {@link SecretProperties - * secret} by page and call {@link SecretClient#getSecret(SecretProperties baseSecret)} . This will return the - * {@link Secret secret} with value included of its latest version.

    + * secret} by page and call {@link SecretClient#getSecret(String, String)}. This will return the + * {@link KeyVaultSecret secret} with value included of its latest version.

    * {@codesnippet com.azure.security.keyvault.secretclient.listSecrets.iterableByPage} * * @return {@link PagedIterable} of {@link SecretProperties} of all the secrets in the vault. The {@link SecretProperties} * contains all the information about the secret, except its value. */ - public PagedIterable listSecrets() { - return listSecrets(Context.NONE); + public PagedIterable listPropertiesOfSecrets() { + return listPropertiesOfSecrets(Context.NONE); } /** @@ -537,7 +454,7 @@ public PagedIterable listSecrets() { * *

    Code Samples to iterate over secrets by page

    *

    It is possible to get full secrets with values from this information. Loop over the {@link SecretProperties secret} - * and call {@link SecretClient#getSecret(SecretProperties baseSecret)} . This will return the {@link Secret secret} with + * and call {@link SecretClient#getSecret(String, String)}. This will return the {@link KeyVaultSecret secret} with * value included of its latest version.

    * {@codesnippet com.azure.security.keyvault.secretclient.listSecrets#Context} * @@ -545,8 +462,8 @@ public PagedIterable listSecrets() { * @return {@link PagedIterable} of {@link SecretProperties} of all the secrets in the vault. The {@link SecretProperties} * contains all the information about the secret, except its value. */ - public PagedIterable listSecrets(Context context) { - return new PagedIterable<>(client.listSecrets(context)); + public PagedIterable listPropertiesOfSecrets(Context context) { + return new PagedIterable<>(client.listPropertiesOfSecrets(context)); } /** @@ -591,8 +508,8 @@ public PagedIterable listDeletedSecrets() { * are not provided in the response. This operation requires the {@code secrets/list} permission. * *

    It is possible to get full Secrets with values for each version from this information. Loop over the {@link - * SecretProperties secret} and call {@link SecretClient#getSecret(SecretProperties)}. This will return the - * {@link Secret secrets} with values included of the specified versions.

    + * SecretProperties secret} and call {@link SecretClient#getSecret(String, String)}. This will return the + * {@link KeyVaultSecret secrets} with values included of the specified versions.

    * {@codesnippet com.azure.security.keyvault.secretclient.listSecretVersions#string} * * @param name The name of the secret. @@ -601,8 +518,8 @@ public PagedIterable listDeletedSecrets() { * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a secret with {@code name} is empty string. */ - public PagedIterable listSecretVersions(String name) { - return listSecretVersions(name, Context.NONE); + public PagedIterable listPropertiesOfSecretVersions(String name) { + return listPropertiesOfSecretVersions(name, Context.NONE); } /** @@ -611,15 +528,15 @@ public PagedIterable listSecretVersions(String name) { * are not provided in the response. This operation requires the {@code secrets/list} permission. * *

    It is possible to get full Secrets with values for each version from this information. Loop over the {@link - * SecretProperties secret} and call {@link SecretClient#getSecret(SecretProperties)} . This will return the - * {@link Secret secrets} with values included of the specified versions.

    + * SecretProperties secret} and call {@link SecretClient#getSecret(String, String)}. This will return the + * {@link KeyVaultSecret secrets} with values included of the specified versions.

    * {@codesnippet com.azure.security.keyvault.secretclient.listSecretVersions#string-Context} * * *

    Code Samples to iterate over secret versions by page

    *

    It is possible to get full Secrets with values for each version from this information. Iterate over all the - * {@link SecretProperties secret} by each page and call {@link SecretClient#getSecret(SecretProperties)} . This will return the - * {@link Secret secrets} with values included of the specified versions.

    + * {@link SecretProperties secret} by each page and call {@link SecretClient#getSecret(String, String)}. This will return the + * {@link KeyVaultSecret secrets} with values included of the specified versions.

    * {@codesnippet com.azure.security.keyvault.secretclient.listSecretVersions#string-Context-iterableByPage} * * @param name The name of the secret. @@ -629,7 +546,7 @@ public PagedIterable listSecretVersions(String name) { * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a secret with {@code name} is empty string. */ - public PagedIterable listSecretVersions(String name, Context context) { - return new PagedIterable<>(client.listSecretVersions(name, context)); + public PagedIterable listPropertiesOfSecretVersions(String name, Context context) { + return new PagedIterable<>(client.listPropertiesOfSecretVersions(name, context)); } } diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java index a2f750e3c5e4..7c8c397c7589 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java @@ -18,6 +18,7 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.logging.ClientLogger; +import com.azure.security.keyvault.secrets.implementation.KeyVaultCredentialPolicy; import java.net.MalformedURLException; import java.net.URL; @@ -33,7 +34,7 @@ * It constructs an instance of the desired client. * *

    The minimal configuration options required by {@link SecretClientBuilder secretClientBuilder} to build - * {@link SecretAsyncClient} are {@link String endpoint} and {@link TokenCredential credential}.

    + * {@link SecretAsyncClient} are {@link String vaultUrl} and {@link TokenCredential credential}.

    * * {@codesnippet com.azure.security.keyvault.secrets.async.secretclient.construct} * @@ -46,7 +47,7 @@ * {@codesnippet com.azure.security.keyvault.secrets.async.secretclient.withhttpclient.instantiation} * *

    Alternatively, custom {@link HttpPipeline http pipeline} with custom {@link HttpPipelinePolicy} policies and - * {@link String endpoint} + * {@link String vaultUrl} * can be specified. It provides finer control over the construction of {@link SecretAsyncClient client}

    * * {@codesnippet com.azure.security.keyvault.secrets.async.secretclient.pipeline.instantiation} @@ -61,7 +62,7 @@ public final class SecretClientBuilder { private final List policies; private TokenCredential credential; private HttpPipeline pipeline; - private URL endpoint; + private URL vaultUrl; private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final RetryPolicy retryPolicy; @@ -82,15 +83,15 @@ public SecretClientBuilder() { * Every time {@code buildClient()} is called, a new instance of {@link SecretClient} is created. * *

    If {@link SecretClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and - * {@link SecretClientBuilder#endpoint(String) serviceEndpoint} are used to create the + * {@link SecretClientBuilder#vaultUrl(String) serviceEndpoint} are used to create the * {@link SecretClientBuilder client}. All other builder settings are ignored. If {@code pipeline} is not set, * then {@link SecretClientBuilder#credential(TokenCredential) key vault credential and - * {@link SecretClientBuilder#endpoint(String)} key vault endpoint are required to build the {@link SecretClient + * {@link SecretClientBuilder#vaultUrl(String)} key vault url are required to build the {@link SecretClient * client}.}

    * * @return A SecretClient with the options set from the builder. * @throws IllegalStateException If {@link SecretClientBuilder#credential(TokenCredential)} or - * {@link SecretClientBuilder#endpoint(String)} have not been set. + * {@link SecretClientBuilder#vaultUrl(String)} have not been set. */ public SecretClient buildClient() { return new SecretClient(buildAsyncClient()); @@ -101,15 +102,15 @@ public SecretClient buildClient() { * Every time {@code buildAsyncClient()} is called, a new instance of {@link SecretAsyncClient} is created. * *

    If {@link SecretClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and - * {@link SecretClientBuilder#endpoint(String) serviceEndpoint} are used to create the + * {@link SecretClientBuilder#vaultUrl(String) serviceEndpoint} are used to create the * {@link SecretClientBuilder client}. All other builder settings are ignored. If {@code pipeline} is not set, * then {@link SecretClientBuilder#credential(TokenCredential) key vault credential and - * {@link SecretClientBuilder#endpoint(String)} key vault endpoint are required to build the {@link + * {@link SecretClientBuilder#vaultUrl(String)} key vault url are required to build the {@link * SecretAsyncClient client}.}

    * * @return A SecretAsyncClient with the options set from the builder. * @throws IllegalStateException If {@link SecretClientBuilder#credential(TokenCredential)} or - * {@link SecretClientBuilder#endpoint(String)} have not been set. + * {@link SecretClientBuilder#vaultUrl(String)} have not been set. */ public SecretAsyncClient buildAsyncClient() { @@ -125,7 +126,7 @@ public SecretAsyncClient buildAsyncClient() { SecretServiceVersion serviceVersion = version != null ? version : SecretServiceVersion.getLatest(); if (pipeline != null) { - return new SecretAsyncClient(endpoint, pipeline, serviceVersion); + return new SecretAsyncClient(vaultUrl, pipeline, serviceVersion); } if (credential == null) { @@ -150,22 +151,22 @@ public SecretAsyncClient buildAsyncClient() { .httpClient(httpClient) .build(); - return new SecretAsyncClient(endpoint, pipeline, serviceVersion); + return new SecretAsyncClient(vaultUrl, pipeline, serviceVersion); } /** - * Sets the vault endpoint url to send HTTP requests to. + * Sets the vault url to send HTTP requests to. * - * @param endpoint The vault endpoint url is used as destination on Azure to send requests to. + * @param vaultUrl The vault url is used as destination on Azure to send requests to. * @return the updated {@link SecretClientBuilder} object. - * @throws IllegalArgumentException if {@code endpoint} is null or it cannot be parsed into a valid URL. + * @throws IllegalArgumentException if {@code vaultUrl} is null or it cannot be parsed into a valid URL. */ - public SecretClientBuilder endpoint(String endpoint) { + public SecretClientBuilder vaultUrl(String vaultUrl) { try { - this.endpoint = new URL(endpoint); + this.vaultUrl = new URL(vaultUrl); } catch (MalformedURLException e) { throw logger.logExceptionAsError(new IllegalArgumentException( - "The Azure Key Vault endpoint url is malformed.")); + "The Azure Key Vault url is malformed.", e)); } return this; } @@ -227,7 +228,7 @@ public SecretClientBuilder httpClient(HttpClient client) { * Sets the HTTP pipeline to use for the service client. * * If {@code pipeline} is set, all other settings are ignored, aside from - * {@link SecretClientBuilder#endpoint(String) endpoint} to build {@link SecretAsyncClient} or {@link SecretClient}. + * {@link SecretClientBuilder#vaultUrl(String) vaultUrl} to build {@link SecretAsyncClient} or {@link SecretClient}. * * @param pipeline The HTTP pipeline to use for sending service requests and receiving responses. * @return the updated {@link SecretClientBuilder} object. @@ -268,8 +269,8 @@ public SecretClientBuilder serviceVersion(SecretServiceVersion version) { } private URL getBuildEndpoint(Configuration configuration) { - if (endpoint != null) { - return endpoint; + if (vaultUrl != null) { + return vaultUrl; } String configEndpoint = configuration.get("AZURE_KEYVAULT_ENDPOINT"); diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretRequestAttributes.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretRequestAttributes.java index 916fbbd5fec1..90f55390d03f 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretRequestAttributes.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretRequestAttributes.java @@ -24,8 +24,8 @@ class SecretRequestAttributes { if (secretProperties.getNotBefore() != null) { this.notBefore = secretProperties.getNotBefore().toEpochSecond(); } - if (secretProperties.getExpires() != null) { - this.expires = secretProperties.getExpires().toEpochSecond(); + if (secretProperties.getExpiresOn() != null) { + this.expires = secretProperties.getExpiresOn().toEpochSecond(); } this.enabled = secretProperties.isEnabled(); } diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretService.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretService.java index 9964fd0201fc..243a8a9c4e01 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretService.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretService.java @@ -27,7 +27,7 @@ import com.azure.security.keyvault.secrets.implementation.DeletedSecretPage; import com.azure.security.keyvault.secrets.implementation.SecretPropertiesPage; import com.azure.security.keyvault.secrets.models.DeletedSecret; -import com.azure.security.keyvault.secrets.models.Secret; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.security.keyvault.secrets.models.SecretProperties; import reactor.core.publisher.Mono; @@ -45,26 +45,38 @@ interface SecretService { @ExpectedResponses({200}) @UnexpectedResponseExceptionType(code = {400}, value = ResourceModifiedException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> setSecret(@HostParam("url") String url, - @PathParam("secret-name") String secretName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("accept-language") String acceptLanguage, - @BodyParam("body") SecretRequestParameters parameters, - @HeaderParam("Content-Type") String type, - Context context); + Mono> setSecret(@HostParam("url") String url, + @PathParam("secret-name") String secretName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @BodyParam("body") SecretRequestParameters parameters, + @HeaderParam("Content-Type") String type, + Context context); @Get("secrets/{secret-name}/{secret-version}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(code = {404}, value = ResourceNotFoundException.class) @UnexpectedResponseExceptionType(code = {403}, value = ResourceModifiedException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> getSecret(@HostParam("url") String url, - @PathParam("secret-name") String secretName, - @PathParam("secret-version") String secretVersion, - @QueryParam("api-version") String apiVersion, - @HeaderParam("accept-language") String acceptLanguage, - @HeaderParam("Content-Type") String type, - Context context); + Mono> getSecret(@HostParam("url") String url, + @PathParam("secret-name") String secretName, + @PathParam("secret-version") String secretVersion, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @HeaderParam("Content-Type") String type, + Context context); + + @Get("secrets/{secret-name}/{secret-version}") + @ExpectedResponses({200, 404}) + @UnexpectedResponseExceptionType(code = {403}, value = ResourceModifiedException.class) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSecretPoller(@HostParam("url") String url, + @PathParam("secret-name") String secretName, + @PathParam("secret-version") String secretVersion, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @HeaderParam("Content-Type") String type, + Context context); @Patch("secrets/{secret-name}/{secret-version}") @@ -103,6 +115,16 @@ Mono> getDeletedSecret(@HostParam("url") String url, @HeaderParam("Content-Type") String type, Context context); + @Get("deletedsecrets/{secret-name}") + @ExpectedResponses({200, 404}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDeletedSecretPoller(@HostParam("url") String url, + @PathParam("secret-name") String secretName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @HeaderParam("Content-Type") String type, + Context context); + @Delete("deletedsecrets/{secret-name}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(code = {404}, value = ResourceNotFoundException.class) @@ -119,12 +141,12 @@ Mono> purgeDeletedSecret(@HostParam("url") String url, @ExpectedResponses({200}) @UnexpectedResponseExceptionType(code = {404}, value = ResourceNotFoundException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> recoverDeletedSecret(@HostParam("url") String url, - @PathParam("secret-name") String secretName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("accept-language") String acceptLanguage, - @HeaderParam("Content-Type") String type, - Context context); + Mono> recoverDeletedSecret(@HostParam("url") String url, + @PathParam("secret-name") String secretName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @HeaderParam("Content-Type") String type, + Context context); @Post("secrets/{secret-name}/backup") @@ -144,12 +166,12 @@ Mono> backupSecret(@HostParam("url") String url, @ExpectedResponses({200}) @UnexpectedResponseExceptionType(code = {400}, value = ResourceModifiedException.class) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> restoreSecret(@HostParam("url") String url, - @QueryParam("api-version") String apiVersion, - @HeaderParam("accept-language") String acceptLanguage, - @BodyParam("application/json") SecretRestoreRequestParameters parameters, - @HeaderParam("Content-Type") String type, - Context context); + Mono> restoreSecret(@HostParam("url") String url, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @BodyParam("application/json") SecretRestoreRequestParameters parameters, + @HeaderParam("Content-Type") String type, + Context context); @Get("secrets") diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/KeyVaultCredentialPolicy.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/implementation/KeyVaultCredentialPolicy.java similarity index 98% rename from sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/KeyVaultCredentialPolicy.java rename to sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/implementation/KeyVaultCredentialPolicy.java index 2a33f5fe1b4b..1b0e628b8ac9 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/KeyVaultCredentialPolicy.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/implementation/KeyVaultCredentialPolicy.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.secrets; +package com.azure.security.keyvault.secrets.implementation; import com.azure.core.credential.TokenCredential; import com.azure.core.credential.TokenRequestContext; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/ScopeTokenCache.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/implementation/ScopeTokenCache.java similarity index 97% rename from sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/ScopeTokenCache.java rename to sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/implementation/ScopeTokenCache.java index 8a96e49e7366..a46c76cb5247 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/ScopeTokenCache.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/implementation/ScopeTokenCache.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.secrets; +package com.azure.security.keyvault.secrets.implementation; import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenRequestContext; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/DeletedSecret.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/DeletedSecret.java index 1328029b22ff..71ee98744532 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/DeletedSecret.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/DeletedSecret.java @@ -12,13 +12,13 @@ /** * Deleted Secret is the resource consisting of name, recovery id, deleted date, scheduled purge date and its attributes - * inherited from {@link Secret}. + * inherited from {@link KeyVaultSecret}. * It is managed by Secret Service. * * @see SecretClient * @see SecretAsyncClient */ -public final class DeletedSecret extends Secret { +public final class DeletedSecret extends KeyVaultSecret { /** * The url of the recovery object, used to identify and recover the deleted secret. @@ -34,7 +34,7 @@ public final class DeletedSecret extends Secret { /** * The time when the secret was deleted, in UTC. */ - private OffsetDateTime deletedDate; + private OffsetDateTime deletedOn; /** * Get the recoveryId identifier. @@ -59,8 +59,8 @@ public OffsetDateTime getScheduledPurgeDate() { * * @return the deletedDate UTC time. */ - public OffsetDateTime getDeletedDate() { - return this.deletedDate; + public OffsetDateTime getDeletedOn() { + return this.deletedOn; } /** @@ -78,8 +78,8 @@ private void unpackScheduledPurgeDate(Long scheduledPurgeDate) { * and updates the value of class variable deletedDate. */ @JsonProperty("deletedDate") - private void setDeletedDate(Long deletedDate) { - this.deletedDate = OffsetDateTime.ofInstant(Instant.ofEpochMilli(deletedDate * 1000L), ZoneOffset.UTC); + private void setDeletedOn(Long deletedOn) { + this.deletedOn = OffsetDateTime.ofInstant(Instant.ofEpochMilli(deletedOn * 1000L), ZoneOffset.UTC); } } diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/Secret.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/KeyVaultSecret.java similarity index 93% rename from sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/Secret.java rename to sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/KeyVaultSecret.java index 22eaa67a1285..04aa5f0f8410 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/Secret.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/KeyVaultSecret.java @@ -3,6 +3,7 @@ package com.azure.security.keyvault.secrets.models; +import com.azure.core.annotation.Fluent; import com.azure.security.keyvault.secrets.SecretAsyncClient; import com.azure.security.keyvault.secrets.SecretClient; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,7 +18,8 @@ * @see SecretClient * @see SecretAsyncClient */ -public class Secret { +@Fluent +public class KeyVaultSecret { /** * The value of the secret. @@ -33,7 +35,7 @@ public class Secret { /** * Creates an empty instance of the Secret. */ - Secret() { + KeyVaultSecret() { properties = new SecretProperties(); } @@ -43,7 +45,7 @@ public class Secret { * @param name The name of the secret. * @param value the value of the secret. */ - public Secret(String name, String value) { + public KeyVaultSecret(String name, String value) { properties = new SecretProperties(name); this.value = value; } @@ -89,7 +91,7 @@ public SecretProperties getProperties() { * @throws NullPointerException if {@code properties} is null. * @return the updated secret object */ - public Secret setProperties(SecretProperties properties) { + public KeyVaultSecret setProperties(SecretProperties properties) { Objects.requireNonNull(properties); properties.name = this.properties.name; this.properties = properties; diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/SecretProperties.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/SecretProperties.java index 165cf94b8b46..81e1706e4e80 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/SecretProperties.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/SecretProperties.java @@ -3,6 +3,7 @@ package com.azure.security.keyvault.secrets.models; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.security.keyvault.secrets.SecretAsyncClient; import com.azure.security.keyvault.secrets.SecretClient; @@ -23,6 +24,7 @@ * @see SecretClient * @see SecretAsyncClient */ +@Fluent public class SecretProperties { private final ClientLogger logger = new ClientLogger(SecretProperties.class); @@ -49,17 +51,17 @@ public class SecretProperties { /** * Expiry date in UTC. */ - OffsetDateTime expires; + OffsetDateTime expiresOn; /** * Creation time in UTC. */ - OffsetDateTime created; + OffsetDateTime createdOn; /** * Last updated time in UTC. */ - OffsetDateTime updated; + OffsetDateTime updatedOn; /** * The secret name. @@ -176,21 +178,21 @@ public SecretProperties setNotBefore(OffsetDateTime notBefore) { * * @return the expires UTC time. */ - public OffsetDateTime getExpires() { - if (this.expires == null) { + public OffsetDateTime getExpiresOn() { + if (this.expiresOn == null) { return null; } - return this.expires; + return this.expiresOn; } /** * Set the {@link OffsetDateTime expires} UTC time. * - * @param expires The expiry time to set for the secret. + * @param expiresOn The expiry time to set for the secret. * @return the SecretProperties object itself. */ - public SecretProperties setExpires(OffsetDateTime expires) { - this.expires = expires; + public SecretProperties setExpiresOn(OffsetDateTime expiresOn) { + this.expiresOn = expiresOn; return this; } @@ -199,8 +201,8 @@ public SecretProperties setExpires(OffsetDateTime expires) { * * @return the created UTC time. */ - public OffsetDateTime getCreated() { - return created; + public OffsetDateTime getCreatedOn() { + return createdOn; } /** @@ -208,8 +210,8 @@ public OffsetDateTime getCreated() { * * @return the last updated UTC time. */ - public OffsetDateTime getUpdated() { - return updated; + public OffsetDateTime getUpdatedOn() { + return updatedOn; } /** @@ -299,9 +301,9 @@ public String getVersion() { void unpackAttributes(Map attributes) { this.enabled = (Boolean) attributes.get("enabled"); this.notBefore = epochToOffsetDateTime(attributes.get("nbf")); - this.expires = epochToOffsetDateTime(attributes.get("exp")); - this.created = epochToOffsetDateTime(attributes.get("created")); - this.updated = epochToOffsetDateTime(attributes.get("updated")); + this.expiresOn = epochToOffsetDateTime(attributes.get("exp")); + this.createdOn = epochToOffsetDateTime(attributes.get("created")); + this.updatedOn = epochToOffsetDateTime(attributes.get("updated")); this.recoveryLevel = (String) attributes.get("recoveryLevel"); this.contentType = (String) lazyValueSelection(attributes.get("contentType"), this.contentType); this.keyId = (String) lazyValueSelection(attributes.get("keyId"), this.keyId); diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperations.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperations.java index f4a0b85d2f8c..863429126d50 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperations.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperations.java @@ -3,8 +3,11 @@ package com.azure.security.keyvault.secrets; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; +import com.azure.security.keyvault.secrets.models.DeletedSecret; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; import java.io.File; @@ -32,15 +35,15 @@ public static void main(String[] args) throws IOException, InterruptedException, // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. SecretClient client = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // Let's create secrets holding storage account credentials valid for 1 year. if the secret // already exists in the key vault, then a new version of the secret is created. - client.setSecret(new Secret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") + client.setSecret(new KeyVaultSecret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))); + .setExpiresOn(OffsetDateTime.now().plusYears(1)))); // Backups are good to have, if in case secrets get accidentally deleted by you. // For long term storage, it is ideal to write the backup to a file. @@ -49,7 +52,24 @@ public static void main(String[] args) throws IOException, InterruptedException, writeBackupToFile(secretBackup, backupFilePath); // The storage account secret is no longer in use, so you delete it. - client.deleteSecret("StorageAccountPassword"); + Poller deletedStorageSecretPoller = client.beginDeleteSecret("StorageAccountPassword"); + + while (deletedStorageSecretPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS + && !deletedStorageSecretPoller.isComplete()) { + System.out.println(deletedStorageSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } + + DeletedSecret deletedStorageSecret = deletedStorageSecretPoller.getLastPollResponse().getValue(); + System.out.println("Deleted Date %s" + deletedStorageSecret.getDeletedOn().toString()); + System.out.printf("Deleted Secret's Recovery Id %s", deletedStorageSecret.getRecoveryId()); + + // Key is being deleted on server. + while (deletedStorageSecretPoller.getStatus() != PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED) { + System.out.println(deletedStorageSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } + //To ensure secret is deleted on server side. Thread.sleep(30000); @@ -62,7 +82,7 @@ public static void main(String[] args) throws IOException, InterruptedException, // After sometime, the secret is required again. We can use the backup value to restore it in the key vault. byte[] backupFromFile = Files.readAllBytes(new File(backupFilePath).toPath()); - Secret restoredSecret = client.restoreSecret(backupFromFile); + KeyVaultSecret restoredSecret = client.restoreSecretBackup(backupFromFile); } private static void writeBackupToFile(byte[] bytes, String filePath) { diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperationsAsync.java index 9049a85d7f84..6d3f32fabd03 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperationsAsync.java @@ -3,8 +3,8 @@ package com.azure.security.keyvault.secrets; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; import java.io.File; @@ -32,15 +32,15 @@ public static void main(String[] args) throws IOException, InterruptedException, // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. SecretAsyncClient secretAsyncClient = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); // Let's create secrets holding storage account credentials valid for 1 year. if the secret // already exists in the key vault, then a new version of the secret is created. - secretAsyncClient.setSecret(new Secret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") + secretAsyncClient.setSecret(new KeyVaultSecret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))) + .setExpiresOn(OffsetDateTime.now().plusYears(1)))) .subscribe(secretResponse -> System.out.printf("Secret is created with name %s and value %s %n", secretResponse.getName(), secretResponse.getValue())); @@ -57,8 +57,13 @@ public static void main(String[] args) throws IOException, InterruptedException, Thread.sleep(7000); // The storage account secret is no longer in use, so you delete it. - secretAsyncClient.deleteSecret("StorageAccountPassword").subscribe(deletedSecretResponse -> - System.out.printf("Deleted Secret's Recovery Id %s %n", deletedSecretResponse.getRecoveryId())); + secretAsyncClient.beginDeleteSecret("StorageAccountPassword") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Deleted Secret Name: " + pollResponse.getValue().getName()); + System.out.println("Deleted Secret Value: " + pollResponse.getValue().getValue()); + }); //To ensure file is deleted on server side. Thread.sleep(30000); @@ -72,7 +77,7 @@ public static void main(String[] args) throws IOException, InterruptedException, // After sometime, the secret is required again. We can use the backup value to restore it in the key vault. byte[] backupFromFile = Files.readAllBytes(new File(backupFilePath).toPath()); - secretAsyncClient.restoreSecret(backupFromFile).subscribe(secretResponse -> + secretAsyncClient.restoreSecretBackup(backupFromFile).subscribe(secretResponse -> System.out.printf("Restored Secret with name %s %n", secretResponse.getName())); //To ensure secret is restored on server side. diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorld.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorld.java index 5f227dfa53f1..f548f7c5e575 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorld.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorld.java @@ -3,8 +3,11 @@ package com.azure.security.keyvault.secrets; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; +import com.azure.security.keyvault.secrets.models.DeletedSecret; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; import java.time.OffsetDateTime; @@ -27,40 +30,53 @@ public static void main(String[] args) throws InterruptedException, IllegalArgum // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. SecretClient secretClient = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // Let's create a secret holding bank account credentials valid for 1 year. if the secret // already exists in the key vault, then a new version of the secret is created. - secretClient.setSecret(new Secret("BankAccountPassword", "f4G34fMh8v") + secretClient.setSecret(new KeyVaultSecret("BankAccountPassword", "f4G34fMh8v") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))); + .setExpiresOn(OffsetDateTime.now().plusYears(1)))); // Let's Get the bank secret from the key vault. - Secret bankSecret = secretClient.getSecret("BankAccountPassword"); + KeyVaultSecret bankSecret = secretClient.getSecret("BankAccountPassword"); System.out.printf("Secret is returned with name %s and value %s \n", bankSecret.getName(), bankSecret.getValue()); // After one year, the bank account is still active, we need to update the expiry time of the secret. // The update method can be used to update the expiry attribute of the secret. It cannot be used to update // the value of the secret. bankSecret.getProperties() - .setExpires(OffsetDateTime.now().plusYears(1)); + .setExpiresOn(OffsetDateTime.now().plusYears(1)); SecretProperties updatedSecret = secretClient.updateSecretProperties(bankSecret.getProperties()); - System.out.printf("Secret's updated expiry time %s \n", updatedSecret.getExpires()); + System.out.printf("Secret's updated expiry time %s \n", updatedSecret.getExpiresOn()); // Bank forced a password update for security purposes. Let's change the value of the secret in the key vault. // To achieve this, we need to create a new version of the secret in the key vault. The update operation cannot // change the value of the secret. - secretClient.setSecret(new Secret("BankAccountPassword", "bhjd4DDgsa") + secretClient.setSecret(new KeyVaultSecret("BankAccountPassword", "bhjd4DDgsa") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))); + .setExpiresOn(OffsetDateTime.now().plusYears(1)))); // The bank account was closed, need to delete its credentials from the key vault. - secretClient.deleteSecret("BankAccountPassword"); + Poller deletedBankSecretPoller = secretClient.beginDeleteSecret("BankAccountPassword"); - // To ensure secret is deleted on server side. - Thread.sleep(30000); + while (deletedBankSecretPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS + && !deletedBankSecretPoller.isComplete()) { + System.out.println(deletedBankSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } + + DeletedSecret deletedBankSecret = deletedBankSecretPoller.getLastPollResponse().getValue(); + System.out.println("Deleted Date %s" + deletedBankSecret.getDeletedOn().toString()); + System.out.printf("Deleted Secret's Recovery Id %s", deletedBankSecret.getRecoveryId()); + + // Key is being deleted on server. + while (deletedBankSecretPoller.getStatus() != PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED) { + System.out.println(deletedBankSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } // If the key vault is soft-delete enabled, then for permanent deletion deleted secrets need to be purged. secretClient.purgeDeletedSecret("BankAccountPassword"); diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorldAsync.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorldAsync.java index 28a877f551cc..3e81dd2facd6 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorldAsync.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorldAsync.java @@ -3,8 +3,8 @@ package com.azure.security.keyvault.secrets; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; import java.time.OffsetDateTime; @@ -26,15 +26,15 @@ public static void main(String[] args) throws InterruptedException { // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. SecretAsyncClient secretAsyncClient = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); // Let's create a secret holding bank account credentials valid for 1 year. if the secret // already exists in the key vault, then a new version of the secret is created. - secretAsyncClient.setSecret(new Secret("BankAccountPassword", "f4G34fMh8v") + secretAsyncClient.setSecret(new KeyVaultSecret("BankAccountPassword", "f4G34fMh8v") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))).subscribe(secretResponse -> + .setExpiresOn(OffsetDateTime.now().plusYears(1)))).subscribe(secretResponse -> System.out.printf("Secret is created with name %s and value %s %n", secretResponse.getName(), secretResponse.getValue())); Thread.sleep(2000); @@ -49,12 +49,12 @@ public static void main(String[] args) throws InterruptedException { // The update method can be used to update the expiry attribute of the secret. It cannot be used to update // the value of the secret. secretAsyncClient.getSecret("BankAccountPassword").subscribe(secretResponse -> { - Secret secret = secretResponse; + KeyVaultSecret secret = secretResponse; //Update the expiry time of the secret. secret.getProperties() - .setExpires(OffsetDateTime.now().plusYears(1)); + .setExpiresOn(OffsetDateTime.now().plusYears(1)); secretAsyncClient.updateSecretProperties(secret.getProperties()).subscribe(updatedSecretResponse -> - System.out.printf("Secret's updated expiry time %s %n", updatedSecretResponse.getExpires().toString())); + System.out.printf("Secret's updated expiry time %s %n", updatedSecretResponse.getExpiresOn().toString())); }); Thread.sleep(2000); @@ -68,8 +68,13 @@ public static void main(String[] args) throws InterruptedException { Thread.sleep(2000); // The bank account was closed, need to delete its credentials from the key vault. - secretAsyncClient.deleteSecret("BankAccountPassword").subscribe(deletedSecretResponse -> - System.out.printf("Deleted Secret's Recovery Id %s %n", deletedSecretResponse.getRecoveryId())); + secretAsyncClient.beginDeleteSecret("BankAccountPassword") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Deleted Secret Name: " + pollResponse.getValue().getName()); + System.out.println("Deleted Secret Value: " + pollResponse.getValue().getValue()); + }); //To ensure secret is deleted on server side. Thread.sleep(30000); diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java index a9963ab8305c..88f49fe87c02 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java @@ -3,6 +3,7 @@ package com.azure.security.keyvault.secrets; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.identity.ChainedTokenCredential; import com.azure.identity.ChainedTokenCredentialBuilder; import com.azure.identity.ClientSecretCredential; @@ -15,7 +16,6 @@ import com.azure.identity.ManagedIdentityCredentialBuilder; import com.azure.identity.UsernamePasswordCredential; import com.azure.identity.UsernamePasswordCredentialBuilder; -import com.azure.security.keyvault.secrets.models.Secret; /** * Samples for azure-identity readme. @@ -30,11 +30,11 @@ public void authenticateWithDefaultAzureCredential() { // Azure SDK client builders accept the credential as a parameter SecretClient client = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(defaultCredential) .buildClient(); - Secret secret = client.getSecret("{SECRET_NAME}"); + KeyVaultSecret secret = client.getSecret("{SECRET_NAME}"); System.out.println(secret.getValue()); } @@ -50,11 +50,11 @@ public void authenticateWithClientSecretCredential() { .build(); SecretClient client = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(clientSecretCredential) .buildClient(); - Secret secret = client.getSecret("{SECRET_NAME}"); + KeyVaultSecret secret = client.getSecret("{SECRET_NAME}"); System.out.println(secret.getValue()); } @@ -71,11 +71,11 @@ public void authenticateWithDeviceCodeCredential() { .build(); SecretClient client = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") - .credential(deviceCodeCredential) - .buildClient(); + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") + .credential(deviceCodeCredential) + .buildClient(); - Secret secret = client.getSecret("{SECRET_NAME}"); + KeyVaultSecret secret = client.getSecret("{SECRET_NAME}"); System.out.println(secret.getValue()); } @@ -91,11 +91,11 @@ public void authenticateWithUsernamePasswordCredential() { .build(); SecretClient client = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(usernamePasswordCredential) .buildClient(); - Secret secret = client.getSecret("{SECRET_NAME}"); + KeyVaultSecret secret = client.getSecret("{SECRET_NAME}"); System.out.println(secret.getValue()); } @@ -123,11 +123,11 @@ public void authenticateWithChainedCredential() { // the chain can be used anywhere a credential is required SecretClient client = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(credentialChain) .buildClient(); - Secret secret = client.getSecret("{SECRET_NAME}"); + KeyVaultSecret secret = client.getSecret("{SECRET_NAME}"); System.out.println(secret.getValue()); } diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperations.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperations.java index b37622b78429..cb49b483d1e1 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperations.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperations.java @@ -3,8 +3,8 @@ package com.azure.security.keyvault.secrets; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; import java.time.OffsetDateTime; @@ -25,24 +25,24 @@ public static void main(String[] args) throws IllegalArgumentException { // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. SecretClient client = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // Let's create secrets holding storage and bank accounts credentials valid for 1 year. if the secret // already exists in the key vault, then a new version of the secret is created. - client.setSecret(new Secret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") + client.setSecret(new KeyVaultSecret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))); + .setExpiresOn(OffsetDateTime.now().plusYears(1)))); - client.setSecret(new Secret("BankAccountPassword", "f4G34fMh8v") + client.setSecret(new KeyVaultSecret("BankAccountPassword", "f4G34fMh8v") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))); + .setExpiresOn(OffsetDateTime.now().plusYears(1)))); // You need to check if any of the secrets are sharing same values. Let's list the secrets and print their values. // List operations don't return the secrets with value information. So, for each returned secret we call getSecret to get the secret with its value information. - for (SecretProperties secret : client.listSecrets()) { - Secret secretWithValue = client.getSecret(secret); + for (SecretProperties secret : client.listPropertiesOfSecrets()) { + KeyVaultSecret secretWithValue = client.getSecret(secret.getName(), secret.getVersion()); System.out.printf("Received secret with name %s and value %s \n", secretWithValue.getName(), secretWithValue.getValue()); } @@ -51,8 +51,8 @@ public static void main(String[] args) throws IllegalArgumentException { client.setSecret("BankAccountPassword", "sskdjfsdasdjsd"); // You need to check all the different values your bank account password secret had previously. Lets print all the versions of this secret. - for (SecretProperties secret : client.listSecretVersions("BankAccountPassword")) { - Secret secretWithValue = client.getSecret(secret); + for (SecretProperties secret : client.listPropertiesOfSecretVersions("BankAccountPassword")) { + KeyVaultSecret secretWithValue = client.getSecret(secret.getName(), secret.getVersion()); System.out.printf("Received secret's version with name %s and value %s", secretWithValue.getName(), secretWithValue.getValue()); } } diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperationsAsync.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperationsAsync.java index 615aa2851395..99baa0a89f65 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperationsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperationsAsync.java @@ -3,8 +3,8 @@ package com.azure.security.keyvault.secrets; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; import java.time.OffsetDateTime; @@ -26,23 +26,23 @@ public static void main(String[] args) throws InterruptedException { // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. SecretAsyncClient secretAsyncClient = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); // Let's create secrets holding storage and bank accounts credentials valid for 1 year. if the secret // already exists in the key vault, then a new version of the secret is created. - secretAsyncClient.setSecret(new Secret("BankAccountPassword", "f4G34fMh8v") + secretAsyncClient.setSecret(new KeyVaultSecret("BankAccountPassword", "f4G34fMh8v") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))) + .setExpiresOn(OffsetDateTime.now().plusYears(1)))) .subscribe(secretResponse -> System.out.printf("Secret is created with name %s and value %s \n", secretResponse.getName(), secretResponse.getValue())); Thread.sleep(2000); - secretAsyncClient.setSecret(new Secret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") + secretAsyncClient.setSecret(new KeyVaultSecret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))) + .setExpiresOn(OffsetDateTime.now().plusYears(1)))) .subscribe(secretResponse -> System.out.printf("Secret is created with name %s and value %s \n", secretResponse.getName(), secretResponse.getValue())); @@ -50,25 +50,25 @@ public static void main(String[] args) throws InterruptedException { // You need to check if any of the secrets are sharing same values. Let's list the secrets and print their values. // List operations don't return the secrets with value information. So, for each returned secret we call getSecret to get the secret with its value information. - secretAsyncClient.listSecrets() - .subscribe(secretBase -> - secretAsyncClient.getSecret(secretBase).subscribe(secretResponse -> + secretAsyncClient.listPropertiesOfSecrets() + .subscribe(secret -> + secretAsyncClient.getSecret(secret.getName(), secret.getVersion()).subscribe(secretResponse -> System.out.printf("Received secret with name %s and value %s \n", secretResponse.getName(), secretResponse.getValue()))); Thread.sleep(15000); // The bank account password got updated, so you want to update the secret in key vault to ensure it reflects the new password. // Calling setSecret on an existing secret creates a new version of the secret in the key vault with the new value. - secretAsyncClient.setSecret(new Secret("BankAccountPassword", "sskdjfsdasdjsd") + secretAsyncClient.setSecret(new KeyVaultSecret("BankAccountPassword", "sskdjfsdasdjsd") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))).subscribe(secretResponse -> + .setExpiresOn(OffsetDateTime.now().plusYears(1)))).subscribe(secretResponse -> System.out.printf("Secret is created with name %s and value %s \n", secretResponse.getName(), secretResponse.getValue())); Thread.sleep(2000); // You need to check all the different values your bank account password secret had previously. Lets print all the versions of this secret. - secretAsyncClient.listSecretVersions("BankAccountPassword").subscribe(secretBase -> - secretAsyncClient.getSecret(secretBase).subscribe(secretResponse -> + secretAsyncClient.listPropertiesOfSecretVersions("BankAccountPassword").subscribe(secret -> + secretAsyncClient.getSecret(secret.getName(), secret.getVersion()).subscribe(secretResponse -> System.out.printf("Received secret's version with name %s and value %s \n", secretResponse.getName(), secretResponse.getValue()))); Thread.sleep(15000); diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecrets.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecrets.java index 1163113b9575..18aaa4981d02 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecrets.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecrets.java @@ -3,9 +3,11 @@ package com.azure.security.keyvault.secrets; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.models.DeletedSecret; -import com.azure.security.keyvault.secrets.models.Secret; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.security.keyvault.secrets.models.SecretProperties; import java.time.OffsetDateTime; @@ -31,44 +33,104 @@ public static void main(String[] args) throws IllegalArgumentException, Interrup // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. SecretClient client = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // Let's create secrets holding storage and bank accounts credentials valid for 1 year. if the secret // already exists in the key vault, then a new version of the secret is created. - client.setSecret(new Secret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") + client.setSecret(new KeyVaultSecret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))); + .setExpiresOn(OffsetDateTime.now().plusYears(1)))); - client.setSecret(new Secret("BankAccountPassword", "f4G34fMh8v") + client.setSecret(new KeyVaultSecret("BankAccountPassword", "f4G34fMh8v") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))); + .setExpiresOn(OffsetDateTime.now().plusYears(1)))); // The storage account was closed, need to delete its credentials from the key vault. - client.deleteSecret("BankAccountPassword"); + Poller deletedBankSecretPoller = client.beginDeleteSecret("BankAccountPassword"); + + while (deletedBankSecretPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS + && !deletedBankSecretPoller.isComplete()) { + System.out.println(deletedBankSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } + + DeletedSecret deletedBankSecret = deletedBankSecretPoller.getLastPollResponse().getValue(); + System.out.println("Deleted Date %s" + deletedBankSecret.getDeletedOn().toString()); + System.out.printf("Deleted Secret's Recovery Id %s", deletedBankSecret.getRecoveryId()); + + // Key is being deleted on server. + while (deletedBankSecretPoller.getStatus() != PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED) { + System.out.println(deletedBankSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } - //To ensure secret is deleted on server side. - Thread.sleep(30000); // We accidentally deleted bank account secret. Let's recover it. // A deleted secret can only be recovered if the key vault is soft-delete enabled. - client.recoverDeletedSecret("BankAccountPassword"); + Poller recoverSecretPoller = + client.beginRecoverDeletedSecret("BankAccountPassword"); + + while (recoverSecretPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS + && !recoverSecretPoller.isComplete()) { + System.out.println(recoverSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } + + KeyVaultSecret recoveredSecret = recoverSecretPoller.getLastPollResponse().getValue(); + System.out.println("Recovered Key Name %s" + recoveredSecret.getName()); + System.out.printf("Recovered Key's Id %s", recoveredSecret.getId()); + + // Key is being recovered on server. + while (recoverSecretPoller.getStatus() != PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED) { + System.out.println(recoverSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } - //To ensure secret is recovered on server side. - Thread.sleep(30000); // The bank acoount and storage accounts got closed. // Let's delete bank and storage accounts secrets. - client.deleteSecret("BankAccountPassword"); - client.deleteSecret("StorageAccountPassword"); + Poller deletedSecretPoller = client.beginDeleteSecret("BankAccountPassword"); + + while (deletedSecretPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS + && !deletedSecretPoller.isComplete()) { + System.out.println(deletedSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } + + DeletedSecret deletedSecret = deletedSecretPoller.getLastPollResponse().getValue(); + System.out.println("Deleted Date %s" + deletedSecret.getDeletedOn().toString()); + System.out.printf("Deleted Secret's Recovery Id %s", deletedSecret.getRecoveryId()); + + // Key is being deleted on server. + while (deletedSecretPoller.getStatus() != PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED) { + System.out.println(deletedSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } + + Poller deletedStorageSecretPoller = client.beginDeleteSecret("StorageAccountPassword"); + + while (deletedStorageSecretPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS + && !deletedStorageSecretPoller.isComplete()) { + System.out.println(deletedStorageSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } + + DeletedSecret deletedStorageSecret = deletedStorageSecretPoller.getLastPollResponse().getValue(); + System.out.println("Deleted Date %s" + deletedStorageSecret.getDeletedOn().toString()); + System.out.printf("Deleted Secret's Recovery Id %s", deletedStorageSecret.getRecoveryId()); + + // Key is being deleted on server. + while (deletedStorageSecretPoller.getStatus() != PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED) { + System.out.println(deletedStorageSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } - //To ensure secret is deleted on server side. - Thread.sleep(30000); // You can list all the deleted and non-purged secrets, assuming key vault is soft-delete enabled. - for (DeletedSecret deletedSecret : client.listDeletedSecrets()) { - System.out.printf("Deleted secret's recovery Id %s", deletedSecret.getRecoveryId()); + for (DeletedSecret delSecret : client.listDeletedSecrets()) { + System.out.printf("Deleted secret's recovery Id %s", delSecret.getRecoveryId()); } // If the key vault is soft-delete enabled, then for permanent deletion deleted secrets need to be purged. diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecretsAsync.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecretsAsync.java index 75213ab4c469..3bd68f44ca4b 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecretsAsync.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecretsAsync.java @@ -3,8 +3,8 @@ package com.azure.security.keyvault.secrets; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; import java.time.OffsetDateTime; @@ -30,48 +30,68 @@ public static void main(String[] args) throws InterruptedException { // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. SecretAsyncClient secretAsyncClient = new SecretClientBuilder() - .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .vaultUrl("https://{YOUR_VAULT_NAME}.vault.azure.net") .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); // Let's create secrets holding storage and bank accounts credentials valid for 1 year. if the secret // already exists in the key vault, then a new version of the secret is created. - secretAsyncClient.setSecret(new Secret("BankAccountPassword", "f4G34fMh8v") + secretAsyncClient.setSecret(new KeyVaultSecret("BankAccountPassword", "f4G34fMh8v") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))).subscribe(secretResponse -> + .setExpiresOn(OffsetDateTime.now().plusYears(1)))).subscribe(secretResponse -> System.out.printf("Secret is created with name %s and value %s %n", secretResponse.getName(), secretResponse.getValue())); Thread.sleep(2000); - secretAsyncClient.setSecret(new Secret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") + secretAsyncClient.setSecret(new KeyVaultSecret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.now().plusYears(1)))).subscribe(secretResponse -> + .setExpiresOn(OffsetDateTime.now().plusYears(1)))).subscribe(secretResponse -> System.out.printf("Secret is created with name %s and value %s %n", secretResponse.getName(), secretResponse.getValue())); Thread.sleep(2000); // The storage account was closed, need to delete its credentials from the key vault. - secretAsyncClient.deleteSecret("BankAccountPassword").subscribe(deletedSecretResponse -> - System.out.printf("Deleted Secret's Recovery Id %s %n", deletedSecretResponse.getRecoveryId())); + secretAsyncClient.beginDeleteSecret("BankAccountPassword") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Deleted Secret Name: " + pollResponse.getValue().getName()); + System.out.println("Deleted Secret Value: " + pollResponse.getValue().getValue()); + }); //To ensure secret is deleted on server side. Thread.sleep(30000); // We accidentally deleted bank account secret. Let's recover it. // A deleted secret can only be recovered if the key vault is soft-delete enabled. - secretAsyncClient.recoverDeletedSecret("BankAccountPassword").subscribe(recoveredSecretResponse -> - System.out.printf("Recovered Secret with name %s %n", recoveredSecretResponse.getName())); + secretAsyncClient.beginRecoverDeletedSecret("BankAccountPassword") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Recovery Status: " + pollResponse.getStatus().toString()); + System.out.println("Recovered Secret Name: " + pollResponse.getValue().getName()); + System.out.println("Recovered Secret Value: " + pollResponse.getValue().getValue()); + }); //To ensure secret is recovered on server side. Thread.sleep(10000); // The bank acoount and storage accounts got closed. // Let's delete bank and storage accounts secrets. - secretAsyncClient.deleteSecret("BankAccountPassword").subscribe(deletedSecretResponse -> - System.out.printf("Deleted Secret's Recovery Id %s %n", deletedSecretResponse.getRecoveryId())); - - secretAsyncClient.deleteSecret("StorageAccountPassword").subscribe(deletedSecretResponse -> - System.out.printf("Deleted Secret's Recovery Id %s %n", deletedSecretResponse.getRecoveryId())); + secretAsyncClient.beginDeleteSecret("BankAccountPassword") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Deleted Secret Name: " + pollResponse.getValue().getName()); + System.out.println("Deleted Secret Value: " + pollResponse.getValue().getValue()); + }); + + secretAsyncClient.beginDeleteSecret("StorageAccountPassword") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Deleted Secret Name: " + pollResponse.getValue().getName()); + System.out.println("Deleted Secret Value: " + pollResponse.getValue().getValue()); + }); // To ensure secret is deleted on server side. Thread.sleep(30000); diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/PersistentTokenCacheDemo.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/PersistentTokenCacheDemo.java index 55492f4a4709..fb98d42c13f3 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/PersistentTokenCacheDemo.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/PersistentTokenCacheDemo.java @@ -3,9 +3,9 @@ package com.azure.security.keyvault.secrets; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.identity.SharedTokenCacheCredential; import com.azure.identity.SharedTokenCacheCredentialBuilder; -import com.azure.security.keyvault.secrets.models.Secret; /** * Sample showing how to authenticate to key vault with a shared token cache credential. @@ -24,13 +24,13 @@ public static void main(String[] args) { .build(); SecretClient client = new SecretClientBuilder() - .endpoint("https://persistentcachedemo.vault.azure.net") + .vaultUrl("https://persistentcachedemo.vault.azure.net") .credential(defaultCredential) .buildClient(); // Try to get a secret! Only works if you are logged in System.out.println("\nWhat is the super secret secret?\n\n"); - Secret secret = client.getSecret("the-secret"); + KeyVaultSecret secret = client.getSecret("the-secret"); System.out.println("Secret was found: " + secret.getValue()); } } diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretAsyncClientJavaDocCodeSnippets.java index c74172264f84..6e65f9d4c993 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretAsyncClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretAsyncClientJavaDocCodeSnippets.java @@ -8,8 +8,10 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.security.keyvault.secrets.implementation.KeyVaultCredentialPolicy; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; import reactor.util.context.Context; @@ -31,16 +33,14 @@ public final class SecretAsyncClientJavaDocCodeSnippets { */ public SecretAsyncClient createAsyncClientWithHttpclient() { // BEGIN: com.azure.security.keyvault.secrets.async.secretclient.withhttpclient.instantiation - HttpPipeline pipeline = new HttpPipelineBuilder().build(); - SecretAsyncClient keyClient = new SecretClientBuilder() - .pipeline(pipeline) + SecretAsyncClient secretAsyncClient = new SecretClientBuilder() .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) - .endpoint("https://myvault.azure.net/") + .vaultUrl("https://myvault.azure.net/") .credential(new DefaultAzureCredentialBuilder().build()) .httpClient(HttpClient.createDefault()) .buildAsyncClient(); // END: com.azure.security.keyvault.secrets.async.secretclient.withhttpclient.instantiation - return keyClient; + return secretAsyncClient; } /** @@ -52,7 +52,7 @@ private SecretAsyncClient getAsyncSecretClient() { // BEGIN: com.azure.security.keyvault.secrets.async.secretclient.construct SecretAsyncClient secretAsyncClient = new SecretClientBuilder() .credential(new DefaultAzureCredentialBuilder().build()) - .endpoint("https://myvault.vault.azure.net/") + .vaultUrl("https://myvault.vault.azure.net/") .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) .buildAsyncClient(); // END: com.azure.security.keyvault.secrets.async.secretclient.construct @@ -65,30 +65,22 @@ private SecretAsyncClient getAsyncSecretClient() { */ public SecretAsyncClient createAsyncClientWithPipeline() { // BEGIN: com.azure.security.keyvault.secrets.async.secretclient.pipeline.instantiation - HttpPipeline pipeline = new HttpPipelineBuilder().build(); + HttpPipeline pipeline = new HttpPipelineBuilder() + .policies(new KeyVaultCredentialPolicy(new DefaultAzureCredentialBuilder().build()), new RetryPolicy()) + .build(); SecretAsyncClient secretAsyncClient = new SecretClientBuilder() .pipeline(pipeline) - .endpoint("https://myvault.azure.net/") - .credential(new DefaultAzureCredentialBuilder().build()) + .vaultUrl("https://myvault.azure.net/") .buildAsyncClient(); // END: com.azure.security.keyvault.secrets.async.secretclient.pipeline.instantiation return secretAsyncClient; } /** - * Method to insert code snippets for {@link SecretAsyncClient#getSecret(SecretProperties)} + * Method to insert code snippets for {@link SecretAsyncClient#getSecret(String, String)} */ public void getSecretCodeSnippets() { SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); - // BEGIN: com.azure.keyvault.secrets.secretclient.getSecret#secretProperties - secretAsyncClient.listSecrets() - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(secretProperties -> secretAsyncClient.getSecret(secretProperties) - .subscribe(secretResponse -> - System.out.printf("Secret is returned with name %s and value %s %n", secretResponse.getName(), - secretResponse.getValue()))); - // END: com.azure.keyvault.secrets.secretclient.getSecret#secretProperties - // BEGIN: com.azure.keyvault.secrets.secretclient.getSecret#string-string String secretVersion = "6A385B124DEF4096AF1361A85B16C204"; secretAsyncClient.getSecret("secretName", secretVersion) @@ -108,18 +100,10 @@ public void getSecretCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretAsyncClient#getSecretWithResponse(SecretProperties)} + * Method to insert code snippets for {@link SecretAsyncClient#getSecretWithResponse(String, String)} */ public void getSecretWithResponseCodeSnippets() { SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); - // BEGIN: com.azure.keyvault.secrets.secretclient.getSecretWithResponse#secretProperties - secretAsyncClient.listSecrets() - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(secretProperties -> secretAsyncClient.getSecretWithResponse(secretProperties) - .subscribe(secretResponse -> - System.out.printf("Secret is returned with name %s and value %s %n", - secretResponse.getValue().getName(), secretResponse.getValue().getValue()))); - // END: com.azure.keyvault.secrets.secretclient.getSecretWithResponse#secretProperties // BEGIN: com.azure.keyvault.secrets.secretclient.getSecretWithResponse#string-string String secretVersion = "6A385B124DEF4096AF1361A85B16C204"; @@ -132,13 +116,13 @@ public void getSecretWithResponseCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretAsyncClient#setSecret(Secret)} + * Method to insert code snippets for {@link SecretAsyncClient#setSecret(KeyVaultSecret)} */ public void setSecretCodeSnippets() { SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); // BEGIN: com.azure.keyvault.secrets.secretclient.setSecret#secret - Secret newSecret = new Secret("secretName", "secretValue"). - setProperties(new SecretProperties().setExpires(OffsetDateTime.now().plusDays(60))); + KeyVaultSecret newSecret = new KeyVaultSecret("secretName", "secretValue"). + setProperties(new SecretProperties().setExpiresOn(OffsetDateTime.now().plusDays(60))); secretAsyncClient.setSecret(newSecret) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(secretResponse -> @@ -156,13 +140,13 @@ public void setSecretCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretAsyncClient#setSecretWithResponse(Secret)} + * Method to insert code snippets for {@link SecretAsyncClient#setSecretWithResponse(KeyVaultSecret)} */ public void setSecretWithResponseCodeSnippets() { SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); // BEGIN: com.azure.keyvault.secrets.secretclient.setSecretWithResponse#secret - Secret newSecret = new Secret("secretName", "secretValue"). - setProperties(new SecretProperties().setExpires(OffsetDateTime.now().plusDays(60))); + KeyVaultSecret newSecret = new KeyVaultSecret("secretName", "secretValue"). + setProperties(new SecretProperties().setExpiresOn(OffsetDateTime.now().plusDays(60))); secretAsyncClient.setSecretWithResponse(newSecret) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(secretResponse -> @@ -212,34 +196,23 @@ public void updateSecretWithResponseCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretAsyncClient#deleteSecret(String)} + * Method to insert code snippets for {@link SecretAsyncClient#beginDeleteSecret(String)} */ public void deleteSecretCodeSnippets() { SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); // BEGIN: com.azure.keyvault.secrets.secretclient.deleteSecret#string - secretAsyncClient.deleteSecret("secretName") - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(deletedSecretResponse -> - System.out.printf("Deleted Secret's Recovery Id %s %n", deletedSecretResponse.getRecoveryId())); + secretAsyncClient.beginDeleteSecret("secretName") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Delete Status: " + pollResponse.getStatus().toString()); + System.out.println("Deleted Secret Name: " + pollResponse.getValue().getName()); + System.out.println("Deleted Secret Value: " + pollResponse.getValue().getValue()); + }); // END: com.azure.keyvault.secrets.secretclient.deleteSecret#string } /** - * Method to insert code snippets for {@link SecretAsyncClient#deleteSecretWithResponse(String)} - */ - public void deleteSecretWithResponseCodeSnippets() { - SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); - // BEGIN: com.azure.keyvault.secrets.secretclient.deleteSecretWithResponse#string - secretAsyncClient.deleteSecretWithResponse("secretName") - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(deletedSecretResponse -> - System.out.printf("Deleted Secret's Recovery Id %s %n", - deletedSecretResponse.getValue().getRecoveryId())); - // END: com.azure.keyvault.secrets.secretclient.deleteSecretWithResponse#string - } - - /** - * Method to insert code snippets for {@link SecretAsyncClient#deleteSecret(String)} + * Method to insert code snippets for {@link SecretAsyncClient#getDeletedSecret(String)} */ public void getDeletedSecretCodeSnippets() { SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); @@ -291,31 +264,21 @@ public void purgeDeletedSecretWithResponseCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretAsyncClient#recoverDeletedSecret(String)} + * Method to insert code snippets for {@link SecretAsyncClient#beginRecoverDeletedSecret(String)} */ public void recoverDeletedSecretCodeSnippets() { SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); // BEGIN: com.azure.keyvault.secrets.secretclient.recoverDeletedSecret#string - secretAsyncClient.recoverDeletedSecret("deletedSecretName") - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(recoveredSecretResponse -> - System.out.printf("Recovered Secret with name %s %n", recoveredSecretResponse.getName())); + secretAsyncClient.beginRecoverDeletedSecret("deletedSecretName") + .getObserver() + .subscribe(pollResponse -> { + System.out.println("Recovery Status: " + pollResponse.getStatus().toString()); + System.out.println("Recovered Secret Name: " + pollResponse.getValue().getName()); + System.out.println("Recovered Secret Value: " + pollResponse.getValue().getValue()); + }); // END: com.azure.keyvault.secrets.secretclient.recoverDeletedSecret#string } - /** - * Method to insert code snippets for {@link SecretAsyncClient#recoverDeletedSecretWithResponse(String)} - */ - public void recoverDeletedSecretWithResponseCodeSnippets() { - SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); - // BEGIN: com.azure.keyvault.secrets.secretclient.recoverDeletedSecretWithResponse#string - secretAsyncClient.recoverDeletedSecretWithResponse("deletedSecretName") - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(recoveredSecretResponse -> - System.out.printf("Recovered Secret with name %s %n", recoveredSecretResponse.getValue().getName())); - // END: com.azure.keyvault.secrets.secretclient.recoverDeletedSecretWithResponse#string - } - /** * Method to insert code snippets for {@link SecretAsyncClient#backupSecret(String)} */ @@ -343,13 +306,13 @@ public void backupSecretWithResponseCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretAsyncClient#restoreSecret(byte[])} + * Method to insert code snippets for {@link SecretAsyncClient#restoreSecretBackup(byte[])} */ public void restoreSecretCodeSnippets() { SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); // BEGIN: com.azure.keyvault.secrets.secretclient.restoreSecret#byte byte[] secretBackupByteArray = {}; - secretAsyncClient.restoreSecret(secretBackupByteArray) + secretAsyncClient.restoreSecretBackup(secretBackupByteArray) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(secretResponse -> System.out.printf("Restored Secret with name %s and value %s %n", secretResponse.getName(), secretResponse.getValue())); @@ -357,13 +320,13 @@ public void restoreSecretCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretAsyncClient#restoreSecretWithResponse(byte[])} + * Method to insert code snippets for {@link SecretAsyncClient#restoreSecretBackupWithResponse(byte[])} */ public void restoreSecretWithResponseCodeSnippets() { SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); // BEGIN: com.azure.keyvault.secrets.secretclient.restoreSecretWithResponse#byte byte[] secretBackupByteArray = {}; - secretAsyncClient.restoreSecretWithResponse(secretBackupByteArray) + secretAsyncClient.restoreSecretBackupWithResponse(secretBackupByteArray) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(secretResponse -> System.out.printf("Restored Secret with name %s and value %s %n", secretResponse.getValue().getName(), secretResponse.getValue().getValue())); @@ -371,14 +334,15 @@ public void restoreSecretWithResponseCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretAsyncClient#listSecrets()} + * Method to insert code snippets for {@link SecretAsyncClient#listPropertiesOfSecrets()} */ public void listSecretsCodeSnippets() { SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); // BEGIN: com.azure.keyvault.secrets.secretclient.listSecrets - secretAsyncClient.listSecrets() + secretAsyncClient.listPropertiesOfSecrets() .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(secretProperties -> secretAsyncClient.getSecret(secretProperties) + .subscribe(secretProperties -> secretAsyncClient + .getSecret(secretProperties.getName(), secretProperties.getVersion()) .subscribe(secretResponse -> System.out.printf("Received secret with name %s and type %s", secretResponse.getName(), secretResponse.getValue()))); // END: com.azure.keyvault.secrets.secretclient.listSecrets @@ -398,14 +362,15 @@ public void listDeletedSecretsCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretAsyncClient#listSecretVersions(String)} + * Method to insert code snippets for {@link SecretAsyncClient#listPropertiesOfSecretVersions(String)} */ public void listSecretVersionsCodeSnippets() { SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); // BEGIN: com.azure.keyvault.secrets.secretclient.listSecretVersions#string - secretAsyncClient.listSecretVersions("secretName") + secretAsyncClient.listPropertiesOfSecretVersions("secretName") .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(secretProperties -> secretAsyncClient.getSecret(secretProperties) + .subscribe(secretProperties -> secretAsyncClient + .getSecret(secretProperties.getName(), secretProperties.getVersion()) .subscribe(secretResponse -> System.out.printf("Received secret with name %s and type %s", secretResponse.getName(), secretResponse.getValue()))); // END: com.azure.keyvault.secrets.secretclient.listSecretVersions#string diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java index 911c25b1d6a2..75d1caeb77dd 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java @@ -7,9 +7,11 @@ import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.secrets.models.DeletedSecret; -import com.azure.security.keyvault.secrets.models.Secret; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.security.keyvault.secrets.models.SecretProperties; import java.time.OffsetDateTime; @@ -25,13 +27,13 @@ public final class SecretClientJavaDocCodeSnippets { private String value2 = "val2"; /** - * Method to insert code snippets for {@link SecretClient#getSecret(SecretProperties)} + * Method to insert code snippets for {@link SecretClient#getSecret(String, String)} */ public void getSecretCodeSnippets() { SecretClient secretClient = getSecretClient(); // BEGIN: com.azure.security.keyvault.secretclient.getSecret#secretProperties - for (SecretProperties secret : secretClient.listSecrets()) { - Secret secretWithValue = secretClient.getSecret(secret); + for (SecretProperties secret : secretClient.listPropertiesOfSecrets()) { + KeyVaultSecret secretWithValue = secretClient.getSecret(secret.getName(), secret.getVersion()); System.out.printf("Secret is returned with name %s and value %s %n", secretWithValue.getName(), secretWithValue.getValue()); } @@ -39,13 +41,13 @@ public void getSecretCodeSnippets() { // BEGIN: com.azure.security.keyvault.secretclient.getSecret#string-string String secretVersion = "6A385B124DEF4096AF1361A85B16C204"; - Secret secretWithVersion = secretClient.getSecret("secretName", secretVersion); + KeyVaultSecret secretWithVersion = secretClient.getSecret("secretName", secretVersion); System.out.printf("Secret is returned with name %s and value %s %n", secretWithVersion.getName(), secretWithVersion.getValue()); // END: com.azure.security.keyvault.secretclient.getSecret#string-string // BEGIN: com.azure.security.keyvault.secretclient.getSecret#string - Secret secretWithoutVersion = secretClient.getSecret("secretName", secretVersion); + KeyVaultSecret secretWithoutVersion = secretClient.getSecret("secretName", secretVersion); System.out.printf("Secret is returned with name %s and value %s %n", secretWithoutVersion.getName(), secretWithoutVersion.getValue()); // END: com.azure.security.keyvault.secretclient.getSecret#string @@ -56,17 +58,10 @@ public void getSecretCodeSnippets() { */ public void getSecretWithResponseCodeSnippets() { SecretClient secretClient = getSecretClient(); - // BEGIN: com.azure.security.keyvault.secretclient.getSecretWithResponse#secretProperties - for (SecretProperties secret : secretClient.listSecrets()) { - Secret secretWithValue = secretClient.getSecretWithResponse(secret, new Context(key2, value2)).getValue(); - System.out.printf("Secret is returned with name %s and value %s %n", secretWithValue.getName(), - secretWithValue.getValue()); - } - // END: com.azure.security.keyvault.secretclient.getSecretWithResponse#secretProperties // BEGIN: com.azure.security.keyvault.secretclient.getSecretWithResponse#string-string-Context String secretVersion = "6A385B124DEF4096AF1361A85B16C204"; - Secret secretWithVersion = secretClient.getSecretWithResponse("secretName", secretVersion, + KeyVaultSecret secretWithVersion = secretClient.getSecretWithResponse("secretName", secretVersion, new Context(key2, value2)).getValue(); System.out.printf("Secret is returned with name %s and value %s %n", secretWithVersion.getName(), secretWithVersion.getValue()); @@ -74,33 +69,33 @@ public void getSecretWithResponseCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretClient#setSecret(Secret)} + * Method to insert code snippets for {@link SecretClient#setSecret(KeyVaultSecret)} */ public void setSecretCodeSnippets() { SecretClient secretClient = getSecretClient(); // BEGIN: com.azure.security.keyvault.secretclient.setSecret#secret - Secret newSecret = new Secret("secretName", "secretValue") - .setProperties(new SecretProperties().setExpires(OffsetDateTime.now().plusDays(60))); - Secret returnedSecret = secretClient.setSecret(newSecret); + KeyVaultSecret newSecret = new KeyVaultSecret("secretName", "secretValue") + .setProperties(new SecretProperties().setExpiresOn(OffsetDateTime.now().plusDays(60))); + KeyVaultSecret returnedSecret = secretClient.setSecret(newSecret); System.out.printf("Secret is created with name %s and value %s %n", returnedSecret.getName(), returnedSecret.getValue()); // END: com.azure.security.keyvault.secretclient.setSecret#secret // BEGIN: com.azure.security.keyvault.secretclient.setSecret#string-string - Secret secret = secretClient.setSecret("secretName", "secretValue"); + KeyVaultSecret secret = secretClient.setSecret("secretName", "secretValue"); System.out.printf("Secret is created with name %s and value %s %n", secret.getName(), secret.getValue()); // END: com.azure.security.keyvault.secretclient.setSecret#string-string } /** - * Method to insert code snippets for {@link SecretClient#setSecretWithResponse(Secret, Context)} + * Method to insert code snippets for {@link SecretClient#setSecretWithResponse(KeyVaultSecret, Context)} */ public void setSecretWithResponseCodeSnippets() { SecretClient secretClient = getSecretClient(); // BEGIN: com.azure.security.keyvault.secretclient.setSecretWithResponse#secret-Context - Secret newSecret = new Secret("secretName", "secretValue") - .setProperties(new SecretProperties().setExpires(OffsetDateTime.now().plusDays(60))); - Secret secret = secretClient.setSecretWithResponse(newSecret, new Context(key1, value1)).getValue(); + KeyVaultSecret newSecret = new KeyVaultSecret("secretName", "secretValue") + .setProperties(new SecretProperties().setExpiresOn(OffsetDateTime.now().plusDays(60))); + KeyVaultSecret secret = secretClient.setSecretWithResponse(newSecret, new Context(key1, value1)).getValue(); System.out.printf("Secret is created with name %s and value %s %n", secret.getName(), secret.getValue()); // END: com.azure.security.keyvault.secretclient.setSecretWithResponse#secret-Context } @@ -112,11 +107,11 @@ public void updateSecretCodeSnippets() { SecretClient secretClient = getSecretClient(); // BEGIN: com.azure.security.keyvault.secretclient.updateSecretProperties#secretProperties SecretProperties secretProperties = secretClient.getSecret("secretName").getProperties(); - secretProperties.setExpires(OffsetDateTime.now().plusDays(60)); + secretProperties.setExpiresOn(OffsetDateTime.now().plusDays(60)); SecretProperties updatedSecretProperties = secretClient.updateSecretProperties(secretProperties); - Secret updatedSecret = secretClient.getSecret(updatedSecretProperties.getName()); + KeyVaultSecret updatedSecret = secretClient.getSecret(updatedSecretProperties.getName()); System.out.printf("Updated Secret is returned with name %s, value %s and expires %s %n", - updatedSecret.getName(), updatedSecret.getValue(), updatedSecret.getProperties().getExpires()); + updatedSecret.getName(), updatedSecret.getValue(), updatedSecret.getProperties().getExpiresOn()); // END: com.azure.security.keyvault.secretclient.updateSecretProperties#secretProperties } @@ -127,40 +122,45 @@ public void updateSecretWithResponseCodeSnippets() { SecretClient secretClient = getSecretClient(); // BEGIN: com.azure.security.keyvault.secretclient.updateSecretPropertiesWithResponse#secretProperties-Context SecretProperties secretProperties = secretClient.getSecret("secretName").getProperties(); - secretProperties.setExpires(OffsetDateTime.now().plusDays(60)); + secretProperties.setExpiresOn(OffsetDateTime.now().plusDays(60)); SecretProperties updatedSecretBase = secretClient.updateSecretPropertiesWithResponse(secretProperties, new Context(key2, value2)).getValue(); - Secret updatedSecret = secretClient.getSecret(updatedSecretBase.getName()); + KeyVaultSecret updatedSecret = secretClient.getSecret(updatedSecretBase.getName()); System.out.printf("Updated Secret is returned with name %s, value %s and expires %s %n", - updatedSecret.getName(), updatedSecret.getValue(), updatedSecret.getProperties().getExpires()); + updatedSecret.getName(), updatedSecret.getValue(), updatedSecret.getProperties().getExpiresOn()); // END: com.azure.security.keyvault.secretclient.updateSecretPropertiesWithResponse#secretProperties-Context } /** - * Method to insert code snippets for {@link SecretClient#deleteSecret(String)} + * Method to insert code snippets for {@link SecretClient#beginDeleteSecret(String)} + * @throws InterruptedException when the thread is interrupted in sleep mode. */ - public void deleteSecretCodeSnippets() { + public void deleteSecretCodeSnippets() throws InterruptedException { SecretClient secretClient = getSecretClient(); // BEGIN: com.azure.security.keyvault.secretclient.deleteSecret#string - DeletedSecret deletedSecret = secretClient.deleteSecret("secretName"); - System.out.printf("Deleted Secret's Recovery Id %s", deletedSecret.getRecoveryId()); - // END: com.azure.security.keyvault.secretclient.deleteSecret#string - } + Poller deletedSecretPoller = secretClient.beginDeleteSecret("secretName"); - /** - * Method to insert code snippets for {@link SecretClient#deleteSecretWithResponse(String, Context)} - */ - public void deleteSecretWithResponseCodeSnippets() { - SecretClient secretClient = getSecretClient(); - // BEGIN: com.azure.security.keyvault.secretclient.deleteSecretWithResponse#string-Context - DeletedSecret deletedSecret = secretClient.deleteSecretWithResponse("secretName", - new Context(key2, value2)).getValue(); + while (deletedSecretPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS + && !deletedSecretPoller.isComplete()) { + System.out.println(deletedSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } + + // Deleted Secret is accessible as soon as polling begins + DeletedSecret deletedSecret = deletedSecretPoller.getLastPollResponse().getValue(); + System.out.println("Deleted Date %s" + deletedSecret.getDeletedOn().toString()); System.out.printf("Deleted Secret's Recovery Id %s", deletedSecret.getRecoveryId()); - // END: com.azure.security.keyvault.secretclient.deleteSecretWithResponse#string-Context + + // Secret is being deleted on server. + while (!deletedSecretPoller.isComplete()) { + System.out.println(deletedSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } + // END: com.azure.security.keyvault.secretclient.deleteSecret#string } /** - * Method to insert code snippets for {@link SecretClient#deleteSecret(String)} + * Method to insert code snippets for {@link SecretClient#beginDeleteSecret(String)} */ public void getDeletedSecretCodeSnippets() { SecretClient secretClient = getSecretClient(); @@ -206,26 +206,31 @@ public void purgeDeletedSecretWithResponseCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretClient#recoverDeletedSecret(String)} + * Method to insert code snippets for {@link SecretClient#beginRecoverDeletedSecret(String)} + * @throws InterruptedException when the thread is interrupted in sleep mode. */ - public void recoverDeletedSecretCodeSnippets() { + public void recoverDeletedSecretCodeSnippets() throws InterruptedException { SecretClient secretClient = getSecretClient(); // BEGIN: com.azure.security.keyvault.secretclient.recoverDeletedSecret#string - Secret recoveredSecret = secretClient.recoverDeletedSecret("secretName"); - System.out.printf("Recovered Secret with name %s", recoveredSecret.getName()); - // END: com.azure.security.keyvault.secretclient.recoverDeletedSecret#string - } + Poller recoverSecretPoller = + secretClient.beginRecoverDeletedSecret("deletedSecretName"); - /** - * Method to insert code snippets for {@link SecretClient#recoverDeletedSecretWithResponse(String, Context)} - */ - public void recoverDeletedSecretWithResponseCodeSnippets() { - SecretClient secretClient = getSecretClient(); - // BEGIN: com.azure.security.keyvault.secretclient.recoverDeletedSecretWithResponse#string-Context - Secret recoveredSecret = secretClient.recoverDeletedSecretWithResponse("secretName", - new Context(key1, value1)).getValue(); - System.out.printf("Recovered Secret with name %s", recoveredSecret.getName()); - // END: com.azure.security.keyvault.secretclient.recoverDeletedSecretWithResponse#string-Context + while (recoverSecretPoller.getStatus() != PollResponse.OperationStatus.IN_PROGRESS + && !recoverSecretPoller.isComplete()) { + System.out.println(recoverSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } + // Deleted Secret can be accessed as soon as polling is in progress. + KeyVaultSecret recoveredSecret = recoverSecretPoller.getLastPollResponse().getValue(); + System.out.println("Recovered Key Name %s" + recoveredSecret.getName()); + System.out.printf("Recovered Key's Id %s", recoveredSecret.getId()); + + // Key is being recovered on server. + while (!recoverSecretPoller.isComplete()) { + System.out.println(recoverSecretPoller.getStatus().toString()); + Thread.sleep(2000); + } + // END: com.azure.security.keyvault.secretclient.recoverDeletedSecret#string } /** @@ -252,26 +257,26 @@ public void backupSecretWithResponseCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretClient#restoreSecret(byte[])} + * Method to insert code snippets for {@link SecretClient#restoreSecretBackup(byte[])} */ public void restoreSecretCodeSnippets() { SecretClient secretClient = getSecretClient(); // BEGIN: com.azure.security.keyvault.secretclient.restoreSecret#byte byte[] secretBackupByteArray = {}; - Secret restoredSecret = secretClient.restoreSecret(secretBackupByteArray); + KeyVaultSecret restoredSecret = secretClient.restoreSecretBackup(secretBackupByteArray); System.out .printf("Restored Secret with name %s and value %s", restoredSecret.getName(), restoredSecret.getValue()); // END: com.azure.security.keyvault.secretclient.restoreSecret#byte } /** - * Method to insert code snippets for {@link SecretClient#restoreSecretWithResponse(byte[], Context)} + * Method to insert code snippets for {@link SecretClient#restoreSecretBackupWithResponse(byte[], Context)} */ public void restoreSecretWithResponseCodeSnippets() { SecretClient secretClient = getSecretClient(); // BEGIN: com.azure.security.keyvault.secretclient.restoreSecretWithResponse#byte-Context byte[] secretBackupByteArray = {}; - Secret restoredSecret = secretClient.restoreSecretWithResponse(secretBackupByteArray, + KeyVaultSecret restoredSecret = secretClient.restoreSecretBackupWithResponse(secretBackupByteArray, new Context(key2, value2)).getValue(); System.out .printf("Restored Secret with name %s and value %s", restoredSecret.getName(), restoredSecret.getValue()); @@ -279,32 +284,32 @@ public void restoreSecretWithResponseCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretClient#listSecrets()} + * Method to insert code snippets for {@link SecretClient#listPropertiesOfSecrets()} */ public void listSecretsCodeSnippets() { SecretClient secretClient = getSecretClient(); // BEGIN: com.azure.security.keyvault.secretclient.listSecrets - for (SecretProperties secret : secretClient.listSecrets()) { - Secret secretWithValue = secretClient.getSecret(secret); + for (SecretProperties secret : secretClient.listPropertiesOfSecrets()) { + KeyVaultSecret secretWithValue = secretClient.getSecret(secret.getName(), secret.getVersion()); System.out.printf("Received secret with name %s and value %s", secretWithValue.getName(), secretWithValue.getValue()); } // END: com.azure.security.keyvault.secretclient.listSecrets // BEGIN: com.azure.security.keyvault.secretclient.listSecrets#Context - for (SecretProperties secret : secretClient.listSecrets(new Context(key1, value2))) { - Secret secretWithValue = secretClient.getSecret(secret); + for (SecretProperties secret : secretClient.listPropertiesOfSecrets(new Context(key1, value2))) { + KeyVaultSecret secretWithValue = secretClient.getSecret(secret.getName(), secret.getVersion()); System.out.printf("Received secret with name %s and value %s", secretWithValue.getName(), secretWithValue.getValue()); } // END: com.azure.security.keyvault.secretclient.listSecrets#Context // BEGIN: com.azure.security.keyvault.secretclient.listSecrets.iterableByPage - secretClient.listSecrets().iterableByPage().forEach(resp -> { + secretClient.listPropertiesOfSecrets().iterableByPage().forEach(resp -> { System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.getHeaders(), resp.getRequest().getUrl(), resp.getStatusCode()); resp.getItems().forEach(value -> { - Secret secretWithValue = secretClient.getSecret(value); + KeyVaultSecret secretWithValue = secretClient.getSecret(value.getName(), value.getVersion()); System.out.printf("Received secret with name %s and value %s", secretWithValue.getName(), secretWithValue.getValue()); }); @@ -341,33 +346,34 @@ public void listDeletedSecretsCodeSnippets() { } /** - * Method to insert code snippets for {@link SecretClient#listSecretVersions(String)} + * Method to insert code snippets for {@link SecretClient#listPropertiesOfSecretVersions(String)} */ public void listSecretVersionsCodeSnippets() { SecretClient secretClient = getSecretClient(); // BEGIN: com.azure.security.keyvault.secretclient.listSecretVersions#string - for (SecretProperties secret : secretClient.listSecretVersions("secretName")) { - Secret secretWithValue = secretClient.getSecret(secret); + for (SecretProperties secret : secretClient.listPropertiesOfSecretVersions("secretName")) { + KeyVaultSecret secretWithValue = secretClient.getSecret(secret.getName(), secret.getVersion()); System.out.printf("Received secret's version with name %s and value %s", secretWithValue.getName(), secretWithValue.getValue()); } // END: com.azure.security.keyvault.secretclient.listSecretVersions#string // BEGIN: com.azure.security.keyvault.secretclient.listSecretVersions#string-Context - for (SecretProperties secret : secretClient.listSecretVersions("secretName", new Context(key1, value2))) { - Secret secretWithValue = secretClient.getSecret(secret); + for (SecretProperties secret : secretClient + .listPropertiesOfSecretVersions("secretName", new Context(key1, value2))) { + KeyVaultSecret secretWithValue = secretClient.getSecret(secret.getName(), secret.getVersion()); System.out.printf("Received secret's version with name %s and value %s", secretWithValue.getName(), secretWithValue.getValue()); } // END: com.azure.security.keyvault.secretclient.listSecretVersions#string-Context // BEGIN: com.azure.security.keyvault.secretclient.listSecretVersions#string-Context-iterableByPage - secretClient.listSecretVersions("secretName", new Context(key1, value2)) + secretClient.listPropertiesOfSecretVersions("secretName", new Context(key1, value2)) .iterableByPage().forEach(resp -> { System.out.printf("Got response headers . Url: %s, Status code: %d %n", resp.getRequest().getUrl(), resp.getStatusCode()); resp.getItems().forEach(value -> { - Secret secretWithValue = secretClient.getSecret(value); + KeyVaultSecret secretWithValue = secretClient.getSecret(value.getName(), value.getVersion()); System.out.printf("Received secret's version with name %s and value %s", secretWithValue.getName(), secretWithValue.getValue()); }); @@ -385,7 +391,7 @@ private SecretClient getSyncSecretClientCodeSnippets() { // BEGIN: com.azure.security.keyvault.secretclient.sync.construct SecretClient secretClient = new SecretClientBuilder() .credential(new DefaultAzureCredentialBuilder().build()) - .endpoint("https://myvault.vault.azure.net/") + .vaultUrl("https://myvault.vault.azure.net/") .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) .buildClient(); // END: com.azure.security.keyvault.secretclient.sync.construct diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretAsyncClientTest.java b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretAsyncClientTest.java index c50a84f19c39..f329ab2733eb 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretAsyncClientTest.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretAsyncClientTest.java @@ -6,8 +6,10 @@ import com.azure.core.exception.HttpResponseException; import com.azure.core.exception.ResourceModifiedException; import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; import com.azure.security.keyvault.secrets.models.DeletedSecret; -import com.azure.security.keyvault.secrets.models.Secret; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.security.keyvault.secrets.models.SecretProperties; import org.junit.Assert; import reactor.test.StepVerifier; @@ -32,12 +34,12 @@ protected void beforeTest() { if (interceptorManager.isPlaybackMode()) { client = clientSetup(pipeline -> new SecretClientBuilder() .pipeline(pipeline) - .endpoint(getEndpoint()) + .vaultUrl(getEndpoint()) .buildAsyncClient()); } else { client = clientSetup(pipeline -> new SecretClientBuilder() .pipeline(pipeline) - .endpoint(getEndpoint()) + .vaultUrl(getEndpoint()) .buildAsyncClient()); } } @@ -46,7 +48,6 @@ protected void beforeTest() { * Tests that a secret can be created in the key vault. */ public void setSecret() { - setSecretRunner((expected) -> StepVerifier.create(client.setSecret(expected)) .assertNext(response -> assertSecretEquals(expected, response)) .verifyComplete()); @@ -92,9 +93,9 @@ public void updateSecret() { StepVerifier.create(client.setSecret(original)) .assertNext(response -> assertSecretEquals(original, response)) .verifyComplete(); - Secret secretToUpdate = client.getSecret(original.getName()).block(); + KeyVaultSecret secretToUpdate = client.getSecret(original.getName()).block(); - StepVerifier.create(client.updateSecretProperties(secretToUpdate.getProperties().setExpires(updated.getProperties().getExpires()))) + StepVerifier.create(client.updateSecretProperties(secretToUpdate.getProperties().setExpiresOn(updated.getProperties().getExpiresOn()))) .assertNext(response -> { assertNotNull(response); Assert.assertEquals(original.getName(), response.getName()); @@ -138,8 +139,8 @@ public void getSecret() { */ public void getSecretSpecificVersion() { getSecretSpecificVersionRunner((secret, secretWithNewVal) -> { - final Secret secretVersionOne = client.setSecret(secret).block(); - final Secret secretVersionTwo = client.setSecret(secretWithNewVal).block(); + final KeyVaultSecret secretVersionOne = client.setSecret(secret).block(); + final KeyVaultSecret secretVersionTwo = client.setSecret(secretWithNewVal).block(); StepVerifier.create(client.getSecret(secret.getName(), secretVersionOne.getProperties().getVersion())) .assertNext(response -> assertSecretEquals(secret, response)) @@ -170,14 +171,13 @@ public void deleteSecret() { assertSecretEquals(secretToDelete, secretResponse); }).verifyComplete(); - StepVerifier.create(client.deleteSecret(secretToDelete.getName())) - .assertNext(deletedSecretResponse -> { - assertNotNull(deletedSecretResponse.getDeletedDate()); - assertNotNull(deletedSecretResponse.getRecoveryId()); - assertNotNull(deletedSecretResponse.getScheduledPurgeDate()); - Assert.assertEquals(secretToDelete.getName(), deletedSecretResponse.getName()); - }).verifyComplete(); - sleepInRecordMode(30000); + Poller poller = client.beginDeleteSecret(secretToDelete.getName()); + poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); + DeletedSecret deletedSecretResponse = poller.getLastPollResponse().getValue(); + assertNotNull(deletedSecretResponse.getDeletedOn()); + assertNotNull(deletedSecretResponse.getRecoveryId()); + assertNotNull(deletedSecretResponse.getScheduledPurgeDate()); + Assert.assertEquals(secretToDelete.getName(), deletedSecretResponse.getName()); StepVerifier.create(client.purgeDeletedSecretWithResponse(secretToDelete.getName())) .assertNext(voidResponse -> { @@ -188,8 +188,9 @@ public void deleteSecret() { } public void deleteSecretNotFound() { - StepVerifier.create(client.deleteSecret("non-existing")) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND)); + Poller poller = client.beginDeleteSecret("non-existing"); + while (!poller.isComplete()) { sleepInRecordMode(1000); } + assertEquals(poller.getStatus(), PollResponse.OperationStatus.FAILED); } /** @@ -202,16 +203,12 @@ public void getDeletedSecret() { assertSecretEquals(secretToDeleteAndGet, secretResponse); }).verifyComplete(); - StepVerifier.create(client.deleteSecret(secretToDeleteAndGet.getName())) - .assertNext(deletedSecretResponse -> { - assertNotNull(deletedSecretResponse); - }).verifyComplete(); - pollOnSecretDeletion(secretToDeleteAndGet.getName()); - sleepInRecordMode(30000); + Poller poller = client.beginDeleteSecret(secretToDeleteAndGet.getName()); + poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); StepVerifier.create(client.getDeletedSecret(secretToDeleteAndGet.getName())) .assertNext(deletedSecretResponse -> { - assertNotNull(deletedSecretResponse.getDeletedDate()); + assertNotNull(deletedSecretResponse.getDeletedOn()); assertNotNull(deletedSecretResponse.getRecoveryId()); assertNotNull(deletedSecretResponse.getScheduledPurgeDate()); Assert.assertEquals(secretToDeleteAndGet.getName(), deletedSecretResponse.getName()); @@ -244,16 +241,15 @@ public void recoverDeletedSecret() { assertSecretEquals(secretToDeleteAndRecover, secretResponse); }).verifyComplete(); - StepVerifier.create(client.deleteSecret(secretToDeleteAndRecover.getName())) - .assertNext(Assert::assertNotNull).verifyComplete(); - sleepInRecordMode(30000); + Poller poller = client.beginDeleteSecret(secretToDeleteAndRecover.getName()); + poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); - StepVerifier.create(client.recoverDeletedSecret(secretToDeleteAndRecover.getName())) - .assertNext(secretResponse -> { - Assert.assertEquals(secretToDeleteAndRecover.getName(), secretResponse.getName()); - Assert.assertEquals(secretToDeleteAndRecover.getProperties().getNotBefore(), secretResponse.getProperties().getNotBefore()); - Assert.assertEquals(secretToDeleteAndRecover.getProperties().getExpires(), secretResponse.getProperties().getExpires()); - }).verifyComplete(); + Poller recoverPoller = client.beginRecoverDeletedSecret(secretToDeleteAndRecover.getName()); + recoverPoller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); + KeyVaultSecret secretResponse = recoverPoller.getLastPollResponse().getValue(); + Assert.assertEquals(secretToDeleteAndRecover.getName(), secretResponse.getName()); + Assert.assertEquals(secretToDeleteAndRecover.getProperties().getNotBefore(), secretResponse.getProperties().getNotBefore()); + Assert.assertEquals(secretToDeleteAndRecover.getProperties().getExpiresOn(), secretResponse.getProperties().getExpiresOn()); }); } @@ -261,8 +257,9 @@ public void recoverDeletedSecret() { * Tests that an attempt to recover a non existing deleted secret throws an error on a soft-delete enabled vault. */ public void recoverDeletedSecretNotFound() { - StepVerifier.create(client.recoverDeletedSecret("non-existing")) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND)); + Poller poller = client.beginRecoverDeletedSecret("non-existing"); + while (!poller.isComplete()) { sleepInRecordMode(1000); } + assertEquals(poller.getStatus(), PollResponse.OperationStatus.FAILED); } /** @@ -303,9 +300,8 @@ public void restoreSecret() { }).verifyComplete(); byte[] backup = client.backupSecret(secretToBackupAndRestore.getName()).block(); - StepVerifier.create(client.deleteSecret(secretToBackupAndRestore.getName())) - .assertNext(Assert::assertNotNull).verifyComplete(); - pollOnSecretDeletion(secretToBackupAndRestore.getName()); + Poller poller = client.beginDeleteSecret(secretToBackupAndRestore.getName()); + poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); StepVerifier.create(client.purgeDeletedSecretWithResponse(secretToBackupAndRestore.getName())) .assertNext(voidResponse -> { @@ -315,11 +311,11 @@ public void restoreSecret() { sleepInRecordMode(60000); - StepVerifier.create(client.restoreSecret(backup)) + StepVerifier.create(client.restoreSecretBackup(backup)) .assertNext(response -> { Assert.assertEquals(secretToBackupAndRestore.getName(), response.getName()); Assert.assertEquals(secretToBackupAndRestore.getProperties().getNotBefore(), response.getProperties().getNotBefore()); - Assert.assertEquals(secretToBackupAndRestore.getProperties().getExpires(), response.getProperties().getExpires()); + Assert.assertEquals(secretToBackupAndRestore.getProperties().getExpiresOn(), response.getProperties().getExpiresOn()); }).verifyComplete(); }); } @@ -329,7 +325,7 @@ public void restoreSecret() { */ public void restoreSecretFromMalformedBackup() { byte[] secretBackupBytes = "non-existing".getBytes(); - StepVerifier.create(client.restoreSecret(secretBackupBytes)) + StepVerifier.create(client.restoreSecretBackup(secretBackupBytes)) .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceModifiedException.class, HttpURLConnection.HTTP_BAD_REQUEST)); } @@ -341,7 +337,7 @@ public void listDeletedSecrets() { listDeletedSecretsRunner((secrets) -> { List deletedSecrets = new ArrayList<>(); - for (Secret secret : secrets.values()) { + for (KeyVaultSecret secret : secrets.values()) { StepVerifier.create(client.setSecret(secret)) .assertNext(secretResponse -> { assertSecretEquals(secret, secretResponse); @@ -349,10 +345,9 @@ public void listDeletedSecrets() { } sleepInRecordMode(10000); - for (Secret secret : secrets.values()) { - StepVerifier.create(client.deleteSecret(secret.getName())) - .assertNext(Assert::assertNotNull).verifyComplete(); - pollOnSecretDeletion(secret.getName()); + for (KeyVaultSecret secret : secrets.values()) { + Poller poller = client.beginDeleteSecret(secret.getName()); + poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); } sleepInRecordMode(35000); @@ -361,7 +356,7 @@ public void listDeletedSecrets() { for (DeletedSecret actualSecret : deletedSecrets) { if (secrets.containsKey(actualSecret.getName())) { - assertNotNull(actualSecret.getDeletedDate()); + assertNotNull(actualSecret.getDeletedOn()); assertNotNull(actualSecret.getRecoveryId()); secrets.remove(actualSecret.getName()); } @@ -387,21 +382,19 @@ public void listSecretVersions() { listSecretVersionsRunner((secrets) -> { List output = new ArrayList<>(); String secretName = null; - for (Secret secret : secrets) { + for (KeyVaultSecret secret : secrets) { secretName = secret.getName(); client.setSecret(secret).subscribe(secretResponse -> assertSecretEquals(secret, secretResponse)); sleepInRecordMode(1000); } sleepInRecordMode(30000); - client.listSecretVersions(secretName).subscribe(output::add); + client.listPropertiesOfSecretVersions(secretName).subscribe(output::add); sleepInRecordMode(30000); assertEquals(secrets.size(), output.size()); - StepVerifier.create(client.deleteSecret(secretName)) - .assertNext(Assert::assertNotNull).verifyComplete(); - pollOnSecretDeletion(secretName); - + Poller poller = client.beginDeleteSecret(secretName); + poller.blockUntil(PollResponse.OperationStatus.SUCCESSFULLY_COMPLETED); StepVerifier.create(client.purgeDeletedSecretWithResponse(secretName)) .assertNext(voidResponse -> { @@ -409,7 +402,6 @@ public void listSecretVersions() { }).verifyComplete(); pollOnSecretPurge(secretName); }); - } /** @@ -417,20 +409,20 @@ public void listSecretVersions() { */ public void listSecrets() { listSecretsRunner((secrets) -> { - HashMap secretsToList = secrets; + HashMap secretsToList = secrets; List output = new ArrayList<>(); - for (Secret secret : secretsToList.values()) { + for (KeyVaultSecret secret : secretsToList.values()) { client.setSecret(secret).subscribe(secretResponse -> assertSecretEquals(secret, secretResponse)); sleepInRecordMode(1000); } sleepInRecordMode(30000); - client.listSecrets().subscribe(output::add); + client.listPropertiesOfSecrets().subscribe(output::add); sleepInRecordMode(30000); for (SecretProperties actualSecret : output) { if (secretsToList.containsKey(actualSecret.getName())) { - Secret expectedSecret = secrets.get(actualSecret.getName()); - assertEquals(expectedSecret.getProperties().getExpires(), actualSecret.getExpires()); + KeyVaultSecret expectedSecret = secrets.get(actualSecret.getName()); + assertEquals(expectedSecret.getProperties().getExpiresOn(), actualSecret.getExpiresOn()); assertEquals(expectedSecret.getProperties().getNotBefore(), actualSecret.getNotBefore()); secrets.remove(actualSecret.getName()); } diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTest.java b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTest.java index 3f36921fb741..8e6ddf1d5841 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTest.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTest.java @@ -5,8 +5,10 @@ import com.azure.core.exception.ResourceModifiedException; import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.Poller; import com.azure.security.keyvault.secrets.models.DeletedSecret; -import com.azure.security.keyvault.secrets.models.Secret; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.security.keyvault.secrets.models.SecretProperties; import java.net.HttpURLConnection; @@ -28,12 +30,12 @@ protected void beforeTest() { if (interceptorManager.isPlaybackMode()) { client = clientSetup(pipeline -> new SecretClientBuilder() .pipeline(pipeline) - .endpoint(getEndpoint()) + .vaultUrl(getEndpoint()) .buildClient()); } else { client = clientSetup(pipeline -> new SecretClientBuilder() .pipeline(pipeline) - .endpoint(getEndpoint()) + .vaultUrl(getEndpoint()) .buildClient()); } } @@ -75,8 +77,8 @@ public void setSecretNull() { public void updateSecret() { updateSecretRunner((original, updated) -> { assertSecretEquals(original, client.setSecret(original)); - Secret secretToUpdate = client.getSecret(original.getName()); - client.updateSecretProperties(secretToUpdate.getProperties().setExpires(updated.getProperties().getExpires())); + KeyVaultSecret secretToUpdate = client.getSecret(original.getName()); + client.updateSecretProperties(secretToUpdate.getProperties().setExpiresOn(updated.getProperties().getExpiresOn())); assertSecretEquals(updated, client.getSecret(original.getName())); }); } @@ -106,8 +108,8 @@ public void getSecret() { */ public void getSecretSpecificVersion() { getSecretSpecificVersionRunner((secret, secretWithNewVal) -> { - Secret secretVersionOne = client.setSecret(secret); - Secret secretVersionTwo = client.setSecret(secretWithNewVal); + KeyVaultSecret secretVersionOne = client.setSecret(secret); + KeyVaultSecret secretVersionTwo = client.setSecret(secretWithNewVal); assertSecretEquals(secret, client.getSecret(secretVersionOne.getName(), secretVersionOne.getProperties().getVersion())); assertSecretEquals(secretWithNewVal, client.getSecret(secretVersionTwo.getName(), secretVersionTwo.getProperties().getVersion())); }); @@ -126,9 +128,10 @@ public void getSecretNotFound() { public void deleteSecret() { deleteSecretRunner((secretToDelete) -> { assertSecretEquals(secretToDelete, client.setSecret(secretToDelete)); - DeletedSecret deletedSecret = client.deleteSecret(secretToDelete.getName()); - pollOnSecretDeletion(secretToDelete.getName()); - assertNotNull(deletedSecret.getDeletedDate()); + Poller poller = client.beginDeleteSecret(secretToDelete.getName()); + while (!poller.isComplete()) { sleepInRecordMode(1000); } + DeletedSecret deletedSecret = poller.getLastPollResponse().getValue(); + assertNotNull(deletedSecret.getDeletedOn()); assertNotNull(deletedSecret.getRecoveryId()); assertNotNull(deletedSecret.getScheduledPurgeDate()); assertEquals(secretToDelete.getName(), deletedSecret.getName()); @@ -138,7 +141,9 @@ public void deleteSecret() { } public void deleteSecretNotFound() { - assertRestException(() -> client.deleteSecret("non-existing"), ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND); + Poller poller = client.beginDeleteSecret("non-existing"); + while (!poller.isComplete()) { sleepInRecordMode(1000); } + assertEquals(poller.getStatus(), PollResponse.OperationStatus.FAILED); } /** @@ -147,11 +152,11 @@ public void deleteSecretNotFound() { public void getDeletedSecret() { getDeletedSecretRunner((secretToDeleteAndGet) -> { assertSecretEquals(secretToDeleteAndGet, client.setSecret(secretToDeleteAndGet)); - assertNotNull(client.deleteSecret(secretToDeleteAndGet.getName())); - pollOnSecretDeletion(secretToDeleteAndGet.getName()); + Poller poller = client.beginDeleteSecret(secretToDeleteAndGet.getName()); + while (!poller.isComplete()) { sleepInRecordMode(1000); } sleepInRecordMode(30000); DeletedSecret deletedSecret = client.getDeletedSecret(secretToDeleteAndGet.getName()); - assertNotNull(deletedSecret.getDeletedDate()); + assertNotNull(deletedSecret.getDeletedOn()); assertNotNull(deletedSecret.getRecoveryId()); assertNotNull(deletedSecret.getScheduledPurgeDate()); assertEquals(secretToDeleteAndGet.getName(), deletedSecret.getName()); @@ -175,12 +180,14 @@ public void getDeletedSecretNotFound() { public void recoverDeletedSecret() { recoverDeletedSecretRunner((secretToDeleteAndRecover) -> { assertSecretEquals(secretToDeleteAndRecover, client.setSecret(secretToDeleteAndRecover)); - assertNotNull(client.deleteSecret(secretToDeleteAndRecover.getName())); - pollOnSecretDeletion(secretToDeleteAndRecover.getName()); - Secret recoveredSecret = client.recoverDeletedSecret(secretToDeleteAndRecover.getName()); + Poller delPoller = client.beginDeleteSecret(secretToDeleteAndRecover.getName()); + while (!delPoller.isComplete()) { sleepInRecordMode(1000); } + Poller poller = client.beginRecoverDeletedSecret(secretToDeleteAndRecover.getName()); + while (!poller.isComplete()) { sleepInRecordMode(1000); } + KeyVaultSecret recoveredSecret = poller.getLastPollResponse().getValue(); assertEquals(secretToDeleteAndRecover.getName(), recoveredSecret.getName()); assertEquals(secretToDeleteAndRecover.getProperties().getNotBefore(), recoveredSecret.getProperties().getNotBefore()); - assertEquals(secretToDeleteAndRecover.getProperties().getExpires(), recoveredSecret.getProperties().getExpires()); + assertEquals(secretToDeleteAndRecover.getProperties().getExpiresOn(), recoveredSecret.getProperties().getExpiresOn()); }); } @@ -188,7 +195,9 @@ public void recoverDeletedSecret() { * Tests that an attempt to recover a non existing deleted secret throws an error on a soft-delete enabled vault. */ public void recoverDeletedSecretNotFound() { - assertRestException(() -> client.recoverDeletedSecret("non-existing"), ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND); + Poller poller = client.beginRecoverDeletedSecret("non-existing"); + while (!poller.isComplete()) { sleepInRecordMode(1000); } + assertEquals(poller.getStatus(), PollResponse.OperationStatus.FAILED); } /** @@ -219,14 +228,14 @@ public synchronized void restoreSecret() { byte[] backupBytes = (client.backupSecret(secretToBackupAndRestore.getName())); assertNotNull(backupBytes); assertTrue(backupBytes.length > 0); - client.deleteSecret(secretToBackupAndRestore.getName()); - pollOnSecretDeletion(secretToBackupAndRestore.getName()); + Poller poller = client.beginDeleteSecret(secretToBackupAndRestore.getName()); + while (!poller.isComplete()) { sleepInRecordMode(1000); } client.purgeDeletedSecret(secretToBackupAndRestore.getName()); pollOnSecretPurge(secretToBackupAndRestore.getName()); sleepInRecordMode(60000); - Secret restoredSecret = client.restoreSecret(backupBytes); + KeyVaultSecret restoredSecret = client.restoreSecretBackup(backupBytes); assertEquals(secretToBackupAndRestore.getName(), restoredSecret.getName()); - assertEquals(secretToBackupAndRestore.getProperties().getExpires(), restoredSecret.getProperties().getExpires()); + assertEquals(secretToBackupAndRestore.getProperties().getExpiresOn(), restoredSecret.getProperties().getExpiresOn()); }); } @@ -235,7 +244,7 @@ public synchronized void restoreSecret() { */ public void restoreSecretFromMalformedBackup() { byte[] secretBackupBytes = "non-existing".getBytes(); - assertRestException(() -> client.restoreSecret(secretBackupBytes), ResourceModifiedException.class, HttpURLConnection.HTTP_BAD_REQUEST); + assertRestException(() -> client.restoreSecretBackup(secretBackupBytes), ResourceModifiedException.class, HttpURLConnection.HTTP_BAD_REQUEST); } /** @@ -243,14 +252,14 @@ public void restoreSecretFromMalformedBackup() { */ public void listSecrets() { listSecretsRunner((secrets) -> { - for (Secret secret : secrets.values()) { + for (KeyVaultSecret secret : secrets.values()) { assertSecretEquals(secret, client.setSecret(secret)); } - for (SecretProperties actualSecret : client.listSecrets()) { + for (SecretProperties actualSecret : client.listPropertiesOfSecrets()) { if (secrets.containsKey(actualSecret.getName())) { - Secret expectedSecret = secrets.get(actualSecret.getName()); - assertEquals(expectedSecret.getProperties().getExpires(), actualSecret.getExpires()); + KeyVaultSecret expectedSecret = secrets.get(actualSecret.getName()); + assertEquals(expectedSecret.getProperties().getExpiresOn(), actualSecret.getExpiresOn()); assertEquals(expectedSecret.getProperties().getNotBefore(), actualSecret.getNotBefore()); secrets.remove(actualSecret.getName()); } @@ -266,20 +275,20 @@ public void listSecrets() { public void listDeletedSecrets() { listDeletedSecretsRunner((secrets) -> { - for (Secret secret : secrets.values()) { + for (KeyVaultSecret secret : secrets.values()) { assertSecretEquals(secret, client.setSecret(secret)); } - for (Secret secret : secrets.values()) { - client.deleteSecret(secret.getName()); - pollOnSecretDeletion(secret.getName()); + for (KeyVaultSecret secret : secrets.values()) { + Poller poller = client.beginDeleteSecret(secret.getName()); + while (!poller.isComplete()) { sleepInRecordMode(1000); } } sleepInRecordMode(60000); Iterable deletedSecrets = client.listDeletedSecrets(); for (DeletedSecret actualSecret : deletedSecrets) { if (secrets.containsKey(actualSecret.getName())) { - assertNotNull(actualSecret.getDeletedDate()); + assertNotNull(actualSecret.getDeletedOn()); assertNotNull(actualSecret.getRecoveryId()); secrets.remove(actualSecret.getName()); } @@ -301,20 +310,20 @@ public void listDeletedSecrets() { @Override public void listSecretVersions() { listSecretVersionsRunner((secrets) -> { - List secretVersions = secrets; + List secretVersions = secrets; String secretName = null; - for (Secret secret : secretVersions) { + for (KeyVaultSecret secret : secretVersions) { secretName = secret.getName(); assertSecretEquals(secret, client.setSecret(secret)); } - Iterable secretVersionsOutput = client.listSecretVersions(secretName); + Iterable secretVersionsOutput = client.listPropertiesOfSecretVersions(secretName); List secretVersionsList = new ArrayList<>(); secretVersionsOutput.forEach(secretVersionsList::add); assertEquals(secretVersions.size(), secretVersionsList.size()); - client.deleteSecret(secretName); - pollOnSecretDeletion(secretName); + Poller poller = client.beginDeleteSecret(secretName); + while (!poller.isComplete()) { sleepInRecordMode(1000); } client.purgeDeletedSecret(secretName); pollOnSecretPurge(secretName); diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTestBase.java b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTestBase.java index f55eef91688c..a53337c78c24 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTestBase.java @@ -15,8 +15,8 @@ import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.test.TestBase; import com.azure.core.util.Configuration; +import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretProperties; import org.junit.Rule; import org.junit.Test; @@ -95,14 +95,14 @@ T clientSetup(Function clientBuilder) { @Test public abstract void setSecret(); - void setSecretRunner(Consumer testRunner) { + void setSecretRunner(Consumer testRunner) { final Map tags = new HashMap<>(); tags.put("foo", "baz"); - final Secret secret = new Secret(SECRET_NAME, SECRET_VALUE) + final KeyVaultSecret secret = new KeyVaultSecret(SECRET_NAME, SECRET_VALUE) .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2050, 1, 30, 0, 0, 0, 0, ZoneOffset.UTC)) + .setExpiresOn(OffsetDateTime.of(2050, 1, 30, 0, 0, 0, 0, ZoneOffset.UTC)) .setNotBefore(OffsetDateTime.of(2000, 1, 30, 12, 59, 59, 0, ZoneOffset.UTC)) .setTags(tags) .setContentType("text")); @@ -116,8 +116,8 @@ void setSecretRunner(Consumer testRunner) { @Test public abstract void setSecretEmptyValue(); - void setSecretEmptyValueRunner(Consumer testRunner) { - Secret secret = new Secret(SECRET_NAME, ""); + void setSecretEmptyValueRunner(Consumer testRunner) { + KeyVaultSecret secret = new KeyVaultSecret(SECRET_NAME, ""); testRunner.accept(secret); } @@ -127,19 +127,19 @@ void setSecretEmptyValueRunner(Consumer testRunner) { @Test public abstract void updateSecret(); - void updateSecretRunner(BiConsumer testRunner) { + void updateSecretRunner(BiConsumer testRunner) { final Map tags = new HashMap<>(); tags.put("first tag", "first value"); tags.put("second tag", "second value"); - final Secret originalSecret = new Secret("testSecretUpdate", "testSecretVal") + final KeyVaultSecret originalSecret = new KeyVaultSecret("testSecretUpdate", "testSecretVal") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) .setTags(tags)); - final Secret updatedSecret = new Secret("testSecretUpdate", "testSecretVal") + final KeyVaultSecret updatedSecret = new KeyVaultSecret("testSecretUpdate", "testSecretVal") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2060, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) + .setExpiresOn(OffsetDateTime.of(2060, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) .setTags(tags)); testRunner.accept(originalSecret, updatedSecret); @@ -149,17 +149,17 @@ void updateSecretRunner(BiConsumer testRunner) { @Test public abstract void updateDisabledSecret(); - void updateDisabledSecretRunner(BiConsumer testRunner) { + void updateDisabledSecretRunner(BiConsumer testRunner) { final Map tags = new HashMap<>(); - final Secret originalSecret = new Secret("testUpdateOfDisabledSecret", "testSecretUpdateDisabledVal") + final KeyVaultSecret originalSecret = new KeyVaultSecret("testUpdateOfDisabledSecret", "testSecretUpdateDisabledVal") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) .setEnabled(false)); - final Secret updatedSecret = new Secret("testUpdateOfDisabledSecret", "testSecretUpdateDisabledVal") + final KeyVaultSecret updatedSecret = new KeyVaultSecret("testUpdateOfDisabledSecret", "testSecretUpdateDisabledVal") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)) .setEnabled(false)); testRunner.accept(originalSecret, updatedSecret); } @@ -167,24 +167,24 @@ void updateDisabledSecretRunner(BiConsumer testRunner) { @Test public abstract void getSecret(); - void getSecretRunner(Consumer testRunner) { - final Secret originalSecret = new Secret("testSecretGet", "testSecretGetVal") + void getSecretRunner(Consumer testRunner) { + final KeyVaultSecret originalSecret = new KeyVaultSecret("testSecretGet", "testSecretGetVal") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); testRunner.accept(originalSecret); } @Test public abstract void getSecretSpecificVersion(); - void getSecretSpecificVersionRunner(BiConsumer testRunner) { - final Secret secret = new Secret("testSecretGetVersion", "testSecretGetVersionVal") + void getSecretSpecificVersionRunner(BiConsumer testRunner) { + final KeyVaultSecret secret = new KeyVaultSecret("testSecretGetVersion", "testSecretGetVersionVal") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); - final Secret secretWithNewVal = new Secret("testSecretGetVersion", "newVal") + final KeyVaultSecret secretWithNewVal = new KeyVaultSecret("testSecretGetVersion", "newVal") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); testRunner.accept(secret, secretWithNewVal); } @@ -194,10 +194,10 @@ void getSecretSpecificVersionRunner(BiConsumer testRunner) { @Test public abstract void deleteSecret(); - void deleteSecretRunner(Consumer testRunner) { - final Secret secretToDelete = new Secret("testSecretDelete", "testSecretDeleteVal") + void deleteSecretRunner(Consumer testRunner) { + final KeyVaultSecret secretToDelete = new KeyVaultSecret("testSecretDelete", "testSecretDeleteVal") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); testRunner.accept(secretToDelete); } @@ -208,10 +208,10 @@ void deleteSecretRunner(Consumer testRunner) { @Test public abstract void getDeletedSecret(); - void getDeletedSecretRunner(Consumer testRunner) { - final Secret secretToDeleteAndGet = new Secret("testSecretGetDeleted", "testSecretGetDeleteVal") + void getDeletedSecretRunner(Consumer testRunner) { + final KeyVaultSecret secretToDeleteAndGet = new KeyVaultSecret("testSecretGetDeleted", "testSecretGetDeleteVal") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); testRunner.accept(secretToDeleteAndGet); } @@ -221,10 +221,10 @@ void getDeletedSecretRunner(Consumer testRunner) { @Test public abstract void recoverDeletedSecret(); - void recoverDeletedSecretRunner(Consumer testRunner) { - final Secret secretToDeleteAndRecover = new Secret("testSecretRecover", "testSecretRecoverVal") + void recoverDeletedSecretRunner(Consumer testRunner) { + final KeyVaultSecret secretToDeleteAndRecover = new KeyVaultSecret("testSecretRecover", "testSecretRecoverVal") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); testRunner.accept(secretToDeleteAndRecover); } @@ -234,10 +234,10 @@ void recoverDeletedSecretRunner(Consumer testRunner) { @Test public abstract void backupSecret(); - void backupSecretRunner(Consumer testRunner) { - final Secret secretToBackup = new Secret("testSecretBackup", "testSecretBackupVal") + void backupSecretRunner(Consumer testRunner) { + final KeyVaultSecret secretToBackup = new KeyVaultSecret("testSecretBackup", "testSecretBackupVal") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2060, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); + .setExpiresOn(OffsetDateTime.of(2060, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); testRunner.accept(secretToBackup); } @@ -247,10 +247,10 @@ void backupSecretRunner(Consumer testRunner) { @Test public abstract void restoreSecret(); - void restoreSecretRunner(Consumer testRunner) { - final Secret secretToBackupAndRestore = new Secret("testSecretRestore", "testSecretRestoreVal") + void restoreSecretRunner(Consumer testRunner) { + final KeyVaultSecret secretToBackupAndRestore = new KeyVaultSecret("testSecretRestore", "testSecretRestoreVal") .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2080, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); + .setExpiresOn(OffsetDateTime.of(2080, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); testRunner.accept(secretToBackupAndRestore); } @@ -260,16 +260,16 @@ void restoreSecretRunner(Consumer testRunner) { @Test public abstract void listSecrets(); - void listSecretsRunner(Consumer> testRunner) { - HashMap secrets = new HashMap<>(); + void listSecretsRunner(Consumer> testRunner) { + HashMap secrets = new HashMap<>(); String secretName; String secretVal; for (int i = 0; i < 30; i++) { secretName = "listSecret" + i; secretVal = "listSecretVal" + i; - Secret secret = new Secret(secretName, secretVal) + KeyVaultSecret secret = new KeyVaultSecret(secretName, secretVal) .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); + .setExpiresOn(OffsetDateTime.of(2050, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC))); secrets.put(secretName, secret); } testRunner.accept(secrets); @@ -278,16 +278,16 @@ void listSecretsRunner(Consumer> testRunner) { @Test public abstract void listDeletedSecrets(); - void listDeletedSecretsRunner(Consumer> testRunner) { - HashMap secrets = new HashMap<>(); + void listDeletedSecretsRunner(Consumer> testRunner) { + HashMap secrets = new HashMap<>(); String secretName; String secretVal; for (int i = 0; i < 3; i++) { secretName = "listDeletedSecretsTest" + i; secretVal = "listDeletedSecretVal" + i; - secrets.put(secretName, new Secret(secretName, secretVal) + secrets.put(secretName, new KeyVaultSecret(secretName, secretVal) .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2090, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)))); + .setExpiresOn(OffsetDateTime.of(2090, 5, 25, 0, 0, 0, 0, ZoneOffset.UTC)))); } testRunner.accept(secrets); } @@ -296,16 +296,16 @@ void listDeletedSecretsRunner(Consumer> testRunner) { @Test public abstract void listSecretVersions(); - void listSecretVersionsRunner(Consumer> testRunner) { - List secrets = new ArrayList<>(); + void listSecretVersionsRunner(Consumer> testRunner) { + List secrets = new ArrayList<>(); String secretName; String secretVal; for (int i = 1; i < 5; i++) { secretName = "listSecretVersion"; secretVal = "listSecretVersionVal" + i; - secrets.add(new Secret(secretName, secretVal) + secrets.add(new KeyVaultSecret(secretName, secretVal) .setProperties(new SecretProperties() - .setExpires(OffsetDateTime.of(2090, 5, i, 0, 0, 0, 0, ZoneOffset.UTC)))); + .setExpiresOn(OffsetDateTime.of(2090, 5, i, 0, 0, 0, 0, ZoneOffset.UTC)))); } testRunner.accept(secrets); } @@ -316,7 +316,7 @@ void listSecretVersionsRunner(Consumer> testRunner) { * @param expected Secret expected to be returned by the service * @param response Response returned by the service, the body should contain a Secret */ - static void assertSecretEquals(Secret expected, Response response) { + static void assertSecretEquals(KeyVaultSecret expected, Response response) { assertSecretEquals(expected, response, 200); } @@ -327,7 +327,7 @@ static void assertSecretEquals(Secret expected, Response response) { * @param response RestResponse returned from the service, the body should contain a ConfigurationSetting * @param expectedStatusCode Expected HTTP status code returned by the service */ - static void assertSecretEquals(Secret expected, Response response, final int expectedStatusCode) { + static void assertSecretEquals(KeyVaultSecret expected, Response response, final int expectedStatusCode) { assertNotNull(response); assertEquals(expectedStatusCode, response.getStatusCode()); @@ -340,10 +340,10 @@ static void assertSecretEquals(Secret expected, Response response, final * @param expected ConfigurationSetting expected to be returned by the service * @param actual ConfigurationSetting contained in the RestResponse body */ - static void assertSecretEquals(Secret expected, Secret actual) { + static void assertSecretEquals(KeyVaultSecret expected, KeyVaultSecret actual) { assertEquals(expected.getName(), actual.getName()); assertEquals(expected.getValue(), actual.getValue()); - assertEquals(expected.getProperties().getExpires(), actual.getProperties().getExpires()); + assertEquals(expected.getProperties().getExpiresOn(), actual.getProperties().getExpiresOn()); assertEquals(expected.getProperties().getNotBefore(), actual.getProperties().getNotBefore()); } diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/deleteSecret.json b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/deleteSecret.json index f89fb8dc5c1b..aaf8ad2e11be 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/deleteSecret.json +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/deleteSecret.json @@ -1,217 +1,505 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretDelete?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretDelete?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:34:51 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "274", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "90017bd0-3242-4165-b2c4-8f9f97785558", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":\"testSecretDeleteVal\",\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretDelete/e75928920e1247389906fe8c1853635e\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561365292,\"updated\":1561365292,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:48:30 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "261", + "x-ms-request-id" : "a0bccd27-6627-4210-8845-2d53c6b8e75e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"testSecretDeleteVal\",\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretDelete/6763dbce200a4d55a1d17f3d4a2b7b51\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571888911,\"updated\":1571888911,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretDelete?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretDelete?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:35:00 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "397", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "fbeb2c06-9166-4fbc-b41d-4ea26267bcf4", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretDelete\",\"deletedDate\":1561365301,\"scheduledPurgeDate\":1569141301,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretDelete/e75928920e1247389906fe8c1853635e\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561365292,\"updated\":1561365292,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:48:31 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "371", + "x-ms-request-id" : "35ffefa1-5bf1-443a-b7ae-f6810c0a4308", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete\",\"deletedDate\":1571888911,\"scheduledPurgeDate\":1579664911,\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretDelete/6763dbce200a4d55a1d17f3d4a2b7b51\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571888911,\"updated\":1571888911,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "0d00b1b4-9bd5-4775-b62f-1a41c9e00cbf", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:33 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "f81772bf-0b9a-409c-972e-fac0791a5ab0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:34 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "834a32ae-d117-4adb-b9b4-d63919d3358f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:35 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "00e98194-9862-4ecc-8269-81fde1d3fff2", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:37 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "88fb6876-13f5-4c48-a4b6-aefc3536b8ec", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:37 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "5d987b63-d5d1-4223-a5f6-a25b210f7086", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:35:00 GMT", - "content-length" : "90", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "5da39154-b096-42e7-8783-90fd014b8cca", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:48:38 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "f819118c-0b7c-4274-af8f-ea03b2f9cb70", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:35:03 GMT", - "content-length" : "90", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "78fcbf5e-1603-4068-a822-7699fac9d62c", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:48:40 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "674bf25a-0ac7-4e61-981a-09746b097531", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:35:05 GMT", - "content-length" : "90", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "6a5010f9-3840-4706-b6ba-7911038bf0dd", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:48:40 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "3ccbb696-0126-4ad8-9407-3f4a160dc615", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:35:07 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "397", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:42 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "91e4ab3c-40a6-49c9-93eb-fa8cb9ba2387", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:42 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "68fdc980-39dd-4e1a-8388-b7608adefc47", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:43 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "c65a1886-9e25-464f-ad06-c4804bda74bf", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:45 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "97b831af-2b64-43c3-9be8-e3c25636d159", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "4836df30-cd3f-44c6-86ba-20d61d256fb7", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretDelete\",\"deletedDate\":1561365301,\"scheduledPurgeDate\":1569141301,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretDelete/e75928920e1247389906fe8c1853635e\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561365292,\"updated\":1561365292,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:48:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "371", + "x-ms-request-id" : "d8093b4e-3a63-4c76-91a1-e8fb0f12371c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete\",\"deletedDate\":1571888911,\"scheduledPurgeDate\":1579664911,\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretDelete/6763dbce200a4d55a1d17f3d4a2b7b51\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571888911,\"updated\":1571888911,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:35:07 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "da77f4d8-e392-418a-9c78-96ab33a1d512", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:48:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "30469125-59f8-4f02-8363-b69e39b34c0c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretDelete?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:35:07 GMT", - "content-length" : "90", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "46ae2d5a-fbd1-4250-a5de-be2d3a0b0bd1", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:48:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "90", + "x-ms-request-id" : "a5749d06-8005-4aef-8af2-0e75beba48d8", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretDelete\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/deleteSecretNotFound.json b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/deleteSecretNotFound.json index 91edd1981d3a..4fa670d4b29c 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/deleteSecretNotFound.json +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/deleteSecretNotFound.json @@ -1,31 +1,32 @@ { "networkCallRecords" : [ { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/non-existing?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/non-existing?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:30:29 GMT", - "content-length" : "78", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "f6aebff6-e16a-40be-a899-b5e4ee7214cb", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: non-existing\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:08 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "78", + "x-ms-request-id" : "de8d9cf5-97ef-4903-8675-e5335004625d", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: non-existing\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/getDeletedSecret.json b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/getDeletedSecret.json index 27de596b87cd..69d23fc93ecf 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/getDeletedSecret.json +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/getDeletedSecret.json @@ -1,406 +1,393 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:29:20 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "281", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "854500c9-1100-43ae-950b-549d42295305", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":\"testSecretGetDeleteVal\",\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretGetDeleted/8f916eb84456435e83bf0eb8ddeab17b\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561364961,\"updated\":1561364961,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:44:17 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "268", + "x-ms-request-id" : "68440699-f18f-4817-9ded-3703f1c78167", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"testSecretGetDeleteVal\",\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretGetDeleted/e99e70edd03b4e8b9622bc4020f1092c\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571888658,\"updated\":1571888658,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:29:28 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "405", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "9b37a352-870e-4a0e-b8eb-ff39d40eafbc", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted\",\"deletedDate\":1561364968,\"scheduledPurgeDate\":1569140968,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretGetDeleted/8f916eb84456435e83bf0eb8ddeab17b\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561364961,\"updated\":1561364961,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } - }, { - "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", - "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", - "Content-Type" : "application/json" + "Date" : "Thu, 24 Oct 2019 03:44:17 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "379", + "x-ms-request-id" : "f0946c7f-43f2-43fc-b883-5c0638546509", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted\",\"deletedDate\":1571888658,\"scheduledPurgeDate\":1579664658,\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretGetDeleted/e99e70edd03b4e8b9622bc4020f1092c\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571888658,\"updated\":1571888658,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" }, - "Response" : { - "date" : "Mon, 24 Jun 2019 08:29:28 GMT", - "content-length" : "94", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", - "retry-after" : "0", - "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "13ee011a-6ed6-4589-8b73-4fd3220fb337", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}" - } + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:29:30 GMT", - "content-length" : "94", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "977de4d8-f211-4fc8-874a-b5bb2570f3a0", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:44:18 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "94", + "x-ms-request-id" : "3a74537c-30f5-4848-a487-b4fc357565a7", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:29:32 GMT", - "content-length" : "94", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "5550eb52-fa8d-4e1d-943f-73b9f10f6074", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:44:19 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "94", + "x-ms-request-id" : "4af71f6b-2ed6-49ee-832a-be0d60c8a543", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:29:35 GMT", - "content-length" : "94", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "b5d282c6-e743-451e-b746-d188fec6f53b", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:44:20 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "94", + "x-ms-request-id" : "6a96b1c5-c91a-4c55-8617-38220e20daa8", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:29:37 GMT", - "content-length" : "94", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "15f7aef6-4a35-4c54-af55-022afe7c48bc", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:44:21 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "94", + "x-ms-request-id" : "2a57a2aa-3c35-4066-bb14-f69e4a346783", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:29:39 GMT", - "content-length" : "94", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "13658ac9-c31a-419c-aea5-b453ed408790", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:44:22 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "94", + "x-ms-request-id" : "84a6fa88-fd07-4ab6-88fa-ed38ccf40473", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:29:41 GMT", - "content-length" : "94", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "03c8fcfc-1686-40df-848b-2d148a102c69", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:44:24 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "94", + "x-ms-request-id" : "a3086d6e-bba3-467b-8cc5-b27014558655", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:29:43 GMT", - "content-length" : "94", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "b48105a8-72b0-4241-9ee6-7f4c032f7e3b", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:44:25 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "94", + "x-ms-request-id" : "dd2949bb-a127-4b18-8807-8d0ea7370266", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:29:45 GMT", - "content-length" : "94", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "84b2530e-ca02-4bef-8f16-3bbaeaa53804", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:44:26 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "94", + "x-ms-request-id" : "e50a5298-e7cd-4a81-a69d-01c702c1ed79", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:29:47 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "405", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "aa3b535e-a7f8-42da-ab80-0044547271ed", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted\",\"deletedDate\":1561364968,\"scheduledPurgeDate\":1569140968,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretGetDeleted/8f916eb84456435e83bf0eb8ddeab17b\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561364961,\"updated\":1561364961,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:44:27 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "379", + "x-ms-request-id" : "46478079-eb13-4093-91b4-4f485d785844", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted\",\"deletedDate\":1571888658,\"scheduledPurgeDate\":1579664658,\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretGetDeleted/e99e70edd03b4e8b9622bc4020f1092c\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571888658,\"updated\":1571888658,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:30:18 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "405", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "4ed3789b-afc1-4555-99d6-bc15c2ee6047", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted\",\"deletedDate\":1561364968,\"scheduledPurgeDate\":1569140968,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretGetDeleted/8f916eb84456435e83bf0eb8ddeab17b\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561364961,\"updated\":1561364961,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:44:57 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "379", + "x-ms-request-id" : "1a198d50-5e9e-4cad-9df9-5f7df08aa7a7", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted\",\"deletedDate\":1571888658,\"scheduledPurgeDate\":1579664658,\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretGetDeleted/e99e70edd03b4e8b9622bc4020f1092c\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571888658,\"updated\":1571888658,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:30:18 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "837b797c-f383-4d9d-b6b9-bc8275962d3a", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:44:57 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "56a38343-f288-42c2-91c6-6e787af09827", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretGetDeleted?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:30:18 GMT", - "content-length" : "94", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "372c6b5c-4e8c-4cbf-bef6-e5fb6cee4f22", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:44:57 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "94", + "x-ms-request-id" : "671d5326-f6d4-4819-bd87-2e59914dea83", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretGetDeleted\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/listDeletedSecrets.json b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/listDeletedSecrets.json index 7255d92fefbb..ab22dc952eab 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/listDeletedSecrets.json +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/listDeletedSecrets.json @@ -1,1210 +1,1647 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:30:45 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "283", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "4ced70a1-96c8-4da2-804e-7eceb47da701", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":\"listDeletedSecretVal2\",\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest2/51acb781cc944688afcc6eb6f687658a\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365045,\"updated\":1561365045,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:08 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "270", + "x-ms-request-id" : "441d2de6-1f81-4b00-a38c-cb9072d47a20", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"listDeletedSecretVal2\",\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest2/185e75a107d547ff80aefe4c07eb240f\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888708,\"updated\":1571888708,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:30:54 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "283", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "4a9e5f0a-d891-4e99-a92f-fb428b61f4ec", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":\"listDeletedSecretVal0\",\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest0/6319571dfcdc4b62b0f954c5d6842254\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365054,\"updated\":1561365054,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:08 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "270", + "x-ms-request-id" : "9ef6bb33-f06a-45fe-9034-a7b30d904514", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"listDeletedSecretVal0\",\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest0/34a605a57bc5443b96669dfe9eaf35e4\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888708,\"updated\":1571888708,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:30:54 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "283", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "01cb23ef-f115-4374-833d-ac79c33fce7d", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":\"listDeletedSecretVal1\",\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest1/f83a0632188449daaddbcf5f9443434a\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365054,\"updated\":1561365054,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:08 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "270", + "x-ms-request-id" : "b4e0eeb9-f228-475f-b664-36a16668531e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"listDeletedSecretVal1\",\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest1/a382d13cf4c540da816d0d09d6bde7ba\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888709,\"updated\":1571888709,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:30:54 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "411", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "4958a7c4-61bb-45c4-8c0d-5692a1bf4394", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2\",\"deletedDate\":1561365054,\"scheduledPurgeDate\":1569141054,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest2/51acb781cc944688afcc6eb6f687658a\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365045,\"updated\":1561365045,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:09 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "385", + "x-ms-request-id" : "20da919c-ed60-43a5-a3b3-4717e37799de", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2\",\"deletedDate\":1571888709,\"scheduledPurgeDate\":1579664709,\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest2/185e75a107d547ff80aefe4c07eb240f\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888708,\"updated\":1571888708,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:30:54 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "f14deb14-701e-4d23-a1d5-f9a3533dac27", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest2\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:10 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "57b2dc33-759b-4db9-8a12-84cc74a1e95c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:30:56 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "394504e8-2468-443d-bf5e-c6d3ede1a7c5", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest2\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:11 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "db43f789-63b0-479c-a449-bd04916605d5", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:30:58 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "0d597e89-c73f-49f9-a370-83963ae7ab80", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest2\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:12 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "c481c0f2-b878-4390-8bba-bbf8e456774f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:45:13 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "385", + "x-ms-request-id" : "ae130964-e140-403d-a978-a8ffbd44f11b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2\",\"deletedDate\":1571888709,\"scheduledPurgeDate\":1579664709,\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest2/185e75a107d547ff80aefe4c07eb240f\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888708,\"updated\":1571888708,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest0?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:45:13 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "385", + "x-ms-request-id" : "f00cde36-2361-4580-a1aa-3331f3c013fa", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0\",\"deletedDate\":1571888713,\"scheduledPurgeDate\":1579664713,\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest0/34a605a57bc5443b96669dfe9eaf35e4\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888708,\"updated\":1571888708,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:00 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "b25dbc09-257b-46e8-96da-2deeebb89890", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest2\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:14 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "773ccfc4-4015-4b7b-ba15-b3ef3c548753", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:02 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "411", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "c79c7b10-327d-4fb3-ad7a-06c961eb4c1d", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2\",\"deletedDate\":1561365054,\"scheduledPurgeDate\":1569141054,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest2/51acb781cc944688afcc6eb6f687658a\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365045,\"updated\":1561365045,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:45:15 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "6f6c8d80-adb7-492c-89a9-eed6b0d8d1a9", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest0?api-version=7.0", + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:02 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "411", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "7be19442-d703-4fd8-b49b-ff3d72e9dfa6", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0\",\"deletedDate\":1561365063,\"scheduledPurgeDate\":1569141063,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest0/6319571dfcdc4b62b0f954c5d6842254\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365054,\"updated\":1561365054,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:45:16 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "2ec8be56-c661-4f34-8bd8-7330538f04a7", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:02 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "f146a57c-1347-4e30-baa6-0b26e1f59c70", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:17 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "4b12b1a6-a6c1-4ebf-b972-fdb1415e5a89", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:05 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "3e45c702-1050-4962-ad63-60a5ecc3b403", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:18 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "246f0c34-983f-49a0-8b77-91b4b253d483", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:07 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "17d6d257-e573-4957-9830-7ba583ded403", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:19 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "e57624ef-f5ed-45eb-84d3-a6e11b83f002", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:09 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "42c6b078-0481-4594-ab69-88c1163b5bdd", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:20 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "363fc8d6-faae-4d93-b3da-aced9f0a8743", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:11 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "a1878b5f-9426-4985-ac02-20a85cee6930", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:21 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "5e2d54ee-f09e-42fa-b39b-4055304ca600", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:13 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "c2e8ed56-67df-4417-a145-44864678ef3f", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:22 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "9e0498be-9bd7-430c-9b9e-8ae3f20268a4", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:15 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "8bd9a149-0447-44f2-8e13-59c90116d0b1", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:23 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "c294bd33-bd06-46d5-b433-c0b2f3d7531e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:18 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "411", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:45:24 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "c58b8ce0-1535-416f-97fd-6e7417df7ab7", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:45:25 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "cfc7c2e1-3224-4a1a-93b7-f5e67a381652", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:45:26 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "4350a41e-4e8b-4e63-a28c-e0293480dbca", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:45:27 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "1272db36-1c8d-4274-99bf-b03feed4b358", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "c8464ea0-ad70-46f6-b17a-89e7cc32438f", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0\",\"deletedDate\":1561365063,\"scheduledPurgeDate\":1569141063,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest0/6319571dfcdc4b62b0f954c5d6842254\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365054,\"updated\":1561365054,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:28 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "385", + "x-ms-request-id" : "4351de91-b7f8-4cc4-8a70-8ff6d8cf0f03", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0\",\"deletedDate\":1571888713,\"scheduledPurgeDate\":1579664713,\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest0/34a605a57bc5443b96669dfe9eaf35e4\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888708,\"updated\":1571888708,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:18 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "411", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "ff0f9872-903e-42bb-9c9d-eb298dc6f387", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1\",\"deletedDate\":1561365078,\"scheduledPurgeDate\":1569141078,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest1/f83a0632188449daaddbcf5f9443434a\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365054,\"updated\":1561365054,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:29 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "385", + "x-ms-request-id" : "4a5f9bd3-4dc2-4970-a188-0b04ba4e1b77", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1\",\"deletedDate\":1571888729,\"scheduledPurgeDate\":1579664729,\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest1/a382d13cf4c540da816d0d09d6bde7ba\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888709,\"updated\":1571888709,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:18 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "c6bbc4c4-df4d-48cc-ada5-5f06b45d0170", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:30 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "b164c9f3-6b57-4a85-a3dc-55642be83b09", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:20 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "7ca45a01-c2d5-436d-b599-67a9cbeaac6e", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:31 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "0634729c-6340-4849-9f13-b178a824fd00", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:22 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "3e55dfe1-0f9b-42cb-bf69-49cf017b0a4d", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "300d7266-ab04-4f6e-95ab-a248db261d52", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:24 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "75c3b55a-7606-4f7c-8729-cb40ffa48d29", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:33 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "cf31ed12-b5c1-4a6f-93f4-9eec20bc34a8", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:26 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "cf08188a-fb4e-45cb-abd8-6809d18dfa8f", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:34 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "f877c79f-345b-4ca9-b22a-1fe440b44c38", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:29 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "3e1b0aa9-5470-4518-a723-5c118cd2a026", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:35 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "80dfb6f4-9a06-4dab-b2a5-262e35ac5f96", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:31 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "f639ac7c-838e-4dca-8324-bccbbda6f5d1", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:45:37 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "4d570829-d297-4b99-b5a3-04a1a61ed456", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:31:33 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "411", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "6dab44cd-8aa6-4b5c-896b-ba0b249a8fd4", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1\",\"deletedDate\":1561365078,\"scheduledPurgeDate\":1569141078,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest1/f83a0632188449daaddbcf5f9443434a\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365054,\"updated\":1561365054,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:45:37 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "a71bc1a3-068f-4b81-b6dd-bb3c43839a07", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets?maxresults=25&api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:33 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "378", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "8fef296b-80e6-44ed-a192-5862a2fc65da", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExNDAhTURBd01EVTVJWE5sWTNKbGRDOU1TVk5VUkVWTVJWUkZSRk5GUTFKRlZGTXhMMEV5UWtZMFF6UXpRVVEzUVRSR01EQkNPVGt5TVRBd01EVTROVE16UlRjMElUQXdNREF5T0NFNU9UazVMVEV5TFRNeFZESXpPalU1T2pVNUxqazVPVGs1T1RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25\"}" - } + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:45:39 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "54a8dadd-7a0a-4396-80ef-b3c3a1e6a8dd", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:45:39 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "1766ac62-4497-462c-8bf3-97a1f4970648", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExNDAhTURBd01EVTVJWE5sWTNKbGRDOU1TVk5VUkVWTVJWUkZSRk5GUTFKRlZGTXhMMEV5UWtZMFF6UXpRVVEzUVRSR01EQkNPVGt5TVRBd01EVTROVE16UlRjMElUQXdNREF5T0NFNU9UazVMVEV5TFRNeFZESXpPalU1T2pVNUxqazVPVGs1T1RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:33 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "325", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:45:41 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "42e03e07-55ec-4831-b85e-6f43d0f8b9a9", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:45:41 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "da947060-1c02-4979-8b81-21e3fd672051", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:45:43 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "3e6cd496-5986-422f-b28d-c0fa31244fca", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "60df85a3-fd60-434f-9816-f3ad74e8c018", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ETXdJWE5sWTNKbGRDOU1TVk5VUkVWTVJWUkZSRk5GUTFKRlZGTlVSVk5VTUNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:45:44 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "385", + "x-ms-request-id" : "f3a3fe88-ac65-4551-ae27-2e22ee0018b2", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1\",\"deletedDate\":1571888729,\"scheduledPurgeDate\":1579664729,\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest1/a382d13cf4c540da816d0d09d6bde7ba\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888709,\"updated\":1571888709,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ETXdJWE5sWTNKbGRDOU1TVk5VUkVWTVJWUkZSRk5GUTFKRlZGTlVSVk5VTUNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets?maxresults=25&api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:34 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "1498", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "4c7cdd8c-11b8-48b8-94e3-0e6e470859ac", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0\",\"deletedDate\":1561365063,\"scheduledPurgeDate\":1569141063,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest0\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365054,\"updated\":1561365054,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1\",\"deletedDate\":1561365078,\"scheduledPurgeDate\":1569141078,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest1\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365054,\"updated\":1561365054,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2\",\"deletedDate\":1561365054,\"scheduledPurgeDate\":1569141054,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest2\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365045,\"updated\":1561365045,\"recoveryLevel\":\"Recoverable+Purgeable\"}}],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjghTURBd01EVXlJWE5sWTNKbGRDOU1TVk5VVTBWRFVrVlVNVGN2TUVNM1JEQTVRMFF4TVVWQk5EQXdSamsyTVVJME9UTTFNamhFUmtGQlJVWWhNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:46:45 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "344", + "x-ms-request-id" : "0e9ff31e-6f10-4a45-a2a0-7aff233efd5a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjQhTURBd01EUTRJWE5sWTNKbGRDOURSVkpVVGtGTlJTOHpRakV6UVVGQ01qZzBPVEUwTTBZME9EQTFRemM1TmtZd01rVTRNak0zUmlFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjghTURBd01EVXlJWE5sWTNKbGRDOU1TVk5VVTBWRFVrVlVNVGN2TUVNM1JEQTVRMFF4TVVWQk5EQXdSamsyTVVJME9UTTFNamhFUmtGQlJVWWhNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjQhTURBd01EUTRJWE5sWTNKbGRDOURSVkpVVGtGTlJTOHpRakV6UVVGQ01qZzBPVEUwTTBZME9EQTFRemM1TmtZd01rVTRNak0zUmlFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:34 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "302", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "ae418a54-27fa-4ff6-83fb-a846fa87f43c", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFNUlYTmxZM0psZEM5TVNWTlVVMFZEVWtWVU1qa2hNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:46:44 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "1347", + "x-ms-request-id" : "037f3db6-3834-4911-96d3-e4998333ad4b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0\",\"deletedDate\":1571888713,\"scheduledPurgeDate\":1579664713,\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest0\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888708,\"updated\":1571888708,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1\",\"deletedDate\":1571888729,\"scheduledPurgeDate\":1579664729,\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest1\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888709,\"updated\":1571888709,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2\",\"deletedDate\":1571888709,\"scheduledPurgeDate\":1579664709,\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest2\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888708,\"updated\":1571888708,\"recoveryLevel\":\"Recoverable+Purgeable\"}}],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFNUlYTmxZM0psZEM5TVNWTlVVMFZEVWtWVU1UWWhNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFNUlYTmxZM0psZEM5TVNWTlVVMFZEVWtWVU1qa2hNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFNUlYTmxZM0psZEM5TVNWTlVVMFZEVWtWVU1UWWhNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:34 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "373", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "234196b7-f8f6-47c7-a143-28147238b215", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMzYhTURBd01EVTNJWE5sWTNKbGRDOVVSVk5VVTBWRFVrVlVVa1ZUVkU5U1JTOHhPRFEwTWtZME1EQkRSRU0wT0RBMVFqVTNORGM0T1RaRE1qSTVNekF6TkNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:46:45 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "349", + "x-ms-request-id" : "76f9ba6b-7479-4b61-987b-2e87a00152a2", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjghTURBd01EVXlJWE5sWTNKbGRDOU1TVk5VVTBWRFVrVlVNamN2TURkQlJUVkVNVEExTlRCRU5EWXpSa0ZDTnpWRFFUY3hNa0pFTjBVd05URWhNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMzYhTURBd01EVTNJWE5sWTNKbGRDOVVSVk5VVTBWRFVrVlVVa1ZUVkU5U1JTOHhPRFEwTWtZME1EQkRSRU0wT0RBMVFqVTNORGM0T1RaRE1qSTVNekF6TkNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjghTURBd01EVXlJWE5sWTNKbGRDOU1TVk5VVTBWRFVrVlVNamN2TURkQlJUVkVNVEExTlRCRU5EWXpSa0ZDTnpWRFFUY3hNa0pFTjBVd05URWhNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:34 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "28", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "dfcd0ae6-c2c1-4bfc-adb8-8d84dfb2aed1", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":null}" - } + "Date" : "Thu, 24 Oct 2019 03:46:45 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "294", + "x-ms-request-id" : "7a8505df-d46f-42bd-a4c3-b2e0247b84d0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4OCFNREF3TURJd0lYTmxZM0psZEM5TldVTkZVbFJKUmtsRFFWUkZJVEF3TURBeU9DRTVPVGs1TFRFeUxUTXhWREl6T2pVNU9qVTVMams1T1RrNU9UbGFJUS0tIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets?maxresults=25&api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4OCFNREF3TURJd0lYTmxZM0psZEM5TldVTkZVbFJKUmtsRFFWUkZJVEF3TURBeU9DRTVPVGs1TFRFeUxUTXhWREl6T2pVNU9qVTVMams1T1RrNU9UbGFJUS0tIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12 azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:34 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "378", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "2998ca81-c66d-4ed0-8715-3c6d1086c439", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExNDAhTURBd01EVTVJWE5sWTNKbGRDOU1TVk5VUkVWTVJWUkZSRk5GUTFKRlZGTXhMMEV5UWtZMFF6UXpRVVEzUVRSR01EQkNPVGt5TVRBd01EVTROVE16UlRjMElUQXdNREF5T0NFNU9UazVMVEV5TFRNeFZESXpPalU1T2pVNUxqazVPVGs1T1RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:46:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "349", + "x-ms-request-id" : "da20d9ac-5c14-4e42-9cd9-4636fb921336", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjghTURBd01EVXhJWE5sWTNKbGRDOVVSVk5VVTBWRFVrVlVOQzh4TURZM01ESkZNVGMxT1VNME1EQXdPRGxETURFNFJFTkdRall4TlVVeU1DRXdNREF3TWpnaE9UazVPUzB4TWkwek1WUXlNem8xT1RvMU9TNDVPVGs1T1RrNVdpRS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExNDAhTURBd01EVTVJWE5sWTNKbGRDOU1TVk5VUkVWTVJWUkZSRk5GUTFKRlZGTXhMMEV5UWtZMFF6UXpRVVEzUVRSR01EQkNPVGt5TVRBd01EVTROVE16UlRjMElUQXdNREF5T0NFNU9UazVMVEV5TFRNeFZESXpPalU1T2pVNUxqazVPVGs1T1RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjghTURBd01EVXhJWE5sWTNKbGRDOVVSVk5VVTBWRFVrVlVOQzh4TURZM01ESkZNVGMxT1VNME1EQXdPRGxETURFNFJFTkdRall4TlVVeU1DRXdNREF3TWpnaE9UazVPUzB4TWkwek1WUXlNem8xT1RvMU9TNDVPVGs1T1RrNVdpRS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:35 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "325", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "2cc780d5-35a8-42fa-9547-7417a280fd68", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ETXdJWE5sWTNKbGRDOU1TVk5VUkVWTVJWUkZSRk5GUTFKRlZGTlVSVk5VTUNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:46:45 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "284", + "x-ms-request-id" : "417cd1fa-8411-401d-bc00-b3cd2a9f01b0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4MCFNREF3TURFMklYTmxZM0psZEM5VlUwVlNRMFZTVkRFaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ETXdJWE5sWTNKbGRDOU1TVk5VUkVWTVJWUkZSRk5GUTFKRlZGTlVSVk5VTUNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4MCFNREF3TURFMklYTmxZM0psZEM5VlUwVlNRMFZTVkRFaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:35 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "1498", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "6552af5a-326d-41c8-b36a-89f94a616ff7", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0\",\"deletedDate\":1561365063,\"scheduledPurgeDate\":1569141063,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest0\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365054,\"updated\":1561365054,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1\",\"deletedDate\":1561365078,\"scheduledPurgeDate\":1569141078,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest1\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365054,\"updated\":1561365054,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2\",\"deletedDate\":1561365054,\"scheduledPurgeDate\":1569141054,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listDeletedSecretsTest2\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1561365045,\"updated\":1561365045,\"recoveryLevel\":\"Recoverable+Purgeable\"}}],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjghTURBd01EVXlJWE5sWTNKbGRDOU1TVk5VVTBWRFVrVlVNVGN2TUVNM1JEQTVRMFF4TVVWQk5EQXdSamsyTVVJME9UTTFNamhFUmtGQlJVWWhNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:46:46 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "28", + "x-ms-request-id" : "9aafef35-65c2-45d7-a378-982c019f25ba", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjghTURBd01EVXlJWE5sWTNKbGRDOU1TVk5VVTBWRFVrVlVNVGN2TUVNM1JEQTVRMFF4TVVWQk5EQXdSamsyTVVJME9UTTFNamhFUmtGQlJVWWhNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets?maxresults=25&api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:35 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "302", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "66a2295a-9e35-431f-94f3-dffe2585062b", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFNUlYTmxZM0psZEM5TVNWTlVVMFZEVWtWVU1qa2hNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:46:45 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "344", + "x-ms-request-id" : "647608ad-251f-446f-9c5a-0029251a089f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjQhTURBd01EUTRJWE5sWTNKbGRDOURSVkpVVGtGTlJTOHpRakV6UVVGQ01qZzBPVEUwTTBZME9EQTFRemM1TmtZd01rVTRNak0zUmlFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFNUlYTmxZM0psZEM5TVNWTlVVMFZEVWtWVU1qa2hNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjQhTURBd01EUTRJWE5sWTNKbGRDOURSVkpVVGtGTlJTOHpRakV6UVVGQ01qZzBPVEUwTTBZME9EQTFRemM1TmtZd01rVTRNak0zUmlFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:35 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "373", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "b3d891d3-4785-4c56-a22c-7da8b4f39113", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":\"https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMzYhTURBd01EVTNJWE5sWTNKbGRDOVVSVk5VVTBWRFVrVlVVa1ZUVkU5U1JTOHhPRFEwTWtZME1EQkRSRU0wT0RBMVFqVTNORGM0T1RaRE1qSTVNekF6TkNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25\"}" - } + "Date" : "Thu, 24 Oct 2019 03:46:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "1347", + "x-ms-request-id" : "9cf46242-054f-4017-a450-86c29ce8f494", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0\",\"deletedDate\":1571888713,\"scheduledPurgeDate\":1579664713,\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest0\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888708,\"updated\":1571888708,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1\",\"deletedDate\":1571888729,\"scheduledPurgeDate\":1579664729,\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest1\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888709,\"updated\":1571888709,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2\",\"deletedDate\":1571888709,\"scheduledPurgeDate\":1579664709,\"id\":\"https://cameravault.vault.azure.net/secrets/listDeletedSecretsTest2\",\"attributes\":{\"enabled\":true,\"exp\":3799353600,\"created\":1571888708,\"updated\":1571888708,\"recoveryLevel\":\"Recoverable+Purgeable\"}}],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFNUlYTmxZM0psZEM5TVNWTlVVMFZEVWtWVU1UWWhNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMzYhTURBd01EVTNJWE5sWTNKbGRDOVVSVk5VVTBWRFVrVlVVa1ZUVkU5U1JTOHhPRFEwTWtZME1EQkRSRU0wT0RBMVFqVTNORGM0T1RaRE1qSTVNekF6TkNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25", + "Uri" : "https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFNUlYTmxZM0psZEM5TVNWTlVVMFZEVWtWVU1UWWhNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:35 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "28", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "0ede794e-c09c-4492-9bbe-f9f23f2807ec", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[],\"nextLink\":null}" - } + "Date" : "Thu, 24 Oct 2019 03:46:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "349", + "x-ms-request-id" : "ec797445-b406-46bc-a2b5-8e57cc6d1f29", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjghTURBd01EVXlJWE5sWTNKbGRDOU1TVk5VVTBWRFVrVlVNamN2TURkQlJUVkVNVEExTlRCRU5EWXpSa0ZDTnpWRFFUY3hNa0pFTjBVd05URWhNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:36 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "b73ddcae-84d2-4352-b706-85d98caa7c79", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:46:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "f862fb47-0c2b-4517-a160-994de59fc7fa", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest0?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:36 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "7f622136-1c33-42ba-a874-743aede1936b", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:46:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "646bdbe0-756b-4c48-a367-7312a9342fbc", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest0\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:36 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "592348b2-b7be-4b97-a62c-d49adec544ae", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:46:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "7d1399dd-e8f6-4e18-a959-0915d25d6d0d", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest1?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:36 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "aba6b018-f3ac-4a28-a497-d3a5f7251297", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:46:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "8040f452-f2da-41fd-95c0-c65a7973a349", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjghTURBd01EVXlJWE5sWTNKbGRDOU1TVk5VVTBWRFVrVlVNamN2TURkQlJUVkVNVEExTlRCRU5EWXpSa0ZDTnpWRFFUY3hNa0pFTjBVd05URWhNREF3TURJNElUazVPVGt0TVRJdE16RlVNak02TlRrNk5Ua3VPVGs1T1RrNU9Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:46:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "294", + "x-ms-request-id" : "9f6597ed-1a6f-4bd6-a48e-dd658eeb6cd8", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4OCFNREF3TURJd0lYTmxZM0psZEM5TldVTkZVbFJKUmtsRFFWUkZJVEF3TURBeU9DRTVPVGs1TFRFeUxUTXhWREl6T2pVNU9qVTVMams1T1RrNU9UbGFJUS0tIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:37 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "317c3482-73ee-4d21-817d-392651a7cfe4", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:46:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "c52efd61-9968-4b3b-a66d-5a63501d11d8", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listDeletedSecretsTest2?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:37 GMT", - "content-length" : "97", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "b71b6bc7-c1ad-4794-9128-6781a4dc84a4", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest2\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:46:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "97", + "x-ms-request-id" : "78dee307-4a86-4fc9-8d24-ff755fc745d9", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listDeletedSecretsTest2\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4OCFNREF3TURJd0lYTmxZM0psZEM5TldVTkZVbFJKUmtsRFFWUkZJVEF3TURBeU9DRTVPVGs1TFRFeUxUTXhWREl6T2pVNU9qVTVMams1T1RrNU9UbGFJUS0tIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=25", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:46:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "349", + "x-ms-request-id" : "fb7fc378-7105-4e05-a88f-1443c0343ab5", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjghTURBd01EVXhJWE5sWTNKbGRDOVVSVk5VVTBWRFVrVlVOQzh4TURZM01ESkZNVGMxT1VNME1EQXdPRGxETURFNFJFTkdRall4TlVVeU1DRXdNREF3TWpnaE9UazVPUzB4TWkwek1WUXlNem8xT1RvMU9TNDVPVGs1T1RrNVdpRS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMjghTURBd01EVXhJWE5sWTNKbGRDOVVSVk5VVTBWRFVrVlVOQzh4TURZM01ESkZNVGMxT1VNME1EQXdPRGxETURFNFJFTkdRall4TlVVeU1DRXdNREF3TWpnaE9UazVPUzB4TWkwek1WUXlNem8xT1RvMU9TNDVPVGs1T1RrNVdpRS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=25", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:46:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "284", + "x-ms-request-id" : "72ee2988-8351-4f47-9c6f-6b2a3064088d", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":\"https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4MCFNREF3TURFMklYTmxZM0psZEM5VlUwVlNRMFZTVkRFaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net:443/deletedsecrets?api-version=7.0&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4MCFNREF3TURFMklYTmxZM0psZEM5VlUwVlNRMFZTVkRFaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=25", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:46:47 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "28", + "x-ms-request-id" : "c4f623d8-9831-4a62-a7db-7d7a0e0558b2", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[],\"nextLink\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/listSecretVersions.json b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/listSecretVersions.json index 95c199030bc9..1bc4762e8663 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/listSecretVersions.json +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/listSecretVersions.json @@ -1,433 +1,645 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:32:56 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "277", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "9c8b28d6-a6bf-4843-8e4f-a6bac4c598c2", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":\"listSecretVersionVal1\",\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion/c25eec8124464639bf289da6b4b4cbb7\",\"attributes\":{\"enabled\":true,\"exp\":3797280000,\"created\":1561365176,\"updated\":1561365176,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:46:58 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "264", + "x-ms-request-id" : "6d617aab-6ac2-41af-ae25-65f10ed7754a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"listSecretVersionVal1\",\"id\":\"https://cameravault.vault.azure.net/secrets/listSecretVersion/efede8c9d9154b2bab61de13b30b3697\",\"attributes\":{\"enabled\":true,\"exp\":3797280000,\"created\":1571888818,\"updated\":1571888818,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:05 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "277", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "569b1011-73b4-4de5-972d-11b8125f8258", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":\"listSecretVersionVal2\",\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion/17b721a5d0334708912b7c82cef6cb1c\",\"attributes\":{\"enabled\":true,\"exp\":3797366400,\"created\":1561365185,\"updated\":1561365185,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:46:57 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "264", + "x-ms-request-id" : "49b2d759-aec4-45c3-954a-6cbcefa99710", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"listSecretVersionVal2\",\"id\":\"https://cameravault.vault.azure.net/secrets/listSecretVersion/6cc0b20a2c484c9d983cc220a4da42d7\",\"attributes\":{\"enabled\":true,\"exp\":3797366400,\"created\":1571888818,\"updated\":1571888818,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:05 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "277", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "efdc9db5-5362-4b7d-b0f0-3fdbfde5e538", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":\"listSecretVersionVal3\",\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion/5d812529b0af43d48f2ebe9f7ecb8f3a\",\"attributes\":{\"enabled\":true,\"exp\":3797452800,\"created\":1561365185,\"updated\":1561365185,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:46:58 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "264", + "x-ms-request-id" : "1c7799c5-b05a-479f-a4c6-86ecce7f65ee", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"listSecretVersionVal3\",\"id\":\"https://cameravault.vault.azure.net/secrets/listSecretVersion/86df673162904c83a0fdf1df99ab9126\",\"attributes\":{\"enabled\":true,\"exp\":3797452800,\"created\":1571888818,\"updated\":1571888818,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:05 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "277", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "7787f1bb-4398-4245-bf32-ac8b14d531fa", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":\"listSecretVersionVal4\",\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion/a8f119535e114009924801c95fad3e9b\",\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1561365185,\"updated\":1561365185,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:46:58 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "264", + "x-ms-request-id" : "5d270e9c-97ce-45c4-849c-73af71c02268", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"listSecretVersionVal4\",\"id\":\"https://cameravault.vault.azure.net/secrets/listSecretVersion/35fd432da4e3484fb2ff3e118dfb8d8b\",\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1571888818,\"updated\":1571888818,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion/versions?maxresults=25&api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/listSecretVersion/versions?maxresults=25&api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:05 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "1011", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "9b705696-626d-47c5-8b66-0961cd4e6a3f", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":[{\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion/17b721a5d0334708912b7c82cef6cb1c\",\"attributes\":{\"enabled\":true,\"exp\":3797366400,\"created\":1561365185,\"updated\":1561365185,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion/5d812529b0af43d48f2ebe9f7ecb8f3a\",\"attributes\":{\"enabled\":true,\"exp\":3797452800,\"created\":1561365185,\"updated\":1561365185,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion/a8f119535e114009924801c95fad3e9b\",\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1561365185,\"updated\":1561365185,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion/c25eec8124464639bf289da6b4b4cbb7\",\"attributes\":{\"enabled\":true,\"exp\":3797280000,\"created\":1561365176,\"updated\":1561365176,\"recoveryLevel\":\"Recoverable+Purgeable\"}}],\"nextLink\":null}" - } + "Date" : "Thu, 24 Oct 2019 03:46:58 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "959", + "x-ms-request-id" : "bd2f10d2-fb23-415a-a063-1c563e02616c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":[{\"id\":\"https://cameravault.vault.azure.net/secrets/listSecretVersion/35fd432da4e3484fb2ff3e118dfb8d8b\",\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1571888818,\"updated\":1571888818,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"id\":\"https://cameravault.vault.azure.net/secrets/listSecretVersion/6cc0b20a2c484c9d983cc220a4da42d7\",\"attributes\":{\"enabled\":true,\"exp\":3797366400,\"created\":1571888818,\"updated\":1571888818,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"id\":\"https://cameravault.vault.azure.net/secrets/listSecretVersion/86df673162904c83a0fdf1df99ab9126\",\"attributes\":{\"enabled\":true,\"exp\":3797452800,\"created\":1571888818,\"updated\":1571888818,\"recoveryLevel\":\"Recoverable+Purgeable\"}},{\"id\":\"https://cameravault.vault.azure.net/secrets/listSecretVersion/efede8c9d9154b2bab61de13b30b3697\",\"attributes\":{\"enabled\":true,\"exp\":3797280000,\"created\":1571888818,\"updated\":1571888818,\"recoveryLevel\":\"Recoverable+Purgeable\"}}],\"nextLink\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:05 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "399", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "06db4cef-d8a0-400b-a165-fc4553e0a650", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listSecretVersion\",\"deletedDate\":1561365186,\"scheduledPurgeDate\":1569141186,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion/a8f119535e114009924801c95fad3e9b\",\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1561365185,\"updated\":1561365185,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:46:58 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "373", + "x-ms-request-id" : "29d1ef75-b471-4409-b9ad-cf51e371c3c7", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion\",\"deletedDate\":1571888819,\"scheduledPurgeDate\":1579664819,\"id\":\"https://cameravault.vault.azure.net/secrets/listSecretVersion/35fd432da4e3484fb2ff3e118dfb8d8b\",\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1571888818,\"updated\":1571888818,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:00 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "90822db2-11ad-4cb8-afa5-c2c409f8b143", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:00 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "9136a45b-1f73-4dd2-a451-98d02574bc33", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:01 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "a05650da-7772-444a-b015-aad4e1397593", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:05 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "b5e7b4ae-d356-4e56-9088-73557e936f44", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:03 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "0e1d090d-66b0-4933-86da-31cea3106c98", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:07 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "99a93e7d-d976-45c4-9e95-c4f63bd3abda", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:04 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "94d2cdd0-1ab3-4780-9930-e38843132a57", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:09 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "80e2994a-ca8b-442a-b10e-cf3329acaa84", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:05 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "96f931e5-7e59-4203-b915-4a8b6e1e1a6b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:12 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "82880148-f841-4e01-8d5f-4c7ebc038a4f", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:06 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "c029c18e-7fe7-46cb-af8e-a27aa16d68b0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:14 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "10f905e2-c05f-4b58-b170-569dadd739db", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:07 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "7e8229ba-fd89-43b3-b934-4a57fc47ce9e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:16 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "e002a695-ea8a-4bcd-93e0-019626976186", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:08 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "86727849-8459-41c6-aa31-317563cb69a6", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:18 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "5e713d2b-1daf-44c4-996d-95560b6c01ba", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:09 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "9345a9c5-ba4a-4510-b300-13c49ff861c1", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:21 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "399", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:10 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "27f54c4f-9ec5-412b-8070-857b51376268", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:12 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "3a9eee68-8ef0-4391-b568-17d6e8d8da8a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:13 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "6316806c-5d58-4b98-b639-3462da176d9e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:13 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "3715bf09-7f6f-40ea-af93-3c22d374d5bf", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "4455a4c5-9149-4615-a6f8-52bfdaa6f273", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listSecretVersion\",\"deletedDate\":1561365186,\"scheduledPurgeDate\":1569141186,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/listSecretVersion/a8f119535e114009924801c95fad3e9b\",\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1561365185,\"updated\":1561365185,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:15 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "373", + "x-ms-request-id" : "cc117a77-dcf5-48c3-94f0-ce7b771df0e2", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion\",\"deletedDate\":1571888819,\"scheduledPurgeDate\":1579664819,\"id\":\"https://cameravault.vault.azure.net/secrets/listSecretVersion/35fd432da4e3484fb2ff3e118dfb8d8b\",\"attributes\":{\"enabled\":true,\"exp\":3797539200,\"created\":1571888818,\"updated\":1571888818,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:21 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "d58f33e6-868d-4b97-93c6-2783ff9a864b", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:47:15 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "2d8bc10b-9917-4e56-accb-98fc86d13092", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/listSecretVersion?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:21 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "27be3bd8-4338-4649-8e0e-843deed5619b", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:14 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "509977e8-1e1d-4806-bd32-db15d1fda966", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: listSecretVersion\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/recoverDeletedSecret.json b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/recoverDeletedSecret.json index cb088f18d4d1..a26d2d40a73d 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/recoverDeletedSecret.json +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/recoverDeletedSecret.json @@ -1,193 +1,844 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretRecover?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:36:07 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "276", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "7d385ece-0feb-4184-98d3-59ec7c33fc0f", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":\"testSecretRecoverVal\",\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretRecover/8632454fc7e44ef9b7eb47aeb1f5e38b\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561365368,\"updated\":1561365368,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:48:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "263", + "x-ms-request-id" : "552d5313-fe18-459f-9c4f-c1f31da92fdb", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"testSecretRecoverVal\",\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretRecover/31ac9ce1dd0e411a8fe6e7d3a7585270\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571888928,\"updated\":1571888928,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretRecover?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:36:16 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "399", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "45cfdbf8-2614-4cbf-9f97-c9b072821c8a", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRecover\",\"deletedDate\":1561365376,\"scheduledPurgeDate\":1569141376,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretRecover/8632454fc7e44ef9b7eb47aeb1f5e38b\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561365368,\"updated\":1561365368,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:48:48 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "373", + "x-ms-request-id" : "f8e242d6-5f45-4418-aee6-38440ca39e78", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover\",\"deletedDate\":1571888928,\"scheduledPurgeDate\":1579664928,\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretRecover/31ac9ce1dd0e411a8fe6e7d3a7585270\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571888928,\"updated\":1571888928,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:49 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "fa4cc2e2-da91-49fb-9681-9e8fecc24f44", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:51 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "3ce0a806-5926-40e6-bfba-6f5b8c597167", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:51 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "c44e91f7-cee9-41be-8ff5-1c15759164f7", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:53 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "ab0f4465-93be-41b9-aa23-f61b27b91fde", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:36:16 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "56268d83-7392-4f85-b748-67d74f7a28df", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:48:54 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "d756ce4c-9af1-463b-89c0-a1896ef96da3", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:36:18 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "1471f821-59a2-44d3-8559-ae4f2e139ea5", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:48:54 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "74d2036e-af98-4acc-b47c-29dc45b92952", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:36:20 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "06457d2d-febb-42cc-a093-9543fb577cf9", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:48:56 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "23e6b1e5-a859-4852-9cf7-1560bcb2442e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:36:22 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "399", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:57 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "f3f6b24c-a1bb-4647-ae7d-7fda701d8d82", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:58 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "465c538a-794f-4b4e-934e-96106ff74e90", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:48:59 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "41b935f8-b0ed-4e7f-9f74-8377f6f236e0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:00 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "5f45e97c-2b6f-4def-852b-2c4082bd6652", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:01 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "a7172c6e-bcc5-429a-a7fb-c9b00986389b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "414abcb7-9780-4354-ae52-0796d9a41910", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRecover\",\"deletedDate\":1561365376,\"scheduledPurgeDate\":1569141376,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretRecover/8632454fc7e44ef9b7eb47aeb1f5e38b\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561365368,\"updated\":1561365368,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:49:02 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "373", + "x-ms-request-id" : "1410a8ed-dae9-4472-b6b1-2944ccd0c4e4", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover\",\"deletedDate\":1571888928,\"scheduledPurgeDate\":1579664928,\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretRecover/31ac9ce1dd0e411a8fe6e7d3a7585270\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571888928,\"updated\":1571888928,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRecover/recover?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRecover/recover?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 24 Oct 2019 03:49:02 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "232", + "x-ms-request-id" : "ac6ff556-d30f-4261-9877-eb85aad4ac4c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretRecover/31ac9ce1dd0e411a8fe6e7d3a7585270\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571888928,\"updated\":1571888928,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:03 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "83", + "x-ms-request-id" : "d15711a2-1147-44fa-9cbf-601852e12e3a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:04 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "83", + "x-ms-request-id" : "13375080-2d83-4c95-91e0-0c2ceced5a8a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:06 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "83", + "x-ms-request-id" : "65f3720b-1aca-4913-acd2-ba9dce12fe7f", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:07 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "83", + "x-ms-request-id" : "b6f5487b-e1db-4d57-8255-81a06adfb82e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:07 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "83", + "x-ms-request-id" : "e9d94928-a9e6-40ed-b4de-a83d75a1180b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:36:22 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "245", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:09 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "83", + "x-ms-request-id" : "078981f0-cc75-4749-9a4a-1ef2d778bbfd", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:10 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "83", + "x-ms-request-id" : "8746c354-569a-4b9e-ac28-ce8c29d958e8", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:11 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "83", + "x-ms-request-id" : "3ef13d8b-c022-4c3a-9bc3-d4e0cea7a3d5", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:12 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "83", + "x-ms-request-id" : "0abd6bcb-32a4-4844-ba61-ab1279d0c2d0", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:13 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "83", + "x-ms-request-id" : "e2e7c459-7860-49e2-a7cb-52bbc9d59b3a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:14 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "83", + "x-ms-request-id" : "edeaaf3d-04a2-46bb-9d56-fe806371df23", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:15 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "83", + "x-ms-request-id" : "3cca6513-7aae-42c4-a222-19f75390d741", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:49:17 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "83", + "x-ms-request-id" : "ea5ad4f4-fbe9-4d9f-bb67-2f07361ba5e6", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: testSecretRecover\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRecover/?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "2569e10e-c1e7-4d3b-a35c-6641f25e5d8f", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretRecover/8632454fc7e44ef9b7eb47aeb1f5e38b\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1561365368,\"updated\":1561365368,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:49:17 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "263", + "x-ms-request-id" : "b2b7a7af-5e5c-43ee-803f-7408951af754", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"testSecretRecoverVal\",\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretRecover/31ac9ce1dd0e411a8fe6e7d3a7585270\",\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1571888928,\"updated\":1571888928,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/recoverDeletedSecretNotFound.json b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/recoverDeletedSecretNotFound.json index f62577b5a511..e1d22673fe45 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/recoverDeletedSecretNotFound.json +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/recoverDeletedSecretNotFound.json @@ -1,31 +1,32 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/non-existing/recover?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/non-existing/recover?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:36:40 GMT", - "content-length" : "78", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "366b222b-7450-4211-a3fe-42098d5cab19", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: non-existing\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:49:18 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "78", + "x-ms-request-id" : "f32ee06d-77ac-4ef4-9767-124041627cc9", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: non-existing\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/restoreSecret.json b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/restoreSecret.json index 558bc573154c..8fea3f577b8e 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/restoreSecret.json +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/resources/session-records/restoreSecret.json @@ -1,352 +1,561 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretRestore?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRestore?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:29 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "276", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "914f9d26-5582-46a3-8032-dfd834b7e8cc", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":\"testSecretRestoreVal\",\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretRestore/882bfc75c2e04add915411166e1f6d7d\",\"attributes\":{\"enabled\":true,\"exp\":3483820800,\"created\":1561365210,\"updated\":1561365210,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:15 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "263", + "x-ms-request-id" : "4b1e98ae-b10a-4253-9e03-a1835397d03e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"testSecretRestoreVal\",\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretRestore/cf2f7ae64caf4786ba3c70875b9441b9\",\"attributes\":{\"enabled\":true,\"exp\":3483820800,\"created\":1571888835,\"updated\":1571888835,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretRestore/backup?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRestore/backup?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:37 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "8847", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "72efe77e-468d-42d3-af66-fefd9bdae31d", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"value\":\"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlBrY2MybVJSMUpIcWRLQVF2R19jR3ZxNnYwT1AyVGpYcG4xUnZxX0htZm9sMU42b3RsRDUwdGQzcTItQzA0U0U3NlJPeGVoZ3VYdW5Sb0ZWaTJVdjdRNDh0YVhJWXE3VWRNUTJBYi1rcmc3ZUdEaWdBanpPcmxRWnJlSUVBWFotYTF2WkhnUXR2QkNnbFQ2UUdjV3F2cEEzS3hKRlVzN004WFVIZGpoOE9mZFJmcUUwWW1UdkFBNmV2a3FfNGpRVkFaXzN5Ry1yTVBYTmdFWnFNQlJRUFZncG5oa3hNNWJiMDRBcXhuVEpvWmVCWTRWd0JDWGJzVjNsdTJUUElYcWZFSzkybWZrV0FtaFBWU1l5Zl9XZW4zcWRKMnFYMkhPRzVaRzdEaVJNV0RwWVIwVll5UEtvUk0tMFM2dlVDVURqTmtjcWsxaHowMDB0RDVJcEprNm9BQS5YMDRuV0RlQl9qT0paUHFfZHdZSVl3Ll96c2gtNWpiRTF4b2dTR3BScnRTZ0ExbnlWN2tpd0c3V0lkZjYwS2JiZGp4WHppYnJRWkVnQWJ3SjNQQUVMRlZjZWZLaDlnejlxMFFOME5pcFFSc0lZR0VrcFhJMU9FZVlEQkRmQjdGTE9BUldrSDNBYktuaG10Zk9tVnNWZWVrQUk3NFJROEJFMHZXaTM0SDZQbFpHd0VGMGNTeGJpYkVzTTBTc3VRdGcwWGRxTFZUdmtCcGZxeWdTVEZCcnFQcHFZci1adTJqSXVlcWlvRkJ0bDRENGkzQ0d5LVZZTXFkTFVmOE9pb0NZdXAtZXdtYjdjLXlCY3EwZkpEQUxfLVZ4WGFWQnBtc2I3S0hRbktoN3QyOXdIUEdtQ2ppTzVaWVFDNnRFeGE4cmRHTS0yRnY0R2RlMzBYMnZTanpKQWRZTmdsNVUxeGhoOGpHQTM0bGlrYmp1OEtYRF9wa0w3OXFjS09TVnRManBCVmhnYTJzejBJcXZyVjdIVUVoN1FkQnBxUmdtMU1fcjVmeW1IWjNSMmZFejh2TGFsYUQ5RUx3emJfOFY4WGRoek4zRUpYajVELXNYZklueV9ubWd3TXpWZUN2Yy12eG9qc3lJWlo0OUZTM1NIRDhvUzFjT2RZbXlJN0pWZ1NZcGJDWEtubDhEVTBXYUZYNVY0MUgxZmNsSnU4VmdBMlV5Y3VUaEhvZHZFVTNhWi14dXVKZW9la184MGFUVnR6alZsQlpVZERyZkxqUTZzZjBlMVdPOHhpemVLSzMyVzhMd2tHYlpFclg3MDduNy1KOFRMN21Cc2RaNlZ0TXlrdDZPcHBEV1E5TEpGNWtfQXdTTjluYnRBNW9yNWVEaE5QSXJTVnFUX3BsNHZJeDVkd2RGRVpvNEZIU2h5TElVbVNwaHQ4ejVvTXVKZENfN1RYa1hTVWJOWG9FeHN0U21rdDBlVEMxUk82NVFJeHlKWWZvc05kMHB4QjlrcWJ3clVRRUFuR00zZUxLN20zd2c1aXN2X1FaSHpEVm5XN01BN1pjQkNDYkFNejM4WVczdlBnRUxTMWtvdjlrVWhCZUdXbGIzajEwdnY1N1o1WHZabzZMMW01N0RsLURfcVRNR0NZdGtNRXlWNldZSHJVZ3RHNGdoSzd2c0k1NHYyMzlzYmtvaThJVjZYemN5dUZKOXpvX2lER0dFV0RXM2ZualctT1NPdFlEMnAxR01nSHFYTzVvUzhxNHFNQWw1MHBZTWlKSU1rZE54NUxsN2JKOWVzQkZsdXV5cnp1UVJWZ1BaSUVMSnRfSDdCYV9lMktpRXQ0WXRSX0NPeEhldlgzdDFjaGJ2NVpmaWUwMzJmN3dZVE51UFZabE9lbjN1X1RZdUctOElqSENYZ0Iyb3JFN2FKR1NLbXM2MzRRcDVMVWlBemZUY1g3U3c0S00wQ01GalU0YUhTTVh3QnZIVXM5ajA3S3l1XzRWdU51d1RhZDRqbG1mZ3pfbHJSdWxPQllnWGJrZzB6Sm9JSGNCSEhpWk9CSEZ6ejMxZ1NSazZfM3dYRDFRMlcyY0JQVVVpdFpkRV9XZ1RydzdmaGtHUTlyaUVJQmhLTnBDOFZ5T3BVSzVORmt0TEFEemVTaEYwOXEtcHBPck5IOFVBRk1JRTgxWW5kMlp3N1h6ZDhPRTBmNzFPMmNOVDhSUlA0TlJCMXBNY1YxODFIZ3B1ZGJZYWt2cmVSRW54a2YxRjYtN3ZjUjFjUFA5R3dCR25hZU9YZks0ZDY2Z3A2WXZMdFZLeWxySzZueEdEZTNXUFNKdVp4aUloeWFFRTFXaXJoZkV6MmJUVER3T0wtcDY0UUowa2FEdHFOczhpNjNRbXJraTRQamMtdG5JaTdVRWtJYUFMY2ZwY1pnN29lRG1kWkRUbFpUenNkdjh1Rm1sN00wRFU1Qi1IZ2FxTkxnSHVhRlRwT0gwMjgwNTNoVm1fbklOaHNqOU1ua2x6WDZ6SEdRcWZCbTFGQlAxeHlhU1VMSVZPRzFUTWM4NG9RZnJ4YlJRQlR5eEU0UkEzc0ZDUk5oQWRadHJpV1Z5ZGkzbFVZS2dyOFhSWXNZSEpXaU1QWVpMVU8xemtDRmtJY2N0a1lzM1JQMmpodDAxQlR4X0xaVlhLZk5FMTFoRnBhRWFzUGhKUzJyT09aRnZXVmtuVFBRQ1RwVnZrb0kwUzNNZEgwX2I2djNxSGpHTmloM0RZTEdZVzhmN0F6YnI2NjZHYlVPa0ZEQUhDWVZLbXdvdzNSUTVlbjJMbmtZem1GQWNzSGI3NDdDaFVGNTRwS3ZxR1J0c1pyTFR1S1dtZWpPa2FzN3pTSlpXdllsWDc4bi1LZHU3a00tc291aFhBVVRmX2Y0RW5NNXBGcFBLUWthZy1QQ2l1SnBZRnJMMFY0OUVTY2ZQQURtYjR2Mzd5bEhkVzFKckdtUFkxaVFBZzRmQUZCOENnVXRzT0dyc1FmMk54Yy1EeGY4WjRlMk85R19iX3pKTXBRdkoySXZTRmpGLUg2cHVjTTFkNWc1WlJta2tObFJMd1JVU2hTa19wcm9QeVFrU2ZMSUY1STRzTXdlekZVZm9GelJjaC1TdFprcFlxVWtKRHBaOWtPZUZfV05jWFJ0Sk8yMGUzbXJuVkJRUGdJc3pwc3dRLVRvWGhpcGR4YVJLYjkyNHpnRlVFa0tvTF95eGs0WWt0am9EdDVGVllHVFlmcGFPSGRBUmo2Uk9jR05FVzE1eXVOck05YjVCakl1S3lJbGpfenRqLUZyMnF1NHRaT2FpWVl2eVFpcXk5N3JiYTJXa0RxZGVwb1BDUWF1dTFPck9pbUMxSXc1TGQzU1hGTDdSb3FEVTBaYjFWTFVKR3Q4eHpySld4dkVJNUM2TlE1N0cxdHNGaGtxa0FDOE9qcUY3Y1ZudzczVFFLTmtLQ3Q2dkRsaDJqZVRlUGV6cVBXUGhwNngxME56UkdHRC15eldXeExPNmtSX0VDN1VzT1l4WkZwd3plTE5lZkdkRnYtVUpKanF4b29hcU9WSUliczRpV2RyYldpTWRoSmNXV1hEZ3ZETlloV2dvekdIRjgtSjM3a0o1UW1oN1o0enlmY0dBaHNJYTZ6eHg2UlRGaC14bUtqUHV6WUc5UzFoZjNUNVJoR1RHS0lpdS1melRYX1U3Qmo1TnEtUUZWOURjQ2FXY0lGUGFIVHpTV256V0FMajhZY2pkVElaSWVJMVdQWG5XOUtzdkdLbExlRW5IVDFrYmhFenhGQi1UbnBvNlF1TV9CU0QtLXdmS2JWc0hpcVNfQlRqQ3dISXJkU2RJdFpSa2FsQmo4WUpDVHlJSDRkdmNEdHJFWmc2RUN6Rm9oZ0ZUejZibG45MER4V2JHeHoxbFFqQnBfY2Z2cHczWlM0VlpfWUNsNFZSWTJBR2xpTTV4WlNrOWFFQ3IwekdNV2RFV3RrU3R3T1RYMEVqSFgya3FkRXp1LWlfWXVQOVhSX1RnbkZtMDYxRXp2UFFBc1lqbVp4bXVJMXNCUndfeDZPZkF2SDhLcXBIODBvRWFGbTNrYjZIaDJCZlRucXBJOS1sR2RVdFh3LWJrVmw3TFg4dkNvT210Z3VuRTcxRlVGVm1KVEQ1VFJoVndGdjJObHVITk53bzVMejl0UlRDX0ZYRVNacDk5T2x2TjQxNEowUDloXzJmSjNpeGE3Nm5oSW1zZzhqUEtwUl9ndEtPVkVQX09WNktMLV9kZEFERU0yX3llb0htQ1NOa1NKWWJ5RXVnOEZrZFNLSmlOTEMyV05QSjdpSmdsMU1rTG1oV2x1ZS1wWHpwNU9jZHU4TVNKZ3dNY0dwZzhHcE1LZkR6QkhsRjc0LUgyakJxMmNYY21icDRGMDVuenA5OGhLSVhDUkpjUXVFVGd3Wll0S09zVW1tUU05MXgxUjBrUjRjMHNXNklHbjNFOHlGTDJIMFlZa1JPeVRXVEJBZ2tUWm1RX3huMUJXWmpqV0hJaVNnU3JkWnFBNFFkZ2VwYjZkX3B4eU84cm1JeUJxOE9vMFFkMFJQSjZJX2hYSkNqTjQ1RVVJM0Z3RnpkOElzaldpbkRhRHoyaXpXRG5DWncyTlEyQUZ5RldoRHVFUTNaWEw1VUp0ZmNQemg2QTZCSHhmbmkySnBlai13NTdFOEVnQzUyOHpDRXp5ZkxrbzZ3V3Q0Y0owWXU5UVNmTmt5dk11NjExWTRvTGtnMW1sWXZ3OFlXS2kzNGl4azQ1ZDhzZEMySHM3QkpZMkNoQ0ZGb0pKWW5IUUg2N3ZKUmV3d0tuTnpBVUFoeHZ4MFlyTTdNcXpwd3Z6RHNjX2ZLcDVicksydzVRajNlNnpIQWZyRUhfNjVMOTg0cDM5cDhVcG1XeDhvX3g4Ym85UjVXeWZLTnp4T2p5LWNPNDdYVDdFVTJfYTFnc0pQWWg4eVVHSFl6STlBdTF4M3hBLXZHN1pwLWdYWTlUeW4xdEVCOEtpdWdiaTduYmh0cVZwbENIeS1HdkFXTWtNQ2pWUkMzS0hvUW5hangtc3VmTWtzdjRNbXFfRi1xOVhGNUVYZ0V0RlQ3RFpYMWVXSC1KbmV1YTJfd3Vwc0lJREdnS21jbnV6YXBvZ3hSTHdodXRHTGZfV3JYMXVIbGZiTWxsQm1WMmI4eTRNbnJ6TUppTUw2VnR6YTBQcmgyMlpUSVFhT0l0TF9nSTQzYlY5cTFja3VnOV8wTmMtTVdhVmhsTkY3MFk2Rm9rRDB2cWpvc0Y4elZwQzZKVU9IbWc5djV0QnJNUHZWRTlOWjc0S2ZVZHk0bFdoalBjZkFOMkFFcGFsZmlrcDNaUDhzVi1Xa3JCX3ozSlQ2N25yck1WRG4zTXVoSzZUcDhtd2NoZy1NcDAxenJIQ0FFcGpac2RIbjQ4dG0tSUVWS2huVHFSSkRrU1VDd2xEQmVnVTYtdDFDd0NSTHpkR0x1Q2tudkVHcUJEd21qZ2xndXRuZ3NnZG50MmxrbjRiOXB1YW1yaF9RMm50ODIwNHJ1dkJ3Q3NzNnRkUmpMdm50SkRGNXVSTHZvamhXdGRQWXZ5M2dZUkFPNmVLSXZpblJEX0pFSmU4SnYyUlgydUhtOEFaS0M5anE4Q3pHbTBuNUtQSnRoQ1ZMZTE5TkpRMzJQZEEteUh6UFMtTWNQVEF6REh4Wk5mSTEtWmRvTWtreGs2YnFiUUNFSU5haDdBeTlDcTVrcDQwWmZmcTJ3UERqSFNzNTN3OUlOczdiY1VPVE9uWGZ6dEY0U0wybjN0Nm5wZEV5ejVuTUtiSjNqbTcwaFV2VDdqeThmeGwzdi1nb2p5bjdyRG1XYkJwdEkyYWc5bWlFSDI2eFc1SHZPajAxMGZ1eHRIUUtWaHd0NjNoWEd1TWdVUUdCb0VKVzg4dzlKOC0yR0lCSVhLWnh1SXRBOThrUE00WWtOOXdPNTBUOEl1NkM3d2RIVGtqbHZoR09YT0RUX0Y2cm9fVTV5QWFzc3VNNGxmT3c5NE5WbXVfQWNxODg0MEliVXNwWXRYOC0tUmZGNEEtVkdSR004cnlNOC1naC1nLVJCeHhaTkRoNnhtV3pEQ3dfZzZiaGZ0VTlqQ2tEMTlNUDRfOWtaM3lVb1p6ZkZnOTE2VlhDU0xTZDEtRlF6R2NSYThHM2xNWWlLSHJLLVVVS09FNmFDLWg2ZGVXNXVzWWZNQkhzNS1BazRJcTRQOWY2RUEwVkMyYzhZdUxLMHM0VnJZUzFQWTVBMGVmcy1vbjZZTHJGOUlCQ3hrQmlPci13ZXJRLUZya0JtM05QVGwzb3htRllZdUdwLTJNV2FXbFYyeTJMRXJxenNvNjVBSFV6NERNYUlXaDJVR1ZHS2VEdmxucHQtaWxxUVJQNmNBWXVINGpWUnc2UmYtaXR6VGl4YUdNUElQVUZYaDh4V2xKQ3F3Nld6bV82VGt2eGd3MEhuYVlWd1lQRVBvamVwckZGWW5RSERJakgwZk1VdXFiZHU1Nk9Hb2RJbkR2SEs1cjcxN05JejlaWElKNkFMamNFdEUtbklDMUZWcjQwbzVfTWo4Uk1wMTdIa1hHQjQ5MWRCU0N1U2YxTUtHTnZPUUdFbWNsUGhvcVc4cEJBQnZaR25Cb21aUFJBNkt2VTl5ak0xSUVjckd1eW1oWVFBSkszMTNVNDJVZHI4aG1SSlZ6dWs0Nk1XV3NIZTZaampvbmFWSDhIb3dxLWdOYUdwNnJDTDZkTzFvc2NyRzV2dFdDUERwUXlLd0pfOVJQcmhhNFUzM1BtUjVOZ2dVM240dENlS3BaRXVMb0VkSEloTHBweEpFVENpOG1ZREJWQk1reTM3cDE0MENQcUh5d1RSWTVTTjdULWVsRXptQV90NVpKbzlYWUJpVVMwUUZzbGNSMXRuN3lLVU5tTUFoWUFlMkJPQWVSNlNLQS1IVlY0dGpCME45NFFlVU9YRHFYWmw1NlkwcjJ1MFR5MUtnNVlPMnhNb0w2ZVlHWEN6M19YRG5GVUdyNnBMLTl0S3NrYzRtMFBHWDBULUJVd0dBQ2NfYmV4OVg4dDc1MjlWSU1BUTRxM1NXVHZYMVZRc0JQN21BaFpJSElEVHc5M0JaQThPX0R3anJ3WUFXdVRYelh3UlVOUEpRdi1xMFRQdm9HMnk0ZGtpUWZ0Ql84MnMxQ19KaXpXNHd6SHl1cnNRUXIxazNneWFWd2ptUHJ0VExIRXotNVlTQlpNemQtZ2g4SG5ybWpBUXpQWU8wMFlPVVI5M01DWUpnTGRsU29VMFRGUE1nWHZqUnhDT01lcnpfblUwbllCOTZXRE5QZ3JVUlBaQXY2cS1VUFJiekg3ZlRENHFEc3NhVmctczI4NGthOFZRQnVxQTFrQlBIa0lPeVhiRjhETC1aVFRDczZiTkZFWVZ0NTdDZnRHSE9fR1AyRUhKSk9LMjluVWRJMGk4Q3IwSE1mdVJDOVhmYVdUVmpxN0pMa0R5SVB3X0pxTEVnMl9qTVM3dlJMUzYzUkJsSWg3Zks2ZF85MkkzRXItUFh3eFdfVTRNUG9vbW1EaDdSSDNoamVNZUlLQlE4WG9QV2Zubk94elZiczY1V0lQb1NuRzFhS1pKaWtJb09CRjRta1FuY2xTMEpvYUJXcXVpR3NBVGNvc2NkWDBudkVBQWMta0RZRG44NTl0aGQtTmRHZ0pTNm9jcF9zRGVrb0FDQmJTaXlVS24tVTd0ODNNWGNORHAyOXVfZ3NCMW9tbjdfS2lzekFDVzBJS0hIaEFzR3ZmWkM5bzRudW5VSFNPcERRa0JRWnZmWGVGMzBVdUJOLURkN3BHMllaODBaNjItM3YxajVDYVJRS2FQRi14NTRlZ1hBbmdIU21KSnBLVGVXSEk0YW5vc3Fuel9OT3lSMzFDaURmcUVXZWItbjZVSi1IOFAzQ3VmM2hsb3hLOW0zMnR1eFdndjZSWm1YWnVlOS1sTWxYeTRlbUVFMzd0dkZjeHR4RDY3eUFpQVZjTzYzMU9TeFVoTGE4bHZLVEhuLTJENm03MUNSQzdFdDZid09ZeDBvNTd1MHVBNG9KVjhZdlVEeE15YjBVaUJFNklRdDh4ei02R0lhNURaUWxFZnlYeFBpQ2ZpY1dfWnBfZmdoQWtzd2UtOVBkMmNuTWd1VlM0Nk1sejYtT2o2aXFCRDhsWC1EMjlpYVhzazkwQkJUdjJ3MXQxUklGeHlETXp3XzhKYzdmV2w0Zl9TWGNGenR4VDZKQWE1ZU9KX1E5YlpROTVmNW5GVFE1aU5CQjNIYmFIS2FPWmJxcVBmM0x4R3RKbEREZDBpTF9udkx5WEY1b1kydWVKajc2RVVtcE11dWI2STI1WjNkeTNIcFhGSTRhSWs1X0g3bjlPMzZHSmExNTF5cU9UMXhyVVlEemNpOVBnSmkzdjlaMWpCLWlZbHdNMDRqYUVuTGhjM25yN3FFUjhGMFYyUWFpcUxXdDdUak16aFpnT2VQRWZnMTBaSFBKa2hYbFNELTFxSU9uM2h5cGM0VENTck5JcnJkLU9OclAxUjFBc1VURGNRSHJfY1pocXh6ZmstdURacjNiX09XRTFfLTdZZ3R4eUJsOGpYMkZtalVyRlZIdVF0eDVyb0lWRFdsLmVOd2tVV0Vnb0FsWjM2Ti1BY3hGREE\"}" - } + "Date" : "Thu, 24 Oct 2019 03:47:15 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "11806", + "x-ms-request-id" : "480d02bb-72fe-4194-987d-2c898aa8049e", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"value\":\"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmJrWVRxOHBEWThtd29rbE5Sb1RudWtJNzJUYko3UDJtYXNCUXRidVgxOHpKZU5fWGJfakZhR2RkQUdvLUIzOXctc3V1T1ZaaVZHZk12bm55YjRiUVUxdTFxejZjUmlyQlB5UnNjZGlLT3pEVmowWV9UTlI5Skl0N1MwR2pRQmE2eURCbVJ5LWR1cU90MnNiSEZiMXBVVFJWNjZpM2VxOHp1VWR3eHJsb0doZUkxLTk4VzR3dGNEc2s1TmZJSDl2WlJKSFVaaDhLLUpabWtxUnAxR2kxaEZVUkVPUUJqdFZHSnBVMGZfb3VqV3lRUzlnbVF3OGFoZjNNckNfZUhCZ2IzOWNpeDZWTXh2YnFKM1RKYnp3VkZ1OElpSXUwdE1vcmg3TUhILXZ2TDNTVjdiTmtENmpsRmZtYjc3WFNaSndrYmQxZ0tiRy1sRl9DMG5EeWY3SlBYQS5YTHFvSTE3eEJuaDNaNzJ3WHZwdjFRLnJNVGIwTXN5NFVXQmhXUndkem44TXE4RW1DaFU5TXQ4TTFnbHJtemdXY0FPajVwaHZoSkhLa0I5VW0xRTFtQ1hwX01GQXZQVmJJTkxsVlJDRkFEV0VfMUJDSDVnUGdaZFlDNGVZUTg3bnEwOGc0NkljZUstYldkU1FoM2RDb3djUGQ1bjYwSms2SG9OVjZJY25FM2NWbC1GYTNGRDBxMG1qck11dENITkFrUUtMZFNNM19OSlN2UTlrVklVcHpkVWJFelJiQS1scFV6MGF1eDBLc3NUbFlmVklMU3hnSVNZbUZaWV9PNmd4ejJuLXhudTNScmdqQ3VFOE8wUXNoTEFmcU9paG5TOWhtRHExVGNLWDdVVFhuWU90NTVqWHMycjZyVk9sTUtpNWFISW9QOHJQMm5VQnQ1dGRYaDdLTi13cXg0bk5rS3UwU2hYQ0w3MEloeHgzREZPSnpMb2d3LWNaR3FOMU9YYzdXLUFNNk5PbjJMemwyTmJTMWMzdjE5b1E1a3ZuOWhuNlJlcFF4XzdkV1Foakp3VS1kNURBUjlrbmpQaXZWN0NEZG10QWlHSlduMWpucDBZMHFocmVrd1FURUROZl9qeUk1R0NqRXhrYUlGclpkM0VDUXZuUG9oVWg5VDRuX0dqRTNFLXNYdW5jYTRKa1J5bHZwd3RwTmZqN3RnTXFILVlKeHQ0WTVhWk0wRFM2YW9UYXRSMmtQWGkxRDZVeE1HSmRTUnBudkw5MWRXRTN5MUljWHFmY01fUHRDRk9kODJUblBHMU9qbUNlOUwwMnhVS1MzakZJY3RVMVo0UDF1MDBDN2lJRC1oamVDS090SkVPbHR3eHRibWQ2T3pQSGhKajRrVklUN29qejN0NklzQXEzeWRVeVdkN01VUTZWTU5fQXIwdUt6clBoS1g1TnhqcmlYZGJKb0tZQm1kdVhqNUZmbkk2aW9IQjdUX0tTNUVBQ0FGMkdYVFZyaFVNX05GSVhhcmxaWkJzTmg3ZFU3SnR0Y0s5NUI4aGc2SWo3QVpiV2x2MEN5VmpUazNEZTZQdmZob1dTYjg0TTdyZ2M3ODl1a2hPU0hNalE3MENOaTF0Z0I2WWM0U2lfUEdOaTlZX19ZRmY3S1F5eUVzUDljMFVFYURQQW51cEpvaGk4Zjc3VDVRSjFIS2JIRjBqZFpwRVpwelFfM1JPZnNPQlA4Vk5EMkczaVNZS0FtV3poMU5zVVhlZUVkM1BaMGZ0QXNrZVpZV21OZ2ZKaUVJSFJnM2t2dE5BOU1uai1LWlRZUDJPU05zTzJDdDVFSmhwd243NzNpQ1lBcURLTnRGSWI0clJnTVI4YmdzSlI3RHhJZ3k3aVZMbFlpUlVGVjFsQ3NTYVNHaUZQQUc5TTJDUlNmX1lXaVgtZU8yS2stWnRLNjl5TjM4VkFZbzBzQ1AxUlNhWm1LSHI1NDg4Q2tzbGJEc0xkOWM1VVJjaUdYS3lfeGRGaUVwaGtWM2Vmc2h5ZXBjRHZzenp4UWV3elJiZUxHN0lWSmtZSWgtT2VUYUs5dFpUYkZqTEo4dEpUS2tzbTVZc3JsOW9QSER2NlpNUEVEcVdMa2FEMXNyUHVtTmlpeG9rclY4WGZNcHFtYV9qMElPOUlHZG9QTWFiZVY4endXYnVQOG9DUjBYSVpTazZQVE9nV0VvTFQ1Q29MYm9pMXVYX281ZUQwVGlXRTYzMHZmMjhtMUItUkxiSzhEbVhSQVVrRlhueVBIdEhYYkQ2WmFHTTIzcG05R19WUmt2NTE3X0dEb2NyZEZnTzNvVWVFWkFEVUNqcDRTOGgzS0F4OGJOWHpkRVoyRGVFSGFyYm8zQnc5cFhNcEdJWWVTVjNuYzhSNGQzMGY5WjJyNkUtZ25saktpOElzeWdickxZUkc1VElUQXJyakxudnpuU21FQmNCMjFIUXh3bDVLQXRzNC1jelpISVdkZjZ1TzdyRDltN2VnM3I2Ql9pQ0NSRHQ0c0ZSazFhM3FDNWE4R3VzRHRUR2NjUGFVWVp1OURrQ241aGN4dk83NWVzQnNpb1VrRmFPMGdtNl9pdktSRnFsUHhNYVRVSkQ1UW0zb2U2QWdqa1VOY1FlVnktUGNrb2l3MmVaY21jcXg4V0gxaUh2V21nc3F2QndER3dfaURGbEJDRE9MZktlMzgyb1FGb1JPV09nZGREeEIydFhmb0kxX3RQd2g3WktFeEpIQ2lkMkROb3N0bEhjSEhNR1JwdWpfNVo0Nk4tMUZDMUdmSFFOSXlPajhmdkJVOWoycXFrNGt1R2hnYnJUempTV21LYjFLcVBCMDNKNEsxemdzaUZDdE9RM0NpaWJGZFZNYThMWkFKcW9acGdINEx6Wm5SSk9HeVctYXQwOUZKc2Z1SzdmZFBUc1ppQmpqRUM2TnlVSEcxaHNBMWN0VS1vWVRlVUJtcGZNS0Q3TDltU0Z0WWw0Q2hMYjhPZXRwSWNaY0o2Wi1pX0Z1VmhfQ1o5V0JrY0w4ZFpldzJRdnVwRkVZc2pXenZuMUw1NERhTTRzc3FrR09SMmFYUFZGQURKcktVLTZkRzcxdWNzdFdud29iTWliT2s0bUltZ0NYWEFKOGNTbjVWZW9mLVk0WDVIVnNGYW9IT1pCTEtoUjFwNXdYNEpZcFRlZk5rN2l0TVVrUEVhSUtRYzJJSlZqbW0xUjhVTlBTUThPdHBtcWRrOWN2cW5PZk1KVDZ1Zm1uTkVqdXV6WmFkbjBpdlIyVEZMbnZhcDFmNzN2ZWROSXZGUTlkQndvUVJsTlVrenhhb1VTbzBFa3VYY1NTc0Q5eGhMbzNiOFg1bEsxNEJhSUdKQ2RRZlpBNXhsbUJGaWYwa0czeE9lOWtOelQ5QUV4UC1xRjdfSzdkZHBXNG0wUXJCZ3lXTkcwbkRWVDI3SXh2R1dXTVB5VjhhUXhiVU1HVW9IY0J6cmZVQWp3d0x5R3cwazJCVDlMemFlQ1oyRHl2dWZRekFORHZVYzgzUENfZmI1ejVmU2MyV2llVHhuM2dfNTBQa0hFN2pULTgwSnBFWWRMYnFEeE41ZElPUEdjRDZsVS1vaU1nNU9pY2xlSXZTYXdna0NyUm1wREc1bzFlUkRkVUswaFFfVkJfVFpuY0kycXJib0FETTVPR1djU3doRnRlMVJtX2NjenY1TlJvSGd1NmdScnZiQ2tQR0YwUDhLa2Z6V1hIeWRld29ORk8yTlZpV2hTaFVnYnNwWDZHYm53VlBwemlfRFdscXZkZ0FaZXJ0aWNWYmdTRGJleUhpYW9xcXhISVZJX0U4UFdEcmhIaGdQTzRwOU8xZFFtaEVYUzVlQnpQYnRNbGlFZVhWYzdYUGxEUzRGUTVWT3Bpb2dEbmRfdTBTdFdpbUxueUJ3bmg5YW8xZlBYMWFWX0dFME5IQWhlUGI4VE1QYXZ4VFZjcmJBQTVYYnN4MXJiOTZvbm9jMkJxcEN2aUNkNW93b1A5NTB2QTRLb1o5MGU5WjZxeWpUVVVtU2o2QTluS0FsdDlIZlFOMEZWeFJza291eVkzeUJlRUs1NVd1QnlKbmlLdGswV3hfY0RnT2Ezdnc2RmxFcXhCZDU4VTcyMXN2Z0xiSEZVSFc3Vlp2b0JsQUVWTUlMZUxuWVZ1RVhHTFo2bzQ1Qm5IWWJFVnRfQnp6RFF0RVAyZ2xsVzNkU3pjZDlxVkdzX1Voc2wxUE0xc1FxN18taDhqQnVsVkFqbkVNb2lXckRQaU9VN2t3cDdaeHJ4T2pfSDZhc04xYVB5akxXLUZPdGw2WHRxRkJzZTBWakZoTF9LaEJ3ZEk5MFlaR0hsWGNmMld1em96RGpNZnBmbjZsNUJrSWdZTy00VUM2MGplZGxGT3VQRWZkRF9DeXRUbG92eFVlelNiV0lwTGFGa2hiWEtSU2xueG5iT2p2cnc3cDZqd3BNZk5JdDA3UkZOWEt0ZEZGM242ZjZIWmxRT1JnaDJ6RXhZeGozajdkYlpPT3RxQjl0R096ZmRzWkN6U3FVNC13VjkwU3ltaVF0QXl5NXVrX0EyaDBFNTNCQUhvNFFpSFR1Qk1rOXRUTE5IUk1DMFhvSGdKYjZXWGhCUE45OEQ5MGwzd1p3UFMtSDJNZE9IZEVsNzdGSUFCeXM0Q1V6eFBzVXk0a3Q3QlBIRUluZkRzUXF6UEd3WEVVNDZfY2c1RGFDMnBYQ0Jud1FpdGJJMHdLM2ZtdDIxaTFPY1VaUjhxNnJ5SjhBZ25pLW5tZ1J6bnhEOTF5c0VDYXRqMlBSV3VpZUJIQ2lLUEZodVdEbVZ0ZXpDUkRvd1RYaFBYakJlTlJaajkyZzZPYm5rd3dDY3NydE1qZ2JEOUlyMkRJZEc2LVhHeVZ1Rk1HQXBKZlZmZWpGbzJ2SURmMV9YcmJBSExUeVprQXMxbTllbGZ3QURtb3FVWTJIcGhoQkk5WXpIZzlkaVl5Nk1EYkN6WldhWHJqV0R6MkRONWIzaTNWbGE5SFdFSHJ5ZmJBUm4tT1ROYVdJX19Wb3dUakxOaWlGTnFyakxId1FGUlc3empVMmMwN01MRWVmaHhDc2tWd1VwZzJVVF8yclZqNTlPQ0Ftck9vblkxZmh4a1pIMjl6N2FoeUUtdGZQWFJQelZHSVZnUHVxb0NjN2ZDMldwcWF6ZGVLa3l6UExWMklnbDdNR2RCTEViZHNOVU9FeWhEeHAzNHVRRTJpQ1M0YjRoRVUzOW1YLW0tdUxOdzZjMEI2UmxZZGUwVVVSRlNTelRhRjNEVVFsX0oxcVJROTVzYVQ3akRhNjYyS2RMVEFMNlI5V2tDR2pHUGJrN1BidlNnSDNGN0VCRS1raHZrQTlCODZGVU44ZW9QLXI0V1pyV3h0bFBBVEhtdWRjZGFtdEpvaDBvNk53a3I3a2V4R0ZYUHo2TVRWQXh2WDUyNUtnUktndG8zMjZWRkFiOWNPSEFGQ3pvTXhUVzlRTGpDaDlBeHNsWEdIYnR2enR6a3lqR2QzZmIydEdWZi1mYmZPSmQxclN5dkhKdEhTRkJXYmxNVWdCd09nS2R2Z0lVRzJvYU9NMmZIaXc0Sl9oZHhhUFlzZG5QZUZqMTZHOG1sM29lSWdmbzFERUhldnNJWHlGcXRNWlF5U2Jld1ZZY1YycDBQbFE2Q1IwbnM3OGdSWVBleUhmNjhQd05PM3lhbDU3ZDFOaHBmQUtnQ3lOZEhJMzVVM3l4eHpOY29fVEFUUVE1TFJmMUJJY3NSVUhLWkZYVldreW9FeTJXZDI1TE9QcEhwX0tCSWQ2TVpUMmJCSVdZWktQNXhMQ3VKekxHWEhPRU5ybWs2eTNMdUlEa3V5NndEdzVWU1ZXUDlXOXROWWp3azNaSzBfbXNyUExPN205WGFRTTVtWjVsSVEwbXBneTduVmNVRUVSMFg5RDRrUVMzUGFVcTBLUl9nWXpWY2pHSlhxeHRhOEpleUpuOUptUk9FWGNVSVR5UHdEVDA1b1dLMkcySVBCTEpQdXpScWx1UW1JNXpsc3dIaDl1RzJScWlpRHBfV01NaFlFaF9pWkRUWU5YTzZJRUE5WjM0T19sQ0lTR1h5ZlFhd1Nnc1JsMi00dUhIWDBXeUFOWmk4Uk9abjBDbFdtNlV5ZkpsYjVId0pmeVJrS0ViQWZGLXVXQnVtS3Rhcm1zbFZCb1UyaHhGam40TUhHYVI3eHdOXzBBYXFhb3AxVTN2UmRYX0cycW1aTjluM2h1MWhqZ1JPd3N0d3VCVnI2TlZNa2puaDNXbERKMzNHcklYTERQTEtuTy1pbnpfeWZnaVdMRVBOUzFmeEs1TGZGdktyaWpTeFpEUm5Xa1NZQ0drTnNPVDZMSE02RGxlREtObl9VcWl4RFJ2N0F3QXVwY2o1aUZUN2lVbE1reFFyMGt1WWZMYjJlVDN2TUl3a21WMTV4bHpmeVQ2S1hIUF9Ic0VPZ2FSVk93V21XM0s2NHBzS2tIckFkMFRUeWIyVmF6dDFLWFJ2R1NDb0hpNms2SEMxc2pkVVpYbkRaTjJvQXNFLS1iNm5ZRW5wMzEwc2NnU0xVblVGakp3UjN6UzRDZlhZQl81eFFjVnZ0RGxyNEhlcGppcC1lTEUtV0YtRXMyYTg4OTJ2RnlTTGNLZUFxeW9xRlhoWjA3eUxCb055enJ4QUVLYTdiZDk5b1p1VG9iLWFoVkpxYW11Q21fSndxLXh4UFYxd0FhekJ4UXNSQlVwcU1wdGxnYnNSaVdacXQyNWxJMTNNQmpxR0RCd2Y1b3pnWGJURTRHejNBOTJTa2JUZzBjc3hBTDE4cTFSVXo3Zm5IX20tdm9tZS1wSU9FX0M2U3Vtb0IwdVhJMXBqVVBZUS13VDl3SWtsVmk4c045MFVldnVLa29tZTd2RmF2ZXhxbmYybEJHOEZibWFqRHVnRzBZR2NjZWc3cGRLNi1ORmxVSWQwaWVVc2k1UDJ1M0lqQktyVGxsTk5heXlVOFRtWFVKR3BWOTgzNjlNQWlVUU1ldjdSVzloU09GQjlnQ0VKSHpRNmxxN0t4QTNwWEtOTHVrQWZPT3JYakV5cnFxLWZkeGxrUHQ0Q0VVVnotY0N5WXJibVBraTN0V0V2bEVvVGttVmJBSXhGa1JQRGVQWkc4SHI1MVB2emEtX0Q2R1JSVXcyeEVCTmlSOTY3b2JQSXhwWVBOOWZjREtyOURucE1HN0RuNWpUckRVYUFLeV9XVUlGUllTRmxDMXBfYWlSOXE4WE01eHgwbkpOVnpEb0NQb1Qyd2hnMTIzRFJhcnMwbDJOaXFha0pIUWhCUjFKb00xRlB1a0U5SE42bWhSY1doRkZ1NGhOdzRjMW94ckdpZmFWRzBrR2NWSldmUkF2QURMR3ppTEg0REZYT0JkN05DeEd3Y0laWTVNTnQ5Wmkwd1haTGpEUEZtY2VPQUJySWNfaEI5TmY0aXZjbXpUdjhOem1lT1NMRkUzVzFLa2htSm82UkhLZVFzY0xDLUNrRmxQZEFpQ0RFN2FnUU56VC15bFlRdU9Xd2hVdjNTMk01dHh3bGNqaDI1V1N4WHhLN3NLaWhsRURvY3dOallTOFpBMUNwM1ZTX2JOdnFsM21OTjNCNm1JYnNRME1VU3Q2REg2TzFXV0tOd0txRWRFc2ZnNU1sbVhwU2plNVNVaTl3czBRemJUX09Ha1dQejZJdmN2V3BINFFEYUU3OERPbmZsSTJmbWJ2c2Y1RElSWFpNeUFzem5sd3JOQXVKeTFTTllqUmhkRlZjWEktd2NwdllYRUxUVk0ycFR2T2Z6R1pRT01KMW1xY1RjZnBrVTZmV0FXYXBHRmFncVpwVkFVMG1KLVd1dVRUU1BiQ0hJTllkSHcwY1FHcXpzM2NSU0l1NzlIVFppRzFEUkcyZS1iM1lCNjhzbmYzRjY3MWFsem01RHV4SVJRZ3duSkg3MDhCTXd6MG1wVHBKREp4a3dyaC1WSjhNcjVOenYyb09LcUJQRXBLcm52S3NMM0I3T2NvTG5XUmxLTlFoODVhcGltcW1JOERNcXJtNkdRdkRBNHNOblRWdHZxWk41OTc4a2dRM0VnSzJrTDZWTXVuZTVuTy0xNHkxeTBwbHB3WVBRTkJmVmNfZXZtc2Q1bllTdFdsODUzNkt5Wk5SVzdYTDFVdG42N0NVcmxaSXA5aXlBT1c3LWJzMThBLVBOcDI1bjVfTGE4UVlfcy1NUHd0cnFDR25ZLUpoY0dZV1dmUzlCaDFIV1RnSFp1eXJYdi1uR2pKUlgzRHpYcldzbmxtb3NhbERPRXNyQjQyQldMS3k5M3JvVVN1a0l3YU1UVWNpSVVHbjVWN3Z3ZWE4SHNPSjB0N3FxSHV2N0Q4dXNqSW5RbTdpdWZpSTU1a0NJMVIxOTZDT0ZtbWtaNDI3emtud3Y2QVhRbW5aSkRpSHJ5OTAwQXJfaWdWc09rMTJzM1VRRm5yVlBJcC03ZU5jN2tEZVFjN2VYNkptVGxtdktwTFRkTWNwSUV5QzZjUDZzQXd3QjY3RjUtbkFWV2paejNKSFNkV2lSYndHQkd6RFE2VW1SVmFZU0NnVXc0SXhmd3RIQjFsLXlLY2wxaU5qQnRNMDN6eWZPNGc5eWlLcG9VOVY4NXFteDFQWHMyYkc4ZHVWUWlEV1huVE5pQ21IY2hVbGFROTFXZmo0b1JveU9Ncmh4ZTRacjVKUWx3ZVg4WXcydzVvNUNpbDJaejd0WFNhNmFURHZYcUNGSE1tUWp3MDA2di1CQy1WNTRxRHhCYXJTSXBoVHFfQkc5Z3B5N1BtSmF0QVVKNU1YcFc1X05FUWw0MWZpcnlYb2FoSno4MFFKVHM0eTRlWmx4WlNrRi1xOEFDUlM1a3dET29YeVFTcFJLUHFrTndBZjIzM3FBZ0ptaUM4b1UzWno0RGNJcWpWTHdOeFBadEhUdmtMVzA0VThRdDgtZ0pBcEJrRzc4aENVV185WWJ3eno5d1BwNk9nd21RRGV0a2kxX1Z2U2NqVm5EdlBidFNIXzF1QWJEbHIyOURHeEZ5Tlh4M3FiQldWV3EzV0s3UHlrdDRHV2QwbUxSYUdHSTBCOHpIZ0RBaGpzWFhMVW15YXJZVmdtemhoZVZuQUZ0MnNSSm5ERnNKNDlTclJuZXJmUEdybUdDXzZnSWNtUEJ1czljZFhRdnlUZS1WTlBNWGxoYzZVaERFQk9HUXAtc3M0S0ZCTkdKSWRVeHpyS1A0NzkzaEZKR2M5MHVnSlMtdklkUkFSenJuLXc5M0Vvdkt1UmVnTDZ3Nk11OHRpOXExbWJxc0Y5UGxzOGVBVEhzcFpKakhaeGtXRmxVOXBXdzVDcHZ3V2Rta1hhZmtnOVBncXpUV09hVEV1Y2NfY1ZrR0cwQXZ2clpNRzdzSzFzNC1xYlQ4dFNaMTVzTjBxMThMR1Z4Nk5xWjNiRk53REpubUNsNFlhY3dvOVpHcDJVRnRGdGRMNXBIYnpFNjk4QTMyM0Zmc1VNTXAtLXc5bV91Wlh5VVhVTUZkZ1J0OTFtUW1sXzJSdmZoMFRSZFVrLXJjV1BsbmdVckRIcEZSOEJUckRGbUNwMjhLWGNSNmppU0w5aHNCdUVsSEplU011NUNsODhHMl9feFdtdWt1RE9SMXhGc202SUdSSmZxUWhMYzdsci1IclgyVTlFWUxWQng2UXJwRHhDX3MyOHRJU3lXbllPWWw2ZmdWVHpjR0dManVRRkxmMy1ZQkFZaE9qRmktR1ZGZTk2ZHpiTG1yTVJ4Nlhxd1AzeG9hYjFzMzlidlZDVXVrVTUyYWZzQ0pkQl90M25RcHplYU4wWW1kcXlLUnFkRkdfTUI0WTdBX2ZEYVc4RW9CZEI1VEtmSDBQVXI2b0Y2eGxoTTFya0duenA3dEprNUExRERiWFhHcnV0V0ttOUpadjJHS05BcWEzVDd2Z29KTmFiaFhXYmhxeW9pNDh0LUpmQ2tCM2N1Z24zMkJNYUxHMy0xd0ZKRkJsMndyLThXT05NX2FRdWVtX1A0enJyTk5TZUlsbFI3NUp4aEJpOUR2UEw2cnZwS1lxQnFtR1ZIOUJ4ODdEcVlFdEFmeDRaNmtValJhSldiUHJyQ0xNYTNNUmRhbUtkR0NkWHBXcmtwTFkxbENNVkR1QWxiNmUyTEpscWVHdk5qMlhKTVE2bjZJRXhzS015S1RndjNPdmE2Y1loQWxQZ202b1VZbFNkVG9FNDB3aXpPempfaW9aM0ptdXpkYnVfNGRSbF9MR0FCNFFreGliZWVKMDhqUFBvcHJRMk1JRklQQWUwcVVaYlBqYUxwZkdfcm5EeXlNallSNFdwai1hNnpiQll3RDM0bjdkUE4wUkVwVEZ4a0hNYm43QkxDSHRjYXBzdEI5U2VNbnk5OTZDSDVWXzJDN2Z5TnZlTk9KZDBCT1U5SnhpUFM0aTBjV0tUTHZzb1JBTUliN0tLb3B6cVVUa2dqQmR0RldxNEx6T1BWYlBUWWxYZ1EzYm80MTRrRzF3bzlVZnBTTW16RkdMSUo4OG5XLVIwcVhBLTBqRUhwbWNQeU1UU1ZnVVljbWFtdXRRd21KeXBTbGhDUmZCbGxHNVFDS09DVmFhYm81RGlYellsMlkxaHhzLUJJTTB6QVF4U1RpbF9KVFBJWi1uZ1VzekRJY1Boa3JzNUg5Ny1Qcm9OSkhJZWxtcWNaeU1TQ2x0U0Q1UUZpVGhMdHFidGk1S25QTWZ0OVdodjItY3A1N1o5V18zNGhyRkswUDFNS3owQzRETEJlcVJSZUVwSFItSFF4cDVQaVpYM2pFa3UweENqRVJSOE5hNjRIQnFPUnNveGJVcGV0dDlJY0xFWmRuZHFsVG1kS2U2dFJfR2dMU0FldFdKdEtOU2IySXBBSUNXTHJSbm5CXzRSZHY0UmJvd1V6c2VVaTlGYWNpajdwQVI3cFg0MEFRVTluU1B2RUQwcTVrRlc3bk9TZldBMlkxTnVIcDExcnZxTnFGbzNfSDNPWi1wOXNYcUtXVEJQVWFJTUdxQWhBd19rTTdOWUhldUVhM0hCMWxaNXhxd0VGa2E2UGpzQ25jVy1ubXp6TnlUVl9RVVFwX0NpNzNFV3RVMEpMYXpGV1dLVGZLRFp0eHluTWdDTEh0VXhUOWtwUlptdUh2c0dUUXJwWmJ0eC1FZHZ3TnhfLTlHVWpkS3NkVnlCb3hIMEh5Q01TUmFTU2FxLUoyZ05kczJYQVE1NEM4X1UySklZa3k4Zl9HU1puR1VwTW90bVVGRVpZMzlIYzlOUWJSWUVNNWxReFJpbFRPLVhxTmI5Vmw1d0MzTEhUYzhqUVEyb3FWRmU2V1NvRm5MZTFDSE43OU1xeDdIbmhOWTYxb3VuOGdyLXRZcHFMVXVhZGZFQy03Q19hNXdTOG5sSDZTejE4VHRZV2hOaDNBbC1wMWE4VVlyNVEyYnhMU2Z1R3hjSzZkWjJoM1RKeFBPcW9EODBxMnpBSGZwNklBal9zZHJHT0hKUTZjNkJvejlfdDV0dFU5cXBlVzUxMFVDbTF6Y1A0ODVDOExaWWFEUzJzYjExaWRtTnpvVGU5bzRJTDQuVXVQQkN0NzQ3Z0ZEWkVvbWVSUG5Fdw\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretRestore?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/testSecretRestore?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:37 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "399", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "64fa4cfc-7d61-40d3-bd7b-be03f2657f5f", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRestore\",\"deletedDate\":1561365218,\"scheduledPurgeDate\":1569141218,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretRestore/882bfc75c2e04add915411166e1f6d7d\",\"attributes\":{\"enabled\":true,\"exp\":3483820800,\"created\":1561365210,\"updated\":1561365210,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:16 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "373", + "x-ms-request-id" : "ec470d70-983d-49ba-8f5c-101c04c76d9b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore\",\"deletedDate\":1571888836,\"scheduledPurgeDate\":1579664836,\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretRestore/cf2f7ae64caf4786ba3c70875b9441b9\",\"attributes\":{\"enabled\":true,\"exp\":3483820800,\"created\":1571888835,\"updated\":1571888835,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:17 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "96b881e6-4d54-418d-b46d-f54c2e29acb6", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:17 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "06c23675-378b-4660-ab26-4e8752033559", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:19 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "3887fbef-de91-4c51-b8cf-acdafadd4c01", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:20 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "6b5c9235-4446-40ca-8d74-c64fc4231594", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:21 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "371c5a07-e87a-4dfb-95c7-3b1bf7a9a63c", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:22 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "e6625685-518a-4a49-9bab-f164915ded12", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:37 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "d7286424-1333-4913-8230-a31e7990a3db", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:23 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "d7939f81-58fd-4951-83ab-91e4379cea8a", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:39 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "96c1bcf9-dc71-4bdf-bc06-b92aae84c769", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:24 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "b6a15db5-99e5-406b-86af-783db8ba5015", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:41 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "39804b10-dc9f-4db9-9069-b76b35ad0fcd", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:25 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "3ac23873-191c-47bb-b0d1-d51a500b2e90", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:44 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "2316b566-305f-4d89-9c7e-5bf874840263", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:26 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "72e3cfc6-9c2d-40eb-8b0f-3eaa9803ced2", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:46 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "952706a5-ba07-4c17-9310-c4b1aa396710", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:27 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "8b82e338-597c-4f60-a082-84cbac49e46b", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:48 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "327d046f-351a-4f77-a80a-bb78c69de69b", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:28 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "f8f8151c-3e87-4867-8e9d-dc5a76cdad85", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:51 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "399", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "404", + "Date" : "Thu, 24 Oct 2019 03:47:29 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "95e1002f-7a53-42d9-ba69-6f86e0f7a006", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "53143bc8-835d-41a9-9bba-394c24ebdc75", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"recoveryId\":\"https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRestore\",\"deletedDate\":1561365218,\"scheduledPurgeDate\":1569141218,\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretRestore/882bfc75c2e04add915411166e1f6d7d\",\"attributes\":{\"enabled\":true,\"exp\":3483820800,\"created\":1561365210,\"updated\":1561365210,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:30 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "373", + "x-ms-request-id" : "db0560b0-2bcc-466e-91ff-9232a2dd10ee", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"recoveryId\":\"https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore\",\"deletedDate\":1571888836,\"scheduledPurgeDate\":1579664836,\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretRestore/cf2f7ae64caf4786ba3c70875b9441b9\",\"attributes\":{\"enabled\":true,\"exp\":3483820800,\"created\":1571888835,\"updated\":1571888835,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:51 GMT", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "2867dd42-8de8-44eb-b4ea-3403276c26e4", - "x-ms-keyvault-service-version" : "1.1.0.866" - } + "Date" : "Thu, 24 Oct 2019 03:47:30 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "x-ms-request-id" : "e45b77fd-0908-4bb6-9b0d-5e0edfb84d66", + "x-ms-keyvault-service-version" : "1.1.0.879", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/deletedsecrets/testSecretRestore?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:33:51 GMT", - "content-length" : "91", - "server" : "Microsoft-IIS/10.0", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "404", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "7c9bb978-1c92-4e2b-82e4-4a977e6c6bb3", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:47:30 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "91", + "x-ms-request-id" : "d9c3ef42-f5a9-48cc-b29f-8e345b67f301", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: testSecretRestore\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "https://azure-sdk-java-key-vault.vault.azure.net/secrets/restore?api-version=7.0", + "Uri" : "https://cameravault.vault.azure.net/secrets/restore?api-version=7.0", "Headers" : { - "User-Agent" : "azsdk-java-Azure-Keyvault/1.0.0-SNAPSHOT 1.8.0_191; Mac OS X 10.12", + "User-Agent" : "azsdk-java-Azure-Keyvault/4.0.0-preview.5 1.8.0_211; Windows 10 10.0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 24 Jun 2019 08:34:50 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "245", - "expires" : "-1", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000;includeSubDomains", - "x-content-type-options" : "nosniff", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "x-ms-keyvault-region" : "eastus2", - "x-ms-keyvault-network-info" : "addr=172.103.233.167;act_addr_fam=InterNetwork;", - "cache-control" : "no-cache", - "x-ms-request-id" : "1f118974-71e5-4f13-9263-a8bab90bf725", - "x-ms-keyvault-service-version" : "1.1.0.866", - "Body" : "{\"id\":\"https://azure-sdk-java-key-vault.vault.azure.net/secrets/testSecretRestore/882bfc75c2e04add915411166e1f6d7d\",\"attributes\":{\"enabled\":true,\"exp\":3483820800,\"created\":1561365210,\"updated\":1561365210,\"recoveryLevel\":\"Recoverable+Purgeable\"}}" - } + "Date" : "Thu, 24 Oct 2019 03:48:30 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=51.143.0.73;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "232", + "x-ms-request-id" : "73ad1cc7-49e0-40ef-af8c-4f90c35de2f1", + "x-ms-keyvault-service-version" : "1.1.0.879", + "Body" : "{\"id\":\"https://cameravault.vault.azure.net/secrets/testSecretRestore/cf2f7ae64caf4786ba3c70875b9441b9\",\"attributes\":{\"enabled\":true,\"exp\":3483820800,\"created\":1571888835,\"updated\":1571888835,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null } ], "variables" : [ ] } \ No newline at end of file From 69aab9e107c267682e17a0fdc443ff9a424b63c9 Mon Sep 17 00:00:00 2001 From: James Suplizio Date: Thu, 24 Oct 2019 17:23:00 -0700 Subject: [PATCH 62/64] generate overview from readme for javadocs (#6006) * generate overview from readme for javadocs * move the pip install of markdown2 into an unconditional step * open file with encoding on 2.x needs an import * update the file write to ensure unicode, works for vers 2 & 3 * Update for relative link replacement in readme files * Remove the failed linter experiment from pom.client.xml and update README.md --- .gitignore | 3 + .../scripts/generate_overview_from_readme.py | 59 +++++++++++++++++++ .../templates/jobs/archetype-sdk-client.yml | 13 +++- pom.client.xml | 47 +++++++++++++++ pom.data.xml | 47 +++++++++++++++ sdk/core/azure-core-test/README.md | 2 +- 6 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 eng/pipelines/scripts/generate_overview_from_readme.py diff --git a/.gitignore b/.gitignore index cbda4da52ce4..0b117a131da2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ dist/ .publish/ +#javadoc overview files generated from README.md +readme_overview.html + #External libs extlib/ diff --git a/eng/pipelines/scripts/generate_overview_from_readme.py b/eng/pipelines/scripts/generate_overview_from_readme.py new file mode 100644 index 000000000000..5d004b8533ba --- /dev/null +++ b/eng/pipelines/scripts/generate_overview_from_readme.py @@ -0,0 +1,59 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +# Use case: Given a README.md file, generate a readme_overview.html file and place it next +# to the README.md. This will allow the javadocs jar step to append the contents of the +# readme onto the landing page. +# +# This script is necessary, instead of just invoking python markdown2 directly from the +# command line because the generated overview.html file needs to be enclosed inside of +# tags. When the attach-javadocs runs with the overview option it will append it the contents +# to the overview-summary.html which is the landing page. If the tags aren't in place +# the page won't be formatted correctly. + +import argparse +import markdown2 +import os.path +from io import open + +def generate_overview(readme_file): + + html_overview_file = str(readme_file).lower().replace('readme.md', 'readme_overview.html') + + with open(readme_file, 'r', encoding='utf-8') as f: + readme_content = f.read() + + # markdown2.markdown will create html from the readme.md file. The fenced-code-blocks + # extras being passed into the markdown call is necessary to deal with the embedded + # code blocks within the readme so they'll displaye correctly in the html + html_readme_content = markdown2.markdown(readme_content, extras=["fenced-code-blocks"]) + + # The html_readme_content needs to be encapsulated inside of tags in order + # for the content to correctly be added to the landing page + with open(html_overview_file, 'w', encoding='utf-8') as f: + # The literal strings have to be unicode otherwise the write will fail. + # This will allow this code to work for python 2 and 3 + f.write(u'') + f.write(html_readme_content) + f.write(u'') + + +def main(): + parser = argparse.ArgumentParser(description='Generate a readme_overview.html from a README.md.') + parser.add_argument('--readme-file', '--rf', help='path to the README.md file to readme_generate the overview.html file from.', required=True) + args = parser.parse_args() + # verify the argument is a readme.md file + if str(args.readme_file).lower().endswith('readme.md'): + if os.path.exists(args.readme_file) and os.path.isfile(args.readme_file): + generate_overview(args.readme_file) + else: + # Not every artifact has a README.md file. If the file doesn't exist then + # just output a message which will end up in the build logs. This will + # allow processing to continue without failing the build the way a raise would. + print('{} does not exist'.format(args.readme_file)) + + else: + raise ValueError('{} is not a readmefile. The --readme-file argument must be a readme.md file.'.format(args.readme_file)) + +if __name__ == '__main__': + main() diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 8478e274a06b..2c59dff10401 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -61,14 +61,25 @@ jobs: displayName: 'Tag scheduled builds' condition: and(eq(variables['Build.SourceBranchName'],'master'),eq(variables['Build.Reason'],'Schedule')) + - script: | + pip install markdown2 + displayName: 'pip install markdown2' + - template: ../steps/cache-maven-repository.yml + - template: eng/pipelines/templates/scripts/replace-relative-links.yml@azure-sdk-tools + parameters: + TargetFolder: $(Build.SourcesDirectory) + RootFolder: $(Build.SourcesDirectory) + BuildSHA: $(Build.SourceVersion) + RepoId: 'Azure/azure-sdk-for-java' + - task: Maven@3 displayName: 'Build and Package' inputs: mavenPomFile: sdk/${{parameters.ServiceDirectory}}/pom.service.xml goals: 'package' - options: '$(DefaultOptions) $(ProfileFlag) "-DpackageOutputDirectory=$(Build.ArtifactStagingDirectory)" -DskipTests -Dinclude-template' # We include template-module so we ensure it always builds in CI + options: '$(DefaultOptions) $(ProfileFlag) "-DpackageOutputDirectory=$(Build.ArtifactStagingDirectory)" -DskipTests -Dinclude-template -Dgenerate-overview' # We include template-module so we ensure it always builds in CI mavenOptions: '$(MemoryOptions) $(LoggingOptions)' javaHomeOption: 'JDKVersion' jdkVersionOption: $(JavaVersion) diff --git a/pom.client.xml b/pom.client.xml index e77291e5aff4..bda9f31bdba3 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -859,6 +859,53 @@ ./sdk/template/azure-sdk-template + + + + generate-overview-from-readme + + + generate-overview + + + + + + org.codehaus.mojo + exec-maven-plugin + + + generate-overview-from-readme + prepare-package + + exec + + + + + python + ${project.basedir} + + ../../../eng/pipelines/scripts/generate_overview_from_readme.py + --rf + ${project.basedir}/README.md + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc.version} + + ${project.basedir}/readme_overview.html + + + + + diff --git a/pom.data.xml b/pom.data.xml index b1faecbe7d44..2c74234b658a 100644 --- a/pom.data.xml +++ b/pom.data.xml @@ -547,6 +547,53 @@ ./sdk/template/azure-sdk-template + + + + generate-overview-from-readme + + + generate-overview + + + + + + org.codehaus.mojo + exec-maven-plugin + + + generate-overview-from-readme + prepare-package + + exec + + + + + python + ${project.basedir} + + ../../../eng/pipelines/scripts/generate_overview_from_readme.py + --rf + ${project.basedir}/README.md + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc.version} + + ${project.basedir}/readme_overview.html + + + + + diff --git a/sdk/core/azure-core-test/README.md b/sdk/core/azure-core-test/README.md index d8a0a411c91f..f119bbd33951 100644 --- a/sdk/core/azure-core-test/README.md +++ b/sdk/core/azure-core-test/README.md @@ -39,7 +39,7 @@ Use [TestBase][TestBase.java] to easily create live and playback test cases. Ext // Set the AZURE_TEST_MODE environment variable to either PLAYBACK or RECORD to determine if tests are playback or // live. By default, tests are run in playback mode. public class SessionTests extends TestBase { - @Test + // Use your JUnit or TestNG annotation here for your testcase public void fooTest() { // Do some network calls. } From 7e2ab61a6520f2a2a98cd4ee8919ad4482beacca Mon Sep 17 00:00:00 2001 From: Phoenix He Date: Fri, 25 Oct 2019 08:48:19 +0800 Subject: [PATCH 63/64] Update swagger_to_sdk_config.json --- swagger_to_sdk_config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index afc88f9313de..143b2e76ed7b 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -6,7 +6,8 @@ "verbose": "", "sdkrel:azure-libraries-for-java-folder": ".", "multiapi": "", - "use": "@microsoft.azure/autorest.java@preview" + "use": "@microsoft.azure/autorest.java@preview", + "java.clear-output-folder": "" }, "version": "0.2.0", "advanced_options": { From 79e92794795b876f24095636ece8087100e7a853 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Fri, 25 Oct 2019 02:19:44 +0000 Subject: [PATCH 64/64] Generated from f482c3038a02b96299b9e73bc82e1b755d51cdd2 Fix documentation --- .../resource-manager/v2017_11_30/pom.xml | 135 ++++++ .../consumption/v2017_11_30/Datagrain.java | 41 ++ .../consumption/v2017_11_30/ErrorDetails.java | 47 ++ .../v2017_11_30/ErrorResponse.java | 44 ++ .../v2017_11_30/ErrorResponseException.java | 44 ++ .../consumption/v2017_11_30/MeterDetails.java | 126 ++++++ .../consumption/v2017_11_30/Operation.java | 30 ++ .../v2017_11_30/OperationDisplay.java | 62 +++ .../consumption/v2017_11_30/Operations.java | 27 ++ .../v2017_11_30/ReservationDetails.java | 83 ++++ .../v2017_11_30/ReservationSummaries.java | 88 ++++ .../v2017_11_30/ReservationsDetails.java | 29 ++ .../v2017_11_30/ReservationsSummaries.java | 29 ++ .../consumption/v2017_11_30/UsageDetail.java | 153 +++++++ .../consumption/v2017_11_30/UsageDetails.java | 28 ++ .../ConsumptionManagementClientImpl.java | 238 ++++++++++ .../implementation/ConsumptionManager.java | 135 ++++++ .../implementation/IdParsingUtils.java | 57 +++ .../implementation/OperationImpl.java | 37 ++ .../implementation/OperationInner.java | 59 +++ .../implementation/OperationsImpl.java | 49 ++ .../implementation/OperationsInner.java | 283 ++++++++++++ .../v2017_11_30/implementation/PageImpl.java | 75 ++++ .../v2017_11_30/implementation/PageImpl1.java | 75 ++++ .../ReservationDetailsImpl.java | 89 ++++ .../ReservationDetailsInner.java | 169 +++++++ .../ReservationSummariesImpl.java | 94 ++++ .../ReservationSummariesInner.java | 188 ++++++++ .../ReservationsDetailsImpl.java | 49 ++ .../ReservationsDetailsInner.java | 149 +++++++ .../ReservationsSummariesImpl.java | 50 +++ .../ReservationsSummariesInner.java | 236 ++++++++++ .../implementation/UsageDetailImpl.java | 160 +++++++ .../implementation/UsageDetailInner.java | 372 ++++++++++++++++ .../implementation/UsageDetailsImpl.java | 49 ++ .../implementation/UsageDetailsInner.java | 421 ++++++++++++++++++ .../implementation/package-info.java | 11 + .../consumption/v2017_11_30/package-info.java | 11 + 38 files changed, 4022 insertions(+) create mode 100644 consumption/resource-manager/v2017_11_30/pom.xml create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/Datagrain.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ErrorDetails.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ErrorResponse.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ErrorResponseException.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/MeterDetails.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/Operation.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/OperationDisplay.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/Operations.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationDetails.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationSummaries.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationsDetails.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationsSummaries.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/UsageDetail.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/UsageDetails.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ConsumptionManagementClientImpl.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ConsumptionManager.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/IdParsingUtils.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationImpl.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationInner.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationsImpl.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationsInner.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/PageImpl.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/PageImpl1.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationDetailsImpl.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationDetailsInner.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationSummariesImpl.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationSummariesInner.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsDetailsImpl.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsDetailsInner.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsSummariesImpl.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsSummariesInner.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailImpl.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailInner.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailsImpl.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailsInner.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/package-info.java create mode 100644 consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/package-info.java diff --git a/consumption/resource-manager/v2017_11_30/pom.xml b/consumption/resource-manager/v2017_11_30/pom.xml new file mode 100644 index 000000000000..65fc4becfb3a --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.consumption.v2017_11_30 + + com.microsoft.azure + azure-arm-parent + 1.1.0 + ../../../pom.management.xml + + azure-mgmt-consumption + 1.0.0-beta + jar + Microsoft Azure SDK for Consumption Management + This package contains Microsoft Consumption 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 + + 1.6.5 + + + + + + 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/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/Datagrain.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/Datagrain.java new file mode 100644 index 000000000000..7277266367d4 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/Datagrain.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.consumption.v2017_11_30; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Datagrain. + */ +public final class Datagrain extends ExpandableStringEnum { + /** Static value daily for Datagrain. */ + public static final Datagrain DAILY_GRAIN = fromString("daily"); + + /** Static value monthly for Datagrain. */ + public static final Datagrain MONTHLY_GRAIN = fromString("monthly"); + + /** + * Creates or finds a Datagrain from its string representation. + * @param name a name to look for + * @return the corresponding Datagrain + */ + @JsonCreator + public static Datagrain fromString(String name) { + return fromString(name, Datagrain.class); + } + + /** + * @return known Datagrain values + */ + public static Collection values() { + return values(Datagrain.class); + } +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ErrorDetails.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ErrorDetails.java new file mode 100644 index 000000000000..061d3707777f --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ErrorDetails.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.consumption.v2017_11_30; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The details of the error. + */ +public class ErrorDetails { + /** + * Error code. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * Error message indicating why the operation failed. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get error message indicating why the operation failed. + * + * @return the message value + */ + public String message() { + return this.message; + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ErrorResponse.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ErrorResponse.java new file mode 100644 index 000000000000..4b60d6c4b56a --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ErrorResponse.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.consumption.v2017_11_30; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error response indicates that the service is not able to process the + * incoming request. The reason is provided in the error message. + */ +public class ErrorResponse { + /** + * The details of the error. + */ + @JsonProperty(value = "error") + private ErrorDetails error; + + /** + * Get the details of the error. + * + * @return the error value + */ + public ErrorDetails error() { + return this.error; + } + + /** + * Set the details of the error. + * + * @param error the error value to set + * @return the ErrorResponse object itself. + */ + public ErrorResponse withError(ErrorDetails error) { + this.error = error; + return this; + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ErrorResponseException.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ErrorResponseException.java new file mode 100644 index 000000000000..6810c79da797 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ErrorResponseException.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.consumption.v2017_11_30; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ErrorResponse information. + */ +public class ErrorResponseException extends RestException { + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ErrorResponseException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { + super(message, response, body); + } + + @Override + public ErrorResponse body() { + return (ErrorResponse) super.body(); + } +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/MeterDetails.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/MeterDetails.java new file mode 100644 index 000000000000..8b0e9a5c9f89 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/MeterDetails.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.consumption.v2017_11_30; + +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of the meter detail. + */ +public class MeterDetails { + /** + * The name of the meter, within the given meter category. + */ + @JsonProperty(value = "meterName", access = JsonProperty.Access.WRITE_ONLY) + private String meterName; + + /** + * The category of the meter, for example, 'Cloud services', 'Networking', + * etc.. + */ + @JsonProperty(value = "meterCategory", access = JsonProperty.Access.WRITE_ONLY) + private String meterCategory; + + /** + * The subcategory of the meter, for example, 'A6 Cloud services', + * 'ExpressRoute (IXP)', etc.. + */ + @JsonProperty(value = "meterSubCategory", access = JsonProperty.Access.WRITE_ONLY) + private String meterSubCategory; + + /** + * The unit in which the meter consumption is charged, for example, + * 'Hours', 'GB', etc. + */ + @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) + private String unit; + + /** + * The location in which the Azure service is available. + */ + @JsonProperty(value = "meterLocation", access = JsonProperty.Access.WRITE_ONLY) + private String meterLocation; + + /** + * The total included quantity associated with the offer. + */ + @JsonProperty(value = "totalIncludedQuantity", access = JsonProperty.Access.WRITE_ONLY) + private BigDecimal totalIncludedQuantity; + + /** + * The pretax listing price. + */ + @JsonProperty(value = "pretaxStandardRate", access = JsonProperty.Access.WRITE_ONLY) + private BigDecimal pretaxStandardRate; + + /** + * Get the name of the meter, within the given meter category. + * + * @return the meterName value + */ + public String meterName() { + return this.meterName; + } + + /** + * Get the category of the meter, for example, 'Cloud services', 'Networking', etc.. + * + * @return the meterCategory value + */ + public String meterCategory() { + return this.meterCategory; + } + + /** + * Get the subcategory of the meter, for example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc.. + * + * @return the meterSubCategory value + */ + public String meterSubCategory() { + return this.meterSubCategory; + } + + /** + * Get the unit in which the meter consumption is charged, for example, 'Hours', 'GB', etc. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Get the location in which the Azure service is available. + * + * @return the meterLocation value + */ + public String meterLocation() { + return this.meterLocation; + } + + /** + * Get the total included quantity associated with the offer. + * + * @return the totalIncludedQuantity value + */ + public BigDecimal totalIncludedQuantity() { + return this.totalIncludedQuantity; + } + + /** + * Get the pretax listing price. + * + * @return the pretaxStandardRate value + */ + public BigDecimal pretaxStandardRate() { + return this.pretaxStandardRate; + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/Operation.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/Operation.java new file mode 100644 index 000000000000..31404c2f9027 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/Operation.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.consumption.v2017_11_30; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.consumption.v2017_11_30.implementation.ConsumptionManager; +import com.microsoft.azure.management.consumption.v2017_11_30.implementation.OperationInner; + +/** + * Type representing Operation. + */ +public interface Operation extends HasInner, HasManager { + /** + * @return the display value. + */ + OperationDisplay display(); + + /** + * @return the name value. + */ + String name(); + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/OperationDisplay.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/OperationDisplay.java new file mode 100644 index 000000000000..f447cecef2f6 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/OperationDisplay.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.consumption.v2017_11_30; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The object that represents the operation. + */ +public class OperationDisplay { + /** + * Service provider: Microsoft.Consumption. + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** + * Resource on which the operation is performed: UsageDetail, etc. + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /** + * Operation type: Read, write, delete, etc. + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /** + * Get service provider: Microsoft.Consumption. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Get resource on which the operation is performed: UsageDetail, etc. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Get operation type: Read, write, delete, etc. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/Operations.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/Operations.java new file mode 100644 index 000000000000..46db4bd82ac9 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/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.consumption.v2017_11_30; + +import rx.Observable; +import com.microsoft.azure.management.consumption.v2017_11_30.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Lists all of the available consumption REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationDetails.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationDetails.java new file mode 100644 index 000000000000..425aa1b30228 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationDetails.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.consumption.v2017_11_30.implementation.ConsumptionManager; +import com.microsoft.azure.management.consumption.v2017_11_30.implementation.ReservationDetailsInner; +import java.math.BigDecimal; +import java.util.Map; +import org.joda.time.DateTime; + +/** + * Type representing ReservationDetails. + */ +public interface ReservationDetails extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the instanceId value. + */ + String instanceId(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the reservationId value. + */ + String reservationId(); + + /** + * @return the reservationOrderId value. + */ + String reservationOrderId(); + + /** + * @return the reservedHours value. + */ + BigDecimal reservedHours(); + + /** + * @return the skuName value. + */ + String skuName(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the totalReservedQuantity value. + */ + BigDecimal totalReservedQuantity(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the usageDate value. + */ + DateTime usageDate(); + + /** + * @return the usedHours value. + */ + BigDecimal usedHours(); + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationSummaries.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationSummaries.java new file mode 100644 index 000000000000..0da465497b92 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationSummaries.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.consumption.v2017_11_30.implementation.ConsumptionManager; +import com.microsoft.azure.management.consumption.v2017_11_30.implementation.ReservationSummariesInner; +import java.math.BigDecimal; +import java.util.Map; +import org.joda.time.DateTime; + +/** + * Type representing ReservationSummaries. + */ +public interface ReservationSummaries extends HasInner, HasManager { + /** + * @return the avgUtilizationPercentage value. + */ + BigDecimal avgUtilizationPercentage(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the maxUtilizationPercentage value. + */ + BigDecimal maxUtilizationPercentage(); + + /** + * @return the minUtilizationPercentage value. + */ + BigDecimal minUtilizationPercentage(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the reservationId value. + */ + String reservationId(); + + /** + * @return the reservationOrderId value. + */ + String reservationOrderId(); + + /** + * @return the reservedHours value. + */ + BigDecimal reservedHours(); + + /** + * @return the skuName value. + */ + String skuName(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the usageDate value. + */ + DateTime usageDate(); + + /** + * @return the usedHours value. + */ + BigDecimal usedHours(); + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationsDetails.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationsDetails.java new file mode 100644 index 000000000000..610547625e4f --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationsDetails.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30; + +import rx.Observable; +import com.microsoft.azure.management.consumption.v2017_11_30.implementation.ReservationsDetailsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReservationsDetails. + */ +public interface ReservationsDetails extends HasInner { + /** + * Lists the reservations details for provided date range. + * + * @param scope The scope of the reservation details. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String scope, String filter); + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationsSummaries.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationsSummaries.java new file mode 100644 index 000000000000..093913eb70bc --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/ReservationsSummaries.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30; + +import rx.Observable; +import com.microsoft.azure.management.consumption.v2017_11_30.implementation.ReservationsSummariesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ReservationsSummaries. + */ +public interface ReservationsSummaries extends HasInner { + /** + * Lists the reservations summaries for daily or monthly grain. + * + * @param scope The scope of the reservation summaries. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String scope, Datagrain grain); + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/UsageDetail.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/UsageDetail.java new file mode 100644 index 000000000000..65d426de1175 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/UsageDetail.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.consumption.v2017_11_30.implementation.ConsumptionManager; +import com.microsoft.azure.management.consumption.v2017_11_30.implementation.UsageDetailInner; +import java.math.BigDecimal; +import java.util.Map; +import org.joda.time.DateTime; + +/** + * Type representing UsageDetail. + */ +public interface UsageDetail extends HasInner, HasManager { + /** + * @return the accountName value. + */ + String accountName(); + + /** + * @return the additionalProperties value. + */ + String additionalProperties(); + + /** + * @return the billableQuantity value. + */ + BigDecimal billableQuantity(); + + /** + * @return the billingPeriodId value. + */ + String billingPeriodId(); + + /** + * @return the consumedService value. + */ + String consumedService(); + + /** + * @return the costCenter value. + */ + String costCenter(); + + /** + * @return the currency value. + */ + String currency(); + + /** + * @return the departmentName value. + */ + String departmentName(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the instanceId value. + */ + String instanceId(); + + /** + * @return the instanceLocation value. + */ + String instanceLocation(); + + /** + * @return the instanceName value. + */ + String instanceName(); + + /** + * @return the invoiceId value. + */ + String invoiceId(); + + /** + * @return the isEstimated value. + */ + Boolean isEstimated(); + + /** + * @return the meterDetails value. + */ + MeterDetails meterDetails(); + + /** + * @return the meterId value. + */ + String meterId(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the pretaxCost value. + */ + BigDecimal pretaxCost(); + + /** + * @return the product value. + */ + String product(); + + /** + * @return the subscriptionGuid value. + */ + String subscriptionGuid(); + + /** + * @return the subscriptionName value. + */ + String subscriptionName(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the usageEnd value. + */ + DateTime usageEnd(); + + /** + * @return the usageQuantity value. + */ + BigDecimal usageQuantity(); + + /** + * @return the usageStart value. + */ + DateTime usageStart(); + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/UsageDetails.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/UsageDetails.java new file mode 100644 index 000000000000..09edc5e655c5 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/UsageDetails.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.consumption.v2017_11_30; + +import rx.Observable; +import com.microsoft.azure.management.consumption.v2017_11_30.implementation.UsageDetailsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing UsageDetails. + */ +public interface UsageDetails extends HasInner { + /** + * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @param scope The scope of the usage details. The scope can be '/subscriptions/{subscriptionId}' for a subscription, or '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' for a billing period. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String scope); + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ConsumptionManagementClientImpl.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ConsumptionManagementClientImpl.java new file mode 100644 index 000000000000..e90cbf30307e --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ConsumptionManagementClientImpl.java @@ -0,0 +1,238 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30.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 ConsumptionManagementClientImpl class. + */ +public class ConsumptionManagementClientImpl 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; + } + + /** Version of the API to be used with the client request. The current version is 2017-11-30. */ + private String apiVersion; + + /** + * Gets Version of the API to be used with the client request. The current version is 2017-11-30. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** Azure Subscription ID. */ + private String subscriptionId; + + /** + * Gets Azure Subscription ID. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Azure Subscription ID. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public ConsumptionManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** 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 ConsumptionManagementClientImpl 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 ConsumptionManagementClientImpl 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 ConsumptionManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The UsageDetailsInner object to access its operations. + */ + private UsageDetailsInner usageDetails; + + /** + * Gets the UsageDetailsInner object to access its operations. + * @return the UsageDetailsInner object. + */ + public UsageDetailsInner usageDetails() { + return this.usageDetails; + } + + /** + * The ReservationsSummariesInner object to access its operations. + */ + private ReservationsSummariesInner reservationsSummaries; + + /** + * Gets the ReservationsSummariesInner object to access its operations. + * @return the ReservationsSummariesInner object. + */ + public ReservationsSummariesInner reservationsSummaries() { + return this.reservationsSummaries; + } + + /** + * The ReservationsDetailsInner object to access its operations. + */ + private ReservationsDetailsInner reservationsDetails; + + /** + * Gets the ReservationsDetailsInner object to access its operations. + * @return the ReservationsDetailsInner object. + */ + public ReservationsDetailsInner reservationsDetails() { + return this.reservationsDetails; + } + + /** + * 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; + } + + /** + * Initializes an instance of ConsumptionManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public ConsumptionManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of ConsumptionManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public ConsumptionManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of ConsumptionManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public ConsumptionManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2017-11-30"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.usageDetails = new UsageDetailsInner(restClient().retrofit(), this); + this.reservationsSummaries = new ReservationsSummariesInner(restClient().retrofit(), this); + this.reservationsDetails = new ReservationsDetailsInner(restClient().retrofit(), this); + this.operations = new OperationsInner(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(), "ConsumptionManagementClient", "2017-11-30"); + } +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ConsumptionManager.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ConsumptionManager.java new file mode 100644 index 000000000000..cb9bab5b437c --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ConsumptionManager.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30.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.consumption.v2017_11_30.UsageDetails; +import com.microsoft.azure.management.consumption.v2017_11_30.ReservationsSummaries; +import com.microsoft.azure.management.consumption.v2017_11_30.ReservationsDetails; +import com.microsoft.azure.management.consumption.v2017_11_30.Operations; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure Consumption resource management. + */ +public final class ConsumptionManager extends ManagerCore { + private UsageDetails usageDetails; + private ReservationsSummaries reservationsSummaries; + private ReservationsDetails reservationsDetails; + private Operations operations; + /** + * Get a Configurable instance that can be used to create ConsumptionManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new ConsumptionManager.ConfigurableImpl(); + } + /** + * Creates an instance of ConsumptionManager that exposes Consumption resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the ConsumptionManager + */ + public static ConsumptionManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new ConsumptionManager(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 ConsumptionManager that exposes Consumption resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the ConsumptionManager + */ + public static ConsumptionManager authenticate(RestClient restClient, String subscriptionId) { + return new ConsumptionManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of ConsumptionManager that exposes Consumption management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing Consumption management API entry points that work across subscriptions + */ + ConsumptionManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage UsageDetails. + */ + public UsageDetails usageDetails() { + if (this.usageDetails == null) { + this.usageDetails = new UsageDetailsImpl(this); + } + return this.usageDetails; + } + + /** + * @return Entry point to manage ReservationsSummaries. + */ + public ReservationsSummaries reservationsSummaries() { + if (this.reservationsSummaries == null) { + this.reservationsSummaries = new ReservationsSummariesImpl(this); + } + return this.reservationsSummaries; + } + + /** + * @return Entry point to manage ReservationsDetails. + */ + public ReservationsDetails reservationsDetails() { + if (this.reservationsDetails == null) { + this.reservationsDetails = new ReservationsDetailsImpl(this); + } + return this.reservationsDetails; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public ConsumptionManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return ConsumptionManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private ConsumptionManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new ConsumptionManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/IdParsingUtils.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/IdParsingUtils.java new file mode 100644 index 000000000000..ef9c049995c8 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/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.consumption.v2017_11_30.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/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationImpl.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationImpl.java new file mode 100644 index 000000000000..755a860e0eb5 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationImpl.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.consumption.v2017_11_30.implementation; + +import com.microsoft.azure.management.consumption.v2017_11_30.Operation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.consumption.v2017_11_30.OperationDisplay; + +class OperationImpl extends WrapperImpl implements Operation { + private final ConsumptionManager manager; + OperationImpl(OperationInner inner, ConsumptionManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ConsumptionManager manager() { + return this.manager; + } + + @Override + public OperationDisplay display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationInner.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationInner.java new file mode 100644 index 000000000000..7760cef54fa7 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationInner.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.consumption.v2017_11_30.implementation; + +import com.microsoft.azure.management.consumption.v2017_11_30.OperationDisplay; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Consumption REST API operation. + */ +public class OperationInner { + /** + * Operation name: {provider}/{resource}/{operation}. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The object that represents the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * Get operation name: {provider}/{resource}/{operation}. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the object that represents the operation. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the object that represents the operation. + * + * @param display the display value to set + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationsImpl.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationsImpl.java new file mode 100644 index 000000000000..b2b9f88769ea --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationsImpl.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. + * abc + */ + +package com.microsoft.azure.management.consumption.v2017_11_30.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.consumption.v2017_11_30.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.consumption.v2017_11_30.Operation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final ConsumptionManager manager; + + OperationsImpl(ConsumptionManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public ConsumptionManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Operation call(OperationInner inner) { + return new OperationImpl(inner, manager()); + } + }); + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationsInner.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationsInner.java new file mode 100644 index 000000000000..c120301d5044 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/OperationsInner.java @@ -0,0 +1,283 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.consumption.v2017_11_30.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +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 Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private ConsumptionManagementClientImpl 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, ConsumptionManagementClientImpl 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.consumption.v2017_11_30.Operations list" }) + @GET("providers/Microsoft.Consumption/operations") + Observable> list(@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.consumption.v2017_11_30.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available consumption REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException 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<OperationInner> 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 all of the available consumption 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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available consumption REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available consumption REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> 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 all of the available consumption REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + 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> 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the available consumption REST API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException 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<OperationInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available consumption REST API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available consumption REST API operations. + * + * @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<OperationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available consumption REST API operations. + * + * @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<OperationInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available consumption REST API operations. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/PageImpl.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/PageImpl.java new file mode 100644 index 000000000000..40913b6f3c7f --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/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.consumption.v2017_11_30.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/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/PageImpl1.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/PageImpl1.java new file mode 100644 index 000000000000..b27ebf71e8f5 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/PageImpl1.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.consumption.v2017_11_30.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 PageImpl1 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("") + 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 PageImpl1 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 PageImpl1 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationDetailsImpl.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationDetailsImpl.java new file mode 100644 index 000000000000..fad75759ed04 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationDetailsImpl.java @@ -0,0 +1,89 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30.implementation; + +import com.microsoft.azure.management.consumption.v2017_11_30.ReservationDetails; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.math.BigDecimal; +import java.util.Map; +import org.joda.time.DateTime; + +class ReservationDetailsImpl extends WrapperImpl implements ReservationDetails { + private final ConsumptionManager manager; + ReservationDetailsImpl(ReservationDetailsInner inner, ConsumptionManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ConsumptionManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String instanceId() { + return this.inner().instanceId(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String reservationId() { + return this.inner().reservationId(); + } + + @Override + public String reservationOrderId() { + return this.inner().reservationOrderId(); + } + + @Override + public BigDecimal reservedHours() { + return this.inner().reservedHours(); + } + + @Override + public String skuName() { + return this.inner().skuName(); + } + + @Override + public Map tags() { + return this.inner().tags(); + } + + @Override + public BigDecimal totalReservedQuantity() { + return this.inner().totalReservedQuantity(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DateTime usageDate() { + return this.inner().usageDate(); + } + + @Override + public BigDecimal usedHours() { + return this.inner().usedHours(); + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationDetailsInner.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationDetailsInner.java new file mode 100644 index 000000000000..90318875534c --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationDetailsInner.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30.implementation; + +import java.math.BigDecimal; +import org.joda.time.DateTime; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * reservation details resource. + */ +@JsonFlatten +public class ReservationDetailsInner extends ProxyResource { + /** + * The reservation order ID is the identifier for a reservation purchase. + * Each reservation order ID represents a single purchase transaction. A + * reservation order contains reservations. The reservation order specifies + * the VM size and region for the reservations. + */ + @JsonProperty(value = "properties.reservationOrderId", access = JsonProperty.Access.WRITE_ONLY) + private String reservationOrderId; + + /** + * The reservation ID is the identifier of a reservation within a + * reservation order. Each reservation is the grouping for applying the + * benefit scope and also specifies the number of instances to which the + * reservation benefit can be applied to. + */ + @JsonProperty(value = "properties.reservationId", access = JsonProperty.Access.WRITE_ONLY) + private String reservationId; + + /** + * This is the ARM Sku name. It can be used to join with the serviceType + * field in additional info in usage records. + */ + @JsonProperty(value = "properties.skuName", access = JsonProperty.Access.WRITE_ONLY) + private String skuName; + + /** + * This is the total hours reserved for the day. E.g. if reservation for 1 + * instance was made on 1 PM, this will be 11 hours for that day and 24 + * hours from subsequent days. + */ + @JsonProperty(value = "properties.reservedHours", access = JsonProperty.Access.WRITE_ONLY) + private BigDecimal reservedHours; + + /** + * The date on which consumption occurred. + */ + @JsonProperty(value = "properties.usageDate", access = JsonProperty.Access.WRITE_ONLY) + private DateTime usageDate; + + /** + * This is the total hours used by the instance. + */ + @JsonProperty(value = "properties.usedHours", access = JsonProperty.Access.WRITE_ONLY) + private BigDecimal usedHours; + + /** + * This identifier is the name of the resource or the fully qualified + * Resource ID. + */ + @JsonProperty(value = "properties.instanceId", access = JsonProperty.Access.WRITE_ONLY) + private String instanceId; + + /** + * This is the total count of instances that are reserved for the + * reservationId. + */ + @JsonProperty(value = "properties.totalReservedQuantity", access = JsonProperty.Access.WRITE_ONLY) + private BigDecimal totalReservedQuantity; + + /** + * Resource tags. + */ + @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY) + private Map tags; + + /** + * Get the reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations. + * + * @return the reservationOrderId value + */ + public String reservationOrderId() { + return this.reservationOrderId; + } + + /** + * Get the reservation ID is the identifier of a reservation within a reservation order. Each reservation is the grouping for applying the benefit scope and also specifies the number of instances to which the reservation benefit can be applied to. + * + * @return the reservationId value + */ + public String reservationId() { + return this.reservationId; + } + + /** + * Get this is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records. + * + * @return the skuName value + */ + public String skuName() { + return this.skuName; + } + + /** + * Get this is the total hours reserved for the day. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for that day and 24 hours from subsequent days. + * + * @return the reservedHours value + */ + public BigDecimal reservedHours() { + return this.reservedHours; + } + + /** + * Get the date on which consumption occurred. + * + * @return the usageDate value + */ + public DateTime usageDate() { + return this.usageDate; + } + + /** + * Get this is the total hours used by the instance. + * + * @return the usedHours value + */ + public BigDecimal usedHours() { + return this.usedHours; + } + + /** + * Get this identifier is the name of the resource or the fully qualified Resource ID. + * + * @return the instanceId value + */ + public String instanceId() { + return this.instanceId; + } + + /** + * Get this is the total count of instances that are reserved for the reservationId. + * + * @return the totalReservedQuantity value + */ + public BigDecimal totalReservedQuantity() { + return this.totalReservedQuantity; + } + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationSummariesImpl.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationSummariesImpl.java new file mode 100644 index 000000000000..f0213c683ccb --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationSummariesImpl.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.consumption.v2017_11_30.implementation; + +import com.microsoft.azure.management.consumption.v2017_11_30.ReservationSummaries; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.math.BigDecimal; +import java.util.Map; +import org.joda.time.DateTime; + +class ReservationSummariesImpl extends WrapperImpl implements ReservationSummaries { + private final ConsumptionManager manager; + ReservationSummariesImpl(ReservationSummariesInner inner, ConsumptionManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ConsumptionManager manager() { + return this.manager; + } + + @Override + public BigDecimal avgUtilizationPercentage() { + return this.inner().avgUtilizationPercentage(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public BigDecimal maxUtilizationPercentage() { + return this.inner().maxUtilizationPercentage(); + } + + @Override + public BigDecimal minUtilizationPercentage() { + return this.inner().minUtilizationPercentage(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String reservationId() { + return this.inner().reservationId(); + } + + @Override + public String reservationOrderId() { + return this.inner().reservationOrderId(); + } + + @Override + public BigDecimal reservedHours() { + return this.inner().reservedHours(); + } + + @Override + public String skuName() { + return this.inner().skuName(); + } + + @Override + public Map tags() { + return this.inner().tags(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DateTime usageDate() { + return this.inner().usageDate(); + } + + @Override + public BigDecimal usedHours() { + return this.inner().usedHours(); + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationSummariesInner.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationSummariesInner.java new file mode 100644 index 000000000000..b576830387c2 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationSummariesInner.java @@ -0,0 +1,188 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30.implementation; + +import java.math.BigDecimal; +import org.joda.time.DateTime; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * reservation summaries resource. + */ +@JsonFlatten +public class ReservationSummariesInner extends ProxyResource { + /** + * The reservation order ID is the identifier for a reservation purchase. + * Each reservation order ID represents a single purchase transaction. A + * reservation order contains reservations. The reservation order specifies + * the VM size and region for the reservations. + */ + @JsonProperty(value = "properties.reservationOrderId", access = JsonProperty.Access.WRITE_ONLY) + private String reservationOrderId; + + /** + * The reservation ID is the identifier of a reservation within a + * reservation order. Each reservation is the grouping for applying the + * benefit scope and also specifies the number of instances to which the + * reservation benefit can be applied to. + */ + @JsonProperty(value = "properties.reservationId", access = JsonProperty.Access.WRITE_ONLY) + private String reservationId; + + /** + * This is the ARM Sku name. It can be used to join with the serviceType + * field in additional info in usage records. + */ + @JsonProperty(value = "properties.skuName", access = JsonProperty.Access.WRITE_ONLY) + private String skuName; + + /** + * This is the total hours reserved. E.g. if reservation for 1 instance was + * made on 1 PM, this will be 11 hours for that day and 24 hours from + * subsequent days. + */ + @JsonProperty(value = "properties.reservedHours", access = JsonProperty.Access.WRITE_ONLY) + private BigDecimal reservedHours; + + /** + * Data corresponding to the utilization record. If the grain of data is + * monthly, it will be first day of month. + */ + @JsonProperty(value = "properties.usageDate", access = JsonProperty.Access.WRITE_ONLY) + private DateTime usageDate; + + /** + * Total used hours by the reservation. + */ + @JsonProperty(value = "properties.usedHours", access = JsonProperty.Access.WRITE_ONLY) + private BigDecimal usedHours; + + /** + * This is the minimum hourly utilization in the usage time (day or month). + * E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 + * and 5, utilization was 10%, this field will return 10% for that day. + */ + @JsonProperty(value = "properties.minUtilizationPercentage", access = JsonProperty.Access.WRITE_ONLY) + private BigDecimal minUtilizationPercentage; + + /** + * This is average utilization for the entire time range. (day or month + * depending on the grain). + */ + @JsonProperty(value = "properties.avgUtilizationPercentage", access = JsonProperty.Access.WRITE_ONLY) + private BigDecimal avgUtilizationPercentage; + + /** + * This is the maximum hourly utilization in the usage time (day or month). + * E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 + * and 5, utilization was 100%, this field will return 100% for that day. + */ + @JsonProperty(value = "properties.maxUtilizationPercentage", access = JsonProperty.Access.WRITE_ONLY) + private BigDecimal maxUtilizationPercentage; + + /** + * Resource tags. + */ + @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY) + private Map tags; + + /** + * Get the reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations. + * + * @return the reservationOrderId value + */ + public String reservationOrderId() { + return this.reservationOrderId; + } + + /** + * Get the reservation ID is the identifier of a reservation within a reservation order. Each reservation is the grouping for applying the benefit scope and also specifies the number of instances to which the reservation benefit can be applied to. + * + * @return the reservationId value + */ + public String reservationId() { + return this.reservationId; + } + + /** + * Get this is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records. + * + * @return the skuName value + */ + public String skuName() { + return this.skuName; + } + + /** + * Get this is the total hours reserved. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for that day and 24 hours from subsequent days. + * + * @return the reservedHours value + */ + public BigDecimal reservedHours() { + return this.reservedHours; + } + + /** + * Get data corresponding to the utilization record. If the grain of data is monthly, it will be first day of month. + * + * @return the usageDate value + */ + public DateTime usageDate() { + return this.usageDate; + } + + /** + * Get total used hours by the reservation. + * + * @return the usedHours value + */ + public BigDecimal usedHours() { + return this.usedHours; + } + + /** + * Get this is the minimum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field will return 10% for that day. + * + * @return the minUtilizationPercentage value + */ + public BigDecimal minUtilizationPercentage() { + return this.minUtilizationPercentage; + } + + /** + * Get this is average utilization for the entire time range. (day or month depending on the grain). + * + * @return the avgUtilizationPercentage value + */ + public BigDecimal avgUtilizationPercentage() { + return this.avgUtilizationPercentage; + } + + /** + * Get this is the maximum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field will return 100% for that day. + * + * @return the maxUtilizationPercentage value + */ + public BigDecimal maxUtilizationPercentage() { + return this.maxUtilizationPercentage; + } + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsDetailsImpl.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsDetailsImpl.java new file mode 100644 index 000000000000..fc17d3e6c75c --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsDetailsImpl.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. + * abc + */ + +package com.microsoft.azure.management.consumption.v2017_11_30.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.consumption.v2017_11_30.ReservationsDetails; +import rx.functions.Func1; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.consumption.v2017_11_30.ReservationDetails; + +class ReservationsDetailsImpl extends WrapperImpl implements ReservationsDetails { + private final ConsumptionManager manager; + + ReservationsDetailsImpl(ConsumptionManager manager) { + super(manager.inner().reservationsDetails()); + this.manager = manager; + } + + public ConsumptionManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(String scope, String filter) { + ReservationsDetailsInner client = this.inner(); + return client.listAsync(scope, filter) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public ReservationDetails call(ReservationDetailsInner inner) { + return new ReservationDetailsImpl(inner, manager()); + } + }); + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsDetailsInner.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsDetailsInner.java new file mode 100644 index 000000000000..9387cdeed173 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsDetailsInner.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.consumption.v2017_11_30.ErrorResponseException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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 ReservationsDetails. + */ +public class ReservationsDetailsInner { + /** The Retrofit service to perform REST calls. */ + private ReservationsDetailsService service; + /** The service client containing this operation class. */ + private ConsumptionManagementClientImpl client; + + /** + * Initializes an instance of ReservationsDetailsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReservationsDetailsInner(Retrofit retrofit, ConsumptionManagementClientImpl client) { + this.service = retrofit.create(ReservationsDetailsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReservationsDetails to be + * used by Retrofit to perform actually REST calls. + */ + interface ReservationsDetailsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.v2017_11_30.ReservationsDetails list" }) + @GET("{scope}/providers/Microsoft.Consumption/reservationDetails") + Observable> list(@Path(value = "scope", encoded = true) String scope, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists the reservations details for provided date range. + * + * @param scope The scope of the reservation details. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<ReservationDetailsInner> object if successful. + */ + public List list(String scope, String filter) { + return listWithServiceResponseAsync(scope, filter).toBlocking().single().body(); + } + + /** + * Lists the reservations details for provided date range. + * + * @param scope The scope of the reservation details. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' + * @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(String scope, String filter, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(scope, filter), serviceCallback); + } + + /** + * Lists the reservations details for provided date range. + * + * @param scope The scope of the reservation details. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReservationDetailsInner> object + */ + public Observable> listAsync(String scope, String filter) { + return listWithServiceResponseAsync(scope, filter).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the reservations details for provided date range. + * + * @param scope The scope of the reservation details. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReservationDetailsInner> object + */ + public Observable>> listWithServiceResponseAsync(String scope, String filter) { + if (scope == null) { + throw new IllegalArgumentException("Parameter scope is required and cannot be null."); + } + if (filter == null) { + throw new IllegalArgumentException("Parameter filter 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(scope, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsSummariesImpl.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsSummariesImpl.java new file mode 100644 index 000000000000..1499ddf7b318 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsSummariesImpl.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. + * abc + */ + +package com.microsoft.azure.management.consumption.v2017_11_30.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.consumption.v2017_11_30.ReservationsSummaries; +import rx.functions.Func1; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.consumption.v2017_11_30.ReservationSummaries; +import com.microsoft.azure.management.consumption.v2017_11_30.Datagrain; + +class ReservationsSummariesImpl extends WrapperImpl implements ReservationsSummaries { + private final ConsumptionManager manager; + + ReservationsSummariesImpl(ConsumptionManager manager) { + super(manager.inner().reservationsSummaries()); + this.manager = manager; + } + + public ConsumptionManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(String scope, Datagrain grain) { + ReservationsSummariesInner client = this.inner(); + return client.listAsync(scope, grain) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public ReservationSummaries call(ReservationSummariesInner inner) { + return new ReservationSummariesImpl(inner, manager()); + } + }); + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsSummariesInner.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsSummariesInner.java new file mode 100644 index 000000000000..3deccb8ffe5a --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/ReservationsSummariesInner.java @@ -0,0 +1,236 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.consumption.v2017_11_30.Datagrain; +import com.microsoft.azure.management.consumption.v2017_11_30.ErrorResponseException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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 ReservationsSummaries. + */ +public class ReservationsSummariesInner { + /** The Retrofit service to perform REST calls. */ + private ReservationsSummariesService service; + /** The service client containing this operation class. */ + private ConsumptionManagementClientImpl client; + + /** + * Initializes an instance of ReservationsSummariesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReservationsSummariesInner(Retrofit retrofit, ConsumptionManagementClientImpl client) { + this.service = retrofit.create(ReservationsSummariesService.class); + this.client = client; + } + + /** + * The interface defining all the services for ReservationsSummaries to be + * used by Retrofit to perform actually REST calls. + */ + interface ReservationsSummariesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.v2017_11_30.ReservationsSummaries list" }) + @GET("{scope}/providers/Microsoft.Consumption/reservationSummaries") + Observable> list(@Path(value = "scope", encoded = true) String scope, @Query("grain") Datagrain grain, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists the reservations summaries for daily or monthly grain. + * + * @param scope The scope of the reservation summaries. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<ReservationSummariesInner> object if successful. + */ + public List list(String scope, Datagrain grain) { + return listWithServiceResponseAsync(scope, grain).toBlocking().single().body(); + } + + /** + * Lists the reservations summaries for daily or monthly grain. + * + * @param scope The scope of the reservation summaries. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @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(String scope, Datagrain grain, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(scope, grain), serviceCallback); + } + + /** + * Lists the reservations summaries for daily or monthly grain. + * + * @param scope The scope of the reservation summaries. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReservationSummariesInner> object + */ + public Observable> listAsync(String scope, Datagrain grain) { + return listWithServiceResponseAsync(scope, grain).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the reservations summaries for daily or monthly grain. + * + * @param scope The scope of the reservation summaries. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReservationSummariesInner> object + */ + public Observable>> listWithServiceResponseAsync(String scope, Datagrain grain) { + if (scope == null) { + throw new IllegalArgumentException("Parameter scope is required and cannot be null."); + } + if (grain == null) { + throw new IllegalArgumentException("Parameter grain 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; + return service.list(scope, grain, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Lists the reservations summaries for daily or monthly grain. + * + * @param scope The scope of the reservation summaries. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<ReservationSummariesInner> object if successful. + */ + public List list(String scope, Datagrain grain, String filter) { + return listWithServiceResponseAsync(scope, grain, filter).toBlocking().single().body(); + } + + /** + * Lists the reservations summaries for daily or monthly grain. + * + * @param scope The scope of the reservation summaries. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' + * @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(String scope, Datagrain grain, String filter, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(scope, grain, filter), serviceCallback); + } + + /** + * Lists the reservations summaries for daily or monthly grain. + * + * @param scope The scope of the reservation summaries. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReservationSummariesInner> object + */ + public Observable> listAsync(String scope, Datagrain grain, String filter) { + return listWithServiceResponseAsync(scope, grain, filter).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the reservations summaries for daily or monthly grain. + * + * @param scope The scope of the reservation summaries. The scope can be 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}' or 'providers/Microsoft.Capacity/reservationorders/{ReservationOrderId}/reservations/{ReservationId}' + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReservationSummariesInner> object + */ + public Observable>> listWithServiceResponseAsync(String scope, Datagrain grain, String filter) { + if (scope == null) { + throw new IllegalArgumentException("Parameter scope is required and cannot be null."); + } + if (grain == null) { + throw new IllegalArgumentException("Parameter grain 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(scope, grain, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailImpl.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailImpl.java new file mode 100644 index 000000000000..04fa0e278504 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailImpl.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30.implementation; + +import com.microsoft.azure.management.consumption.v2017_11_30.UsageDetail; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.math.BigDecimal; +import com.microsoft.azure.management.consumption.v2017_11_30.MeterDetails; +import java.util.Map; +import org.joda.time.DateTime; + +class UsageDetailImpl extends WrapperImpl implements UsageDetail { + private final ConsumptionManager manager; + UsageDetailImpl(UsageDetailInner inner, ConsumptionManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ConsumptionManager manager() { + return this.manager; + } + + @Override + public String accountName() { + return this.inner().accountName(); + } + + @Override + public String additionalProperties() { + return this.inner().additionalProperties(); + } + + @Override + public BigDecimal billableQuantity() { + return this.inner().billableQuantity(); + } + + @Override + public String billingPeriodId() { + return this.inner().billingPeriodId(); + } + + @Override + public String consumedService() { + return this.inner().consumedService(); + } + + @Override + public String costCenter() { + return this.inner().costCenter(); + } + + @Override + public String currency() { + return this.inner().currency(); + } + + @Override + public String departmentName() { + return this.inner().departmentName(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String instanceId() { + return this.inner().instanceId(); + } + + @Override + public String instanceLocation() { + return this.inner().instanceLocation(); + } + + @Override + public String instanceName() { + return this.inner().instanceName(); + } + + @Override + public String invoiceId() { + return this.inner().invoiceId(); + } + + @Override + public Boolean isEstimated() { + return this.inner().isEstimated(); + } + + @Override + public MeterDetails meterDetails() { + return this.inner().meterDetails(); + } + + @Override + public String meterId() { + return this.inner().meterId(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public BigDecimal pretaxCost() { + return this.inner().pretaxCost(); + } + + @Override + public String product() { + return this.inner().product(); + } + + @Override + public String subscriptionGuid() { + return this.inner().subscriptionGuid(); + } + + @Override + public String subscriptionName() { + return this.inner().subscriptionName(); + } + + @Override + public Map tags() { + return this.inner().tags(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DateTime usageEnd() { + return this.inner().usageEnd(); + } + + @Override + public BigDecimal usageQuantity() { + return this.inner().usageQuantity(); + } + + @Override + public DateTime usageStart() { + return this.inner().usageStart(); + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailInner.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailInner.java new file mode 100644 index 000000000000..c349c1d93c44 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailInner.java @@ -0,0 +1,372 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30.implementation; + +import org.joda.time.DateTime; +import java.math.BigDecimal; +import com.microsoft.azure.management.consumption.v2017_11_30.MeterDetails; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * An usage detail resource. + */ +@JsonFlatten +public class UsageDetailInner extends ProxyResource { + /** + * The id of the billing period resource that the usage belongs to. + */ + @JsonProperty(value = "properties.billingPeriodId", access = JsonProperty.Access.WRITE_ONLY) + private String billingPeriodId; + + /** + * The id of the invoice resource that the usage belongs to. + */ + @JsonProperty(value = "properties.invoiceId", access = JsonProperty.Access.WRITE_ONLY) + private String invoiceId; + + /** + * The start of the date time range covered by the usage detail. + */ + @JsonProperty(value = "properties.usageStart", access = JsonProperty.Access.WRITE_ONLY) + private DateTime usageStart; + + /** + * The end of the date time range covered by the usage detail. + */ + @JsonProperty(value = "properties.usageEnd", access = JsonProperty.Access.WRITE_ONLY) + private DateTime usageEnd; + + /** + * The name of the resource instance that the usage is about. + */ + @JsonProperty(value = "properties.instanceName", access = JsonProperty.Access.WRITE_ONLY) + private String instanceName; + + /** + * The uri of the resource instance that the usage is about. + */ + @JsonProperty(value = "properties.instanceId", access = JsonProperty.Access.WRITE_ONLY) + private String instanceId; + + /** + * The location of the resource instance that the usage is about. + */ + @JsonProperty(value = "properties.instanceLocation", access = JsonProperty.Access.WRITE_ONLY) + private String instanceLocation; + + /** + * The ISO currency in which the meter is charged, for example, USD. + */ + @JsonProperty(value = "properties.currency", access = JsonProperty.Access.WRITE_ONLY) + private String currency; + + /** + * The quantity of usage. + */ + @JsonProperty(value = "properties.usageQuantity", access = JsonProperty.Access.WRITE_ONLY) + private BigDecimal usageQuantity; + + /** + * The billable usage quantity. + */ + @JsonProperty(value = "properties.billableQuantity", access = JsonProperty.Access.WRITE_ONLY) + private BigDecimal billableQuantity; + + /** + * The amount of cost before tax. + */ + @JsonProperty(value = "properties.pretaxCost", access = JsonProperty.Access.WRITE_ONLY) + private BigDecimal pretaxCost; + + /** + * The estimated usage is subject to change. + */ + @JsonProperty(value = "properties.isEstimated", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEstimated; + + /** + * The meter id. + */ + @JsonProperty(value = "properties.meterId", access = JsonProperty.Access.WRITE_ONLY) + private String meterId; + + /** + * The details about the meter. By default this is not populated, unless + * it's specified in $expand. + */ + @JsonProperty(value = "properties.meterDetails", access = JsonProperty.Access.WRITE_ONLY) + private MeterDetails meterDetails; + + /** + * Subscription guid. + */ + @JsonProperty(value = "properties.subscriptionGuid", access = JsonProperty.Access.WRITE_ONLY) + private String subscriptionGuid; + + /** + * Subscription name. + */ + @JsonProperty(value = "properties.subscriptionName", access = JsonProperty.Access.WRITE_ONLY) + private String subscriptionName; + + /** + * Account name. + */ + @JsonProperty(value = "properties.accountName", access = JsonProperty.Access.WRITE_ONLY) + private String accountName; + + /** + * Department name. + */ + @JsonProperty(value = "properties.departmentName", access = JsonProperty.Access.WRITE_ONLY) + private String departmentName; + + /** + * Product name. + */ + @JsonProperty(value = "properties.product", access = JsonProperty.Access.WRITE_ONLY) + private String product; + + /** + * Consumed service name. + */ + @JsonProperty(value = "properties.consumedService", access = JsonProperty.Access.WRITE_ONLY) + private String consumedService; + + /** + * The cost center of this department if it is a department and a + * costcenter exists. + */ + @JsonProperty(value = "properties.costCenter", access = JsonProperty.Access.WRITE_ONLY) + private String costCenter; + + /** + * Additional details of this usage item. By default this is not populated, + * unless it's specified in $expand. + */ + @JsonProperty(value = "properties.additionalProperties", access = JsonProperty.Access.WRITE_ONLY) + private String additionalProperties; + + /** + * Resource tags. + */ + @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY) + private Map tags; + + /** + * Get the id of the billing period resource that the usage belongs to. + * + * @return the billingPeriodId value + */ + public String billingPeriodId() { + return this.billingPeriodId; + } + + /** + * Get the id of the invoice resource that the usage belongs to. + * + * @return the invoiceId value + */ + public String invoiceId() { + return this.invoiceId; + } + + /** + * Get the start of the date time range covered by the usage detail. + * + * @return the usageStart value + */ + public DateTime usageStart() { + return this.usageStart; + } + + /** + * Get the end of the date time range covered by the usage detail. + * + * @return the usageEnd value + */ + public DateTime usageEnd() { + return this.usageEnd; + } + + /** + * Get the name of the resource instance that the usage is about. + * + * @return the instanceName value + */ + public String instanceName() { + return this.instanceName; + } + + /** + * Get the uri of the resource instance that the usage is about. + * + * @return the instanceId value + */ + public String instanceId() { + return this.instanceId; + } + + /** + * Get the location of the resource instance that the usage is about. + * + * @return the instanceLocation value + */ + public String instanceLocation() { + return this.instanceLocation; + } + + /** + * Get the ISO currency in which the meter is charged, for example, USD. + * + * @return the currency value + */ + public String currency() { + return this.currency; + } + + /** + * Get the quantity of usage. + * + * @return the usageQuantity value + */ + public BigDecimal usageQuantity() { + return this.usageQuantity; + } + + /** + * Get the billable usage quantity. + * + * @return the billableQuantity value + */ + public BigDecimal billableQuantity() { + return this.billableQuantity; + } + + /** + * Get the amount of cost before tax. + * + * @return the pretaxCost value + */ + public BigDecimal pretaxCost() { + return this.pretaxCost; + } + + /** + * Get the estimated usage is subject to change. + * + * @return the isEstimated value + */ + public Boolean isEstimated() { + return this.isEstimated; + } + + /** + * Get the meter id. + * + * @return the meterId value + */ + public String meterId() { + return this.meterId; + } + + /** + * Get the details about the meter. By default this is not populated, unless it's specified in $expand. + * + * @return the meterDetails value + */ + public MeterDetails meterDetails() { + return this.meterDetails; + } + + /** + * Get subscription guid. + * + * @return the subscriptionGuid value + */ + public String subscriptionGuid() { + return this.subscriptionGuid; + } + + /** + * Get subscription name. + * + * @return the subscriptionName value + */ + public String subscriptionName() { + return this.subscriptionName; + } + + /** + * Get account name. + * + * @return the accountName value + */ + public String accountName() { + return this.accountName; + } + + /** + * Get department name. + * + * @return the departmentName value + */ + public String departmentName() { + return this.departmentName; + } + + /** + * Get product name. + * + * @return the product value + */ + public String product() { + return this.product; + } + + /** + * Get consumed service name. + * + * @return the consumedService value + */ + public String consumedService() { + return this.consumedService; + } + + /** + * Get the cost center of this department if it is a department and a costcenter exists. + * + * @return the costCenter value + */ + public String costCenter() { + return this.costCenter; + } + + /** + * Get additional details of this usage item. By default this is not populated, unless it's specified in $expand. + * + * @return the additionalProperties value + */ + public String additionalProperties() { + return this.additionalProperties; + } + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailsImpl.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailsImpl.java new file mode 100644 index 000000000000..a7c984a011d3 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailsImpl.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. + * abc + */ + +package com.microsoft.azure.management.consumption.v2017_11_30.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.consumption.v2017_11_30.UsageDetails; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.consumption.v2017_11_30.UsageDetail; + +class UsageDetailsImpl extends WrapperImpl implements UsageDetails { + private final ConsumptionManager manager; + + UsageDetailsImpl(ConsumptionManager manager) { + super(manager.inner().usageDetails()); + this.manager = manager; + } + + public ConsumptionManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(final String scope) { + UsageDetailsInner client = this.inner(); + return client.listAsync(scope) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public UsageDetail call(UsageDetailInner inner) { + return new UsageDetailImpl(inner, manager()); + } + }); + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailsInner.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailsInner.java new file mode 100644 index 000000000000..7cfa1bba436c --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/UsageDetailsInner.java @@ -0,0 +1,421 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the 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.consumption.v2017_11_30.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.consumption.v2017_11_30.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +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.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 UsageDetails. + */ +public class UsageDetailsInner { + /** The Retrofit service to perform REST calls. */ + private UsageDetailsService service; + /** The service client containing this operation class. */ + private ConsumptionManagementClientImpl client; + + /** + * Initializes an instance of UsageDetailsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public UsageDetailsInner(Retrofit retrofit, ConsumptionManagementClientImpl client) { + this.service = retrofit.create(UsageDetailsService.class); + this.client = client; + } + + /** + * The interface defining all the services for UsageDetails to be + * used by Retrofit to perform actually REST calls. + */ + interface UsageDetailsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.v2017_11_30.UsageDetails list" }) + @GET("{scope}/providers/Microsoft.Consumption/usageDetails") + Observable> list(@Path(value = "scope", encoded = true) String scope, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$skiptoken") String skiptoken, @Query("$top") Integer top, @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.consumption.v2017_11_30.UsageDetails listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @param scope The scope of the usage details. The scope can be '/subscriptions/{subscriptionId}' for a subscription, or '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' for a billing period. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException 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<UsageDetailInner> object if successful. + */ + public PagedList list(final String scope) { + ServiceResponse> response = listSinglePageAsync(scope).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @param scope The scope of the usage details. The scope can be '/subscriptions/{subscriptionId}' for a subscription, or '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' for a billing period. + * @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 scope, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(scope), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @param scope The scope of the usage details. The scope can be '/subscriptions/{subscriptionId}' for a subscription, or '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' for a billing period. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageDetailInner> object + */ + public Observable> listAsync(final String scope) { + return listWithServiceResponseAsync(scope) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @param scope The scope of the usage details. The scope can be '/subscriptions/{subscriptionId}' for a subscription, or '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' for a billing period. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageDetailInner> object + */ + public Observable>> listWithServiceResponseAsync(final String scope) { + return listSinglePageAsync(scope) + .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 usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @param scope The scope of the usage details. The scope can be '/subscriptions/{subscriptionId}' for a subscription, or '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' for a billing period. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UsageDetailInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String scope) { + if (scope == null) { + throw new IllegalArgumentException("Parameter scope 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 expand = null; + final String filter = null; + final String skiptoken = null; + final Integer top = null; + return service.list(scope, expand, filter, skiptoken, top, 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 usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @param scope The scope of the usage details. The scope can be '/subscriptions/{subscriptionId}' for a subscription, or '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' for a billing period. + * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. + * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. + * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException 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<UsageDetailInner> object if successful. + */ + public PagedList list(final String scope, final String expand, final String filter, final String skiptoken, final Integer top) { + ServiceResponse> response = listSinglePageAsync(scope, expand, filter, skiptoken, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @param scope The scope of the usage details. The scope can be '/subscriptions/{subscriptionId}' for a subscription, or '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' for a billing period. + * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. + * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. + * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 scope, final String expand, final String filter, final String skiptoken, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(scope, expand, filter, skiptoken, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @param scope The scope of the usage details. The scope can be '/subscriptions/{subscriptionId}' for a subscription, or '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' for a billing period. + * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. + * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. + * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageDetailInner> object + */ + public Observable> listAsync(final String scope, final String expand, final String filter, final String skiptoken, final Integer top) { + return listWithServiceResponseAsync(scope, expand, filter, skiptoken, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @param scope The scope of the usage details. The scope can be '/subscriptions/{subscriptionId}' for a subscription, or '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' for a billing period. + * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. + * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. + * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageDetailInner> object + */ + public Observable>> listWithServiceResponseAsync(final String scope, final String expand, final String filter, final String skiptoken, final Integer top) { + return listSinglePageAsync(scope, expand, filter, skiptoken, top) + .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 usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + ServiceResponse> * @param scope The scope of the usage details. The scope can be '/subscriptions/{subscriptionId}' for a subscription, or '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' for a billing period. + ServiceResponse> * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. + ServiceResponse> * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. + ServiceResponse> * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. + ServiceResponse> * @param top May be used to limit the number of results to the most recent N usageDetails. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UsageDetailInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String scope, final String expand, final String filter, final String skiptoken, final Integer top) { + if (scope == null) { + throw new IllegalArgumentException("Parameter scope 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(scope, expand, filter, skiptoken, top, 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException 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<UsageDetailInner> 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 usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @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 usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @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<UsageDetailInner> 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 usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + * @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<UsageDetailInner> 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 usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UsageDetailInner> 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 ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/package-info.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/implementation/package-info.java new file mode 100644 index 000000000000..5c1ce6320080 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/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 ConsumptionManagementClient. + * Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. + */ +package com.microsoft.azure.management.consumption.v2017_11_30.implementation; diff --git a/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/package-info.java b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/package-info.java new file mode 100644 index 000000000000..5debd4c360c1 --- /dev/null +++ b/consumption/resource-manager/v2017_11_30/src/main/java/com/microsoft/azure/management/consumption/v2017_11_30/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 ConsumptionManagementClient. + * Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. + */ +package com.microsoft.azure.management.consumption.v2017_11_30;